Fast Nearest Neighbor Search on Road Networks Haibo
Fast Nearest Neighbor Search on Road Networks Haibo Hu, Dik Lun Lee, and Jianliang Xu Hong Kong Univ. of Science & Technology Hong Kong Baptist University
About Myself • Martin Ahrens – 4 th Year – Interested in AI, Game Development, Databases, Info Sec – Graduating May 2008
Presentation Outline • • • Problem Existing Solutions Motivation for new work Network Reduction, SPH, SPIE nd (nearest descendants) Index Updates Cost Models Performance Conclusions
Problem Road Networks
Problem Road Networks – Nearest Neighbor Search
Existing Solutions • Voronoi • Dijkstra’s
Motivation • Voronoi – Unwieldy for denser/vast data • Dijkstra’s – Too many node visits on large/sparser data
Network Reduction • Objectives – Reduce the number of edges while preserving network distances – Replace complex graph topology with simpler structures (trees).
Network Reduction The Elements of reduction • Shortest Path Trees (SPT) – Distance between root and other nodes is minimized
Network Reduction The Elements of reduction • Are Shortest Path Tree (SPT) networks inefficient for road networks? – Degree of vertices in a road network are typically >= 3. – The length of the shortest circuits are still usually long • These reasons justify the reduction of road networks to SPT pieces
SPH • SPH means Shortest Path Trees with Horizontal Edges Specified to reduce number of connected trees – Like SPT but with another condition • Allow sibling-sibling connections (horizontal edges) within trees
SPH Algorithm
NN search on a tree
SPIE • An SPIE is an SPH with another condition • SPIE SPH with ‘Triangular Inequality’ Edges Shortest Path between two nodes in a tree is guaranteed to contain exactly one horizontal edge between ancestors of the two nodes
NN search on SPIE
nd Index – nearest descendant • Very simple operation • For every node in the tree, extract the nearest descendant data node (point of interest) down the tree representation of the road.
SPIE Algorithms
Updates • Node Insertion – Insert into SPIE containing adjacent node • Node Deletion – Rebuild local SPIE • Edge Insertion/Deletion non-trivial depending on specifics of the edge, but is still relatively inexpensive • Edge re-weighting is like above • Data Point Insertion/Deletion only requires change of nd Index of local SPIE tree
Cost Models • I will just provide an overview of insights – Even in a 2 D uniform grid (city blocks) there is still a 25% benefit by the reduction model – Nearest Neighbor search by traditional means is exponential while SPIE NN search is linear to the average distance from a node to a NN – Number of node accesses in nd index is much less than in the traditional approach
Performance • Experimented with the algorithms on two sets of data – Artificial network with ~180 K nodes, exponential distribution of node degrees, edge weights random 1 through 10 – Digital Chart of the World (DCW) containing ~600 K railroads and roads in the Americas. ~400 K nodes – Test system: C++ on Win 32 platform, 2. 4 Ghz P 4, 512 MB RAM, 4 Kb page size
Performance Network Reduction • With ~430 K nodes, only 1571 SPIEs made
Performance nd Index Construction • p represents density of random datasets • Ignores one-time construction of SPIE graph – ~8 MB, created in ~300 seconds • Almost constant construction time of nd Index
Performance NN Search Result • From average of 2000 trials
Performance KNN Search Result • For p=0. 01 dataset on real road network
Performance Summary • Network Reduction and nd Indexing – Simplify network topology in a decent one-time cost – Create light-weight (CPU and mem) nd Index – Perform well on (k)NN queries of varying data – Perform well on k. NN for various k values
Conclusions • Overview – New network k. NN search technique created – Reduction of network to a set of interconnected tree structures (SPIE) – nd index created per SPIE to make k. NN search on SPIE follow predetermined path, and faster – Cost Models and Experimental Results both show improvement upon network-expansion (Dijkstra’s) and solution-based (Voronoi) system for most network topologies and distributions – Future plans are to redesign structure in place of SPIE trees
- Slides: 26