CN117851695A - Space-time indexing method based on geographic grid and graph database - Google Patents

Space-time indexing method based on geographic grid and graph database Download PDF

Info

Publication number
CN117851695A
CN117851695A CN202311842501.XA CN202311842501A CN117851695A CN 117851695 A CN117851695 A CN 117851695A CN 202311842501 A CN202311842501 A CN 202311842501A CN 117851695 A CN117851695 A CN 117851695A
Authority
CN
China
Prior art keywords
space
time
graph database
grid
data
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.)
Pending
Application number
CN202311842501.XA
Other languages
Chinese (zh)
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.)
Changchun Jiacheng Information Technology Co ltd
Original Assignee
Changchun Jiacheng Information 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 Changchun Jiacheng Information Technology Co ltd filed Critical Changchun Jiacheng Information Technology Co ltd
Priority to CN202311842501.XA priority Critical patent/CN117851695A/en
Publication of CN117851695A publication Critical patent/CN117851695A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a space-time index method based on a geographic grid and a graph database, which comprises the following steps: step S1, modeling and encoding a geographic grid: step S2, constructing and managing a graph database: s3, indexing and inquiring the space-time data; and S4, space-time index application. The present invention aims to achieve more flexible and efficient spatio-temporal data management and querying. The method utilizes the characteristics of the geographic grid to divide the space data according to a plurality of levels, thereby supporting multi-level space data management. Meanwhile, the method can better manage and inquire the space-time data by utilizing the characteristics of the graph database and support complex space and time inquiry operation.

Description

Space-time indexing method based on geographic grid and graph database
Technical Field
The invention relates to a space-time indexing method, in particular to a space-time indexing method based on a geographic grid and a graph database.
Background
With the rapid development of the mobile internet and the internet of things, the space-time data shows explosive growth, and how to more rapidly realize the storage and the retrieval of the space-time data has important significance for the use and the management of the space-time data, and the space-time index is one of the important methods in the management and the retrieval of the space-time data.
The traditional space-time index method can not meet the application requirements of rapid growth and complexity of space-time data, and has the following main problems:
1. space-time index computation of large-scale data is difficult to support: the traditional index calculation mode is one-time calculation, and when large-scale geospatial data is processed, the problems of low calculation performance, low query efficiency and the like exist, and complex space query operations such as range query, intersection query and the like cannot be supported. These problems limit the ability of conventional spatio-temporal indexing methods to cope with the rapidly growing and complex needs of spatio-temporal data applications.
2. The time-space index is created in full quantity, and the time and resource consumption problem exists: the common space-time index method needs to create the index in full quantity, and this process needs to consume a great deal of time and computing resources, and is computationally intensive, so that the speed of creating the index is slow. When the data volume is too large, the index cannot be updated in time, and thus it is difficult to support real-time data analysis and processing.
3. It is difficult to support three-dimensional space-time index creation: the traditional space-time index method is mainly based on two-dimensional geographic information, can not support the creation of three-dimensional space-time indexes, and is difficult to process three-dimensional space data information, so that the application range of space-time data is limited.
4. Space-time search and space analysis are not efficient: the data storage mode of the traditional space analysis system is a stacking mode of layers, the data storage mode is shown in fig. 1, and the multi-layer storage architecture causes that the query of the space data needs to cross layers and a large amount of operations, which is an important reason for preventing the efficiency improvement of the traditional space analysis system.
Disclosure of Invention
In order to solve the defects of the technology, the invention provides a space-time indexing method based on a geographic grid and a graph database, which aims to realize more flexible and efficient space-time data management and query. The method utilizes the characteristics of the geographic grid to divide the space data according to a plurality of levels, thereby supporting multi-level space data management. Meanwhile, the method can better manage and inquire the space-time data by utilizing the characteristics of the graph database and support complex space and time inquiry operation.
In order to solve the technical problems, the invention adopts the following technical scheme: a spatio-temporal indexing method based on a geographic grid and a graph database, comprising the steps of:
step S1, modeling and encoding a geographic grid: dividing the earth surface into a plurality of layers of quadrilateral grids through geographic grid modeling based on an algorithm model, wherein each grid has unique codes;
step S2, constructing and managing a graph database: the graph database adopts an algorithm model as an implementation mode of the spatial index, and the graph database is used as a bottom storage engine to support large-scale graph data storage and query;
step S3, indexing and inquiring the space-time data: combining Cell ID and time information to construct a space-time index, wherein the space-time index organizes geospatial data into indexes according to time and position information so as to facilitate quick inquiry and filtration;
and S4, space-time index application.
Preferably, step S1 comprises the steps of:
s11, a geographic grid algorithm model: the algorithm model maps points on the earth surface to Hilbert curves, and represents the points on each curve as one-dimensional UINT64 integers, namely, the longitude and latitude of any point on the earth surface are transformed and projected to finally be converted into Cell ID on the Hilbert curve;
s12, geogrid coding: each mesh in the spatial mesh layer is mapped to a unique code called Cell ID.
Preferably, the algorithm model of step S11 is implemented by the following steps:
firstly, converting longitude and latitude into radian, wherein the conversion formula from angle to radian is as follows:
radian = angle × pi/180 ° formula (1)
Step two, spherical rectangular coordinate conversion: converting longitude and latitude coordinates S (lat, lng) on the spherical surface into three-dimensional coordinates (x, y, z) of a rectangular coordinate system of the spherical surface, wherein any point on the spherical surface is shown in the rectangular coordinate system as shown in a formula 2:
wherein the value ranges of x, y and z are all limited to the interval of [ -1,1 ];
thirdly, changing the spherical surface into a plane: the three-dimensional space is subjected to dimension reduction and converted into coordinate points on a two-dimensional plane, and the coordinate points are respectively projected from the sphere center to six faces of the circumscribed cube, namely, a three-dimensional spherical surface is projected on the two-dimensional plane, wherein the spherical coordinate conversion formula is f (x, y, z) -g (face, u, v), the face is the serial number of six faces of a square, and the u, v corresponds to the x, y coordinates in the six faces;
step four, spherical rectangle projection correction g (face, u, v) to h (face, s, t), selecting a secondary transformation correction function, and changing u and v into s and t, wherein after correction, the u and v are changed into 0 to 1 from-1 to 1 correspondingly;
in the fifth step, the coordinate axis point is converted into a Cell ID, h (face, s, t) →cellid (UINT 64) on the hilbert curve, and the two-dimensional coordinates (face, s, t) of the surface are converted into an integer of UINT64, which is called a Cell ID.
Preferably, the hilbert curve is realized by a recursive algorithm, the surface is divided into four sub-surfaces each time, and the same operation is carried out on each sub-surface until the required surface is reached; on each sub-surface, the two-dimensional coordinates (s, t) are converted to an integer, which is then combined with the surface number (face) to form an integer of UINT64, resulting in the final Cell ID.
Preferably, in step S12 Each level of the grid has a unique Cell ID, each Cell ID is composed of a 64-bit binary number, and is stored by UINT64, wherein the first three digits represent the surface corresponding to the projection onSix sides on the square, the numbers from the fourth digit to the 64 th digit are the codes of the corresponding Level, and if the code length is not 64 bits, 0 is added to the codes until the last digit.
Preferably, step S2 comprises the steps of:
s21, constructing a distributed database: constructing a distributed database based on a graph model, and storing geographic space data by adopting the graph database;
s22, storing and managing a graph database: in the graph database, the graph comprises nodes and edges, the nodes represent entities, the edges represent the relationship between the entities, and each node has a unique identifier ID;
s23, storing and inquiring large-scale space data: the graph database adopts a distributed architecture and lateral expansion, and when in query, corresponding nodes are quickly positioned through grid units of the geographic grid, so that the graph structure is traversed, and needed space-time data and relations among the space-time data are acquired;
s24, space calculation: the graph database provides a graphic algorithm for analyzing and calculating the space data, namely, the position on the earth surface is converted into the position in the geographic grid by adopting a geographic grid algorithm, and then the space calculation is carried out based on the grid position.
Preferably, in step S3, the space-time data search needs to determine the time range and the space range of the query, and the specific process is as follows:
s31, inquiring the time range: according to the time range in the query condition, a corresponding time object is found;
s32, inquiring space range: according to the space range in the query condition, using a geographic grid to find a corresponding grid number in the index;
s33, according to the time range and the space range in the query condition, corresponding space-time data is quickly queried in the space-time index.
Compared with the prior art, the invention has the following beneficial effects:
1. caching and step-by-step calculation, and improving the performance of space retrieval and space analysis: when the index is established, the invention adopts the modes of buffer storage and step-by-step calculation. Firstly, the calculation result is cached so as to be directly used in the subsequent retrieval and analysis operation, and the calculation efficiency is improved; and then calculating step by step, and searching the cached calculation result, thereby improving the performance of space searching and space analysis.
2. Creating space-time index increment: the invention performs increment creation index on the time-space data, disassembles the long time-consuming calculation into a plurality of fragment calculations, and processes the data when idle. Therefore, long-time and large-scale calculation can be avoided, the calculation efficiency is improved, and meanwhile, the index can be continuously updated along with the increase of the data quantity, so that the timeliness and the accuracy of the index are ensured.
3. Three-dimensional space-time index creation: the method supports elevation division, can create a three-dimensional space time-space index, ensures that the expression of the time-space data is more refined, and can meet more application requirements. Meanwhile, the method can also analyze and calculate the three-dimensional space-time data, for example, three-dimensional space visualization, three-dimensional path planning and other operations can be performed, so that the space-time data processing is more comprehensive and diversified.
4. Efficient spatiotemporal retrieval and spatial analysis: and a graph database is adopted to store the frames, so that the space analysis efficiency is improved. The graph database is a mode of expressing data by adopting a semantic network, and forms a relation network by connecting different information through nodes and edges. Fig. 1 and 2 show a comparison of a conventional multi-layer storage structure and a graph database storage structure, respectively. Traditional space data query requires cross-layer and a large amount of operations, so that the efficiency of a traditional space analysis system is low; the invention adopts the graph database storage framework, stores the space-time objects and the attributes thereof in the form of nodes and edges based on the divided geographic grids, and expands the graph network, thereby realizing the functions of quick query and space analysis of the time data.
Drawings
FIG. 1 is a schematic diagram of a conventional multi-layer memory structure.
Fig. 2 is a schematic diagram of a conventional graph database storage structure.
Fig. 3 is an overall flow chart of the present invention.
FIG. 4 is a flow chart of an algorithm model of the present invention.
Fig. 5 is a spherical rectangular coordinate conversion chart of the present invention.
Fig. 6 is a spherical to planar projection view of the present invention.
Fig. 7 is a spherical rectangular projection correction chart of the present invention.
Fig. 8 is a schematic diagram of geographic grid coverage at different levels of the present invention.
Fig. 9 is a grid coding rule diagram of the present invention.
FIG. 10 is a schematic diagram of a data storage framework of the present invention.
Detailed Description
The invention will be described in further detail with reference to the drawings and the detailed description.
Geogrid is a method of dividing the earth's surface into a series of regular grid cells, common geogrids include theodolite grids, UTM grids, quadtrees, and the like. The geographic grid can discretize the spatial data of the earth's surface into grid cells for easy storage and retrieval.
The graph database is a database system specially used for storing graph structures, can store the relation between nodes and edges, and provides an efficient query method based on the graph structures. The graph database may be used to store geographic information data, such as roads, rivers, buildings, etc., and spatial relationships therebetween.
By combining the geographic grid with the graph database, an efficient space-time indexing method can be constructed. Specifically, the grid cells of the geographic grid may be used as nodes in a graph database, and the relationships between the spatial data may be used as edges, thereby forming a graph structure. During inquiry, the corresponding nodes can be quickly positioned through the grid units of the geographic grid, so that the graph structure is traversed, and the needed spatial data and the relation between the spatial data are acquired.
A space-time indexing method based on a geographic grid and a graph database as shown in fig. 3, comprising the steps of:
step S1, modeling and encoding the geographic grid
The core content of the geographic grid modeling is an algorithm model, grid subdivision and coding. The geographic grids based on the algorithm model are modeled, the earth surface can be divided into a large number of small quadrilaterals, and similar shapes and sizes are guaranteed between adjacent grids. The geographic grid modeling converts three-dimensional space coordinates into one-dimensional integer numbers, so that geographic information data can be efficiently processed, the speed of space data retrieval is greatly improved, and the method can be applied to indexing and inquiring of other multidimensional space data.
S11, geographic grid algorithm model
The algorithm model maps points (longitude and latitude) of the earth surface onto Hilbert curves, and represents the points on each curve as one-dimensional UINT64 integers, namely, the longitude and latitude of any point on the earth surface are converted and projected, and finally converted into Cell ID (the Cell ID refers to the Cell projected onto six faces of a cube, a rectangle on a certain face is called a Cell, and the ID corresponding to the Cell ID). In this way, the location on the earth's surface can be represented as a UINT64 integer for storage and processing in a computer, and can be compared and computed quickly to support efficient spatial indexing and querying. As shown in fig. 4, the algorithm model is implemented by:
step one, converting longitude and latitude into radian: since longitude and latitude are expressed by angles, and radian is needed for calculation, the longitude and latitude are required to be converted into radian, and the conversion from the angle to the radian is shown in formula 1.
Radian = angle x pi/180 ° equation 1
And step two, spherical rectangular coordinate conversion S (lat, lng) to f (x, y, z): and converting longitude and latitude coordinates S (lat, lng) on the spherical surface into three-dimensional coordinates (x, y, z) of a rectangular spherical coordinate system. The earth is a three-dimensional sphere, as shown in FIG. 5, with latitude on the earthThe angle α of the degree is added to the angle θ of the rectangular coordinate system to be equal to 90 degrees, while the angle of the longitudeIs the angle of rectangular coordinate system>A point on the sphere, in rectangular coordinates, is shown in formula 2. In the Google S2 algorithm, the radius is not considered since it is assumed that the earth radius is one unit. The value ranges of x, y, and z are thus defined as [ -1,1]Within this interval.
Thirdly, reducing the dimension of the three-dimensional space by using a spherical variable plane f (x, y, z) to g (face, u, v) and converting the three-dimensional space into coordinate points on a two-dimensional plane. The idea of the algorithm is that a circumscribed cube is sleeved outside the earth, and as shown in fig. 6, 6 faces of the circumscribed cube are respectively projected from the center of a sphere, namely, a three-dimensional sphere is projected onto a two-dimensional plane, so that the longitude and latitude coordinates of a curved surface are converted into plane coordinates. The spherical coordinate conversion formula is f (x, y, z) →g (face, u, v), wherein face is the serial number of six faces of the square, and u, v corresponds to the x, y coordinates in the six faces.
Fourth, spherical rectangle projection correction g (face, u, v) →h (face, s, t), the spherical rectangle on the sphere is projected onto a certain surface of square in the previous step, the formed shape is similar to rectangle, but due to different angles on the sphere, the area of each rectangle is not much the same even if projected onto the same surface. As shown in FIG. 7, the algorithm selects a "quadratic transformation" correction function, after correction, u and v become s and t, and correspondingly, they also range from-1 to 0 to 1.
Fifth, the two-dimensional plane is mapped to a one-dimensional integer space, the coordinate axis points are converted into Cell IDs on the hilbert curve, h (face, s, t) →cellid (UINT 64), and the two-dimensional coordinates (face, s, t) of the plane are converted into an integer of UINT64, which is called Cell ID. This process is implemented using a hilbert curve. The hilbert curve is a continuous, self-intersecting space-filling curve that maps a two-dimensional plane to a one-dimensional integer space. The two-dimensional coordinates of the surface are mapped by applying a hilbert curve, which is converted into an integer of UINT64, thereby representing a discrete spatial unit on the sphere. A specific implementation of the hilbert curve may use a recursive algorithm, dividing the surface into four sub-surfaces at a time, and doing the same for each sub-surface until the desired level is reached. On each sub-surface, the two-dimensional coordinates (s, t) may be converted to an integer, which is then combined with the surface number (face) to form an integer of UINT64, resulting in the final Cell ID.
S12, geogrid coding
Geogrid coding is the mapping of each grid in a spatial grid layer to a unique code, called Cell ID, to facilitate indexing and querying of spatial data.
Grid level: geographic grids are typically divided into 30 levels, each level having a different grid size and number, the higher the level, the higher the grid resolution and the greater the number of grids. In practical applications, the selection of the grid level needs to take into account the specific requirements and data sizes of the application scenario. For example, for large-scale geographic data, a lower-level grid may be required to reduce the amount of data to increase the processing efficiency of spatial data; for spatial analysis that requires high precision, a higher level grid may be required to obtain more detailed data for better data indexing and querying. A schematic of the grid coverage at several different levels is shown in fig. 8.
Cell ID structure: each level of mesh has a unique Cell ID. Each Cell ID consists of a 64-bit binary number, stored with UINT64, where the first 3 digits represent faces, corresponding to the 6 faces projected on the cube, starting with the 4 th digit and ending with the 64 th digit as the code of the corresponding Level, and if the code length is not 64 bits, then adding 0 to the last bit of code thereafter, the structure of which is shown in fig. 9.
Coding uniqueness: in the encoding process, attention is paid to the uniqueness and orderability of Cell IDs. The uniqueness of Cell ID ensures that each mesh has a unique identifier, facilitating accurate location and indexing of spatial data. The Cell ID can be sequenced, so that a certain sequence relation is ensured between codes of adjacent grids, and operations such as range query, spatial clustering and the like are convenient to perform on spatial data.
Step S2, constructing and managing a graph database
The graph database adopts an algorithm model as a spatial index implementation mode, and supports efficient query and indexing, spatial calculation and other operations, so that the graph database has higher efficiency and accuracy when processing geospatial data. The construction and management of the graph database mainly comprises the following points:
constructing a distributed database: the architecture of the distributed database based on the graph model is similar to Apache Hadoop, and the distributed database provides characteristics of scalability, high performance, high availability and the like, and is suitable for storing large-scale graph data. By storing the geospatial data using a graph database, efficient data retrieval and spatial analysis can be achieved.
Graph database storage management: in the graph database, the graph includes nodes representing entities and edges representing relationships between the entities. Each node has a unique identifier ID that can be used to find and access the node. Nodes contain location information, time information, other attribute information, etc., and edges may also contain attributes such as weights, distances, etc. By using nodes and edges, spatiotemporal data can be converted into graph data and stored and managed in a graph database. The graph database has the advantage of being capable of processing complex relational data, such as social networks, geographic information and the like, and has efficient query performance and expandability. The storage frame is similar to a knowledge graph, and as shown in fig. 10, nodes represent position information, edges represent relationships between the nodes, and both the nodes and the edges contain attribute information. The whole storage framework can quickly realize the retrieval by taking time information, position information or various attribute information as nodes, and effectively improves the information query efficiency.
Support storage and querying of large-scale spatial data: the graph database adopts a distributed architecture and lateral expansion, and can easily process billions of nodes and edges, and meanwhile, high-efficiency graph query capability is provided. During inquiry, the corresponding nodes can be quickly positioned through the grid units of the geographic grid, so that the graph structure is traversed, and the needed space-time data and the relation between the space-time data and the corresponding nodes are obtained.
Support space computation: the graph database provides a graph algorithm, and can analyze and calculate the spatial data, such as spatial neighborhood analysis, path analysis, network analysis and the like, so as to realize mining and analysis operations of the spatial data and support more application scenes. For example, in analyzing geographic position data, it is necessary to calculate information such as a distance or an intersection between a certain position and another position. The geographic grid algorithm is adopted to convert the position on the earth surface into the position in the geographic grid, and then space calculation is performed based on the grid position, so that complex spherical coordinate calculation is avoided, and the calculation efficiency and accuracy are improved.
Therefore, the invention selects the graph database as the bottom storage engine, and can well meet the requirements of space data storage and management. The graph data has the characteristics of scalability, high performance and high availability, and can support large-scale graph data storage and query. Meanwhile, the graph database provides various index types and query interfaces, so that different query requirements can be met. The graph database is selected as a storage engine, so that data analysis and mining can be conveniently performed, and more possibilities are provided for spatial data application.
Step S3, indexing and querying the space-time data
The Cell ID and time information are combined to construct a spatio-temporal index. Spatio-temporal indexing may organize geospatial data into indexes in terms of time and location information for quick querying and filtering. Each node may be represented as a spatiotemporal unit, each spatiotemporal unit containing attributes such as Cell ID and time information. For example, a time stamp and Cell ID may be used to construct a spatio-temporal index to quickly interrogate all places within a certain time range. For spatiotemporal data retrieval, the temporal and spatial extent of the query need to be determined.
1) Query time range: and finding out a corresponding time object according to the time range in the query condition. In the graph database, each record has its corresponding timestamp. The time object may be associated in multiple levels of units, such as: year, month, day, hour, etc. In looking up the time object, the records may be filtered and filtered according to the time stamp.
2) Query space range: and according to the space range in the query condition, using the geographic grids to find the corresponding grid numbers in the index. Geogrid is a Cell-based grid structure that divides the earth's surface into multiple levels of grids of different sizes, each grid having a unique Cell ID. All Cell IDs within a given spatial range can be located quickly using a geographic grid.
3) And finally, according to the time and space range in the query condition, the corresponding space-time data can be quickly queried in the space-time index. This spatiotemporal indexing technique constructed based on Cell ID and time information can efficiently process spatiotemporal data.
Step S4, space-time index application
After the spatiotemporal data is obtained, it can be further analyzed and applied. Because the space-time index method uses the graph database technology, complex spatial relationship analysis and calculation, such as shortest path searching, network analysis, spatial clustering and other operations, can be performed. In addition, the invention can also support the indexing and the query of multidimensional space data and can meet the data analysis requirements in different application scenes.
Application scenario one: national space planning double evaluation
The national space planning double evaluation refers to the national space planning evaluation taking ecological protection and economic development as main targets. The space-time index may be used to index and query various data used in the evaluation process, for example, the homeland space data within a certain time range may be rapidly queried through the space-time index, or the homeland space data within a certain space range may be queried. Meanwhile, space relation analysis and calculation can be performed by using the time-space index, such as searching for the shortest path, network analysis, space clustering and other operations, so as to support analysis and decision of dual evaluation of the national space planning.
And (2) an application scene II: fifteen-minute life cycle
With respect to a fifteen minute life circle, it refers to the range of life that a person is in, i.e., the area that can be reached within 15 minutes. The spatiotemporal index may be used to analyze and calculate a person's life circle, for example, his/her life circle may be calculated from the location information of a person's address and surrounding facilities (e.g., stores, parks, etc.). This is significant in city planning, traffic planning, etc., and can help decision makers to make more efficient policies.
The invention provides a space-time index method based on a geographic grid and a graph database, which combines the geographic grid and the graph database, and can realize more refined space position expression and efficient space-time data retrieval. The method adopts a geographic grid algorithm model to divide the earth surface into a multi-level square grid, and uses a unique address coding mode to express any spatial position, thereby realizing efficient geographic information coding and space-time data retrieval. Meanwhile, the method takes grid units of the geographic grid as nodes in a graph database and takes the relation between the space-time data as edges, so that a graph structure is formed, and the indexing and the query of the multidimensional space-time data are realized. During inquiry, the corresponding nodes can be quickly positioned through the grid units of the geographic grid, so that the graph structure is traversed, and the needed space-time data and the relation between the space-time data and the corresponding nodes are obtained. The method has the advantages of high efficiency, flexibility, easy expansion and the like, can support large-scale graph data storage and management, and can also support operations such as space analysis and calculation, so that the query and analysis operation of space-time data is more convenient and efficient.
The method is suitable for various application scenes, such as ecological environment, smart city, natural resources and the like, and can realize higher spatial index precision, higher efficient query operation, more convenient query and analysis operation of space-time data and better support the storage and management of large-scale geospatial data.
The above embodiments are not intended to limit the present invention, and the present invention is not limited to the above examples, but is also intended to be limited to the following claims.

