Dynamic decoupling topology generation and SCADA value assignment method for gas pipeline network under integrated strategy

By mapping the valve nodes into virtual node arrays and using the pressure regulating equipment as the split point to perform topological segmentation of the gas pipeline network, the data changes caused by frequent valve switches in the gas pipeline network simulation are solved, and the simulation efficiency and calculation speed are improved.

CN118780020BActive Publication Date: 2025-01-17SHANGHAI THREE ZERO FOUR ZERO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411261391.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-01-17
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

In the simulation of gas pipeline network, the topological data changes due to frequent valve switches, which leads to the need to re-push data during each simulation calculation, which takes a long time and has a large computing resource overhead.

Method used

By mapping the valve nodes into virtual node arrays and topological segmentation is performed only with the pressure regulating device as the segmentation point, dynamic decoupling of the valve state is achieved, avoiding repeated processing of topological data before each simulation calculation.

Benefits of technology

It improves simulation computing efficiency, reduces the frequency of change of topological data, simplifies the simulation process, speeds up the multi-time SCADA assignment speed, and pre-caches the pipeline connection relationship equations to avoid reconstruction every time the calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780020B_ABST
    Figure CN118780020B_ABST
Patent Text Reader

Abstract

The present application discloses a method for generating a dynamic decoupled topology and assigning SCADA values ​​to a gas pipeline network under an integrated strategy. The present application is applied to the field of pipeline network simulation technology, constructing an undirected topological graph of a gas pipeline network, segmenting it with the pressure regulating device as the segmentation point, obtaining topological data, mapping the valve nodes in the topological data to a valve virtual node array, and serializing and saving it with the topological data as cache data; then assigning SCADA and the valve switch status at the same time to obtain boundary node assignment data and valve switch status data; performing simulation calculations based on the valve switch status data, boundary node assignment data, and topological data. In this process, by setting the valve virtual node array, the valve switch is decoupled from the topological data, and the topological data and the valve virtual node array are used as cache data, avoiding the need to process the topological data after the valve switch status changes, thereby achieving the purpose of accelerating simulation calculations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of pipeline network simulation, and in particular to a method for generating a dynamic decoupled topology of a gas pipeline network and assigning a SCADA value under an integrated strategy. Background Art

[0002] Urban natural gas pipeline network simulation is a complex technology that involves multiple disciplines, including fluid mechanics, thermodynamics, control theory, computer science, and mathematical modeling. This technology is mainly used to predict and optimize the performance of the natural gas transmission system to ensure its safe, reliable and efficient operation. At the same time, the pipeline network terminals are connected to tens of thousands of equipment nodes, making the gas pipeline network even larger and more complex; therefore, fast, accurate and high-frequency simulation becomes very necessary.

[0003] At present, when simulating a gas network, the main process includes pushing the gas network topology data, pushing the SCADA value assignment data, and initiating the simulation. Since the gas network topology data contains many valve type nodes, in order to assign values ​​to the valve nodes, the valves need to be used as boundary nodes, that is, when the gas network topology data is topologically segmented, the pressure regulating equipment and valves need to be used as segmentation points. This causes the gas network topology data to change according to the valve switch, and the number of areas pushed each time will change with the number of closed valves, resulting in the need to re-push the topology each time, which is time-consuming and has a large computing resource overhead. Summary of the invention

[0004] The present application provides a method for dynamically decoupling topology generation and SCADA assignment of a gas pipeline network under an integrated strategy, mapping valve nodes to valve virtual node arrays to achieve valve state mapping, so that when performing topological segmentation of the gas pipeline network, only the pressure regulating device can be used as the segmentation point. During the simulation calculation process, the gas pipeline network topology data only needs to be pushed once, thereby improving the simulation efficiency.

[0005] In a first aspect, the present application provides a method for generating a dynamic decoupled topology of a gas pipeline network and assigning a SCADA value under an integrated strategy, the method comprising:

[0006] An undirected topological graph corresponding to the gas pipeline network is constructed based on the point table data and the line table data, and the undirected topological graph is segmented using the pressure regulating equipment as the segmentation point to obtain multiple area topological data;

[0007] Mapping the valve node of each area in the plurality of area topology data into a valve virtual node array, serializing the plurality of area topology data and the valve virtual node array, generating a serialization result, and saving the serialization result as cache data;

[0008] According to the integration strategy, the monitoring and data acquisition system SCADA of the boundary nodes in the gas pipeline network is assigned to the boundary nodes of the multiple area topology data in the cache data to obtain the boundary node assignment data, and the valve switch state corresponding to the SCADA is mapped to the valve virtual node array in the cache data to obtain the valve switch state data. The SCADA and the valve switch state are dynamically decoupled and then assigned and mapped respectively. The integration strategy includes an operation of performing SCADA assignment based on the operation of obtaining the multiple area topology data;

[0009] The simulation model of the gas pipeline network is obtained by performing simulation calculations based on valve switch status data, boundary node assignment data and multiple area topology data.

[0010] Optionally, mapping the valve node of each area in the plurality of area topology data to a valve virtual node array includes:

[0011] Setting a patch number for each patch in the plurality of patch topology data, and traversing the patch topology data having the patch number from the plurality of patch topology data;

[0012] When there is a valve node in the area topology data having the area number, an array of two valve virtual node ID elements mapped to each valve node in the corresponding area number is obtained, and the two valve virtual node ID elements correspond to the inflow node and the outflow node of the valve node respectively;

[0013] When there is no valve node in the shard topology data having the shard number, an empty array corresponding to the shard number mapping is obtained.

[0014] Optionally, multiple area topology data and valve virtual node arrays are serialized to generate serialization results, and the serialization results are saved as cache data, including:

[0015] Generate a cache directory with each name being the slice number;

[0016] Serialize the valve virtual node array and the area topology data corresponding to each area number to obtain the serialization result corresponding to each area number;

[0017] The serialization result corresponding to each slice number is stored in the cache directory corresponding to the slice number to obtain cache data, and the cache data uses the slice number as a cache index.

[0018] Optionally, when a single SCADA value assignment is adopted, the SCADA corresponding to the boundary node in the gas pipeline network is cached to the boundary node of multiple area topology data according to the integrated strategy, and the boundary node value assignment data is obtained, and the valve switch state corresponding to the SCADA is mapped to the valve virtual node array in the cache data to obtain the valve switch state data, including:

[0019] Perform set difference between the boundary nodes of multiple area topology data in the cache data and the real boundary nodes in the gas pipeline network to obtain the valve nodes existing in the boundary nodes of the multiple area topology data, and filter the valve nodes existing in the boundary nodes of the multiple area topology data to obtain the filtered boundary nodes;

[0020] Obtain the single-time SCADA of the boundary nodes in the gas pipeline network, as well as the single-time valve switch status;

[0021] Assign single-time SCADA to the filtered boundary nodes to obtain single-time boundary node assignment data;

[0022] The single-moment valve switch state is mapped to the valve virtual node array in the cache data to obtain the single-moment valve switch state data.

[0023] Optionally, when batch SCADA assignment is adopted, the SCADA of the boundary node in the gas pipeline network is assigned to the boundary node of the multiple area topology data in the cache data according to the integrated strategy, and the boundary node assignment data is obtained, and the valve switch state corresponding to the SCADA is mapped to the valve virtual node array in the cache data to obtain the valve switch state data, including:

[0024] Perform set difference between the boundary nodes of multiple area topology data in the cache data and the real boundary nodes in the gas pipeline network to obtain the valve nodes existing in the boundary nodes of the multiple area topology data, and filter the valve nodes existing in the boundary nodes of the multiple area topology data to obtain the filtered boundary nodes;

