Natural gas pipeline network system modeling method, device and equipment and storage medium

Through the network modeling method based on point set, edge set and weight layer, combined with performance flow algorithm, the shortcomings of the toughness modeling of the natural gas pipeline system are solved, and the precise modeling and optimization of the natural gas pipeline system is achieved, and the computing efficiency and accuracy are improved.

CN120257533APending Publication Date: 2025-07-04CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510159333.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing technology lacks effective method for toughness modeling of natural gas pipeline systems, and it is impossible to accurately evaluate and optimize the gas transmission capacity and gas transmission volume changes of natural gas pipeline systems before disturbance, and the application of complex network theory in this field has not yet been completely migrated.

Method used

The network modeling method based on point set, edge set and weight layer is adopted to determine the topological structure diagram of the natural gas pipeline system, introduce parameter weights, economic weights and probability weights, and optimize the gas supply paths with performance flow algorithms to deal with the disturbed system changes.

Benefits of technology

Accurate modeling and optimization of the toughness of the natural gas pipeline system is achieved, computing power requirements are reduced, computing efficiency is improved, and gas supply performance and path optimization can be accurately evaluated in the event of disturbances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120257533A_ABST
    Figure CN120257533A_ABST
Patent Text Reader

Abstract

The invention provides a natural gas pipeline network system modeling method, device and equipment and a storage medium, and relates to the technical field of energy, the method comprises the following steps: respectively determining a point set and an edge set based on a pipeline of a natural gas pipeline network system and a connection point of the natural gas pipeline network system; determining a weight layer of the natural gas pipeline network system based on the parameter information of the pipelines and the parameter information of the connection points; and performing network modeling on the natural gas pipeline network system based on the point set, the edge set and the weight layer, and determining a topological structure diagram of the natural gas pipeline network system. By means of the mode, application of the complex network theory in the natural gas pipeline network system is achieved, improvement and migration from the network science theory to natural gas pipeline network system toughness research are achieved, and the research on the natural gas pipeline network system toughness is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy, and particularly to a method, device, equipment and storage medium for modeling a natural gas pipeline network system. Background Art

[0002] As the proportion of natural gas in energy gradually increases, ensuring the supply of natural gas is gradually becoming a relatively important link in the daily production activities of related enterprises. As the most important link in the entire gas supply link, the resilience and reliability of the natural gas pipeline network system play a crucial role in ensuring the safe and stable supply of natural gas. Modeling and calculating the natural gas pipeline network system is the most basic method for studying the resilience of the natural gas pipeline network system.

[0003] However, current research on the resilience of natural gas pipeline network systems is mostly based on commercial software. Digital twin models are constructed with the parameters of actual natural gas pipeline network systems, and then the gas supply performance of the natural gas pipeline network system is calculated through water and thermal simulations. This method has high requirements for computing power and also has a deviation from the focus of research on the resilience of natural gas pipeline network systems. Research on the resilience of natural gas pipeline network systems pays more attention to the change characteristics of the natural gas pipeline network system in terms of gas transmission capacity, gas transmission volume, and gas received by users before and after disturbances. At the same time, the application of complex network theory in natural gas pipeline network systems is still in its infancy. Currently, there is no solution to completely migrate classical network theory and corresponding algorithms to the research on the resilience of natural gas pipeline network systems, and there is also a lack of a network theory framework that conforms to the research in this field.

[0004] Therefore, there is currently a lack of a modeling method based on the resilience of natural gas pipeline network systems. Summary of the Invention

[0005] The present invention provides a method, device, equipment and storage medium for modeling a natural gas pipeline network system to solve the defect that there is currently a lack of a modeling method based on the resilience of natural gas pipeline network systems in the prior art.

[0006] The present invention provides a method for modeling a natural gas pipeline network system, including: respectively determining a point set and an edge set based on the pipelines of the natural gas pipeline network system and the connection points of the natural gas pipeline network system; the point set includes a plurality of nodes, the edge set includes a plurality of edges, one node is used to represent one connection point, and one edge is used to represent one pipeline; determining a weight layer of the natural gas pipeline network system based on the parameter information of the pipelines and the parameter information of the connection points; the weight layer is used to represent the parameters of each node and the parameters of each edge; performing network modeling on the natural gas pipeline network system based on the point set, the edge set and the weight layer to determine the topological structure diagram of the natural gas pipeline network system.

[0007] A method for modeling a natural gas pipeline network system provided by the present invention, the weight layer includes a parameter weight, an economic weight, and a probability weight; wherein, the parameter weight is determined based on structural parameters and flow parameters, the structural parameters include the pipe length of the pipeline and the wall thickness of the pipeline, and the flow parameters include the flow direction weight, the flow rate weight, the pressure weight, and the gas transmission capacity weight of the pipeline; the economic weight is determined based on the current assets of the pipeline and the connection point, and the fixed assets of the pipeline and the connection point; the probability weight is determined based on the pipeline probability weight and the equipment probability weight, and the pipeline probability weight is determined based on the yield stress of the pipeline, the pipe wall thickness, the operating pressure, the defect depth, the defect depth development speed, the defect length, the defect length development speed, and the number of defects per unit length.

[0008] A method for modeling a natural gas pipeline network system provided by the present invention, the topological structure diagram includes at least one user node, at least one gas source node, a plurality of intermediate nodes, and a plurality of edges; after determining the topological structure diagram of the natural gas pipeline network system, it further includes: based on the gas consumption demand of each user node and the gas supply capacity of each edge, exploring in the increasing order of the node layer distance, and determining the gas source node corresponding to each user node, the gas supply path set corresponding to each user node, and the gas transmission cost set corresponding to each user node in the topological structure diagram; the gas supply path set includes a plurality of gas supply paths between a user node and the corresponding gas source node, and the gas transmission cost set includes the gas transmission cost corresponding to each gas supply path; based on each gas transmission cost set, determine the initial gas supply path of each user node from each gas supply path set; the initial gas supply path is the gas supply path with the minimum gas transmission cost.

[0009] A method for modeling a natural gas pipeline network system provided by the present invention, after determining the initial gas supply path of each user node from each gas supply path set based on each gas transmission cost set, further includes: determining a first user node and a second user node; the first user node is any user node in the topological structure diagram, and the second user node is a user node other than the first user node in the topological structure diagram; determining whether the initial gas supply paths of the first user node and the second user node overlap; if the initial gas supply paths of the first user node and the second user node overlap, determining the overlapping section path; determining the superimposed gas supply flow of the overlapping section path and the gas supply capacity of the overlapping section path; determining whether the superimposed gas supply flow is greater than the gas supply capacity of the overlapping section path; if the superimposed gas supply flow is greater than the gas supply capacity of the overlapping section path, determining the remaining gas supply capacity of the overlapping section path; the remaining gas supply capacity is the gas supply capacity that can be provided for the second user node on the premise that the overlapping section path meets the gas demand of the first user node; based on the remaining gas supply capacity and the gas demand of the second user node, determining the remaining gas demand of the second user node; the remaining gas demand is the difference between the gas demand of the second user node and the remaining gas supply capacity; based on the remaining gas demand of the second user node, exploring in the topological structure diagram in the order of increasing node layer distance to determine the target gas supply path of the second user node.

[0010] A method for modeling a natural gas pipeline network system provided by the present invention, after determining the initial gas supply path of each user node from each gas supply path set based on each gas transmission cost set, further includes: determining a first user node and a second user node; the first user node is any user node in the topological structure diagram, and the second user node is a user node other than the first user node in the topological structure diagram; determining whether the gas source nodes corresponding to the first user node and the second user node are the same; if the gas source nodes corresponding to the first user node and the second user node are the same, taking the gas source nodes corresponding to the first user node and the second user node as the initial gas source nodes; determining the total gas demand of the first user node and the second user node; determining whether the gas supply capacity of the initial gas source node is greater than or equal to the total gas demand; if the gas supply capacity of the initial gas source node is less than the total gas demand, determining the remaining gas demand of the second user node; the remaining gas demand is the difference between the total gas demand and the gas supply capacity of the initial gas source node on the premise that the initial gas source node meets the gas demand of the first user node; based on the remaining gas demand of the second user node, exploring in the topological structure diagram in the order of increasing node layer distance to determine the target gas supply path of the second user node.

[0011] According to a method for modeling a natural gas pipeline network system provided by the present invention, after determining the initial gas supply path of each user node from each gas supply path set based on each gas transmission cost set, it further includes: if a node in the initial gas supply path or an edge in the initial gas supply path is disturbed, then taking the initial gas supply path as an affected path; determining the affected user nodes corresponding to the affected path, and determining an alternative gas supply path from the gas supply path sets corresponding to the affected user nodes; wherein, the alternative gas supply path is the gas supply path with the minimum gas transmission cost in the gas supply path sets corresponding to the affected user nodes except the affected path.

[0012] According to a method for modeling a natural gas pipeline network system provided by the present invention, after determining the topological structure diagram of the natural gas pipeline network system, it further includes: if a node in the topological structure diagram or an edge in the topological structure diagram is disturbed, then determining the disturbance weight layer of the natural gas pipeline network system after the disturbance; based on the disturbance weight layer, performing network modeling on the natural gas pipeline network system after the disturbance to determine the topological structure diagram of the natural gas pipeline network system after the disturbance; comparing the topological structure diagram with the topological structure diagram after the disturbance to determine the disturbance area.

[0013] The present invention also provides a device for modeling a natural gas pipeline network system, including: a first determination sub-module, configured to respectively determine a point set and an edge set based on the pipelines of the natural gas pipeline network system and the connection points of the natural gas pipeline network system; the point set includes multiple nodes, the edge set includes multiple edges, one node is used to represent one connection point, and one edge is used to represent one pipeline; a second determination sub-module, configured to determine the weight layer of the natural gas pipeline network system based on the parameter information of the pipelines and the parameter information of the connection points; the weight layer is used to represent the parameters of each node and the parameters of each edge; a network modeling sub-module, configured to perform network modeling on the natural gas pipeline network system based on the point set, the edge set, and the weight layer to determine the topological structure diagram of the natural gas pipeline network system.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, it implements any one of the above-mentioned methods for modeling a natural gas pipeline network system.

[0015] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements any one of the above-mentioned methods for modeling a natural gas pipeline network system.

[0016] The natural gas pipeline network system modeling method, device, equipment and storage medium provided by the present invention introduce the theory in classical network science to perform network modeling on the natural gas pipeline network system. First, a point set and an edge set are respectively determined according to the pipelines and connection points of the natural gas pipeline network system. Then, based on the parameter information of the pipelines and the parameter information of the connection points, a weight layer of the natural gas pipeline network system is determined. And based on the point set, edge set and weight layer, network modeling is performed on the natural gas pipeline network system to determine the topological structure diagram of the natural gas pipeline network system, realizing the application of complex network theory in the natural gas pipeline network system, realizing the improvement and migration of network science theory to the research on the resilience of the natural gas pipeline network system, and being beneficial to promoting the research on the resilience of the natural gas pipeline network system. Description of the Drawings

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 It is one of the schematic flowcharts of the natural gas pipeline network system modeling method provided by the present invention.

[0019] Figure 2 It is the second schematic flowchart of the natural gas pipeline network system modeling method provided by the present invention.

[0020] Figure 3 It is the schematic diagram of pipeline modeling in the natural gas pipeline network system provided by the present invention.

[0021] Figure 4 It is the schematic diagram of the degree in the topological structure of the natural gas pipeline network system provided by the present invention.

[0022] Figure 5 It is the schematic diagram of the node layer distance provided by the present invention.

[0023] Figure 6 It is the schematic diagram of the natural gas pipeline capacity range provided by the present invention.

[0024] Figure 7 It is the schematic diagram of the weight layer of the natural gas pipeline network system provided by the present invention.

[0025] Figure 8 It is the schematic diagram of the mathematical expression of the topological structure diagram provided by the present invention.

[0026] Figure 9 It is the schematic diagram of the limitations of the maximum flow algorithm provided by the present invention.

[0027] Figure 10It is a schematic diagram of the exploration of the performance flow calculation path provided by the present invention.

[0028] Figure 11 It is a schematic diagram of the characterization of the gas supply path provided by the present invention.

[0029] Figure 12 It is a schematic diagram of the coincidence of the gas supply paths provided by the present invention.

[0030] Figure 13 It is a schematic diagram of the coincidence of the gas source nodes provided by the present invention.

[0031] Figure 14 It is a schematic diagram of the combination of the super source point and the super sink point with the performance flow algorithm provided by the present invention.

[0032] Figure 15 It is a schematic structural diagram of the natural gas pipeline network system modeling device provided by the present invention.

[0033] Figure 16 It is a schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners

[0034] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0035] Please refer to Figure 1 , Figure 1 It is one of the schematic flowcharts of the natural gas pipeline network system modeling method provided by the present invention. In this embodiment, the natural gas pipeline network system modeling method includes steps S110 to S130, and the specific steps are as follows: S110: Based on the pipelines of the natural gas pipeline network system and the connection points of the natural gas pipeline network system, determine the point set and the edge set respectively.

[0036] The point set includes multiple nodes, and the edge set includes multiple edges. One node is used to represent one connection point, and one edge is used to represent one pipeline.

[0037] S120: Based on the parameter information of the pipelines and the parameter information of the connection points, determine the weight layer of the natural gas pipeline network system.

[0038] The weight layer is used to represent the parameters of each node and the parameters of each edge.

[0039] S130: Based on the point set, the edge set and the weight layer, perform network modeling on the natural gas pipeline network system to determine the topological structure diagram of the natural gas pipeline network system.

[0040] Please refer to Figure 2 , Figure 2 which is the second flow schematic diagram of the method for modeling a natural gas pipeline network system provided by the present invention.

[0041] As Figure 2 shown, in order to realize network modeling for the resilience of a natural gas pipeline network system, after sorting out the complex network theory system, based on the research goal of the gas supply resilience of the natural gas pipeline network system, partial network theories and algorithms are improved and migrated to the research on the gas supply resilience of the natural gas pipeline network system. Some theories in classical network science provide method support and improvement basis for the network modeling of the resilience of the natural gas pipeline network system.

[0042] After determining the migrated network theory, it is necessary to perform network characterization on the natural gas pipeline network system.

[0043] Specifically, based on the pipelines and connection points of the natural gas pipeline network system, a point set and an edge set can be determined respectively, and the natural gas pipeline network system can be network-characterized according to the properties of an undirected graph: in graph theory (one of the complex network theories), the definition of a "graph" is essentially to represent, explain, and solve the research object in the form of a network. For the natural gas pipeline network system, its topological structure is composed of actual pipelines and connection points. Assuming that the natural gas pipeline network system is an undirected graph, according to the definition and representation method of an undirected graph, an undirected graph G is a connected structure composed of a non-empty point set V and an edge set E according to a certain corresponding relationship, denoted as G=(V, E, W).

[0044] Among them, the non-empty set V={v1, v2, …, vn} is the node (vertex) set of the undirected graph G. In this embodiment, the point set includes multiple nodes, and one node is used to represent a connection point in the actual natural gas pipeline network system; the edge set E={e1,e2, …, en} is the edge set of the undirected graph G. In this embodiment, the edge set includes multiple edges, and one edge is used to represent a pipeline in the actual natural gas pipeline network system; W is the weight set of the point set V and the edge set E.

[0045] It should be noted that according to the topological structure of the actual natural gas pipeline network system, the connection point types can be divided into geometric connection points and functional connection points: geometric connection points are connection points that only change the direction or are used for connection, corresponding to the connection points between pipe segments or pipelines in the actual natural gas pipeline network system. Such connection points only have a connection function, and the natural gas does not change the flow parameters (except the flow direction) when flowing through such connection points; functional connection points correspond to compressor stations or valve chambers in the actual natural gas pipeline network system. Different from geometric connection points, the natural gas will change the flow parameters when flowing through functional connection points.

[0046] The differences between geometric joints and functional joints also include different failure mechanisms: the failure mechanism of geometric joints is similar to that of pipelines, while the failure type and process of functional joints are determined according to the types of equipment they include.

[0047] The edge set E = {e1, e2, …, en} is the edge set of the undirected graph G, and the elements in the edge set E are the edges of the topological structure of the natural gas pipeline network system, corresponding to the pipelines in the actual natural gas pipeline network system.

[0048] Please refer to Figure 3 , Figure 3 which is a schematic diagram of pipeline modeling in the natural gas pipeline network system provided by the present invention.

[0049] It can be understood that in the process of network modeling, the selection of nodes and edges needs to be determined according to the scale and scope of the natural gas pipeline network system under study.

[0050] For example Figure 3 as shown, assuming that network modeling needs to be carried out for a large-scale long-distance natural gas pipeline network system, the edges that need to be considered at this time are mainly the main natural gas pipelines, and the branch pipelines are not considered. At this time, the modeling of the pipeline is as shown in the green box in Figure 3 ; for the continuously connected main pipelines, when abstracting the topological structure, some geometric joints can be simplified, and only functional joints are considered. At this time, the modeling of the pipeline is as shown in the red box in Figure 3 ; in addition, for the curved edges in the topological structure, they can be simplified into straight edges of equal length. Since the research on the toughness of the natural gas pipeline network system needs to be based on the gas supply angle, and the shape of the edge does not change the specific connection relationship and supply-demand relationship, straight edges are adopted in the modeling of the natural gas pipeline network system, as shown in the blue box in Figure 3 .

[0051] It can be understood that in addition to the topological structure, in the study of toughness, the natural gas pipeline network system also needs to calculate its failure probability based on pipeline structure parameters, equipment structure parameters, etc., and evaluate the gas supply performance of the natural gas pipeline network system based on the gas source supply volume and user demand volume. Therefore, it is not enough to represent the natural gas pipeline network system only by an undirected graph. At this time, in order to better represent the natural gas pipeline network system, on the basis of the undirected graph, further characterization can be carried out based on the properties of the weighted graph.

[0052] In graph theory, assuming that each edge e of the undirected graph G = (V, E) is attached with a real number w(e), then the undirected graph G is called a weighted graph, and the real number w(e) is the weight of the edge e. The weight in the weighted graph is an extension of the information of the graph G = (V, E).

[0053] Based on this, the parameter information of the pipeline and the parameter information of the connection points, such as structural parameters, equipment parameters, supply and demand parameters, etc., can be stored in the form of weights to form the weight layer of the natural gas pipeline network system. At this time, the mathematical expression of the weighted graph of the natural gas pipeline network system is G=(V, E, W).

[0054] In traditional graph theory or complex network theory, the weight of a graph is usually characterized by a weight matrix composed of real number elements. As a complex large-scale industrial system, the traditional weight form cannot fully meet the needs of its gas supply resilience research. For example, the failure probability distribution caused by corrosion of natural gas pipelines cannot be characterized by a single real number, and the probability distribution forms corresponding to different failure mechanisms are also different. Based on the above factors, it is necessary to propose the concept of another weight layer to realize the dynamic storage of different types of parameters.

[0055] Please refer to Figure 4 and Figure 5 , Figure 4 which is the schematic diagram of the degree in the topological structure of the natural gas pipeline network system provided by the present invention, Figure 5 and

[0056]

[0057] Based on the above description of the topological structure representation of the natural gas pipeline network system and combined with the research requirements of the gas supply resilience of the natural gas pipeline network system, in this embodiment, the following concepts are proposed: In addition to concepts such as graph, edge, node, and weight, the edge in traditional network theory is also called an arc. Since the nodes in the theory are all connected by straight edges, the concept of edge is uniformly adopted.(1)Degree: In an undirected graph, the number of edges associated with a point v is defined as the degree of node v. In the constructed network theory, the degree can be divided into direct degree, adjacency degree, and system degree, as shown in Figure 4 .

[0058] (2)The calculation formula of the direct degree is as follows: ; wherein, is the number of pipelines directly connected to the i-th node; is the connection matrix term. When the i-th node is directly connected to the j-th node, , otherwise ; is the direct degree of the i-th node.

[0059] (3)The calculation formula of the adjacency degree is as follows: ; wherein, is the number of pipelines connected to the directly connected points of the i-th node, and does not include the pipelines and failed pipelines in the direct degree.

[0060] (4) The calculation formula for the system degree is as follows: ; In the formula, is the direct degree of the i-th node in the topological structure; is the number of pipelines connected to the adjacent nodes of the i-th node in the topological structure, excluding the number of directly connected pipelines that have been calculated, and regardless of whether the pipeline fails.

[0061] For the edge in the graph G=(V, E), it is considered that the nodes and the node are associated with the edge In an undirected graph, the associated points of the same edge are represented as unordered, that is, This connection relationship is also called that the node and the node are directly connected; if a node is connected to another node through other nodes, it is called indirectly connected.

[0062] Node layer distance That is, the minimum number of edges connected between nodes. As shown in Figure 5 , the node layer distance between a node and itself is 0; Figure 5 shows the case where there are multiple paths to reach the target node, then the node layer distance is the minimum number of edges. The concept of node layer distance simplifies the definitions and mathematical expressions of direct degree, adjacency degree, and system degree. For example, the direct degree of a node can be defined as the number of points connected to this node and with a node layer distance of 1. The proposed node layer distance reshapes the representation of the topological structure of the natural gas pipeline network system, ensures the orderliness of the subsequent gas supply path search direction and the gas transmission direction, improves the calculation efficiency of the algorithm, and reduces the complexity of the algorithm.

[0063] In the point set V, if there exists a node such that this point has only outgoing edges, it is called a source point (also called a sending point).

[0064] In the point set V, if there exists a node such that this point has only incoming edges, it is called a sink point (also called a receiving point).

[0065] In this embodiment, the gas source node is regarded as the source point, the user node is regarded as the sink point, and except for the source point and the sink point, the remaining nodes are called intermediate nodes.

[0066] For an edge , there exists , then (or denoted as or ) is called the edge Capacity. Corresponding to the edges in the actual natural gas pipeline network system, the capacity in this embodiment can be understood as the pressure range and the corresponding flow rate range that the natural gas pipeline (i.e., the pipeline) can withstand; corresponding to the nodes in the actual natural gas pipeline network system, the capacity can correspond to the operating characteristic range of equipment such as compressors. Since there are various definitions of pressure and flow rate thresholds for pipelines, there will be various capacity ranges, and the appropriate capacity range should be determined according to the actual situation.

[0067] Please refer to Figure 6 , Figure 6 which is a schematic diagram of the natural gas pipeline capacity range provided by the present invention.

[0068] As Figure 6 shown, for a natural gas pipeline, its capacity range has an upper limit and a lower limit. Figure 6 The red line above is the upper limit of the high-pressure warning for this natural gas pipeline. Figure 6 The red line below is the lower limit of the high-pressure warning for this natural gas pipeline; similarly, Figure 6 The blue line above is the upper limit of the target control area for this natural gas pipeline. Figure 6 The blue line below is the lower limit of the target control area for this natural gas pipeline. Figure 6 The yellow line above is the upper limit of the low-pressure warning for this natural gas pipeline. Figure 6 The yellow line below is the lower limit of the low-pressure warning for this natural gas pipeline.

[0069] A function defined on the edge set E , called the flow on edge . Corresponding to the actual natural gas pipeline network system, the flow in graph G is the gas transmission flow rate.

[0070] If the flow on the network satisfies the following conditions, then the flow is called a feasible flow: (1) For each arc , it satisfies ; (2) For intermediate nodes, it satisfies ; (3) For the source node , it satisfies ; (4) For the sink node , it satisfies .

[0071] For the actual natural gas pipeline network system, the above definition of feasible flow needs to be based on the premise that there is no low-pressure pipeline gas distribution and self-use gas at each intermediate node, that is, all natural gas is input from the source node and output from the sink node of the natural gas pipeline network system. Given a feasible flow , when the feasible flow The passing edge satisfies , then this edge is called a saturated edge; if , then this edge is called an unsaturated edge; if , then this edge is called a zero-flow edge; if , then this edge is called a non-zero-flow edge.

[0072] After having the above concepts and definitions, the calculation and analysis of the network topology structure can be carried out. However, when it comes to the calculation and analysis of the topology structure of the natural gas pipeline network system, the graph G=(V, E, W) only realizes the mathematical expression of the natural gas pipeline network system, but does not correspond the information to the specified position. Therefore, it is also necessary to realize the mathematical expression of the information subordination relationship.

[0073] Specifically, the connection matrix in traditional graph theory is used to characterize the connection relationship of each node in the natural gas pipeline network system. The connection matrix is defined as , and satisfies the following formula: ; In the formula, the rows and columns of the connection matrix respectively correspond to the node numbers of the graph G of the natural gas pipeline network system. For example, the 1st row and 1st column represent the 1st node itself, the 2nd row and 2nd column represent the 2nd node itself, and the 1st row and 2nd column represent the connection relationship between the 1st node and the 2nd node.

