地球信息科学学报 ›› 2014, Vol. 16 ›› Issue (2): 165-172.doi: 10.3724/SP.J.1047.2014.00165

• 地球信息科学理论与方法 • 上一篇    下一篇

基于内存数据库Redis的轻量级矢量地理数据组织

朱进, 胡斌, 邵华, 罗青, 江南, 张景云   

  1. 南京师范大学虚拟地理环境教育部重点实验室, 南京 210023
  • 收稿日期:2013-08-09 修回日期:2013-11-11 出版日期:2014-03-10 发布日期:2014-03-10
  • 通讯作者: 胡 斌(1975- ),男,湖南衡阳人,博士,副教授,主要从事网络地理信息系统、大数据管理方面的研究。E-mail:hb_hubin@126.com E-mail:hb_hubin@126.com
  • 作者简介:朱 进(1983- ),男,江苏南京人,博士生,主要从事地理信息系统技术、大数据管理方面的研究。E-mail:zhujin.ls@gmail.com
  • 基金资助:

    国家自然科学基金项目(40801149);江苏省高校优势学科建设资助项目“面向查询的NoSQL空间数据库研究”(164320H101)。

Research of Lightweight Vector Geographic Data Management Based on Main Memory Database Redis

ZHU Jin, HU Bin, SHAO Hua, LUO Qing, JIANG Nan, ZHANG Jingyun   

  1. Key Laboratory of Virtual Geographic Environment, Ministry of Education, Nanjing Normal University, Nanjing 210023, China
  • Received:2013-08-09 Revised:2013-11-11 Online:2014-03-10 Published:2014-03-10
  • Contact: 10.3724/SP.J.1047.2014.00165 E-mail:hb_hubin@126.com

摘要:

矢量地理数据的高效组织管理是空间数据应用的关键问题之一。矢量地理数据服务作为一种重要的公众空间信息服务,已经得到广泛应用。公众对矢量地理数据服务性能提出了越来越高的要求,包括实时响应、高并发、高吞吐量等。当前的矢量地理数据服务后台数据存储组织,通常基于磁盘和关系数据库,其在面对公众日益增长的需求时已经显得力不从心。本文提出了一种以内存数据库Redis的轻量级矢量地理组织方法,能在高并发情况下有效提高矢量地理数据服务性能。论文首先分析了Redis的存储机制,设计了矢量地理数据库的分层组织模型,利用Redis丰富的数据结构对矢量地理数据及其相关元数据进行存储管理,然后,以网格索引为例,设计了Redis的空间索引,最后,设计Redis的矢量数据引擎原型系统,并进行了实验验证。结果表明,Redis的矢量地理数据库显著提高了响应速度,且并发性能更好,可广泛应用于大型空间数据库前端高速缓存和高性能空间索引库。

关键词: 矢量地理数据, Redis, 键值数据库, 内存数据库, 空间索引

Abstract:

Effective organization and management of vector geographic data is one of the key parts for spatial database application. The traditional vector geographic data service is usually based on magnetic disks and relational databases like Oracle Spatial. With the rapid development of wireless communication and mobile web technology, the performance of current vector geographic data service is declining dramatically under multi-user concurrent access, and can't meet the requirements of high performance and high concurrency. In order to improve the performance of vector geographic data service under multi-user concurrent access, we proposed a novel management approach of lightweight vector geographic data based on main memory database Redis. Redis is a main-memory lightweight key/value store. Its I/O performance is much better than traditional disk-based databases like Oracle and MS SQL server. At first, we analyzed Redis' key-value data model and data structure. Subsequently we designed a four level hierarchy organization structure of vector geographic database. We stored vector geographic data and its metadata based on Redis' plentiful data structures. Then, taking the grid spatial index as an example, we designed the storage method of spatial index and spatial query processing flow for Redis based on the hierarchy organization structure of vector geographic database. Our experimental results confirmed that compared to traditional relational spatial database-Oracle Spatial, our main memory style vector geographic data management approach greatly improves spatial query responding speed and its concurrent performance is excellent. The proposed approach can be used as a front end high performance cache of large spatial database or a high performance spatial indexes database.

Key words: vector geographic data, main memory database, spatial index, key value database, Redis