Temporal Selection Queries in Video Databases

8
Temporal Selection Queries in Video Databases S. Sioutas 1 , C. Makris 1 , G.Lagogiannis 1 , E. Sakkopoulos 1 , K. Tsichlas 1 , V. Delis 2 , A.Tsakalidis 1, 2 1 Computer Engineering and Informatics Dept. University of Patras, Greece 2 Computer Technology Institute Patras, Greece tel: +3061 960332 fax: +3061 960322 (sioutas, lagogian, makri, sakkopul, tsihlas)@ceid.upatras.gr,(delis,tsak)@cti.gr Abstract The paper is concerned with the effective and efficient processing of temporal selection queries in Video Database and generally Temporal Database Management Systems (TDBMS). Based on both general spatio-temporal retrieval framework ([3]) and recent versions of internal-external Priority Search Trees, we present an optimal in time and space algorithm for the problem that answers certain temporal content queries invoking video functions. We prove the optimality by giving both a new theoretical comparison method based on microanalysis and its experimental verification. 1. Overview The handling of temporal information is an increasingly evident demand for modern DBMSs, initially motivated by applications like GIS, CAD, etc. and soon expanded in areas such as robotics, medical imaging, multimedia applications, video databases, etc. Efficient query processing for this type of data is a feature of primary importance. Temporal databases are collections of entities, which have temporal attributes (e.g. medical databases, video databases etc.). A characteristic representative of temporal databases is video databases. A ubiquitous task in such databases is that of indexing video content, a collection of objects or activities, which appear in the specific video at certain frame ranges. This information is stored as metadata and is not extracted from the video in real time. In order to support querying of such attributes, a TDBMS must provide appropriate operators, usually in the form of binary temporal predicates (or relations) ([1,2,3]), such as before, after, during, near etc. (e.g. "find all buildings during 1970-1980" or "find all buildings before and near to 1970" or find and report all objects during a range of video frames e.t.c.) Responding to these requirements, we propose a temporal relation framework that can be tuned in various relation detail levels, which is based on 1D partitions called resolution schemes. The set of feasible relations at every resolution level are represented as binary strings which are characterized by an inherent poset graph structure, called conceptual neighborhood (or Hasse diagram which is in fact a distributive lattice) that exhibits certain desirable properties. It has the property that similar relations are closer to each other than non-similar ones. This particular graph was first proposed by Freksa ([5]) as a means to capture similarity among interval relations (two relations are linked through an edge if they can be transformed to each other by a continuous minimal deformation of the primary interval). Based on the properties of this graph we prove that all the temporal relation queries are transformed to special cases of 2-D range searching (diagonal corner query, 2- sided or quadrant query) providing and implementing the best optimal solution in internal and external memory respectively. Due to the fact that the information is stored as metadata and is not extracted from the TDBMS in real time, we provide static solutions, in particular optimal static versions of Priority Search Trees. 2. TEMPORAL RELATION FRAMEWORK Definition 1. Assume a reference interval [a,b]. A resolution scheme (or simply scheme) Y(a,b) = <X 1 , X 2 , …, X n > is a partition of (-,), where seq(Y(a,b)) = <x 1 , x 2 , …, x m >. A relation R over Y is a binary string t 1 t 2 …t n , t i {0,1}, t i ="1" iff X i [x,y]≠∅ and t i ="0" otherwise, i=1..n, complying with the Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the VLDB copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Very Large Data Base Endowment. To copy otherwise, or to republish, requires a fee and/or special permission from the Endowment Proceedings of the 29 th VLDB Conference, Berlin, Germany, 2003

Transcript of Temporal Selection Queries in Video Databases

Temporal Selection Queries in Video Databases

S. Sioutas1, C. Makris1, G.Lagogiannis1, E. Sakkopoulos1, K. Tsichlas1, V. Delis2 , A.Tsakalidis1, 2

1Computer Engineering and Informatics Dept. University of Patras, Greece

2Computer Technology Institute Patras, Greece

tel: +3061 960332 fax: +3061 960322

(sioutas, lagogian, makri, sakkopul, tsihlas)@ceid.upatras.gr,(delis,tsak)@cti.gr

Abstract

