A multi-step weather forecast method and device based on a dynamic graph data structure

By constructing a dynamic graph data structure based on the location of meteorological stations and wind direction and speed, and combining graph neural networks and recurrent neural networks, the problems of low computational efficiency and complexity of multi-step forecasting in traditional weather forecasting are solved, and efficient and accurate multi-step weather forecasting is achieved.

CN120428356BActive Publication Date: 2026-03-31NINGBO METEOROLOGICAL SERVICE CENT +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Traditional deep learning methods suffer from an exponential increase in the number of edges in weather forecasting, resulting in low computational efficiency and poor generalization performance. Meanwhile, single-step recurrent network models are difficult to effectively achieve multi-step predictions, and existing multi-step output structures are complex and difficult to train.

Method used

By constructing a dynamic graph data structure based on meteorological station locations and wind direction and speed, spatiotemporal features are extracted using graph neural networks and recurrent neural networks. Combined with a multi-step classification network, a dynamic graph atlas of appropriate size is constructed to reduce invalid connections and improve the model's prediction accuracy and timeliness.

Benefits of technology

This approach improves the accuracy and timeliness of weather forecasts in multi-step weather forecasting, reduces computational load, and enhances the model's generalization performance and prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120428356B_ABST
    Figure CN120428356B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-step length weather forecast method and device based on dynamic graph data structure, including according to weather station position and wind direction wind speed, through preset edge weight formula, construct dynamic graph set;Wherein, the edge weight formula is according to the establishment in the advection term of atmospheric motion formula;The dynamic graph set is input to the preset weather forecast model, to make the weather forecast model according to graph neural network and recurrent neural network extract the space-time characteristics of the dynamic graph set, according to the space-time characteristics and multi-step length classification network output different time step length meteorological prediction result;Wherein, the multi-step length classification network contains N layers fully connected layer and M layers activation layer, N and M are greater than or equal to 2 positive integer.Compared with prior art, the present application can realize multi-step length weather forecast while improving the accuracy and timeliness of weather forecast.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of weather forecasting based on deep learning technology, and in particular to a multi-step weather forecasting method and apparatus based on dynamic graph data structure. Background Technology

[0002] Traditional deep learning methods excel at feature representation of Euclidean spatial data (such as image object detection tasks), but their application in non-Euclidean spatial data (such as graph-structured data) faces bottlenecks. Taking weather forecasting networks as an example, the irregular spatial distribution of weather stations essentially constitutes typical graph-structured data, and traditional spatial transformation operations such as convolution cannot be directly transferred to this type of non-Euclidean spatial data. Although graph neural networks provide a solution to this problem and have been successfully applied in atmospheric-related fields, two key challenges remain in practical implementation.

[0003] First, current meteorological map neural network models mostly use observation stations as nodes in the graph, but lack a systematic edge weight construction mechanism. While the commonly used fully connected approach enables information exchange between nodes, it leads to an exponential increase in the number of edges, severely impacting the computational efficiency of large-scale graphs. Furthermore, because the correlation between elements at neighboring meteorological stations is significantly higher than that at distant stations, the fully connected approach results in a large number of invalid connections, affecting the model's generalization performance and interfering with its predictive accuracy.

[0004] Secondly, in actual meteorological operations, multi-step time series forecasts are required. Common meteorological forecasting models are single-step recurrent network models, which iteratively generate the predicted time series output. This type of neural network model not only introduces iterative accumulation error, but also, to address the practical problems of multiple factors and channels, often has a very complex model structure, increasing training difficulty. Furthermore, some common meteorological forecasting models require input of other factors at future time steps, thus often limiting their use to simulation experiments. It is worth noting that for multi-step requirements, multi-step fitting output structures already exist for fitting models, employing a "curriculum learning" (CL) training strategy to ensure training stability. However, for classification models, there are few dedicated multi-step output structures. Current practices generally involve building multiple prediction models with different prediction time steps based on single-step models, forming a model swarm. Summary of the Invention

[0005] This invention provides a multi-step weather forecasting method and apparatus based on a dynamic graph data structure, which can improve the accuracy and timeliness of weather forecasts while realizing multi-step weather forecasting.

[0006] In a first aspect, embodiments of the present invention provide a multi-step long-term weather forecasting method based on a dynamic graph data structure, including:

[0007] Based on the location of meteorological stations and wind direction and speed, a dynamic atlas is constructed using a preset edge weight formula; wherein, the edge weight formula is established based on the advection term in the atmospheric motion formula;

[0008] The dynamic atlas is input into a preset weather forecasting model, which extracts the spatiotemporal features of the dynamic atlas using graph neural networks and recurrent neural networks, and outputs weather forecast results at different time steps based on the spatiotemporal features and a multi-step classification network. Specifically, the spatial features of the dynamic atlas are extracted using a graph neural network to obtain a first output feature; the temporal features of the first output feature are extracted using a recurrent neural network to obtain a second output feature; all second output features are merged and input into a multi-step classification network to synchronously output weather forecast results at different time steps; wherein, one unilateral directed graph of the dynamic atlas corresponds to one graph neural network, and one graph neural network corresponds to one first output feature. Graph neural networks share the same set of graph neural network parameters; one first output feature corresponds to one recurrent neural network, one recurrent neural network corresponds to one second output feature, and all recurrent neural networks share the same set of recurrent neural network parameters; the number of nodes in the last fully connected layer of the multi-step classification network is set to the product of the required prediction time step and the required number of prediction result classifications; the multi-step classification network contains N fully connected layers and M activation layers, where N and M are positive integers greater than or equal to 2; the parameter initialization scheme of the multi-step classification network is as follows: the m nodes of the last fully connected layer are randomly initialized, and the remaining nodes of the last fully connected layer copy the initialization parameters of the m nodes; m is the required number of prediction result classifications.

