JP2004348594A - Time series data search method, device, and time program, and program storage medium - Google Patents

Time series data search method, device, and time program, and program storage medium Download PDF

Info

Publication number
JP2004348594A
JP2004348594A JP2003146794A JP2003146794A JP2004348594A JP 2004348594 A JP2004348594 A JP 2004348594A JP 2003146794 A JP2003146794 A JP 2003146794A JP 2003146794 A JP2003146794 A JP 2003146794A JP 2004348594 A JP2004348594 A JP 2004348594A
Authority
JP
Japan
Prior art keywords
sequence
time
distance
series data
approximation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003146794A
Other languages
Japanese (ja)
Other versions
JP4355824B2 (en
Inventor
Yasushi Sakurai
保志 櫻井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2003146794A priority Critical patent/JP4355824B2/en
Publication of JP2004348594A publication Critical patent/JP2004348594A/en
Application granted granted Critical
Publication of JP4355824B2 publication Critical patent/JP4355824B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Complex Calculations (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a time series data search method for the speed-up of time series data search using dynamic time warping, a time series data search device, a time series data search program, and a program storage medium. <P>SOLUTION: A computer system having a database storing a plurality of sequences executes an approximation step, in which a distance between a search objective sequence and a sequence read from the database is approximated by using a coefficient value of discrete Fourier transform, and a distance computing step in which a dynamic time warping distance between the search objective sequence and the sequence read from the database is found if the approximate distance found in the approximation step is within a predetermined range. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、データベース検索技術に関し、より詳しくは、ダイナミックタイムワーピングに基づいて時系列データを検索する時系列データ検索方法、時系列データ検索装置、時系列データ検索プログラム、およびプログラム記録媒体に関する。
【0002】
【従来の技術】
時系列データは、時間軸に沿って要素値が定められているシーケンスとして表現される。
【0003】
このような時系列データを扱う手法として、ダイナミックタイムワーピング(DTW:Dynamic Time Warping、時間軸正規化)と呼ばれる手法が知られている。ダイナミックタイムワーピングとは、時間軸に沿ってシーケンスを伸長させ、二つのシーケンスの距離を最小化する変換のことである。
【0004】
一般に、ユークリッド距離においては、長さやサンプリングレートの異なる時系列データを扱うことが難しいが、ダイナミックタイムワーピングの手法を用いれば、そのような時系列データを比較的容易に扱うことができ、二つのシーケンス間の距離、すなわち類似度をより的確に求めることができる。
【0005】
ダイナミックタイムワーピング距離について、さらに具体的に説明する。
長さnのシーケンスP={p, p,・・・, pn−1}と長さmのシーケンスQ={q, q,・・・, qm−1}が与えられているとき、ダイナミックタイムワーピング距離DDTW(P,Q)は、次式で定義される:
【数1】

Figure 2004348594
ここで、gseg(−1, −1)=0であり、さらに、任意の整数i, jに対してgseg(i,−1)=gseg(−1,j)=∞である。また、式(2)の右辺第2項は、gseg(i−1, j)、gseg(i, j−1)、gseg(i−1, j−1)のうちの最小値を意味する。さらに、式(3)の右辺のαの値は任意であるが、以後の説明においては、便宜上α=2であるとする。
【0006】
二つのシーケンスPとQの距離は、各シーケンスの要素を昇順にマッチングすることによって得られる。すなわち、ダイナミックタイムワーピングでは、二つのシーケンスの長さが異なっていても、シーケンス間の距離を定義することができる。このようなダイナミックタイムワーピングは、ダイナミックプログラミングと呼ばれるアルゴリズムにしたがって計算され、その計算コストは、およそO(nm)のオーダーであることが知られている。したがって、シーケンス長が長くなると、非常に多くの計算コストが必要となる。
【0007】
従来、この計算コストを低減するためのさまざまな技術が開示されている。
【0008】
このうち、非特許文献1に開示されている技術(以後、この技術を従来技術1と呼ぶ)は、ダイナミックタイムワーピングに基づく二つのシーケンス間の距離であるダイナミックタイムワーピング距離を近似し、時系列データの検索を高速化するための手法である。この手法では、シーケンスをなす要素から、(時間的に最初の要素値、時間的に最後の要素値、要素の最小値、要素の最大値)を抽出し、これら4つの要素から成る4次元ベクトルを作成し、この4次元ベクトル間のユークリッド距離をシーケンス間の距離の近似値として採用する。この近似値は、ダイナミックタイムワーピングの下限距離(厳密な距離と等しいか、または下回る値をとる)を示しており、このような近似値を用いることによって、探索漏れを発生させずに、ダイナミックタイムワーピングによる厳密な距離計算回数の削減を図っている。
【0009】
また、非特許文献2に開示されている技術(以後、この技術を従来技術2と呼ぶ)では、シーケンスを等間隔に分割してサブシーケンスを作成し、このサブシーケンスのうちの最大値と最小値を計算し、そのユークリッド距離を、ダイナミックタイムワーピングの近似値としている。ちなみにこの手法は、PCA(Piecewise Constant Approximation)と呼ばれている。
【0010】
【非特許文献1】
Sang−Wook Kim, Sanghyaun Park, and Wesley W. Chu, ”An Index−based Approach for Similarity Search Supporting Time Warping in Large Sequence Databases”, in Proceedings of ICDE, pp. 607−614 (April 2001).
【0011】
【非特許文献2】
Eamonn J. Keogh, ”Exact Indexing of Dynamic Time Warping”, in Proceedings of VLDB, pp. 406−417 (August 2002).
【0012】
【発明が解決しようとする課題】
しかしながら、上述した従来技術1の場合、近似値を求めるために採用する4次元ベクトルは、時系列データ全体に対して要素数が少ないため、近似値の精度が低く、ダイナミックタイムワーピング距離の計算回数を十分に削減することができないという問題があった。
【0013】
また、従来技術2の場合にも、従来技術1と同様の問題、すなわち、近似値の精度が低く、ダイナミックタイムワーピング距離の計算回数を十分に削減できないという問題があった。
【0014】
本発明はこのような事情に鑑みてなされたものであり、その目的は、ダイナミックタイムワーピングを用いた時系列データの検索を高速化することのできる時系列データ検索方法、時系列データ検索装置、時系列データ検索プログラム、およびプログラム記録媒体を提供することにある。
【0015】
【課題を解決するための手段】
上記目的を達成するために、請求項1記載の発明は、時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索方法であって、複数のシーケンスを格納して記憶するデータベースを備えたコンピュータシステムが、(A)検索対象となるシーケンスと前記データベースから読み出したシーケンスの距離を、離散フーリエ変換の係数値を用いて近似する近似ステップと、(B)前記(A)の近似ステップで近似した近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記データベースから読み出したシーケンスのダイナミックタイムワーピング距離を求める距離算出ステップとを実行することを要旨とする。
【0016】
請求項2記載の発明は、請求項1記載の発明において、前記(A)の近似ステップと、前記(B)の距離算出ステップを、前記データベースに記憶した全てのシーケンスに対して繰り返し実行し、(C)この繰り返しの結果に基づいて、前記検索対象となるシーケンスの近傍に位置するシーケンスを検索結果として出力する検索結果出力ステップをさらに実行することを要旨とする。
【0017】
請求項3記載の発明は、時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索方法であって、複数のシーケンスを格納して記憶するデータベースを備えたコンピュータシステムが、(A)近接する要素から順番に結合することによってセグメント化した時系列データであるセグメンティッド・シーケンスを作成する作成ステップと、(B)検索対象となるシーケンスと前記データベースから読み出したシーケンスの距離を、前記(A)の作成ステップで作成した各々のシーケンスに対応するセグメンティッド・シーケンスを用いて近似する近似ステップと、(C)この近似ステップで求めた近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記データベースから読み出したシーケンスのダイナミックタイムワーピング距離を求める距離算出ステップとを実行することを要旨とする。
【0018】
請求項4記載の発明は、請求項3記載の発明において、前記(A)の作成ステップから前記(C)の距離算出ステップに至る処理を、前記データベースに記憶した全てのシーケンスに対して繰り返し実行し、(D)この繰り返しの結果に基づいて、前記検索対象となるシーケンスの近傍に位置するシーケンスを検索結果として出力する検索結果出力ステップをさらに実行することを要旨とする。
【0019】
請求項5記載の発明は、時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索方法であって、複数のシーケンスを格納して記憶するデータベースを備えたコンピュータシステムが、(A)検索対象となるシーケンスと前記データベースから読み出したシーケンスの距離を、離散フーリエ変換の係数値を用いて近似する第1の近似ステップと、(B)前記(A)の第1の近似ステップで近似した近似距離が所定の範囲内にある場合には、近接する要素から順番に結合することによってセグメント化した時系列データであるセグメンティッド・シーケンスを作成する作成ステップと、(C)検索対象となるシーケンスと前記データベースから読み出したシーケンスの距離を、前記(B)の作成ステップで作成した各々のシーケンスに対応するセグメンティッド・シーケンスを用いて近似する第2の近似ステップと、(D)前記(C)の第2の近似ステップで求めた近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記データベースから読み出したシーケンスのダイナミックタイムワーピング距離を求める距離算出ステップとを実行することを要旨とする。
【0020】
請求項6記載の発明は、請求項5記載の発明において、前記(A)の第1の近似ステップから前記(D)の距離算出ステップに至る処理を、前記データベースに記憶した全てのシーケンスに対して繰り返し実行し、(E)この繰り返しの結果に基づいて、前記検索対象となるシーケンスの近傍に位置するシーケンスを検索結果として出力する検索結果出力ステップをさらに実行することを要旨とする。
【0021】
請求項7記載の発明は、時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索装置であって、複数のシーケンスを格納して記憶する記憶手段と、検索対象となるシーケンスと前記記憶手段で記憶したシーケンスの距離を、離散フーリエ変換の係数値を用いて近似する近似手段と、この近似手段で近似した近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記記憶手段から読み出したシーケンスのダイナミックタイムワーピング距離を求める距離算出手段とを備えたことを要旨とする。
【0022】
請求項8記載の発明は、時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索装置であって、複数のシーケンスを格納して記憶する記憶手段と、近接する要素から順番に結合することによってセグメント化した時系列データであるセグメンティッド・シーケンスを各々のシーケンスに対して作成する作成手段と、検索対象となるシーケンスと前記記憶手段で記憶したシーケンスの距離を、前記作成手段で作成した各々のシーケンスに対応するセグメンティッド・シーケンスを用いて近似する近似手段と、この近似手段で求めた近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記記憶手段から読み出したシーケンスのダイナミックタイムワーピング距離を求める距離算出手段とを備えたことを要旨とする。
【0023】
請求項9記載の発明は、時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索装置であって、複数のシーケンスを格納して記憶する記憶手段と、検索対象となるシーケンスと前記記憶手段で記憶したシーケンスの距離を、離散フーリエ変換の係数値を用いて近似する第1の近似手段と、この第1の近似手段で近似した近似距離が所定の範囲内にある場合には、近接する要素から順番に結合することによってセグメント化した時系列データであるセグメンティッド・シーケンスを作成する作成手段と、検索対象となるシーケンスと前記記憶手段から読み出したシーケンスの距離を、前記作成手段で作成した各々のシーケンスに対応するセグメンティッド・シーケンスを用いて近似する第2の近似手段と、この第2の近似手段で求めた近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記記憶手段で記憶したシーケンスのダイナミックタイムワーピング距離を求める距離算出手段とを備えたことを要旨とする。
【0024】
請求項10記載の発明は、請求項1乃至6のいずれか1項に記載した時系列データ検索方法をコンピュータに実行させることを要旨とする。
【0025】
請求項11記載の発明は、請求項1乃至6のいずれか1項に記載した時系列データ検索方法をコンピュータに実行させるための時系列データ検索プログラムを記録したことをを要旨とする。
【0026】
【発明の実施の形態】
以下、添付図面を参照して本発明の実施の形態を説明する。
【0027】
(第1の実施形態)
図1は、本発明の第1の実施形態に係る時系列データ検索方法を実行するコンピュータシステムである時系列データ検索装置の概略構成を示す機能ブロック図である。同図に示す時系列データ検索装置1は、各種データを入力するためのキーボード、マウス等の入力装置から成る入力部11、中央処理装置(CPU:Central Processing Unit)を備え、後述する各種処理の制御および演算を行う制御演算部12、入力部11からの入力情報や制御演算部12からの演算結果等を格納して記憶する記憶部13、この記憶部13で記憶した情報を出力するための(液晶)ディスプレイ画面等の出力装置から成る出力部14を少なくとも有している。
【0028】
記憶手段の少なくとも一部をなす記憶部13は、RAM(Random Access Memory)等から構成される主記憶装置と、ハードディスクドライブ、フレキシブルディスクドライブ、CD−ROM(Compact Disc Read Only Memory)ドライブ、DVD(Digital Versatile Disk)ドライブ、光磁気ディスクドライブ、PCカードドライブ等から構成される補助記憶装置とを具備しており、データ検索に必要なシーケンス情報を管理、記憶するデータベースとしての機能を有する。また、後述する計算結果を随時格納するために必要なメモリ領域が確保されている。
【0029】
なお、本実施形態の各種処理は、一つの電子的な装置が実行する場合だけでなく、各ステップの実行を適宜分割して二つ以上の電子的な装置から構築されたシステムが全体で実行する場合も含まれる。この意味で、本実施形態に係る「時系列データ検索装置」は、一つまたは複数のコンピュータ(システム)によって構成されることはいうまでもない。この点は、本発明の全ての実施の形態に共通する事項である。
【0030】
次に、以上の構成を有する時系列データ検索装置1が実行する時系列データ検索処理の詳細を説明する。
【0031】
最初に、ダイナミックタイムワーピング距離の近似方法(距離近似方法)について説明した後、この距離近似方法を用いた時系列データ検索方法について説明する。
【0032】
<距離近似方法>
本実施形態に係る時系列データ検索方法では、ダイナミックタイムワーピング距離DDTWの計算回数をできるだけ削減するために、離散フーリエ変換(DFT:Discrete Fourier Transform)を用いて近似距離の計算を行う。
【0033】
長さnのシーケンスP={p, p,・・・, pn−1}が与えられているとき、このシーケンスPの離散フーリエ変換F(P)={f(P), f(P),・・・, fn−1(P)}の各成分(DFT係数)は、次式で定義される:
【数2】
Figure 2004348594
ここで、k≠0に対して、fn−k(P)はf(P)の複素共役となる。本実施形態では、シーケンスPの各要素が実数であることを仮定する。このため、f(P)は式(4)により実数となる。
【0034】
逆に、離散フーリエ変換F(P)が与えられているとき、シーケンスPの要素は、F(P)に対して逆離散フーリエ変換(IDFT:Inverse Discrete Fourier Transform)
【数3】
Figure 2004348594
を施すことによって求めることができる。
【0035】
以上のように定義される離散フーリエ変換を用いて、検索対象となるシーケンス(問い合わせシーケンスと呼ぶ)Q={q, q,・・・, qn−1}から任意のシーケンスPまでの距離近似方法を説明する。ここでは、両シーケンスの位置関係に応じて近似距離を求める。なお、以後の説明においては、min(P)およびmin(Q)を、それぞれシーケンスPおよびQの最小値とする一方、max(P)およびmax(Q)を、それぞれシーケンスPおよびQの最大値とする。
【0036】
二つのシーケンスPとQの位置関係は、図2の概念図に示すように、次の3つの場合がある:
(1)min(P)≧max(Q) (図2(a):この配置をdisjoint呼ぶ)
(2)min(P)<max(Q)かつmax(P)>min(Q) (図2(b):この配置をoverlapと呼ぶ)
(3)max(P)≦min(Q) (図2(c):この配置をdisjoint(−)と呼ぶ)
以下、これら3つの位置関係の場合について、それぞれ近似距離を計算する。
【0037】
(1)disjoint
問合せシーケンスQの下限シーケンスQlower={ql, ql,・・・, qln−1}と上限シーケンスQupper={qu, qu,・・・, qun−1}を求める。二つのシーケンスの要素は、i=0, 1, ・・・ , n−1として、それぞれ次のように定義される。
【数4】
Figure 2004348594
ここで、min(qu:qui+j)とmax(qu:qui+j)は、部分シーケンス{q, qi+1,・・・, qi+j}の最小値と最大値をそれぞれ表す。
【0038】
式(6)および(7)の右辺に出てくるlextは、ダイナミックタイムワーピングによってシーケンスが伸長する場合の最大伸長の値を表す。換言すれば、ダイナミックタイムワーピングによるシーケンスの伸長は、たかだかlextに制限される。このlextは、min(P)≧0かつmin(Q)≧0のとき、
【数5】
Figure 2004348594
である。ここで、右辺に用いられている記号[x]は、xの値を超えない最大の整数を意味している。
【0039】
式(8)の右辺において、
【数6】
Figure 2004348594
はシーケンスPとQの2乗ユークリッド距離である。wはダイナミックタイムワーピングの幅であり、特に制限がなければ、w=n−1である。E(P)とE(Q)は、シーケンスPとQのエネルギーであり、それぞれ次式で与えられる:
【数7】
Figure 2004348594
また、δ(P,Q)=(min(P)−max(Q))である。
【0040】
ここで、min(P)<min(Q)かつmin(P)<0のときには、式(10)のE(P)と式(11)のE(Q)を、以下のE’(P)とE’(Q)にそれぞれ置き換える。
【数8】
Figure 2004348594
【0041】
また、min(P)>min(Q)かつmin(Q)<0のときには、式(12)および式(13)のmin(P)をmin(Q)としてlextを求めることができる。
【0042】
シーケンスPが全てのDFT係数を用いて展開されている場合には、2乗ユークリッド距離D Euclid(P,Q)は式(9)で与えられるが、そのDFT係数のうちの(m+1)個(m≦n−1)のみを用いて展開されている場合には、式(6)において、D Euclid(P,Q)の代わりに、以下で定義されるDmodified(P,Q)を用いる:
【数9】
Figure 2004348594
【0043】
以上により、disjointの場合のダイナミックタイムワーピング距離DDTW(P,Q)の近似距離は、次のように求められる。
【数10】
Figure 2004348594
【0044】
図3は、Ddisjoint(P,Q)の計算を概念的に示す説明図である。同図において、問合せシーケンスQは、下限シーケンスQlowerと上限シーケンスQupperに囲まていれる。PとQの位置関係がdisjoint(min(P)≧max(Q))の場合、Qupperを用いて近似距離の計算を行う(式(15)を参照)。このとき、Ddisjoint(P,Q)は、ダイナミックタイムワーピング距離DDTW(P,Q)を近似しており、なおかつDDTW(P,Q)以下の値をとる。
【0045】
(2)overlap
図2(b)に示すように、二つのシーケンスPとQの少なくとも一部が重なり合うとき、最大伸長の値は、lext=wである。上述したQlowerおよびQupperに加えて、
【数11】
Figure 2004348594
を用いることにより、overlapにおける近似距離Doverlap(P,Q)を次のように求めることができる:
【数12】
Figure 2004348594
【0046】
(3)disjoint(−)
本質的には、上記(1)disjointの場合と同じであり、近似距離
disjoint(−)(P,Q)は、次式で定義される:
【数13】
Figure 2004348594
【0047】
このdisjoint(−)の場合、式(8)におけるδ(P,Q)=(min(Q)−max(P))であるが、他の量については、上述したdisjointの場合と同じである。
【0048】
<時系列データ検索方法>
時系列データ検索処理を高速化するための特徴量として、本実施形態では離散フーリエ変換に基づいたDFT特徴ベクトルを用いる。
【0049】
シーケンスPのDFT特徴ベクトルV(P)は、次のように定義される:
V(P)={F(P), min(P), max(P), Erest(P), γ(P)} (21)
ここで、Pの離散フーリエ変換F(P)が(m+1)次元であるとすると、このDFT特徴ベクトルV(P)の次元は2m+5である。
【0050】
このような多次元データの問合せとして、ここではk近傍距離(kは所定の正の整数)以下の近似距離を有するシーケンスを探索するk近傍問合せを採用する。これ以外に、例えば範囲指定問合せを用いても、時系列データ検索のアルゴリズムは本質的に同じである。この点に関しては、後述する実施形態でも同様である。
【0051】
図4は、本実施形態に係る時系列データ検索方法において、離散フーリエ変換を用いた近傍探索処理の流れを示すフローチャート図である。
【0052】
まず、問合せシーケンスQを入力してこのシーケンスQのDFT特徴ベクトルV(Q)を計算するとともに、近傍探索数kを入力する(ステップS101)。
【0053】
その後、シーケンスを順序付けしてカウントするカウンタiの値を0とする(ステップS102)。
【0054】
次に、ループL11を実行する。
【0055】
ループL11では,まずカウンタiの値を1増加させ(ステップS111)、記憶部13からシーケンスPおよびこのシーケンスのDFT特徴ベクトルV(P)をロードし(ステップS112)、PとQのDFT特徴ベクトルを用いた近似距離Dを計算する(ステップS113)。
【0056】
このステップでは、近似距離Dとして、Ddisjoint(P,Q), Doverlap(P,Q), Ddisjoint(−)(P,Q)のいずれかを計算することになるが、全てのシーケンスに対して近似距離を求める計算を行うと、多くのCPUコストを要することになる。そこで、制御演算部12では、記憶部13に格納されているシーケンスにアクセスする前に、問合せシーケンスQにおけるさまざまなシーケンス伸長l, l, ・・・ , lを想定し、これらのh個のシーケンス伸長の上限および下限を用意することもできる。
【0057】
一例として、Ddisjoint(P,Q)が伸長lextを要求する場合、l≧lextを満足するシーケンス伸長の中で最小のものを選択し、l’extとする:
【数14】
Figure 2004348594
制御演算部12がDdisjoint(P,Q)を計算する際には、このl’extに関する上限および下限を用いる。他の近似距離についても同様である。
【0058】
ステップS113での計算の結果、求めたDがk近傍距離以下であれば(ステップS114でYES)、厳密なダイナミックタイムワーピング距離D=DDTW(P,Q)を求める(ステップS115)。
【0059】
ステップS115で求めたDがk近傍距離以下であれば(ステップS116でYES)、シーケンスPのIDと距離Dを記憶部13の最近傍リストへ格納し、ソートする(ステップS117)。
【0060】
ステップS117が終了後、または、ステップS114かステップS116の判断でNOの場合には、その時点でのシーケンスの数iが記憶部13に格納されているシーケンスの数に達するまで(i>=ent)、ステップS111に戻って処理を繰り返す。すなわち、記憶部13に格納されているシーケンスの各々に対して、ループL11の処理が繰り返し実行される。
【0061】
いうまでもなく、このループL11では、最初のk回は常にステップS114およびステップS116における判断がYESとなる。
【0062】
ループL11が終了後、最近傍リストに格納されている候補シーケンスを最終的な探索結果として出力する(ステップS121)。
【0063】
ここで説明した近似距離Dとダイナミックタイムワーピング距離Dの計算は、時系列データ検索装置1の制御演算部12で行われる。したがって、制御演算部12が、検索対象となる問合せシーケンスQと記憶部13に格納されているシーケンスPの距離をDFT係数値を用いてを用いて近似する近似手段としての機能と、近似距離が所定の範囲内にある場合に、PとQの間のダイナミックタイムワーピング距離を求める距離算出手段としての機能とを具備していることはいうまでもない。
【0064】
近似距離の計算は、厳密なダイナミックタイムワーピングの距離計算よりも計算コストが低い。したがって、以上説明したように、まず近似距離を計算した上で、この計算した近似距離がその時点での最近傍処理よりも大きければ、厳密な計算をせずに初めから除外することができ、厳密な計算は、最近傍距離よりも小さいものに関してのみ行うことが可能となる。
【0065】
以上説明した本発明の第1の実施形態によれば、ダイナミックタイムワーピングに基づく時系列データの検索を、検索漏れを発生させずに高速化することが可能となる。
【0066】
本実施形態における時系列データ検索方法は、時系列データとして表現することができる画像、映像、音声、文書等を対象とする広範囲の時系列データ検索に適用可能である。
【0067】
なお、本実施形態に係る時系列データ検索処理は、時系列データ検索プログラムがインストールされた所定のコンピュータを用いて実施しても同様の効果を得ることができる。
【0068】
さらに、そのような時系列データ検索プログラムを記録したコンピュータ読み取り可能なプログラム記録媒体をコンピュータに装着し、そのプログラム記録媒体に格納されているプログラムを読み出すことによって、コンピュータが上述した処理を実行するようにしてもよい。ここで、「コンピュータ読み取り可能な」プログラム記録媒体としては、ハードディスク、フレキシブルディスク、CD−ROM、DVD、光磁気ディスク、PCカード等を用いることができる。このようなプログラム記録媒体を提供することによって、本実施形態の時系列データ検索プログラムを広く流通させることができるようになる。
【0069】
これらの時系列データプログラムならびに当該プログラムを記録したプログラム記録媒体については、本発明の全ての実施の形態において同様のことがいえる。
【0070】
(第1の実施形態の変形例)
本実施形態においては、二つのシーケンスPとQの長さが等しい場合を取り扱ったが、異なる長さのシーケンス長を計算するために、全てのシーケンスの長さが等しくなるように調整することも可能である。
【0071】
この場合、まず基準長nbaseを決定し、この基準長nbaseよりも長いシーケンス長を縮小する一方で、基準長nbaseよりも短いシーケンス長を伸長する。このような調整を行った後は、二つのシーケンスの長さが見かけ上等しくなるため、第1の実施形態と同じ方法で近似距離を求めることが可能となる。
【0072】
シーケンス長の調整法をより詳細に説明する。
【0073】
まず、P(の要素)を用いることにより、Pの下限シーケンスPlowerと上限シーケンスPupperを以下のように計算する:
【数15】
Figure 2004348594
ここで、下限シーケンスPlowerの要素plと上限シーケンスPupperの要素pu(ともにi=0, 1, … , nbase)は、
【数16】
Figure 2004348594
であり、これらのシーケンス長は、基準長nbaseである。
【0074】
以上のように計算したPlowerおよびPupperの少なくともいずれか一方を、もとのシーケンスPの代わりに用いることにより、ダイナミックタイムワーピングの近似距離を求める。
【0075】
問合せシーケンスQについても、その長さを調整する。まず、式(17)、(18)と同様にQlowerとQupperを作成する。その後、前述したQlowerから下限シーケンスQ’lower={ql’, ql’,・・・, ql’n−1}を、Qupperから上限シーケンスQ’ pper={qu’, qu’,・・・, qu’n−1}を計算する。ここで、
【数17】
Figure 2004348594
である。式(24)および式(25)の右辺の定義は、それぞれ式(6)および式(7)の右辺の定義と同じである。
【0076】
ここで、PとQの位置関係がdisjointの場合、lextは、式(8)において、PにPlowerを代入し、QにQupperを代入することによって計算される。また、PとQの位置関係がoverlapの場合、シーケンスの伸長幅はlext=wである。PとQの位置関係がdisjoint(−)の場合、lextは、式(8)において、PにPupperを代入し、QにQlowerを代入することによって計算される。
【0077】
ダイナミックタイムワーピングの近似距離は、disjointを計算するためにPlowerとQ’upperを用い、disjoint(−)を計算するためにPupperとQ’lowerを用いる。また、overlapを計算するために、4つの量全てを用いる。
【0078】
以上の点を除く時系列データ検索方法については、上記第1の実施形態と同じである。
【0079】
したがって、このような第1の実施形態の変形例においても、上記第1の実施形態と同様の効果を得ることができる。
【0080】
(第2の実施形態)
本発明の第2の実施形態に係る時系列データ検索方法は、ダイナミックタイムワーピング距離を計算するための近似値の算出に、セグメンティッド・シーケンスを用いることを特徴とする。
【0081】
本実施形態に係る時系列データ検索装置の基本的な構成は、上記第1の実施形態で説明したものと同様である(図1を参照)。
【0082】
<セグメンティッド・シーケンス>
まず、セグメンティッド・シーケンスについて説明する。
【0083】
範囲rと長さnのシーケンスPが与えられたとき、セグメンティッド・シーケンスSは次のように定義される。
【0084】
={s, s, ・・・, sns−1} (26)
={sl, su, sr
(n≦n, 1≦sr≦n,su−sl≦r)
ここで、slはセグメンティッド・シーケンスSの中のセグメントsの最小値であり、suはセグメンティッド・シーケンスSの中のセグメントsの最大値である。したがって、su−slはsの範囲であり、su−sl≦rである。また、srはsの長さを、nはSにおけるセグメントの数を示している。
【0085】
図5は、セグメンティッド・シーケンスを作成するためのアルゴリズムを示すフローチャート図である。
【0086】
まず、シーケンスの長さn、範囲r、およびシーケンスPの要素p(i=0, 1, ・・・,n−1)を入力し(ステップS201)、カウンタiを0にセットする(ステップS202)。
【0087】
次に、ループL21を実行する。
【0088】
このループL21では、隣接するi番目の要素pと(i+1)番目の要素のpi+1の差|p−pi+1|(LIST.diffという関数として定義)をi=n−1まで全て求める(ステップS211、S212)。
【0089】
ループL21が終了後、記憶部13に格納されているデータをLIST.diffのiの昇順にソートする(ステップS221)。
【0090】
その後、カウンタiを0にリセットし(ステップS222)、ループL23に移行する。
【0091】
ループL23では、近接するシーケンスの要素のペアを、要素の値の差が小さいものから順番に結合してセグメントにする(ステップS232)。
【0092】
そして、近接するセグメントを結合して、より大きなセグメントにする(ステップS231、S232、S233、S234)。
【0093】
近接する要素もしくはセグメントの差が、閾値rを超えた時点でループL23を終了する。
【0094】
この後、ふたたびセグメントとカウンタを初期値に戻し(ステップS241)、ループL25に移行する。
【0095】
ループL25では、最初のセグメントから順に生成されたセグメントの数を数えていく。この処理は、シーケンスの長さnに達するまで処理を続ける(ステップS251)。
【0096】
最終的なiの値をnとして(ステップS261)、セグメンティッド・シーケンスSとセグメント数nを結果として出力する(ステップS262)。
【0097】
図6は、このようにして生成されたセグメンティッド・シーケンスSの例を示す図である。
【0098】
同図に示すセグメンティッド・シーケンスSは、3つのセグメントs, s, sから構成されている。これらのセグメントの範囲su−sl (i=0,1,2)は、所定の範囲(閾値)rよりも小さい。
【0099】
<距離近似方法>
本実施形態に係る時系列データ検索方法は、セグメンティッド・シーケンスを用いることによって近似を行うものである。
【0100】
セグメント数nのセグメンティッド・シーケンスS={s, s, ・・・, sns−1}とセグメント数nのセグメンティッド・シーケンスT={t, t, ・・・, tnt−1}が与えられているとき、近似値Dsegment(S,T)は、次の演算によって得られる。
【0101】
【数18】
Figure 2004348594
【0102】
ここで、gur(−1,−1)=0であり、さらに、任意の整数i, jに対してglr(i,−1)=gur(i,−1)=gul(−1,j)=gur(−1,j)=∞であるとする。また、gseg(i,j)の定義式の右辺にあるαの値は任意であるが、少なくとも上述したユークリッド2乗距離におけるαと同じ値でなければならないので、ここではα=2とするが、これにより、本実施形態が特段の限定を受けるわけでないことは勿論である。ちなみに、gll, glr, gul, gurは、それぞれ各セグメントにおける左下、右下、左上、右上の計算結果である。
【0103】
図7は、セグメンティッド・シーケンスを用いて行うシーケンスSとTの近似距離の計算を概念的に示す図である。同図に示す場合には、二つのシーケンスSとTのセグメントの個数が、それぞれn=3, n=5に対応している。したがって、この場合のシーケンス間の距離の近似値Dsegment(S,T)は、Dsegment(S,T)=gur(2,4)となる。
【0104】
<時系列データ検索方法>
図8は、時系列データ検索方法においてセグメンティッド・シーケンスを用いた時系列データ検索処理の流れを示すフローチャート図である。なお、ここでの探索処理においても、k近傍問合せを採用する。これ以外に、例えば範囲指定問合せを用いても、時系列データ検索のアルゴリズムは本質的に同じであることは第1の実施形態と同様である。
【0105】
まず、問合せシーケンスQを入力して、このQのセグメンティッド・シーケンスを上述した方法に従って計算するとともに、記憶部13に格納されているシーケンスの数を入力する(ステップS301)。
【0106】
その後、シーケンスを順序付けしてカウントするカウンタiの値を0とする(ステップS302)。
【0107】
次に、ループL31を実行する。
【0108】
ループL31では,まずカウンタiの値を1増加させ(ステップS311)、記憶部13からシーケンスPのセグメンティッド・シーケンスをロードして(ステップS312)、PとQのセグメンティッド・シーケンスを用いた近似距離D=Dsegment(P,Q)を計算する(ステップS313)。
【0109】
ステップS313で求めたDがk近傍距離以下であれば(ステップS314でYES)、厳密な距離であるダイナミックタイムワーピング距離D=DDTW(P,Q)を求める(ステップS315)。
【0110】
このステップで求めたDがk近傍距離以下であれば(ステップS316でYES)、シーケンスPのIDと距離Dを記憶部13の最近傍リストへ格納し、ソートする(ステップS317)。
【0111】
ステップS317が終了後、またはステップS314かステップS316の判断でNOの場合には、その時点でのシーケンスの数iが記憶部13に格納されているシーケンスの数に達するまで(i>=ent)、ステップS311に戻って処理を繰り返す。すなわち、記憶部13に格納されているシーケンスの各々に対して、ループL31の処理を行う。
【0112】
このループL31でも、最初のk回は常にステップS314およびステップS316での判断がYESとなる。
【0113】
ループL31が終了後、最近傍リストに格納されている候補シーケンスを最終的な探索結果として出力する(ステップS321)。
【0114】
ここで説明した近似距離Dとダイナミックタイムワーピング距離Dの計算は、時系列データ検索装置1の制御演算部12で行われる。したがって、本実施形態においては、制御演算部12が、PとQ各々において近接する要素から順番に要素を結合することによってセグメント化した時系列データであるセグメンティッド・シーケンスを作成する作成手段としての機能と、PとQの距離の近似値を、各々のシーケンスに対応するセグメンティッド・シーケンスを用いて計算する近似手段としての機能と、その近似距離が所定の範囲内にある場合に、PとQの間のダイナミックタイムワーピング距離を求める距離算出手段としての機能とを具備していることはいうまでもない。
【0115】
以上説明した本発明の第2の実施形態によれば、第1の実施形態と同様の効果を得ることができる。
【0116】
(第3の実施形態)
本発明の第3の実施形態に係る時系列データ検索方法は、上述した二つの実施形態の距離近似方法(DFT,セグメンティッド・シーケンス)を共に利用するものである。
【0117】
本実施形態に係る時系列データ検索装置の構成は、図1に示す時系列データ検索装置1と同じである。
【0118】
このために、本実施形態においては、インデックスを構成する。図9は、このインデックスを概念的に示すと共に、そのインデックスの構成要素を示す説明図である。同図に示すように、インデックス51は、多次元インデックス53とシーケンスファイル55から構成されている。
【0119】
多次元インデックス53は、DFT特徴ベクトルV(P)(式(15)を参照)と包囲矩形から構成される一方で、シーケンスファイル55は、シーケンスPとセグメンティッド・シーケンス(式(20)を参照)から構成される。
【0120】
本実施形態では、多次元インデックス53として、DFT特徴ベクトルV(P)を(2m+5)次元空間の点とみなし、これらの点を、予め超矩形面によって包囲することにより形成される包囲矩形が、検索木におけるノードの構造を有している場合を想定し、以後の説明を行う。
【0121】
この仮想的な検索木は、最上位層の根ノードから出発して枝が延出し、各ノードが包囲矩形に対応している。根ノード以外のノードのうち、一つの包囲矩形に囲まれた複数の点(すなわち、複数のDFT特徴ベクトル)を格納したノードををリーフノードと呼ぶことにする。また、ここでは延出する枝の数(レベルの数に対応)が同じ値で終端するような平行木の構造を有する場合を想定するが、これが一例に過ぎないのは勿論である。
【0122】
<時系列データ検索処理>
図10、図11および図12は、本実施形態に係る時系列データ検索処理の流れを示すフローチャート図である。これらの図においては、多次元インデックスを用いた探索アルゴリズムを示しており、DFT特徴ベクトルV(P)を用いた近似距離計算と同様に、DFT特徴ベクトルV(P)を包含する包囲矩形と問合せシーケンスQとの近似距離計算についても式(17)、(19)、(20)のいずれかを用いて行う。
【0123】
まず、図10を用いて処理を説明する。
【0124】
問合せシーケンスQにおけるh個のペアの下限、上限シーケンスを作成し、それらのDFT特徴ベクトルV(P)を計算するとともに、制御演算部12において、キューに根ノードへのポインタ、および距離0を設定する(ステップS401)。
【0125】
次に、ループL41の処理を行う。
【0126】
まず、問合せ点(問合せシーケンスQ)から最も近いノードNをキューから取り出し、Nで示されるノード内のエントリ数を入力する(ステップS411)。
【0127】
この後、ノードNがリーフノードか否かを判定し(ステップS412)、リーフノード以外のとき(ステップS412でNO)、図11に示す処理Aを実行する。他方、ノードNがリーフノードのとき(ステップS413でYES)、処理Bを実行する(ステップS415)。処理AおよびBについては、後述する。
【0128】
これらの処理を経て、キューが空になるまでループL41を繰り返し実行した後、最近傍リストに格納されている候補シーケンスを探索結果として出力する(ステップS421)。
【0129】
ここで、図11のフローチャート図を用いて、処理Aの詳細を説明する。
【0130】
まず、カウンタiを初期化して0とし(ステップA1)、ループLA1を実行する。ループLA1では、カウンタiの設定後(ステップA2)、ノードNの中でi番目に格納されているDFT特徴ベクトルを用いて近似距離Dを計算する(ステップA3、A4)。近似距離Dとして、Ddisjoint(P,Q), Doverlap(P,Q), Ddisjoint(−)(P,Q)のいずれかを計算することはいうまでもない。
【0131】
がk近傍距離以下であれば(ステップA5でYES)、ノードNのi番目のエントリに格納されている子ポインタと近似距離Dをキューへ格納する(ステップA6)。
【0132】
がk近傍距離より大きい場合(ステップA5でNO)、ステップA2に戻って処理を繰り返す。
【0133】
このようにして、ループLA1では、ノードNに格納されている全エントリ(全データオブジェクト)に対する計算を行い、ループLA1が終了後、キューの先頭データを削除してデータを前詰めし、近似距離Dの昇順にキュー内のデータをソートする(ステップA7)。
【0134】
以上の処理が終了後、図10のフローチャート図に戻って処理を行う。
【0135】
次に、図12のフローチャート図を用いて、Nがリーフノードであるときの処理Bの詳細を説明する。
【0136】
まず、カウンタiを初期化して0とし(ステップB1)、ループLB1を実行する。ループLA1では、カウンタiの設定後(ステップB2)、ノードNの中でi番目に格納されているDFT特徴ベクトルを用いて近似距離Dを計算する(ステップB3、B4)。ここでも、近似距離Dは、Ddisjoint(P,Q), Doverlap(P,Q), Ddisjoint(−)(P,Q)のいずれかである。
【0137】
がk近傍距離以下であれば(ステップB4でYES)、セグンメンティッド・シーケンスを用いて近似距離D=Dsegment(P,Q)を計算する(ステップB5)。
【0138】
このDもk近傍距離以下であれば(ステップB6でYES)、厳密なダイナミックタイムワーピング距離D=DDTW(P,Q)を計算する(ステップB8)。
【0139】
ステップB8で求めたDがk近傍距離以下であれば(ステップB9でYES)、シーケンスPのIDと距離Dを記憶部13の最近傍リストへ格納し、ソートする(ステップB10)。
【0140】
ステップB10が終了後、または、ステップB5、B7,B9のいずれかにおける判断でNOの場合には、その時点でのシーケンスの数iが記憶部13に格納されているシーケンスの数に達するまで(i>=ent)、ステップB2に戻って処理を繰り返す。すなわち、記憶部13に格納されているシーケンスの各々に対して、ループLB1の処理が繰り返し実行される。
【0141】
ループLB1が終了後、最近傍リストによるキューのフィルタリングを行い、キューの中でアクセスする必要のないデータを削除する(ステップB11)。
【0142】
その後、キューの先頭データを削除してデータを前詰めする(ステップB12)。
【0143】
以上の処理が終了後、図10のフローチャート図に戻って処理を行う。
【0144】
なお、本実施形態においても、k近傍問合せの代わりに、範囲問合せを用いても勿論かまわない。
【0145】
ここで説明した近似距離D, D, ならびにダイナミックタイムワーピング距離Dの計算は、時系列データ検索装置1の制御演算部12で行われる。したがって、本実施形態においては、制御演算部12が、検索対象となる問合せシーケンスQと記憶部13に格納されているシーケンスPの距離の近似値を、DFT係数値を用いて計算する第1の近似手段としての機能と、この近似距離が所定の範囲内にある場合には、PとQ各々において近接する要素から順番に要素を結合することによってセグメント化した時系列データであるセグメンティッド・シーケンスを作成する作成手段としての機能と、検索対象となるシーケンスと前記記憶手段から読み出したシーケンスの距離を、各々のシーケンスに対応するセグメンティッド・シーケンスを用いてシーケンス間の距離の近似値を計算する第2の近似手段としての機能と、この第2の近似手段で求めた近似距離が所定の範囲内にある場合に、PとQの間のダイナミックタイムワーピング距離を求める距離算出手段としての機能とを具備している。
【0146】
以上説明した本発明の第3の実施形態によれば、包囲矩形に相当するノードがリーフノードのときには、まず精度はやや劣るが高速に計算可能な離散フーリエ変換による近似で候補を絞った後、速度的にはやや劣るものの精度がよいセグメンティッド・シーケンスによる近似でさらに候補を絞り込むことにより、実際に厳密なダイナミックタイムワーピング距離の計算を行う回数を削減することができ、時系列データのさらに高速な検索が可能となる。
【0147】
【実施例】
本発明の一実施例として、第3の実施形態で説明した時系列データ検索方法を用いた場合を例にとり、検索時間を調査し、従来技術1(4次元ベクトルを用いる方法)および従来技術2(PCAを用いる方法)と比較した結果を示す。
【0148】
実験条件は以下の通りである:
・手法の性能を計測するための時系列データは、ランダムウォーク関数を用いて人工的に長さ1024のシーケンスデータを、漸化式p=pi−1+xに基づいて100,000件作成している。ここで、pは各々のシーケンスの最初の要素であり、範囲(0, 10)からランダムに取得している。また、xは正規分布関数によって取得しており、その正規分布関数の分散は1である。
【0149】
・最近傍探索の探索数(k)は20である。
【0150】
・CPU時間は、SUNUltraSPARC−II 450MHzによって計測した。
【0151】
・多次元インデックスとして、R*−tree(Norbert Beckmann, Hans−Peter Kriegel, Ralf Schneider, and Bernhard Seeger, ”The R*−Tree: An Efficient and Robust Access Method for Points and Rectangles”, Proc. of Int. Conf. on ACM SIGMOD, pp 322−331(June 1990). を参照)を用いた。
【0152】
・データサイズは25,000件から100,000件まで変化させた。
【0153】
・15次元(m=5)のDFT特徴ベクトルV(P)を用いてインデックスを構築し、検索処理の前には13ペアの下限シーケンスおよび上限シーケンスのDFT係数をそれぞれ計算した。
【0154】
・セグメンティッド・シーケンスの範囲rとして、(max(P)−min(P)) /14 の値の平均を用いた。
【0155】
図13は、CPU時間に関する比較結果を示す図であり、横軸がデータサイズ、縦軸がCPU時間を表している。本実施例に基づく実験結果は、直線71で与えられる。
【0156】
同図からも明らかなように、従来技術1(直線81)および2(直線82)の実験結果は、本発明の一実施例と比較して、同じデータサイズの時系列データの検索に多くのCPU時間を要していることを示している。具体的には、本発明のデータ検索方法によれば、データ検索時間を従来法よりも最大で13倍程度軽減できることが分かる。
【0157】
【発明の効果】
以上の説明からも明らかなように、本発明によれば、ダイナミックタイムワーピングを用いた時系列データの検索を高速化することのできる時系列データ検索方法、時系列データ検索装置、時系列データ検索プログラム、およびプログラム記録媒体を提供することができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態に係る時系列データ検索装置の基本構成を示すブロック図である。
【図2】二つのシーケンスの位置関係を模式的に示す図である。
【図3】Ddisjoint(P,Q)の計算を概念的に示す説明図である。
【図4】本発明の第1の実施形態に係る時系列データ検索方法の処理の流れを示すフローチャート図である。
【図5】本発明の第2の実施形態において近似距離の計算に用いられるセグメンティッド・シーケンスの作成処理のアルゴリズムを示すフローチャート図である。
【図6】セグメンティッド・シーケンスの一例を示す図である。
【図7】セグメンティッド・シーケンスを用いた近似距離計算を概念的に示す説明図である。
【図8】本発明の第2の実施形態に係る時系列データ検索方法の処理の流れを示すフローチャート図である。
【図9】本発明の第3の実施形態において用いられるインデックスを概念的に説明する図である。
【図10】本発明の第3の実施形態に係る時系列データ検索方法の処理の流れを示すフローチャート図である。
【図11】図10の処理Aの詳細を示すフローチャート図である。
【図12】図10の処理Bの詳細を示すフローチャート図である。
【図13】本発明の一実施例の計算結果を示す図である。
【符号の説明】
1 時系列データ検索装置
11 入力部
12 制御演算部
13 記憶部
14 出力部
51 インデックス
53 多次元インデックス
55 シーケンスファイル[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a database search technique, and more particularly, to a time-series data search method, a time-series data search device, a time-series data search program, and a program recording medium for searching for time-series data based on dynamic time warping.
[0002]
[Prior art]
Time-series data is expressed as a sequence in which element values are determined along a time axis.
[0003]
As a method for handling such time-series data, a method called Dynamic Time Warping (DTW: Dynamic Time Warping, time axis normalization) is known. Dynamic time warping is a transformation that extends a sequence along the time axis and minimizes the distance between two sequences.
[0004]
Generally, in the Euclidean distance, it is difficult to handle time-series data having different lengths and sampling rates.However, if the dynamic time warping method is used, such time-series data can be relatively easily handled. The distance between the sequences, that is, the similarity can be obtained more accurately.
[0005]
The dynamic time warping distance will be described more specifically.
Sequence P of length n = {p0, P1, ..., pn-1シ ー ケ ン ス and a sequence Q of length m = {q0, Q1, ..., qm-1When} is given, the dynamic time warping distance DDTW(P, Q) is defined by:
(Equation 1)
Figure 2004348594
Where gseg(-1, -1) = 0, and for any integer i, j, gseg(I, -1) = gseg(-1, j) = ∞. The second term on the right side of the equation (2) is gseg(I-1, j), gseg(I, j-1), gsegIt means the minimum value of (i-1, j-1). Further, the value of α on the right side of Expression (3) is arbitrary, but in the following description, it is assumed that α = 2 for convenience.
[0006]
The distance between two sequences P and Q is obtained by matching the elements of each sequence in ascending order. That is, in dynamic time warping, the distance between sequences can be defined even if the lengths of the two sequences are different. Such dynamic time warping is calculated according to an algorithm called dynamic programming, and its calculation cost is known to be on the order of O (nm). Therefore, when the sequence length is long, a great deal of calculation cost is required.
[0007]
Conventionally, various techniques for reducing the calculation cost have been disclosed.
[0008]
Among them, the technology disclosed in Non-Patent Document 1 (hereinafter, this technology is referred to as Conventional Technology 1) approximates a dynamic time warping distance, which is a distance between two sequences based on dynamic time warping, and obtains a time series. This is a method for speeding up data retrieval. In this method, (the first element value in time, the last element value in time, the minimum value of the element, the maximum value of the element) are extracted from the elements forming the sequence, and a four-dimensional vector composed of these four elements is extracted. And the Euclidean distance between the four-dimensional vectors is adopted as an approximate value of the distance between the sequences. This approximation indicates the lower limit distance (takes a value equal to or less than the exact distance) of the dynamic time warping. By using such an approximation, the dynamic time can be reduced without causing search omission. The strict distance calculation count is reduced by warping.
[0009]
Further, in the technique disclosed in Non-Patent Document 2 (hereinafter, this technique is referred to as Conventional Technique 2), a sequence is divided at equal intervals to create a subsequence, and the maximum value and the minimum The value is calculated, and the Euclidean distance is used as an approximate value of dynamic time warping. Incidentally, this method is called PCA (Piecewise Constant Application).
[0010]
[Non-patent document 1]
Sang-Wook Kim, Sangyaun Park, and Wesley W. Chu, "An Index-based Approach for Similarity Search Supporting Time Warping in Large Sequence Databases", in Proceedings of ICDE, pp. 607-614 (April 2001).
[0011]
[Non-patent document 2]
Eamon J. et al. Keough, "Exact Indexing of Dynamic Time Warping", in Proceedings of VLDB, pp. 147-64. 406-417 (August 2002).
[0012]
[Problems to be solved by the invention]
However, in the case of the above-described conventional technique 1, the four-dimensional vector employed for obtaining the approximate value has a small number of elements with respect to the entire time-series data, so the accuracy of the approximate value is low, and the number of times of calculating the dynamic time warping distance However, there was a problem that it was not possible to sufficiently reduce the amount.
[0013]
Also, in the case of the related art 2, there is a problem similar to the related art 1, that is, the accuracy of the approximate value is low, and the number of calculations of the dynamic time warping distance cannot be sufficiently reduced.
[0014]
The present invention has been made in view of such circumstances, and an object of the present invention is to provide a time-series data search method and a time-series data search device capable of speeding up time-series data search using dynamic time warping. A time series data search program and a program recording medium are provided.
[0015]
[Means for Solving the Problems]
In order to achieve the above object, the invention according to claim 1 provides a time-series data search method for searching time-series data expressed as a sequence in which element values are determined along a time axis based on dynamic time warping. A computer system including a database for storing and storing a plurality of sequences, wherein (A) approximating a distance between a sequence to be searched and a sequence read from the database using coefficient values of a discrete Fourier transform. And (B) when the approximation distance approximated in the approximation step (A) is within a predetermined range, the dynamic time warping distance between the sequence to be searched and the sequence read from the database is calculated. The gist is to execute the distance calculation step to be obtained.
[0016]
According to a second aspect of the present invention, in the first aspect, the approximating step (A) and the distance calculating step (B) are repeatedly executed for all the sequences stored in the database. (C) The gist of the present invention is to further execute a search result output step of outputting a sequence located near the search target sequence as a search result based on the result of the repetition.
[0017]
The invention according to claim 3 is a time-series data search method for searching based on dynamic time warping for time-series data expressed as a sequence in which element values are determined along a time axis. A computer system having a database for storing and storing, (A) a creating step of creating a segmented sequence, which is segmented time-series data by sequentially joining adjacent elements, and (B) a search target An approximation step of approximating the distance between the sequence and the sequence read from the database using the segmented sequences corresponding to the respective sequences created in the creation step (A); and (C) If the obtained approximate distance is within a predetermined range, the search And summarized in that to perform a distance calculation step of obtaining a dynamic time warping distance sequence and sequence of the elephants read from the database.
[0018]
According to a fourth aspect of the present invention, in the third aspect of the present invention, the processing from the creation step (A) to the distance calculation step (C) is repeatedly executed for all the sequences stored in the database. The gist of the present invention is to further execute (D) a search result output step of outputting a sequence located in the vicinity of the search target sequence as a search result based on a result of the repetition.
[0019]
The invention according to claim 5 is a time-series data search method for searching, based on dynamic time warping, time-series data expressed as a sequence in which element values are determined along a time axis. (A) a first approximation step of approximating a distance between a sequence to be searched and a sequence read from the database by using a coefficient value of a discrete Fourier transform, (B) When the approximation distance approximated in the first approximation step of (A) is within a predetermined range, segmented time series data that is segmented by sequentially joining adjacent elements is combined. A creating step of creating a sequence, and (C) reading a sequence to be searched and the database. A second approximation step of approximating the distance of the set sequence by using a segmented sequence corresponding to each sequence created in the creation step of (B); and (D) a second approximation of (C). When the approximate distance obtained in the step is within a predetermined range, the gist is to execute a distance calculation step of obtaining a dynamic time warping distance of the sequence to be searched and the sequence read from the database.
[0020]
The invention according to claim 6 is the invention according to claim 5, wherein the processing from the first approximation step (A) to the distance calculation step (D) is performed for all the sequences stored in the database. And (E) further executing a search result output step of outputting a sequence located near the search target sequence as a search result based on the result of the repetition.
[0021]
An invention according to claim 7 is a time-series data search device that searches for time-series data represented as a sequence in which element values are determined along a time axis based on dynamic time warping, Storage means for storing and storing, approximation means for approximating the distance between the sequence to be searched and the sequence stored in the storage means using the coefficient value of the discrete Fourier transform, and approximation distance approximated by the approximation means. When it is within the predetermined range, the gist is that it comprises a distance calculation unit for calculating a dynamic time warping distance of the sequence to be searched and the sequence read from the storage unit.
[0022]
The invention according to claim 8 is a time-series data search device that searches for time-series data expressed as a sequence in which element values are determined along a time axis based on dynamic time warping. Storage means for storing and storing, creating means for creating for each sequence a segmented sequence that is segmented time-series data by sequentially joining from adjacent elements, and a sequence to be searched. Approximating means for approximating the distance of the sequence stored in the storing means using a segmented sequence corresponding to each sequence created by the creating means, and the approximate distance obtained by the approximating means is within a predetermined range. In some cases, the sequence to be searched and the sequence read from the storage unit And summarized in that and a distance calculation means for obtaining a dynamic time warping distance.
[0023]
The invention according to claim 9 is a time-series data search device that searches for time-series data represented as a sequence in which element values are determined along a time axis based on dynamic time warping, Storage means for storing and storing; first approximation means for approximating the distance between a sequence to be searched and the sequence stored in the storage means using coefficient values of a discrete Fourier transform; and first approximation means. A generating means for generating a segmented sequence, which is time-series data segmented by sequentially joining adjacent elements when the approximate distance approximated by is within a predetermined range; and a sequence to be searched. And the distance of the sequence read from the storage means, and the segment corresponding to each sequence created by the creation means. A second approximating means for approximating the sequence to be searched using the input sequence, and when the approximate distance obtained by the second approximating means is within a predetermined range, the sequence to be searched and the storage means are stored in the storage means. The present invention further comprises a distance calculating means for calculating a dynamic time warping distance of the sequence.
[0024]
According to a tenth aspect of the present invention, a computer executes the time-series data search method according to any one of the first to sixth aspects.
[0025]
According to an eleventh aspect of the present invention, a time-series data search program for causing a computer to execute the time-series data search method according to any one of the first to sixth aspects is recorded.
[0026]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
[0027]
(1st Embodiment)
FIG. 1 is a functional block diagram showing a schematic configuration of a time-series data search device which is a computer system that executes a time-series data search method according to the first embodiment of the present invention. The time-series data search device 1 shown in FIG. 1 includes an input unit 11 composed of an input device such as a keyboard and a mouse for inputting various data, a central processing unit (CPU), and performs various processes described later. A control operation unit 12 for performing control and operation, a storage unit 13 for storing and storing input information from the input unit 11 and an operation result from the control operation unit 12, and the like for outputting information stored in the storage unit 13 (Liquid crystal) It has at least an output unit 14 composed of an output device such as a display screen.
[0028]
The storage unit 13 forming at least a part of the storage unit includes a main storage device including a random access memory (RAM), a hard disk drive, a flexible disk drive, a CD-ROM (Compact Disc Read Only Memory) drive, and a DVD ( A digital versatile disk drive, a magneto-optical disk drive, a PC card drive, and other auxiliary storage devices are provided, and have a function as a database for managing and storing sequence information necessary for data search. Further, a memory area necessary for storing a calculation result to be described later as needed is secured.
[0029]
It should be noted that the various processes according to the present embodiment are performed not only by a single electronic device but also by a system constructed from two or more electronic devices by dividing the execution of each step as appropriate. It is also included. In this sense, it goes without saying that the “time-series data search device” according to the present embodiment is configured by one or more computers (systems). This point is common to all embodiments of the present invention.
[0030]
Next, the details of the time-series data search process executed by the time-series data search device 1 having the above configuration will be described.
[0031]
First, a method of approximating the dynamic time warping distance (distance approximation method) will be described, and then a time-series data search method using this distance approximation method will be described.
[0032]
<Distance approximation method>
In the time-series data search method according to the present embodiment, the dynamic time warping distance DDTWIn order to reduce the number of times of calculation as much as possible, an approximate distance is calculated using a discrete Fourier transform (DFT).
[0033]
Sequence P of length n = {p0, P1, ..., pn-1Given}, the discrete Fourier transform of this sequence P, F (P) = {f0(P), f1(P), ..., fn-1Each component (DFT coefficient) of (P)} is defined by the following equation:
(Equation 2)
Figure 2004348594
Here, for k ≠ 0, fnk(P) is fkIt becomes the complex conjugate of (P). In the present embodiment, it is assumed that each element of the sequence P is a real number. For this reason, f0(P) is a real number according to equation (4).
[0034]
Conversely, when a discrete Fourier transform F (P) is given, the elements of the sequence P are represented by an inverse discrete Fourier transform (IDFT) with respect to F (P).
(Equation 3)
Figure 2004348594
Can be obtained.
[0035]
Using the discrete Fourier transform defined as above, a sequence to be searched (called an inquiry sequence) Q = {q0, Q1, ..., qn-1A method of approximating the distance from} to an arbitrary sequence P will be described. Here, the approximate distance is obtained according to the positional relationship between the two sequences. In the following description, min (P) and min (Q) are the minimum values of sequences P and Q, respectively, while max (P) and max (Q) are the maximum values of sequences P and Q, respectively. And
[0036]
As shown in the conceptual diagram of FIG. 2, there are three cases of the positional relationship between the two sequences P and Q:
(1) min (P) ≧ max (Q) (FIG. 2 (a): This arrangement is called “disjoint”)
(2) min (P) <max (Q) and max (P)> min (Q) (FIG. 2 (b): This arrangement is called overlap)
(3) max (P) ≦ min (Q) (FIG. 2 (c): This arrangement is called “disjoint (−)”)
Hereinafter, the approximate distance is calculated for each of these three positional relationships.
[0037]
(1) disjoint
Lower limit sequence Q of query sequence Qlower= {Ql0, Ql1, ..., qln-1} And upper limit sequence Qupper= {Qu0, Qu1, ..., qun-1Ask for}. The elements of the two sequences are defined as i = 0, 1,..., N−1 as follows.
(Equation 4)
Figure 2004348594
Here, min (qui: Qui + j) And max (qui: Qui + j) Is the partial sequence {qi, Qi + 1, ..., qi + j最小 represents the minimum and maximum values, respectively.
[0038]
L appearing on the right side of equations (6) and (7)extRepresents the maximum expansion value when the sequence is expanded by dynamic time warping. In other words, the extension of the sequence by dynamic time warping is at most lextIs limited to This lextIs, when min (P) ≧ 0 and min (Q) ≧ 0,
(Equation 5)
Figure 2004348594
It is. Here, the symbol [x] used on the right side means the largest integer that does not exceed the value of x.
[0039]
On the right side of equation (8),
(Equation 6)
Figure 2004348594
Is the squared Euclidean distance between the sequences P and Q. w is the width of the dynamic time warping, and w = n−1 unless otherwise specified. E (P) and E (Q) are the energies of the sequences P and Q, respectively, given by:
(Equation 7)
Figure 2004348594
Also, δ (P, Q) = (min (P) −max (Q))2It is.
[0040]
Here, when min (P) <min (Q) and min (P) <0, E (P) in equation (10) and E (Q) in equation (11) are converted into the following E ′ (P) And E '(Q).
(Equation 8)
Figure 2004348594
[0041]
When min (P)> min (Q) and min (Q) <0, min (P) in Equations (12) and (13) is set as min (Q) andextCan be requested.
[0042]
If the sequence P is expanded using all DFT coefficients, the squared Euclidean distance D2 Euclid(P, Q) is given by equation (9). If the expansion is performed using only (m + 1) (m ≦ n−1) of the DFT coefficients, in equation (6), D2 EuclidInstead of (P, Q), D defined belowmodifiedUse (P, Q):
(Equation 9)
Figure 2004348594
[0043]
As described above, the dynamic time warping distance D in the case of “disjoint”DTWThe approximate distance of (P, Q) is obtained as follows.
(Equation 10)
Figure 2004348594
[0044]
FIG.disjointIt is explanatory drawing which shows calculation of (P, Q) notionally. In the figure, an inquiry sequence Q is a lower limit sequence QlowerAnd upper limit sequence QupperSurrounded by When the positional relationship between P and Q is disjoint (min (P) ≧ max (Q)), QupperIs used to calculate the approximate distance (see equation (15)). At this time, Ddisjoint(P, Q) is the dynamic time warping distance DDTW(P, Q), and DDTW(P, Q) The following values are taken.
[0045]
(2) overlap
As shown in FIG. 2B, when at least part of the two sequences P and Q overlap, the value of the maximum extension is lext= W. Q mentioned abovelowerAnd QupperIn addition to,
(Equation 11)
Figure 2004348594
, The approximate distance D in the overlapoverlap(P, Q) can be determined as follows:
(Equation 12)
Figure 2004348594
[0046]
(3) disjoint (-)
This is essentially the same as the case of the above (1) disjoint, and the approximate distance
Ddisjoint (-)(P, Q) is defined by:
(Equation 13)
Figure 2004348594
[0047]
In the case of this disjoint (−), δ (P, Q) in equation (8) = (min (Q) −max (P))2However, other quantities are the same as in the case of the disjoint described above.
[0048]
<Time series data search method>
In the present embodiment, a DFT feature vector based on a discrete Fourier transform is used as a feature amount for speeding up the time-series data search processing.
[0049]
The DFT feature vector V (P) of the sequence P is defined as:
V (P) = {F (P), min (P), max (P), Erest(P), γ (P)} (21)
Here, assuming that the discrete Fourier transform F (P) of P has (m + 1) dimensions, the dimension of this DFT feature vector V (P) is 2m + 5.
[0050]
Here, as a query for such multidimensional data, a k-neighbor query for searching for a sequence having an approximate distance equal to or less than a k-neighbor distance (k is a predetermined positive integer) is employed. In addition to this, even when a range designation query is used, for example, the algorithm of the time-series data search is essentially the same. This is the same in the embodiment described later.
[0051]
FIG. 4 is a flowchart illustrating a flow of a neighborhood search process using a discrete Fourier transform in the time-series data search method according to the present embodiment.
[0052]
First, an inquiry sequence Q is input, a DFT feature vector V (Q) of the sequence Q is calculated, and the number k of neighbor searches is input (step S101).
[0053]
Thereafter, the value of a counter i for counting the sequence is set to 0 (step S102).
[0054]
Next, a loop L11 is executed.
[0055]
In the loop L11, first, the value of the counter i is increased by 1 (step S111), and the sequence P and the DFT feature vector V (P) of this sequence are loaded from the storage unit 13 (step S112). Approximate distance D using1Is calculated (step S113).
[0056]
In this step, the approximate distance D1As Ddisjoint(P, Q), Doverlap(P, Q), Ddisjoint (-)Any one of (P, Q) is calculated. However, if the calculation for obtaining the approximate distance is performed for all the sequences, a large CPU cost is required. Therefore, before accessing the sequence stored in the storage unit 13, the control operation unit 12 performs various sequence expansions 1 in the inquiry sequence Q.1, L2, ..., lhAnd the upper and lower limits of these h sequence expansions can be prepared.
[0057]
As an example, Ddisjoint(P, Q) is extended lextLi≧ lextSelect the smallest sequence extension that satisfiesextAnd:
[Equation 14]
Figure 2004348594
When the control operation unit 12 is DdisjointWhen calculating (P, Q), this l ′extThe upper and lower limits for are used. The same applies to other approximate distances.
[0058]
D obtained as a result of the calculation in step S1131Is less than or equal to the k neighborhood distance (YES in step S114), the strict dynamic time warping distance D3= DDTW(P, Q) is obtained (step S115).
[0059]
D obtained in step S1153Is less than or equal to the k neighborhood distance (YES in step S116), the ID of the sequence P and the distance D3Is stored in the nearest neighbor list of the storage unit 13 and sorted (step S117).
[0060]
After the end of step S117, or in the case of NO in step S114 or step S116, until the number i of sequences at that time reaches the number of sequences stored in the storage unit 13 (i> = ent ), Returning to step S111 to repeat the processing. That is, the processing of the loop L11 is repeatedly executed for each of the sequences stored in the storage unit 13.
[0061]
Needless to say, in this loop L11, the determination in steps S114 and S116 is always YES for the first k times.
[0062]
After the loop L11 ends, the candidate sequence stored in the nearest neighbor list is output as a final search result (step S121).
[0063]
Approximate distance D described here1And dynamic time warping distance D3Is calculated by the control operation unit 12 of the time-series data search device 1. Therefore, the control operation unit 12 has a function as an approximation unit that approximates the distance between the query sequence Q to be searched and the sequence P stored in the storage unit 13 using the DFT coefficient value. It is needless to say that a function as a distance calculating means for obtaining a dynamic time warping distance between P and Q when the distance is within the predetermined range is provided.
[0064]
The calculation of the approximate distance is lower in calculation cost than the distance calculation of strict dynamic time warping. Therefore, as described above, after calculating the approximate distance first, if the calculated approximate distance is larger than the nearest neighbor processing at that time, it can be excluded from the beginning without performing strict calculation, Exact calculations can be performed only for those smaller than the nearest neighbor distance.
[0065]
According to the first embodiment of the present invention described above, it is possible to speed up the search for time-series data based on dynamic time warping without causing search omission.
[0066]
The time-series data search method according to the present embodiment is applicable to a wide range of time-series data search for images, videos, sounds, documents, and the like that can be expressed as time-series data.
[0067]
Note that the same effect can be obtained even if the time-series data search processing according to the present embodiment is performed using a predetermined computer in which a time-series data search program is installed.
[0068]
Further, a computer-readable program recording medium storing such a time-series data search program is mounted on a computer, and the computer executes the above-described processing by reading out the program stored in the program recording medium. It may be. Here, as a “computer-readable” program recording medium, a hard disk, a flexible disk, a CD-ROM, a DVD, a magneto-optical disk, a PC card, or the like can be used. By providing such a program recording medium, the time-series data search program of the present embodiment can be widely distributed.
[0069]
The same can be said for all of the embodiments of the present invention for these time-series data programs and the program recording medium on which the programs are recorded.
[0070]
(Modification of First Embodiment)
In the present embodiment, the case where the lengths of the two sequences P and Q are equal is dealt with. However, in order to calculate the sequence lengths having different lengths, it is also possible to adjust the lengths of all the sequences to be equal. It is possible.
[0071]
In this case, first, the reference length nbaseAnd the reference length nbaseWhile reducing the sequence length longer than the reference length nbaseExtend a shorter sequence length. After such adjustment, the lengths of the two sequences are apparently equal, so that the approximate distance can be obtained by the same method as in the first embodiment.
[0072]
A method for adjusting the sequence length will be described in more detail.
[0073]
First, by using (elements of) P, the lower limit sequence P of PlowerAnd upper limit sequence PupperIs calculated as follows:
(Equation 15)
Figure 2004348594
Here, the lower limit sequence PlowerElement pliAnd upper limit sequence PupperElement pui(Both i = 0, 1,..., Nbase)
(Equation 16)
Figure 2004348594
And these sequence lengths are the reference length nbaseIt is.
[0074]
P calculated as abovelowerAnd PupperBy using at least one of the above in place of the original sequence P, an approximate distance of dynamic time warping is obtained.
[0075]
The length of the inquiry sequence Q is also adjusted. First, as in the equations (17) and (18), QlowerAnd QupperCreate Then, the QlowerFrom the lower limit sequence Q 'lower= 'Ql'0, Ql '1, ..., ql 'n-1}, QupperTo the upper limit sequence Q 'u pper= 'Qu'0, Qu '1, ..., qu 'n-1Calculate}. here,
[Equation 17]
Figure 2004348594
It is. The definitions on the right side of Equations (24) and (25) are the same as the definitions on the right side of Equations (6) and (7), respectively.
[0076]
Here, if the positional relationship between P and Q is disjoint, lextIs given by P in equation (8)lowerAnd substitute Q for QupperIs calculated by substituting When the positional relationship between P and Q is overlap, the extension width of the sequence is lext= W. When the positional relationship between P and Q is disjoint (-), lextIs given by P in equation (8)upperAnd substitute Q for QlowerIs calculated by substituting
[0077]
The approximate distance for dynamic time warping is P to calculate the disjointlowerAnd Q 'upperIs used to calculate disjoint (-).upperAnd Q 'lowerIs used. Also, all four quantities are used to calculate the overlap.
[0078]
The time-series data search method except for the above points is the same as in the first embodiment.
[0079]
Therefore, even in such a modified example of the first embodiment, the same effect as that of the first embodiment can be obtained.
[0080]
(Second embodiment)
The time-series data search method according to the second embodiment of the present invention is characterized in that a segmented sequence is used for calculating an approximate value for calculating a dynamic time warping distance.
[0081]
The basic configuration of the time-series data search device according to the present embodiment is the same as that described in the first embodiment (see FIG. 1).
[0082]
<Segmented sequence>
First, the segmented sequence will be described.
[0083]
Given a sequence P of range r and length n, the segmented sequence SrIs defined as follows:
[0084]
Sr= {S0, S1, ..., sns-1} (26)
si= {Sli, Sui, Sri
(Ns≦ n, 1 ≦ sri≤n, sui-Sli≦ r)
Where sliIs the segmented sequence SrSegment s iniIs the minimum value of suiIs the segmented sequence SrSegment s iniIs the maximum value of Therefore, sui-SliIs si, And sui-Sli≦ r. Also, sriIs siThe length of nsIs SrIndicates the number of segments.
[0085]
FIG. 5 is a flowchart illustrating an algorithm for creating a segmented sequence.
[0086]
First, the sequence length n, the range r, and the elements p of the sequence Pi(I = 0, 1,..., N−1) is input (step S201), and the counter i is set to 0 (step S202).
[0087]
Next, a loop L21 is executed.
[0088]
In this loop L21, the adjacent i-th element piAnd p of the (i + 1) th elementi + 1Difference | pi-Pi + 1| (LIST.diffiAre defined up to i = n-1 (steps S211 and S212).
[0089]
After the loop L21 ends, the data stored in the storage unit 13 is stored in the LIST. diffiAre sorted in ascending order of i (step S221).
[0090]
Thereafter, the counter i is reset to 0 (step S222), and the flow shifts to loop L23.
[0091]
In the loop L23, pairs of elements in adjacent sequences are combined in order from the one with the smallest difference in element values to form a segment (step S232).
[0092]
Then, adjacent segments are combined into a larger segment (steps S231, S232, S233, and S234).
[0093]
When the difference between adjacent elements or segments exceeds the threshold value r, the loop L23 ends.
[0094]
Thereafter, the segment and the counter are returned to the initial values again (step S241), and the flow shifts to loop L25.
[0095]
In the loop L25, the number of segments generated sequentially from the first segment is counted. This process continues until the sequence length n is reached (step S251).
[0096]
Let the final value of i be ns(Step S261), the segmented sequence SrAnd the number of segments nsIs output as a result (step S262).
[0097]
FIG. 6 shows the segmented sequence S generated in this manner.rIt is a figure showing the example of.
[0098]
The segmented sequence S shown in FIG.rHas three segments s0, S1, S2It is composed of The range of these segments sui-Sli  (I = 0, 1, 2) is smaller than a predetermined range (threshold) r.
[0099]
<Distance approximation method>
The time-series data search method according to the present embodiment performs approximation by using a segmented sequence.
[0100]
Number of segments nsSegmented sequence S = {s0, S1, ..., sns-1} And the number of segments ntSegmented sequence T = {t0, T1, ..., tnt-1Given}, the approximate value Dsegment(S, T) is obtained by the following calculation.
[0101]
(Equation 18)
Figure 2004348594
[0102]
Where gur(-1, -1) = 0, and for any integer i, j, glr(I, -1) = gur(I, -1) = gul(-1, j) = gurIt is assumed that (-1, j) = ∞. Also, gsegAlthough the value of α on the right side of the definition expression of (i, j) is arbitrary, it must be at least the same value as α in the above-mentioned Euclidean square distance, and here α = 2. Of course, the present embodiment is not particularly limited. By the way, gll, Glr, Gul, GurAre the calculation results of the lower left, lower right, upper left, and upper right in each segment, respectively.
[0103]
FIG. 7 is a diagram conceptually showing calculation of an approximate distance between sequences S and T performed using a segmented sequence. In the case shown in the figure, the number of segments in the two sequences S and T is ns= 3, nt= 5. Therefore, the approximate value D of the distance between the sequences in this casesegment(S, T) is Dsegment(S, T) = gur(2, 4).
[0104]
<Time series data search method>
FIG. 8 is a flowchart illustrating a flow of a time-series data search process using a segmented sequence in the time-series data search method. It should be noted that also in this search processing, a k-neighbor inquiry is employed. Other than this, even when a range designation query is used, for example, the algorithm of the time-series data search is essentially the same as in the first embodiment.
[0105]
First, an inquiry sequence Q is input, a segmented sequence of this Q is calculated according to the above-described method, and the number of sequences stored in the storage unit 13 is input (step S301).
[0106]
Thereafter, the value of a counter i for counting the sequence is set to 0 (step S302).
[0107]
Next, a loop L31 is executed.
[0108]
In the loop L31, first, the value of the counter i is increased by 1 (step S311), the segmented sequence of the sequence P is loaded from the storage unit 13 (step S312), and the approximation using the segmented sequence of P and Q is performed. Distance D2= Dsegment(P, Q) is calculated (step S313).
[0109]
D obtained in step S3132Is less than or equal to the k proximity distance (YES in step S314), the dynamic time warping distance D which is a strict distance3= DDTW(P, Q) is obtained (step S315).
[0110]
D obtained in this step3Is less than or equal to the k proximity distance (YES in step S316), the ID of sequence P and the distance D3Is stored in the nearest neighbor list of the storage unit 13 and sorted (step S317).
[0111]
After step S317 is completed, or if the determination in step S314 or step S316 is NO, the number i of sequences at that time reaches the number of sequences stored in the storage unit 13 (i> = ent). , And returns to step S311 to repeat the processing. That is, the processing of the loop L31 is performed for each of the sequences stored in the storage unit 13.
[0112]
Also in this loop L31, the determination in steps S314 and S316 is always YES for the first k times.
[0113]
After the loop L31 ends, the candidate sequence stored in the nearest neighbor list is output as a final search result (step S321).
[0114]
Approximate distance D described here2And dynamic time warping distance D3Is calculated by the control operation unit 12 of the time-series data search device 1. Therefore, in the present embodiment, the control operation unit 12 functions as a creating unit that creates a segmented sequence, which is time-series data segmented by combining elements in order from the nearest element in each of P and Q. A function as an approximation means for calculating an approximate value of the distance between P and Q by using a segmented sequence corresponding to each sequence, and P and Q when the approximate distance is within a predetermined range. Needless to say, it has a function as a distance calculating means for obtaining a dynamic time warping distance between Q.
[0115]
According to the second embodiment of the present invention described above, the same effects as those of the first embodiment can be obtained.
[0116]
(Third embodiment)
The time-series data search method according to the third embodiment of the present invention uses both the distance approximation methods (DFT, segmented sequence) of the above-described two embodiments.
[0117]
The configuration of the time-series data search device according to the present embodiment is the same as that of the time-series data search device 1 shown in FIG.
[0118]
For this purpose, in the present embodiment, an index is configured. FIG. 9 is an explanatory diagram conceptually showing the index and showing constituent elements of the index. As shown in the figure, the index 51 is composed of a multidimensional index 53 and a sequence file 55.
[0119]
The multidimensional index 53 is composed of a DFT feature vector V (P) (see equation (15)) and an enclosing rectangle, while the sequence file 55 contains a sequence P and a segmented sequence (see equation (20)). ).
[0120]
In the present embodiment, as the multidimensional index 53, the DFT feature vector V (P) is regarded as a point in a (2m + 5) -dimensional space, and an enclosing rectangle formed by enclosing these points in advance with a hyper-rectangular surface is: The following description will be made on the assumption that the search tree has a node structure.
[0121]
In this virtual search tree, branches extend from the root node of the uppermost layer, and each node corresponds to an enclosing rectangle. Of the nodes other than the root node, a node that stores a plurality of points (that is, a plurality of DFT feature vectors) surrounded by one enclosing rectangle is referred to as a leaf node. In addition, here, a case is assumed in which a parallel tree structure in which the number of extending branches (corresponding to the number of levels) ends with the same value is assumed, but this is, of course, only an example.
[0122]
<Time-series data search processing>
FIG. 10, FIG. 11, and FIG. 12 are flowcharts illustrating the flow of the time-series data search process according to the present embodiment. In these figures, a search algorithm using a multidimensional index is shown. Similar to the approximate distance calculation using the DFT feature vector V (P), an enclosing rectangle including the DFT feature vector V (P) and a query The calculation of the approximate distance to the sequence Q is also performed using any of the equations (17), (19), and (20).
[0123]
First, the processing will be described with reference to FIG.
[0124]
A lower limit and upper limit sequence of h pairs in the inquiry sequence Q are created, their DFT feature vectors V (P) are calculated, and a pointer to a root node and a distance 0 are set in the queue in the control operation unit 12. (Step S401).
[0125]
Next, the processing of the loop L41 is performed.
[0126]
First, the node N closest to the inquiry point (inquiry sequence Q) is extracted from the queue, and the number of entries in the node indicated by N is input (step S411).
[0127]
Thereafter, it is determined whether or not the node N is a leaf node (step S412). If the node N is not a leaf node (NO in step S412), the process A shown in FIG. 11 is executed. On the other hand, when the node N is a leaf node (YES in step S413), the process B is executed (step S415). Processes A and B will be described later.
[0128]
After these processes, the loop L41 is repeatedly executed until the queue becomes empty, and then the candidate sequence stored in the nearest neighbor list is output as a search result (step S421).
[0129]
Here, the details of the process A will be described with reference to the flowchart of FIG.
[0130]
First, the counter i is initialized to 0 (step A1), and the loop LA1 is executed. In the loop LA1, after setting the counter i (step A2), the approximate distance D is calculated using the DFT feature vector stored in the i-th node N.1Is calculated (steps A3 and A4). Approximate distance D1As Ddisjoint(P, Q), Doverlap(P, Q), Ddisjoint (-)It goes without saying that one of (P, Q) is calculated.
[0131]
D1Is less than or equal to the k neighborhood distance (YES in step A5), the child pointer stored in the i-th entry of the node N and the approximate distance D1Is stored in the queue (step A6).
[0132]
D1Is larger than the k proximity distance (NO in step A5), the process returns to step A2 and the process is repeated.
[0133]
In this way, in the loop LA1, calculations are performed on all entries (all data objects) stored in the node N, and after the loop LA1, the head data of the queue is deleted, the data is left-justified, and the approximate distance is calculated. D1In the queue in ascending order (step A7).
[0134]
After the above processing is completed, the processing returns to the flowchart of FIG.
[0135]
Next, the details of the process B when N is a leaf node will be described with reference to the flowchart of FIG.
[0136]
First, the counter i is initialized to 0 (step B1), and the loop LB1 is executed. In the loop LA1, after setting the counter i (step B2), the approximate distance D is calculated using the DFT feature vector stored at the i-th node N.1Is calculated (steps B3 and B4). Again, the approximate distance D1Is Ddisjoint(P, Q), Doverlap(P, Q), Ddisjoint (-)(P, Q).
[0137]
D1Is less than or equal to the k neighborhood distance (YES in step B4), the approximate distance D is calculated using the segmented sequence.2= Dsegment(P, Q) is calculated (step B5).
[0138]
This D2Is also less than or equal to the k proximity distance (YES in step B6), the strict dynamic time warping distance D3= DDTW(P, Q) is calculated (step B8).
[0139]
D obtained in step B83Is less than or equal to the k proximity distance (YES in step B9), the ID of the sequence P and the distance D3Is stored in the nearest neighbor list of the storage unit 13 and sorted (step B10).
[0140]
After step B10 is completed, or if the determination in any of steps B5, B7, and B9 is NO, the number i of sequences at that time reaches the number of sequences stored in the storage unit 13 ( i> = ent), returning to step B2 and repeating the processing. That is, the processing of the loop LB1 is repeatedly executed for each of the sequences stored in the storage unit 13.
[0141]
After the loop LB1, the queue is filtered by the nearest neighbor list, and data that does not need to be accessed in the queue is deleted (step B11).
[0142]
Thereafter, the head data of the queue is deleted and the data is left-justified (step B12).
[0143]
After the above processing is completed, the processing returns to the flowchart of FIG.
[0144]
In the present embodiment, a range inquiry may be used instead of the k neighborhood inquiry.
[0145]
Approximate distance D described here1, D2, And dynamic time warping distance D3Is calculated by the control operation unit 12 of the time-series data search device 1. Therefore, in the present embodiment, the control calculation unit 12 calculates the approximate value of the distance between the query sequence Q to be searched and the sequence P stored in the storage unit 13 using the DFT coefficient value. A function as an approximation means, and when this approximation distance is within a predetermined range, a segmented sequence which is a time-series data segmented by combining elements in order from the nearest element in each of P and Q And a distance between a sequence to be searched and a sequence read from the storage unit, and an approximate value of a distance between the sequences is calculated using a segmented sequence corresponding to each sequence. When the function as the second approximating means and the approximate distance obtained by the second approximating means are within a predetermined range, It is provided with a function of a distance calculating means for the determining the dynamic time warping distance between Q.
[0146]
According to the third embodiment of the present invention described above, when the node corresponding to the enclosing rectangle is a leaf node, after narrowing down candidates by approximation by a discrete Fourier transform that is slightly inferior in accuracy but can be calculated at high speed, By narrowing down the candidates further by approximation with a segmented sequence that is slightly inferior in speed but high in accuracy, the number of times of actually calculating the dynamic time warping distance can be reduced, and the time series data can be further speeded up Search is possible.
[0147]
【Example】
As an example of the present invention, taking a case where the time-series data search method described in the third embodiment is used as an example, search time is investigated, and the related art 1 (method using a four-dimensional vector) and the related art 2 The result of comparison with (method using PCA) is shown.
[0148]
The experimental conditions are as follows:
The time-series data for measuring the performance of the method is obtained by artificially converting the 1024-length sequence data using a random walk function into a recurrence formula p.i= Pi-1+ Xi100,000 are created based on Where p0Is the first element of each sequence and is obtained randomly from the range (0,10). Also, xiIs obtained by the normal distribution function, and the variance of the normal distribution function is 1.
[0149]
The search number (k) of the nearest neighbor search is 20.
[0150]
-CPU time was measured by SUNUTRASPARC-II 450MHz.
[0151]
-As a multidimensional index, R * -tree (Norbert Beckmann, Hans-Peter Kriegel, Ralf Schneider, and Bernhard Seegger, "The R * -Trees in the Republic of Ancestry and Rob. Conf. On ACM SIGMOD, pp 322-331 (June 1990).) Was used.
[0152]
-The data size was changed from 25,000 to 100,000.
[0153]
An index was constructed using the 15-dimensional (m = 5) DFT feature vector V (P), and the DFT coefficients of the 13 pairs of lower and upper sequences were calculated before the search processing.
[0154]
As the range r of the segmented sequence, the average of the values of (max (P) -min (P)) / 14 was used.
[0155]
FIG. 13 is a diagram illustrating a comparison result regarding the CPU time. The horizontal axis indicates the data size, and the vertical axis indicates the CPU time. The experimental result based on the present embodiment is given by a straight line 71.
[0156]
As is clear from the figure, the experimental results of the prior arts 1 (straight line 81) and 2 (straight line 82) can be used to search for time-series data having the same data size, compared to the embodiment of the present invention. This indicates that CPU time is required. Specifically, according to the data search method of the present invention, it can be seen that the data search time can be reduced up to about 13 times compared to the conventional method.
[0157]
【The invention's effect】
As is apparent from the above description, according to the present invention, a time-series data search method, a time-series data search device, and a time-series data search method capable of speeding up the search for time-series data using dynamic time warping A program and a program recording medium can be provided.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a basic configuration of a time-series data search device according to a first embodiment of the present invention.
FIG. 2 is a diagram schematically showing a positional relationship between two sequences.
FIG. 3disjointIt is explanatory drawing which shows calculation of (P, Q) notionally.
FIG. 4 is a flowchart illustrating a processing flow of a time-series data search method according to the first embodiment of the present invention.
FIG. 5 is a flowchart illustrating an algorithm of a segmented sequence creation process used for calculating an approximate distance in the second embodiment of the present invention.
FIG. 6 is a diagram showing an example of a segmented sequence.
FIG. 7 is an explanatory diagram conceptually showing an approximate distance calculation using a segmented sequence.
FIG. 8 is a flowchart illustrating a processing flow of a time-series data search method according to a second embodiment of the present invention.
FIG. 9 is a diagram conceptually illustrating an index used in a third embodiment of the present invention.
FIG. 10 is a flowchart illustrating a processing flow of a time-series data search method according to a third embodiment of the present invention.
FIG. 11 is a flowchart illustrating details of a process A in FIG. 10;
FIG. 12 is a flowchart illustrating details of a process B in FIG. 10;
FIG. 13 is a diagram showing calculation results of an example of the present invention.
[Explanation of symbols]
1. Time-series data search device
11 Input section
12 Control operation unit
13 Memory
14 Output section
51 Index
53 Multidimensional Index
55 sequence file

Claims (11)

時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索方法であって、
複数のシーケンスを格納して記憶するデータベースを備えたコンピュータシステムが、
(A)検索対象となるシーケンスと前記データベースから読み出したシーケンスの距離を、離散フーリエ変換の係数値を用いて近似する近似ステップと、
(B)前記(A)の近似ステップで近似した近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記データベースから読み出したシーケンスのダイナミックタイムワーピング距離を求める距離算出ステップと
を実行することを特徴とする時系列データ検索方法。
A time-series data search method for searching for time-series data expressed as a sequence in which element values are determined along a time axis based on dynamic time warping,
A computer system with a database that stores and stores a plurality of sequences,
(A) an approximation step of approximating a distance between a sequence to be searched and a sequence read from the database using a coefficient value of a discrete Fourier transform;
(B) a step of calculating a dynamic time warping distance between the sequence to be searched and the sequence read from the database when the approximate distance approximated in the approximating step (A) is within a predetermined range; A time-series data search method characterized by performing the following.
前記(A)の近似ステップと、前記(B)の距離算出ステップを、前記データベースに記憶した全てのシーケンスに対して繰り返し実行し、
(C)この繰り返しの結果に基づいて、前記検索対象となるシーケンスの近傍に位置するシーケンスを検索結果として出力する検索結果出力ステップ
をさらに実行することを特徴とする請求項1記載の時系列データ検索方法。
Repeating the approximation step (A) and the distance calculation step (B) for all sequences stored in the database;
2. The time-series data according to claim 1, further comprising: (C) a search result output step of outputting a sequence located near the search target sequence as a search result based on a result of the repetition. retrieval method.
時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索方法であって、
複数のシーケンスを格納して記憶するデータベースを備えたコンピュータシステムが、
(A)近接する要素から順番に結合することによってセグメント化した時系列データであるセグメンティッド・シーケンスを作成する作成ステップと、
(B)検索対象となるシーケンスと前記データベースから読み出したシーケンスの距離を、前記(A)の作成ステップで作成した各々のシーケンスに対応するセグメンティッド・シーケンスを用いて近似する近似ステップと、
(C)この近似ステップで求めた近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記データベースから読み出したシーケンスのダイナミックタイムワーピング距離を求める距離算出ステップと
を実行することを特徴とする時系列データ検索方法。
A time-series data search method for searching for time-series data expressed as a sequence in which element values are determined along a time axis based on dynamic time warping,
A computer system with a database that stores and stores a plurality of sequences,
(A) a creation step of creating a segmented sequence, which is time-series data segmented by sequentially joining adjacent elements,
(B) an approximating step of approximating the distance between the sequence to be searched and the sequence read from the database using the segmented sequences corresponding to the respective sequences created in the creating step (A);
(C) when the approximation distance obtained in this approximation step is within a predetermined range, executing a distance calculation step for obtaining a dynamic time warping distance between the sequence to be searched and the sequence read from the database; A time-series data search method characterized by the following.
前記(A)の作成ステップから前記(C)の距離算出ステップに至る処理を、前記データベースに記憶した全てのシーケンスに対して繰り返し実行し、
(D)この繰り返しの結果に基づいて、前記検索対象となるシーケンスの近傍に位置するシーケンスを検索結果として出力する検索結果出力ステップ
をさらに実行することを特徴とする請求項3記載の時系列データ検索方法。
The process from the creating step (A) to the distance calculating step (C) is repeatedly executed for all the sequences stored in the database,
4. The time-series data according to claim 3, further comprising: (D) a search result output step of outputting, as a search result, a sequence located near the sequence to be searched as a search result based on a result of the repetition. retrieval method.
時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索方法であって、
複数のシーケンスを格納して記憶するデータベースを備えたコンピュータシステムが、
(A)検索対象となるシーケンスと前記データベースから読み出したシーケンスの距離を、離散フーリエ変換の係数値を用いて近似する第1の近似ステップと、
(B)前記(A)の第1の近似ステップで近似した近似距離が所定の範囲内にある場合には、近接する要素から順番に結合することによってセグメント化した時系列データであるセグメンティッド・シーケンスを作成する作成ステップと、
(C)検索対象となるシーケンスと前記データベースから読み出したシーケンスの距離を、前記(B)の作成ステップで作成した各々のシーケンスに対応するセグメンティッド・シーケンスを用いて近似する第2の近似ステップと、
(D)前記(C)の第2の近似ステップで求めた近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記データベースから読み出したシーケンスのダイナミックタイムワーピング距離を求める距離算出ステップと
を実行することを特徴とする時系列データ検索方法。
A time-series data search method for searching for time-series data expressed as a sequence in which element values are determined along a time axis based on dynamic time warping,
A computer system with a database that stores and stores a plurality of sequences,
(A) a first approximation step of approximating a distance between a sequence to be searched and a sequence read from the database using a coefficient value of a discrete Fourier transform;
(B) When the approximation distance approximated in the first approximation step of (A) is within a predetermined range, segmented time series data that is segmented by sequentially joining adjacent elements is combined. A creation step to create a sequence;
(C) a second approximation step of approximating the distance between the sequence to be searched and the sequence read from the database using the segmented sequences corresponding to the respective sequences created in the creation step (B). ,
(D) when the approximation distance obtained in the second approximation step of (C) is within a predetermined range, a distance for obtaining a dynamic time warping distance between the sequence to be searched and the sequence read from the database; Performing a calculating step.
前記(A)の第1の近似ステップから前記(D)の距離算出ステップに至る処理を、前記データベースに記憶した全てのシーケンスに対して繰り返し実行し、
(E)この繰り返しの結果に基づいて、前記検索対象となるシーケンスの近傍に位置するシーケンスを検索結果として出力する検索結果出力ステップ
をさらに実行することを特徴とする請求項5記載の時系列データ検索方法。
The process from the first approximation step (A) to the distance calculation step (D) is repeatedly executed for all the sequences stored in the database,
6. The time-series data according to claim 5, further comprising: (E) a search result output step of outputting a sequence located near the search target sequence as a search result based on a result of the repetition. retrieval method.
時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索装置であって、
複数のシーケンスを格納して記憶する記憶手段と、
検索対象となるシーケンスと前記記憶手段で記憶したシーケンスの距離を、離散フーリエ変換の係数値を用いて近似する近似手段と、
この近似手段で近似した近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記記憶手段から読み出したシーケンスのダイナミックタイムワーピング距離を求める距離算出手段と
を備えたことを特徴とする時系列データ検索装置。
A time-series data search device that searches for time-series data expressed as a sequence in which element values are determined along a time axis based on dynamic time warping,
Storage means for storing and storing a plurality of sequences;
Approximation means for approximating the distance between the sequence to be searched and the sequence stored in the storage means using a coefficient value of a discrete Fourier transform,
When the approximation distance approximated by the approximation means is within a predetermined range, a distance calculation means for calculating a dynamic time warping distance of the sequence to be searched and the sequence read from the storage means is provided. Time-series data search device.
時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索装置であって、
複数のシーケンスを格納して記憶する記憶手段と、
近接する要素から順番に結合することによってセグメント化した時系列データであるセグメンティッド・シーケンスを各々のシーケンスに対して作成する作成手段と、
検索対象となるシーケンスと前記記憶手段で記憶したシーケンスの距離を、前記作成手段で作成した各々のシーケンスに対応するセグメンティッド・シーケンスを用いて近似する近似手段と、
この近似手段で求めた近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記記憶手段から読み出したシーケンスのダイナミックタイムワーピング距離を求める距離算出手段と
を備えたことを特徴とする時系列データ検索装置。
A time-series data search device that searches for time-series data expressed as a sequence in which element values are determined along a time axis based on dynamic time warping,
Storage means for storing and storing a plurality of sequences;
Creating means for creating for each sequence a segmented sequence that is segmented time-series data by joining in order from adjacent elements,
Approximation means for approximating the distance between the sequence to be searched and the sequence stored in the storage means using a segmented sequence corresponding to each sequence created by the creation means,
When the approximation distance obtained by the approximation means is within a predetermined range, a distance calculation means for obtaining a dynamic time warping distance of the sequence to be searched and the sequence read from the storage means is provided. Time-series data search device.
時間軸に沿って要素値が定められているシーケンスとして表現される時系列データをダイナミックタイムワーピングに基づいて検索する時系列データ検索装置であって、
複数のシーケンスを格納して記憶する記憶手段と、
検索対象となるシーケンスと前記記憶手段で記憶したシーケンスの距離を、離散フーリエ変換の係数値を用いて近似する第1の近似手段と、
この第1の近似手段で近似した近似距離が所定の範囲内にある場合には、近接する要素から順番に結合することによってセグメント化した時系列データであるセグメンティッド・シーケンスを作成する作成手段と、
検索対象となるシーケンスと前記記憶手段から読み出したシーケンスの距離を、前記作成手段で作成した各々のシーケンスに対応するセグメンティッド・シーケンスを用いて近似する第2の近似手段と、
この第2の近似手段で求めた近似距離が所定の範囲内にある場合には、前記検索対象となるシーケンスと前記記憶手段で記憶したシーケンスのダイナミックタイムワーピング距離を求める距離算出手段と
を備えたことを特徴とする時系列データ検索装置。
A time-series data search device that searches for time-series data expressed as a sequence in which element values are determined along a time axis based on dynamic time warping,
Storage means for storing and storing a plurality of sequences;
First approximation means for approximating the distance between the sequence to be searched and the sequence stored in the storage means using a discrete Fourier transform coefficient value;
When the approximation distance approximated by the first approximation means is within a predetermined range, creating means for creating a segmented sequence, which is time-series data segmented by sequentially combining adjacent elements; ,
Second approximation means for approximating the distance between the sequence to be searched and the sequence read from the storage means using a segmented sequence corresponding to each sequence created by the creation means;
When the approximation distance obtained by the second approximation means is within a predetermined range, there is provided a distance calculation means for obtaining a dynamic time warping distance of the sequence to be searched and the sequence stored in the storage means. A time-series data search device, characterized in that:
請求項1乃至6のいずれか1項に記載した時系列データ検索方法をコンピュータに実行させることを特徴とする時系列データ検索プログラム。A time-series data search program for causing a computer to execute the time-series data search method according to any one of claims 1 to 6. 請求項1乃至6のいずれか1項に記載した時系列データ検索方法をコンピュータに実行させるための時系列データ検索プログラムを記録したことを特徴とするプログラム記録媒体。A program recording medium on which a time-series data search program for causing a computer to execute the time-series data search method according to claim 1 is recorded.
JP2003146794A 2003-05-23 2003-05-23 Time-series data distance calculation device, program, and recording medium Expired - Fee Related JP4355824B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003146794A JP4355824B2 (en) 2003-05-23 2003-05-23 Time-series data distance calculation device, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003146794A JP4355824B2 (en) 2003-05-23 2003-05-23 Time-series data distance calculation device, program, and recording medium

Publications (2)

Publication Number Publication Date
JP2004348594A true JP2004348594A (en) 2004-12-09
JP4355824B2 JP4355824B2 (en) 2009-11-04

Family

ID=33533544

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003146794A Expired - Fee Related JP4355824B2 (en) 2003-05-23 2003-05-23 Time-series data distance calculation device, program, and recording medium

Country Status (1)

Country Link
JP (1) JP4355824B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006285907A (en) * 2005-04-05 2006-10-19 Nippon Hoso Kyokai <Nhk> Designation distribution content specification device, designation distribution content specification program and designation distribution content specification method
US7454311B2 (en) 2005-09-01 2008-11-18 Fujitsu Limited Computer-readable storage medium storing data analysis program
EP2701075A1 (en) 2012-08-22 2014-02-26 Yokogawa Electric Corporation Method and apparatus for data similarity calculation
US10223069B2 (en) 2015-01-22 2019-03-05 Mitsubishi Electric Corporation Time-series data search device and computer readable medium
US11199646B2 (en) 2019-08-26 2021-12-14 Landmark Graphics Corporation Performing dynamic time warping with null or missing data
US20220164394A1 (en) * 2017-12-01 2022-05-26 Palantir Technologies Inc. System and methods for faster processor comparisons of visual graph features
CN116089491A (en) * 2022-12-15 2023-05-09 清华大学 Retrieval matching method and device based on time sequence database

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006285907A (en) * 2005-04-05 2006-10-19 Nippon Hoso Kyokai <Nhk> Designation distribution content specification device, designation distribution content specification program and designation distribution content specification method
US7454311B2 (en) 2005-09-01 2008-11-18 Fujitsu Limited Computer-readable storage medium storing data analysis program
EP2701075A1 (en) 2012-08-22 2014-02-26 Yokogawa Electric Corporation Method and apparatus for data similarity calculation
US9189198B2 (en) 2012-08-22 2015-11-17 Yokogawa Electric Corporation Data similarity calculation method and data similarity calculation apparatus
US10223069B2 (en) 2015-01-22 2019-03-05 Mitsubishi Electric Corporation Time-series data search device and computer readable medium
US20220164394A1 (en) * 2017-12-01 2022-05-26 Palantir Technologies Inc. System and methods for faster processor comparisons of visual graph features
US11199646B2 (en) 2019-08-26 2021-12-14 Landmark Graphics Corporation Performing dynamic time warping with null or missing data
US11906683B2 (en) 2019-08-26 2024-02-20 Landmark Graphics Corporation Dynamic time warping of signals plus user picks
CN116089491A (en) * 2022-12-15 2023-05-09 清华大学 Retrieval matching method and device based on time sequence database
CN116089491B (en) * 2022-12-15 2024-01-30 清华大学 Retrieval matching method and device based on time sequence database

Also Published As

Publication number Publication date
JP4355824B2 (en) 2009-11-04

Similar Documents

Publication Publication Date Title
Benetis et al. Nearest and reverse nearest neighbor queries for moving objects
Traina et al. Fast indexing and visualization of metric data sets using slim-trees
US7584184B2 (en) System of effectively searching text for keyword, and method thereof
Vlachos et al. Indexing multidimensional time-series
Lin et al. One way distance: For shape based similarity search of moving object trajectories
Palpanas et al. Streaming time series summarization using user-defined amnesic functions
Jo et al. Panene: A progressive algorithm for indexing and querying approximate k-nearest neighbors
US10580114B2 (en) Methods and systems for real time 3D-space search and point-cloud registration using a dimension-shuffle transform
Zheng et al. K-nearest neighbor search for fuzzy objects
Wang et al. Efficient and effective similar subtrajectory search with deep reinforcement learning
Hadian et al. Hands-off model integration in spatial index structures
Song et al. Brepartition: Optimized high-dimensional knn search with bregman distances
JP2009294855A (en) Similar data retrieval system
Jafari et al. Experimental analysis of locality sensitive hashing techniques for high-dimensional approximate nearest neighbor searches
JP4355824B2 (en) Time-series data distance calculation device, program, and recording medium
Jafari et al. Improving locality sensitive hashing by efficiently finding projected nearest neighbors
Qu et al. Hybrid indexes by exploring traditional B-tree and linear regression
Lee et al. A fast content-based indexing and retrieval technique by the shape information in large image database
CN111026922A (en) Distributed vector indexing method, system, plug-in and electronic equipment
JP2005322161A (en) Selecting device and method, program and recording medium
Hundt et al. Cuda-accelerated alignment of subsequences in streamed time series data
Adelfio et al. Similarity search on a large collection of point sets
JP2004046612A (en) Data matching method and device, data matching program, and computer readable recording medium
Li et al. Linear time motif discovery in time series
Jafari et al. mmlsh: A practical and efficient technique for processing approximate nearest neighbor queries on multimedia data

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050725

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081014

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081215

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090203

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090402

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20090415

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090625

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20090709

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090713

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120814

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120814

Year of fee payment: 3

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20090909

A072 Dismissal of procedure [no reply to invitation to correct request for examination]

Free format text: JAPANESE INTERMEDIATE CODE: A072

Effective date: 20100119

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130814

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees