A Weather Forecasting Method Based on Time-Varying Graph Neural Networks

CN117891007BActive Publication Date: 2026-09-18ARMY ENG UNIV OF PLA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410082470.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-19
Publication Date
2026-09-18
Estimated Expiration
2044-01-19

AI Technical Summary

Technical Problem

然而,变量的空间特性会随时间而相互依赖,预定义的静态图结构无法捕捉变量随时间变化的空间相关性

Benefits of technology

[0050] This invention integrates multiple weather data from various regions and external knowledge, constructs three adjacency matrices (static, dynamic, and external), and builds a graph convolutional layer, a dilated causal convolutional structure, and a fusion layer to obtain a prediction model that integrates multiple weather data. Through time-varying graph convolutional networks and dilated causal convolutional networks, it effectively captures the spatial features and temporal attributes of weather data over time. Using the trained prediction model that integrates multiple weather data, it processes the weather data of the region to be measured and obtains the weather prediction results for the region, which has the characteristics of high prediction efficiency and high prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117891007B_ABST
    Figure CN117891007B_ABST
Patent Text Reader

Abstract

This invention discloses a weather forecasting method based on a time-varying graph neural network, comprising: acquiring weather data of the area to be measured; processing the weather data of the area to be measured using a trained prediction model that integrates multiple weather data to obtain the weather forecast result of the area to be measured; wherein, the method for determining the trained prediction model that integrates multiple weather data includes: acquiring multiple types of spatiotemporal weather sequence data of multiple regions and preprocessing the data to obtain multiple regional weather datasets; constructing three adjacency matrices: static, dynamic time-varying, and external; building graph convolutional layers, dilated causal convolutional structures, and fusion layers to establish a time-varying graph neural network model; training the time-varying graph neural network model using multiple regional weather datasets and the three adjacency matrices to obtain model parameters, and then determining the prediction model that integrates multiple weather data; the weather forecasting method of this invention has the characteristics of high prediction efficiency and high prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a weather forecasting method based on a time-varying graphical neural network, belonging to the field of artificial intelligence technology. Background Technology

[0002] Weather forecasting plays a crucial role in agriculture, transportation, social and economic decision-making, and disaster prevention. Weather forecasting is a challenging task involving vast amounts of data from diverse regions. Current neural network-based weather forecasting methods often rely on specific weather data from a single region, which has limitations. They fail to utilize the dynamic spatiotemporal correlations between multiple regions and the characteristic correlations between various types of weather data, thus limiting forecasting efficiency and accuracy. Currently, various regression forecasting models (such as the Autoregressive Moving Average (ARIMA) model) and deep learning models (such as convolutional networks and recurrent neural networks) can effectively capture the dynamic spatiotemporal relationships in data and can be used for time series forecasting. However, they are typically only applicable to Euclidean space grid data. In contrast, the spatiotemporal data generated in weather forecasting applications are non-Euclidean space, making traditional models less suitable. Therefore, spatiotemporal series forecasting algorithms for graph data have become a key research focus and challenge.

[0003] While graph neural networks (Graph Neural Networks) possess powerful data understanding and cognitive abilities in handling spatiotemporal weather sequence prediction problems, they also face many challenges. Traditional graphs are constructed based on the inherent connections between nodes and are typically static undirected graphs. However, the spatial properties of variables become interdependent over time, and predefined static graph structures cannot capture the spatial correlations of variables changing over time. In practical applications, the graph topology often changes over time, with the weights of neighboring nodes and edges constantly shifting. Simultaneously, the graph construction process is driven by changing data, which is often oriented, and external knowledge corresponding to the inherent properties of some variables can also constitute a graph containing prior knowledge. Furthermore, in real-world weather prediction scenarios, the state of variables is often influenced by many different features, such as temperature and humidity in weather forecasts, and most of these features interact with each other over time. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a weather forecasting method based on time-varying graph neural networks. This method constructs three adjacency matrices—static, dynamic, and external—and builds a graph convolutional layer, a dilated causal convolutional structure, and a fusion layer to obtain a forecasting model that integrates multiple weather data. The time-varying graph convolutional network and the dilated causal convolutional network effectively capture the spatial characteristics and temporal attributes of weather data over time. Using the trained forecasting model that integrates multiple weather data, the method processes the weather data of the target area to obtain the weather forecast results for that area, exhibiting high forecasting efficiency and high forecasting accuracy.

[0005] To achieve the above objectives, the present invention is implemented using the following technical solution:

[0006] This invention provides a weather forecasting method based on a time-varying graphical neural network, comprising:

[0007] Obtain weather data for the area to be tested;

[0008] Using a trained prediction model that integrates multiple weather data, the weather data of the area to be measured is processed to obtain the weather prediction results for the area to be measured;

[0009] The methods for determining a well-trained prediction model that integrates multiple weather data include:

[0010] Acquire spatiotemporal weather sequence data of various types from multiple regions;

[0011] Preprocessing is performed on various types of spatiotemporal weather sequence data from multiple regions to obtain multiple regional weather datasets;

[0012] Construct static adjacency matrices, dynamic time-varying adjacency matrices, and external adjacency matrices; build graph convolutional layers, dilated causal convolutional structures, and fusion layers to establish a time-varying graph neural network model.

[0013] By training a time-varying graph neural network model using multiple regional weather datasets, static adjacency matrices, dynamic time-varying adjacency matrices, and external adjacency matrices, model parameters are obtained, and a prediction model that integrates multiple weather data is determined.

[0014] Optionally, preprocessing is performed on the various types of spatiotemporal weather series data from the multiple regions, including:

[0015] Clean the various types of spatiotemporal weather sequence data from the multiple regions to obtain a standardized weather dataset;

[0016] The standardized weather dataset is transformed using a sliding time window method to obtain seq2seq data;

[0017] Based on the seq2seq data, weather datasets for multiple regions were obtained.

[0018] Optionally, the method of transforming the standardized weather dataset using a sliding time window to obtain seq2seq data includes:

[0019] Set the size of the sliding time window; the size of the sliding time window is determined by the sum of the length of the input time period and the length of the output prediction period;

[0020] The sliding time window slides forward on a standard weather dataset to obtain seq2seq data.

[0021] Optionally, the method for obtaining weather data for the area to be measured includes:

[0022] Acquire various types of spatiotemporal weather sequence data for the area to be tested;

[0023] Preprocessing is performed on various types of spatiotemporal weather sequence data of the area to be tested to obtain weather data of the area to be tested;

[0024] The preprocessing method described is consistent with the method for preprocessing various types of spatiotemporal weather sequence data from multiple regions.

[0025] Optionally, the construction of graph convolutional layers, dilated causal convolutional structures, and fusion layers to establish a time-varying graph neural network model includes:

[0026] The preprocessed spatiotemporal weather series data of various types in multiple regions are used as input, and the result R1 is obtained by dilated causal convolution.

[0027] Using the result R1 as input, graph convolution is performed on the constructed static adjacency matrix, dynamic time-varying adjacency matrix, and external adjacency matrix respectively to obtain the result R2;

[0028] By using residual connections, the result R2 is added to the result R1 to obtain the output of a spatiotemporal layer;

[0029] Multiple spatiotemporal layers are superimposed, and the last spatiotemporal layer is obtained by skipping connections;

[0030] In the last spatiotemporal layer, the result R3 is obtained through two repeated ReLU activation functions;

[0031] The result R3 is used as input and processed through a convolutional layer to obtain a time-varying graph neural network model.

[0032] Optionally, the method for constructing the static adjacency matrix includes:

[0033] The static adjacency matrix is ​​constructed based on the physical connections between the nodes in the graph. If the nodes are connected, the value of the corresponding static adjacency matrix is ​​1; if the nodes are not connected, the value of the corresponding static adjacency matrix is ​​0.

[0034] Optionally, the method for constructing the dynamic time-varying adjacency matrix includes:

[0035] Based on the attention mechanism between graph node features, the formula for the dynamic time-varying adjacency matrix is ​​as follows:

[0036]

[0037] The softmax process is as follows:

[0038]

