4.1 Naive Bundled Query Processing
In the naive bundled query processing, the bundle of
queries visits nodes in the compact Hilbert R-tree by
using the depth-first search from the root node. Note
that naive processing does not consider the order of
visiting nodes.
When Q visits an internal node whose entry is
(des
obj, R, ptr), we determine whether q
i
∈ R for ev-
ery q
i
∈ Q, and, if such a q
i
exists, then Q visits the
children of the node. When Q visits a leaf node whose
entry is (obj), we compute the distance d(o, q
i
) be-
tween each o ∈ obj and each q
i
∈ Q, and, if the radius
r
i
of q
i
is greater than d
i
= min{d(o, q
i
) | o ∈ obj},
then we set r
i
to d
i
.
The number of visiting nodes in the naive bundled
query processing is much smaller than one in the in-
dividual processing. Hence, the naive bundled query
processing reduces the IO costs for reading files.
4.2 Pre-processing by Hilbert Merge
On the other hand, the number of distance com-
putaions in the naive bundled query processing is pos-
sible to be larger than one in the individual process-
ing. To avoid this situation, we introduce the pre-
processing by the Hilbert merge, which follows from
the following two properties.
1. Two objects such that one is near to the other in
the Hilbert order are that one is near to the other
in a space of objects with high probability. Hence,
an object near to a query within the Hilbert order
is contained in the radius of the query with high
probability.
2. By using the Hilbert merge, we can insert the
group of objects to the nodes in the Hilbert order
simultaneously.
In the pre-processing by Hilbert merge, first we
sort the bundle Q of queries in the Hilbert order by us-
ing the Hilbert sort. Next, we simultaneously search
for nodes where each query q
i
∈ Q is inserted by using
the Hilbert merge. Then, after computing distances
d(o, q
i
) between each q
i
∈ Q and each o ∈ obj in the
searched leaf node whose entry is (obj), we set the
initial radius r
i
of q
i
to min{d(o, q
i
) | o ∈ obj}.
Hence, the number of distance computaions in the
bundled query processing with the pre-processing by
the Hilbert merge is smaller than one in the naivebun-
dled query processing.
4.3 Control for the Order of Visiting
Nodes
In order to reduce the number of distance com-
putaions, in the bundled query processing, we control
the order of visiting nodes in the compact Hilbert R-
tree as similar as the R-tree, by using the ABL (Active
Branch List) L.
When Q visits an internal node, we determine
whether or not Q must visit its child nodes, and, if
so, then we insert the set C of such child nodes to L.
Here, let Q
′
be a sub-bundle Q
′
of Q which will visit
C and R
c
an MBR of c ∈ C. Then, C in L is sorted by
ascending order of min{d(q
i
, R
c
) | q
i
∈ Q
′
}. Hence,
by visiting nodes in the first element of L, Q can visit
a node c ∈ L such that d(q
i
, R
c
) is minimum for every
q
i
∈ Q.
5 EXPERIMENTAL RESULTS
In this section, we give experimental results for the
bundled query processing in similarity search on the
compact Hilbert tree.
For image data, data objects consist of about
7, 000, 000 pictures extracted from about 2, 800 video
data whose features have 64 dimensions, and queries
consist of 90, 000 pictures extracted from 100 video
data. On the other hand, for sound data, data ob-
jects consist of about 7, 000, 000 sound fragments ex-
tracted from about 1, 500 musical data whose features
are 96 dimensions and queries consist of 90, 000 frag-
ments extracted from 30 musical data. Here, 90, 000
queries consist of near queries to far queries. Queries
is not intended to completely match in the database.
The number of queries in bundles varies 10, 100 and
1, 000. The computer environment is Intel Core i7-
3770 3.40GHz CPU with 16GB RAM.
Table 1 and 2 describe the results of the bundled
query processing for image data and sound data, re-
spectively. Here, #queries, #nodes and #distance de-
note the number of queries in bundles, the number of
visiting nodes and the number of distance computa-
tions, respectively. The individual processing adopts
the pre-processing of the Hilbert merge and the con-
trol for the order of visiting nodes.
As shown in row (3) in Table 1 and 2, in the bun-
dled query processing with the control for the order
of visiting nodes, increasing the number of queries
decreases the number of visiting nodes, as well as in
rows (1) and (2). Also, the search time is shortest
when the number of queries in bundles is 100, not
1, 000, for both image data and sound data.
ICPRAM2015-InternationalConferenceonPatternRecognitionApplicationsandMethods
358