A temperature spatio-temporal prediction method based on a multi-scale large-core spatio-temporal prediction neural network

By constructing a multi-scale large-kernel spatiotemporal prediction neural network, using ERA5-Land data and the encoder-spatiotemporal translator-decoder architecture, the accuracy problem of large-scale and local terrain influences in temperature prediction was solved, and more accurate temperature prediction was achieved.

CN119129795BActive Publication Date: 2025-10-14HARBIN ENG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411020312.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2024-06-26
Filing Date
2024-07-29
Publication Date
2025-10-14
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

Existing temperature prediction methods have difficulty in accurately capturing the patterns of temperature changes when dealing with the influence of large-scale plain land and small and medium-scale local terrain, resulting in large prediction errors.

Method used

A temperature spatiotemporal prediction method based on a multi-scale large-kernel spatiotemporal prediction neural network is adopted. The encoder-spatiotemporal translator-decoder architecture is constructed using ERA5-Land data. The spatial and temporal feature changes of temperature are captured through multi-scale spatiotemporal attention units, and multi-scale spatiotemporal feature transformations are learned.

Benefits of technology

It improves the accuracy and stability of temperature forecasts, can better capture the patterns of temperature changes, and reduce forecast errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119129795B_ABST
    Figure CN119129795B_ABST
Patent Text Reader

Abstract

The application discloses a temperature spatiotemporal prediction method based on a multi-scale large kernel spatiotemporal prediction neural network, and belongs to the technical field of atmospheric science. The method adopts a multi-scale large kernel spatiotemporal prediction neural network to construct a temperature spatiotemporal prediction model. The model is of an encoder-spatiotemporal translator-decoder architecture. A core module MSSTA of the spatiotemporal translator is decomposed into a multi-scale space attention MSST and a time evolution attention TEA. The MSST decomposes a large kernel convolution from a multi-scale perspective, and captures spatial feature information of different scales. The TEA focuses on the global smooth evolution and local abrupt evolution of the multi-scale space features over time. Then, the ERA5-Land temperature data of a target region are used to train the model, and the trained model is used for temperature spatiotemporal prediction of the target region. The method considers the characteristics that the temperature changes are different at different scales, learns multi-scale spatiotemporal feature transformation, and can obtain more accurate temperature spatiotemporal prediction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of atmospheric science technology, and in particular relates to a method for spatiotemporal temperature prediction based on a multi-scale large-kernel spatiotemporal prediction neural network. Background Art

[0002] Accurate temperature forecasts are crucial in modern society, helping people avoid the effects of extreme weather conditions. Temperature forecasts enable people to better adapt to changing weather patterns, mitigate risks, and improve efficiency and productivity across various sectors. Temperature forecasts play a vital role in agriculture, energy management, ecological environment, healthcare, and scientific research, profoundly impacting societal development and sustainability.

[0003] The current mainstream weather forecasting method is based on traditional numerical weather prediction (NWP). This method uses mathematical equations to describe atmospheric motion and physical processes, solving them through numerical simulation. However, traditional NWP methods require high computational resources and rely heavily on parameterized numerical models. These models are subject to uncertainty due to the influence of initial conditions and parameter selection, which can easily lead to increased errors.

[0004] With the rapid development of data-driven deep learning methods in recent years, deep learning-based weather forecasting methods are considered a powerful complement to traditional methods. Deep learning-based spatiotemporal series prediction models have been applied to the spatiotemporal prediction of temperature. These models can capture the spatiotemporal correlations and nonlinear characteristics of temperature data. By learning from historical meteorological data, they can discover hidden patterns and regularities in the climate system and predict future temperature trends. However, deep learning-based spatiotemporal series prediction research faces more complex challenges in the spatiotemporal prediction of temperature. This is because temperature is influenced by topography, resulting in large-scale plain temperature patterns and small- to medium-scale localized temperature patterns, influenced by terrain such as valleys and lakes. Generally, large-scale plain temperatures are relatively uniform, while valleys, canyons, and lakes produce localized climatic effects. Learning the temperature patterns that reflect these localized climatic effects, as well as the overall temperature variations over large areas of land, will help improve the accuracy of temperature forecasts and is therefore a research goal. Summary of the Invention