The paper is concerned with the effective and efficient processing of temporal selection queries in Video Database and generally Temporal Database Management Systems (TDBMS). Based on both general spatio-temporal retrieval framework ([3]) and recent versions of internal-external Priority Search Trees, we present an optimal in time and space algorithm for the problem that answers certain temporal content queries invoking video functions. We prove the optimality by giving both a new theoretical comparison method based on microanalysis and its experimental verification. 1. Overview The handling of temporal information is an increasingly evident demand for modern DBMSs, initially motivated by applications like GIS, CAD, etc. and soon expanded in areas such as robotics, medical imaging, multimedia applications, video databases, etc. Efficient query processing for this type of data is a feature of primary importance. Temporal databases are collections of entities, which have temporal attributes (e.g. medical databases, video databases etc.). A characteristic representative of temporal databases is video databases. A ubiquitous task in such databases is that of indexing video content, a collection of objects or activities, which appear in the specific video at certain frame ranges. This information is stored as metadata and is not extracted from the video in real time. In order to support querying of such attributes, a TDBMS must provide appropriate operators, usually in the form of binary temporal predicates (or relations)

([1,2,3]), such as before, after, during, near etc. (e.g. "find all buildings during 1970-1980" or "find all buildings before and near to 1970" or find and report all objects during a range of video frames e.t.c.) Responding to these requirements, we propose a temporal relation framework that can be tuned in various relation detail levels, which is based on 1D partitions called resolution schemes. The set of feasible relations at every resolution level are represented as binary strings which are characterized by an inherent poset graph structure, called conceptual neighborhood (or Hasse diagram which is in fact a distributive lattice) that exhibits certain desirable properties. It has the property that similar relations are closer to each other than non-similar ones. This particular graph was first proposed by Freksa ([5]) as a means to capture similarity among interval relations (two relations are linked through an edge if they can be transformed to each other by a continuous minimal deformation of the primary interval). Based on the properties of this graph we prove that all the temporal relation queries are transformed to special cases of 2-D range searching (diagonal corner query, 2-sided or quadrant query) providing and implementing the best optimal solution in internal and external memory respectively. Due to the fact that the information is stored as metadata and is not extracted from the TDBMS in real time, we provide static solutions, in particular optimal static versions of Priority Search Trees.

2. TEMPORAL RELATION FRAMEWORK Definition 1. Assume a reference interval [a,b]. A resolution scheme (or simply scheme) Y(a,b) = <X1, X2, …, Xn> is a partition of (-∞,∞), where seq(Y(a,b)) = <x1, x2, …, xm>. A relation R over Y is a binary string t1t2…tn, ti∈{0,1}, ti="1" iff Xi∩[x,y]≠∅ and ti="0" otherwise, i=1..n, complying with the

Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the VLDB copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Very Large Data Base Endowment. To copy otherwise, or to republish, requires a fee and/or special permission from the Endowment Proceedings of the 29th VLDB Conference, Berlin, Germany, 2003

Resolution Schemes Relations

a b-∞ ∞

t1 t2 t3

distinguishes 6 relations

R010

(a) «during»

a b

t

-∞ ∞

1 t2 t3 t4 t5

distinguishes 13 (Allen’s) relations

R00011

(b) «Exactly after»

a b-∞ ∞

t

a+b2

1 t2 t3 t4 t5 t6 t7

distinguishes 25 relations

R1111100

(c) «Before and during»

a b-∞ ∞δδ

1t 2t 3t 4t 5t 6t 7t 8t 9t

1 2 distinguishes 41 relations

R111000000

(d) «Before and near»

Figure 1 Example of Resolution Schemes and Corresponding temporal Relations

following constraints: i) it contains exactly one substring of consecutive "1"s and ii) there is at least one ti="1", in a position i such that Xi is a non-zero length interval. Given a primary interval [x,y] we use the notation R01100([x,y],[a,b]) to indicate that the relation between [x,y] and [a,b] is represented by the string 01100. For any reasonably practical scheme a and b must be included in seq(Y(a,b)) i.e. ∃k ∃p, k<p≤m: xk=a, xp= b. So, given a reference time interval [a,b], we can identify a number k of potential regions of interest: Given an arbitrary interval [c,d] (which we call primary), its temporal relation to [a,b] can be uniquely determined by the intersections of [c,d] with each of the above regions, the emptiness of which are modeled by k binary variables t1,… tk, ("0" corresponds to an empty intersection while "1" corresponds to a non-empty one).

A few indicative resolution schemes, some example relation strings and the corresponding interval configurations are given in Fig.1.

Definition2: conceptual neighborhood graph or

relation lattice The distinguishable relations at a particular scheme are called primitive relations. In general, if n is the number of bits used by the resolution scheme, the number of distinguishable relations (equivalently, the number of all binary strings satisfying the previous constraints) is n(n+1)/2-k, where k is the number of bits assigned to zero-length regions of interest (e.g. for the scheme in Fig. 1.b, n=5,k=2). The set of primitive relations at every scheme is inherently permeated by a partial order, defined as:

X≤Y iff

rm(X)≤rm(Y) ∧ lm(X)≤lm(Y) where X=x1x2…xn,Y=y1y2…yn, xi, yi ∈ {0,1}, are relation strings, rm(X), lm(X) return the position of the rightmost and leftmost "1", respectively, in the binary string of a relation X.

The corresponding Hasse diagram (which is in fact a distributive lattice) is called conceptual neighborhood graph. In Figure 2 is depicted the corresponding graph for the resolution scheme in Fig. 1.b n=5, k=2. Lets remember again the definition of convex relations given in [3,13].

Definition 3. A convex relation is an interval in the relation lattice (see Fig. 2) at a particular resolution scheme, i.e. a relation of the form [R, S] where R, S are primitive relations (thus including exact relations as a special case).

R10000 R11000 R11100

R11110

R11111

R01111

R00111 R00011 R00001R01110

R01100 R00110

R00100

Figure 2 Neighborhood Graph for Scheme of Figure1.b

Theorem 1. Assume a reference interval [a,b], a primary interval [x,y] and a resolution scheme Y(a,b)=<Y1,Y2,…, Ym>, where seq(Y(a,b))= x1x2…xn. A relation R between [x,y] and [a,b] is convex iff its geometric representation can be defined by the conjunctive expression

(a1 σ1 x σ2 a2) ∧ (a3 σ3 y σ4 a4) ∧ (x<y), where σi is either < or ≤, ai∈R and a1<a3, a2<a4, a1≤a2, a3≤a4. Proof sketch. The key idea is that, according to the above expression, x and y are constrained by convex interval domains, say dom(x) and dom(y). If R is convex then it is a relation interval [R1, R2] at the corresponding lattice. Let Yi,Yj, be the leftmost and rightmost regions of interest whose corresponding bit is set to "1" in R1 and Yk,Yl, be the leftmost and rightmost regions of interest whose corresponding bit is set to "1" in R2. Since R can be any relation between R1 and R2, it can be expressed by the conjunction:

(Yi.l σ1 x σ2 Yk.r)∧(Yj.l σ3 y σ4 Yl.r)∧(x < y)

For the inverse, assume that x and y are constrained by dom(x) and dom(y), given respectively by the expressions (a1 σ1 x σ2 a2), (a3 σ3 y σ4 a4). In a similar manner we can find appropriate regions of interest Yi,Yj, Yk,Yl, whose intersection with dom(x) and dom(y) is non-empty and construct two relation strings R1, R2 such that R=[R1, R2] is convex (see [10] for the full proof).

An example of a 1D convex relation is [R11100, R01110]={R11100, R01100, R11110, R01110} (see Fig. 2). Intuitively, convex relations capture a continuous uncertainty (contain all intermediate relations between R, S as potential candidates) in our knowledge of a particular relationship.

Viewing each 1D interval as a point in the x<y half-plane, a 1D relation is represented by a 0D, 1D or 2D region in the half-plane. Convex relations have an elegant geometrical characterization, which is a convex point-set (a point-set is convex if the points of a line segment that connects any two points belong to the set). 3. Temporal queries in Video Databases Assume that initially we are given a table of n objects and the associated frame segments of a given video v with total number of frames equal to

io

( )vframenum (see the example of figure 3). We want to organise this metadata in order to answer efficiently video content queries of the form: Find all multimedia objects of a given video v between the frame Fi and Fj, 1≤i<j≤n. The corresponding video function is FindOinV(v, Fi ,Fj).

