A valve control method and device during gas pipeline network burst

By modeling the network topology of the gas pipeline network and using the recursive depth-first search algorithm and the Floyd-Warshall algorithm, the problem of inaccurate valve search after the gas pipeline burst is solved, and more accurate valve search and closing is achieved.

CN119309149BActive Publication Date: 2025-06-24JIANGXI JIANGTOU DIGITAL ECONOMIC TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411866499.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-06-24
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

In the prior art, after the gas pipeline bursts, there is a problem of inaccurate search results when looking for valves that need to be closed.

Method used

By modeling the network topology of the gas pipeline network, a model containing node attributes and edge attributes is established, and a recursive depth-first search algorithm and Floyd-Warshall algorithm are used to determine the search nodes based on the flow direction information of the pipe segment, and gradually find all valves to be closed.

Benefits of technology

The accuracy of valve search is improved, the problem of inaccurate search results in the prior art is solved, and the valves that need to be closed can be accurately found and closed after the pipe bursts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119309149B_ABST
    Figure CN119309149B_ABST
Patent Text Reader

Abstract

The present invention discloses a valve control method and device during gas pipeline network burst, which relates to the technical field of urban management. The method includes: performing network topology modeling on the gas pipeline network to obtain a gas pipeline network topology model; analyzing the gas pipeline network topology model, thereby determining a faulty pipe segment based on the pipe segment ID of the burst, and determining the current search node based on the flow direction information of the faulty pipe segment; 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 attribute of the current search node and determining the search node of the target edge as the current search node; until the final list of valves to be closed is obtained and the valves in the final list of valves to be closed are closed. The present invention solves the problem of inaccurate search results when finding the valves that need to be closed in the prior art after a pipeline burst.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of urban management, and particularly relates to a valve control method and device during gas pipeline network burst. Background Art

[0002] Most of the existing burst pipe analysis algorithms are implemented based on graph search. There are mainly two graph search methods: breadth-first search and depth-first search. Breadth-first search is a search method that traverses layer by layer. It starts from a certain starting node of the graph, first visits all adjacent nodes of this node, and then expands layer by layer outward to visit the nodes of the next layer, and so on. Depth-first search is a search method that tries to go as deep as possible into each branch. It starts from the starting node and keeps going forward along a path until it reaches a node with 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 burst pipe point. Since the flow direction information of the pipeline is not utilized, invalid valves that do not conform to the flow direction may appear in the search path, resulting in inaccurate analysis results. And its search process is a divergent process. For the situation where valves are distributed throughout the pipeline network, it may lead to the situation of getting into infinite branches. The way of continuously deep searching in 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 breadth-first search or depth-first search, there are problems with inaccurate search results when finding the valves that need to be closed after a pipeline 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 during gas pipeline network burst, aiming to solve the problem of inaccurate search results when finding the valves that need to be closed after a pipeline burst in the prior art.

[0005] On the one hand, the present invention provides a valve control method during gas pipeline network burst, and the method includes:

[0006] Perform network topology modeling on the gas pipeline network to obtain a gas pipeline network topology model. Among them, 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, the edges flowing into the node, and the edges flowing out from the node. The edge attributes include pipe segment ID, start node, end node, and the flow direction information of the pipe segment;

[0007] After a burst occurs in the gas pipeline network, analyze the gas pipeline network topology model, so as to determine the faulty pipe segment according to the pipe segment ID of the burst, and determine the current search node according to the flow direction information of the faulty pipe segment;

[0008] 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;

[0009] Repeat the steps of "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" until the preset search stop condition is met, obtain the final list of valves to be closed, and close the valves in the final list of valves to be closed.

[0010] Further, in the above valve control method during gas pipeline network burst, the step of determining the current search node according to the flow direction information of the faulty pipe section includes:

[0011] If the gas flows from the start node of the faulty pipe section to the end node, determine the start node of the faulty pipe section as the current search node;

[0012] If the gas flows from the end node of the faulty pipe section to the start node, determine the end node of the faulty pipe section as the current search node.

[0013] Further, in the above valve control method during gas pipeline network burst, after the step of analyzing the gas pipeline network topology model after the gas pipeline network bursts, thereby determining the faulty pipe section according to the pipe section ID of the burst and determining the current search node according to the flow direction information of the faulty pipe section, the following steps are also included:

[0014] Judge whether the current search node is an accessed node;