[0074] Since the transportation of natural gas makes the natural gas flow in the natural gas pipeline network system directional, the following factors need to be considered: (1) The natural gas pipeline network system does not have directionality in terms of topology structure, but only has directionality in terms of gas transmission technology; (2) For the power grid system, in the relevant research combining complex network theory, the power grid system is regarded as an undirected graph. In view of the common points between the natural gas pipeline network system and the power grid system, the topology structure of the natural gas pipeline network system does not have directionality; (3) In traditional complex network theory, some basic properties of undirected graphs and directed graphs are different. The migration from traditional network theory to this field requires further verification of whether the relevant properties of directed networks are applicable to the natural gas pipeline network system. Therefore, for the research on the gas supply resilience of the natural gas pipeline network system, the mathematical expression of an undirected graph is more convenient than that of a directed graph. Based on the above considerations, the topology structure of the natural gas pipeline network system is defined as an undirected graph, and the flow direction weight is used to represent the flow direction of natural gas.

[0075] The weight layer of the natural gas pipeline network system needs to be designed according to the specific research objectives and requirements. In this embodiment, the weight layer can be divided into parameter weight, economic weight, and probability weight, which are used to store and characterize various parameters of each node and each edge.

[0076] Please refer to Figure 7 , Figure 7 which is a schematic diagram of the weight layer of the natural gas pipeline network system provided by the present invention.

[0077] As shown Figure 7 in the figure, the parameter weights mainly include the structural parameter P s and the flow parameter P f ; among them, the structural parameter P s includes the pipe length P s-L of the pipeline, the wall thickness P s-W , etc., and the flow parameter P f includes the flow direction weight w d , the flow rate weight w q , the pressure weight w p , the gas transmission capacity weight w ca , etc. The above weights are stored in the form of a weight matrix. Taking the pipe length P s-L and the wall thickness P s-W as an example, their representation forms are as follows: ; ; The economic weight includes the current assets A fl corresponding to each edge and each node (i.e., the pipeline and the connection point) in the figure and the fixed assets A fi ; for the current assets A fl , it mainly consists of the gas transmission profit P t , the pipeline value ΔV p before and after being affected, and the equipment value ΔV e before and after being affected, etc.; for the fixed assets A fi , it mainly includes the pipeline value V p and the equipment value V e , etc.

[0078] The probability weight is mainly divided into a pipeline module and an equipment module. Based on the method of probability sampling to solve parameters, the probability weight of the pipeline module mainly takes parameters such as the yield stress θ of the pipeline, the pipeline wall thickness t, the operating pressure p o , the defect depth d d , the defect depth development speed v d , the defect length l d , the defect length development speed v l and the number of defects per unit length n d as the main ones, and stores the probability distribution obtained by historical data statistics, as shown in Table 1.

[0079] Table 1

[0080] Please refer to Figure 8 , Figure 8 which is a schematic diagram of the mathematical expression of the topological structure diagram provided by the present invention.

[0081] After determining the point set, edge set, and weight layer of the natural gas pipeline network system, based on the point set, edge set, and weight layer of the natural gas pipeline network system, network modeling of the natural gas pipeline network system can be completed, and the topological structure diagram of the natural gas pipeline network system can be determined. The mathematical expression of the topological structure diagram is as Figure 8 shown.

[0082] The method for modeling the natural gas pipeline network system provided in this embodiment introduces the theory in classical network science to perform network modeling on the natural gas pipeline network system. First, the point set and edge set are determined according to the pipelines and connection points of the natural gas pipeline network system respectively. Then, based on the parameter information of the pipelines and the parameter information of the connection points, the weight layer of the natural gas pipeline network system is determined, and based on the point set, edge set, and weight layer, network modeling of the natural gas pipeline network system is performed to determine the topological structure diagram of the natural gas pipeline network system, realizing the application of complex network theory in the natural gas pipeline network system, realizing the improvement and migration of network science theory to the research on the resilience of the natural gas pipeline network system, and being conducive to promoting the research on the resilience of the natural gas pipeline network system.

[0083] In some embodiments, the weight layer includes parameter weight, economic weight, and probability weight; among them, the parameter weight is determined based on structural parameters and flow parameters. The structural parameters include the pipe length and wall thickness of the pipeline, and the flow parameters include the flow direction weight, flow rate weight, pressure weight, and gas transmission capacity weight of the pipeline; the economic weight is determined based on the current assets of the pipeline and connection points, as well as the fixed assets of the pipeline and connection points; the probability weight is determined based on the pipeline probability weight and equipment probability weight. The pipeline probability weight is determined based on the yield stress, pipe wall thickness, operating pressure, defect depth, defect depth development speed, defect length, defect length development speed, and number of defects per unit length of the pipeline.

[0084] Please continue to refer to Figure 7 , in this embodiment, the parameter weight mainly includes structural parameter P s and flow parameter P f ; among them, structural parameter P s includes the pipe length P s-L , wall thickness P s-W , etc., and flow parameter P f includes the flow direction weight w d , flow rate weight w q , pressure weight w p , gas transmission capacity weight w ca , etc.

[0085] The economic weight includes the current assets A fl corresponding to each edge and each node (i.e., pipelines and connection points) in the figure and the fixed assets A fi ; for the current assets A fl , it is mainly composed of the gas transmission profit Pt The pipeline value ΔV before and after being affected p and the equipment value ΔV before and after being affected e and so on; for fixed asset A fi mainly includes the pipeline value V p and the equipment value V e and so on.

[0086] The probability weights are mainly divided into a pipeline module and an equipment module. Based on the method of probability sampling to solve parameters, the probability weights of the pipeline module mainly take parameters such as the yield stress θ of the pipeline, the pipeline wall thickness t, the operating pressure p o , the defect depth d d , the defect depth development speed v d , the defect length l d , the defect length development speed v l and the number of defects per unit length n d and so on as the main ones, and store the probability distribution obtained from historical data statistics.

[0087] In some embodiments, the topological structure diagram includes at least one user node, at least one gas source node, multiple intermediate nodes, and multiple edges; after determining the topological structure diagram of the natural gas pipeline network system, it further includes: based on the gas consumption demand of each user node and the gas supply capacity of each edge, exploring in the increasing order of node layer distance, and determining the gas source node corresponding to each user node, the set of gas supply paths corresponding to each user node, and the set of gas transmission costs corresponding to each user node in the topological structure diagram; the set of gas supply paths includes multiple gas supply paths between a user node and the corresponding gas source node, and the set of gas transmission costs includes the gas transmission costs corresponding to each gas supply path; based on each set of gas transmission costs, determine the initial gas supply path for each user node from each set of gas supply paths; the initial gas supply path is the gas supply path with the minimum gas transmission cost.

[0088] Currently, some research on the reliability and resilience of natural gas supply mainly calculates the gas transmission capacity and gas transmission volume of the natural gas pipeline network system according to network theory, and the common algorithms are the maximum flow algorithm and the shortest path algorithm.

[0089] Among them, when calculating the gas transmission volume in the natural gas pipeline network system, the maximum flow algorithm can quickly solve the flow in the natural gas pipeline network system, and the calculation formula of the maximum flow algorithm is as follows: ; Please refer to Figure 9 , Figure 9 which is a schematic diagram of the limitations of the maximum flow algorithm provided by the present invention.

[0090] Such as Figure 9As shown, the basic theory of the maximum flow algorithm is the Maximum flow-minimum cut theorem, that is, in the network flow, at least one edge in the path reaches the maximum value of its feasible flow or capacity. However, there is a deviation from the actual engineering situation: when a node or an edge in the network encounters a disturbance, the gas supply path will be reallocated. At this time, it may overlap with other gas supply paths. Therefore, the flows of the overlapping path segments will be superimposed. When using the traditional maximum flow algorithm, this edge may already be in the "full flow" state. Therefore, when the path is reallocated, the "full flow" edge will not participate, which will lead to the "distortion" phenomenon in the gas supply calculation before and after the disturbance occurs in the traditional network flow algorithm. In addition, the traditional algorithm still uses the representation form of "single source and single sink", but in the actual natural gas pipeline network system, there may be multiple gas source nodes and user nodes. Although the concepts of "super source point" and "super sink point" can be introduced at the present stage to solve this problem, such methods still need to update the gas consumption demand of user nodes and the gas supply capacity of gas source nodes in real time, thus increasing the complexity of the solution.

