Hydrological flow prediction method and system based on multi-station space-time correlation

Through the collaborative innovation of autoencoder, multivariate dynamic time regularization and improved graph convolution network and Autoformer model, accurate extraction and dynamic correlation modeling of spatiotemporal characteristics of multi-site hydrological data is achieved, and the accuracy and stability of hydrological flow prediction is improved, and it is suitable for water resource management and flood control and disaster reduction.

CN120450119APending Publication Date: 2025-08-08WUHAN POLYTECHNIC UNIVERSITY

Patent Information

Application Number
CN202510534534.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Existing hydrological flow prediction technologies are difficult to effectively utilize multi-site information, ignore the spatial correlation between sites, are difficult to capture complex space-time dependencies, and are insufficient in modeling of long-term trends and periodicity, resulting in limited prediction accuracy.

Method used

The autoencoder is used to perform dimensionality reduction and feature reconstruction, and a dynamic adjacency matrix is constructed in combination with the multivariate dynamic time regularization algorithm. The improved graph convolution network is used to extract spatial features, and the adaptive time series decomposition is performed through the Autoformer model, the trend term and period term are separated, and the prediction results are finally generated through multi-stage fusion.

Benefits of technology

It significantly improves the accuracy and robustness of single-site traffic prediction, especially in complex hydrological cycle scenarios such as aquatic and dry periods, and solves the problems of insufficient spatial and temporal correlation modeling of multi-sites, difficulty in alignment of nonlinear time series, and insufficient long-term trend-periodic modeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120450119A_ABST
    Figure CN120450119A_ABST
Patent Text Reader

Abstract

The invention relates to a hydrological flow prediction method and system based on multi-site time-space association. The prediction method comprises the following steps: carrying out dimension reduction and feature reconstruction on original multi-site hydrological data through an auto-encoder; space-time correlation modeling and adjacency matrix dynamic construction are carried out, a multi-dimensional Euclidean distance matrix between stations is calculated based on a multivariable dynamic time warping (MDTW) algorithm, a similarity matrix is generated in combination with dynamic programming, and a dynamic adjacency matrix is constructed by fusing a geographic space adjacency relation; extracting spatial features of a GCN (Graphics Convolutional Network); carrying out adaptive time sequence decomposition and trend-period modeling; and carrying out multi-stage fusion prediction and result output, and generating a final prediction result through a decoder in combination with the decomposed trend item and periodic item. According to the method, accurate extraction and dynamic correlation modeling of spatial-temporal characteristics of multi-site hydrological data are realized, the accuracy and robustness of single-site flow prediction are improved, and the problems that multi-site spatial-temporal correlation modeling is insufficient, non-linear time sequence alignment is difficult, and single-site prediction precision is limited are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of hydrological forecasting technology, and more particularly to a method for hydrological flow prediction based on spatiotemporal correlation among multiple sites. The present invention also relates to a system for implementing this method. The present invention can be applied to fields such as flow prediction at hydrological sites, water resource scheduling and management, and flood prevention and disaster reduction. Background Art

[0002] Accurate hydrological flow prediction is crucial for water resources management and flood prevention and disaster reduction. Traditional hydrological forecasting methods are mainly based on physical models or statistical models. Physical models are based on the physical mechanisms of hydrological processes and establish complex mathematical models. Such models require detailed hydrological, meteorological, geographical and other data, and the calibration of model parameters is difficult. The computational complexity is high, and their application is limited in data-scarce areas. Statistical models such as the autoregressive moving average model (ARMA) and support vector machine (SVM) establish prediction models by analyzing historical data. Such models are simple and easy to use, but they have difficulty capturing the nonlinear and non-stationary characteristics of hydrological processes and do not consider the spatial correlation between multiple sites.

[0003] In recent years, deep learning techniques have been widely used in the field of hydrological forecasting. Some studies have utilized models such as recurrent neural networks (RNNs) and long short-term memory networks (LSTMs) to process hydrological time series data, achieving promising results. However, these methods still have the following shortcomings: First, they fail to fully utilize multi-site information. Existing methods mostly model based on single-site data, ignoring the spatial correlations between sites. Hydrological processes are influenced by multiple sites within a basin, and utilizing multi-site information can improve forecast accuracy. Second, they struggle to capture complex spatiotemporal dependencies. Hydrological processes have complex spatiotemporal dependencies, and models such as RNNs and LSTMs primarily focus on the temporal dimension, making it difficult to effectively capture spatial dependencies. Finally, they inadequately model long-term trends and periodicity. Hydrological time series typically exhibit significant long-term trends and periodicity, and existing methods have limited ability to model these features, impacting the accuracy of long-term forecasts.

[0004] To address these issues, some researchers have proposed methods based on graph convolutional networks (GCNs). These methods leverage the spatial relationships between sites to construct a graph structure and capture spatial dependencies through graph convolution operations. However, most of these methods rely on fixed graph structures and struggle to reflect the dynamic spatiotemporal relationships between sites. Furthermore, existing methods lack effective modeling of long-term trends and periodicity in time series. Therefore, there is an urgent need for a hydrological flow prediction method that can effectively utilize multi-site information, capture complex spatiotemporal dependencies, and model long-term trends and periodicity.

[0005] Related patent document: CN119129794A discloses a medium- to long-term flood forecasting method, apparatus, equipment, medium, and product. The method includes: first, obtaining time-series data on river flow and climate factors; then, extracting sample data from these data to train a Transformer model to obtain a maximum river flow prediction model within a segment, and using the Transformer model's self-attention mechanism to capture long-range dependencies in the time series; finally, inputting the model into the model into the model's flow and climate factor data for multiple recent time periods for the target river segment, and predicting the maximum flow in future time periods as the medium- to long-term flood forecast result. This technology primarily focuses on long-range dependencies in time series, but does not fully extract and utilize spatial correlations, spatiotemporal dynamic correlations, long-term trends, and periodic characteristics between multiple sites.

[0006] Related patent document: CN118841940A discloses a method and device for predicting the daily power generation capacity of a hydropower station. The method includes: first, obtaining and preprocessing the hydropower station's historical power generation capacity data, reservoir water level data, inflow data, etc.; then, constructing a prediction model based on a long short-term memory network (LSTM) and inputting the preprocessed data into the model for training; during the prediction phase, the method also introduces a real-time correction mechanism, using the latest observation data to correct the prediction results to improve prediction accuracy. This technology focuses primarily on time series prediction of hydropower station power generation capacity, but does not provide in-depth modeling of the spatial correlation between multi-site hydrological and meteorological factors that affect power generation capacity, nor does it provide in-depth modeling of the long-term trends and cyclical characteristics present in hydrological time series.

[0007] Related patent document: CN118261285A discloses an intelligent flow prediction method and system for information-deficient basins, wherein the method includes: using the Transformer model as the basic model, training it in a source basin with sufficient data, and constructing a source basin model; the model performs feature projection embedding at the multi-layer perceptron (MLP), and after encoder processing, improves the model's ability to learn hydrological feature time series information in the attention module, and generates prediction results for the source basin through the decoder; then, based on the source basin model, flow prediction is performed for the target basin with scarce information, and the prediction results are optimized based on the similarity between the source basin and the target basin, combined with the pre-trained parameters of the source basin model. This technology mainly utilizes the ideas of the Transformer model and transfer learning. When calculating the similarity between the source basin and the target basin, relying solely on the cosine similarity of the attention vector may not fully reflect the complex similarities between the basins.

[0008] Related patent document: CN118277919A discloses a flood simulation method and system based on dynamic parameters and physical deep learning. The method includes: first, training a Transformer model using the classification parameters and preset hydrological parameters of a known basin to obtain a dynamic parameter model of the known basin; then, fixing the attention layer and feedforward neural network layer of the known basin dynamic parameter model to obtain a fixed dynamic parameter model of the known basin; then, training the fixed dynamic parameter model of the known basin using the target basin parameters and preset hydrological parameters to obtain a target basin dynamic parameter model; finally, inputting the target basin parameters and preset hydrological parameters into the target basin dynamic parameter model to obtain flood prediction results for the target basin. Although this technology combines hydrophysical mechanisms with deep learning and uses transfer learning to address data scarcity, its hydrological model is relatively simple and only considers subsurface flow and saturated slope runoff, ignoring more comprehensive hydrological processes, which may limit its applicability in complex basins. Summary of the Invention

[0009] The purpose of the present invention is to provide a hydrological flow prediction method based on multi-site spatiotemporal correlation. The method can realize the accurate extraction and dynamic correlation modeling of the spatiotemporal characteristics of multi-site hydrological data, thereby improving the accuracy and robustness of single-site flow prediction, especially in complex hydrological cycle scenarios such as flood season and dry season, so as to solve the problems of insufficient multi-site spatiotemporal correlation modeling, difficulty in nonlinear time series alignment, insufficient long-term trend-periodicity modeling, and limited single-site prediction accuracy in existing hydrological flow prediction technology.

[0010] In order to solve the above technical problems, the technical solutions adopted by the present invention are as follows:

[0011] A hydrological flow prediction method based on multi-station spatiotemporal correlation (or a hydrological flow prediction method based on multi-station spatiotemporal graph convolution and autocorrelation decomposition) includes the following steps:

[0012] S1: Multi-site hydrological data preprocessing and feature learning: Using autoencoders to reduce the dimensionality and reconstruct features of the original multi-site hydrological data (including flow, rainfall, and other features), extract low-dimensional potential feature representations, that is, using autoencoders to reduce the dimensionality and reconstruct features of multi-site hydrological data, eliminate noise, and extract low-dimensional spatiotemporal features. Specifically, it includes: mapping high-dimensional input data (such as the time series feature matrix of N sites) to a low-dimensional space, using the encoder-decoder structure to minimize the reconstruction error, eliminate noise and redundant information, retain the intrinsic spatiotemporal correlation characteristics of the data, and provide high-quality input for subsequent spatiotemporal modeling;

[0013] S2: Spatiotemporal correlation modeling and dynamic adjacency matrix construction. Based on the Multivariate Dynamic Time Warping (MDTW) algorithm, nonlinear alignment and similarity measurement are performed on multi-site time series. By calculating the multidimensional Euclidean distance matrix between sites and combining dynamic programming to search for the optimal matching path, a similarity matrix reflecting spatiotemporal correlation is generated. The geospatial adjacency relationship is further integrated with the Multivariate Dynamic Time Warping (MDTW) similarity to construct a dynamic adjacency matrix to quantify the spatiotemporal coupling strength between sites, providing dynamic topological structure input for the graph convolutional network.

[0014] S3: Graph Convolutional Network (GCN) spatial feature extraction. Using the improved spatiotemporal graph convolutional network (ST-GCN), combined with a dynamic adjacency matrix and low-dimensional feature representation, we hierarchically extract spatial correlation features between sites. The first-layer GCN captures local spatial dependencies by propagating and aggregating node features. The second-layer GCN further integrates global spatial information and outputs spatial feature representations that include multi-site collaborative relationships. This addresses the limitations of traditional GCNs, which ignore temporal dynamics and nonlinear alignment.

[0015] S4: Adaptive time series decomposition and trend-cycle modeling. The spatial features output by ST-GCN are fed into the Autoformer model, and the sequence decomposition unit is used to separate the trend and cycle terms of the time series. An autocorrelation mechanism is used to replace the traditional self-attention mechanism. Periodic dependencies are extracted based on the Fast Fourier Transform (FFT), and long-term trends are modeled through a weighted accumulation mechanism. Specifically, similar subsequence information is dynamically aggregated, and the trend term is gradually modeled through weighted accumulation to achieve decoupled prediction of trend and cycle, improving the time series modeling capabilities of complex hydrological scenarios.

[0016] S5: Multi-stage fusion prediction and result output, combining the decomposed trend and cycle terms, and generating the final prediction results through a decoder. Specifically, this involves inputting the historical cycle term and trend term into the autocorrelation module and feedforward network, respectively, predicting the cyclical fluctuations and long-term trends for future periods, and then outputting the single-site flow forecast after superposition. Through multi-stage feature fusion and spatiotemporal collaborative optimization, the ability to capture peak values during the flood season and the stability of the dry season cycles are significantly improved. Model A is constructed through steps S1 to S5 above.

[0017] In the technical solution of the present invention, model A can effectively capture the spatiotemporal characteristics of hydrological flow data. Through the integration of multiple advanced technologies, especially in the case of complex spatiotemporal correlation modeling of multi-site data, it can provide more accurate and stable hydrological flow prediction results.

[0018] In the above technical solution, a preferred technical solution may also be that step S1 specifically includes:

[0019] S1.1: Input data standardization and dimension definition, input multi-site hydrological data matrix Where N is the number of stations, F is the characteristic dimension (such as flow, rainfall, etc.), and T is the time step. The data is normalized to eliminate dimensional differences. The formula is:

[0020] Among them, μ i,j and σ i,j are the mean and standard deviation of the jth feature at the i-th site, respectively;

[0021] S1.2: Autoencoder encoding process, through the encoder function f enc Mapping the input data to a low-dimensional latent space is as follows:

[0022] Z=f enc (X;θ enc ),in, is a low-dimensional feature representation (d<<F), θ enc is the encoder parameter. The encoder uses a two-layer fully connected network with the following structure:

[0023] H1=ReLU(XW1+b1),Z=H1W2+b2,

[0024] in,

[0025] S1.3: Decoding and reconstruction of the autoencoder, through the decoder function f dec Reconstruct the original data, the formula is:

[0026]

[0027] The decoder uses a symmetrical two-layer fully connected network with the following structure:

[0028]

[0029] in,

[0030] S1.4: Reconstruction error optimization and feature output

[0031] The autoencoder is trained with mean square error (MSE) as the loss function, and the formula is:

[0032] Optimize the parameters θ through backpropagation enc and θ dec , and finally outputs low-dimensional features Z, retaining the spatiotemporal correlation of the data and removing noise.

[0033] In the above technical solution, a preferred technical solution may also be that step S2 specifically includes:

[0034] S2.1: Calculate the Euclidean distance matrix of multivariate time series, for multi-site time series data (F is the feature dimension, T is the time step), calculate the multidimensional Euclidean distance matrix between site i and j The formula is:

[0035]

[0036] in, and are the k-th dimension eigenvalues of sites i and j at time t1 and t2, respectively;

[0037] S2.2: Dynamic Time Warping (MDTW) path search based on the distance matrix D i,j , the optimal matching path is calculated through dynamic programming, the formula is as follows:

[0038] Initialization formula: Γ(1,1)=D i,j (1,1), boundary condition formula:

[0039] Γ(t1,1)=Γ(t1-1,1)+D i,j (t1,1),Γ(1,t2)=Γ(1,t2-1)+D i,j (1,t2),

[0040] Recursive calculation formula:

[0041] Γ(t1,t2)=D i,j (t1, t2) + min{Γ(t1-1, t2), Γ(t1, t2-1), Γ(t1-1, t2-1)}, and finally obtain the minimum cumulative distance Γ(T, T), and backtrack the path to generate the alignment relationship between sites;

[0042] S2.3: Similarity matrix and dynamic adjacency matrix construction, first perform similarity conversion, convert the cumulative distance Γ(T,T) into a similarity score S i,j , that is, generating a dynamic adjacency matrix and converting the multivariate dynamic time warping MDTW cumulative distance into a similarity score. The formula is:

[0043] Among them, α is the time window weight parameter, the default value is 0.5, and then the adjacency matrix is fused and combined with the original geographic adjacency matrix A geo (0-1 binary matrix) and MDTW similarity matrix S, dynamic adjacency matrix A dynamic Defined as:

[0044] A dynamic =β·A geo +(1-β)·S, where β is a balancing factor with a default value of 0.3, which controls the contribution of spatial adjacency and temporal similarity.

[0045] In the above technical solution, a preferred technical solution may also be that step S3 specifically includes:

[0046] S3.1: The first layer of GCN local spatial dependency modeling, based on the dynamic adjacency matrix A dynamic (from step S2.3) and low-dimensional features The first layer of GCN extracts local spatial features through adjacency matrix normalization and feature propagation. The calculation formula of the normalized adjacency matrix is:

[0047] Where D is the degree matrix, I is the identity matrix, and the characteristic propagation formula is:

[0048] in, is a learnable weight matrix, output

[0049] S3.2: Second-layer GCN global spatial feature fusion. The second-layer GCN further aggregates global spatial information. The formula is:

[0050] in, is the weight matrix, F is the final output feature dimension, and the output

[0051] S3.3: Residual connection and feature output, the GCN output is residually connected with the original low-dimensional feature Z to enhance information transfer, that is, the feature transfer is enhanced through the residual connection, and the spatial feature is output. The formula is: G = H (2) +Z, final output spatial features Contains spatial dependency information of multi-site collaborative relationships.

[0052] In the above technical solution, a preferred technical solution may also be that step S4 specifically includes:

[0053] S4.1: Spatial feature input and sequence decomposition, the spatial features output by ST-GCN Input the Autoformer model and separate it into trend terms g through the Series Decomp Block trend and the periodic term g season , the formula is:

[0054] g season =G-MovingAvg(G,ω),

[0055] g trend =MovingAvg(G,ω), where ω is the sliding window length, which is set to 25 by default. The sliding average function MovingAvg(·) is defined as:

[0056]

[0057] S4.2: Modeling the autocorrelation mechanism and periodic term, and the periodic term g season Applying the autocorrelation mechanism, the periodic dependency is extracted through the Fast Fourier Transform (FFT). First, the key, query, and value generation are performed. The formula is defined as follows:

[0058] Q = g season W Q ,K=g season W K ,V=g season W V ,

[0059] Among them, W Q , W K , W V is a learnable weight matrix; secondly, autocorrelation calculation is performed to calculate the periodic term g season Perform fast Fourier transform (FFT) to obtain the frequency domain representation G(f), the formula is as follows: G(f) = FFT(g season ), where G(f) is the periodic term g season The frequency domain representation of the signal, f is the frequency, and the frequency domain representation obtained by FFT can be used to calculate the autocorrelation coefficient of the signal. The autocorrelation coefficient R(k) can be calculated by the square of the amplitude in the frequency domain, and the autocorrelation sequence in the time domain is obtained by applying the inverse Fourier transform (IFFT). The specific formula is:

[0060] R(k)=IFFT(|G(f)| 2 ), where |G(f)| 2 Represents the frequency domain amplitude square of the signal. Based on the calculated autocorrelation coefficient R(k), the top k subsequences with the strongest periodicity can be selected. These subsequences represent the most representative periodic patterns in the periodic signal. The formula for selecting the top-k correlated subsequences is:

[0061] Top-k Subsequence = argsort(R(k))[:k], where argsort(R(k)) means sorting the autocorrelation coefficient sequence R(k), selecting the top k strongest correlations, and finally aggregating the information of the selected Top-k related subsequences to predict the period term. The formula is: Among them, V i is the value of the i-th subsequence.

[0062] S4.3: Weight accumulation and trend term modeling for trend term g trendThe weight accumulation mechanism is used to gradually model the long-term change law, in which the latent variable generation maps the trend term to the latent variable h through the fully connected network. trend , the formula is:

[0063] h trend =ReLU(g trend W h +b h ), weight accumulation prediction generates future trend items by layer-by-layer weight accumulation The formula is: Among them, α l is the learnable weight coefficient, L is the number of accumulation layers, and the default is 2 layers;

[0064] S4.4: Trend-cycle fusion and final forecast, the predicted cycle items and trend items Superposition to generate the final prediction result:

[0065] The output is further adjusted through the decoder's feedforward network, and the formula is:

[0066] In the above technical solution, a preferred technical solution may also be that step S5 specifically includes:

[0067] S5.1: Decoder input construction and periodic term prediction Convert the periodic term output by the Autoformer encoder to Input the decoder, combine the historical cycle information with the position code to generate future predictions. The decoder input formula is:

[0068] D season =Concat(g season ,0 N×F×τ ), where τ is the prediction time step, 0 indicates zero padding, and similar subsequences are aggregated through the autocorrelation mechanism to output the predicted value of the future period item:

[0069] S5.2: Trend item prediction and weight accumulation, for trend items Generate latent variables through multi-layer fully connected networks And use the weight accumulation mechanism to integrate long-term trends:

[0070] Among them, L defaults to 2, which is the number of accumulation layers, α l is the learnable weight;

[0071] S5.3: Trend-Cycle Fusion and the Cycle Term to be Forecasted by the Final Forecast and trend items Superposition to generate preliminary prediction results:

[0072] The output range is then adjusted through the feedforward network (FFN), and the formula is: in, is the output layer weight, and the final output is the single site traffic prediction value;

[0073] S5.4: Denormalization and evaluation of prediction results Perform inverse normalization to restore the original data dimension:

[0074] Among them, μ and σ are the mean and standard deviation calculated in step S1, and the model performance is finally evaluated by indicators such as RMSE, MAE, and NSE.

[0075] A hydrological flow prediction system based on multi-site spatiotemporal correlation adopts the hydrological flow prediction method based on multi-site spatiotemporal correlation, and the hydrological flow prediction system based on multi-site spatiotemporal correlation includes:

[0076] Multi-site data preprocessing and feature learning module, which uses autoencoders to reduce the dimension and reconstruct features of the original multi-site hydrological data, including data standardization, encoder mapping, decoder reconstruction and optimization units, input data matrix (N is the number of sites, F is the feature dimension, and T is the time step), firstly, it is standardized to eliminate the dimensional difference, and the formula is where μ i,j and σ i,j The encoder maps high-dimensional data to low-dimensional space through a two-layer fully connected network and outputs potential features. The structure is H1=ReLU(XW1+b1) and Z=H1W2+b2, with parameters The decoder reconstructs the data through reverse mapping, the formula is H2 = ReLU (ZW3 + b3) and parameter The optimization unit uses mean square error (MSE) as the loss function Train the model and output low-dimensional features Z, preserving the spatiotemporal correlation of the data and removing noise.

[0077] Spatiotemporal correlation modeling and adjacency matrix dynamic construction module, which generates a dynamic adjacency matrix through the multivariate dynamic time warping (MDTW) algorithm and geographic adjacency relationships. It includes multidimensional distance calculation, dynamic programming path search and adjacency matrix generation units. For the time series of sites i and j, a multidimensional Euclidean distance matrix is calculated. Dynamic programming path search is based on the recursive formula Γ(t1, t2) = D i,j(t1, t2) + min{Γ(t1-1, t2), Γ(t1, t2-1), Γ(t1-1, t2-1)} determines the optimal alignment path and outputs the minimum cumulative distance Γ(T, T). The adjacency matrix generation unit converts the cumulative distance into similarity S i,j =exp(-Γ(T,T) / (α·max(Γ))), and the geographic adjacency matrix A geo Fusion, generating dynamic adjacency matrix A dynamic =β·A geo +(1-β)·S, where α = 0.5 and β = 0.3, respectively controlling the contribution weights of temporal similarity and spatial adjacency.

[0078] The graph convolutional network (ST-GCN) spatial feature extraction module is used to hierarchically extract local and global spatial correlation features between sites. This module extracts spatial correlation features between sites through a two-layer graph convolutional network, including a normalized adjacency matrix, GCN propagation, and residual connection units. The normalized adjacency matrix calculation formula is: Where D is the degree matrix, the first layer of GCN propagates through the formula Extract local spatial features, parameters The second layer of GCN is calculated by formula Fusion of global spatial features, parameters The residual connection unit adds the ST-GCN output to the low-dimensional feature Z to generate the spatial feature G = H (2) +Z, enhanced spatial dependency modeling capabilities;

