A method and system for constructing an online precipitation forecast model based on a spatiotemporal dynamic hypergraph neural network
By using an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network, the problems of the sensitivity of numerical weather prediction models to atmospheric motion and the insufficient capture of local features by machine learning models are solved, thus achieving higher accuracy precipitation forecasts.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FUZHOU UNIV
- Filing Date
- 2026-01-08
- Publication Date
- 2026-04-24
AI Technical Summary
Existing numerical weather prediction models are sensitive to the nonlinear and chaotic characteristics of atmospheric motion, and initial errors are easily amplified, making it difficult to accurately describe complex physical processes. Machine learning models are insufficient in capturing local features, resulting in large precipitation forecast errors.
An online precipitation forecasting model based on spatiotemporal dynamic hypergraph neural network is adopted. By establishing a hypergraph model and hypergraph neural network mechanism, combined with a time embedding module, an adaptive hypergraph attention network and a hybrid domain loss function, high-order spatiotemporal interaction and online learning of precipitation processes are achieved.
It improves the accuracy and stability of precipitation forecasts, can flexibly depict the connections between regions, adapt to iteratively changing background climate characteristics, and reduce forecast errors.
Smart Images

Figure CN121482298B_ABST
Abstract
Description
Technical Field
[0001] This invention proposes a method and system for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network, which relates to the field of computer systems based on specific computational models. Background Technology
[0002] Early forecasts typically use numerical weather prediction (NWP), which is based on fundamental equations of atmospheric dynamics and thermodynamics. It simulates atmospheric motion and evolution by discretizing atmospheric state variables (such as temperature, pressure, humidity, and wind field) in space and time, thereby enabling precipitation forecasting. With the rapid development of computer technology, the resolution of NWP models has continuously improved, enabling them to capture smaller-scale weather phenomena, such as localized storms and showers.
[0003] Despite significant progress in NWP models, several limitations remain. Atmospheric motion is highly nonlinear and chaotic, extremely sensitive to initial conditions; small initial errors can be amplified over time, leading to large deviations in forecasts. Furthermore, NWP models struggle to accurately describe complex physical processes such as convection and cloud microphysics, often employing parametric approximations, which introduce uncertainty. Later machine learning methods, driven by data, learn from extensive historical meteorological data to uncover complex relationships between precipitation and other meteorological elements, building precipitation forecasting models. Commonly used machine learning algorithms include neural networks, support vector machines, random forests, and decision trees. Compared to NWP models, machine learning methods do not require complex mathematical modeling of atmospheric physical processes, directly learning precipitation patterns from data and exhibiting better adaptability to small-scale, nonlinear precipitation phenomena. However, the performance of machine learning models heavily relies on feature selection and data preprocessing. Precipitation data often contains significant noise and outliers, requiring complex preprocessing before model training. Furthermore, precipitation events are often influenced by local topography and climate conditions, and machine learning models have limitations in capturing these local features. For example, high-resolution numerical models still contain errors when simulating heavy precipitation at a local scale, and machine learning models struggle to completely resolve this issue. Summary of the Invention
[0004] In view of this, in order to fill the gaps and deficiencies in the existing technology, this invention proposes a method and system for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network.
[0005] This invention proposes a method and system for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network, including the following:
[0006] This invention proposes a method for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network, characterized by the following:
[0007] Step S1: Establish the graph model of the hypergraph, including the adjacency matrix of the original graph and the incidence matrix of the hypergraph;
[0008] Step S2: Using the hypergraph neural network mechanism as the core, establish an online precipitation forecasting model based on the spatiotemporal dynamic hypergraph neural network; including using an encoder to receive temporal and spatial precipitation data; then using the encoder to splice the temporal and spatial sequences of precipitation data and inputting the spliced sequence into a multilayer perceptron with a fully connected structure; finally, the decoder uses the multilayer perceptron with a fully connected structure to output the prediction sequence.
[0009] The establishment of the encoder includes establishing a temporal embedding module for capturing meteorological elements and establishing a hypergraph attention network.
[0010] The establishment of the decoder includes the establishment of a multilayer perceptron with a fully connected structure;
[0011] Step S3: Establish an online learning mechanism, a seasonal sample storage pool, and an online training mechanism including a hybrid domain loss function and a spatiotemporal similarity replay mechanism to correct the output of the online precipitation forecast model.
[0012] Further, step S1 includes the following:
[0013] Step S11: Establish a graph model based on a hypergraph, including the following:
[0014] Define a hypergraph G(V, E, W);
[0015] The hyperedge connects multiple vertices, the correlation matrix, and reflects the higher-order connectivity characteristics of nodes, thus characterizing the complex spatial relationships between research units;
[0016] Where V represents the set of vertices of the hypergraph;
[0017] in, ;
[0018] Here, E represents the edge set of the hypergraph, and I represents the number of hyperedges, where each hyperedge connects more than two vertices.
[0019] Where R represents the real number space and N represents the total number of vertices in the hypergraph;
[0020] W is responsible for carrying the weight information of the hypergraph edges. In the hypergraph architecture, node signals are used to exchange and transmit information between some nodes through the hyperedges, which reflects the relationships between the nodes.
[0021] Step S12: Let the adjacency matrix of the original graph be:
[0022] ;
[0023] Where A represents the adjacency matrix of the original graph;
[0024] Let the incidence matrix of the hypergraph be:
[0025] ;
[0026] Where H represents the incidence matrix of the hypergraph; the incidence matrix H uses I hyperedges to represent the relationships between N nodes;
[0027] Step S13: At a specific time t in the time series, for the hypergraph, define the node signal matrix as follows:
[0028] ;
[0029] Where X is the current input data of the time module;
[0030] Where X t For node signal matrix;
[0031] Where F represents the feature dimension of each node at time t.
[0032] Further, step S2 includes the following:
[0033] Step S21: Transfer the data X at time t t The temporal embedding module and hypergraph attention network module of the parallel input encoder include the following:
[0034] Step S211: For the time embedding module, define a learnable monthly time period embedding dictionary J. t ,have:
[0035] ;
[0036] Where U represents the month, d e It is the size of the embedding dimension;
[0037] Furthermore, for X at a specific time point t The corresponding monthly time period data is recorded as follows:
[0038] ;
[0039] Wherein, P(X) represents converting the month field information attached to the data content itself into hard encoding consistent with the dimension of the embedded vector in the dictionary;
[0040] Furthermore, the monthly time period embedding E is extracted from the corresponding embedding dictionary. T ,get:
[0041] ;
[0042] E T This indicates that seasonal embedded time series are used to capture the changing patterns of weather elements over a monthly cycle, providing information input for precipitation forecasting models and improving the accuracy and reliability of forecasts.
[0043] Where J() represents the indexing operation on the dictionary; T represents the sequence length of the input sequence X;
[0044] Step S212:
[0045] Define space configuration probability embedding E prob This indicates the different connection probability tendencies with other nodes when constructing a hypergraph;
[0046] Define geographic association probability embedding E asso This indicates that different node groups are combined to form a superedge from the level of higher-order meteorological connections.
[0047] Step S213: Input them into the sigmoid activation function respectively to obtain the probability tensor:
[0048] ;
[0049] ;
[0050] in, This represents the sigmoid activation function;
[0051] in , For the process The processed probability tensor;
[0052] Where D prob E represents prob Embedding dimension;
[0053] Where D asso E represents asso Embedding dimension;
[0054] After performing nonlinear transformations and multiplications on the hypergraph, the incidence matrix H of the adaptive hypergraph is obtained. hy ;
[0055] in .
[0056] Furthermore, step S2 also includes the following:
[0057] Step S22: By using the argtopk() function to control the frequency of each node appearing in the hypergraph, we obtain:
[0058] ;
[0059] ;
[0060] The argtopk() operation is used to select the most active vertices; idx represents the remaining indices; N represents the total number of vertices in the hypergraph.
[0061] A hypergraph attention network is used to reflect the non-binary transformation probability of precipitation phenomena shifting across different regions in precipitation forecasting; where the input X is correlated with the hypergraph's association matrix H. hy Used for calculating hypergraph attention, it is represented as:
[0062] ;
[0063] Where HA() represents hypergraph attention network computation;
[0064] in, , These are the degree matrices of the nodes and the degree matrices of the hypergraph edges, respectively.
[0065] Where h(v,e) i ) is node v and hyperedge e i The correlation function between them, w(e) i ) represents the superedge e i The weights;
[0066] Furthermore, The weight matrix representing the hypergraph attention mechanism is calculated using the following formula:
[0067] ;
[0068] Where, N i It is v i domain set, Calculate the pairwise similarity between two vertices, where 'a' is the weight vector used to output the scalar similarity value; X represents the learnable parameters of hypergraph attention, used for transforming and mapping features; ha This represents the output of the hypergraph attention module;
[0069] The final completion of a single hypergraph attention module is achieved by calculating X from the input X.ha The output of the hypergraph is processed by the C layer HyATN layer to obtain the final output X of the hypergraph attention network module. ha .
[0070] Furthermore, step S2 also includes the following:
[0071] Step S23: Embed the time in the encoder into E T With spatial embedding X ha After concatenation and processing by a perceptron model with a multi-layer fully connected structure, the output vector is obtained, which is denoted as X. enc Complete the encoding work of the encoder section;
[0072] Step S24: The decoder receives the context vector output by the encoder and generates an output sequence; the decoder is a multilayer perceptron with a two-layer fully connected structure; the decoder expression includes the following:
[0073] ;
[0074] in , This is the weight matrix;
[0075] Where D represents the size of the hidden layer dimension of the custom decoder;
[0076] in Indicates the target output dimension;
[0077] Among them , Bias vector, where the decoder does not have an activation function or a normalization layer.
[0078] Furthermore, step S2 also includes the following:
[0079] Step S25: Based on the spatial and temporal series prediction of the hypergraph G, and given the previous L observations, a parameterized model is established. The predicted future length is From the precipitation dynamics, the following results were obtained:
[0080] ;
[0081] in This represents a precipitation forecast sequence; the precipitation forecast sequence includes time and spatial dimensions; the time dimension reflects the temporal dynamics of precipitation changes; the spatial dimension reflects the spatial correlation and spatial heterogeneity between different regions.
[0082] Further, step S3 includes the following:
[0083] Step S31: Use a hybrid domain loss function to reflect the time and frequency domain information of the precipitation system, including the following:
[0084] ;
[0085] in , These represent the frequency domain loss and the time domain loss, respectively.
[0086] Where F() represents the Fourier transform;
[0087] Where n represents the size of a batch of data;
[0088] Where y i This represents the actual input value;
[0089] in This represents the model's predicted value for the input data;
[0090] in This represents the classic hybrid loss in the field of time-series data tasks.
[0091] Furthermore, step S3 also includes the following:
[0092] Step S32: Employing a spatiotemporal similarity playback mechanism to enable online dynamic adjustment of the online precipitation forecasting model, including the following:
[0093] Step S321: Define the seasonal sample storage pool M, including:
[0094] For a pre-defined seasonal sample storage pool of size |M|, assuming it randomly stores min(t, |M|) historical data samples from time 0 to t, it is guaranteed that all samples within the selectable range have the same probability of being selected, i.e., for any time t, we have ,in ,
[0095] in For the corresponding , , , Historical data at any given moment;
[0096] Step S322: Define spatiotemporal similarity samples, including selecting data X with respect to time t from a spatiotemporal similarity perspective. t The most similar rainfall sequence;
[0097] Step S323: Define time similarity samples. Search for the k historical samples with the highest time similarity in M as the sampling method, denoted as . ;
[0098] Step S324: Define spatial similarity samples, including rainfall sequences from the k regions with the largest training loss, denoted as:
[0099] , ;
[0100] Step S325: By training the index idl of the region with the largest loss and the historical index idm with the largest temporal similarity, the sample with the highest spatiotemporal similarity is obtained, i.e. These three represent the historical inputs, labels, and model predictions stored in M, respectively. The historical samples stored in M are all samples from which the model has generated predictions, and they also preserve the original labels and the model's predicted outputs. ;
[0101] The time similarity is: ;
[0102] in This represents the classic hybrid loss in the domain of time-series data tasks;
[0103] Where N represents the total number of vertices in the hypergraph;
[0104] in This represents the model prediction value obtained from the historical input data at the corresponding time point in the model's state;
[0105] in This indicates the calculation of cosine similarity.
[0106] in This represents the key matrix in the seasonal sample storage pool;
[0107] in This refers to samples in the seasonal sample storage pool.
[0108] Furthermore, step S3 also includes the following:
[0109] An online training mechanism based on hybrid domain dynamic replay; based on the historical samples with spatiotemporal similarity obtained in the previous step, an online training loss function based on the spatiotemporal similarity replay mechanism can be obtained, which is expressed as:
[0110] ;
[0111] in and To balance the importance of current data and historical data,
[0112] in Its purpose is to ensure that the model maintains alignment when predicting similar events. Records used for predicting results from existing data, ultimately adopted The function of enabling online precipitation forecasting models to maintain the stability of old data feature representations during the learning of new tasks and to adjust forecast results in a timely manner based on real labels;
[0113] in This represents the sequence of true values at time t;
[0114] in This represents the classic hybrid loss in the field of time-series data tasks.
[0115] This invention also proposes a system for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network. The system is constructed using the method described in any one of these inventions, and is characterized by including the following:
[0116] An adaptive hypergraph attention network module is configured to dynamically construct a hypergraph structure to simultaneously capture pairwise relationships and higher-order spatial interactions of precipitation processes.
[0117] The hybrid domain dynamic replay training module includes a hybrid domain loss calculation unit and a spatiotemporal similarity replay unit;
[0118] The time embedding module is configured to extract periodic features from time series.
[0119] The encoder and decoder architecture module, wherein the encoder consists of the temporal embedding module and the adaptive hypergraph attention network, and the decoder adopts a multilayer perceptron structure.
[0120] The present invention has the following advantages:
[0121] An adaptive hypergraph attention module (HyATN) is introduced to construct an adaptive probabilistic association hypergraph based on changes in input features to utilize spatial information. Compared to traditional pre-defined multi-scale trees for neighboring regions, the method of this invention can more flexibly characterize the connections between regions and, moving away from traditional pairwise low-order spatiotemporal interactions, can model higher-order spatiotemporal interactions under higher-order climate evolution patterns.
[0122] An online learning mechanism is introduced to manipulate the data stream. This mechanism leverages the potential periodicity of time-series data to some extent, retaining key representative data within the data silo and dynamically adjusting the retained samples based on future new samples to adapt to iteratively changing background climate characteristics. Compared to traditional end-to-end learning, the online prediction method used in this invention exhibits superior stability. Attached Figure Description
[0123] Figure 1 This is a flowchart of the steps of the present invention.
[0124] Figure 2 This is a schematic diagram of the model framework of the present invention.
[0125] Figure 3 This is a schematic diagram of the experimental results of the present invention. Figure 1 .
[0126] Figure 4 This is a schematic diagram of the experimental results of the present invention. Figure 2 . Detailed Implementation
[0127] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.
[0128] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0129] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments of the present invention; as used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise; furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0130] like Figures 1 to 4 As shown, this invention proposes a method and system for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network, characterized by the following:
[0131] This invention proposes a method for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network, characterized by the following:
[0132] Step S1: Establish the graph model of the hypergraph, including the adjacency matrix of the original graph and the incidence matrix of the hypergraph;
[0133] Step S2: Using the hypergraph neural network mechanism as the core, establish an online precipitation forecasting model based on the spatiotemporal dynamic hypergraph neural network; including using an encoder to receive temporal and spatial precipitation data; then using the encoder to splice the temporal and spatial sequences of precipitation data and inputting the spliced sequence into a multilayer perceptron with a fully connected structure; finally, the decoder uses the multilayer perceptron with a fully connected structure to output the prediction sequence.
[0134] The establishment of the encoder includes establishing a temporal embedding module for capturing meteorological elements and establishing a hypergraph attention network.
[0135] The establishment of the decoder includes the establishment of a multilayer perceptron with a fully connected structure;
[0136] Step S3: Establish an online learning mechanism, a seasonal sample storage pool, and an online training mechanism including a hybrid domain loss function and a spatiotemporal similarity replay mechanism to correct the output of the online precipitation forecast model.
[0137] Further, step S1 includes the following:
[0138] Step S11: Establish a graph model based on a hypergraph, including the following:
[0139] Define a hypergraph G(V, E, W);
[0140] The hyperedge connects multiple vertices, the correlation matrix, and reflects the higher-order connectivity characteristics of nodes, thus characterizing the complex spatial relationships between research units;
[0141] Where V represents the set of vertices of the hypergraph;
[0142] in, ;
[0143] Here, E represents the edge set of the hypergraph, and I represents the number of hyperedges, where each hyperedge connects more than two vertices.
[0144] Where R represents the real number space and N represents the total number of vertices in the hypergraph;
[0145] W is responsible for carrying the weight information of the hypergraph edges. In the hypergraph architecture, node signals are used to exchange and transmit information between some nodes through the hyperedges, which reflects the relationships between the nodes.
[0146] Step S12: Let the adjacency matrix of the original graph be:
[0147] ;
[0148] Where A represents the adjacency matrix of the original graph;
[0149] Let the incidence matrix of the hypergraph be:
[0150] ;
[0151] Where H represents the incidence matrix of the hypergraph; the incidence matrix H uses I hyperedges to represent the relationships between N nodes;
[0152] Step S13: At a specific time t in the time series, for the hypergraph, define the node signal matrix as follows:
[0153] ;
[0154] Where X is the current input data of the time module;
[0155] Where X t For node signal matrix;
[0156] Where F represents the feature dimension of each node at time t.
[0157] Further, step S2 includes the following:
[0158] Step S21: Transfer the data X at time t t The temporal embedding module and hypergraph attention network module of the parallel input encoder include the following:
[0159] Step S211: For the time embedding module, define a learnable monthly time period embedding dictionary J. t ,have:
[0160] ;
[0161] Where U represents the month, d e It is the size of the embedding dimension;
[0162] Furthermore, for X at a specific time point t The corresponding monthly time period data is recorded as follows:
[0163] ;
[0164] Wherein, P(X) represents converting the month field information attached to the data content itself into hard encoding consistent with the dimension of the embedded vector in the dictionary;
[0165] Furthermore, the monthly time period embedding E is extracted from the corresponding embedding dictionary. T ,get:
[0166] ;
[0167] ET stands for Seasonal Embedded Time Series, which is used to capture the changing patterns of weather elements over a monthly cycle, providing information input for precipitation forecasting models and improving the accuracy and reliability of forecasts.
[0168] Where J() represents the indexing operation on the dictionary; T represents the sequence length of the input sequence X;
[0169] Step S212:
[0170] Define space configuration probability embedding E prob This indicates the different connection probability tendencies with other nodes when constructing a hypergraph;
[0171] Define geographic association probability embedding E assoThis indicates that different node groups are combined to form a superedge from the level of higher-order meteorological connections.
[0172] Step S213: Input them into the sigmoid activation function respectively to obtain the probability tensor:
[0173] ;
[0174] ;
[0175] in, This represents the sigmoid activation function;
[0176] in , For the process The processed probability tensor;
[0177] Where D prob E represents prob Embedding dimension;
[0178] Where D asso E represents asso Embedding dimension;
[0179] After performing nonlinear transformations and multiplications on the hypergraph, the incidence matrix H of the adaptive hypergraph is obtained. hy ;
[0180] in .
[0181] Furthermore, step S2 also includes the following:
[0182] Step S22: By using the argtopk() function to control the frequency of each node appearing in the hypergraph, we obtain:
[0183] ;
[0184] ;
[0185] The argtopk() operation is used to select the most active vertices; idx represents the remaining indices; N represents the total number of vertices in the hypergraph.
[0186] A hypergraph attention network is used to reflect the non-binary transformation probability of precipitation phenomena shifting across different regions in precipitation forecasting; where the input X is correlated with the hypergraph's association matrix H. hy Used for calculating hypergraph attention, it is represented as:
[0187] ;
[0188] Where HA() represents hypergraph attention network computation;
[0189] in, , These are the degree matrices of the nodes and the degree matrices of the hypergraph edges, respectively.
[0190] Where h(v,e) i ) is node v and hyperedge e i The correlation function between them, w(e) i ) represents the superedge e i The weights;
[0191] Furthermore, The weight matrix representing the hypergraph attention mechanism is calculated using the following formula:
[0192] ;
[0193] Where, N i It is v i domain set, Calculate the pairwise similarity between two vertices, where 'a' is the weight vector used to output the scalar similarity value; X represents the learnable parameters of hypergraph attention, used for transforming and mapping features; ha This represents the output of the hypergraph attention module;
[0194] The final completion of a single hypergraph attention module is achieved by calculating X from the input X. ha The output of the hypergraph is processed by the C layer HyATN layer to obtain the final output X of the hypergraph attention network module. ha .
[0195] Furthermore, step S2 also includes the following:
[0196] Step S23: Embed the time in the encoder into E T With spatial embedding X ha After concatenation and processing by a perceptron model with a multi-layer fully connected structure, the output vector is obtained, which is denoted as X. enc Complete the encoding work of the encoder section;
[0197] Step S24: The decoder receives the context vector output by the encoder and generates an output sequence; the decoder is a multilayer perceptron with a two-layer fully connected structure; the decoder expression includes the following:
[0198] ;
[0199] in , This is the weight matrix;
[0200] Where D represents the size of the hidden layer dimension of the custom decoder;
[0201] in Indicates the target output dimension;
[0202] Among them , Bias vector, where the decoder does not have an activation function or a normalization layer.
[0203] Furthermore, step S2 also includes the following:
[0204] Step S25: Based on the spatial and temporal series prediction of the hypergraph G, and given the previous L observations, a parameterized model is established. The predicted future length is From the precipitation dynamics, the following results were obtained:
[0205] ;
[0206] in This represents a precipitation forecast sequence; the precipitation forecast sequence includes time and spatial dimensions; the time dimension reflects the temporal dynamics of precipitation changes; the spatial dimension reflects the spatial correlation and spatial heterogeneity between different regions.
[0207] Further, step S3 includes the following:
[0208] Step S31: Use a hybrid domain loss function to reflect the time and frequency domain information of the precipitation system, including the following:
[0209] ;
[0210] in , These represent the frequency domain loss and the time domain loss, respectively.
[0211] Where F() represents the Fourier transform;
[0212] Where n represents the size of a batch of data;
[0213] Where y i This represents the actual input value;
[0214] in This represents the model's predicted value for the input data;
[0215] in This represents the classic hybrid loss in the field of time-series data tasks.
[0216] Furthermore, step S3 also includes the following:
[0217] Step S32: Employing a spatiotemporal similarity playback mechanism to enable online dynamic adjustment of the online precipitation forecasting model, including the following:
[0218] Step S321: Define the seasonal sample storage pool M, including:
[0219] For a pre-defined seasonal sample storage pool of size |M|, assuming it randomly stores min(t, |M|) historical data samples from time 0 to t, it is guaranteed that all samples within the selectable range have the same probability of being selected, i.e., for any time t, we have ,in ,
[0220] in For the corresponding , , , Historical data at any given moment;
[0221] Step S322: Define spatiotemporal similarity samples, including selecting data X with respect to time t from a spatiotemporal similarity perspective. t The most similar rainfall sequence;
[0222] Step S323: Define time similarity samples. Search for the k historical samples with the highest time similarity in M as the sampling method, denoted as . ;
[0223] Step S324: Define spatial similarity samples, including rainfall sequences from the k regions with the largest training loss, denoted as...
[0224] , ;
[0225] Step S325: By training the index idl of the region with the largest loss and the historical index idm with the largest temporal similarity, the sample with the highest spatiotemporal similarity is obtained, i.e. These three represent the historical inputs, labels, and model predictions stored in M, respectively. The historical samples stored in M are all samples from which the model has generated predictions, and they also preserve the original labels and the model's predicted outputs. ;
[0226] The time similarity is: ;
[0227] in This represents the classic hybrid loss in the domain of time-series data tasks;
[0228] Where N represents the total number of vertices in the hypergraph;
[0229] in This represents the model prediction value obtained from the historical input data at the corresponding time point in the model's state;
[0230] in This indicates the calculation of cosine similarity.
[0231] in This represents the key matrix in the seasonal sample storage pool;
[0232] in This refers to samples in the seasonal sample storage pool.
[0233] Furthermore, step S3 also includes the following:
[0234] An online training mechanism based on hybrid domain dynamic replay; based on the historical samples with spatiotemporal similarity obtained in the previous step, an online training loss function based on the spatiotemporal similarity replay mechanism can be obtained, which is expressed as:
[0235] ;
[0236] in and To balance the importance of current data and historical data,
[0237] in Its purpose is to ensure that the model maintains alignment when predicting similar events. Records used for predicting results from existing data, ultimately adopted The function of enabling online precipitation forecasting models to maintain the stability of old data feature representations during the learning of new tasks and to adjust forecast results in a timely manner based on real labels;
[0238] in This represents the sequence of true values at time t;
[0239] in This represents the classic hybrid loss in the field of time-series data tasks.
[0240] This invention also proposes a system for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network. The system is constructed using the method described in any one of these inventions, and is characterized by including the following:
[0241] An adaptive hypergraph attention network module is configured to dynamically construct a hypergraph structure to simultaneously capture pairwise relationships and higher-order spatial interactions of precipitation processes.
[0242] The hybrid domain dynamic replay training module includes a hybrid domain loss calculation unit and a spatiotemporal similarity replay unit;
[0243] The time embedding module is configured to extract periodic features from time series.
[0244] The encoder and decoder architecture module, wherein the encoder consists of the temporal embedding module and the adaptive hypergraph attention network, and the decoder adopts a multilayer perceptron structure.
[0245] In addition to the above, the present invention also has related embodiments, including the following:
[0246] In this invention, mean squared error (MSE) and mean absolute error (MAE) are used to evaluate the predictive performance of the proposed model and the baseline model.
[0247] In this invention, STDHGNN is used to represent the spatiotemporal dynamic hypergraph neural network and its experimental data.
[0248] In this invention, to demonstrate the collaborative prediction capability of the prediction model, online learning experiments were conducted under three different settings:
[0249] (1) Make daily forecasts for the next 7 days: that is, predict the daily precipitation dynamics for the next week.
[0250] (2) Make daily forecasts for the next 14 days: that is, predict the daily precipitation dynamics for the next two weeks.
[0251] (3) Make daily forecasts for the next 30 days: that is, predict the daily precipitation dynamics for the next month.
[0252] This invention compares the proposed model with eight baseline models, including three time series forecasting models, three weather forecasting models, and two space-time forecasting models. The baseline method is described below:
[0253] Time series forecasting models include the following:
[0254] DLinear: A single-layer linear model decomposed by moving average, which exhibits better performance than Transformer-based models.
[0255] The TimesNet model extends one-dimensional time series data to a two-dimensional space for analysis and employs independent variable modeling, effectively addressing various tasks in time series analysis.
[0256] Model iTransformer: A state-of-the-art architecture achieved by inverting the traditional Transformer, encoding each variable as an independent label, using a self-attention mechanism to model cross-correlation, and using a feedforward network to model temporal correlation.
[0257] Weather forecasting models include the following:
[0258] Autoformer: A Transformer model for long-term time series forecasting based on a deep decomposition architecture and autocorrelation mechanism. It can efficiently aggregate time patterns and provide minute-level real-time rolling weather forecast services, including wind speed and temperature.
[0259] The Corrformer model is a model focused on global weather co-forecasting that can generate high-confidence interpretable predictions for multiple scales, including global, regional, and urban scales. It features a novel multi-correlation mechanism that unifies spatial cross-correlation and temporal autocorrelation into a learned multi-scale tree structure to capture global spatiotemporal correlations.
[0260] ConvLSTM is a deep learning method for precipitation nowcasting. It formalizes the precipitation nowcasting problem as a space-time series prediction problem and extends the fully connected LSTM with convolutional structures in the input-to-state and state-to-state transitions, thereby better capturing the spatiotemporal correlations in the spatiotemporal series. This results in superior performance compared to traditional methods for precipitation nowcasting. The space-time series prediction model includes the following:
[0261] MTGNN: A framework designed specifically for multivariate time series forecasting that adaptively extracts directional relationships between variables through graph learning.
[0262] STID: A model based on a simple multilayer perceptron that achieves optimal performance and efficiency, designed to improve the indistinguishability of samples in both spatial and temporal dimensions.
[0263] Table 1 shows the prediction results of STDHGNN and various baseline models in different regions after online learning, including the following:
[0264] Table 1. Prediction results of STDHGNN and various baseline models in different regions after online learning.
[0265]
[0266] From Table 1, we can see that:
[0267] (1) STDHGNN significantly outperforms the baseline model in prediction performance under various settings.
[0268] (2) Spatial-temporal series prediction models also exhibit good performance. These methods can effectively learn the spatiotemporal distribution patterns of large-scale rainfall. However, since these models are not specifically designed for the dynamic characteristics of time series changes, they are difficult to flexibly respond to sudden rainfall events, resulting in a high MSE in most cases.
[0269] (3) Time series prediction models, especially the iTransformer method with spatial feature modeling capabilities.
[0270] They exhibited relatively good predictive performance. However, models like DLinear and TimesNet, which are based on channel-independent design, suffer from performance bottlenecks because they cannot accurately capture the interaction relationships between spatial elements.
[0271] (4) Weather forecast models can maintain relatively stable prediction performance under most setting conditions. However, for ConvLSTM, although it is specifically designed for the spatial features of radar images, due to the fixed convolution kernel, it is difficult to fully capture the complex spatial heterogeneity features when facing situations with complex spatial distribution and significant feature differences. In addition, the multi-scale spatial correlation design adopted by Corrformer is prone to computational redundancy in sparse feature scenarios, resulting in a decline in model performance.
[0272] Figure 3 The image shows the average prediction error variation during online learning for each prediction year (region A, prediction length 30). It can be observed that spatial-time series prediction models, time series prediction models, and weather forecasting models all exhibit similarly large error variations due to their difficulty in adapting to the significant temporal and spatial distribution differences between samples. However, STDHGNN, due to the introduction of HDDR, effectively mitigates the problems that may arise when the input stream undergoes sudden changes in distribution, better adapts to nonlinear temporal characteristics, and converges to a more stable error in the later stages of training.
[0273] Figure 4 The image shows precipitation forecasts 30 days in advance from different baseline models. It can be observed that STDHGNN exhibits a numerical distribution more similar to the actual values.
[0274] The above are preferred embodiments of the present invention. Any changes made to the technical solution of the present invention that do not exceed the scope of the technical solution of the present invention shall fall within the protection scope of the present invention.
Claims
1. A method for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network, characterized in that, Includes the following: Step S1: Establish the graph model of the hypergraph, including the adjacency matrix of the original graph and the incidence matrix of the hypergraph; Step S2: Using the hypergraph neural network mechanism as the core, establish an online precipitation forecasting model based on the spatiotemporal dynamic hypergraph neural network; including using an encoder to receive temporal and spatial precipitation data; then using the encoder to splice the temporal and spatial sequences of precipitation data and inputting the spliced sequence into a multilayer perceptron with a fully connected structure; finally, the decoder uses the multilayer perceptron with a fully connected structure to output the prediction sequence. The establishment of the encoder includes establishing a temporal embedding module for capturing meteorological elements and establishing a hypergraph attention network. The establishment of the decoder includes the establishment of a multilayer perceptron with a fully connected structure; Step S3: Establish an online learning mechanism, a seasonal sample storage pool, and an online training mechanism including a hybrid domain loss function and a spatiotemporal similarity replay mechanism to correct the output of the online precipitation forecast model; Step S3 includes the following: Step S31: Use a hybrid domain loss function to reflect the time and frequency domain information of the precipitation system, including the following: ; in , These represent the frequency domain loss and the time domain loss, respectively. Where F() represents the Fourier transform; Where n represents the size of a batch of data; Where y i This represents the actual input value; in This represents the model's predicted value for the input data; in This represents the classic hybrid loss in the domain of time-series data tasks; Step S32: Employing a spatiotemporal similarity playback mechanism to enable online dynamic adjustment of the online precipitation forecasting model, including the following: Step S321: Define the seasonal sample storage pool M, including: For a pre-defined seasonal sample storage pool of size |M|, assuming it randomly stores min(t, |M|) historical data samples from time 0 to t, it is guaranteed that all samples within the selectable range have the same probability of being selected, i.e., for any time t, we have ,in , in For the corresponding , , , Historical data at any given moment; Step S322: Define spatiotemporal similarity samples, including selecting data X with respect to time t from a spatiotemporal similarity perspective. t The most similar rainfall sequence; Step S323: Define time similarity samples. Search for the k historical samples with the highest time similarity in M as the sampling method, denoted as . ; Step S324: Define spatial similarity samples, including rainfall sequences from the k regions with the largest training loss, denoted as... , ; Step S325: By training the index idl of the region with the largest loss and the historical index idm with the largest temporal similarity, the sample with the highest spatiotemporal similarity is obtained, i.e. These three represent the historical inputs, labels, and model predictions stored in M, respectively. The historical samples stored in M are all samples from which the model has generated predictions, and they also preserve the original labels and the model's predicted outputs. ; The time similarity is: ; in This represents the classic hybrid loss in the domain of time-series data tasks; Where N represents the total number of vertices in the hypergraph; in This represents the model prediction value obtained from the historical input data at the corresponding time point in the model's state; in This indicates the calculation of cosine similarity. in This represents the key matrix in the seasonal sample storage pool; in This refers to samples in the seasonal sample storage pool.
2. The method for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network according to claim 1, characterized in that, Step S1 includes the following: Step S11: Establish a graph model based on a hypergraph, including the following: Define a hypergraph G(V, E, W); The hyperedge connects multiple vertices, the correlation matrix, and reflects the higher-order connectivity characteristics of nodes, thus characterizing the complex spatial relationships between research units; Where V represents the set of vertices of the hypergraph; in, ; Here, E represents the edge set of the hypergraph, and I represents the number of hyperedges, where each hyperedge connects more than two vertices. Where R represents the real number space and N represents the total number of vertices in the hypergraph; W is responsible for carrying the weight information of the hypergraph edges. In the hypergraph architecture, node signals are used to exchange and transmit information between some nodes through the hyperedges, which reflects the relationships between the nodes. Step S12: Let the adjacency matrix of the original graph be: ; Where A represents the adjacency matrix of the original graph; Let the incidence matrix of the hypergraph be: ; Where H represents the incidence matrix of the hypergraph; the incidence matrix H uses I hyperedges to represent the relationships between N nodes; Step S13: At a specific time t in the time series, for the hypergraph, define the node signal matrix as follows: ; Where X is the current input data of the time module; Where X t For node signal matrix; Where F represents the feature dimension of each node at time t.
3. The method for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network according to claim 2, characterized in that, Step S2 includes the following: Step S21: Transfer the data X at time t t The temporal embedding module and hypergraph attention network module of the parallel input encoder include the following: Step S211: For the time embedding module, define a learnable monthly time period embedding dictionary J. t ,have: ; Where U represents the month, d e It is the size of the embedding dimension; Furthermore, for X at a specific time point t The corresponding monthly time period data is recorded as follows: ; Wherein, P(X) represents converting the month field information attached to the data content itself into hard encoding consistent with the dimension of the embedded vector in the dictionary; Furthermore, the monthly time period embedding E is extracted from the corresponding embedding dictionary. T ,get: ; E T This indicates that seasonal embedded time series are used to capture the changing patterns of weather elements over a monthly cycle, providing information input for precipitation forecasting models and improving the accuracy and reliability of forecasts. Where J() represents the indexing operation on the dictionary; T represents the sequence length of the input sequence X; Step S212: Define space configuration probability embedding E prob This indicates the different connection probability tendencies with other nodes when constructing a hypergraph; Define geographic association probability embedding E asso This indicates that different node groups are combined to form a superedge from the level of higher-order meteorological connections. Step S213: Input them into the sigmoid activation function respectively to obtain the probability tensor: ; ; in, This represents the sigmoid activation function; in , For the process The processed probability tensor; Where D prob E represents prob Embedding dimension; Where D asso E represents asso Embedding dimension; After performing nonlinear transformations and multiplications on the hypergraph, the incidence matrix H of the adaptive hypergraph is obtained. hy ; in .
4. The method for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network according to claim 3, characterized in that, Step S2 also includes the following: Step S22: By using the argtopk() function to control the frequency of each node appearing in the hypergraph, we obtain: ; ; The argtopk() operation is used to select the most active vertices; idx represents the remaining indices; N represents the total number of vertices in the hypergraph. A hypergraph attention network is used to reflect the non-binary transformation probability of precipitation phenomena shifting across different regions in precipitation forecasting; where the input X is correlated with the hypergraph's association matrix H. hy Used for calculating hypergraph attention, it is represented as: ; Where HA() represents hypergraph attention network computation; in, , These are the degree matrices of the nodes and the degree matrices of the hypergraph edges, respectively. Where h(v,e) i ) is node v and hyperedge e i The correlation function between them, w(e) i ) represents the superedge e i The weights; Furthermore, The weight matrix representing the hypergraph attention mechanism is calculated using the following formula: ; Where, N i It is V i domain set, Calculate the pairwise similarity between two vertices, where 'a' is the weight vector used to output the scalar similarity value; X represents the learnable parameters of hypergraph attention, used for transforming and mapping features; ha This represents the output of the hypergraph attention module; The final completion of a single hypergraph attention module is achieved by calculating X from the input X. ha The output of the hypergraph is processed by the C layer HyATN layer to obtain the final output X of the hypergraph attention network module. ha .
5. The method for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network according to claim 4, characterized in that, Step S2 also includes the following: Step S23: Embed the time in the encoder into E T With spatial embedding X ha After concatenation and processing by a perceptron model with a multi-layer fully connected structure, the output vector is obtained, which is denoted as X. enc Complete the encoding work of the encoder section; Step S24: The decoder receives the context vector output by the encoder and generates an output sequence; The decoder is a multilayer perceptron with a two-layer fully connected structure. The decoder expression includes the following: ; in , This is the weight matrix; Where D represents the size of the hidden layer dimension of the custom decoder; in Indicates the target output dimension; Among them , Bias vector, where the decoder does not have an activation function or a normalization layer.
6. The method for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network according to claim 5, characterized in that, Step S2 also includes the following: Step S25: Based on the spatial and temporal series prediction of the hypergraph G, and given the previous L observations, a parameterized model is established. The predicted future length is From the precipitation dynamics, the following results were obtained: ; in This represents a precipitation forecast sequence; the precipitation forecast sequence includes time and spatial dimensions; the time dimension reflects the temporal dynamics of precipitation changes; the spatial dimension reflects the spatial correlation and spatial heterogeneity between different regions.
7. The method for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network according to claim 6, characterized in that, Step S3 also Includes the following: An online training mechanism based on hybrid domain dynamic replay; based on the historical samples with spatiotemporal similarity obtained in the previous step, an online training loss function based on the spatiotemporal similarity replay mechanism can be obtained, which is expressed as: ; in and To balance the importance of current data and historical data, Its purpose is to ensure that the model maintains alignment when predicting similar events. Records used for predicting results from existing data, ultimately adopted The function of enabling online precipitation forecasting models to maintain the stability of old data feature representations during the learning of new tasks and to adjust forecast results in a timely manner based on real labels; in This represents the sequence of true values at time t; in This represents the classic hybrid loss in the field of time-series data tasks.
8. A system for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network, wherein the model is constructed using the method for constructing an online precipitation forecasting model based on a spatiotemporal dynamic hypergraph neural network as described in any one of claims 1 to 7, characterized in that, Includes the following: An adaptive hypergraph attention network module is configured to dynamically construct a hypergraph structure to simultaneously capture pairwise relationships and higher-order spatial interactions of precipitation processes. The hybrid domain dynamic replay training module includes a hybrid domain loss calculation unit and a spatiotemporal similarity replay unit; The time embedding module is configured to extract periodic features from time series. The encoder and decoder architecture module, wherein the encoder consists of the temporal embedding module and the adaptive hypergraph attention network, and the decoder adopts a multilayer perceptron structure.