Claims (7)

1. A space-time indexing method based on a geographic grid and a graph database is characterized in that: the method comprises the following steps:
step S1, modeling and encoding a geographic grid: dividing the earth surface into a plurality of layers of quadrilateral grids through geographic grid modeling based on an algorithm model, wherein each grid has unique codes;
step S2, constructing and managing a graph database: the graph database adopts an algorithm model as an implementation mode of the spatial index, and the graph database is used as a bottom storage engine to support large-scale graph data storage and query;
step S3, indexing and inquiring the space-time data: combining Cell ID and time information to construct a space-time index, wherein the space-time index organizes geospatial data into indexes according to time and position information so as to facilitate quick inquiry and filtration;
and S4, space-time index application.
2. The spatio-temporal indexing method based on a geographic grid and graph database according to claim 1, characterized in that: the step S1 includes the steps of:
s11, a geographic grid algorithm model: the algorithm model maps points on the surface of the earth to Hilbert curves, and represents the points on each curve as one-dimensional UINT64 integers, namely, the longitude and the latitude of any point on the surface of the earth are transformed and projected to finally be converted into CellID on the Hilbert curves;
s12, geogrid coding: each mesh in the spatial mesh layer is mapped to a unique code called CellID.
3. The spatio-temporal indexing method based on a geographic grid and graph database according to claim 2, characterized in that: the algorithm model of the step S11 is realized through the following steps:
firstly, converting longitude and latitude into radian, wherein the conversion formula from angle to radian is as follows:
radian = angle x pi/180 ° formula (1)
Step two, spherical rectangular coordinate conversion: converting longitude and latitude coordinates S (lat, lng) on the spherical surface into three-dimensional coordinates (x, y, z) of a rectangular coordinate system of the spherical surface, wherein any point on the spherical surface is shown in the rectangular coordinate system as shown in a formula 2:
z=r×cos θ formula (2)
Wherein the value ranges of x, y and z are all limited to the interval of [ -1,1 ];
thirdly, changing the spherical surface into a plane: the three-dimensional space is subjected to dimension reduction and converted into coordinate points on a two-dimensional plane, and the coordinate points are respectively projected from the sphere center to six faces of the circumscribed cube, namely, a three-dimensional spherical surface is projected on the two-dimensional plane, wherein the spherical coordinate conversion formula is f (x, y, z) -g (face, u, v), the face is the serial number of six faces of a square, and the u, v corresponds to the x, y coordinates in the six faces;
step four, spherical rectangle projection correction g (face, u, v) to h (face, s, t), selecting a secondary transformation correction function, and changing u and v into s and t, wherein after correction, the u and v are changed into 0 to 1 from-1 to 1 correspondingly;
in the fifth step, the coordinate axis point is converted into a Cell ID, h (face, s, t) →cellid (UINT 64) on the hilbert curve, and the two-dimensional coordinates (face, s, t) of the surface are converted into an integer of UINT64, which is called a Cell ID.
4. A spatio-temporal indexing method based on a geographical grid and graph database according to claim 3, characterized in that: the Hilbert curve is realized through a recursion algorithm, the surface is divided into four sub-surfaces each time, and the same operation is carried out on each sub-surface until the required surface is reached; on each sub-surface, the two-dimensional coordinates (s, t) are converted to an integer, which is then combined with the surface number (face) to form an integer of UINT64, resulting in the final Cell ID.
5. The spatio-temporal indexing method based on a geographic grid and graph database according to claim 2, characterized in that: in the step S12 Each Level grid has a unique Cell ID, each Cell ID is composed of a 64-bit binary number, and the Cell IDs are stored by UINT64, wherein the first three digits represent faces, corresponding to six faces projected on a cube, and the digits from the fourth digit to the 64 th digit are codes of the corresponding Level, and if the code length is not 64 bits, 0 is added to the last digit of the code length.
6. The spatio-temporal indexing method based on a geographic grid and graph database according to claim 1, characterized in that: the step S2 includes the steps of:
s21, constructing a distributed database: constructing a distributed database based on a graph model, and storing geographic space data by adopting the graph database;
s22, storing and managing a graph database: in the graph database, the graph comprises nodes and edges, the nodes represent entities, the edges represent the relationship between the entities, and each node has a unique identifier ID;
s23, storing and inquiring large-scale space data: the graph database adopts a distributed architecture and lateral expansion, and when in query, corresponding nodes are quickly positioned through grid units of the geographic grid, so that the graph structure is traversed, and needed space-time data and relations among the space-time data are acquired;
s24, space calculation: the graph database provides a graphic algorithm for analyzing and calculating the space data, namely, the position on the earth surface is converted into the position in the geographic grid by adopting a geographic grid algorithm, and then the space calculation is carried out based on the grid position.
7. The spatio-temporal indexing method based on a geographic grid and graph database according to claim 1, characterized in that: in the step S3, the space-time data is retrieved, and the time range and the space range of the query need to be determined, which specifically includes:
s31, inquiring the time range: according to the time range in the query condition, a corresponding time object is found;
s32, inquiring space range: according to the space range in the query condition, using a geographic grid to find a corresponding grid number in the index;
s33, according to the time range and the space range in the query condition, corresponding space-time data is quickly queried in the space-time index.
CN202311842501.XA 2023-12-29 2023-12-29 Space-time indexing method based on geographic grid and graph database Pending CN117851695A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311842501.XA CN117851695A (en) 2023-12-29 2023-12-29 Space-time indexing method based on geographic grid and graph database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311842501.XA CN117851695A (en) 2023-12-29 2023-12-29 Space-time indexing method based on geographic grid and graph database