[0079] The adaptive time series decomposition and prediction module is used to separate the trend term and the cycle term through the Autoformer model and perform time series modeling. This module realizes trend-cycle decoupling prediction based on the Autoformer model, including sequence decomposition, autocorrelation prediction, weight accumulation and fusion output unit. The sequence decomposition unit separates the trend term g through the sliding average MovingAvg(G,ω)(ω=25) trend and the periodic term g season , the autocorrelation prediction unit applies FFT to the periodic term to calculate the periodic dependency, and the formula is R(k)=IFFT(|G(f)| 2 ), aggregate similar subsequences to generate prediction results The weight accumulation unit treats the trend term through latent variables and weight α l Gradually model the long-term trend with the formula The fusion output unit superimposes the trend term and the period term, and generates the final prediction result through the feedforward network.

[0080] The prediction result denormalization and evaluation module denormalizes the prediction results and evaluates the performance. The denormalization unit uses the formula Restore the original dimension, and the evaluation unit calculates RMSE, MAE, NSE, and Theil's U indicators to verify the prediction accuracy, where the RMSE formula is: The NSE formula is Ensure that model performance is quantitatively comparable;

[0081] The user interaction and storage module provides a data interface, visualization interface, and storage functions. The data input interface supports batch import and real-time update of multi-site hydrological data (discharge, rainfall, etc.). The visualization interface dynamically displays the spatiotemporal correlation matrix, prediction curves, and error distribution to assist users in result analysis. The storage unit saves model parameters, adjacency matrix, and prediction results to a local or cloud database, supporting long-term data management and backtracking.

[0082] Through the collaborative work of the above modules, this system significantly improves the single-site flow prediction accuracy in both flood and dry season scenarios (RMSE is reduced by 18.6%-34.6%). The dynamic adjacency matrix combined with ST-GCN effectively captures complex spatial dependencies, and the adaptive decomposition mechanism enhances robustness to extreme hydrological events, meeting the real-time decision-making needs of water resources management and flood prevention and disaster reduction.

[0083] Compared with the prior art, the present invention has the following beneficial effects:

[0084] The ability to model multi-site spatiotemporal associations is significantly improved. Traditional models (such as LSTM, GRU, and Transformer) typically assume site independence or use a fixed adjacency matrix, making it difficult to capture dynamic spatial associations. This paper uses the Multivariate Dynamic Time Warping (MDTW) algorithm, combined with a multidimensional Euclidean distance matrix and dynamic programming path search, to generate a dynamic adjacency matrix that reflects spatiotemporal similarity. It further integrates geographic adjacency relationships and time series similarity to quantify the spatiotemporal coupling strength between sites. This mechanism breaks through the limitations of static adjacency matrices and can dynamically adapt to the complex spatial dependencies and time lags between different sites, significantly improving the accuracy of multi-site collaborative modeling.

[0085] Nonlinear time series alignment and noise suppression. When processing multi-site nonlinear time series, existing technologies often cause alignment errors due to time lag or phase offset. This invention solves this problem through a dual mechanism of autoencoder preprocessing and MDTW dynamic alignment. The autoencoder performs dimensionality reduction and reconstruction on the original high-dimensional data, eliminating noise and redundant information while retaining spatiotemporal correlation characteristics. The MDTW algorithm recursively calculates the optimal matching path to achieve nonlinear alignment of multi-site time series. This design effectively solves the problem of misalignment of multi-site data on the time axis while suppressing the interference of noise on prediction.

[0086] Hierarchical decoupling modeling of complex spatiotemporal features. Traditional models (such as GCN and Autoformer) have a gap in spatiotemporal feature fusion, making it difficult to balance spatial correlation and temporal dynamics. This paper implements hierarchical decoupling modeling through a two-stage feature fusion architecture. The first stage extracts local and global spatial features between sites based on a dynamic adjacency matrix and a graph convolutional network (ST-GCN). The second stage dynamically separates trend terms and periodic terms through the Autoformer model, combines the autocorrelation mechanism to aggregate similar subsequences, and accurately captures temporal dependencies. Residual connections and multi-scale fusion further enhance the model's ability to represent complex spatiotemporal features.

[0087] Enhanced robustness for extreme hydrological events. Existing models are prone to prediction bias in scenarios with data mutations caused by extreme climate. This invention improves robustness through an adaptive decomposition mechanism and weight accumulation design. The sliding average separates trend and periodic terms, reducing the impact of outliers. Weight accumulation dynamically models long-term trends and gradually extracts stable patterns in latent variables. Residual connections and multi-stage fusion enhance the model's adaptability to mutation patterns. This design enables the model to maintain stable prediction performance in extreme events such as rainstorms and droughts.

[0088] Engineering deployment and cross-scenario versatility. The present invention adopts modular design and lightweight parameter configuration (such as low-dimensional features of autoencoders and sliding window optimization) to achieve efficient computing and real-time prediction. The dynamic adjacency matrix and spatiotemporal feature decoupling mechanism enable the model to flexibly adapt to different river basin locations, seasonal cycles and data scales, and has cross-regional promotion value.

[0089] In summary, the present invention provides a hydrological flow prediction method and system based on the spatiotemporal correlation of multiple sites. Through the collaborative innovation of autoencoders, multivariate dynamic time warping (MDTW), improved spatiotemporal graph convolutional networks (ST-GCN) and Autoformer models, the shortcomings of traditional technologies in multi-site spatiotemporal correlation modeling, nonlinear time series alignment and complex feature decoupling are solved. Specifically, the autoencoder eliminates data noise and extracts low-dimensional features through dimensionality reduction reconstruction. The MDTW algorithm combines multi-dimensional Euclidean distance with dynamic programming to generate a dynamic adjacency matrix to quantify the spatiotemporal coupling strength between sites; ST-GCN hierarchically extracts local and global spatial dependencies, and residual connections enhance feature transfer; Autoformer separates trend-cycle components through sequence decomposition and autocorrelation mechanisms, dynamically aggregates similar subsequences and models long-term trends. This method breaks through the limitations of static adjacency matrices and fixed time alignment, realizes the precise fusion and decoupling prediction of spatiotemporal features of multi-site data, significantly improves the single-site flow prediction accuracy and robustness to extreme hydrological events, and provides an efficient and reliable solution for water resources management and flood prevention and disaster reduction.

[0090] Therefore, the core goal of the method and system of the present invention is to achieve accurate extraction of spatiotemporal features and dynamic correlation modeling of multi-site hydrological data by integrating autoencoder feature learning, multivariate dynamic time warping (MDTW), graph convolutional networks (GCN), and adaptive time series decomposition technology, thereby improving the accuracy and robustness of single-site flow forecasts, especially in complex hydrological cycle scenarios such as flood and dry seasons. This solves the problems of insufficient multi-site spatiotemporal correlation modeling, difficulty in aligning nonlinear time series, inadequate long-term trend-periodicity modeling, and limited single-site prediction accuracy in existing hydrological flow forecasting technologies. It is suitable for scenarios such as water resource scheduling and flood prevention and disaster reduction. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] Figure 1 This is a flow chart of the hydrological flow prediction method based on multi-site spatiotemporal correlation according to the present invention.

[0092] Figure 2 Schematic diagram of Model A of the hydrological flow prediction method based on multi-site spatiotemporal correlation described in the present invention.

[0093] Figure 3 This is a relationship diagram between the prediction performance and error rate of the ablation model of the hydrological flow prediction method based on multi-site spatiotemporal correlation described in the present invention. Figure 3 (a) is the relationship between the prediction performance of the ablation model and the root mean square error (RMSE). Figure 3 (b) is the relationship between the prediction performance of the ablation model and the mean absolute error (MAE). Figure 3 (c) is the relationship between the prediction performance of the ablation model and the Nash efficiency coefficient (NSE). Figure 3 (d) is a graph showing the relationship between the prediction performance of the ablation model and the Theil's U coefficient.

[0094] Figure 4 This is a two-layer ST-GCN structure diagram of the hydrological flow prediction method based on multi-site spatiotemporal correlation described in the present invention.

