
2
for each pair of adjacent vertices v
i
and v
j
in Q, we
need to find all matching pairs in G whose distances
are less than δ. This is called an edge query. To an-
swer an edge query, we need to conduct a distance-
based join operation between two lists of matching ver-
tices correspondin g to v
i
and v
j
in G. Therefore, finding
pattern Q in G requires a sequence of di stance-based
join operations, which is very costly for large graphs.
In order to answer patte rn match queries efficiently, we
adopt the filter-and-refine framework. Specifically, we
need efficient pruning strategies to reduce the search
space. Although many effective pruning techniques have
been proposed for subgraph search (e.g., [24,34,6,17,
31,36,15,25]), they can not be applied to pattern match
queries since these pruning rules are based on the nec-
essary condition of subgraph isomorphism. We propose
a novel and effective method to reduce the search space
significantly. Specifically, we transform vertices into points
in a vector space via graph embedding methods, con-
verting a pattern match query into a distance-based
multi-way join problem over the vector space to find
candidate matches. In order to reduce the join cost, we
propose several pruning rules to reduce the search space
further, and propose a cost model to guide the selection
of the join order to process multi-way join efficiently.
During the refinement process, we adopt 2-hop dis-
tance label [9] to compute the shortest path distance
for each candidate match. Unfortunately, finding the
optimal 2-hop distance-aware labeling (i.e., one where
the size of 2-hop distance-aware labels is minimized) is
a NP-hard problem [9]. Although a heuristic method to
compute 2-hop distance-aware labels in a large directed
graph has been proposed [7], this method cannot work
well in a large undirected graph. We will d iscuss this
method in detail in Section 2. In this paper, we propose
a betweenness (Definition 3) estimation-based method
to guide 2-hop distance-aware center selection. Exten-
sive experiments on both real and synthetic datasets
confirm the efficiency of our method.
To summarize, in this work, we make the following
contributions:
1) We propose a general framework for handling
pattern match queries over a large graph. Specifically,
we adopt a filter-and-refine framework to answer pat-
tern match queries. During filtering, we map vertices
into vectors via an embedding method and conduct
distance-based multi-way join over the vector space.
2) We design an efficient distance-based join algo-
rithm (D-join for short) for an edge query in the con-
verted vector space, which well utilizes the block nes ted
loop join and hash join techniques to handle the high
dimensional vector space. We also develop an effective
cost model to estimate the cost of each join operation,
based on which we can select the most efficient join
order to reduce the cost of multi-way join.
3) In order to address the high complexity of of-
fline processing, we propose a graph partitioning-based
method and bi-level version of D-join algorithm, called
bD-join.
4) In order to enable shortest path distance compu-
tation efficiently, we propose betweenness estimation-
based method to compute 2-hop distance labels in a
large graph.
5) In order to answer an approximate subgraph query
(Definition 9), we first transform it into a distance-
based pattern match query. Then, we find candidates by
D-join algorithm. Finally, for each candidate, we verify
whether it is an approximate subgraph match (Defini-
tion 8).
6) Finally, we conduct extensive experiments with
real and synthetic data to evaluate the proposed ap-
proaches.
The rest of this paper is organized as follows. We
discuss the related work in Section 2. Our framework
is presented in Section 3. We propose betweenness esti-
mation-based method to compute 2-hop distance labels
in Section 4. The offline process is discussed in Section
5. We discuss the neighbor area pruning technique in
Section 6, and a distance-based join algorithm for an
edge query and its cost model in Section 7. Section
7 also presents a distance-based multi-way join algo-
rithm for a pattern match query and join order selection
method. In Section 8, we propose a graph partition-
based method to reduce the cost of offline processing
and the bD-join algorithm. In Section 9, we propose
a distance-join based solution to answer approximate
subgraph queries. We study our methods by experi-
ments in Section 10. Section 11 concludes this paper.
2 Background and Related Work
Let G = hV, Ei be a graph where V is the set of vertices
and E is the set of edges. Given two vertices u
1
and u
2
in G, a reachability query verifies if there exists a path
from u
1
to u
2
, and a distance query returns the shortest
path distance between u
1
and u
2
[9]. These are well-
studied problems, with a numb er of vertex labeling-
based solutions [9]. A family of labeling techniques have
been prop osed to answer both reachability and distance
queries. A 2-hop labeling method over a large graph
G assigns to each vertex u ∈ V (G) a label L(u) =
(L
in
(u), L
out
(u)), where L
in
(u), L
out
(u) ⊆ V (G). Ver-
tices in L
in
(u) and L
out
(u) are called centers. There are
two kinds of 2-hop lab eling: 2-hop reachability label-
ing (reachability labeling for short) and 2-hop distance
评论