A storage method for ship positioning data based on spatiotemporal grid and tree fusion

By introducing a storage method that integrates space-time grids and B+ trees in traditional databases, the efficient storage and query problems of massive ship positioning data are solved, and the effect of rapid search and narrowing of the search range is achieved, avoiding the problem of spatial index expansion.

CN114398459BActive Publication Date: 2025-04-18HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210048823.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-17
Publication Date
2025-04-18
Estimated Expiration
2042-01-17

AI Technical Summary

Technical Problem

Traditional databases are difficult to efficiently store and query massive ship positioning data, especially lacking optimization in terms of temporal characteristics and spatiotemporal sequence data.

Method used

The distributed storage method of the fusion of spatiotemporal mesh and B+ tree is adopted to index the metadata through spatiotemporal mesh encoding, and the metadata block is managed using B+ tree to quickly find and narrow the search range of the target data.

Benefits of technology

It realizes efficient storage and query of massive ship positioning data, solves the performance bottlenecks of traditional databases in terms of timing and spatiotemporal sequence data, and avoids the problem of spatial index swelling with the increase in data volume.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398459B_ABST
    Figure CN114398459B_ABST
Patent Text Reader

Abstract

The present invention discloses a storage method for the fusion of space-time grid and tree for ship positioning data. The present invention uses three dimensions of time, longitude and latitude to construct a space-time grid, and models the metadata of a single ship positioning data in the space-time grid; and slices the metadata according to the time range to form a metadata block, and uses a B+ tree to manage the metadata block; in the metadata block, a space-time grid code is constructed, and the metadata is sequentially stored in a metadata array according to the ascending order of the space-time grid code; in the data storage process, as time passes, metadata blocks and metadata are automatically established according to the time range slices, and the ship positioning data is stored in a storage node at the same time. The present invention uses the space-time grid code as a metadata index to realize rapid metadata search according to space-time conditions; the metadata is sliced ​​according to the time range to form a metadata block, and the metadata block is managed by a B+ tree, so as to realize rapid narrowing of the search range of the target data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of marine ship positioning data storage, and in particular to a storage method for ship positioning data by integrating spatiotemporal grid and tree. Background Art

[0002] With the popularization of positioning terminals in marine vessels, massive amounts of ship positioning data are continuously recorded. Faced with actual scenarios of ship collisions, shipwrecks, and accident rescue, LBS (a service centered around geographic location data) needs to query the historical trajectory of ships within any time and space range. Reasonable storage models and indexes can fundamentally improve the query performance of ship point data. However, traditional relational databases are difficult to support the storage of massive amounts of ship positioning data. At the same time, although NoSQL databases can meet the storage needs of massive amounts of general data, they do not have specific optimizations for the storage and query of spatiotemporal series data. Therefore, storage solutions for efficient queries of ship positioning data have become a key issue that urgently needs to be improved.

[0003] Traditional databases mainly rely on tree structures to build indexes. PostGIS provides support for storing spatial geographic data for PostgreSQL, and uses R-trees and GiST to implement spatial indexes, which speeds up orthogonal queries. Oracle spatial provides two spatial indexing schemes based on linear quadtrees and reference trees. The above tree structures are based on data organization and encoding methods, and the entire tree structure construction process is driven by the data input it receives. As subsequent data is inserted, the structure of the entire tree will also need to be dynamically adjusted accordingly. Frequent changes to the structure of the entire tree will reduce the performance of data writing.

[0004] Grid-structured indexes have simple construction characteristics and efficient construction performance, so they are often used to index spatial data. GeoMesa is a geographic spatial index built on databases such as Bigtable, implemented using the Geohash algorithm. MongoDB's spatial index type is 2dsphere, which first divides the earth's surface into multiple grids of different levels, and then uses B+ trees to index the generated grids. The S2 library developed by Google represents spatial data on a three-dimensional sphere, making it possible to establish a global geographic database without singular points, and then construct a spatial grid index. However, in the time series scenario, the above indexes do not take into account the time series characteristics of positioning data. Summary of the invention

[0005] According to the deficiencies of the prior art and targeting the temporal characteristics of massive ship positioning data, the present invention proposes a distributed storage method integrating spatiotemporal grid and B+ tree for ship positioning data, providing an efficient storage and query solution for massive ship positioning data.