[0039] Among them: A t dynamic It is a dynamic time-varying adjacency matrix. The input is a spatiotemporal sequence, where N is the number of nodes, F is the number of features per node, and T is the period length of the time dimension. b∈R N×N W1∈R T×1 W2∈R F×T W3∈R F×1 Let A be a learnable parameter matrix, σ be the activation function, and A be the parameter matrix. t i,j This represents the correlation coefficient between node i and node j over a given time period.

[0040] Optionally, the method for constructing the outer adjacency matrix includes:

[0041] By embedding external knowledge of nodes into learning, the external adjacency matrix is ​​obtained and constructed as follows:

[0042] A extern =softmax(σ((EW1)W2(W3E)) T ))

[0043] Among them: A extern Let E be the outer adjacency matrix, and E∈R N×C×T Let C be the feature matrix formed by the external knowledge of the nodes, and let C be the feature dimension of the external knowledge.

[0044] Optionally, the external knowledge of the node is embedded in the learning process, and Time2Vector is used for time embedding.

[0045] Optionally, the method for training the time-varying graph neural network model, obtaining model parameters, and then determining the prediction model that integrates multiple weather data includes:

[0046] Each sample data from the multiple regional weather datasets, along with the static adjacency matrix, dynamic time-varying adjacency matrix, and external adjacency matrix, is input into the time-varying graph neural network model;

[0047] The output data corresponding to weather datasets from multiple regions are used as the output label data of the model to train the model and obtain model parameters;

[0048] The time-varying graph neural network model was solidified to determine the prediction model that integrates multiple weather data.

[0049] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:

[0050] This invention integrates multiple weather data from various regions and external knowledge, constructs three adjacency matrices (static, dynamic, and external), and builds a graph convolutional layer, a dilated causal convolutional structure, and a fusion layer to obtain a prediction model that integrates multiple weather data. Through time-varying graph convolutional networks and dilated causal convolutional networks, it effectively captures the spatial features and temporal attributes of weather data over time. Using the trained prediction model that integrates multiple weather data, it processes the weather data of the region to be measured and obtains the weather prediction results for the region, which has the characteristics of high prediction efficiency and high prediction accuracy.

[0051] This invention is based on the attention mechanism between different times and different nodes. It generates a dynamic graph of weather spatiotemporal sequence data from a constantly changing adjacency matrix. Combined with a static adjacency matrix constructed through inherent connectivity and an external adjacency matrix constructed from external prior knowledge, it can better learn the spatial correlation between different regions and different types of weather data, thereby improving the accuracy of weather forecasting.

[0052] This invention uses a dilated causal convolutional network with residual connections and skip connections to learn the temporal dependencies of multiple regions. Then, by fusing multiple weather features from multiple regions through convolution, it can improve the ability to capture temporal features and the stability of multi-step prediction.

[0053] This invention employs a sliding time window method to divide weather datasets, thereby improving the prediction stability of various types of spatiotemporal weather sequence data across multiple regions. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:

[0055] Figure 1The flowchart shown is a weather forecasting method based on a time-varying graph neural network in an embodiment of the present invention.

[0056] Figure 2 The flowchart shown is a method for determining a trained prediction model that integrates multiple weather data in an embodiment of the present invention.

[0057] Figure 3 The diagram shown is a schematic representation of the fusion of multiple weather data at a node provided in an embodiment of the present invention. Detailed Implementation

[0058] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0059] The application principle of the present invention will be described in detail below with reference to the accompanying drawings.

[0060] like Figure 1 As shown, this embodiment of the invention provides a weather forecasting method based on a time-varying graphical neural network, comprising the following steps:

[0061] S01: Obtain weather data for the area to be tested;

[0062] S02: Using a trained prediction model that integrates multiple weather data, process the weather data of the area to be tested to obtain the weather prediction results for the area to be tested;

[0063] Among them, the method for determining the trained prediction model that integrates multiple weather data, such as Figure 2 As shown, it includes:

[0064] S21: Acquire spatiotemporal weather sequence data of various types from multiple regions;

[0065] S22: Preprocess the spatiotemporal weather sequence data of various types in the multiple regions to obtain multiple regional weather datasets;

[0066] S23: Construct a static adjacency matrix, a dynamic time-varying adjacency matrix, and an external adjacency matrix; build graph convolutional layers, dilated causal convolutional structures, and fusion layers to establish a time-varying graph neural network model.

[0067] S24: Train the time-varying graph neural network model using multiple regional weather datasets, static adjacency matrices, dynamic time-varying adjacency matrices, and external adjacency matrices to obtain model parameters, and then determine the prediction model that integrates multiple weather data.

[0068] The weather forecasting method based on a time-varying graph neural network in this embodiment of the invention can effectively capture the spatial features and temporal attributes that change over time by fusing multiple weather data into a forecasting model. It has strong data adaptability, high weather forecasting accuracy, and high stability.

[0069] In one specific embodiment of the present invention, the spatiotemporal weather sequence data of multiple regions and multiple types include: weather forecast datasets for two regions, Ningbo and Ningxia. Each region's weather forecast dataset includes geographical data, numerical weather forecast data and observed weather data for that region. The observed weather data includes different types of meteorological data, such as temperature, relative humidity, pressure, wind speed, and wind direction.

[0070] In one specific embodiment of the present invention, preprocessing is performed on spatiotemporal weather sequence data of multiple regions and of various types to obtain multiple regional weather datasets, specifically including:

[0071] S221: Preprocess the weather forecast datasets for Ningbo and Ningxia, including:

[0072] First, the weather forecast datasets for Ningbo and Ningxia were cleaned.

[0073] Based on the characteristics of weather forecast data, outliers in the data are corrected and missing values ​​are filled. Taking the weather forecast dataset of Ningbo as an example, the processed data is sampled every hour and contains 2,726 variables. Each variable is a different sub-region, i.e., a node, with a total of 2,880 time steps.

[0074] Secondly, data transformation is performed, converting the integrated data into L×N×F three-dimensional data, where L is the sequence length, N is the number of nodes, and F is the number of features per node. In this embodiment, the sequence length L is 2880, the number of nodes N is 2726, and the selected number of features F is 10, namely, 2-meter temperature, total precipitation, 2-meter relative humidity, air pressure, 10-meter relative vorticity, 10-meter divergence, 10-meter wind speed, 10-meter wind direction, 100-meter wind speed, and 100-meter wind direction.

[0075] S222: Divide the processed L×N×F three-dimensional data into a seq2seq dataset where both input and output are sequences, including:

[0076] First, set the size of the sliding time window. The sliding time window is determined by the sum of the length of the input time period and the length of the output prediction period. Generally, the length of the input time period and the length of the output prediction period are the same.

[0077] In this embodiment, to verify the stability of the model's predictions under different sliding windows, the sliding window size is set to three values: 12, 24, and 48, corresponding to input and output time period lengths of 6, 12, and 24, respectively. Taking a sliding window size of 24 as an example, the first 12 time steps are used as the input sequence, and the last 12 time steps are used as the output sequence, i.e., the input is [X1, X2, ..., X...]. T ]∈R N ×F×T The corresponding output is Where T and T' are equal.

[0078] Secondly, the sliding time window slides forward on the standard spatiotemporal dataset;

[0079] In this embodiment, the sliding time window slides by one time unit at a time until the remaining length of the data is less than the size of the sliding time window, resulting in two datasets with seq2seq as input and output. The dimensions of both the input and output datasets are Lnew×T×N×F.

[0080] Where: Lnew is the new total sample length after transformation into sequence data, T is the input time period (half the number of sliding windows), N is the number of nodes, and F is the number of features.

[0081] S223: The two datasets obtained from S222, which are seq2seq, are divided into training dataset, validation dataset and test dataset. The training dataset and validation dataset are weather datasets for multiple regions, and the test dataset can be used to test the model.

[0082] Specifically, both the seq2seq input dataset and the seq2seq output dataset are divided into training data sample set, validation data sample set, and test data sample set according to the first dimension Lnew; in this embodiment, the ratio of the training data sample set, validation data sample set, and test data sample set is 7:1:2.

[0083] In one specific embodiment of the present invention, the time-varying graph neural network model includes N blocks, each block is composed of k spatiotemporal layers stacked together, each spatiotemporal layer is connected by skip connections, and finally the desired dimensionality output is obtained through two repeated ReLU activation functions and convolutional layers.

[0084] Methods for obtaining time-varying graphical neural network models include:

[0085] The preprocessed spatiotemporal weather series data of various types in multiple regions are used as input, and the result R1 is obtained by dilated causal convolution.

[0086] Using the result R1 as input, graph convolution is performed on the constructed static adjacency matrix, dynamic time-varying adjacency matrix, and external adjacency matrix respectively to obtain the result R2;

[0087] By using residual connections, the result R2 is added to the result R1 to obtain the output of a spatiotemporal layer;

[0088] Multiple spatiotemporal layers are superimposed, and the last spatiotemporal layer is obtained by skipping connections;

[0089] In the last spatiotemporal layer, the result R3 is obtained through two repeated ReLU activation functions;

[0090] The result R3 is used as input and processed through a convolutional layer to obtain a time-varying graph neural network model.

[0091] Specifically, the jump connection is such that each preceding spatiotemporal output layer serves as the input to the subsequent output layer.

[0092] In one specific embodiment of the present invention, the method for constructing a static adjacency matrix includes:

[0093] A static adjacency matrix A is constructed by comparing the distances between nodes and determining whether the distance between any two nodes is greater than a certain threshold. t static If nodes are physically connected, the value of the corresponding static adjacency matrix is ​​1; if nodes are not physically connected, the value of the corresponding static adjacency matrix is ​​0. Taking weather forecasting as an example, different sub-regions are considered as one node. If sub-region 1 and sub-region 2 are connected, then they are considered physically connected.

[0094] In one specific embodiment of the present invention, the method for constructing a dynamic adjacency matrix includes:

[0095] Based on the attention mechanism between node features, the formula for the dynamic time-varying adjacency matrix is ​​as follows:

[0096]

[0097] The softmax process is as follows:

[0098]

[0099] Among them: A t dynamic It is a dynamic time-varying adjacency matrix. The input is a spatiotemporal sequence, where N is the number of nodes, F is the number of features per node, and T is the period length of the time dimension. b∈R N×N W1∈R T×1 W2∈R F×TW3∈R F×1 Let A be a learnable parameter matrix, σ be the activation function, and A be the parameter matrix. t i,j This represents the correlation coefficient between node i and node j within a time period. After normalization by softmax, the attention weight coefficient of each original data point can be obtained, and the sum of the weight coefficients of a node is guaranteed to be 1.

[0100] This invention improves prediction accuracy by fully utilizing the correlations between different time series. Taking weather forecasting as an example: different sub-regions may be interconnected, leading to mutual influence of weather characteristics among multiple sub-regions. Furthermore, different sub-regions exhibit varying degrees of similarity at different times due to their surrounding environmental characteristics. For instance, unconnected sub-regions that are all located near the sea show greater similarity in the morning and evening, but weaker similarity during midday. Moreover, the similarity between different sub-regions changes over time. This embodiment uses an attention mechanism between different nodes and different types of weather data features to construct a time-varying map to capture the spatiotemporal relationships between changing nodes.

[0101] In one specific embodiment of the present invention, the method for constructing the external adjacency matrix includes:

[0102] The external knowledge of nodes is embedded into learning to obtain the external adjacency matrix; for example, latitude and longitude information, terrain information and other information of different sub-regions are encoded and embedded differently.

[0103] The structure is as follows:

[0104] A extern =softmax(σ((EW1)W2(W3E)) T ))

[0105] Among them: A extern Let E be the outer adjacency matrix, and E∈R N×C×T The feature matrix is ​​composed of the external knowledge of the nodes.

[0106] In this embodiment, Time2Vector is used for time embedding;

[0107] This time representation has been shown to take into account three important features:

[0108] First, it can capture periodic and non-periodic patterns;

[0109] Second, it is not affected by time scale;

[0110] Third, it can be easily combined with other models. The specific formula is as follows:

[0111]

[0112] Where: τ represents the original time series feature. For the activation function, we choose the sin() function, ω i and Here, k is a learnable parameter, and k is the encoding dimension (which can be an integer multiple of the dimension of the original time series features). In this embodiment, the encoding dimension k is chosen to be 24.

[0113] Time2vec primarily uses a sine function to encode the learned wavelength and offset into absolute time. This learned periodicity can improve prediction accuracy. The original time series is time-encoded into E, capturing both periodicity and aperiodicity, and then a node adjacency matrix (external adjacency matrix) based on external features is constructed.

