Download presentation
Presentation is loading. Please wait.
1
Computational Data Modeling and Queries for Location-Based Services in Road Networks Irina Aleksandrova, Augustas Kligys, Laurynas Speičys
2
Problem Setting Road Network Mobile User Ph road networks Application domain: mobile users issue queries about stationary objects “Find the 3 nearest open pharmacies” Scenario: data modeling system architecture for query processing algorithms, underlying computation of the query result Main issues: Topic: location-based services
3
Outline Problem Setting Data Model and Transformation Querying System Architecture Query Processing Algorithms Future Work
4
Road Network Data Model Road Network 2D traffic regulations on intersections Road elements: Segments: bi-directional, one-directional roads separating lines different properties on different directions of the single road (e.g., surface quality, speed limit) Connections:
5
Objects’ Data Model Objects on the road network: Query point: position Data points: 2D Ph Road Network Ph qp position several locations accessibility from different movement directions properties
6
Transformation: the Idea Transformation 70km/h 100km/h Identify chains of segments two segments meet the same movement directions the same properties Transform: ending connections of chains to vertices chains to edges
7
Transformation: Segments to Edges A chain of segments ch = {s 1, …, s n } An edge e = (v s, v e, w, l) Co-edge relation coE Components: Weight is computed according to travel distance of paths of a chain: 70km/h 100km/h pth 1 pth 2 e1e1 e2e2 v s, v e corresponds to ends of chains l corresponds to a sum of road distances of chain’s segments ( e 1, e 2 ) coE if turn around on segments is allowed
8
Transformation: Connections To Vertices Single Vertex qp no restrictions c v Mapping according to restrictions on movement on v : any restrictions c {v 1,…,v n } {,…, } Connections qp Multiple Vertices qp X X Components: connection c =(p, mx) vertex v Semantics of vertex: can move to any outgoing edge from any ingoing edge
9
Transformation: Objects Graph: dp G = (e, pos l, pos w, speed w, t) Query point: 2D: qp 2D = (p, s) pos l = RD(pth) + d(p k, qp) pos w = TD (pth) + TD s (p k, qp) QP t1t1 t2t2 pth pos w pos l qp pkpk p1p1
10
Transformation: Objects DP lc 1 Graph: dp G = (e, pos l, pos w ) Data point: 2D: dp 2D = (prop={…}, loc={lc 1,lc 2,…}) Graph: dp G = (e, pos l, pos w, speed w, t) Query point: 2D: qp 2D = (p, s) One location to one (two) data point: lc 1 dp 1 G, lc 2 dp 2 G, … Ph lc 2 QP t1t1 t2t2 pth pos w pos l qp pos l = RD(pth) + d(p k, qp) pos w = TD (pth) + TD s (p k, qp) pkpk p1p1
11
Outline Problem Setting Data Model and Transformation Querying System Architecture Query Processing Algorithms Future Work
12
Querying Query: ”Find 2 nearest pharmacies” Problem: compute k-NN T=t1 Answer: {A,B} Problem: active result T=t2 Answer: {B,A} A B
13
Outline Problem Setting Data Model and Transformation Querying System Architecture Query Processing Algorithms Future Work
14
Scenario of Processing a New Query User issues a query providing NNs, their number k, and Max Road Distance Client searches for k NNs and validates the data set: Client issues a query to Server with user’s query and current position (x, y) Server “quickly” selects l NNCs from an area around (x, y), 0 l max NNCs in map. Position tracking Active result Quick selection k NN search Visual. Client Server Find not less than 3 open pharmacies around (157, 52) not further than 10 km Find 3 nearest open pharmacies within 10 km, User 4 open pharmacies, location of the query window Visualization of 3 pharmacies Validation upon invalid data set reissues the query + Minimal Road Distance upon valid data set maintains an active result and visualizes the result GPS
15
Scenario of Processing a Position Change if Client has moved significantly from a point of last query to Server Quick selection Client Server User Visualization of 3 pharmacies if Client has passed an intersection if Client has changed speed or direction Result of the query (a set of NNs) is adjusted according to the change of Clients GPS coordinates: Position tracking Active result k NN search Visual. GPS Validation 7 open pharmacies, location of the query window Find not less than 3 open pharmacies around (193, 53) not further than 10 km
16
Outline Problem Setting Data Model and Transformation Querying System Architecture Query Processing Algorithms Future work “Quick” Selection Validation k NN Search Algorithms Handling Updates
17
X 10 X 11 Y 30 Y 31 1.825 1.8501.875 425 400 375 Grid Data Structure A 2D map is covered by a grid. Each data point in the map is associated with a cell. Each cell has information about all data points within it. A cell is accessed directly.
18
y5 y4 y3 y2 y1 x1x2x3x4x5x6 “Quick” Selection QPoint QWindow 3 QWindow 1 QWindow 2 Processing initial query: Select data points from the cell of QPoint (QWindow 1 ) While ((NNCs < k) & (MRD not reached) & (there are unexplored cells)) {select NNCs from additional “ring”}
19
“Quick” Selection A new QWindow is formed reusing already selected data. QWindow 2 QPoint QWindow 3 QPoint QWindow 1 QWindow 2 y5 y4 y3 y2 y1 x1x2x3x4x5x6 Only an update is sent to the Client: additional data points discarded data points A query is received from Client Processing subsequent query: Processing initial query: Select data points from the cell of QPoint (QWindow 1 ) While ((NNCs < k) & (MRD not reached) & (there are unexplored cells)) {select NNCs from additional “ring”}
20
Outline Problem Setting Data Model and Transformation Querying System Architecture Query Processing Algorithms Future work “Quick” Selection Validation k NN Search Algorithms Handling Updates
21
Validation solves data shortage problem correct, if RD(qp, nn RD last ) < dist(qp,qw) frame = normalized TD Frame validation: incorrect, if TD(qp, dp’) < TD (qp,dp) The result of the NNs list: Validation
22
Outline Problem Setting Data Model and Transformation Querying System Architecture Query Processing Algorithms Future work “Quick” Selection Validation k NN Search Algorithms Handling Updates
23
NN Search Algorithms was not visited has the lowest travel distance Next step – vertex that Search in the graph is based on best-first search. knnWOT turn-around is not allowed knnWT turn-around is allowed 5 5 8 1 8 12 8 3 1 start root edge qp
24
Algorithm knnWOT Search scans the root edge and runs the best-first search from the end point of the root edge data points qp data points on the root edge might appear twice in the NN list
25
Algorithm knnWOT Search Active result scans the root edge and runs the best-first search from the end point of the root edge qp data points on the root edge might appear twice in the NN list discards data points from the NN list that are behind the query point
26
Algorithm knnWT Two search trees the first: considers the nearest data points the query point is approaching to the second: considers the nearest data points the query point is moving away Merge results of both trees Search Active result dp2 dp1 dp3 dp4 qp co-qp dp1 changes the order of the elements in the NN list
27
Active Result for knnWT 1.5 -3.5 now now +1.5 CB dp1 [4] dp3 [14] dp2 [9] qp [1] speed=1 dp4 [4] alarms
28
Active Result for knnWT 1.5 -3.5 40 NULL CB dp1 [4] dp3 [14] dp2 [9] dp4 [4] SWAPPING qp [2.5] speed=1 alarms now now +1.5
29
Outline Problem Setting Data Model and Transformation Querying System Architecture Query Processing Algorithms Future work “Quick” Selection Validation k NN Search Algorithms Handling Updates
30
Handling Updates Insertion of the data point into the NN list if the edge was already traversed (it is in the search tree) then insert a new data point into NN list (no other points are discarded) Deletion of the data point from the NN list perform NN search algorithm from the scratch if edge was not traversed – do not insert a data point
31
Outline Problem Setting Data Model and Transformation Querying System Architecture Query Processing Algorithms Future work “Quick” Selection Validation k NN Search Algorithms Handling Updates
32
Future Work Moving function for query point in 2D representation Predefined routes Using indexing in data selection according to the density of roads or objects Experiments
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.