Reference crop evapotranspiration prediction method, storage medium and equipment

Through the seasonal trend decomposition module and self-attention mechanism, combined with the frequency domain data embedding and channel attention layer, the periodic characteristics of the irrigation area data are extracted, which solves the problem that existing models are difficult to capture periodic characteristics, and improves the prediction of evaporative transpiration Accuracy, meets the management needs of irrigation areas.

CN119202666AActive Publication Date: 2024-12-27CHINA UNIV OF GEOSCIENCES (WUHAN)

Patent Information

Application Number
CN202411350498.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2024-12-27
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

The existing reference crop evaporation and transpiration prediction model is difficult to capture the periodic characteristics of irrigation area data, resulting in a decrease in prediction accuracy and unable to meet the needs of irrigation area management.

Method used

The prediction model consisting of the seasonal trend decomposition module, the seasonal cycle feature prediction module and the long-term trend feature prediction module are used to extract the periodicity of the data through frequency domain data embedding and self-attention mechanism, combining time steps and cross-dimensional channel attention layer. Features and variable relationships.

Benefits of technology

It improves the accuracy of evaporative transpiration prediction, can better capture the periodic characteristics and variable relationships of irrigation area data, improves the prediction accuracy, and meets the needs of irrigation area management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202666A_ABST
    Figure CN119202666A_ABST
Patent Text Reader

Abstract

The invention discloses a reference crop evapotranspiration prediction method, a storage medium and equipment, and relates to the field of reference crop evapotranspiration prediction.The method comprises the steps that historical reference crop evapotranspiration is calculated according to historical meteorological data of an irrigation area; determining the correlation between the evapotranspiration of the historical reference crop and different meteorological factors by using a Pearson correlation coefficient, and screening the first k meteorological factors with relatively large correlation; constructing a reference crop evapotranspiration prediction model composed of a seasonal trend decomposition module, a seasonal periodic feature prediction module and a long-term trend feature prediction module; the seasonal periodic feature prediction module comprises a frequency domain data embedding unit, a self-attention layer unit based on time steps of a transformer encoder, a channel attention layer unit based on channel attention mechanism cross-dimension, and a linear layer unit. According to the scheme, the data periodic features can be better extracted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of reference crop evapotranspiration prediction, and in particular to a reference crop evapotranspiration prediction method, storage medium and equipment. Background Art

[0002] Reference crop evapotranspiration (ET0) refers to the evapotranspiration of 8-15 cm high green dwarf crops that are highly consistent, vigorous, and completely cover the ground without water shortage. Accurate ET0 prediction is of great significance for water-saving agriculture and efficient use of agricultural water resources in various regions. ET0 prediction is a multivariate time series prediction problem. The general steps are to collect historical meteorological data, and then calculate the historical ET0 data according to the Penman-Monteith formula. By inputting historical meteorological data and historical ET0 data, the relationship between the data is analyzed using an artificial intelligence model to predict future ET0 data. However, the accuracy of the prediction model used earlier is difficult to meet the needs of irrigation district management.

[0003] Accurate prediction of ET0 can provide scientific guidance for managers to formulate water resource scheduling plans in advance, thereby saving a lot of water resources. In earlier studies, scholars usually use artificial intelligence models such as machine learning models and deep learning models to predict ET0, but these models have some defects that make it difficult to meet the needs of irrigation district management. For example, the widely used machine learning models support vector regression and random forest models are difficult to capture the complex dependencies between historical data of irrigation districts, resulting in their accuracy being difficult to meet the needs of irrigation district management. Deep learning models, including long short-term memory networks and gated recurrent units, have memory leakage effects. When the prediction time becomes longer, the prediction accuracy will drop rapidly, which has limitations in practical applications.