[0025] Obtain multi-time SCADA of boundary nodes in the gas pipeline network and multi-time valve switch status;

[0026] Grouping the multi-time SCADA and the multi-time valve switch status according to the collection time to obtain multiple groups of SCADA and multiple groups of valve switch status;

[0027] Assign multiple groups of SCADA values ​​to the filtered boundary nodes in chronological order to obtain boundary node assignment data at multiple times;

[0028] Multiple groups of valve switch states are mapped to the valve virtual node array in the cache data in chronological order to obtain valve switch state data at multiple times.

[0029] Optionally, mapping the valve switch status corresponding to SCADA to the valve virtual node array in the cache data to obtain the valve switch status data includes:

[0030] Add the valve opening status value to the last bit in the valve virtual node array;

[0031] Traverse the valve nodes whose valve switch status is closed from the valve virtual node array, and modify the status value in the corresponding valve virtual node array to the status value of the valve closed;

[0032] When the valve virtual node array is traversed, the valve switch status data is obtained.

[0033] Optionally, the method further comprises:

[0034] A valve equation corresponding to the valve switch state data is established, and the valve equation is applied to the cached calculation equation. The cached calculation equation includes a matrix equation describing the connection relationship between each pipeline in the gas pipeline network, so as to directly read and calculate during simulation calculation.

[0035] In a second aspect, an embodiment of the present application provides a gas network dynamic decoupling topology generation and SCADA value assignment device under an integrated strategy, the device comprising:

[0036] A construction unit, used to construct an undirected topological graph corresponding to the gas pipeline network based on the point table data and the line table data;

[0037] A segmentation unit is used to segment the undirected topological graph using the voltage regulating device as a segmentation point to obtain multiple area topological data;

[0038] A mapping unit, used for mapping the valve node of each area in the plurality of area topology data into a valve virtual node array;

[0039] A storage unit, used for serializing the topological data of multiple zones and the array of valve virtual nodes, generating a serialization result, and saving the serialization result as cache data;

[0040] An acquisition unit is used to assign the SCADA of the boundary node in the gas pipeline network to the boundary node of the multiple area topology data in the cache data according to the integration strategy, obtain the boundary node assignment data, and map the valve switch state corresponding to the SCADA to the valve virtual node array in the cache data to obtain the valve switch state data, wherein the SCADA and the valve switch state are dynamically decoupled and then assigned and mapped respectively, and the integration strategy includes an operation of performing SCADA assignment based on the operation of obtaining the multiple area topology data;

[0041] The calculation unit is used to perform simulation calculations according to valve switch state data, boundary node assignment data and multiple area topology data to obtain a gas pipeline network simulation model.

[0042] Optionally, the mapping unit is specifically used for:

[0043] Setting a patch number for each patch in the plurality of patch topology data, and traversing the patch topology data having the patch number from the plurality of patch topology data;

[0044] When there is a valve node in the area topology data having the area number, an array of two valve virtual node ID elements mapped to each valve node in the corresponding area number is obtained, and the two valve virtual node ID elements correspond to the inflow node and the outflow node of the valve node respectively;

[0045] When there is no valve node in the shard topology data having the shard number, an empty array corresponding to the shard number mapping is obtained.

[0046] Optionally, the storage unit is specifically used for:

[0047] Generate a cache directory with each name being the slice number;

[0048] Serialize the valve virtual node array and the area topology data corresponding to each area number to obtain the serialization result corresponding to each area number;

[0049] The serialization result corresponding to each slice number is stored in the cache directory corresponding to the slice number to obtain cache data, and the cache data uses the slice number as a cache index.

[0050] Optionally, when a single SCADA assignment is used, the obtaining unit is specifically used to:

[0051] Perform set difference between the boundary nodes of multiple area topology data in the cache data and the real boundary nodes in the gas pipeline network to obtain the valve nodes existing in the boundary nodes of the multiple area topology data, and filter the valve nodes existing in the boundary nodes of the multiple area topology data to obtain the filtered boundary nodes;

[0052] Obtain the single-time SCADA of the boundary nodes in the gas pipeline network, as well as the single-time valve switch status;

[0053] Assign single-time SCADA to the filtered boundary nodes to obtain single-time boundary node assignment data;

[0054] The single-moment valve switch state is mapped to the valve virtual node array in the cache data to obtain the single-moment valve switch state data.

[0055] Optionally, when batch SCADA assignment is adopted, the obtaining unit is specifically used for:

[0056] Perform set difference between the boundary nodes of multiple area topology data in the cache data and the real boundary nodes in the gas pipeline network to obtain the valve nodes existing in the boundary nodes of the multiple area topology data, and filter the valve nodes existing in the boundary nodes of the multiple area topology data to obtain the filtered boundary nodes;

[0057] Obtain multi-time SCADA of boundary nodes in the gas pipeline network and multi-time valve switch status;

[0058] Grouping the multi-time SCADA and the multi-time valve switch status according to the collection time to obtain multiple groups of SCADA and multiple groups of valve switch status;

[0059] Assign multiple groups of SCADA values ​​to the filtered boundary nodes in chronological order to obtain boundary node assignment data at multiple times;

[0060] Multiple groups of valve switch states are mapped to the valve virtual node array in the cache data in chronological order to obtain valve switch state data at multiple times.

[0061] Optionally, the acquisition unit maps the valve switch state of the SCADA at the same moment to the valve virtual node array in the cache data to obtain the valve switch state data, which is specifically used for:

[0062] Add the valve opening status value to the last bit in the valve virtual node array;

[0063] Traverse the valve nodes whose valve switch status is closed from the valve virtual node array, and modify the status value in the corresponding valve virtual node array to the status value of the valve closed;

[0064] When the valve virtual node array is traversed, the valve switch status data is obtained.

[0065] Optionally, the device further comprises:

[0066] An establishment unit is used to establish a valve equation corresponding to the valve switch state data. The valve equation is applied to the cached calculation equation. The cached calculation equation includes a matrix equation describing the connection relationship between each pipeline in the gas pipeline network, so as to directly read the calculation during the simulation calculation.

[0067] In a third aspect, the present application provides an electronic device, the electronic device comprising a memory and a processor:

[0068] The memory is used to store computer programs;

[0069] The processor is used to execute the method provided by the first aspect according to the computer program.

[0070] In a fourth aspect, the present application further provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the method provided in the first aspect above.

[0071] It can be seen that this application has the following beneficial effects:

[0072] The present application provides a method for generating a dynamic decoupled topology and assigning SCADA values ​​to a gas pipeline network under an integrated strategy. First, an undirected topology graph corresponding to the gas pipeline network is constructed based on point table data and line table data, and the undirected topology graph is segmented with the pressure regulating device as the segmentation point. After obtaining multiple area topology data, the valve nodes of each area in the multiple area topology data are mapped to a valve virtual node array, and the multiple area topology data and the valve virtual node array are serialized and saved as cache data; then, the boundary nodes of the multiple area topology data in the cache data corresponding to the SCADA of the boundary nodes in the gas pipeline network are obtained, and the valve switch status of the SCADA at the same time is mapped to the valve virtual node array in the cache data to obtain the valve switch status data; finally, simulation calculation is performed according to the valve switch status data, the boundary node assignment data and the multiple area topology data to obtain a gas pipeline network simulation model. In this process, the valve nodes of each area in the multiple area topology data are mapped to a valve virtual node array to achieve decoupling of valve switching and topology data, and the valve switching status is subsequently transmitted in real time to support simulation calculations. Therefore, the multiple area topology data can remain unchanged, and the multiple area topology data and the valve virtual node array can be used as cache data, avoiding the need to process the topology data before the simulation calculation after the valve switch status changes, thereby achieving the purpose of accelerating the simulation calculation.