[0006] The present invention models metadata by adopting a spatiotemporal grid approach to ship positioning data, and uses the spatiotemporal grid code as an index, thereby achieving the purpose of searching by spatiotemporal range; by slicing metadata into metadata blocks according to time regions, and managing the metadata blocks in a B+ tree, the search range of target data can be quickly narrowed, and at the same time, the problem of continuous expansion of spatial indexes as the amount of data grows in existing spatial databases is solved.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] Step (1): The attributes of ship positioning data include longitude, latitude, time, equipment number, speed, direction, temperature, etc. In view of the multi-key value characteristics of ship positioning data, the three dimensions of time, longitude and latitude are used to construct a spatiotemporal grid to achieve metadata modeling of a single ship positioning data in the spatiotemporal grid, where the metadata attributes include: the longitude and latitude, time and disk address of the ship positioning data.

[0009] The above-mentioned space-time grid is divided according to fixed intervals of time, longitude and latitude.

[0010] Step (2): In view of the temporal characteristics of massive ship positioning data, the metadata is segmented according to time regions to form metadata blocks, and the metadata blocks are managed using a B+ tree, where one metadata block is a B+ tree node.

[0011] The process of dividing the metadata block is as follows: taking out the time attribute T of the metadata, and aggregating the metadata into metadata blocks by dividing T at fixed time intervals.

[0012] Step (3): In the metadata block, a spatiotemporal grid code based on the Hilbert filling curve is constructed for the spatiotemporal features of the metadata modeling, and the metadata is stored in the metadata array in ascending order of the spatiotemporal grid code.

[0013] The above-mentioned space-time grid coding generation process is as follows: within the metadata block, based on the principle of locality, all space-time grids are connected by a single Hilbert curve, and the space-time grids passed by the curve are coded in ascending order starting from 0.

[0014] When there are multiple ship positioning data in the same space-time grid, the space-time grid codes of multiple metadata are the same. In the metadata array storage process, the first metadata is stored in the array, and the subsequent metadata are referenced by the previous metadata through the disk address attribute in a linked list manner.

[0015] Step (4): Based on the metadata information and metadata block information, metadata blocks and their metadata are automatically created according to time slices as time goes by, and the ship positioning data is stored in the storage node.

[0016] Step (5): When a user queries data, the metadata block is located through the B+ tree according to the time zone of the user's query; in the metadata block, the spatiotemporal grid code is calculated according to the time and longitude and latitude range in the query condition, and the location of the metadata is located in the metadata array using the spatiotemporal grid code as an index, and the metadata information is obtained; in the metadata, the disk address of the ship positioning data is read in sequence; according to the queried disk address, data is obtained from the storage node and the query is responded to.

[0017] Compared with the prior art, the present invention has the following beneficial effects:

[0018] 1. In the metadata array, the spatiotemporal grid code is used as the index to achieve the purpose of quickly finding metadata.

[0019] 2. By sharding metadata according to time zones to form metadata blocks and managing metadata blocks with B+ trees, the search scope of target data can be quickly narrowed.

[0020] 3. The storage method of dividing by time slices solves the problem of continuous expansion of spatial indexes over time in existing spatial databases. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 :Schematic diagram of the fusion of spatiotemporal grid index and B+ tree.

[0022] Figure 2 : Schematic diagram of the Hilbert filling curve of a three-dimensional space-time grid. DETAILED DESCRIPTION

[0023] The following will be combined with the attached Figure 1 The present invention is further described with specific implementation steps:

[0024] Step (1): The attributes of ship positioning data include longitude, latitude, time, equipment number, speed, direction, temperature, etc. In view of the multi-key value characteristics of ship positioning data, the three dimensions of time, longitude and latitude are used to construct a spatiotemporal grid to achieve metadata modeling of a single ship positioning data in the spatiotemporal grid, where the metadata attributes include: the longitude and latitude, time and disk address of the ship positioning data.

[0025] The above-mentioned spatiotemporal grid is divided according to fixed intervals of time, longitude and latitude. In this embodiment, the grid division is performed by taking the time interval of 10 minutes and the longitude and latitude intervals of 0.5 degrees as an example.

[0026] Step (2): In view of the temporal characteristics of massive ship positioning data, the metadata is segmented according to time regions to form metadata blocks, and the metadata blocks are managed using a B+ tree, where one metadata block is a B+ tree node.

[0027] The process of dividing metadata blocks is as follows: according to the time attribute T of metadata, the metadata is aggregated into metadata blocks by dividing them into T intervals of fixed duration.

[0028] Step (3): In the metadata block, a spatiotemporal grid code based on the Hilbert filling curve is constructed for the spatiotemporal features of the metadata modeling, and the metadata is stored in the metadata array in ascending order of the spatiotemporal grid code.