[0005] To achieve the above objectives, the present invention discloses a method for spatiotemporal temperature prediction based on a multi-scale large-kernel spatiotemporal prediction neural network. This algorithm is constructed based on a deep learning method using the ERA5-Land reanalysis temperature data. Taking into account the differences in temperature changes at different scales, multi-scale spatiotemporal feature transformations are learned to obtain better temperature prediction results.

[0006] The present invention provides a method for spatiotemporal temperature prediction based on a multi-scale large-kernel spatiotemporal prediction neural network, comprising the following steps:

[0007] Step 1: Collect ERA5-Land temperature data and construct a temperature dataset, including normalizing the collected data, setting the forecast duration, and dividing the datasets into training, validation, and test datasets.

[0008] Step 2: Use a multi-scale large-core spatiotemporal prediction neural network to build a temperature spatiotemporal prediction model; the multi-scale large-core spatiotemporal prediction neural network is an encoder-spatiotemporal translator-decoder architecture, where the encoder consists of N s The spatiotemporal translator consists of N encoding layers, each of which consists of a two-dimensional convolution layer, a group normalization layer, and a SiLU activation function. The encoder captures the spatial features of the single-frame temperature grid data; the spatiotemporal translator consists of N t MSLKA network units; each MSLKA network unit contains an MSSTA unit and a ConvFFN unit. A two-dimensional batch normalization structure is set before the MSSTA unit and the ConvFFN unit. The ConvFFN unit is used to enhance local features. The MSSTA unit contains a two-dimensional convolution layer, a GELU layer, an MSSTA structure and a two-dimensional convolution layer in sequence; the MSSTA structure is decomposed into two parts: multi-scale spatial attention MSST and time evolution attention TEA; the MSST part is decomposed into multi-scale spatial local depth convolution, spatial expansion convolution and channel convolution, and multi-scale spatial attention processing is performed on the data; the TEA part is divided into two parts: gentle time evolution attention GTEA and rapid time evolution attention ATEA. GTEA focuses on learning the evolution law of overall regional features over time, which is achieved through an average pooling layer, a one-dimensional convolution and a Sigmoid activation function; ATEA focuses on learning the evolution law of local regional features over time, which is achieved through a maximum pooling layer, a one-dimensional convolution and a Sigmoid activation function; the decoder consists of N s Each decoding layer consists of a two-dimensional convolution layer, an upsampling layer, a group normalization layer, and a SiLU activation function. The decoder outputs the temperature grid data prediction frame of the future time; N s is a multiple of 2 and greater than 2, N t is an integer greater than 1.

[0009] Step 3: Use the temperature data set constructed in step 1 to train the temperature spatiotemporal prediction model, and use the trained temperature spatiotemporal prediction model to predict the temperature at future moments using the temperature spatiotemporal data of the target area collected in real time.

[0010] In step 3, the temperature spatiotemporal data of the target area collected in real time is first normalized, then input into the trained temperature spatiotemporal prediction model, and the prediction results are denormalized to obtain the final temperature spatiotemporal prediction results of the target area.

[0011] Compared with the prior art, the advantages and positive effects of the present invention are:

[0012] (1) The method of the present invention is based on ERA5-Land historical temperature data. It uses deep learning methods to learn the nonlinear spatiotemporal variation laws of historical temperature characteristics, constructs a model that can effectively learn the historical spatiotemporal variation laws, and realizes the prediction results of future temperature based on historical temperature data.

[0013] (2) The method of the present invention uses a multi-scale large-core spatiotemporal attention neural network to construct a spatiotemporal temperature prediction model, extracts spatial features through a feature encoder, learns the changes between frames through a multi-scale spatiotemporal translator, learns the spatiotemporal evolution law, and completes the spatiotemporal prediction by combining spatial information and temporal evolution law through a feature decoder. Among them, the core of the multi-scale spatiotemporal translator is a multi-scale large-core spatiotemporal attention unit, which divides spatiotemporal attention into attention to local and global features of the spatial dimension and attention to global stability and local prominent evolution of temporal dimension features. The spatiotemporal temperature prediction model of the present invention can better learn the temporal evolution law of spatial features, improve the effect of spatiotemporal temperature prediction, and obtain more accurate spatiotemporal temperature prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 This is a flow chart of the method for spatiotemporal temperature prediction based on a multi-scale large-kernel spatiotemporal prediction neural network of the present invention;