[0073] In addition, in some embodiments of the present application, single SCADA assignment and batch SCADA assignment methods can be implemented to speed up the SCADA assignment speed of multi-time big data and indirectly accelerate the simulation calculation; and because the topology data remains unchanged, the equations related to the pipeline connection relationship in the pipeline network can be pre-cached for each calculation to read, avoiding the reconstruction of related equations for each calculation, thereby speeding up the simulation calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0075] Figure 1It is a flow chart of an embodiment of a method for generating a dynamic decoupled topology of a gas network and assigning a SCADA value under an integrated strategy in an embodiment of the present application;

[0076] Figure 2 This is an example diagram of a topological structure in an embodiment of the present application;

[0077] Figure 3 This is a schematic diagram of a single-time boundary node assignment data in an embodiment of the present application;

[0078] Figure 4 This is a schematic diagram of valve switch status data at a single moment in an embodiment of the present application;

[0079] Figure 5 This is a schematic diagram of multi-time boundary node assignment data in an embodiment of the present application;

[0080] Figure 6 This is a schematic diagram of valve switch status data at multiple times in an embodiment of the present application;

[0081] Figure 7 A flowchart of another embodiment of a method for generating a dynamic decoupled topology of a gas network and assigning a SCADA value under an integrated strategy in an embodiment of the present application;

[0082] Figure 8 It is a structural schematic diagram of a gas network dynamic decoupling topology generation and SCADA value assignment device under an integrated strategy in an embodiment of the present application;

[0083] Fig. 9 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0084] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0085] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0086] First explain the technical terms that will be used:

[0087] (1) Topological data: generally composed of point tables and line tables. The former represents various types of nodes in the topology, including node ID, location name, type, coordinates, material and other attributes. The nodes include gas source, user, pressure regulating station, valve well, plug, ball valve and other types; the latter represents the pipeline connecting the nodes, including pipeline ID, pipe length, pipe diameter, wall thickness, coordinates, inflow endpoint, outflow endpoint and other attributes. All attributes of the point table and line table should be complete, and their ID identification and spatial coordinate position should be unique. The topological data in the embodiment of the present application can be migrated through the Geographic Information System (GIS) data of the urban gas pipeline network.

[0088] (2) SCADA data collection at boundary nodes: mainly for online data collection of pipeline networks, including but not limited to: data collected by flow meters (turbine, ultrasonic, millimeter wave), accelerometers, sensors, equipment (pressure maintenance, remote pressure transmission, gas Internet of Things), etc.

[0089] (3) Steady-state simulation: This mainly focuses on the behavior of the gas pipeline network under stable operating conditions, which means that the variables in the system, such as pressure, flow and temperature, are considered constant during the simulation. This type of simulation is usually used in the design phase to determine pipeline size, location and capacity of compressor stations, demand for gas storage facilities, etc. Steady-state simulation can help engineers and designers evaluate the performance of different design options and ensure that the system can operate effectively under the expected load.

[0090] (4) Transient simulation: This mainly considers the behavior of the gas pipeline network under dynamic conditions. When the system is subject to external disturbances (such as sudden increase or decrease in demand, compressor failure, pipeline rupture, etc.), the pressure, flow and other parameters in the pipeline network change over time. This type of simulation is more complex because it requires solving a system of partial differential equations that vary with time, usually involving the comprehensive application of fluid mechanics, thermodynamics and control theory.

[0091] At present, when simulating the gas network, the main process includes pushing the gas network topology data, pushing the SCADA value assignment data, and initiating the simulation. The gas network topology data contains many valve type nodes. Since only boundary nodes can be assigned values, in order to assign values ​​to valve nodes, the valve needs to be used as a boundary node, that is, when the gas network topology data is topologically segmented, the pressure regulating equipment and valves need to be used as segmentation points to obtain the gas network topology data, so as to push the gas network topology data for the first time. However, the valve switches in the subsequent gas network will change, and the corresponding gas network topology data will also change. For example, if the valve is switched from an open state to a closed state, the area connected to each closed valve is divided into two areas; if the valve is switched from a closed state to an open state, the two areas connected by the valve are merged into one area. It can be seen that the gas network topology data will change according to the valve switch, and the number of areas pushed each time will change with the number of closed valves, resulting in the need to re-push the topology each time, which is time-consuming and has a large computing resource overhead.

[0092] In an embodiment of the present application, the valve state is mapped by mapping the valve node to a valve virtual node array, so that the gas pipeline network can be topologically segmented only with the pressure regulating device as the segmentation point. During the simulation calculation process, the gas pipeline network topology data only needs to be pushed once, thereby improving the simulation efficiency.

[0093] In specific implementation, the method may include, for example: mapping the valve node into a valve virtual node array to realize the mapping of the valve state, so that when the gas pipeline network is topologically segmented, only the pressure regulating device can be used as the segmentation point. During the simulation calculation process, the gas pipeline network topology data only needs to be pushed once, thereby improving the simulation efficiency.

[0094] It can be seen that the method provided by the implementation of the present application decouples valve switching from topological data by mapping the valve nodes of each area in multiple area topological data into a valve virtual node array, and subsequently transmits the valve switch status in real time to support simulation calculations, so that the topological data no longer changes. Therefore, the topological data of multiple areas can remain unchanged, and the multiple area topological data and the valve virtual node array are used as cache data, which avoids the topological segmentation caused by valve switching and the inevitable topological push link of real-time online calculation, thereby achieving the purpose of accelerating simulation calculations.

[0095] To facilitate understanding of the specific implementation of the gas pipeline network simulation method provided in the embodiment of the present application, it will be described below with reference to the accompanying drawings.

[0096] It should be noted that the subject implementing the gas network simulation method may be a gas network dynamic decoupling topology generation and SCADA value assignment device under the integrated strategy provided in the embodiment of the present application, and the gas network dynamic decoupling topology generation and SCADA value assignment device under the integrated strategy may be carried in an electronic device or a functional module of an electronic device. The electronic device in the embodiment of the present application may be any device capable of implementing the gas network simulation method in the embodiment of the present application, such as an Internet of Things (IoT) device.

[0097] Figure 1 A flow chart of a method for generating a dynamic decoupled topology of a gas pipeline network and assigning a value to SCADA under an integrated strategy provided in an embodiment of the present application. The method can also be applied to a device for generating a dynamic decoupled topology of a gas pipeline network and assigning a value to SCADA under an integrated strategy, and the device for generating a dynamic decoupled topology of a gas pipeline network and assigning a value to SCADA under an integrated strategy can be, for example, Figure 8 The integrated strategy gas network dynamic decoupling topology generation and SCADA value assignment device 800 is shown, or the integrated strategy gas network dynamic decoupling topology generation and SCADA value assignment device can also be integrated in Fig. 9 Functional modules in the electronic device 900 are shown.

[0098] like Figure 1 As shown, the method includes the following S101~S104:

[0099] S101: construct an undirected topological graph corresponding to the gas pipeline network based on the point table data and the line table data, and divide the undirected topological graph using the pressure regulating equipment as a dividing point to obtain multiple area topological data.

