CN109492051B - Pipe network data synchronization method and device - Google Patents

Pipe network data synchronization method and device Download PDF

Info

Publication number
CN109492051B
CN109492051B CN201811224779.XA CN201811224779A CN109492051B CN 109492051 B CN109492051 B CN 109492051B CN 201811224779 A CN201811224779 A CN 201811224779A CN 109492051 B CN109492051 B CN 109492051B
Authority
CN
China
Prior art keywords
pipe network
original
pipe
network
new
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
CN201811224779.XA
Other languages
Chinese (zh)
Other versions
CN109492051A (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.)
Wuhan Zhongzhi Hongtu Technology Co ltd
Original Assignee
Wuhan Zhongzhi Hongtu 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 Wuhan Zhongzhi Hongtu Technology Co ltd filed Critical Wuhan Zhongzhi Hongtu Technology Co ltd
Priority to CN201811224779.XA priority Critical patent/CN109492051B/en
Publication of CN109492051A publication Critical patent/CN109492051A/en
Application granted granted Critical
Publication of CN109492051B publication Critical patent/CN109492051B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/18Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/14Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a method and a device for synchronizing pipe network data, comprising the following steps: when the original pipe network and the new pipe network are synchronized for the first time, synchronizing the equipment type information in the original pipe network to a classification metadata table of the new pipe network, and synchronizing the pipe network field information of the original pipe network to an equipment field metadata table of the new pipe network; copying the spatial data and the attribute data of the pipe point elements in the original pipe network to a pipe point table of a new pipe network, and copying the spatial data and the attribute data of the pipe section elements in the original pipe network to a pipe section table of the new pipe network; maintaining the topology information of the new pipe network according to the topology information of the original pipe network; and when the original pipe network and the new pipe network are synchronized for multiple times, identifying the change data in the original pipe network, and performing incremental synchronization on the new pipe network. When the original network data is changed and the new and old network data needs to be synchronized for two or more times, only the changed data in the original network can be synchronized to the new network, so that the repeated synchronization of the unchanged data is avoided.

Description

