Hydrological prediction method based on feature enhancement fusion space-time diagram neural network
By constructing the distance map and related map of the rainfall station and the basin exit, combining the initial state of the basin, using the spatial graph convolution network and the Graph-LSTM module for feature extraction and enhancement fusion, the problem of insufficient accuracy in traditional hydrological prediction models in small and medium-sized river basins is solved, and a higher precision flow trend prediction is achieved.
Patent Information
- Application Number
- CN202510528861.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-08
AI Technical Summary
Traditional hydrological prediction models are difficult to capture complex spatial and temporal correlations, resulting in insufficient hydrological prediction accuracy in small and medium-sized watersheds.
Using a method of fusion space-time graph neural network based on feature enhancement, the distance map and related graph between the rainfall station and the basin exit are constructed, and feature extraction is used for the spatial graph convolution network, and enhanced fusion is performed in combination with the initial state of the basin. Finally, the Graph-LSTM module is used for traffic trend prediction.
It improves the accuracy and practical value of hydrological prediction in small and medium-sized watersheds, and can better capture the impact of complex spatiotemporal data changes and initial state.
Smart Images

Figure CN120448903A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a hydrological prediction method based on feature enhancement and fusion of spatiotemporal graph neural networks, belonging to the technical field of hydrological prediction. Background Art
[0002] Hydrological forecasting for small and medium-sized river basins is of great significance for flood prevention and disaster reduction. Traditional hydrological forecasting models often have difficulty capturing complex spatiotemporal correlations, resulting in insufficient prediction accuracy.
[0003] To solve this problem, the present invention proposes a hydrological prediction method based on feature enhancement and fusion of spatiotemporal graph neural network. Summary of the Invention
[0004] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a hydrological prediction method based on feature-enhanced fusion of spatiotemporal graph neural network. By considering the time-varying characteristics of complex hydrological spatiotemporal data and the impact of different initial states on the trend change of basin outlet flow, the connectivity of each data monitoring and collection station in the basin is converted into graph structure data, and global context information is considered when modeling the temporal dependency relationship. It has high practical value and promotion potential in hydrological prediction of small and medium-sized basins.
[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions:
[0006] In a first aspect, the present invention provides a hydrological prediction method based on feature-enhanced fusion spatiotemporal graph neural network, comprising:
[0007] Obtaining future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin to be predicted, inputting the future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin into a pre-built feature-enhanced fusion spatiotemporal graph neural network model, and obtaining the flow trend prediction result of the basin outlet as output by the model;
[0008] The feature enhancement fusion spatiotemporal graph neural network model includes a graph structure module, a spatial graph convolutional network module, a feature enhancement fusion layer module and a result output module, wherein:
[0009] The graph structure module is used to construct a distance graph and a correlation graph between a rain gauge station and a watershed outlet based on the historical rainfall values and historical flow values monitored by rain gauges at different spatial locations;
[0010] The spatial graph convolutional network module is used to perform feature extraction using a spatial GCN according to a connection matrix of the distance graph and the correlation graph to obtain a first processing result;
[0011] The feature addition fusion layer module is used to enhance and fuse the first processing result according to the initial state of the watershed to obtain a second processing result;
[0012] The result output module is used to input the future rainfall characteristics and the second processing result into a pre-trained Graph-LSTM module, and after the output of the Graph-LSTM module is processed by the SeLU activation function, the flow trend prediction result of the basin outlet is obtained.
[0013] Furthermore, the distance map constructed is , ,in,
[0014] is the distance weight constructed, , It represents the basin outlet flow monitoring station, Expressed as Rainfall monitoring stations, Indicated as the basin outlet flow monitoring station to the The distance between rainfall monitoring stations, A collection of monitoring sites;
[0015] The correlation diagram constructed is , ,in,
[0016] is the relevant weight of the construction, , Pearson correlation coefficient, the output range is -1 to +1, negative value means negative correlation, positive value means positive correlation.
[0017] Furthermore, spatial GCN is used to perform feature extraction based on the connection matrix of the distance graph and the correlation graph to obtain a first processing result, including:
[0018] pass The function connects the distance map matrix and the correlation map matrix to obtain the comprehensive matrix;
[0019] Combined with the feature matrix of historical monitoring data, a two-layer spatial GCN is used to extract features from the comprehensive matrix to obtain the feature extraction results;
[0020] The feature extraction result is processed in combination with the feature extraction weight to obtain a first processing result; wherein,
[0021] The comprehensive matrix is , A * = j o i n [ A D , A T ] , the feature extraction result is , , is the characteristic matrix of historical monitoring data, is the activation function, is the degree matrix, is the weight matrix of the first layer of spatial GCN, is the weight matrix of the second layer of spatial GCN, and the first processing result is , , Extract weights for features.
[0022] Furthermore, the first processing result is enhanced and fused according to the pre-acquired initial state of the watershed to obtain a second processing result, including:
[0023] Preprocessing the pre-acquired initial state of the watershed to obtain a preprocessing result, wherein the initial state of the watershed includes soil moisture content and soil evaporation;
[0024] According to the first processing result and the preprocessing result, combined The excitation function is used for processing to obtain a second processing result;
[0025] The preprocessing result is , ,in is the state processing weight, is the combined input of evaporation and soil moisture values, X s t a t e = n o n m a l ( j o i n [ X e v a , X s o i l ] ) , is the evaporation input, is the soil moisture content input;
[0026] The second processing result is , , is element-wise multiplication.
[0027] Further,
[0028] The input of the Graph-LSTM module is , x t = j o i n [ O f u s i o n , X f u t u r e ] ,in, For future rainfall characteristics, .
[0029] Furthermore, the future rainfall characteristics and the second processing results are input into the Graph-LSTM module. After the output of the Graph-LSTM module is processed by the SeLU activation function, the flow trend prediction results of the basin outlet are obtained, including;
[0030] After normalizing the future rainfall characteristics and the second processing results, the input characteristics are obtained;
[0031] Input the input features into the Graph-LSTM module to obtain the hidden layer state output by the Graph-LSTM module;
[0032] The hidden layer state is processed by SeLU activation function to obtain the flow trend prediction result of the basin outlet;
[0033] Among them, the input features are , x t = j o i n [ O f u s i o n , X f u t u r e ] , For future rainfall characteristics, , is the number of rainfall stations, For the Rainfall values at rain gauge stations.
[0034] Furthermore, the Graph-LSTM module is constructed as follows:
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041] In the above formula, is the input gate, is the output gate, For the Gate of Forgetfulness, for function; , , and They are the Graph-LSTM unit input gates respectively , the Forget Gate , output gate Corresponding to cell state The training weight of Represents the current moment Next node Information, , , , They correspond to the input gate, forget gate, output gate and cell state results respectively The training weights, , , and are the corresponding constants respectively; and represents the first intermediate calculation result and the second intermediate calculation result, is the hidden layer state of the unit;
[0042] is the bias term of the input gate, is the bias term of the output gate, is the bias term of the forget gate, is the bias term of the cell state, For nodes In the previous time step A hidden state of -1, For nodes In the previous time step -1 cell status.
[0043] In a second aspect, the present invention provides a processing device, comprising:
[0044] Obtaining future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin to be predicted, inputting the future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin into a pre-built feature-enhanced fusion spatiotemporal graph neural network model, and obtaining the flow trend prediction result of the basin outlet as output by the model;
[0045] The feature enhancement fusion spatiotemporal graph neural network model includes a graph structure module, a spatial graph convolutional network module, a feature enhancement fusion layer module and a result output module, wherein:
[0046] The graph structure module is used to construct a distance graph and a correlation graph between a rain gauge station and a watershed outlet based on the historical rainfall values and historical flow values monitored by rain gauges at different spatial locations;
[0047] The spatial graph convolutional network module is used to perform feature extraction using a spatial GCN according to a connection matrix of the distance graph and the correlation graph to obtain a first processing result;
[0048] The feature addition fusion layer module is used to enhance and fuse the first processing result according to the initial state of the watershed to obtain a second processing result;
[0049] The result output module is used to input the future rainfall characteristics and the second processing result into a pre-trained Graph-LSTM module, and after the output of the Graph-LSTM module is processed by the SeLU activation function, the flow trend prediction result of the basin outlet is obtained.
[0050] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the aforementioned methods when executed by a processor.
[0051] In a fourth aspect, the present invention provides a computer device, comprising:
[0052] Memory, used to store computer programs / instructions;
[0053] A processor is configured to execute the computer program / instructions to implement the steps of any of the aforementioned methods.
[0054] In a fifth aspect, the present invention provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the aforementioned methods when executed by a processor.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] The present invention provides a hydrological prediction method based on feature-enhanced fusion of spatiotemporal graph neural networks. First, the correlation between historical rainfall values and historical flow values monitored by rain gauges at different spatial locations is used to extract features using a graph. Then, the proposed spatial graph convolutional network is used to model these correlations.
[0057] Secondly, a feature enhancement fusion layer is designed. This layer sets a tanh excitation function, which is equivalent to setting a trigger switch. The initial state of the watershed can increase the weight of the effect of historical rainfall on flow, and has different enhancement effects on watersheds with different soil moisture profiles.
[0058] Finally, a Graph-LSTM module, combining long-short-term memory networks with graph-based and contextual gating mechanisms, was designed to consider global contextual information when modeling temporal dependencies. The hydrological trend prediction model based on a spatiotemporal graph neural network with feature enhancement and fusion, described in this paper, has high practical value and potential for widespread application in hydrological forecasting for small and medium-sized watersheds. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 This is a framework diagram of the spatiotemporal graph neural network prediction model based on feature enhancement fusion;
[0060] Figure 2 distance and correlation maps constructed for historical rainfall flow inputs;
[0061] Figure 3 Schematic diagram of feature enhancement and fusion module;
[0062] Figure 4 Schematic diagram of the Graph-LSTM module;
[0063] Figure 5 The prediction curves of the model of the present invention on four watershed data sets with a prediction step of 6 hours;
[0064] Figure 6 Flowchart of the hydrological prediction method based on feature enhancement and fusion of spatiotemporal graph neural network. DETAILED DESCRIPTION
[0065] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations on the technical solution of the present application. Unless there is a conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.
[0066] The term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, the character " / " in this document generally indicates an "or" relationship between the related objects.
[0067] Example 1
[0068] Figure 6 This is a flow chart of a hydrological prediction method based on feature enhancement and fusion of spatiotemporal graph neural network in the first embodiment of the present invention. The hydrological prediction method based on feature enhancement and fusion of spatiotemporal graph neural network provided in this embodiment can be applied to a terminal and can be executed by a hydrological prediction device based on feature enhancement and fusion of spatiotemporal graph neural network. The device can be implemented by software and / or hardware and can be integrated into a terminal, for example: any smart phone, tablet computer or computer device with communication function. Figure 6 , the method of this implementation specifically includes the following steps:
[0069] Obtaining future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin to be predicted, inputting the future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin into a pre-built feature-enhanced fusion spatiotemporal graph neural network model, and obtaining the flow trend prediction result of the basin outlet as output by the model;
[0070] The feature enhancement fusion spatiotemporal graph neural network model includes a graph structure module, a spatial graph convolutional network module, a feature enhancement fusion layer module and a result output module, wherein:
[0071] The graph structure module is used to construct a distance graph and a correlation graph between a rain gauge station and a watershed outlet based on the historical rainfall values and historical flow values monitored by rain gauges at different spatial locations;
[0072] The spatial graph convolutional network module is used to perform feature extraction using a spatial GCN according to a connection matrix of the distance graph and the correlation graph to obtain a first processing result;
[0073] The feature addition fusion layer module is used to enhance and fuse the first processing result according to the initial state of the watershed to obtain a second processing result;
[0074] The result output module is used to input the future rainfall characteristics and the second processing result into a pre-trained Graph-LSTM module, and after the output of the Graph-LSTM module is processed by the SeLU activation function, the flow trend prediction result of the basin outlet is obtained.
[0075] Furthermore, the distance map constructed is , ,in,
[0076] is the distance weight constructed, , It represents the basin outlet flow monitoring station, Expressed as Rainfall monitoring stations, Indicated as the basin outlet flow monitoring station to the The distance between rainfall monitoring stations, A collection of monitoring sites;
[0077] The correlation diagram constructed is , ,in,
[0078] is the relevant weight of the construction, , Pearson correlation coefficient, the output range is -1 to +1, negative value means negative correlation, positive value means positive correlation.
[0079] Furthermore, spatial GCN is used to perform feature extraction based on the connection matrix of the distance graph and the correlation graph to obtain a first processing result, including:
[0080] pass The function connects the distance map matrix and the correlation map matrix to obtain the comprehensive matrix;
[0081] Combined with the feature matrix of historical monitoring data, a two-layer spatial GCN is used to extract features from the comprehensive matrix to obtain the feature extraction results;
[0082] The feature extraction result is processed in combination with the feature extraction weight to obtain a first processing result; wherein,
[0083] The comprehensive matrix is , A * = j o i n [ A D , A T ] , the feature extraction result is , , is the characteristic matrix of historical monitoring data, is the activation function, is the degree matrix, is the weight matrix of the first layer of spatial GCN, is the weight matrix of the second layer of spatial GCN, and the first processing result is , , Extract weights for features.
[0084] Furthermore, the first processing result is enhanced and fused according to the pre-acquired initial state of the watershed to obtain a second processing result, including:
[0085] Preprocessing the pre-acquired initial state of the watershed to obtain a preprocessing result, wherein the initial state of the watershed includes soil moisture content and soil evaporation;
[0086] According to the first processing result and the preprocessing result, combined The excitation function is used for processing to obtain a second processing result;
[0087] The preprocessing result is , ,in is the state processing weight, is the combined input of evaporation and soil moisture values, X s t a t e = n o n m a l ( j o i n [ X e v a , X s o i l ] ) , is the evaporation input, is the soil moisture content input;
[0088] The second processing result is , , is element-wise multiplication.
[0089] Further,
[0090] The input of the Graph-LSTM module is , x t = j o i n [ O f u s i o n , X f u t u r e ] ,in, For future rainfall characteristics, .
[0091] Furthermore, the future rainfall characteristics and the second processing results are input into the Graph-LSTM module. After the output of the Graph-LSTM module is processed by the SeLU activation function, the flow trend prediction results of the basin outlet are obtained, including;
[0092] After normalizing the future rainfall characteristics and the second processing results, the input characteristics are obtained;
[0093] Input the input features into the Graph-LSTM module to obtain the hidden layer state output by the Graph-LSTM module;
[0094] The hidden layer state is processed by SeLU activation function to obtain the flow trend prediction result of the basin outlet;
[0095] Among them, the input features are , x t = j o i n [ O f u s i o n , X f u t u r e ] , For future rainfall characteristics, , is the number of rainfall stations, For the Rainfall values at rain gauge stations.
[0096] Furthermore, the Graph-LSTM module is constructed as follows:
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103] In the above formula, is the input gate, is the output gate, For the Gate of Forgetfulness, for function; , , and They are the Graph-LSTM unit input gates respectively , the Forget Gate , output gate Corresponding to cell state The training weight of Represents the current moment Next node Information, , , , They correspond to the input gate, forget gate, output gate and cell state results respectively The training weights, , , and are the corresponding constants respectively; and represents the first intermediate calculation result and the second intermediate calculation result, is the hidden layer state of the unit;
[0104] is the bias term of the input gate, is the bias term of the output gate, is the bias term of the forget gate, is the bias term of the cell state, For nodes In the previous time step A hidden state of -1, For nodes In the previous time step -1 cell status.
[0105] The processing method provided in this embodiment specifically involves the following steps:
[0106] The following describes the contents involved in the above embodiment in conjunction with a preferred embodiment.
[0107] The method for hydrological prediction using a feature-enhanced fusion spatiotemporal graph neural network model includes the following steps:
[0108] Step 1: Input historical rainfall and flow values;
[0109] Step 2: Use graph structure to represent the correlation between rainfall stations and watershed outlets;
[0110] Step 3: Model the features through spatial graph convolutional network (GCN);
[0111] Step 4: Enhance the influence of the initial state of the watershed through the feature enhancement fusion layer;
[0112] Step 5: Use the Graph-LSTM module to model temporal dependencies;
[0113] Step 6: Output the trend prediction results of the basin outlet flow.
[0114] The historical rainfall and flow values in step 1 are the main input blocks of the model, including historical rainfall input data and historical flow input data, which are normalized after being connected.
[0115] In step 2, a graph structure is used to represent the correlation between rain gauges and basin outlets. Specifically, the historical rainfall flow input is displayed in the form of a graph, and a distance graph and a correlation graph are constructed.
[0116] Step 3 models the features through a spatial graph convolutional network, and extracts features by fusing the two connection matrices of the distance graph and the correlation graph constructed in step 2.
[0117] Step 4 uses a feature enhancement fusion layer to enhance the influence of the initial state of the watershed. This layer adjusts the contribution of the model's current input initial state to the output flow, particularly under different initial conditions of the watershed profile. Furthermore, a tanh excitation function trigger is implemented within the feature enhancement fusion layer to increase the weight of the initial state on the impact of historical rainfall on the output flow.
[0118] Step 5 uses the Graph-LSTM module to model temporal dependencies. The input of this module is the output of step 4 and future rainfall values. Then, based on the dynamic time Graph-LSTM network, it outputs spatiotemporal hydrological characteristics with temporal characteristics.
[0119] Step 6: Output the trend forecast results of the basin outlet flow. The specific output is the forecast of the basin outlet flow in the next 1-8 hours.
[0120] The historical flow and rainfall data input in step 1 are the main factors for future flow changes. Therefore, the historical flow and rainfall data are the input of the GCN feature extraction module in the ST-GNN model. We define the input of the GCN feature extraction module as , which is calculated as follows:
[0121] X G = n o n m a l ( j o i n [ X r a i n , X f l o w ] ) .
[0122] in, Input data for historical rainfall, Input data for historical traffic, then do joins and data normalization.
[0123] Step 2 Figure 2 As shown in the figure, the relationship between rainfall stations and watershed outlets is represented by a graph structure. Specifically, the historical rainfall flow input is displayed in the form of a graph to construct a distance graph and a correlation graph. Gray nodes represent rainfall stations and red nodes represent watershed outlet hydrological stations. Edges represent the spatial correlation and temporal dependency between nodes.
[0124] Step 3: The features are modeled through the spatial graph convolutional network (spatial GCN), and the features are extracted by fusing the two connection matrices of the distance graph and the correlation graph constructed in step 2.
[0125] Distance graph, that is, the reciprocal of the distance is used to represent the weight between stations. The distance graph constructed is represented as The distance weight constructed is the inverse of the spatial river distance: .
[0126] in, It represents the basin outlet flow monitoring station, Expressed as Rainfall monitoring stations, Indicated as the basin outlet flow monitoring station to the The distance between rainfall monitoring stations.
[0127] The correlation diagram is constructed by using historical monitoring data (rainfall, flow), and then calculating the correlation between each two stations as the station weight in the diagram. Here, the Pearson coefficient is used to calculate the correlation. The constructed correlation diagram is represented as , the calculation method of the constructed relevant weight is:
[0128]
[0129] in is the Pearson correlation coefficient, the output range is -1 to +1, negative values are negative correlation, and positive values are positive correlation. Then connect the distance map matrix and the correlation map matrix to get A * = j o i n [ A D , A T ] Finally, a 2-layer spatial GCN is used for feature extraction, and the output is:
[0130]
[0131] in is the characteristic matrix of historical monitoring data, is the weight. The final output of the GCN feature extraction module is:
[0132] ,
[0133] in is the weight of the GCN feature extraction module.
[0134] Step 4 Figure 3 As shown, the input of the feature enhancement fusion module includes the output of the GCN feature extraction module and evaporation and soil moisture output after pre-processing , is calculated as follows:
[0135]
[0136] in is the state processing weight, The evaporation and soil moisture values are jointly input and then normalized, which can be formalized as follows:
[0137] X s t a t e = n o n m a l ( j o i n [ X e v a , X s o i l ] )
[0138] Among them, is the evaporation input, Input for soil moisture content.
[0139] Finally, a feature enhancement fusion module is set inside The excitation function triggers the device. Once the soil moisture content is high, the output of the spatial GCN module contributes more to the predicted target. The output of the feature enhancement fusion module is as follows:
[0140]
[0141] in, is element-wise multiplication.
[0142] Step 5 Figure 4 As shown, the Graph-LSTM module is used to model temporal dependencies. First, features are extracted at each moment using a spatial GCN network. Based on feature similarity, similar regions between adjacent moments are connected to form a temporal graph. The Graph-LSTM module then takes the extracted spatial features of rainfall and runoff as input and returns spatiotemporal hydrological features with temporal characteristics, which are then used as input for flow prediction.
[0143] Specifically, the function The definition is as follows:
[0144]
[0145]
[0146]
[0147]
[0148]
[0149]
[0150] As shown in the above formula, the Graph-LSTM network unit structure is similar to the conventional LSTM, which is composed of an input gate, a forget gate, and an output gate. is the input gate, is the output gate, It is a forget gate. The difference is that a Graph-LSTM unit is composed of multiple inputs in the early stage, where and Depends on the previous moment All Graph-LSTM unit states, for function; , , and They are the input gate, forget gate, output gate and cell state of the Graph-LSTM unit respectively The training weight of Indicates the current Receive the previous node at any time Information, , , , They correspond to the input gate, forget gate, output gate and cell state results respectively The training weights, , , and They are the corresponding constants respectively; and the forget gate Depends only on the previous state associated with the gate. and Represents the intermediate calculation results within the Graph-LSTM unit, and then and taken into account and will be Combined to produce the unit hidden layer state .
[0151] Input to the Graph-LSTM module Output of the feature enhancement fusion module in step 4 and future rainfall The specific calculation method is as follows:
[0152] x t = j o i n [ O f u s i o n , X f u t u r e ]
[0153] here This is a matrix splicing operation. In small and medium-sized watersheds with small drainage areas, the future rainfall data used in hydrological flow simulation can generally be the average value of the monitoring data of each rain gauge. Therefore, the future rainfall input is defined as follows:
[0154]
[0155] in, is the number of rainfall stations, For the Rainfall values at rain gauge stations.
[0156] Step 6: Output the trend prediction results of the basin outlet flow. The output of the Graph-LSTM module in step 5 is processed by the SeLU activation function to obtain the final output .
[0157] 1. Implementation Background
[0158] This model was validated using four representative small- and medium-sized watershed datasets: the Changhua, Chenhe, Pingyao, and Daheba basins. These data cover both humid and semi-arid sub-humid watershed types. The experiments aimed to verify the model's predictive capabilities under diverse hydrological conditions and compare its performance with traditional models and simplified variants, highlighting the contributions of the feature enhancement fusion module and initial watershed state input.
[0159] 2. Data Source and Processing
[0160] The experimental data comes from long-term observation data collected by ground monitoring stations, including:
[0161] Changhua River Basin: hourly data from 1998 to 2010;
[0162] Chen River Basin: hourly data from 2003 to 2010;
[0163] Pingyao Basin: hourly data from 2000 to 2012;
[0164] Daheba Basin: hourly data from 2002 to 2014.
[0165] Data preprocessing includes:
[0166] Normalization processing: standardize historical rainfall, flow, evaporation and soil moisture data to eliminate dimensional differences;
[0167] 3. Experimental Setup and Model Parameters
[0168] The experiment was run on a Linux server using the TensorFlow and Keras frameworks, with Python 3.6 as the programming language. The ST-GNN core parameters are as follows: Spatial Graph Convolutional Network (GCN): hidden layer dimension 64, connectivity depth 4 layers; Graph-LSTM module: hidden layer dimension 128, time step size consistent with the input window; feature enhancement fusion layer: tanh activation function, weight adjustment coefficients optimized by backpropagation; Adam optimizer, learning rate 0.001, batch size 256; and input time window Initially set to 10, then =[4, 5, 6, 7, 8, 9, 10] select the optimal input window length for different experimental basins.
[0169] 4. Experimental Results and Analysis
[0170] On the four watershed datasets, the prediction results of the ST-GNN model with a prediction step of 6 hours are as follows Figure 5As shown in the figure, the blue part represents the actual measured value, and the red part is the predicted value of the ST-GNN model. Experimental results show that when the prediction step length is 6 hours, the error between the peak value of the predicted curve and the peak value of the actual curve is small, achieving the prediction accuracy of Class A.
[0171] 5. Implementation Conclusion
[0172] This example demonstrates the technical advantages of the ST-GNN model through comparative experiments across multiple watersheds. The feature enhancement fusion layer significantly improves the model's adaptability to varying soil moisture conditions by dynamically adjusting the initial state weights of the watershed. The Graph-LSTM module effectively captures the spatiotemporal dependencies of hydrological processes by combining graph structures with time series modeling capabilities. The multi-source input design (historical data, initial state, and future trends) comprehensively covers the factors influencing runoff mechanisms, enhancing the robustness of predictions. These results demonstrate the high practical value and potential for widespread application of the model in hydrological forecasting for small and medium-sized watersheds, making it particularly suitable for flood prevention and water resource management.
[0173] Embodiment 2: This embodiment provides a processing device, including:
[0174] Obtaining future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin to be predicted, inputting the future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin into a pre-built feature-enhanced fusion spatiotemporal graph neural network model, and obtaining the flow trend prediction result of the basin outlet as output by the model;
[0175] The feature enhancement fusion spatiotemporal graph neural network model includes a graph structure module, a spatial graph convolutional network module, a feature enhancement fusion layer module and a result output module, wherein:
[0176] The graph structure module is used to construct a distance graph and a correlation graph between a rain gauge station and a watershed outlet based on the historical rainfall values and historical flow values monitored by rain gauges at different spatial locations;
[0177] The spatial graph convolutional network module is used to perform feature extraction using a spatial GCN according to a connection matrix of the distance graph and the correlation graph to obtain a first processing result;
[0178] The feature addition fusion layer module is used to enhance and fuse the first processing result according to the initial state of the watershed to obtain a second processing result;
[0179] The result output module is used to input the future rainfall characteristics and the second processing result into a pre-trained Graph-LSTM module, and after the output of the Graph-LSTM module is processed by the SeLU activation function, the flow trend prediction result of the basin outlet is obtained.
[0180] The specific functional implementation of each of the above modules can be found in the relevant content of the method in Example 1 and will not be elaborated on here.
[0181] Example 3: This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of any one of the methods described in Example 1 are implemented.
[0182] Embodiment 4: This embodiment provides a computer device, including:
[0183] Memory, used to store computer programs / instructions;
[0184] A processor, configured to execute the computer program / instructions to implement the steps of any one of the methods described in Example 1.
[0185] Example 5: This embodiment provides a computer program product, including a computer program / instruction, which implements the steps of any method described in Example 1 when executed by a processor.
[0186] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
[0187] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Thus, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.
[0188] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0189] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0190] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0191] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure and are not intended to limit its scope of protection. Although the present disclosure has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that after reading the present disclosure, those skilled in the art can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the invention, but these changes, modifications or equivalent substitutions are all within the scope of protection of the disclosed claims to be approved.
Claims
1. A hydrological prediction method based on feature enhancement and fusion of spatiotemporal graph neural network, characterized in that: include: Obtaining future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin to be predicted, inputting the future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin into a pre-built feature-enhanced fusion spatiotemporal graph neural network model, and obtaining the flow trend prediction result of the basin outlet as output by the model; The feature enhancement fusion spatiotemporal graph neural network model includes a graph structure module, a spatial graph convolutional network module, a feature enhancement fusion layer module and a result output module, wherein: The graph structure module is used to construct a distance graph and a correlation graph between a rain gauge station and a watershed outlet based on the historical rainfall values and historical flow values monitored by rain gauges at different spatial locations; The spatial graph convolutional network module is used to perform feature extraction using a spatial GCN according to a connection matrix of the distance graph and the correlation graph to obtain a first processing result; The feature addition fusion layer module is used to enhance and fuse the first processing result according to the initial state of the watershed to obtain a second processing result; The result output module is used to input the future rainfall characteristics and the second processing result into the Graph-LSTM module, and after the output of the Graph-LSTM module is processed by the SeLU activation function, the flow trend prediction result of the basin outlet is obtained.
2. The hydrological prediction method based on feature enhancement and fusion of spatiotemporal graph neural network according to claim 1 is characterized in that: The distance map constructed is , ,in, is the distance weight constructed, , It represents the basin outlet flow monitoring station, Expressed as Rainfall monitoring stations, Indicated as the flow monitoring station at the outlet of the basin to the The distance between rainfall monitoring stations, A collection of monitoring sites; The correlation diagram constructed is , ,in, is the relevant weight of the construction, , Pearson correlation coefficient, the output range is -1 to +1, negative value means negative correlation, positive value means positive correlation.
3. The hydrological prediction method based on feature enhancement and fusion of spatiotemporal graph neural network according to claim 1 is characterized in that: Based on the connection matrix of the distance graph and the correlation graph, spatial GCN is used to extract features to obtain the first processing result, including: pass The function connects the distance map matrix and the correlation map matrix to obtain the comprehensive matrix; Combined with the feature matrix of historical monitoring data, a two-layer spatial GCN is used to extract features from the comprehensive matrix to obtain the feature extraction results; The feature extraction result is processed in combination with the feature extraction weight to obtain a first processing result; wherein, The comprehensive matrix is , , the feature extraction result is , , is the characteristic matrix of historical monitoring data, is the activation function, is the degree matrix, is the weight matrix of the first layer of spatial GCN, is the weight matrix of the second layer of spatial GCN, and the first processing result is , , Extract weights for features.
4. The hydrological prediction method based on feature enhancement and fusion of spatiotemporal graph neural network according to claim 1 is characterized in that: The first processing result is enhanced and fused according to the pre-acquired initial state of the watershed to obtain a second processing result, including: Preprocessing the pre-acquired initial state of the watershed to obtain a preprocessing result, wherein the initial state of the watershed includes soil moisture content and soil evaporation; According to the first processing result and the preprocessing result, combined The excitation function is used for processing to obtain a second processing result; The preprocessing result is , ,in is the state processing weight, is the combined input of evaporation and soil moisture values, , is the evaporation input, is the soil moisture content input; The second processing result is , , is element-wise multiplication.
5. The hydrological prediction method based on feature enhancement and fusion of spatiotemporal graph neural network according to claim 1 is characterized in that: The future rainfall characteristics and the second processing results are input into the Graph-LSTM module. After the output of the Graph-LSTM module is processed by the SeLU activation function, the flow trend prediction results of the basin outlet are obtained, including; After normalizing the future rainfall characteristics and the second processing results, the input characteristics are obtained; Input the input features into the Graph-LSTM module to obtain the hidden layer state output by the Graph-LSTM module; The hidden layer state is processed by SeLU activation function to obtain the flow trend prediction result of the basin outlet; Among them, the input features are , , For future rainfall characteristics, , is the number of rainfall stations, For the Rainfall values at rain gauge stations.
6. The hydrological prediction method based on feature enhancement and fusion of spatiotemporal graph neural network according to claim 1 is characterized in that: The Graph-LSTM module is constructed as follows: ; ; ; ; ; ; In the above formula, is the input gate, is the output gate, For the Gate of Forgetfulness, for function; , , and They are the Graph-LSTM unit input gates respectively , the Forget Gate , output gate Corresponding to cell state The training weight of Represents the current moment Next node Information, , , , They correspond to the input gate, forget gate, output gate and cell state results respectively The training weights, , , and are the corresponding constants respectively; and represents the first intermediate calculation result and the second intermediate calculation result, is the hidden layer state of the unit; is the bias term of the input gate, is the bias term of the output gate, is the bias term of the forget gate, is the bias term of the cell state, For nodes In the previous time step A hidden state of -1, For nodes In the previous time step -1 cell status.
7. A hydrological prediction device based on feature enhancement and fusion of spatiotemporal graph neural network, characterized in that: include: Obtaining future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin to be predicted, inputting the future rainfall characteristics, historical rainfall values, historical flow values, and the initial state of the basin into a pre-built feature-enhanced fusion spatiotemporal graph neural network model, and obtaining the flow trend prediction result of the basin outlet as output by the model; The feature enhancement fusion spatiotemporal graph neural network model includes a graph structure module, a spatial graph convolutional network module, a feature enhancement fusion layer module and a result output module, wherein: The graph structure module is used to construct a distance graph and a correlation graph between a rain gauge station and a watershed outlet based on the historical rainfall values and historical flow values monitored by rain gauges at different spatial locations; The spatial graph convolutional network module is used to perform feature extraction using a spatial GCN according to a connection matrix of the distance graph and the correlation graph to obtain a first processing result; The feature addition fusion layer module is used to enhance and fuse the first processing result according to the initial state of the watershed to obtain a second processing result; The result output module is used to input the future rainfall characteristics and the second processing result into the Graph-LSTM module, and after the output of the Graph-LSTM module is processed by the SeLU activation function, the flow trend prediction result of the basin outlet is obtained.
8. A computer device, characterized in that: including processors and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, which implement the steps of the method according to any one of claims 1 to 6 when executed by a processor.