In-Memory R-Tree for Within-Distance Spatial Queries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Within-distance queries in spatial database systems are inefficient due to the computational complexity of calculating distances between complex spatial objects, with existing methods using minimum bounding rectangles (MBRs) providing limited performance improvement.

Innovation Solution

The implementation of an in-memory R-tree (IMR-tree) that stores boundary data for the query geometry, allowing for a finer-grained representation and improved performance by generating an expanded bounding geometry to determine topological relationships and optimize within-distance queries.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If MBR approximation is used to speed up distance calculations, then query processing speed is improved, but measurement precision deteriorates

Engineering Contradiction:
Improvequery processing speedVSAvoiddistance calculation precision
Core Design Contradiction:
SpeedVSMeasurement precision

Solution Approach 1:

The patent segments the query geometry into multiple edges and creates an IMR-tree where each edge is represented by its own MBR. This allows the system to quickly eliminate edges that cannot be within the query distance while only performing precise distance calculations on promising candidates, thus resolving the contradiction between speed and precision.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies partial action by using MBR approximation only for the initial filtering phase to eliminate obviously distant edges, then applies precise distance calculation only to the remaining candidate edges. This selective approach maintains speed benefits while ensuring precision where needed.

Inventive Principle:
Principle #16Partial or excessive action

2Measurement precision

If full table scan is performed to ensure accurate within-distance results, then measurement precision is improved, but productivity deteriorates

Engineering Contradiction:
Improvequery result accuracyVSAvoidquery processing throughput
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent performs preliminary action by pre-building an IMR-tree index on the query geometry before executing the within-distance query. This pre-processing organizes edge MBRs in a hierarchical structure that enables efficient pruning during query execution, avoiding full table scans while guaranteeing accurate results.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The IMR-tree serves as an intermediary data structure between the raw geometry data and the query processing logic. It provides a compact, searchable representation that enables efficient filtering without requiring exhaustive comparison of all candidate geometries, thus improving productivity without sacrificing precision.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If MBR expansion is applied to all candidate geometries, then query completeness is improved, but device complexity increases

Engineering Contradiction:
Improvequery completenessVSAvoiddata structure complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies local quality by expanding MBRs selectively based on local geometric properties. Specifically, MBR expansion is applied to edges that are topologically relevant (e.g., edges that could potentially be within query distance), while skipping expansion for edges that are clearly unrelated. This reduces overall complexity while maintaining query completeness.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9910878B2Methods for processing within-distance queries
Publication Date: 2018.03.06 ORACLE INT CORP
  • US9910878B2 patent drawing
  • US9910878B2 patent drawing
  • US9910878B2 patent drawing

AI summary

Techniques and systems for processing within-distance queries are provided. A query for geometry objects within a query distance of a query geometry is received. An in-memory R-tree (IMR-tree) is generated for the query geometry. The IMR-tree includes nodes corresponding to edges of the query geometry. An R-tree index for a plurality of candidate geometries is accessed. At least one node of the R-tree index is processed by: generating an expanded bounding geometry based on the query distance, and using the IMR-tree to determine a topological relationship between the expanded bounding geometry and the query geometry. When the expanded bounding geometry intersects the query geometry, if at least one within-distance test is satisfied, the candidate geometries associated with the selected node are added to a result set. Otherwise, if the selected node is a non-leaf node of the R-tree index, child nodes of the selected node are processed.