[0004] With the introduction of the Transformer architecture, the self-attention mechanism has gradually been applied to time series forecasting tasks. Unlike methods based on long short-term memory networks, the self-attention mechanism allows the model to access any part of the historical data regardless of the distance, which gives it a huge advantage in acquiring complex time-dependent features and the relationship between different variables. However, correspondingly, self-attention models the dependency of each position on all other positions equally. Although this global attention is conducive to capturing long-distance dependencies, it is difficult to capture the periodic characteristics of irrigation area data. Summary of the invention

[0005] The purpose of the present invention is to solve the problem that the periodic characteristics of irrigation area data are difficult to capture, and propose a reference crop evapotranspiration prediction method, comprising the following steps:

[0006] S1. Obtain historical meteorological data of the irrigation area, and calculate historical reference crop evapotranspiration based on the historical meteorological data of the irrigation area;

[0007] S2, using the Pearson correlation coefficient to determine the correlation between the historical reference crop evapotranspiration and different meteorological factors, and screening the top k meteorological factors with the largest correlation with the historical reference crop evapotranspiration;

[0008] S3. Construct a reference crop evapotranspiration prediction model, which consists of three modules: seasonal trend decomposition module, seasonal cycle feature prediction module, and long-term trend feature prediction module;

[0009] The seasonal cycle feature prediction module includes a frequency domain data embedding unit, a time step self-attention layer unit, a cross-dimensional channel attention layer unit, and a linear layer unit; the time step self-attention layer unit includes a transformer encoder, and the cross-dimensional channel attention layer unit includes a channel attention mechanism;

[0010] The input of the seasonal cycle feature prediction module is input into the frequency domain data embedding unit after discrete cosine transformation. The input of the frequency domain data embedding unit also includes the position information of the input of the seasonal cycle feature prediction module after discrete cosine transformation. The output of the frequency domain data embedding unit is input into the self-attention layer unit of the time step. The output of the self-attention layer unit of the time step is input into the cross-dimensional channel attention layer unit. The output of the cross-dimensional channel attention layer unit and the output of the frequency domain data embedding unit are multiplied and input into the linear layer unit to obtain the output of the seasonal cycle feature prediction module.

[0011] The long-term trend feature prediction module includes a multi-layer perceptron;

[0012] The historical reference crop evapotranspiration and the time series of the top k meteorological factors with the largest correlation with the historical reference crop evapotranspiration are used as the model input X;

[0013] The seasonal trend decomposition module decomposes the time series of the model input into the seasonal cycle series X s and the long-term trend series X t ;

[0014] The seasonal cycle sequence X s Input the seasonal cycle feature prediction module to obtain the predicted seasonal cycle feature Y s ; The long-term trend sequence X t Input the long-term trend feature prediction module to obtain the predicted long-term trend feature Y t ;

[0015] Y s and Y tThe model output reference crop evapotranspiration prediction Y is obtained by splicing.

[0016] Furthermore, meteorological factors include: average air pressure, daily maximum temperature, daily minimum temperature, average wind speed, sunshine duration and average relative humidity.

[0017] Furthermore, the expression of historical reference crop evapotranspiration is calculated based on the historical meteorological data of the irrigation area:

[0018]

[0019] Among them, ET0 represents the historical reference crop evapotranspiration, Δ represents the slope of the saturated water vapor pressure curve, and R n represents the net radiation on the crop surface, G represents the soil heat flux, r represents the hygrometer constant, T represents the daily average temperature at a height of 2 meters, u2 represents the wind speed at a height of 2 meters, and e s Expressed as saturated water vapor pressure, e a Indicates the actual water vapor pressure.

[0020] Furthermore, the principle of the seasonal trend decomposition module is:

[0021] X t =Avgpool(Padding(X)),

[0022] X s =XX t .

[0023] Furthermore, the discrete cosine transform is expressed as:

[0024]

[0025] in, Represents a sequence segment Represented in the frequency domain, Represents a sequence segment The discrete cosine transform of , d represents the dimension index, i represents the segment index, Represents X s The sequence segment with the d-th dimension index i, L represents the sequence X s Length, L s Indicates the length of the segment, n indicates the sample index within the segment, n = [0,1...L s -1], express The sample with index n in the sequence X is represented by D. s The total dimensions of Represents the cosine function, l represents the index of different frequency components, and ∪ represents the concatenation operation.

[0026] The expression of the frequency domain data embedding unit is:

[0027]

[0028] in, Represents the sequence X d The frequency domain embedding representation, E(Fred d ) d To embed, Fred d Represents the sequence X d Represented in the frequency domain, Fred d position embedding.

[0029] Furthermore, when the current number of layers of the self-attention layer of the time step is 1, the attention weight of the self-attention layer unit of the time step is expressed as:

[0030]

[0031] Among them, Tatt d Indicates H d The attention weight at the time step, H d represents the frequency domain embedding vector of dimension d output by the frequency domain data embedding unit, 1≤d≤D, D represents the sequence X s The dimension of , layerNorm represents the normalization operation, MSA represents the multi-head self-attention mechanism of the self-attention layer unit of the time step, Indicates about H d The query vector of Indicates about H d The key vector of ; Indicates about H d The value vector of h = {1, 2, 3...H} represents the number of heads of multi-head attention. Respectively express about The weight parameter of ; where Indicates Tatt d After the feedforward layer and the normalization layer, the attention weight feature map, Tatt all Representing the attention weight feature map of each dimension The feature map after splicing along the channel, Feedforward represents the feedforward network layer, and Concat represents the splicing operation.

[0032] Furthermore, the attention weight of the cross-dimensional channel attention layer unit is expressed as:

[0033] Fatt=softmax(W1ReLU(W2Tatt all )

[0034] Among them, Fatt represents the attention weight of the channel of the cross-dimensional channel attention layer, W1 and W2 are two fully connected layers, softmax represents the softmax activation function, and ReLU represents the ReLU activation function.

[0035] Furthermore, the MSE loss function is used to measure the difference between the model prediction value and the true value:

[0036]

[0037] Among them, L represents the loss function, represents the i-th true value, Y i represents the predicted value of the i-th model, and O represents the length of the predicted data.

[0038] The present invention also proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned reference crop evaporation and transpiration prediction method is implemented.

[0039] The present invention also proposes an electronic device, comprising a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the above-mentioned reference crop evaporation and transpiration prediction method.

[0040] The beneficial effects brought by the technical solution provided by the present invention are:

[0041] The present invention proposes a reference crop evapotranspiration prediction method, which uses discrete cosine transform to transform the ET0 data of the irrigation area into the frequency domain, and then embeds the frequency domain data and position information into vectors, so that the attention layer can better discover the periodic characteristics of the data and the relationship between variables, and use the attention layer on the time step and the attention layer across variables to model the time-dependent characteristics within the single variable and the relationship characteristics between multiple variables in turn, and finally project the feature map to obtain the ET0 prediction result of the target time step. The scheme of the present invention can better extract the periodic characteristics of the data, and provide a method reference for the application of the self-attention-based model to the reference crop evapotranspiration prediction task. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a flow chart of a method for predicting crop evapotranspiration according to an embodiment of the present invention;

[0043] Figure 2 is a structural diagram of a reference crop evapotranspiration prediction model constructed in an embodiment of the present invention;

[0044] Figure 3] are time domain and frequency domain diagrams of the ETO data of the observation area from 2000 to 2016 according to an embodiment of the present invention, wherein: Figure 3 (a) is the time domain diagram. Figure 3 (b) is the frequency domain diagram;

[0045] Figure 4 This is a structural diagram of a seasonal cycle feature prediction module according to an embodiment of the present invention;

[0046] Figure 5 It is a block diagram of an electronic device in an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0047] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0048] The flowchart of the reference crop evapotranspiration prediction method according to the embodiment of the present invention is as follows: Figure 1 , specifically including the following steps:

[0049] S1. Obtain the historical meteorological data of the irrigation area, and calculate the historical reference crop evapotranspiration based on the historical meteorological data of the irrigation area. The reference crop evapotranspiration ET0 is obtained by substituting the historical meteorological data into the Penman-Monteith formula formally proposed by the Food and Agriculture Organization of the United Nations (FAO). The calculation formula of ET0 is as follows:

[0050]

[0051] Among them, ET0 represents the historical reference crop evapotranspiration, unit: mm / day; Δ represents the slope of the saturated water vapor pressure curve, R n It represents the net radiation on the crop surface, the unit is: MJ / (m 2 / day); G represents soil heat flux, unit: MJ / (m 2 / day); r represents the hygrometer constant, unit: kPa / ℃; T represents the daily average temperature at a height of 2 meters, unit: ℃; u2 represents the wind speed at a height of 2 meters, unit: m / s; e s Expressed as saturated water vapor pressure, unit: kPa; e a Indicates the actual water vapor pressure, unit: kPa.

[0052] S2. Determine the correlation between the historical reference crop evapotranspiration and different meteorological factors using the Pearson correlation coefficient, where the meteorological factors include: average air pressure, daily maximum temperature, daily minimum temperature, average wind speed, sunshine duration and average relative humidity, and determine the top k meteorological factors that have a greater impact on the historical reference crop evapotranspiration. Specifically, the embodiment of the present invention screens out the meteorological factors that have the greatest impact on evapotranspiration as daily maximum temperature, daily minimum temperature and sunshine duration.

[0053] Selecting appropriate predictors can not only reduce the dimension of the data and the amount of calculation of the model, but also improve the accuracy of the model prediction. Pearson correlation can test the correlation between different variables. This test quantifies the statistically significant correlation or correlation between two continuous factors. It is considered to be an excellent method to measure the correlation between the parameters under study. Both variables can be positively correlated or negatively correlated. If the correlation coefficient is equal to 0, the relationship between the two variables cannot be determined. This can determine the relationship between different meteorological factors and ET0 to determine the best input scheme. The Pearson correlation calculation formula is as follows:

[0054]

[0055] Among them, R(X,Y) represents the correlation between variables X and Y. i represents the i-th observation in variable X, represents the mean of variable X, Y i represents the i-th observation in variable Y, Represents the mean of the variable Y.

[0056] S3. Construct a reference crop evapotranspiration prediction model, refer to Figure 2 , Figure 2 This is a structural diagram of a reference crop evapotranspiration prediction model constructed in an embodiment of the present invention. The model consists of three modules: a seasonal trend decomposition module, a seasonal cycle feature prediction module, and a long-term trend feature prediction module.

[0057] Combined with the characteristics of irrigation area data, the time series is divided into long-term trends and seasonal changes for separate predictions, so that appropriate models can be used for prediction according to the characteristics of the data. For monotonous long-term trend series, a multi-layer perceptron model is used for prediction; for complex seasonal cycle series, the series is transformed from the time domain to the frequency domain, and the proposed dual self-attention based on frequency domain enhancement is used for modeling and prediction of reference crop evaporation and transpiration. Figure 3 As shown, Figure 3 ] are time domain and frequency domain diagrams of the ETO data of the observation area from 2000 to 2016 according to an embodiment of the present invention, wherein: Figure 3 (a) is the time domain diagram. Figure 3(b) is the frequency domain diagram. The main frequencies of ET0 data from 2000 to 2016 in the frequency domain are This shows that the ET0 data has a strong annual periodicity. The attention layer in the frequency domain can better discover the periodic characteristics of the data and the relationship between variables. The self-attention layer on the time step and the self-attention layer across variables are introduced to model the time-dependent characteristics within a single variable and the relationship between multiple variables in turn, thereby making more accurate predictions.

[0058] The seasonal cycle feature prediction module includes a frequency domain data embedding unit, a time step self-attention layer unit, a cross-dimensional channel attention layer unit, and a linear layer unit; the time step self-attention layer unit includes a transformer encoder, which includes a multi-head self-attention mechanism and a residual link and a layer normalization layer, a feedforward network and a residual link and a layer normalization layer, refer to Figure 4 , Figure 4 1 is a structural diagram of a seasonal cycle feature prediction module according to an embodiment of the present invention. The cross-dimensional channel attention layer unit includes a channel attention mechanism.

[0059] The historical reference crop evapotranspiration and the time series of the top k meteorological factors with the largest correlation with the historical reference crop evapotranspiration are used as the model input X. where X∈R L×D , L represents the length of the input data, D represents the total number of input variables, i represents the specific variable, 0 <d<D-1。

[0060] In the embodiment of the present invention, before inputting into the model, the data of the specific prediction factor needs to be normalized within the range of [-3, 3] to eliminate the variance. The specific normalization formula is as follows:

[0061]

[0062] The processed data conforms to the standard normal distribution, that is, the mean is 0 and the standard deviation is 1. Where μ is the mean of all sample data, σ is the standard deviation of all sample data, x represents the observed value, x normalization is the normalized value.

[0063] The seasonal trend decomposition module decomposes the time series X of the model input into the seasonal cycle series X s (X s ∈R L×D ) and the long-term trend series X t (X t ∈R L×D). The long-term trend describes the long-term trend of changes in time series data, that is, the overall trend of the data over a longer time frame, and the seasonal cycle describes the recurring seasonal changes in time series data. It reflects the periodic fluctuations of the data. The model uses a moving average to smooth the periodic fluctuations. Specifically, the moving average pool is adjusted to smooth the periodic fluctuations and highlight the long-term trend. For an input sequence X∈R of length L L×D , the process is:

[0064] X t =Avgpool(Padding(X)),

[0065] X s =XX t .

[0066] Where L represents the length of sequence X and D represents the dimension of sequence X.

[0067] The seasonal cycle sequence X s Input the seasonal cycle feature prediction module to obtain the predicted seasonal cycle feature Y s ; The long-term trend sequence X t Input the long-term trend feature prediction module to obtain the predicted long-term trend feature Y t .

[0068] The purpose of the frequency domain data embedding unit is to transform the time domain sequence into the frequency domain so that the model can more easily discover the periodic characteristics of the data. The periodicity is reflected on the scale of years. For the seasonal periodic sequence X s ∈R L×D , split it into sequence segments by year: i represents the segment number in the univariate sequence, and d represents the variable dimension to which the sequence segment belongs. For each sequence segment, discrete cosine transform is used to transform it to the frequency domain to obtain frequency domain data. The basic idea of ​​discrete cosine transform is to decompose the input signal into a set of cosine functions, and then calculate the product of each cosine function and the input signal within a certain time range to obtain the coefficient of each cosine function. These coefficients represent the energy of the input signal at the corresponding frequency, that is, the amplitude spectrum in the frequency domain. The specific formula is as follows:

[0069]

[0070] in, Represents a sequence segment Represented in the frequency domain, Represents a sequence segment The discrete cosine transform of , d represents the dimension index, i represents the segment index, Represents X s The sequence segment with the d-th dimension index i, L represents the sequence X s Length, L s Indicates the length of the segment, n indicates the sample index within the segment, n = [0,1...L s -1], express The sample with index n in the sequence X is represented by D. s The total dimensions of Represents the cosine function, l represents the index of different frequency components, and ∪ represents the concatenation operation.

[0071] The expression of the frequency domain data embedding unit is:

[0072]

[0073] in, Represents the sequence X d The frequency domain embedding representation, E(Fred d ) d To embed, Fred d Represents the sequence X d Represented in the frequency domain, Fred d position embedding.

[0074] Finally, the periodic sequence X s The frequency domain embedding representation of all sequence segments is concatenated to obtain the periodic sequence X s The frequency domain embedding representation H is

[0075] After transforming the sequence from the time domain to the frequency domain, the model can more easily model the periodic characteristics of the data. First, we need to capture the impact of historical data on future data, that is, the relationship in time steps. The self-attention mechanism has an advantage in capturing long-term dependencies in time, so multi-head self-attention is used here to capture the periodic feature relationship in the time steps of frequency domain data in different years. Since there are n layers of attention layers in the time step, l represents the current number of layers. When l = 1, the data fed is H. Use H d (1≤d≤D) represents the frequency domain embedding vector of all years in dimension d. Then multi-head self-attention is used to model the frequency domain embedding of the seasonal cycle sequence, which is input to the self-attention layer unit of the time step, and the attention weight of the self-attention layer unit of the time step is obtained, which is expressed as:

[0076]

[0077] Among them, Tatt d Indicates H d The attention weight at the time step, H drepresents the frequency domain embedding vector of dimension d output by the frequency domain data embedding unit, 1≤d≤D, D represents the sequence X s The dimension of , layerNorm represents the normalization operation, MSA represents the multi-head self-attention mechanism of the self-attention layer unit of the time step, Indicates about H d The query vector of Indicates about H d The key vector of ; Indicates about H d The value vector of h = {1, 2, 3...H} represents the number of heads of multi-head attention. Respectively express about The multiple heads here are used to adaptively weight the periodic feature relationship of the frequency domain data at different time steps of different years. It maps the input sequence multiple times, and each mapping generates an attention head. Each attention head focuses on the periodic features of different years, and then their weighted representations are fused to obtain a more comprehensive feature representation.

[0078] Then the attention weights Tatt on all dimensions d Integrated into Tatt all , The attention weight representing the periodic feature relationship of all dimensions at different time steps in different years is as follows:

[0079]

[0080] in, Indicates Tatt d After the feedforward layer and the normalization layer, the attention weight feature map, Tatt all Representing the attention weight feature map of each dimension The feature map after splicing along the channel, Feedforward represents the feedforward network layer, and Concat represents the splicing operation.

[0081] When l>1, two adjacent vectors H in dimension d are 2i-1,d and H 21,d Merge to further capture richer periodic dependencies on time steps. The specific formula is as follows:

[0082]

[0083] Among them, l represents the current number of layers, “⊕” represents the connection operation, and M is the learnable matrix used for segment merging. Represents the sequence X of the l-1th layer s The frequency domain embedding representation of the 2i-1th sequence segment with dimension d, Represents the sequence X of the l-1th layer s Frequency domain embedding representation of the 2i-th sequence segment of dimension d.

[0084] The attention weights of the self-attention layer units at the time step are input to the cross-dimensional channel attention layer units to obtain the attention weights of the cross-dimensional channel attention layer units. Specifically, a channel attention is used to capture the relationship between different variables, where the channels represent the characteristics of different variables. all , first send it to the first fully connected layer, which maps the input data to a lower dimensional space, called the bottleneck representation, and then the bottleneck representation is passed through a nonlinear activation function to introduce nonlinear transformation. The transformed bottleneck representation is sent to the second fully connected layer, which maps it back to the original space. Then the output of the second fully connected layer is passed through a softmax operation to obtain the attention weight of each channel. The channel attention formula is as follows:

[0085] Fatt=softmax(W1ReLU(W2Tatt all )

[0086] Among them, Fatt represents the attention weight of the channel of the cross-dimensional channel attention layer, W1 and W2 are two fully connected layers, softmax represents the softmax activation function, and ReLU represents the ReLU activation function.

[0087] The result of multiplying the attention weight of the cross-dimensional channel attention layer unit and the output of the frequency domain data embedding unit is input into the linear layer unit, and the output Y of the seasonal cycle feature prediction module is obtained through a flattened linear projection layer. s :

[0088] Y s =f(H·Fatt)

[0089] Where H represents the output of the frequency domain data embedding unit, Y s ∈R O×1 represents the predicted seasonal feature prediction sequence, and f represents the flattened linear projection layer.

[0090] The long-term trend feature prediction module includes a multi-layer perceptron, which transforms the long-term trend sequence X t Input the long-term trend feature prediction module to obtain the long-term trend sequence:

[0091] Y t =MLP(X t )

[0092] Among them, Y t ∈R O×1It represents the long-term trend sequence for predicting ET0, O is the length of the sequence to be predicted, and the MLP layer is represented as follows: the input is a vector x, the weight matrix is ​​W, the bias vector is b, and the activation function is σ, then the output y of this MLP layer can be expressed as follows:

[0093] y=σ(Wx+b)

[0094] For the MLP model with multiple layers, the output of each layer is used as the input of the next layer. This layer stacking method enables the MLP layer to better learn and represent long-term trend time series.

[0095] Y s and Y t The model output reference crop evapotranspiration prediction Y is obtained by splicing. The final prediction result is Y = Y s +Y t , Y∈R o×1 .

[0096] The MSE loss function is used to measure the difference between the model's predicted value and the true value in order to effectively train and optimize the model. The goal is to minimize the MSE loss function and adjust the model's parameters to minimize the difference between the predicted value and the true value. This allows the model to learn the patterns and features of the input data more accurately, thereby improving the prediction performance.

[0097] The MSE loss function is expressed as:

[0098]

[0099] Among them, L represents the loss function, represents the i-th true value, Y i represents the predicted value of the i-th model, and O represents the length of the predicted data.

[0100] In an exemplary embodiment, a computer-readable storage medium is included, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned reference crop evapotranspiration prediction method is implemented.

[0101] See also Figure 5 In an exemplary embodiment, an electronic device is also included, including at least one processor, at least one memory, and at least one communication bus.

[0102] Wherein, a computer program is stored in the memory, and the computer program includes computer-readable instructions. The processor calls the computer-readable instructions stored in the memory through the communication bus to execute the above-mentioned reference crop evaporation and transpiration prediction method.

[0103] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A reference crop evapotranspiration prediction method, characterized in that: The following steps are involved: S1. Obtain historical meteorological data of the irrigation area, and calculate historical reference crop evapotranspiration based on the historical meteorological data of the irrigation area; S2, using the Pearson correlation coefficient to determine the correlation between the historical reference crop evapotranspiration and different meteorological factors, and screening the top k meteorological factors with the largest correlation with the historical reference crop evapotranspiration; S3. Construct a reference crop evapotranspiration prediction model, which consists of three modules: seasonal trend decomposition module, seasonal cycle feature prediction module, and long-term trend feature prediction module; The seasonal cycle feature prediction module includes a frequency domain data embedding unit, a time step self-attention layer unit, a cross-dimensional channel attention layer unit, and a linear layer unit; the time step self-attention layer unit includes a transformer encoder, and the cross-dimensional channel attention layer unit includes a channel attention mechanism; The input of the seasonal cycle feature prediction module is input into the frequency domain data embedding unit after discrete cosine transformation. The input of the frequency domain data embedding unit also includes the position information of the input of the seasonal cycle feature prediction module after discrete cosine transformation. The output of the frequency domain data embedding unit is input into the self-attention layer unit of the time step. The output of the self-attention layer unit of the time step is input into the cross-dimensional channel attention layer unit. The output of the cross-dimensional channel attention layer unit and the output of the frequency domain data embedding unit are multiplied and input into the linear layer unit to obtain the output of the seasonal cycle feature prediction module. The long-term trend feature prediction module includes a multi-layer perceptron; The historical reference crop evapotranspiration and the time series of the top k meteorological factors with the largest correlation with the historical reference crop evapotranspiration are used as the model input X; The seasonal trend decomposition module decomposes the time series of the model input into the seasonal cycle series X s and the long-term trend series X t ; The seasonal cycle sequence X s Input the seasonal cycle feature prediction module to obtain the predicted seasonal cycle feature Y s ; The long-term trend sequence X t Input the long-term trend feature prediction module to obtain the predicted long-term trend feature Y t ; Y s and Y t The model output reference crop evapotranspiration prediction Y is obtained by splicing.

2. A reference crop evapotranspiration prediction method according to claim 1, characterized in that: Meteorological factors include: average air pressure, daily maximum temperature, daily minimum temperature, average wind speed, sunshine duration and average relative humidity.

3. A reference crop evapotranspiration prediction method according to claim 1, characterized in that: The expression of historical reference crop evapotranspiration calculated based on the historical meteorological data of the irrigation area is: Among them, ET0 represents the historical reference crop evapotranspiration, Δ represents the slope of the saturated water vapor pressure curve, and R n represents the net radiation on the crop surface, G represents the soil heat flux, r represents the hygrometer constant, T represents the daily average temperature at a height of 2 meters, u2 represents the wind speed at a height of 2 meters, and e s Expressed as saturated water vapor pressure, e a Indicates the actual water vapor pressure.

4. A reference crop evapotranspiration prediction method according to claim 1, characterized in that: The principle of the seasonal trend decomposition module is: X t =Avgpool(Padding(X)), X s =X-X t 。 5. A reference crop evapotranspiration prediction method according to claim 1, characterized in that: The discrete cosine transform is expressed as: in, Represents a sequence segment Represented in the frequency domain, Represents a sequence segment The discrete cosine transform of , d represents the dimension index, i represents the segment index, Represents X s The sequence segment with the d-th dimension index i, 1≤d≤D, L represents the sequence X s Length, L s Indicates the length of the segment, n indicates the sample index within the segment, n = [0,1...L s -1], express The sample with index n in the sequence X is represented by D. s The total dimensions of Represents the cosine function, l represents the index of different frequency components, and ∪ represents the concatenation operation. The expression of the frequency domain data embedding unit is: in, Represents the sequence X d The frequency domain embedding representation, E(Fred d ) d To embed, Fred d Represents the sequence X d Represented in the frequency domain, Fred d position embedding.

6. A reference crop evapotranspiration prediction method according to claim 1, characterized in that: When the current number of layers of the self-attention layer of the time step is 1, the attention weight of the self-attention layer unit of the time step is expressed as: Among them, Tatt d Indicates H d The attention weight at the time step, H d represents the frequency domain embedding vector of dimension d output by the frequency domain data embedding unit, 1≤d≤D, D represents the sequence X s The dimension of , layerNorm represents the normalization operation, MSA represents the multi-head self-attention mechanism of the self-attention layer unit of the time step, Indicates about H d The query vector of Indicates about H d The key vector of ; Indicates about H d The value vector of h = {1, 2, 3...H} represents the number of heads of multi-head attention. Respectively express about The weight parameter of Tatt d Attention weight feature map after the feedforward layer and normalization layer, Tatt all Representing the attention weight feature map of each dimension The feature map after splicing along the channel, Feedforward represents the feedforward network layer, and Concat represents the splicing operation.

7. A reference crop evapotranspiration prediction method according to claim 6, characterized in that: The attention weight of the cross-dimensional channel attention layer unit is expressed as: Fact=softmax(W1ReLU(W2Tatt all ), Among them, Fatt represents the attention weight of the channel of the cross-dimensional channel attention layer, W1 and W2 are two fully connected layers, softmax represents the softmax activation function, and ReLU represents the ReLU activation function.

8. A reference crop evapotranspiration prediction method according to claim 1, characterized in that: The MSE loss function is used to measure the difference between the model prediction value and the true value: Where L represents the loss function, represents the i-th true value, Y i represents the predicted value of the i-th model, and O represents the length of the predicted data.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Crop water demand prediction method and device, electronic equipment and storage medium

    CN116306794A

  • Convolutional sparse self-attention-based irrigation area water demand estimation method, equipment and medium

    CN118395108A

  • Crop irrigation water demand prediction method based on aquacrop model and svr

    WO2023179167A1

Cited By

  • Reference crop evapotranspiration prediction method and device, medium and equipment

    CN120706662A