CN117271500B - Data restoration method and related device for gas pipe network node - Google Patents

Data restoration method and related device for gas pipe network node Download PDF

Info

Publication number
CN117271500B
CN117271500B CN202311551382.2A CN202311551382A CN117271500B CN 117271500 B CN117271500 B CN 117271500B CN 202311551382 A CN202311551382 A CN 202311551382A CN 117271500 B CN117271500 B CN 117271500B
Authority
CN
China
Prior art keywords
attribute
node
field
data
pipe
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311551382.2A
Other languages
Chinese (zh)
Other versions
CN117271500A (en
Inventor
王文波
周乐乐
栾星
才槟赫
刘柱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Three Zero Four Zero Technology Co ltd
Original Assignee
Shanghai Three Zero Four Zero Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Three Zero Four Zero Technology Co ltd filed Critical Shanghai Three Zero Four Zero Technology Co ltd
Priority to CN202311551382.2A priority Critical patent/CN117271500B/en
Publication of CN117271500A publication Critical patent/CN117271500A/en
Application granted granted Critical
Publication of CN117271500B publication Critical patent/CN117271500B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Remote Sensing (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a data restoration method, electronic equipment, a computer readable storage medium and a computer program product of a gas pipe network node, wherein the method comprises the following steps: acquiring GIS data, wherein the GIS data comprises point table data and line table data; performing attribute null value inspection on the GIS data, and judging whether attribute deletion exists in the GIS data or not; if the GIS data has the attribute missing, generating a pipe network topology according to a source field and a target field in the line table data; and filling the attributes of the GIS data with the missing attributes according to the pipe network topology. The repair result of the method has higher accuracy, and saves labor time cost.

Description

Data restoration method and related device for gas pipe network node
Technical Field
The application relates to the technical field of gas pipe network data restoration, in particular to a data restoration method and a related device for gas pipe network nodes.
Background
GIS, namely geographic information system, is the necessary information processing system in the energy industry, take urban gas industry as an example, huge and complicated urban natural gas pipe network system is connected with tens of thousands of users and voltage regulating facilities, if topology data (namely GIS data) of the pipe network have deviation, the simulation result of the natural gas pipe network may have great deviation, and the digital operation of gas dispatching cannot be smoothly carried out. Therefore, ensuring the accuracy of GIS topological data is an important precondition for digital operation of the natural gas pipeline network.
GIS data is generally composed of a terminal node information table (point table for short) and a pipe network pipeline table (line table for short). The former represents various types of node data in the topology, and the node table contains information such as node identification, position name, attribute, type, coordinates, height and the like; the latter represents the pipeline data of the connecting node, and the line list comprises attribute information such as pipeline identification, position name, pipe length, pipe diameter, wall thickness, starting point identification, end point identification, coordinates and the like. When the timing meter is combined with the line meter, the accuracy of information in the natural gas pipe network can be reflected.
Under normal conditions, the attribute information in the line table and the point table should have corresponding values, so that the integrity of GIS data can be ensured, and corresponding data service can be provided for the subsequent pipe network simulation calculation of natural gas. However, when the original GIS data is recorded manually, data deletion and the like inevitably exist, and when the attribute data of the line table and the point table are empty, the boundary condition assignment of the natural gas pipeline network simulation cannot be performed, and the situation that a pipe network is abnormal in the digital operation of the natural gas pipeline network is reflected.
Based on this, the application provides a data restoration method, electronic equipment, a computer readable storage medium and a computer program product of intelligent gas pipe network nodes, so as to improve the prior art.
Disclosure of Invention
The application aims to provide a data restoration method, electronic equipment, a computer readable storage medium and a computer program product for intelligent gas pipe network nodes, which have higher accuracy of restoration results and save labor time cost.
The purpose of the application is realized by adopting the following technical scheme:
in a first aspect, the present application provides a method for repairing data of a gas pipe network node, where the method includes:
acquiring GIS data, wherein the GIS data comprises point table data and line table data;
performing attribute null value inspection on the GIS data, and judging whether attribute deletion exists in the GIS data or not;
if the GIS data has the attribute missing, generating a pipe network topology according to a source field and a target field in the line table data;
and filling the attributes of the GIS data with the missing attributes according to the pipe network topology.
In some optional embodiments, the performing attribute filling on the GIS data with missing attributes according to the pipe network topology includes:
when the GIS data with the missing attribute is point table data, acquiring a node type of a first node in the pipe network topology, wherein the first node is a node with the missing type field, and the node type is used for indicating any one of the following: plug, two-way, three-way, four-way and multi-way;
And filling a type field of the first node according to the node type of the first node.
In some optional embodiments, the performing attribute filling on the GIS data with missing attributes according to the pipe network topology further includes:
when the GIS data with the missing attribute is point table data, performing depth traversal on a second node in the pipe network topology based on the node identification to obtain a source field and a target field after the depth traversal, wherein the second node is a node with the missing group_h field;
and aiming at each second node, taking a difference set of the source field and the target field after the depth traversal and a node_gid field of the second node, and selecting a node with a complete group_h field from the difference set to carry out point table attribute spreading so as to fill the group_h field of the second node.
In some alternative embodiments, the process of point table attribute propagation includes:
and filling the group_h field value of any one of the adjacent nodes with the complete group_h field to the group_h field of the second node aiming at each second node.
In some optional embodiments, the pipe network topology includes a subgraph, and the generating the pipe network topology according to the source field and the target field in the line table data includes:
When the GIS data with the missing attribute is line table data, generating a corresponding sub-graph according to a source field and a target field of a first pipeline, wherein the first pipeline is a pipeline with the missing line table attribute, and each sub-graph corresponds to a pipeline identifier;
performing attribute filling on the GIS data with missing attributes according to the pipe network topology, wherein the attribute filling comprises the following steps:
performing depth traversal on a first pipeline in the subgraph to obtain a pipe_gid field after depth traversal;
and taking the depth traversed pipe_gid field and the first pipe pipe_gid field as difference sets, and selecting a pipe with complete line table attribute from the difference sets to conduct line table attribute spreading so as to fill the line table attribute of the first pipe.
In some alternative embodiments, the process of wire form attribute propagation includes:
and filling the line table attribute value of any one adjacent pipeline with complete line table attribute into the corresponding field of the line table attribute of the first pipeline aiming at each first pipeline.
In some alternative embodiments, the process of wire form attribute propagation includes:
for each first pipe, filling the line table attribute value of the pipe with complete line table attributes and nearest to the starting point of the first pipe into the corresponding field of the line table attribute of the first pipe.
In some alternative embodiments, the method further comprises:
and storing the GIS data filled with the attributes into a preset database.
In a second aspect, the present application provides an electronic device comprising a memory storing a computer program and at least one processor configured to implement the following steps when executing the computer program:
acquiring GIS data, wherein the GIS data comprises point table data and line table data;
performing attribute null value inspection on the GIS data, and judging whether attribute deletion exists in the GIS data or not;
if the GIS data has the attribute missing, generating a pipe network topology according to a source field and a target field in the line table data;
and filling the attributes of the GIS data with the missing attributes according to the pipe network topology.
In some alternative embodiments, the at least one processor is configured to perform attribute population on GIS data with missing attributes according to the pipe network topology when executing the computer program in the following manner:
when the GIS data with the missing attribute is point table data, acquiring a node type of a first node in the pipe network topology, wherein the first node is a node with the missing type field, and the node type is used for indicating any one of the following: plug, two-way, three-way, four-way and multi-way;
And filling a type field of the first node according to the node type of the first node.
In some alternative embodiments, the at least one processor is configured to execute the computer program to perform attribute population on GIS data with missing attributes according to the pipe network topology by:
when the GIS data with the missing attribute is point table data, performing depth traversal on a second node in the pipe network topology based on the node identification to obtain a source field and a target field after the depth traversal, wherein the second node is a node with the missing group_h field;
and aiming at each second node, taking a difference set of the source field and the target field after the depth traversal and a node_gid field of the second node, and selecting a node with a complete group_h field from the difference set to carry out point table attribute spreading so as to fill the group_h field of the second node.
In some alternative embodiments, the at least one processor is configured to perform point table attribute propagation when executing the computer program further by:
and filling the group_h field value of any one of the adjacent nodes with the complete group_h field to the group_h field of the second node aiming at each second node.
In some alternative embodiments, the pipe network topology comprises a subgraph, and the at least one processor is configured to generate the pipe network topology from the source field and the target field in the wire table data when executing the computer program in the following manner:
when the GIS data with the missing attribute is line table data, generating a corresponding sub-graph according to a source field and a target field of a first pipeline, wherein the first pipeline is a pipeline with the missing line table attribute, and each sub-graph corresponds to a pipeline identifier;
the at least one processor is configured to perform attribute population on GIS data with missing attributes according to the pipe network topology when executing the computer program by:
performing depth traversal on a first pipeline in the subgraph to obtain a pipe_gid field after depth traversal;
and taking the depth traversed pipe_gid field and the first pipe pipe_gid field as difference sets, and selecting a pipe with complete line table attribute from the difference sets to conduct line table attribute spreading so as to fill the line table attribute of the first pipe.
In some alternative embodiments, the at least one processor is configured to perform, when executing the computer program, a row-table attribute propagation in the following manner:
And filling the line table attribute value of any one adjacent pipeline with complete line table attribute into the corresponding field of the line table attribute of the first pipeline aiming at each first pipeline.
In some alternative embodiments, the at least one processor is configured to execute the computer program to further implement the steps of:
and storing the GIS data filled with the attributes into a preset database.
In a third aspect, the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of any of the methods described above or performs the functions of the electronic device described above.
In a fourth aspect, the present application also provides a computer program product comprising a computer program which, when executed by at least one processor, performs the steps of any of the methods described above or performs the functions of the electronic device described above.
The technical scheme provided by the application has the following beneficial effects: when the GIS data has the attribute missing, the pipe network topology is automatically generated according to the source field and the target field in the line table data, and the data is repaired by utilizing the pipe network topology. By adopting the repairing method provided by the application for accurate repairing, the GIS manual repairing treatment time can be shortened, a treatment template is provided for GIS data treatment of each city in the whole country, the construction of an intelligent pipe network of the city is accelerated, and the feasibility of implementation of subsequent simulation calculation is improved. In addition, GIS attribute data restoration is systematically carried out in a point table attribute spreading and line table attribute spreading mode, and relatively complete attribute pipe network data can be obtained.
Drawings
The present application is further described below with reference to the drawings and examples.
Fig. 1 is a schematic flow chart of a data repairing method for a gas pipe network node according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a pipe network topology according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of another pipe network topology according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a topology sub-graph according to an embodiment of the present application.
Fig. 5 is a flow chart of another method for repairing data of a gas pipe network node according to an embodiment of the present application.
Fig. 6 is a schematic flow chart of an attribute spreading provided in an embodiment of the present application.
Detailed Description
In order to make the technical means, the inventive features, the achievement of the purpose and the effect achieved by the present application easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the specific drawings, and it is apparent that the described embodiments are some embodiments of the present application, not all embodiments.
All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be understood that the structures, proportions, sizes, etc. shown in the drawings are shown only in connection with the present disclosure, and are therefore not intended to limit the scope of the invention, which is defined by the claims, but are not to be limited to the specific details disclosed herein.
Also, the terms such as "upper," "lower," "left," "right," "middle," and "a" and the like recited in the present specification are merely for descriptive purposes and are not intended to limit the scope of the present application to which they may be applied, but rather to modify or adapt the relative relationship without materially altering the technical context.
Term interpretation:
GIS: urban gas pipe network geographic information system;
dot list: node information (including node_ gid, type, ground _h) in a geographic information system GIS of the urban gas network;
line list: pipeline information (including pipe_ gid, source, target, pipematerial, pipelength, pipediam, pressurerating, wallthickness) in a geographic information system GIS of the urban gas pipeline network;
node_id: a node identification;
pipe_id: a pipeline identifier;
source: a pipeline starting node mark;
target: a pipeline termination node identification;
type: type attribute of the node;
group_h: the height attribute of the node;
pipematerial: material properties of the pipe;
pipe length attribute;
pipediam: radius properties of the pipe;
pressing: pressure properties of the pipe;
wallthickness: wall thickness properties of the pipe.
Urban natural gas network Geographic Information System (GIS) contains topology data of natural gas network, which represents millions of users and voltage regulating facilities of the urban natural gas network system, if the data deviate, the simulation result of the natural gas network may deviate greatly, and the digital operation of gas dispatching cannot be performed smoothly. Therefore, ensuring the accuracy of GIS topological data is an important precondition for digital operation of the natural gas pipeline network.
GIS data is generally composed of a terminal node information table (point table for short) and a pipe network pipeline table (line table for short). The former represents various types of node data in the topology, and the node table contains information such as node identification, position name, attribute, type, coordinates, height and the like; the latter represents the pipeline data of the connecting node, and the line list comprises attribute information such as pipeline identification, position name, pipe length, pipe diameter, wall thickness, starting point identification, end point identification, coordinates and the like. When the timing meter is combined with the line meter, the accuracy of information in the natural gas pipe network can be reflected.
Under normal conditions, the attribute information in the line table and the point table should have corresponding values, so that the integrity of GIS data can be ensured, and corresponding data service can be provided for the subsequent pipe network simulation calculation of natural gas. However, when the original GIS data is recorded manually, the conditions such as data deletion and the like inevitably exist, and when the attribute data of the line table and the point table are empty, the boundary condition assignment of the natural gas pipeline network simulation cannot be performed, and the condition that one pipeline network is abnormal in the digital operation of the natural gas pipeline network is reflected, which is the condition that urban management is not acceptable.
In the early stage, in order to solve the problems of error, missing, incapability of mapping and the like of repairing topological data, the repairing can only be manually carried out by full-time staff, and in the aspects of accuracy and efficiency, the aging requirement of data management can not be met; with the continuous development of computer technology, an ARCGIS system (an infrastructure for drawing maps and geographic information) is generally used for assisting in manually repairing topology data, but when the data volume is large, the error rate and the missed rate of the manual repair are increased, and meanwhile, the requirement on personnel capacity is high. Technical solutions for local automatic repair have also begun to appear recently, but complete and systematic repair of GIS attribute data has not been achieved yet.
Based on this, the application provides a data restoration method, electronic equipment, a computer readable storage medium and a computer program product of intelligent gas pipe network nodes, so as to improve the prior art.
Method embodiment
Referring to fig. 1, fig. 1 is a flow chart of a data repairing method for a gas pipe network node according to an embodiment of the present application.
The method comprises the following steps:
step S101: acquiring GIS data, wherein the GIS data comprises point table data and line table data;
step S102: performing attribute null value inspection on the GIS data, and judging whether attribute deletion exists in the GIS data or not;
step S103: if the GIS data has the attribute missing, generating a pipe network topology according to a source field and a target field in the line table data;
step S104: and filling the attributes of the GIS data with the missing attributes according to the pipe network topology.
In this embodiment of the present application, the GIS data includes point table data and line table data, where the point table data is shown in table 1, and the line table data is shown in table 2.
Table 1:
table 2:
in the point table and line table data, there are some problems of attribute missing, such as missing type field and group_h field attributes in the point table. The pipeline field, the compression field, and the wallthickness field in the line table are missing. Thus, the method is applicable to a variety of applications. We need to solve the problem of missing point table and line table attributes.
And carrying out attribute null check on the GIS data, judging whether the GIS data has attribute missing, and further judging whether the data with the attribute missing is point table data or line table data.
In natural gas networks, many attribute data are also included, which are prepared for future finer, more accurate network simulation modeling: the three-dimensional space attribute of the node is reflected by the height in the point table; for example, the pipe diameter, the pipe length and the wall thickness of the pipeline in the line meter can reflect the conditions of the safety, the stability, the risk degree and the like of the pipeline. In order to ensure the integrity of the natural gas pipe network topology, the feasibility of pipe network simulation calculation and the reliability of the pipe network data operation, the method should be completely repaired, and adopts the technical means of correlation discrimination, assignment and the like.
In some embodiments, the performing attribute filling on the GIS data with missing attributes according to the pipe network topology (step S104) includes:
when the GIS data with the missing attribute is point table data, acquiring a node type of a first node in the pipe network topology, wherein the first node is a node with the missing type field, and the node type is used for indicating any one of the following: plug, two-way, three-way, four-way and multi-way;
And filling a type field of the first node according to the node type of the first node.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a pipe network topology according to an embodiment of the present application.
And P1, P2 and P3 are three nodes, according to the checking result of attribute null value checking, the type field of P3 is null value, the type attribute of the P3 node is lost in the point table data, and the pipe network topology is generated according to the source field and the target field in the line table data, as shown in the figure.
According to the correlation discrimination, it can be known that P1 corresponds to three pipelines, P2 corresponds to two pipelines, P3 corresponds to four pipelines, the node type of P3 is four-way, and the type field of the node of P3 is filled with the four-way.
In some embodiments, the performing attribute filling on the GIS data with missing attributes according to the pipe network topology (step S104) further includes:
when the GIS data with the missing attribute is point table data, performing depth traversal on a second node in the pipe network topology based on the node identification to obtain a source field and a target field after the depth traversal, wherein the second node is a node with the missing group_h field;
and aiming at each second node, taking a difference set of the source field and the target field after the depth traversal and a node_gid field of the second node, and selecting a node with a complete group_h field from the difference set to carry out point table attribute spreading so as to fill the group_h field of the second node.
In this embodiment, the traversal of the graph starts from a certain vertex in the graph, and the rest vertices in the graph are visited once. The graph is similar to a tree, except that each vertex of the graph is likely to be contiguous with all other vertices, and to avoid repeatedly accessing the same vertex, the traversal process should be marked that the vertex has been accessed
The traversing method of the graph comprises the following steps: depth-first search traversal (i.e., depth traversal) and breadth-first search traversal (i.e., breadth traversal), both traversal methods apply to undirected graphs, directed graphs. It can be known whether the graph is a connected graph or not through traversal of the graph.
The depth traversal is similar to the binary tree's first order traversal, searching for the depth direction as first as possible. The basic idea of depth traversal is as follows: starting from a certain vertex VO of the graph, accessing the vertex, and then sequentially starting depth-first search traversal from each non-accessed neighbor point of the VO until all vertices communicated with the VO are accessed. If the graph is not connected, after the operation is finished, the non-accessed vertex in another graph needs to be selected as a new starting point, and the operation is repeated.
Illustrating: and according to the checking result of the attribute null value checking, the node P2 lacks a group_h field, and the group_h fields of the node P1 and the node P3 are complete. When repairing data of the node P2, the attribute spreading is started from the node 2, and the value of the group_h field of the node 1 may be filled into the group_h field of the node 2, or the value of the group_h field of the node 3 may be filled into the group_h field of the node 2.
In some embodiments, the process of point table attribute propagation includes:
and filling the group_h field value of any one of the adjacent nodes with the complete group_h field to the group_h field of the second node aiming at each second node.
Illustrating: and P1, P2, P3, P4, P5 and P6 nodes are sequentially arranged in the pipe network topology, and if the nodes P2, P3 and P4 nodes all lack a group_h field. The group_h field of two adjacent nodes (P2 and P4) of the P3 is missing, the P3 node is filled finally, P2 and P4 nodes with complete group_h fields of the adjacent nodes are filled firstly, the group_h field of the P1 node is filled to the P2 node, the group_h field of the P5 node is filled to the P4 node, and finally the group_h field of the P1 node or the P2 node is filled to the P3 node.
The filling mode of the data of the adjacent nodes can be used for improving the data searching efficiency.
In some implementations, the process of point table attribute propagation includes:
and filling the group_h field value of the node which is complete and closest to the second node into the group_h field of the second node for each second node.
Compared with the mode of searching the nodes far away from the second node, the data filling method based on the priority can greatly shorten the data searching time and improve the data repairing efficiency.
In some embodiments, the pipe network topology includes a subgraph, and in step S103, generating the pipe network topology according to the source field and the target field in the line table data includes:
when the GIS data with the missing attribute is line table data, generating a corresponding sub-graph according to a source field and a target field of a first pipeline, wherein the first pipeline is a pipeline with the missing line table attribute, and each sub-graph corresponds to a pipeline identifier;
according to the pipe network topology, the performing attribute filling on the GIS data with missing attributes (step S104) includes:
performing depth traversal on a first pipeline in the subgraph to obtain a pipe_gid field after depth traversal;
and taking the depth traversed pipe_gid field and the first pipe pipe_gid field as difference sets, and selecting a pipe with complete line table attribute from the difference sets to conduct line table attribute spreading so as to fill the line table attribute of the first pipe.
Referring to fig. 3, fig. 3 is a schematic structural diagram of another pipe network topology according to an embodiment of the present application.
L1-L16 are 16 pipelines, corresponding fields (pipeline field, compression field and wallthickness field) of the line table attributes of L6, L7 and L15 are null values according to the checking result of the attribute null value checking, and in the line table data, the line table attributes of the L6, L7 and L15 pipelines are judged to be missing, and L6, L7 and L15 are the first pipelines.
Generating corresponding subgraphs according to source fields and target fields of the L6, L7 and L15 pipelines, as shown in fig. 4, fig. 4 is a schematic structural diagram of a topology subgraph provided in an embodiment of the present application. The source and target fields of the L6, L7, and L15 pipelines are shown in Table 3.
Table 3:
in one embodiment, the length of each tube is equal in size, expressed in 1 unit length. In the figure, the total length of L6 and L7 is 2, and the length of L15 is 1.
Illustrating: when the pipeline L6 is subjected to data restoration, the pipeline L6 starts to spread at the starting point (or the finishing point) of the pipeline 6, 1 unit length can be spread, the pipeline L8 with complete line table attribute is found, the pipeline L6 is filled with the line table attribute of the pipeline L8, or 2 units lengths can be spread, the pipeline L5 with complete line table attribute is found, the pipeline L6 is filled with the line table attribute of the pipeline L5, or 3 units lengths can be spread, the pipeline L10 with complete line table attribute is found, and the pipeline L6 is filled with the line table attribute of the pipeline L10.
In some embodiments, the process of wire table attribute propagation includes:
and filling the line table attribute value of any one adjacent pipeline with complete line table attribute into the corresponding field of the line table attribute of the first pipeline aiming at each first pipeline.
In some embodiments, the process of wire table attribute propagation includes:
for each first pipe, filling the line table attribute value of the pipe with complete line table attributes and nearest to the starting point of the first pipe into the corresponding field of the line table attribute of the first pipe.
Illustrating: as shown in fig. 3, the corresponding fields (pipeline field, compression field, and wallthickness field) of the line table attributes of L6, L7, and L15 are missing.
When repairing the data of the pipeline L6, the line table attribute of the pipeline L8 closest to the starting point of the pipeline L6 is filled into the pipeline L6. When repairing the data of the pipeline L7, the line table attribute of the pipeline L5 closest to the starting point of the pipeline L7 is filled into the pipeline L7. When repairing the data of the pipeline L15, the line table attribute of the pipeline L14 closest to the start point of the pipeline L15 is filled into the pipeline L15.
In addition to taking the starting point as a reference, the line table attribute value of the pipeline with complete line table attribute and nearest to the ending point of the first pipeline can be filled into the corresponding field of the line table attribute of the first pipeline by taking the ending point as a reference. In addition, the pipeline with complete line table attribute can be searched in a plurality of subgraphs.
It should be noted that: the data near the starting point of the pipeline is filled preferentially, so that the data searching time can be greatly shortened, and the data repairing efficiency is improved. In addition, the accuracy of the searching mode in the subgraph is low, so that the line table attribute value of the pipeline which is complete in line table attribute and closest to the starting point of the first pipeline is selected for filling, and the searching efficiency and the data filling accuracy can be improved.
In some embodiments, the method further comprises:
and storing the GIS data filled with the attributes into a preset database.
Referring to fig. 5 and fig. 6, fig. 5 is a schematic flow chart of another method for repairing data of a gas pipe network node according to an embodiment of the present application, and fig. 6 is a schematic flow chart of an attribute spreading according to an embodiment of the present application.
In a specific application scenario, an embodiment of the present application provides a method for repairing data of a gas pipe network node, where the method includes:
step S1: reading data of the point table and the line table, and judging whether the data with missing attributes is the point table data or the line table data;
Step S2: if the data attribute of the point table is missing, firstly, generating a graph by source, target data of the line table, then judging whether the type of the node is plug, two-way, three-way, four-way or multi-way, and then filling the type field correspondingly;
step S3: performing depth traversal of a generated graph on a point table node_gid with the missing group_h to obtain a source and a target after the depth traversal;
step S4: then, taking the source, target obtained after traversing and node_gid of the point table to be filled as a difference set, and taking any one data in the difference set to perform point table attribute spreading to obtain the point table data with complete group_h type;
step S5: if the data of the line table attribute is missing, firstly generating a graph through source and target of the line table attribute missing to obtain one or more subgraphs with different lengths, and then generating source, target data of the line table into a graph with a pipe_gid;
step S6: performing depth traversal by using source and target with missing line table attributes to obtain a pipe_gid after each source and target are subjected to depth traversal, taking the pipe_gid after the depth traversal and the pipe_gid with missing line table attributes as difference sets, and randomly taking one data from the difference sets to perform line table attribute propagation;
Step S7: and finally, storing the data after the propagation in a database.
According to the method, the topology attribute data in the Geographic Information System (GIS) of the urban natural gas pipe network is systematically and automatically repaired, the efficiency is improved, the time cost and the labor cost of data processing are reduced, a foundation is laid for natural gas pipe network simulation, and therefore the promotion of digital operation of the natural gas pipe network is accelerated.
The method and the device are used for solving the problem of data attribute missing in the GIS data management process, and the problem is seriously influenced and then simulation calculation is initiated. According to the GIS attribute data restoration method and device, GIS attribute data restoration is systematically carried out through the point and line table attribute spreading module, and relatively perfect attribute pipe network data can be obtained.
Compared with the method for manually repairing problematic data, the method for repairing the data has the advantages that the considered aspects are more, the repairing result is more accurate, and the cost of labor time is greatly saved. The automatic repair system is used for accurately repairing, so that the GIS manual repair treatment time can be shortened, a treatment template is provided for GIS data treatment of all cities nationwide in the future, intelligent pipe networks of the cities are built in an acceleration manner, and the feasibility of implementation of subsequent simulation calculation is improved.
Electronic device embodiment
The embodiment of the application also provides an electronic device, and the specific embodiment of the electronic device is consistent with the embodiment described in the embodiment of the method and the achieved technical effect, and part of the content is not repeated.
The electronic device comprises a memory storing a computer program and at least one processor configured to implement the following steps when executing the computer program:
acquiring GIS data, wherein the GIS data comprises point table data and line table data;
performing attribute null value inspection on the GIS data, and judging whether attribute deletion exists in the GIS data or not;
if the GIS data has the attribute missing, generating a pipe network topology according to a source field and a target field in the line table data;
and filling the attributes of the GIS data with the missing attributes according to the pipe network topology.
In some embodiments, the at least one processor is configured to perform attribute population of the GIS data with missing attributes according to the pipe network topology when executing the computer program in the following manner:
when the GIS data with the missing attribute is point table data, acquiring a node type of a first node in the pipe network topology, wherein the first node is a node with the missing type field, and the node type is used for indicating any one of the following: plug, two-way, three-way, four-way and multi-way;
And filling a type field of the first node according to the node type of the first node.
In some embodiments, the at least one processor is configured to execute the computer program to perform attribute population on the GIS data with missing attributes according to the pipe network topology further by:
when the GIS data with the missing attribute is point table data, performing depth traversal on a second node in the pipe network topology based on the node identification to obtain a source field and a target field after the depth traversal, wherein the second node is a node with the missing group_h field;
and aiming at each second node, taking a difference set of the source field and the target field after the depth traversal and a node_gid field of the second node, and selecting a node with a complete group_h field from the difference set to carry out point table attribute spreading so as to fill the group_h field of the second node.
In some embodiments, the at least one processor is configured, when executing the computer program, to perform point table attribute propagation further by:
and filling the group_h field value of any one of the adjacent nodes with the complete group_h field to the group_h field of the second node aiming at each second node.
In some embodiments, the pipe network topology comprises a subgraph, the at least one processor being configured to generate the pipe network topology from the source field and the target field in the wire table data when executing the computer program in the following manner:
when the GIS data with the missing attribute is line table data, generating a corresponding sub-graph according to a source field and a target field of a first pipeline, wherein the first pipeline is a pipeline with the missing line table attribute, and each sub-graph corresponds to a pipeline identifier;
the at least one processor is configured to perform attribute population on GIS data with missing attributes according to the pipe network topology when executing the computer program by:
performing depth traversal on a first pipeline in the subgraph to obtain a pipe_gid field after depth traversal;
and taking the depth traversed pipe_gid field and the first pipe pipe_gid field as difference sets, and selecting a pipe with complete line table attribute from the difference sets to conduct line table attribute spreading so as to fill the line table attribute of the first pipe.
In some embodiments, the at least one processor is configured, when executing the computer program, to further conduct a row-table attribute propagation in the following manner:
And filling the line table attribute value of any one adjacent pipeline with complete line table attribute into the corresponding field of the line table attribute of the first pipeline aiming at each first pipeline.
In some embodiments, the at least one processor is configured to execute the computer program to further implement the steps of:
and storing the GIS data filled with the attributes into a preset database.
In one embodiment, an electronic device may include, for example, at least one memory, at least one processor, and a bus connecting the different platform systems.
The memory may include readable media in the form of volatile memory, such as Random Access Memory (RAM) and/or cache memory, and may further include Read Only Memory (ROM).
The memory also stores a computer program executable by the processor to cause the processor to perform the steps described above.
The memory may also include utilities having at least one program module including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Accordingly, the processor may execute the computer program described above, as well as may execute the utility.
The processor may employ one or more application specific integrated circuits (ASICs, application Specific Integrated Circuit), DSPs, programmable logic devices (PLDs, programmable Logic Device), complex programmable logic devices (CPLDs, complex Programmable Logic Device), field programmable gate arrays (FPGAs, fields-Programmable Gate Array), or other electronic components.
The bus may be one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures.
The electronic device may also communicate with one or more external devices, such as a keyboard, pointing device, bluetooth device, etc., as well as with one or more devices capable of interacting with the electronic device, and/or with any device (e.g., router, modem, etc.) that enables the electronic device to communicate with one or more other computing devices. Such communication may be via an input-output interface. And, the electronic device may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through a network adapter. The network adapter may communicate with other modules of the electronic device via a bus. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with an electronic device in actual practice, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, data backup storage platforms, and the like.
Computer-readable storage medium embodiments
The embodiment of the application further provides a computer readable storage medium, and the specific embodiments of the computer readable storage medium are consistent with the technical effects achieved by the embodiments, and some of the details are not repeated.
The computer readable storage medium stores a computer program which, when executed by at least one processor, performs the steps or functions of any of the electronic devices described above.
The computer readable medium may be a computer readable signal medium or a computer readable storage medium. In the context of the present application, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable storage medium may also be any computer readable medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the C programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Computer program product embodiments
The embodiments of the present application further provide a computer program product, where specific embodiments of the computer program product are consistent with technical effects achieved by the foregoing embodiments, and some of the details are not described herein.
The present application provides a computer program product comprising a computer program which, when executed by at least one processor, performs the steps or functions of any one of the electronic devices described above.
The computer program product is configured to implement the steps of any of the methods described above or to implement the functions of any of the electronic devices described above. The computer program product may employ a portable compact disc read only memory (CD-ROM) and comprise program code and may run on a terminal device, such as a personal computer. However, the computer program product of the present invention is not limited thereto, and the computer program product may employ any combination of one or more computer readable media.
The present application is directed to functional enhancement and use elements, which are emphasized by the patent laws, such as the description and drawings, of the present application, but are not limited to the preferred embodiments of the present application, and therefore, all equivalents and modifications, equivalents, and modifications, etc. of the structures, devices, features, etc. of the present application are included in the scope of the present application.

Claims (8)

1. A method for repairing data of a gas pipe network node, the method comprising:
acquiring GIS data, wherein the GIS data comprises point table data and line table data;
performing attribute null value inspection on the GIS data, and judging whether attribute deletion exists in the GIS data or not;
if the GIS data has the attribute missing, generating a pipe network topology according to a source field and a target field in the line table data;
filling the attributes of the GIS data with the missing attributes according to the pipe network topology;
the pipe network topology comprises a subgraph, and the generating of the pipe network topology according to the source field and the target field in the line table data comprises the following steps:
when the GIS data with the missing attribute is line table data, generating a corresponding sub-graph according to a source field and a target field of a first pipeline, wherein the first pipeline is a pipeline with the missing line table attribute, and each sub-graph corresponds to a pipeline identifier;
performing attribute filling on the GIS data with missing attributes according to the pipe network topology, wherein the attribute filling comprises the following steps:
performing depth traversal on a first pipeline in the subgraph to obtain a pipe_gid field after depth traversal;
taking the depth traversed pipe_gid field and the first pipe pipe_gid field as difference sets, and selecting a pipe with complete line table attribute from the difference sets to conduct line table attribute spreading so as to fill the line table attribute of the first pipe;
According to the pipe network topology, performing attribute filling on the GIS data with missing attributes, and further comprising:
when the GIS data with the missing attribute is point table data, performing depth traversal on a second node in the pipe network topology based on the node identification to obtain a source field and a target field after the depth traversal, wherein the second node is a node with the missing group_h field;
and aiming at each second node, taking a difference set of the source field and the target field after the depth traversal and a node_gid field of the second node, and selecting a node with a complete group_h field from the difference set to carry out point table attribute spreading so as to fill the group_h field of the second node.
2. The method according to claim 1, wherein said performing attribute filling on GIS data with missing attributes according to the pipe network topology comprises:
when the GIS data with the missing attribute is point table data, acquiring a node type of a first node in the pipe network topology, wherein the first node is a node with the missing type field, and the node type is used for indicating any one of the following: plug, two-way, three-way, four-way and multi-way;
and filling a type field of the first node according to the node type of the first node.
3. The method of claim 1, wherein the process of propagating the point table attribute comprises:
and filling the group_h field value of any one of the adjacent nodes with the complete group_h field to the group_h field of the second node aiming at each second node.
4. A method according to claim 3, wherein the process of propagation of the thread attribute comprises:
and filling the line table attribute value of any one adjacent pipeline with complete line table attribute into the corresponding field of the line table attribute of the first pipeline aiming at each first pipeline.
5. A method according to claim 3, wherein the process of propagation of the thread attribute comprises:
for each first pipe, filling the line table attribute value of the pipe with complete line table attributes and nearest to the starting point of the first pipe into the corresponding field of the line table attribute of the first pipe.
6. An electronic device comprising a memory and at least one processor, the memory storing a computer program, the at least one processor being configured to implement the following steps when executing the computer program:
acquiring GIS data, wherein the GIS data comprises point table data and line table data;
Performing attribute null value inspection on the GIS data, and judging whether attribute deletion exists in the GIS data or not;
if the GIS data has the attribute missing, generating a pipe network topology according to a source field and a target field in the line table data;
filling the attributes of the GIS data with the missing attributes according to the pipe network topology;
the pipe network topology comprises a subgraph, the at least one processor being configured to generate the pipe network topology from the source field and the target field in the wire table data when executing the computer program in the following manner:
when the GIS data with the missing attribute is line table data, generating a corresponding sub-graph according to a source field and a target field of a first pipeline, wherein the first pipeline is a pipeline with the missing line table attribute, and each sub-graph corresponds to a pipeline identifier;
the at least one processor is configured to perform attribute population on GIS data with missing attributes according to the pipe network topology when executing the computer program by:
performing depth traversal on a first pipeline in the subgraph to obtain a pipe_gid field after depth traversal;
taking the depth traversed pipe_gid field and the first pipe pipe_gid field as difference sets, and selecting a pipe with complete line table attribute from the difference sets to conduct line table attribute spreading so as to fill the line table attribute of the first pipe;
The at least one processor is further configured to perform attribute population on the GIS data with missing attributes according to the pipe network topology when executing the computer program by:
when the GIS data with the missing attribute is point table data, performing depth traversal on a second node in the pipe network topology based on the node identification to obtain a source field and a target field after the depth traversal, wherein the second node is a node with the missing group_h field;
and aiming at each second node, taking a difference set of the source field and the target field after the depth traversal and a node_gid field of the second node, and selecting a node with a complete group_h field from the difference set to carry out point table attribute spreading so as to fill the group_h field of the second node.
7. A computer-readable storage medium, characterized in that a computer program is stored, which, when being executed by at least one processor, realizes the steps of the method of any one of claims 1-5 or the functions of the electronic device of claim 6.
8. A computer program product, characterized in that it comprises a computer program which, when executed by at least one processor, implements the steps of the method according to any one of claims 1-5 or the functions of the electronic device according to claim 6.
CN202311551382.2A 2023-11-21 2023-11-21 Data restoration method and related device for gas pipe network node Active CN117271500B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311551382.2A CN117271500B (en) 2023-11-21 2023-11-21 Data restoration method and related device for gas pipe network node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311551382.2A CN117271500B (en) 2023-11-21 2023-11-21 Data restoration method and related device for gas pipe network node

Publications (2)

Publication Number Publication Date
CN117271500A CN117271500A (en) 2023-12-22
CN117271500B true CN117271500B (en) 2024-02-13

Family

ID=89202966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311551382.2A Active CN117271500B (en) 2023-11-21 2023-11-21 Data restoration method and related device for gas pipe network node

Country Status (1)

Country Link
CN (1) CN117271500B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117454562B (en) * 2023-12-26 2024-03-15 北京云庐科技有限公司 Analysis method, analysis system and medium for topological structure of gas pipe network

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63234841A (en) * 1987-03-23 1988-09-30 三菱電機株式会社 Method of recognizing connection of power system
JP2000113020A (en) * 1998-10-07 2000-04-21 Meidensha Corp Method for preparing data for net analysis
CN110111410A (en) * 2019-03-22 2019-08-09 武汉众智鸿图科技有限公司 A kind of two three-dimensional pipe network data organizations and display methods based on spatial database
WO2022100233A1 (en) * 2020-11-12 2022-05-19 全球能源互联网研究院有限公司 Graph database-based power grid retrieval method and system
CN115034027A (en) * 2022-08-10 2022-09-09 上海叁零肆零科技有限公司 GIS data point-line mapping method and system
CN115080681A (en) * 2022-07-21 2022-09-20 上海叁零肆零科技有限公司 GIS data checking method and system
CN115774710A (en) * 2022-11-09 2023-03-10 深圳市赛易特信息技术有限公司 Gas pipe network data storage preprocessing method based on GIS system
CN116303870A (en) * 2023-03-21 2023-06-23 上海叁零肆零科技有限公司 Gas flow value mapping method and system for gas pipe network data management
CN116340305A (en) * 2023-04-24 2023-06-27 上海叁零肆零科技有限公司 Method and system for repairing uniqueness of meter line table in topology of gas pipe network

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63234841A (en) * 1987-03-23 1988-09-30 三菱電機株式会社 Method of recognizing connection of power system
JP2000113020A (en) * 1998-10-07 2000-04-21 Meidensha Corp Method for preparing data for net analysis
CN110111410A (en) * 2019-03-22 2019-08-09 武汉众智鸿图科技有限公司 A kind of two three-dimensional pipe network data organizations and display methods based on spatial database
WO2022100233A1 (en) * 2020-11-12 2022-05-19 全球能源互联网研究院有限公司 Graph database-based power grid retrieval method and system
CN115080681A (en) * 2022-07-21 2022-09-20 上海叁零肆零科技有限公司 GIS data checking method and system
CN115034027A (en) * 2022-08-10 2022-09-09 上海叁零肆零科技有限公司 GIS data point-line mapping method and system
CN115774710A (en) * 2022-11-09 2023-03-10 深圳市赛易特信息技术有限公司 Gas pipe network data storage preprocessing method based on GIS system
CN116303870A (en) * 2023-03-21 2023-06-23 上海叁零肆零科技有限公司 Gas flow value mapping method and system for gas pipe network data management
CN116340305A (en) * 2023-04-24 2023-06-27 上海叁零肆零科技有限公司 Method and system for repairing uniqueness of meter line table in topology of gas pipe network

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Jianjun Zhan.et al.Research on the Project Management of Thermal Pipe Network Engineering Based on Cs Mode.ICITEE '21: Proceedings of the 4th International Conference on Information Technologies and Electrical Engineering.2021,第1-5页. *
安宁市综合管网地理信息系统数据库设计;罗志清;测绘科学;第126, 132-133, 205-206页 *
点线表在燃气管网地理信息系统(GIS)数据录入中的应用;赵承等;科技创新导报;第90-92, 96 页 *
燃气-蒸汽联合循环供热机组综合管网地理信息系统应用;陈慧丽等;物联网技术;20170620;第87-92页 *

Also Published As

Publication number Publication date
CN117271500A (en) 2023-12-22

Similar Documents

Publication Publication Date Title
CN117271500B (en) Data restoration method and related device for gas pipe network node
Liu et al. 3D visualization of sub-surface pipelines in connection with the building utilities: Integrating GIS and BIM for facility management
CN109359351A (en) A kind of pipeline three-dimensional modeling method and pipe design method
CN107423214A (en) Software regression testing use-case acquisition methods, device and storage medium and electronic equipment
CN107103640B (en) Three-dimensional modeling method and system for urban underground pipeline
CN108170807A (en) Processing, method for drawing map, device, equipment and the storage medium of map datum
CN106649817A (en) Three-dimensional pipe model establishment lofting method and device for geography information system
CN105045815A (en) Data collecting method and apparatus
CN107688908A (en) Study and judge the method and device of construction safety risk
CN114662254A (en) Method for batch generation of drainage pipe network three-dimensional models based on space transformation
Nguyen et al. Realistic road path reconstruction from GIS data
CN111985014B (en) Modeling method and system based on standard atlas
CN112182871B (en) System and method for converting three-dimensional pipeline model into MapGIS model
CN112215864B (en) Contour processing method and device of electronic map and electronic equipment
WO2015080699A1 (en) Global grid building unfaulting sequence for complex fault-network topologies
CN109387193A (en) A kind of update method and device of indoor map
Bakalov et al. A network model for the utility domain
CN111503524B (en) Method for matching urban gas users with pressure regulating box
CN110619134B (en) Integrated detection and repair method for solving problem of flying spot and spot density of road network data
CN117171935B (en) Pipe network topology structure repairing method, equipment, system and chip
CN117591519B (en) High-performance pipe network data online editing method and system
CN117408006B (en) Rush repair scheme generation method, device, equipment and medium based on urban fuel pipe network
CN112950469B (en) Boundary identification method, splicing method and system, equipment and medium for elevation map
CN117290798B (en) Method, system and chip for overhauling abnormal data in topology data of gas pipe network
CN116151168B (en) Method, device, equipment and storage medium for determining equivalent conductor of grounding grid

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant