Computer Engineering and Applications ›› 2013, Vol. 49 ›› Issue (22): 123-126.

Previous Articles     Next Articles

Nearest neighbor query under grid partition of Z curve

LIU Runtao1, CHEN Linlin2, TIAN Guangyue2   

  1. 1.Institute of Information and Scientific Computing Technology, Harbin University of Science and Technology, Harbin 150080, China
    2.Department of Applied Mathematics, College of Applied Sciences, Harbin University of Science and Technology, Harbin 150080, China
  • Online:2013-11-15 Published:2013-11-15

Z曲线网格划分的最近邻查询

刘润涛1,陈琳琳2,田广悦2   

  1. 1.哈尔滨理工大学 信息与科学计算技术研究所,哈尔滨 150080
    2.哈尔滨理工大学 应用科学学院 应用数学系,哈尔滨 150080

Abstract: In order to solve Nearest Neighbor(NN) query in high-dimensional space, the grids are ordered and points on two-
dimensional space are mapped into 1D space with Z curve based on grid partition. Considering the influence of the distribution of points and the shape of grids on queries, the definitions of minimum query layer and direction transformation are proposed. The Z value of any point could be computed if only the direction transformation between it and query point is given, and moreover all Z values of any query layer can be computed. It is proved that the layer, two more layers than the minimum query layer are needed to be queried to accomplish the NN query. The grid shape is tend to square would make efficient and the NN only needs visit the minimum and then two layers are proved. Based on these, the NN algorithm is presented, which is suitable to points of any distribution. And the accurate solution can be obtained.

Key words: Z curve, grid partition, nearest neighbor, query layer

摘要: 为了解决高维空间最近邻查询问题,在网格划分的基础上,利用Z曲线对网格排序并将二维空间中的点映射到一维空间中。考虑到点的分布和网格形状对查询的影响,提出最小查询层和方向变换的概念。只要给出查询点与任意点之间的方向变换,即可求出该点所在的网格Z值,从而求出任意查询层的所有网格Z值。证明了最近邻查询只需访问至最小查询层后再访问两层。基于此提出了最近邻查询算法,它适用于数据点任意分布的情况,该算法能够得到精确解。

关键词: Z曲线, 网格划分, 最近邻查询, 查询层