A River Network Hierarchy System and Method Based on Graph Theory and Convergence Accumulation
By combining graph theory and confluence accumulation, the river network classification is traced backward, solving the problems of ambiguity in the main tributary hierarchy and error propagation in existing river network classification methods. This achieves the stability of the river network classification and the accuracy of the river hierarchy, making it suitable for high-precision river network analysis and smart water conservancy management.
Patent Information
- Application Number
- CN202511725545.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-11-24
AI Technical Summary
Existing river network classification methods, such as the Strahler and Shreve methods, suffer from problems in high-precision river network refinement analysis, including fuzzy main and tributary hierarchy, failure to reflect differences in flow contribution, sensitivity to error propagation, and poor topological adaptability. They cannot accurately classify river levels and reflect differences in hydrological contribution.
A graph theory-based and confluence cumulant approach is adopted. By coupling directed graph topology modeling with confluence cumulant analysis, the river network hierarchy is traced backward. The relationship between the main trunk and tributaries is determined by combining the in-degree/out-degree of nodes and edge weights, pseudo nodes are eliminated, the topological connectivity of the river network is restored, and river network elements are assigned values based on confluence cumulant.
It achieves clear hierarchy of main and tributary streams, highlights the flow-driven logic, reversely traces and controls errors, improves hierarchical stability, and ensures the integrity of the river network structure. It is suitable for high-precision river network fine analysis and smart water conservancy emergency management.
Smart Images

