Drainage pipe network diagram generation method and device, equipment, storage medium and program product

By constructing a drainage pipe topology network and traversing the pipelines along the water flow direction, the boundary lines of the box culvert pipelines are automatically determined, solving the problem of inaccurate box culvert boundaries and improving the efficiency and accuracy of drainage pipe network map generation.

CN120995627APending Publication Date: 2025-11-21CHANGJIANG GEOPHYSICAL EXPLORATION & TESTING (WUHAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510972498.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In the current drainage network diagram drawing, the boundary of the box culvert pipeline is not drawn accurately, which requires manual adjustment and consumes a lot of manpower and time.

Method used

By constructing a drainage pipe topology network and traversing the pipelines along the water flow direction, the boundary lines of the box culvert pipelines are automatically determined based on the width of the box culvert pipelines and the connecting pipelines, thus generating a drainage pipe network diagram.

Benefits of technology

It improves the efficiency and accuracy of drainage network map drawing, avoids the problem of discontinuous or intersecting box culvert boundaries, is highly adaptable, and can accurately draw multiple inflow and outflow box culverts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995627A_ABST
    Figure CN120995627A_ABST
Patent Text Reader

Abstract

The invention provides a drainage pipe network diagram generation method and device, equipment, a storage medium and a program product, and the method comprises the steps: obtaining pipe points and pipelines of a drainage pipe network, and constructing a drainage pipe topology network with the pipe points as nodes and the pipelines as edges; wherein the direction of the edge is the water flow direction; traversing edges of the drain pipe topology network along the water flow direction, and determining boundary lines of the box culvert pipelines based on the box culvert widths of the box culvert pipelines and the connected pipelines in the traversing process; and generating a drainage pipe network diagram based on the drainage pipe topology network and the boundary line of the box culvert pipeline. The one-way drainage pipe topology network is constructed through the pipe points and the pipelines in the drainage pipe network, the incidence relation between the pipelines is established, the boundary line of the box culvert pipelines is determined based on the box culvert width of the box culvert pipelines and the connected pipelines, the problem that box culvert boundaries are discontinuous or crossed in a traditional mapping method is solved, and the mapping efficiency is improved. And the mapping efficiency and the mapping accuracy of the drainage pipe network map are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of underground pipeline detection technology, and in particular to a method, apparatus, equipment, storage medium, and program product for generating drainage network maps. Background Technology

[0002] Drainage pipe networks are a crucial urban infrastructure. The visualization and data management of drainage pipe network survey results are essential for the rational planning, dynamic monitoring, and analysis of urban drainage systems. Currently, domestic drainage pipe network survey results are mostly stored as CAD files, using professional mapping software to draw drainage pipelines. The data used by the mapping software is stored in Access or Excel, divided into pipe point tables and pipeline tables. The pipe point table records ancillary facilities (objects) as pipe points, assigning each pipe point a unique number and recording its coordinates, properties, well depth, elevation, etc. The pipeline table records data about drainage pipes, including the pipe's starting point number, starting point burial depth, properties, pipe diameter, material, and flow direction. Drawing a drainage pipe network map essentially involves drawing the pipe points and pipe segments in CAD. However, due to the special nature of drainage box culverts, their boundaries need to be drawn when they exceed a certain width. Existing pipe network mapping software draws parallel lines on both sides of the center line when drawing the boundary of drainage box culverts, using the center line as a reference. However, this drawing method simply draws parallel lines of equal length along the center line of the pipe section according to the width of the drainage box culvert and the length of the pipe section. For continuous box culvert pipe sections, the parallel lines usually intersect or are discontinuous at the corners of the box culvert, which does not match the reality and requires manual readjustment, which consumes a lot of manpower and time. Summary of the Invention

[0003] This invention provides a method, apparatus, equipment, storage medium, and program product for generating drainage pipe network diagrams, in order to solve the defects of inaccurate drawing of box culvert pipelines in the prior art.

[0004] This invention provides a method for generating drainage network diagrams, comprising: Obtain the pipe points and pipelines of the drainage network, and construct a drainage pipe topology network with the pipe points as nodes and the pipelines as edges; wherein the direction of the edges is the direction of water flow; Along the direction of water flow, traverse the edges of the drainage pipe topology network, and during the traversal, determine the boundary line of the box culvert pipeline based on the width of the box culvert pipeline and the pipelines connected to it. A drainage network diagram is generated based on the drainage pipe topology network and the boundary lines of the box culvert pipelines.

[0005] According to a drainage network diagram generation method provided by the present invention, the step of determining the boundary line of the box culvert pipeline based on the width of the box culvert pipeline and the pipelines connected thereto during the traversal process includes: Detect the first pipeline connected to the upstream node of the currently traversed box culvert pipeline and / or the second pipeline connected to the downstream node of the currently traversed box culvert pipeline. Based on the first pipeline, the currently traversed box culvert pipeline and the box culvert width, determine the first boundary point corresponding to the upstream node, and / or based on the second pipeline, the currently traversed box culvert pipeline and the box culvert width, determine the second boundary point corresponding to the downstream node; The boundary lines of the box culvert pipeline being traversed are determined based on the first boundary point and / or the second boundary point.

[0006] According to a drainage network diagram generation method provided by the present invention, the first boundary point includes a first left boundary point and a first right boundary point on both sides of the upstream node; the step of determining the first boundary point corresponding to the upstream node based on the first pipeline, the currently traversed box culvert pipeline, and the box culvert width includes: If the number of the first pipeline is 1, based on the first pipeline and the currently traversed box culvert pipeline, calculate the first angle between the currently traversed box culvert pipeline and the first line segment and the second angle between the box culvert pipeline and the second line segment; wherein, the first line segment is the line connecting the first left boundary point and the upstream node, and the second line segment is the line connecting the first right boundary point and the upstream node. Based on the first included angle, the second included angle, and the width of the box culvert of the currently traversed box culvert pipeline, determine the first boundary point corresponding to the upstream node; If the number of the first pipelines is greater than or equal to 2, determine the target first pipelines corresponding to the first left boundary point and the first right boundary point respectively; Based on the target first pipeline, the currently traversed box culvert pipeline, and the box culvert width, determine the first boundary point corresponding to the upstream node.

[0007] According to a drainage network diagram generation method provided by the present invention, the step of determining the first boundary point corresponding to the upstream node of the currently traversed box culvert pipeline based on the target first pipeline and the currently traversed box culvert pipeline includes: Based on the target first pipeline and the currently traversed box culvert pipeline, calculate the third angle between the currently traversed box culvert pipeline and the third line segment and the fourth angle between the box culvert pipeline and the fourth line segment; wherein, the third line segment is the line connecting the first left boundary point and the upstream node, and the fourth line segment is the line connecting the first right boundary point and the upstream node. Based on the third included angle, the fourth included angle, and the width of the box culvert of the currently traversed box culvert pipeline, the first boundary point corresponding to the upstream node is determined.

[0008] According to a drainage network diagram generation method provided by the present invention, the second boundary point includes a second left boundary point and a second right boundary point on both sides of the downstream node; the step of determining the second boundary point corresponding to the downstream node based on the second pipeline, the currently traversed box culvert pipeline, and the box culvert width includes: If the number of the second pipeline is 1, based on the second pipeline and the currently traversed box culvert pipeline, calculate the fifth angle between the second pipeline and the fifth line segment and the sixth angle between the second pipeline and the sixth line segment; wherein, the fifth line segment is the line connecting the second left boundary point and the downstream node, and the sixth line segment is the line connecting the second right boundary point and the downstream node; Based on the fifth included angle, the sixth included angle, and the width of the box culvert of the currently traversed box culvert pipeline, determine the second boundary point corresponding to the downstream node; If the number of the second pipelines is greater than or equal to 2, determine the target second pipelines corresponding to the second left boundary point and the second right boundary point respectively; Based on the target second pipeline, the currently traversed box culvert pipeline, and the box culvert width, determine the second boundary point corresponding to the downstream node.

[0009] According to a drainage network map generation method provided by the present invention, the step of determining the second boundary point corresponding to the downstream node based on the target second pipeline, the currently traversed box culvert pipeline, and the box culvert width includes: Based on the target second pipeline and the currently traversed box culvert pipeline, calculate the seventh angle between the currently traversed box culvert pipeline and the seventh line segment and the eighth angle between the currently traversed box culvert pipeline and the eighth line segment; wherein, the seventh line segment is the line connecting the second left boundary point and the downstream node, and the eighth line segment is the line connecting the second right boundary point and the downstream node; Based on the seventh included angle, the eighth included angle, and the width of the box culvert of the currently traversed box culvert pipeline, determine the second boundary point corresponding to the downstream node.

[0010] The present invention also provides a drainage network diagram generation device, comprising: The construction module is configured to obtain the pipe points and pipelines of the drainage pipe network, and construct the drainage pipe topology network with the pipe points as nodes and the pipelines as edges; wherein the direction of the edges is the direction of water flow. The module is configured to traverse the edges of the drainage pipe topology network along the water flow direction, and during the traversal, determine the boundary line of the box culvert pipeline based on the box culvert width and the connected pipelines. The generation module is configured to generate a drainage network diagram based on the boundary lines of the drainage pipe topology network and the box culvert pipeline.

[0011] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the drainage network diagram generation method as described above.

[0012] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the drainage network diagram generation method as described above.

[0013] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the drainage network diagram generation method as described above.

[0014] The drainage pipe network map generation method, apparatus, equipment, storage medium, and program products provided by this invention construct a unidirectional drainage pipe topology network through pipe points and pipelines in the drainage pipe network, establish the relationship between pipelines, and realize automatic mapping based on the drainage pipe topology network. Based on the water flow direction, the edges of the drainage pipe topology network are traversed, and during the traversal, the boundary lines of the box culvert pipelines are determined based on the box culvert width and the connected pipelines. This avoids the problem of discontinuous or intersecting box culvert boundaries in traditional mapping methods, and improves the mapping efficiency and accuracy of drainage pipe network maps. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0016] Figure 1 This is a flowchart illustrating the drainage network diagram generation method provided by the present invention.