[0091] Due to the limitations of the existing technology, this embodiment proposes a performance flow algorithm for the research on the gas supply resilience of the natural gas pipeline network system. The performance flow algorithm can explore according to the gas consumption demand of each user node and the gas supply capacity of each edge in the topological structure diagram in the order of increasing node layer distance, so as to determine the gas source node corresponding to each user node, the set of gas supply paths corresponding to each user node, and the set of gas transmission costs corresponding to each user node in the topological structure diagram, and determine the initial gas supply path of each user node from each set of gas supply paths according to each set of gas transmission costs, completing the search and comparison of all users and their corresponding gas sources and gas supply paths.

[0092] Please refer to Figure 10 and Figure 11 , Figure 10 which are the schematic diagrams of the path exploration of the performance flow algorithm provided by the present invention, Figure 11 and which are the schematic diagrams of the gas supply path representation provided by the present invention.

[0093] Specifically, as Figure 10 shown, the implementation steps of the performance flow algorithm are as follows: S1: Number all user nodes to obtain the user node set U = {U1, ……, U n}, where U1 to U n respectively represent the 1st user node to the nth user node; starting from the initial user U1 (i.e., the 1st user node), search for the nodes with a node layer distance of 1 (i.e., =1) from it, number the nodes with a node layer distance of 1 from it, and obtain the node set V Lk=1 ={v1 1 ,……, v1 n}.

[0094] The above parameter information can be stored in the parameter weight layer, and its corresponding mathematical expression is as follows: ; Among them, the above formula satisfies the following conditions: ; S2: Select a point v1 Lk=1 from the node set V 1 , and use the gas demand Dem U1 of the user node U1 as the value of the initial performance flow and assign it to the edge . At the same time, compare the gas demand Dem U1 of the user node U1 with the gas supply capacity of the edge ; if the gas supply capacity of the edge can meet the gas demand of the user node U1, then the performance flow of the edge is the gas demand Dem U1 of the user node U1; if the gas supply capacity of the edge cannot meet the gas demand of the user node U1, then the performance flow of the edge is the gas supply capacity of the edge , and the corresponding mathematical expression is as follows: .

[0095] S3: Starting from the node v1 1 , search for the nodes directly connected to it and with a node layer distance of 2 ( =2) from the user node U1, store these nodes and number them to obtain the node set V Lk=2 ={v2 1 , ……, v2 n}, and perform the discrimination and assignment of S2 on the corresponding edges and nodes. Repeat the above steps until the node set V Lk=k ={v n 1 , ……, v k n} is found, find the gas source node corresponding to the user node U1, and determine the gas supply path corresponding to the user node U1.

[0096] As Figure 11 shown, assuming that the finally found gas source node corresponding to the user node U1 is S1, then the gas supply path corresponding to the user node U1 can be expressed as r U11 = U1 - v1 1 - v2 3 … - v k n - S1, the corresponding mathematical expression is as follows: ; .

[0097] S4: Read the corresponding weights of the above gas supply path, extract the lengths of each edge in the gas supply path and the unit gas transmission cost , and calculate the gas transmission cost corresponding to this gas supply path.

[0098] Gas supply path U1 - v1 1 - v2 3 … - v k n - S1, the corresponding gas transmission cost is: .

[0099] S5: Continue to search for other possible gas supply paths of user node U1 using the above steps, and store them in the set r of gas supply paths corresponding to user node U1 in the parameter weight layer U1 ={r U1 i}; Store all the gas supply paths in the gas supply path set and their corresponding gas transmission costs in the gas transmission cost set C corresponding to user node U1 U1 ={C U1 k}; Compare the k gas supply paths in the gas transmission cost set C corresponding to user node U1, and select the minimum value C in the gas transmission cost set C U1 while meeting the gas demand of user node U1 U1 , and take the gas supply path corresponding to the minimum gas transmission cost C U1 i as the initial gas supply path of user node U1. U1 i Ui

[0100] S6: Search for and determine the gas supply paths of other user nodes using the method in S5, and store the gas supply paths of each user node in the corresponding set r Ui ={U i -… - S k}, and obtain the initial gas supply path of each user node.

[0101] In some embodiments, after determining the initial gas supply path of each user node from each gas supply path set based on each gas transmission cost set, the method further includes: determining a first user node and a second user node; the first user node is any user node in the topological structure diagram, and the second user node is a user node other than the first user node in the topological structure diagram; determining whether the initial gas supply paths of the first user node and the second user node overlap; if the initial gas supply paths of the first user node and the second user node overlap, determining the overlapping section path; determining the superimposed gas supply flow of the overlapping section path and the gas supply capacity of the overlapping section path; determining whether the superimposed gas supply flow is greater than the gas supply capacity of the overlapping section path; if the superimposed gas supply flow is greater than the gas supply capacity of the overlapping section path, determining the remaining gas supply capacity of the overlapping section path; the remaining gas supply capacity is the gas supply capacity that can be provided for the second user node on the premise that the overlapping section path meets the gas demand of the first user node; determining the remaining gas demand of the second user node based on the remaining gas supply capacity and the gas demand of the second user node; the remaining gas demand is the difference between the gas demand of the second user node and the remaining gas supply capacity; based on the remaining gas demand of the second user node, exploring in the increasing order of the node layer distance to determine the target gas supply path of the second user node in the topological structure diagram.

[0102] Please refer to Figure 12 and Figure 13 , Figure 12 which is a schematic diagram of the coincidence of gas supply paths provided by the present invention, Figure 13 and

[0103] As Figure 12 and Figure 13 shown, for step S6 of the performance flow algorithm, there may be two situations where path exploration needs to be performed again: one is that path exploration needs to be performed again due to the coincidence of gas supply paths, and the other is that path exploration needs to be performed again due to the coincidence of gas source nodes.

[0104] Figure 12 shows the situation of the coincidence of gas supply paths: if the initial gas supply path of a certain user node (i.e., the first user node) coincides with the initial gas supply paths of other user nodes (i.e., the second user node), assuming the overlapping section path is edge , at this time, it is necessary to determine whether the flow superposition caused by the path coincidence (i.e., the superimposed gas supply flow of the first user node and the second user node in the overlapping section path) is greater than the capacity of the overlapping section path ; if it is within the capacity range (i.e., the superimposed gas supply flow is less than or equal to the gas supply capacity of the overlapping section path), then the overlapping section path ; The flow rate is the superposition of the flow rates of the two gas supply paths in this section; if it exceeds the capacity of the overlapping section path of (that is, the superimposed gas supply flow rate is greater than the gas supply capacity of the overlapping section path), then first make full use of the capacity of the overlapping section path to make it full-flow, and then repeat steps S1 to S6 of the performance flow algorithm to search for min(C in the remaining paths, and assign the flow rate other than the capacity of the overlapping section path U1 i ) to this path. of except

[0105] The above algorithm principle follows the principle of preferentially transporting gas in the overlapping section (initial gas supply path), and does not directly reselect another gas supply path when the paths overlap. This is because preferentially transporting gas in the overlapping section can ensure the lowest overall gas transportation cost, which is proved as follows: According to the algorithm logic of steps S2 to S5 of the performance flow algorithm, the existing overlapping section path is the minimum-cost gas supply path for the user node U2, that is, it satisfies the following formula: ; Assume that in the overlapping section path , the increased flow rate due to the gas supply plan of the user node U2 is x, then the flow rate that needs to be shared by other routes (that is, the target gas supply path) except the overlapping section path is (U2 - x), then there is: ; Furthermore, it can be obtained: ; Therefore, it can be proved that when the gas supply paths obtained by searching different user nodes overlap, the scheme of preferentially transporting gas in the overlapping section should be followed to reduce the gas supply cost.

[0106] As Figure 12 shown, when the superimposed flow rate caused by path overlap exceeds the capacity of the overlapping section path of , the "full-flow" gas transportation should be assigned to S1-U1 or S2-U2.

[0107] Optionally, when there is a difference in gas supply priority between the user node U1 and the user node U2, the "full-flow" gas transportation is assigned to the user node with the higher priority; when the gas supply priorities of the user node U1 and the user node U 2的 are equal, then the gas transportation cost is used as the judgment basis.

[0108] In some embodiments, after determining the initial gas supply path of each user node from each gas supply path set based on each gas transmission cost set, the method further includes: determining a first user node and a second user node; the first user node is any user node in the topological structure diagram, and the second user node is a user node in the topological structure diagram other than the first user node; determining whether the gas source nodes corresponding to the first user node and the second user node are the same; if the gas source nodes corresponding to the first user node and the second user node are the same, then using the gas source nodes corresponding to the first user node and the second user node as the initial gas source nodes; determining the total gas consumption demand of the first user node and the second user node; determining whether the gas supply capacity of the initial gas source node is greater than or equal to the total gas consumption demand; if the gas supply capacity of the initial gas source node is less than the total gas consumption demand, then determining the remaining gas consumption demand of the second user node; the remaining gas consumption demand is the difference between the total gas consumption demand and the gas supply capacity of the initial gas source node on the premise that the initial gas source node satisfies the gas consumption demand of the first user node; based on the remaining gas consumption demand of the second user node, exploring in the increasing order of node layer distance to determine the target gas supply path of the second user node in the topological structure diagram.

