PPT - SSTD 2011

 Motivation
 Reverse Queries
 From Reverse to Inverse
 Inverse Queries




Formal Definition
Applications
Framework
Experiments
 Future Extensions
2
Reverse Queries
 Given a query object 𝑞 and a spatial query predicate 𝜑
 Find all objects of a database 𝐷𝐵 having 𝑞 in their 𝜑 result set
 Characteristic Example: The Reverse kNN Query
3
Reverse kNN Queries
 Given a query object 𝑞 and a positive integer 𝑘.
 Find all objects of a database 𝐷𝐵 that have 𝑞 as one of their
𝑘-nearest neighbors, i.e. 𝑅𝑁𝑁 𝑞, 𝑘 = {𝑜 ∈ 𝐷𝐵|𝑞 ∈ 𝑁𝑁(𝑜, 𝑘)}
4
Reverse kNN Queries
 Given a query object 𝑞 and a positive integer 𝑘.
 Find all objects of a database 𝐷𝐵 that have 𝑞 as one of their
𝑘-nearest neighbors, i.e. 𝑅𝑁𝑁 𝑞, 𝑘 = {𝑜 ∈ 𝐷𝐵|𝑞 ∈ 𝑁𝑁(𝑜, 𝑘)}
k=1
q
5
Reverse kNN Queries
 Given a query object 𝑞 and a positive integer 𝑘.
 Find all objects of a database 𝐷𝐵 that have 𝑞 as one of their
𝑘-nearest neighbors, i.e. 𝑅𝑁𝑁 𝑞, 𝑘 = {𝑜 ∈ 𝐷𝐵|𝑞 ∈ 𝑁𝑁(𝑜, 𝑘)}
k=1
q
6
From Reverse to Inverse
 RkNN queries take as input one single query object 𝑞
 However, similarity queries (e.g. 𝜀-range, kNN) may return more
than one result.
 In this work, we generalize the concept of reverse queries
 Assume the query answer can be (partially) observed.
 But the query object is not known
 Find the query!
7
Inverse Queries
 Let 𝜑 be a spatial query predicate.
 An inverse 𝜑 query (𝐼𝜑𝑄) computes for a given set of query
objects 𝑄 ⊆ 𝐷𝐵, the set of points 𝑟 ∈ 𝑅𝑑 for which 𝑄 is in the
𝜑 query result. Formally,
𝑑
𝐼𝜑𝑄 = {𝑟 ∈ 𝑅 |𝑄 ⊆ 𝜑(𝑟)}
8
Inverse Queries
 Let 𝜑 be a spatial query predicate.
 An inverse 𝜑 query (𝐼𝜑𝑄) computes for a given set of query
objects 𝑄 ⊆ 𝐷𝐵, the set of points 𝑟 ∈ 𝑅𝑑 for which 𝑄 is in the
𝜑 query result. Formally,
𝑑
𝐼𝜑𝑄 = {𝑟 ∈ 𝑅 |𝑄 ⊆ 𝜑(𝑟)}
 Special Cases:
 The mono-chromatic case where the result is a subset of 𝐷𝐵
 The bi-chromatic case where the result is a subset of a given
database 𝐷𝐵‘ ⊆ 𝑅 𝑑
9
Inverse Queries
 Naïve Approach:
 Perform a reverse 𝜑 query for each 𝑞 ∈ 𝑄
 Intersect the results
 Challenge
 Efficient algorithms for inverse queries.
 Single index traversal
 Different Predicates
 Inverse 𝜀-range queries
 Inverse kNN queries
 Inverse dynamic skyline queries
10
Applications: Bi-Chromatic Inverse 𝜀-range query
 Consider a movie database containing a large
number of movie records.
 Each movie record contains features such as humor,
suspense, romance, etc.
humor
11
Applications: Bi-Chromatic Inverse 𝜀-range query
 Users of the database are represented by the same
attributes, describing their preferences.
 Assume that a group of users, such as a family, want to
watch a movie together
humor
12
Applications: Bi-Chromatic Inverse 𝜀-range query
 Find movies sufficiently close to ALL users preferences
humor
13
Applications: Bi-Chromatic Inverse 𝜀-range query
 Find movies sufficiently close to ALL users preferences
Recommend me!
humor
14
Applications: Mono-Chromatic Inverse kNN query
 Assume that a set of households and their spatial
coordinates.
15
Applications: Mono-Chromatic Inverse kNN query
 Some households have been robbed in short
succession and the robber must be found.
16
Applications: Mono-Chromatic Inverse kNN query
 Assume that the robber will only rob houses which are in
his close vicinity, e.g. within the closest hundred
households.
 An inverse 100NN query returns a list of possible suspects
17
Applications: Mono-Chromatic Inverse kNN query
 Assume that the robber will only rob houses which are in
his close vicinity, e.g. within the closest hundred
households.
 An inverse 100NN query returns a list of possible suspects
Suspects!
18
Applications: General Inverse Dynamic Skyline Query
 An online-shop wants to recommend items to their
customers by analyzing other items clicked by them.
 Clicked items Q seen as samples of products the
customer is interested in, and thus, is assumed to be in
the customer’s dynamic skyline.
19
Applications: General Inverse Dynamic Skyline Query
 The inverse dynamic skyline query can be used to narrow
the space which the customers preferences are located in.
 Case |Q|=1: Reverse Dynamic Skyline Query.1
1Evangelos
Dellis, Bernhard Seeger: Efficient Computation of Reverse
Skyline Queries. VLDB 2007
20
Applications: General Inverse Dynamic Skyline Query
 Case: Q>1
21
Filter-Refinement Framework
 Fast Query Based Evaluation
 Verify simple constraints that are necessary conditions for a nonempty result.
 Query-Based Pruning
 Employ the topology of the query objects to prune objects in DB
 Object-Based Pruning
 Access database objects in ascending order of their maximum
distance to the query set
 Refinement
 Perform a (forward) 𝜑 query on each remaining candidate.
 Check if all query objects are contained in the result.
22
Experiments
23
Future Directions
 Restrictive Query Definition
 Often yields empty result sets
 Applications?
 Ranked Result
 Rank by Recall: Return objects similar to the largest number of
query objects first.
 Rank by Precision: Return objects with the higest fraction of query
objects in their result first.
 Rank by predicate parameters: Return objects that require the
least 𝜀/k parameter in order to have all objects in Q in their result.
24
25