[0017] Figure 2 This is one of the schematic diagrams of the culvert pipeline connection provided by the present invention.

[0018] Figure 3 This is the second schematic diagram of the culvert pipeline connection provided by the present invention.

[0019] Figure 4 This is the third schematic diagram of the box culvert pipeline connection provided by the present invention.

[0020] Figure 5 This is the fourth schematic diagram of the box culvert pipeline connection provided by the present invention.

[0021] Figure 6 This is the fifth schematic diagram of the box culvert pipeline connection provided by the present invention.

[0022] Figure 7 This is the sixth schematic diagram of the box culvert pipeline connection provided by the present invention.

[0023] Figure 8 This is the seventh schematic diagram of the box culvert pipeline connection provided by the present invention.

[0024] Figure 9 This is the eighth schematic diagram of the box culvert pipeline connection provided by the present invention.

[0025] Figure 10 This is the ninth schematic diagram of the box culvert pipeline connection provided by the present invention.

[0026] Figure 11 This is the tenth schematic diagram of the box culvert pipeline connection provided by the present invention.

[0027] Figure 12 This is a schematic diagram of the drainage network diagram generation device provided by the present invention.

[0028] Figure 13 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0030] Figure 1 This is a flowchart illustrating a method for generating a drainage network diagram according to an exemplary embodiment. For example... Figure 1 As shown in an exemplary embodiment, the method for generating a drainage network diagram includes steps 110 to 130, which are described in detail below.

[0031] Step 110: Obtain the pipe points and pipelines of the drainage network, and construct a drainage pipe topology network with the pipe points as nodes and the pipelines as edges; wherein the direction of the edges is the direction of water flow.

[0032] In this embodiment of the invention, the drainage network is a facility for collecting, transporting and discharging urban sewage, rainwater and industrial wastewater. It consists of drainage pipes and their ancillary facilities. In this embodiment, a one-way directed graph can be constructed to represent its topological relationship, with pipe points as nodes and pipelines as edges.

[0033] Pipe points are the connection points of various pipelines, pumping stations, sewage treatment plants and other facilities in the drainage network, such as rainwater inlets, rainwater inspection wells, rainwater pumping stations, sewage collection wells, sewage inspection wells, and lift pumping stations.

[0034] Pipelines are the parts that connect to pipe points in a drainage network. They are channels for transporting fluids in a drainage system, such as drain pipes.

[0035] Based on the similar topological relationship between drainage pipe networks and directed graphs in graph theory, a topological network between pipe nodes and pipelines in the drainage pipe network can be established using a directed graph data structure. This yields a directed graph without loops, i.e., a unidirectional directed graph. Based on the property that this directed graph is loop-free, the flow direction of the drainage pipelines can be used to traverse each edge in the directed graph, thereby enabling the drawing of the boundary of each drainage culvert in the drainage pipe network.

[0036] Step 120: Traverse the edges of the drainage pipe topology network along the water flow direction, and during the traversal, determine the boundary line of the box culvert pipeline based on the box culvert width and the connected pipelines.

[0037] In this embodiment of the invention, each edge of the drainage pipe topology network is traversed sequentially along the water flow direction. During the traversal, the boundary line of the culvert is determined based on the culvert width and the connected pipelines. A drainage culvert is a structure in a drainage network used to collect, transport, and discharge fluids such as rainwater and sewage. The boundary line characterizes the spatial extent of the drainage culvert.

[0038] Step 130: Generate a drainage network diagram based on the boundary lines of the drainage pipe topology network and the box culvert pipeline.

[0039] In this embodiment of the invention, the final drainage network diagram is generated based on the boundary lines of the drainage pipe topology network and the box culvert pipeline.

[0040] In this embodiment of the invention, a unidirectional drainage pipe topology network is constructed by connecting pipe points and pipelines in the drainage pipe network. This establishes the relationships between pipelines and enables automatic mapping based on the drainage pipe topology network. Based on the water flow direction, the edges of the drainage pipe topology network are traversed. During the traversal, the boundary lines of the box culverts are determined based on the width of the box culverts and the connected pipelines. This avoids the problems of discontinuous or intersecting box culvert boundaries in traditional mapping methods, improving the mapping efficiency and accuracy of the drainage pipe network map. Furthermore, the solution provided by this invention is highly adaptable and can accurately draw multiple inflow and outflow box culverts.

[0041] In an exemplary embodiment of the present invention, determining the boundary line of the box culvert pipeline based on the width of the box culvert pipeline and the connected pipelines during the traversal process includes: Detect the first pipeline connected to the upstream node of the currently traversed box culvert pipeline and / or the second pipeline connected to the downstream node of the currently traversed box culvert pipeline. Based on the first pipeline, the currently traversed box culvert pipeline and the box culvert width, determine the first boundary point corresponding to the upstream node, and / or based on the second pipeline, the currently traversed box culvert pipeline and the box culvert width, determine the second boundary point corresponding to the downstream node; The boundary lines of the box culvert pipeline being traversed are determined based on the first boundary point and / or the second boundary point.

[0042] In this embodiment of the invention, the edges of the drainage pipe topology network are oriented according to the water flow direction. The two ends of the box culvert pipeline are divided into upstream nodes and downstream nodes based on the water flow direction. The pipeline connected to the upstream node of the box culvert pipeline is designated as the first pipeline, and the pipeline connected to the downstream node is designated as the second pipeline. For the inflow and outflow box culvert pipelines, one end is not connected to a box culvert pipeline.

[0043] The system detects the first pipeline connected to the upstream node of the currently traversed box culvert pipeline and / or the second pipeline connected to the downstream node of the currently traversed box culvert pipeline. Based on the first pipeline, the currently traversed box culvert pipeline, and the box culvert width, it determines the first boundary point corresponding to the upstream node, and / or based on the second pipeline, the currently traversed box culvert pipeline, and the box culvert width, it determines the second boundary point corresponding to the downstream node. For inflow box culvert pipelines, its boundary point is determined based on the second pipeline connected to its downstream node and the box culvert width. For outflow box culvert pipelines, its boundary point is determined based on the first pipeline connected to its upstream node and the box culvert width. For other box culvert pipelines besides inflow and outflow box culvert pipelines, the corresponding boundary point can be determined based on at least one of the first pipeline, the second pipeline, and the box culvert width.

[0044] Boundary points are points used to define the spatial extent of drainage box culverts. The boundary lines of the currently traversed box culvert pipelines can be determined based on the determined first boundary point and / or second boundary point.