[0109] Figure 13 The situation where the gas source nodes coincide is shown: If the initial gas source nodes of a user node (i.e., the first user node) and other user nodes (i.e., the second user node) coincide (i.e., the gas source nodes are the same), assuming that the initial gas source nodes of user node U1 (the first user node) and user node U2 (the second user node) are both S1, due to the increase in the number of user nodes to be supplied, the initial gas source node S1 needs to increase the gas supply volume. At this time, it is necessary to check whether the total gas consumption demand of U1 and U2 exceeds the supply capacity of the initial gas source node S1 (i.e., determining whether the gas supply capacity of the initial gas source node is greater than or equal to the total gas consumption demand). If the total gas consumption demand of U1 and U2 is within the supply capacity of the initial gas source node S1, then the initial gas source node S1 supplies gas to U1 and U2 normally; if the gas supply capacity of the initial gas source node S1 is less than the total gas consumption demand, then the initial gas source node S1 is preferentially used to achieve full gas supply to maximize the use of the gas supply capacity of the initial gas source node S1, and then other gas source nodes are used for gas supply.

[0110] The above algorithm principle follows the principle of preferentially transmitting gas from the repeated gas sources (initial gas source nodes), and does not directly re-select another gas source node when the gas sources coincide. This is because preferentially transmitting gas from the repeated gas sources can ensure the lowest overall gas transmission cost, as proved below: According to the algorithm logic of steps S2 to S5 of the performance flow algorithm, there is currently a coincident gas source node S1, which is the minimum-cost gas supply node for user node U1 and user node U2, that is, satisfying the following formula: ; Assume that for the gas source node S1, the increased gas supply volume due to the introduction of the gas supply plan for the user node U2 is x, and the gas supply volume to be shared by the gas source nodes other than the gas source node S1 is y. Then we have U2 = x + y, and thus: ; Therefore, it can be proved that when the gas source nodes searched by different user nodes overlap, the gas transmission plan with the repeated gas source being given priority should be followed to reduce the gas supply cost.

[0111] In some embodiments, after determining the initial gas supply path for each user node from each gas supply path set based on each gas transmission cost set, it further includes: if a node in the initial gas supply path or an edge in the initial gas supply path is disturbed, then the initial gas supply path is taken as the affected path; determining the affected user nodes corresponding to the affected path, and determining an alternative gas supply path from the gas supply path set corresponding to the affected user nodes; where the alternative gas supply path is the gas supply path with the minimum gas transmission cost among the gas supply path set corresponding to the affected user nodes except the affected path.

[0112] Furthermore, the implementation steps of the performance flow algorithm further include: S7: Through steps S1 to S6, the search and comparison of all user nodes and their corresponding gas source nodes and gas supply paths are realized in the order of numbers, and then the solution method for the performance flow of the natural gas pipeline network system and its corresponding path aiming to ensure user gas supply is determined.

[0113] S8: When a certain edge (i.e., pipeline) or a node is disturbed, the gas supply path passing through the disturbed location will be affected. At this time, this gas supply path is taken as the affected path; since the algorithm needs to prioritize user gas supply, after the disturbance affects the gas supply path, the performance flow in the affected path will be distributed to other gas supply paths, that is, alternative gas supply paths. The search method for alternative gas supply paths is: among the path information r U1 ={r U1 i} searched and stored in the parameter weight layer in the early stage, excluding the gas supply paths passing through the pipeline or the node , search for min(C U1 i ) in the remaining paths, and the gas supply path corresponding to the minimum gas transmission cost is the alternative gas supply path.

[0114] It can be understood that during the process of re - distributing the performance flow, the following two situations may occur: one is that the gas source node remains unchanged while the gas supply path changes; the other is that both the gas source node and the path node change. Both of the above possibilities should refer to the algorithm principle in the case of gas supply path overlap and gas source node overlap.

[0115] Please refer to Figure 14 , Figure 14 which is a schematic diagram of the combination of the super source point, super sink point and performance flow algorithm provided by the present invention.

[0116] S9-1: The algorithms presented in steps S1 to S8 are based on the user's perspective. As Figure 14 shown, when analyzing the total gas supply volume in the system from the global perspective of the natural gas pipeline network system, the concepts of "super source point" and "super sink point" can also be introduced into this algorithm, that is, a virtual total source and total sink are set up. The total source is connected to all gas source nodes, and the capacity of the connection edge with each gas source node is the maximum gas supply volume corresponding to the gas source node; the total sink is connected to all user nodes, and the capacity of the connection edge with each user node is the gas consumption demand of the user node. The lengths of the edges from the total source and total sink to each gas source node and user node are equal. It can be seen that geometrically, the total source and total sink do not exist, but the introduction of the virtual source and virtual sink converts the multi-source and multi-sink problem into a single-source and single-sink problem, simplifying the global gas supply analysis from the system perspective.

[0117] S9-2: The above steps achieve the calculation of the gas supply path, gas transmission volume and gas transmission cost of the natural gas pipeline network system. When a disturbance occurs, the resulting impact is quantified by the liquidity coefficient of the node or edge. The liquidity coefficient is represented by or , which is a real number between 0 and 1. After the disturbance occurs, the capacities of node i and edge become respectively: ; .

[0118] When quantifying the consequences of the disturbance in the natural gas pipeline network system, the gas transmission volume of the corresponding gas supply path can be recalculated. When the gas consumption demand of the user node is greater than the gas supply capacity after the disturbance, it is automatically updated to the smaller capacity, that is, the gas transmission volume of the same gas supply path is "rounded down".

[0119] S10: The gas transmission capacity of each pipeline is determined according to the maximum gas transmission capacity of the corresponding pipeline. Since the maximum gas transmission capacity is calculated from the maximum pressure bearing of the pipeline, when this algorithm meets the throughput constraint conditions, it also meets the corresponding pressure conditions. Then the gas transmission capacity of the gas supply path before the disturbance is: ; The gas transmission capacity of the gas transmission path after the disturbance is: ; Before and after the disturbance, the above two formulas satisfy the following constraint conditions: (1) Constraint conditions before the disturbance: ; (2) Constraints after disturbance: .

[0120] S11: Steps S1 to S10 are applicable to the case where there is no given correspondence between user nodes and gas source nodes. If the gas source node corresponding to the user node has been specified, or the gas supply path of the user node has been specified, then the gas supply path shall be subject to the specified scheme, and this algorithm can be used to calculate the gas transmission volume and gas transmission capacity under the specified gas supply scheme.

[0121] Based on the above performance flow algorithm, it can be known that the resilience research of the natural gas pipeline network system involves two structures. One is the physical topological structure formed after the construction of the natural gas pipeline network system, and the other is the "flow structure" formed by the flow of pipeline transported gas. The topological structure of the natural gas pipeline network system is the constraint and foundation of the flow structure, and the flow structure is the functional embodiment and disturbance consequence characterization of the natural gas pipeline network system. The essence of the performance flow algorithm is to determine the flow structure under various states based on the topological structure of the natural gas pipeline network system.

[0122] The performance flow algorithm provided in this embodiment has at least the following advantages compared with the traditional network flow or maximum flow algorithm: (1) Changing the directed network of the traditional algorithm to an undirected network and combining it with the performance flow weight, so as to better adapt to various scheduling schemes of the natural gas pipeline network system in engineering practice; (2) Using the performance flow algorithm instead of the maximum flow algorithm can avoid the "distortion" caused by path conversion due to the "full flow" state in the maximum flow algorithm and the frequent setting of weight parameters; (3) Integrating the functions of the maximum flow algorithm and the shortest path algorithm, it can be combined with the super source point and super sink point to achieve network flow calculation that takes into account both the user perspective and the global perspective.

[0123] In some embodiments, after determining the topological structure diagram of the natural gas pipeline network system, it further includes: if a node in the topological structure diagram or an edge in the topological structure diagram is disturbed, then determine the disturbance weight layer of the natural gas pipeline network system after the disturbance; based on the disturbance weight layer, perform network modeling on the natural gas pipeline network system after the disturbance to determine the topological structure diagram after the disturbance of the natural gas pipeline network system after the disturbance; compare the topological structure diagram and the topological structure diagram after the disturbance to determine the disturbance area.

