1 / 51

移动查询点最近邻与反向最近邻连续监控 (欧氏空间)

移动查询点最近邻与反向最近邻连续监控 (欧氏空间). 李 艳 红 E-mail : anddylee@163.com. 主要内容. 最近邻查询问题描述、分类及解决方案 欧式空间 路网空间 无线广播环境 反向最近邻问题描述、分类及现有的解决方案 欧式空间 路网空间 无线广播环境. 最近邻查询问题描述. 最近邻 (NN) 和反向最近邻 (RNN) 查询技术是空间数据库领域中一个重要的研究课题。 由于定位装置的广泛应用和定位服务的增加,对空间网络数据库中静态 k-NN 查询、移动数据的连续 kNN 监视技术的研究已经成为空间数据库领域的热点课题。.

nam
Download Presentation

移动查询点最近邻与反向最近邻连续监控 (欧氏空间)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 移动查询点最近邻与反向最近邻连续监控(欧氏空间)移动查询点最近邻与反向最近邻连续监控(欧氏空间) 李 艳 红 E-mail:anddylee@163.com

  2. 主要内容 • 最近邻查询问题描述、分类及解决方案 • 欧式空间 • 路网空间 • 无线广播环境 • 反向最近邻问题描述、分类及现有的解决方案 • 欧式空间 • 路网空间 • 无线广播环境

  3. 最近邻查询问题描述 • 最近邻(NN)和反向最近邻(RNN)查询技术是空间数据库领域中一个重要的研究课题。 • 由于定位装置的广泛应用和定位服务的增加,对空间网络数据库中静态k-NN查询、移动数据的连续kNN监视技术的研究已经成为空间数据库领域的热点课题。

  4. 空间数据库(Spatial Databases,SDB)是GlS的重要组成部分,空间数据的查询是空间数据库的基本操作 • 其中一种最重要的查询类型就是最近邻查询. • 最近邻查询问题是由Knuth在1973年提出来的,即邮局问题[1]。 • 可以简单描述为:给定N维空间内的n个点所组成的集合S,将这n个点存储在一种数据结构中,使得对于空间内的任何查询点q,都可以有效地找到它的最近邻,即在S中找到一个点p,使其到q的距离最近。 • 最近邻的数目可以是一个,也可以是多个即kNN。 • 例如,某一用户可能在屏幕上点击一个特定的位置或者一个目标,要求系统查找并返回数据库中5个距离它最近的对象.

  5. 空间数据库 • 空间数据库中的大部分研究仅考虑了欧氏空间。与之相应,以距离为基础的查询如k一NN查询,采用对象之间的欧氏距离来度量. • 欧氏空间,在数学中是对欧几里德所研究的2维和3维空间的一般化。这个一般化把欧几里德对于距离、以及相关的概念如长度和角度,转换成任意数维的坐标系。

  6. 空间数据库的kNN 查询 • 空间数据库的kNN 查询问题通常定义为:给定移动查询点和对象(兴趣点)集合,以及方向和范围约束集合,检索距离查询点的k个最近的对象(邻居)。kNN查询通常可以分为以下几种形式。

  7. KNN查询的几种形式 • (1) 点的 k 个最近邻查询(或简单的k-NN查询)给定一组空间对象和一个查询点,检索k个距离查询点最近的对象。空间对象通常是静态的点。例如,车辆中GPS装置所提交的查询:检索距离车辆最近的5家餐馆。 • (2) 连续的KNN(Continuous k Nearest Neighbors, CkNN)查询: 给定一组空间对象集,一个查询点和一条预定义的路径,检索位于路径上任何点处(查询点)的k个最近的对象。例如,沿着一条路径运动的车辆中的GPS装置所提交的查询:检索5家最近的餐馆。

  8. (3) 群组kNN (Group k Neaerst Neighbors,GKNN)查询:给定一组空间对象和一组查询点,检索k个空间对象使之距离查询点的距离之和最小。例如: 两个或更多的人计划去一家餐馆,使他们的行程时间之和最小化。 • (4) 约束-kNN (Constrained k Nearest Neighbors,CokNN)查询给定一组空间对象,一个查询点和一组方向或范围约束,检索查询点的k个最近邻。例如,检索车辆东南方向且距离车辆不超过5公里的5家最近的餐馆。

  9. (5)反向kNN(Reveres k Nearest Neighbors, RKNN)查询:给定一组空间对象和一个查询点,检索把查询点作为它们k个最近邻之一的对象。一个查询点的RKNN可以与kNN有所不同,因为kNN 查询不是对称函数.

  10. 欧式空间的RNN查询 . p2 is the query point and k=2. . RNN(p2)={ p1, p3, p4} . p4 is an R2NN of p2 although it is far from the query point p2. . p5 and p7 are not answers of the R2NN query of p2 although they are close to p2.

  11. The nearest neighbor to Taxi A is Customer C, but that does not necessarily mean Taxi A is the most likely to get to Customer C because Taxi B is even closer to Customer C. • On the contrary, Taxi A should head for Customer D because Taxi A is the nearest neighbor in relation to Customer D. That is, the RNN for Taxi A is Customer D, and Taxi A may get to Customer D faster than all other taxis. Fig. Another RNN example

  12. 欧式空间的RNN查询 • RNN/RKNN可大概分为:基于预计算的方法和动态方法。 • 基于预计算的方法预先为每个P进行KNN查询,确定P到给定k值的KNN-p’的距离dist(p,p’),对每个p,画一个以p为圆心,dist(p,p’)为半径的圆,若查询点q落在cir(p,p’)内,则p是q的RKNN. 为了查找数据结果点,所有的邻近圆用一个R-树的变种,RNN树来索引。而R-树的另一变种,RDNN树[2]不是物理的保存各邻近圆,而是保存各个数据对象及其邻近圆的半径。RDNN树可同时支持NN和RNN查询。 • 但是这种方法只适合于K值固定的RKNN查询,且索引构建和维护的代价很高。 • 为了支持可变K值,Achtect等人和 xia等人提出,在运行时刻估计KNN的距离,而不是维持真正的KNN距离。

  13. Rdnn-tree

  14. RNN 查询的难度还在于一个对象的进入和离开除了会影响到自身作为查询结果的改变,还会影响到其他对象。

  15. 动态RNN/RKNN查询算法 • 为了消除预计算,出现了快照RNN。 • 快照类RNN的主要目的是利用一些措施来削减查询空间(称为过滤步),然后对得到的候选对象进行精炼,以确定他们是否是查询的RNN。有两种过滤的方法,称为六分空间削减和TPL削减

  16. 六 分 空 间 削 减 法 Stanoi • 六分空间削减[3]由 Stanoi等人提出,他们利用获取RNN时的一些性质来消除预计算。 • 他们将以查询点q为中心的查询空间分成6个大小相等的扇区s1-s6,令p为区域si(i=1..6)内q的NN,可以证明:1)要么p∈ RNN(q). 2)要么在si区q无RNN。 • 该方法分为两个阶段:过滤阶段,在每个扇区进行一个受限的NN查询以找扇区内的NN;在精炼阶段,所有候选者用NN查询来评估,那些有超过NN的候选者被去掉,剩下的构成q的RNN/RkNN集。 • Stanoi算法的效率来自于候选者的数量较少,2D空间的双数据集RNN总共至多有6个候选对象。但随着维数的增加,候选者的数目会呈指数级增加。

  17. 证明:假设存在p2,使得p2s1,使得RNN(q)=p2, 则 NN(p2)=q, qp2 < p1p2, 则 ∠qp1p2 < ∠p1qp2 又, ∠p1qp2 < 60°, 则 ∠qp2p1 > 60° 有 ∠qp2p1 > ∠qp1p2, 则qp1>qp2, 也即 p1不是q的 NN, 这与已知条件矛盾,所以s1内不存在q的其他RNN.

  18. Singh等人提出算法以减轻维数增加所带来的负面影响,该算法首先获得查询点的KNN数据点作为候选者,K(大于RkNN查询中的k)是随机选择的。但是,算法的精确性和执行效果高度依赖于K。K越大,结果越完备,但执行代价高;K越小,效率高,但可能导致真正的答案被错误的删除。Singh等人提出算法以减轻维数增加所带来的负面影响,该算法首先获得查询点的KNN数据点作为候选者,K(大于RkNN查询中的k)是随机选择的。但是,算法的精确性和执行效果高度依赖于K。K越大,结果越完备,但执行代价高;K越小,效率高,但可能导致真正的答案被错误的删除。

  19. TPL by Tao • Tao[4]等人提出TPL算法,它利用空间的半平面特性以定位候选者。 • 每次,查询点q的一个尚未访问过的NN(假设为p)被找到时,由p与q的垂直平分线构建半平面。已知,任何落于含p的半平面的数据对象p’,必定有dist(p,p’)<dist(q,p’)。所以,若一个数据点被k或多于k个半平面所覆盖,则它必定不是RkNN的结果数据对象,因此,它能被安全地去掉,而不需作详细的检查。当有效的区间内不再有q的NN存在时,过滤阶段结束,此时,所有的候选者已被找到,而无关者已被去除。 • [4]的试验显示:正常情况下,TPL剪切后的候选者的数目是2*k到3*k个。在精炼阶段,对每个候选者进行NN查询以去掉错误的候选者。这种方法能保证结果的完备性。

  20. SINGLE RNN PROCESSING • 图1(a), 查询q和 数据点p间的垂直平分线将空间划分为两个半平面: PLq(p,q)(含q)和PLp(p,q) (含p)。则PLp(p,q)中任意点 (如p‘) 不能成为q的RNN,因为它较p比q近。类似地, 一个完全落入PLp(p,q)的节点 MBR (如, N1),也不可能包含候选对象。 • 图1(b),虽然 N2不是完全落入 PLp1(p1,q)或 PLp2(p2,q), 它仍然被剪切,因为它完全落入这两个半平面的合集中。 Fig 1: Illustration of half-plane pruning • 如图2 所示,我们可依次用各个对象对空间N进行消减,从而得到剩余区域。但这种方式求Nres有两个问题。 • 首先,在最坏情况下,每条平分线会使Nres新增一个顶点。因此,第i条平分线的消减需时O(i)(0<i<=nc). 因此,总的处理时间为O(nc2)。 • 其二,这种方法对高维空间不具有可扩展性。 Fig 2: Computing the residual region

  21. NresM初始化为N,然后用各平分线依次对其进行消减。NresM初始化为N,然后用各平分线依次对其进行消减。 • 图a所示,用⊥(p1,q)进行消减。这里没有保留Nres的准确形状,而是计算NresM(即阴影部分)。 • 图b,c分别是在由⊥(p2,q), ⊥(p3,q)消减后剩余的MBRs。 • 注意,最终的NresM并不一定是最终Nres 的MBR。 Figure 3: Computing the residual MBR • 提出了一种简单的替换方法,改方法只需要O(nc)时间。 • 其思路是:用一个剩余MBR NresM来界定Nres。 • 如果If NresM存在, trim算法返回q和NresM间的最小距离;否则,返回∞. • 由于NresM 总是包含Nres ,NresM= ∅ 必然隐含Nres= ∅. 这个特性保证了消减是“安全的”。

  22. The TPL Algorithm • best-first 模式遍历R-tree,每个被消减项入Srfn集合. • 首先访问R树根节点,将其子项N10, N11, N12按到q的最小距离递增的顺序入堆H={N10,N11,N12}。 • N10出堆,其子项入H ={N3, N11, N2, N1, N12}. • 接下来访问N3, 其第一个数据点p1(即离q最近的一个),有dist(p1,q)< dist(N11,q) (N11是堆顶元素),p1被加入至候选集Scnd. • N3的第二个点在 PLp1(p1,q)内 (即它不可能是q的RNN),它被插入精炼集Srfn. • 总的来说,在过滤阶段检查过的任意数据点或节点,都不会被丢弃,因为它们可能会影响某些候选对象(即是它们的NN)。如在精炼阶段p3会使 p1无效,因为dist(p1,p3) < dist(p1,q). Figure 3: Filtering example

  23. Refine step • 过滤步得到候选对象集Scnd和精炼集Srfn. • 精炼步按多轮来执行,左边给出了一轮精炼的算法。 • 算法中,在不访问其他节点的情况下,尽可能的消减候选集中的元素。 • 直觉上,一个点p ∈ Scnd可以被消减,如果 (i)存在另一个点 p’ ∈ Prfn,使得 dist(p,p’) < dist(p,q), 或者 (ii) 存在一个节点MBR N ∈ Nrfn,使得minmaxdist(p,N)< dist(p,q) (即, N一定包含一个点 p’ ,使得dist(p,p') < dist(p,q)). • 如图3中,由第一条件消减p1,因为 p3∈ Prfn且dist(p1,p3)< dist(p1,q). • Lines 2-9 根据上述两条件消减false hits.

  24. 另一方面,一个数据点p ∈ Scnd是一个结果值如果 (i) 不存在另一点p’∈ Prfn,使得 dist(p,p’) < dist(p,q);而且(ii)对任意结点N ∈ Nrfn,有mindist(p,N) ≥ dist(p,q). 如图3中p5. • 每一个Scnd 中剩下的点p (如p2) 必须经历另外的refinement rounds, 因为可能在未访问的结点(N4)中存在点 (p4) ,使之无效。 • 这种情况下,p 需要那些插入toVisit(p),满足mindist(p,N) < dist(p,q)的结点N ,也即, toVisit(p) 是在验证p是一个结果值前需要访问的结点集。 • 接下来就是以一种次序访问toVisit(p) (for p ∈ Scnd)使得可以快速消减剩下的候选对象。 继续上例,第一轮后Scnd= {p2}, toVisit(p2)={N4,N12}. 我们选择最先访问最低层的结点 (即N4),因为它的消减力最大。若同层有多个结点,则访问能消减最多候选对象的结点。 如果待访问的结点N 是叶子结点,则Prfn只包含N中的数据点, Nrfn设为 ∅. 否则 (N 是中间结点), Nrfn则包含 N的孩子结点,Prfn设为 ∅. 本例中,第二轮Scnd= {p2}, Prfn= {N4中的点},Nrfn= ∅。 在N4内, 点p4消减p2,算法结束。 2-4行 是对候选集中各对象进行相互消减。该步只需执行一次。

  25. CRNN Algorithm by Tian Xiao • Tian Xia [5]等人提出一种连续反向最近邻(CRNN)算法,它是一种增量的、可扩展的方法。 • 该方法基于六分空间削减策略。 • 对于一个查询点q,cRNN监控区由至多6个π区域和6个圆形区域构成。其中6个π区域分别监控六个候选对象、6个圆形区域分别验证这六个候选对象是否是查询的真正RNN。 • 对于渐增维护,只有那些落于监控区的位置更新才可能会影响RNN的结果。对每个受影响的查询点,对象的更新被组织到六个分区,对每个受影响的分区,只根据最接近q的对象而更新π区一次。 • 对于圆形区的更新方面,引入了懒惰更新和部分插入优化方法。但这种方法只能处理单色数据集,且为每个查询维持监控区域较复杂,处理较麻烦。

  26. . Before the movement of object 4, the candidates in sub-space S1 are object 1, 2, and 3 because they are the query point’s 3NNs in S1, and the object 2 is query result because its 3NN includes the query point. . After the movement of object 4, the candidates in S1 become object 1, 2 and 4, and object 2 is not a result object anymore because its 3NN now does not include the query point.

  27. The monitoring region of a CRNN • 定义CRNN的监控区域包括两个部分:pie-regions和circ-regions. • pie-regions包括6个pie;circ-region包含6和circle。 基于6分空间消减策略的RNN查询:6个受限的NN查询以获得候选对象,再进行6个NN查询对各候选对象进行验证。 查询空间划分成以q为中心的60度角的6等份。分区Si的pie-region是以q为中心,其Si内受限NN在周边的扇形区域。 分区Si的circ-region 是以Si内候选对象为圆心,以q或距离该候选对象比q更近的元素在圆周的圆形区域。

  28. CRNN Query Initialization • 该算法计算初始结果集,并初始化查询点的监控区域。 • 查询表(QT) 保存每个查询点及其6个区域 (S0,…S5). 对每个区域Si, QT保存:(1) q的受限NN,其距离 d(q,candi); (2)对象nn_candi及其距离d(nn_candi; candi). nn_cand距离cand较q近。 • 若Si不包含任何对象,candi and nn_candi都为null,相应距离值为无穷大。 • 算法的过滤步采用conceptual rectangles [6] 以避免访问不必要的单元。 • 上右图给出了过滤步的实例。首先,含q的单元和围绕q的四个矩形区域被入heap(见算法step2)。 • 对每个分区寻找其受限NN,找到则标记为“finished”

  29. Step 3,依次从H中出堆首项e • 依次考察各Si,若该区域于e相交,且fini=.F., 则判断e的键值是否大于d(nn_cand,candi),若是,则设fini为.T. • Step 3.3, 检查e的mindist is checked是否过期,也即该mindist不能代表已完成的分区外的区域的最小距离 (i.e.,实际的 mindist增加了)。 此时,计算新的mindist,并将e重新入 heap. • Step 3.4, 如果e中的单元c完全包含在finished的分区,则c不入堆H。

  30. An example of the filter step of a CRNN query initialization • 上图(a)中,当矩形L1出堆时,S2分区已标记为finished,(mindist(L1,q)>d(q,o1)),单元c2不入堆H。 • 上图(b)中,分区S2显示为 finished状态。当矩形出堆时,S1标记为finished。U2所关联的mindist(虚线所示)已过期 ,因为它不能代表分区S0内U2中尚未被消减的部分的最小距离值。此时,新的mindist(粗实线所示)将代替旧值,且U2重入堆(未扩展)。

  31. Incremental CRNN Monitoring • 关键是如何保存和维持pie-regions和circ-regions. • 当对象发生位置更新时,我们修改受影响的查询的pie-regions和 circ-regions。 • 若q移动了位置,处理为旧查询的删除和新查询的进入。 • pie-regions 采用传统的bookkeeping方式存储,circ-regions则独立保存。

  32. Handling Updates in Pie-regions • Pie-regions在算法 initCRNN 的Step 3.5初始化。 • Pie-region内的对象移动,有三种情形: • 对象进入pie-region(o4 或 o5); (2) 候选对象离开pie-region(o2 或 o5); (3)候选对象在同个pie-region内移动(o7) • 算法说明: • 3.1 处理情况一,通过设置新候选对象而收缩Pie-region。 • 3.2 处理情况二,通过一个受限的NN查询来重现确定Pie-region。 • 3.3处理情况三,重新计算Pie-region的半径。 Three cases of updates in pie regions

  33. Handling Updates in Circ-regions Fig Updates in Circ-regions

  34. IGERN by Kang • James M. Kang [7]等提出了IGERN(增量式、通用、连续反近邻查询方法),它利用TPL削减策略。它提供一种统一模式以同时处理单色数据集和双色数据集的CRNN,为每个只维持一个有界监控区和少量移动对象,所以比使用六分空间削减策略的方法要高效。

  35. 反向最近邻查询分类 • 反向最近邻查询有两种:单色反向最近邻查询(monochromatic RNN,MRNN)和双色反向最近邻查询(bichromatic RNN,BRNN)[3]。 • 单色反向最近邻查询中,所有移动数据对象和查询对象均属于相同的类型。其定义是:对于查询对象q,数据对象o而言,若不存在其他数据对象o‘,使得dist(o,o’)<dist(o,q),则o是q的反向最近邻。 • 双色反向最近邻查询中,有两种不同的对象类型A和B,查询对象类型为A、数据对象类型为B。其定义是:对于查询 qA和移动对象 oB,若不存在其他A类型的查询oA’,使得dist(oB,oA’)<dist(oB,qA),则oB是qA的反向最近邻。

  36. 单色反向最近邻查询 初始步: Initial: RNNcand = {o2, o4, o6}. RNN = {o2, o6} • The initial step of IGERN has three main objectives: • Obtaining a bounded region r around the query object q which will be monitored. • Identifying a set of objects RNNcandthat need to be monitored • Identifying the set of reverse nearest neighbor objects (RNN ∈RNNcand) to q.

  37. 渐增步: Fig(a): RNNcand={o2,o4,o6)} RNN= {o2, o6} Fig(b): RNNcand={o2,o4,o6)} RNN = {o2} Fig(c): RNNcand={o2,o6,o9)} RNN = {o2,o=} • The incremental step checks for • three different scenarios: • The query object q moves to a new location (Line 2) • At least one of the objects in RNNcandmoves to a new location (Line 2) • A new object moves into the alive cells (Line 6).

  38. 双色反向最近邻查询 (a) Phase 1 (b) phase 2 (c) Incremental • The objectives of the initial step in the bichromatic IGERN algorithm are: • Obtaining a bounded region r around qA to be monitored in the incremental step • (2) Identifying a set objects of type A (NNA) that need to be monitored later as their movement may trigger a change of answer • (3) Identifying the set of initial reverse nearest neighbors of type B (RNNB) to qA.

  39. Phase I: Bounded Region. • By finding object oA that is nearest to qA in the alive cells (Line 3). Then, object oA is added to the list of A objects (NNA). • The bisector b between qA and oA is drawn, while all the grid cells between b and the space boundaries that are furthest from qA are marked as dead (Lines 4-5). • Such process continues until there are no more objects of type A in any of the alive cells. • In Figure (a), the NN search in the alive cells results in finding oA5, oA3, and oA1, and the corresponding bisectors b5, b3, and b1.Thus, NNA = {oA1, oA3, oA5}. (a) Phase 1 (b) phase 2 (c) Incremental Phase II: Verification. • Go through every single object oB within the alive cells and check for its nearest A object, oA (Line 9). • If oA is qA, then oB is a RNN to qA, and added to the set RNNB (Line 11). • If oA is not qA, then oA is considered as one of the objects to be monitored, a bisector is drawn between qA and oA, the corresponding grid cells are marked as dead, and the set NNA is cleaned to make sure that it contains the minimal required objects to be monitored (Lines 13-15). • In Fig(b), there are three B objects in the alive cells, oB3, oB4, and oB5. Finally, only oB3, and oB4 are RNN, while oB5 has oA4 as its nearest A object. • Thus, a bisector b4 is drawn between qA. Object oA4 is then removed from the monitored NNs NNA because it is closer to oA5 than qA. As a result, NNA = {oA1, oA3, oA5} and RNNB = {oB3, oB4}.

  40. The incremental step of the bichromatic case checks for three different scenarios: (1) The query object qA moves to a new location (Line 2) (2) At least one of the objects in NNA moves to a new location (Line 2) (3) A new object of type A moves into the alive cells (Line 6). Main shortcoming: The monitoring region defined in IGERN only applies to CRNN (k = 1). Also for this reason, the IGERN algorithm cannot be extended easily to handle CRKNN queries where k > 1 • If there is one or more objects of type A in the alive cells, tighten the alive cells in a similar way to the first phase in the initial step (Line 7). • Then, the list NNA is cleaned by removing any object that is not participating in drawing the bisectors (Line 8). • Finally, the sets NNA and RNNB are verified (Line 10). That is, NNA = {oA1, oA3, oA5} and RNNB = {oB4}.

  41. Wei wu, Feiyang [8]等人指出:CRNN/CRkNN查询可清楚的划分为连续过滤和连续精炼两部分,而通过分析可知,连续精炼在k>1时占据查询时间的主要部分。 • 提出一个叫做cRange-k的连续精炼算法,它验证查询q的CRkNN的候选者p采用的方法是:连续地监控离p的距离小于dist(o,q)的对象数小于k。它不要求任何精确的信息;而且,它既以范围(Range)来界限查询范围,又以k值来界限查询范围,只要其中之一条件满足,就可以中止算法,故处理高效。

  42. when k increases, the cost of continuous refinement increases much faster than the cost of continuous filter. Fig. Filter vs. refinement

  43. CRange-k Continuous Refinement A Range-k query is specified as < o, r, k > where o is an object, r is a distance, and k is a threshold value, and the query’s result is the boolean value of the following expression: |{p : dist(p,o) < r}| < k. The algorithm consists of two parts: a Search part and a Maintenance part. Search’s functionality is to compute the query’s result by looking for objects that are within the given range, and to index the query into proper cells. An object’s location update triggers the Maintenance of the queries indexed in the corresponding cell (or cells when the object moves from one to another cell). Maintenance’s main functionality is to update the query’s result upon object location changes.

  44. count: the number of objects o that are within the circle (circle(o, r), found in visited cells; V : set of cells checked so far; U: a FIFO queue of cells that we need to check. Initial Processing Initialization: Count=0; V= ∅; U=cell(o). Starting from the cell that contains object o, the cells that intersect with circle(o; r) are checked until one of the following two conditions is satisfied: 1)count ≧k, which means at least k objects are within the given range; False is returned 2) all the cells intersecting with circle(o; r) have been checked and the count is smaller than k. True is returned During the course, the query is indexed into the visited cells.

  45. Fig 5. Search’s Sample States In the figures, gray cells are the covered cells, shaded cells are the partially covered cells, and dotted cells are the cells in the to-be-visited queue.

  46. Continuous Maintenance In Search, we put a reference of the Range-k query to the visited cells that intersect with circle(o; r). For example, they are the grey cells and line shaded cells in Figure 5. • Case 1: If the object moved from a visited cell to a visited cell, check both its starting and ending location to see if count needs to be updated (lines 3-8). • Case 2: If the object moved from a visited cell to an un-visited cell, only need to check its starting location to see if count needs to be decreased (lines 9-12). • Case 3: If the object moved from an un-visited cell to a visited cell, only need to check its ending location to see if count needs to be increased (lines 13-16).

  47. References • [1] Knuth, D. E. (1973). The Art of Computer Programming, volume I: Fundamental Algorithms, chapter 2. Addison-Wesley, second edition. • [2] C. Yang and K.L. Lin, "An index structure for efficient reverse nearest neighbor queries", Proceedings of the 17th International Conference on Data Engineering,2001,p.p. 485-492. • [3] I. Stanoi, D. Agrawal, and A. El Abbadi, “Reverse Nearest Neighbor Queries for Dynamic Databases,” Proc. ACM SIGMOD Workshop Research Issues in Data Mining and Knowledge Discovery (DMKD), 2000. • [4] Y. Tao, D. Papadias, and X. Lian, “Reverse kNN Search in Arbitrary Dimensionality,” Proc. 30th Int’l Conf. Very Large Data Bases (VLDB ’04), pp. 744-755, Aug.-Sept. 2004. • [5]T. Xia and D. Zhang, “Continuous Reverse Nearest Neighbor Monitoring,” Proc. 22nd Int’l Conf. Data Eng. (ICDE ’06), p. 77, Apr. 2006 • [6] K. Mouratidis, M. Hadjieleftheriou, and D. Papadias. Conceptual Partitioning: An Efficient Method for Continuous Nearest Neighbor Monitoring. In SIGMOD, pages 634–645, 2005.

More Related