[0045] In an exemplary embodiment of the present invention, the first boundary point includes a first left boundary point and a first right boundary point on both sides of the upstream node; determining the first boundary point corresponding to the upstream node based on the first pipeline, the currently traversed box culvert pipeline, and the box culvert width includes: If the number of the first pipeline is 1, based on the first pipeline and the currently traversed box culvert pipeline, calculate the first angle between the currently traversed box culvert pipeline and the first line segment and the second angle between the box culvert pipeline and the second line segment; wherein, the first line segment is the line connecting the first left boundary point and the upstream node, and the second line segment is the line connecting the first right boundary point and the upstream node. Based on the first included angle, the second included angle, and the width of the box culvert of the currently traversed box culvert pipeline, determine the first boundary point corresponding to the upstream node; If the number of the first pipelines is greater than or equal to 2, determine the target first pipelines corresponding to the first left boundary point and the first right boundary point respectively; Based on the target first pipeline, the currently traversed box culvert pipeline, and the box culvert width, determine the first boundary point corresponding to the upstream node.

[0046] In this embodiment of the invention, there are several situations where the upstream node of the box culvert pipeline is connected to the first pipeline, such as... Figures 2 to 5 As shown, the relevant description is as follows: like Figure 2 As shown, when the upstream node of the currently traversed box culvert pipeline (this) is connected to only one box culvert pipeline (upstream), the two boundary points on both sides of the upstream node of this box culvert pipeline are determined by the angle between this box culvert pipeline (this) and the upstream box culvert pipeline (upstream), and the width of the box culvert pipeline (this) being traversed. Figure 2 As shown, the first left boundary point to the left of the upstream node is ptUpLeft1, and the first right boundary point to the right of the upstream node is ptUpRight1.

[0047] Based on the first pipeline and the currently traversed box culvert pipeline, calculate the first angle between the currently traversed box culvert pipeline and the first line segment and the second angle between the currently traversed box culvert pipeline and the second line segment. The first line segment is the line connecting the first left boundary point and the upstream node, and the second line segment is the line connecting the first right boundary point and the upstream node.

[0048] Specifically, based on the direction of the currently traversed box culvert pipeline and the first pipeline, they are treated as vectors, such as... Figure 3 For the vectors V1 and V2 shown, when calculating the currently traversed box culvert pipeline (i.e., vector V1), if it is to the right of the upstream box culvert pipeline (i.e., vector V2), then the angle between vectors V1 and V2 is... The first included angle is the vector V1 rotated counterclockwise based on the upstream node. Angle, the second included angle is vector V1 rotated clockwise based on the upstream node. Angle, where: ; ; Assuming the width of the box culvert is 2W, when calculating the boundary points of the currently traversed box culvert pipeline, the boundary points are calculated by rotating the V1 vector of the currently traversed box culvert pipeline by the corresponding angle. Then, the vector after rotating the V1 vector by the aforementioned angle is moved along the direction of the vector. The distance can be used to determine the location of the boundary point.

[0049] In this embodiment of the invention, without considering the directions of the first pipeline and the currently traversed box culvert pipeline, the first left boundary point and the first right boundary point are respectively located on the angle bisector of the angle formed by the currently traversed box culvert pipeline and the first pipeline.

[0050] If the number of first pipelines connected to the upstream node of the currently traversed box culvert pipeline is greater than or equal to 2, determine the target first pipelines corresponding to the first left boundary point and the first right boundary point respectively. Then, based on the target first pipelines, the currently traversed box culvert pipelines and the width of the box culvert, determine the first boundary point corresponding to the upstream node.

[0051] like Figure 4 As shown, the upstream node of the currently traversed box culvert pipeline (this) is connected to two box culvert pipelines (upstream). Both of these box culvert pipelines are upstream of the currently traversed box culvert pipeline. The target first pipelines corresponding to the first left boundary point ptUpLeft1 and the first right boundary point ptUpRight1 are determined respectively. That is, the box culvert pipelines closest to the first left boundary point ptUpLeft1 and the first right boundary point ptUpRight1 are selected as the corresponding target first pipelines. The first left boundary point and the first right boundary point are determined based on the angles between the first left boundary point ptUpLeft1 and the first right boundary point ptUpRight1 and the corresponding target first pipelines, as well as the width of the box culvert.

[0052] like Figure 5 As shown, the upstream node of the currently traversed box culvert pipeline (this) is connected to three box culvert pipelines. Of these three pipelines, one is the upstream box culvert pipeline of the currently traversed box culvert pipeline (upstream), and the other two are the downstream box culvert pipelines of that upstream box culvert pipeline. Based on the box culvert pipelines adjacent to the first left boundary point, the target first pipeline corresponding to the first left boundary point is determined. Based on the box culvert pipelines adjacent to the first right boundary point, the target first pipeline corresponding to the first right boundary point is determined. Then, based on the target first pipeline, the currently traversed box culvert pipeline, and the box culvert width, the first boundary point corresponding to the upstream node is determined.

[0053] Similarly, based on the box culvert pipelines adjacent to the first left boundary point, the target first pipeline corresponding to the first left boundary point is determined; based on the box culvert pipelines adjacent to the first right boundary point, the target first pipeline corresponding to the first right boundary point is determined; and based on the angle between the target first pipeline and the currently traversed box culvert pipeline and the width of the box culvert, the first boundary point corresponding to the upstream node is determined.

[0054] In an exemplary embodiment of the present invention, determining the first boundary point corresponding to the upstream node of the currently traversed box culvert pipeline based on the target first pipeline and the currently traversed box culvert pipeline includes: Based on the target first pipeline and the currently traversed box culvert pipeline, calculate the third angle between the currently traversed box culvert pipeline and the third line segment and the fourth angle between the box culvert pipeline and the fourth line segment; wherein, the third line segment is the line connecting the first left boundary point and the upstream node, and the fourth line segment is the line connecting the first right boundary point and the upstream node. Based on the third included angle, the fourth included angle, and the width of the box culvert of the currently traversed box culvert pipeline, the first boundary point corresponding to the upstream node is determined.

[0055] In this embodiment of the invention, based on the target first pipeline and the currently traversed box culvert pipeline, the third included angle between the currently traversed box culvert pipeline and the third line segment and the fourth included angle between the currently traversed box culvert pipeline and the fourth line segment are calculated respectively. The third line segment is the line connecting the first left boundary point and the upstream node, and the fourth line segment is the line connecting the first right boundary point and the upstream node. Based on the third included angle, the fourth included angle, and the box culvert width of the currently traversed box culvert pipeline, the first boundary point corresponding to the upstream node is determined.

[0056] like Figure 6 As shown, for the currently traversed box culvert pipeline (i.e., vector V1), there is a case where it is adjacent to both the downstream box culvert pipeline (i.e., vector V3) and the upstream box culvert pipeline (i.e., vector V2), which requires separate calculations. For example... Figure 6 In the scenario shown, the target pipeline corresponding to the first left boundary point is the pipeline containing vector V3, and the target pipeline corresponding to the first right boundary point is the pipeline containing vector V2. The angle between vector V1 and vector V2 is... The angle between vector V1 and vector V3 is When determining the first left boundary point ptUpLeft1, the third included angle is the vector V1 rotated counterclockwise based on the upstream node. Angle. When determining the first right boundary point ptUpRight1, the fourth included angle is the vector V1 rotated clockwise based on the upstream node. Angle, where: ; ; ; ; Assuming the width of the box culvert is 2W, when calculating the boundary points of the currently traversed box culvert pipeline, the boundary points are calculated by rotating the V1 vector of the currently traversed box culvert pipeline by the corresponding angle. Then, the vector after rotating the V1 vector by the aforementioned angle is moved along the direction of the vector. The distance can be used to determine the location of the boundary point.

[0057] Similarly, without considering the direction of the target first pipeline and the currently traversed box culvert pipeline, the first left boundary point and the first right boundary point are located on the angle bisectors of the angle formed by the currently traversed box culvert pipeline and the corresponding target first pipeline.

[0058] In an exemplary embodiment of the present invention, the second boundary point includes a second left boundary point and a second right boundary point on both sides of the downstream node; determining the second boundary point corresponding to the downstream node based on the second pipeline, the currently traversed box culvert pipeline, and the box culvert width includes: If the number of the second pipeline is 1, based on the second pipeline and the currently traversed box culvert pipeline, calculate the fifth angle between the second pipeline and the fifth line segment and the sixth angle between the second pipeline and the sixth line segment; wherein, the fifth line segment is the line connecting the second left boundary point and the downstream node, and the sixth line segment is the line connecting the second right boundary point and the downstream node; Based on the fifth included angle, the sixth included angle, and the width of the box culvert of the currently traversed box culvert pipeline, determine the second boundary point corresponding to the downstream node; If the number of the second pipelines is greater than or equal to 2, determine the target second pipelines corresponding to the second left boundary point and the second right boundary point respectively; Based on the target second pipeline, the currently traversed box culvert pipeline, and the box culvert width, determine the second boundary point corresponding to the downstream node.

[0059] In this embodiment of the invention, there are several situations where the downstream node of the box culvert pipeline is connected to the second pipeline, such as... Figures 7 to 10 As shown, the relevant description is as follows: like Figure 7 As shown, when the downstream node of the currently traversed box culvert pipeline (this) is connected to only one box culvert pipeline (downstream), the two boundary points on both sides of the downstream node of this box culvert pipeline are determined by the angle between this box culvert pipeline (this) and the downstream box culvert pipeline (downstream), and the width of the box culvert pipeline (this) being traversed. Figure 7 As shown, the second left boundary point to the left of the downstream node is ptDownLeft1, and the second right boundary point to the right of the downstream node is ptDownRight1.

[0060] Based on the second pipeline and the currently traversed box culvert pipeline, calculate the fifth angle between the currently traversed box culvert pipeline and the fifth line segment and the fourth angle between the currently traversed box culvert pipeline and the sixth line segment. The fifth line segment is the line connecting the second left boundary point and the downstream node, and the sixth line segment is the line connecting the second right boundary point and the downstream node.

[0061] Specifically, based on the directions of the currently traversed box culvert pipeline and the second pipeline, these directions are used as vectors, such as... Figure 8 For the vectors V1 and V2 shown, when calculating the currently traversed box culvert pipeline (i.e., vector V1), if it is to the right of the downstream box culvert pipeline (i.e., vector V2), then the angle between vectors V1 and V2 is... The fifth included angle is vector V1 rotated clockwise based on the downstream node. Angle, the sixth included angle is vector V1 rotated counterclockwise based on the downstream node. Angle, where: ; ; Assuming the width of the box culvert is 2W, when calculating the boundary points of the currently traversed box culvert pipeline, the boundary points are calculated by rotating the V1 vector of the currently traversed box culvert pipeline by the corresponding angle. Then, the vector after rotating the V1 vector by the aforementioned angle is moved along the direction of the vector. The distance can be used to determine the location of the boundary point.

[0062] In this embodiment of the invention, without considering the direction of the second pipeline and the currently traversed box culvert pipeline, the second left boundary point and the second right boundary point are respectively located on the angle bisector of the angle formed by the currently traversed box culvert pipeline and the second pipeline.

[0063] If the number of second pipelines connected to the downstream nodes of the currently traversed box culvert pipeline is greater than or equal to 2, determine the target second pipelines corresponding to the second left boundary point and the second right boundary point respectively. Then, based on the target second pipelines, the currently traversed box culvert pipelines and the width of the box culvert, determine the second boundary point corresponding to the downstream nodes.

[0064] like Figure 9 As shown, the downstream node of the currently traversed box culvert pipeline (this) is connected to two box culvert pipelines (downstream). Both of these box culvert pipelines are downstream of the currently traversed box culvert pipeline. The target second pipelines corresponding to the second left boundary point ptDownLeft1 and the second right boundary point ptDownRight1 are determined respectively. That is, the box culvert pipelines closest to the second left boundary point ptUpLeft1 and the second right boundary point ptUpRight1 are selected as the corresponding target second pipelines. The second left boundary point and the second right boundary point are determined based on the angles between the second left boundary point ptDownLeft1 and the second right boundary point ptDownRight1 and the corresponding target second pipelines, as well as the width of the box culvert.

[0065] like Figure 10As shown, the downstream node of the currently traversed box culvert pipeline (this) is connected to three box culvert pipelines. Of these three pipelines, one is the downstream box culvert pipeline (upstream) of the currently traversed box culvert pipeline, and the other two are the upstream box culvert pipelines of this downstream box culvert pipeline. Based on the box culvert pipelines adjacent to the second left boundary point, the target second pipeline corresponding to the second left boundary point is determined. Based on the box culvert pipelines adjacent to the second right boundary point, the target second pipeline corresponding to the second right boundary point is determined. Then, based on the target second pipeline, the currently traversed box culvert pipeline, and the box culvert width, the second boundary point corresponding to the downstream node is determined.

[0066] Similarly, based on the box culvert pipeline adjacent to the second left boundary point, determine the target second pipeline corresponding to the second left boundary point; based on the box culvert pipeline adjacent to the second right boundary point, determine the target second pipeline corresponding to the second right boundary point; and based on the angle between the target second pipeline and the currently traversed box culvert pipeline and the width of the box culvert, determine the second boundary point corresponding to the downstream node.

[0067] In an exemplary embodiment of the present invention, determining the second boundary point corresponding to the downstream node based on the target second pipeline, the currently traversed box culvert pipeline, and the box culvert width includes: Based on the target second pipeline and the currently traversed box culvert pipeline, calculate the seventh angle between the currently traversed box culvert pipeline and the seventh line segment and the eighth angle between the currently traversed box culvert pipeline and the eighth line segment; wherein, the seventh line segment is the line connecting the second left boundary point and the downstream node, and the eighth line segment is the line connecting the second right boundary point and the downstream node; Based on the seventh included angle, the eighth included angle, and the width of the box culvert of the currently traversed box culvert pipeline, determine the second boundary point corresponding to the downstream node.

[0068] In this embodiment of the invention, based on the target second pipeline and the currently traversed box culvert pipeline, the seventh angle between the currently traversed box culvert pipeline and the seventh line segment and the eighth angle between the currently traversed box culvert pipeline and the eighth line segment are calculated respectively. The seventh line segment is the line connecting the second left boundary point and the downstream node, and the eighth line segment is the line connecting the second right boundary point and the downstream node. Based on the seventh angle, the eighth angle, and the box culvert width of the currently traversed box culvert pipeline, the second boundary point corresponding to the downstream node is determined.

[0069] like Figure 11 As shown, for the currently traversed box culvert pipeline (i.e., vector V1), there is a case where it is adjacent to both the downstream box culvert pipeline (i.e., vector V2) and the upstream box culvert pipeline (i.e., vector V3), calculations need to be performed separately. For example... Figure 11 In the scenario shown, the target second pipeline corresponding to the second left boundary point is the pipeline containing vector V2, and the target second pipeline corresponding to the second right boundary point is the pipeline containing vector V3. The angle between vector V1 and vector V2 is... The angle between vector V1 and vector V3 is When determining the second left boundary point ptDownLeft1, the seventh included angle is vector V1 rotated clockwise based on the downstream node. Angle. When determining the second right boundary point ptDownRight1, the eighth included angle is the vector V1 rotated counterclockwise based on the downstream node. Angle, where: ; ; ; ; Assuming the width of the box culvert is 2W, when calculating the boundary points of the currently traversed box culvert pipeline, the boundary points are calculated by rotating the V1 vector of the currently traversed box culvert pipeline by the corresponding angle. Then, the vector after rotating the V1 vector by the aforementioned angle is moved along the direction of the vector. The distance can be used to determine the location of the boundary point.

[0070] Similarly, without considering the direction of the target second pipeline and the currently traversed box culvert pipeline, the second left boundary point and the second right boundary point are located on the angle bisector of the angle formed by the currently traversed box culvert pipeline and the corresponding target second pipeline, respectively.

[0071] The drainage network diagram generation device provided by the present invention will be described below. The drainage network diagram generation device described below can be referred to in correspondence with the drainage network diagram generation method described above. It should be noted that the device provided in the following embodiments and the method provided in the above embodiments belong to the same concept, and the specific way in which each module and unit performs its operation has been described in detail in the method embodiments, and will not be repeated here.

[0072] In one exemplary embodiment of the present invention, please refer to Figure 12 , Figure 12 This is a drainage network diagram generation device according to an exemplary embodiment, comprising the following modules.

[0073] The construction module 1210 is configured to acquire the pipe points and pipelines of the drainage pipe network, and construct a drainage pipe topology network with the pipe points as nodes and the pipelines as edges; wherein the direction of the edges is the direction of water flow. The module 1220 is configured to traverse the edges of the drainage pipe topology network along the water flow direction, and during the traversal, determine the boundary line of the box culvert pipeline based on the box culvert width and the connected pipelines. The generation module 1230 is configured to generate a drainage network diagram based on the boundary lines of the drainage pipe topology network and the box culvert pipeline.

