In this dissertation, we propose two new algorithms for subsequence matching in time-series databases, one for supporting normalization transform and the other for supporting moving average transform of arbitrary order. Normalization transform enables finding sequences with similar fluctuation patterns even though they are not similar in terms of the Euclidean measure. Moving average transform is known to reduce the effect of noise and has been used in many areas such as econometrics since it is useful in finding overall trends. Simple application of existing subsequence matching algorithms to support normalization transform is not feasible since these algorithms do not have information needed for performing normalization transform for subsequences of arbitrary lengths. Application of existing whole matching algorithms supporting normalization transform to the subsequence matching is feasible, but it requires an index for every possible length of the query sequence causing serious overhead on both storage space and updating time. Likewise, straightforward application of existing subsequence matching algorithms to support moving average transform of arbitrary order would also incur serious storage space and updating time overhead since an index needs to be generated for each moving average order.
We propose the new notion of index interpolation to tackle these problems. Index interpolation is defined as a search method that uses one or more indexes generated for a few selected cases and performs search for all cases. The proposed subsequence matching algorithms generate indexes only for a small number of preselected different query sequence lengths ω or different moving average orders κ. The algorithms select the most appropriate index among them to perform subsequence matching for an arbitrary length n(≥ω) or an arbitrary moving average order m(≤κ). We show the correctness of the proposed algorithms by formally proving that the algorithms do not cause false dismissal. We can trade-off the search performance with storage space by adjusting the number of indexes, i.e., we obtain better search performance by using more indexes.
To prove the effectiveness of the proposed algorithms, we have conducted experiments extensively. First, for performance evaluation of the algorithm supporting normalization transform, we have conducted experiments using the indexes for only five different query sequence lengths out of lengths of 256 to 512. For selectivities less than $10^{-3}$, the degradation of search performance compared with the fully-indexed case is no more than 51.0% when five indexes are used. For the selectivity $10^{-5}$, the results show that the algorithm outperforms the sequential scan by up to 8.6 times on the average when two indexes are used and up to 14.6 times when five indexes are used. Second, for performance evaluation of the algorithm supporting moving average transform of arbitrary order, we have used the indexes for only two different moving average orders out of the orders 1 to 128. For selectivities less than $10^{-2}$, the degradation of search performance compared with the fully-indexed case is no more than 17.2% when two indexes are used. For the selectivity $10^{-4}$, the algorithm outperforms the sequential scan by up to 3.0 times on the average when one index is used and up to 3.3 times when two indexes are used. In practical database applications, the queries with smaller selectivities are much more frequent. Since the proposed algorithms perform better with smaller selectivities, they can be effectively used for practical applications.
본 논문에서는 시계열 데이타베이스에서 각각 정규화 변환과 임의 계수의 이동평균 변환을 지원하는 두가지 서브시퀀스 매칭 알고리즘을 제안한다. 정규화 변환은 시계열 데이타 간의 절대적인 유클리드 거리에 관계 없이, 구성하는 값들의 상대적인 변화 패턴이 유사한 시계열 데이타를 검색하는 데에 유용하다. 이동평균 변환은 시계열 데이타 내의 잡음의 영향을 감소시킴으로써 시계열 데이타 전체의 경향을 파악하는 데에 유용하며 통계경제학 등의 분야에서 널리 사용되어 왔다. 기존의 서브시퀀스 매칭 알고리즘은 임의 길이의 서브시퀀스를 정규화 변환하기 위한 정보를 인덱스에 저장할 수 없으므로, 정규화 변환 서브시퀀스 매칭에 응용할 수 없다. 정규화 변환을 지원하는 기존의 전체 매칭 알고리즘의 경우, 모든 가능한 질의 시퀀스 길이 각각에 대하여 하나씩의 인덱스를 생성하여야 하므로, 저장 공간 및 데이타 시퀀스 삽입/삭제의 부담이 매우 심각하다. 기존의 서브시퀀스 매칭 알고리즘을 확장 없이 그대로 이동평균 변환 서브시퀀스 매칭에 응용할 경우 하나의 이동평균 계수에 대하여 하나씩의 인덱스를 생성하여야 한다. 따라서, 임의의 이동평균 계수를 지원하려면, 정규화 변환 서브시퀀스 매칭 알고리즘과 마찬가지로 저장 공간 및 데이타 시퀀스의 삽입/삭제 부담이 매우 심각하다.
본 논문에서는 인덱스 보간법을 이용하여 이러한 문제들을 해결한다. 인덱스 보간법은 탐색을 수행하기 위하여 인덱스가 필요한 모든 경우들 중의 일부 경우에 대해서만 하나 이상의 인덱스를 생성하며, 생성된 몇 개의 인덱스만을 이용하여 모든 경우에 대하여 탐색을 수행한다. 제안된 알고리즘은 미리 선택된 몇 개의 질의 시퀀스 길이 ω와 이동평균 계수 κ에 대해서만 각각 인덱스를 생성한 후, 질의 시에 가장 적절한 인덱스를 선택하여 임의의 길이 n (≥ω)과 이동평균 계수 m(≤κ)에 대한 서브시퀀스 매칭 탐색을 수행한다. 이때, 제안된 알고리즘이 질의 결과로 반환되어야 할 서브시퀀스를 모두 찾아내지 못하는 착오 기각이 발생하지 않음을 증명한다. 제안된 알고리즘은 인덱스의 개수를 조절함으로써 저장 공간과 탐색 성능 간의 균형을 맞출 수 있다. 즉, 생성되어 있는 인덱스의 개수가 많을수록 탐색 성능이 향상된다.
제안된 알고리즘들의 유용성을 보이기 위하여 많은 실험을 수행하였다. 첫째, 질의 시퀀스의 길이 256~512 중 다섯 개의 길이에 대해 인덱스를 생성하여 정규화 변환 서브시퀀스 매칭 알고리즘에 대한 실험을 수행하였다. 실험 결과, 탐색 결과 선택률이 $10^{-3}$ 이하이고 다섯 개의 인덱스를 이용할 때, 모든 길이에 대한 인덱스가 생성되어 있는 경우와 비교하여 제안된 알고리즘의 성능이 51.0% 이상 저하되지 않았다. 또한, 선택률이 $10^{-5}$인 경우, 제안된 알고리즘의 성능은 순차 검색에 비하여 두 개의 인덱스를 이용할 때 평균 8.6 배, 다섯 개의 인덱스를 이용할 때 평균 14.6 배 개선되었다. 둘째, 임의 계수 이동평균 변환 서브시퀀스 매칭 알고리즘은 이동평균 계수 1 $\sim$ 128 중 두 개의 계수에 대해 인덱스를 생성하여 실험을 수행하였다. 제안된 알고리즘의 평균 탐색 성능을 구한 결과, 탐색 결과 선택률이 $10^{-2}$ 이하이고 두 개의 인덱스를 이용할 때, 모든 계수에 대한 인덱스가 생성되어 있는 경우와 비교하여 17.2% 이상 저하되지 않았다. 또한, 제안된 알고리즘은 선택률이 $10^{-4}$인 경우, 순차 검색에 비하여 하나의 인덱스를 이용할 때 평균 3.0 배, 두 개의 인덱스를 이용할 때 평균 3.3 배까지 탐색 성능이 개선되었다. 일반적인 데이타베이스 응용에서는 탐색 결과 선택률이 작은 경우가 훨씬 빈번하다. 제안된 알고리즘들의 탐색 성능이 선택률이 작아질수록 향상되므로, 이들은 실제적인 데이타베이스 응용에서 더욱 효용성이 높을 것으로 판단된다.