[0124] As a complex large-scale industrial system, the impact of local disturbances in the natural gas pipeline network system may not be obvious from the overall perspective of the system, so it is impossible to accurately quantify the changes in the state of the natural gas pipeline network system before and after the disturbance. Based on this, it is necessary to propose the concept of the disturbance area of the natural gas pipeline network system and its division method.

[0125] The definition of the disturbance area of the natural gas pipeline network system is: when a certain node in the topological structure diagram of the natural gas pipeline network system Or edge When a disturbance occurs, the sum of the nodes and edges whose weights of all parameters such as flow rate and flow direction change is called the node Corresponding disturbance area or edge The corresponding disturbance area is denoted as .

[0126] In this embodiment, the method for determining the disturbance area is as follows: S100: The topological structure diagram of the natural gas pipeline network system after network modeling is denoted as G=(V, E, W). The nodes and edges where the disturbance occurs are respectively denoted as 、 ; Assume that the node has a disturbance. Then, the quantitative characterization of the disturbance impact is the change in the node passing rate. Assume that after the node has a disturbance, the node passing rate changes from 1.0 before the disturbance to .

[0127] S200: Using steps S1 to S8 in the performance flow algorithm, calculate the parameters such as flow distribution, gas supply path, and flow direction in the natural gas pipeline network system before and after the disturbance, determine the disturbance weight layer of the natural gas pipeline network system after the disturbance, and based on the disturbance weight layer, perform network modeling on the natural gas pipeline network system after the disturbance to determine the post-disturbance topological structure diagram of the natural gas pipeline network system. At this time, the topological structure diagram before the disturbance is denoted as G=(V, E, W), and the post-disturbance topological structure diagram is denoted as .

[0128] S300-1: Compare the topological structure diagram with the post-disturbance topological structure diagram, and compare W with . If it satisfies , then , that is, the node is within the disturbance area ; Otherwise , that is, the node is not within the disturbance area .

[0129] S300-2: Compare the topological structure diagram with the post-disturbance topological structure diagram, and compare W with . If it satisfies , then , that is, the edge is within the disturbance area ; Otherwise , that is, the edge is not within the disturbance area .

[0130] S400: According to step S300-1 and step S300-2, the disturbed area can be obtained .

[0131] S500: The algorithms presented in steps S100 to S400 are algorithms for dividing the disturbed area corresponding to the disturbance of a single node or edge. When multiple nodes or edges are disturbed, if it is necessary to analyze the impacts of the disturbances of each node or each edge on the natural gas pipeline network system respectively, the above algorithms can be used for calculation one by one based on each disturbance position to obtain the disturbed area corresponding to each disturbance position; if it is necessary to analyze the overall impact of multiple disturbance positions on the natural gas pipeline network system, the above algorithms can be used for unified calculation after the weight parameters (such as the passing rates of nodes and edges) at all disturbance positions change.

[0132] The natural gas pipeline network system modeling method provided in this embodiment transfers the research perspective of the resilience of the natural gas pipeline network system from the overall to the local, and can also better analyze the specific changes in the natural gas pipeline network system before and after the disturbance occurs; at the same time, the introduction of complex network theory and graph theory solves the problems of high computing power requirements and long time consumption in the research on the resilience of traditional water and heat calculation in complex large-scale pipeline network systems, and more conveniently and quickly realizes the relevant solution of the gas supply resilience of complex large-scale natural gas pipeline network systems.

[0133] The present invention also provides a natural gas pipeline network system modeling device. Please refer to Figure 15 , Figure 15 which is a schematic structural diagram of the natural gas pipeline network system modeling device provided by the present invention. In this embodiment, the natural gas pipeline network system modeling device includes a first determination sub-module 1510, a second determination sub-module 1520, and a network modeling sub-module 1530.

[0134] The first determination sub-module 1510 is used to respectively determine a point set and an edge set based on the pipelines of the natural gas pipeline network system and the connection points of the natural gas pipeline network system.

[0135] The point set includes multiple nodes, and the edge set includes multiple edges. One node is used to represent one connection point, and one edge is used to represent one pipeline.

[0136] The second determination sub-module 1520 is used to determine the weight layer of the natural gas pipeline network system based on the parameter information of the pipelines and the parameter information of the connection points.

[0137] The weight layer is used to represent the parameters of each node and the parameters of each edge.

[0138] The network modeling sub-module 1530 is used to perform network modeling on the natural gas pipeline network system based on the point set, the edge set, and the weight layer to determine the topological structure diagram of the natural gas pipeline network system.

[0139] In some embodiments, the weight layer includes a parameter weight, an economic weight, and a probability weight; wherein, the parameter weight is determined based on a structural parameter and a flow parameter, the structural parameter includes the pipe length of the pipeline and the wall thickness of the pipeline, and the flow parameter includes a flow direction weight, a flow rate weight, a pressure weight, and a gas transmission capacity weight of the pipeline; the economic weight is determined based on the current assets of the pipeline and the connection point, and the fixed assets of the pipeline and the connection point; the probability weight is determined based on a pipeline probability weight and an equipment probability weight, and the pipeline probability weight is determined based on the yield stress of the pipeline, the pipeline wall thickness, the operating pressure, the defect depth, the defect depth development speed, the defect length, the defect length development speed, and the number of defects per unit length.

[0140] In some embodiments, the topological structure diagram includes at least one user node, at least one gas source node, a plurality of intermediate nodes, and a plurality of edges.

[0141] The network modeling sub-module 1530 is configured to explore in an increasing order of node layer distance based on the gas consumption demand of each user node and the gas supply capacity of each edge, and determine the gas source node corresponding to each user node, the set of gas supply paths corresponding to each user node, and the set of gas transmission costs corresponding to each user node in the topological structure diagram; the set of gas supply paths includes a plurality of gas supply paths between a user node and the corresponding gas source node, and the set of gas transmission costs includes the gas transmission costs corresponding to each gas supply path; based on each set of gas transmission costs, determine the initial gas supply path of each user node from each set of gas supply paths; the initial gas supply path is the gas supply path with the minimum gas transmission cost.

[0142] In some embodiments, the network modeling sub-module 1530 is configured to determine a first user node and a second user node; the first user node is any user node in the topological structure diagram, and the second user node is a user node other than the first user node in the topological structure diagram; determine whether the initial gas supply paths of the first user node and the second user node overlap; if the initial gas supply paths of the first user node and the second user node overlap, then determine the overlapping section path; determine the superimposed gas supply flow of the overlapping section path and the gas supply capacity of the overlapping section path; determine whether the superimposed gas supply flow is greater than the gas supply capacity of the overlapping section path; if the superimposed gas supply flow is greater than the gas supply capacity of the overlapping section path, then determine the remaining gas supply capacity of the overlapping section path; the remaining gas supply capacity is the gas supply capacity that can be provided for the second user node on the premise that the overlapping section path meets the gas consumption demand of the first user node; based on the remaining gas supply capacity and the gas consumption demand of the second user node, determine the remaining gas consumption demand of the second user node; the remaining gas consumption demand is the difference between the gas consumption demand of the second user node and the remaining gas supply capacity; based on the remaining gas consumption demand of the second user node, explore in an increasing order of node layer distance, and determine the target gas supply path of the second user node in the topological structure diagram.

[0143] In some embodiments, the network modeling sub-module 1530 is configured to determine a first user node and a second user node; the first user node is any user node in the topological structure diagram, and the second user node is a user node in the topological structure diagram other than the first user node; determine whether the gas source nodes corresponding to the first user node and the second user node are the same; if the gas source nodes corresponding to the first user node and the second user node are the same, use the gas source nodes corresponding to the first user node and the second user node as the initial gas source nodes; determine the total gas consumption demand of the first user node and the second user node; determine whether the gas supply capacity of the initial gas source node is greater than or equal to the total gas consumption demand; if the gas supply capacity of the initial gas source node is less than the total gas consumption demand, determine the remaining gas consumption demand of the second user node; the remaining gas consumption demand is the difference between the total gas consumption demand and the gas supply capacity of the initial gas source node on the premise that the initial gas source node satisfies the gas consumption demand of the first user node; based on the remaining gas consumption demand of the second user node, explore in the order of increasing node layer distance to determine the target gas supply path of the second user node in the topological structure diagram.