Publications (1)

Publication Number Publication Date
CN117851695A true CN117851695A (en) 2024-04-09

Family

ID=90539472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311842501.XA Pending CN117851695A (en) 2023-12-29 2023-12-29 Space-time indexing method based on geographic grid and graph database

Country Status (1)

Country Link
CN (1) CN117851695A (en)

Similar Documents

Publication Publication Date Title
Lv et al. BIM big data storage in WebVRGIS
CN109992636B (en) Space-time coding method, space-time index and query method and device
Peuquet et al. An event-based spatiotemporal data model (ESTDM) for temporal analysis of geographical data
CN101963996B (en) Global raster data storing method
CN110599490B (en) Remote sensing image data storage method and system
CN111367913A (en) Modeling method of data model facing to full space
CN113515525A (en) Spatial data organization method based on global multi-scale grid
CN112685407A (en) Spatial data indexing method based on GeoSOT global subdivision grid code
CN102289466A (en) K-nearest neighbor searching method based on regional coverage
CN108628951A (en) Spatial data massive texture storage based on document model and abbreviation compression method
CN106933833A (en) A kind of positional information method for quickly querying based on Spatial Data Index Technology
CN116860905B (en) Space unit coding generation method of city information model
CN113946700A (en) Space-time index construction method and device, computer equipment and storage medium
CN113269870B (en) Multi-resolution digital terrain integration method based on three-dimensional subdivision grids
CN106991149B (en) Massive space object storage method fusing coding and multi-version data
CN108009265A (en) A kind of space data index method under cloud computing environment
CN111353008B (en) Real-time space aggregation method for Beidou position stream data
CN116775661A (en) Big space data storage and management method based on Beidou grid technology
Ladner et al. Mining Spatio-Temporal Information Systems
CN109885638B (en) Three-dimensional space indexing method and system
CN114398459A (en) Space-time grid and tree fusion storage method for ship positioning data
Wu et al. A spatiotemporal trajectory data index based on the Hilbert curve code
Yan et al. An efficient organization method for large-scale and long time-series remote sensing data in a cloud computing environment
CN116775971A (en) Time-space grid index query method and system based on degenerated quadtree
CN115408382B (en) Vector space information gridding storage management method for large-scale satellite data

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