[0009] This invention constructs a dynamic graph data structure with appropriate scale, few invalid connections, and time-varying characteristics, based on meteorological station locations and wind direction and speed. This reduces the computational load for subsequent model training and improves the accuracy of model predictions. By inputting the dynamic graph atlas into a preset meteorological forecasting model, the model extracts the spatiotemporal features of the dynamic graph atlas using graph neural networks and recurrent neural networks. Based on these spatiotemporal features and a multi-step classification network, it outputs meteorological forecast results at different time steps, achieving the practical needs of multi-step meteorological forecasting with minimal computational cost. Compared with existing technologies, this application can improve the accuracy and timeliness of meteorological forecasts while implementing multi-step meteorological forecasting.

[0010] Furthermore, based on the location of meteorological stations and wind direction and speed, a dynamic graph atlas is constructed using a preset edge weight formula, specifically as follows:

[0011] Based on the location of the meteorological stations, the nodes of the one-sided directed graph are obtained;

[0012] Based on wind direction and speed and a preset edge weight formula, the edge weights of a one-sided directed graph are obtained; where wind direction and speed at one time step correspond to a one-sided directed graph.

[0013] Based on the node and edge weights, a one-sided directed graph is obtained;

[0014] Construct a dynamic graph atlas based on the one-sided directed graphs of all time steps.

[0015] This invention uses meteorological station locations and wind direction and speed as basic data to construct a dynamic graph data structure of appropriate size, with few invalid connections, that changes over time. This reduces the computational load for subsequent model training and improves the accuracy of model predictions.

[0016] Furthermore, the edge weights of the one-sided directed graph are obtained based on wind direction, wind speed, and a preset edge weight formula, specifically as follows:

[0017] Based on the wind direction and wind speed of the first meteorological station, the projection of the wind speed of the first meteorological station onto the connecting edge between the first and second meteorological stations is obtained.

[0018] The ratio between wind speed and distance is obtained based on the projection of the wind speed at the first meteorological station onto the connecting edge between the first and second meteorological stations and the distance between the first and second meteorological stations.

[0019] The edge weights of the one-sided directed graph are obtained based on the ratio between wind speed and distance.

[0020] This invention provides an embodiment that obtains the edge weights of a one-sided directed graph by referring to the advection term in the atmospheric motion formula, thus mapping the physical formula to the graph neural network model structure and improving the interpretability of the model.

[0021] Furthermore, the step of obtaining the projection of the wind speed at the first meteorological station onto the connecting edge between the first and second meteorological stations based on the wind direction and wind speed at the first meteorological station is specifically as follows:

[0022] ;

[0023] in, The wind speed at the first weather station; for The projection on the side connecting the first and second weather stations; The angle between the side connecting the first and second meteorological stations and the wind direction at the first meteorological station.

[0024] This invention provides a data basis for obtaining the ratio between wind speed and distance by calculating the projection of wind speed on the connecting edge.

[0025] Furthermore, the ratio between wind speed and distance is obtained based on the projection of the wind speed at the first meteorological station onto the connecting edge between the first and second meteorological stations, and the distance between the first and second meteorological stations. Specifically:

[0026] ;

[0027] in, It is the ratio between wind speed and distance; This represents the distance between the first and second weather stations. , These are the minimum and maximum influence distances, respectively. This represents the maximum threshold for the impact of wind speed.

[0028] This invention provides a data basis for obtaining the edge weights of a one-sided directed graph by calculating the ratio between wind speed and distance.

[0029] Furthermore, the step of obtaining the edge weights of the one-sided directed graph based on the ratio between wind speed and distance is specifically as follows:

[0030] ;

[0031] in, Let be the weight value of the edge connecting the first and second weather stations. The direction is from the second meteorological station to the first meteorological station, and it belongs to the inbound edge of the first meteorological station.

[0032] This invention, through the establishment of edge weight formulas, systematically constructs a dynamic graph data structure with appropriate scale, few invalid connections, and time-varying characteristics.

[0033] Furthermore, the preset weather forecast model also includes the setting of the loss function value, specifically:

[0034] Set n loss functions; where n is the number of prediction time steps required, and one prediction time step corresponds to one loss function;

[0035] The total loss function value is obtained by summing or averaging the values ​​of the n loss functions.

[0036] This invention improves the model's ability to handle imbalanced sample sets by setting the loss function value.

[0037] Secondly, embodiments of the present invention provide a multi-step weather forecasting device based on a dynamic graph data structure, comprising: a dynamic graph atlas construction module and a weather forecasting model module.

[0038] The dynamic atlas construction module is used to construct a dynamic atlas based on the location of meteorological stations and wind direction and speed, using a preset edge weight formula; wherein, the edge weight formula is established based on the advection term in the atmospheric motion formula;

[0039] The weather forecasting model module is used to input the dynamic atlas into a preset weather forecasting model, so that the weather forecasting model extracts the spatiotemporal features of the dynamic atlas based on graph neural networks and recurrent neural networks, and outputs weather forecasting results at different time steps based on the spatiotemporal features and a multi-step classification network. Specifically, the model extracts the spatial features of the dynamic atlas through a graph neural network to obtain a first output feature; it extracts the temporal features of the first output feature through a recurrent neural network to obtain a second output feature; it merges all the second output features and inputs them into a multi-step classification network to synchronously output weather forecasting results at different time steps. Each one-sided directed graph of the dynamic atlas corresponds to one graph neural network, and each graph neural network corresponds to one first output feature. The graph neural networks (GNNs) share the same set of GNN parameters. One first output feature corresponds to one recurrent neural network (RNN), and one RNN corresponds to one second output feature; all RNNs share the same set of RNN parameters. The number of nodes in the last fully connected layer of the multi-step classification network is set to the product of the required prediction time step size and the required number of prediction result classifications. The multi-step classification network contains N fully connected layers and M activation layers, where N and M are positive integers greater than or equal to 2. The parameter initialization scheme for the multi-step classification network is as follows: the m nodes of the last fully connected layer are randomly initialized, and the remaining nodes of the last fully connected layer copy the initialization parameters of the m nodes; m is the required number of prediction result classifications.

[0040] The embodiments of the present invention construct a dynamic graph data structure with appropriate scale, few invalid connections, and time-varying characteristics through a dynamic graph construction module, thereby reducing the computational load for subsequent model training and improving the accuracy of model prediction. The dynamic graph data structure is processed by the weather forecast model module, which realizes the actual needs of multi-step weather forecasting with less computational consumption. Attached Figure Description

[0041] Figure 1 A flowchart illustrating the multi-step weather forecasting method based on a dynamic graph data structure provided in this embodiment of the invention;

[0042] Figure 2 This is a schematic diagram of the sea fog forecasting model framework based on dynamic graph data structure provided in an embodiment of the present invention;

[0043] Figure 3 A comparison chart of TS scores for sea fog forecasts at various time steps in the Ningbo-Zhoushan Port area, provided by the EC fine-grid numerical visibility forecast product and the sea fog forecast model based on dynamic graph data structure in an embodiment of the present invention.

[0044] Figure 4 This is a real-time visibility map of Ningbo-Zhoushan Port Area provided for an embodiment of the present invention.

[0045] Figure 5 A comparison chart of the sea fog forecast situation in Ningbo-Zhoushan Port area provided by the EC fine-grid numerical visibility forecast product and the sea fog forecast model based on dynamic graph data structure in an embodiment of the present invention.

[0046] Figure 6 This is a schematic diagram of the structure of a multi-step weather forecasting device based on a dynamic graph data structure provided in an embodiment of the present invention. Detailed Implementation

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] Please refer to Figure 1 The present invention provides a multi-step weather forecasting method based on a dynamic graph data structure, comprising steps S101 to S102, which are detailed below:

[0049] Step S101: Based on the location of meteorological stations and wind direction and speed, a dynamic atlas is constructed using a preset edge weight formula; wherein, the edge weight formula is established based on the advection term in the atmospheric motion formula, and the atmospheric motion formula is specifically as follows:

[0050] ;

[0051] in, The rate of change of gas parcel element variables over time; This refers to the change in the variables of air parcel elements at a fixed location over time. It is a three-dimensional vector velocity; For divergence operators; , , These are the velocity components in the three-dimensional directions; , , These are the partial derivatives of the distance in the three-dimensional directions.

[0052] In this step, step S101 specifically includes:

[0053] Based on the location of the meteorological stations, the nodes of the one-sided directed graph are obtained;

[0054] Based on wind direction and speed and a preset edge weight formula, the edge weights of a one-sided directed graph are obtained; where wind direction and speed at one time step correspond to a one-sided directed graph.

[0055] Based on the node and edge weights, a one-sided directed graph is obtained;

[0056] Construct a dynamic graph atlas based on the one-sided directed graphs of all time steps.

[0057] This invention uses meteorological station locations and wind direction and speed as basic data to construct a dynamic graph data structure of appropriate size, with few invalid connections, that changes over time. This reduces the computational load for subsequent model training and improves the accuracy of model predictions.

[0058] Furthermore, the edge weights of the one-sided directed graph are obtained based on wind direction, wind speed, and a preset edge weight formula, specifically as follows:

[0059] Based on the wind direction and wind speed of the first meteorological station, the projection of the wind speed of the first meteorological station onto the connecting edge between the first and second meteorological stations is obtained.

[0060] The ratio between wind speed and distance is obtained based on the projection of the wind speed at the first meteorological station onto the connecting edge between the first and second meteorological stations and the distance between the first and second meteorological stations.

[0061] The edge weights of the one-sided directed graph are obtained based on the ratio between wind speed and distance.

[0062] This invention provides an embodiment that obtains the edge weights of a one-sided directed graph by referring to the advection term in the atmospheric motion formula, thus mapping the physical formula to the graph neural network model structure and improving the interpretability of the model.

