Research on Complex Spatiotemporal Semantic Modeling Integrating Spatial Data Engines and Graph Databases

  • YUE Zichen , 1 ,
  • ZHONG Shaobo , 2, * ,
  • MEI Xin 1
Expand
  • 1. School of Resources and Environmental Science, Hubei University, Wuhan 430062, China
  • 2. Institute of Urban Systems Engineering, Beijing Academy of Science and Technology, Beijing 100035, China
*ZHONG Shaobo, E-mail:

Received date: 2024-12-30

  Revised date: 2025-04-08

  Online published: 2025-06-06

Supported by

National Natural Science Foundation of China(72174031)

Abstract

[Objectives] Knowledge graphs, as a cutting-edge technology for integrating multimodal data sources, have garnered significant attention in the GIS domain. These graphs are typically constructed using graph databases. However, mainstream graph databases still face challenges in effectively organizing and analyzing geospatial-temporal data. [Methods] To address this issue, this paper proposes an approach to modeling spatiotemporal semantics and query optimization that bridges graph and spatial data engine implemented within relational databases. In the graph database, geographic entities are stored as lightweight placeholder nodes (storing only mapping IDs) and linked to spatiotemporal index nodes (such as time trees and Geohash encodings) to enhance aggregation capabilities. Meanwhile, complete geospatial-temporal objects are stored in a relational database, while table partitioning strategies are employed to improve retrieval efficiency. This approach uses unified identifiers and JDBC for routing geographic entities across the databases. When users invoke pre-registered spatiotemporal functions in the graph database, a query rewriter transforms the graph queries into SQL statements based on entity identifiers, pushes them to the relational database for processing, and returns the results to the graph query pipeline. Additionally, a two-phase commit protocol ensures data consistency across the heterogeneous databases. [Results] We implemented a prototype system integrating Neo4j and PostGIS and conducted experiments on query and storage efficiency using a multisource spatiotemporal dataset from Shenzhen (including taxi trajectories, bike-sharing trajectories, road networks, POIs, and remote sensing imagery). Compared to mainstream graph database systems (e.g., Neo4j and GraphDB), our approach significantly improves performance for geospatial-temporal queries, reducing response times by 1~2 orders of magnitude in complex computational scenarios and enabling raster computations unsupported by native graph databases. By leveraging lightweight graph nodes and PostGIS data compression, storage space is reduced by approximately 3~5 times. Compared to virtual knowledge graph systems (e.g., Ontop), our method shows minimal differences in spatial query performance and storage overhead, while achieving notably faster response times for large-scale spatiotemporal queries. [Conclusions] Compared to existing methods, our approach leverages existing graph databases to construct materialized spatiotemporal knowledge graphs, enhancing modeling flexibility and query efficiency for geospatial-temporal data. It also supports user-defined extensions to the geospatial-temporal function library, offering a novel framework for efficiently managing and analyzing such data within knowledge graphs.

Cite this article

YUE Zichen , ZHONG Shaobo , MEI Xin . Research on Complex Spatiotemporal Semantic Modeling Integrating Spatial Data Engines and Graph Databases[J]. Journal of Geo-information Science, 2025 , 27(6) : 1289 -1304 . DOI: 10.12082/dqxxkx.2025.240715

利益冲突:Conflicts of Interest 所有作者声明不存在利益冲突。

All authors disclose no relevant conflicts of interest.

[1]
李德仁. 论时空大数据的智能处理与服务[J]. 地球信息科学学报, 2019, 21(12):1825-1831.

DOI

[Li D R. The intelligent processing and service of spatiotemporal big data[J]. Journal of Geo-Information Science, 2019, 21(12):1825-1831.] DOI:10.12082/dqxxkx.2019.190694

[2]
姚迪, 张超, 黄建辉, 等. 时空数据语义理解:技术与应用[J]. 软件学报, 2018, 29(7):2018-2045.

[Yao D, Zhang C, Huang J H, et al. Semantic understanding of spatio-temporal data: Technology & application[J]. Journal of Software, 2018, 29(7):2018-2045.] DOI:10.13328/j.cnki.jos.005576

[3]
陆锋, 诸云强, 张雪英. 时空知识图谱研究进展与展望[J]. 地球信息科学学报, 2023, 25(6):1091-1105.

DOI

[Lu F, Zhu Y Q, Zhang X Y. Spatiotemporal knowledge graph: Advances and perspectives[J]. Journal of Geo-Information Science, 2023, 25(6):1091-1105.] DOI:10.12082/dqxxkx.2023.230154

[4]
张雪英, 张春菊, 吴明光, 等. 顾及时空特征的地理知识图谱构建方法[J]. 中国科学:信息科学, 2020, 50(7):1019-1032.

[Zhang X Y, Zhang C J, Wu M G, et al. Spatiotemporal features based geographical knowledge graph construction[J]. Scientia Sinica (Informationis), 2020, 50(7):1019-1032.] DOI:10.1360/SSI-2019-0269

[5]
Alam M M, Torgo L, Bifet A. A survey on spatio-temporal data analytics systems[J]. ACM Computing Surveys, 2022, 54(10s):1-38. DOI:10.1145/3507904

[6]
Kotiranta P, Junkkari M, Nummenmaa J. Performance of graph and relational databases in complex queries[J]. Applied Sciences, 2022, 12(13): 6490. DOI:10.3390/app12136490