[0114] In one specific embodiment of the present invention, constructing a graph convolutional layer (GCN) includes:

[0115] Based on spatial domain graph convolution (feature extraction is directly based on convolution between nodes and their neighbors), multiple graphs are constructed for convolution operations.

[0116] After convolution of the time-varying graph, the nodes can be represented as follows:

[0117] H (k) =A static H (k-1) W k,1 +A extern H (k-1) W k,2 +A t dynamic H (k-1) W k,3 , k≥1

[0118]

[0119] Where: k is the number of graph convolutional layers, which is set to 2 in this embodiment, H (k-1) H represents the current hidden state of the input layer, as output by the previous layer. (k) H represents the output hidden state of the current layer. (0) =X t X t Let A represent the input sequence within a time window. static Let A represent the static adjacency matrix constructed based on inherent connectivity relationships. t dynamic Let A represent a time-varying dynamic adjacency matrix constructed based on an attention mechanism. extern W represents the adjacency matrix of external feature attributes constructed from external knowledge encoding vectors. k,1 W k,2 Wk,3 Z is a learnable parameter matrix. t This represents the node representation that is ultimately learned.

[0120] In one specific embodiment of this invention, due to the advantages of dilated causal convolution such as parallelism, flexible receptive field, and gradient stability, this embodiment employs extended causal convolution (dilated causal convolution) to extract the temporal features of spatiotemporal sequences. Dilated causal convolution can generate an output sequence with the same length as the input sequence through one-dimensional full convolution; simultaneously, it can ensure that the prediction of the previous time step does not use future information. Dilated causal convolution is proposed to expand the receptive field without increasing computational cost. Dilated causal convolution can be interpreted as keeping the input unchanged and adding some zero weights, i.e., holes, to the convolution kernel. This increases the length of the sequence observed by the network while keeping the computational cost essentially unchanged. After convolution and gate activation units, the final representation of the input sequence within a time window T (the period length of the time dimension) is:

[0121]

[0122] Where: * represents convolution operation, ⊙ represents element-wise multiplication operation, σ(·) represents sigmoid function, k is layer index, f and g represent convolution kernel and gate respectively, W is learnable parameter, and tanh is activation function.

[0123] Where, sequence The dilated convolution operation F at time step s is defined as:

[0124]

[0125] Where: d is the dilation factor, k is the kernel size, and (sd·i) represents the past step size in the direction. Let f = {0, ..., k-1} ∈ R represent the input signal, and let f = {0, ..., k-1} ∈ R be the convolution kernel.

[0126] Therefore, dilation is equivalent to introducing a fixed stride between every two adjacent convolutional kernels.

[0127] Meanwhile, residual connections and skip connections are introduced into the model to maintain network stability, accelerate convergence, and enable the training of more advanced models.

[0128] In one specific embodiment of the present invention, such as Figure 3 The diagram shows a working schematic of multi-weather data feature fusion at a node. The predicted value F1 at time t is not only related to F1 at previous times, but also to other features F2 and F3. Combining multiple different features can improve the prediction accuracy. Multiple related weather features are fused by convolution to obtain a final prediction feature.