[0100] In order to establish a gas pipeline network simulation model, in the embodiment of the present application, an undirected topological graph corresponding to the gas pipeline network is first constructed based on the point table data and the line table data, and the undirected topological graph is divided with the pressure regulating device as the dividing point to obtain multiple area topological data; then the valve node of each area in the multiple area topological data is mapped to a valve virtual node array, and the multiple area topological data and the valve virtual node array are serialized and saved as cache data; then the SCADA of the boundary node in the gas pipeline network corresponds to the boundary node of the multiple area topological data in the cache data, and the boundary node assignment data is obtained, and the valve switch state of the SCADA at the same time is mapped to the valve virtual node array in the cache data to obtain the valve switch state data; finally, simulation calculation is performed according to the valve switch state data, the boundary node assignment data and the multiple area topological data to obtain the gas pipeline network simulation model. Therefore, the embodiment of the present application obtains multiple area topological data through S101 to make preliminary preparations for the subsequent mapping of valve nodes to valve virtual node arrays.

[0101] As an example, S101 may include: constructing an undirected topological map corresponding to the gas pipeline network based on the point table data and line table data in the GIS data of the gas pipeline network; and in order to assign values ​​to the pressure regulating equipment in the gas pipeline network, dividing the undirected topological map with the pressure regulating equipment as the dividing point to obtain multiple area topological data, wherein the segmentation process is to divide the undirected topological map using a topological segmentation algorithm.

[0102] Among them, the topological data included in the above-mentioned undirected topological graph is data describing the basic structure of the gas pipeline network. The topological data mainly includes nodes in the pipeline network (including gas sources, users, pressure regulating equipment, two-way, three-way, etc.) and pipe sections connecting the nodes. Specifically, the topological structure of the gas pipeline network includes the following two types: (1) Tree topology: The tree topological structure is the most common form in the gas pipeline network. It presents an obvious tree structure. Each node has only one parent node and one or more child nodes. This structure is most common in urban gas pipeline networks. (2) Ring topology: A ring pipeline network is a gas pipeline network with a path connecting the end to the end. This type of pipeline network adds a small number of redundant pipelines on the basis of the ring pipeline network, which increases the overall stability of the pipeline network. It is commonly found in urban high-pressure or sub-high-pressure pipeline networks.

[0103] In this application, the topological data is obtained and stored using two data structures, one of which is a data structure describing nodes. The specific field names and meanings can be found in Table 1, and the other is a data structure describing pipe sections. The specific field names and meanings can be found in Table 2.

[0104] Table 1 Topological node data

[0105]

[0106] Table 2 Topological pipe segment data

[0107]

[0108] Among them, Figure 2 This is an example of a topological structure, where gas source A, user B, user C and other pipe connections in the network are collectively referred to as nodes, and gas source A, user B and user C are located on boundary nodes and are collectively referred to as boundary nodes. It should be noted that only boundary nodes can be assigned values.

[0109] In this process, in order to assign values ​​to the voltage regulating devices, the voltage regulating devices need to be used as boundary nodes. Therefore, the undirected topological graph needs to be segmented using the voltage regulating devices as segmentation points to obtain multiple area topological data.

[0110] S102: Map the valve node of each area in the plurality of area topology data into a valve virtual node array, serialize the plurality of area topology data and the valve virtual node array, generate a serialization result, and save the serialization result as cache data.

[0111] As an example, S102 may include: S1021, setting an area number for each area in a plurality of area topology data, and traversing the area topology data with the area number from the plurality of area topology data; S1022, when there are valve nodes in the area topology data with the area number, generating a valve virtual node array with twice the number of valve nodes, and obtaining two valve virtual node ID elements in the valve virtual node array mapped to each valve node in the corresponding area number, wherein the two valve virtual node ID elements respectively correspond to the inflow node of the valve node. point and outflow node; S1023, when there is no valve node in the zone topology data with the zone number, an empty array corresponding to the zone number mapping is obtained; S1024, a cache directory with each name as the zone number is generated; S1025, the valve virtual node array and the zone topology data corresponding to each zone number are serialized to obtain the serialization result corresponding to each zone number; S1026, the serialization result corresponding to each zone number is stored in the cache directory corresponding to the zone number to obtain the cache data, and the cache data uses the zone number as the cache index.

[0112] In the above, when traversing the area topology data with an area number, in order to enable the valve node to be assigned a value, it is necessary to map the valve node to a valve virtual node that can be assigned a value. Since the values ​​of the valve node based on two directions are not necessarily the same, one valve node needs to map two valve virtual nodes. In this regard, when there is a valve node in the area topology data with an area number, a valve virtual node array with twice the number of valve nodes can be generated first. For example, if the number of valve nodes is N, the number of valve virtual node arrays generated is 2N, where N is a positive integer. If there is a valve node in an area topology data, an array of two valve virtual node ID elements will be mapped to each valve node in the corresponding area, where the two valve virtual node ID elements correspond to the inflow node and the outflow node of the valve node respectively; if there is no valve node in the area topology data of an area, an empty array corresponding to the area number mapping is directly obtained. In this process, by mapping the valve nodes of each area to a valve virtual node array, the valve mapping relationship corresponding to each area can be obtained. Subsequently, the valve mapping relationship corresponding to each area and the area topology data can be directly stored in the cache directory with the area number as the cache index, so as to be used directly in the future and accelerate the simulation calculation speed.

[0113] In this process, in order to make the valve node not a boundary node, but still be assigned a value, the valve node is mapped to a valve virtual node array, and the valve virtual node array can be used to obtain the valve switch status in real time, thereby completing the assignment of the valve node. Therefore, the multiple area topology data obtained above are not divided by the valve, and naturally will not be affected by the valve switch status. Therefore, the valve virtual node array and area topology data can be directly used as cache data, without the need to push online every time, that is, the existing cache data and assignment data can be used for calculation in the subsequent simulation calculation, thereby greatly accelerating the simulation calculation speed when the valve changes.

[0114] S103: According to the integration strategy, the SCADA of the boundary nodes in the gas pipeline network is assigned to the boundary nodes of multiple area topology data in the cache data to obtain the boundary node assignment data, and the valve switch status corresponding to the SCADA is mapped to the valve virtual node array in the cache data to obtain the valve switch status data. The SCADA and the valve switch status are dynamically decoupled and then assigned and mapped respectively. The integration strategy includes the operation of performing SCADA assignment based on the operation of obtaining multiple area topology data.

[0115] After storing the topological data, simulation calculations can be performed according to SCADA, where the gas pipeline network is generally equipped with various high-precision sensors that can sense the pressure flow and temperature changes in the natural gas pipeline in real time, and transmit the collected pressure signals, flow values, temperature and other data to the data acquisition system through various communication means. When performing simulation calculations in the embodiments of the present application, the following parameters are generally relied on for calculation:

[0116] Flow rate: refers to the rate at which natural gas flows in the pipeline, usually measured in cubic meters per hour or cubic meters per day. Pressure: refers to the pressure of natural gas in the pipeline, usually measured in megapascals. Temperature: refers to the temperature of natural gas in the pipeline, usually measured in degrees Celsius.

[0117] The following Tables 3 and 4 are examples of storing SCADA, wherein Table 3 shows the fields and corresponding meanings stored in SCADA, and Table 4 shows an example of storing SCADA at different times.

[0118] Table 3 SCADA field meaning table

[0119]

[0120] Table 4 SCADA storage example

[0121]