[0015] Figure 2 This is the overall structure diagram of the multi-scale large-kernel spatiotemporal prediction neural network of the present invention;

[0016] Figure 3 This is a structural diagram of the multi-scale spatiotemporal attention unit in the multi-scale large-kernel spatiotemporal prediction neural network of the present invention;

[0017] Figure 4 This is the decomposition diagram of the large kernel convolution of the present invention. DETAILED DESCRIPTION

[0018] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0019] An embodiment of the present invention implements a method for spatiotemporal temperature prediction based on a multi-scale large-kernel spatiotemporal prediction neural network. First, ERA5-Land reanalysis temperature data is collected to construct a dataset. Then, a multi-scale large-kernel spatiotemporal prediction neural network model (MSLKSTNet) is constructed. This model is mainly divided into three modules: a feature encoder, a multi-scale spatiotemporal translator, and a feature decoder. The core module of the multi-scale spatiotemporal translator, Multi-scale spatiotemporal attention (MSSTA), decomposes large-kernel convolution from a multi-scale perspective, capturing spatial feature information at different scales and focusing on the global smooth evolution and local rapid evolution of multi-scale spatial features over time. Based on this model, a spatiotemporal temperature prediction model is trained to complete the spatiotemporal temperature prediction task. By considering the multi-scale characteristics of spatiotemporal temperature features, the present invention constructs a neural network capable of learning multi-scale spatiotemporal temperature changes, thereby obtaining more accurate spatiotemporal temperature prediction results.

[0020] like Figure 1 As shown, the temperature spatiotemporal prediction method based on the multi-scale large-kernel spatiotemporal prediction neural network of an embodiment of the present invention includes the following four steps, which are described in detail below.

[0021] Step 1: The embodiment of the present invention collects ERA5-Land temperature data to construct a temperature dataset.

[0022] Data Collection: The ERA5 ground data set has a spatial resolution of 0.1° × 0.1° and a temporal resolution of 1 hour. The data region is selected from longitude (115.7°–103.0°) east and latitude (36.7°–24.0°) north, generating a 128 × 128 grid of temperature data at each moment. The data spans from 2015 to 2021.

[0023] Data Processing: To speed up model training and improve model accuracy, the data was standardized to conform to a standard normal distribution. Furthermore, this embodiment of the present invention uses the first 12 hours of data as model input and the last 12 hours of data as label data to complete the construction of the overall dataset.

[0024] Dataset division: The overall dataset is divided into two parts. The data from 2015 to 2019 are selected as the training set, the data from 2020 as the validation set, and the data from 2021 as the test dataset for evaluation.

[0025] Step 2: Use the multi-scale large-kernel spatiotemporal prediction neural network to build a temperature spatiotemporal prediction model.

[0026] like Figure 2As shown, the multi-scale large-core spatiotemporal prediction neural network of the present invention follows the architecture of encoder-spatial-temporal translator-decoder. s Each encoding layer consists of a two-dimensional convolution layer Conv2D, a group normalization layer Groupnorm and a SiLU activation function. The decoder also has N s The spatiotemporal translator is located between the encoder and decoder and contains N t MSLKA units. Given a batch of input data of dimension (B, T, C, H, W), B represents the number of batches, T represents the temporal length of the input data, C represents the number of channels, and H and W represent the width and height of the grid data, respectively. Before entering the encoder, the batch and temporal dimensions of the data are integrated, and the input data shape becomes (B*T, C, H, W). The encoder does not focus on the temporal evolution between frames, but focuses on capturing the feature information of a single frame. Before entering the spatiotemporal translator, the encoder extracts spatial features and reshapes the data into data of dimension (B, T*C1, H1, W1). The spatiotemporal translator learns the changes between frames and the spatiotemporal evolution laws. Before entering the decoder, the spatiotemporal translator reshapes the data into (B*T, C1, H1, W1). Like the encoder, the decoder does not focus on temporal changes. From a spatial perspective, the spatiotemporal evolution feature information learned from the spatiotemporal translator is integrated into the future prediction frame. The output data dimension is the same as the input data dimension, reshaped into (B, T, C, H, W). C1, H1 and W1 are the dimensional values ​​output by network transformation.

