/TASK

Primary LanguageC++

TASK

Introduction

This repository contains the code used in our paper: TASK: An Efficient Framework for Instant Error-tolerant Spatial Keyword Queries on Road Networks. TASK is an efficient framework to tackle the instant error-tolerant spatial keyword queries on road networks, which consists of an index component, a query component, and a result update component.

Datasets

We use six publicly available real-world road networks, which are obtained from DIMACS and OpenStreetMap, including NY, FLA, EU, WU, CTR and USA datasets.

We use the code of the SHP algorithm to generate the 2-hop label and PSL algorithm to generate updated 2-hop label. The format of the data input is the same as required in the source code.

An example format of the input data for R2T is shown in folder datasets/test.

Algorithms

The following files are the codes for our proposed algorithms. We implemented all codes the using C++ with CLion 2022.1.1.

  1. buildR2T.cpp : Index construction algorithm of R2T.
  2. IQA.cpp : Instant query algorithm.
  3. IUA.cpp : Instant update algorithm.
  4. multiKey : Multi-keyword IQA algorithm。
  5. updateR2T.cpp : Index maintenance algorithm of R2T.

Usage

Labels generated by SHP algorithm are used to construct R2T in buildR2T.cpp. When the construction is complete, you can use the IQA.cpp, IUA.cpp or multiKey.cpp to perform instant queries on road networks. Besides, updated labels generated by PSL algorithm can be used to maintain the structure of R2T in updateR2T.cpp.

Requirements

  • cmake
  • g++
  • OpenMP
  • Boost