3.1 The Best Previous Work. According to our knowledge on related work the best linear space solution is the interval tree structure presented in [16]. Lets describe a brief outline of this solution. Assume that [ ) [ )ww eses ,,,, 11 Κ are all the intervals in this table. Let

nqq ,,1 Κ be an enumeration, in ascending order, of all members of { }wies ii ≤≤1|, , with duplicates eliminated. If n is not an exponent of 2, then the algorithm in [16] does as follows: let r be the smallest integer such that 2 and

nr >

( )vframenumr >2 . It adds new elements rq2,,qn 1 Κ+ such that ( ) 1+2 = vframenumq r and jqnq jn +=+ (for

such that ). Now we may proceed under the assumption that n is an exponent of 2. The next step was the construction of the indexing data structure for the associated frame segments (or time intervals) as depicted in the figure 4. Although the space of the solution is optimal the query time (O(logn)) is not optimal.

0>j n rj 2<+

3.2 Our solution. We will show how we can transform this temporal problem to a static quadrant range-searching problem giving two optimal linear space solutions in internal and external memory with O(k) query time, where k the size of the answer. Theorem 2: The video-content queries can be answered in optimal time and space. Proof sketch. According to the temporal-relation framework we presented in the first section we can observe that all the possible intersections between a video object (arbitrary interval) and a frame interval query (reference interval) can be represented from the lattice described in Figure 5.

According to the convex relations theory it is obvious to see that the video content query corresponds to the [R110, R011] convex relation (or approximate) query. We split the convex relation [R110, R011] to its four relational components {R110, R111, R010, R011}.

Assuming that we have stored in a database only points that correspond to valid 1D intervals (points above the x=y line), the theorem 1 essentially says that a 1D selection query, asking for an approximate (i.e. convex) relation with respect to an interval [a,b], is equivalent to a classical 2D range query. So, we can view each of the above relational component as the relation of a point (x,y) instead of an interval [x,y] with respect to a window query [a,b] × [a,b] instead of reference interval [a,b]. The 2-D transformation is depicted in Figure 6. It is obvious that the [R110 , R011] convex relation (or approximate temporal) query can be transformed to the quadrant range query (-∝, b] × [a, +∝) as the geometric union of the four instances of Figure 6 (see Figure 7 ).

50004000300020001000

Object 1

Object 2

Object 3

Object 5

Object 4

I1 I2

I3 I4

I10I6 I7 I8 I9

I5

I11 I12

I13 I14 I15 I16

Figure 3 An example of a video’s content

500 750 1000 1250 1500 1750 2250 2500 2750 3250 3500 3750 4500 5000

125 625 1125 1625 2375 3000 3625 4750

375 1375 2625 4125

875 3375

2000 I2,I11,I14

I3 I10

I1,I13 I8 I9

I6 I7 I4 I5 I15 I12,I16

I1 O1I2 O1I3 O2I4 O2I5 O2I6 O3I7 O3I8 O3I9 O3I10 O3I11 O4I12 O4I13 O5I14 O5I15 O5I16 O5

0 250

Figure 4 The frame interval tree with intervals associated with nodes and

each interval associated with an object

3.2.1 Internal Memory Solution We answer the quadrant range query (or 2-sided range query) in optimal O(k) time using either the Cartesian Tree ([6]) or the Modified Priority Search Tree (MPST) we presented in [12]. As we will prove theoretically and practically the solution in [12] is better. 3.2.1.1 Theoretical Comparison The microanalysis of the two algorithms given below assumes that the dominant operation is a table lookup. This is a valid assumption since both solutions given in [12] and [6] makes heavy use of table lookups. 1st Solution (Cartesian Tree) Theorem 3: The Cartesian tree is an optimal quadrant (and three-sided) searching data structure and requires T(k)=2+16k table lookups.