[0063] Furthermore, the step of obtaining the projection of the wind speed at the first meteorological station onto the connecting edge between the first and second meteorological stations based on the wind direction and wind speed at the first meteorological station is specifically as follows:

[0064] ;

[0065] in, The wind speed at the first weather station; for The projection on the side connecting the first and second weather stations; The angle between the side connecting the first and second meteorological stations and the wind direction at the first meteorological station.

[0066] This invention provides a data basis for obtaining the ratio between wind speed and distance by calculating the projection of wind speed on the connecting edge.

[0067] Furthermore, the ratio between wind speed and distance is obtained based on the projection of the wind speed at the first meteorological station onto the connecting edge between the first and second meteorological stations, and the distance between the first and second meteorological stations. Specifically:

[0068] ;

[0069] in, It is the ratio between wind speed and distance; This represents the distance between the first and second weather stations. , These are the minimum and maximum influence distances, respectively. This represents the maximum threshold for the impact of wind speed.

[0070] This invention provides a data basis for obtaining the edge weights of a one-sided directed graph by calculating the ratio between wind speed and distance.

[0071] Furthermore, the step of obtaining the edge weights of the one-sided directed graph based on the ratio between wind speed and distance is specifically as follows:

[0072] ;

[0073] in, Let be the weight value of the edge connecting the first and second weather stations. The direction is from the second meteorological station to the first meteorological station, and the edge belongs to the first meteorological station; optionally, each meteorological station is added to a self-loop, and the edge weight is normalized.

[0074] This invention, through the establishment of edge weight formulas, systematically constructs a dynamic graph data structure with appropriate scale, few invalid connections, and time-varying characteristics.

[0075] Step S102: Input the dynamic atlas into a preset weather forecasting model so that the weather forecasting model extracts the spatiotemporal features of the dynamic atlas based on graph neural networks and recurrent neural networks, and outputs weather forecasting results with different time steps based on the spatiotemporal features and a multi-step classification network; wherein, the multi-step classification network contains N fully connected layers and M activation layers, where N and M are positive integers greater than or equal to 2.

[0076] In this step, step S102 specifically involves:

[0077] Spatial features of the dynamic graph atlas are extracted using a graph neural network to obtain a first output feature. Each one-sided directed graph in the dynamic graph atlas corresponds to one graph neural network, and each graph neural network corresponds to one first output feature. All graph neural networks share the same set of graph neural network parameters. Optionally, the graph neural network can employ structures such as Graph Convolutional Network (GCN) or Graph Attention (GAT) as needed, and the number of layers generally does not exceed three. The activation function of the graph neural network is the ELU (Exponential Linear Unit) activation function.

[0078] A second output feature is obtained by extracting the temporal features of the first output feature through a recurrent neural network; wherein, one first output feature corresponds to one recurrent neural network, and one recurrent neural network corresponds to one second output feature, and all recurrent neural networks share the same set of recurrent neural network parameters; optionally, the recurrent neural network can adopt a structure such as Long Short-Term Memory (LSTM) or Independent Recurrent Network (IndRNN) as needed, the number of layers generally does not exceed 3, and it can be a unidirectional or bidirectional network; the activation function of the recurrent neural network adopts the ReLU activation function;

[0079] All second output features are merged and input into a multi-step classification network to synchronously output meteorological forecast results at different time steps. The number of nodes in the last fully connected layer of the multi-step classification network is set to the product of the required number of prediction time steps and the required number of prediction result classifications. Optionally, the activation function of the multi-step classification network is the ReLU activation function.

[0080] This invention extracts the spatiotemporal features of dynamic atlases through graph neural networks and recurrent neural networks, and outputs meteorological forecast results at different time steps through the spatiotemporal features and multi-step classification networks. While ensuring the accuracy of model prediction, it efficiently achieves the synchronous output of meteorological forecast results at different time steps.

[0081] Optionally, before step S102, the method further includes:

[0082] Based on the location of meteorological stations and wind direction and speed within the study area, a dynamic graph data structure is constructed;

[0083] Based on meteorological elements, the node attributes of the dynamic graph data structure are obtained;

[0084] Based on the classification of the required prediction results, the output labels of the dynamic graph data structure are obtained;

[0085] Based on the node attributes and output labels of the dynamic graph data structure, a dynamic graph dataset is constructed; the dynamic graph dataset is then cleaned, time series continuity checked, and normalized to obtain a training set, a validation set, and a test set.

[0086] Based on the dynamic graph dataset, the initial weather forecast model is iteratively trained to obtain the weather forecast model. The actual generalization ability of the weather forecast model is tested using a test set, with the TS score of the key focus category as the main basis, while also taking into account the accuracy, recall and overall accuracy of the key focus category.

[0087] Furthermore, the preset weather forecast model includes the setting of a parameter initialization scheme, specifically as follows:

[0088] The parameters of m nodes in the last fully connected layer of the multi-step classification network are randomly initialized; where m is the number of classifications required for the prediction results.

[0089] The remaining nodes of the last fully connected layer of the multi-step classification network copy the initialization parameters of the m nodes.

[0090] In this embodiment of the invention, the initial parameters of each node corresponding to each forecast time step are the same by setting a parameter initialization scheme.