[0095] Figure 5 This chart shows the hydrological flow predictions for a certain site during the flood season (June-July) in 2023 using different models. Figure 5 (a) shows the hydrological flow prediction of a certain site in the flood season (June-July) of 2023 using different models. Figure 5 (b) is Figure 5 Magnified view of the X region in (a).

[0096] Figure 6 This chart shows the hydrological flow predictions for a certain site during the dry season (November-December) in 2023 using different models. Figure 6(a) shows the hydrological flow prediction of a certain site in the dry season (November-December) in 2023 using different models. Figure 6 (b) is Figure 6 Magnified view of the Y region in (a). DETAILED DESCRIPTION

[0097] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on these embodiments without inventive effort are considered to fall within the scope of the present invention.

[0098] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following Figures 1 to 6 The specific embodiments are described in detail.

[0099] Example 1: Figure 1 、 Figure 2 As shown, the hydrological flow prediction method based on multi-site spatiotemporal correlation of the present invention includes the following steps:

[0100] S1: Multi-site hydrological data preprocessing and feature learning. This step uses an autoencoder to reduce the dimensionality and reconstruct features of the original multi-site hydrological data, eliminate noise, and extract low-dimensional spatiotemporal features (extract low-dimensional latent feature representations) to provide high-quality input for subsequent modeling. The above step S1 includes:

[0101] S1.1: Input data standardization and dimension definition. Normalize the multi-station hydrological data matrix using the following formula: Among them, μ i,j and σ i,j are the mean and standard deviation of the jth feature at the i-th site, respectively;

[0102] S1.2: The autoencoder encoding process maps the input data to a low-dimensional latent space through the encoder function. The encoder uses a two-layer fully connected network with the structure: H1 = ReLU (XW1 + b1), Z = H1W2 + b2, where

[0103] S1.3: Decoding and reconstruction of the autoencoder. The original data is reconstructed through the decoder function. The decoder uses a symmetrical two-layer fully connected network with the following structure: in,

[0104] S1.4: Train the autoencoder using the mean squared error (MSE) as the loss function. The formula is: Finally, the low-dimensional feature Z is output.

[0105] The feasible implementation of this step is as follows: First, standardize the input data and input the multi-site hydrological data matrix Normalize the data; then perform encoder feature extraction, map the high-dimensional data to a low-dimensional space through a two-layer fully connected network, and output potential features Finally, the decoder is reconstructed and optimized. The original data is reconstructed through a two-layer fully connected network. The model is optimized using the mean square error (MSE) as the loss function. The reconstruction error is minimized through backpropagation, and the low-dimensional feature Z is finally output, preserving the spatiotemporal correlation and removing noise.

[0106] The above steps effectively eliminate the redundant information of the original high-dimensional data (such as flow, rainfall, etc.) through dimensionality reduction and reconstruction by the autoencoder. Experiments show that after removing the AE module, the RMSE increases by 14.77%, further confirming the importance of AE in noise suppression and feature extraction. See Table 1 and Figure 3 As shown, it lays the foundation for subsequent spatiotemporal modeling.

[0107] Table 1

[0108]

[0109] S2: Spatiotemporal correlation modeling and dynamic construction of adjacency matrix. Based on the multivariate dynamic time warping MDTW algorithm, the multidimensional Euclidean distance matrix between sites is calculated. The similarity matrix is generated by combining dynamic programming to search for the optimal matching path. The dynamic adjacency matrix is constructed by integrating the geographic spatial adjacency relationship and the multivariate dynamic time warping MDTW similarity. Figure 4 As shown, this step generates a dynamic adjacency matrix by combining the geographical adjacency relationship with the multivariate dynamic time warping (MDTW) algorithm to quantify the spatiotemporal coupling strength between sites. The above step S2 includes:

[0110] S2.1: Calculate the Euclidean distance matrix of the multivariate time series and the multidimensional Euclidean distance matrix between site i and j The formula is:

[0111]

[0112] in, and are the k-th dimension eigenvalues of sites i and j at time t1 and t2, respectively;

[0113] S2.2: Dynamic Time Warping MDTW path search based on the distance matrix D i,j , calculate the optimal matching path through dynamic programming, the formula includes: Initialization formula: Γ(1,1)=D i,j(1,1), boundary condition formula: Γ(t1,1)=Γ(t1-1,1)+D i,j (t1,1),Γ(1,t2)=Γ(1,t2-1)+D i,j (1, t2), recursive calculation formula: Γ(t1, t2) = D i,j (t1, t2) + min{Γ(t1-1, t2), Γ(t1, t2-1), Γ(t1-1, t2-1)}, and finally obtain the minimum cumulative distance Γ(T, T), and backtrack the path to generate the alignment relationship between sites;

[0114] S2.3: Generate a dynamic adjacency matrix and convert the multivariate dynamic time warping MDTW cumulative distance into a similarity score:

[0115]

[0116] Fusion geographic adjacency matrix A geo The similarity matrix S with multivariate dynamic time warping MDTW is: dynamic =β·A geo +(1-β)·S, where α is the time window weight parameter and β is the neighbor balance coefficient.

[0117] The feasible implementation methods of this step are as follows:

[0118] First, multivariate dynamic time warping (MDTW) calculation is performed. For any two stations’ multivariate time series data X i and X j (where F is the feature dimension), first use Euclidean distance as the local distance function to measure the difference between two time points, the formula is:

[0119]

[0120] Based on this distance, the cumulative distance matrix Γ(t1,t2) is constructed, and the initial conditions and boundary conditions are: Γ(1,1)=D i,j (1,1), Γ(t1,1)=Γ(t1-1,1)+D i,j (t1,1),Γ(1,t2)=Γ(1,t2-1)+D i,j (1, t2), the other elements of the cumulative distance matrix are recursively calculated as: Γ(t1, t2) = D i,j (t1,t2)+min{Γ(t1-1,t2),Γ(t1,t2-1),Γ(t1-1,t2-1)}

[0121] Finally, the dynamic time alignment distance Γ(t1, t2) between the time series of the two sites is obtained and converted into a similarity score S through the time window weight parameter αi,j :

[0122]

[0123] This process achieves nonlinear alignment through dynamic programming path search, capturing the complex dependencies of multi-site time series;

[0124] Secondly, the dynamic adjacency matrix is generated based on the generation of the similarity matrix, combined with the original space adjacency matrix A geo (0-1 binary matrix), construct dynamic adjacency matrix A dynamic , the formula is:

[0125] A dynamic =β·A geo +(1-β)·S,

[0126] Among them, β controls the relative contribution of geographic adjacency and temporal similarity and can be set to 0.3 by default. The dynamic adjacency matrix not only retains the geographic spatial association between sites, but also integrates the time series similarity, and can dynamically adapt to the complex spatial dependence and time lag relationship between different sites.

[0127] Finally, the adjacency matrix is normalized. In order to ensure the stability and convergence of the graph convolutional network (GCN), the dynamic adjacency matrix is normalized. The adjacency matrix after adding self-loops for: The corresponding degree matrix is a diagonal matrix whose diagonal elements are The row sum:

[0128]

[0129] The normalized adjacency matrix is:

[0130]

[0131] The normalized adjacency matrix is used in subsequent graph convolution operations to enhance the model's adaptability to complex topological structures;

[0132] The dynamic adjacency matrix generated by the above method can accurately quantify the strength of spatiotemporal coupling between sites. Experiments show that after removing the MDTW module, the RMSE increases by 16.66%, verifying the key role of this mechanism in capturing the similarity of multi-site time series. In addition, the dynamic adjacency matrix, combined with geographic adjacency relationships, significantly improves the model's ability to represent complex spatial dependencies, providing high-quality input for subsequent spatial feature extraction.

[0133] S3: Graph Convolutional Network (ST-GCN) spatial feature extraction, such as Figure 4As shown in Figure 2, this step uses an improved spatiotemporal graph convolutional network (ST-GCN) to fuse the dynamic adjacency matrix generated in step S2 with the low-dimensional features extracted in step S1, and hierarchically extract the spatial correlation features between sites. Step S3 specifically includes:

[0134] S3.1: The first layer of GCN propagates features through the normalized adjacency matrix, the formula is: Where D is the degree matrix, I is the identity matrix, and the characteristic propagation formula is: in is a learnable weight matrix, output

[0135] S3.2: The second layer GCN integrates global spatial features, the formula is: in is the weight matrix, F is the final output feature dimension, and the output

[0136] S3.3: Enhance feature transfer through residual connection, output spatial features: G = H (2) +Z, final output spatial features Contains spatial dependency information of multi-site collaborative relationships.

[0137] The feasible implementation methods of this step are as follows:

[0138] The first layer of GCN local spatial dependency modeling is based on the normalized dynamic adjacency matrix The low-dimensional feature matrix output from step S1 Enter the first layer of GCN. Through the propagation formula: in A learnable weight matrix is used to extract local spatial dependencies between sites. This layer uses the dynamic topological structure of the adjacency matrix to capture local correlation patterns between sites due to their geographic location and hydrological connectivity. This design significantly improves the model's ability to represent complex spatial dependencies.

[0139] Based on the output of the first layer GCN, the global spatial features are further extracted through the second layer GCN. The propagation formula of the second layer GCN is:

[0140]

[0141] in is the learnable weight matrix of the second layer. Through this layer of operation, the global spatial information between sites is integrated, enhancing the model's ability to model the collaborative relationship between multiple sites;

[0142] Finally, residual connection and feature enhancement are used to avoid the gradient vanishing problem in deep networks and retain the temporal information in low-dimensional features. (2) Added to the low-dimensional feature Z of S1 to generate the final spatial feature representation: G = H (2) +Z, through the residual connection mechanism, the model can not only effectively capture the spatial dependencies between sites, but also retain the important temporal characteristics of the original data;

[0143] Experiments show that removing the GCN module increases the RMSE by 19.91%, validating its key role in spatial feature extraction. Furthermore, the two-layer GCN design, combined with a dynamic adjacency matrix, significantly improves the model's ability to represent complex spatial dependencies, addressing the limitations of traditional GCNs, which ignore temporal dynamics and nonlinear alignment.

[0144] S4: Adaptive time series decomposition and trend-cycle modeling. The spatial features output by the spatiotemporal graph convolutional network ST-GCN are input into the Autoformer model. The trend term and the cycle term of the time series are separated through the sequence decomposition unit. The autocorrelation mechanism is used to extract the periodic dependency based on the fast Fourier transform FFT, and the long-term trend is modeled through the weight accumulation mechanism. Specifically, the spatial features extracted in step S3 are decomposed into time series by the Autoformer model, the trend term and the cycle term are separated, and the autocorrelation mechanism and the weight accumulation method are combined to achieve accurate temporal dependency modeling. The above step S4 specifically includes:

[0145] S4.1: Spatial features output by ST-GCN Input the Autoformer model and separate it into trend terms g through the Series Decomp Block trend and the periodic term g season , the formula is:

[0146] g season =G-MovingAvg(G,ω),

[0147] g trend =MovingAvg(G,ω), where ω is the sliding window length. The sliding average function MovingAvg(·) is defined as:

[0148]

[0149] S4.2: For the periodic term g season Applying the autocorrelation mechanism, the periodic dependency is extracted through the Fast Fourier Transform (FFT). First, the key, query, and value are generated. The formula is defined as follows:

[0150] Q = g seasonW Q ,K=g season W K ,V=g season W V ,

[0151] Among them, W Q 、W K 、W V is a learnable weight matrix; secondly, autocorrelation calculation is performed to calculate the periodic term g season Perform fast Fourier transform FFT to obtain frequency domain representation G(f). The formula of Fourier transform is: G(f)=FFT(g season ), where G(f) is the periodic term g season The frequency domain representation is f, and the autocorrelation coefficient R(k) can be calculated by the square of the amplitude in the frequency domain, and the inverse Fourier transform IFFT is applied to obtain the autocorrelation sequence in the time domain. The formula is: R(k) = IFFT(|G(f)| 2 ), where |G(f)| 2 Represents the frequency domain amplitude square of the signal. Based on R(k), the top k subsequences with the strongest periodicity can be selected. The formula is: Top-k Subsequence = argsort(R(k))[:k], where argsort(R(k)) means sorting the autocorrelation coefficient sequence R(k), and finally aggregating the information of the selected Top-k related subsequences to predict the periodic term. The formula is: Where V i is the value of the i-th subsequence;

[0152] S4.3: For the trend term g trend The weight accumulation mechanism is used to gradually model the long-term change law, in which the latent variable generation maps the trend term to the latent variable h through the fully connected network. trend , the formula is: h trend =ReLU(g trend W h +b h ), weight accumulation prediction generates future trend items by layer-by-layer weight accumulation The formula is:

[0153]

[0154] Among them, α l is the learnable weight coefficient, L is the number of accumulation layers;

[0155] S4.4: The periodic items to be predicted and trend items Superposition to generate the final prediction result: The output is further adjusted through the decoder's feedforward network, and the formula is:

[0156] The feasible implementation methods of this step are as follows:

[0157] Sequence decomposition unit input space feature matrix It is decomposed into the trend term g through the sliding average function trend and the periodic term g season :

[0158] g season =G-MovingAvg(G,ω),g trend =MovingAvg(G,ω), where the sliding window length ω can be set to 25 by default. MovingAvg(·) is defined as:

[0159]

[0160] This decomposition process separates the original time series into a stationary periodic component and a long-term trend component, providing a clear time-dependent structure for subsequent forecasting;

[0161] Autocorrelation mechanism and periodic term modeling have an impact on the periodic term g season Applying the autocorrelation mechanism, the periodic dependency is extracted through the Fast Fourier Transform (FFT), and the calculation formula is:

[0162] G(f)=FFT(g season ), R(k)=IFFT(|G(f)| 2 ),

[0163] Where G(f) is the periodic term g season Frequency domain representation, f is the frequency, |G(f)| 2 Represents the square of the frequency domain amplitude of the signal, and IFFT represents the inverse Fourier transform, which is used to return from the frequency domain to the time domain. Based on the calculated autocorrelation coefficient R(k), the top k subsequences with the strongest periodicity can be selected. These subsequences represent the most representative periodic patterns in the periodic signal. The formula for selecting the top-k correlated subsequence is: Top-k Subsequence = argsort(R(k))[:k], where argsort(R(k)) means sorting the autocorrelation coefficient sequence R(k) and selecting the top k strongest correlations.

[0164] Finally, aggregate the information of the selected Top-k related subsequences to predict periodic items The formula is: Among them, V i is the value of the i-th subsequence;

[0165] Weight accumulation and trend term modeling for trend term g trend The weight accumulation mechanism is used to gradually model the long-term change pattern. The latent variable generation formula is:

[0166]

[0167] The future trend item prediction results are generated through the weight accumulation formula (Formula 23):

[0168] Among them, L=2 is the number of cumulative layers, α l is the learnable weight coefficient.

[0169] S5: Multi-stage fusion prediction and result output, combined with the decomposed trend term and period term, generates the final prediction result through the decoder, and builds the A model through the above steps S1 to S5. Specifically, the model training and prediction result generation are completed through the end-to-end training and testing process of the model, combined with the features extracted and module design in steps S1 to S4, to complete the hydrological flow prediction task. The above step S5 specifically includes:

[0170] S5.1: The periodic term of the encoder output Input the decoder, combine the historical cycle information with the position code to generate future predictions. The decoder input formula is:

[0171] D season =Concat(g season ,0 N×F×τ ),

[0172] Where τ is the prediction time step, 0 indicates zero padding, and similar subsequences are aggregated through the autocorrelation mechanism to output the predicted value of the future period item:

[0173]

[0174] S5.2: Trend Items Generate latent variables through multi-layer fully connected networks And use the weight accumulation mechanism to integrate long-term trends:

[0175]

[0176] The default value of L is 2, which is the number of accumulation layers. l is the learnable weight;