Pipe network data synchronization method and device
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a method and a device for synchronizing pipe network data.
Background
The pipe network model is designed for urban pipe network, includes establishing geometric topology and logic topology rules of pipe network graph and geographic elements and accurately expressing various connection relations of pipe network physical network, and is the basis for establishing underground pipe network information management system to provide guarantee for system data inquiry, editing, modification, statistics and data analysis.
At present, there are two main methods for establishing a pipe network model: one is to store the graph and the attribute data separately and connect the graph and the attribute data through keywords of attribute fields, and has the defects that the loose coupling of the graph and the attribute causes the maintenance of the association relationship to be complex, and the topological relationship between the graphic elements cannot be effectively managed; the other method is to adopt a hierarchical mode to uniformly manage attribute data, graphic data and topological relation data, such as an ARCGIS pipeline model (APDM) and an MAPGIS network model, and the defects of the network model are that the attribute data structure is fixed, the number of data layer levels is large, and the decision analysis and the comprehensive management of a complex network are difficult to realize. And an ARCGIS pipeline model (APDM) and a MAPGIS network model are closely connected with a data management mode of a software platform of the ARCGIS pipeline model and the MAPGIS network model, lack of uniformity and interoperation support and are not beneficial to information integration and function sharing among geographic networks.
Therefore, in the prior art, by establishing a pipe network model, a pipe network entity is abstracted into two types, namely a pipe point and a pipe section, the device types of the pipe point and the pipe section are uniformly stored in a device classification table, fields contained in devices are stored in a device field table, the pipe point and the pipe section are respectively associated with the device classification table through respective device classification identification codes dno, and the device classification table is associated with the device field table through a device classification identification code dno; the pipe network model stores the type information of the pipe points and the pipe section equipment in a unified manner through the equipment classification table, virtual layering of different types of pipe network facilities is realized, the number of data layers is effectively reduced, a pipe network does not need to be reconstructed when the types of the equipment are newly added, the complexity of field maintenance is reduced by means of the equipment field table, and the pipe network model can be used for optimizing storage and network topology maintenance of pipe network facility space and service information data in municipal public industries such as water supply, gas, heat supply, water drainage, pollution discharge, electric power and telecommunication. However, in practical applications, pipe network data of many pipeline ownership units are stored by using a MapGIS or ArcGIS pipe network model, and when a unified basic platform is constructed by using the pipe network model and unified pipe network data presentation and function services are provided to the outside, synchronization of the pipe network data is required.
Disclosure of Invention
Embodiments of the present invention provide a method and apparatus for synchronizing pipe network data, which overcome the above problems or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention provides a method for synchronizing pipe network data, including:
when the original pipe network and the new pipe network are synchronized for the first time, synchronizing the equipment type information in the original pipe network to a classification metadata table of the new pipe network, and synchronizing the pipe network field information of the original pipe network to an equipment field metadata table of the new pipe network;
copying the spatial data and the attribute data of the pipe point elements in the original pipe network to a pipe point table of a new pipe network, and copying the spatial data and the attribute data of the pipe section elements in the original pipe network to a pipe section table of the new pipe network;
maintaining the topology information of the new pipe network according to the topology information of the original pipe network;
and when the original pipe network and the new pipe network are synchronized for multiple times, identifying the change data in the original pipe network, and performing incremental synchronization on the new pipe network.
Preferably, when the original pipe network and the new pipe network are initially synchronized, before synchronizing the device type information in the original pipe network to the classification metadata table of the new pipe network, the method further includes:
acquiring the structural information of the original pipe network, reading a pipe network name and a pipe network code from the original pipe network, and copying the pipe network name and the pipe network code to a spatial database of a new pipe network;
reading the pipe point fields of the pipe point elements from the simple element classes of the original pipe network, creating a pipe point table of the new pipe network, and establishing a spatial index; and reading the pipe section fields of the pipe section elements from the simple element classes of the original pipe network, creating a pipe section table of the new pipe network, and establishing a spatial index.
Preferably, synchronizing the device type information in the original pipe network to the classification metadata table of the new pipe network, and synchronizing the pipe network field information of the original pipe network to the device field metadata table of the new pipe network specifically include:
creating an equipment classification metadata table and an equipment field metadata table in a new pipe network, acquiring equipment type information of an original pipe network from a network class of the original pipe network through a GetBlob interface, and copying the equipment type information to the equipment classification metadata table;
and reading the equipment field information from the simple element class or the object class of the original network through an att _ GetStru interface, and copying the equipment field information to the equipment field metadata table.
Preferably, after copying the device field information to the device field metadata table, the method further includes:
synchronizing default values, read-only values, visible values and preset values in the equipment field information to the equipment field metadata table;
the class identification dno for each device is defined in the device class metadata table while maintaining dno attribute values in the device field metadata table.
Preferably, after copying the spatial data and the attribute data of the pipe point element in the original pipe network to the pipe point table of the new pipe network and copying the spatial data and the attribute data of the pipe segment element in the original pipe network to the pipe segment table of the new pipe network, the method further includes:
creating an oeid field in a management point table of the new pipe network, wherein the oeid field is used for storing the element ID of the node element recorded in the network class of the original pipe network;
and creating an oeid field, a steid field and an edeid field in the pipe section table of the new pipe network, wherein the oeid field, the steid field and the edeid field are respectively used for storing the element ID, the front point ID and the rear point ID of the arc section element recorded in the network class of the original pipe network.
Preferably, the maintaining of the topology information of the new pipe network according to the topology information of the original pipe network specifically includes:
and updating the front point ID and the rear point ID of the pipe section table of the new pipe network based on the element ID of the node element, the element ID of the arc section element, the front point ID and the rear point ID recorded in the network class of the original pipe network, so as to update the topological relation of the new pipe network.
Preferably, identifying the change data in the original pipe network specifically includes:
and identifying newly added, deleted and modified pipe points and pipe sections in the original pipe network according to the timestamp and the element ID of the node element or the arc section element recorded in the original pipe network type recorded by the new pipe network.
In a second aspect, an embodiment of the present invention provides a pipe network data synchronization apparatus, including:
the first module is used for synchronizing the equipment type information in the original pipe network to a classification metadata table of the new pipe network and synchronizing the pipe network field information of the original pipe network to an equipment field metadata table of the new pipe network when the original pipe network and the new pipe network are synchronized for the first time;
copying the spatial data and the attribute data of the pipe point elements in the original pipe network to a pipe point table of a new pipe network, and copying the spatial data and the attribute data of the pipe section elements in the original pipe network to a pipe section table of the new pipe network;
maintaining the topology information of the new pipe network according to the topology information of the original pipe network;
and the second module is used for identifying the change data in the original pipe network and performing incremental synchronization on the new pipe network when the original pipe network and the new pipe network are synchronized for multiple times.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method for synchronizing data of a network as provided in the first aspect when executing the program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the method for synchronization of network data as provided in the first aspect.
The embodiment of the invention provides a pipe network data synchronization method and device, which can quickly and nondestructively synchronize and unify pipe network data (MapGIS and ArcGIS pipe network model data) stored by other GIS platforms in a pipe network model space database, and can only synchronize changed data in an original pipe network to a new pipe network when the original pipe network data is changed and the new and old pipe network data needs to be synchronized for two or more times, so that repeated synchronization of unchanged data is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a pipe network data synchronization method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a pipe network topology maintenance according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a pipe network data synchronization apparatus according to an embodiment of the present invention;
fig. 4 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the prior art, a pipe network model is established, a pipe network entity is abstracted into two types of pipe points and pipe sections, the equipment types of the pipe points and the pipe sections are uniformly stored in an equipment classification table, fields contained by equipment are stored in an equipment field table, the pipe points and the pipe sections are respectively associated with the equipment classification table through respective equipment classification identification codes dno, and the equipment classification table is associated with the equipment field table through equipment classification identification codes dno; the pipe network model stores the type information of the pipe points and the pipe section equipment in a unified manner through the equipment classification table, virtual layering of different types of pipe network facilities is realized, the number of data layers is effectively reduced, a pipe network does not need to be reconstructed when the types of the equipment are newly added, the complexity of field maintenance is reduced by means of the equipment field table, and the pipe network model can be used for optimizing storage and network topology maintenance of pipe network facility space and service information data in municipal public industries such as water supply, gas, heat supply, water drainage, pollution discharge, electric power and telecommunication. However, in practical applications, pipe network data of many pipeline ownership units are stored by using a MapGIS or ArcGIS pipe network model, and when a unified basic platform is constructed by using the pipe network model and unified pipe network data presentation and function services are provided to the outside, synchronization of the pipe network data is required. Therefore, the pipe network data synchronization method provided by the embodiments of the present invention can quickly and losslessly synchronize pipe network data (MapGIS, ArcGIS pipe network model data) stored in other GIS platforms to the pipe network model. The following description and description will proceed with reference being made to various embodiments.
Fig. 1 is a method for synchronizing pipe network data according to an embodiment of the present invention, including:
when the original pipe network and the new pipe network are synchronized for the first time, synchronizing the equipment type information in the original pipe network to a classification metadata table of the new pipe network, and synchronizing the pipe network field information of the original pipe network to an equipment field metadata table of the new pipe network;
copying the spatial data and the attribute data of the pipe point elements in the original pipe network to a pipe point table of a new pipe network, and copying the spatial data and the attribute data of the pipe section elements in the original pipe network to a pipe section table of the new pipe network;
maintaining the topology information of the new pipe network according to the topology information of the original pipe network;
and when the original pipe network and the new pipe network are synchronized for multiple times, identifying the change data in the original pipe network, and performing incremental synchronization on the new pipe network.
On the basis of the above embodiment, it is first necessary to determine whether the original pipe network and the new pipe network are in primary synchronization, which is divided into primary synchronization of the new pipe network and the old pipe network (i.e., the original pipe network and the new pipe network) and secondary or multiple synchronization of the new pipe network and the old pipe network.
On the basis of the above embodiment, when the original pipe network and the new pipe network are initially synchronized, before synchronizing the device type information in the original pipe network to the classification metadata table of the new pipe network, the method further includes:
acquiring the structural information of the original pipe network, reading a pipe network name and a pipe network code from the original pipe network, and copying the pipe network name and the pipe network code to a spatial database of a new pipe network;
reading the pipe point fields of the pipe point elements from the simple element classes of the original pipe network, creating a pipe point table of the new pipe network, and establishing a spatial index; and reading the pipe section fields of the pipe section elements from the simple element classes of the original pipe network, creating a pipe section table of the new pipe network, and establishing a spatial index.
On the basis of the above embodiment, synchronizing the device type information in the original pipe network to the classification metadata table of the new pipe network, and synchronizing the pipe network field information of the original pipe network to the device field metadata table of the new pipe network specifically include:
creating an equipment classification metadata table and an equipment field metadata table in a new pipe network, acquiring equipment type information of an original pipe network from a network class of the original pipe network through a GetBlob interface, and copying the equipment type information to the equipment classification metadata table;
and reading the equipment field information from the simple element class or the object class of the original network through an att _ GetStru interface, and copying the equipment field information to the equipment field metadata table.
In this embodiment, a device classification metadata table and a device field metadata table are created in a new network management mainly for creating a metadata table and synchronization metadata; acquiring equipment components of the pipe network from the network class of the original pipe network through a GetBlob interface, and copying equipment type information of the original pipe network to an equipment classification metadata table of a new pipe network; and reading pipe network field information from the simple element class or the object class of the original pipe network through an att _ GetStru interface, and copying the pipe network field information to a device field metadata table of the new pipe network.
On the basis of the above embodiment, after copying the device field information to the device field metadata table, the method further includes:
synchronizing default values, read-only values, visible values and preset values in the equipment field information to the equipment field metadata table;
the class identification dno for each device is defined in the device class metadata table while maintaining dno attribute values in the device field metadata table.
In this embodiment, default values, whether read-only, whether visible, preset values, etc. in the field information of the synchronization device are set; the classification identification dno of each device is defined in the device classification metadata table of the pipe network, and dno attribute values in the device field metadata table are maintained.
In order to realize the synchronization of the spatial data and the attribute data, the spatial data and the attribute data of elements of the original management node, such as a pressure measuring point, a valve, a water receiving point, a water pool, a water source and the like, are read from simple elements of the original management node through a ReadNodTable interface and are copied to a management node table of a new management node; the method comprises the steps of reading space data and attribute data of pipe section elements of an original pipe network from simple element classes of the original pipe network through a ReadLinTable interface, copying the space data and the attribute data to a pipe section table of a new pipe network, and maintaining the attributes dno of equipment classification identifiers of a pipe point table and a pipe section table according to equipment classification identifiers defined in a pipe network equipment element table.
On the basis of the above embodiment, after copying the spatial data and the attribute data of the pipe point element in the original pipe network to the pipe point table of the new pipe network and copying the spatial data and the attribute data of the pipe section element in the original pipe network to the pipe section table of the new pipe network, the method further includes:
creating an oeid field in a management point table of the new pipe network, wherein the oeid field is used for storing the element ID of the node element recorded in the network class of the original pipe network;
and creating an oeid field, a steid field and an edeid field in the pipe section table of the new pipe network, wherein the oeid field, the steid field and the edeid field are respectively used for storing the element ID, the front point ID and the rear point ID of the arc section element recorded in the network class of the original pipe network.
In this embodiment, in the process of synchronizing the spatial data and the attribute data, the updated unique identification codes of the pipe point elements and the pipe section elements in the new pipe network are renumbered in sequence, and the topology connection relationship, which is adopted by the database of the new pipe network to record the unique identification codes of the two pipe points participating in the pipe section formation in the pipe section table so as to maintain, is reset; in order to enable the topological relation of the pipe network to be automatically maintained in the information updating process without reestablishing the topological relation through the spatial relation, in the spatial data and attribute data synchronization process of the embodiment of the invention, oeid fields are established in a node table of a spatial database of a new pipe network and used for storing element IDs of node elements recorded in the network class of the original pipe network so as to help establish the corresponding relation between the unique identification of the new pipe network node and the element ID of the node element of the original pipe network; creating oeid field, steid field and edeid field in the segment table of the new management space database, respectively storing the element ID, front point ID and back point ID of the original network arc segment element, so as to help establish the corresponding relation between the unique identifier of the new management segment and the element ID of the original network arc segment element, and the corresponding relation between the front point ID and the back point ID of the new management segment element and the front point ID and the back point ID of the original management segment element.
On the basis of the above embodiment, during the initial synchronization, the maintaining of the topology information of the new pipe network according to the topology information of the original pipe network specifically includes:
and updating the front point ID and the rear point ID of the pipe section table of the new pipe network based on the element ID of the node element of the original pipe network and the element ID, the front point ID and the rear point ID of the arc section element of the original pipe network, thereby updating the topological relation of the new pipe network.
In this embodiment, as shown in fig. 2, in the pipe network topology maintenance process, according to the element ID of the node element of the original pipe network and the element ID, the front point ID, and the back point ID of the arc segment element, which are stored in the spatial data and attribute data synchronization process in the foregoing embodiment, the front point ID and the back point ID of the pipe segment table element of the new pipe network database are updated, so as to update the topological relationship of the pipe network, specifically:
updating the front point ID of the pipe section element through an SQL statement (selected gid from pipe point table where the pipe section table is), namely, assigning the gid value of the corresponding pipe point table to the front point ID of the pipe section element as a new value when the steid of the pipe section table is equal to the pipe point table oeid; updating the back point ID of the pipe section element by an SQL statement (select gid from pipe point table where pipe section table oeid), namely, using the gid value of the corresponding pipe point table when the edeid of the pipe section table is equal to the pipe point table oeid as the new value to be assigned to the back point ID of the pipe section element.
On the basis of the above embodiment, identifying the change data in the original pipe network specifically includes:
and identifying newly added, deleted and modified pipe points and pipe sections in the original pipe network according to the time stamp and the element ID of the node element or the arc section element of the original pipe network recorded by the new pipe network.
In this embodiment, when the original pipe network and the new pipe network are synchronized for a plurality of times, that is, when synchronization is performed for two or more times, the method includes:
(1) identification of changed data: identifying newly added, deleted and modified pipe points and pipe sections in the original pipe network according to the time stamp and the element ID of the node element or the arc section element of the original pipe network recorded by the new pipe network; if the element ID of the node element or the arc segment element of the original pipe network is not stored in the node table or the oeid field of the new pipe network or the oeid field of the pipe segment table, the node element or the pipe segment element of the original pipe network is judged to be a newly added element of the original pipe network; if the element ID of the node element or the arc element of the original pipe network which is recorded by the new pipe network and synchronized last time does not exist in the original pipe network, determining that the node element or the arc element of the original pipe network is deleted in the original pipe network; and if the updating time of the node element or the arc segment element of the original pipe network, which is recorded by the new pipe network and synchronized last time, is inconsistent with the updating time of the corresponding element of the original pipe network, judging that the pipe node element or the pipe segment element is modified in the original pipe network.
(2) And (3) changing data synchronization: copying the identified newly added pipe point elements of the original pipe network, the space data and the attribute data of the pipe section elements to a pipe point table and a pipe section table of the new pipe network; deleting the deleted pipe point elements and the deleted space data and attribute data of the pipe section elements in the new pipe network; and taking the identified spatial data and attribute data of the pipe point elements and the pipe section elements modified by the original pipe network as the updating data of the corresponding elements of the new pipe network management point table and the pipe section table.
(3) Maintaining a topological relation: and keeping consistent with the maintenance of the topological relation in the primary synchronization of the pipe network, establishing the corresponding relation between the front point ID and the rear point ID of the element of the new pipe network section and the front point ID and the rear point ID of the element of the original pipe network section by storing the element ID of the node element of the original pipe network in the pipe point table of the new pipe network and storing the element ID, the front point ID and the rear point ID of the element of the arc section of the original pipe network in the pipe section table of the new pipe network, and assisting in maintaining the topological relation between the pipe section and the pipe point.
Fig. 3 is a pipe network data synchronization apparatus provided in an embodiment of the present invention, where the pipe network data synchronization method according to the foregoing embodiments includes:
a first module 30, configured to synchronize device type information in an original pipe network to a classification metadata table of a new pipe network and synchronize pipe network field information of the original pipe network to a device field metadata table of the new pipe network when the original pipe network and the new pipe network are initially synchronized;
copying the spatial data and the attribute data of the pipe point elements in the original pipe network to a pipe point table of a new pipe network, and copying the spatial data and the attribute data of the pipe section elements in the original pipe network to a pipe section table of the new pipe network;
maintaining the topology information of the new pipe network according to the topology information of the original pipe network;
and a second module 40, configured to identify change data in the original pipe network and perform incremental synchronization on the new pipe network when the original pipe network and the new pipe network perform multiple synchronization.
Fig. 4 is a schematic entity structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 4, the electronic device may include: a processor (processor)810, a communication Interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication Interface 820 and the memory 830 communicate with each other via the communication bus 840. The processor 810 may invoke a computer program stored on the memory 830 and executable on the processor 810 to perform the method for synchronizing data of a network provided by the above embodiments, for example, including:
when the original pipe network and the new pipe network are synchronized for the first time, synchronizing the equipment type information in the original pipe network to a classification metadata table of the new pipe network, and synchronizing the pipe network field information of the original pipe network to an equipment field metadata table of the new pipe network;
copying the spatial data and the attribute data of the pipe point elements in the original pipe network to a pipe point table of a new pipe network, and copying the spatial data and the attribute data of the pipe section elements in the original pipe network to a pipe section table of the new pipe network;
maintaining the topology information of the new pipe network according to the topology information of the original pipe network;
and when the original pipe network and the new pipe network are synchronized for multiple times, identifying the change data in the original pipe network, and performing incremental synchronization on the new pipe network.
In addition, the logic instructions in the memory 830 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Embodiments of the present invention further provide a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the method for synchronizing data of a network management provided in the foregoing embodiments when executed by a processor, and the method includes:
when the original pipe network and the new pipe network are synchronized for the first time, synchronizing the equipment type information in the original pipe network to a classification metadata table of the new pipe network, and synchronizing the pipe network field information of the original pipe network to an equipment field metadata table of the new pipe network;
copying the spatial data and the attribute data of the pipe point elements in the original pipe network to a pipe point table of a new pipe network, and copying the spatial data and the attribute data of the pipe section elements in the original pipe network to a pipe section table of the new pipe network;
maintaining the topology information of the new pipe network according to the topology information of the original pipe network;
and when the original pipe network and the new pipe network are synchronized for multiple times, identifying the change data in the original pipe network, and performing incremental synchronization on the new pipe network.
Embodiments of the present invention also provide a computer program product, the computer program product includes a computer program stored on a non-transitory computer readable storage medium, the computer program includes program instructions, when the program instructions are executed by a computer, the computer can execute the pipe network data synchronization method as described above, for example, the computer includes:
when the original pipe network and the new pipe network are synchronized for the first time, synchronizing the equipment type information in the original pipe network to a classification metadata table of the new pipe network, and synchronizing the pipe network field information of the original pipe network to an equipment field metadata table of the new pipe network;
copying the spatial data and the attribute data of the pipe point elements in the original pipe network to a pipe point table of a new pipe network, and copying the spatial data and the attribute data of the pipe section elements in the original pipe network to a pipe section table of the new pipe network;
maintaining the topology information of the new pipe network according to the topology information of the original pipe network;
and when the original pipe network and the new pipe network are synchronized for multiple times, identifying the change data in the original pipe network, and performing incremental synchronization on the new pipe network.
In summary, the pipe network data synchronization method and apparatus provided in the embodiments of the present invention can synchronize unified pipe network data (MapGIS, ArcGIS pipe network model data) stored in other GIS platforms quickly and losslessly in a pipe network model space database, and when the original pipe network data is changed and two or more times of synchronization of new and old pipe network data are required, only the changed data in the original pipe network can be synchronized to the new pipe network, so as to avoid repeated synchronization of the unchanged data.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for synchronizing network data, comprising:
when the original pipe network and the new pipe network are synchronized for the first time, synchronizing the equipment type information in the original pipe network to a classification metadata table of the new pipe network, and synchronizing the pipe network field information of the original pipe network to an equipment field metadata table of the new pipe network;
copying the spatial data and the attribute data of the pipe point elements in the original pipe network to a pipe point table of a new pipe network, and copying the spatial data and the attribute data of the pipe section elements in the original pipe network to a pipe section table of the new pipe network;
in the process of synchronizing the spatial data and the attribute data, updated pipe point elements and unique identification codes of pipe section elements in the new pipe network are sequentially renumbered, and a topological connection relation, which is adopted by a database of the new pipe network and used for recording the unique identification codes of two pipe points participating in forming the pipe section in a pipe section table so as to maintain, is reset; creating an oeid field in a management point table of the new pipe network, wherein the oeid field is used for storing the element ID of the node element recorded in the network class of the original pipe network;
creating an oeid field, a steid field and an edeid field in a pipe section table of the new pipe network, wherein the oeid field, the steid field and the edeid field are respectively used for storing an element ID, a front point ID and a rear point ID of an arc section element recorded in an original pipe network class;
reading the space data and attribute data of the elements of the original management node from the simple elements of the original management network through a ReadNodTable interface, and copying the space data and the attribute data to a node table of a new management network; reading space data and attribute data of pipe section elements of an original pipe network from simple element classes of the original pipe network through a ReadLinTable interface, copying the space data and the attribute data to a pipe section table of a new pipe network, and maintaining the attributes dno of equipment classification identifiers of a pipe point table and a pipe section table according to equipment classification identifiers defined in a pipe network equipment element table;
maintaining the topology information of the new pipe network according to the topology information of the original pipe network;
and when the original pipe network and the new pipe network are synchronized for multiple times, identifying the change data in the original pipe network, and performing incremental synchronization on the new pipe network.
2. The pipe network data synchronization method according to claim 1, wherein when the original pipe network and the new pipe network are initially synchronized, the method synchronizes the device type information in the original pipe network to the classification metadata table of the new pipe network, and further comprising:
acquiring the structural information of the original pipe network, reading a pipe network name and a pipe network code from the original pipe network, and copying the pipe network name and the pipe network code to a spatial database of a new pipe network;
reading the pipe point fields of the pipe point elements from the simple element classes of the original pipe network, creating a pipe point table of the new pipe network, and establishing a spatial index; and reading the pipe section fields of the pipe section elements from the simple element classes of the original pipe network, creating a pipe section table of the new pipe network, and establishing a spatial index.
3. The pipe network data synchronization method according to claim 1, wherein synchronizing the device type information in the original pipe network to the classification metadata table of the new pipe network and synchronizing the pipe network field information of the original pipe network to the device field metadata table of the new pipe network specifically comprises:
creating an equipment classification metadata table and an equipment field metadata table in a new pipe network, acquiring equipment type information of an original pipe network from a network class of the original pipe network through a GetBlob interface, and copying the equipment type information to the equipment classification metadata table;
and reading the equipment field information from the simple element class or the object class of the original network through an att _ GetStru interface, and copying the equipment field information to the equipment field metadata table.
4. The pipe network data synchronization method according to claim 3, wherein after copying the device field information to the device field metadata table, the method further comprises:
synchronizing default values, read-only values, visible values and preset values in the equipment field information to the equipment field metadata table;
the class identification dno for each device is defined in the device class metadata table while maintaining dno attribute values in the device field metadata table.
5. The pipe network data synchronization method according to claim 1, wherein maintaining topology information of a new pipe network according to topology information of an original pipe network specifically comprises:
and updating the front point ID and the rear point ID of the pipe section table of the new pipe network based on the element ID of the node element recorded in the original pipe network class and the element ID, the front point ID and the rear point ID of the arc section element recorded in the original pipe network class, so as to update the topological relation of the new pipe network.
6. The pipe network data synchronization method according to claim 1, wherein identifying changed data in an original pipe network specifically comprises:
and identifying newly added, deleted and modified pipe points and pipe sections in the original pipe network according to the timestamp and the element ID of the node element or the arc section element recorded in the original pipe network type recorded by the new pipe network.
7. A pipe network data synchronization apparatus, comprising:
the first module is used for synchronizing the equipment type information in the original pipe network to a classification metadata table of the new pipe network and synchronizing the pipe network field information of the original pipe network to an equipment field metadata table of the new pipe network when the original pipe network and the new pipe network are synchronized for the first time;
copying the spatial data and the attribute data of the pipe point elements in the original pipe network to a pipe point table of a new pipe network, and copying the spatial data and the attribute data of the pipe section elements in the original pipe network to a pipe section table of the new pipe network;
in the process of synchronizing the spatial data and the attribute data, updated pipe point elements and unique identification codes of pipe section elements in the new pipe network are sequentially renumbered, and a topological connection relation, which is adopted by a database of the new pipe network and used for recording the unique identification codes of two pipe points participating in forming the pipe section in a pipe section table so as to maintain, is reset; creating an oeid field in a management point table of the new pipe network, wherein the oeid field is used for storing the element ID of the node element recorded in the network class of the original pipe network;
creating an oeid field, a steid field and an edeid field in a pipe section table of the new pipe network, wherein the oeid field, the steid field and the edeid field are respectively used for storing an element ID, a front point ID and a rear point ID of an arc section element recorded in an original pipe network class;
reading the space data and attribute data of the elements of the original management node from the simple elements of the original management network through a ReadNodTable interface, and copying the space data and the attribute data to a node table of a new management network; reading space data and attribute data of pipe section elements of an original pipe network from simple element classes of the original pipe network through a ReadLinTable interface, copying the space data and the attribute data to a pipe section table of a new pipe network, and maintaining the attributes dno of equipment classification identifiers of a pipe point table and a pipe section table according to equipment classification identifiers defined in a pipe network equipment element table;
maintaining the topology information of the new pipe network according to the topology information of the original pipe network;
and the second module is used for identifying the change data in the original pipe network and performing incremental synchronization on the new pipe network when the original pipe network and the new pipe network are synchronized for multiple times.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 6 are implemented when the processor executes the program.
9. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201811224779.XA 2018-10-19 2018-10-19 Pipe network data synchronization method and device Active CN109492051B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811224779.XA CN109492051B (en) 2018-10-19 2018-10-19 Pipe network data synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811224779.XA CN109492051B (en) 2018-10-19 2018-10-19 Pipe network data synchronization method and device

