Geographic information data synchronization method, device, electronic device and storage medium
Through a unified storage organization model and data synchronization channel, the consistency problem of geographic information data synchronization under multi-structure and multi-storage models is solved, rapid data extraction and synchronization is achieved, and data synchronization needs between multiple centers are met.
Patent Information
- Application Number
- CN202410129712.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-31
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-01-31
AI Technical Summary
The existing data synchronization solution is mainly suitable for a single relational database management system, and it is difficult to maintain data consistency in a multi-structure and multi-storage model environment. Especially in geographic information data service centers, due to the region, service scope and functions Due to factors such as division of labor, the data resources of each node are different, making data synchronization difficult.
Adopt a unified storage organization model, receive subscription task requests through data synchronization channels, extract geographic information data and metadata information, and package them for feedback, using the combined storage method of vector layers and raster layers, through data bodies, data The structure of blocks and data buckets enables fast data extraction and synchronization, and supports the principle of spatial intersection or inclusion for data extraction and comparison to ensure data consistency.
It realizes the unified consistency maintenance of multi-structure and multi-storage model data, has the ability to quickly extract and store data for distributed storage environments, and meets the rapid transmission and consistency processing of data synchronization requirements between multiple centers.
Smart Images

Figure CN117668122B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of geographic information sharing technology, and in particular to a geographic information data synchronization method, device, electronic equipment and storage medium. Background Art
[0002] In order to achieve timely sharing of geographic information data between data centers, a large number of solutions for data synchronization and consistency maintenance have been proposed at home and abroad, mainly including the following: First, the streams solution proposed by ORACLE itself, which supports the dissemination of information between the same database or different databases to achieve data consistency. Second, independent third-party vendor solutions, such as the Quest-SharePlex solution implemented by Quest-Software, which analyzes the log information of the source oracle to generate transaction instructions and then transmits them to the destination for reloading to achieve data consistency, and supports real-time incremental synchronization. Third, the DSG-RealSync data disaster recovery replication technology provided by DSG, which is implemented in a similar way to the Quest-SharePlex solution and supports both initial synchronization and real-time incremental synchronization. Fourth, the SQL replication / synchronization solution proposed by SQLSERVER itself based on log mining and data comparison. The above data synchronization solutions basically only support a single relational database management system, and it is difficult to provide unified data consistency maintenance for data with multiple structures and storage models.
[0003] In the environment of stacked geographic information data service centers, the data resources of various geographic information data service center nodes are different due to factors such as location, service scope, and functional division of labor. In some scenarios, a central node may be unable to meet user needs due to lack of data resources from other nodes. Summary of the invention
[0004] Based on this, it is necessary to provide a geographic information data synchronization method, device, electronic device and storage medium that can provide unified data consistency maintenance for data of multiple structures and multiple storage models in response to the above technical problems.
[0005] The present invention provides a geographic information data synchronization method, which is applied to a data publishing terminal, and the method comprises:
[0006] Receiving a subscription task request from a data subscription end, and establishing a data synchronization channel with the data subscription end in response to the subscription task request;
[0007] Receiving a data order from a data subscriber through the data synchronization channel, and extracting corresponding geographic information data and metadata information corresponding to the geographic information data from a geographic database according to data requirements described in the data order;
[0008] Packaging the extracted geographic information data and metadata information, and feeding back the packaged geographic information data and metadata information to the data subscription end through the data synchronization channel;
[0009] The geographic information data is composed of a vector layer and a raster layer, and is stored in the geographic database through a unified storage organization model, and both the vector layer and the raster layer contain metadata information corresponding to the geographic information data;
[0010] The storage organization model consists of a data body, a data block and a data bucket. Each layer in the vector layer and the raster layer corresponds to a data body, and each data body consists of multiple data buckets, each data bucket consists of multiple data blocks, and each data block corresponds to an independently stored data block distribution bitmap, which is used to record the distribution of data blocks in the data bucket.
[0011] In one embodiment, receiving a data order from a data subscriber through the data synchronization channel, and extracting corresponding geographic information data and metadata information corresponding to the geographic information data from a geographic database according to data requirements described in the data order, includes:
[0012] Based on the storage organization model, all geographic information data whose spatial range of the subscription task request intersects with the spatial range in the geographic database are extracted according to the principle of spatial intersection or inclusion;
[0013] The data block is read from the geographic database to construct a target layer within the data block, and the target layer within the geographic range of the data block is converted into a byte stream in a specified format and written into a distributed file.
[0014] In one embodiment, the method further comprises:
[0015] Determine whether the data subscription end has a data bucket or data block corresponding to the target layer; if so,
[0016] Compare the target layer with the metadata information in the data bucket or data block, and if the metadata information comparison results are consistent, feed back the target layer to the data subscriber; if not,
[0017] When the target layer exists at the data subscription end, the data bucket or data block is added in the target layer, and when the target layer does not exist at the data subscription end, the data bucket or data block is added in the creation layer.
[0018] The present invention also provides a geographic information data synchronization method, which is applied to a data subscription terminal, and the method comprises:
[0019] Sending a subscription task request to a data publishing end, and establishing a data synchronization channel with the data publishing end based on the response of the data publishing end to the subscription task request;
[0020] Sending a data order to the data publishing end through the data synchronization channel, the data publishing end is used to extract corresponding geographic information data and metadata information corresponding to the geographic information data from the geographic database according to the data requirements described in the data order;
[0021] Receiving the packaged geographic information data and metadata information from the data publishing end through the data synchronization channel;
[0022] The geographic information data is composed of vector data and raster data, and is stored in the geographic database through a unified storage organization model, and both the vector data and raster data contain metadata information corresponding to the geographic information data;
[0023] The storage organization model consists of a data body, a data block and a data bucket. Each layer in the vector layer and the raster layer corresponds to a data body, and each data body consists of multiple data buckets, each data bucket consists of multiple data blocks, and each data block corresponds to an independently stored data block distribution bitmap, which is used to record the distribution of data blocks in the data bucket.
[0024] In one embodiment, the data publishing end is further used to extract all geographic information data that intersects the control range of the subscription task request and the control range of the geographic database based on the storage organization model and in accordance with the principle of spatial intersection or inclusion; and
[0025] The data publishing end is also used to read the data block from the geographic database to construct the target layer in the data block, and convert the target layer in the geographic range of the data block into a byte stream of a specified format and write it into a distributed file.
[0026] In one embodiment, the method further comprises:
[0027] Determine whether the data subscription end has a data bucket or data block corresponding to the target layer; if so,
[0028] Compare the target layer with the metadata information in the data bucket or data block, and receive the target layer fed back by the data publishing end when the metadata information comparison results are consistent; if not,
[0029] When the target layer exists on the data subscription end, the data bucket or data block is added to the target layer, and when the target layer does not exist on the data subscription end, the data bucket or data block is added to the creation layer.
[0030] The present invention also provides a geographic information data synchronization device, which is applied to a data publishing terminal, and the device comprises:
[0031] A request receiving module, used for receiving a subscription task request from a data subscription end, and establishing a data synchronization channel with the data subscription end in response to the subscription task request;
[0032] A data extraction module, used to receive a data order from a data subscriber through the data synchronization channel, and extract corresponding geographic information data and metadata information corresponding to the geographic information data from a geographic database according to the data requirements described in the data order;
[0033] A data synchronization module, used to package the extracted geographic information data and metadata information, and feed back the packaged geographic information data and metadata information to the data subscription end through the data synchronization channel;
[0034] The geographic information data is composed of a vector layer and a raster layer, and is stored in the geographic database through a unified storage organization model, and both the vector layer and the raster layer contain metadata information corresponding to the geographic information data;
[0035] The storage organization model consists of a data body, a data block and a data bucket. Each layer in the vector layer and the raster layer corresponds to a data body, and each data body consists of multiple data buckets, each data bucket consists of multiple data blocks, and each data block corresponds to an independently stored data block distribution bitmap, which is used to record the distribution of data blocks in the data bucket.
[0036] The present invention also provides a geographic information data synchronization device, which is applied to a data subscription terminal, and the device comprises:
[0037] A request sending module, used for sending a subscription task request to a data publishing end, and establishing a data synchronization channel with the data publishing end based on the response of the data publishing end to the subscription task request;
[0038] An order sending module, used for sending a data order to the data publishing terminal through the data synchronization channel, and the data publishing terminal is used for extracting corresponding geographic information data and metadata information corresponding to the geographic information data from the geographic database according to the data requirements described in the data order;
[0039] A data updating module, used for receiving the packaged geographic information data and metadata information from the data publishing end through the data synchronization channel;
[0040] The geographic information data is composed of vector data and raster data, and is stored in the geographic database through a unified storage organization model, and both the vector data and raster data contain metadata information corresponding to the geographic information data;
[0041] The storage organization model consists of a data body, a data block and a data bucket. Each layer in the vector layer and the raster layer corresponds to a data body, and each data body consists of multiple data buckets, each data bucket consists of multiple data blocks, and each data block corresponds to an independently stored data block distribution bitmap, which is used to record the distribution of data blocks in the data bucket.
[0042] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements any of the geographic information data synchronization methods described above when executing the computer program.
[0043] The present invention also provides a computer storage medium storing a computer program, wherein the computer program, when executed by a processor, implements any of the geographic information data synchronization methods described above.
[0044] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the geographic information data synchronization method as described in any one of the above is implemented.
[0045] In the above-mentioned geographic information data synchronization method, device, electronic device and storage medium, the data publishing end receives a subscription task request from the data subscription end, and establishes a data synchronization channel with the data subscription end in response to the subscription task request. Subsequently, the data order from the data subscription end is received through the data synchronization channel, and the corresponding geographic information data and the metadata information corresponding to the geographic information data are extracted from the geographic database according to the data requirements described in the data order. Finally, the extracted geographic information data and metadata information are packaged, and the packaged geographic information data and metadata information are fed back to the data subscription end through the data synchronization channel. The geographic information data is composed of vector layers and raster layers, and is stored in the geographic database through a unified storage organization model, and the vector layers and raster layers both contain metadata information corresponding to the geographic information data. In addition, the storage organization model is composed of a data body, a data block and a data bucket, each layer in the vector layer and the raster layer corresponds to a data body, and each data body is composed of multiple data buckets, each data bucket is composed of multiple data blocks, and each data block corresponds to an independently stored data block distribution bitmap for recording the distribution of data blocks in the data bucket. Therefore, this method designs a unified storage organization method for different types of geographic data, which has the ability to quickly extract and store data in a distributed storage environment, and provides a guarantee for the rapid transmission and consistency processing of data synchronization requirements among multiple centers. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 One of the flow charts of the geographic information data synchronization method provided by the present invention;
[0048] Figure 2 The second flowchart of the geographic information data synchronization method provided by the present invention;
[0049] Figure 3 The third flowchart of the geographic information data synchronization method provided by the present invention;
[0050] Figure 4 The fourth flowchart of the geographic information data synchronization method provided by the present invention;
[0051] Figure 5 The fifth flowchart of the geographic information data synchronization method provided by the present invention;
[0052] Figure 6 A schematic diagram of a multi-center data synchronization process of a geographic information data synchronization method in a specific embodiment of the present invention;
[0053] Figure 7 A schematic diagram of the overall architecture of a multi-center geographic information data synchronization solution of a geographic information data synchronization method in a specific embodiment provided by the present invention;
[0054] Figure 8 A schematic diagram of a geographic data storage organization model of a geographic information data synchronization method in a specific embodiment of the present invention;
[0055] Fig. 9 A schematic diagram of a geographic data storage structure of a geographic information data synchronization method in a specific embodiment of the present invention;
[0056] Fig.10 A schematic diagram of a concurrent data extraction process of a geographic information data synchronization method in a specific embodiment provided by the present invention;
[0057] Fig.11 A schematic diagram of a synchronization order information model based on subscription distribution of a geographic information data synchronization method in a specific embodiment provided by the present invention;
[0058] Fig.12 A schematic diagram of a resource content metamodel of a geographic information data synchronization method in a specific embodiment provided by the present invention;
[0059] Fig.13 A schematic diagram of a communication address information model of a geographic information data synchronization method in a specific embodiment provided by the present invention;
[0060] Fig.14 A schematic diagram of the communication address information transmission process of the broadcast message mode of the geographic information data synchronization method in the specific embodiment provided by the present invention;
[0061] Fig.15 A schematic diagram of the communication address information transmission process in the topic subscription mode of the geographic information data synchronization method in the specific embodiment provided by the present invention;
[0062] Fig.16 A schematic diagram of the data concurrent storage process of the geographic information data synchronization method in a specific embodiment provided by the present invention;
[0063] Fig.17 One of the structural schematic diagrams of the geographic information data synchronization device provided by the present invention;
[0064] Fig.18 The second structural diagram of the geographic information data synchronization device provided by the present invention;
[0065] Fig.19This is a diagram of the internal structure of the computer device provided by the present invention. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] Combine the following Figure 1-Figure 19 The present invention describes a geographic information data synchronization method, device, electronic device and storage medium.
[0068] like Figure 1 As shown, in one embodiment, a geographic information data synchronization method, applied to a data publishing terminal, includes the following steps:
[0069] Step S110, receiving a subscription task request from a data subscription end, and establishing a data synchronization channel with the data subscription end in response to the subscription task request.
[0070] Specifically, the data publishing end receives a subscription task request from the data subscribing end, and establishes a data synchronization channel with the data subscribing end in response to the subscription task request.
[0071] Step S120, receiving a data order from a data subscriber through a data synchronization channel, and extracting corresponding geographic information data and metadata information corresponding to the geographic information data from a geographic database according to the data requirements described in the data order.
[0072] Specifically, the data publisher receives the data order from the data subscriber through the data synchronization channel, and extracts the corresponding geographic information data and the metadata information corresponding to the geographic information data from the geographic database according to the data requirements described in the data order.
[0073] The geographic information data consists of vector layers and raster layers, and is stored in a geographic database through a unified storage organization model, and both the vector layers and the raster layers contain metadata information corresponding to the geographic information data. The storage organization model consists of a data body, a data block, and a data bucket. Each layer in the vector layer and the raster layer corresponds to a data body, and each data body consists of multiple data buckets, each data bucket consists of multiple data blocks, and each data block corresponds to an independently stored data block distribution bitmap, which is used to record the distribution of data blocks in the data bucket.
[0074] Step S130 , packaging the extracted geographic information data and metadata information, and feeding back the packaged geographic information data and metadata information to the data subscriber through a data synchronization channel.
[0075] Specifically, the data publishing end packages the extracted geographic information data and metadata information, and feeds back the packaged geographic information data and metadata information to the data subscription end through the data synchronization channel.
[0076] In the above-mentioned geographic information data synchronization method, the data publishing end receives a subscription task request from the data subscription end, and establishes a data synchronization channel with the data subscription end in response to the subscription task request. Subsequently, the data order from the data subscription end is received through the data synchronization channel, and the corresponding geographic information data and the metadata information corresponding to the geographic information data are extracted from the geographic database according to the data requirements described in the data order. Finally, the extracted geographic information data and metadata information are packaged, and the packaged geographic information data and metadata information are fed back to the data subscription end through the data synchronization channel. The geographic information data is composed of vector layers and raster layers, and is stored in the geographic database through a unified storage organization model, and the vector layers and raster layers both contain metadata information corresponding to the geographic information data. In addition, the storage organization model is composed of a data body, a data block and a data bucket, each layer in the vector layer and the raster layer corresponds to a data body, and each data body is composed of multiple data buckets, each data bucket is composed of multiple data blocks, and each data block corresponds to an independently stored data block distribution bitmap for recording the distribution of data blocks in the data bucket. Therefore, this method designs a unified storage organization method for different types of geographic data, which has the ability to quickly extract and store data in a distributed storage environment, and provides a guarantee for the rapid transmission and consistency processing of data synchronization requirements among multiple centers.
[0077] like Figure 2 As shown, in one embodiment, the geographic information data synchronization method provided by the present invention receives a data order from a data subscriber through a data synchronization channel, and extracts corresponding geographic information data and metadata information corresponding to the geographic information data from a geographic database according to the data requirements described in the data order, specifically including the following steps:
[0078] Step S122: Based on the storage organization model, all geographic information data whose spatial range of the subscription task request intersects with the spatial range in the geographic database are extracted according to the principle of spatial intersection or inclusion.
[0079] Specifically, the data publishing end extracts all geographic information data whose spatial range requested by the subscription task intersects with the spatial range in the geographic database based on the storage organization model and the principle of spatial intersection or inclusion.
[0080] Step S124, reading the data block from the geographic database to construct the target layer in the data block, and converting the target layer in the geographic range where the data block is located into a byte stream of a specified format and writing it into a distributed file.
[0081] Specifically, the data publisher reads data blocks from the geographic database to construct target layers within the data blocks, and converts the target layers within the geographic range of the data blocks into byte streams of a specified format and writes them into distributed files.
[0082] like Figure 3 As shown, in one embodiment, the geographic information data synchronization method provided by the present invention further includes the following steps:
[0083] Step S310, determining whether the data subscription end has a data bucket or data block corresponding to the target layer.
[0084] Step S320, compare the target layer and metadata information in the data bucket or data block, and feed back the target layer to the data subscriber when the metadata information comparison result is consistent.
[0085] Specifically, when the judgment result in step S310 is "yes", the data publishing end compares the metadata information in the target layer and the data bucket or data block, and feeds back the target layer to the data subscription end when the metadata information comparison result is consistent.
[0086] Step S330, when the target layer exists on the data subscription end, the data bucket or data block is added to the target layer, and when the target layer does not exist on the data subscription end, the data bucket or data block is added to the creation layer.
[0087] Specifically, when the judgment result in step S310 is "no", when the target layer exists on the data subscription end, the data bucket or data block is appended in the target layer, and when the target layer does not exist on the data subscription end, the data bucket or data block is appended in the creation layer.
[0088] like Figure 4 As shown, in one embodiment, a geographic information data synchronization method, applied to a data subscription end, includes the following steps:
[0089] Step S410: sending a subscription task request to the data publishing end, and establishing a data synchronization channel with the data publishing end based on the data publishing end's response to the subscription task request.
[0090] Specifically, the data subscriber sends a subscription task request to the data publisher, and establishes a data synchronization channel with the data publisher based on the response of the data publisher to the subscription task request.
[0091] Step S420, sending a data order to a data publishing terminal through a data synchronization channel, and the data publishing terminal is used to extract corresponding geographic information data and metadata information corresponding to the geographic information data from the geographic database according to the data requirements described in the data order.
[0092] Specifically, the data subscriber sends a data order to the data publisher through a data synchronization channel, and the data publisher is used to extract corresponding geographic information data and metadata information corresponding to the geographic information data from the geographic database according to the data requirements described in the data order.
[0093] Step S430, receiving the packaged geographic information data and metadata information from the data publishing end through the data synchronization channel.
[0094] Specifically, the data subscriber receives the packaged geographic information data and metadata information from the data publisher through the data synchronization channel.
[0095] like Figure 5 As shown, in one embodiment, the geographic information data synchronization method provided by the present invention further includes the following steps:
[0096] Step S510, determining whether the data subscription end has a data bucket or data block corresponding to the target layer.
[0097] Step S520, compare the target layer and metadata information in the data bucket or data block, and receive the target layer fed back by the data publishing end when the metadata information comparison results are consistent.
[0098] Specifically, when the judgment result in step S510 is "yes", the data subscriber will compare the metadata information in the target layer and the data bucket or data block, and receive the target layer fed back by the data publisher when the metadata information comparison results are consistent.
[0099] Step S530, when the target layer exists at the data subscription end, receiving the addition of data buckets or data blocks in the target layer, and when the target layer does not exist at the data subscription end, receiving the addition of data buckets or data blocks in the creation layer.
[0100] Specifically, when the judgment result in step S510 is "no", when the target layer exists on the data subscription end, the addition of data buckets or data blocks in the target layer is received, and when the target layer does not exist on the data subscription end, the addition of data buckets or data blocks in the creation layer is received.
[0101] See also Figure 6 and Figure 7As shown, in a specific embodiment, the present invention provides a method for synchronizing geographic information data, which designs high-concurrency access to geographic data for multiple centers, a synchronization task information model, and an update strategy for synchronization data, and realizes the extraction, access, and network transmission functions of geographic information data. The synchronous update of geographic data is implemented in a subscription / distribution-based operation mode, and its physical composition is mainly composed of two parts: a data subscriber and a data publisher. The data subscriber is responsible for initiating a subscription task and establishing data synchronization activities with the publisher. The two subscribers realize the interaction of shared data demand information based on the data order. Afterwards, the data publisher processes the data subscription request of the data subscriber, extracts the geographic data required for the data order, and performs shared transmission of the data. After receiving the data, the data subscriber updates the data into the warehouse according to the data synchronization update strategy.
[0102] In this embodiment, when the data subscriber sends a data synchronization request, it first builds a data synchronization order based on the requirements of the synchronization task information model and generates the resource metadata information that needs to be synchronized. After the resource metadata information is generated, the data subscriber will broadcast or subscribe to the information based on the information synchronization framework, and the transmission mode can be selected according to the actual scenario requirements. When the number of nodes is less than 5, the message broadcast mode can be selected, and when the number of nodes is greater than 5, the topic subscription mode is adopted. The data publisher node that receives the message analyzes the data synchronization order requirements, and builds a communication address form based on the data synchronization model, and uses the information synchronization framework to broadcast the address. After the data subscriber on the communication address form receives the message, it will establish a data transmission listening channel with the data publisher and wait for data to be sent. The data publisher will perform data extraction operations. The data publisher will extract data in parallel from the geographic database through data extraction based on the data requirements described in the data synchronization order. In order to improve the efficiency of data extraction, the data in the geographic database is stored using the geographic data storage organization model, and the metadata information of the extracted geographic data to be updated is packaged.
[0103] In this embodiment, the data publisher publishes the extracted geographic data organized in data buckets or data blocks and related metadata based on the previously established transmission channel. In order to increase the transmission rate of small data files, the data publisher server will package the small data files into a package and then transmit them together. After the data subscriber obtains the data package, it reads the published metadata information and updates the data based on the geographic data extraction and access interface according to the set data synchronization strategy.
[0104] It should be noted that during the data transmission process, data transmission may fail due to some unpredictable factors (such as network factors, storage space factors on the receiving end). For this, the data publisher server provides a retransmission mechanism. When there is a problem with data reception, the data will be automatically retransmitted until the data is successfully received. When the data subscriber's server is not started or is unreachable due to network reasons, the data cannot be sent to the data subscriber server immediately. At this time, the publisher server will automatically save the data to the publisher server. After the subscriber server is started or the network returns to normal, the publisher server will receive the startup message from the subscriber server, and the data publisher server will automatically send the data to the data subscriber server.
[0105] Combination Figure 8 As shown in the figure, geographic data is mainly composed of vector and raster data. In order to support high concurrent access to geographic data, a unified storage organization model is designed. Both vector and raster layers contain some basic metadata information, such as name, production time, resolution, scale, etc. These descriptive information will be uniformly stored in the relational database based on the metadata table. For core data content such as spatial information, due to the huge amount of data, the data body and distribution bitmap information are uniformly organized and stored in the distributed file system. In addition, the data content of vector or raster layers is organized and managed according to the three-layer logical structure of data body, data bucket and data block. Each layer corresponds to a data body, each data body consists of multiple data buckets, each data bucket consists of multiple data blocks, and each data bucket corresponds to an independently stored data block distribution bitmap. The distribution bitmap records the distribution of data blocks in the bucket, so as to quickly determine which data blocks already exist in the corresponding bucket in the current layer. The storage form of a distribution bitmap is a KV record in the distribution bitmap table. The distribution bitmap is stored and managed in buckets, which facilitates the append and update operations of layer data.
[0106] Combination Fig. 9As shown, in this embodiment, hybrid storage is performed through a heterogeneous storage environment, and basic layer information, layer association information (attribute information) and layer version information are stored in a relational database, and layer-associated bucket content information and specific data content information are stored in a distributed file system. According to the design plan, the layer information of the vector and raster data layers, the attribute information of the geographic target, the layer version information and the layer-associated bucket information are stored in the relational database. The specific element information of the layer will be distributed and stored based on the columnar sparse data management model, including the layer bucket content and the layer data block content. The global segmentation coding framework is used to divide the data bucket and the data block from a spatial perspective. The data bucket represents the largest grid that can cover a certain spatial range of geographic data. The grid where the data bucket is located is further segmented until the specified maximum segmentation level or grid capacity. All non-empty grids generated in the process are called data blocks, and the data block is the smallest unit for accessing geographic data. Each data block can store multiple types of geographic data such as vectors and rasters. Specific column families are designed according to different information forms and representations. The column structure under the column family can support unlimited online expansion and support comprehensive storage of geographic information attributes. The organization of data buckets and data blocks improves the efficiency of creating spatial indexes, making it possible for parallel data processing and parallel data entry and exit, thereby improving the overall synchronization efficiency of geographic data.
[0107] Combination Fig.10 As shown, in this embodiment, a geographic data access interface is designed to implement an access interface for fast extraction of vector and raster data. Data is extracted according to spatial relationships, and an interface for reading data by range is provided. Based on the principle of spatial intersection or inclusion, all data content that intersects the requested spatial range with the spatial range of elements in the target data set can be extracted. It also supports data extraction based on layer information, and provides an interface for accessing data by layer, which can extract all data content in the target data set that meets the query conditions.
[0108] Geographic data access loads and saves geographic elements in units of data blocks. When one or more geographic targets in a data block need to be loaded, the data access interface will read the data block from the storage layer, build the geographic targets in the data block and cache them. When storage is required, the geographic targets in the geographic range of the data block will be converted into a byte stream in a specified format and written into the distributed file system, and the relevant attribute data and metadata information of the geographic targets will be stored in the relational database. According to the defined vector and raster data storage organization model, all types of data stored in the library are organized and managed in the form of data blocks. Each data block has a specified ID number. The data access interface can realize the ability to correspond the requested spatial range information or layer information to the specified data block ID or data block ID set. Because each data block is stored in the physical storage environment in the form of KV, the key, that is, the data block ID, can be used to quickly access the specific data block, so the use of multi-threading can support parallel and rapid extraction of data content.
[0109] Combination Figures 11 to 13 As shown, in this embodiment, the synchronization task information model provides a unified abstract expression of synchronization task requirements for various types of data synchronization, and also provides support for information transmission of synchronization tasks, identification of synchronization data content, description of relevant network nodes that need to synchronize data, etc. The synchronization task information model consists of a data synchronization order information model, a resource content metamodel, and a communication address model. The synchronization order information model includes an order number, an order name, an order description, an order type, a creator, and a creation time, etc. The order number is a unique identification number for the order, and the order type includes homogeneous orders and heterogeneous orders. The resource content metamodel includes a source data source, a destination data source, and an object mapping relationship between the two. The source data source includes a storage type, an access address, and a synchronization object. The destination data source includes a storage type, an access address, and a synchronization object, and the mapping relationship includes attribute mapping and attribute conversion. The storage type is used to indicate what storage method the source and destination use, such as a relational database, a Nosql database, etc. Access information refers to the description information of each data source, and the content includes the name, address, port, user name, and password of the data storage environment. Synchronous objects refer to the metadata information of synchronized geographic data objects, mainly including the object's attribute name, type, length, constraints, and description. Attribute mapping is used to describe the attribute mapping relationship between the source and destination objects. Attribute conversion is used to describe the type conversion calculation rules of attribute values. The communication address model mainly describes the names and addresses of the two parties involved in synchronization, including the source name, source address, destination name, and destination address.
[0110] See also Fig.14 and 15As shown, in this embodiment, the information synchronization framework technology can actively load the transmission driver according to the transmission needs, and provide information synchronization transmission services based on modes such as topic subscription and broadcast message.
[0111] Among them, the broadcast message mode can send messages to multiple target sites, that is, a single message can be sent to multiple target sites using one instruction, and ensure that information is reliably provided to each site, such as two mechanisms based on Channel and mailbox. Among them, Channel communication is based on the underlying Socket communication of C++, which encapsulates the platform-independent Channel module. The message sender and the message receiver are connected through Channel. The message sender sends messages through the Channel interface, and the message receiver can listen to the messages of interest through the interface provided by Channel. Mailbox communication is that users can register a local mailbox through the mailbox manager, send messages through the mailbox, and listen to the messages of interest. Mailbox communication is a further encapsulation based on Channel communication. The message sender only needs to know the other party's "mailbox name" to send messages to it, which simplifies the use of message communication.
[0112] The topic subscription model refers to defining topic information. Users can subscribe to topic information. When information producers send information, they do not point to user queues, but to topic queues. The server pushes information to users who subscribe to this topic. In the subscription distribution model, messages are published by message producers to one or more topic queues. Subscribers who subscribe to related topics are message receivers, and message producers are called message senders. Unlike the end-to-end information transmission model, it requires users to subscribe to topics in advance. The list of subscription topics is often defined by system administrators or defined based on topic information provided by experts. When a message publisher needs to publish information, it only needs to send the information to the queue associated with the topic, which is often maintained by the subscription service. The message publisher only knows that the information is sent to a certain topic, but cannot know exactly which users subscribe to this topic. Usually, a topic will have multiple subscribers, and a message will be distributed to multiple subscribers by the subscription distribution service. This subscription distribution method is generally implemented through intra-topic broadcasting. Users who subscribe to the topic can receive the broadcast, while users who do not subscribe to the topic cannot hear the broadcast. This is different from information encryption. Encrypted information distribution may be received by all users, but only users who can decrypt can decrypt and view the information. The subscription distribution data transmission model is a model based on information push, in which messages are automatically broadcasted by the server to subscribers, and consumers do not need to request or poll topics to obtain new messages. However, if the user is not online when the server broadcasts, a reception message will be conveyed after the user comes online.
[0113] In this embodiment, when performing a synchronous update, if the corresponding data bucket or data block does not exist in the data center receiving the data, a layer is created and the data bucket or data block is appended to the created layer. If the corresponding layer exists in the data center receiving the data, but the data bucket or data block does not exist in the layer, the data bucket or data block is appended to the layer. If the corresponding layer exists and there is a corresponding data bucket or data block, it is necessary to compare the metadata to determine whether an update is required. Metadata is a description of the information of the data bucket or data block, and information such as the production unit, production time, and update time of the data can be obtained from the metadata of the data bucket or data block. During a synchronous update, the metadata of the data in the library is compared with the metadata to be updated to determine whether an update is necessary, thereby avoiding waste of resources and data confusion, and also reducing reliance on manual judgment during data synchronization. When updating data, the rules followed are shown in Table 1:
[0114] Table 1 Data update rules
[0115]
[0116] See also Fig.16 As shown, in this embodiment, in order to improve the speed of data update, the subscriber adopts a concurrent update strategy. When the publisher extracts data, the data is independently organized in data buckets or blocks. After receiving the data packet, the subscriber will restore it to the organization method in data buckets or blocks. When the data is updated, multiple threads are started for synchronous concurrent update, which can effectively improve the update speed.
[0117] The geographic information data synchronization device provided by the present invention is described below. The geographic information data synchronization device described below and the geographic information data synchronization method described above can be referenced to each other.
[0118] like Fig.17 As shown, in one embodiment, a geographic information data synchronization device is applied to a data publishing end, including a request receiving module 1710, a data extraction module 1720 and a data synchronization module 1730.
[0119] The request receiving module 1710 is used to receive a subscription task request from a data subscription end, and establish a data synchronization channel with the data subscription end in response to the subscription task request.
[0120] The data extraction module 1720 is used to receive data orders from the data subscriber through the data synchronization channel, and extract corresponding geographic information data and metadata information corresponding to the geographic information data from the geographic database according to the data requirements described in the data order.
[0121] The data synchronization module 1730 is used to package the extracted geographic information data and metadata information, and feed back the packaged geographic information data and metadata information to the data subscription end through the data synchronization channel.
[0122] The geographic information data consists of vector layers and raster layers, and is stored in a geographic database through a unified storage organization model. Both the vector layers and the raster layers contain metadata information corresponding to the geographic information data.
[0123] The storage organization model consists of data bodies, data blocks and data buckets. Each layer in the vector layer and raster layer corresponds to a data body, and each data body consists of multiple data buckets, each data bucket consists of multiple data blocks, and each data block corresponds to an independently stored data block distribution bitmap. The data block distribution bitmap is used to record the distribution of data blocks in the data bucket.
[0124] In this embodiment, the data extraction module of the geographic information data synchronization device provided by the present invention is specifically used for:
[0125] Based on the storage organization model, all geographic information data whose spatial range requested by the subscription task intersects with the spatial range in the geographic database are extracted according to the principle of spatial intersection or inclusion.
[0126] The data block is read from the geographic database to construct a target layer in the data block, and the target layer in the geographic range where the data block is located is converted into a byte stream in a specified format and written into a distributed file.
[0127] In this embodiment, the geographic information data synchronization device provided by the present invention further includes a first judgment module, which is used to:
[0128] Determine whether the data subscription end has a data bucket or data block corresponding to the target layer. If so,
[0129] Compare the metadata information in the target layer and the data bucket or data block, and if the metadata information comparison results are consistent, feed the target layer back to the data subscriber.
[0130] When the target layer exists on the data subscription side, the data bucket or data block is appended in the sending target layer, and when the target layer does not exist on the data subscription side, the data bucket or data block is appended in the sending creation layer.
[0131] like Fig.18 As shown, in one embodiment, a geographic information data synchronization device is applied to a data subscription end, including a request sending module 1810, an order sending module 1820 and a data update module 1830.
[0132] The request sending module 1810 is used to send a subscription task request to the data publishing end, and establish a data synchronization channel with the data publishing end based on the data publishing end's response to the subscription task request.
[0133] The order sending module 1820 is used to send data orders to the data publishing end through the data synchronization channel. The data publishing end is used to extract the corresponding geographic information data and the metadata information corresponding to the geographic information data from the geographic database according to the data requirements described in the data order.
[0134] The data update module 1830 is used to receive packaged geographic information data and metadata information from the data publishing end through the data synchronization channel.
[0135] The geographic information data consists of vector layers and raster layers, and is stored in a geographic database through a unified storage organization model. Both the vector layers and the raster layers contain metadata information corresponding to the geographic information data.
[0136] The storage organization model consists of data bodies, data blocks and data buckets. Each layer in the vector layer and raster layer corresponds to a data body, and each data body consists of multiple data buckets, each data bucket consists of multiple data blocks, and each data block corresponds to an independently stored data block distribution bitmap. The data block distribution bitmap is used to record the distribution of data blocks in the data bucket.
[0137] In this embodiment, the geographic information data synchronization device provided by the present invention further includes a second judgment module, which is used to:
[0138] Determine whether the data subscription end has a data bucket or data block corresponding to the target layer. If so,
[0139] Compare the target layer with the metadata information in the data bucket or data block, and receive the target layer from the data publisher if the metadata information comparison results are consistent.
[0140] When the target layer exists on the data subscription side, the data bucket or data block is added to the target layer, and when the target layer does not exist on the data subscription side, the data bucket or data block is added to the creation layer.
[0141] Fig.19 An example of a physical structure diagram of an electronic device is shown. The electronic device may be a smart terminal, and its internal structure diagram may be as follows: Fig.19As shown. The electronic device includes a processor, an internal memory and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for synchronizing geographic information data is implemented.
[0142] Those skilled in the art will understand that Fig.19 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present invention, and does not constitute a limitation on the electronic device to which the scheme of the present invention is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0143] On the other hand, the present invention also provides a computer storage medium storing a computer program, which implements a geographic information data synchronization method when executed by a processor.
[0144] In another aspect, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and when the processor executes the computer instructions, a method for synchronizing geographic information data is implemented.
[0145] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory.
[0146] By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0147] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0148] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for synchronizing geographic information data, characterized in that: Applied to a data publishing terminal, the method includes: Receiving a subscription task request from a data subscription end, and establishing a data synchronization channel with the data subscription end in response to the subscription task request; Receiving a data order from a data subscriber through the data synchronization channel, and extracting corresponding geographic information data and metadata information corresponding to the geographic information data from a geographic database according to data requirements described in the data order; Packaging the extracted geographic information data and metadata information, and feeding back the packaged geographic information data and metadata information to the data subscription end through the data synchronization channel; The geographic information data is composed of a vector layer and a raster layer, and is stored in the geographic database through a unified storage organization model, and both the vector layer and the raster layer contain metadata information corresponding to the geographic information data; The storage organization model is composed of a data body, a data block and a data bucket. Each layer in the vector layer and the raster layer corresponds to a data body, and each data body is composed of a plurality of data buckets, each data bucket is composed of a plurality of data blocks, and each data block corresponds to an independently stored data block distribution bitmap, and the data block distribution bitmap is used to record the distribution of data blocks in the data bucket; The receiving of the data order from the data subscriber through the data synchronization channel, and extracting corresponding geographic information data and metadata information corresponding to the geographic information data from the geographic database according to the data requirements described in the data order, includes: Based on the storage organization model, extracting all geographic information data whose spatial range of the subscription task request intersects with the spatial range of the geographic database according to the principle of spatial intersection or inclusion; Read the data block from the geographic database to construct a target layer in the data block, and convert the target layer in the geographic range where the data block is located into a byte stream in a specified format and write it into a distributed file; The method further comprises: Determine whether the data subscription end has a data bucket or data block corresponding to the target layer; if so, Compare the target layer with the metadata information in the data bucket or data block, and if the metadata information comparison results are consistent, feed back the target layer to the data subscriber; if not, When the target layer exists at the data subscription end, the data bucket or data block is added in the target layer, and when the target layer does not exist at the data subscription end, the data bucket or data block is added in the creation layer.
2. A geographic information data synchronization method, applied to a data subscription terminal, characterized in that: The method comprises: Sending a subscription task request to a data publishing end, and establishing a data synchronization channel with the data publishing end based on the response of the data publishing end to the subscription task request; Sending a data order to the data publishing end through the data synchronization channel, the data publishing end is used to extract corresponding geographic information data and metadata information corresponding to the geographic information data from the geographic database according to the data requirements described in the data order; Receiving the packaged geographic information data and metadata information from the data publishing end through the data synchronization channel; The geographic information data is composed of a vector layer and a raster layer, and is stored in the geographic database through a unified storage organization model, and both the vector layer and the raster layer contain metadata information corresponding to the geographic information data; The storage organization model is composed of a data body, a data block and a data bucket. Each layer in the vector layer and the raster layer corresponds to a data body, and each data body is composed of a plurality of data buckets, each data bucket is composed of a plurality of data blocks, and each data block corresponds to an independently stored data block distribution bitmap, and the data block distribution bitmap is used to record the distribution of data blocks in the data bucket; The data publishing end is further used to extract all geographic information data whose control range of the subscription task request intersects with the control range of the geographic database based on the storage organization model and in accordance with the principle of spatial intersection or inclusion; and The data publishing end is also used to read the data block from the geographic database to construct the target layer in the data block, and convert the target layer in the geographic range where the data block is located into a byte stream in a specified format and write it into a distributed file; The method further comprises: Determine whether the data subscription end has a data bucket or data block corresponding to the target layer; if so, Compare the target layer with the metadata information in the data bucket or data block, and receive the target layer fed back by the data publishing end when the metadata information comparison results are consistent; if not, When the target layer exists on the data subscription end, the data bucket or data block is added to the target layer, and when the target layer does not exist on the data subscription end, the data bucket or data block is added to the creation layer.
3. A geographic information data synchronization device, applied to a data publishing terminal, characterized in that: The device comprises: A request receiving module, used for receiving a subscription task request from a data subscription end, and establishing a data synchronization channel with the data subscription end in response to the subscription task request; A data extraction module, used to receive a data order from a data subscriber through the data synchronization channel, and extract corresponding geographic information data and metadata information corresponding to the geographic information data from a geographic database according to the data requirements described in the data order; A data synchronization module, used to package the extracted geographic information data and metadata information, and feed back the packaged geographic information data and metadata information to the data subscription end through the data synchronization channel; The geographic information data is composed of a vector layer and a raster layer, and is stored in the geographic database through a unified storage organization model, and both the vector layer and the raster layer contain metadata information corresponding to the geographic information data; The storage organization model is composed of a data body, a data block and a data bucket. Each layer in the vector layer and the raster layer corresponds to a data body, and each data body is composed of a plurality of data buckets, each data bucket is composed of a plurality of data blocks, and each data block corresponds to an independently stored data block distribution bitmap, and the data block distribution bitmap is used to record the distribution of data blocks in the data bucket; The receiving of the data order from the data subscriber through the data synchronization channel, and extracting corresponding geographic information data and metadata information corresponding to the geographic information data from the geographic database according to the data requirements described in the data order, includes: Based on the storage organization model, extracting all geographic information data whose spatial range of the subscription task request intersects with the spatial range of the geographic database according to the principle of spatial intersection or inclusion; Read the data block from the geographic database to construct a target layer in the data block, and convert the target layer in the geographic range where the data block is located into a byte stream in a specified format and write it into a distributed file; It also includes a first judgment module, which is used to: Determine whether the data subscription end has a data bucket or data block corresponding to the target layer; if so, Compare the metadata information in the target layer and the data bucket or data block, and feed back the target layer to the data subscriber if the metadata information comparison results are consistent; if not, When the target layer exists on the data subscription side, the data bucket or data block is appended in the sending target layer, and when the target layer does not exist on the data subscription side, the data bucket or data block is appended in the sending creation layer.
4. A geographic information data synchronization device, applied to a data subscription terminal, characterized in that: The device comprises: A request sending module, used for sending a subscription task request to a data publishing end, and establishing a data synchronization channel with the data publishing end based on the response of the data publishing end to the subscription task request; An order sending module, used for sending a data order to the data publishing terminal through the data synchronization channel, and the data publishing terminal is used for extracting corresponding geographic information data and metadata information corresponding to the geographic information data from the geographic database according to the data requirements described in the data order; A data updating module, used for receiving the packaged geographic information data and metadata information from the data publishing end through the data synchronization channel; The geographic information data is composed of a vector layer and a raster layer, and is stored in the geographic database through a unified storage organization model, and both the vector layer and the raster layer contain metadata information corresponding to the geographic information data; The storage organization model is composed of a data body, a data block and a data bucket. Each layer in the vector layer and the raster layer corresponds to a data body, and each data body is composed of a plurality of data buckets, each data bucket is composed of a plurality of data blocks, and each data block corresponds to an independently stored data block distribution bitmap, and the data block distribution bitmap is used to record the distribution of data blocks in the data bucket; The data publishing end is further used to extract all geographic information data whose control range of the subscription task request intersects with the control range of the geographic database based on the storage organization model and in accordance with the principle of spatial intersection or inclusion; and The data publishing end is also used to read the data block from the geographic database to construct the target layer in the data block, and convert the target layer in the geographic range where the data block is located into a byte stream in a specified format and write it into a distributed file; It also includes a second judgment module, which is used for: Determine whether the data subscription end has a data bucket or data block corresponding to the target layer; if so, Compare the target layer with the metadata information in the data bucket or data block, and receive the target layer fed back by the data publisher if the metadata information comparison results are consistent; if not, When the target layer exists on the data subscription side, the data bucket or data block is added to the target layer, and when the target layer does not exist on the data subscription side, the data bucket or data block is added to the creation layer.
5. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 or 2 are implemented.
6. A computer storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 or 2 are implemented.
