River attack automatic discrimination method and device based on spatial pattern matching
By constructing river data collection and knowledge maps, identifying the spatial patterns of river raids, solving the problems of low efficiency and low reusability in the existing technology, and achieving automated identification of river raids under various spatial modes.
Patent Information
- Application Number
- CN202510446344.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-25
AI Technical Summary
The prior art is inefficient, cost-effective and not highly reusable in river attack recognition, making it difficult to adapt to automated recognition in many different spatial modes.
By constructing a collection of river data, dividing river sections and calculating spatial relationships, a river section knowledge map is constructed, a candidate area and a martyr bay, a counterpart river, a river martyr identification knowledge map is constructed, and a discrimination rules are extracted to achieve automatic discrimination in multiple spatial modes.
It realizes efficient automatic identification of river attacks in many different spatial modes, improving reusability and automation.
Smart Images

Figure CN120372308A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technology for identifying river capture, and particularly to an automatic discrimination method and device for river capture based on spatial pattern matching. Background Art
[0002] River capture refers to rivers on both sides of a watershed. Among them, the headward erosion of the river with stronger erosion power and deeper erosion causes the watershed to continuously lower, and finally breaks through the watershed, resulting in the stronger erosive river capturing the upstream section of the weaker erosive river. River capture is an important way of the evolution of river systems and basins. It can change the position of the watershed and the basin area, and is crucial for promoting the geomorphic evolution of the continental landform. In addition, river capture has also been proven to play an important role in influencing water flow dynamics, river profiles, related geometric forms, and river biodiversity.
[0003] The traditional method for identifying river capture is manual identification, using the reverse hook shape of the river source to infer that river capture has occurred. The manual identification method mainly relies on expert knowledge to discriminate river capture, with low efficiency, high cost, and the quality being restricted by the expert's interpretation ability.
[0004] Currently, for the automatic identification of river capture, Ma Qiyuan (2023) et al. proposed an automatic identification method for river capture based on geometric morphology and geomorphic features. By analyzing the unique spatial structure characteristics of river capture as the basis for identification, an identification method was designed to achieve the identification of river capture and verify its reliability. However, in this method, due to the adoption of a hard-coded automatic identification method for river capture, its reusability is not high, the method is highly targeted, and it is only applicable to the automatic identification of river capture in the most typical spatial patterns. Summary of the Invention
[0005] Aiming at the problems existing in the prior art, the purpose of the present invention is to provide a method and device with higher reusability that can achieve the automatic identification of river capture in a variety of different spatial patterns.
[0006] In order to achieve the above-mentioned invention purpose, the present invention provides the following technical solutions:
[0007] An automatic discrimination method for river capture based on spatial pattern matching, comprising the following steps:
[0008] (1) Read river vector data and construct a river data set R;
[0009] (2) Arbitrarily select a river r from the river data set R i ;
[0010] (3) Take the river r iDivide it into several river reaches to form a river reach dataset RN, and calculate the spatial relationships between all river reaches and the in-degree and out-degree of each river reach to form a river reach knowledge graph;
[0011] (4) Obtain all the intersections of river reaches according to the river reach knowledge graph, and take all the river reaches at each intersection of river reaches as a candidate area and store it in the candidate area set HA;
[0012] (5) For each candidate area in the candidate area set HA, determine whether there is a capture bay in the candidate area, and store the river reaches judged as capture bays in the capture bay set;
[0013] (6) For each candidate area in the candidate area set HA, determine whether there is an opposite river in the candidate area, and store the river reaches judged as opposite rivers in the opposite river set;
[0014] (7) Construct a knowledge graph for river capture recognition based on the in-degree and out-degree of river reaches, the capture bay set and the opposite river set;
[0015] (8) According to the regulations on capture bays and opposite rivers in different river capture spatial patterns, extract the discrimination rules for each river capture spatial pattern and store them in the discrimination rule set;
[0016] (9) According to the knowledge graph for river capture recognition, match each candidate area in the candidate area set HA according to the discrimination rule set to determine whether there is a river capture and the river capture spatial pattern;
[0017] (10) Return to execute step (2) until all rivers in the river data set R are traversed to complete the river capture discrimination of all rivers.
[0018] Further, step (3) specifically includes the following steps:
[0019] (3-1) Store all the points of the river r i into the river point data set RP = {p j |j = 1, 2,..., pn}; where p j represents the j-th point data that makes up the river r i , and pn represents the number of point data;
[0020] (3-2) According to the river point data set RP, divide the river r i into several river reaches, and store the point data of all river reaches into the river reach data set RN = {rn k |k = 1, 2,..., rn}, where rn k represents the point data set of the k-th river reach, and rn represents the number of river reaches;
[0021] (3-3) Read any pair of river reaches rn from the river reach dataset RN a , rn b ;
[0022] (3-4) Based on rn a , rn b , judge the spatial relationship of rn a , rn b according to the following rules:
[0023] When the end point of river reach rn a intersects with the start point of rn b , judge that the spatial relationship is rn a flowing into rn b , and increment the out-degree of river reach rn a by 1, and increment the in-degree of river reach rn b by 1. Among them, the initial values of the in-degree and out-degree of river reaches rn a , rn b are 0;
[0024] When the end point of river reach rn b intersects with the start point of rn a , judge the spatial relationship rn b flowing into rn a , and increment the in-degree of river reach rn a by 1, and increment the out-degree of river reach rn b by 1;
[0025] When the start point of river reach rn b intersects with the start point of rn a or the end point of river reach rn b intersects with the end point of rn a , judge the spatial relationship rn a and rn b intersect;
[0026] (3-5) Loop and execute (3-3)-(3-4) until any pair of river reaches in the river reach dataset RN is traversed. Store the spatial relationship, rn a , rn b ), the out-degree and in-degree of rn a , and the out-degree and in-degree of rn b into the river reach knowledge graph.
[0027] Further, step (3-2) specifically includes the following steps:
[0028] (3-2-1) Obtain the first point p1 from RP as the start point of the first segment;
[0029] (3-2-2) Set the segment number k = 1;
[0030] (3-2-3) Initialize the initial value of the included angle accumulation value c to 0, and obtain the sequence number j of the starting point of segment k.
[0031] (3-2-4) Read three consecutive point data p j 、p j+1 、p j+2 ;
[0032] (3-2-5) Calculate the turning coefficient and included angle of the local river formed by p j 、p j+1 、p j+2 according to the following formula;
[0033] f = x1 * y2 - x2 * y1
[0034]
[0035] In the formula, f represents the turning coefficient, (x1, y1) represents the vector coordinates from p j pointing to p j+1 's, (x2, y2) represents the vector coordinates from p j+1 pointing to p j+2 's, * represents the multiplication sign, and θ represents the included angle;
[0036] (3-2-6) Update the included angle accumulation value c of this iteration by adding θ to the included angle accumulation value c of the previous iteration;
[0037] (3-2-7) If the positive and negative values of f do not change, then set j = j + 1 and return to execute (3-2-4);
[0038] If the positive and negative values of f change, then construct a river segment rn from the starting point of segment k to p j+2 and store it in the river segment data set RN, and use p k as the starting point of segment k + 1, set k = k + 1, and return to execute (3-2-3); j+2 If the value of the included angle accumulation value c is greater than 90 or all the point data in the set RP have been read, end the iteration and complete the segmentation.
[0039] Further, step (4) specifically includes the following steps:
[0040] (4-1) Read any river segment rn
[0041] from the river segment data set RN, and extract the in-degree of rn k from the river segment knowledge graph, and record it as m; k
[0042] (4-2) If m >= 2, then the river segment rnk and the inflowing river section rn k Regarding the river sections as a river section intersection, all the river sections at the river section intersection are regarded as a candidate area, which is stored in the candidate area set HA, and step (4-4) is executed;
[0043] (4-3) If m < 2, directly execute step (4-4);
[0044] (4-4) Return to execute step (4-1) until all the river sections in RN are traversed to form the candidate area set HA.
[0045] Furthermore, step (5) specifically includes the following steps:
[0046] (5-1) Read any candidate area ha from the candidate area set HA;
[0047] (5-2) Read the river sections in the candidate area ha with an in-degree greater than or equal to 2, denoted as the main stream rn g ;
[0048] (5-3) Read any river section in ha except the main stream, denoted as the tributary rn z ;
[0049] (5-4) Calculate the included angle between rn g and rn z according to the following formula:
[0050]
[0051] In the formula, represents the included angle between rn g and rn z , (x g , y g ) are the coordinates of the vector from the starting point to the ending point of rn g , (x z , y z ) are the coordinates of the vector from the starting point to the ending point of rn z ;
[0052] (5-5) If indicates that there is a capture bay in this candidate area, take (rn g , rn z ) as the capture bay, store it in the capture bay set, and execute step (5-6); if then directly execute step (5-6);
[0053] (5-6) Return to execute step (5-3) until all the river sections included in ha are read;
[0054] (5-7) Return to execute step (5-1) until the candidate region set HA is traversed.
[0055] Further, step (6) specifically includes the following steps:
[0056] (6-1) Read any candidate region ha from the candidate region set HA;
[0057] (6-2) Read any two river reaches within ha with an in-degree less than 2, denoted as tributaries rn z1 , rn z2 ;
[0058] (6-4) Calculate rn z1 and rn z2 's included angle according to the following formula:
[0059]
[0060] In the formula, ζ represents the included angle between rn z1 , rn z2 , (x z1 , y z1 ) is the coordinate of the vector from the starting point to the ending point of rn z1 , (x z2 , y z2 ) is the coordinate of the vector from the starting point to the ending point of rn z2 ;
[0061] (6-5) If ζ > 145°, it means there is a counter-junction river in this candidate region. Take (rn z1 , rn z2 ) as the counter-junction river, store it in the counter-junction river set, and execute step (6-6); if ζ <= 145°, then directly execute step (6-6);
[0062] (6-6) Return to execute step (6-3) until all two-river-reach pairs in ha are read;
[0063] (6-7) Return to execute step (6-1) until the candidate region set HA is traversed, facing the river capture recognition knowledge graph.
[0064] Further, step (8) specifically includes the following steps:
[0065] (8-1) According to the regulations for capture bays and counter-junction rivers in different river capture spatial patterns, extract the discrimination rules for each river capture spatial pattern as follows:
[0066] The discrimination rules for the ideal river capture spatial pattern are: there is a capture bay between the main stream reach and any tributary within the candidate region; there is a counter-junction river between any two tributary reaches within the candidate region; the in-degree of any tributary forming the counter-junction river is 0;
[0067] The discrimination rules for the lack of tuyere-type river capture spatial pattern are as follows: there is a capture bay between the main stream section and any one of the tributaries in the candidate area; there are opposing rivers between any two tributary sections in the candidate area; there is no tributary with an in-degree of 0.
[0068] The discrimination rules for the non-collinear opposing river type of river capture spatial pattern are as follows: there is a capture bay between the main stream section and any one of the tributaries in the candidate area; there are opposing rivers between any two tributary sections in the candidate area, and the two tributaries forming the opposing river are not collinear; any one of the tributaries forming the opposing river has an in-degree of 0.
[0069] The discrimination rules for the same-direction opposing river type of river capture spatial pattern are as follows: there is a capture bay between the main stream section and any one of the tributaries in the candidate area; there are opposing rivers between any two tributary sections in the candidate area, the two tributaries of the opposing river are collinear and the flow directions are not opposite; any one of the tributaries forming the opposing river has an in-degree of 0.
[0070] The discrimination rules for the lack of tuyere type in the same-direction opposing river type of river capture spatial pattern are as follows: there is a capture bay between the main stream section and any one of the tributaries in the candidate area; there are opposing rivers between any two tributary sections in the candidate area, the two tributaries of the opposing river are collinear and the flow directions are not opposite; there is no tributary with an in-degree of 0.
[0071] (8-2) Store the discrimination rules in step (8-1) into the discrimination rule set.
[0072] A computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the computer program to implement the above method.
[0073] A computer-readable storage medium stores computer programs / instructions thereon. The computer programs / instructions implement the above method when executed by a processor.
[0074] A computer program product includes computer programs / instructions. The computer programs / instructions implement the above method when executed by a processor.
[0075] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention has higher reusability, can implement methods and devices for automatic recognition of river capture under various different spatial patterns, has a high degree of automation and high efficiency. Description of the Drawings
[0076] Figure 1 It is a schematic flowchart of the automatic discrimination method of river capture based on spatial pattern matching provided by an embodiment of the present invention;
[0077] Figure 2 It is the river vector data adopted by an embodiment of the present invention;
[0078] Figure 3 It is a knowledge graph of some river reaches provided by an embodiment of the present invention;
[0079] Figure 4 It is a knowledge graph of river capture recognition for some rivers provided by an embodiment of the present invention;
[0080] Figure 5 It is a grayscale map of the discrimination result of the ideal river capture spatial pattern in an embodiment of the present invention;
[0081] Figure 6 It is a schematic diagram of a satellite remote sensing image at the discrimination result of the ideal river capture spatial pattern in an embodiment of the present invention;
[0082] Figure 7 It is a schematic diagram of the knowledge graph after the discrimination result of the ideal river capture spatial pattern in an embodiment of the present invention;
[0083] Figure 8 It is a grayscale map of the discrimination result of the degraded river capture spatial pattern in an embodiment of the present invention;
[0084] Figures 9 to 13 It is a schematic diagram of a satellite remote sensing image at each discrimination result under the degraded river capture spatial pattern in an embodiment of the present invention;
[0085] Figure 14 It is a schematic diagram of the knowledge graph after the discrimination result under the degraded river capture spatial pattern in an embodiment of the present invention;
[0086] Figure 15 It is a schematic diagram for calculating the accuracy rate of the discrimination result in an embodiment of the present invention;
[0087] Figure 16 It is a schematic diagram of a satellite remote sensing image at the river capture location under different river capture spatial patterns; among them, (a) is a schematic diagram of a satellite remote sensing image of the ideal river capture pattern; (b) is a schematic diagram of a satellite remote sensing image of the river capture pattern lacking a tuyere; (c) is a schematic diagram of a satellite remote sensing image of the non - collinear river capture pattern of the opposite - mouth river; (d) is a schematic diagram of a satellite remote sensing image of the same - direction river capture pattern of the opposite - mouth river; (e) is a schematic diagram of a satellite remote sensing image of the same - direction and lacking - tuyere river capture pattern of the opposite - mouth river. Detailed implementation manners
[0088] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.
[0089] Embodiment 1
[0090] An embodiment of the present invention provides an automatic discrimination method for river capture based on spatial pattern matching, as Figure 1 shown, including the following steps:
[0091] (1) Read the river vector data and construct the river data set R.
[0092] The experimental data in this embodiment uses the river vector data on the west side of the northern foot of the Qilian Mountains ( Figure 2 ); and, in order to focus on the identification of the phenomenon of river capture, only the main stream vector data obtained by the Shreve river classification method is retained. The projection coordinate system used for this experimental data is the Universal Mercator projection. R = {r i | i = 1, 2, …, r n}; where r i represents the i-th river, and r n represents the number of rivers; in this embodiment, r n = 1375.
[0093] (2) Select a river r i from the river data set R.
[0094] (3) Divide the river r i into several river reaches to form the river reach data set RN, and calculate the spatial relationships between all river reaches and the in-degree and out-degree of each river reach to form a river reach knowledge graph.
[0095] Step (3) specifically includes the following steps:
[0096] (3-1) Store all the points of the river r i into the river point data set RP = {p j | j = 1, 2, …, pn}; where p j represents the j-th point data that constitutes the river r i , and pn represents the number of point data; in this embodiment, taking i = 1, p n = 5 as an example, the constructed data set is shown in Table 1;
[0097] Table 1 Example river point data set
[0098]
[0099] (3-2) According to the river point data set RP, divide the river r i into several river reaches, and store the point data of all river reaches into the river reach data set RN = {rn k | k = 1, 2, …, rn}, where rn k represents the point data set of river reach k, and rn represents the number of river reaches;
[0100] (3-3) Read any pair of river reaches rn a , rn b from the river reach data set RN;
[0101] (3 - 4) Based on rn a 、rn b The intersection situation of the start and end points is judged according to the following rules rn a 、rn b Spatial relationship:
[0102] When the end point of the river section rn a intersects with the start point of rn b , judge the spatial relationship as rn a flows into rn b , and increment the out - degree of the river section rn a by 1, and increment the in - degree of the river section rn b by 1. Among them, the initial values of the in - degree and out - degree of the river sections rn a 、rn b are 0;
[0103] When the end point of the river section rn b intersects with the start point of rn a , judge the spatial relationship rn b flows into rn a , and increment the in - degree of the river section rn a by 1, and increment the out - degree of the river section rn b by 1;
[0104] When the start point of the river section rn b intersects with the start point of rn a or the end point of the river section rn b intersects with the end point of rn a , judge the spatial relationship rn a and rn b intersect;
[0105] (3 - 5) Loop and execute (3 - 3)-(3 - 4) until any pair of river sections in the river section dataset RN is traversed. At this time, store the spatial relationship, rn a 、rn b ), the out - degree and in - degree, rn a out - degree and in - degree of all river section pairs (rn b ) into the river section knowledge graph. The river section knowledge graph is as shown in Figure 3 shown.
[0106] Among them, step (3 - 2) specifically includes the following steps:
[0107] (3 - 2 - 1) Obtain the first point p1 from RP as the start point of the first segment;
[0108] (3 - 2 - 2) Set the segment number k = 1;
[0109] (3-2-3) Initialize the initial value of the included angle accumulation value c to 0, and obtain the sequence number j of the starting point of segment k;
[0110] (3-2-4) Read three consecutive point data p in RP in sequence j 、p j+1 、p j+2 ;
[0111] (3-2-5) Calculate the turning coefficient and included angle of the local river formed by p j 、p j+1 、p j+2 according to the following formula;
[0112] f = x1*y2 - x2*y1
[0113]
[0114] In the formula, f represents the turning coefficient, (x1, y1) represents the vector coordinates of the vector from p j pointing to p j+1 ,(x2, y2) represents the vector coordinates of the vector from p j+1 pointing to p j+2 ,* represents the multiplication sign, and θ represents the included angle;
[0115] (3-2-6) Update the included angle accumulation value c of this iteration by adding θ to the included angle accumulation value c of the previous iteration;
[0116] (3-2-7) If the positive / negative value of f has not changed compared to the previous iteration, then set j = j + 1 and return to execute (3-2-4);
[0117] If the positive / negative value of f has changed compared to the previous iteration, then construct a river section rn between the starting point of segment k and p j+2 ,store it in the river section dataset RN, and use p k as the starting point of segment k + 1, set k = k + 1, and return to execute (3-2-3); j+2 If the value of the included angle accumulation value c is greater than 90 or all point data in the set RP has been read, end the iteration and complete the segmentation.
[0118]
[0119] (4) Obtain all river section intersections according to the river section knowledge graph, and use all river sections at each river section intersection as a candidate area and store it in the candidate area set HA. (4) Specifically includes the following steps:
[0120] Step (4) specifically includes the following steps:
[0121] (4-1) Read any river section rn from the river section dataset RN k ,and extract rn from the river section knowledge graphk The in-degree is denoted as m;
[0122] (4-2) If m >= 2, then take the river reach rn k and the river reach flowing into rn k as a river reach intersection, take all the river reaches at the river reach intersection as a candidate area, store it in the candidate area set HA, and execute step (4-4);
[0123] (4-3) If m < 2, then directly execute step (4-4);
[0124] (4-4) Return to execute step (4-1) until all the river reaches in RN are traversed to form the candidate area set HA.
[0125] (5) For each candidate area in the candidate area set HA, determine whether there is a capture bay in the candidate area and store the river reaches determined to be capture bays in the capture bay set.
[0126] Step (5) specifically includes the following steps:
[0127] (5-1) Read any candidate area ha from the candidate area set HA;
[0128] (5-2) Read the river reaches in the candidate area ha with an in-degree greater than or equal to 2, denoted as the main stream rn g ;
[0129] (5-3) Read any river reach in ha other than the main stream, denoted as the tributary rn z ;
[0130] (5-4) Calculate the included angle between rn g and rn z according to the following formula:
[0131]
[0132] In the formula, represents the included angle between rn g and rn z , (x g , y g ) are the coordinates of the vector from the starting point to the ending point of rn g , (x z , y z ) are the coordinates of the vector from the starting point to the ending point of rn z ;
[0133] (5-5) If indicates that there is a capture bay in this candidate area, then (rn g , rn z)As the captured bay, store it in the captured bay set and execute steps (5-6); if then directly execute steps (5-6);
[0134] (5-6) Return to execute step (5-3) until all river reaches in ha have been read;
[0135] (5-7) Return to execute step (5-1) until the candidate area set HA has been traversed.
[0136] (6) For each candidate area in the candidate area set HA, determine whether there is an opposite river in the candidate area, and store the river reaches determined to be opposite rivers in the opposite river set.
[0137] Step (6) specifically includes the following steps:
[0138] (6-1) Read any candidate area ha from the candidate area set HA;
[0139] (6-2) Read any two river reaches in ha with an in-degree less than 2, denoted as tributaries rn z1 , rn z2 ;
[0140] (6-4) Calculate the included angle between rn z1 and rn z2 according to the following formula:
[0141]
[0142] In the formula, ζ represents the included angle between rn z1 , rn z2 , (x z1 , y z1 ) is the coordinate of the vector from the starting point to the ending point of rn z1 , (x z2 , y z2 ) is the coordinate of the vector from the starting point to the ending point of rn z2 ;
[0143] (6-5) If ζ > 145°, it means there is an opposite river in this candidate area. Take (rn z1 , rn z2 ) as the opposite river, store it in the opposite river set, and execute step (6-6); if ζ <= 145°, then directly execute step (6-6);
[0144] (6-6) Return to execute step (6-3) until all two-river-reach pairs in ha have been read;
[0145] (6-7) Return to execute step (6-1) until the candidate area set HA has been traversed.
[0146] (7) Construct a knowledge graph for river capture recognition based on the river reach access degree, the set of capture bays, and the set of opposite rivers.
[0147] The knowledge graph for river capture recognition is as Figure 4 shown, including each candidate area, all river reaches included in the candidate area, the relationship between the river reach and the candidate area, the river reach access degree, whether it is an opposite river, and whether it is a capture bay.
[0148] (8) Extract the discrimination rules for each river capture spatial pattern according to the regulations on capture bays and opposite rivers in different river capture spatial patterns, and store them in the discrimination rule set.
[0149] Step (8) specifically includes the following steps:
[0150] (8-1) Extract the discrimination rules for each river capture spatial pattern according to the regulations on capture bays and opposite rivers in different river capture spatial patterns as follows:
[0151] The discrimination rules for the ideal river capture spatial pattern are: there is a capture bay between the main stream reach and any one of the tributaries within the candidate area; there are opposite rivers between any two tributary reaches within the candidate area; the access degree of any one of the tributaries forming the opposite river is 0;
[0152] The discrimination rules for the river capture spatial pattern lacking a wind gap are: there is a capture bay between the main stream reach and any one of the tributaries within the candidate area; there are opposite rivers between any two tributary reaches within the candidate area; there is no tributary with an access degree of 0 (the tributary with an access degree of 0 is the wind gap);
[0153] The discrimination rules for the non-collinear opposite river river capture spatial pattern are: there is a capture bay between the main stream reach and any one of the tributaries within the candidate area; there are opposite rivers between any two tributary reaches within the candidate area, and the two tributaries forming the opposite river are not collinear; the access degree of any one of the tributaries forming the opposite river is 0
[0154] The discrimination rules for the same-direction opposite river river capture spatial pattern are: there is a capture bay between the main stream reach and any one of the tributaries within the candidate area; there are opposite rivers between any two tributary reaches within the candidate area, the two tributaries of the opposite river are collinear and the flowing directions are not opposite; the access degree of any one of the tributaries forming the opposite river is 0;
[0155] The discrimination rules for the same-direction opposite river lacking a wind gap river capture spatial pattern are: there is a capture bay between the main stream reach and any one of the tributaries within the candidate area; there are opposite rivers between any two tributary reaches within the candidate area, the two tributaries of the opposite river are collinear and the flowing directions are not opposite; there is no tributary with an access degree of 0; as shown in Table 2 specifically.
[0156] Table 2 River capture spatial patterns and their discrimination rules
[0157]
[0158] Among them, except for the ideal type, other spatial patterns are degenerate patterns.
[0159] (8-2) Store the discrimination rules in step (8-1) into the discrimination rule set.
[0160] (9) According to the knowledge graph for river capture recognition, match each candidate region in the candidate region set HA according to the discrimination rule set to determine whether there is a river capture and the spatial pattern of the river capture.
[0161] In this step, according to the knowledge graph for river capture recognition, determine whether there is a captured bay, whether there is an opposite river, and whether there is a wind gap in the candidate region. When the candidate region meets the discrimination rules of a certain river capture spatial pattern, it is determined to belong to this river capture spatial pattern.
[0162] (10) Return to execute step (2) until all rivers in the river data set R are traversed, and complete the river capture discrimination for all rivers.
[0163] In this embodiment, the river capture discrimination results are as Figures 5 - 14 shown. Among them, Figure 5 is the grayscale map of the discrimination result of the ideal river capture spatial pattern; Figure 6 is the schematic diagram of the satellite remote sensing image at the discrimination result of the ideal river capture spatial pattern; Figure 7 is the schematic diagram of the knowledge graph after the discrimination result of the ideal river capture spatial pattern; the specific discrimination results are shown in Table 3 below;
[0164] Table 3 Discrimination Results of Ideal River Capture Spatial Pattern
[0165]
[0166] Among them, TP is the true positive example, predicted as river capture and actually river capture; FP is the false positive example, predicted as river capture but actually non-river capture; FN is the false negative example, predicted as non-river capture but actually river capture; TN is the true negative example, predicted as non-river capture and actually non-river capture;
[0167] Figure 8 is the grayscale map of the discrimination result of the degenerate river capture spatial pattern; Figures 9 to 13 is the schematic diagram of the satellite remote sensing image at each discrimination result under the degenerate river capture spatial pattern; Figure 14 is the schematic diagram of the knowledge graph after the discrimination result under the degenerate river capture spatial pattern; Figure 15 is the reference position of the actual river capture point; the specific discrimination results are shown in Table 4 below;
[0168] Table 4 Discrimination Results of Degenerate River Capture Spatial Pattern
[0169]
[0170] Combining the discrimination results of the two spatial patterns, the river capture discrimination result of this embodiment is obtained, as Figure 15 and shown in Table 5;
[0171] Table 5 River capture discrimination result
[0172]
[0173] That is, the precision rate of the main river capture recognition result by this system based on the river capture discrimination rule is 100%, the missed judgment rate is 80%, and the false judgment rate is 0. The data used in this embodiment retains more river tributaries compared with the data used by Su Qi et al. The river capture recognition result on the tributaries, combined with the remote sensing image data, also meets the expectations.
[0174] Embodiment 2
[0175] The embodiment of the present invention provides a computer device, and the embodiment of the present invention provides services for the implementation of the method in the above-mentioned Embodiment 1 of the present invention. The device may include: a memory 301 storing computer-executable programs; a processor coupled to the memory 301; the processor calls the computer-executable programs stored in the memory for executing the steps in the method described in Embodiment 1.
[0176] Embodiment 3
[0177] The embodiment of the present invention provides a storage medium containing computer-executable programs, and the computer-executable programs are used for executing the method in Embodiment 1 when executed by a computer processor. The storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system, apparatus, or device.
[0178] Embodiment 4
[0179] Embodiments of the present invention also provide a computer product, such as an app on a mobile phone or a tablet, an installation program on a computer, etc. The product includes computer programs / instructions, and when the computer programs / instructions are executed by a processor, the method described in Embodiment 1 is implemented. Code for a computer-executable program for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).
[0180] It should be understood that the above embodiments and the description in the specification only illustrate the principles, main features, and advantages of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the protection scope of the present invention.
Claims
1. An automatic discrimination method for river capture based on spatial pattern matching, characterized in that, It includes the following steps: (1) Read the river vector data and construct the river data set R; (2) Randomly select a river r from the river data set R i ; (3) Divide the river r i into several river sections to form a river section dataset RN, and calculate the spatial relationships between all river sections and the in-degree and out-degree of each river section to form a river section knowledge graph; (4) Obtain all river confluences according to the river reach knowledge graph, and take all river reaches at each river confluence as a candidate area, and store it in the candidate area set HA; (5) For each candidate area in the candidate area set HA, determine whether there is a capture bay in the candidate area, and store the river reaches judged as capture bays in the capture bay set; (6) For each candidate area in the candidate area set HA, determine whether there is an opposite river in the candidate area, and store the river reaches judged as opposite rivers in the opposite river set; (7) Construct a knowledge graph for river capture recognition based on the in-degree and out-degree of river reaches, the capture bay set, and the opposite river set; (8) According to the regulations on capture bays and opposite rivers in different river capture spatial patterns, extract the discrimination rules for each river capture spatial pattern and store them in the discrimination rule set; (9) According to the knowledge graph for river capture recognition, match each candidate area in the candidate area set HA according to the discrimination rule set to determine whether there is a river capture and the river capture spatial pattern; (10) Return to execute step (2) until all rivers in the river data set R are traversed, and complete the river capture discrimination for all rivers.
2. The automatic discrimination method for river capture based on spatial pattern matching according to claim 1, wherein (3) Specifically includes the following steps: (3-1) Store all points of the river r i into the river point data set RP = {p j | j = 1, 2, …, pn}; Among them, p j represents the j-th point data that constitutes the river r i , and pn represents the number of point data; (3-2) Divide the river r according to the river point data set RP i into several river sections, and store the point data of all river sections into the river section data set RN = {rn k | k = 1, 2, …, rn}, where rn k represents the point data set of river section k, and rn represents the number of river sections; (3-3) Read any pair of river reaches rn from the river reach dataset RN a , rn b ; (3-4) Based on rn a and rn b The intersection situation of the start and end points is judged according to the following rules rn a and b Spatial relationship: When the termination point of river section rn a intersects with the starting point of rn b , it is determined that the spatial relationship is that rn a flows into rn b . Then, increment the out-degree of river section rn a by 1, and increment the in-degree of river section rn b by 1. Among them, the initial values of the in-degree and out-degree of river section rn a and rn b are 0; When the termination point of river section rn b intersects with the starting point of rn a , judge the spatial relationship rn b flows into a , and increment the in-degree of river section rn a by 1, and increment the out-degree of river section rn b by 1; When the starting point of river section rn b intersects with the starting point of rn a or the ending point of river section rn b intersects with the ending point of rn a judge that the spatial relationship rn a and rn b intersect; (3 - 5) Loop and execute (3 - 3)-(3 - 4) until any pair of river reaches in the river reach dataset RN is traversed. At this time, store the spatial relationships of all river reach pairs (rn a , rn b ), the out - degrees and in - degrees of rn a , and the out - degrees and in - degrees of rn b into the river reach knowledge graph.
3. The automatic discrimination method for river capture based on spatial pattern matching according to claim 2, characterized in that (3-2) Specifically includes the following steps: (3-2-1) Obtain the first point p1 from RP as the starting point of the first segment; (3-2-2) Set the segment number k = 1; (3-2-3) Initialize the included angle accumulation value c to 0, and obtain the serial number j of the starting point of segment k; (3-2-4) Read three consecutive point data p in sequence in RP j 、p j+1 、p j+2 ; (3-2-5) Calculate p according to the following formula j , p j+1 , p j+2 The turning coefficient and included angle of the local river formed f = x1*y2 - x2*y1 Wherein, f represents the steering coefficient, (x1, y1) represents the vector coordinates pointing from p j to p j+1 , (x2, y2) represents the vector coordinates pointing from p j+1 to p j+2 , * represents the multiplication sign, and θ represents the included angle; (3-2-6) Update the included angle accumulation value c of the previous iteration to the included angle accumulation value c of this iteration after adding θ; (3-2-7) If the positive and negative values of f do not change, then set j = j + 1 and return to execute (3-2-4); If the positive / negative value of f changes, then a river reach rn is constructed with points from the starting point of segment k to p j+2 in between k , stored in the river reach dataset RN, and p j+2 is used as the starting point of segment k+1. Let k = k+1 and return to execute (3-2-3); If the value of the included angle accumulation value c is greater than 90 or all point data in the set RP are read, end the iteration and complete the segmentation.
4. The automatic discrimination method for river capture based on spatial pattern matching according to claim 1, characterized in that (4) Specifically includes the following steps: (4-1) Read any river section rn from the river section dataset RN k and extract rn from the river section knowledge graph k The in-degree of is denoted as m; (4-2) If m >= 2, then take the river section rn k and the river section flowing into the river section rn k as a river section intersection, take all the river sections at the river section intersection as a candidate area, store it in the candidate area set HA, and execute step (4-4); (4-3) If m < 2, directly execute step (4-4); (4-4) Return to execute step (4-1) until all river reaches in RN are traversed to form the candidate area set HA.
5. The automatic discrimination method for river capture based on spatial pattern matching according to claim 1, characterized in that (5) Specifically includes the following steps: (5-1) Read any candidate area ha from the candidate area set HA; (5-2) Read the river reaches in the candidate area ha with an in-degree greater than or equal to 2, and denote them as the main stream rn g ; (5-3) Read any river section in ha except the main stream, denoted as tributary rn z ; (5-4) Calculate rn according to the following formula g The included angle with rn z is: In the formula, represents the angle between rn g and rn z , (x g , y g ) are the coordinates of the vector from the starting point to the ending point of rn g , and (x z , y z ) are the coordinates of the vector from the starting point to the ending point of rn z ; (5-5) If indicates that there is a captured bay in this candidate area, then (rn g , rn z ) is taken as the captured bay, stored in the captured bay set, and step (5-6) is executed; if then directly execute step (5-6); (5-6) Return to execute step (5-3) until all river reaches included in ha are read; (5-7) Return to execute step (5-1) until the candidate area set HA is traversed.
6. The automatic discrimination method for river capture based on spatial pattern matching according to claim 1, characterized in that (6) Specifically includes the following steps: (6-1) Read any candidate area ha from the candidate area set HA; (6-2) Read any two river reaches in ha with an in-degree less than 2, and denote them as tributary rn z1 , rn z2 ; (6-4) Calculate rn according to the following formula z1 The included angle with rn z2 is: where ζ represents the included angle between rn z1 , rn z2 , (x z1 , y z1 ) are the coordinates of the vector from the starting point to the ending point of rn z1 , and (x z2 , y z2 ) are the coordinates of the vector from the starting point to the ending point of rn z2 ; (6-5) If ζ > 145°, it indicates that there is a facing river in this candidate area, and (rn z1 , rn z2 ) is taken as the facing river, stored in the facing river set, and step (6-6) is executed; if ζ <= 145°, then step (6-6) is directly executed; (6-6) Return to execute step (6-3) until all two-river reach pairs in ha are read; (6-7) Return to execute step (6-1) until the candidate area set HA is traversed to obtain the knowledge graph for river capture recognition.
7. The automatic discrimination method for river capture based on spatial pattern matching according to claim 1, characterized in that (8) Specifically includes the following steps: (8-1) According to the regulations on the capture bay and the opposing river in different river capture spatial patterns, the discrimination rules for each river capture spatial pattern are extracted as follows: The discrimination rules for the ideal river capture spatial pattern are: there is a capture bay between the main stream section and any one of the tributaries in the candidate area; there are opposing rivers between any two tributary sections in the candidate area; the inflow of any one of the tributaries that form the opposing river is 0; The discrimination rules for the river capture spatial pattern lacking the tuyere type are: there is a capture bay between the main stream section and any one of the tributaries in the candidate area; there are opposing rivers between any two tributary sections in the candidate area; there is no tributary with an inflow of 0; The discrimination rules for the non-collinear opposing river type river capture spatial pattern are: there is a capture bay between the main stream section and any one of the tributaries in the candidate area; there are opposing rivers between any two tributary sections in the candidate area, and the two tributaries that form the opposing river are not collinear; the inflow of any one of the tributaries that form the opposing river is 0 The discrimination rules for the same-direction opposing river type river capture spatial pattern are: there is a capture bay between the main stream section and any one of the tributaries in the candidate area; there are opposing rivers between any two tributary sections in the candidate area, the two tributaries of the opposing river are collinear and the flowing directions are not opposite; the inflow of any one of the tributaries that form the opposing river is 0; The discrimination rules for the same-direction opposing river lacking the tuyere type river capture spatial pattern are: there is a capture bay between the main stream section and any one of the tributaries in the candidate area; there are opposing rivers between any two tributary sections in the candidate area, the two tributaries of the opposing river are collinear and the flowing directions are not opposite; there is no tributary with an inflow of 0; (8-2) Store the discrimination rules in step (8-1) into the discrimination rule set.
8. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that: The processor executes the computer program to implement the method according to any one of claims 1-7.
9. A computer-readable storage medium having computer programs / instructions stored thereon, characterized in that, The computer program / instructions implement the method according to any one of claims 1-7 when executed by the processor.
10. A computer program product comprising a computer program / instruction, characterized in that, The computer program / instructions are implemented to implement the method according to any one of claims 1-7 when executed by the processor.