[0027] For example, in the embodiment of the present invention, the batch size is set to 8 and the number of channels is set to 1. The temperature data at 12 moments is used to predict the temperature data at 12 moments. The input data shape can be expressed as (8, 12, 1, 128, 128), that is, 8*12*1*128*128 data. The encoder extracts spatial features and reshapes the data into (B, T*C1, H1, W1) dimensional data. C1, H1, W1 can be adjusted according to actual usage. s is a multiple of 2 and greater than 2, N t is an integer greater than 1. In the embodiment of the present invention, N is set s is 4, N t is 10.

[0028] The space-time translator contains N tThe model consists of three MSLKA units, each of which contains an MSSTA unit and a ConvFFN unit. A two-dimensional batch normalization (batchnorm2d) structure is placed before each of the MSSTA and ConvFFN units. Batchnorm2d improves the model's generalization capabilities, accelerates model training, and prevents problems such as gradient explosion. ConvFFN is a module used to enhance local features, processing features using 3x3 convolution kernels to extract richer local information. Each MSLKA unit extracts spatiotemporal features from the input data via the MSSTA unit and then combines them with the local features extracted by the ConvFFN unit to obtain the output features. The MSSTA unit sequentially consists of a two-dimensional convolutional layer (Conv2D), a GELU layer, an MSSTA structure, and a two-dimensional convolutional layer (Conv2D). The input data is processed by the MSSTA unit and then added to the input data to obtain the output data of the MSSTA unit.

[0029] like Figure 3 As shown in Figure 2, the proposed method decomposes the MSSTA structure into multi-scale spatial attention and time evolution attention. Multi-scale spatial attention (MSSA) focuses on the changes in feature information from a multi-scale perspective. Figure 4 As shown in , the large kernel convolution is decomposed into three parts, namely multi-scale spatial local convolution (depth convolution), spatial expansion convolution (depth expansion convolution) and channel convolution (1×1 convolution). Figure 4 As shown, the MSSA processing in the MSSTA structure of the embodiment of the present invention is to divide the input data into 4 parts in the channel dimension, perform convolution operations with convolution kernels of 3*3, 5*5, 7*7 and 9*9 respectively, then splice the data after the convolution operation in the channel dimension, and then perform a full-channel convolution kernel of 11*11 and a depth dilation convolution operation with an expansion rate of 2, and then input a 1*1 two-dimensional convolution to perform convolution operation, completing multi-scale spatial attention processing on the input data. Multi-scale spatial local depth convolution is used to focus on multi-scale local context information, spatial depth dilation convolution is used to capture long-range dependencies and focus on global feature information, and point convolution captures the relationship between channel dimensions, realizes information interaction in the channel dimension, and performs multi-scale feature fusion. The MSSA embodiment of the present invention divides the input data into 4 parts in the channel. The input data scale is (B, T*C1, H1, W1), the number of channels L=T*C1, and the scale of each part of the data after division is (B, L / 4, H1, W1).

[0030] At the same time, in the MSSTA structure, the input data is processed with temporal evolution attention (TEA). TEA is used to capture the temporal evolution between frames, and the temporal evolution attention is divided into two parts: gradual temporal evolution attention (GTEA) and abrupt temporal evolution attention (ATEA). Gradual temporal evolution attention focuses on the evolution of overall regional features over time, which helps to learn the temporal evolution of overall features. Abrupt temporal evolution attention focuses on the evolution of local regional features over time, which helps to learn the prominent transformation of local features. Figure 3 As shown in the figure, GTEA is implemented using an average pooling layer (AvgPool), a one-dimensional convolution (Conv1D), and a Sigmoid activation function; while ATEA is implemented using a maximum pooling layer (MaxPool), a one-dimensional convolution (Conv1D), and a Sigmoid activation function. Finally, the input data, the results of MSSA processing, the results of GTEA processing, and the results of ATEA processing are combined to obtain the final MSSTA output.