Proof: Let S={(x1,y1), (x2,y2), …,(xN,yN)} be the set of stored points , with x1≤x2≤…≤xN. A Cartesian tree T for S is a binary tree of N nodes with each node being labeled by a point in S. The tree T is defined recursively as follows: the root is labeled with (xm,ym), where ym=min{yi|i=1,…,N}. Its left subtree is a Cartesian Tree for {(xi,yi)|i=1,…,m-1} and its right subtree is a Cartesian Tree for {(xi,yi)|i=m+1,…,N}. Let p(v) be the point labeling the node v of T, px(v) be its x-coordinate and py(v) be its y-coordinate. The structure makes also use of an array A of size M (M denotes the universe size), which stores pointers to the nodes of T. Specifically A[i] contains a pointer to the node of T which is labeled with the point in S having maximum x-coordinate smaller or equal to i. The crucial property of the above construction is that given two nodes u,w of T with px(u)=xi, px(w)=xj, i<j, then py(nca(u,w))=min{yt |i ≤t≤j}. • So given a query range of the form (-∝, b] × [a, +∝) we firstly use the array A to locate the two nodes u,w of T with A[-∝]=u (that means the leftmost leaf) , A[b]=w. Let

R100 R110

R111

R010

R011 R001

Figure 5 Neighborhood Graph for Scheme of Fig. 1.a

z=lca(u,w) with p(z)=(xi,yi). If yi>c then the query algorithm halts, otherwise we report the point (xi,yi) and we continue recursively the same way, by probing lca(u,u1) and lca(u2,w), where u1 is the predecessor (in symmetric order) of z in T (that is the point that is stored in u1 is p(u1)=(xi-1,yi-1)) and u2 is the successor (in symmetric order) of z in T (that is the point that is stored in u2 is p(u2)=(xi+1,yi+1)). The time complexity of the above procedure (in terms of table lookups) is 2+2ktlca, where tlca is the number of table lookups in order to perform a lowest common ancestor computation. In order to compute the lowest common ancestor of two nodes in T, we will use the algorithm described by Schieber and Vishkin ([8],[15]) (this algorithm simplifies the approach described in Harel and Tarjan ([9])). 2nd Solution (our Approach in [12])

Lets remember the most basic components of the MPST structure we presented in [12]. We used an array A of size M, which stores pointers to the leaves of a classic priority search tree of McCreight ([14]) T. Specifically A[i] contains a pointer to the leaf of T with maximum x-coordinate smaller or equal to i. With this array we can determine in O(1) time the leaf of any search path Pi for i (in our case the search path Pb for b). In each leaf u of the tree with x-coordinate i we store the following lists L(u), PL(u): The list L(u) stores the points of the nodes of Li (Left children of nodes belonging on Pi ). The list PL(u) stores the points of the nodes of Pi which have x-coordinate smaller or equal to i. Both lists also contain pointers to the nodes of T that contain these points. Lists L(u) and PL(u), stores its nodes in increasing y-coordinate of their points. To answer a query with a range ( −∞ , b] x ( −∞ , c] we find in O(1) time the leaf u of the search path Pb for b. Then we traverse the list PL(u) and report its points until we find a point with y-coordinate greater than c. We traverse the list L(u) in the same manner and find the nodes of Lb whose points have y-coordinate less than or equal to c. For each such node we report its point and then we continue searching further in its subtree as long as we find points inside the range.

The size of each list is O(IogN) and the space of T is O(NlogN). The space of the whole structure is O(M+NlogN) because of the size of the array A but making the lists partially persistent (for details see [12]) the space becomes linear O(M+N). Theorem 4: The MPST ([12]) structure answers quadrant range queries of the form (-∝, b] × [a, +∝) consuming T(k)=3+k table lookups. Proof: Our query algorithm firstly locates the leaf u that corresponds to the value b (1 table lookup) and then traverses the persistent lists PL(u) (1 table lookup) and L(u) (1 table lookup) in order to extract a number of k1 nodes whose points have y-coordinate less than or equal to c and for each such node continues searching further in its subtree as long as it finds k2 points inside the range,where k1+k2=k the size of the answer. The theorem follows. 3.2.1.2 Experimental Evaluation We implemented both solutions in Visual C++ 6.0 and we executed the two programs in Pentium based PC with the following hardware and software characteristics. • Clock frequency of 700MHZ • 128 MB of RAM • 4 Gbyte partition hard disk space (total partition’s space: 17 Gbytes) • Windows 2000 Server Operating System We used the clock( ) function, included in <time.h>, that counts the number of executed cycles by the time passed after a user has given the query. We finally divided that number of cycles by CLOCKS_PER_SEC of system in order to evaluate the CPU TIME in seconds (or msec). In order to evaluate a non-zero number of cycles we included the procedure above within a while – loop of 10*CLOCKS_PER_SEC dividing finally the cycle-number we found by the loop’s number we computed.