[0144] In some embodiments, the network modeling sub-module 1530 is configured to, if a node in the initial gas supply path or an edge in the initial gas supply path is disturbed, use the initial gas supply path as the affected path; determine the affected user nodes corresponding to the affected path, and determine an alternative gas supply path from the set of gas supply paths corresponding to the affected user nodes; wherein, the alternative gas supply path is the gas supply path with the minimum gas transmission cost in the set of gas supply paths corresponding to the affected user nodes other than the affected path.

[0145] In some embodiments, the network modeling sub-module 1530 is configured to, if a node in the topological structure diagram or an edge in the topological structure diagram is disturbed, determine the disturbance weight layer of the natural gas pipeline network system after the disturbance; based on the disturbance weight layer, perform network modeling on the natural gas pipeline network system after the disturbance to determine the disturbed topological structure diagram of the natural gas pipeline network system after the disturbance; compare the topological structure diagram with the disturbed topological structure diagram to determine the disturbance area.

[0146] The present invention also provides an electronic device. Figure 16 is a schematic structural diagram of the electronic device provided by the present invention, as Figure 16As shown, the electronic device may include: a processor 1610, a communications interface 1620, a memory 1630, and a communication bus 1640. Among them, the processor 1610, the communications interface 1620, and the memory 1630 complete mutual communication through the communication bus 1640. The processor 1610 may call the logic instructions in the memory 1630 to execute the natural gas pipeline network system modeling method.

[0147] In addition, when the logic instructions in the above-mentioned memory 1630 can be implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0148] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the natural gas pipeline network system modeling method provided by the above-mentioned various methods.

[0149] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.

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

[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for modeling a natural gas pipeline network system, characterized in that Including: Based on the pipelines of the natural gas pipeline network system and the connection points of the natural gas pipeline network system, a point set and an edge set are respectively determined; the point set includes a plurality of nodes, the edge set includes a plurality of edges, one of the nodes is used to represent one of the connection points, and one of the edges is used to represent one of the pipelines; Based on the parameter information of the pipelines and the parameter information of the connection points, a weight layer of the natural gas pipeline network system is determined; the weight layer is used to represent the parameters of each of the nodes and the parameters of each of the edges; Based on the point set, the edge set and the weight layer, network modeling is performed on the natural gas pipeline network system to determine the topological structure diagram of the natural gas pipeline network system.

2. The method for modeling a natural gas pipeline network system according to claim 1, wherein The weight layer includes a parameter weight, an economic weight and a probability weight; Wherein, the parameter weight is determined based on a structural parameter and a flow parameter, the structural parameter includes the pipe length of the pipeline and the wall thickness of the pipeline, and the flow parameter includes a flow direction weight, a flow rate weight, a pressure weight and a gas transmission capacity weight of the pipeline; The economic weight is determined based on the current assets of the pipelines and the connection points, and the fixed assets of the pipelines and the connection points; The probability weight is determined based on a pipeline probability weight and a device probability weight, and the pipeline probability weight is determined based on the yield stress, pipe wall thickness, operating pressure, defect depth, defect depth development speed, defect length, defect length development speed and number of defects per unit length of the pipeline; 3. The method for modeling a natural gas pipeline network system according to claim 1, wherein The topological structure diagram includes at least one user node, at least one gas source node, a plurality of intermediate nodes and a plurality of the edges; After determining the topological structure diagram of the natural gas pipeline network system, it further includes: Based on the gas consumption demand of each of the user nodes and the gas supply capacity of each of the edges, exploration is performed in the increasing order of the node layer distance, and in the topological structure diagram, the gas source node corresponding to each of the user nodes, the gas supply path set corresponding to each of the user nodes and the gas transmission cost set corresponding to each of the user nodes are determined; the gas supply path set includes a plurality of gas supply paths between one of the user nodes and the corresponding gas source node, and the gas transmission cost set includes the gas transmission cost corresponding to each of the gas supply paths; Based on each of the gas transmission cost sets, an initial gas supply path of each of the user nodes is determined from each of the gas supply path sets; the initial gas supply path is the gas supply path with the minimum gas transmission cost.

4. The method for modeling a natural gas pipeline network system according to claim 3, wherein After determining the initial gas supply path of each of the user nodes from each of the gas supply path sets based on each of the gas transmission cost sets, it further includes: Determining a first user node and a second user node; the first user node is any one of the user nodes in the topological structure diagram, and the second user node is a user node other than the first user node in the topological structure diagram; Judging whether the initial gas supply paths of the first user node and the second user node overlap; If the initial gas supply paths of the first user node and the second user node overlap, then determine the overlapping section path; Determine the superimposed gas supply flow rate of the overlapping section path and the gas supply capacity of the overlapping section path; Judge whether the superimposed gas supply flow rate is greater than the gas supply capacity of the overlapping section path; If the superimposed gas supply flow rate is greater than the gas supply capacity of the overlapping section path, determine the remaining gas supply capacity of the overlapping section path; the remaining gas supply capacity is the gas supply capacity that can be provided for the second user node on the premise that the overlapping section path meets the gas demand of the first user node; Based on the remaining gas supply capacity and the gas demand of the second user node, determine the remaining gas demand of the second user node; the remaining gas demand is the difference between the gas demand of the second user node and the remaining gas supply capacity; Based on the remaining gas demand of the second user node, explore in the increasing order of node layer distance, and determine the target gas supply path of the second user node in the topological structure diagram.

5. The method for modeling a natural gas pipeline network system according to claim 3, characterized in that, After determining the initial gas supply path of each user node from each gas supply path set based on each gas transmission cost set, it further includes: Determine the first user node and the second user node; the first user node is any one of the user nodes in the topological structure diagram, and the second user node is the user node other than the first user node in the topological structure diagram; Judge whether the gas source nodes corresponding to the first user node and the second user node are the same; If the gas source nodes corresponding to the first user node and the second user node are the same, use the gas source nodes corresponding to the first user node and the second user node as the initial gas source nodes; Determine the total gas demand of the first user node and the second user node; Judge whether the gas supply capacity of the initial gas source node is greater than or equal to the total gas demand; If the gas supply capacity of the initial gas source node is less than the total gas demand, determine the remaining gas demand of the second user node; the remaining gas demand is the difference between the total gas demand and the gas supply capacity of the initial gas source node on the premise that the initial gas source node meets the gas demand of the first user node; Based on the remaining gas demand of the second user node, explore in the increasing order of node layer distance, and determine the target gas supply path of the second user node in the topological structure diagram.

6. The method for modeling a natural gas pipeline network system according to claim 3, wherein After determining the initial gas supply path of each user node from each gas supply path set based on each gas transmission cost set, it further includes: If a node or an edge in the initial gas supply path is disturbed, use the initial gas supply path as the affected path; Determine the affected user nodes corresponding to the affected path, and determine the standby gas supply path from the gas supply path sets corresponding to the affected user nodes; Wherein, the standby gas supply path is the gas supply path with the minimum gas transmission cost in the gas supply path sets corresponding to the affected user nodes except the affected path.

7. The method for modeling a natural gas pipeline network system according to claim 3, wherein After determining the topological structure diagram of the natural gas pipeline network system, it further includes: If a node in the topological structure diagram or an edge in the topological structure diagram is perturbed, determine the perturbation weight layer of the natural gas pipeline network system after the perturbation occurs; Based on the perturbation weight layer, perform network modeling on the natural gas pipeline network system after the perturbation occurs, and determine the perturbed topological structure diagram of the natural gas pipeline network system after the perturbation occurs; Compare the topological structure diagram with the perturbed topological structure diagram to determine the perturbed area.

8. A natural gas pipeline network system modeling device, characterized in that, Including: The first determination sub-module is used to respectively determine a point set and an edge set based on the pipelines of the natural gas pipeline network system and the connection points of the natural gas pipeline network system; the point set includes a plurality of nodes, the edge set includes a plurality of edges, one of the nodes is used to represent one of the connection points, and one of the edges is used to represent one of the pipelines; The second determination sub-module is used to determine the weight layer of the natural gas pipeline network system based on the parameter information of the pipelines and the parameter information of the connection points; the weight layer is used to represent the parameters of each of the nodes and the parameters of each of the edges; The network modeling sub-module is used to perform network modeling on the natural gas pipeline network system based on the point set, the edge set, and the weight layer, and determine the topological structure diagram of the natural gas pipeline network system.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the natural gas pipeline network system modeling method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the natural gas pipeline network system modeling method according to any one of claims 1 to 7.