[0074] In an exemplary embodiment of the present invention, the determining module 1220 includes: The detection submodule is configured to detect the first pipeline connected to the upstream node of the currently traversed box culvert pipeline and / or the second pipeline connected to the downstream node of the currently traversed box culvert pipeline. The first determining submodule is configured to determine the first boundary point corresponding to the upstream node based on the first pipeline, the currently traversed box culvert pipeline and the box culvert width, and / or determine the second boundary point corresponding to the downstream node based on the second pipeline, the currently traversed box culvert pipeline and the box culvert width. The second determination submodule is configured to determine the boundary line of the currently traversed box culvert pipeline based on the first boundary point and / or the second boundary point.

[0075] In an exemplary embodiment of the present invention, the first boundary point includes a first left boundary point and a first right boundary point on both sides of the upstream node; the first determining submodule includes: The first calculation unit is configured to, if the number of the first pipeline is 1, calculate the first angle between the currently traversed box culvert pipeline and the first line segment and the second angle between the currently traversed box culvert pipeline and the second line segment, based on the first pipeline and the currently traversed box culvert pipeline; wherein, the first line segment is the line connecting the first left boundary point and the upstream node, and the second line segment is the line connecting the first right boundary point and the upstream node. The first determining unit is configured to determine the first boundary point corresponding to the upstream node based on the first included angle, the second included angle, and the width of the box culvert of the currently traversed box culvert pipeline; The second determining unit is configured to determine the target first pipeline corresponding to the first left boundary point and the first right boundary point respectively if the number of the first pipeline is greater than or equal to 2. The third determining unit is configured to determine the first boundary point corresponding to the upstream node based on the target first pipeline, the currently traversed box culvert pipeline, and the box culvert width.

[0076] In an exemplary embodiment of the present invention, the third determining unit includes: The first calculation subunit is configured to calculate, based on the target first pipeline and the currently traversed box culvert pipeline, the third angle between the currently traversed box culvert pipeline and the third line segment and the fourth angle between the box culvert pipeline and the fourth line segment; wherein, the third line segment is the line connecting the first left boundary point and the upstream node, and the fourth line segment is the line connecting the first right boundary point and the upstream node. The first determining subunit is configured to determine the first boundary point corresponding to the upstream node based on the third included angle, the fourth included angle, and the width of the box culvert of the currently traversed box culvert pipeline.

[0077] In an exemplary embodiment of the present invention, the second boundary point includes a second left boundary point and a second right boundary point on both sides of the downstream node; the first determining submodule includes: The second calculation unit is configured to, if the number of the second pipeline is 1, calculate the fifth angle between the second pipeline and the fifth line segment and the sixth angle between the second pipeline and the sixth line segment based on the second pipeline and the currently traversed box culvert pipeline; wherein the fifth line segment is the line connecting the second left boundary point and the downstream node, and the sixth line segment is the line connecting the second right boundary point and the downstream node. The fourth determining unit is configured to determine the second boundary point corresponding to the downstream node based on the fifth included angle, the sixth included angle, and the width of the box culvert of the currently traversed box culvert pipeline; The fifth determining unit is configured to determine the target second pipeline corresponding to the second left boundary point and the second right boundary point respectively if the number of the second pipeline is greater than or equal to 2. The sixth determining unit is configured to determine the second boundary point corresponding to the downstream node based on the target second pipeline, the currently traversed box culvert pipeline, and the box culvert width.

[0078] In an exemplary embodiment of the present invention, the sixth determining unit includes: The second calculation subunit is configured to calculate, based on the target second pipeline and the currently traversed box culvert pipeline, the seventh angle between the currently traversed box culvert pipeline and the seventh line segment and the eighth angle between the currently traversed box culvert pipeline and the eighth line segment; wherein, the seventh line segment is the line connecting the second left boundary point and the downstream node, and the eighth line segment is the line connecting the second right boundary point and the downstream node; The second determining subunit is configured to determine the second boundary point corresponding to the downstream node based on the seventh included angle, the eighth included angle, and the width of the box culvert of the currently traversed box culvert pipeline.

[0079] Figure 13 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 13As shown, the electronic device may include: a processor 1310, a communications interface 1320, a memory 1330, and a communication bus 1340, wherein the processor 1310, the communications interface 1320, and the memory 1330 communicate with each other via the communication bus 1340. The processor 1310 can call logical instructions in the memory 1330 to execute a drainage network diagram generation method, which includes: Obtain the pipe points and pipelines of the drainage network, and construct a drainage pipe topology network with the pipe points as nodes and the pipelines as edges; wherein the direction of the edges is the direction of water flow; Along the direction of water flow, traverse the edges of the drainage pipe topology network, and during the traversal, determine the boundary line of the box culvert pipeline based on the width of the box culvert pipeline and the pipelines connected to it. A drainage network diagram is generated based on the drainage pipe topology network and the boundary lines of the box culvert pipelines.

[0080] Furthermore, the logical instructions in the aforementioned memory 1330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0081] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is able to execute the drainage network diagram generation method provided by the above methods, the method comprising: Obtain the pipe points and pipelines of the drainage network, and construct a drainage pipe topology network with the pipe points as nodes and the pipelines as edges; wherein the direction of the edges is the direction of water flow; Along the direction of water flow, traverse the edges of the drainage pipe topology network, and during the traversal, determine the boundary line of the box culvert pipeline based on the width of the box culvert pipeline and the pipelines connected to it. A drainage network diagram is generated based on the drainage pipe topology network and the boundary lines of the box culvert pipelines.

[0082] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the drainage network diagram generation method provided by the methods described above, the method comprising: Obtain the pipe points and pipelines of the drainage network, and construct a drainage pipe topology network with the pipe points as nodes and the pipelines as edges; wherein the direction of the edges is the direction of water flow; Along the direction of water flow, traverse the edges of the drainage pipe topology network, and during the traversal, determine the boundary line of the box culvert pipeline based on the width of the box culvert pipeline and the pipelines connected to it. A drainage network diagram is generated based on the drainage pipe topology network and the boundary lines of the box culvert pipelines.