[0122] After the data acquisition system collects data from different sensors to SCADA through sensors, it will collect and transmit the data collected by different sensors to the data processing center for analysis and processing. The data processing center is responsible for collecting, storing, processing pressure, flow and temperature data from different pipelines, and performing real-time analysis to identify potential risks.

[0123] It should be noted that the SCADA mentioned in the embodiments of the present application is the data collected by the Supervisory Control and Data Acquisition (SCADA) system.

[0124] It should be noted that in the embodiment of the present application, the SCADA data and the corresponding valve switch status are collected and obtained simultaneously.

[0125] After obtaining SCADA, it is necessary to assign values ​​to the boundary nodes in the topology data. Two assignment methods are provided in the embodiment of the present application, one is a single SCADA assignment method, and the other is a batch SCADA assignment method. The corresponding assignment process is described in detail below:

[0126] (1) Single SCADA assignment method: Make a difference between the boundary nodes of multiple area topology data in the cache data and the real boundary nodes in the gas pipeline network to obtain the valve nodes existing in the boundary nodes of the multiple area topology data, and filter the valve nodes existing in the boundary nodes of the multiple area topology data to obtain the filtered boundary nodes; obtain the single-time SCADA of the boundary nodes in the gas pipeline network and the single-time valve switch status; assign the single-time SCADA to the filtered boundary nodes to obtain the single-time boundary node assignment data; map the single-time valve switch status to the valve virtual node array in the cache data to obtain the single-time valve switch status data.

[0127] In this process, a single SCADA assignment method can only assign SCADA at one moment to the topology boundary node at a time, and the valve switch status at that moment is mapped to the valve virtual node array in the cache data. What is finally obtained is the single-moment boundary node assignment data and the single-moment valve switch status data.

[0128] (2) Batch SCADA assignment method: Make a difference between the boundary nodes of multiple area topology data in the cache data and the real boundary nodes in the gas pipeline network to obtain the valve nodes existing in the boundary nodes of multiple area topology data, and filter the valve nodes existing in the boundary nodes of multiple area topology data to obtain the filtered boundary nodes; obtain the multi-time SCADA and multi-time valve switch status of the boundary nodes in the gas pipeline network; group the multi-time SCADA and multi-time valve switch status according to the collection time to obtain multiple groups of SCADA and multiple groups of valve switch status; assign the multiple groups of SCADA to the filtered boundary nodes in chronological order to obtain multi-time boundary node assignment data; map the multiple groups of valve switch status to the valve virtual node array in the cache data in chronological order to obtain multi-time valve switch status data.

[0129] In this process, the batch SCADA assignment method can assign SCADA values ​​at multiple times to topological boundary nodes in chronological order at one time, and map multiple groups of valve switch states to the valve virtual node array in the cache data in chronological order at one time, and finally obtain multi-time boundary node assignment data (multiple copies of single-time boundary node assignment data) and multi-time valve switch state data (multiple copies of single-time valve switch state data).

[0130] It should be noted that when assigning values ​​to the boundary nodes, all valves belong to the boundary nodes. At this time, it is necessary to deduplicate valves and boundary nodes, and assign values ​​when valves are no longer used as boundary nodes. Therefore, it is necessary to make a difference between the boundary nodes of multiple area topology data in the cache data and the real boundary nodes, filter the valve nodes existing in the boundary nodes of multiple area topology data, and obtain the filtered boundary nodes.

[0131] Among them, for mapping the valve switch status of SCADA at the same moment to the valve virtual node array in the cache data, the specific process of obtaining the valve switch status data may include: adding the valve open status value to the last bit in the valve virtual node array; traversing the valve nodes whose valve switch status is closed from the valve virtual node array, and modifying the corresponding status value in the valve virtual node array to the valve closed status value; when the valve virtual node array is traversed, the valve switch status data is obtained. When the batch SCADA assignment method is used, it can be specifically, for example, to correspond the moment value with the closed valve node ID list, and the dictionary data structure composed of the moment value as the key and the closed valve ID list as the value, and then the valve switch status is controlled by the valve ID list corresponding to the moment value through the traversal method. It should be noted that in the embodiment of the present application, the valve open state value is set to 0 and the valve closed state value is set to 1.

[0132] Based on the above settings, when a single SCADA value is used, the single-time boundary node value data obtained is as follows: Figure 3 And the valve switch status data at a single moment such as Figure 4 As shown in the figure, the obtained multi-time boundary node assignment data is as follows Figure 5 And the valve switch status data at multiple times such as Figure 6 As shown in the figure, area_no is the corresponding topological area number, and valve_info represents two valve virtual node ID elements and valve switch status mapped to a valve, where the valve open state is 0 and the valve closed state is 1. The boundary node assignment results contain pipe, which indicates flow assignment, and node, which indicates pressure assignment.

[0133] S104: Perform simulation calculations based on valve switch status data, boundary node assignment data, and multiple area topology data to obtain a gas pipeline network simulation model.

[0134] Finally, when performing simulation calculations, the cached set of equations can be used for pre-calculations. Therefore, the cached set of equations is not affected by the above-mentioned valve switch state data and boundary node assignment data. After obtaining multiple area topology data, this type of equation group can be fixedly obtained without rebuilding.

[0135] In the simulation of the gas network, whether it is a steady-state simulation or a transient simulation, the connection relationship between each pipeline in the network needs to be described in the equation group to be solved. In the embodiment of the present application, this type of equation group can be cached first. Since the topological data has been decoupled from the valve state parameters, the topological data does not change for the same network, so the fixed part can be saved as a cache, thereby avoiding the need to rebuild this part of the equation group based on the topological data for each calculation. Therefore, in the embodiment of the present application, the relevant matrix equations describing the connection relationship between each pipeline in the network are cached as cached calculation equations.

[0136] For steady-state simulation, it includes pipeline pressure drop equation and node flow balance equation. The node flow balance equation is closely related to the connection relationship in the pipeline network. For a certain node in the pipeline network, there is a node flow balance equation as follows (1):

[0137] Formula (1)

[0138] Where n is the pipe connected to a node; q i is the flow rate of the connecting pipe at any node in the pipe network, in m 3 / s, which is negative when flowing into a node and positive when flowing out of a node.

[0139] Since the pipeline pressure drop equation is a nonlinear equation, the steady-state simulation calculation is generally calculated using nonlinear equation solving methods such as Newton iteration. The Jacobian matrix needs to be calculated in the Newton iteration, in which the value of the node flow balance equation is related to the pipeline connection relationship. When solving the Jacobian matrix, the rank of the Jacobian matrix corresponding to the node flow balance equation corresponding to this node only needs to fill in -1 at the inflow node and 1 at the outflow node, regardless of the specific flow value. Therefore, the Jacobian matrix of the node flow equation can be stored in the cache to facilitate each calculation call, avoiding the reconstruction of this part of the equation group every time the calculation is performed.

[0140] For transient simulation, the set of pipe network equations that need to be solved includes the differential equations of the relationship between the head and tail of the pipeline, the node flow balance equation, and the node pressure consistency equation. The entire set of equations for transient simulation is linear and can be solved using a linear solution method. The variables to be solved are the pressure and flow at the head and tail of all pipelines, so each node has a node flow balance equation, which is shown in the above formula (1), and the node pressure consistency equation is shown in the following formula (2):

[0141] Formula (2)

[0142] Among them, P i The pressure value of the node is calculated by solving the differential equation of the node in the i pipe; P j The pressure value of this node is calculated by solving the differential equation in the j pipe.

[0143] When solving the node flow balance equation, fill the corresponding rows of the matrix with -1 for the inflow node and 1 for the outflow node. For the node pressure balance equation, it is necessary to combine the connected pipes in pairs to generate n-1 linearly independent equation groups. In the matrix row corresponding to each equation group, only a 1 and a -1 need to be filled in the position corresponding to the pressure variable at the beginning or end of the corresponding pipe.

[0144] Since valve switch status data is designed in the embodiment of the present application, it is also necessary to establish a valve equation corresponding to the valve switch status data when performing simulation calculations, wherein the valve equation is used to perform simulation calculations in the cached calculation equations. Specifically, for example, when the valve switch status data is set to a closed value, the flow rate of the corresponding valve virtual node is 0, and the Jacobian matrix is ​​filled with -1 at the inflow node and 1 at the outflow node to control the switch status of the valve node. When the valve status data is an open value, the pressure value of the valve virtual node is set to be consistent.

[0145] In this process, whether in steady-state or transient simulation, there is a part that only describes the pipeline connection relationship. The correlation matrix of this part can be saved as a fixed cache for simulation calculation, avoiding the reconstruction of this part of the equation every time simulation is performed, thereby achieving the purpose of accelerating simulation calculation.

[0146] It can be seen that the embodiment of the present application sets the valve as two virtual nodes and fixes the node number, so that the topological data in the pipe network is not affected by the valve switch, and there is no need to push the topology online. This can avoid the topological segmentation caused by the valve switch and the inevitable topological push link of real-time online calculation. In addition, since the topological data and the valve virtual node array are used as an integrated cache, batch SCADA assignment can be directly implemented, speeding up the speed of multi-time SCADA assignment. At the same time, the valve virtual node and the area topology are fixed as cache for simulation calculation, avoiding the reconstruction of this part of the equation every time the simulation is simulated, thereby achieving the purpose of accelerating the simulation calculation.

[0147] In order to make the method provided in the embodiment of the present application clearer and easier to understand, Figure 7 A specific example of this method is described.

[0148] like Figure 7 As shown, the implementation may include:

[0149] S701: construct an undirected topological graph corresponding to the gas pipeline network based on the point table data and the line table data, and divide the undirected topological graph using the pressure regulating equipment as a dividing point to obtain multiple area topological data.

[0150] Firstly, an undirected topological graph corresponding to the gas pipeline network is constructed according to the point table data and line table data in the GIS data of the gas pipeline network. When the gas pipeline network simulation model is subsequently established, it is necessary to assign values ​​to the boundary nodes. Therefore, it is necessary to segment the undirected topological graph with the pressure regulating device as the segmentation point so that the pressure regulating device can be used as the boundary node for assignment. Then, the topological segmentation algorithm is used to segment the undirected topological graph with the pressure regulating device as the segmentation point to obtain multiple area topological data.

[0151] S702: Set a patch number for each patch in the plurality of patch topology data, and traverse the patch topology data having the patch number from the plurality of patch topology data.

[0152] Since the valve node is not used as a boundary node in the topological data, the topological quantity will not change according to the switch state of the valve. Therefore, multiple area topological data can be cached for direct use in subsequent simulation calculations without the need for further segmentation and pushing.

[0153] To this end, the valve switch status needs to be regarded as a pipeline status parameter that changes with time, just like pressure and flow, and it needs to be transmitted together with SCADA. Therefore, it is necessary to first set a valve virtual node for a valve node to record the valve switch status. Therefore, first set an area number for each area in multiple area topology data, and traverse the area topology data with the area number from multiple area topology data to determine whether there is a valve node.

[0154] S703: When there are valve nodes in the area topology data with the area number, a valve virtual node array with twice the number of valve nodes is generated, and two valve virtual node ID elements in the valve virtual node array mapped to each valve node in the corresponding area number are obtained.

[0155] One situation is that there is a valve node in the area topology data of the area number. At this time, it is necessary to set a valve virtual node for the valve node. The specific method can be, for example: when there are 2 valve nodes in the area topology data of area 1, first generate 4 valve virtual node ID elements, and then map an array of two valve virtual node ID elements of the 4 valve virtual node ID elements to the 2 valve nodes; for example, the 4 valve virtual node arrays are "9001", "9002", "9001" and "9004", respectively, then map the values ​​of "9001" and "9002" to valve node A.

[0156] S704: When there is no valve node in the area topology data having the area number, an empty array corresponding to the area number mapping is obtained.

[0157] Another situation is that there is no valve node in the area topology data of the area number. In this case, there is no need to set the valve virtual node, and an empty array can be directly mapped to the corresponding area number.

[0158] Through the settings of S703 and S704, the valve node mapping relationship corresponding to each area can be finally obtained.

[0159] S705: Serialize the multiple area topology data and the valve virtual node array to generate a serialization result, and save the serialization result as cache data.

[0160] When saving is required, the previously set area number is used as the cache directory, that is, a cache directory with each area number as its name is generated, and then the valve virtual node array and area topology data corresponding to each area number are serialized to obtain the serialization result corresponding to each area number, and finally the serialization result corresponding to each area number is stored in the cache directory corresponding to the area number to obtain the cache data, wherein the cache data uses the area number as the cache index.

[0161] S706: Make a difference between the boundary nodes of multiple area topology data in the cache data and the real boundary nodes in the gas pipeline network to obtain the valve nodes existing in the boundary nodes of multiple area topology data, and filter the valve nodes existing in the boundary nodes of multiple area topology data to obtain filtered boundary nodes.

[0162] SCADA assigns values ​​based on boundary nodes. At this time, all valves belong to boundary nodes. To achieve deduplication of valves and boundary nodes, valves are no longer assigned as boundary nodes. Therefore, it is necessary to make a difference between the boundary nodes of multiple area topology data in the cache data and the real boundary nodes, filter the valve nodes existing in the boundary nodes of the multiple area topology data, and obtain the filtered boundary nodes.

[0163] S707: Assign SCADA values ​​of boundary nodes in the gas pipeline network to boundary nodes of multiple area topology data in the cache data to obtain boundary node assignment data.

[0164] After the SCADA is subsequently acquired, it is necessary to assign the SCADA, so it is necessary to assign the SCADA of the boundary node in the gas pipeline network to the boundary nodes of multiple area topology data in the cache data to obtain the boundary node assignment data.

[0165] At this time, not only single SCADA assignment can be performed, but also batch SCADA assignment can be performed. The single SCADA assignment method can be: obtain the single-time SCADA of the boundary node in the gas pipeline network at a moment; correspond the single-time SCADA to the filtered boundary node to obtain the single-time boundary node assignment data. The batch SCADA assignment method can be: obtain the multi-time SCADA of the boundary node in the gas pipeline network; group the multi-time SCADA according to the collection time to obtain multiple groups of SCADA; assign the multiple groups of SCADA to the filtered boundary nodes in turn in chronological order to obtain multi-time boundary node assignment data. The batch SCADA assignment method can speed up the SCADA assignment speed, thereby speeding up the simulation calculation speed.

[0166] S708: Map the valve switch status corresponding to SCADA to the valve virtual node array in the cache data to obtain the valve switch status data.

[0167] When performing SCADA assignment on the boundary nodes, it is necessary to map the valve switch status corresponding to SCADA to the valve virtual node array in the cache data to obtain the valve switch status data. Similarly, not only single SCADA assignment can be performed, but also batch SCADA assignment. The single SCADA assignment method can be: obtain the single-time valve switch status in the gas pipeline network at a moment; map the single-time valve switch status to the valve virtual node array in the cache data to obtain the single-time valve switch status data. The batch SCADA assignment method can be: obtain the valve switch status at multiple moments in the gas pipeline network; group the multiple-time valve switch status according to the collection time to obtain multiple groups of valve switch status; correspond the multiple groups of valve switch status to the filtered boundary nodes in chronological order to obtain multiple-time valve switch status data.

