SLIDE 1 Αρχές Βάσεων Δεδομένων
Β.Μεγαλοοικονόμου Δεικτοδότηση Πολυμέσων
(κάποιες διαφάνειες βασίζονται σε σημειώσεις του C. Faloutsos)
SLIDE 2 Γενική Θεώρηση
Σχεσιακό μοντέλο – SQL, σχεδιασμός ΒΔ Δεικτοδότηση, Q-opt, Επεξεργασία
δοσοληψιών
Προχωρημένα θέματα
Κατανεμημένες Βάσεις RAID Authorization / Stat. DB Spatial Access Methods Δεικτοδότηση Πολυμέσων
SLIDE 3 Πολυμέσα- λεπτομερώς
Πολυμέσα
Motivation / ορισμός προβλήματος Κύρια ιδέα / time sequences εικόνες sub-pattern matching Αυτόματη εξαγωγή χαρακτηριστικών /
FastMap
SLIDE 4
Πρόβλημα
Δοθείσας μίας μεγάλης συλλογής (πολυμεσικών) εγγραφών (πχ. μετοχές) Επιτρέπει γρήγορα, ερωτήματα ομοιότητας
SLIDE 5 Εφαρμογές
time series: χρηματοιοκονομικά,
marketing (click-streams!), ECGs, ήχος;
εικόνες: ιατρική, ψηφιακές βιβλιοθήκες,
εκπαίδευση, τέχνη
higher-d σήματα: επιστημονικές ΒΔ
(πχ., αστροφυσική), ιατρική (MRI ακτινογραφίες), ψυχαγωγία (video)
SLIDE 6 Παραδείγματα Ερωτημάτων
Βρες ιατρικές υποθέσεις παρόμοιες και
του κ. Παπαδόπουλου
Βρες ζεύγη μετοχών που κινούνται με
συγχρονισμό
Βρες ζεύγη εγγράφων που είναι
παρόμοια (λογοκλοπία;)
Βρες πρόσωπα παρόμοια με του ‘Tiger
Woods’
SLIDE 7 Λεπτομ. ορισμός προβλήματος:
Πρόβλημα:
δοθείσας μιας συλλογής πολυμεσικών
αντικειμένων,
βρες αυτά που είναι παρόμοια με ένα
επιθυμητό αντικείμενο-ερώτημα
για παράδειγμα:
SLIDE 8
μέρα τιμή 1 365 μέρα τιμή 1 365 μέρα τιμή 1 365
συνάρτηση απόστασης: από ειδικό (πχ, Ευκλείδεια απόσταση)
SLIDE 9 Τύποι ερωτημάτων
Ολική ταύτιση εν. sub-pattern match ερωτήματα εύρους εν. πλησιέστερων
γειτόνων
όλα τα ζεύγη ερώτημα
SLIDE 10 Στόχοι σχεδίου
Γρήγορα (γρηγορότερα από σειρ.
αναζήτηση)
‘ορθό’ (πχ., όχι ψεύτικοι συναγερμοί, όχι
λάθος απορρίψεις)
SLIDE 11 Πολυμέσα- λεπτομερώς
Πολυμέσα
Motivation / ορισμός προβλήματος Κύρια ιδέα / time sequences εικόνες sub-pattern matching Αυτόματη εξαγωγή χαρακτηριστικών /
FastMap
SLIDE 12 Κεντρική ιδέα
Πχ., χρονικές ακολουθίες, ‘ολική
ταύτιση’, ερωτήματα εύρους, Ευκλείδεια απόσταση
μέρα τιμή 1 365 μέρα τιμή 1 365 μέρα τιμή 1 365
SLIDE 13 Κεντρική ιδέα
Η ακολουθιακή αναζήτηση δουλεύει –
πώς γίνεται γρηγορότερα;
SLIDE 14
Ιδέα: ‘GEMINI’
(GEneric Multimedia INdexIng) Εξήγαγε μερικά αριθμητικά χαρακτηριστικά, για ‘γρήγορο και πρόχειρο’ έλεγχο
SLIDE 15 μέρα 1 365 μέρα 1 365 S1 Sn
F(S1) F(Sn)
‘GEMINI’ - Παραστατικά
πχ, avg πχ,. std
SLIDE 16 GEMINI
Λύση: ‘Γρήγορο-και-πρόχειρο' φίλτρο:
εξήγαγε n χαρακτηριστικά (αριθμούς,
πχ., avg., κτλ.)
πρόβαλε σε ένα σημείο στο n-d χώρο
χαρακτηριστικών
οργάνωσε τα σημεία με έτοιμη spatial
access μέθοδο (‘SAM’)
Απόρριξε false alarms
SLIDE 17
GEMINI
Σημαντικό: Ε: πώς να εγγυηθεί απουσία ψευδών απορρίψεων; A1: διατήρηση αποστάσεων (αλλά: δύσκολο/ακατόρθωτο) A2: Lower-bounding λήμμα: αν η αποτύπωση ‘κάνει τα πράματα να εγγύτερα’, τότε δεν υπάρχουν ψευδείς απορρίψεις
SLIDE 18
GEMINI
Σημαντικό : Q: how to extract features? A: “if I have only one number to describe my object, what should this be?”
SLIDE 19
Time sequences
Q: what features?
SLIDE 20
Time sequences
Q: what features? A: Fourier coefficients (we’ll see them in detail soon)
SLIDE 21
Time sequences
white noise brown noise Fourier spectrum ... in log-log
SLIDE 22 Time sequences
Eg.:
SLIDE 23 Time sequences
conclusion: colored noises are well
approximated by their first few Fourier coefficients
colored noises appear in nature:
SLIDE 24 brown noise: stock prices (1/f2 energy
spectrum)
pink noise: works of art (1/f spectrum) black noises: water reservoirs (1/fb ,
b>2)
(slope: related to ‘Hurst exponent’, for
self-similar traffic, like, eg. Ethernet/web [Schroeder], [Leland+]
Time sequences
SLIDE 25 Time sequences - results
keep the first 2-3 Fourier coefficients faster than seq. scan NO false dismissals (see book)
# coeff. kept time total cleanup-time r-tree time
SLIDE 26 improvements/variations:
[Kanellakis+Goldin], [Mendelzon+Rafiei]
could use Wavelets, or DCT could use segment averages [Yi+2000]
Time sequences - improvements:
SLIDE 27 Multimedia - Detailed outline
multimedia
Motivation / problem definition Main idea / time sequences images (color, shapes) sub-pattern matching automatic feature extraction / FastMap
SLIDE 28
Images - color
what is an image? A: 2-d array
SLIDE 29
Images - color
Color histograms, and distance function
SLIDE 30
Images - color
Mathematically, the distance function is:
SLIDE 31 Images - color
Problem: ‘cross-talk’:
Features are not orthogonal -> SAMs will not work properly Q: what to do? A: feature-extraction question
SLIDE 32 Images - color
possible answers:
avg red, avg green, avg blue
it turns out that this lower-bounds the histogram distance ->
no cross-talk SAMs are applicable
SLIDE 33
Images - color
performance: time selectivity w/ avg RGB seq scan
SLIDE 34 Multimedia - Detailed outline
multimedia
Motivation / problem definition Main idea / time sequences images (color; shape) sub-pattern matching automatic feature extraction / FastMap
SLIDE 35 Images - shapes
distance function: Euclidean, on the
area, perimeter, and 20 ‘moments’
(Q: how to normalize them?
SLIDE 36 Images - shapes
distance function: Euclidean, on the
area, perimeter, and 20 ‘moments’
(Q: how to normalize them?
- A: divide by standard deviation)
SLIDE 37 Images - shapes
distance function: Euclidean, on the
area, perimeter, and 20 ‘moments’
(Q: other ‘features’ / distance
functions?
SLIDE 38 Images - shapes
distance function: Euclidean, on the
area, perimeter, and 20 ‘moments’
(Q: other ‘features’ / distance
functions?
- A1: turning angle
- A2: dilations/erosions
- A3: ... )
SLIDE 39 Images - shapes
distance function: Euclidean, on the
area, perimeter, and 20 ‘moments’
Q: how to do dim. reduction?
SLIDE 40 Images - shapes
distance function: Euclidean, on the
area, perimeter, and 20 ‘moments’
Q: how to do dim. reduction? A: Karhunen-Loeve (= centered
PCA/SVD)
SLIDE 41 Images - shapes
Performance: ~10x faster
# of features kept log(# of I/Os) all kept
SLIDE 42 Case study: Informedia
Video database system, developed at
CMU
2+ TB of video data (broadcast news) retrieval by text, image and face
similarity www.informedia.cs.cmu.edu/
SLIDE 43 Case study: Informedia
next foils: visualization features
by space by time by concept
SLIDE 44
- geo mapping
- automatic place
recognition
- ambiguity resol. +
- lookup
SLIDE 45
SLIDE 46
time line
SLIDE 47
concept space
SLIDE 48 Multimedia - Detailed outline
multimedia
Motivation / problem definition Main idea / time sequences images (color; shape) sub-pattern matching automatic feature extraction / FastMap
SLIDE 49 Sub-pattern matching
Problem: find sub-sequences that match the
given query pattern
SLIDE 50
day $price 1 300 day $price 1 365 day $price 1 400
30
SLIDE 51 Sub-pattern matching
Q: how to proceed? Hint: try to turn it into a ‘whole-matching’
problem (how?)
SLIDE 52 Sub-pattern matching
Assume that queries have minimum duration
w; (eg., w=7 days)
divide data sequences into windows of width
w (overlapping, or not?)
SLIDE 53 Sub-pattern matching
Assume that queries have minimum duration
w; (eg., w=7 days)
divide data sequences into windows of width
w (overlapping, or not?)
A: sliding, overlapping windows. Thus: trails
Pictorially:
SLIDE 54
Sub-pattern matching
SLIDE 55
Sub-pattern matching
sequences -> trails -> MBRs in feature space
SLIDE 56
Sub-pattern matching
Q: do we store all points? why not?
SLIDE 57
Sub-pattern matching
Q: how to do range queries of duration w?
SLIDE 58 Sub-pattern matching
(very recent improvement [Moon+2001])
use non-overlapping windows, for data
SLIDE 59 Conclusions
GEMINI works for any setting (time
sequences, images, etc)
uses a ‘quick and dirty’ filter faster than seq. scan (but: how to extract features
automatically?)
SLIDE 60 Multimedia - Detailed outline
multimedia
Motivation / problem definition Main idea / time sequences images (color; shape) sub-pattern matching automatic feature extraction / FastMap
SLIDE 61 FastMap
Automatic feature extraction:
Given a dissimilarity function of
Quickly map the objects to a (k-d)
`feature' space.
(goals: indexing and/or visualization)
SLIDE 62
FastMap
1 100 100 100 O5 1 100 100 100 O4 100 100 1 1 O3 100 100 1 1 O2 100 100 1 1 O1 O5 O4 O3 O2 O1 ~100 ~1
SLIDE 63 FastMap
Multi-dimensional scaling (MDS) can do
that, but in O(N**2) time
SLIDE 64
MDS
Multi Dimensional Scaling
SLIDE 65
Main idea: projections
We want a linear algorithm: FastMap [SIGMOD95]
SLIDE 66
FastMap - next iteration
SLIDE 67
Results
Documents /cosine similarity -> Euclidean distance (how?)
SLIDE 68
Results
recipes bb reports
SLIDE 69 Applications: time sequences
given n co-evolving time sequences visualize them + find rules [ICDE00]
time rate HKD JPY GBP
SLIDE 70 Applications - financial
currency exchange rates [ICDE00]
0.2 0.4 0.6 0.8 1
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 DEM(t) DEM(t-5) FRF(t) FRF(t-5) GBP(t) GBP(t-5) HKD(t) HKD(t-5) JPY(t) JPY(t-5) USD(t) USD(t-5) DEM FRF GBP HKD JPY USD
USD HKD JPY FRF DEM GBP USD(t-5) USD(t)
SLIDE 71
VideoTrails
[ACM MM97]
SLIDE 72 Conclusions
GEMINI works for multiple settings FastMap can extract ‘features’
automatically (-> indexing, visual d.m.)
SLIDE 73 References
- Faloutsos, C., R. Barber, et al. (July 1994). “Efficient and
Effective Querying by Image Content.” J. of Intelligent Information Systems 3(3/4): 231-262.
- Faloutsos, C. and K.-I. D. Lin (May 1995). FastMap: A Fast
Algorithm for Indexing, Data-Mining and Visualization of Traditional and Multimedia Datasets. Proc. of ACM-SIGMOD, San Jose, CA.
- Faloutsos, C., M. Ranganathan, et al. (May 25-27, 1994). Fast
Subsequence Matching in Time-Series Databases. Proc. ACM SIGMOD, Minneapolis, MN.
- Flickner, M., H. Sawhney, et al. (Sept. 1995). “Query by Image
and Video Content: The QBIC System.” IEEE Computer 28(9): 23-32.
- Goldin, D. Q. and P. C. Kanellakis (Sept. 19-22, 1995). On
Similarity Queries for Time-Series Data: Constraint Specification and Implementation. Int. Conf. on Principles and Practice of Constraint Programming (CP95), Cassis, France.
SLIDE 74 References
- Leland, W. E., M. S. Taqqu, et al. (Feb. 1994). “On the Self-
Similar Nature of Ethernet Traffic.” IEEE Transactions on Networking 2(1): 1-15.
- Moon, Y.-S., K.-Y. Whang, et al. (2001). Duality-Based
Subsequence Matching in Time-Series Databases. ICDE, Heidelberg, Germany.
- Rafiei, D. and A. O. Mendelzon (1997). Similarity-Based Queries
for Time Series Data. SIGMOD Conference, Tucson, AZ.
- Schroeder, M. (1991). Fractals, Chaos, Power Laws: Minutes
from an Infinite Paradise. New York, W.H. Freeman and Company.
- Yi, B.-K. and C. Faloutsos (2000). Fast Time Sequence Indexing
for Arbitrary Lp Norms. VLDB, Kairo, Egypt.