[0031] The calculation of the MSSTA structure is expressed as follows:

[0032] Assume input data X, first split X evenly into 4 parts along the channel dimension: X1, X2, X3, X4 = Split(X);

[0033] Perform convolution operations on the four divided parts of data to obtain the input data:

[0034] Y1, Y2, Y3, Y4=DWConv1(X1), DWConv2(X2), DWConv3(X3), DWConv4(X4);

[0035] The data Y obtained after MSSA processing MSSA =Conv 1*1 (DW_D_Conv(Cat(Y1, Y2, Y3, Y4)));

[0036] GTEA processes the input data X to obtain the data Y GTEA =Sigmoid(Conv1D(AvgPool(X)));

[0037] ATEA processes input data X to obtain data Y ATEA =Sigmoid(Conv1D(MaxPool(X)));

[0038] The final data Y obtained from the MSSTA structure processing output is as follows:

[0039]

[0040] Among them, the input data data Data Y GTEA 、Y ATEA All belong to Split represents a split operation; DWConv1, DWConv2, DWConv3, and DWConv4 are spatial local convolutions of four scales, which correspond to 3*3, 5*5, 7*7, and 9*9 convolution operations in the embodiment of the present invention; Cat represents a connection operation, DW_D_Conv represents a depth-expanded convolution operation, and Conv 1*1 Represents a 1*1 convolution operation; AvgPool represents average pooling, MaxPool represents maximum pooling; Conv1D represents 1D convolution; Sigmoid is the Sigmoid activation function; represents the Kronecker product, and ⊙ represents the Hadamard product.

[0041] Step 3: Use the temperature dataset from step 1 to train the model.

[0042] Loss function selection during training: The loss function used is the cross entropy loss function J, the formula is as follows:

[0043]

[0044] Among them, n is the total grid data volume of the input training data sequence, p i represents the predicted temperature value at time i, y i is the temperature label value at time i. The loss function is used to evaluate the difference between the model prediction and the true label. Backpropagation updates the gradient and optimizes the model to make the prediction close to the true value.

[0045] In the embodiment of the present invention, each sample is a spatiotemporal sequence of temperature. If the size of the input training sample set is (B, T, C, H, W), then n = B*T*C*H*W; the predicted data p at time i is i and label data y i The data are all of (B, T, C, H, W) scale. The predicted value and label value of each grid at each moment are squared to obtain the data of size (B, T, C, H, W). Then the sum and average of n numbers are obtained to obtain the final result J.

[0046] Training hyperparameters and optimization: During the training process, 16 video sequences are inputted in each batch, and the Adam optimizer is used to adjust the model parameters, with the learning rate set to 0.001, and the CosineLRScheduler strategy is used to dynamically adjust the learning rate. In the test stage, 8 video sequences are inputted in each batch, and the model is stopped after 30 epochs of training to evaluate its performance and generalization ability.

[0047] Step 4: Input the currently collected spatio-temporal data of air temperature into the trained spatio-temporal prediction model of air temperature to predict the temperature of each region at the future time. The embodiment of the present application first normalizes the currently collected spatio-temporal data of air temperature in the target region, such as mean standard deviation standardization of the collected data, and then inputs the trained spatio-temporal prediction model of air temperature to output the air temperature of each grid in the target region at the future time. Similarly, the predicted air temperature is de-standardized to obtain the final spatio-temporal prediction result of air temperature.

[0048] The spatio-temporal prediction model of air temperature constructed by the present application is compared with existing air temperature prediction models to prove the technical effect of the present application. The MAE (Mean Absolute Error), MSE (Mean Square Error) and RMSE (Root Mean Square Error) indicators are selected to evaluate the prediction results, and the smaller the value of the three indicators, the better the prediction effect. At the same time, because the data input into the model is standardized, the three indicators are used to evaluate the prediction results after de-standardization.

[0049] The experimental data selected the air temperature of the target region in East Longitude (115.7°-103.0°) and North Latitude (36.7°-24.0°) in 2021. The existing methods compared with the method of the present application use the following neural networks to construct the spatio-temporal prediction model of air temperature: ConvLSTM network, PredRNNv2 network, Unet network, SmaAt-UNet network, SimVP network, En-Van-De network. The evaluation indicators of the prediction results are shown in Table 1.