[0015] If the current search node is an accessed node, stop searching the edge where the current search node is located, and when there are branches at the current search node, search for the next node on the edge where the branch is located;

[0016] If the current search node is not an accessed node, execute the steps of "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", and list the current search node as an accessed node.

[0017] Further, in the above valve control method during gas pipeline network burst, the step of obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed includes:

[0018] Represent the distances between directly connected and non - directly connected valves in the final list of valves to be closed as 1 and infinity respectively to establish a distance matrix of valves to be closed;

[0019] Use the Floyd - Warshall algorithm to update the distance matrix of valves to be closed to obtain the target distance matrix of valves to be closed;

[0020] Determine the target valves with valid paths according to the target distance matrix of valves to be closed, and close the target valves at the starting points of the paths.

[0021] Furthermore, in the above - mentioned valve control method during gas pipeline network burst, the step of using the Floyd - Warshall algorithm to update the distance matrix of valves to be closed to obtain the target distance matrix of valves to be closed includes:

[0022] Step 1: Use the outer loop to traverse the intermediate valve k in the distance matrix of valves to be closed, and use the two inner loops to traverse each pair of valves i and j;

[0023] Step 2: Determine whether the path length from valve i to valve j can be shortened through the intermediate valve k to update the path length from valve i to valve j;

[0024] Repeat Step 1 and Step 2 until the shortest path calculations for all valve pairs are completed to obtain the target distance matrix of valves to be closed.

[0025] Furthermore, in the above - mentioned valve control method during gas pipeline network burst, the step of performing network topology modeling on the gas pipeline network to obtain the gas pipeline network topology model includes:

[0026] Determine the key elements in the gas pipeline network, and the key elements include pipeline points, pipelines, and valves;

[0027] Take the pipeline points and valves as the node set of the graph, and the pipelines as the edge set of the graph to obtain a directed network graph;

[0028] Add corresponding attributes to the nodes and edges in the directed network graph respectively to obtain the gas pipeline network topology model.

[0029] Furthermore, in the above - mentioned valve control method during gas pipeline network burst, after the step of obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed, it further includes:

[0030] Analyze the affected pipeline segments and the corresponding users on the affected pipeline segments according to the closed valves, and push relevant prompt information to the users.

[0031] Another object of the present invention is to provide a valve control device during a burst of a gas pipeline network, the device comprising:

[0032] A building module, configured to perform network topology modeling on a 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, the edges flowing into the node, and the edges flowing out of the node, and the edge attributes include pipe segment ID, start node, end node, and the flow direction information of the pipe segment;

[0033] An analysis module, configured to analyze the gas pipeline network topology model after a burst occurs in the gas pipeline network, so as to determine a faulty pipe segment according to the pipe segment ID of the burst, and determine a current search node according to the flow direction information of the faulty pipe segment;

[0034] A search module, configured to, if the current search node is a valve, add the current search node to a list of valves to be closed, and if the current search node is not a valve, find a 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;

[0035] A closing module, configured to repeatedly execute the step of, if the current search node is a valve, add the current search node to a list of valves to be closed, and if the current search node is not a valve, find a 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 until a preset search stop condition is met, obtain a final list of valves to be closed, and close the valves in the final list of valves to be closed.

[0036] Another object of the present invention is to provide a readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented.

[0037] Another object of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, and when the processor executes the program, the steps of the above method are implemented.

[0038] By converting the gas pipeline network into an analyzable network topology model for subsequent analysis and calculation, the present invention uses a recursive depth-first search algorithm to find the valves that need to be closed nearest in the pipeline network. Among them, the flow direction information of the pipeline is fully utilized to find all the valves to be closed, improving the accuracy of valve search. The problem of inaccurate search results when finding the valves that need to be closed after a burst in the prior art is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1It is a flowchart of the valve control method when a gas pipeline network bursts in the first embodiment of the present invention;

[0040] Figure 2 It is a structural block diagram of the valve control device when a gas pipeline network bursts in the third embodiment of the present invention.

[0041] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. Specific Embodiments

[0042] To facilitate the understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are shown 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, these embodiments are provided to make the disclosure of the present invention more thorough and comprehensive.

[0043] It should be noted that when an element is referred to as being "fixedly provided on" another element, it can be directly on the other element or there may also be an intermediate element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be an intermediate element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are only for the purpose of illustration.

[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field 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.

[0045] Embodiment 1

[0046] Please refer to Figure 1 , which shows the valve control method when a gas pipeline network bursts in the first embodiment of the present invention. The method includes steps S10 to S13.

[0047] Step S10, perform network topology modeling on the gas pipeline network to obtain a gas pipeline network topology model. Among them, 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, the edges flowing into the node, and the edges flowing out of the node. The edge attributes include pipe segment ID, start node, end node, and the flow direction information of the pipe segment.

[0048] Among them, for the network topology modeling of the gas pipeline network, 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. Taking the pipeline points and valves as the node set of the graph and the pipelines as the edge set of the graph, a directed network graph is obtained; the graph theory graph G=(V, E) is used to represent the gas pipeline network, where V represents the node set in the layer, that is, the pipeline points and valves, and E represents the edge set, that is, the pipelines; corresponding attributes are added to the nodes and edges in the directed network graph respectively to obtain the gas pipeline network topology model. The node attributes mainly include node ID, whether it is a valve, valve ID, the edges flowing into the node, and the edges flowing out of the node. The edge attributes mainly include pipe segment ID, start node, end node, and the flow direction information of the pipe segment. Based on this, the gas pipeline network can be effectively transformed into an analyzable network topology model for subsequent analysis and calculation.

[0049] Step S11, after a pipe burst occurs in the gas pipeline network, analyze the gas pipeline network topology model, so as to determine the faulty pipe segment according to the pipe segment ID of the pipe burst, and determine the current search node according to the flow direction information of the faulty pipe segment.

[0050] Among them, in the embodiment of the present invention, a recursive depth-first search algorithm is used to find the nearest valve to be closed in the gas pipeline network. First, the faulty pipe segment is found according to the pipe segment ID of the pipe burst, and then the current search node is determined according to the flow direction information of the faulty pipe segment. Specifically, if the flow direction information is forward, that is, the gas flows from the start node of the faulty pipe segment to the end node, then search from the start node of the faulty pipe segment, that is, take the start node 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 segment to the start node, then search should be carried out from the end node of the faulty pipe segment, and the end node is taken as the current search node.

[0051] 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.

[0052] Specifically, a list of valves to be closed is generated according to 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, find the edge flowing into the current search node according to the attributes of the current search node, and determine the search node of the edge according to the flow direction information of the faulty pipe segment.

[0053] In addition, in some optional embodiments of the present invention, after the step of analyzing the gas pipeline network topology model after a pipe burst occurs in the gas pipeline network, so as to determine the faulty pipe segment according to the pipe segment ID of the pipe burst, and determine the current search node according to the flow direction information of the faulty pipe segment, the following steps are further included:

[0054] Determine whether the current search node is an accessed node;

[0055] If the current search node is an accessed node, stop searching the edge where the current search node is located, and when there are branches at the current search node, search for the next node on the edge where the branch is located;

[0056] If the current search node is not an accessed node, execute the step of 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 attribute of the current search node and determine the search node of the target edge as the current search node, and list the current search node as an accessed node.

[0057] Among them, after the current search node is first determined, judge the current search node to determine whether it is an accessed node. If the search node exists in the list of accessed nodes, it means that the search for this branch is completed, that is, stop searching the edge where the current node is located. If there are other branches, backtrack to the nearest previous branch to search for the next node. If the search node does not exist in the list of accessed nodes, judge whether the current search node is a valve and add it to the list of accessed nodes.

[0058] Step S13, repeatedly execute the step of 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 attribute of the current search node and determine the search node of the target edge as the current search node, until the preset search stop condition is met, obtain the final list of valves to be closed and close the valves in the final list of valves to be closed.

[0059] Among them, after determining a valve, continue to search for valves. Specifically, determine a new target edge, determine the search node of this edge according to the flow information of the faulty pipeline, and then perform search judgment on the search node until the preset search stop condition is met, such as the search node exists in the list of accessed nodes or there is no edge flowing into the search node, to obtain the final list of valves to be closed.

[0060] In summary, the valve control method during gas pipeline network explosion in the above embodiments of the present invention converts the gas pipeline network into an analyzable network topology model for subsequent analysis and calculation, and uses the recursive depth-first search algorithm to find the valves that need to be closed nearest in the pipeline network. Among them, the flow information of the pipeline is fully utilized to find all the valves to be closed, improving the accuracy of valve search. It solves the problem of inaccurate search results when finding the valves that need to be closed after pipeline explosion in the prior art.

[0061] Example 2

[0062] This embodiment also proposes a valve control method during gas pipeline network burst. The difference between the valve control method during gas pipeline network burst in this embodiment and that in Embodiment 1 lies in that:

[0063] The step of obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed includes:

[0064] Represent the distances between directly connected and non - directly connected valves in the final list of valves to be closed as 1 and infinity respectively to establish a distance matrix of valves to be closed;

[0065] Use the Floyd - Warshall algorithm to update the distance matrix of valves to be closed to obtain a target distance matrix of valves to be closed;

[0066] Determine the target valves with valid paths according to the target distance matrix of valves to be closed, and close the target valves at the starting point of the path.

[0067] Among them, the Floyd - Warshall shortest path algorithm is used to optimize the number of valves to be closed, that is, this algorithm is used to calculate all - source paths for the valves to be closed, obtain the position relationship information between the valves, and optimize the number of valves to be closed according to the position relationship information. It is manifested that if the downstream valve is included in the flow - through path of the upstream valve to be closed, the downstream valve does not need to be closed.

[0068] Specifically, for directly connected valves (i.e., nodes in the gas pipeline network topology model), the initial distance between the valves is represented as 1, and for non - directly connected valves, the distance between the valves is represented as infinity. A distance matrix of valves to be closed is established, and the distance matrix is dynamically programmed to update the target distance matrix of valves to be closed, that is, use triple loops to gradually update the shortest path. Among them, the outer loop traverses each valve k and takes 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 shorter through valve k.

[0069] The specific update rule is: If dist[i][j] is greater than dist[i][k] + dist[k][j] , then update dist[i] [j] to dist[i][k] + dist[k][j] , and repeat the above path update until the shortest path calculation of all valve pairs is completed to obtain the target distance matrix of valves to be closed.

[0070] In the calculated target valve-to-be-closed distance matrix, if one valve A is reachable (not infinity) to another valve B, it indicates that there is an effective path between the two valve nodes. Then, it is sufficient to only close the valve A (the upstream valve) at the starting point of the path, achieving the optimization of the number of valves that actually need to be closed.

[0071] In addition, in some optional embodiments of the present invention, after the step of obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed, the following steps are further included:

[0072] Analyze the affected pipe segments and the corresponding users on the affected pipe segments based on the closed valves, and push relevant prompt information to the users.

[0073] Among them, analyze the affected pipe segments and user information based on the valve nodes to be closed. That is, use the attribute of the edge flowing out of the closed valve to determine the subsequent affected pipe segments, and then determine the information of the affected user groups according to the relationship between the users and the pipe segments, and prompt information can also be sent to the users.

[0074] In summary, the valve control method during gas pipeline network explosion in the above embodiments of the present invention converts the gas pipeline network into an analyzable network topology model for subsequent analysis and calculation, uses the recursive depth-first search algorithm to find the valves that need to be closed nearest in the pipeline network. Among them, fully utilize the flow direction information of the pipelines to find all the valves to be closed, improving the accuracy of valve search. It solves the problem of inaccurate search results when finding the valves that need to be closed after pipeline explosion in the prior art.

[0075] Embodiment 3

[0076] Please refer to Figure 2 , which shows the valve control device during gas pipeline network explosion proposed in the third embodiment of the present invention. The device includes:

[0077] A building module 100, used to perform network topology modeling on the gas pipeline network to obtain a gas pipeline network topology model. Among them, 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, the edges flowing into the node, and the edges flowing out of the node. The edge attributes include pipe segment ID, start node, end node, and the flow direction information of the pipe segment;

[0078] An analysis module 200, used to analyze the gas pipeline network topology model after the gas pipeline network explodes, so as to determine the faulty pipe segment according to the pipe segment ID of the explosion, and determine the current search node according to the flow direction information of the faulty pipe segment;

[0079] A search module 300, which is used to add the current search node to the list of valves to be closed if the current search node is a valve, and 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;

[0080] A closing module 400, which is used to repeatedly execute 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 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, until a preset search stop condition is met, obtain the final list of valves to be closed and close the valves in the final list of valves to be closed.

[0081] Further, for the above valve control device during a gas pipeline network burst, wherein the step of determining the current search node based on the flow direction information of the faulty pipe section includes:

[0082] If the gas flows from the start node of the faulty pipe section to the end node, determine the start node of the faulty pipe section as the current search node;

[0083] If the gas flows from the end node of the faulty pipe section to the start node, determine the end node of the faulty pipe section as the current search node.

[0084] Further, for the above valve control device during a gas pipeline network burst, after the step of analyzing the gas pipeline network topology model after the gas pipeline network bursts, thereby determining the faulty pipe section based on the pipe section ID of the burst and determining the current search node based on the flow direction information of the faulty pipe section, the following steps are further included:

[0085] Judge whether the current search node is an accessed node;

[0086] If the current search node is an accessed node, stop searching the edge where the current search node is located, and when there are branches at the current search node, search for the next node on the edge where the branch is located;

[0087] If the current search node is not an accessed node, execute 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 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, and list the current search node as an accessed node.

[0088] Further, for the above valve control device during a gas pipeline network burst, wherein the step of obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed includes:

[0089] Represent the distances between directly connected and non-directly connected valves in the final list of valves to be closed as 1 and infinity respectively to establish a distance matrix of valves to be closed;

[0090] Use the Floyd-Warshall algorithm to update the distance matrix of valves to be closed to obtain a target distance matrix of valves to be closed;

[0091] Determine the target valves with valid paths based on the target distance matrix of valves to be closed, and close the target valves at the starting points of the paths.

[0092] Furthermore, in the above valve control device during gas pipeline network burst, the step of using the Floyd-Warshall algorithm to update the distance matrix of valves to be closed to obtain a target distance matrix of valves to be closed includes:

[0093] Step 1: Use an outer loop to traverse the intermediate valve k in the distance matrix of valves to be closed, and use two inner loops to traverse each pair of valves i and valve j;

[0094] Step 2: Determine whether the path length from valve i to valve j can be shortened through the intermediate valve k to update the path length from valve i to valve j;

[0095] Repeat Step 1 and Step 2 until the shortest path calculations for all valve pairs are completed to obtain a target distance matrix of valves to be closed.

[0096] Furthermore, in the above valve control device during gas pipeline network burst, the step of performing network topology modeling on the gas pipeline network to obtain a gas pipeline network topology model includes:

[0097] Determine the key elements in the gas pipeline network, and the key elements include pipeline points, pipelines, and valves;

[0098] Use the pipeline points and valves as the node set of the graph, and the pipelines as the edge set of the graph to obtain a directed network graph;

[0099] Add corresponding attributes to the nodes and edges in the directed network graph respectively to obtain the gas pipeline network topology model.

[0100] Furthermore, in the above valve control device during gas pipeline network burst, after the step of obtaining the final list of valves to be closed and closing the valves in the final list of valves to be closed, it further includes:

[0101] Analyze the affected pipeline segments and the corresponding users on the affected pipeline segments based on the closed valves, and push relevant prompt information to the users.

[0102] 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 elaborated herein.

[0103] Embodiment 4

[0104] On the other hand, the present invention also provides a readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method according to any one of the above Embodiments 1 to 2 are implemented.

[0105] Embodiment 5

[0106] On the other hand, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and running on the processor. When the processor executes the program, the steps of the method according to any one of the above Embodiments 1 to 2 are implemented.

[0107] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope recorded in this specification.

[0108] Those skilled in the art can understand that the logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable storage medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch instructions from the instruction execution system, apparatus, or device and execute the instructions), or in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable storage medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in combination with an instruction execution system, apparatus, or device.

[0109] More specific examples (non-exhaustive list) of computer-readable storage media include the following: an electrical connection part with one or more wirings (electronic device), a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, a computer-readable storage medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or processing it in other suitable ways as necessary, and then storing it in a computer memory.

[0110] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above 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, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0111] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.

[0112] The above-described embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but should not be construed as a limitation on the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these 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 appended 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 attribute 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 a preset search stop condition is met, obtaining a final list of valves to be closed, and closing the valves in the final list of valves to be closed; 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; 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, then if the current search node is a valve, then 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, and the current search node is listed as a visited node; 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.

2. The valve control method when a gas pipe network bursts according to claim 1 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.

3. 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.

4. 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.

5. A valve control device for a gas pipe network burst, characterized in that: The device is used to implement the valve control method when a gas pipe network bursts as described in any one of claims 1 to 4, and 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.

6. 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 4 are implemented.

7. 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 steps of the method according to any one of claims 1 to 4 are implemented when the processor executes the program.

Citation Information

Patent Citations

  • Pipe burst searching method based on three-dimensional underground pipeline

    CN111102476A