Learned Index for Spatial Queries(MDM2019)

随着基于位置服务(LBS)的普及,空间数据处理在数据库系统管理研究中受到了广泛关注。在各种空间查询技术中,索引结构在数据访问和查询处理中起着关键作用。然而,现有的空间索引结构(如R-tree)主要集中于对数据空间或数据对象进行分区。在本文中,我们探索了通过学习数据分布来构建空间索引结构的潜力。我们设计了一种新的数据驱动的空间索引结构,即学习z阶模型(ZM)索引,它结合了z阶空间填充曲线和阶段学习模型。在真实数据集和合成数据集上的实验结果表明,我们学习的索引在大多数情况下都比R-tree更有效地降低了内存成本。

方法:

在本文中,我们关注多维空间数据,并研究如何学习用于空间查询的高效索引。与一维数据可以按属性值排序不同,多维数据不容易排序。为了解决这一挑战,我们提出了一种新的索引结构,称为学习的ZM索引,以探索空间数据模式和高效地处理空间查询。学习后的ZM索引利用z顺序曲线将多维数据映射到一维数据空间,然后构造一个多阶段的模型索引来学习数据分布和预测所需数据对象的位置。此外,我们开发了一种基于预测数据位置处理空间范围查询的算法。我们使用真实数据集和合成数据集进行的实验表明,学习后的ZM索引在大多数场景中显著降低了内存成本,执行速度比R-tree快得多。

LEARNED ZM INDEX

我们提出了一种新的索引结构,即学习的ZM索引,并在学习的ZM索引上发展了空间查询技术。首先,我们应用z顺序曲线并为每个点分配z地址。然后,我们构建了将z地址与多阶段模型索引结合起来的学习后的ZM索引。第三,我们提出了一种基于学习到的ZM索引处理空间范围查询的算法。

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
## A C++11 implementation of the B-Tree part of "The Case for Learned Index Structures" A research **proof of concept** that implements the B-Tree section of [The Case for Learned Index Structures](https://arxiv.org/pdf/1712.01208.pdf) paper in C++. The general design is to have a single lookup structure that you can parameterize with a KeyType and a ValueType, and an overflow list that keeps new inserts until you retrain. There is a value in the constructor of the RMI that triggers a retrain when the overflow array reaches a certain size. The basic API: ```c++ // [first/second]StageParams are network parameters int maxAllowedError = 256; int maxBufferBeforeRetrain = 10001; auto modelIndex = RecursiveModelIndex recursiveModelIndex(firstStageParams, secondStageParams, maxAllowedError, maxBufferBeforeRetrain); for (int ii = 0; ii < 10000; ++ii) { modelIndex.insert(ii, ii * 2); } // Since we still have one more insert before retraining, retrain before searching... modelIndex.train(); auto result = modelIndex.find(5); if (result) { std::cout << "Yay! We got: " << result.get().first << ", " << result.get().second << std::endl; } else { std::cout << "Value not found." << std::endl; // This shouldn't happen in the above usage... } ``` See [src/main.cpp](src/main.cpp) for a usage example where it stores scaled log normal data. ### Dependencies - [nn_cpp](https://github.com/bcaine/nn_cpp) - Eigen based minimalistic C++ Neural Network library - [cpp-btree](https://code.google.com/archive/p/cpp-btree/) - A fast C++ implementation of a B+ Tree ### TODO: - Lots of code cleanup - Profiling of where the slowdowns are. On small tests, the cpp_btree lib beats it by 10-100x - Eigen::TensorFixed in nn_cpp would definitel

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值