Method and system for automatically obtaining sewage collection range
By constructing a topological model of the sewage pipe network and liquid level monitoring points and importing it into the GIS system, the problem of being unable to accurately determine the water collection range in traditional sewage management is solved, and rapid locating and processing of sewage overflows and blockages are achieved.
Patent Information
- Application Number
- CN202410769201.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-03
AI Technical Summary
Traditional sewage management methods cannot accurately determine the scope of sewage collection, resulting in the inability to quickly locate problem points and take effective measures in emergencies such as sewage overflow or pipe blockage.
By obtaining the data of the sewage pipe network and liquid level monitoring points, a topological model of the sewage pipe network and liquid level monitoring points is constructed, and integrated into the GIS system. The tracking and tracing algorithm is used to determine the sewage flow path and terminal nodes, and then the sewage is accurately determined. Water collection range.
It achieves accurate identification of the scope of sewage collection, can quickly locate problem points when sewage overflows or pipeline blockages occur, and improves the efficiency and effectiveness of sewage management.
Smart Images

Figure CN118586900A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of sewage treatment, and in particular to a method and system for automatically obtaining a sewage collection range. Background Art
[0002] Sewage pipe network is an important part of urban infrastructure. With the acceleration of urbanization, urban sewage management has become more complex and important. As a key component of urban infrastructure, the operating efficiency of the sewage pipe network system is directly related to the city's environmental protection and the quality of life of residents. Traditional sewage management methods rely on manual monitoring and regular maintenance, and cannot effectively combine sewage flow data and liquid level monitoring data, and cannot accurately determine the scope of sewage collection. As a result, in the event of emergencies such as sewage overflow and pipe blockage, it is impossible to quickly locate the problem point and take effective measures.
[0003] Therefore, how to accurately determine the scope of sewage collection so as to quickly locate the problem point and take effective measures when emergencies such as sewage overflow and pipe blockage occur has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a method and system for automatically obtaining the sewage collection range, which can accurately determine the sewage collection range, so as to quickly locate the problem point and take effective measures when emergencies such as sewage overflow and pipe blockage occur.
[0005] In the first aspect, the present application provides a method for automatically obtaining the sewage water collection range, the method comprising: obtaining pipe network data and sewage flow direction data corresponding to the sewage pipe network, and obtaining monitoring point data of multiple liquid level monitoring points; based on the pipe network data, constructing a first topological model corresponding to the sewage pipe network; based on the monitoring point data, constructing a second topological model corresponding to the liquid level monitoring point; integrating the first topological model and the second topological model to obtain an overall topological structure; importing the overall topological structure into a GIS system to obtain a sewage treatment map; based on the sewage flow direction data and the first topological model, determining the first terminal node in the sewage pipe network; based on the tracing algorithm and the second topological model, determining the second terminal node corresponding to each of the liquid level monitoring points; based on the first terminal node, the second terminal node and the sewage treatment map, obtaining the sewage water collection range.
[0006] By adopting the above technical solution, the first topological model corresponding to the sewage pipe network is constructed based on the pipe network data, so as to systematically represent the structure and connection relationship of the sewage pipe network; the second topological model corresponding to the liquid level monitoring point is constructed based on the monitoring point data, so as to accurately reflect the position and function of the liquid level monitoring point in the sewage pipe network; by integrating the first topological model and the second topological model, the overall topological structure is obtained, so as to comprehensively represent the overall structure of the sewage treatment system, ensure the comprehensiveness and connectivity of the model, and lay the foundation for subsequent path tracking and flow analysis. By importing the overall topological structure into the GIS system, a sewage treatment map is obtained, so as to intuitively display the geographical layout and flow path of the sewage treatment system, making analysis and management more intuitive. By determining the first terminal node in the sewage pipe network based on the sewage flow direction data and the first topological model, the final treatment or discharge location of the sewage can be accurately identified; by determining the second terminal node corresponding to each liquid level monitoring point based on the tracing and tracing algorithm and the second topological model, the flow path of the sewage from the monitoring point to the terminal node can be accurately tracked, providing reliable data support for analyzing the scope of sewage collection. By obtaining the sewage collection range based on the first terminal node, the second terminal node and the sewage treatment map, we can fully understand the coverage area of the sewage treatment system, thereby accurately determining the sewage collection range, and then in the event of emergencies such as sewage overflow and pipe blockage, we can quickly locate the problem point and take effective measures.
[0007] Optionally, the pipe network data includes pipeline data, sewage lift pump station data and sewage treatment plant data; the first topological model corresponding to the sewage pipe network is constructed based on the pipe network data, specifically including: initializing a first graph object using a network graph data structure; traversing the pipe data, the sewage lift pump station data and the sewage treatment plant data to obtain sewage pipe network nodes; traversing the pipe data and taking each pipe as a sewage pipe network edge; adding all the sewage lift pump station nodes, all the sewage treatment plant nodes and all the pipe nodes to the node set of the first graph object to obtain a first node set; adding all the sewage pipe network edges to the edge set of the first graph object to obtain a first edge set; and constructing the first topological model based on the first node set and the first edge set.
[0008] By adopting the above technical solution, the first graph object is initialized by using the network graph data structure, thereby providing a flexible and efficient structure to represent and operate the topological relationship of the sewage pipe network. By traversing the pipeline data, sewage lifting pump station data and sewage treatment plant data, the sewage pipe network nodes are obtained, so that all key nodes are systematically collected and identified to ensure that each component of the sewage pipe network can be accurately represented and analyzed. By traversing the pipeline data, each pipeline is used as a sewage pipe network edge, so as to clarify and record the connection relationship between each node in the sewage pipe network, and ensure the connectivity and integrity of the pipeline network. By adding all sewage lifting pump station nodes, all sewage treatment plant nodes and all pipeline nodes to the node set of the first graph object, the first node set is obtained, so as to fully represent the node structure of the sewage pipe network, and ensure that each node and its attributes can be accurately reflected in the model. By adding all sewage pipe network edges to the edge set of the first graph object, the first edge set is obtained, so as to establish the connection relationship between the nodes, and ensure that the topological structure of the entire sewage pipe network can be fully and accurately reflected. By constructing a first topological model based on the first node set and the first edge set, the overall structure and connection relationship of the sewage network are systematically represented, providing reliable basic data support for subsequent path tracing, flow analysis and system optimization.
[0009] Optionally, the sewage network node includes a sewage lift pump station node, a sewage treatment plant node and a pipeline node; traversing the pipeline data, the sewage lift pump station data and the sewage treatment plant data to obtain the sewage network node specifically includes: traversing the sewage lift pump station data and taking each sewage lift pump station as the sewage lift pump station node; traversing the sewage treatment plant data and taking each sewage treatment plant as the sewage treatment plant node; traversing the pipeline data and taking the starting point and end point of each pipeline as the pipeline node.
[0010] Optionally, based on the monitoring point data, constructing a second topological model corresponding to the liquid level monitoring point, specifically comprising: initializing a second graph object using a network graph data structure; traversing the monitoring point data, and taking each of the liquid level monitoring points as a monitoring point node; traversing the connection relationships between all the liquid level monitoring points and sewage pipe network nodes, and taking the connection relationship between each of the liquid level monitoring points and the sewage pipe network nodes as a monitoring point edge; wherein the sewage pipe network nodes include sewage lift pump station nodes, sewage treatment plant nodes and pipeline nodes; adding all of the monitoring point nodes to the node set of the second graph object to obtain a second node set; adding all of the monitoring point edges to the edge set of the second graph object to obtain a second edge set; and constructing the second topological model based on the second node set and the second edge set.
[0011] By adopting the above technical solution, the second graph object is initialized by using the network graph data structure, thereby providing an efficient and flexible framework to represent and operate the liquid level monitoring point and its connection relationship with the sewage pipe network. By traversing the monitoring point data, each liquid level monitoring point is used as a monitoring point node, so as to systematically collect and identify all liquid level monitoring points, ensuring that these key monitoring points can be accurately represented and analyzed in the model. By traversing the connection relationship between all liquid level monitoring points and sewage pipe network nodes, the connection relationship between each liquid level monitoring point and the sewage pipe network node is used as a monitoring point edge, so as to clarify and record the connection relationship between the liquid level monitoring point and the sewage pipe network node, and ensure the connectivity and integrity of the monitoring point network. By adding all monitoring point nodes to the node set of the second graph object, a second node set is obtained, so as to completely represent the node structure of the liquid level monitoring point, and ensure that each monitoring point and its attributes can be accurately reflected in the model. By adding all monitoring point edges to the edge set of the second graph object, a second edge set is obtained, so as to establish the connection relationship between the liquid level monitoring point and the sewage pipe network node, and ensure that the topological structure of the entire monitoring point network can be fully and accurately reflected. By constructing a second topological model based on the second node set and the second edge set, the liquid level monitoring points and their connection relationship with the sewage network are systematically represented, providing reliable basic data support for subsequent monitoring data analysis, path tracing and system optimization.
[0012] Optionally, determining the first terminal node in the sewage network based on the sewage flow direction data and the first topology model specifically includes: initializing a third graph object using a network graph data structure; loading all the sewage network nodes and all the sewage network edges in the first topology model into the third graph object; adding flow direction attributes to all the sewage network edges based on the sewage flow direction data; determining a starting node from all the sewage networks; traversing each remaining node in the third graph object starting from the starting node based on a graph traversal algorithm, and judging whether each current sewage network node has a successor node based on the flow direction attribute; when the current sewage network node has no successor node, using the first current node as the first terminal node.
[0013] By adopting the above technical solution, the third graph object is initialized by using the network graph data structure, thereby providing a flexible and efficient framework for representing and operating the sewage pipe network and its flow path, ensuring the accuracy of subsequent data processing and analysis. By loading all sewage pipe network nodes and all sewage pipe network edges in the first topological model in the third graph object, the structure and connection relationship of the sewage pipe network are comprehensively and systematically represented, providing basic data support for flow path analysis. By adding flow direction attributes to all sewage pipe network edges based on sewage flow direction data, the flow direction of sewage in the pipe network is clarified, ensuring the accuracy and reliability of flow direction analysis. By determining the starting node from all sewage pipe networks, the starting point of sewage flow path analysis is set, providing a clear starting position for subsequent path tracking, ensuring the systematicness and coherence of the analysis process. By traversing each remaining node in the third graph object from the starting node based on the graph traversal algorithm, and judging whether each current sewage pipe network node has a successor node based on the flow direction attribute, the flow path of sewage in the pipe network is systematically tracked, and the sewage flow situation is fully understood. When the current sewage network node has no successor node, the current node is used as the first terminal node to accurately identify the end point of the sewage flow path.
[0014] Optionally, the second terminal node corresponding to each of the liquid level monitoring points is determined based on the tracing and tracing algorithm and the second topology model, specifically including: initializing a fourth graph object using a network graph data structure; loading all of the monitoring point nodes and all of the monitoring point edges in the second topology model into the fourth graph object; for each of the monitoring point nodes, using the tracing and tracing algorithm to trace the sewage pipe network path connected to it along each of the monitoring point edges, and determining whether each current monitoring point node has a successor node; when the current monitoring point node has no successor node, using the current monitoring point node as the second terminal node.
[0015] By adopting the above technical solution, the fourth graph object is initialized by using the network graph data structure, thereby providing an efficient and flexible framework for representing and operating liquid level monitoring points and their connection relationships, ensuring the accuracy of subsequent data processing and analysis. By loading all monitoring point nodes and all monitoring point edges in the second topological model in the fourth graph object, the structure and connection relationship of the liquid level monitoring points are comprehensively and systematically represented. For each monitoring point node, the tracing algorithm is used to track the sewage pipe network path connected to it along each monitoring point edge, and it is determined whether each current monitoring point node has a successor node, so as to systematically track the flow path of sewage in the pipe network and fully understand the monitoring range and coverage of the monitoring point. When the current monitoring point node has no successor node, the current monitoring point node is used as the second terminal node to accurately identify the final monitoring position corresponding to each liquid level monitoring point.
[0016] Optionally, the sewage water collection range is obtained based on the first terminal node, the second terminal node and the sewage treatment map, specifically including: initializing a fifth graph object using a network graph data structure; loading all the first terminal nodes, all the second terminal nodes, all the liquid level monitoring points and all monitoring point edges in the sewage treatment map in the fifth graph object; taking the liquid level monitoring point as the tracking starting point, and taking the first terminal node as the tracking end point; based on a graph traversal algorithm, starting from each of the tracking starting points, tracking each of the second terminal nodes along the monitoring point edges until the tracking end point, to obtain a tracking result; based on the tracking result, marking the path corresponding to each of the liquid level monitoring points on the sewage treatment map, to obtain the initial water collection range corresponding to each liquid level monitoring point; integrating all the initial water collection ranges to obtain the sewage water collection range.
[0017] By adopting the above technical solution, the fifth graph object is initialized by using the network graph data structure, thereby providing a flexible and efficient framework for representing and operating all key nodes and their connection relationships in the sewage treatment system, ensuring the accuracy of data processing and analysis. By loading all the first terminal nodes, all the second terminal nodes, all the liquid level monitoring points and all the monitoring point edges in the sewage treatment map in the fifth graph object, the structure and connection relationship of the sewage treatment system are comprehensively and systematically represented, providing basic data support for path tracing analysis. By taking the liquid level monitoring point as the starting point of tracing and the first terminal node as the end point of tracing, the starting point and end point of the path tracing are clarified, ensuring that the directionality and goal of the path tracing analysis are clear. Based on the graph traversal algorithm, starting from each tracing starting point, each second terminal node is tracked along the edge of the monitoring point until the end of the tracing, and the tracing result is obtained, thereby systematically tracing the flow path of sewage in the pipe network, and fully understanding the monitoring range and coverage of the monitoring point. By marking the path corresponding to each liquid level monitoring point on the sewage treatment map based on the tracing result, the initial water collection range corresponding to each liquid level monitoring point is obtained, thereby visualizing the monitoring range of each liquid level monitoring point, ensuring the intuitiveness and operability of the monitoring data. By integrating all initial water collection ranges, the sewage water collection range is obtained, thereby accurately obtaining the overall coverage area of the sewage treatment system.
[0018] In a second aspect of the present application, a system for automatically acquiring a sewage water collection range is provided, the system comprising an acquisition module and a processing module; the acquisition module is used to acquire network data and sewage flow direction data corresponding to a sewage network, and acquire monitoring point data of multiple liquid level monitoring points; the processing module is used to construct a first topological model corresponding to the sewage network based on the network data; the processing module is also used to construct a second topological model corresponding to the liquid level monitoring point based on the monitoring point data; the processing module is also used to integrate the first topological model and the second topological model to obtain an overall topological structure; the processing module is also used to import the overall topological structure into a GIS system to obtain a sewage treatment map; the processing module is also used to determine a first terminal node in the sewage network based on the sewage flow direction data and the first topological model; the processing module is also used to determine the second terminal node corresponding to each of the liquid level monitoring points based on a tracing algorithm and the second topological model; the processing module is also used to obtain a sewage water collection range based on the first terminal node, the second terminal node and the sewage treatment map.
[0019] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any method as described in the first aspect of the present application.
[0020] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program that can be loaded by a processor and execute the method as described in any one of the first aspects of the present application.
[0021] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: By constructing the first topological model corresponding to the sewage pipe network based on the pipe network data, the structure and connection relationship of the sewage pipe network can be systematically represented; by constructing the second topological model corresponding to the liquid level monitoring point based on the monitoring point data, the position and function of the liquid level monitoring point in the sewage pipe network can be accurately reflected; by integrating the first topological model and the second topological model, the overall topological structure is obtained, thereby comprehensively representing the overall structure of the sewage treatment system, ensuring the comprehensiveness and connectivity of the model, and laying the foundation for subsequent path tracking and flow analysis. By importing the overall topological structure into the GIS system, a sewage treatment map is obtained, thereby intuitively displaying the geographical layout and flow path of the sewage treatment system, making analysis and management more intuitive. By determining the first terminal node in the sewage pipe network based on the sewage flow direction data and the first topological model, the final treatment or discharge location of the sewage can be accurately identified; by determining the second terminal node corresponding to each liquid level monitoring point based on the tracing and tracing algorithm and the second topological model, the flow path of the sewage from the monitoring point to the terminal node can be accurately tracked, providing reliable data support for analyzing the scope of sewage collection. By obtaining the sewage collection range based on the first terminal node, the second terminal node and the sewage treatment map, we can fully understand the coverage area of the sewage treatment system, thereby accurately determining the sewage collection range, and then in the event of emergencies such as sewage overflow and pipe blockage, we can quickly locate the problem point and take effective measures. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is one of the flow charts of a method for automatically obtaining a sewage collection range provided in an embodiment of the present application; Figure 2 This is the second flow chart of a method for automatically obtaining a sewage collection range provided in an embodiment of the present application; Figure 3 It is a structural schematic diagram of a system for automatically obtaining a sewage collection range provided in an embodiment of the present application; Figure 4 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.
[0023] Explanation of the reference numerals: 1. Acquisition module; 2. Processing module; 400. Electronic device; 401. Processor; 402. Communication bus; 403. User interface; 404. Network interface; 405. Memory. DETAILED DESCRIPTION
[0024] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0025] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0026] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0027] This application provides a method for automatically obtaining the sewage collection range, referring to Figure 1 , which shows one of the flow diagrams of a method for automatically obtaining a sewage collection range provided in an embodiment of the present application. The method includes steps S1-S8, which are as follows: Step S1: Obtain pipe network data and sewage flow direction data corresponding to the sewage pipe network, and obtain monitoring point data of multiple liquid level monitoring points.
[0028] Specifically, in order to ensure the effectiveness and reliability of the sewage treatment system, the first step is to obtain the pipe network data and sewage flow data corresponding to the sewage pipe network, as well as the monitoring point data of multiple liquid level monitoring points. The purpose of obtaining this data is to lay the foundation for the subsequent topological model construction and path tracing. By collecting detailed and accurate data, the accuracy and effectiveness of the model can be ensured.
[0029] Collect the pipe network data corresponding to the sewage pipe network. The pipe network data can first be collected through the sewage pipe network management system or GIS system to collect relevant data of all sewage pipes. These data should include detailed information such as the length, diameter, material, starting point and end point of each pipe. Secondly, collect the data of sewage lifting pump stations, including the location, capacity, flow rate of the pumping stations, and the inlet and outlet pipe information connected to them. These data help to understand the lifting and transportation of sewage in the pipe network, and correctly reflect the nodes and connection relationships of sewage flow in the model. Finally, collect the data of sewage treatment plants, including the location of the treatment plant, treatment capacity, and connected inlet and outlet pipe information. The sewage treatment plant is the terminal node of the sewage treatment system, and understanding its data is crucial for analyzing the flow direction and treatment capacity of sewage.
[0030] After completing the above data collection, the next step is to collect sewage flow data. Sewage flow data can usually be obtained from the sewage network management system. This data includes the flow direction information of each pipe, that is, the direction of sewage flowing from the starting point to the end point. Accurate flow data can help track the flow path of sewage in subsequent steps and determine the first terminal node. By analyzing this data, we can accurately understand how sewage flows in the pipe network and provide a reliable basis for path tracking and terminal node determination.
[0031] In addition, it is also necessary to collect data from liquid level monitoring points. Liquid level monitoring point data is collected through liquid level monitoring devices installed in the pipe network. These data include information such as the location and liquid level height of each monitoring point. Liquid level monitoring point data can provide real-time sewage level conditions, help monitor the operating status of the sewage pipe network, and provide basic data for tracing and source analysis.
[0032] Step S2: constructing a first topological model corresponding to the sewage pipe network based on the pipe network data.
[0033] Specifically, after completing data collection, the next step is to build the first topological model corresponding to the sewage pipe network based on the pipe network data. The purpose of this step is to transform the complex sewage pipe network system into a visual topological structure for easy analysis and optimization. By building the first topological model, each key node in the sewage pipe network and its connection relationship can be clearly represented, providing a reliable basis for subsequent path tracing and terminal node determination.
[0034] In one possible implementation, refer to Figure 2 , which shows the second flow chart of a method for automatically obtaining a sewage collection range provided in an embodiment of the present application. Step S2 specifically includes steps S21-S26: Step S21: Initialize the first graph object using the network graph data structure.
[0035] Specifically, in the process of constructing the first topological model corresponding to the sewage pipe network, the first step is to initialize the first graph object using the network graph data structure. The purpose of this step is to provide a framework for the construction of the entire topological model, so that the nodes and edges of the sewage pipe network can be added in a systematic and structured manner. By initializing the graph object, the standardization of the data structure and the orderly construction of the topological model can be ensured.
[0036] Specifically, initializing the first graph object using the network graph data structure is achieved by calling a specific graph processing library. In this embodiment, Python's NetworkX library can be selected because it provides powerful graph processing capabilities and an easy-to-use interface. First, the NetworkX library is introduced, and then a directed graph object is created, which will serve as the basic data structure for building a sewage pipe network topology model. For example, the following code is used to initialize the first graph object: import networkx as nx G1 = nx.DiGraph(); Through the above code, a directed graph object G1, i.e., the first graph object, is created. The choice of a directed graph is because sewage flows in a specific direction in the pipe network, and a directed graph can well represent this flow relationship. This object will be used to store and manage nodes and edges in the sewage pipe network, providing a structured framework to organize pipe network data.
[0037] After initializing the graph object, you can add the nodes and edges in the sewage network to this object in an orderly manner, thus building a complete and visual topological model. This structured approach ensures that the addition of each node and edge is orderly and logical, avoiding data confusion and relationship confusion.
[0038] Initializing the graph object is not only the first step in building a topological model, but also one of the most critical steps. It lays the foundation for the subsequent addition of nodes and connection of edges, enabling work within a clear and standardized framework. In this way, it can be ensured that the construction process of the first topological model corresponding to the sewage network is efficient, orderly and accurate.
[0039] Step S22: traverse the pipeline data, sewage lift pump station data and sewage treatment plant data to obtain the sewage pipe network nodes.
[0040] Specifically, after initializing the first graph object using the network graph data structure, it is necessary to traverse the pipeline data, sewage lift pump station data, and sewage treatment plant data to obtain the sewage network nodes. The purpose of this step is to identify and determine all key nodes in the sewage network system and add these nodes to the first graph object, thereby laying the foundation for building the first topology model corresponding to the complete sewage network.
[0041] In a possible implementation, step S22 specifically includes the following steps: Traverse the sewage lift pump station data and take each sewage lift pump station as a sewage lift pump station node. Traverse the sewage treatment plant data and take each sewage treatment plant as a sewage treatment plant node. Traverse the pipeline data and take the starting point and end point of each pipeline as a pipeline node.
[0042] Specifically, first traverse the sewage lift pump station data and add each sewage lift pump station as a sewage lift pump station node to the first graph object. Sewage lift pump station nodes are an important part of the sewage network. They are responsible for lifting sewage from low places to high places to ensure that sewage can continue to flow in the network. By adding these nodes to the graph object, the position and role of the sewage lift pump station in the network can be accurately reflected.
[0043] Next, traverse the sewage treatment plant data and add each sewage treatment plant as a sewage treatment plant node to the first graph object. Sewage treatment plants are the terminal nodes of the sewage pipe network, and they are responsible for treating and purifying sewage. Adding sewage treatment plant nodes to the graph object can clarify the terminal location of the sewage pipe network and provide key data for subsequent flow analysis and terminal node determination.
[0044] Finally, traverse the pipeline data and add the start and end points of each pipeline as pipeline nodes to the first graph object. Pipeline nodes are the paths along which sewage flows in the pipe network. They connect sewage lift stations and sewage treatment plants, as well as other pipeline nodes. By adding these nodes to the graph object, the flow path of sewage in the pipe network can be constructed to ensure the connectivity and integrity of the model.
[0045] Step S23: traverse the pipeline data and take each pipeline as a sewage pipe network edge.
[0046] Specifically, in the process of constructing the first topological model corresponding to the sewage pipe network, in addition to identifying and adding various nodes, it is also necessary to construct the edges of the sewage pipe network. The purpose of step S23 is to traverse the pipeline data and add each pipeline as an edge of the sewage pipe network to the first graph object, so as to accurately represent the flow path of sewage in the pipe network. This step not only ensures that the pipe is correctly included in the model as an edge connecting the nodes, but also provides key connectivity information for subsequent flow analysis and path tracing.
[0047] First, obtain the data of all sewage pipes through the system or database, which usually includes the starting point, end point, length, diameter, material, etc. of each pipe. These data are crucial to understand the flow path of sewage in the pipe network and the properties of the pipes.
[0048] Then, using the network graph data structure, these pipe data are added to the first graph object that has been initialized. Specifically, each pipe data item is traversed and added to the graph object as an edge, and the relevant attribute information (such as length, diameter, material, etc.) is attached. This method ensures that the edges of the sewage network are accurately represented in the model, and these attribute information can be used for more in-depth research in subsequent analysis.
[0049] Step S24: Add all sewage lift pump station nodes, all sewage treatment plant nodes and all pipeline nodes to the node set of the first graph object to obtain a first node set.
[0050] Specifically, first traverse all the sewage lift pump station nodes identified previously and add them to the node collection of the first graph object. Next, traverse all the sewage treatment plant nodes and add them to the node collection of the first graph object. Finally, traverse the start and end nodes of all pipelines to ensure that they are also added to the node collection. These steps ensure that all key nodes are included in the topology model, reflecting the actual structure and connectivity of the sewage network.
[0051] Step S25: Add all sewage pipe network edges to the edge set of the first graph object to obtain a first edge set.
[0052] Specifically, using the network graph data structure, these pipe data are added to the first graph object that has been initialized. Each pipe data item is traversed and added to the graph object as an edge, and the relevant attribute information (such as length, diameter, material, etc.) is attached. This method ensures that the edges of the sewage network are accurately represented in the model, and these attribute information can be used for more in-depth research in subsequent analysis.
[0053] Step S26: constructing a first topology model based on the first node set and the first edge set.
[0054] Specifically, through the NetworkX library, the first node set and the first edge set can be automatically integrated together to form a coherent topology model.
[0055] Step S3: constructing a second topological model corresponding to the liquid level monitoring point based on the monitoring point data.
[0056] Specifically, after completing the construction of the first topological model corresponding to the sewage pipe network, the second topological model corresponding to the liquid level monitoring point needs to be constructed next. The purpose of step S3 is to systematically add the liquid level monitoring point data to a new topological model, so as to accurately monitor and analyze the operating status of the sewage pipe network.
[0057] In a possible implementation, step S3 specifically includes the following steps: Initialize a second graph object using the network graph data structure.
[0058] Specifically, the method of initializing the second graph object using the network graph data structure is consistent with the method of initializing the first graph object using the network graph data structure in the aforementioned embodiment, so it will not be elaborated here.
[0059] Traverse the monitoring point data and take each liquid level monitoring point as a monitoring point node.
[0060] Specifically, the liquid level monitoring point data is traversed, and each liquid level monitoring point is added as a monitoring point node to the second graph object, so as to accurately reflect the position and function of each monitoring point in the sewage pipe network. Through this process, it is possible to ensure that the real-time monitoring data of the liquid level monitoring point is accurately represented in the topological model and provide basic data for subsequent monitoring and analysis.
[0061] First, obtain the data of all liquid level monitoring points through the system or database. These data usually include the location of each monitoring point, liquid level height and other information. These data are essential for real-time monitoring of the operating status of the sewage pipe network. After obtaining these data, they need to be systematically added to the second graph object.
[0062] Using the network graph data structure, add these liquid level monitoring point data to the already initialized second graph object. Traverse each liquid level monitoring point data item, add it as a node to the graph object, and attach relevant attribute information (such as location, liquid level height, etc.).
[0063] The connection relationship between all liquid level monitoring points and sewage pipe network nodes is traversed, and the connection relationship between each liquid level monitoring point and the sewage pipe network node is used as a monitoring point edge; wherein the sewage pipe network nodes include sewage lift pump station nodes, sewage treatment plant nodes and pipeline nodes.
[0064] Specifically, in the process of constructing the second topological model corresponding to the liquid level monitoring point, in addition to identifying and adding each liquid level monitoring point node, it is also necessary to construct the connection relationship between them and the sewage network node. The connection relationship between all liquid level monitoring points and sewage network nodes is traversed, and the connection relationship between each liquid level monitoring point and sewage network node is added as a monitoring point edge to the second graph object, thereby accurately representing the connection status of the liquid level monitoring point in the sewage network.
[0065] First, the connection relationship data of all liquid level monitoring points and sewage network nodes are obtained through the system or database. These data usually include the information of the sewage network nodes connected to each liquid level monitoring point. The sewage network nodes include sewage lift pump station nodes, sewage treatment plant nodes and pipeline nodes. These data are essential for building the connection relationship of the liquid level monitoring points. Using the network graph data structure, these connection relationship data are added to the initialized second graph object. Specifically, each connection relationship data item is traversed and added as an edge to the graph object.
[0066] Add all monitoring point nodes to the node set of the second graph object to obtain a second node set.
[0067] Specifically, the method of adding all monitoring point nodes to the node set of the second graph object to obtain the second node set is consistent with the method of adding all sewage lift pump station nodes, all sewage treatment plant nodes and all pipeline nodes to the node set of the first graph object to obtain the first node set in the aforementioned embodiment, so it will not be elaborated here.
[0068] Add all monitoring point edges to the edge set of the second graph object to obtain a second edge set.
[0069] Specifically, the method of adding all monitoring point edges to the edge set of the second graph object to obtain the second edge set is consistent with the method of adding all sewage pipe network edges to the edge set of the first graph object to obtain the first edge set in the aforementioned embodiment, so no further details will be given here.
[0070] A second topology model is constructed based on the second node set and the second edge set.
[0071] Specifically, the method of constructing the second topological model based on the second node set and the second edge set is consistent with the method of constructing the first topological model based on the first node set and the first edge set in the aforementioned embodiment, so no further details will be given here.
[0072] Step S4: Integrate the first topology model and the second topology model to obtain an overall topology structure.
[0073] Specifically, after constructing the first topological model corresponding to the sewage pipe network and the second topological model corresponding to the liquid level monitoring point, the two models need to be integrated together to obtain the overall topological structure. The purpose of step S4 is to integrate the first topological model and the second topological model to form a complete topological structure of the sewage treatment system.
[0074] First, a new graph object needs to be initialized to store the integrated overall topology. This graph object will contain all nodes and edges in the first topology model and the second topology model. By using the network graph data structure, it can be ensured that all nodes and edges maintain their original properties and connection relationships during the integration process.
[0075] Next, all nodes and edges in the first topology model are added to the overall graph object. Specifically, the node set and edge set of the first topology model are traversed and added one by one to the node set and edge set of the overall graph object. This ensures that all sewage lift pump station nodes, sewage treatment plant nodes, pipeline nodes and their connection relationships in the first topology model are fully retained in the overall topology structure.
[0076] Then, all nodes and edges in the second topology model are added to the overall graph object. Similarly, the node set and edge set of the second topology model are traversed and added one by one to the node set and edge set of the overall graph object. This ensures that all liquid level monitoring point nodes in the second topology model and their connection relationship with the sewage pipe network nodes are completely retained in the overall topology structure.
[0077] Through this integration process, the first topology model and the second topology model can be seamlessly merged together to form an overall topology structure of a comprehensive wastewater treatment system.
[0078] Step S5: Import the overall topological structure into the GIS system to obtain a sewage treatment map.
[0079] Specifically, after constructing and integrating the first topological model corresponding to the sewage network and the second topological model corresponding to the liquid level monitoring points, the next step is to import the overall topological structure into the GIS system in order to intuitively display the various components of the sewage treatment system and their connections.
[0080] First, make sure the basic environment of the GIS system is ready, including installing and configuring GIS software that supports importing network graph data structures, such as QGIS, and installing necessary Python libraries, such as geopandas and shapely. The GIS system can intuitively display the model through the geographic information system, and combine the geographic location information for more detailed analysis and optimization.
[0081] Next, you need to convert the integrated overall topology data into a format that the GIS system can recognize. Usually, GIS systems can import data in formats such as Shapefile, GeoJSON, etc. Therefore, you need to convert the NetworkX graph object into one of these formats. By traversing the nodes and edges in the overall graph object, you can convert it into GeoJSON format data and add geographic location information and related attributes to each node and edge.
[0082] In the specific operation, first prepare the node data of the overall graph object. Traverse each node in the overall graph object, extract its geographic location information, and convert it into a point object (Point). Then, create a dictionary containing its attributes and geometric information for each node, and finally convert these dictionaries into GeoDataFrame, specifying the appropriate coordinate reference system (such as EPSG:4326).
[0083] Next, process the edge data of the overall graph object. Traverse each edge in the overall graph object, extract the geographic location information of the start and end nodes, and convert them into line objects (LineString). Then, create a dictionary containing its attributes and geometry information for each edge, and convert these dictionaries to GeoDataFrame, also specifying the appropriate coordinate reference system.
[0084] Once the node and edge data are prepared and converted into GeoDataFrame format, you can export these data into GeoJSON files. GeoJSON file format can be recognized and imported by most GIS systems. After generating GeoJSON files, you can use GIS software to import these files and display the imported data in the GIS system to generate sewage treatment maps.
[0085] Step S6: Determine a first terminal node in the sewage pipe network based on the sewage flow direction data and the first topology model.
[0086] Specifically, after successfully importing the overall topology into the GIS system and generating the sewage treatment map, the next step is to determine the first terminal node in the sewage pipe network based on the sewage flow direction data and the first topological model. The purpose of step S6 is to find the end point of the sewage in the pipe network, that is, the first terminal node, by analyzing the sewage flow direction data. This step is crucial for understanding the flow path of sewage in the pipe network and determining the treatment end point.
[0087] In a possible implementation, step S6 specifically includes the following steps: Initialize the third graph object using the network graph data structure.
[0088] Specifically, the method of initializing the third graph object using the network graph data structure is consistent with the method of initializing the first graph object using the network graph data structure in the aforementioned embodiment, so it will not be elaborated here.
[0089] All sewage pipe network nodes and all sewage pipe network edges in the first topology model are loaded into the third graph object.
[0090] Specifically, first, it is necessary to ensure that all sewage pipe network nodes are loaded in the third graph object. These nodes include sewage lift pump station nodes, sewage treatment plant nodes, and pipeline nodes. By traversing the node collection in the first topology model, each node and its related attributes are added to the node collection of the third graph object.
[0091] Next, you need to load all the sewer network edges in the third graph object. Each edge represents a pipe, connecting two nodes, and contains relevant attribute information (such as length, diameter, material, and flow direction attributes). By traversing the edge collection in the first topology model, each edge and its related attributes are added to the edge collection of the third graph object.
[0092] Through this process, it can be ensured that the third graph object completely represents the topological structure of the sewage network, including all key nodes and their connection relationships.
[0093] Based on the sewer flow direction data, add flow direction attributes to all sewer network edges.
[0094] Specifically, we first need to obtain all sewage flow direction data. This data usually includes the flow direction of each pipe, indicating the path of sewage flowing from the starting node to the end node. In the previous step, these pipes have been loaded into the third graph object as edges. Now, we need to traverse these edges and add flow direction attributes to each edge.
[0095] Using the network graph data structure, it is convenient to attach attribute information to each edge. When traversing each edge in the third graph object, the sewage flow direction data is added to the edge as an attribute. These attributes usually include the end node of the flow direction to indicate the flow direction of the sewage.
[0096] Determine the starting node from all sewer networks.
[0097] Specifically, after successfully adding flow attributes to all sewage pipe network edges, the next step is to determine the starting node, the purpose of which is to determine the entry node where sewage flows into the pipe network from all sewage pipe network nodes, that is, the starting node. By identifying and marking the starting node, it can provide a starting point for subsequent flow direction analysis and path tracing, ensuring the accuracy of the sewage flow path.
[0098] Specifically, it is first necessary to traverse all nodes in the third graph object and find nodes with specific attributes, which usually include identifiers of sewage lift stations or main inlet pipes. Usually, the starting node is the entry point for sewage to flow into the pipe network, such as the entrance of a sewage lift station. Therefore, by identifying these nodes, the starting point of sewage flow in the pipe network can be accurately determined.
[0099] Using the NetworkX library, you can easily traverse and find nodes with specific attributes. When traversing all nodes in the third graph object, check the attributes of each node to determine whether it meets the conditions of the starting node. Once a node that meets the conditions is found, it is marked as the starting node and is ready for subsequent flow analysis.
[0100] Based on the graph traversal algorithm, each remaining node in the third graph object is traversed starting from the starting node, and it is determined whether each current sewage pipe network node has a successor node based on the flow direction attribute.
[0101] Specifically, a graph traversal algorithm is used to traverse each node in the entire graph object starting from the starting node. The graph traversal algorithm can select depth-first search (DFS) or breadth-first search (BFS). In this embodiment, breadth-first search (BFS) is used to traverse the graph object. The BFS algorithm can traverse nodes layer by layer to ensure that all paths are fully visited and recorded.
[0102] When traversing each node, determine whether each current node has a successor node based on the flow direction attribute of the edge. If the current node has a successor node, continue to traverse these successor nodes; if the current node has no successor node, record it as a possible terminal node. In this way, the flow path and terminal node of sewage can be systematically identified.
[0103] When the current sewage pipe network node has no successor node, the first current node is used as the first terminal node.
[0104] Specifically, through the traversal and judgment in the previous step, possible terminal nodes have been identified, that is, those nodes that have no successor nodes. Now it is necessary to formally determine these nodes as the first terminal nodes and record their locations and attribute information. These terminal nodes are the final flow locations of sewage in the pipe network, which are crucial for the analysis and optimization of sewage treatment systems.
[0105] Using the NetworkX library, it is easy to mark and record these first terminal nodes. During the traversal of the graph object, all nodes without successor nodes have been collected into a list. Now, this list can be further processed to mark them as first terminal nodes and attach relevant attribute information to the graph object.
[0106] Step S7: Based on the tracing algorithm and the second topological model, determine the second terminal node corresponding to each liquid level monitoring point.
[0107] Specifically, after determining the first terminal node in the sewage network, the next step is to determine the second terminal node corresponding to each liquid level monitoring point based on the tracing algorithm and the second topological model. The purpose of step S7 is to identify the second terminal node of each liquid level monitoring point by applying the tracing algorithm. These second terminal nodes are the treatment or discharge locations where the sewage finally arrives from the monitoring point.
[0108] In a possible implementation, step S7 specifically includes the following steps: Initialize the fourth graph object using the network graph data structure.
[0109] Specifically, the method of initializing the fourth graph object using the network graph data structure is consistent with the method of initializing the first graph object using the network graph data structure in the aforementioned embodiment, so it will not be elaborated here.
[0110] All monitoring point nodes and all monitoring point edges in the second topological model are loaded into the fourth graph object.
[0111] Specifically, it is necessary to ensure that the fourth graph object contains all the liquid level monitoring point nodes and their connecting edges in the second topological model. By traversing all the nodes and edges in the second topological model, these elements are added to the fourth graph object to ensure the completeness and accuracy of the model.
[0112] First, all the liquid level monitoring point nodes in the second topology model are traversed and added to the fourth graph object. These nodes usually include the location information and related attributes of the liquid level monitoring point. Then, all the monitoring point edges are traversed and added to the fourth graph object to ensure that the connection relationship between the liquid level monitoring point and the sewage network node is accurately represented.
[0113] For each monitoring point node, a tracing algorithm is used to trace the sewage pipe network path connected to each monitoring point edge, and determine whether each current monitoring point node has a successor node.
[0114] Specifically, after loading all the liquid level monitoring point nodes and monitoring point edges in the fourth graph object, the next step is to apply the tracing algorithm, starting from each liquid level monitoring point, tracing the sewage pipe network path connected to it along the monitoring point edge, and determining whether each current monitoring point node has a successor node. By applying the tracing algorithm, the terminal node of each liquid level monitoring point can be accurately determined, so as to fully understand the monitoring range and final flow direction of the liquid level monitoring point.
[0115] When the current monitoring point node has no successor node, the current monitoring point node is used as the second terminal node.
[0116] Specifically, all liquid level monitoring point nodes in the fourth graph object are traversed to determine whether each current monitoring point node has a successor node. When the current monitoring point node has no successor node, it is marked as the second terminal node and the relevant attribute information is attached to the graph object. This process needs to ensure that all possible paths are traversed to fully understand the flow path and terminal location of the sewage. Using the NetworkX library, these second terminal nodes can be easily marked and recorded. In the process of traversing the graph object, all nodes without successor nodes are collected into a list and marked as second terminal nodes.
[0117] Step S8: Based on the first terminal node, the second terminal node and the sewage treatment map, the sewage collection range is obtained.
[0118] Specifically, in the previous steps, the first terminal node and the second terminal node have been successfully determined, and a complete topological model including liquid level monitoring points and sewage pipe network nodes has been constructed. Next, it is necessary to determine the final sewage collection range based on these terminal nodes and the generated sewage treatment map. The purpose of step S8 is to determine the sewage collection range by combining the first terminal node, the second terminal node and the sewage treatment map to ensure that the coverage area of the sewage treatment system can be accurately understood and managed.
[0119] In a possible implementation, step S8 specifically includes the following steps: Initialize the fifth graph object using the network graph data structure.
[0120] Specifically, the method of initializing the fifth graph object using the network graph data structure is consistent with the method of initializing the first graph object using the network graph data structure in the aforementioned embodiment, so it will not be elaborated here.
[0121] All first terminal nodes, all second terminal nodes, all liquid level monitoring points, and all monitoring point edges in the sewage treatment map are loaded into the fifth graph object.
[0122] Specifically, first, a new network graph data structure is initialized and used to load all first terminal nodes and second terminal nodes. These nodes represent key locations in the wastewater treatment system, including wastewater treatment plants, lift stations, and other important monitoring points. By loading these nodes into the graph object, you can ensure that you have a complete and accurate model that can clearly represent the geographic location and attribute information of all terminal nodes.
[0123] Next, load all the level monitoring points and monitoring point edges. The level monitoring points are key locations in the sewage treatment system for real-time monitoring of sewage levels, and the monitoring point edges represent the connection between the level monitoring points and other nodes. By loading these monitoring points and edges into the graph object, you can ensure that you have a comprehensive understanding of the distribution of the level monitoring points and their role in the system.
[0124] After all these nodes and edges are loaded into a graph object, the graph object needs to be imported into a GIS system. The GIS system can visualize this data and combine it with geographic information for further analysis and processing. By importing the graph object into a GIS system, a detailed sewage treatment map can be generated that shows all the key nodes and their connections.
[0125] In the GIS system, the sewage treatment map can provide intuitive geographic information support to help with path tracing and water collection range analysis. After loading all nodes and edges, you can clearly see the geographical location and connection relationship of each node, so as to accurately understand the flow path and coverage area of sewage in the pipe network.
[0126] The liquid level monitoring point is taken as the tracing starting point, and the first terminal node is taken as the tracing end point.
[0127] Specifically, first, the starting point of the path tracing is clarified. The liquid level monitoring points are key locations for real-time monitoring of the sewage level in the sewage treatment system, so they are used as the starting point of the tracing to reflect the flow of sewage from the monitoring points. In the fifth graph object, all the liquid level monitoring points have been loaded, so these nodes will be designated as the starting points of the path tracing.
[0128] Next, determine the end point of the path tracing. The first terminal node represents the final treatment or discharge location of the sewage in the pipe network, so they can reflect the final destination of the sewage as the tracing end point. In the fifth graph object, all the first terminal nodes have been loaded, so these first terminal nodes will be designated as the end points of the path tracing.
[0129] Based on the graph traversal algorithm, starting from each tracking starting point, each second terminal node is tracked along the monitoring point edge until the tracking end point ends to obtain the tracking result.
[0130] Specifically, first, starting from each liquid level monitoring point (tracking starting point), the graph traversal algorithm is applied to traverse the graph object. Commonly used graph traversal algorithms are breadth-first search (BFS) and depth-first search (DFS). Here, the breadth-first search (BFS) algorithm is used, which can traverse all nodes in the graph layer by layer to ensure that all paths can be fully covered. During the traversal process, each edge is tracked and the access order and path information of each node are recorded.
[0131] During the path tracing process, it is important to determine whether each current node has a successor node. If the current node has a successor node, continue tracing along the path; if the current node has no successor node, mark it as the second terminal node and record this path. During the graph traversal process, ensure that all paths are fully traced to fully understand the flow path and coverage area of the sewage.
[0132] Through path tracing, path tracing results corresponding to each liquid level monitoring point are generated. These tracing results include the specific flow conditions of each path, the nodes involved, and the area covered by the path. These path tracing results are recorded to ensure that each path can be clearly displayed and provide basic data for subsequent analysis.
[0133] Subsequently, the path tracking results are imported into the GIS system for visualization. In the GIS system, the flow conditions and coverage of each path are marked on the sewage treatment map to ensure that the path and monitoring range of each monitoring point are clearly visible. In this way, the specific flow path of sewage from the liquid level monitoring point to the first terminal node can be intuitively displayed.
[0134] Based on the tracking results, the path corresponding to each liquid level monitoring point is marked on the sewage treatment map to obtain the initial water collection range corresponding to each liquid level monitoring point.
[0135] Specifically, first, using the path tracing results, mark the starting point, end point, and intermediate nodes of each path on the map, and connect these nodes to form a complete path segment. In this way, the coverage area of each path can be accurately depicted. By marking the path coverage area, the initial water collection range corresponding to each liquid level monitoring point can be generated. These initial water collection ranges show the monitoring range of each monitoring point and the specific geographical area it covers. In the GIS system, the initial water collection range is visualized, so that the flow of sewage in the pipe network and the coverage area can be intuitively understood.
[0136] All initial water collection ranges are integrated to obtain the sewage water collection range.
[0137] Specifically, first, obtain the visualization data of all initial water collection ranges. These data include the path coverage area of each liquid level monitoring point, which has been marked and displayed in the GIS system. Through these initial water collection range data, we can accurately understand the specific coverage of each monitoring point and its distribution on the map.
[0138] Next, analyze the overlapping and duplicate areas between the initial water collection ranges. Since the monitoring ranges of different liquid level monitoring points may cross and overlap, these areas need to be analyzed and processed. Using the spatial analysis function of the GIS system, these overlapping areas can be identified and appropriately processed to ensure that each area is only counted once.
[0139] After analyzing and processing the overlapping areas, all initial water collection ranges are merged. By merging the initial water collection ranges, a comprehensive sewage water collection range can be generated, which fully reflects the coverage of the entire sewage treatment system. During the merging process, ensure that the geographic information and attribute information of all areas are correctly retained so that the final sewage water collection range generated can accurately reflect the actual situation. The merged sewage water collection range is then displayed in the GIS system, so that the coverage area of the entire sewage treatment system can be intuitively seen and the specific conditions of each area can be understood.
[0140] Reference Figure 3, which shows a structural schematic diagram of a system for automatically obtaining a sewage water collection range provided in an embodiment of the present application, the system includes an acquisition module and a processing module; the acquisition module is used to obtain the pipe network data and sewage flow direction data corresponding to the sewage pipe network, and obtain the monitoring point data of multiple liquid level monitoring points; the processing module is used to construct a first topological model corresponding to the sewage pipe network based on the pipe network data; the processing module is also used to construct a second topological model corresponding to the liquid level monitoring point based on the monitoring point data; the processing module is also used to integrate the first topological model and the second topological model to obtain an overall topological structure; the processing module is also used to import the overall topological structure into the GIS system to obtain a sewage treatment map; the processing module is also used to determine the first terminal node in the sewage pipe network based on the sewage flow direction data and the first topological model; the processing module is also used to determine the second terminal node corresponding to each liquid level monitoring point based on the tracing algorithm and the second topological model; the processing module is also used to obtain the sewage water collection range based on the first terminal node, the second terminal node and the sewage treatment map.
[0141] In one possible implementation, the processing module is also used to initialize a first graph object using a network graph data structure; traverse pipeline data, sewage lift pump station data, and sewage treatment plant data to obtain sewage network nodes; traverse the pipeline data and use each pipeline as a sewage network edge; add all sewage lift pump station nodes, all sewage treatment plant nodes, and all pipeline nodes to the node set of the first graph object to obtain a first node set; add all sewage network edges to the edge set of the first graph object to obtain a first edge set; and construct a first topological model based on the first node set and the first edge set.
[0142] In a possible implementation, the processing module is also used to traverse the sewage lift pump station data, taking each sewage lift pump station as a sewage lift pump station node; traverse the sewage treatment plant data, taking each sewage treatment plant as a sewage treatment plant node; traverse the pipeline data, taking the starting point and end point of each pipeline as a pipeline node.
[0143] In one possible implementation, the processing module is also used to initialize a second graph object using a network graph data structure; traverse the monitoring point data and use each liquid level monitoring point as a monitoring point node; traverse the connection relationship between all liquid level monitoring points and sewage pipe network nodes, and use the connection relationship between each liquid level monitoring point and the sewage pipe network node as a monitoring point edge; wherein the sewage pipe network nodes include sewage lift pump station nodes, sewage treatment plant nodes, and pipeline nodes; add all monitoring point nodes to the node set of the second graph object to obtain a second node set; add all monitoring point edges to the edge set of the second graph object to obtain a second edge set; and construct a second topological model based on the second node set and the second edge set.
[0144] In one possible implementation, the processing module is also used to initialize a third graph object using a network graph data structure; load all sewage pipe network nodes and all sewage pipe network edges in the first topology model into the third graph object; add flow direction attributes to all sewage pipe network edges based on sewage flow direction data; determine a starting node from all sewage pipe networks; based on a graph traversal algorithm, traverse each remaining node in the third graph object starting from the starting node, and determine whether each current sewage pipe network node has a successor node based on the flow direction attribute; when the current sewage pipe network node has no successor node, use the first current node as the first terminal node.
[0145] In one possible implementation, the processing module is also used to initialize a fourth graph object using a network graph data structure; load all monitoring point nodes and all monitoring point edges in the second topology model into the fourth graph object; for each monitoring point node, use a tracing algorithm to trace the sewage pipe network path connected to it along each monitoring point edge, and determine whether each current monitoring point node has a successor node; when the current monitoring point node has no successor node, use the current monitoring point node as the second terminal node.
[0146] In a possible implementation, the processing module is also used to initialize a fifth graph object using a network graph data structure; load all first terminal nodes, all second terminal nodes, all liquid level monitoring points, and all monitoring point edges in the sewage treatment map in the fifth graph object; use the liquid level monitoring point as the tracking starting point, and use the first terminal node as the tracking end point; based on the graph traversal algorithm, starting from each tracking starting point, track each second terminal node along the monitoring point edge until the tracking end point ends, to obtain a tracking result; based on the tracking result, mark the path corresponding to each liquid level monitoring point on the sewage treatment map, to obtain the initial water collection range corresponding to each liquid level monitoring point; integrate all the initial water collection ranges to obtain the sewage water collection range.
[0147] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0148] The present application also discloses an electronic device. Figure 4 , Figure 4 The electronic device 400 may include: at least one processor 401 , at least one network interface 404 , a user interface 403 , a memory 405 , and at least one communication bus 402 .
[0149] The communication bus 402 is used to realize the connection and communication between these components.
[0150] The user interface 403 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 403 may also include a standard wired interface and a wireless interface.
[0151] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0152] Among them, the processor 401 may include one or more processing cores. The processor 401 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 405, and calling data stored in the memory 405. Optionally, the processor 401 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 401 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 401, and it can be implemented separately through a chip.
[0153] Among them, the memory 405 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 405 includes a non-transitory computer-readable storage medium. The memory 405 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 405 may optionally be at least one storage device located away from the aforementioned processor 401. Refer to Figure 4 , the memory 405 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module and an application program.
[0154] exist Figure 4 In the electronic device 400 shown, the user interface 403 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 401 can be used to call an application stored in the memory 405, and when executed by one or more processors 401, the electronic device 400 executes one or more methods in the above-mentioned embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0155] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0156] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0157] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0158] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0159] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0160] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0161] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for automatically obtaining a sewage collection range, characterized in that: The method comprises: Obtain the pipe network data and sewage flow direction data corresponding to the sewage pipe network, and obtain the monitoring point data of multiple liquid level monitoring points; Based on the pipe network data, construct a first topological model corresponding to the sewage pipe network; Based on the monitoring point data, construct a second topological model corresponding to the liquid level monitoring point; Integrating the first topological model and the second topological model to obtain an overall topological structure; Importing the overall topological structure into a GIS system to obtain a sewage treatment map; Determining a first terminal node in the sewage pipe network based on the sewage flow direction data and the first topology model; Based on the tracing algorithm and the second topology model, determine the second terminal node corresponding to each of the liquid level monitoring points; Based on the first terminal node, the second terminal node and the sewage treatment map, a sewage collection range is obtained.
2. The method according to claim 1, characterized in that The pipe network data includes pipeline data, sewage lifting pump station data and sewage treatment plant data; the first topological model corresponding to the sewage pipe network is constructed based on the pipe network data, specifically including: Initialize a first graph object using a network graph data structure; Traversing the pipeline data, the sewage lifting pump station data and the sewage treatment plant data to obtain the sewage pipe network node; Traversing the pipeline data, and taking each pipeline as a sewage pipe network edge; Adding all the sewage lift pump station nodes, all the sewage treatment plant nodes and all the pipeline nodes to the node set of the first graph object to obtain a first node set; Adding all the sewage pipe network edges to the edge set of the first graph object to obtain a first edge set; The first topology model is constructed based on the first node set and the first edge set.
3. The method according to claim 2, characterized in that The sewage pipe network node includes a sewage lifting pump station node, a sewage treatment plant node and a pipeline node; the traversal of the pipeline data, the sewage lifting pump station data and the sewage treatment plant data to obtain the sewage pipe network node specifically includes: Traversing the sewage lifting pump station data, and taking each sewage lifting pump station as the sewage lifting pump station node; Traversing the sewage treatment plant data, and taking each sewage treatment plant as the sewage treatment plant node; The pipeline data is traversed, and the starting point and the end point of each pipeline are used as the pipeline nodes.
4. The method according to claim 1, characterized in that: The constructing a second topological model corresponding to the liquid level monitoring point based on the monitoring point data specifically includes: Initialize a second graph object using the network graph data structure; Traversing the monitoring point data, and taking each of the liquid level monitoring points as a monitoring point node; Traversing the connection relationship between all the liquid level monitoring points and the sewage pipe network nodes, and taking the connection relationship between each of the liquid level monitoring points and the sewage pipe network nodes as a monitoring point edge; wherein the sewage pipe network nodes include sewage lift pump station nodes, sewage treatment plant nodes and pipeline nodes; Adding all the monitoring point nodes to the node set of the second graph object to obtain a second node set; Adding all the monitoring point edges to the edge set of the second graph object to obtain a second edge set; The second topology model is constructed based on the second node set and the second edge set.
5. The method according to claim 2, characterized in that: The determining, based on the sewage flow direction data and the first topology model, a first terminal node in the sewage pipe network specifically includes: Initialize the third graph object using the network graph data structure; Loading all the sewage pipe network nodes and all the sewage pipe network edges in the first topology model into the third graph object; Based on the sewage flow direction data, adding flow direction attributes to all the sewage pipe network edges; Determining a starting node from all of the sewage pipe networks; Based on the graph traversal algorithm, traverse each remaining node in the third graph object starting from the starting node, and determine whether each current sewage pipe network node has a successor node based on the flow direction attribute; When the current sewage pipe network node has no successor node, the first current node is used as the first terminal node.
6. The method according to claim 4, characterized in that The determining of the second terminal node corresponding to each of the liquid level monitoring points based on the tracing algorithm and the second topological model specifically includes: Initialize the fourth graph object using the network graph data structure; Loading all the monitoring point nodes and all the monitoring point edges in the second topological model into the fourth graph object; For each of the monitoring point nodes, use the tracing algorithm to trace the sewage pipe network path connected to each of the monitoring point edges, and determine whether each current monitoring point node has a successor node; When the current monitoring point node has no successor node, the current monitoring point node is used as the second terminal node.
7. The method according to claim 1, characterized in that The obtaining of the sewage collection range based on the first terminal node, the second terminal node and the sewage treatment map specifically includes: Initialize the fifth graph object using the network graph data structure; Loading all the first terminal nodes, all the second terminal nodes, all the liquid level monitoring points and all monitoring point edges in the sewage treatment map in the fifth graph object; Taking the liquid level monitoring point as the tracing starting point and taking the first terminal node as the tracing end point; Based on a graph traversal algorithm, starting from each of the tracking starting points, each of the second terminal nodes is tracked along the monitoring point edge until the tracking end point ends, thereby obtaining a tracking result; Based on the tracking results, the path corresponding to each of the liquid level monitoring points is marked on the sewage treatment map to obtain the initial water collection range corresponding to each of the liquid level monitoring points; All the initial water collection ranges are integrated to obtain the sewage water collection range.
8. A system for automatically obtaining sewage collection range, characterized in that: The system includes an acquisition module and a processing module; The acquisition module is used to acquire pipe network data and sewage flow direction data corresponding to the sewage pipe network, and acquire monitoring point data of multiple liquid level monitoring points; The processing module is used to construct a first topological model corresponding to the sewage pipe network based on the pipe network data; The processing module is further used to construct a second topological model corresponding to the liquid level monitoring point based on the monitoring point data; The processing module is further used to integrate the first topological model and the second topological model to obtain an overall topological structure; The processing module is also used to import the overall topological structure into a GIS system to obtain a sewage treatment map; The processing module is further used to determine a first terminal node in the sewage pipe network based on the sewage flow direction data and the first topology model; The processing module is further used to determine the second terminal node corresponding to each of the liquid level monitoring points based on the tracing algorithm and the second topological model; The processing module is further used to obtain a sewage collection range based on the first terminal node, the second terminal node and the sewage treatment map.
9. An electronic device, characterized in that: The electronic device (400) comprises a processor (401), a memory (405), a user interface (403) and a network interface (404), wherein the memory (405) is used to store instructions, the user interface (403) and the network interface (404) are used to communicate with other devices, and the processor (401) is used to execute the instructions stored in the memory (405) so that the electronic device (400) executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is executed.
Citation Information
Cited By
Method for predicting effluent quality of sewage plant based on neural network model
CN120673892A
Underwater robot pollutant detection traceability system and method based on multi-modal data
CN120870489A
