A method for constructing a physical water network for dispatching by using GIS feature analysis of water conservancy objects
By checking the GIS data classification of GIS data in water conservancy projects, the problem of GIS data errors and omissions in water conservancy projects is solved, and the construction and scheduling of water conservancy projects is realized, cost reduction, and data visualization and Rehearsal ability.
Patent Information
- Application Number
- CN202411348310.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-26
AI Technical Summary
In the existing water conservancy project, there is a large amount of manual participation in the process of drawing GIS data, resulting in data errors and omissions, and the upstream and downstream relationships of water conservancy objects cannot be effectively stored, resulting in high construction costs of water networks, inconsistent data, and difficult to upgrade or adjust, which poses hidden dangers. Complex operation.
By obtaining all GIS data of the water network for checksum classification, building a water network data model, extracting split water nodes, reconstructing GIS point data, processing GIS surface data, self-checking and generating problem reports, and automatically generating physics using the GIS engine Water network data model, serving water use scheduling.
It improves the quality of GIS data, reduces labor costs, realizes the automated construction and scheduling and computing model of water network data, enhances the rehearsal capabilities of the water conservancy digital twin platform, and improves the visualization and intuitiveness of data.
Smart Images

Figure CN118861048B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water conservancy projects, and in particular to a method for constructing a physical water network for scheduling by using GIS feature analysis of water conservancy objects. Background Art
[0002] In the water conservancy industry, the water network is a comprehensive system based on natural rivers and lakes, with diversion and drainage projects as channels, storage projects as nodes, and intelligent regulation as means, integrating functions such as water resource optimization, flood control and disaster reduction in river basins, and water ecosystem protection. GIS data, or geographic information system data, is the basic component of the GIS system. GIS vector data is usually used to represent geographic features such as points, lines, and surfaces, and has important geographic location information such as location data (latitude and longitude) and elevation data.
[0003] The original presentation of water networks was based on a graphic platform and presented through GIS data, which restored the water network form of water conservancy objects on the map in proportion. However, due to a large amount of manual participation in the drawing process of GIS data, GIS data drawing errors and data omissions are inevitable. At the same time, GIS data can only be used by water conservancy researchers and water conservancy workers to visually view and analyze the characteristics and relationships of water conservancy objects on the map. The upstream and downstream relationships of various water conservancy objects are not actually stored at the software storage level; the connection relationship between river sections and canal sections between various water diversion points and water confluence points; the relationship between the sluice control between water diversion points, water confluence points, reservoir water inlets, water outlets, different river sections to river sections, river sections to canal sections, and canal sections to canal sections; the position relationship between sluices, valves, water level monitoring points, flow monitoring points, hydrological observation stations, etc. and the river sections and canal sections. Since GIS vector data cannot directly describe the above relationships, the water conservancy digital twin platform cannot further perform relevant calculations for water situation rehearsals and plans through the above relationships. Some engineers in the water conservancy industry can only manually build water network relationships one by one through relational databases, which causes duplication of work. In the process of manually building water network relationships, data errors and omissions are still inevitable. At the same time, since engineers have to manually build water network relationships one by one, it will also lead to inconsistencies and mismatches with the original GIS vector data. If these problems are to be corrected, greater labor costs will be required.
[0004] The existing methods for building water networks are not only costly and cannot guarantee data consistency, but also have at least the following problems: 1) People engaged in water network construction need to manually build information piece by piece and perform repetitive labor, which has high labor costs; 2) After the water network is built, if it needs to be upgraded or adjusted, a large amount of manual input is still required; 3) After the GIS vector data and the water network data are found to be inconsistent, manual identification and adjustment are required, which challenges the professionalism of engineers, and the workload is huge, and it is easy to fall into a vicious circle of repeated modifications; 4) Under the premise of a large irrigation area water network, if there are data errors or omissions, it is not easy to be detected, which may cause hidden dangers to subsequent water conservancy work; 5) The page operation is complicated and difficult to learn and use. Therefore, there is an urgent need for a method to use GIS data to analyze and build a physical water network. Summary of the invention
[0005] In order to solve the above-mentioned deficiencies in the prior art, the present invention provides a method for constructing a physical water network for scheduling by using GIS feature analysis of water conservancy objects, the method comprising the following steps:
[0006] S1. Obtain all GIS data of the water network for data verification and divide them into three categories: GIS point data, GIS line data and GIS surface data;
[0007] S2. Based on all GIS line data, the relationship between the head node and the tail node of each GIS line data is obtained, and the preliminary water network data model is obtained by splicing. The water network data model uses the graph data as the storage medium;
[0008] S3. Extracting the water distribution nodes in the water network data model;
[0009] S4. Based on all the water nodes, all GIS point data are added to the water network data model to obtain the added results, and based on the added results and GIS line data, the GIS point data is reconstructed;
[0010] S5. Add each GIS surface data as a node to the water network data model, and process the water distribution nodes that coincide with the GIS surface data;
[0011] S6. Perform self-check and correction on the water network data model and generate a problem report.
[0012] The present invention is implemented through the following technical scheme: This scheme verifies the data by acquiring all GIS data of the water network, and divides them into three categories: GIS point data (such as sluice gates, water level gauges or hydrological monitoring stations, etc.), GIS line data (such as channels or rivers, etc.) and GIS surface data (such as reservoirs or lakes, etc.), and reflects all water conservancy objects in the water network through three types of GIS data. First, all GIS line data are acquired, and the relationship between the head node and the tail node between each GIS line data is acquired, and the preliminary water network data model is obtained by splicing, and then all the water-dividing nodes (including nodes of water conservancy relationship, such as starting points, water-dividing points or water-dividing points) in the water network data model are extracted, and the GIS point data is added to the water network data model using the extracted water-dividing nodes, and the GIS point data is reconstructed, because the original GIS point data may have data errors, inaccurate coordinates and data loss, so after adding the GIS point data to the water network data model, it is necessary to reconstruct it. Then, the GIS surface data is processed and added directly to the water network data model as a single node. At the same time, the water distribution nodes that overlap with the GIS surface data are processed. Finally, the water network data model is self-checked and corrected, and a problem report is generated for problems that cannot be corrected. This solution is based on the GIS engine and uses three types of GIS data to reflect the transmission facilities such as rivers, channels, pipelines, aqueducts, etc. in water conservancy objects, combined with control facilities such as gates, pumps, and valves, and automatically generates a physical water network that serves water scheduling, which serves the subsequent water network scheduling calculation model.
[0013] As an optional technical solution, the specific computer language descriptions of GIS point data, GIS line data and GIS surface data are as follows:
[0014] GIS point data computer language description: a piece of data with X coordinate value, Y coordinate value and other attributes. The other attributes are the type of water conservancy object represented by the point.
[0015] GIS line data computer language description: a series of ordered, unconnected and non-circular GIS point data. A single GIS line data contains at least two coordinate points. Each GIS point data in the GIS line data contains the following attributes: X coordinate value, Y coordinate value, index number and stake number. The index number is the order in which the GIS point data is included in the GIS line data. The stake number indicates the length value of the corresponding GIS point data from the head node in the GIS line data.
[0016] Computer language description of GIS surface data: a collection of orderly, head-to-tail connected GIS point data that forms a ring. A single GIS surface data contains at least three coordinate points.
[0017] As an optional technical solution, step S2 is specifically as follows:
[0018] S21. Obtain all GIS line data, and extract the head node and tail node of each GIS line data;
[0019] S22. Traverse the head node and tail node of each GIS line data in sequence, obtain the first head node in any GIS line data, calculate the distance between the first head node and each other GIS line data to obtain a distance set, extract the first distance corresponding to the closest distance in the distance set, and if the first distance is less than the buffer distance, determine that the corresponding two GIS line data intersect and obtain the intersection point;
[0020] S23. Insert the head node, tail node and all intersection points of a single GIS line data, and establish the data model corresponding to the single GIS line data in sequence according to the order of the index number corresponding to the single GIS line data;
[0021] S24. Repeat steps S21 to S23 for all GIS line data to form a preliminary water network data model in the map data.
[0022] As an optional technical solution, step S3 is specifically as follows:
[0023] Traverse each node in the water network data model in turn, mark the node with in-degree 0 and out-degree greater than or equal to 1 as the starting point; mark the node with in-degree 1 and out-degree greater than or equal to 2 as the water dividing point; mark the node with in-degree greater than or equal to 2 and out-degree equal to 1 as the water confluence point; mark the node with out-degree greater than or equal to 2 and in-degree greater than or equal to 2 as the water dividing and confluence point; mark the node with in-degree greater than or equal to 1 and out-degree equal to 0 as the end point;
[0024] The starting point, the water dividing point, the water confluence point, the water branching point and the ending point are collectively referred to as water branching nodes.
[0025] As an optional technical solution, step S4 is specifically as follows:
[0026] S41. Extract all the water-dividing nodes in the water network data model, calculate the distances between all the water-dividing nodes and all the GIS point data one by one, and if it is determined that the distance between a single water-dividing node and a single GIS point data is less than the buffer distance, insert the corresponding GIS point data into the water network data model and bind the corresponding water-dividing node, so as to complete the binding of the GIS point data and the water-dividing node in the water network data model;
[0027] S42. Obtain the GIS point data that is not successfully bound to any water distribution node among all GIS point data, and delete it.
[0028] As an optional technical solution, step S5 is specifically as follows:
[0029] Obtaining GIS surface data as a single surface data node and inserting it into the water network data model;
[0030] Obtain all water distribution nodes and their coordinates in the water network data model, and match them with each surface data node in turn to obtain matching results;
[0031] Based on the matching result, if it is determined that the distance between the first branch water confluence node and the first surface data node is less than the buffer distance, the GIS surface data corresponding to the first surface data node is bound to the first branch water confluence node and a preset relationship is established.
[0032] As an optional technical solution, binding the GIS surface data corresponding to the first surface data node with the first water distribution node to establish a preset relationship includes:
[0033] If the in-degree of the first branch water confluence node is 0, the preset relationship is named as the water outlet, and the first surface data node points to the first branch water confluence node;
[0034] If the out-degree of the first water branch confluence node is 0, the preset relationship is named as a water inlet, and the first water branch confluence node points to the first surface data node;
[0035] If the first branch water confluence node satisfies the conditions that the in-degree is not 0 and the out-degree is not 0, the preset relationship is that the first surface data node points to the first branch water confluence node.
[0036] As an optional technical solution, step S6 is specifically as follows:
[0037] S61. Analyze and process the duplicate data in the water network data model to generate a first problem sub-report;
[0038] S62. Performing reverse flow error analysis on the GIS line data in the water network data model to generate a second problem sub-report;
[0039] S63. Compare all GIS point data with the water network data model to generate a third problem sub-report;
[0040] S64. Integrate the first problem sub-report, the second problem sub-report and the third problem sub-report into the problem report.
[0041] As an optional technical solution, step S61 is specifically as follows:
[0042] S611. Fully load the nodes with connection relationship in the water network data model, and calculate the number of GIS line data contained between any group of nodes with connection relationship;
[0043] S612. Take out a group of nodes corresponding to the number of GIS line data greater than 1 to form a preliminary set of suspected data duplication;
[0044] S613. Traverse the suspected data duplication set, take out a single node from any group of nodes as the first node, and recursively traverse with the first node as the start node and the end node, and query whether the extended GIS line data of the first node is included in any other group of nodes. If so, find out multiple repeated associated nodes including the first node to form a set of problematic data;
[0045] S614. Delete multiple duplicate associated nodes including the first node, and repeat step S613 to form multiple sets of problem data;
[0046] S615. Count the number of nodes in each set of problem data, and sort in reverse order according to the number of nodes contained in each set to obtain a sorting result;
[0047] S616. Based on the sorting result, the node ID in each set of problem data is converted into a water conservancy object name and a water conservancy object code to form a first problem sub-report;
[0048] Step S62 is specifically as follows:
[0049] S621. Filter the starting nodes among all the water distribution nodes, take a single starting node as the starting point, and recursively search for subsequent water distribution nodes layer by layer according to the pointing relationship of the starting node until the last layer in the water network data model, and record each search route;
[0050] S622. Determine whether there are repeated water distribution nodes in each search route. If so, mark the repeated water distribution nodes and the corresponding search routes as problem nodes and problem routes respectively. If not, do nothing.
[0051] S623. Filter all problem nodes and corresponding problem lines in the water network data model to form a second problem sub-report;
[0052] Step S63 is specifically as follows:
[0053] S631. Take out all the branch water confluence nodes and their relationships in the graph data, traverse each branch water confluence node in turn, and when traversing any branch water confluence node and recording it as the second branch water confluence node, merge the second branch water confluence node and all the branch water confluence nodes associated with the second branch water confluence node into a group, and determine whether the next traversed branch water confluence node is in the group. If so, skip and continue traversing. If not, record the corresponding branch water confluence node as the third branch water confluence node, and merge the third branch water confluence node and all the branch water confluence nodes associated with the third branch water confluence node into a group;
[0054] S632. Determine whether the number of groups of the water distribution node is 1. If so, determine that the corresponding water network diagram is a connected diagram; if not, determine that the corresponding water network diagram is a non-connected diagram, and perform statistical output;
[0055] S633. When it is determined that there are multiple groups of water diversion nodes, the number of nodes in each group including water diversion nodes is counted and sorted to obtain a sorting result, and a third problem sub-report is formed based on the sorting result.
[0056] As an optional technical solution, the buffer zone distances are all set values.
[0057] One or more technical solutions provided by the present invention have at least the following technical effects or advantages:
[0058] The present invention discloses a method for constructing a physical water network for scheduling by analyzing the GIS characteristics of water conservancy objects. The method aims at water scheduling and is based on a GIS engine. It uses three types of GIS data to reflect the transmission facilities such as rivers, channels, pipelines, aqueducts, etc. in water conservancy objects combined with control facilities such as gates, pumps, and valves. It automatically generates a physical water network serving water scheduling and serves the subsequent water network scheduling calculation model.
[0059] The present invention automatically generates a water network data model through GIS data, and sets a self-checking program for the water network data model, performs water conservancy business-based checks on the original GIS data, and improves the quality of the GIS data.
[0060] The present invention establishes a water network data model based on graph data as the storage medium. All relationships, locations and attribute information of water conservancy objects in the physical water network can be directly presented on the visualization platform in the network structure of the graph data itself, which is more efficient and intuitive.
[0061] The water network data model of the present invention digitizes and graphs the physical water network through GIS data, expands the possibility of performing digital twin previews of water conservancy and water networks through graph algorithms combined with other algorithms, and opens up the underlying data foundation for digital twin previews of water conservancy and water networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of the present invention, and do not constitute a limitation on the embodiments of the present invention;
[0063] Figure 1 It is a flow chart of a method for constructing a physical water network for scheduling by using GIS feature analysis of water conservancy objects in the present invention;
[0064] Figure 2 It is a schematic diagram of GIS point data in the present invention;
[0065] Figure 3 It is a schematic diagram of GIS line data in the present invention;
[0066] Figure 4 It is a schematic diagram of the reverse flow error analysis of GIS line data in the present invention. DETAILED DESCRIPTION
[0067] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0068] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those within the scope of this description. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0069] Example
[0070] Please refer to Figure 1 , Figure 1 The present invention is a flow chart of a method for constructing a physical water network for scheduling by using GIS feature analysis of water conservancy objects. The method comprises the following steps:
[0071] S1. Obtain all GIS data of the water network for data verification and divide them into three categories: GIS point data, GIS line data and GIS surface data;
[0072] S2. Based on all GIS line data, the relationship between the head node and the tail node of each GIS line data is obtained, and the preliminary water network data model is obtained by splicing. The water network data model uses the graph data as the storage medium;
[0073] S3. Extracting the water distribution nodes in the water network data model;
[0074] S4. Based on all the water nodes, all GIS point data are added to the water network data model to obtain the added results, and based on the added results and GIS line data, the GIS point data is reconstructed;
[0075] S5. Add each GIS surface data as a node to the water network data model, and process the water distribution nodes that coincide with the GIS surface data;
[0076] S6. Perform self-check and correction on the water network data model and generate a problem report.
[0077] The specific embodiments of the present invention are as follows:
[0078] S1. Obtain all GIS data of the water network for data verification and divide them into three categories: GIS point data, GIS line data and GIS surface data;
[0079] The specific computer language descriptions of GIS point data, GIS line data, and GIS surface data are as follows:
[0080] GIS point data computer language description: a piece of data with X coordinate value, Y coordinate value and other attributes. The other attributes are the type of water conservancy object represented by the point; such as sluice gate, water level meter, flow meter or hydrological monitoring station, etc. Examples of GIS point data are as follows Figure 2 shown.
[0081] GIS line data computer language description: a series of ordered, unconnected and non-circular GIS point data. A single GIS line data contains at least two coordinate points. Each GIS point data in the GIS line data contains the following attributes: X coordinate value, Y coordinate value, index number and stake number. The index number is the order in which the GIS point data is included in the GIS line data. The stake number indicates the length of the corresponding GIS point data from the head node in the GIS line data. The type of water conservancy object represented by the GIS line data, such as channels, rivers, etc. Examples of GIS line data are as follows: Figure 3 To further explain the definition of GIS line data, for example, in GIS line data, take a river data, the index number of the head node is 0, the stake number is 0, then the index number of the tail node should be the number of GIS point data contained in the GIS line data minus 1, and the stake number is the actual length of the river.
[0082] GIS surface data computer language description: a series of orderly, head-to-tail connected and ring-shaped GIS point data collection, a single GIS surface data contains at least three coordinate points. GIS surface data represents the type of water conservancy object, such as reservoirs or lakes.
[0083] S2. Based on all GIS line data, obtain the relationship between the head node and the tail node of each GIS line data, and splice them to obtain a preliminary water network data model;
[0084] Step S2 is specifically as follows:
[0085] S21. Obtain all GIS line data, and extract the head node and tail node of each GIS line data;
[0086] S22. Traverse the head node and tail node of each GIS line data in sequence, obtain the first head node in any GIS line data, calculate the distance between the first head node and each other GIS line data to obtain a distance set, extract the first distance corresponding to the closest distance in the distance set, and if the first distance is less than the buffer distance, determine that the corresponding two GIS line data intersect and obtain the intersection point;
[0087] To facilitate the understanding of step S22, an example is given for detailed explanation. For example: there are three rivers, namely A, B and C, corresponding to GIS line data A, B and C, and each river has multiple coordinate nodes; the head node in GIS line data A is obtained as the first head node, and the distance between all nodes in GIS line data B and the first head node is calculated to obtain the shortest first distance, and it is determined whether the first distance is less than the buffer distance. If so, it is determined that rivers A and B intersect and the intersection point is obtained. Similarly, the same operation is performed on GIS line data C.
[0088] S23. Insert the head node, tail node and all intersection points of a single GIS line data, and establish the data model corresponding to the single GIS line data in sequence according to the order of the index number corresponding to the single GIS line data;
[0089] S24. Repeat steps S21 to S23 for all GIS line data to form a preliminary water network data model in the map data.
[0090] Specifically, the node storage attributes of the graph data include: water conservancy object type, water conservancy object name, water conservancy object code, water conservancy object ID, and water conservancy object coordinate information; the relationship attributes include: the starting coordinates, ending coordinates, starting pile number, ending pile number, starting index number, ending index number, water conservancy object type, water conservancy object name, and water conservancy object code of the dividing line segment.
[0091] S3. Extracting the water distribution nodes in the water network data model;
[0092] Step S3 is specifically as follows:
[0093] Traverse each node in the water network data model in turn, mark the node with in-degree 0 and out-degree greater than or equal to 1 as the starting point; mark the node with in-degree 1 and out-degree greater than or equal to 2 as the water dividing point; mark the node with in-degree greater than or equal to 2 and out-degree equal to 1 as the water confluence point; mark the node with out-degree greater than or equal to 2 and in-degree greater than or equal to 2 as the water dividing and confluence point; mark the node with in-degree greater than or equal to 1 and out-degree equal to 0 as the end point;
[0094] The starting point, the water dividing point, the water confluence point, the water branching point and the ending point are collectively referred to as water branching nodes.
[0095] Specifically, the concept of out-degree of graph data: a node in the graph data has one relationship pointing to other nodes, which is one out-degree. If there are two relationships, the out-degree is 2, and so on. The concept of in-degree of graph data: a node in the graph data has one relationship pointing to the node from other nodes, which is one in-degree. If there are two relationships, the in-degree is 2, and so on.
[0096] S4. Based on all the water nodes, all GIS point data are added to the water network data model to obtain the added results, and based on the added results and GIS line data, the GIS point data is reconstructed;
[0097] Step S4 is specifically as follows:
[0098] S41. Extract all the water-dividing nodes in the water network data model, calculate the distances between all the water-dividing nodes and all the GIS point data one by one, and if it is determined that the distance between a single water-dividing node and a single GIS point data is less than the buffer distance, insert the corresponding GIS point data into the water network data model and bind the corresponding water-dividing node, so as to complete the binding of GIS point data and water-dividing nodes in the water network data model; for example, a sluice (GIS point data) is obtained to belong to the water-dividing node D, and according to the corresponding GIS line data of the sluice (GIS point data), the attribute line data is associated, so as to depict that: the sluice belongs to the water-dividing node D, and at the same time establish the entry and exit relationship of the water-dividing node.
[0099] S42. Obtain the GIS point data that is not successfully bound to any water distribution node among all GIS point data, and delete it.
[0100] S5. Add each GIS surface data as a node to the water network data model, and process the water distribution nodes that coincide with the GIS surface data;
[0101] Step S5 is specifically as follows:
[0102] Obtaining GIS surface data as a single surface data node and inserting it into the water network data model;
[0103] Obtain all water distribution nodes and their coordinates in the water network data model, and match them with each surface data node in turn to obtain matching results;
[0104] Based on the matching result, if it is determined that the distance between the first branch water confluence node and the first surface data node is less than the buffer distance, the GIS surface data corresponding to the first surface data node is bound to the first branch water confluence node and a preset relationship is established. The specific establishment of the preset relationship is:
[0105] If the in-degree of the first branch water confluence node is 0, the preset relationship is named as the water outlet, and the first surface data node points to the first branch water confluence node;
[0106] If the out-degree of the first water branch confluence node is 0, the preset relationship is named as a water inlet, and the first water branch confluence node points to the first surface data node;
[0107] If the first branch water confluence node satisfies the conditions that the in-degree is not 0 and the out-degree is not 0, the preset relationship is that the first surface data node points to the first branch water confluence node.
[0108] Specifically, the input coordinate point E, reservoir F and buffer zone distance is 10 meters. If the coordinate point E is located in the reservoir F or within 10 meters of the periphery of the reservoir F, it is determined that the coordinate point E and the reservoir F coincide.
[0109] S6. Perform self-check and correction on the water network data model and generate a problem report.
[0110] Step S6 is specifically as follows:
[0111] S61. Analyze and process the duplicate data in the water network data model to generate a first problem sub-report;
[0112] S62. Performing reverse flow error analysis on the GIS line data in the water network data model to generate a second problem sub-report;
[0113] S63. Compare all GIS point data with the water network data model to generate a third problem sub-report;
[0114] S64. Integrate the first problem sub-report, the second problem sub-report and the third problem sub-report into the problem report.
[0115] Step S61 is specifically as follows:
[0116] S611. Fully load the nodes with connection relationship in the water network data model, and calculate the number of GIS line data contained between any group of nodes with connection relationship;
[0117] S612. Take out a group of nodes corresponding to the number of GIS line data greater than 1 to form a preliminary set of suspected data duplication;
[0118] S613. Traverse the suspected data duplication set, take out a single node from any group of nodes as the first node, and recursively traverse with the first node as the start node and the end node, and query whether the extended GIS line data of the first node is included in any other group of nodes. If so, find out multiple repeated associated nodes including the first node to form a set of problematic data;
[0119] S614. Delete multiple duplicate associated nodes including the first node, and repeat step S613 to form multiple sets of problem data;
[0120] S615. Count the number of nodes in each set of problem data, and sort in reverse order according to the number of nodes contained in each set to obtain a sorting result;
[0121] S616. Based on the sorting result, the node ID in each set of problem data is converted into a water conservancy object name and a water conservancy object code to form a first problem sub-report;
[0122] Among them, GIS data in medium and large irrigation areas has the characteristics of huge data volume, and GIS data is manually drawn. In different scenarios, multiple sets of GIS data will be loaded and presented uniformly on a map, which will cause a lot of data duplication problems. In the past, such problems need to be solved manually, one by one on the map interface needs to be checked, which is a huge workload and easy to miss. This embodiment uses the method of constructing a water network through GIS feature analysis to complete the construction of the water network model. After using the map data as the storage medium, the water network is presented in the most concise, comprehensive and effective form, so it is possible to perform repeated data analysis through the above steps.
[0123] Step S62 is specifically as follows:
[0124] S621. Filter the starting nodes among all the water distribution nodes, take a single starting node as the starting point, and recursively search for subsequent water distribution nodes layer by layer according to the pointing relationship of the starting node until the last layer in the water network data model, and record each search route;
[0125] S622. Determine whether there are repeated water distribution nodes in each search route. If so, mark the repeated water distribution nodes and the corresponding search routes as problem nodes and problem routes respectively. If not, do nothing.
[0126] S623. Filter all problem nodes and corresponding problem lines in the water network data model to form a second problem sub-report.
[0127] Among them, the physical water network in reality is a directed acyclic graph, but in the original GIS data, because of a large amount of manual participation, it is inevitable that the direction order of GIS line data such as rivers / channels is marked in reverse order, such as Figure 4 As shown, the GIS line data can be subjected to reverse flow error analysis by utilizing the characteristics of the graph data, which can be specifically achieved by step S62.
[0128] Step S63 is specifically as follows:
[0129] S631. Take out all the branch water confluence nodes and their relationships in the graph data, traverse each branch water confluence node in turn, and when traversing any branch water confluence node and recording it as the second branch water confluence node, merge the second branch water confluence node and all the branch water confluence nodes associated with the second branch water confluence node into a group, and determine whether the next traversed branch water confluence node is in the group. If so, skip and continue traversing. If not, record the corresponding branch water confluence node as the third branch water confluence node, and merge the third branch water confluence node and all the branch water confluence nodes associated with the third branch water confluence node into a group;
[0130] S632. Determine whether the number of groups of the water distribution node is 1. If so, determine that the corresponding water network diagram is a connected diagram; if not, determine that the corresponding water network diagram is a non-connected diagram, and perform statistical output;
[0131] S633. When it is determined that there are multiple groups of water diversion nodes, the number of nodes in each group including water diversion nodes is counted and sorted to obtain a sorting result, and a third problem sub-report is formed based on the sorting result.
[0132] Take out all the water-dividing nodes and relationships in the graph data, traverse each water-dividing node in turn, and in the process of traversing any water-dividing node, query whether there are other nodes pointing to this node and whether this node points to other nodes through a recursive program, merge all the nodes related to this node into a group, and before traversing the next node, determine whether the next node is already in the group, if so, skip it; if the obtained node grouping data is a group, the water network diagram is determined to be a connected graph, and there is no non-connectivity problem; if the number of node groups is greater than 1, the graph is determined to be a non-connected graph, and statistical output is performed; sort the data with multiple groups from large to small according to the number of nodes in each group, and you can count the proportion of the largest connected subgraph in the water network in the entire water network, and you can also count the proportion of the top three or top ten groups. This proportion can explain the data quality of the GIS original data from the perspective of connectivity. The larger the proportion, the better the quality of the GIS original data.
[0133] Among them, in the actual physical water network, theoretically all water conservancy object elements should exist in a connected map, but because the original GIS data is drawn manually, there are data errors, inaccurate coordinates and data omissions. This type of data is analyzed through step S63 to generate a third problem sub-report.
[0134] Furthermore, the buffer distances are all set values. It should be noted that all buffer distances mentioned in this embodiment are the same value. The reason for setting the buffer distance is that the original GIS data is manually drawn, the data volume is huge, and when loading multiple sets of GIS data, there may be a slight offset in the position of the GIS data. Therefore, the concept of buffer distance is defined. For example, the buffer distance is 10 meters. If the head node of a river is within 10 meters of the closest distance to another river, it is determined that the two rivers are converging.
[0135] The present invention automatically generates a water network data model through GIS data. The self-checking program of the model can check the original GIS data based on water conservancy business to improve the quality of GIS data. For example, for an irrigation area with 1,500 lines of data, manual inspection of GIS data problems requires a total labor cost of 2 months per person, and there are still data omissions. However, through the self-checking program of the water network data model of the present invention, it only takes a few working days from the discovery of suspected problems to verification.
[0136] The present invention establishes a water network data model with graph data as the storage medium. The quality monitoring of GIS data is not the only function. In the previous formulation of water conservancy industry standards, the upstream and downstream and subordinate relationships of water conservancy objects are stored in a relational database. At the same time, the relationship storage dimension is single. For example, in the previous water conservancy industry river object relationship table, it is known that the subordinate rivers of river P are three rivers R, S, and T, but it is impossible to know the upstream and downstream relationships between rivers R, S, and T and the intersection of river P, pile numbers, etc. At the same time, the data association of the relational database is not intuitive. If rivers S and T themselves have a connection, and the connection has business significance for water conservancy related staff, it is necessary to re-establish a new query. However, the present invention establishes a water network data model based on graph data as the storage medium. All relationships, locations, and attribute information of water conservancy objects in the physical water network can be directly presented on the visualization platform with the mesh structure of the graph data itself, which is more efficient and intuitive, and has promoted the formulation of new data standards for the water conservancy industry.
[0137] The water network data model of the present invention digitizes and graphs the physical water network through GIS data, expands the possibility of performing digital twin previews of water conservancy and water networks through graph algorithms combined with other algorithms, and opens up the underlying data foundation for digital twin previews of water conservancy and water networks.
[0138] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0139] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for constructing a physical water network for scheduling using GIS feature analysis of water conservancy objects. It is characterized in that The method comprises the following steps: S1. Obtain all GIS data of the water network for data verification and divide them into three categories: GIS point data, GIS line data and GIS surface data; S2. Based on all GIS line data, the relationship between the head node and the tail node of each GIS line data is obtained, and the preliminary water network data model is obtained by splicing. The water network data model uses the graph data as the storage medium; S3. Extracting the water distribution nodes in the water network data model; S4. Based on all the water nodes, all GIS point data are added to the water network data model to obtain the added results, and based on the added results and GIS line data, the GIS point data is reconstructed; S5. Add each GIS surface data as a node to the water network data model, and process the water distribution nodes that coincide with the GIS surface data; S6. Perform self-check and correction on the water network data model and generate a problem report; Step S6 is specifically as follows: S61. Analyze and process the duplicate data in the water network data model to generate a first problem sub-report; S62. Performing reverse flow error analysis on the GIS line data in the water network data model to generate a second problem sub-report; S63. Compare all GIS point data with the water network data model to generate a third problem sub-report; S64. Integrate the first problem sub-report, the second problem sub-report and the third problem sub-report into the problem report; Step S61 is specifically as follows: S611. Fully load the nodes with connection relationship in the water network data model, and calculate the number of GIS line data contained between any group of nodes with connection relationship; S612. Take out a group of nodes corresponding to the number of GIS line data greater than 1 to form a preliminary set of suspected data duplication; S613. Traverse the suspected data duplication set, take out a single node from any group of nodes as the first node, and recursively traverse with the first node as the start node and the end node, and query whether the extended GIS line data of the first node is included in any other group of nodes. If so, find out multiple repeated associated nodes including the first node to form a set of problematic data; S614. Delete multiple duplicate associated nodes including the first node, and repeat step S613 to form multiple sets of problem data; S615. Count the number of nodes in each set of problem data, and sort in reverse order according to the number of nodes contained in each set to obtain a sorting result; S616. Based on the sorting result, the node ID in each set of problem data is converted into a water conservancy object name and a water conservancy object code to form a first problem sub-report; Step S62 is specifically as follows: S621. Filter the starting nodes among all the water distribution nodes, take a single starting node as the starting point, and recursively search for subsequent water distribution nodes layer by layer according to the pointing relationship of the starting node until the last layer in the water network data model, and record each search route; S622. Determine whether there are repeated water distribution nodes in each search route. If so, mark the repeated water distribution nodes and the corresponding search routes as problem nodes and problem routes respectively. If not, do nothing. S623. Filter all problem nodes and corresponding problem lines in the water network data model to form a second problem sub-report; Step S63 is specifically as follows: S631. Take out all the branch water confluence nodes and their relationships in the graph data, traverse each branch water confluence node in turn, and when traversing any branch water confluence node and recording it as the second branch water confluence node, merge the second branch water confluence node and all the branch water confluence nodes associated with the second branch water confluence node into a group, and determine whether the next traversed branch water confluence node is in the group. If so, skip and continue traversing. If not, record the corresponding branch water confluence node as the third branch water confluence node, and merge the third branch water confluence node and all the branch water confluence nodes associated with the third branch water confluence node into a group; S632. Determine whether the number of groups of the water distribution node is 1. If so, determine that the corresponding water network diagram is a connected diagram; if not, determine that the corresponding water network diagram is a non-connected diagram, and perform statistical output; S633. When it is determined that there are multiple groups of water diversion nodes, the number of nodes in each group including water diversion nodes is counted and sorted to obtain a sorting result, and a third problem sub-report is formed based on the sorting result.
2. A method for constructing a physical water network for scheduling by using GIS feature analysis of water conservancy objects according to claim 1, It is characterized in that The specific computer language descriptions of GIS point data, GIS line data, and GIS surface data are as follows: GIS point data computer language description: a piece of data with X coordinate value, Y coordinate value and other attributes. The other attributes are the type of water conservancy object represented by the point. GIS line data computer language description: a series of ordered, unconnected and non-circular GIS point data. A single GIS line data contains at least two coordinate points. Each GIS point data in the GIS line data contains the following attributes: X coordinate value, Y coordinate value, index number and stake number. The index number is the order in which the GIS point data is included in the GIS line data. The stake number indicates the length value of the corresponding GIS point data from the head node in the GIS line data. Computer language description of GIS surface data: a collection of orderly, head-to-tail connected GIS point data that forms a ring. A single GIS surface data contains at least three coordinate points.
3. A method for constructing a physical water network for scheduling by using GIS feature analysis of water conservancy objects according to claim 2, It is characterized in that Step S2 is specifically as follows: S21. Obtain all GIS line data, and extract the head node and tail node of each GIS line data; S22. Traverse the head node and tail node of each GIS line data in sequence, obtain the first head node in any GIS line data, calculate the distance between the first head node and each other GIS line data to obtain a distance set, extract the first distance corresponding to the closest distance in the distance set, and if the first distance is less than the buffer distance, determine that the corresponding two GIS line data intersect and obtain the intersection point; S23. Insert the head node, tail node and all intersection points of a single GIS line data, and establish the data model corresponding to the single GIS line data in sequence according to the order of the index number corresponding to the single GIS line data; S24. Repeat steps S21 to S23 for all GIS line data to form a preliminary water network data model in the map data.
4. A method for constructing a physical water network for scheduling by using GIS feature analysis of water conservancy objects according to claim 1, It is characterized in that Step S3 is specifically as follows: Traverse each node in the water network data model in turn, mark the node with in-degree 0 and out-degree greater than or equal to 1 as the starting point; mark the node with in-degree 1 and out-degree greater than or equal to 2 as the watershed point; Mark the nodes with in-degree greater than or equal to 2 and out-degree equal to 1 as water confluence points; Mark nodes with out-degree greater than or equal to 2 and in-degree greater than or equal to 2 as junctions; Mark the nodes with in-degree greater than or equal to 1 and out-degree equal to 0 as end points; The starting point, the water dividing point, the water confluence point, the water branching point and the ending point are collectively referred to as water branching nodes.
5. A method for constructing a physical water network for scheduling by using GIS feature analysis of water conservancy objects according to claim 1, It is characterized in that Step S4 is specifically as follows: S41. Extract all the water-dividing nodes in the water network data model, calculate the distances between all the water-dividing nodes and all the GIS point data one by one, and if it is determined that the distance between a single water-dividing node and a single GIS point data is less than the buffer distance, insert the corresponding GIS point data into the water network data model and bind the corresponding water-dividing node, so as to complete the binding of the GIS point data and the water-dividing node in the water network data model; S42. Obtain the GIS point data that is not successfully bound to any water distribution node among all GIS point data, and delete it.
6. A method for constructing a physical water network for scheduling by using GIS feature analysis of water conservancy objects according to claim 1, It is characterized in that Step S5 is specifically as follows: Obtaining GIS surface data as a single surface data node and inserting it into the water network data model; Obtain all water distribution nodes and their coordinates in the water network data model, and match them with each surface data node in turn to obtain matching results; Based on the matching result, if it is determined that the distance between the first branch water confluence node and the first surface data node is less than the buffer distance, the GIS surface data corresponding to the first surface data node is bound to the first branch water confluence node and a preset relationship is established.
7. A method for constructing a physical water network for scheduling by using GIS feature analysis of water conservancy objects according to claim 6, It is characterized in that Binding the GIS surface data corresponding to the first surface data node to the first water distribution node to establish a preset relationship includes: If the in-degree of the first branch water confluence node is 0, the preset relationship is named as the water outlet, and the first surface data node points to the first branch water confluence node; If the out-degree of the first water branch confluence node is 0, the preset relationship is named as a water inlet, and the first water branch confluence node points to the first surface data node; If the first branch water confluence node satisfies the conditions that the in-degree is not 0 and the out-degree is not 0, the preset relationship is that the first surface data node points to the first branch water confluence node.
8. A method for constructing a physical water network for scheduling by using GIS feature analysis of water conservancy objects according to any one of claims 3, 5 and 6, It is characterized in that The buffer zone distances are all set values.
