Tracking Where Events Take Place: Reverse Spatial Term Queries on Streaming Data

Sara Farazi, Davood RafieiarXiv 2022

Abstract

Tracking the geographic distribution of specific keywords in real-time data streams, such as social media, is a computationally intensive task. This paper presents a highly efficient framework for "Reverse Spatial Term Queries" using a probabilistic spatial model and a novel "Ring Summary" (Ringsum) data structure. By aggregating data into concentric rings around event centers, the proposed method achieves query speeds up to 1,000 times faster than existing baselines while maintaining high accuracy and minimal memory overhead.

1. Introduction

In the era of geo-tagged social media and ubiquitous sensors, understanding the spatial distribution of events is crucial. "Reverse Spatial Term Queries" address questions like "Where is 'flu' being mentioned most?" or "What is the frequency of 'coffee' in Seattle?" on live data streams. Traditional spatial indexing methods are designed for static data and fail to scale with the high velocity of streams like Twitter, which generates hundreds of millions of posts daily. Existing streaming algorithms often struggle to estimate term frequencies in specific locations without explicit, memory-intensive storage for every possible grid cell.

2. Methodology

The researchers propose a two-pronged approach to balance memory usage and estimation accuracy: a probabilistic spatial model and the Ringsum data structure.

2.1 Probabilistic Spatial Model

Keywords are treated as events radiating from a central "hot spot." The model follows a power-law distribution ($P = Cd^{-\alpha}$), where $C$ represents the popularity at the center and $\alpha$ denotes the spatial spread. This allows the system to estimate term frequency even for locations not explicitly stored in memory.

Geometric representation of the ring-based spatial model showing centers $L_0, L_1$ and concentric rings.

2.2 The Ring Summary (Ringsum)

The core innovation is the Ring Summary (Ringsum). Instead of maintaining counters for every cell in a global grid, the system maintains a set of concentric rings around identified centers. When a geo-tagged item arrives, only the counter for the corresponding ring is updated. This reduces the computational complexity of queries from thousands of grid cells to a handful of rings.

The Ringsum data structure, showing counters for multiple rings per term to minimize memory and computation.

To further optimize performance, the authors introduced "Light-Update" and "Fixed-Center" strategies. The latter leverages the observation that event centers stabilize quickly; after processing approximately 20% of the stream, centers rarely change, allowing the system to stop expensive re-centering operations.

3. Experimental Evaluation

The framework was evaluated using two large-scale datasets:

  • Flickr YFCC100m: 100 million geo-tagged photos and associated tags.
  • Twitter Stream: 53 million geo-tagged tweets from the US (Dec 2017 - Jan 2018).

3.1 Key Results

  • Query Performance: The Ringsum method answered queries 2 to 3 orders of magnitude faster (up to 1,000x) than the Tsum+ baseline.
  • Update Efficiency: The "Fixed-Center" strategy improved per-item processing time by over 10x.
  • Accuracy: The probabilistic model maintained high fidelity, with log-scale frequency errors ranging between 0.22 and 0.39.
  • Scalability: The system uses a small, fixed number of counters per term, making it highly memory-efficient for standard hardware deployments.

4. Conclusion and Future Work

The Ringsum approach effectively addresses the challenges of real-time spatial event tracking. While the current model excels at single-center events, future work will focus on multi-center models for terms like "pizza" or "Starbucks." Additionally, the researchers plan to explore sliding window techniques to track moving events (e.g., storms) and dynamic term monitoring to automatically identify emerging trends in the data stream.

Summary updated

BibTeX
@misc{farazi2022tracking,
  author = {Sara Farazi and Davood Rafiei},
  title = {{Tracking Where Events Take Place: Reverse Spatial Term Queries on Streaming Data}},
  year = {2022},
  eprint = {2201.07378},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.07378},
}
Figure