[0083] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0084] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating a drainage pipe network diagram, characterized in that, include: Obtain the pipe points and pipelines of the drainage network, and construct a drainage pipe topology network with the pipe points as nodes and the pipelines as edges; wherein the direction of the edges is the direction of water flow; Along the direction of water flow, traverse the edges of the drainage pipe topology network, and during the traversal, determine the boundary line of the box culvert pipeline based on the box culvert width and the pipelines connected to it. A drainage network diagram is generated based on the drainage pipe topology network and the boundary lines of the box culvert pipelines.

2. The drainage network diagram generation method according to claim 1, characterized in that, During the traversal process, determining the boundary line of the box culvert pipeline based on the width of the box culvert and the connected pipelines includes: Detect the first pipeline connected to the upstream node of the currently traversed box culvert pipeline and / or the second pipeline connected to the downstream node of the currently traversed box culvert pipeline. Based on the first pipeline, the currently traversed box culvert pipeline and the box culvert width, determine the first boundary point corresponding to the upstream node, and / or based on the second pipeline, the currently traversed box culvert pipeline and the box culvert width, determine the second boundary point corresponding to the downstream node; The boundary lines of the box culvert pipeline being traversed are determined based on the first boundary point and / or the second boundary point.

3. The drainage network diagram generation method according to claim 2, characterized in that, The first boundary point includes a first left boundary point and a first right boundary point on both sides of the upstream node; determining the first boundary point corresponding to the upstream node based on the first pipeline, the currently traversed box culvert pipeline, and the box culvert width includes: If the number of the first pipeline is 1, based on the first pipeline and the currently traversed box culvert pipeline, calculate the first angle between the currently traversed box culvert pipeline and the first line segment and the second angle between the box culvert pipeline and the second line segment; wherein, the first line segment is the line connecting the first left boundary point and the upstream node, and the second line segment is the line connecting the first right boundary point and the upstream node. Based on the first included angle, the second included angle, and the width of the box culvert of the currently traversed box culvert pipeline, determine the first boundary point corresponding to the upstream node; If the number of the first pipelines is greater than or equal to 2, determine the target first pipelines corresponding to the first left boundary point and the first right boundary point respectively; Based on the target first pipeline, the currently traversed box culvert pipeline, and the box culvert width, determine the first boundary point corresponding to the upstream node.

4. The drainage network diagram generation method according to claim 3, characterized in that, The step of determining the first boundary point corresponding to the upstream node of the currently traversed box culvert pipeline based on the target first pipeline and the currently traversed box culvert pipeline includes: Based on the target first pipeline and the currently traversed box culvert pipeline, calculate the third angle between the currently traversed box culvert pipeline and the third line segment and the fourth angle between the box culvert pipeline and the fourth line segment; wherein, the third line segment is the line connecting the first left boundary point and the upstream node, and the fourth line segment is the line connecting the first right boundary point and the upstream node. Based on the third included angle, the fourth included angle, and the width of the box culvert of the currently traversed box culvert pipeline, the first boundary point corresponding to the upstream node is determined.

5. The drainage network diagram generation method according to claim 2, characterized in that, The second boundary point includes the second left boundary point and the second right boundary point on both sides of the downstream node; determining the second boundary point corresponding to the downstream node based on the second pipeline, the currently traversed box culvert pipeline, and the box culvert width includes: If the number of the second pipeline is 1, based on the second pipeline and the currently traversed box culvert pipeline, calculate the fifth angle between the second pipeline and the fifth line segment and the sixth angle between the second pipeline and the sixth line segment; wherein, the fifth line segment is the line connecting the second left boundary point and the downstream node, and the sixth line segment is the line connecting the second right boundary point and the downstream node; Based on the fifth included angle, the sixth included angle, and the width of the box culvert of the currently traversed box culvert pipeline, determine the second boundary point corresponding to the downstream node; If the number of the second pipelines is greater than or equal to 2, determine the target second pipelines corresponding to the second left boundary point and the second right boundary point respectively; Based on the target second pipeline, the currently traversed box culvert pipeline, and the box culvert width, determine the second boundary point corresponding to the downstream node.

6. The method for generating drainage network diagrams according to claim 5, characterized in that, The step of determining the second boundary point corresponding to the downstream node based on the target second pipeline, the currently traversed box culvert pipeline, and the box culvert width includes: Based on the target second pipeline and the currently traversed box culvert pipeline, calculate the seventh angle between the currently traversed box culvert pipeline and the seventh line segment and the eighth angle between the currently traversed box culvert pipeline and the eighth line segment; wherein, the seventh line segment is the line connecting the second left boundary point and the downstream node, and the eighth line segment is the line connecting the second right boundary point and the downstream node; Based on the seventh included angle, the eighth included angle, and the width of the box culvert of the currently traversed box culvert pipeline, determine the second boundary point corresponding to the downstream node.

7. A drainage network diagram generation device, characterized in that, include: The construction module is configured to obtain the pipe points and pipelines of the drainage pipe network, and construct the drainage pipe topology network with the pipe points as nodes and the pipelines as edges; wherein the direction of the edges is the direction of water flow. The module is configured to traverse the edges of the drainage pipe topology network along the water flow direction, and during the traversal, determine the boundary line of the box culvert pipeline based on the box culvert width and the connected pipelines. The generation module is configured to generate a drainage network diagram based on the boundary lines of the drainage pipe topology network and the box culvert pipeline.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the drainage network diagram generation method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the drainage network diagram generation method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the drainage network diagram generation method as described in any one of claims 1 to 6.