[0091] Furthermore, the preset weather forecast model also includes the setting of the loss function value, specifically:

[0092] Set n loss functions; where n is the number of prediction time steps required, and one prediction time step corresponds to one loss function; optionally, the loss function can be either the cross-entropy loss function or the Focal Loss loss function as needed.

[0093] The total loss function value is obtained by summing or averaging the values ​​of the n loss functions.

[0094] This invention improves the model's ability to handle imbalanced sample sets by setting the loss function value.

[0095] To better demonstrate the beneficial effects of the present invention, this embodiment provides a specific implementation method, taking the sea fog situation in Ningbo-Zhoushan Port as the analysis object, to show the specific implementation process of the multi-step long-term weather forecasting method based on dynamic graph data structure.

[0096] This specific embodiment collects and organizes observational data from meteorological stations within the Ningbo-Zhoushan Port area (a rectangular area of ​​29.4–30.6°N and 121.5–122.8°E) from January to July and November to December 2019 to 2023. After excluding meteorological stations with many missing data or those with short establishment times, a total of 72 meteorological stations and 31,407 time steps were collected, totaling 2,261,304 station data points. Among them, the percentage of station data points with sea fog was 0.021.

[0097] This specific embodiment obtains the nodes of a one-sided directed graph based on the locations of meteorological stations within the Ningbo-Zhoushan Port area; it obtains the edge weights of the one-sided directed graph based on wind direction, wind speed, and a preset edge weight formula; wherein, wind direction and wind speed for one time step correspond to one one-sided directed graph; the one-sided directed graph is obtained based on the nodes and edge weights; and a dynamic graph atlas is constructed based on the one-sided directed graphs for all time steps.

[0098] In this specific embodiment, the preset edge weight formula is as follows:

[0099] ;

[0100] in, The wind speed at the first weather station; for The projection on the side connecting the first and second weather stations; The angle between the side connecting the first and second meteorological stations and the wind direction at the first meteorological station;

[0101] ;

[0102] in, It is the ratio between wind speed and distance; This represents the distance between the first and second weather stations. , These are the minimum and maximum influence distances, respectively. This represents the maximum threshold for the impact of wind speed; in this specific embodiment, when the visibility at the meteorological station is <1km, the wind speed corresponding to most observation time steps is <10m / s, therefore... Set as According to the above The maximum distance the wind can travel in one hour is 36 km. Due to the significant dispersion in visibility, a relatively small minimum impact distance needs to be set. Set as , Set as ;

[0103] ;

[0104] in, Let be the weight value of the edge connecting the first and second weather stations. The direction is from the second meteorological station to the first meteorological station, and the edge belongs to the first meteorological station; each meteorological station is added to a self-loop, and the edge weights are normalized.

[0105] In this specific embodiment, visibility, relative humidity, air temperature, land-sea temperature difference, wind speed U (zonal), wind speed V (meridional), and observation time step of each meteorological station are used as input attribute features for nodes of a one-sided directed graph. After data cleaning, each year's sample contains 72 meteorological stations, each meteorological station contains input data for 6 time steps, and output labels for whether there is sea fog for the next 24 time steps, thus establishing a dynamic graph dataset. Samples from 2019 to 2022 are used to construct the training set and validation set. 90% of the samples are randomly selected as the training set, the remainder as the validation set, and the samples from 2023 are used as the test set.

[0106] In this specific embodiment, the visibility data is normalized using the logarithmic function log10, specifically as follows:

[0107] ;

[0108] in, The maximum visibility is set to 20000m. If vis > 20000m, then vis = 20000m.

[0109] Min-max normalization (linear function normalization) is used to normalize other data, specifically as follows:

[0110] .

[0111] Please refer to Figure 2 The sea fog forecasting model based on a dynamic graph data structure provided in this specific embodiment includes a graph neural network, a recurrent neural network, and a multi-step classification network. The graph neural network adopts a graph attention (GAT) structure with 3 layers. The activation function of the graph neural network adopts the ELU (Exponential Linear Unit) activation function. The recurrent neural network adopts a bidirectional long short-term memory (LSTM) structure with 2 layers. The multi-step classification network consists of 2 fully connected layers and 2 activation layers. The number of nodes in the last fully connected layer is set to 48 (24 hours × 2 classes), where every 2 nodes represent the prediction result for one prediction time step.

[0112] In this specific embodiment, the parameter initialization scheme for the multi-step classification network is set as follows: the parameters of the two nodes in the last fully connected layer of the multi-step classification network are randomly initialized; the initialization parameters of the remaining nodes in the last fully connected layer of the multi-step classification network are copied from the initialization parameters of the two nodes; and the remaining parameters are randomly initialized by default.

[0113] This specific embodiment uses the Focal Loss loss function, which is specifically designed for imbalanced datasets. One loss function is configured for each prediction time step, and the total loss of the model training is the sum of the values ​​of 24 loss functions.

[0114] This specific embodiment conducts timed and location-based evaluations of the forecast results from the meteorological stations used for modeling; using visibility <1km as the standard for sea fog, and based on the number of times sea fog occurs in the forecast and actual situation at each meteorological station at the hourly time step, the TS score of sea fog is used as the main basis, while also taking into account the accuracy, recall and overall accuracy of sea fog.