[0168] It should be noted that S707 and S708 are performed simultaneously, that is, the boundary node assignment data and the valve switch status data are obtained simultaneously, thereby speeding up the SCADA assignment.

[0169] S709: Perform simulation calculations based on valve switch status data, boundary node assignment data, and multiple area topology data to obtain a gas pipeline network simulation model.

[0170] Finally, the simulation calculation is performed using the valve switch state data, boundary node assignment data and multiple area topology data to obtain a gas pipeline network simulation model. Before the simulation calculation is performed, the cached set of equations can be solved and calculated. The set of equations cached in this embodiment of the application belongs to the set of equations that describes the connection relationship between each pipeline in the pipeline network. This type of set of equations is only related to the topology data. Since the topology data does not change in the embodiment of the application, this type of set of equations can be used as a cached set of equations for pre-solution calculation, thereby achieving the purpose of accelerating the simulation calculation.

[0171] Since the valve switch state data is designed in the embodiment of the present application, it is also necessary to establish a valve equation corresponding to the valve switch state data when performing simulation calculations. The valve equation is a set of equations that can be applied to the cache, for example, when the valve switch state data indicates that it is closed, the corresponding node flow balance equation is solved to 0. Specific equations and examples can be found in the above embodiments, which will not be repeated here.

[0172] This embodiment provides a method for generating a dynamic decoupled topology and SCADA value assignment for a gas pipeline network under an integrated strategy. By setting a valve virtual node array for the valve, the influence of the valve switch on the topological data is avoided, and the valve switch state is regarded as a pipeline state parameter that changes with time like pressure and flow, which can be transmitted together with SCADA. The processing of topological data before simulation calculation is avoided. And when the valve switch changes in the pipeline network, the topological data can still be kept unchanged, avoiding the change of topological data caused by the valve switch. Especially in the case of emergency valve closing, the data style and the like transmitted are completely the same as the real-time online simulation, and no additional processing is required, ensuring the same simulation calculation speed as the real-time online. In addition, in some embodiments of the present application, single SCADA value assignment and batch SCADA value assignment methods can be implemented to speed up the SCADA value assignment speed of multi-time big data, and indirectly accelerate the simulation calculation; and because the topological data is unchanged, the equations related to the pipeline connection relationship in the pipeline network can be pre-cached for each calculation to read, avoiding the reconstruction of the relevant equations each time the calculation is performed, and speeding up the simulation calculation.

[0173] See also Figure 8 The embodiment of the present application provides a gas network dynamic decoupling topology generation and SCADA value assignment device 800 under an integrated strategy, the device comprising:

[0174] A construction unit 801 is used to construct an undirected topological graph corresponding to the gas pipeline network based on the point table data and the line table data;

[0175] A segmentation unit 802 is used to segment the undirected topology graph using the voltage regulating device as a segmentation point to obtain multiple area topology data;

[0176] A mapping unit 803, used for mapping the valve node of each area in the plurality of area topology data into a valve virtual node array;

[0177] The storage unit 804 is used to serialize the plurality of area topology data and the valve virtual node array, generate a serialization result, and save the serialization result as cache data;

[0178] The obtaining unit 805 is used to assign the SCADA of the boundary node in the gas pipe network to the boundary node of the multiple area topology data in the cache data according to the integrated strategy, obtain the boundary node assignment data, and map the valve switch state corresponding to the SCADA to the valve virtual node array in the cache data to obtain the valve switch state data, wherein the SCADA and the valve switch state are dynamically decoupled and then assigned and mapped respectively, and the integrated strategy includes an operation of performing SCADA assignment based on the operation of obtaining the multiple area topology data;

[0179] The calculation unit 806 is used to perform simulation calculations according to the valve switch state data, the boundary node assignment data and the multiple area topology data to obtain a gas pipe network simulation model.

[0180] Optionally, the mapping unit 803 is specifically configured to:

[0181] Setting a patch number for each patch in the plurality of patch topology data, and traversing the patch topology data having the patch number from the plurality of patch topology data;

[0182] When there is a valve node in the area topology data having the area number, an array of two valve virtual node ID elements mapped to each valve node in the corresponding area number is obtained, and the two valve virtual node ID elements correspond to the inflow node and the outflow node of the valve node respectively;

[0183] When there is no valve node in the shard topology data having the shard number, an empty array corresponding to the shard number mapping is obtained.

[0184] Optionally, the storage unit 804 is specifically used for:

[0185] Generate a cache directory with each name being the slice number;

[0186] Serialize the valve virtual node array and the area topology data corresponding to each area number to obtain the serialization result corresponding to each area number;

[0187] The serialization result corresponding to each slice number is stored in the cache directory corresponding to the slice number to obtain cache data, and the cache data uses the slice number as a cache index.

[0188] Optionally, when a single SCADA assignment is adopted, the obtaining unit 805 is specifically used for:

[0189] Perform set difference between the boundary nodes of multiple area topology data in the cache data and the real boundary nodes in the gas pipeline network to obtain the valve nodes existing in the boundary nodes of the multiple area topology data, and filter the valve nodes existing in the boundary nodes of the multiple area topology data to obtain the filtered boundary nodes;

[0190] Obtain the single-time SCADA of the boundary nodes in the gas pipeline network, as well as the single-time valve switch status;

[0191] Assign single-time SCADA to the filtered boundary nodes to obtain single-time boundary node assignment data;

[0192] The single-moment valve switch state is mapped to the valve virtual node array in the cache data to obtain the single-moment valve switch state data.

[0193] Optionally, when batch SCADA assignment is adopted, the obtaining unit 805 is specifically used for:

[0194] Perform set difference between the boundary nodes of multiple area topology data in the cache data and the real boundary nodes in the gas pipeline network to obtain the valve nodes existing in the boundary nodes of the multiple area topology data, and filter the valve nodes existing in the boundary nodes of the multiple area topology data to obtain the filtered boundary nodes;

[0195] Obtain multi-time SCADA of boundary nodes in the gas pipeline network and multi-time valve switch status;

[0196] Grouping the multi-time SCADA and the multi-time valve switch status according to the collection time to obtain multiple groups of SCADA and multiple groups of valve switch status;

[0197] Assign multiple groups of SCADA values ​​to the filtered boundary nodes in chronological order to obtain boundary node assignment data at multiple times;

[0198] Multiple groups of valve switch states are mapped to the valve virtual node array in the cache data in chronological order to obtain valve switch state data at multiple times.

[0199] Optionally, the acquisition unit 805 maps the valve switch state of the SCADA at the same time to the valve virtual node array in the cache data to obtain the valve switch state data, which is specifically used for:

[0200] Add the valve opening status value to the last bit in the valve virtual node array;

[0201] Traverse the valve nodes whose valve switch status is closed from the valve virtual node array, and modify the status value in the corresponding valve virtual node array to the status value of the valve closed;

[0202] When the valve virtual node array is traversed, the valve switch status data is obtained.

[0203] Optionally, the device 800 further includes:

[0204] An establishment unit is used to establish a valve equation corresponding to the valve switch state data. The valve equation is applied to the cached calculation equation. The cached calculation equation includes a matrix equation describing the connection relationship between each pipeline in the gas pipeline network, so as to directly read the calculation during the simulation calculation.