[0050] Table 1 Comparison of indicators predicted by the method of the present application and existing methods on the same data set

[0051] Comparison Method MSE MAE RMSE ConvLSTM 1.583 0.892 1.258 PredRNNv2 1.298 0.798 1.139 Unet 1.714 0.926 1.309 SmaAt-UNet 1.452 0.854 1.205 SimVP 1.339 0.821 1.157 Method of the present invention 1.258 0.794 1.121

[0052] As can be seen from Table 1, the spatio-temporal prediction model of air temperature constructed by the present application achieves the smallest value on the three indicators compared to the models constructed by other neural networks, indicating the best prediction effect and more accurate prediction results.

[0053] The existing air temperature spatiotemporal prediction model either lacks the ability to capture large-scale global features or lacks attention to multi-scale local information, and the modeling ability of short-time mutation of local spatial information is also insufficient. Based on these problems, the method of the present application designs an air temperature spatiotemporal sequence prediction model with an encoder-translator-decoder architecture. The core of the translator is a multi-scale spatiotemporal attention unit MSSTA, which divides the spatiotemporal evolution attention into spatial attention and temporal attention. The multi-scale spatial attention focuses on the spatial feature information from the multi-scale perspective, and the temporal evolution attention learns the situation of the spatial feature change with time from the perspectives of smooth time evolution and rapid time evolution. The model starts from the influence of geographical factors on temperature, and through statistical analysis of the spatiotemporal temperature data set, it reveals the multi-scale temperature characteristics formed by the influence of geographical factors on temperature, and can better capture the complex evolution law in the spatiotemporal data, and improve the accuracy and stability of the spatiotemporal sequence prediction.

[0054] In addition to the technical features described in the specification, they are known to those skilled in the art. The present application omits the description of known components and known technologies to avoid redundancy and unnecessary limitation of the present application. The embodiments described in the above embodiments also do not represent all embodiments consistent with the present application. Various modifications or variations made by those skilled in the art on the basis of the technical solutions of the present application without creative labor are still within the protection scope of the present application.

Claims

1. A method for spatiotemporal temperature prediction based on a multi-scale large-kernel spatiotemporal prediction neural network, characterized in that: The steps include: Step 1: Collect ERA5-Land temperature data of the target area and construct a temperature dataset for the target area, including normalizing the collected data, setting the forecast time, and dividing the data into training, validation, and test sets. Step 2: Use a multi-scale large-kernel spatiotemporal prediction neural network to build a temperature spatiotemporal prediction model; The multi-scale large-kernel spatiotemporal prediction neural network is an encoder-spatial-temporal translator-decoder architecture, where: The encoder consists of N s The encoder is composed of encoding layers, each of which consists of a two-dimensional convolution layer, a group normalization layer, and a SiLU activation function. The encoder captures the spatial features of a single frame of temperature grid data; Space-time translator by N t The network consists of two MSLKA units; each MSLKA unit contains an MSSTA unit and a ConvFFN unit. A two-dimensional batch normalization structure is set before the MSSTA unit and the ConvFFN unit. The ConvFFN unit is used to enhance local features. The MSSTA unit contains a two-dimensional convolution layer, a GELU layer, an MSSTA structure and a two-dimensional convolution layer in sequence; the MSSTA structure is decomposed into two parts: multi-scale spatial attention MSST and time evolution attention TEA; the MSST part is decomposed into multi-scale spatial local depth convolution, spatial expansion convolution and channel convolution, and multi-scale spatial attention processing is performed on the data; the TEA part is divided into two parts: gentle time evolution attention GTEA and rapid time evolution attention ATEA. GTEA focuses on learning the evolution law of overall regional features over time, which is achieved through an average pooling layer, a one-dimensional convolution and a Sigmoid activation function; ATEA focuses on learning the evolution law of local regional features over time, which is achieved through a maximum pooling layer, a one-dimensional convolution and a Sigmoid activation function; The decoder consists of N s The decoder is composed of decoding layers, each of which consists of a two-dimensional convolution layer, an upsampling layer, a group normalization layer, and a SiLU activation function. The decoder outputs the temperature grid data prediction frame for the future time; N s is a multiple of 2 and greater than 2, N t is an integer greater than 1; Step 3: Use the temperature data set constructed in step 1 to train the temperature spatiotemporal prediction model, and use the trained temperature spatiotemporal prediction model to predict the temperature at future moments using the temperature spatiotemporal data of the target area collected in real time.

2. The method according to claim 1, characterized in that In the step 2, the dimension of the input data of the temperature spatiotemporal prediction model is assumed to be (B, T, C, H, W), where B represents the number of data batches, T represents the time length of the input data, C represents the number of channels, and H and W represent the width and height of each frame of temperature grid data, respectively; the encoder first converts the input data into data of dimension (B*T, C, H, W), then extracts spatial features, and outputs data of dimension (B, T*C1, H1, W1) to the spatiotemporal translator; the spatiotemporal translator learns the spatiotemporal evolution characteristics of each frame of temperature grid data, and outputs data of dimension (B*T, C1, H1, W1) to the decoder; the decoder outputs a predicted frame of temperature grid data for the future time from a spatial perspective based on the spatiotemporal evolution characteristics learned by the spatiotemporal translator, and outputs a prediction result of dimension (B, T, C, H, W); wherein C1, H1, and W1 are the dimensional values ​​​​of the network transformation output.

3. The method according to claim 1 or 2, characterized in that In step 2, the multi-scale spatial attention part of the MSSTA structure performs the following operations on the input data in sequence: Multi-scale spatial local depth convolution: The input data is divided into four parts in the channel dimension, and convolution operations with kernels of 3*3, 5*5, 7*7 and 9*9 are performed respectively. The convolution results are concatenated in the channel dimension and used as the input for the next step. Spatial dilated convolution: Perform a convolution operation on the input data with a convolution kernel of 11*11 and a dilation rate of 2; Channel convolution: Perform a 1*1 two-dimensional convolution on the output of the spatial dilation convolution.

4. The method according to claim 1 or 2, characterized in that In step 2, the calculation of the MSSTA structure includes: assuming that the input data of the MSSTA structure is X, then: In the MSST part, X is evenly divided into 4 parts X1, X2, X3, and X4 in the channel dimension; then convolution operations of different scales are performed on the 4 divided parts of data to obtain data Y1, Y2, Y3, and Y4; the data after MSSA processing is represented as Y MSSA =Conv 1*1 (DW_D_Conv(Cat(Y1,Y2,Y3,Y4))); where Cat represents the connection operation, Dw_D_Conv represents the spatial expansion convolution operation, and Conv 1*1 Represents a 1*1 convolution operation; The GTEA part processes the input data X to obtain data T GTEA =Sigmoid(Conv1D(AvgPool(X))); ATEA processes input data X to obtain data Y ATEA =Sigmoid(Conv1D(MaxPool(X))); The final MSSTA structure processes the output data Y as follows: Among them, AvgPool represents average pooling, MaxPool represents maximum pooling; Conv1D represents 1D convolution; Sigmoid is the Sigmoid activation function; represents the Kronecker product, and ⊙ represents the Hadamard product.

5. The method according to claim 1 or 2, characterized in that In step 3, the temperature spatiotemporal prediction model uses a cross entropy loss function during training, as follows: Among them, p i is the temperature grid forecast data at time i, y i is the temperature grid label data at time i. When the input data of the temperature spatiotemporal prediction model is (B, T, C, H, W), then n = B*T*C*H*W, p i and y i are all (B, T, C, H, W) data; the above formula means taking the square of the difference between the predicted value and the label value of each grid at each moment to obtain data of (B, T, C, H, W) scale, and then summing and averaging all n numbers to obtain the cross entropy loss value J.

6. The method according to claim 1, characterized in that In step 3, the temperature spatiotemporal data of the target area collected in real time is first normalized, then input into the trained temperature spatiotemporal prediction model, and the prediction results are denormalized to obtain the final temperature spatiotemporal prediction results of the target area.

Citation Information

Patent Citations

  • Offshore wind power prediction method and device based on multi-scale space-time diagram transformation network

    CN117114192A

  • Multivariate space-time prediction method and system for weather forecast

    CN118226551A