River flow missing data reconstruction method
By constructing a graph convolutional network with a weighted adjacency matrix and multi-task collaborative learning, combined with meteorological dynamic weighting and dynamic iterative updates, the problem of missing data in river flow monitoring is solved, achieving high-precision and reliable flow reconstruction that is adaptable to different river network scenarios and extreme weather conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies for river flow monitoring suffer from large reconstruction errors and poor adaptability when flow data is missing. They are particularly inaccurate in reflecting the flow movement of river networks, especially in dam control areas and under extreme weather events. Furthermore, they lack mechanisms for identifying and correcting abnormal data, leading to inaccurate reconstruction results.
By constructing a graph convolutional network with a weighted adjacency matrix, integrating spatiotemporal features and multi-task collaborative learning, and combining meteorological dynamic weighting and dynamic iterative updates, accurate reconstruction of missing river flow data is achieved.
It improves the accuracy and reliability of flow reconstruction, adapts to different river network scenarios, and can accurately reflect the flow movement of river networks under extreme conditions such as heavy rainfall, reducing the impact of erroneous data and ensuring the quality of flow data.
Smart Images

Figure CN121743957A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent water conservancy, more specifically, the present application is a river flow missing data reconstruction method. BACKGROUND
[0002] In the river network flow monitoring and management work in the field of intelligent water conservancy, river flow data as the core basis of the analysis of the flow basin hydrology, water resources scheduling and flood control and drought relief decision, its integrity and accuracy directly affect the safe operation of water conservancy project and efficient use of water resources.
[0003] At present, the missing flow data is a common problem in the monitoring of the basin, and the existing technology has obvious defects in dealing with this problem: The traditional interpolation method mainly relies on Kriging, inverse distance weighting and other spatial interpolation algorithms, and only simple calculation is made through the numerical value of the adjacent monitoring points, completely ignoring the hydraulic connection between the rivers and the inherent hydrological propagation law of the river network. In the area regulated by the gate dam, the opening and closing of the gate will change the propagation path and speed of the water flow. The reconstruction error of this method is often large, and it is difficult to meet the accuracy requirements of the flow data in this area. The LSTM time series model only focuses on the historical flow data of a single monitoring station for time series prediction, and fails to integrate the topological constraint relationship between upstream and downstream stations. In the complex river network structure area such as the confluence of tributaries, the reconstruction error is high, and the overall water flow movement state of the river network cannot be accurately reflected. In addition, the existing technology also has many limitations: when dealing with extreme weather events such as heavy rain, the dynamic correlation between meteorological factors and flow changes is not fully considered, the mutation characteristics in the water flow propagation process cannot be quantified, and the reconstruction result deviates greatly from the actual flow. For sensor failure and other abnormal conditions, there is no effective identification and correction mechanism, which can easily mix error data into the reconstruction process, and then affect the quality of the final flow data. At the same time, these methods have poor adaptability when facing river networks of different scales and different topological structures, and it is difficult to achieve efficient and accurate reconstruction of missing flow data of various river networks. SUMMARY
[0004] In order to overcome the above-mentioned defects of the prior art, embodiments of the present application provide a river flow missing data reconstruction method, by setting up the river flow missing data reconstruction method, the steps of which are fused and used, topological space-time graph convolution: for the first time, the river network topology is encoded into a weighted adjacency matrix, the spatial correlation features are extracted through the graph convolution network, and the problem that the traditional method ignores the hydraulic connection is solved; multi-task collaborative learning mechanism: synchronous output of flow reconstruction value and confidence, combined with topological smoothing constraint, realizing the quantification of reconstruction reliability while ensuring the accuracy; dynamic weighted correction of meteorology: based on real-time rainfall intensity, the node weight is dynamically adjusted, and the nonlinear response of water flow in the heavy rainfall period is accurately adapted; dynamic iterative updating strategy: through abnormal data back-feeding and periodic updating, the model performance is continuously optimized, and the long-term application of different river network scenes is adapted, so as to solve the problems raised in the above background art.
[0005] To achieve the above object, the present application provides the following technical scheme: a river flow missing data reconstruction method, comprising the following steps: S1: constructing river network topology and quantifying hydraulic correlation. The topology of the river network is the basis for reflecting the shape and hydraulic connection of the river network. By clearly defining the topological elements of the river network, the connection relationship between the hydrological stations in the river network can be clearly combed, providing a framework for subsequent hydraulic analysis. Calculating the hydraulic weight of the river is the key to quantifying this hydraulic correlation, which takes into account factors such as river length and hydraulic drop, so that the weighted topological relationship constructed can accurately reflect the propagation resistance of water flow in the river. The establishment of this weighted topological relationship model provides a solid spatial correlation foundation for subsequent space-time feature extraction, ensuring that the extracted features can truly reflect the spatial distribution and hydraulic propagation characteristics of the river network, as follows: S11 topological element definition: determine the node set of the river network , The nodes represent key sites in the river network for monitoring flow and other hydrological information; the edge set is the river channel from to , the edge set clearly defines the connection relationship between the hydrological stations through the river channel, and at the same time, the flow direction attribute of the edge (such as the flow direction of the main channel and the direction of the tributary inflow) is defined, which is crucial for accurately simulating the propagation direction of water flow and is the basis for subsequent hydraulic analysis and flow calculation.
[0006] S12 edge weight calculation: construct a weight formula to quantify the propagation resistance of water flow by integrating river length and hydraulic drop (representing the hydraulic weight of the river channel from node to , used to quantify the propagation resistance of water flow in the river channel): (wherein Lr, for river length, Hr, for river drop, Balancing geometric and hydraulic effects), these two parameters are selected because the river length directly affects the time and path of water propagation, while the hydraulic drop determines the potential energy change and propagation power of the water flow, both of which jointly determine the propagation resistance of the water flow in the river. Through a large number of experiments and data analysis, it is determined that when a and β are 0.6 and 0.4 respectively, the influence of geometric factors and hydraulic factors on the weight can be well balanced, and the weighted adjacency matrix formed can provide accurate spatial weight information for subsequent graph convolution operations, supporting effective extraction of spatial correlation characteristics of river networks.
[0007] S2: Spatiotemporal feature fusion and multi-source information extraction. The change of river network flow is not only affected by time factors, but also closely related to spatial location and various environmental factors. Therefore, the fusion of time series flow, meteorological factors and topological features is a necessary means to fully capture the change rule of river network flow. The graph convolution and feature splicing method can effectively integrate different types and dimensions of features to extract comprehensive information that reflects the spatiotemporal correlation of river networks, providing rich and effective feature support for subsequent flow reconstruction. Specifically as follows: S21 Temporal feature coding: hourly data is intercepted with a 72-hour sliding window. The reason for choosing 72 hours is that in the hydrological characteristics of this basin, rainfall from occurrence to peak flow and then subsidence usually completes a complete process in about 72 hours. Such a time window can fully capture short-term hydrological dynamics. Extract rainfall( ), flow( ), and water level( ) time series features to form a vector , (where represents rainfall data at time , indicates flow data at time t, is the water level data at time t) These features reflect the time variation trend of hydrological conditions from different angles.
[0008] S22 Spatial graph convolution operation: input the weighted adjacency matrix of S1, and extract river spatial correlation features through the graph convolution network (GCN), the formula is: (Where is the normalized adjacency matrix, is the feature of the layer, is the convolution kernel parameter, and the spatial correlation expression is strengthened through multiple GCN layers), the graph convolution network can use the spatial information in the weighted adjacency matrix to continuously strengthen the expression of the spatial correlation of the river network through multiple convolution operations, so that the extracted spatial features can more accurately reflect the mutual influence and correlation between river channels.
[0009] : Output feature matrix of the i-th layer of the graph convolution network.
[0010] : Activation function, introducing a nonlinear transformation, enhancing the model's ability to express complex features, avoiding the limitations of linear models.
[0011] S23 Multi-source feature fusion: Splicing static attributes (denoted as ) such as river roughness and cross-section area with spatio-temporal features, outputting a fusion matrix The static attributes such as river roughness and cross-section area are inherent characteristics of the river network, which determine the basic properties of the river's water carrying capacity and water flow resistance. By fusing these static attributes with spatio-temporal features, the model's adaptability to the inherent properties of the river network can be enhanced, allowing the model to maintain good performance in different types of river networks.
[0012] In the formula, represents the feature dimension splicing. If there are 2 static attributes, then .
[0013] : Denotes the fused feature matrix, integrating spatial correlation features and river network static attributes.
[0014] : Spatial correlation feature matrix output by the i-th layer of the graph convolution network (GCN), containing the topological relationship and spatial interaction information between river network nodes. For example, if the number of nodes is n, the dimension of this matrix can be represented as (128 is the feature dimension).
[0015] : River network static attribute matrix, containing inherent physical parameters such as river roughness and cross-section area, which determine the river's water carrying capacity and water flow resistance characteristics. For example, if there are 2 static attributes, the dimension can be represented as .
[0016] S3: Multi-task collaborative flow reconstruction and confidence prediction. Simultaneously complete flow missing value reconstruction and result confidence prediction, which can evaluate the reliability of the results while obtaining the flow reconstruction results, providing a reference for data application. Topological smoothing constraints are introduced to ensure that the reconstructed flow data conforms to the physical laws of river network hydraulic propagation, ensuring the hydraulic continuity of the river network and avoiding conflicts between upstream and downstream flow data, as follows: S31 Main task flow reconstruction: Reconstructing the flow data through a multi-layer perceptron (MLP) ) on the fusion features decoded, output missing flow reconstruction value .
[0017] The network structure is selected through multiple experiments, and the 2-layer hidden layer and 64 neurons in each layer can ensure the reconstruction accuracy while avoiding overfitting caused by too complex model, and the feature conversion is realized through weight matrix and activation function (ReLU): Hidden layer 1 output:
[0018] Hidden layer 2 output:
[0019] Output layer (flow value):
[0020] (where , , is the weight matrix, , , is the bias term, which is obtained by training and optimization).
[0021] S32 auxiliary task confidence prediction: based on the fusion feature H, the confidence of the reconstruction result is calculated through the parallel MLP branch combined with the Sigmoid function, and the core logic is as follows: Feature sharing: the fusion feature H output by S2 is shared with the flow reconstruction, which ensures that the confidence evaluation and the flow reconstruction are based on the same set of multi-source information (spatiotemporal features, topological relationships, static attributes), ensuring the objectivity and accuracy of the confidence evaluation; Branch calculation: the feature H is converted through an independent MLP subnetwork (containing 1-2 layers of hidden layer), and the output dimension is 1. The independent subnetwork can be optimized for the characteristics of confidence prediction; Probability mapping: the Sigmoid function is used to map the intermediate value to the [0, 1] interval, which is very suitable for representing probability or confidence : ) (where is the multi-layer perceptron dedicated to confidence prediction, and the parameters are independent of those of the flow reconstruction) Physical meaning: quantifies the reliability of the reconstruction result, and the higher the value, the stronger the explanation of the fusion feature to the flow change (such as consistent upstream and downstream topological constraints, matching of meteorological factors and flow trend), otherwise there is an abnormal risk; threshold triggering: when When the value is less than 0.3, it is judged as a low reliability result, and the manual verification process is triggered immediately. This threshold is determined based on a large amount of historical data and actual application needs, and can effectively filter out low reliability results that require manual intervention.
[0022] S33 Loss Function Design: Introducing Topological Smoothing Constraints The loss function is to jointly optimize traffic accuracy, confidence, and topological continuity: ( For real traffic, For confidence level labels, =0.1 constraint on the hydraulic continuity of adjacent node reconstruction results. The introduction of topological smoothness constraint ensures that the model focuses not only on the accuracy of flow reconstruction at individual nodes during training, but also on the coordination between upstream and downstream flow, thus guaranteeing the hydraulic continuity of the river network. A value of 0.1 can strike a balance between flow accuracy and topology continuity; in: Total loss value, used to measure the overall deviation between the model's predictions and the actual situation.
[0023] Mean squared error, used to quantify traffic reconstruction values. Compared with actual traffic value The deviation between them is expressed by the formula: ( The number of nodes directly reflects the accuracy of traffic reconstruction.
[0024] Binary cross-entropy is used to evaluate confidence prediction results. With confidence labels Consistency (where 1 represents reliable and 0 represents unreliable) is expressed by the following formula: This ensures the accuracy of the confidence assessment.
[0025] : Topological smoothing constraint term, where Constraint coefficient It represents the sum of the absolute differences in the reconstructed flow values of adjacent nodes, used to ensure the hydraulic continuity of the flow upstream and downstream of the river network and to avoid contradictory reconstruction results.
[0026] This loss function achieves multi-objective collaborative optimization by fusing three types of sub-losses: use Ensure that the error between the reconstructed traffic value and the actual value is minimized to guarantee basic accuracy; pass Optimize the reliability of confidence prediction so that the model can accurately identify low-quality reconstruction results; By introducing topological smoothing constraints, the reconstructed flow of adjacent nodes is forced to conform to the hydraulic propagation law, thus avoiding data discrepancies between upstream and downstream.
[0027] A weighted combination of the three (e.g., in the embodiment) Weight 0.7 With a weight of 0.2 and a topology smoothing loss weight of 0.1, the model can simultaneously consider flow accuracy, confidence reliability, and river network hydraulic continuity during training, ultimately improving the overall quality of flow data reconstruction in complex scenarios.
[0028] S4: Dynamic Weighting and Result Correction of Meteorological Factors. Meteorological factors such as heavy rainfall have a significant impact on river network flow. Introducing real-time rainfall data and dynamically adjusting node weights enables the model to respond to these changes in a timely manner. "Propagation-based correction" is performed through the upstream-downstream flow propagation relationship, rather than independently scaling the flow of individual nodes. This better reflects the physical process of water flow propagation along the river channel, thus effectively improving the accuracy of flow reconstruction in heavy rainfall scenarios, as detailed below: S41 Rainfall Data Access: Access CMPA high-precision rainfall grid data (e.g., resolution) This data has high resolution and can accurately reflect the spatial distribution of rainfall, providing reliable data support for real-time rainfall monitoring and extracting real-time rainfall intensity from upstream nodes. Rainfall at upstream nodes has a more direct and significant impact on downstream flow, therefore, we should focus on rainfall at upstream nodes.
[0029] S42 Dynamic Weight Calculation: Based on the Relationship Between a Node and Its Upstream (Quantifying the degree to which downstream nodes are affected by upstream rainfall) and rainfall index The impact weights of rainfall are calculated using the softmax function: (The greater the rainfall intensity, the higher the weight of upstream nodes, thus strengthening the characterization of rainfall's driving effect on downstream water flow.) The formula for calculating the rainfall index. (Dividing by 10 to normalize and avoid exponential explosion) This design can reasonably quantify the impact of rainfall intensity on the weights, while preventing excessively large exponential values due to excessive rainfall intensity from affecting the calculation.
[0030] By using the logic of "quantifying the impact of rainfall intensity by rainfall index → calculating node scores by combining correlation with rainfall index → obtaining dynamic weights by softmax normalization", the dynamic adjustment of node weights based on real-time rainfall is realized, enabling the model to accurately adapt to the nonlinear changes in water flow under heavy rainfall scenarios and improve the accuracy of flow reconstruction.
[0031] in: (1) Formula for calculating rainfall index:
[0032] The real-time rainfall intensity (unit: mm / h) at the upstream node at time t reflects the strength of the current rainfall.
[0033] Rainfall index: The rainfall intensity is converted into a quantified influencing factor through an exponential function.
[0034] Dividing by 10 is to normalize the rainfall intensity, avoid the exponential value from expanding rapidly (exponential explosion) due to excessive rainfall intensity (such as rainstorms), and ensure the stability of the calculation.
[0035] (2) Dynamic weight calculation
[0036] : The dynamic weight of the i-th downstream node, with a value range between [0, 1] and the sum of the weights of all nodes is 1, used to quantify the proportion of the impact of upstream rainfall on the flow of this node; : The correlation between node i and the upstream, pre-quantifying the degree to which downstream nodes are affected by upstream rainfall (the higher the correlation, the more significant the impact of upstream rainfall). The softmax function converts the scores of each node into normalized weights, using the following formula: This ensures that the total weight is 1, which facilitates the proportional allocation during subsequent traffic correction.
[0037] S43 Reconstruction Result Correction: Based on the hydrological principle of "upstream rainfall driving downstream flow changes," dynamic weights are used to adjust the upstream and downstream flow propagation contributions, resulting in the corrected result. It adapts to the nonlinear response of sudden changes in water flow during periods of heavy rainfall, thereby improving the reconstruction accuracy in heavy rainfall scenarios.
[0038] in: The corrected traffic reconstruction value is the final result used to reflect the actual traffic of the node.
[0039] : Traffic reconstruction value before correction (output by S31 main task).
[0040] The dynamic weights calculated in S42 quantify the proportion of the impact of upstream rainfall on the current node's flow (value range [0, 1]).
[0041] The reconstructed flow of the upstream associated nodes of the current node reflects the driving effect of the upstream hydrological status on the downstream.
[0042] pass Quantifying the contribution of upstream flow changes to the current node enables "propagational correction" of rainfall impacts, rather than independent scaling of flow at individual nodes. This better aligns with the physical process of water flow propagation along the river channel, effectively adapting to the nonlinear response of sudden changes in water flow during periods of heavy rainfall, and improving the accuracy of flow reconstruction in complex meteorological scenarios.
[0043] S5: Anomaly Detection and Dynamic Model Update. Identifying and correcting abnormal data allows for timely correction of the impact of erroneous data on the model, ensuring the quality of the model's input data. Periodic iterative model updates enable the model to continuously adapt to changes in river network hydrological conditions, continuously optimize performance, and guarantee the model's real-time repair capabilities for long-term applications. Specifically: S51 Anomaly Detection: Based on the confidence level output by S3 As core data, Reconstruction results with a value <0.3 are marked as anomalous data (such as jump values caused by sensor failure, or sudden changes in flow that do not conform to the propagation law during heavy rainfall). The anomalous data can also be identified by combining the fluctuation range of historical data and the correlation between upstream and downstream flow, thereby improving the accuracy of anomalous identification.
[0044] S52 Manual Verification and Feedback: Abnormal data triggers manual verification. Water conservancy experts correct the data by combining river physical parameters (such as roughness and cross-sectional area) and historical hydrological patterns. The corrected data is then reinjected into the model for partial updates. and The output layer parameters are updated locally, which can quickly enhance the robustness of the model to abnormal scenarios while ensuring the stability of model performance.
[0045] S53 Dynamic Iterative Update: Every hour (or according to the actual data update cycle), S1~S4 are repeated to dynamically update the model parameters based on the latest monitoring data, achieving real-time repair and dynamic completion of missing flow data. An hourly update cycle is chosen because river network flow data is typically updated hourly; this cycle ensures timely inclusion of new data and guarantees the model's timeliness. Simultaneously, the update cycle can be flexibly adjusted based on the frequency of data updates and the complexity of model calculations in practical applications.
[0046] The technical effects and advantages of this invention are as follows: This invention establishes a method for reconstructing missing river flow data, in which each step is integrated and used together. The topology-aware spatiotemporal graph convolution encodes the river network topology into a weighted adjacency matrix for the first time, and extracts spatial correlation features through a graph convolutional network, thus solving the problem of traditional methods neglecting hydraulic connections. Multi-task collaborative learning mechanism: synchronously output traffic reconstruction values and confidence levels, combined with topology smoothing constraints, to achieve quantification of reconstruction reliability while ensuring accuracy; Meteorological dynamic weighted correction: Based on real-time rainfall intensity, the node weights are dynamically adjusted to accurately adapt to the nonlinear response of water flow during periods of heavy rainfall; Dynamic iterative update strategy: By reinjecting abnormal data and periodically updating, the model performance is continuously optimized to adapt to long-term applications in different river network scenarios. Attached Figure Description
[0047] Figure 1 This is a flowchart of the overall method of the present invention, showing the entire process from "topology construction → spatiotemporal feature extraction → multi-task reconstruction → meteorological correction → anomaly detection → real-time update"; Figure 2 This is a data flow diagram of the entire invention, illustrating the various steps of the data flow. Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Example
[0049] As attached Figure 1 To be continued Figure 2 The method for reconstructing missing river flow data, as shown, includes the following steps: S1: Constructing the river network topology and quantifying hydraulic correlations (1) Definition of topological elements: Determine the river network node set and edge set. The river network node set represents multiple key stations in the river network used to monitor flow and hydrological information. The edge set clarifies the relationship between the hydrological stations through the river channel and defines the flow direction attribute of the edge set. (2) Calculation of edge weights: Combining the river channel length and hydraulic drop, construct a weight formula to quantify the resistance to water flow propagation. , ,in The length of the river channel. For the river section drop, S2: Spatiotemporal feature fusion and multi-source information extraction (1) Temporal feature encoding: Hourly data is extracted using a 72-hour sliding window to extract rainfall. ,flow Water level The temporal characteristics form a vector. ; (2) Spatial graph convolution operation: Input the river network node set and edge set data from step S1, and extract the spatial correlation features of the river channel through a graph convolution network. The formula is as follows: ,in For the normalized adjacency matrix, For graph convolutional networks The output feature matrix of the layer, For convolution kernel parameters, For graph convolutional networks The output feature matrix of the layer, For the activation function, a nonlinear transformation is introduced; (3) Multi-source feature fusion: static attributes such as river roughness and cross-sectional area are spliced with spatiotemporal features to output a fusion matrix. ; S3: Multi-task collaborative traffic reconstruction and confidence prediction (1) Main task traffic reconstruction: using a multi-layer perception mechanism to reconstruct fused features Decode and output missing traffic reconstruction values. ; (2) Confidence prediction for auxiliary tasks: Based on the fusion feature H, the confidence of the reconstruction result is calculated by combining the Sigmoid function with the parallel multilayer perception mechanism branch; (3) Loss function design: Topological smoothness constraint is introduced. The loss function is to jointly optimize traffic accuracy, confidence, and topological continuity: S4: Dynamic weighting of meteorological factors and result correction (1) Rainfall data access: Access CMPA high-precision rainfall grid data and extract real-time rainfall intensity from upstream nodes. ; (2) Dynamic weight calculation: based on the correlation between the node and the upstream. and rainfall index The impact weights of rainfall are calculated using the softmax function: The formula for calculating the rainfall index ; (3) Correction of reconstruction results: Based on hydrological patterns, dynamic weights are used to adjust the upstream and downstream flow propagation contributions to obtain the corrected results. It adapts to the nonlinear response of sudden changes in water flow during periods of heavy rainfall, thereby improving the reconstruction accuracy in heavy rainfall scenarios; S5: Anomaly Detection and Dynamic Model Update (1) Anomaly Data Identification: Based on the confidence level output in step S3 as the core data, the reconstruction results with a confidence level < 0.3 are marked as anomaly data; (3) Dynamic iterative update: Every hour, repeat steps S1 to S4 to dynamically update the model parameters based on the latest monitoring data, so as to realize the real-time repair and dynamic completion of missing traffic data.
[0050] In step S2(1), where Represents time Rainfall data within the area, Represents time Internal traffic data, Represents time The water level data within, in step S2 (3); : Indicates the concatenation of feature dimensions; : Represents the fused feature matrix, which integrates spatial correlation features and river network static attributes; : indicates that the graph convolutional network is composed of the 1st generation and 2nd generation. The spatial correlation feature matrix output by the layer contains the topological relationships and spatial interaction information between river network nodes; The static attribute matrix of the river network contains the inherent physical parameters of channel roughness and cross-sectional area. In step S3 (3), where: For real traffic, For confidence level labels, =0.1, This is the total loss value. Mean square error, For binary cross-entropy, For the topology smoothing constraint term, in step S4(2), Rainfall index calculation formula: ; Real-time rainfall intensity at the upstream node at time t, in mm / h, reflecting the intensity of the current rainfall; Rainfall index: A quantitative influencing factor that converts rainfall intensity into a quantitative value through an exponential function. Dividing by 10 normalizes the rainfall intensity. Dynamic weight calculation ,in; : The dynamic weight of the i-th downstream node, with a value in the range of [0, 1], and the sum of the weights of all nodes is 1; The degree of association between node i and its upstream node; In step S4(3), The corrected traffic reconstruction value is the final result used to reflect the actual traffic of the node; : The reconstructed flow value before correction; The dynamic weights calculated in step S4 quantify the proportion of the impact of upstream rainfall on the current node's flow. The reconstructed flow of the upstream associated node of the current node reflects the driving effect of the upstream hydrological state on the downstream. In step S5, the abnormal data in step S5 (1) can be manually verified. The data is corrected by water conservancy experts in combination with river physical parameters and historical hydrological patterns. The corrected data is then fed back into the model for local updates. and The output layer parameters.
[0051] Example 2 Example Scenario: The experimental river basin includes 12 hydrological stations and 3 dams. Hourly flow data from 2020 to 2023 is available, with a missing rate of 15%. Experimental verification is performed using this data, simultaneously integrating CMPA rainfall data and river channel physical parameters (roughness, cross-sectional area, etc.). S1 Topology Construction S11 Construct the adjacency matrix Take 3 hydrological station nodes ,in As an upstream node, For intermediate nodes (connection) and ), For downstream nodes; Edge set , express The river channel express to The river channel (flowing in the same direction as the direction of water propagation). side River length =5km, elevation difference =1m, then: .
[0052] side River length =8km, elevation difference =3m, then:
[0053] Adjacency Matrix The elements are the weights mentioned above (the weight of non-adjacent nodes is 0).
[0054] S21 Time Series Feature Encoding: Data is extracted using a 72-hour sliding window (from rainfall occurrence to peak flow and then to decline) to form a time series feature matrix. (72 rows correspond to 72 hours, 3 columns correspond to rainfall, flow rate, and water level), Example data (first 3 hours): S22 Spatial Graph Convolution Operation: Based on the weighted adjacency matrix constructed by S1, spatial correlation features are extracted through a 3-layer GCN (128 hidden dimensions per layer).
[0055] Weighted adjacency matrix Temporal feature matrix
[0056] Layer 1 output
[0057] No. The spatial characteristics of the layer are determined by the first Layer features, normalized adjacency matrix, and convolution kernel operations yield the following:
[0058] In the formula, For the normalized adjacency matrix, This is the feature matrix of the first layer. These are the parameters of the first layer convolution kernel. The activation function (introduces nonlinearity).
[0059] S23 Multi-source feature fusion: splicing spatial features With static properties (like The roughness and cross-sectional area form a fusion matrix: .
[0060] In the loss function, MSE has a weight of 0.7, BCE has a weight of 0.2, and SmoothLoss has a weight of 0.1; the training period is 100, and the batch size is 32.
[0061] S31 main task traffic reconstruction: via multilayer perceptron ( ) on fusion features Decode and output missing traffic reconstruction values. .
[0062]
[0063] S32 Auxiliary Task Confidence Prediction: Fusion Feature H via Specific After processing, through Output:
[0064] The third node =0.2<0.3, triggering manual verification.
[0065] Real traffic
[0066] Confidence level labels:
[0067] (1) Calculation of MSE (mean squared error): Substitute into the calculation:
[0068]
[0069] Substitute into the calculation:
[0070]
[0071] Substitute the data:
[0072]
[0073] Substitute the data:
[0074] S41 Rainfall Data Access: Scenario access to CMPA rainfall data, when rainfall occurs at upstream stations. When the flow rate is 25 mm / h, the correlation degree of the associated nodes Correct the reconstruction results.
[0075] S42 Dynamic Weight Calculation: Rainfall Index Calculation: (Divide by 10 to normalize and avoid exponential explosion) Substitute the data:
[0076] Node score calculation
[0077] S41 Rainfall Data Access: Scenario access to CMPA rainfall data, when rainfall occurs at upstream stations. When the flow rate is 25 mm / h, the correlation degree of the associated nodes Correct the reconstruction results.
[0078] S42 Dynamic Weight Calculation: Rainfall Index Calculation: (Divide by 10 to normalize and avoid exponential explosion) Substitute the data:
[0079] Node score calculation
[0080] Substitute the data:
[0081]
[0082]
[0083] Weight calculation
[0084] S43 reconstruction results correction:
[0085] (Upstream, no further upstream nodes):
[0086] (Upstream is) ):
[0087] (Upstream is) ):
[0088] Corrected flow rate:
[0089] S1~S4 are repeated every hour based on the latest data. Abnormal data <0.3 (such as the third node) =0.2) Triggers manual verification, corrected data is reinjected into the model and the MLP is updated. Parameters enable real-time repair of missing traffic data.
[0090] Finally, the following points should be noted: First, in the description of this application, it should be noted that, unless otherwise specified and limited, the terms "installation", "connection", and "linkage" should be interpreted broadly, and can be mechanical or electrical connections, or internal connections between two components, or direct connections. "Up", "down", "left", "right", etc. are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may change. Secondly: The accompanying drawings of the embodiments disclosed in this invention only involve the structures involved in the embodiments disclosed in this invention. Other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of this invention can be combined with each other. In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for reconstructing missing river flow data, characterized in that: Includes the following steps, S1: Constructing the river network topology and quantifying hydraulic correlations S1.1 Definition of topological elements: Determine the set of river network nodes and edge set. The set of river network nodes represents multiple key stations in the river network used to monitor flow and hydrological information. The edge set clarifies the relationship between the hydrological stations through the river channel and defines the flow direction attribute of the edge set. S1.2 Edge Weight Calculation: Combining the river channel length and hydraulic head, a weight formula is constructed to quantify the resistance to water flow propagation. , ,in The length of the river channel. For the river section drop, ; S2: Spatiotemporal Feature Fusion and Multi-Source Information Extraction S2.1 Temporal Feature Encoding: Extracting hourly data using a 72-hour sliding window to extract rainfall. ,flow Water level The temporal characteristics form a vector. ,in Represents time Rainfall data within the area, Represents time Internal traffic data, Represents time Water level data within; S2.2 Spatial Graph Convolution Operation: Input the river network node set and edge set data from step S1, and extract the spatial correlation features of the river channel through a graph convolutional network. The formula is as follows: ,in For the normalized adjacency matrix, For graph convolutional networks The output feature matrix of the layer, For convolution kernel parameters, For graph convolutional networks The output feature matrix of the layer, A nonlinear transformation is introduced for the activation function; S2.3 Multi-source feature fusion: splicing static attributes of river channel roughness and cross-sectional area with spatiotemporal features to output a fusion matrix. ,in, : Indicates the concatenation of feature dimensions; : Represents the fused feature matrix; : indicates that the graph convolutional network is composed of the 1st generation and 2nd generation. The spatial correlation feature matrix output by the layer; : Represents the static attribute matrix of the river network; S3: Multi-task collaborative traffic reconstruction and confidence prediction S3.1 Main Task Traffic Reconstruction: Using a multi-layer sensing mechanism to reconstruct fused features. Decode and output missing traffic reconstruction values. ; S3.2 Auxiliary task confidence prediction: Based on the fused feature H, the confidence of the reconstruction result is calculated by combining the Sigmoid function with the parallel multilayer perceptron branch; S3.3 Loss Function Design: Introducing Topological Smoothing Constraints The loss function is to jointly optimize traffic accuracy, confidence, and topological continuity: ,in: For real traffic, For confidence level labels, =0.1, This is the total loss value. Mean square error, For binary cross-entropy, This is a topology smoothing constraint term; S4: Dynamic weighting of meteorological factors and result correction S4.1 Rainfall Data Access: Access CMPA high-precision rainfall grid data and extract real-time rainfall intensity from upstream nodes. ; S4.2 Dynamic Weight Calculation: Based on the Relationship Between a Node and Its Upstream and rainfall index The impact weights of rainfall are calculated using the softmax function: The formula for calculating the rainfall index ; S4.3 Reconstruction Result Correction: Based on hydrological patterns, dynamic weights are used to adjust the upstream and downstream flow propagation contributions, resulting in the corrected outcome. It adapts to the nonlinear response of sudden changes in water flow during periods of heavy rainfall, thereby improving the reconstruction accuracy in heavy rainfall scenarios; S5: Anomaly Detection and Dynamic Model Update S5.1 Anomaly identification: Based on the confidence level output in step S3 as the core data, reconstruction results with a confidence level < 0.3 are marked as anomalies; S5.2 Dynamic Iterative Update: Every hour, repeat steps S1 to S4 to dynamically update the model parameters based on the latest monitoring data, thereby achieving real-time repair and dynamic completion of missing traffic data.
2. The method for reconstructing missing river flow data according to claim 1, characterized in that: In step S2.3, Integrating spatial correlation characteristics with river network static attributes, It includes information on the topological relationships and spatial interactions between river network nodes. It includes inherent physical parameters such as river channel roughness and cross-sectional area.
3. The method for reconstructing missing river flow data according to claim 1, characterized in that: In step S2.2, the spatial information in the weighted adjacency matrix is used by the graph convolutional network. Through multiple convolution operations, the expression of the spatial relationship of the river network is continuously strengthened, so that the extracted spatial features more accurately reflect the relationship between the river channels.
4. The method for reconstructing missing river flow data according to claim 1, characterized in that: In step S4.2, Rainfall index calculation formula: ; Real-time rainfall intensity at the upstream node at time t, in mm / h, reflecting the intensity of the current rainfall; Rainfall index: A quantitative influencing factor that converts rainfall intensity into a quantitative value through an exponential function. Dividing by 10 normalizes the rainfall intensity. Dynamic weight calculation ,in; : The dynamic weight of the i-th downstream node, with a value in the range of [0, 1], and the sum of the weights of all nodes is 1; The degree of association between node i and its upstream node; In step S4.3, The corrected traffic reconstruction value is the final result used to reflect the actual traffic of the node; : The reconstructed flow value before correction; The dynamic weights calculated in step S4 quantify the proportion of the impact of upstream rainfall on the current node's flow. The reconstructed flow of the upstream associated nodes of the current node reflects the driving effect of the upstream hydrological status on the downstream.
5. The method for reconstructing missing river flow data according to claim 1, characterized in that: In step S3, the core logic for the confidence level of the reconstruction result is as follows: Feature sharing: The fusion feature H output from step S3 is shared with traffic reconstruction to ensure that confidence assessment and traffic reconstruction are based on the same set of multi-source information; Branch computation: A separate MLP sub-network, containing 1-2 hidden layers, performs feature transformation on the fused feature H, outputting a median value with dimension 1. This independent sub-network is specifically optimized for confidence prediction. Probability mapping: The Sigmoid function is used to map the median value to the [0, 1] interval to represent probability or confidence. .
6. The method for reconstructing missing river flow data according to claim 1, characterized in that: In step S3.1, the multilayer sensing mechanism includes an input layer, a hidden layer, and an output layer. The hidden layer consists of two layers, each containing 64 neurons. The two hidden layers can prevent the model from overfitting while ensuring reconstruction accuracy.
Citation Information
Cited By
Hydrological sequence missing data complementation and trend prediction system and method
CN121958786A
A system and method for completing missing hydrological series data and predicting trends.
CN121958786B
River ecological abnormal change identification method based on machine learning
CN121980479A
A river ecological abnormal change identification method based on machine learning
CN121980479B
A multi-source water system data fusion method and device and a storage medium
CN122153811A