R 1 1 0

x y

R 1 1 1

a b

b

a

R 0 1 0

R 0 1 1

a b

x y

a b

b

a

a b

x y

a b

b

a

x y

a b

b

a

byaax

≤≤<

byax

><

byabxa

≤≤≤≤

bybxa

>≤≤

Figure 6 The 2-D transformation of the four relational components

The table 1 shows the experimental results of the execution of five FindOinV(v, Fi ,Fj) video functions queries in a small Video dataset of 256 objects: We ran our code for small input datasets in order to prove that even if the number of recursive nca routines in Cartesian Tree is small, the MPST [12] structure is still better. This happens because the query time of the Cartesian Tree solution is approximately k times the cpu time for the execution of a lowest common ancestor query. Instead our solution executes a constant number of lca queries and in addition it uses sequential linear traversals of persistent lists and auxiliary arrays in order to retrieve the output

points. The experimental results prove that in practice access of the positions of the lists and of the auxiliary arrays is executed rapidly and much faster than a set of lca queries. This can be explained from the fact that our solution clusters the reported points in consecutive memory locations and as a result the algorithm benefits from the use of fast multilevel caches in modern computers. With these multilevel caches one access of a record to disk or main memory results to the prefetching of sequential blocks of records in the memory hierarchy. Since access to cache is faster than access to main memory or disk, future access to the prefetched data is accelerated. Due to the same asymptotic behavior of the

[R110, R011]={R110,R111,R010 R011}

a b

b

a