Publications (2)

Publication Number Publication Date
CN109492051A CN109492051A (en) 2019-03-19
CN109492051B true CN109492051B (en) 2021-10-22

Family

ID=65692496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811224779.XA Active CN109492051B (en) 2018-10-19 2018-10-19 Pipe network data synchronization method and device

Country Status (1)

Country Link
CN (1) CN109492051B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441988A (en) * 2013-08-02 2013-12-11 广东电网公司电力科学研究院 Data migration method crossing GIS platforms
CN103914564A (en) * 2014-04-18 2014-07-09 山东泰华电讯有限责任公司 Method and system for updating and warehousing urban pipelines on basis of ArcGIS (geographic information system)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9740727B2 (en) * 2008-10-10 2017-08-22 Abb Schweiz Ag Method and a system for replicating databases

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441988A (en) * 2013-08-02 2013-12-11 广东电网公司电力科学研究院 Data migration method crossing GIS platforms
CN103914564A (en) * 2014-04-18 2014-07-09 山东泰华电讯有限责任公司 Method and system for updating and warehousing urban pipelines on basis of ArcGIS (geographic information system)

Also Published As

Publication number Publication date
CN109492051A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109669983B (en) Visual multi-data-source ETL tool
US9648059B2 (en) System and methods for multi-user CAx editing conflict management
CN106033436B (en) Database merging method
CN106325933B (en) Batch data synchronous method and device
US20230127055A1 (en) Global column indexing in a graph database
CN107977396B (en) Method and device for updating data table of KeyValue database
TW200842627A (en) Techniques to cross-synchronize data
CN104239439A (en) Selective database replication
CN111930768B (en) Incremental data acquisition method, incremental data transmission method, incremental data acquisition device, incremental data transmission device and computer storage medium
CN103631924B (en) A kind of application process and system of distributive database platform
CN106933837A (en) A kind of database table model and creation method
JP2018200683A (en) Method and design of automated examination system
CN110716950B (en) Caliber system establishment method, caliber system establishment device, caliber system establishment equipment and computer storage medium
US20160098494A1 (en) Integration of analysis with multi-user cad
CN103631967B (en) A kind of processing method and processing device of the tables of data with independent increment identification field
CN114329096A (en) Method and system for processing native map database
CN113420026A (en) Database table structure changing method, device, equipment and storage medium
CN111177244A (en) Data association analysis method for multiple heterogeneous databases
CN115858513A (en) Data governance method, data governance device, computer equipment and storage medium
CN115858810A (en) Method, system, computer device and storage medium for automatically constructing knowledge graph
CN107491558A (en) Metadata updates method and device
CN114185991A (en) Method and related device for realizing data synchronization based on distributed database
CN115329011A (en) Data model construction method, data query method, data model construction device and data query device, and storage medium
CN115687503A (en) Method, device and equipment for synchronizing data among databases and storage medium
CN109492051B (en) Pipe network data synchronization method and device

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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A pipeline network data synchronization method and device

Effective date of registration: 20230613

Granted publication date: 20211022

Pledgee: Wuhan area branch of Hubei pilot free trade zone of Bank of China Ltd.

Pledgor: WUHAN ZHONGZHI HONGTU TECHNOLOGY CO.,LTD.

Registration number: Y2023420000231

PE01 Entry into force of the registration of the contract for pledge of patent right