Agrometeorological early warning method based on regional microclimate data interpolation and correction
By combining generative adversarial networks with Bayesian hierarchical models, the problem of real-time prediction of microclimate data in complex terrain areas was solved, achieving high-precision, real-time agricultural meteorological early warning and improving the accuracy and timeliness of early warning.
Patent Information
- Application Number
- CN202610145802.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-02
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2046-02-02
AI Technical Summary
Existing technologies struggle to achieve real-time prediction of microclimate data in complex terrain areas, leading to delays in agricultural early warning systems.
A high-resolution meteorological background field is generated using generative adversarial networks, and combined with a Bayesian hierarchical dynamic correction model. By fusing topographic physical constraints and multi-source observation data, an agricultural meteorological early warning method for regional microclimate data interpolation and correction is constructed.
It significantly improves the accuracy and timeliness of early warnings for localized sudden agricultural meteorological disasters such as frost and hot dry winds, ensures that the generated meteorological background field follows physical laws and self-assesses uncertainty, and achieves meteorological analysis with high spatial resolution and high timeliness.
Smart Images

Figure CN121613540A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural meteorological early warning methods, specifically an agricultural meteorological early warning method based on regional microclimate data interpolation and correction. Background Technology
[0002] In regions like Xinjiang, where meteorological stations are sparse and topography is relatively complex, regional microclimate characteristics are significantly shaped by the local ground surface and topographic dynamics and thermodynamics. Currently, achieving accurate agricultural meteorological early warning mainly relies on two technical approaches: one is to generate high-resolution meteorological grid data based on spatial interpolation methods, such as co-kriging; the other is to use numerical weather prediction products or climate model outputs for early warning, such as bias correction of regional climate model products.
[0003] However, while the first technical approach can generate a richly detailed background field, it is essentially static and struggles to effectively integrate real-time observation data within the warning timeframe, leading to delays in warnings of sudden microclimate events such as frost and hot, dry winds. The second technical approach, while dynamic, relies on an initial background field with coarse spatial resolution, resulting in distortions in the correction of key microclimate features such as valley inversions and slope aspect temperature differences. On such biased, coarse fields, even with the assimilation of real-time observation data, the analysis results are easily distorted, making it difficult to accurately capture crucial microclimate features vital to agriculture.
[0004] Therefore, existing technologies are insufficient to provide real-time forecasts of microclimate data in complex terrain areas, leading to delays in agricultural early warning systems. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an agricultural meteorological early warning method based on regional microclimate data interpolation and correction. Existing technologies are unable to meet the requirements for real-time prediction of microclimate data in complex terrain areas, resulting in the technical problem of delayed agricultural early warning.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an agricultural meteorological early warning method based on regional microclimate data interpolation and correction, the method specifically including the following steps:
[0007] S1. Obtain historical meteorological observation data and digital elevation model data for the target area to construct a training dataset;
[0008] S2. Construct a generative adversarial network model that integrates terrain physical constraints and train the model using a training dataset. Input the digital elevation model data of the target area and the meteorological observation data of sparse stations into the trained generative adversarial network model to generate the background field of meteorological elements in the target area and its corresponding grid uncertainty estimation field; wherein, the meteorological elements include at least temperature.
[0009] S3. Construct a Bayesian hierarchical dynamic correction model that includes an observation model layer, a process model layer, and a prior model layer. The input of the observation model layer is the real-time meteorological observation data of the target area. The process model layer is used to characterize the spatial correlation structure of meteorological elements. The prior model layer is constructed from the background field of meteorological elements and their corresponding grid uncertainty estimation field.
[0010] S4. Run the Bayesian hierarchical dynamic correction model. Through Bayesian inference, fuse the data of the observation model layer and the prior model layer under the constraints of the process model layer to calculate the meteorological element analysis field and its posterior uncertainty.
[0011] S5. Based on the meteorological element analysis field and combined with the preset disaster judgment thresholds related to the key growth period of crops, generate and output agricultural meteorological early warning information for specific farmland units.
[0012] Preferably, the generative adversarial network model comprises a generator G and a discriminator D, which take a random noise vector z and deterministic conditional information as inputs.
[0013] The generator G employs a U-Net network with skip connections, and the encoder of the U-Net network includes a first feature extraction branch and a second feature extraction branch in parallel.
[0014] The first feature extraction branch is used to downsample and extract terrain feature maps. High-level features, the terrain feature map Normalized data derived from digital elevation model data, including at least three channels: elevation, slope, and aspect.
[0015] The second feature extraction branch is used to downsample and extract high-level features of the coarse meteorological field. The result is obtained by performing inverse distance weighted interpolation based on the historical meteorological observation data;
[0016] The high-level features extracted by the first feature extraction branch and the second feature extraction branch are used as deterministic conditional information;
[0017] The encoder is used to fuse deterministic conditional information with a random noise vector z to obtain fused features;
[0018] The decoder of the U-Net network is used to upsample the fused features and, through skip connections, to fused low-level detail features in the encoder, outputting a meteorological background field with a spatial resolution consistent with the terrain feature map. ;
[0019] The discriminator D adopts the PatchGAN structure. During training, the real meteorological field sample and the corresponding terrain feature map are superimposed in the channel dimension to obtain the first sample. The meteorological element background field output by the generator is superimposed in the channel dimension with the corresponding terrain feature map to obtain the second sample. The first sample or the second sample is input into the discriminator D to obtain a two-dimensional matrix. The value of each position in the two-dimensional matrix represents the probability that the local receptive field area corresponding to the input image conforms to the distribution law of the real meteorological field.
[0020] During the model training phase, the random noise vector z is derived from a pre-defined prior distribution. The random noise vector z is obtained by sampling. In the model application stage, in order to generate the background field of meteorological elements, the random noise vector z is a preset fixed value.
[0021] Preferably, the specific steps for generating the grid uncertainty estimation field are as follows:
[0022] After the generative adversarial network model is trained, the parameters of the generator G and the discriminator D are fixed, and the generator G is temporarily de-fixed for the random noise vector during the application phase.
[0023] Based on the same set of deterministic condition information, random noise vectors z with different values are injected into the generator G, and each random noise vector z is independently propagated forward to obtain several background fields of generated meteorological elements.
[0024] Each generated meteorological element background field is overlaid with the topographic feature map, and then input into the discriminator D to obtain the corresponding two-dimensional matrix, which is then marked as a discriminant confidence map.
[0025] Calculate the sample variance of the meteorological element values at each spatial grid point for each generated meteorological element background field to obtain the generated variance field. ;
[0026] Calculate the arithmetic mean of each discrimination confidence map to obtain the average discrimination confidence field;
[0027] The variance field and the average discrimination confidence field are fused to obtain the gridded uncertainty estimation field.
[0028] Preferably, the encoder of the U-Net network further includes a parallel third feature extraction branch, which is used to downsample and extract high-level features of the preprocessed satellite remote sensing inversion data that is spatiotemporally aligned with the terrain feature map. The satellite remote sensing inversion data includes at least surface temperature and normalized vegetation index data, and is labeled as deterministic condition information.
[0029] Preferably, the specific steps for obtaining the fusion features are as follows:
[0030] Several deterministic conditional information items are concatenated along the channel dimension to obtain preliminary fusion features;
[0031] The initial fused features are subjected to global average pooling along the spatial dimension to obtain the channel description vector A;
[0032] The nonlinear relationship between channels is learned through a multi-layer fully connected network with a bottleneck structure to obtain the attention weight vector w.
[0033] The attention weight vector w is multiplied channel by channel with the initial fused features to obtain the final fused features after recalibration.
[0034] Preferably, the total loss function of the generative adversarial network model is a weighted sum of the adversarial loss, reconstruction loss, and physical constraint loss; the adversarial loss The reconstruction loss is the least squares loss. Background field of meteorological elements used to characterize the generator output The average absolute error between the data from known observation points and the actual observed values in meteorological observation data;
[0035] The physical constraint loss This is used to use the vertical temperature lapse rate as a soft constraint to limit the variation of temperature.
[0036] Preferably, in step S3, the process model layer is used to construct the covariance matrix of the layer through the spatial covariance function to define the spatial correlation structure of meteorological elements. The spatial covariance function is constructed to monotonically decrease as the geographical distance and topographic distance between any two spatial locations within the target area increase, and the topographic distance is the elevation difference between the two spatial locations.
[0037] Preferably, in step S3, the specific steps for constructing the prior model layer from the meteorological element background field and its corresponding grid uncertainty estimation field are as follows:
[0038] The prior model layer defines the prior distribution of the true value field X of meteorological elements as a multivariate Gaussian distribution;
[0039] The prior covariance matrix of the prior model layer is the sum of the diagonal matrix and the covariance matrix of the process model layer. The diagonal elements in the diagonal matrix are obtained by mapping the values of the corresponding grid points in the grid uncertainty estimation field through a preset monotonically increasing function.
[0040] Preferably, in step S3, the observation model layer of the Bayesian hierarchical dynamic correction model is defined as: In the above formula, This represents a vector of real-time meteorological observation data acquired from multiple devices. Represents the true field of meteorological elements. This represents the observation operator matrix, used to map the true value field of meteorological elements to the location of observation points. The observation error covariance matrix;
[0041] The real-time meteorological observation data vector It should include at least observational data from fixed meteorological standard stations within the target area and observational data from IoT mobile observation devices deployed in farmland areas;
[0042] The observation error covariance matrix is a block diagonal matrix used to characterize the differences in uncertainty between different types of observation data, and its expression is: In the above formula, and Let S and S represent the observation error covariance submatrices of the observation data from fixed meteorological standard stations and IoT mobile observation devices, respectively. and Both are diagonal matrices, and their diagonal elements... and The settings are made based on the calibration accuracy parameters of the corresponding type of observation equipment or historical observation error statistics, and meet the following requirements. That is, the variance of the observation error of fixed meteorological standard stations is smaller than the variance of the observation error of IoT mobile observation devices.
[0043] Preferably, in step S4, the specific steps of the Bayesian inference are as follows: fusing the prior model layer and the observation model layer to obtain the meteorological element analysis field and its posterior uncertainty, the calculation formula of which is: ; ;; In the above formula, and Let X and y be the mean vector and covariance matrix of the posterior distribution of the true value field X of the meteorological element, respectively. These mean vector and covariance matrix represent the analytical field and posterior uncertainty of the meteorological element, respectively. It is the identity matrix. Here is the Kalman gain matrix. Represents the background field vector of meteorological elements. This represents a vector of real-time meteorological observation data acquired by the observation model layer. Represents the observation operator matrix, This represents the prior covariance matrix of the prior model layer. This represents the observation error covariance matrix of the observation model layer.
[0044] Compared with existing technologies, this invention provides an agricultural meteorological early warning method based on regional microclimate data interpolation and correction, which has the following beneficial effects:
[0045] 1. This invention uses a high-resolution, physically reliable static meteorological background field generated by a generative adversarial network as prior information for a Bayesian hierarchical dynamic correction model. This enables the simultaneous acquisition of a meteorological analysis field with high spatial resolution and high timeliness in complex terrain areas with sparse meteorological stations, thereby significantly improving the accuracy and timeliness of early warnings for localized sudden agricultural meteorological disasters such as frost and hot dry winds.
[0046] 2. The generative adversarial network model of this invention introduces a terrain physical constraint loss function and a grid uncertainty estimation field to ensure that the final generated meteorological background field is not only rich in spatial details, but also strictly follows basic physical laws such as the vertical temperature lapse rate. At the same time, it can self-assess the uncertainty of each grid point, overcoming the shortcomings of traditional interpolation methods that are prone to physical distortion and difficult to assess errors.
[0047] 3. This invention constructs a spatial covariance function that integrates geographic distance and topographic distance in the Bayesian hierarchical model, and constructs a prior covariance matrix using the grid uncertainty estimation field output by the generative adversarial network. This enables the Bayesian hierarchical model to more realistically characterize the correlation structure of meteorological elements under complex terrain, thereby achieving more accurate and reasonable multi-source data fusion.
[0048] 4. The observation model layer of this invention constructs a block diagonal structure observation error covariance matrix for multi-source observation data such as fixed meteorological stations and agricultural IoT devices, realizing adaptive weighted fusion of observation data with different precision. It not only makes full use of the spatial coverage advantage of high-density IoT data, but also effectively suppresses its noise influence, thereby greatly improving the efficiency of observation data utilization while ensuring the stability and reliability of the fusion results.
[0049] 5. This invention transforms Bayesian posterior inference into solving a symmetric positive definite linear system and employs efficient iterative algorithms such as the conjugate gradient method to solve it. This avoids the direct inversion of ultra-large-scale dense matrices in traditional methods. While ensuring theoretical optimality, it significantly reduces computational complexity and memory consumption, enabling the high-precision method to be efficiently applied to large-scale, high-resolution real-world business scenarios and demonstrating good engineering feasibility. Attached Figure Description
[0050] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0051] Figure 1 This is a flowchart of the agricultural meteorological early warning method based on regional microclimate data interpolation and correction according to the present invention. Detailed Implementation
[0052] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. This will allow for a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects, and to facilitate its implementation.
[0053] Those skilled in the art will understand that all or part of the steps in the methods of the following embodiments can be implemented by a program instructing related hardware. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0054] To address the problem of delayed agricultural early warning caused by the inability of existing technologies to provide real-time prediction of microclimate data in complex terrain areas, this invention provides an agricultural meteorological early warning method based on regional microclimate data interpolation and correction. By combining generative adversarial networks and Bayesian hierarchical models, a technical solution is constructed that can generate a high-precision and physically reliable meteorological background field and dynamically fuse real-time observation data to achieve regional microclimate data interpolation and correction, thereby realizing agricultural early warning. Figure 1 As shown, the method specifically includes the following steps:
[0055] S1. First, a specific agricultural area in Xinjiang can be selected as the target region. Historical meteorological observation data (hourly or daily) from all available meteorological stations (including national reference stations, basic stations, and regional automatic stations) within the target region can be collected for the same period in history (e.g., the past 10 years). Since temperature significantly affects crop growth, the meteorological elements in the historical meteorological observation data should at least include temperature. In addition, topography is a key static factor affecting the formation of microclimates such as valley inversion and aspect temperature difference, and is the basis for generating topographic features. Digital Elevation Model (DEM) data for the target region should also be obtained. After that, strict quality control of the historical meteorological observation data is generally required, such as removing outliers and filling in short-term missing data. The data should then be spatially interpolated to a coarser resolution regular grid, such as a 5 km × 5 km grid, to construct a training dataset.
[0056] S2. Next, in order to generate a real meteorological field that matches and conforms to historical distribution patterns under given input data, a generative adversarial network (GAN) model that integrates terrain physical constraints is constructed and trained using a training dataset. The digital elevation model data of the target area and meteorological observation data from sparse stations are input into the trained GAN model to generate the background field of meteorological elements in the target area and the grid uncertainty estimation field of its corresponding grid points. Among them, meteorological elements include at least temperature. The structure of the generative adversarial network model (GAN) is described in detail below. It consists of a generator G that takes a random noise vector z and deterministic conditional information as input, and a discriminator D. The generator G employs a U-Net network with skip connections. The encoder of the U-Net network includes a first feature extraction branch and a second feature extraction branch in parallel. Each feature extraction branch of the U-Net encoder can contain four downsampling stages. Each stage consists of two convolutional layers (with parameters of 3×3 kernel size, stride 1, padding 1) and a max pooling layer (with parameters of 2×2 pooling kernel, stride 2). The initial number of channels can be set to 64. The number of channels doubles after each downsampling stage. The decoder is symmetrical to this and uses transposed convolution for upsampling.
[0057] Topographic feature maps are derived from the DEM. The data is then input into the first feature extraction branch for feature extraction. Through a series of convolutional and downsampling layers, high-level features of the terrain, such as mountain range orientation and basin outline, are extracted. The terrain feature map needs to include at least three channels: elevation, slope, and aspect. Since convolutional neural networks such as U-Net are sensitive to the scale and distribution of the input data, the data of the three channels needs to be normalized so that their values are between [0, 1] or [-1, 1], thereby accelerating the convergence of the training generative adversarial network model and improving its stability. The second feature extraction branch is similar to the first feature extraction branch, also extracting high-level features of the coarse weather field through a series of convolutional and downsampling layers. The data is obtained by inverse distance weighting interpolation based on historical meteorological observation data. Given the different data characteristics of topographic feature maps and meteorological observation data, a first feature extraction branch and a second feature extraction branch are set up. This allows the generative adversarial network to learn the patterns of topographic morphology and meteorological distribution separately, and then fuse them at a high-level semantic layer. Compared to simple concatenation, this approach is better able to learn the complex nonlinear relationships between the two, such as the nonlinear relationship of the rate of change of temperature with elevation at different slopes.
[0058] Subsequently, the high-level features extracted by the first and second feature extraction branches are used as deterministic conditional information. The encoder is used to fuse the deterministic conditional information with the random noise vector z to obtain fused features.
[0059] The decoder of the U-Net network is used to upsample the fused features and gradually recover spatial details by skipping low-level detail features in the corresponding layers of the fused encoder. The final output is a meteorological background field with the same spatial resolution as the terrain feature map. .
[0060] The discriminator D adopts a PatchGAN structure with a fully convolutional network. During training, real meteorological field samples and corresponding terrain feature maps are superimposed in the channel dimension to obtain the first sample. The meteorological background field output by the generator is superimposed in the channel dimension with the corresponding terrain feature map to obtain the second sample. The first or second sample is input into the discriminator D to obtain a two-dimensional matrix. The value of each position in the two-dimensional matrix represents the probability that the local receptive field region corresponding to the input image conforms to the distribution law of the real meteorological field. The reason for using the PatchGAN structure instead of the traditional discriminator is that the PatchGAN structure can force the generator to pay attention to the authenticity of local regions, ensuring that the generated meteorological field is physically consistent with the terrain conditions in each small region (such as a hillside and a valley), avoiding the problem of local distortion due to only satisfying global statistical features.
[0061] During the model training phase, the Generative Adversarial Network (GAN) model is adversarially trained using the training dataset constructed in step S1. The ultimate goal of the generator G is to generate a background field of meteorological elements that is as realistic as possible. The discriminator D aims to accurately distinguish between real samples and samples generated by the generator G. Through this game-like training, the generator G eventually learns to distinguish between real samples and samples generated by the generator G on any given terrain feature map. This generates a more realistic and reasonable background field of meteorological elements. .
[0062] During the model training phase, the random noise vector z is generated from a pre-defined prior distribution. The random noise vector z is obtained by sampling and is used to introduce diversity. In the model application stage, in order to generate the background field of meteorological elements, the random noise vector z is a preset fixed value, such as the zero vector, so as to produce deterministic output.
[0063] Furthermore, in order to utilize the trained GAN to generate a grid uncertainty estimation field for uncertainty quantification, a more comprehensive spatial uncertainty assessment is obtained by systematically fusing the generator's internal randomness and the discriminator's confidence in the results. The specific steps are as follows:
[0064] After the generative adversarial network model is trained, the parameters of the generator G and the discriminator D are fixed. To obtain uncertainty, the generator G is temporarily de-fixed for random noise vectors during the application phase. Based on the same set of deterministic condition information, random noise vectors z with different values are injected into the generator G, and each random noise vector z is independently propagated forward to obtain several generated meteorological element background fields. Each generated meteorological element background field is overlaid with the terrain feature map and input into the discriminator D to obtain the corresponding two-dimensional matrix, which is then marked as a discriminant confidence map.
[0065] Calculate the sample variance of the meteorological element values at each spatial grid point for each generated meteorological element background field to obtain the generated variance field. The formula for calculating the sample variance at any spatial grid point in the generated variance field can be expressed as: In the above formula, Indicates the generated variance field At spatial grid points The sample variance on This indicates the number of background fields generated for meteorological elements. This represents the arithmetic mean of the background fields of all generated meteorological elements. Represents the spatial grid points in the arithmetic mean field Medium space grid The sample variance is the spatial grid of all generated meteorological elements in the background field. The arithmetic mean of the meteorological element values at that location. Represents the background field of the nth generated meteorological element. At any spatial lattice point Meteorological element values, used here Instead As the denominator, it is called an unbiased estimate in statistics, which can more accurately estimate using a finite sample. This is used to estimate the overall variance of all possible outputs of the generator, avoiding a systematic underestimation of uncertainty.
[0066] Next, the arithmetic mean of each discrimination confidence map is calculated to obtain the average discrimination confidence field. The formula for calculating the value of the average discrimination confidence field at any spatial grid point can be expressed as: In the above formula, Represents the average discrimination confidence field At any spatial lattice point The parameter value at a given location represents the probability that the discriminator considers that local region to resemble real data. This represents the nth discriminant confidence graph. At any spatial lattice point The parameter value at that location.
[0067] The final grid uncertainty estimation field is obtained by fusing the generator variance field and the average discrimination confidence field, and its calculation formula can be expressed as: In the above formula, Represents the grid-point uncertainty estimation field. For the preset positive constants, where For each element with a value of 1 and the average discrimination confidence field Matrices of the same dimension Used to measure the output fluctuation of a generator due to input noise, i.e., cognitive uncertainty. This is used to measure the degree to which the generated results deviate from the true data distribution, i.e., distributional uncertainty. Multiplying the two means that in regions where the generated results are inherently unstable (i.e., large variance) and are generally considered by the discriminator to be unlike the true value (i.e., low confidence), the combined uncertainty value is assigned the highest, which is the grid point uncertainty estimation field at this time. The corresponding region's value (i.e., the overall uncertainty value) is assigned the highest value. Additionally, this grid-point uncertainty estimation field... The deterministic conditional information mentioned above is used as input to generate the meteorological element background field. When this information is used as input, its random noise vector z has a preset fixed value, thus producing a deterministic output, which is the deterministic meteorological element background field. This meteorological element background field can be denoted as... Thus, by inputting a set of deterministic conditional information about the target region into the generative adversarial network model, the background field of meteorological elements in the target region can be obtained. and its corresponding grid uncertainty estimation field .
[0068] Furthermore, considering that generative adversarial network (GAN) models struggle to accurately capture the microclimate effects caused by different land cover types such as oases, deserts, and snow and ice, such as cold islands in oases and hot and dry deserts, based solely on topographic and sparse meteorological data, this embodiment further enhances the generator G of the GAN model to improve the realism of the meteorological background field generated by the GAN model. A third feature extraction branch, parallel to the first and second feature extraction branches, is added to the encoder of the U-Net network that serves as the generator G. Satellite remote sensing inversion data spatiotemporally aligned with the topographic feature map is input into the third feature extraction branch. High-level features of the satellite remote sensing inversion data can also be extracted through a series of convolutional and downsampling layers, and the extracted results are also marked as deterministic conditional information. The encoder then fuses a set of deterministic conditional information with a random noise vector z to obtain fused features.
[0069] Since surface temperature directly reflects the energy balance of the Earth's surface and is a key factor influencing near-surface air temperature, while the normalized difference in vegetation index (NDVI) is closely related to vegetation transpiration and soil moisture, indirectly indicating local air humidity and temperature regulation capacity, satellite remote sensing inversion data must include at least surface temperature and NDVI data. Furthermore, satellite data requires preprocessing before use, including cloud detection, missing value imputation (e.g., using spatiotemporal interpolation), and normalization, to ensure data quality and match the input scale of the generative adversarial network (GAN) model. Satellite remote sensing provides continuous spatial coverage of the underlying surface state information; inputting this information into the GAN model allows the generator to better learn the complex mapping relationship between surface properties and near-surface meteorological conditions. For example, the GAN model can learn that on the same slope, vegetated areas have lower temperatures and higher humidity than bare soil areas. Through high-level features extracted from a total of three branches, the generator G can generate a more realistic meteorological background field.
[0070] In the process of fusing deterministic conditional information with random noise vector z, information from different data sources is involved. To enable the model to automatically learn the importance weights of different data sources and different feature channels, and to achieve dynamic, context-sensitive feature selection rather than a simple weighted average, the following fusion steps were further designed:
[0071] First, at a certain deep layer of the encoder, several deterministic conditional information are concatenated along the channel dimension to obtain preliminary fused features. Then, these preliminary fused features are globally averaged along the spatial dimensions (width and height) to obtain a channel description vector A. This vector aggregates the global information of each feature channel. Next, a multi-layer fully connected network with a bottleneck structure learns the non-linear relationships between channels to obtain the attention weight vector w. Taking a two-layer fully connected network as an example, its expression can be: In the above formula, and These are the learnable weight matrices corresponding to the second layer and the first layer of the fully connected network, respectively. It is the ReLU activation function. Using the Sigmoid activation function, this structure first compresses the number of channels to reduce computation and aggregate information, then restores the number of channels and outputs the weight of each channel.
[0072] Finally, the attention weight vector w is multiplied channel by channel with the initial fused features to obtain the recalibrated final fused features, which can be expressed as: In the above formula, This indicates the final fusion characteristics. This indicates preliminary fusion characteristics, that is, several first-order fusion features. The result of concatenating the deterministic conditional information output by each convolutional layer along the channel dimension.
[0073] This fusion process allows the network to adaptively emphasize information-rich feature channels and suppress channels with little or no information. For example, in mountainous areas, the network may give higher weights to channels related to slope and elevation, while in flat desert areas, it may give higher weights to channels related to surface temperature.
[0074] To train a meteorological background field that generates realistic details and conforms to physical laws, this embodiment also designs a total loss function consisting of three weighted components. Specifically, the total loss function of the generative adversarial network model is a weighted sum of the adversarial loss, reconstruction loss, and physical constraint loss. The details of each loss are as follows:
[0075] Combat losses The least-squares loss drives the generator to produce indistinguishable outputs to deceive the discriminator; its expression can be given as: In the above formula, E represents the mathematical expectation operator, indicating that the expression within the square brackets is averaged over all samples, and x is the value derived from the true data distribution. The real meteorological field samples obtained from the sampling are from the training dataset. This refers to the probability distribution that a real weather field sample follows. Let z be the discriminator function, representing the scalar obtained by global average pooling of the output two-dimensional matrix after inputting samples and given deterministic conditional information C. z represents the value derived from the prior distribution. The random noise vector obtained by sampling in the middle, Let z represent the prior distribution of the random noise z, which is usually defined as the standard normal distribution. Let be the generator function, representing the meteorological background field obtained after processing a random noise vector z and deterministic conditional information C as input. .
[0076] Reconstruction loss Background field of meteorological elements used to characterize the generator output The mean absolute error between the data from known meteorological observation points and the actual observed values is used to constrain the accuracy of the generated results at local points. This loss is a strong constraint, ensuring that the generator's output at locations with observed data must be as close as possible to the true value, guaranteeing the local fidelity of the generated results. This is crucial for injecting station data information into the model, and its calculation formula can be expressed as follows: In the above formula, Represents the background field of meteorological elements The total number of known meteorological observation points in China. and These represent the background fields of meteorological elements. The data and actual observed values at the known observation point s in the meteorological observation data;
[0077] Physical constraint loss This method uses the vertical temperature lapse rate as a soft constraint to limit temperature variation. It constrains the relationship between temperature and geographical location; other constraints can be further set as needed, which will not be listed here. (Physical constraint loss) The expression can be represented as: In the above formula, This represents the total number of grid points in the target area. This represents the background field of meteorological elements at grid point i. The local temperature lapse rate relative to elevation h is typically calculated in practice by performing linear regression on the meteorological and elevation values of the grid point and its surrounding neighboring grid points (e.g., if a 3x3 or 5x5 window is established with the grid point as the center, then other grid points within that window are considered its neighboring grid points). This slope is then obtained, and it represents the local temperature lapse rate. Represents the background field of meteorological elements Temperature data from meteorological element values at grid point i. This represents the elevation value at grid point i. The loss is a pre-defined theoretical or statistical vertical temperature lapse rate that aligns with the climate characteristics of the target region; for example, it might be -0.65℃ / 100m for arid regions like Xinjiang. This loss does not rely on any additional observational data. Instead, it directly embeds the scientific knowledge that temperature decreases with altitude as a soft constraint into the model optimization process. By penalizing parts of the generated results that violate this fundamental physical law, it guides the generator to perform physically reasonable interpolation and extrapolation in areas without observations, greatly improving the scientific credibility of the generated results and avoiding the physically absurd outputs that might arise from a purely data-driven model. Ultimately, the training objective of the generator G is to minimize the total loss.
[0078] The generative adversarial network model can be trained using the Adam optimizer, with an initial learning rate of 0.0002, a batch size of 4, and a training run of 200 epochs.
[0079] Meteorological background field generated in step S2 and its corresponding grid uncertainty estimation field It serves as the input for subsequently constructing the Bayesian hierarchical dynamic correction model, representing the background field of meteorological elements. It provides high-resolution spatial prior estimates, while grid-point uncertainty estimation fields This quantifies the reliability of prior estimates at different locations. The next step will be to construct a Bayesian hierarchical dynamic correction model, which uses the meteorological background field as a basis. And grid point uncertainty estimation field As prior knowledge, and through the process model layer, the spatial correlation structure of meteorological elements is described. Finally, by fusing real-time observation data, a dynamically updated and more accurate meteorological element analysis field is output.
[0080] S3. Construct a Bayesian hierarchical dynamic correction model comprising an observation model layer, a process model layer, and a prior model layer. The input to the observation model layer is real-time meteorological observation data of the target area. The process model layer is used to characterize the spatial correlation structure of meteorological elements. The prior model layer is constructed from the background field of meteorological elements and their corresponding grid uncertainty estimation field. The core of the Bayesian hierarchical model is to estimate the unknown true value field X of meteorological elements. The process model layer correlates the information of the prior model layer and the observation model layer, and uses Bayes' theorem to calculate the most likely state (posterior distribution) of the true value field X of meteorological elements after considering all information. The process model layer is embedded in the prior and defines the spatial structure of the true value field X of meteorological elements. In this embodiment, the process model layer is used to construct the covariance matrix of the layer through the spatial covariance function to define the spatial correlation structure of meteorological elements. The spatial covariance function is constructed to monotonically decrease as the geographical distance and topographic distance between any two spatial locations in the target area increase. The topographic distance is the elevation difference between two spatial locations, and its expression can be expressed as: In the above formula, Represents the spatial covariance function. and These represent the locations within the target area. and Geographical distance and topographical distance between them and These represent the locations provided by the digital elevation model. and The elevation value at a given location and the geographical distance can be obtained by calculating the Euclidean distance in a plane, or by directly calculating the shortest arc length on a sphere based on the latitude and longitude of the two locations using the Haversine formula, etc. The process variance parameter describes the overall spatial variability of meteorological elements. and These are the range parameters controlling the influence of geographical distance and terrain distance on the decay rate, and the covariance matrix of the process model layer. The value of the element in the i-th row and j-th column is This function, by introducing terrain distance, clearly quantifies the decisive attenuation effect of elevation differences on the correlation of meteorological elements. For example, the temperature correlation between two points that are very close horizontally but have a large elevation difference will be calculated as very low by this function, while the correlation between two points that are slightly far horizontally but have similar elevations may be higher. This makes the model's characterization of spatial processes more consistent with the physical understanding of mountain meteorology, laying a correct spatial structure foundation for subsequent data fusion.
[0081] In addition, the prior model layer combines the output of step S2 with the structure of the process model layer to form a complete prior probability description of the true value field X of meteorological elements. The specific steps for its construction are as follows:
[0082] The prior model layer defines the prior distribution of the true value field X of meteorological elements as a multivariate Gaussian distribution, which can be expressed as: In the above formula, As the background field of meteorological elements, and serving as the prior mean vector, Let be the prior covariance matrix of the prior model layer. diagonal matrix and the covariance matrix of the process model layer The sum, its expression is: diagonal matrix diagonal elements in The value of the corresponding grid point in the field is estimated by grid uncertainty. And through a preset monotonically increasing function The mapping yields an expression that can be represented as: In the above formula, N is the total number of grid points in the target region, thus representing the generator G's assessment of its own output uncertainty (i.e., the grid uncertainty estimation field). Transforming into prior variance, grid-point uncertainty estimation field In areas with large median values (such as complex terrain areas with no observations), the prior variance is... The larger the value, the lower the reliability of the prior estimate for that point, and the more likely it is to be adjusted based on the observed data in subsequent corrections.
[0083] diagonal matrix It provides the error magnitude of the point itself in a spatially heterogeneous environment, while the covariance matrix of the process model layer... It provides a spatial correlation structure between points. The sum of both. This means that the prior uncertainty of a point comes not only from its own uncertainty (i.e. Furthermore, it is also affected by the uncertainty of other related points through spatial structure (i.e. The influence transmitted from it. At the same time, The large variance in the middle will also be passed through The influence of low-confidence areas spreads outwards, making the statistical scope of the low-confidence areas appear larger and more ambiguous, thus better aligning with the intuitive understanding of the uncertainty in cognition of complex regions.
[0084] Real-time observation data of the observation model layer of the Bayesian hierarchical dynamic correction model With truth field The relationship between them is defined as follows: In the above formula, This represents a vector of real-time meteorological observation data acquired from multiple devices. Represents the true field of meteorological elements. The observation operator matrix represents the matrix used to map the true value field of meteorological elements to the location of observation points. If the j-th observation point is located within the i-th grid point, then the corresponding element in the observation operator matrix... Otherwise, the value of the element is 0. Let be the observation error covariance matrix.
[0085] Real-time meteorological observation data vector It should include at least observational data from fixed meteorological standard stations within the target area and observational data from IoT mobile observation devices deployed in farmland areas.
[0086] The observation error covariance matrix is a block diagonal matrix used to characterize the differences in uncertainty between different types of observation data, and its expression can be given as: In the above formula, and Let S and S represent the observation error covariance submatrices of the observation data from fixed meteorological standard stations and IoT mobile observation devices, respectively. and Both are diagonal matrices, and their diagonal elements... and The settings are made based on the calibration accuracy parameters of the corresponding type of observation equipment or historical observation error statistics, and meet the following requirements. In other words, the observation error variance of fixed meteorological standard stations is smaller than that of low-cost IoT mobile observation devices. The accuracy and reliability of different types of observation data vary greatly. Generally, the data from fixed meteorological standard stations are more reliable and should be given higher weight. IoT data has more noise and should be given lower weight. This avoids low-precision data from polluting high-precision data, makes full use of the spatial coverage advantage of high-density IoT data, and suppresses its noise impact.
[0087] S4. Run the Bayesian hierarchical dynamic correction model. Through Bayesian inference, fuse the data from the observation model layer and the prior model layer under the constraints of the process model layer to calculate the meteorological element analysis field and its posterior uncertainty. The calculation formula can be expressed as: ; ; In the above formula, and Let X and y be the mean vector and covariance matrix of the posterior distribution of the true value field X of the meteorological element, respectively. These mean vector and covariance matrix represent the analytical field and posterior uncertainty of the meteorological element, respectively. It is the identity matrix. Here is the Kalman gain matrix. Represents the background field vector of meteorological elements. This represents a vector of real-time meteorological observation data acquired by the observation model layer. Represents the observation operator matrix, This represents the prior covariance matrix of the prior model layer. This represents the observation error covariance matrix of the observation model layer. In actual calculations, since the Kalman gain matrix is calculated directly... Involves large-scale dense matrices To avoid inverting large-scale dense matrices, an iterative optimization algorithm based on the conjugate gradient method can be used to directly solve for the mean vector of the posterior distribution, i.e., to solve for the following linear system: The coefficient matrix of this system of equations It typically possesses favorable properties (such as symmetric positive definiteness) and can be efficiently solved using iterative algorithms such as the conjugate gradient method. It avoids constructing and storing large dense matrices, thereby ensuring the computational feasibility of the method of this invention in large-scale, high-resolution application scenarios.
[0088] S5. Based on the meteorological element analysis field and combined with the preset disaster judgment thresholds related to the key growth stages of crops, agricultural meteorological early warning information for specific farmland units is generated and output. The disaster judgment thresholds are set based on the research results on the relationship between crop physiological characteristics and meteorological stress, and have strong timeliness and pertinence. For example, a specific low temperature frost threshold is set for the cotton budding and boll-forming stage, and a composite meteorological index threshold of hot and dry wind is set for the wheat grain-filling stage. By comparison, the system automatically identifies which geographical locations and what meteorological conditions may reach the disaster standard within the warning period, thereby determining whether each specific farmland unit needs to issue a meteorological warning.
[0089] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An agricultural meteorological early warning method based on regional microclimate data interpolation and correction, characterized in that, The method specifically comprises the following steps: S1, obtaining historical meteorological observation data and digital elevation model data of a target area to construct a training data set; S2, constructing a generative adversarial network model fusing terrain physical constraints and performing model training through the training data set, inputting the digital elevation model data of the target area and the meteorological observation data of sparse sites into the trained generative adversarial network model to generate a meteorological element background field of the target area and a corresponding grid point uncertainty estimation field thereof; wherein the meteorological element at least includes air temperature; S3, constructing a Bayesian hierarchical dynamic correction model comprising an observation model layer, a process model layer and a prior model layer, the input of the observation model layer being real-time meteorological observation data of the target area, the process model layer being used to represent the correlation structure of the meteorological element in space, and the prior model layer being constructed from the meteorological element background field and the corresponding grid point uncertainty estimation field thereof; S4, running the Bayesian hierarchical dynamic correction model, fusing the data of the observation model layer and the prior model layer under the constraint of the process model layer through Bayesian inference, and calculating to obtain a meteorological element analysis field and a posterior uncertainty thereof; S5, based on the meteorological element analysis field, combining a preset disaster judgment threshold related to a critical growth period of crops, generating and outputting agricultural meteorological early warning information facing specific farmland units.
2. The agrometeorological warning method according to claim 1, characterized in that, The generative adversarial network model comprises a generator G taking a random noise vector z and deterministic conditional information as input, and a discriminator D; The generator G adopts a U-Net network with skip connection, and the encoder of the U-Net network comprises a first feature extraction branch and a second feature extraction branch in parallel; The first feature extraction branch is configured to downsample and extract a terrain feature map of high-level features, the terrain feature map derived based on digital elevation model data, and at least including normalized data of three channels of elevation, slope, and slope direction; The second feature extraction branch is configured to down-sample and extract high-level features of a coarse weather field, and the coarse weather field is obtained based on the historical weather observation data after inverse distance weighted interpolation. is obtained based on the historical weather observation data after inverse distance weighted interpolation. The high-level features extracted by the first feature extraction branch and the second feature extraction branch are taken as the deterministic conditional information; The encoder is used to fuse the deterministic conditional information with the random noise vector z to obtain fused features; The decoder of the U-Net network is used for up-sampling the fused features, fusing low-level detailed features in the encoder through a skip connection, and outputting a meteorological element background field consistent with the spatial resolution of the terrain feature map ; The discriminator D adopts a PatchGAN structure, in training, a real meteorological field sample is superimposed with a corresponding terrain feature map in the channel dimension to obtain a first sample, a meteorological element background field output by the generator is superimposed with a corresponding terrain feature map in the channel dimension to obtain a second sample, the first sample or the second sample is input into the discriminator D to obtain a two-dimensional matrix, and the value of each position in the two-dimensional matrix represents the probability that the local receptive field area corresponding to the input image conforms to the real meteorological field distribution rule; In the model training stage, the random noise vector z is obtained from a preset prior distribution In the model application stage, for generating the meteorological element background field, the random noise vector z is a preset fixed value.
3. The agrometeorological warning method according to claim 2, characterized in that, The specific steps of generating the grid point uncertainty estimation field are as follows: After the generative adversarial network model is trained, the parameters of the generator G and the discriminator D are fixed, and the generator G is temporarily released from the fixation of the random noise vector in the application stage; Based on the same set of deterministic conditional information, different random noise vectors z with different values are injected into the generator G, and independent forward propagation is performed through different random noise vectors z respectively to obtain several generated meteorological element background fields; Each generated meteorological element background field is superimposed with a terrain feature map in the channel, and is input into the discriminator D to obtain a corresponding two-dimensional matrix and is marked as a discrimination confidence atlas; calculating a sample variance of the values of the meteorological element at each spatial grid point of the respective generated meteorological element background field to obtain a generated variance field ; The arithmetic mean of each discrimination confidence atlas is calculated to obtain an average discrimination confidence field; The variance field and the average discriminant confidence field are fused to obtain a grid point uncertainty estimation field.
4. The agrometeorological warning method according to claim 2, characterized in that, The encoder of the U-Net network further comprises a third feature extraction branch in parallel, which is used for downsampling and extracting high-level features of the preprocessed satellite remote sensing inversion data which are spatio-temporally aligned with the terrain feature map, and marking the satellite remote sensing inversion data as deterministic condition information, wherein the satellite remote sensing inversion data at least include land surface temperature and normalized vegetation index data.
5. The agrometeorological warning method according to claim 2, characterized in that, The specific steps of obtaining the fused features are as follows: The deterministic condition information is spliced in the channel dimension to obtain preliminary fused features; The preliminary fused features are globally averaged pooled along the spatial dimension to obtain a channel description vector A; A nonlinear relationship between channels is learned through a plurality of fully connected networks with a bottleneck structure to obtain an attention weight vector w; The attention weight vector w is multiplied with the preliminary fused features channel by channel to obtain final fused features after recalibration.
6. The agrometeorological warning method according to claim 2, characterized in that, The total loss function of the generative adversarial network model is a weighted sum of an adversarial loss, a reconstruction loss and a physical constraint loss; the adversarial loss is a least square loss, and the reconstruction loss The meteorological element background field used for characterizing the generator output The average absolute error between the data on the observation point where the meteorological observation data is known and the actual observation value. the physical constraint loss The vertical temperature decrement rate is used as a soft constraint to limit the variation of the temperature.
7. The agrometeorological alert method according to claim 1, characterized in that, In step S3, the process model layer is used to construct a covariance matrix of the layer by a spatial covariance function, so as to define the correlation structure of the meteorological elements in space, wherein the spatial covariance function is constructed to monotonically decay with the increase of the geographical distance and the terrain distance between any two spatial positions in the target region, and the terrain distance is the elevation difference between the two spatial positions.
8. The agrometeorological alert method according to claim 1, characterized in that, In step S3, the specific steps for constructing the prior model layer by the meteorological element background field and the corresponding grid point uncertainty estimation field are as follows: The prior model layer defines the prior distribution of the meteorological element true value field X as a multivariate Gaussian distribution; The prior covariance matrix of the prior model layer is the sum of a diagonal matrix and the covariance matrix of the process model layer, wherein the diagonal elements of the diagonal matrix are obtained from the corresponding grid points in the grid point uncertainty estimation field and are mapped by a preset monotonic increasing function.
9. The agrometeorological alert method according to claim 1, characterized in that, In step S3, the observation model layer of the Bayesian hierarchical dynamic correction model is defined as: ; in the above formula, denotes a real-time meteorological observation data vector acquired from a plurality of devices, denotes a meteorological element true value field, denotes an observation operator matrix for mapping the meteorological element true value field to observation point positions, is an observation error covariance matrix; the real-time weather observation data vector at least contains observation data from fixed weather standard stations within the target area and observation data from Internet of Things mobile observation devices deployed in the farmland area; The observation error covariance matrix is a block diagonal matrix used to represent the uncertainty difference of different types of observation data, and its expression is as follows: ; in the above formula, and respectively represent the observation error covariance sub-matrix of the observation data of the fixed meteorological standard station and the Internet of Things mobile observation equipment, and are diagonal matrices, and the diagonal elements of the two are and respectively set according to the calibration accuracy parameters or historical observation error statistical information of the corresponding type of observation equipment, and satisfy , that is, the observation error variance of the fixed meteorological standard station is smaller than the observation error variance of the Internet of Things mobile observation equipment.
10. The agrometeorological alert method according to claim 1, characterized in that, In step S4, the specific steps of Bayesian inference are as follows: the prior model layer and the observation model layer are fused to obtain the meteorological element analysis field and its posterior uncertainty, and the calculation formula is as follows: ; ; ; in the above formula, and are the mean vector and the covariance matrix of the posterior distribution of the true field X of the meteorological element, that is, the analyzed field and the posterior uncertainty of the meteorological element, respectively, is a unit matrix, is a Kalman gain matrix, represents a background field vector of the meteorological element, represents a real-time meteorological observation data vector obtained by the observation model layer, represents an observation operator matrix, represents a prior covariance matrix of the prior model layer, represents an observation error covariance matrix of the observation model layer.
Citation Information
Patent Citations
Galloping refined correction forecasting method and system
CN110908014A
Extreme weather event and ecological risk prediction method using generative adversarial network
CN120144970A
Weather forecast learning system based on artificial intelligence algorithm
CN120178381A
Marine low-altitude atmospheric waveguide forecasting method based on artificial intelligence set error correction
CN120257841A
Marine environment forecasting method based on combination of machine learning and numerical forecasting
CN120524339A