[0115] This specific embodiment extracts the EC fine-grid visibility numerical forecast products for January-July and November-December 2023 at 08:00 and 20:00. Visibility prediction results for each meteorological station are obtained through bilinear interpolation and compared with the forecast results of a sea fog forecast model based on a dynamic graph data structure. For detailed TS score comparisons, please refer to [reference needed]. Figure 3 Under the same reporting time step, the sea fog forecasting model based on the dynamic graph data structure significantly outperformed the EC fine-grid visibility numerical forecast products (0.042, 0.100, and 0.069) in terms of average TS score (0.173), accuracy (0.236), and recall (0.384) for sea fog predictions at various time steps for meteorological stations within the Ningbo-Zhoushan Port area. This indicates that the sea fog forecasting model based on the dynamic graph data structure effectively enhances the forecasting capability of sea fog, especially for small-scale sea fog.

[0116] Please refer to Figure 4 The above is a real-time visibility data for the Ningbo-Zhoushan Port Area provided in this specific embodiment. From 07:00 on November 11, 2023 to 11:00 on November 12, 2023, only two stations in the entire Ningbo-Zhoushan Port Area experienced sea fog: Chunxiao Station experienced continuous sea fog from 07:00 on the 11th to 10:00 on the 12th, and Dongpanshan Station experienced sea fog at two time steps from 02:00 to 03:00 on the 12th. Please refer to... Figure 5The above describes the sea fog forecasts provided in this specific embodiment using the EC fine-grid visibility numerical forecast product and the sea fog forecast model based on the dynamic graph data structure. The EC fine-grid visibility numerical forecast product predicts that the visibility in the Ningbo-Zhoushan Port area will be good from 07:00 on November 11, 2023 to 11:00 on November 12, 2023, and no sea fog is forecast. The sea fog forecast model based on the dynamic graph data structure predicts that sea fog will occur continuously at Chunxiao Station from 09:00 on the 11th to 08:00 on the 12th, which is consistent with the actual situation. Sea fog will occur at Dongpanshan Station from 17:00 on the 11th to 07:00 on the 12th, which is longer than the actual duration.

[0117] Please refer to Figure 6 The present invention provides a multi-step weather forecasting device based on a dynamic graph data structure, comprising a dynamic graph atlas construction module 601 and a weather forecasting model module 602, as detailed below:

[0118] The dynamic atlas construction module 601 is used to construct a dynamic atlas based on the location of meteorological stations and wind direction and speed, using a preset edge weight formula; wherein, the edge weight formula is established based on the advection term in the atmospheric motion formula;

[0119] The weather forecast model module 602 is used to input the dynamic atlas into a preset weather forecast model, so that the weather forecast model extracts the spatiotemporal features of the dynamic atlas according to the graph neural network and the recurrent neural network, and outputs weather forecast results with different time steps according to the spatiotemporal features and the multi-step classification network; wherein, the multi-step classification network includes N fully connected layers and M activation layers, where N and M are positive integers greater than or equal to 2.

[0120] In this embodiment of the invention, the dynamic graph atlas construction module 601 includes a node construction submodule, an edge weight construction submodule, a directed graph construction submodule, and a dynamic graph atlas construction submodule, specifically:

[0121] The node construction submodule is used to obtain the nodes of a one-sided directed graph based on the location of meteorological stations;

[0122] The edge weight construction submodule is used to obtain the edge weights of a one-sided directed graph based on wind direction and wind speed and a preset edge weight formula; wherein, wind direction and wind speed at one time point correspond to a one-sided directed graph.

[0123] The directed graph construction submodule is used to obtain a one-sided directed graph based on the node and edge weights.

[0124] The dynamic graph construction submodule is used to construct a dynamic graph based on the one-sided directed graph at all times.

[0125] This invention uses meteorological station locations and wind direction and speed as basic data to construct a dynamic graph data structure of appropriate size, with few invalid connections, that changes over time. This reduces the computational load for subsequent model training and improves the accuracy of model predictions.

[0126] In this embodiment of the invention, the edge weight construction submodule includes a projection construction unit, a ratio construction unit, and an edge weight construction unit, specifically:

[0127] The projection construction unit is used to obtain the projection of the wind speed of the first meteorological station onto the connecting edge between the first meteorological station and the second meteorological station, based on the wind direction and wind speed of the first meteorological station.

[0128] The ratio construction unit is used to obtain the ratio between wind speed and distance based on the projection of the wind speed of the first meteorological station onto the connecting side between the first meteorological station and the second meteorological station, and the distance between the first meteorological station and the second meteorological station.

[0129] The edge weight construction unit is used to obtain the edge weights of a one-sided directed graph based on the ratio between wind speed and distance.

[0130] This invention provides an embodiment that obtains the edge weights of a one-sided directed graph by referring to the advection term in the atmospheric motion formula, thus mapping the physical formula to the graph neural network model structure and improving the interpretability of the model.

[0131] In this embodiment of the invention, the projection construction unit specifically comprises:

[0132] ;

[0133] in, The wind speed at the first weather station; for The projection on the side connecting the first and second weather stations; The angle between the side connecting the first and second meteorological stations and the wind direction at the first meteorological station.

[0134] This invention provides a data basis for obtaining the ratio between wind speed and distance by calculating the projection of wind speed on the connecting edge.