[0029] The above-mentioned space-time grid coding generation process is as follows: In the metadata block, according to the locality principle, all space-time grids are connected by a single Hilbert curve, and the space-time grids passed by the curve are coded in order from 0. The Hilbert filling curve of the three-dimensional space-time grid is as follows: Figure 2 shown.

[0030] The specific method for calculating the spatiotemporal grid code according to latitude, longitude and time is shown in Algorithm 1:

[0031]

[0032]

[0033] When there are multiple ship positioning data in the same space-time grid, the space-time grid codes of multiple metadata are the same. During the metadata array storage process, the first metadata should be stored in the array, and the subsequent metadata are referenced by the previous metadata through the disk address attribute in a linked list manner.

[0034] Step (4): Based on the metadata information and metadata block information, metadata blocks and their metadata are automatically created according to time slices as time goes by, and the ship positioning data is stored in the storage node.

[0035] Step (5): When a user queries data, the metadata block is located through the B+ tree according to the time zone of the user's query; in the metadata block, the spatiotemporal grid code is calculated according to the time and longitude and latitude range in the query condition, and the location of the metadata is located in the metadata array using the spatiotemporal grid code as an index, and the metadata information is obtained; in the metadata, the disk address of the ship positioning data is read in sequence; according to the queried disk address, data is obtained from the storage node and the query is responded to.

[0036] The above shows and describes the basic principles, main features and advantages of the present invention. The above embodiments do not limit the present invention in any form, and any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.

Claims

1. A storage method for ship positioning data based on spatiotemporal grid and tree fusion, characterized in that: The method comprises the following steps: Step (1): Based on the multi-key value characteristics of the ship positioning data, a spatiotemporal grid is constructed using the three dimensions of time, longitude and latitude to achieve metadata modeling of a single ship positioning data in the spatiotemporal grid, wherein the metadata attributes include: the latitude and longitude, time and disk address of the ship positioning data; Step (2): In view of the temporal characteristics of massive ship positioning data, the metadata is segmented according to time regions to form metadata blocks, and the metadata blocks are managed using a B+ tree, where one metadata block is a B+ tree node; Step (3): In the metadata block, a spatiotemporal grid code based on the Hilbert filling curve is constructed for the spatiotemporal features of the metadata modeling. The spatiotemporal grid code starts from 0 and increases in ascending order. The metadata is stored in the metadata array in sequence according to the ascending order of the spatiotemporal grid code. Step (4): Based on the metadata information and metadata block information, metadata blocks and their metadata are automatically created according to time slices as time goes by, and the ship positioning data is stored in the storage node at the same time; Step (5): When a user queries data, the metadata block is located through the B+ tree according to the time zone of the user's query; in the metadata block, the spatiotemporal grid code is calculated according to the time and longitude and latitude range in the query condition; the location of the metadata is located in the metadata array using the spatiotemporal grid code as an index, and the metadata information is obtained; in the metadata, the disk addresses of the ship positioning data are read in sequence; according to the queried disk address, data is obtained from the storage node and the query is responded to; The process of generating the space-time grid code described in step (3) is as follows: within the metadata block, based on the principle of locality, all space-time grids are connected by a single Hilbert curve, and the space-time grids are coded in ascending order starting from 0 according to the order of the space-time grids passed by the curve; according to the time, longitude and latitude of the positioning data, the space-time grid code is determined by using a method for calculating the space-time grid code based on the Hilbert curve.

2. The storage method of the spatiotemporal grid and tree fusion for ship positioning data according to claim 1, characterized in that: The attributes of the ship positioning data in step (1) include longitude, latitude, time, equipment number, speed, direction and temperature; the spatiotemporal grid is divided according to fixed intervals of time, longitude and latitude; and the metadata is modeled according to time, longitude and latitude.

3. The storage method of the spatiotemporal grid and tree fusion for ship positioning data according to claim 1, characterized in that: The process of dividing the metadata blocks in step (2) is as follows: according to the time attribute of the metadata, the metadata is aggregated into metadata blocks in a fixed interval time segmentation manner; finally, according to the incrementality and infinity of time, the start time attribute of the metadata block is indexed and a B+ tree structure is used.

4. The storage method of the spatiotemporal grid and tree fusion for ship positioning data according to claim 1, characterized in that: When there are multiple ship positioning data in the same space-time grid, the space-time grid codes of multiple metadata are the same. In the metadata array storage process, the first metadata is stored in the array, and the subsequent metadata are referenced by the previous metadata through the disk address attribute in a linked list manner.

Citation Information

Patent Citations

  • Spatial data block organization storage and simplification compression method based on document model

    CN108628951A

  • Data query method and device, index generation method and device and electronic equipment

    CN113076334A