Figure CN121189192B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a river network classification system and method based on graph theory and confluence accumulation, belonging to the fields of water conservancy engineering and geographic information technology. Background Technology
[0002] River network classification is fundamental to hydrological analysis, water resource management, and flood disaster early warning. Its core is to quantitatively divide rivers into different levels to reveal the structural characteristics and functional relationships of the river network. Currently, the most widely used river network classification methods in the industry include the Strahler classification method and the Shreve classification method, but both have significant limitations in high-precision, refined river network analysis scenarios.
[0003] (1) Strahler classification method (Strahler, 1957)
[0004] This method, proposed by Strahler in 1957, is one of the most commonly used methods for river network classification. Its core rules are:
[0005] The classification logic is as follows: upstream river sections without tributaries are classified as level 1; only when two river sections of the same level meet, the downstream river section is classified by level 1 (e.g., two level 1 river sections meet to form level 2, and two level 2 river sections meet to form level 3); when river sections of different levels meet, the downstream river section inherits the higher level (e.g., after a level 1 and a level 2 river section meet, it remains level 2).
[0006] limitation:
[0007] The hierarchy of main and tributary rivers is ambiguous: the hierarchy is divided only by the "same-level confluence and upgrading" rule, without considering the differences in flow contribution, making it difficult to distinguish the hierarchy of the main river channel and major tributaries;
[0008] Sensitive to error propagation: The classification results of upstream tributaries directly affect the downstream. If there are pseudo-nodes or broken river sections upstream, the error will be amplified step by step.
[0009] Poor topological adaptability: Insufficient ability to handle complex intersecting river networks (such as multiple tributaries flowing into the same node), and prone to hierarchical logical confusion.
[0010] (2) Shreve classification method (Shreve, 1966)
[0011] This method, proposed by Shreve in 1966, improves hierarchical logic based on the principle of "addition of magnitudes":
[0012] The classification logic is as follows: the upstream section without tributaries is classified as level 1 (with a magnitude of 1); when any two sections meet, the magnitude of the downstream section is the sum of the magnitudes of the two upstream sections (e.g., the meeting of level 1 and level 2 forms level 3, and the meeting of level 2 and level 3 forms level 5).
[0013] limitation:
[0014] The physical significance is weakened: the magnitude only reflects the superposition of the upstream river sections, without being related to the actual cumulative flow, and cannot reflect the differences in the hydrological contribution of the river sections;
[0015] The expansion of high-grade river sections: The magnitude of the river network is growing exponentially, resulting in an excessive number of high-grade river sections that obscure the dominant position of the main river channel.
[0016] Unresolved topological defects: Similarly, the problems of pseudo nodes and breaks in the river network extraction process are not considered, and the classification results are easily affected by data noise.
[0017] 2. Common defects of existing technologies
[0018] Both the Strahler method and the Shreve method share the following common problems:
[0019] Ignoring the correlation between flow rate and topography: hydrological indicators such as runoff accumulation and watershed area were not combined with topological structure, resulting in a disconnect between the classification results and the actual flow patterns;
[0020] Lack of reverse tracing mechanism: All are graded from upstream source to downstream, making it impossible to anchor the main starting point and susceptible to errors from upstream tributaries;
[0021] Pseudo-node interference: Pseudo-runoff nodes (such as short river section breaks) generated during river network extraction due to data noise or threshold screening can disrupt topological connectivity and further aggravate classification errors. Summary of the Invention
[0022] To address the aforementioned problems, this invention aims to provide a river network classification system and method based on graph theory and confluence accumulation, which achieves accurate classification along the main stream-tributary dimension through directed graph topology modeling coupled with confluence accumulation analysis.
[0023] The river network classification method based on graph theory and confluence accumulation described in this invention includes the following steps:
[0024] S1: Data preparation: Obtain raw DEM data and water system data, and convert the water system data to a preset projection coordinate system;
[0025] S2: River network extraction and deviation correction: Based on the DEM data, a primary river network is extracted, and the primary river network is filtered by combining the river network length and the drainage area to obtain a simplified river network;
[0026] S3: Pseudo-runoff node elimination: Identify and remove pseudo-nodes in the simplified river network to restore the topological connectivity of the river network;
[0027] S4: River network flow calculation: Assign flow values to each river network element in the simplified river network based on the cumulative flow.
[0028] S5: Graph modeling: The simplified river network is abstracted into a directed graph model, where the nodes in the directed graph model correspond to runoff sources, confluence points or outlets, the directed edges correspond to river segments, and the edge weights are the cumulative runoff amounts.
[0029] S6: River network classification: Starting from the outlet, trace back in reverse, combine the in-degree / out-degree of nodes and edge weights to determine the hierarchical relationship between the main stream and tributaries, and realize the river network classification.
[0030] Preferably, the data preparation in step S1 includes:
[0031] Obtain DEM data in .tif format and water system data from the basic geographic database;
[0032] The water system data was converted from the WGS1984 geographic coordinate system to the Albers projected coordinate system using a coordinate transformation tool.
[0033] Preferably, the river network extraction in step S2 specifically includes the following sub-steps:
[0034] S211: The DEM data is processed using a depression-filling algorithm to eliminate interruptions in the water flow path;
[0035] S212: The D8 algorithm is used to search for the maximum slope direction between the central grid and its eight neighboring grids. In the filled DEM data, the distance weight difference between the central grid and each adjacent grid is calculated to determine the outflow direction from each cell in the grid. The formula is:
[0036]
[0037] in, Indicates the maximum drop. Represents the change in elevation. This represents the distance between adjacent grid cells. When the cell size is 1, the distance between two orthogonal cells is 1, and the distance between two diagonal cells is... ;
[0038] S213: Based on the flow direction raster data, the total number of pixels flowing into each raster is counted, and the weighted raster data used to control flow distribution is superimposed to obtain the flow accumulation matrix within the spatial range;
[0039] S214: Based on the flow matrix, set the flow threshold, use the conditional function outCon=Con("DEM_flow">1000,1) to extract flow cells with a volume greater than 1000, and output a primary raster river network with a value of 1.
[0040] S215: Raster River Network Vectorization: Input a primary raster river network, supplemented by river flow direction data, and use the Douglas-Puk algorithm for line generalization to finally generate primary river network line features S. OR .
[0041] Preferably, the deviation correction in step S2 specifically includes the following sub-steps:
[0042] S221: Calculate the length of each river network element in the projected coordinate system and store it in the Length field;
[0043] S222: Capture the dumping point based on the vector river network data, use the watershed tool to input the flow direction data and the dumping point to obtain the grid watershed range, and then convert it into a vector surface watershed;
[0044] S223: Based on vector river network data, capture the dumping point, use the watershed tool to generate the raster watershed range and convert it into a vector surface watershed, calculate the watershed area of each runoff node and store it in the Area field;
[0045] S224: Based on the vector river network ID, link the river network length and the corresponding catchment area. If the river network length or catchment area is less than a set threshold, the "ER field" of the corresponding river network ID is marked as 1, thus obtaining the river network line element S. ER The formula is as follows:
[0046]
[0047] Where L represents the length of the river network, and A represents the drainage area corresponding to the river network. len The number of characteristic lines of the river network. area This represents the number of watershed areas extracted.
[0048] Preferably, the elimination of pseudo-runoff nodes in step S3 specifically includes the following sub-steps:
[0049] S31: Target River Network S OB Extraction: From S using set difference operations OR Remove all elements that simultaneously belong to S from the element set. ER The elements of the feature set, retaining only S. OR Unique elements; firstly, the river network elements involved in the calculation are mathematically defined, transforming the line elements in geographic space into "point sets":
[0050] Primary River Network SOR: Let A be the set of coordinate points of all line elements in the primary river network.
[0051] ,
[0052] Among them, R 2Let x and y be the abscissa and ordinate of the coordinate point, respectively.
[0053] River network element S ER Let B be the set of coordinate points of all linear elements in the primary river network.
[0054] ,
[0055] Among them, R 2 Let x and y be the abscissa and ordinate of the coordinate point, respectively.
[0056] Target River Network S OB : Represents the final retained portion of the river network, denoted as set C, obtained through the difference operation between A and B;
[0057]
[0058] S32: Pseudo-runoff node determination: S ER The elements are converted into endpoint node elements to identify overlapping breakpoints in the fractured river network;
[0059] S33: Spatial Deduplication: Using spatial deduplication methods, only the node row index and corresponding latitude and longitude combination that appear for the first time at the same location in the geographic coordinate system are retained, in order to better match the flow information of a single river network. The spatial deduplication formula is as follows:
[0060]
[0061] in, The endpoint latitude and longitude coordinates after deduplication. It is two-dimensional attribute data. for The i Row attribute data ( i = 1 , 2 , ... , n ), for The values in the longitude and latitude columns, ;
[0062] S34: Topology Analysis: Based on the rule of "no pseudo-nodes", short river segments are merged into adjacent long river segments to restore river network connectivity.
[0063] Preferably, the river network flow calculation in step S4 specifically includes the following sub-steps:
[0064] S41: For a single node river network element, directly assign the corresponding node's cumulative runoff volume;
[0065] S42: For multi-node river network elements, generate 8-direction offset points and offset vectors. O The set is:
[0066]
[0067] The coordinates of the offset point are calculated as follows:
[0068]
[0069] Among them, the set of offset points , yes The i row coordinates It is the first j offset vectors The longitude and latitude coefficients, bias It is a fixed offset coefficient. i represent number of rows, j represent O direction ( j= 1, 2,..., 8);
[0070] S43: Match river network attributes through spatial connectivity and assign values based on the maximum runoff principle:
[0071] Let the river network set be ,in Indicates the first k River network; point set as ,in Indicates the first m Point; Define membership relationship: If a point Belonging to the river network Then it is recorded as For any river network, the formula for assigning flow is:
[0072]
[0073] in, For point Runoff volume; River network Traffic.
[0074] Preferably, the directed graph model G=(V,E) described in step S5 satisfies:
[0075] Vertex set V = {v1, v2, ..., v 29 This includes the runoff source (in-degree = 0, out-degree = 1), the confluence point (in-degree ≥ 2, out-degree = 1), and the outlet (in-degree ≥ 2, out-degree = 0).
[0076] Edge set E = {E1, E2, ..., E} 28}={(v1, v2),(v2, v3),…,(v 27 , v 29 )} represents a directed river segment, with the direction aligned with the direction of water flow, and its weight is the cumulative flow of the corresponding river segment.
[0077] Preferably, the river network classification in step S6 includes:
[0078] S61: Mark the outlet as a first-level river network (level=1), and search for adjacent nodes in reverse;
[0079] S62: For nodes with in-degree ≥ 2 and out-degree = 1, compare the edge weights of the upstream river segments. The river segment with the largest weight is marked as the same level trunk (level unchanged), and the rest are marked as the next level tributary (level+1).
[0080] S63: Iterate through step S62 until all river segments are classified, with the segment at level=1 being the main stream and the rest being tributaries.
[0081] The river network hierarchical system based on graph theory and confluence accumulation described in this invention includes:
[0082] The data preparation module is used to acquire raw DEM data and water system data, and convert the water system data to a preset projection coordinate system;
[0083] The river network extraction and deviation correction module is used to extract a primary river network based on the DEM data, and to filter the primary river network by combining the river network length and the drainage area to obtain a simplified river network;
[0084] The pseudo-runoff node elimination module is used to identify and remove pseudo-nodes in the simplified river network and restore the topological connectivity of the river network.
[0085] The river network flow calculation module is used to assign flow values to each river network element in the simplified river network based on the cumulative flow.
[0086] The graph theory modeling module is used to abstract the simplified river network into a directed graph model, where nodes correspond to runoff sources, confluences, or outlets, directed edges correspond to river segments, and edge weights are the cumulative runoff amounts.
[0087] The river network classification module is used to trace back from the outlet, combine the node in-degree / out-degree and edge weight to determine the hierarchical relationship between the main stream and tributaries, and realize the river network classification.
[0088] Preferably, the pseudo-runoff node elimination module includes:
[0089] The target river network extraction unit is used to remove selected river network elements from the primary river network through set difference operations, thereby obtaining the target river network S. OB ;
[0090] Topology repair units are used to eliminate topology rules based on pseudo-nodes, merging shorter river segments into longer river segments in a broken river network to restore river network connectivity.
[0091] Compared with existing technologies, the river network classification system and method based on graph theory and confluence accumulation of the present invention have the following advantages:
[0092] 1. Clearly define the main and tributary hierarchy, highlighting the logic of flow dominance.
[0093] Traditional methods have drawbacks: The Strahler method only classifies levels based on the "equal-level confluence and upgrading" rule, without relating it to actual flow differences, and cannot distinguish the hydrological contributions of the main and tributary streams; the Shreve method is based on the "addition of magnitudes" principle, and the magnitudes only reflect the superposition of the number of upstream river sections, which is out of touch with the actual flow patterns.
[0094] Improvements in this invention: By using graph theory modeling, the river network is abstracted into a directed graph (the edge weight is the cumulative flow). At multiple intersection nodes, the priority of river segments is determined by comparing the flow contribution – the upstream river segment with the largest weight is the same level of main stream, and the rest are the next level of tributaries. The difference between the main stream and tributary levels is significant, which is consistent with the actual hydrological laws.
[0095] 2. Reverse traceability control of errors improves hierarchical stability.
[0096] Traditional methods have drawbacks: Both the Strahler method and the Shreve method classify from the upstream source to the downstream. Classification errors in upstream tributaries (such as misclassification caused by pseudo-nodes) will be transmitted to the downstream level, interfering with the identification of the main trunk.
[0097] Improvements of this invention: Starting from the outlet, the process traces backwards and extends downstream after anchoring the main stem. The classification results of upstream tributaries only affect their own levels, avoiding the transmission of errors to the main stem and downstream river sections, thus significantly improving classification stability.
[0098] 3. Topology restoration and flow coupling to ensure the integrity of the river network structure.
[0099] Traditional methods have drawbacks: The Strahler and Shreve methods do not consider pseudo-nodes (such as short river segment breaks) and topological connectivity issues during the river network extraction process, leading to hierarchical logic confusion.
[0100] This invention improves upon the following: by using pseudo-node elimination technology to identify and merge short river segments, the topological connectivity of the river network is restored; at the same time, flow values are assigned to river network elements based on the cumulative flow, and the principle of maximum runoff is adopted for multi-node river segments to ensure that flow data matches the topographic relief, providing a reliable data foundation for hierarchical classification.
[0101] This invention, through a combination of "graph theory modeling + flow contribution judgment + reverse tracing" techniques, fundamentally breaks through the limitations of the Strahler and Shreve methods in "pure topological classification", and realizes the upgrade of river network classification from "morphological description" to "hydrological function characterization". It is applicable to scenarios such as high-precision refined analysis of river networks and intelligent water conservancy emergency management. Attached Figure Description
[0102] Figure 1 A flowchart of the inventive method;
[0103] Figure 2 This is a schematic diagram of the river network pseudo-node repair method of the present invention;
[0104] Figure 3 This is a schematic diagram of the flow of river network elements in a local river network in this invention;
[0105] Figure 4 This is the directed graph model of the river network in this invention;
[0106] Figure 5 This is a diagram showing the results of the river network hierarchical partitioning method based on directed graph topology and confluence accumulation in this invention;
[0107] Figure 6 This is a diagram showing the results of the existing Strahler river classification method for river network hierarchical division.
[0108] Figure 7 The figures show a typical tree-like river network local classification detail diagram in this invention. In the figure, (a) represents the small watershed river network classification result under the method of this invention; (b) represents the small watershed river network classification result under the Strahler method; (c) represents the local river network classification result under the method of this invention; and (d) represents the local river network classification result under the Strahler method. Detailed Implementation
[0109] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0110] Example 1:
[0111] like Figure 1 As shown, this embodiment discloses a river network classification method based on graph theory and confluence accumulation, including the following steps:
[0112] 1. Data Preparation
[0113] The basic data sources of this invention are: firstly, the original DEM data (.tif format), with map sheet sequence number N37E110_FABDEM; and secondly, the water system (HYDL) data in the 1:250,000 national basic geographic database, with map sheet number j49.
[0114] During the data preparation phase, the HYDL data needs to be processed using ArcGIS software to build a river system database, view the spatial reference coordinate system of the river network, and use the Project tool to convert the geographic coordinate system (WGS1984) to the projected coordinate system (Albers).
[0115] 2. River network extraction
[0116] The data processing stage is divided into two parts. The first part uses hydrological analysis methods to extract the primary river network based on the cumulative runoff threshold. The second part uses river network length and drainage area as constraints to filter the primary river network and obtain the main structure river network as the final river network hierarchical data source.
[0117] 2.1 Primary River Network Extraction
[0118] ① Depression filling: Based on the original DEM data, the depression filling algorithm is used to eliminate unreasonable interruptions in the water flow path, ensure the continuity of the water flow direction, and realize the automatic detection of the regional water flow path.
[0119] ② Flow direction: The D8 algorithm is used to search for the maximum slope direction between the central grid and its eight neighboring grids. In the DEM data after filling depressions, the distance weight difference between the central grid and each adjacent grid is calculated on a 3×3 scale DEM grid to determine the direction of flow out of each cell in the grid, as shown in formula (1). If the maximum slope direction of multiple cells is the same, the range of adjacent cells will be expanded until the steepest slope direction is found.
[0120]
[0121] in, Indicates the maximum drop. Represents the change in elevation. This represents the distance between adjacent grid cells. When the cell size is 1, the distance between two orthogonal cells is 1, and the distance between two diagonal cells is... .
[0122] ③Flow Rate: Based on the flow direction raster data, the total number of pixels flowing into each raster is counted. This is then superimposed with weighted raster data used to control flow rate distribution (the weight matrix in this patent is set to 1), yielding the cumulative flow matrix within the spatial range. The point with the maximum flow rate is the river outlet, and the outlet raster area is... ㎡.
[0123] ④ River network extraction: Surface runoff and regular rivers are generated only when a certain flow value is reached. Therefore, based on the flow matrix, the flow threshold is set by expert experience, and the flow cells with a volume greater than 1000 are extracted using the conditional function outCon=Con("DEM_flow">1000,1), and the primary raster river network with an output value of 1 is output.
[0124] ⑤ Raster River Network Vectorization: Input the primary raster river network, supplemented by river flow direction data, and use the Douglas-Puk algorithm for line generalization, with a tolerance set to 21 ( Ultimately, 6847 primary river network line elements S were generated. OR .
[0125] 2.2 River network deviation correction
[0126] 1. The river network extracted based on the confluence accumulation threshold will exhibit "burrs," and in some topographical areas, the river network does not match the actual rivers, indicating deviations or pseudo-river systems. To reduce details and highlight the main structure of the river network, combined river system (HYDL) and watershed area data are used to correct deviations in the primary river network, and the main river network morphology structure is refined and selected.
[0127] First, in the river system data under the projected coordinate system, a new attribute column field, Length, is created. The length (m) of each river network is obtained through geometric calculation. Then, based on the vector river network data, the discharge points are captured. Using the watershed tool, the flow direction data and discharge points are input to obtain the raster watershed extent, which is then converted into a vector surface watershed. Based on this data, a new attribute column field, Area, is created. The watershed area (㎡) at each runoff node is obtained through geometric calculation.
[0128] Next, based on the vector river network ID, the river network length and the corresponding catchment area are linked. If the river network length is less than 30 m, or the catchment area is less than 75981 m², then... 2 Then the "ER field" corresponding to the river network ID is marked as 1, as shown in the following formula, resulting in 631 river network line elements S. ER .
[0129]
[0130] Where L represents the length of the river network, and A represents the drainage area corresponding to the river network. len The number of characteristic lines of the river network. area This represents the number of watershed areas extracted.
[0131] 3. Elimination of pseudo-runoff nodes
[0132] Since removing river network lines can cause the river network in the vicinity to be in a broken state, it is necessary to remove pseudo-runoff nodes to connect the broken river network line elements. The specific steps are as follows.
[0133] ①Target river network S OB Extraction: To obtain simplified river network structure features, it is necessary to extract the linear element of the river network S. OR Remove all line elements S with a value of 1 ER This invention uses set difference operations to obtain data from S. OR Remove all elements that simultaneously belong to S from the element set. ER Of the elements in the feature set (spatial overlap points), only S is retained. OR Unique elements (non-overlapping points).
[0134] First, the river network elements involved in the calculation are mathematically defined as follows, transforming the line elements in geographic space into a "set of points" (a line is composed of continuous coordinate points):
[0135] Primary River Network SOR: Let A be the set of coordinate points of all line elements in the primary river network.
[0136] ,
[0137] Among them, R 2 Let x and y be the abscissa and ordinate of a point, respectively.
[0138] River network element S ER Let B be the set of coordinate points of all linear elements in the primary river network.
[0139] ,
[0140] Among them, R 2 Let x and y be the abscissa and ordinate of a point, respectively.
[0141] Target River Network S OB : Represents the final retained portion of the river network, denoted as set C, obtained through the difference operation between A and B;
[0142]
[0143] ② Determination of pseudo-runoff nodes: In the 6216 target river network S OBIn some cases, line elements originally belonging to the same river network may experience interruptions. Such interruptions can further generate pseudo-runoff nodes, disrupting the topological integrity of the river network. To restore the normal topological connectivity of the river network and eliminate these pseudo-runoff nodes, it is necessary to reconnect the broken river network line elements. This embodiment employs line element format conversion technology, identifying overlapping elements generated after conversion to achieve accurate reconnection of broken river network line elements.
[0144] River networks in geographic databases exhibit a significant hierarchical structure, with line features stored as ordered vertex arrays, such as... Figure 2 As shown, the river network is partially composed of 3 river segments, each of which outputs a green starting point coordinate P1. x 1 ,y 1) and 1 blue endpoint coordinate P2 ( x 2 ,y 2). Suppose that river segment 3 needs to be erased because its length is less than 30m. However, during the erasure process, a breakpoint will be generated at point P2, preventing water flow from smoothly from P2 to P3. This point is called a pseudo-node. Figure 2 As can be seen from the diagram, the location of the pseudo-node is the endpoint of the erased river network. Therefore, the erased river network S... ER Converting line features into point features and saving them only as endpoint node types will yield the target river network S. OB Location of the pseudo-runoff node.
[0145] ③ Spatial deduplication: First, the target river network S OB When line features are converted into endpoint node features, two intersecting line features in the conversion result will be mapped to the same geographic location. Figure 2 The image shows the overlapping start and end nodes at point P2 (the positions of the two nodes have been offset to some extent for better visualization; in reality, the two nodes completely overlap). Therefore, the spatial deduplication method aims to retain only the row index of the node that appears for the first time at the same location in the geographic coordinate system, along with its corresponding latitude and longitude combination, to better match the flow information of a single river network. The spatial deduplication formula is as follows, outputting a total of 2851 nodes.
[0146] (4)
[0147] in, The endpoint latitude and longitude coordinates after deduplication. Two-dimensional attribute data, for The i Row attribute data ( i= 1, 2, ..., n ), for The values in the longitude and latitude columns, .
[0148] ④ Topology Analysis: To connect the two broken river networks (segment 1 and segment 2) at the pseudo-runoff node P2, it is necessary to construct a topology relationship, merging the shorter river network (segment 2) into the longer river network (segment 1). In this embodiment, the input data for topology analysis is the target river network S. OB The added topology rule for the elements is that there cannot be pseudo-nodes. All topology errors were reviewed, and shorter river networks were merged into longer ones, resulting in a total of 5665 river network line elements.
[0149] 4. Calculation of River Network Element Flows
[0150] After acquiring all river network elements, to clarify the hydrological characteristics of each river network, it is necessary to assign flow values to individual river networks. This embodiment proposes a technical solution centered on the mapping of confluence accumulation: for river network elements containing only a single node, since their confluence paths are clear and there is no branch interference, flow values can be directly assigned based on the confluence accumulation of the corresponding node; however, for river network elements with multiple intersections (i.e., tributary inflows and complex confluence paths), to accurately match their actual confluence state, the position of the confluence accumulation value corresponding to the river network element is determined by shifting the key node upstream, and then the flow value is assigned based on this value, ensuring that the assignment result is consistent with the actual confluence patterns of the river network. Figure 3 As shown. The specific steps are as follows.
[0151] Figure 3 The diagram shows a local river network. The dashed arrows indicate the river flow direction. Points B, C, and D are the starting points of river runoff. Point P is the confluence of tributaries BP, CP, and DP. Point A is the river outlet. The rule for determining the river network flow is as follows: at the river intersection, the runoff at one grid position upstream is taken as the flow rate of that tributary, and the grid runoff values at points 1, 2, and 3 shown in the diagram are extracted.
[0152] The specific steps for calculating the flow of river network elements are as follows.
[0153] ① Neighborhood Calculation: This embodiment designs a multi-directional offset point generation strategy based on the original point to accurately determine river network intersections. For For each original point, an offset point (30 meters away) is generated in each of its eight directions: east, south, west, north, southeast, northeast, southwest, and northwest. The latitude and longitude coordinates of all offset points are saved, and the points generated are used to determine the flow of each river network.
[0154] Define offset vectors in 8 directions O The mathematical expression is:
[0155] The coordinates of the offset point are calculated as follows:
[0156]
[0157] Among them, the set of offset points , yes The i row coordinates It is the first j offset vectors The longitude and latitude coefficients, k It is a fixed offset coefficient. i represent number of rows, j represent O direction ( j= 1, 2, ..., 8). Similarly, the latitude and longitude deduplication method is used to deduplicatize the set of offset points. After performing hidden surface removal, we obtain the set of 8 neighboring points. .
[0158] ② Spatial connection (point-line): Connects the 8 neighboring points With linear element S OB Spatial connectivity is performed, with an XY tolerance of 0.00018, to find the river network attributes of each point. During this process, one-to-many relationships may exist (two points lying on the same line segment), meaning the river network ID may belong to both point 1 and point 2.
[0159] ③ Determination of Single River Network Flow: This embodiment follows the principle that the flow of a single river network is determined by the maximum runoff among its subordinate points, regardless of whether there are two or more subordinate points or just one (the maximum value for a single point is its own runoff). The determination of a single river network flow value adopts the principle of maximum runoff. If a river network element has a unique endpoint node, the river network flow is the flow at that node; if point 1 and point 2 (or more) simultaneously belong to river network 1, the flow of river network 1 is assigned the value of the maximum runoff at both points, and the affiliation relationship is shown in the following formula.
[0160] Let the river network set be ,in Indicates the first k River network; point set as ,in Indicates the first m Point; Define membership relationship: If a point Belonging to the river network Then it is recorded as For any river network, the formula for assigning flow is:
[0161]
[0162] in, For point Runoff volume; River network Traffic.
[0163] 5. River network classification
[0164] River networks consist of runoff nodes and river segment feature lines, which correspond perfectly to the two main elements of a graph in graph theory: vertices and edges. By using graph theory and clarifying the spatial mapping relationship between the two, the river network system can be abstracted into a graph model, allowing for the quantitative description and analysis of the spatial relationships and functional characteristics of the river network.
[0165] The valley network system extracted from the surface runoff model has the following characteristics: (1) The valley network presents a typical tree-like water system pattern in the planar topology; (2) The water flow is driven by gravity, and the valley network always follows the flow direction rule from high to low, which has directionality; (3) The cumulative amount of runoff in each river segment not only directly reflects its hierarchical position in the river network topology (i.e., the functional position of the river segment in the entire water system hierarchy), but also objectively quantifies the runoff convergence scale and topographic dynamic conditions of the upstream basin.
[0166] Therefore, in the process of classifying river networks, the relationships within the river network can be abstracted into a tree structure, and the "river network diagram" can be organized using directed graphs in graph theory, such as... Figure 4 As shown, the tree-like structure of the river network is accurately depicted. The topological relationship ensures the orderly connection between river segments and nodes (from the starting point to the end point). The cumulative flow is used as the core indicator to define the hierarchical relationship of the main river channel.
[0167] A directed graph consists of a set of vertices V and a set of edges E, and its formula is: The river network, represented as a directed graph, can be written as a set forming a directed graph G = (V, E). Figure 4 In this diagram, E represents the river segment number, V represents the vertex number of the river segment, and the arrow on the river segment indicates the direction of that segment. The starting vertex of the segment represents the outlet point. The vertex set V = {v1, v2, ..., v...} 29 The edge set E = {E1, E2, ..., E} 28}={(v1, v2),(v2, v3),…,(v 27 , v 29 )}.
[0168] Figure 4The blue box in the middle represents a directed graph of a local river network, which realizes flow direction modeling based on topological relationships. The idea is as follows: construct a directed weighted graph based on the upstream and downstream relationships of each river segment (R1-R5) in the river network, forming an inverted tree structure with "river mouth as the root, main stream as the trunk, tributaries as branches, and river source as the leaves". The directed weighted graph is automatically searched in reverse to find the path with the largest cumulative weight (cumulative flow amount) that contains the exit node. At the river intersection, the "degree" is combined to realize the hierarchical relationship between the main stream and tributaries, as detailed below.
[0169] ① Establishment of Mapping Rules: In graph theory modeling of river systems, basic mapping rules must first be established to accurately define in-degree and out-degree. The rules for establishing these rules in this embodiment are shown in Table 1. As a naturally linear connection system, the shape and relationships of a river network closely match the structure of a graph—river confluences and starting / ending points correspond to vertices, and river segments correspond to edges, thus creating a directed graph model of the river network. To accurately describe the flow direction of river segments associated with nodes, a degree representation of the nodes is introduced. In-degree (I) is the number of upstream river segments flowing into the node, and out-degree (O) is the number of downstream river segments flowing out of the node.
[0170] Table 1. Construction of the topological relationships of the directed graph of the river network
[0171]
[0172] ② River network hierarchical division based on "reverse tracing of the outlet": Starting from the outlet (end point of the water flow) of the river network, the river section is divided into different levels according to the connectivity (in-degree / out-degree) of the nodes and the cumulative flow. The level value gradually increases as the river extends upstream.
[0173] ③ Based on the directed graph object, calculate the I and O of each node. When I is 0 and O is 1 at a node, the outlet point of the river network is found, and the first-level river network is marked as level=1. In reverse, find the adjacent nodes. If I≥2 and O=1, determine the flow rate of the grid moving up from that node. Select the river segment with the larger flow rate and mark it as level=1. The other river segment is marked as the starting level=2 of the next level of the river network. Iterate and classify until all river segments have obtained a level. The river segment with level=1 is the main stream of the river network, and the other levels are the tributaries of the river network.
[0174] Figure 5 This is the result of a river network hierarchy partitioning method based on directed graph topology and confluence accumulation, compared to the Strahler river classification method (…). Figure 6 The method uses the outlet section of the river as the starting point to search upstream for the main river section. The cumulative flow is used as an indicator to obtain the main river section, which is more in line with the actual topographic relief. This method can better express the hierarchical relationship between line elements, clearly identify the source of the main stream, and determine the main river in the river network.
[0175] In the typical details of the local hierarchical structure of a tree-like river network, Figure 7 (a) and Figure 7 As shown in (b), the method in this embodiment can be seen more clearly. Figure 7 (a) The green box shows the morphological structure and hierarchical relationship of the river network. The main stream (blue) is the dominant trunk, running through the main veins of the river network, extending from the lower to the upper area. It is the largest and longest river channel in the network. Tributaries (purple, orange) branch off from the sides of the main stream or other larger tributaries, extending in all directions. They are smaller in scale and shorter in length, and exist at different levels. Some tributaries have even smaller branches, demonstrating a clear primary and secondary subordinate relationship. That is, tributaries flow into the main stream, or secondary tributaries flow into higher-level tributaries. Ultimately, the water flow converges into the main stream, forming a relatively dense and orderly river network system. In addition, through comparison... Figure 7 (c) and Figure 7 In the middle (d), it was found that the mainstream (green line) shape obtained by the method of this embodiment is clearer and more coherent, accurately outlining the hierarchical transformation nodes of the river network (yellow diamond box, the color of FABDEM elevation rendering changes abruptly from light green to dark green), the connection between tributaries and mainstream is closer, and it can better reflect the hierarchical and logical relationship of tributaries flowing into mainstream; the tributaries also have smaller branches, reflecting the characteristics of multi-level branches.
[0176] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A river network hierarchical method based on graph theory and confluence accumulation, characterized in that, The method comprises the following steps: S1: data preparation: obtaining original DEM data and water system data, and converting the water system data to a preset projection coordinate system; S2: river network extraction and deviation correction: extracting a primary river network based on the DEM data, and screening the primary river network in combination with river network length and basin area to obtain a simplified river network; S3: pseudo runoff node elimination: identifying and removing pseudo nodes in the simplified river network to restore river network topological connectivity; S4: river network flow calculation: assigning flow to each river network element in the simplified river network based on a flow accumulation; S5: graph theory modeling: abstracting the simplified river network into a directed graph model, wherein a node in the directed graph model corresponds to a runoff source point, a confluence point or a water outlet, a directed edge corresponds to a river section, and an edge weight is the flow accumulation; S6: river network grading: tracing back from the water outlet as a starting point, determining the main stem and tributary hierarchical relationship in combination with node in-degree / out-degree and edge weight, and realizing river network grading; The pseudo runoff node elimination in the step S3 specifically comprises the following sub-steps: S31: Target river network S OB Extract: From the primary river network line elements S OR Remove all elements from the element set that belong to both the river network line elements S ER Elements of the element set, only keep the primary river network line elements S OR Unique elements; first, the mathematical definition of the river network elements participating in the operation, the primary river network line elements S OR and river network line elements S ER Transformed into coordinate point sets A and B: Primary river network line element S OR : Set the coordinate point set A of all line elements in the primary river network, wherein R 2 is a two-dimensional direct coordinate system, x and y are the horizontal and vertical coordinates of the coordinate point, respectively; River network line element S ER : Set the coordinate point set B of all line elements in the river network, wherein R 2 is a two-dimensional direct coordinate system, x and y are the horizontal and vertical coordinates of the coordinate point, respectively; Target river network line feature S OB : represents the final reserved river network part, set as set C, obtained by difference operation of A and B; S32: Pseudo-Runoff Node Determination: Convert the river network line feature S ER elements into end node elements, identifying overlapping break points of the broken river network; S33: spatial deduplication: using a spatial deduplication method, only retaining a node row index and a corresponding longitude and latitude combination of a first occurrence of a same position in a geographic coordinate system, so as to better match flow information of a single river network, and a spatial deduplication formula is as follows: wherein, is the de-duplicated end point latitude and longitude coordinates, is two-dimensional attribute data, is the i-th row attribute data of (i = 1, 2,..., n), is the values of the longitude and latitude columns in, ; S34: topological analysis: based on the rule that there cannot be a pseudo node, combining short river sections into adjacent long river sections to restore river network connectivity; The river network flow calculation in the step S4 specifically comprises the following sub-steps: S41: for a single node river network element, directly assigning the flow accumulation of the corresponding node; S42: For multi-node river network feature, generate 8-direction offset points, offset vector O The set is: The offset point coordinate is calculated as follows: wherein the set of offset points , is the i-th row coordinate of O, is the longitude, latitude coefficient of the j-th offset vector of O, bias is a fixed offset coefficient, i represents the row number, and j represents the direction of O (j = 1, 2,..., 8); S43: matching river network attributes through spatial connection and assigning values by the maximum runoff principle: Let the river network set be wherein represents the kth river network; the point set is wherein represents the mth point; the membership relation is defined as follows: if the point belongs to the river network , then it is recorded as ; for any river network, the flow assignment formula is: wherein, is the runoff of a point ; is the flow of a river network .
2. The river network ranking method based on graph theory and confluence accumulation of claim 1, wherein, The data preparation in the step S1 comprises: Obtaining DEM data in a.tif format and water system data in a basic geographic database; Converting the water system data from a WGS1984 geographic coordinate system to an Albers projection coordinate system through a coordinate conversion tool.
3. The river network ranking method based on graph theory and confluence accumulation of claim 1, wherein, The river network extraction in the step S2 specifically comprises the following sub-steps: S211: processing the DEM data by using a fill-in algorithm to eliminate water flow path interruption; S212: using a D8 algorithm to search for the maximum slope direction of a center grid and eight adjacent grids, calculating the distance weight difference between the center grid and each adjacent grid in the DEM data after filling in, determining the direction of flow from each pixel in the grid, and using a formula: wherein, represents the maximum slope, represents the amount of elevation change, represents the distance between adjacent grids, when the pixel size is 1, the distance between two orthogonal pixels is 1, and the distance between two diagonal pixels is ; S213: according to the flow direction grid data, counting the total number of pixels flowing into each grid, superimposing weight grid data for controlling flow distribution, and obtaining a flow accumulation matrix in a spatial range; S214: on the basis of the flow matrix, setting a flow threshold, using a conditional function outCon=Con("DEM_flow">1000,1) to extract flow pixels with an accumulation greater than 1000, and outputting a primary grid river network with a value of 1; S215: Raster river network vectorization: input the primary raster river network, supplemented by river flow direction data, use the Douglas-Peucker algorithm for line generalization, and finally generate the primary river network line feature S OR .
4. The river network ranking method based on graph theory and confluence accumulation of claim 3, wherein, The deviation correction in the step S2 specifically comprises the following sub-steps: S221: calculating the length of each river network element in the projection coordinate system and storing the length in a Length field; S222: Capture the pour point according to the vector river network data, input the flow direction data and the pour point by using the watershed tool, obtain the raster watershed range, and then convert it to the vector surface watershed; S223: Capture the pour point based on the vector river network data, generate the raster watershed range by using the watershed tool, and convert it to the vector surface watershed, and calculate the watershed area of each runoff node and store it in the Area field; S224: Based on the vector river network ID, link the river network length and the corresponding watershed area. If the river network length or the watershed area is less than the set threshold, the "ER field" of the corresponding river network ID is marked as 1, and the river network line feature S is obtained ER The formula is as follows: wherein L represents the length of the river network, A represents the area of the river network corresponding basin, Len is the number of characteristic lines of the river network, Area is the number of extracted basin areas.
5. The river network ranking method based on graph theory and confluence accumulation of claim 1, wherein, The directed graph model G=(V,E) in step S5 satisfies: A set of vertices V = {v1, v2,..., v 29} including the runoff source point: in-degree = 0, out-degree = 1; The intersection point: in-degree ≥ 2, out-degree = 1 and the outlet: in-degree ≥ 2, out-degree = 0; Edge set E = {E1, E2, ..., E} 28 }={(v1, v2),(v2, v3),…,(v 27 , v 29 )} represents a directed river segment, with the direction aligned with the direction of water flow, and its weight is the cumulative flow of the corresponding river segment.
6. The river network ranking method based on graph theory and confluence accumulation of claim 5, wherein, The river network grading in step S6 includes: S61: Mark the outlet as the first-level river network, level = 1, and search the adjacent nodes in reverse direction; S62: For the node with in-degree ≥ 2 and out-degree = 1, compare the edge weights of the upstream river sections, mark the river section with the largest weight as the same-level main trunk, and the level remains unchanged, and mark the remaining river sections as the next-level branch, level + 1; S63: Iteratively execute step S62 until all river sections are graded, wherein the river section with level = 1 is the main stream, and the remaining river sections are branch streams.
7. A river network ranking system based on graph theory and confluence accumulation, applied to the river network ranking method based on graph theory and confluence accumulation according to any one of claims 1-6, characterized in that, The system comprises: A data preparation module configured to obtain original DEM data and water system data, and convert the water system data to a preset projection coordinate system; A river network extraction and deviation correction module configured to extract a primary river network based on the DEM data, and screen the primary river network in combination with river network length and watershed area to obtain a simplified river network; A pseudo runoff node elimination module configured to identify and remove pseudo nodes in the simplified river network to restore the topological connectivity of the river network; A river network flow calculation module configured to assign a flow value to each river network element in the simplified river network based on a convergence accumulation; A graph theory modeling module configured to abstract the simplified river network into a directed graph model, wherein a node corresponds to a runoff source point, an intersection point or an outlet, a directed edge corresponds to a river section, and an edge weight is the convergence accumulation; A river network grading module configured to trace back from the outlet as a starting point, determine the hierarchical relationship between the main trunk and the branch in combination with the in-degree / out-degree of the node and the edge weight, and realize river network grading.
8. The graph theory and confluence accumulation based river network ranking system according to claim 7, wherein, The pseudo runoff node elimination module comprises: The target river network extraction unit is configured to remove the screened river network elements from the primary river network by a set difference operation to obtain a target river network S OB ; A topological repair unit configured to merge shorter river sections in a broken river network into longer river sections based on a pseudo node elimination topological rule to restore the connectivity of the river network.
Citation Information
Patent Citations
River network water system connectivity calculation method based on graph theory improvement and hydrology simulation
CN107944111A
Backbone river network extraction method based on graph theory and maximum flow algorithm
CN113191637A