[0135] In this embodiment of the invention, the ratio construction unit specifically comprises:

[0136] ;

[0137] in, It is the ratio between wind speed and distance; This represents the distance between the first and second weather stations. , These are the minimum and maximum influence distances, respectively. This represents the maximum threshold for the impact of wind speed.

[0138] This invention provides a data basis for obtaining the edge weights of a one-sided directed graph by calculating the ratio between wind speed and distance.

[0139] In this embodiment of the invention, the edge weight construction unit specifically comprises:

[0140] ;

[0141] in, Let be the weight value of the edge connecting the first and second weather stations. The direction is from the second meteorological station to the first meteorological station, and it belongs to the inbound edge of the first meteorological station.

[0142] This invention, through the establishment of edge weight formulas, systematically constructs a dynamic graph data structure with appropriate scale, few invalid connections, and time-varying characteristics.

[0143] In this embodiment of the invention, the weather forecast model module 602 includes a graph neural network submodule, a recurrent neural network submodule, and a multi-step classification network submodule, specifically:

[0144] The graph neural network submodule is used to extract the spatial features of the dynamic graph set through the graph neural network to obtain the first output feature; wherein, one unilateral directed graph of the dynamic graph set corresponds to one graph neural network, one graph neural network corresponds to one first output feature, and all graph neural networks share the same set of graph neural network parameters;

[0145] The recurrent neural network submodule is used to extract the temporal features of the first output feature through a recurrent neural network to obtain the second output feature; wherein, one first output feature corresponds to one recurrent neural network, one recurrent neural network corresponds to one second output feature, and all recurrent neural networks share the same set of recurrent neural network parameters;

[0146] The multi-step classification network submodule is used to merge all the second output features and input them into the multi-step classification network to synchronously output meteorological forecast results at different time steps; wherein, the number of nodes in the last fully connected layer of the multi-step classification network is set as the product of the required number of prediction time steps and the required number of prediction result classifications.

[0147] This invention extracts the spatiotemporal features of dynamic atlases through graph neural network submodules and recurrent neural network submodules, and outputs meteorological forecast results at different time steps through the spatiotemporal features and multi-step classification network submodules. While ensuring the accuracy of model prediction, it efficiently achieves the synchronous output of meteorological forecast results at different time steps.

[0148] In this embodiment of the invention, the weather forecast model module 602 includes a parameter initialization setting submodule, specifically:

[0149] The parameter initialization setting submodule is used to randomly initialize the parameters of m nodes in the last fully connected layer of the multi-step classification network; where m is the number of classifications required for the prediction result; the remaining nodes in the last fully connected layer of the multi-step classification network copy the initialization parameters of the m nodes.

[0150] The embodiments of the present invention ensure that the initial parameters of the corresponding nodes for each forecast time are the same by setting a parameter initialization scheme.

[0151] In this embodiment of the invention, the weather forecast model module 602 includes a loss function value setting submodule, specifically:

[0152] The loss function value setting submodule is used to set n loss functions; where n is the number of prediction time steps required, and one prediction time step corresponds to one loss function; the total loss function value is obtained based on the sum or mean of the values ​​of the n loss functions.

[0153] This invention improves the model's ability to handle imbalanced sample sets by setting the loss function value.

[0154] The aforementioned apparatus can implement a multi-step weather forecasting method based on a dynamic graph data structure, as described in the above method embodiments. The options described in the above method embodiments are also applicable to this embodiment and will not be detailed here. The remaining contents of this application's embodiments can be referred to the contents of the above method embodiments, and will not be repeated in this embodiment.

[0155] In this embodiment of the invention, the dynamic graph construction module 601 constructs a dynamic graph data structure of appropriate size, with few invalid connections, and that changes over time, thereby reducing the computational load for subsequent model training and improving the accuracy of model predictions. The meteorological forecast model module 602 processes the dynamic graph data structure, achieving the practical needs of multi-step meteorological forecasting with less computational consumption.

[0156] Based on the above method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the multi-step long-term weather forecasting method based on dynamic graph data structure described in any of the above method embodiments of the present invention.

[0157] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A multi-step weather forecasting method based on a dynamic graph data structure, characterized in that, The application relates to a weather forecasting method and device. According to the weather station position and the wind direction and speed, a dynamic graph set is constructed through a preset edge weight formula, wherein the edge weight formula is established according to the advection term in the atmospheric motion formula; The dynamic graph set is input into a preset weather forecasting model, so that the weather forecasting model extracts the space-time features of the dynamic graph set according to a graph neural network and a recurrent neural network, and outputs weather prediction results at different time steps according to the space-time features and a multi-step classification network; specifically, the space features of the dynamic graph set are extracted through the graph neural network to obtain first output features; the time features of the first output features are extracted through the recurrent neural network to obtain second output features; all the second output features are combined and input into the multi-step classification network to synchronously output weather prediction results at different time steps; wherein one single-edge directed graph of the dynamic graph set corresponds to one graph neural network, one graph neural network corresponds to one first output feature, and all the graph neural networks share the same set of graph neural network parameters; one first output feature corresponds to one recurrent neural network, one recurrent neural network corresponds to one second output feature, and all the recurrent neural networks share the same set of recurrent neural network parameters; the number of nodes of the last full connection layer of the multi-step classification network is set to the product of the number of required prediction time steps and the number of required prediction result categories; the multi-step classification network comprises N full connection layers and M activation layers, and N and M are positive integers greater than or equal to 2; the parameter initialization scheme of the multi-step classification network is that m nodes of the last full connection layer are randomly initialized, and the remaining nodes of the last full connection layer copy the initialization parameters of the m nodes; m is the number of required prediction result categories.