[7]
Di Pierro D, Ferilli S, Redavid D. LPG-based knowledge graphs: A survey, a proposal and current trends[J]. Information, 2023, 14(3):154. DOI:10.3390/info14030154

[8]
Cheng Y J, Ding P J, Wang T T, et al. Which category is better: Benchmarking relational and graph database management systems[J]. Data Science and Engineering, 2019, 4(4):309-322. DOI:10.1007/s41019-019-00110-3

[9]
Baralis E, Dalla Valle A, Garza P, et al. SQL versus NoSQL databases for geospatial applications[C]//2017 IEEE International Conference on Big Data (Big Data). IEEE, 2017:3388-3397. DOI:10.1109/BigData.2017.8258324

[10]
Li W W, Wang S Z, Wu S, et al. Performance benchmark on semantic web repositories for spatially explicit knowledge graph applications[J]. Computers, Environment and Urban Systems, 2022,98:101884. DOI:10.1016/j.compenvurbsys.2022.101884

[11]
李悦, 孙坦, 赵瑞雪, 等. 大规模RDF三元组转换及存储工具比较研究[J]. 数字图书馆论坛, 2020(11):2-12.

[Li Y, Sun T, Zhao R X, et al. A comparative study of large-scale RDF triple conversion and storage tools[J]. Digital Library Forum, 2020(11):2-12.] DOI:10.3772/j.issn.1673-2286.2020.11.001

[12]
卢海川, 符海东, 刘宇. 基于CAN的地理语义数据存储与检索机制[J]. 计算机科学, 2019, 46(2):171-177.

DOI

[Lu H C, Fu H D, Liu Y. Geo-semantic data storage and retrieval mechanism based on CAN[J]. Computer Science, 2019, 46(2):171-177.] DOI:10.11896/j.issn.1002-137X.2019.02.027

[13]
Patroumpas K, Giannopoulos G, Athanasiou S. Towards GeoSpatial semantic data management: Strengths, weaknesses, and challenges ahead[C]// Proceedings of the 22nd ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems. ACM, 2014:10.1145/2666310.2666410. DOI:10.1145/2666310.2666410

[14]
Alocci D, Mariethoz J, Horlacher O, et al. Property graph vs RDF triple store: A comparison on glycan substructure search[J]. PLoS One, 2015, 10(12):e0144578. DOI:10.1371/journal.pone.0144578

[15]
Gryllakis F, Pelekis N, Doulkeridis C, et al. Spatio-temporal-keyword pattern queries over semantic trajectories with Hermes@Neo4j[C]// Proceedings of the 21st International Conference on Extending Database Technology. Vienna: ACM, 2018:708-711. DOI:10.5441/002/edbt.2018.83

[16]
Sun Y H, Sarwat M. A spatially-pruned vertex expansion operator in the Neo4j graph database system[J]. GeoInformatica, 2019, 23(3):397-423. DOI:10.1007/s10707-019-00361-2

[17]
Bereta K, Xiao G H, Koubarakis M. Ontop-spatial: Ontop of geospatial databases[J]. Journal of Web Semantics, 2019,58:100514. DOI:10.1016/j.websem.2019.100514

[18]
Bakkal F, Eken S, Savaş N S, et al. Modeling and querying trajectories using Neo4j spatial and TimeTree for carpool matching[C]//2017 IEEE International Conference on INnovations in Intelligent SysTems and Applications (INISTA). IEEE, 2017:219-222. DOI:10.1109/INISTA.2017.8001160

[19]
向隆刚, 高萌, 王德浩, 等. Geohash-Trees:一种用于组织大规模轨迹的自适应索引[J]. 武汉大学学报(信息科学版), 2019, 44(3):436-442.

[Xiang L G, Gao M, Wang D H, et al. Geohash-trees: An adaptive index which can organize large-scale trajectories[J]. Geomatics and Information Science of Wuhan University, 2019, 44(3):436-442.] DOI:10.13203/j.whugis20160523

[20]
Yue P, Tan Z Y. GIS databases and NoSQL databases[M]//Comprehensive Geographic Information Systems. Amsterdam: Elsevier, 2018:50-79. DOI:10.1016/b978-0-12-409548-9.09596-8

[21]
Pandey V, Kipf A, Neumann T, et al. How good are modern spatial analytics systems?[J]. Proceedings of the VLDB Endowment, 2018, 11(11):1661-1673. DOI:10.14778/323 6187.3236213

[22]
陆锋, 余丽, 仇培元. 论地理知识图谱[J]. 地球信息科学学报, 2017, 19(6):723-734.

DOI

[Lu F, Yu L, Qiu P Y. On geographic knowledge graph[J]. Journal of Geo-information Science, 2017, 19(6):723-734.] DOI:10.3969/j.issn.1560-8999.2017.06.001

[23]
仲腾, 张雪英, 许沛, 等. 基于云原生的地理空间知识库管理关键技术与服务方法研究[J]. 地球信息科学学报, 2024, 26(9):2013-2025.

DOI

[Zhong T, Zhang X Y, Xu P, et al. Critical technologies and service approaches for cloud-native geospatial knowledge base management[J]. Journal of Geo-Information Science, 2024, 26(9):2013-2025.] DOI:10.12082/dqxxkx.2024.240184

Outlines

/