[0129] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A weather forecasting method based on a time-varying graphical neural network, characterized in that, include: Obtain weather data for the area to be tested; Using a trained prediction model that integrates multiple weather data, the weather data of the area to be measured is processed to obtain the weather prediction results for the area to be measured; The methods for determining a well-trained prediction model that integrates multiple weather data include: Acquire spatiotemporal weather sequence data of various types from multiple regions; Preprocessing is performed on various types of spatiotemporal weather sequence data from multiple regions to obtain multiple regional weather datasets; Construct static adjacency matrices, dynamic time-varying adjacency matrices, and external adjacency matrices; build graph convolutional layers, dilated causal convolutional structures, and fusion layers to establish a time-varying graph neural network model. By using multiple regional weather datasets, static adjacency matrices, dynamic time-varying adjacency matrices, and external adjacency matrices, a time-varying graph neural network model is trained to obtain model parameters, thereby determining a prediction model that integrates multiple weather data. The aforementioned construction of graph convolutional layers, dilated causal convolutional structures, and fusion layers is used to establish a time-varying graph neural network model, including: The preprocessed spatiotemporal weather series data of various types in multiple regions are used as input, and the result R1 is obtained by dilated causal convolution. Using the result R1 as input, graph convolution is performed on the constructed static adjacency matrix, dynamic time-varying adjacency matrix, and external adjacency matrix respectively to obtain the result R2; By using residual connection, the result R2 is added to the result R1 to obtain the output of a spatiotemporal layer; Multiple spatiotemporal layers are superimposed, and the last spatiotemporal layer is obtained by skipping connections; In the last spatiotemporal layer, the result R3 is obtained through two repeated ReLU activation functions; The result R3 is used as input and processed through a convolutional layer to obtain a time-varying graph neural network model; The method for constructing the static adjacency matrix includes: The static adjacency matrix is ​​constructed based on the physical connections between the nodes in the graph. If the nodes are connected, the value of the corresponding static adjacency matrix is ​​1; if the nodes are not connected, the value of the corresponding static adjacency matrix is ​​0. The method for constructing the dynamic time-varying adjacency matrix includes: Based on the attention mechanism between graph node features, the formula for the dynamic time-varying adjacency matrix is ​​as follows: ; The process is as follows: ; in: It is a dynamic time-varying adjacency matrix. It is the input of the spatiotemporal sequence, where N is the number of nodes, F is the number of features per node, and T is the period length of the time dimension; , , , For a learnable parameter matrix, For activation function, This represents the correlation coefficient between node i and node j over a given time period.

2. The weather forecasting method based on time-varying graphical neural networks according to claim 1, characterized in that, Preprocessing of various types of spatiotemporal weather series data from the multiple regions includes: Clean the various types of spatiotemporal weather sequence data from the multiple regions to obtain a standardized weather dataset; The standardized weather dataset is transformed using a sliding time window method to obtain seq2seq data; Based on the seq2seq data, weather datasets for multiple regions were obtained.

3. The weather forecasting method based on time-varying graphical neural networks according to claim 2, characterized in that, The method of transforming the standardized weather dataset using a sliding time window to obtain seq2seq data includes: Set the size of the sliding time window; the size of the sliding time window is determined by the sum of the length of the input time period and the length of the output prediction period; The sliding time window slides forward on a standard weather dataset to obtain seq2seq data.

4. The weather forecasting method based on time-varying graphical neural networks according to claim 2, characterized in that, The method for obtaining weather data for the area to be measured includes: Acquire various types of spatiotemporal weather sequence data for the area to be tested; Preprocessing is performed on various types of spatiotemporal weather sequence data of the area to be tested to obtain weather data of the area to be tested; The preprocessing method described is consistent with the method for preprocessing various types of spatiotemporal weather sequence data from multiple regions.

5. The weather forecasting method based on time-varying graphical neural networks according to claim 1, characterized in that, The method for constructing the external adjacency matrix includes: By embedding external knowledge of nodes into learning, the external adjacency matrix is ​​obtained and constructed as follows: ; in: It is the external adjacency matrix. Let C be the feature matrix formed by the external knowledge of the nodes, and let C be the feature dimension of the external knowledge.

6. The weather forecasting method based on time-varying graphical neural networks according to claim 5, characterized in that, The external knowledge of the nodes is embedded into the learning process, and Time2Vector is used for time embedding.

7. The weather forecasting method based on time-varying graphical neural networks according to claim 1, characterized in that, The method for training a time-varying graph neural network model, obtaining model parameters, and then determining a prediction model that integrates multiple weather data includes: Each sample data from the multiple regional weather datasets, along with the static adjacency matrix, dynamic time-varying adjacency matrix, and external adjacency matrix, is input into the time-varying graph neural network model; The output data corresponding to weather datasets from multiple regions are used as the output label data of the model to train the model and obtain model parameters; The time-varying graph neural network model was solidified to determine the prediction model that integrates multiple weather data.

Citation Information

Patent Citations

  • Highway traffic flow prediction method based on Transform and graph attention network

    CN116092294A

  • Multi-step meteorological prediction method based on multivariate time series diagram neural network

    CN116559975A