[0177] S5.3: The periodic items to be predicted and trend items Superposition to generate preliminary prediction results:

[0178]

[0179] The output range is then adjusted through the feedforward network (FFN), and the formula is:

[0180]

[0181] in, is the output layer weight, and the final output is the single site traffic prediction value;

[0182] S5.4: Prediction results Perform inverse normalization to restore the original data dimension:

[0183] Where μ and σ are the mean and standard deviation calculated in step S1, and the model performance is finally evaluated by RMSE, MAE, and NSE indicators.

[0184] The feasible implementation of this step is as follows: the model input and initialization data are multi-site hydrological monitoring data matrix Where N is the number of sites, F is the feature dimension, and T is the time step. After the autoencoder dimensionality reduction in step S1, the low-dimensional feature matrix is obtained The feature matrix is processed by the dynamic adjacency matrix in step S2 and the ST-GCN in step S3 to generate a spatial feature representation. It is then input into the Autoformer model in step S4 for time series decomposition and trend-cycle modeling;

[0185] Loss function and optimization strategy Huber loss function is used in model training to deal with outlier problems in regression tasks:

[0186] Among them, y is the true value, is the predicted value, δ = 1.0 is the threshold parameter of Huber loss, AdamW is selected as the optimizer, and L2 regularization is introduced to prevent overfitting. The initial learning rate is set to 0.001, and the cosine annealing strategy is used to dynamically adjust the learning rate. The model training cycle (epoch) is set to 300, and the batch size (batch size) is 64.

[0187] The experimental data is based on 22 months of hydrological monitoring data from each monitoring station from February 1, 2022 to December 31, 2023. It is divided into training, validation, and test sets in a ratio of 18:2:2. The training set is used for model parameter updating, the validation set is used for hyperparameter tuning and model selection, and the test set is used for final performance evaluation. To further analyze the cyclical characteristics of hydrological flow, the test set is divided into the high-flow season (June to July) and the low-flow season (November to January of the following year) according to the variation pattern of hydrological flow to evaluate the adaptability of the model under different hydrological conditions.

[0188] After the model training is completed, the prediction results are output through the decoder Where T pred For the future prediction time step, the prediction results are evaluated by indicators such as root mean square error (RMSE), mean absolute error (MAE), Nash efficiency coefficient (NSE) and Theil's U, and the formulas are:

[0189]

[0190] in, is the mean of the observation values at site i;

[0191] like Figure 5 、 Figure 6 As shown in Figure 1, the experimental results show that model A significantly outperforms the baseline model in both the wet and dry season tests at site 1. Specifically, in the wet season, the RMSE of model A drops to 17.53, the MAE is 10.70, and the NSE is as high as 0.92; in the dry season, the RMSE is 1.77 and the NSE is 0.88, both of which are better than other models (see Table 1). The ablation experiment further verifies the importance of each module: after removing the AE module, the RMSE increases by 14.77%; after removing the MDTW module, the RMSE increases by 16.66%; after removing the ST-GCN module, the RMSE increases by 19.91%. These results show that model A effectively improves the accuracy and reliability of hydrological flow prediction through the fusion of multiple technologies.

[0192] This paper verifies the good performance of model A in hydrological forecasting through systematic comparative experiments. The experiment selects five representative time series forecasting models, including LSTM, GRU, Transformer, Informer and Autoformer, as comparison baselines. Figure 5 、 Figure 6 As shown in the figure, the differences in prediction performance of each model in the flood season and the dry season can be observed intuitively through visual analysis.

[0193] During the flood season, when flow rates fluctuate dramatically, Model A demonstrated excellent predictive capabilities, with its prediction curves highly consistent with observed values, particularly in capturing extreme flow values. In contrast, while other comparison models were able to reflect the overall trend of flow changes, they exhibited significant deficiencies in detailed predictions: LSTM models exhibited a lag in responding to sudden flow changes; GRU models exhibited prediction bias during certain periods; and Transformer-based models (including Informer and Autoformer) needed to improve their accuracy for predicting extreme values.

[0194] Model A also performed well during the dry season, when periodicity is prominent, accurately capturing the cyclical variations in flow. However, other comparison models all had varying degrees of deficiencies in modeling periodicity: LSTM and GRU models were less than accurate in predicting short-term fluctuations, while Transformer-based models exhibited prediction errors at critical time points. These comparative results fully demonstrate the adaptability and reliability of Model A under complex hydrological conditions.

[0195] Example 2: The hydrological flow prediction system based on multi-site spatiotemporal correlation of the present invention adopts the hydrological flow prediction method based on multi-site spatiotemporal correlation. The hydrological flow prediction system based on multi-site spatiotemporal correlation includes:

[0196] Multi-site data preprocessing and feature learning module, used to reduce the dimension and reconstruct features of the original multi-site hydrological data through autoencoders;

[0197] Spatiotemporal correlation modeling and adjacency matrix dynamic construction module, used to generate dynamic adjacency matrix based on multivariate dynamic time warping (MDTW) algorithm;

[0198] The graph convolutional network ST-GCN spatial feature extraction module is used to hierarchically extract local and global spatial correlation features between sites;

[0199] Adaptive time series decomposition and forecasting module, used to separate trend terms and cycle terms through the Autoformer model and perform time series modeling;

[0200] The prediction result denormalization and evaluation module is used to denormalize the prediction results and evaluate the model performance.

[0201] The technical solutions disclosed in the embodiments of the present invention may be implemented in a variety of alternative ways. For example, the modular division is merely an example of logical functionality and may be reconfigured in actual implementation (including module merging, decomposition, or functional reduction). The illustrated component connections include direct / indirect electrical connections, mechanical couplings, or other connection methods that can achieve the same technical effect.

[0202] The above embodiments of the present invention provide a hydrological flow prediction method and system based on multi-site spatiotemporal correlation. Its core goal is to achieve accurate extraction of spatiotemporal features and dynamic correlation modeling of multi-site hydrological data by integrating autoencoder feature learning, multivariate dynamic time warping (MDTW), graph convolutional network (GCN) and adaptive time series decomposition technology, thereby improving the accuracy and robustness of single-site flow prediction, especially in complex hydrological cycle scenarios such as flood season and dry season. It solves the problems of insufficient multi-site spatiotemporal correlation modeling, difficulty in nonlinear time series alignment, insufficient long-term trend-periodicity modeling, and limited single-site prediction accuracy in existing hydrological flow prediction technologies. It is suitable for scenarios such as water resource scheduling and flood prevention and disaster reduction.

Claims

1. A hydrological flow prediction method based on multi-site spatiotemporal correlation, characterized in that: The following steps are involved: S1: Multi-site hydrological data preprocessing and feature learning: using autoencoders to reduce the dimensionality and reconstruct features of the original multi-site hydrological data to extract low-dimensional latent feature representations; S2: Spatiotemporal association modeling and dynamic construction of the adjacency matrix. The multidimensional Euclidean distance matrix between sites is calculated based on the multivariate dynamic time warping (MDTW) algorithm. The similarity matrix is generated by searching for the optimal matching path using dynamic programming. The dynamic adjacency matrix is then constructed by integrating the geographic spatial adjacency relationship with the multivariate dynamic time warping (MDTW) similarity. S3: Graph Convolutional Network (GCN) spatial feature extraction, using the improved spatiotemporal graph convolutional network (ST-GCN) combined with a dynamic adjacency matrix and low-dimensional feature representation to hierarchically extract local and global spatial correlation features between sites; S4: Adaptive time series decomposition and trend-cycle modeling. The spatial features output by the spatiotemporal graph convolutional network (ST-GCN) are input into the Autoformer model. The trend term and the cycle term of the time series are separated through the sequence decomposition unit. The autocorrelation mechanism is used to extract the periodic dependency based on the fast Fourier transform (FFT). The long-term trend is modeled through the weight accumulation mechanism. S5: Multi-stage fusion prediction and result output, combined with the decomposed trend term and period term, generates the final prediction result through the decoder, and constructs the A model through the above steps S1 to S5.

2. The hydrological flow prediction method based on multi-site spatiotemporal correlation according to claim 1 is characterized in that: The above step S1 includes: S1.1: Input data standardization and dimension definition. Normalize the multi-station hydrological data matrix using the following formula: Among them, μ i,j and σ i,j are the mean and standard deviation of the jth feature at the i-th site, respectively; S1.2: The autoencoder encoding process maps the input data to a low-dimensional latent space through the encoder function. The encoder uses a two-layer fully connected network with the structure: H1 = ReLU (XW1 + b1), Z = H1W2 + b2, where S1.3: Decoding and reconstruction of the autoencoder. The original data is reconstructed through the decoder function. The decoder uses a symmetrical two-layer fully connected network with the following structure: in, S1.4: Train the autoencoder using the mean squared error (MSE) as the loss function. The formula is: Finally, the low-dimensional feature Z is output.

3. The hydrological flow prediction method based on multi-site spatiotemporal correlation according to claim 1 is characterized in that: The above step S2 includes: S2.1: Calculate the Euclidean distance matrix of the multivariate time series and the multidimensional Euclidean distance matrix between site i and j The formula is: in, and are the k-th dimension eigenvalues of sites i and j at time t1 and t2, respectively; S2.2: Dynamic Time Warping MDTW path search based on the distance matrix D i,j , calculate the optimal matching path through dynamic programming, the formula includes: Initialization formula: Γ(1,1)=D i,j (1,1), boundary condition formula: Γ(t1,1)=Γ(t1-1,1)+D i,j (t1,1),Γ(1,t2)=Γ(1,t2-1)+D i,j (1, t2), recursive calculation formula: Γ(t1, t2) = D i,j (t1, t2) + min{Γ(t1-1, t2), Γ(t1, t2-1), Γ(t1-1, t2-1)}, and finally obtain the minimum cumulative distance Γ(T, T), and backtrack the path to generate the alignment relationship between sites; S2.3: Generate a dynamic adjacency matrix and convert the multivariate dynamic time warping MDTW cumulative distance into a similarity score: Fusion geographic adjacency matrix A geo The similarity matrix S with multivariate dynamic time warping MDTW is: dynamic =β·A geo +(1-β)·S, where α is the time window weight parameter and β is the neighbor balance coefficient.

4. The hydrological flow prediction method based on multi-site spatiotemporal correlation according to claim 1 is characterized in that: The above step S3 includes: S3.1: The first layer of GCN propagates features through the normalized adjacency matrix, the formula is: Where D is the degree matrix, I is the identity matrix, and the characteristic propagation formula is: in is a learnable weight matrix, output S3.2: The second layer GCN integrates global spatial features, the formula is: in is the weight matrix, F is the final output feature dimension, and the output S3.3: Enhance feature transfer through residual connection, output spatial features: G = H (2) +Z, final output spatial features Contains spatial dependency information of multi-site collaborative relationships.

5. The hydrological flow prediction method based on multi-site spatiotemporal correlation according to claim 1 is characterized in that: The above step S4 includes: S4.1: Spatial features output by ST-GCN Input the Autoformer model and separate it into trend terms g through the Series Decomp Block trend and the periodic term g season , the formula is: g season =G-MovingAvg(G,ω), g trend =MovingAvg(G,ε), where ε is the sliding window length. The sliding average function MovingAvg(·) is defined as: S4.2: For the periodic term g season Applying the autocorrelation mechanism, the periodic dependency is extracted through the Fast Fourier Transform (FFT). First, the key, query, and value are generated. The formula is defined as follows: Q=g season W Q ,K=g season W K ,V=g season W V , Among them, W Q 、W K 、W V is a learnable weight matrix; secondly, autocorrelation calculation is performed to calculate the periodic term g season Perform fast Fourier transform FFT to obtain frequency domain representation G(f). The formula of Fourier transform is: G(f)=FFT(g season ), where G(f) is the periodic term g season The frequency domain representation is f, and the autocorrelation coefficient R(k) can be calculated by the square of the amplitude in the frequency domain, and the inverse Fourier transform IFFT is applied to obtain the autocorrelation sequence in the time domain. The formula is: R(k) = IFFT(|G(f)| 2 ), where |G(f)| 2 Represents the frequency domain amplitude square of the signal. Based on R(k), the top k subsequences with the strongest periodicity can be selected. The formula is: Top-kSubsequence = argsort(R(k))[:k], where argsort(R(k)) means sorting the autocorrelation coefficient sequence R(k), and finally aggregating the information of the selected Top-k related subsequences to predict the periodic term. The formula is: Where V i is the value of the i-th subsequence; S4.3: For the trend term g trend The weight accumulation mechanism is used to gradually model the long-term change law, in which the latent variable generation maps the trend term to the latent variable h through the fully connected network. trend , the formula is: h trend =ReLU(g trend W h +b h ), weight accumulation prediction generates future trend items by layer-by-layer weight accumulation The formula is: Among them, α l is the learnable weight coefficient, L is the number of accumulation layers; S4.4: The periodic items to be predicted and trend items Superposition to generate the final prediction result: The output is further adjusted through the decoder's feedforward network, and the formula is:

6. The hydrological flow prediction method based on multi-site spatiotemporal correlation according to claim 1 is characterized in that: The above step S5 includes: S5.1: The periodic term of the encoder output Input the decoder, combine the historical cycle information with the position code to generate future predictions. The decoder input formula is: D season =Concat(g season ,0 N×F×τ ), Where τ is the prediction time step, 0 indicates zero padding, and similar subsequences are aggregated through the autocorrelation mechanism to output the predicted value of the future period item: S5.2: Trend Items Generate latent variables through multi-layer fully connected networks And use the weight accumulation mechanism to integrate long-term trends: The default value of L is 2, which is the number of accumulation layers. l is the learnable weight; S5.3: The periodic items to be predicted and trend items Superposition to generate preliminary prediction results: The output range is then adjusted through the feedforward network (FFN), and the formula is: in, is the output layer weight, and the final output is the single site traffic prediction value; S5.4: Prediction results Perform inverse normalization to restore the original data dimension: Among them, μ and σ are the mean and standard deviation calculated in step S1. Finally, the model performance is evaluated by the root mean square error, mean absolute error, and Nash efficiency coefficient indicators.

7. A hydrological flow prediction system based on multi-site spatiotemporal correlation, which adopts the hydrological flow prediction method based on multi-site spatiotemporal correlation according to claim 1, characterized in that: The hydrological flow prediction system based on multi-site spatiotemporal correlation includes: Multi-site data preprocessing and feature learning module, used to reduce the dimension and reconstruct features of the original multi-site hydrological data through autoencoders; Spatiotemporal correlation modeling and adjacency matrix dynamic construction module, used to generate dynamic adjacency matrix based on multivariate dynamic time warping (MDTW) algorithm; The graph convolutional network ST-GCN spatial feature extraction module is used to hierarchically extract local and global spatial correlation features between sites; Adaptive time series decomposition and forecasting module, used to separate trend terms and cycle terms through the Autoformer model and perform time series modeling; The prediction result denormalization and evaluation module is used to denormalize the prediction results and evaluate the model performance.

Citation Information

Patent Citations

  • Intelligent flow prediction method and system for information-deficient drainage basin

    CN118261285A

  • Flood simulation method and system based on dynamic parameters and physical deep learning

    CN118277919A

  • Method and device for predicting day-by-day power generation capacity of hydropower station

    CN118841940A

  • Medium and long term flood forecasting method, device, equipment, medium and product

    CN119129794A

Cited By

  • Space intelligent watershed hydrology and water quality multivariable prediction method based on quaternion time-frequency multi-scale

    CN120822194A

  • Real-time detection method for water level abnormal data

    CN121030603A

  • Tidal station water level prediction method based on hybrid adaptive graph structure

    CN121071615A

  • Tide gauge water level prediction method based on hybrid adaptive graph structure

    CN121071615B

  • River water quality prediction method and system considering spatial information accumulation

    CN121093799A