2. A multi-step weather forecasting method based on dynamic graph data structure as claimed in claim 1, wherein, The dynamic graph set is constructed through a preset edge weight formula according to the weather station position and the wind direction and speed, specifically as follows: Nodes of a single-edge directed graph are obtained according to the weather station position; Edge weights of the single-edge directed graph are obtained according to the wind direction and speed and the preset edge weight formula; wherein the wind direction and speed of one time step correspond to one single-edge directed graph; The single-edge directed graph is obtained according to the nodes and the edge weights; The dynamic graph set is constructed according to the single-edge directed graphs of all time steps.

3. A multi-step weather forecasting method based on dynamic graph data structure as claimed in claim 2, wherein, The edge weights of the single-edge directed graph are obtained according to the wind direction and speed and the preset edge weight formula, specifically as follows: The projection of the wind speed of the first weather station on the connecting edge between the first weather station and the second weather station is obtained according to the wind direction and speed of the first weather station; The ratio between the wind speed and the distance is obtained according to the projection of the wind speed of the first weather station on the connecting edge between the first weather station and the second weather station and the distance between the first weather station and the second weather station; The edge weights of the single-edge directed graph are obtained according to the ratio between the wind speed and the distance.

4. A multi-step weather forecasting method based on dynamic graph data structure as claimed in claim 3 wherein, The projection of the wind speed of the first weather station on the connecting edge between the first weather station and the second weather station is obtained according to the wind direction and speed of the first weather station, specifically as follows: ; wherein, is the wind speed at the first weather station; is is the projection of the connecting edge between the first weather station and the second weather station on the ground; is the angle between the connecting edge between the first weather station and the second weather station and the wind direction at the first weather station.

5. A multi-step weather forecasting method based on dynamic graph data structure as claimed in claim 3 wherein, The ratio between the wind speed and the distance is obtained according to the projection of the wind speed of the first meteorological station on the connecting edge between the first meteorological station and the second meteorological station and the distance between the first meteorological station and the second meteorological station, and specifically is: ; wherein, is the ratio between the wind speed and the distance; is the distance between the first and second weather station; , are the minimum and maximum impact distance, respectively; is the maximum threshold for the wind speed impact.

6. A multi-step weather forecasting method based on dynamic graph data structure as claimed in claim 3 wherein, The edge weight of the single-edge directed graph is obtained according to the ratio between the wind speed and the distance, and specifically is: ; wherein, is a weight value of the connection edge of the first weather station and the second weather station, , the direction is from the second weather station to the first weather station, and the edge belongs to the incoming edge of the first weather station.

7. The multi-step weather forecasting method based on dynamic graph data structure of claim 1, wherein, The preset meteorological forecast model further includes setting of a loss function value, and specifically is: n loss functions are set; wherein n is the number of required prediction time steps, and one prediction time step corresponds to one loss function; A total loss function value is obtained according to the sum or average of the values of the n loss functions.

8. A multi-step weather forecasting apparatus based on a dynamic graph data structure, characterized by, It comprises: a dynamic graph set construction module and a meteorological forecast model module: The dynamic graph set construction module is configured to construct a dynamic graph set according to the positions of meteorological stations and wind direction and speed by using a preset edge weight formula; wherein the edge weight formula is established according to the advection term in the atmospheric motion formula; The meteorological forecast model module is configured to input the dynamic graph set into a preset meteorological forecast model, so that the meteorological forecast model extracts the spatiotemporal features of the dynamic graph set according to a graph neural network and a recurrent neural network, and outputs meteorological prediction results at different time steps according to the spatiotemporal features and a multi-step classification network; specifically, the spatial features of the dynamic graph set are extracted by using the graph neural network to obtain a first output feature; the temporal features of the first output feature are extracted by using the recurrent neural network to obtain a second output feature; all second output features are combined and input into the multi-step classification network to synchronously output meteorological prediction results at different time steps; wherein one single-edge directed graph of the dynamic graph set corresponds to one graph neural network, one graph neural network corresponds to one first output feature, and all graph neural networks share the same set of graph neural network parameters; one first output feature corresponds to one recurrent neural network, one recurrent neural network corresponds to one second output feature, and all recurrent neural networks share the same set of recurrent neural network parameters; the number of nodes of the last fully connected layer of the multi-step classification network is set to the product of the number of required prediction time steps and the number of required prediction result categories; the multi-step classification network comprises N fully connected layers and M activation layers, and N and M are positive integers greater than or equal to 2; the parameter initialization scheme of the multi-step classification network is that m nodes of the last fully connected layer are randomly initialized, and the remaining nodes of the last fully connected layer copy the initialization parameters of the m nodes; and m is the number of required prediction result categories.

Citation Information

Patent Citations

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

    CN116559975A

  • Air quality forecasting method, system and device and storage medium

    CN118068449A