b

),[],( ∝+×∝− abQuadrant Range Query

Figure 7 The Geometric Union of the relational components

Video Functions The corresponding

Quadrant Query Cartesian Tree Our Solution in [12]

FindOinV(v, 8 ,10) [-∝,10] x [8, +∝) 0,000008 sec 0,000005 sec FindOinV(v, 11 ,12) [-∝,12] x [11, +∝) 0,000010 sec 0,000006 sec FindOinV(v, 5 ,14) [-∝,14] x [5, +∝) 0,000011 sec 0,000005 sec FindOinV(v, 6,8) [-∝,8] x [6, +∝) 0,000007 sec 0,000007 sec

FindOinV(v, 15 ,15) [-∝,15] x [15, +∝) 0,000011 sec 0,000009 sec

Table 1 CPU TIMES of each query

EXPERIMENTAL EVALUATION

00,0000020,0000040,0000060,0000080,00001

0,000012

1 2 3 4 5

THE NUMBER OF QUERIES

CPU

TIM

E CARTESIAN TREEAPPROACHOUR APPROACH

Figure 8 The respective graph of table 1

solutions above, we also expect that for a very large size of k (and consequently very large input size) the two approaches will have the same experimental behavior. 3.2.2 External Memory Solution The best solution for the same problem in secondary memory is the external priority search tree given in [7]. It was developed for the three-sided range query with optimal time, space and update bounds. The structure

which was based on a simple observation about an indexing scheme of k<B2 points, the use of persistence and weight-balanced B-trees can be generalized to handle 2D range queries in O(logBn+t/B) query time, O(�log�/log(logBn+1)) space and O((logBn)log�/log(logBn+1)) update time (�=n/B). The first simple observation says that it is possible to build an indexing scheme (or a query structure) Q on O(B2) points using O(B) disk blocks such that any 3-sided

v

. .. . . .. ... .... ............... .....

.... . ....

Figure 9 The Y-sets of the five children of v are

indicated by the bold points query can be covered by O(t+1) blocks, where t the size of the answer. Because such an indexing scheme contains only O(B) blocks, we can store the activity – interval (y-interval) and x-range information for all the blocks in O(1) “catalog” blocks. We can then answer a query in O(t+1) I/Os simply by loading the O(1) catalog blocks into main memory and using the information in them to determine which index blocks to access. This external structure storing a set of N points in the plane consists of a weight-balanced base tree built upon the x-coordinates of the points with branching parameter α and leaf parameter k (α>4, k>0). A leaf has weight between k and 2k-1 and an internal nodes on level l (except for the root) has weight between (1/2)αlk and 2alk. Since our case is static, we forget these dynamic properties about the weight bounds using as a base tree any classic B-tree. Each node in the base tree has an associated auxiliary data structure. For each child w of a node u, the auxiliary structure Y(w) (called Y-set) consists of the Θ(Β) highest points stored in the subtree of u that are within the x-range of w (see the figure 9). The Y-sets of the children of u are stored collectively in u in the query structure Qu. 4. Conclusion

In this work we have focused on mechanisms for the efficient processing of temporal selection queries. Initially we formulated an innovative temporal relation model that allows the description of temporal relations at varying detail (resolution) levels. The model is based on a binary string encoding of 1D relations. We also discussed a way to store video metadata in order to perform efficiently video content queries in optimal time and space. We used as a base structure the priority search tree and its recent variants in internal and external memory.

REFERENCES [1] Allen, J., "Maintaining Knowledge About Temporal Intervals", CACM, 26(11), 1983.

[2] Delis, V., Makris, Ch., Sioutas, S., “Efficient Spatiotemporal Retrieval”, Technical Report TR99.05.02, Computer Technology Institute, Patras, Greece. [3] Delis, V., Makris, Ch., Sioutas, S., “A Provably Efficient Computational Model For Approximate Spatiotemporal Retrieval”, ACM GIS ’99. [4] Martin Dietzfelbinger, Anna Karlin, Kurt Mehlhorn, Friedhelm Meyer Auf Der Heide, Hans Rohnert, and Robert E. Tarjan, Dynamic Perfect Hashing: Upper and Lower Bounds., SIAM J. Comput. Volume 23, Number 4 pp. 738-761 [5] Freksa, C., "Temporal Reasoning based on Semi Intervals", Artificial Intelligence, 54, 1992. [6] H. N. Gabow, J. L. Bentley, and R. E. Tarjan, Scaling and related techniques for geometry problems, in Proceedings, l6th Annual ACM Symp. on Theory of Computing, 1984, pp. 135-143. [7] L.Arge, V.Samoladas, J.S.Vitter, "On two-Dimensional Indexability and Optimal Range Indexing", ACM-PODS ‘99. [8] D.Gusfield, Algorithms on Strings, Trees and Sequences, Computer Science and Computational Biology, Cambridge University Press,1994. [9] D. Harel, R. E. Tarjan, Fast algorithms for finding nearest common ancestor, SIAM J. Comput.13 (1984), pp. 338-355. [10] Delis, V., Hadzilacos, Th., "Binary String Relations: A Foundation for Spatiotemporal Knowledge Representation", Technical Report TR99-02-01, Computer Technology Institute, Patras, Greece, 1999 (available at http://www.cti.gr/RD3/People/delis/tr990201.pdf. [11] N. Kitsios, Ch. Makris, S. Sioutas, A. Tsakalidis, J. Tsaknakis and B. Vassiliadis, Geometric Retrieving in RAM model, Technical Report TR99.10.05, Department of Computer Engineering and Informatics, University of Patras, 26500 Patras, Greece [12] Kitsios N., Makris C., Sioutas S. Tsakalidis A., Tsaknakis J., Vassiliadis B., 2-D Spatial Indexing in Optimal Time, in Proc. Current Issues in Database and Information Systems, ACM- SIGMOND ADBIS-DASFAA 2000, Springer Verlang [13] Ligozat, G., "On Generalised Interval Calculi", American Association of Artificial Intelligence International Conference, 1991. [14] E. M. McCreight, Priority search trees, SIAM J. Comput. 14 (1985), pp. 257-276. [15] B. Schieber and U, Vishkin, On finding lowest common ancestors: simplifications and parallelization, SIAM J. Comput., 17:1253-62, 1988. [16] C. Makris, K. Perdikouri, S.Sioutas, A.Tsakalidis, K. Tsichlas, “Time and Space Efficient Content Queries for Video Databases”, MDDE ’01,Lyon, 4th July 2001, France, Volume 43, pp 1-8.