Valve control method and device during pipe explosion of gas pipe network
By combining network topology modeling and recursive depth-first search algorithm for gas pipeline networks, the Floyd-Warshall algorithm is used to solve the problem of inaccurate search of valves after the gas pipeline bursts, and the valves to be closed in the gas pipeline network are realized The accurate identification and optimization paths of the analysis results have been improved.
Patent Information
- Application Number
- CN202411866499.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The prior art has the problem of inaccurate search results when searching for valves that need to be closed after the gas pipeline bursts, especially because the pipeline flow information is not used, resulting in invalid valves and infinite branches in the search path.
By modeling the network topology of the gas pipeline network, using the recursive depth-first search algorithm and the Floyd-Warshall algorithm, we make full use of pipeline flow information, determine the faulty pipe segment and the valve to be closed, and establish the valve distance matrix to be closed to optimize the path.
Improve the accuracy of valve search, ensure that all valves that need to be closed can be quickly found after the gas pipeline bursts, avoiding invalid searches and infinite branches, and improving the accuracy of the analysis results.
Smart Images

Figure CN119309149A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban management, and in particular to a valve control method and device when a gas pipe network bursts. Background Art
[0002] Most of the existing pipe burst analysis algorithms are implemented based on graph search. There are two main graph-based search methods: breadth-first search and depth-first search. Breadth-first search is a search method that traverses the layers layer by layer. It starts from a certain starting node of the graph, first visits all the adjacent nodes of the node, and then expands outward layer by layer to visit the nodes of the next layer, and so on. Depth-first search is a search method that goes as deep as possible into each branch. It starts from the starting node and goes forward along a path until it reaches a node where there is no way to go, and then backtracks to the nearest branch to continue exploring. The main purpose of the traditional breadth-first algorithm is to quickly find the valve closest to the pipe burst point. Since the flow direction information of the pipeline is not used, invalid valves that do not conform to the flow direction will appear in the search path, resulting in inaccurate analysis results. In addition, its search process is a divergent process. For the situation where valves are spread throughout the pipeline network, it may lead to an infinite branch situation. The continuous in-depth search method of depth-first search determines that it requires less memory space, but it cannot quickly find the optimal path.
[0003] Therefore, in the prior art, whether it is a breadth-first search or a depth-first search, there is a problem of inaccurate search results when searching for valves that need to be closed after a pipe burst. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a valve control method and device when a gas pipe network bursts, aiming to solve the problem of inaccurate search results when searching for valves that need to be closed after a pipe burst in the prior art.
[0005] In one aspect, the present invention provides a valve control method when a gas pipe network bursts, the method comprising: Performing network topology modeling on the gas pipeline network to obtain a gas pipeline network topology model, wherein the gas pipeline network topology model contains node attributes and edge attributes, the node attributes include node ID, whether it is a valve, valve ID, edge flowing into the node and edge flowing out of the node, and the edge attributes include pipe segment ID, start node, end node and flow direction information of the pipe segment; After a pipe burst occurs in the gas pipe network, the network topology model of the gas pipe network is analyzed, so as to determine the faulty pipe segment according to the pipe segment ID of the burst pipe, and determine the current search node according to the flow direction information of the faulty pipe segment; If the current search node is a valve, the current search node is added to the list of valves to be closed. If the current search node is not a valve, the target edge flowing into the current search node is found according to the attributes of the current search node and the search node of the target edge is determined as the current search node. Repeat the steps of adding the current search node to the list of valves to be closed if the current search node is a valve, and finding the target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node if the current search node is not a valve, until the preset search stop condition is met, obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed.
[0006] Furthermore, in the above-mentioned valve control method when a gas pipe network bursts, the step of determining the current search node based on the flow direction information of the faulty pipe section includes: If the gas flows from the start node of the faulty pipe section to the end node, the start node of the faulty pipe section is determined as the current search node; If the gas flows from the end node of the faulty pipe section to the start node, the end node of the faulty pipe section is determined as the current search node.
[0007] Furthermore, in the above-mentioned valve control method when a gas pipe network bursts, after the gas pipe network bursts, the network topology model of the gas pipe network is analyzed, so as to determine the faulty pipe section according to the pipe section ID of the burst pipe, and determine the current search node according to the flow direction information of the faulty pipe section, the step further includes: Determine whether the current search node is a visited node; If the current search node is a visited node, stop searching the edge where the current search node is located, and if there is a branch on the current search node, search for the next node on the edge where the branch is located; If the current search node is not a visited node, execute the steps of: if the current search node is a valve, adding the current search node to the list of valves to be closed; if the current search node is not a valve, finding the target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node, and listing the current search node as a visited node.
[0008] Furthermore, in the above-mentioned valve control method when a gas pipe network bursts, the step of obtaining a final list of valves to be closed and closing the valves in the final list of valves to be closed comprises: The distances of directly connected and not directly connected valves in the final list of valves to be closed are represented as 1 and infinity, respectively, to establish a distance matrix of valves to be closed; The Floyd-Warshall algorithm is used to update the distance matrix of valves to be closed to obtain the distance matrix of target valves to be closed; The target valves with valid paths are determined according to the target valve distance matrix to be closed, and the target valves at the starting point of the path are closed.
[0009] Furthermore, in the above-mentioned valve control method when a gas pipe network bursts, the step of using the Floyd-Warshall algorithm to update the distance matrix of valves to be closed to obtain the distance matrix of target valves to be closed includes: Step 1: Use the outer loop to traverse the middle valve k in the distance matrix of valves to be closed, and the two inner loops to traverse each pair of valves i and valve j; Step 2: determine whether the path length from valve i to valve j can be shortened by passing through the intermediate valve k, so as to update the path length from valve i to valve j; Repeat steps 1 and 2 until the shortest paths of all valve pairs are calculated, and obtain the distance matrix of the target valves to be closed.
[0010] Furthermore, in the above-mentioned valve control method when a gas pipe network bursts, the step of performing network topology modeling on the gas pipe network to obtain a network topology model of the gas pipe network includes: Identify key elements in the gas pipeline network, including pipeline points, pipelines and valves; The pipeline points and valves are taken as the node set of the graph, and the pipelines are taken as the edge set of the graph, to obtain a directed network graph; The gas pipe network topology model is obtained by adding corresponding attributes to the nodes and edges in the directed network graph.
[0011] Furthermore, in the above-mentioned valve control method when a gas pipe network bursts, after the step of obtaining a final list of valves to be closed and closing the valves in the final list of valves to be closed, the method further comprises: The affected pipe sections and the corresponding users on the affected pipe sections are analyzed according to the closed valves, and relevant prompt information is pushed to the users.
[0012] Another object of the present invention is to provide a valve control device for a gas pipe network burst, the device comprising: Establish a module for performing network topology modeling on the gas pipeline network to obtain a gas pipeline network topology model, wherein the gas pipeline network topology model contains node attributes and edge attributes, the node attributes include node ID, whether it is a valve, valve ID, edge flowing into the node and edge flowing out of the node, and the edge attributes include pipe segment ID, start node, end node and flow direction information of the pipe segment; An analysis module, used for analyzing the network topology model of the gas pipe network after a pipe burst occurs in the gas pipe network, thereby determining the faulty pipe segment according to the pipe segment ID of the burst pipe, and determining the current search node according to the flow direction information of the faulty pipe segment; A search module, for adding the current search node to a list of valves to be closed if the current search node is a valve, and for finding a target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node if the current search node is not a valve; The closing module is used to repeatedly execute the steps of adding the current search node to the list of valves to be closed if the current search node is a valve, and finding the target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node if the current search node is not a valve, until the preset search stop condition is met, obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed.
[0013] Another object of the present invention is to provide a readable storage medium having a computer program stored thereon, wherein the program implements the steps of the above method when executed by a processor.
[0014] Another object of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above method when executing the program.
[0015] The present invention converts the gas pipeline network into an analyzable network topology model for subsequent analysis and calculation, and uses a recursive depth-first search algorithm to find the nearest valve to be closed in the pipeline network, wherein the flow direction information of the pipeline is fully utilized to find all valves to be closed, thereby improving the accuracy of valve search. This solves the problem of inaccurate search results when searching for valves to be closed after a pipe burst in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flow chart of a valve control method when a gas pipe network bursts in the first embodiment of the present invention; Figure 2 It is a structural block diagram of a valve control device when a gas pipe network bursts in the third embodiment of the present invention.
[0017] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0018] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0019] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0021] Embodiment 1 See also Figure 1 , shown is a valve control method when a gas pipe network bursts in the first embodiment of the present invention, and the method includes steps S10 to S13.
[0022] Step S10, performing network topology modeling on the gas pipeline network to obtain a gas pipeline network topology model, wherein the gas pipeline network topology model contains node attributes and edge attributes, the node attributes include node ID, whether it is a valve, valve ID, edges flowing into the node, and edges flowing out of the node, and the edge attributes include pipe segment ID, start node, end node, and flow direction information of the pipe segment.
[0023] Among them, the network topology modeling of the gas pipeline network is carried out, and the gas pipeline network is modeled as a directed network graph. First, the key elements in the gas pipeline network need to be determined, mainly including pipeline points, pipelines, valves and other facilities. The pipeline points and valves are taken as the node set of the graph, and the pipelines are taken as the edge set of the graph to obtain a directed network graph; the graph G=(V, E) in graph theory is used to represent the gas pipeline network, where V represents the node set in the layer, i.e., the pipeline points and valves, and E represents the edge set, i.e., the pipelines; the corresponding attributes are added to the nodes and edges in the directed network graph to obtain the network topology model of the gas pipeline network. The node attributes mainly include node ID, whether it is a valve, valve ID, the edge flowing into the node, and the edge flowing out of the node. The edge attributes mainly include pipe segment ID, start node, end node, and flow direction information of the pipe segment. Based on this, the gas pipeline network can be effectively converted into an analyzable network topology model for subsequent analysis and calculation.
[0024] Step S11, after a pipe burst occurs in the gas pipe network, the network topology model of the gas pipe network is analyzed, so as to determine the faulty pipe segment according to the pipe segment ID of the burst pipe, and determine the current search node according to the flow direction information of the faulty pipe segment.
[0025] Among them, in the embodiment of the present invention, a recursive depth-first search algorithm is used to find the valve that needs to be closed recently in the gas pipeline network. First, the faulty pipe section is found according to the pipe section ID of the burst pipe, and then the current search node is determined according to the flow direction information of the faulty pipe section. Specifically, if the flow direction information is forward, that is, the gas flows from the start node of the faulty pipe section to the end node, the search is performed from the start node of the faulty pipe section, and the start node is used as the current search node. Similarly, if the flow direction information is reverse, that is, the gas flows from the end node of the faulty pipe section to the start node, the search should be performed from the end node of the faulty pipe section, and the end node should be used as the current search node.
[0026] Step S12, if the current search node is a valve, add the current search node to the list of valves to be closed; if the current search node is not a valve, find the target edge flowing into the current search node according to the attributes of the current search node and determine the search node of the target edge as the current search node.
[0027] Specifically, a list of valves to be closed is generated based on the current search node. That is, if the current search node is a valve, it is added to the list of valves to be closed, otherwise the edge flowing into the current search node is found according to the attributes of the current search node, and the search node of the edge is determined according to the flow direction information of the faulty pipe section.
[0028] In addition, in some optional embodiments of the present invention, after a pipe burst occurs in the gas pipe network, the network topology model of the gas pipe network is analyzed, so as to determine the faulty pipe segment according to the pipe segment ID of the burst pipe, and determine the current search node according to the flow direction information of the faulty pipe segment, the step further includes: Determine whether the current search node is a visited node; If the current search node is a visited node, stop searching the edge where the current search node is located, and if there is a branch on the current search node, search for the next node on the edge where the branch is located; If the current search node is not a visited node, execute the steps of: if the current search node is a valve, adding the current search node to the list of valves to be closed; if the current search node is not a valve, finding the target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node, and listing the current search node as a visited node.
[0029] After the current search node is determined for the first time, the current search node is judged to determine whether it is a visited node. If the search node exists in the visited node list, it indicates that the search for the branch is completed, that is, the search for the edge where the current node is located is stopped. If there are other branches, the previous nearest branch is traced back to search for the next node. If the search node does not exist in the visited node list, it is judged whether the current search node is a valve and added to the visited node list.
[0030] Step S13, repeatedly executing the step of adding the current search node to the list of valves to be closed if the current search node is a valve, and finding the target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node if the current search node is not a valve, until the preset search stop condition is met, obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed.
[0031] Among them, after determining a valve, the search for the valve continues. Specifically, a new target edge is determined, and the search node of the edge is determined according to the flow direction information of the faulty pipeline. Then, the search node is searched and judged until the preset search stop condition is met, such as the search node exists in the visited node list or there is no edge flowing into the search node, and the final list of valves to be closed is obtained.
[0032] In summary, the valve control method when a gas pipe network bursts in the above embodiment of the present invention converts the gas pipe network into an analyzable network topology model for subsequent analysis and calculation, and uses a recursive depth-first search algorithm to find the nearest valve to be closed in the pipe network, wherein the flow direction information of the pipeline is fully utilized to find all valves to be closed, thereby improving the accuracy of valve search. This solves the problem of inaccurate search results when searching for valves to be closed after a pipe burst in the prior art.
[0033] Embodiment 2 This embodiment also proposes a valve control method when a gas pipe network bursts. The valve control method when a gas pipe network bursts in this embodiment is different from the valve control method when a gas pipe network bursts in the first embodiment in that: The step of obtaining a final list of valves to be closed and closing the valves in the final list of valves to be closed comprises: The distances of directly connected and not directly connected valves in the final list of valves to be closed are represented as 1 and infinity, respectively, to establish a distance matrix of valves to be closed; The Floyd-Warshall algorithm is used to update the distance matrix of valves to be closed to obtain the distance matrix of target valves to be closed; The target valves with valid paths are determined according to the target valve distance matrix to be closed, and the target valves at the starting point of the path are closed.
[0034] Among them, the Floyd-Warshall shortest path algorithm is used to optimize the number of valves to be closed, that is, the algorithm is used to calculate the full source path of the valves to be closed, and the position relationship information between the valves is obtained. The number of valves to be closed is optimized based on the position relationship information. If the flow path of the upstream valve to be closed includes the downstream valve, the downstream valve does not need to be closed.
[0035] Specifically, for directly connected valves (i.e., nodes in the gas network topology model), the initial distance between valves is represented as 1. For valves that are not directly connected, the distance between valves is represented as infinity. A distance matrix of valves to be closed is established, and the distance matrix target distance matrix of valves to be closed is updated by dynamic planning, that is, a triple loop is used to gradually update the shortest path, in which the outer loop traverses each valve k and uses k as the intermediate valve. The two inner loops traverse each pair of valves i and j to check whether the path from i to j can be shortened by passing through valve k.
[0036] The specific update rules are: dist[i][j] Greater than dist[i][k] + dist[k][j] , then update dist[i] [j] for dist[i][k] + dist[k][j] , repeat the above path update until the shortest path calculation of all valve pairs is completed to obtain the target valve distance matrix to be closed.
[0037] In the calculated target valve distance matrix to be closed, if one valve A is reachable to another valve B (not infinite), it means that there is a valid path between the two valve nodes. Then it is sufficient to close only valve A (upstream valve) at the starting point of the path, thus optimizing the number of valves that actually need to be closed.
[0038] In addition, in some optional embodiments of the present invention, after the step of obtaining a final list of valves to be closed and closing the valves in the final list of valves to be closed, the step further includes: The affected pipe sections and the corresponding users on the affected pipe sections are analyzed according to the closed valves, and relevant prompt information is pushed to the users.
[0039] Among them, the affected pipe segments and user information are analyzed according to the valve node to be closed. That is, the attribute of the edge flowing out of the closed valve is used to determine the subsequent affected pipe segments, and then the affected user group information can be determined according to the relationship between the user and the pipe segment, and prompt information can also be generated to the user.
[0040] In summary, the valve control method when a gas pipe network bursts in the above embodiment of the present invention converts the gas pipe network into an analyzable network topology model for subsequent analysis and calculation, and uses a recursive depth-first search algorithm to find the nearest valve to be closed in the pipe network, wherein the flow direction information of the pipeline is fully utilized to find all valves to be closed, thereby improving the accuracy of valve search. This solves the problem of inaccurate search results when searching for valves to be closed after a pipe burst in the prior art.
[0041] Embodiment 3 See also Figure 2 , shown is a valve control device for a gas pipe network bursting pipe proposed in the third embodiment of the present invention, the device comprising: Establishing module 100, for performing network topology modeling on the gas pipeline network to obtain a gas pipeline network topology model, wherein the gas pipeline network topology model contains node attributes and edge attributes, the node attributes include node ID, whether it is a valve, valve ID, edge flowing into the node and edge flowing out of the node, the edge attributes include pipe segment ID, start node, end node and flow direction information of the pipe segment; The analysis module 200 is used to analyze the network topology model of the gas pipe network after a pipe burst occurs in the gas pipe network, thereby determining the faulty pipe segment according to the pipe segment ID of the burst pipe, and determining the current search node according to the flow direction information of the faulty pipe segment; Search module 300, for adding the current search node to a list of valves to be closed if the current search node is a valve, and for finding a target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node if the current search node is not a valve; The closing module 400 is used to repeatedly execute the steps of adding the current search node to the list of valves to be closed if the current search node is a valve, and finding the target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node if the current search node is not a valve, until the preset search stop condition is met, obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed.
[0042] Furthermore, in the above-mentioned valve control device for a gas pipe network burst, the step of determining the current search node according to the flow direction information of the faulty pipe section includes: If the gas flows from the start node of the faulty pipe section to the end node, the start node of the faulty pipe section is determined as the current search node; If the gas flows from the end node of the faulty pipe section to the start node, the end node of the faulty pipe section is determined as the current search node.
[0043] Furthermore, in the above-mentioned valve control device when a gas pipe network bursts, after the gas pipe network bursts, the network topology model of the gas pipe network is analyzed, so as to determine the faulty pipe section according to the pipe section ID of the burst pipe, and determine the current search node according to the flow direction information of the faulty pipe section, the step further includes: Determine whether the current search node is a visited node; If the current search node is a visited node, stop searching the edge where the current search node is located, and if there is a branch on the current search node, search for the next node on the edge where the branch is located; If the current search node is not a visited node, execute the steps of: if the current search node is a valve, adding the current search node to the list of valves to be closed; if the current search node is not a valve, finding the target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node, and listing the current search node as a visited node.
[0044] Furthermore, in the above-mentioned valve control device for a gas pipe network burst, the step of obtaining a final list of valves to be closed and closing the valves in the final list of valves to be closed comprises: The distances of directly connected and not directly connected valves in the final list of valves to be closed are represented as 1 and infinity, respectively, to establish a distance matrix of valves to be closed; The Floyd-Warshall algorithm is used to update the distance matrix of valves to be closed to obtain the distance matrix of target valves to be closed; The target valves with valid paths are determined according to the target valve distance matrix to be closed, and the target valves at the starting point of the path are closed.
[0045] Furthermore, in the above-mentioned valve control device for a gas pipe network burst, the step of using the Floyd-Warshall algorithm to update the distance matrix of valves to be closed to obtain the distance matrix of target valves to be closed includes: Step 1: Use the outer loop to traverse the middle valve k in the distance matrix of valves to be closed, and the two inner loops to traverse each pair of valves i and valve j; Step 2: determine whether the path length from valve i to valve j can be shortened by passing through the intermediate valve k, so as to update the path length from valve i to valve j; Repeat steps 1 and 2 until the shortest paths of all valve pairs are calculated, and obtain the distance matrix of the target valves to be closed.
[0046] Furthermore, in the above-mentioned valve control device for a gas pipe network burst, the step of performing network topology modeling on the gas pipe network to obtain a network topology model of the gas pipe network comprises: Identify key elements in the gas pipeline network, including pipeline points, pipelines and valves; The pipeline points and valves are taken as the node set of the graph, and the pipelines are taken as the edge set of the graph, to obtain a directed network graph; The gas pipe network topology model is obtained by adding corresponding attributes to the nodes and edges in the directed network graph.
[0047] Furthermore, in the above-mentioned valve control device for a gas pipe network burst, after the step of obtaining a final list of valves to be closed and closing the valves in the final list of valves to be closed, the step further includes: The affected pipe sections and the corresponding users on the affected pipe sections are analyzed according to the closed valves, and relevant prompt information is pushed to the users.
[0048] The functions or operation steps implemented when the above modules are executed are substantially the same as those in the above method embodiments, and will not be repeated here.
[0049] Embodiment 4 Another aspect of the present invention further provides a readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the method described in any one of the above-mentioned embodiments 1 to 2 are implemented.
[0050] Embodiment 5 Another aspect of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the program, the steps of the method described in any one of the above-mentioned embodiments 1 to 2 are implemented.
[0051] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0052] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0053] More specific examples (a non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0054] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0055] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0056] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A valve control method for a gas pipe network burst, characterized in that: The method comprises: Performing network topology modeling on the gas pipeline network to obtain a gas pipeline network topology model, wherein the gas pipeline network topology model contains node attributes and edge attributes, the node attributes include node ID, whether it is a valve, valve ID, edge flowing into the node and edge flowing out of the node, and the edge attributes include pipe segment ID, start node, end node and flow direction information of the pipe segment; After a pipe burst occurs in the gas pipe network, the network topology model of the gas pipe network is analyzed, so as to determine the faulty pipe segment according to the pipe segment ID of the burst pipe, and determine the current search node according to the flow direction information of the faulty pipe segment; If the current search node is a valve, the current search node is added to the list of valves to be closed. If the current search node is not a valve, the target edge flowing into the current search node is found according to the attributes of the current search node and the search node of the target edge is determined as the current search node. Repeat the steps of adding the current search node to the list of valves to be closed if the current search node is a valve, and finding the target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node if the current search node is not a valve, until the preset search stop condition is met, obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed.
2. The valve control method when a gas pipe network bursts according to claim 1 is characterized in that: The step of determining the current search node according to the flow direction information of the faulty pipe section includes: If the gas flows from the start node of the faulty pipe section to the end node, the start node of the faulty pipe section is determined as the current search node; If the gas flows from the end node of the faulty pipe section to the start node, the end node of the faulty pipe section is determined as the current search node.
3. The valve control method when a gas pipe network bursts according to claim 1 is characterized in that: After the gas pipe network bursts, the network topology model of the gas pipe network is analyzed to determine the faulty pipe segment according to the pipe segment ID of the burst pipe, and the current search node is determined according to the flow direction information of the faulty pipe segment. The step also includes: Determine whether the current search node is a visited node; If the current search node is a visited node, stop searching the edge where the current search node is located, and if there is a branch on the current search node, search for the next node on the edge where the branch is located; If the current search node is not a visited node, execute the steps of: if the current search node is a valve, adding the current search node to the list of valves to be closed; if the current search node is not a valve, finding the target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node, and listing the current search node as a visited node.
4. The valve control method when a gas pipe network bursts according to claim 1 is characterized in that: The step of obtaining a final list of valves to be closed and closing the valves in the final list of valves to be closed comprises: The distances of directly connected and not directly connected valves in the final list of valves to be closed are represented as 1 and infinity, respectively, to establish a distance matrix of valves to be closed; The Floyd-Warshall algorithm is used to update the distance matrix of valves to be closed to obtain the distance matrix of target valves to be closed; The target valves with valid paths are determined according to the target valve distance matrix to be closed, and the target valves at the starting point of the path are closed.
5. The valve control method when a gas pipe network bursts according to claim 4 is characterized in that: The step of using the Floyd-Warshall algorithm to update the distance matrix of valves to be closed to obtain the distance matrix of target valves to be closed includes: Step 1: Use the outer loop to traverse the middle valve k in the distance matrix of valves to be closed, and the two inner loops to traverse each pair of valves i and valve j; Step 2: determine whether the path length from valve i to valve j can be shortened by passing through the intermediate valve k, so as to update the path length from valve i to valve j; Repeat steps 1 and 2 until the shortest paths of all valve pairs are calculated, and obtain the distance matrix of the target valves to be closed.
6. The valve control method when a gas pipe network bursts according to claim 1 is characterized in that: The step of performing network topology modeling on the gas pipeline network to obtain a network topology model of the gas pipeline network comprises: Identify key elements in the gas pipeline network, including pipeline points, pipelines and valves; The pipeline points and valves are taken as the node set of the graph, and the pipelines are taken as the edge set of the graph, to obtain a directed network graph; The gas pipe network topology model is obtained by adding corresponding attributes to the nodes and edges in the directed network graph.
7. The valve control method when a gas pipe network bursts according to claim 1 is characterized in that: After the step of obtaining a final list of valves to be closed and closing the valves in the final list of valves to be closed, the following step further comprises: The affected pipe sections and the corresponding users on the affected pipe sections are analyzed according to the closed valves, and relevant prompt information is pushed to the users.
8. A valve control device for a gas pipe network burst, characterized in that: The device comprises: Establish a module for performing network topology modeling on the gas pipeline network to obtain a gas pipeline network topology model, wherein the gas pipeline network topology model contains node attributes and edge attributes, the node attributes include node ID, whether it is a valve, valve ID, edge flowing into the node and edge flowing out of the node, and the edge attributes include pipe segment ID, start node, end node and flow direction information of the pipe segment; An analysis module, used for analyzing the network topology model of the gas pipe network after a pipe burst occurs in the gas pipe network, thereby determining the faulty pipe segment according to the pipe segment ID of the burst pipe, and determining the current search node according to the flow direction information of the faulty pipe segment; A search module, for adding the current search node to a list of valves to be closed if the current search node is a valve, and for finding a target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node if the current search node is not a valve; The closing module is used to repeatedly execute the steps of adding the current search node to the list of valves to be closed if the current search node is a valve, and finding the target edge flowing into the current search node according to the attributes of the current search node and determining the search node of the target edge as the current search node if the current search node is not a valve, until the preset search stop condition is met, obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed.
9. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the program.
Citation Information
Patent Citations
Pipe burst searching method based on three-dimensional underground pipeline
CN111102476A
Schema theory-based water supply network pipe explosion analysis method and analysis system
CN111814289A
Index quantitative analysis method for valve isolation effect after pipe explosion of water supply pipeline
CN116384835A
Valve closing method and system based on multi-gas-source urban gas pipe network
CN117091079A
Pipe network transmission and distribution bottleneck analysis method based on search algorithm
CN118568903A