[0205] It should be noted that the specific implementation method and effect of the gas network dynamic decoupling topology generation and SCADA assignment device 800 under the integrated strategy can be referred to in the above Figure 1 or Figure 7The relevant descriptions in the provided methods will not be repeated here.

[0206] The present application embodiment also provides an electronic device 900, such as Fig. 9 As shown, the device 900 includes a memory 901 and a processor 902:

[0207] The memory 901 is used to store computer programs;

[0208] The processor 902 is used to execute the above according to the computer program Figure 1 or Figure 7 The method provided.

[0209] In addition, the present application also provides a computer-readable storage medium, the computer-readable storage medium is used to store a computer program, and the computer program is used to execute Figure 1 or Figure 7 The method provided.

[0210] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0211] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is only schematic, in which the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the goals of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0212] The above description is merely an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A method for generating dynamic decoupling topology and SCADA value assignment for a gas pipeline network under an integrated strategy, characterized in that: The method comprises: Based on the point table data and the line table data, an undirected topological graph corresponding to the gas pipeline network is constructed, and the undirected topological graph is segmented with the pressure regulating equipment as the segmentation point to obtain multiple area topological data; Mapping the valve node of each area in the plurality of area topology data into a valve virtual node array, serializing the plurality of area topology data and the valve virtual node array, generating a serialization result, and saving the serialization result as cache data; According to the integration strategy, the monitoring and data acquisition system SCADA of the boundary nodes in the gas pipeline network is assigned to the boundary nodes of the multiple area topology data in the cache data to obtain the boundary node assignment data, and the valve switch state corresponding to the SCADA is mapped to the valve virtual node array in the cache data to obtain the valve switch state data. The SCADA and the valve switch state are dynamically decoupled and then assigned and mapped respectively. The integration strategy includes the operation of performing the SCADA assignment based on the operation of obtaining the multiple area topology data; A simulation calculation is performed based on the valve switch state data, the boundary node assignment data and the multiple area topology data to obtain a gas pipeline network simulation model.

2. The method according to claim 1, characterized in that The step of mapping the valve node of each area in the plurality of area topology data into a valve virtual node array includes: Setting a patch number for each patch in the plurality of patch topology data, and traversing the patch topology data having the patch number from the plurality of patch topology data; When there is a valve node in the area topology data having the area number, an array of two valve virtual node ID elements mapped to each valve node in the corresponding area number is obtained, and the two valve virtual node ID elements correspond to the inflow node and the outflow node of the valve node respectively; When there is no valve node in the area topology data having the area number, an empty array corresponding to the area number mapping is obtained.

3. The method according to claim 2, characterized in that The serializing the plurality of area topology data and the valve virtual node array to generate a serialization result, and saving the serialization result as cache data includes: Generate a cache directory with each name being the slice number; Serialize the valve virtual node array and the area topology data corresponding to each area number to obtain the serialization result corresponding to each area number; The serialization result corresponding to each slice number is stored in the cache directory corresponding to the slice number to obtain the cache data, and the cache data uses the slice number as a cache index.

4. The method according to claim 1, characterized in that: When a single SCADA assignment is adopted, the SCADA of the boundary node in the gas network is assigned to the boundary node of the multiple area topology data in the cache data according to the integrated strategy to obtain the boundary node assignment data, and the valve switch state corresponding to the SCADA is mapped to the valve virtual node array in the cache data to obtain the valve switch state data, including: Performing a difference set between the boundary nodes of the plurality of area topology data in the cache data and the real boundary nodes in the gas pipeline network to obtain the valve nodes existing in the boundary nodes of the plurality of area topology data, and filtering the valve nodes existing in the boundary nodes of the plurality of area topology data to obtain the filtered boundary nodes; Obtain the single-time SCADA of the boundary nodes in the gas pipeline network, as well as the single-time valve switch status; Assigning the single-time SCADA to the filtered boundary nodes to obtain single-time boundary node assignment data; The single-moment valve switch state is mapped to the valve virtual node array in the cache data to obtain the single-moment valve switch state data.

5. The method according to claim 1, characterized in that When batch SCADA assignment is adopted, the SCADA of the boundary node in the gas pipeline network is assigned to the boundary nodes of the multiple area topology data in the cache data according to the integrated strategy to obtain the boundary node assignment data, and the valve switch status corresponding to the SCADA is mapped to the valve virtual node array in the cache data to obtain the valve switch status data, including: Performing a difference set between the boundary nodes of the plurality of area topology data in the cache data and the real boundary nodes in the gas pipeline network to obtain the valve nodes existing in the boundary nodes of the plurality of area topology data, and filtering the valve nodes existing in the boundary nodes of the plurality of area topology data to obtain the filtered boundary nodes; Obtain multi-time SCADA of boundary nodes in the gas pipeline network and multi-time valve switch status; The multi-time SCADA and the multi-time valve switch status are grouped according to the collection time to obtain multiple groups of SCADA and multiple groups of valve switch status; Assigning the multiple groups of SCADA to the filtered boundary nodes in sequence according to the time sequence to obtain boundary node assignment data at multiple times; The plurality of groups of valve switch states are sequentially mapped to the valve virtual node array in the cache data in chronological order to obtain valve switch state data at multiple moments.

6. The method according to claim 1, characterized in that The step of mapping the valve switch state corresponding to the SCADA to the valve virtual node array in the cache data to obtain the valve switch state data includes: Adding the valve opening state value to the last bit in the valve virtual node array; Traverse the valve nodes whose valve switch status is closed from the valve virtual node array, and modify the status value in the corresponding valve virtual node array to the status value of the valve closed; When the valve virtual node array is traversed, the valve switch state data is obtained.

7. The method according to claim 1, characterized in that The method further comprises: A valve equation corresponding to the valve switch state data is established, and the valve equation is applied to the cached calculation equation. The cached calculation equation includes a matrix equation describing the connection relationship between each pipeline in the gas pipeline network, so as to directly read and calculate during simulation calculation.

8. A gas network dynamic decoupling topology generation and SCADA value assignment device under an integrated strategy, characterized in that: The device comprises: A construction unit, used to construct an undirected topological graph corresponding to the gas pipeline network based on the point table data and the line table data; A segmentation unit, used to segment the undirected topological graph using the voltage regulating device as a segmentation point to obtain a plurality of area topological data; A mapping unit, used for mapping the valve node of each area in the plurality of area topology data into a valve virtual node array; A storage unit, configured to serialize the plurality of area topology data and the valve virtual node array, generate a serialization result, and save the serialization result as cache data; An obtaining unit is used to assign the SCADA of the boundary node in the gas pipe network to the boundary node of the multiple area topology data in the cache data according to the integration strategy, obtain the boundary node assignment data, and map the valve switch state corresponding to the SCADA to the valve virtual node array in the cache data to obtain the valve switch state data, the SCADA and the valve switch state are dynamically decoupled and then assigned and mapped respectively, and the integration strategy includes performing the SCADA assignment operation based on the operation of obtaining the multiple area topology data; A calculation unit is used to perform simulation calculations according to the valve switch state data, the boundary node assignment data and the multiple area topology data to obtain a gas pipeline network simulation model.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory: The memory is used to store programs; The processor is configured to execute the method according to any one of claims 1 to 7 according to the program.

10. A storage medium, characterized in that: The storage medium is used to store a program, and the program runs on a processor to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data-driven offline and online integrated simulation system and method for power distribution network

    CA3242113A1

  • Pipe network segmentation method based on node burst algorithm

    CN115564780A