JP4275084B2 - Similar time series data calculation device, similar time series data calculation method, and similar time series data calculation program - Google Patents

Similar time series data calculation device, similar time series data calculation method, and similar time series data calculation program Download PDF

Info

Publication number
JP4275084B2
JP4275084B2 JP2005039734A JP2005039734A JP4275084B2 JP 4275084 B2 JP4275084 B2 JP 4275084B2 JP 2005039734 A JP2005039734 A JP 2005039734A JP 2005039734 A JP2005039734 A JP 2005039734A JP 4275084 B2 JP4275084 B2 JP 4275084B2
Authority
JP
Japan
Prior art keywords
series data
distance
memory
time
time series
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.)
Expired - Fee Related
Application number
JP2005039734A
Other languages
Japanese (ja)
Other versions
JP2006227835A (en
Inventor
靖宏 藤原
一能 三井
雅司 山室
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 JP2005039734A priority Critical patent/JP4275084B2/en
Publication of JP2006227835A publication Critical patent/JP2006227835A/en
Application granted granted Critical
Publication of JP4275084B2 publication Critical patent/JP4275084B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、複数の時系列データの中で類似したものを求める装置、方法、プログラムに関する。   The present invention relates to an apparatus, a method, and a program for obtaining similar data among a plurality of time series data.

類似した時系列データを高速に求める処理は様々な分野で利用される。例えば株のオンライントレーディングシステムは、大量の株価を監視して、値動きが類似した銘柄を高速に検索する。移動***置管理システムは、走行している大量の車をセンシングして、似た移動軌跡しているものを高速に検知する。地震監視システムは、大数配置された地震計からの情報をもとに地震発生時の揺れ方が類似した地点を高速に見つける。   Processing for obtaining similar time-series data at high speed is used in various fields. For example, an online trading system for stocks monitors a large amount of stock prices and searches for stocks with similar price movements at high speed. The moving body position management system senses a large number of traveling vehicles and detects a similar moving locus at high speed. The seismic monitoring system finds a point where the way of shaking at the time of an earthquake is similar based on information from a large number of seismometers.

時系列データが類似しているかは、時系列データ間の距離があらかじめ決められた閾値ε以下になるかどうかで判断される。しかし、類似した時系列データを求める際に、総当りで距離を求めたのでは計算コストが高い。よって、高速に類似時系列データを求めるには計算コストの低い方法が必要である。   Whether the time series data is similar is determined by whether or not the distance between the time series data is equal to or less than a predetermined threshold ε. However, when calculating similar time-series data, calculating the distance with brute force is expensive. Therefore, a method with low calculation cost is required to obtain similar time-series data at high speed.

なお、ここで扱う時系列データは株価のような離散値と移動軌跡のような連続値がある。時系列データが離散値である場合、時系列データが類似しているかは離散値を用いて時系列データ間の距離が閾値内になるか調べればよい。また時系列データが連続値である場合は、時系列データは処理する際にサンプリングされ離散値になるので、結局は離散値の処理手法を用いる。   The time series data handled here includes discrete values such as stock prices and continuous values such as movement trajectories. When the time series data is a discrete value, whether the time series data is similar may be determined by using the discrete value to determine whether the distance between the time series data is within the threshold. If the time-series data is a continuous value, the time-series data is sampled and converted into discrete values during processing, and eventually a discrete value processing method is used.

時系列データ間の距離関数としてはユークリッド距離を用いる。2つの時系列データをS(s1,s2,・・・,sn)とS′=(s′1,s′2,・・・,s′n)とし、n=n′であるときユークリッド距離D(S,S′)は次式で計算される。

Figure 0004275084
Euclidean distance is used as a distance function between time series data. Two time-series data S and (s 1, s 2, ··· , s n) and S '= (s' 1, s' 2, ···, s' n) and is the n = n' Sometimes the Euclidean distance D (S, S ') is calculated by the following equation.
Figure 0004275084

類似した時系列データを求める問題は、Whole MatchingとSubsequence Matchingの2つのタイプに分けられる。Whole Matchingは、等しい長さの時系列データから類似したものを求める問題である。またSubsequence Matchingは、問い合わせ時系列データSとそれより長い時系列データS′を比較し、時系列データS′の中で時系列データSと類似した部分を求める問題である。   The problem of obtaining similar time series data can be divided into two types, Whole Matching and Subsequence Matching. Whole Matching is a problem of finding something similar from time-series data of equal length. Subsequence matching is a problem in which the inquiry time series data S is compared with the time series data S ′ longer than the inquiry time series data S ′ and a portion similar to the time series data S in the time series data S ′ is obtained.

Subseqquence MatchingはWhole Matchingへと置き換えることができる。これは、図6に示すように、時系列データS′に長さがnのl個の窓を逐次的に重ねて部分的な時系列データのコピーを作成すると、時系列データS′の部分的なコピーと時系列データSは等しい長さとなるからである。   Subseqquence Matching can be replaced by Whole Matching. As shown in FIG. 6, when a copy of a partial time series data is created by sequentially superimposing l windows of length n on the time series data S ′, a portion of the time series data S ′ is obtained. This is because the typical copy and the time-series data S have the same length.

類似した時系列データを求めるのに良く用いられるフレームワークとしてGEMINI(GEneric Multimedia INdexIng method)がある(非特許文献1)。GEMINIは、R*-tree(非特許文献2)やSR-tree(非特許文献3)等を用いて時系列データを多次元のインデクス構造に索引付け、類似時系列データを求める。時系列データを索引付けするのは、時系列データはn次元空間(nはある程度大きな数となることが多い)の1つのポイントとして捉えられるからである。 There is a GEMINI (GEneric Multimedia INdex Ing method) as a framework often used for obtaining similar time series data (Non-patent Document 1). GEMINI uses R * -tree (Non-Patent Document 2), SR-tree (Non-Patent Document 3), etc. to index time-series data into a multi-dimensional index structure to obtain similar time-series data. The time series data is indexed because the time series data is regarded as one point in an n-dimensional space (n is often a large number to some extent).

しかし、時系列データをn次元のまま索引付けしても計算コストを下げる効果は期待できない。多次元インデクス構造は次元数が10前後より多くなると性能が劣化するからである。そのため、GEMINIでは時系列データをN次元に次元圧縮して索引付けしている。   However, the effect of lowering the calculation cost cannot be expected even if the time series data is indexed with n dimensions. This is because the performance of the multidimensional index structure deteriorates when the number of dimensions exceeds about 10. Therefore, in GEMINI, time series data is dimensionally compressed and indexed in N dimensions.

次元圧縮して類似時系列データを求める場合、誤差の発生に留意しなければならない。ここで誤差とは、false negativeとfalse positiveの2通りが考えられる。false negativeとは類似している時系列データを類似していないと判断することであり、false positiveとは類似していない時系列データを類似していると判断することである。2つの誤差のうちfalse negativeが発生しないことがより重要である。false negativeの発生は結果の正確性に影響するからである。   When obtaining similar time series data by dimension compression, attention must be paid to the occurrence of errors. Here, there are two types of error, false negative and false positive. “False negative” means that similar time-series data is not similar, and “false positive” means that similar time-series data is similar. It is more important that no false negative of the two errors occur. This is because the occurrence of false negatives affects the accuracy of the results.

次元圧縮して類似時系列データを求めてもfalse negativeが発生しないことを保証する定理としてlower bounding lemmaが知られている。これは、次式(lower bounding condition)が成り立てばfalse negativeが発生しないという定理である。

Figure 0004275084
Lower bounding lemma is known as a theorem that guarantees that false negatives will not occur even if similar time series data is obtained by dimension compression. This is a theorem that false negative does not occur if the following expression (lower bounding condition) holds.
Figure 0004275084

なお、lower bounding conditionが成り立つ次元圧縮手法として離散フーリエ変換(非特許文献1)、離散ウェブレット変換(非特許文献4)、特異値分解(非特許文献5)などが知られている。   In addition, discrete Fourier transform (Non-patent document 1), discrete weblet transform (Non-patent document 4), singular value decomposition (Non-patent document 5), and the like are known as dimension compression methods that satisfy the lower bounding condition.

GEMINIでは、search processとpost processの2つの処理を行って類似時系列データを求める。search processではlower bounding conditionが成り立つ次元圧縮手法によって構築した多次元インデクス構造を用いて類似時系列データを求める。search processの結果には多少のfalse positiveが含まれる。そのため、post processではsearch processの結果に対して次元圧縮前の時系列データ間の距離を計算して、false positiveを取り除く。   In GEMINI, two processes of search process and post process are performed to obtain similar time series data. In the search process, similar time series data is obtained using a multidimensional index structure constructed by a dimensional compression method that satisfies the lower bounding condition. Search process results include some false positives. Therefore, the post process calculates the distance between time series data before dimension compression for the search process result, and removes false positives.

なお、ここで示した類似時系列データの計算方法は蓄積された時系列データが対象であったが、逐次流入してくる時系列データを対象にした計算方法としてStat Stream(非特許文献6)が挙げられる。Stat Streamで用いる多次元インデクス構造はgrid structureである。grid structureはR*-tree等と比較して高速に構築できる特徴がある。なおStat StreamではGEMINIにおけるpost processを行わないため結果に多少のfalse positiveが含まれる。
R.Agrawl, C.Faloutsos, and A.N.Swami. Efficient Similarity Search In Sequence Databases. In Proc. FODO, 1993 N.Beckmann, H.P.Kriegel, R.Schneider, B.Seeger. The R*-tree: An Efficient and Robust Access Method for Points and Rectangles. In Proc. SIGMOD, 1990 片山紀生,佐藤真、SR-tree:高次元点データに対する最近接検索のためのインデックス構造の提案、電子情報通信学会論文誌、1997 K.Chan, A.W.Fu. Efficient Time Series Matching by Wavelets. In Proc. ICDE, 1999 F.Korn, H.V.Jagadish, C.Faloutsos. Efficient Supporting Ad Hoc Queries in Large Datasets of Time Sequences. In Proc. SIGMOD, 1997 Y.zhu, D.Shasha. StatStream: Statistical Monitoring of Thousands of Data Streams in Real Time. In Proc, VLDB, 2002
In addition, although the calculation method of the similar time series data shown here was the accumulated time series data, Stat Stream (Non-patent Document 6) is a calculation method for time series data that flows in sequentially. Is mentioned. The multidimensional index structure used in Stat Stream is a grid structure. The grid structure has a feature that it can be constructed at a higher speed than R * -tree or the like. Since Stat Stream does not perform post processing in GEMINI, the result includes some false positives.
R. Agrawl, C. Faloutsos, and ANSwami. Efficient Similarity Search In Sequence Databases. In Proc. FODO, 1993 N. Beckmann, HPKriegel, R. Schneider, B. Seeger. The R * -tree: An Efficient and Robust Access Method for Points and Rectangles. In Proc. SIGMOD, 1990 Norio Katayama, Makoto Sato, SR-tree: Proposal of index structure for nearest neighbor search for high-dimensional point data, IEICE Transactions, 1997 K. Chan, AWFu. Efficient Time Series Matching by Wavelets. In Proc. ICDE, 1999 F. Korn, HVJagadish, C. Faloutsos. Efficient Supporting Ad Hoc Queries in Large Datasets of Time Sequences. In Proc. SIGMOD, 1997 Y.zhu, D.Shasha.StatStream: Statistical Monitoring of Thousands of Data Streams in Real Time.In Proc, VLDB, 2002

post processは、search processの結果からfalse positiveを取り除くために行うが、問題点として計算コストが高いことが挙げられる。   The post process is performed to remove false positives from the search process results, but the problem is that the calculation cost is high.

post processの計算コストはm×n(「O(mn)」と称す。以下同じ)となる。ここで、mはsearch processにおいて類似候補とされた時系列データの組み合わせの数、nは時系列データが含むデータポイントの数である。計算コストがO(mn)となるのはsearch processにおいて類似候補とされた時系列データの組み合わせすべてに対して次元圧縮前の距離を計算するためである。   The calculation cost of the post process is m × n (referred to as “O (mn)”, the same applies hereinafter). Here, m is the number of combinations of time series data determined as similar candidates in the search process, and n is the number of data points included in the time series data. The reason why the calculation cost is O (mn) is to calculate the distance before dimension compression for all combinations of time series data determined as similar candidates in the search process.

多くの長い時系列データの類似性を調べようとするとpost processにおける計算コストは高くなる。類似しているかを計算する時系列データの数が多くなるとmは結果的に大きな値となり、また類似しているかを計算する時系列データが長くなるとnは大きな値になるからである。   If you try to examine the similarity of many long time series data, the calculation cost in post process will be high. This is because m increases as a result when the number of time-series data for calculating similarity is increased, and n increases as the time-series data for calculation of similarity is increased.

本発明は、上記に鑑みてなされたものであり、その課題とするところは、類似している時系列データを算出する際の計算コストを低く抑えることにある。   The present invention has been made in view of the above, and an object of the present invention is to keep the calculation cost low when calculating similar time-series data.

第1の本発明に係る類似時系列データ計算装置は、時系列データを受信して第1メモリに記憶させる受信手段と、第1メモリから読み出された時系列データについて、多次元インデクス構造を用いて類似判定の対象を絞り込んで第2メモリに記憶させる絞込手段と、第2メモリから読み出された時系列データを次元圧縮して第3メモリに記憶させる次元圧縮手段と、第3メモリから読み出された次元圧縮後の時系列データ間の距離を計算して第4メモリに記憶させる次元圧縮後距離計算手段と、第4メモリから読み出された距離が所定の閾値以下の場合に類似と判定する第1判定手段と、を有することを特徴とする。   A similar time-series data calculation apparatus according to the first aspect of the present invention includes a receiving means for receiving time-series data and storing it in a first memory, and a multi-dimensional index structure for the time-series data read from the first memory. Narrowing means for narrowing down the target of similarity determination and storing it in the second memory, dimension compressing means for dimensionally compressing the time series data read from the second memory and storing it in the third memory, and a third memory Dimensional compression distance calculation means for calculating the distance between the time-series data after dimension compression read out from the memory and storing it in the fourth memory, and when the distance read from the fourth memory is equal to or less than a predetermined threshold First determination means for determining similarity.

本発明にあっては、多次元インデクス構造を用いて絞り込まれた時系列データを次元圧縮し、次元圧縮後の時系列データ間の距離が所定の閾値以下の場合に類似と判定することで、次元圧縮後の時系列データを用いて類似判断するので、計算コストを低く抑えることができる。   In the present invention, the time series data narrowed down using the multidimensional index structure is dimensionally compressed, and when the distance between the time series data after the dimension compression is equal to or less than a predetermined threshold, it is determined that they are similar. Since similarity determination is performed using time-series data after dimension compression, the calculation cost can be kept low.

本類似時系列データ計算装置において、前記次元圧縮手段は、次元圧縮前の時系列データ間の距離が次元圧縮後の距離以下となるように次元圧縮することを特徴とする。   In the similar time-series data calculation apparatus, the dimension compression means performs dimension compression so that a distance between time-series data before dimension compression is equal to or less than a distance after dimension compression.

本発明にあっては、次元圧縮前の時系列データ間の距離が次元圧縮後の距離以下となるように次元圧縮することで、upper bounding conditionを満たす次元圧縮を行うことになるので、全て正しい類似判断の結果を得ることができる。   In the present invention, dimensional compression that satisfies the upper bounding condition is performed by performing dimensional compression so that the distance between time-series data before dimensional compression is equal to or less than the distance after dimensional compression. The result of similarity determination can be obtained.

本類似時系列データ計算装置は、さらに第4メモリから読み出された距離が前記閾値よりも大きい場合に、第2メモリから読み出された次元圧縮前の時系列データ間の距離を計算して第5メモリに記憶させる次元圧縮前距離計算手段と、第5メモリから読み出された距離が所定の閾値以下の場合に類似と判定する第2判定手段と、を有することを特徴とする。   The similar time-series data calculation device further calculates a distance between time-series data before dimension compression read from the second memory when the distance read from the fourth memory is larger than the threshold. And a second pre-dimension distance calculation unit to be stored in the fifth memory, and a second determination unit that determines that the distance is similar when the distance read from the fifth memory is equal to or smaller than a predetermined threshold.

本発明にあっては、次元圧縮後の時系列データを用いた類似判断が難しい場合に、次元圧縮前の時系列データを用いて類似判断を行うことで、全て正しくかつ見過ごしのない類似判断の結果を得ることができる。   In the present invention, when similarity determination using time-series data after dimension compression is difficult, similarity determination using time-series data before dimension compression is performed correctly, so that all similarity determinations are correct and not overlooked. The result can be obtained.

本類似時系列データ計算装置において、前記次元圧縮手段は、第2メモリから読み出された時系列データを一定のフレームで分割したときの時系列データのレンジをフレーム毎に計算して第6メモリに記憶させるレンジ計算手段と、第2メモリから読み出された時系列データを一定のフレームで分割したときのレンジの中央を示すミッド・レンジをフレーム毎に計算して第7メモリに記憶させるミッド・レンジ計算手段と、を有し、前記レンジと前記ミッド・レンジをもって次元圧縮の結果とすることを特徴とする。   In the similar time-series data calculation apparatus, the dimension compression unit calculates a range of time-series data when the time-series data read from the second memory is divided into fixed frames for each frame, and calculates a sixth memory. A range calculation means for storing in the memory, and a mid range for calculating the mid range indicating the center of the range when the time-series data read from the second memory is divided into fixed frames for each frame and storing it in the seventh memory A range calculation means, wherein the range and the mid range are used as a result of dimensional compression.

本発明にあっては、フレーム毎にレンジとミッド・レンジを計算することで、次元圧縮を実現している。   In the present invention, dimensional compression is realized by calculating a range and a mid range for each frame.

本類似時系列データ計算装置において、前記次元圧縮手段は、前記レンジ計算手段により計算されたレンジおよび前記ミッド・レンジ計算手段により計算されたミッドレンジを保存しておく保存手段と、現在のフレームについて次元圧縮する際に、前のフレームで用いたレンジおよびミッド・レンジの使用だけで済むか否かの可否を判断する計算判断手段と、前記計算判断手段が可と判断した場合に、保存手段から前のフレームのレンジおよびミッド・レンジを読み出してこれらを用いて次元圧縮し、前記計算判断手段が否と判断した場合に、保存手段から現在のフレームについて前記レンジ計算手段が計算したレンジおよび前記ミッド・レンジ計算手段が計算したミッド・レンジを読み出してこれらを用いて次元圧縮する逐次計算手段と、を有することを特徴とする。   In the similar time series data calculation apparatus, the dimension compression means includes a storage means for storing the range calculated by the range calculation means and the mid range calculated by the mid range calculation means, and a current frame. When the dimension compression is performed, a calculation determination unit that determines whether or not only the use of the range and the mid range used in the previous frame may be used, and when the calculation determination unit determines that it is possible, from the storage unit When the range and mid range of the previous frame are read out and dimension-compressed using these, and the calculation determining means determines NO, the range and the mid calculated by the range calculating means for the current frame from the storage means A sequential calculation means that reads out the mid range calculated by the range calculation means and uses these to perform dimension compression; Characterized in that it has.

本発明にあっては、前のフレームで使用したレンジおよびミッド・レンジを現在のフレームにおける次元圧縮にも利用することで、同じレンジおよびミッド・レンジを繰り返し計算することがないので、計算コストを更に低く抑えることができる。   In the present invention, since the same range and mid range are not repeatedly calculated by using the range and mid range used in the previous frame for dimension compression in the current frame, the calculation cost is reduced. Further, it can be kept low.

第2の本発明に係る類似時系列データ計算方法は、受信手段により時系列データを受信して第1メモリに記憶させるステップと、絞込手段により第1メモリから読み出された時系列データについて多次元インデクス構造を用いて類似判定の対象を絞り込むステップと、次元圧縮手段により第2メモリから読み出された時系列データを次元圧縮して第3メモリに記憶させるステップと、次元圧縮後距離計算手段により第3メモリから読み出された次元圧縮後の時系列データ間の距離を計算して第4メモリに記憶させるステップと、第1判定手段により第4メモリから読み出された距離が所定の閾値以下の場合に類似と判定するステップと、を有することを特徴とする。   The similar time-series data calculation method according to the second aspect of the present invention includes a step of receiving time-series data by a receiving unit and storing it in a first memory, and a time-series data read from the first memory by a narrowing-down unit A step of narrowing down the object of similarity determination using a multi-dimensional index structure, a step of dimensionally compressing time-series data read from the second memory by the dimensional compression means and storing it in the third memory, and a distance calculation after dimensional compression Calculating the distance between the time-series data after dimension compression read from the third memory by the means and storing the distance in the fourth memory; and the distance read from the fourth memory by the first determination means is a predetermined distance And a step of determining that they are similar when the value is equal to or less than a threshold value.

第3の本発明に係る本類似時系列データ計算プログラムは、計算機に対して、時系列データを受信して第1メモリに記憶させるステップと、第1メモリから読み出された時系列データについて多次元インデクス構造を用いて類似判定の対象を絞り込むステップと、第2メモリから読み出された時系列データを次元圧縮して第3メモリに記憶させるステップと、第3メモリから読み出された次元圧縮後の時系列データ間の距離を計算して第4メモリに記憶させるステップと、第4メモリから読み出された距離が所定の閾値以下の場合に類似と判定するステップと、を実行させることを特徴とする。   The similar time-series data calculation program according to the third aspect of the present invention includes a step of causing a computer to receive time-series data and store it in the first memory, and a time-series data read from the first memory. The step of narrowing down the target of similarity determination using the dimensional index structure, the step of dimensionally compressing the time series data read from the second memory and storing it in the third memory, and the dimensional compression read from the third memory Calculating a distance between subsequent time series data and storing it in the fourth memory; and determining a similarity when the distance read from the fourth memory is equal to or smaller than a predetermined threshold. Features.

本発明によれば、類似している時系列データを算出する際の計算コストを低く抑えることができる。   According to the present invention, it is possible to reduce the calculation cost when calculating similar time-series data.

以下、本発明の実施形態について図面を用いて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1に示すように、本実施形態における類似時系列データ計算装置1は、データ受信部2、絞込部3、類似判断部4、計算結果送信部5を有する。   As shown in FIG. 1, the similar time series data calculation apparatus 1 in the present embodiment includes a data reception unit 2, a narrowing unit 3, a similarity determination unit 4, and a calculation result transmission unit 5.

データ受信部2は、外部のセンサなどから時系列データを受信して、内蔵の第1メモリに記憶させる。絞込部3は、第1メモリから時系列データを読み出し、多次元インデクス構造などを用いて類似する時系列データの絞込みを行い、内蔵の第2メモリに記憶させる。この絞込部3の処理は、従来技術のsearch processに相当するものとしてもよい。類似判断部4は、絞込部3で絞り込まれた時系列データを精査し、類似する時系列データを正確に判断する。計算結果送信部5は、類似する時系列データの組み合わせを外部へ送信する。これらの各部の処理は、類似時系列データ計算装置にインストールされたプログラムによって実行される。   The data receiving unit 2 receives time-series data from an external sensor or the like and stores it in a built-in first memory. The narrowing-down unit 3 reads time-series data from the first memory, narrows down similar time-series data using a multidimensional index structure or the like, and stores it in the built-in second memory. The processing of the narrowing-down unit 3 may be equivalent to a conventional search process. The similarity determining unit 4 examines the time series data narrowed down by the narrowing down unit 3 and accurately determines similar time series data. The calculation result transmission unit 5 transmits a combination of similar time series data to the outside. The processing of these units is executed by a program installed in the similar time series data calculation device.

図2に示すように、類似判断部4は、データ受信部11、次元圧縮部12、第1距離計算部13、第2距離計算部14、計算結果送信部15を有する。これら各部の処理は、プログラムによって実行される。   As illustrated in FIG. 2, the similarity determination unit 4 includes a data reception unit 11, a dimension compression unit 12, a first distance calculation unit 13, a second distance calculation unit 14, and a calculation result transmission unit 15. The processing of these units is executed by a program.

データ受信部11は、絞込部3により第2メモリから読み出された時系列データの組み合わせを受信するとともに、データ受信部2により第1メモリから読み出された次元圧縮前の時系列データを受信する。   The data receiving unit 11 receives the combination of time series data read from the second memory by the narrowing down unit 3 and the time series data before dimension compression read from the first memory by the data receiving unit 2. Receive.

次元圧縮部12は、絞込部3から受信した時系列データを次元圧縮して内蔵の第3メモリに記憶させる。   The dimension compression unit 12 dimensionally compresses the time series data received from the narrowing-down unit 3 and stores it in the third memory built therein.

第1距離計算部13では、後述するように次元圧縮後距離計算部により、次元圧縮後の時系列データを第3メモリから読み出し、この時系列データ間の距離を計算して第4メモリに記憶させる。詳細な処理については後述する。   In the first distance calculation unit 13, as will be described later, the dimension-compressed distance calculation unit reads the time-series data after dimension compression from the third memory, calculates the distance between the time-series data, and stores it in the fourth memory. Let Detailed processing will be described later.

第2距離計算部14では、後述するように次元圧縮前距離計算部により、第2メモリから読み出された次元圧縮前の時系列データ間の距離を計算して内蔵の第5メモリに格納する。詳細な処理については後述する。   In the second distance calculation unit 14, the distance between time series data before dimension compression read from the second memory is calculated by the distance calculation unit before dimension compression and stored in the built-in fifth memory, as will be described later. . Detailed processing will be described later.

計算結果送信部15は、第1距離計算部13、第2距離計算14により類似と判定された時系列データの組み合わせを出力する。   The calculation result transmission unit 15 outputs a combination of time series data determined to be similar by the first distance calculation unit 13 and the second distance calculation 14.

図3に示すように、次元圧縮部12は、データ受信部21、計算判断部22、レンジ計算部23、ミッド・レンジ計算部24、保存部25、逐次計算部26、データ送信部27を有する。各部の処理は、プログラムによって実行される。   As illustrated in FIG. 3, the dimension compression unit 12 includes a data reception unit 21, a calculation determination unit 22, a range calculation unit 23, a mid range calculation unit 24, a storage unit 25, a sequential calculation unit 26, and a data transmission unit 27. . The processing of each part is executed by a program.

データ受信部21は、第2メモリから読み出された次元圧縮前の時系列データをデータ受信部11から受け取る。   The data receiving unit 21 receives time-series data before dimension compression read from the second memory from the data receiving unit 11.

レンジ計算部23は、時系列データを一定のフレームで分割したときの時系列データのレンジをフレーム毎に計算して内蔵の第6メモリに記憶させる。レンジとは、データ値の範囲をいう。   The range calculation unit 23 calculates the range of the time series data when the time series data is divided into fixed frames for each frame, and stores it in the built-in sixth memory. Range refers to the range of data values.

ミッド・レンジ計算部24は、時系列データを一定のフレームで分割したときのレンジの中心を示すミッド・レンジをフレーム毎に計算して内蔵の第7メモリに記憶させる。次元圧縮とは、フレーム毎にレンジおよびミッド・レンジを計算することをいう。   The mid range calculation unit 24 calculates a mid range indicating the center of the range when the time-series data is divided into fixed frames for each frame, and stores it in the built-in seventh memory. Dimensional compression refers to calculating the range and mid range for each frame.

保存部25は、レンジ計算部23により計算されたレンジ、ミッド・レンジ計算部24により計算されたミッド・レンジを保存する。   The storage unit 25 stores the range calculated by the range calculation unit 23 and the mid range calculated by the mid range calculation unit 24.

計算判断部22は、現在のフレームについて次元圧縮する際に、前のフレームで用いたレンジおよびミッド・レンジを使用するだけで済むか否かの可否を判断する。   The calculation determining unit 22 determines whether or not it is sufficient to use only the range and mid range used in the previous frame when performing dimension compression on the current frame.

逐次計算部26は、計算判断部22が可と判断した場合に、保存部25から前のフレームのレンジおよびミッド・レンジを読み出し、これらを新たなレンジ、ミッド・レンジとすることで次元圧縮の結果とする。また、計算判断部22が否と判断した場合には、現在のフレームについてレンジ計算部23が計算したレンジおよびミッド・レンジ計算部24が計算したミッド・レンジをもって次元圧縮の結果とする。このようにして次元圧縮の計算を逐次的に行う。逐次計算部26は、レンジとミッド・レンジで次元圧縮された時系列データを第3メモリに記憶する。   When the calculation determining unit 22 determines that the calculation is possible, the sequential calculation unit 26 reads the range and mid range of the previous frame from the storage unit 25, and uses these as a new range and mid range to perform dimension compression. As a result. If the calculation determining unit 22 determines NO, the range calculated by the range calculating unit 23 for the current frame and the mid range calculated by the mid range calculating unit 24 are used as the result of dimensional compression. In this way, the calculation of dimensional compression is performed sequentially. The sequential calculation unit 26 stores the time series data dimensionally compressed in the range and the mid range in the third memory.

データ送信部27は、第3メモリから次元圧縮後の時系列データを読み出して出力する。   The data transmission unit 27 reads out the time-series data after dimension compression from the third memory and outputs it.

図4に示すように、第1距離計算部13は、データ受信部31、次元圧縮後距離計算部32、第1判定部33、データ送信部34を有する。各部の処理は、プログラムで実行される。   As shown in FIG. 4, the first distance calculation unit 13 includes a data reception unit 31, a post-dimensional compression distance calculation unit 32, a first determination unit 33, and a data transmission unit 34. The processing of each part is executed by a program.

データ受信部31は、第3メモリから読み出された次元圧縮後の時系列データを受け取る。   The data receiving unit 31 receives time-series data after dimension compression read from the third memory.

次元圧縮後距離計算部32は、次元圧縮後の時系列データ間の距離を計算して内蔵の第4メモリに記憶させる。   The post-dimensional compression distance calculation unit 32 calculates the distance between the time series data after the dimensional compression and stores it in the built-in fourth memory.

第1判定部33は、第4メモリから距離を読み出すとともに別のメモリから所定の閾値を読み出し、この距離が閾値以下の場合に類似と判定する。   The first determination unit 33 reads the distance from the fourth memory and reads a predetermined threshold value from another memory, and determines that the distance is similar when the distance is equal to or smaller than the threshold value.

データ送信部34は、類似と判定された時系列データの組み合わせを計算結果送信部15に出力するとともに、距離が閾値よりも大きい時系列データの組み合わせを第2距離計算部14に出力する。   The data transmission unit 34 outputs a combination of time series data determined to be similar to the calculation result transmission unit 15, and outputs a combination of time series data whose distance is greater than the threshold to the second distance calculation unit 14.

図5に示すように、第2距離計算部14は、データ受信部41、次元圧縮前距離計算部42、第2判定部43、データ送信部44を有する。各部の処理は、プログラムによって実行される。   As illustrated in FIG. 5, the second distance calculation unit 14 includes a data reception unit 41, a pre-dimensional compression distance calculation unit 42, a second determination unit 43, and a data transmission unit 44. The processing of each part is executed by a program.

データ受信部41は、第1距離計算部13から距離を計算すべき時系列データの組み合わせを受信するとともに、第2メモリから読み出された次元圧縮前の時系列データをデータ受信部11から受信する。   The data receiving unit 41 receives a combination of time-series data whose distance is to be calculated from the first distance calculating unit 13 and receives time-series data before dimension compression read from the second memory from the data receiving unit 11. To do.

次元圧縮前距離計算部42は、受信した組み合わせについての次元圧縮前の時系列データ間の距離を計算して第5メモリに記憶させる。この距離は、例えばユークリッド距離とする。   The dimension pre-compression distance calculation unit 42 calculates the distance between the time-series data before dimension compression for the received combination and stores it in the fifth memory. This distance is, for example, the Euclidean distance.

第2判定部43は、第5メモリから距離を読み出すとともに、別のメモリから所定の閾値を読み出し、この距離が閾値以下の場合に類似と判定する。   The second determination unit 43 reads the distance from the fifth memory, reads a predetermined threshold value from another memory, and determines that the distance is similar when the distance is equal to or smaller than the threshold value.

データ送信部44は、類似と判断された時系列データの組み合わせを出力する。   The data transmission unit 44 outputs a combination of time series data determined to be similar.

次に、次元圧縮部12での処理について詳細に説明する。まず、次元圧縮部12で用いる次元圧縮手法が満たされなければならない条件upper bounding conditionについて説明する。   Next, the process in the dimension compression part 12 is demonstrated in detail. First, the upper bounding condition that the dimensional compression method used in the dimensional compression unit 12 must be satisfied will be described.

絞込部3が、類似していない時系列データを求め、これを除外することで絞り込みを行うのに対して、次元圧縮部12は類似している時系列データを求める。次元圧縮後距離計算部32が次元圧縮後の距離を用いて類似する時系列データを求めてもfalse positiveが発生しないことを保証する補助定理として新たにupper bounding lemmaを導入する。   While the narrowing-down unit 3 obtains time series data that is not similar and excludes the time series data, the dimension compression unit 12 obtains time series data that is similar. An upper bounding lemma is newly introduced as an auxiliary theorem that guarantees that no false positive will occur even if the distance calculation unit 32 after dimension compression obtains similar time-series data using the distance after dimension compression.

upper bounding lemmaは、次式(upper bounding condition)が成立すればfalse positiveが発生しないという定理である。

Figure 0004275084
The upper bounding lemma is a theorem that false positives will not occur if the following expression (upper bounding condition) holds.
Figure 0004275084

upper bounding lemmaは以下のように証明できる。upper bounding lemmaにおいてfalse positiveが発生しないことを保証するためには、Dreal(S,S′)>εであれば次式が成り立つ必要がある。

Figure 0004275084
The upper bounding lemma can be proved as follows. In order to guarantee that no false positive occurs in the upper bounding lemma, the following equation must be satisfied if Dreal (S, S ′)> ε.
Figure 0004275084

ここでupper bounding conditionより次式が成り立つ。

Figure 0004275084
Here, the following equation holds from the upper bounding condition.
Figure 0004275084

このようにupper bounding lemmaは証明できる。よって、false positiveの発生を防ぐためには、次元圧縮部12で用いる次元圧縮手法がupper bounding conditionを満たしていなければならない。このことから、次元圧縮部12は、次元圧縮前の時系列データ間の距離が次元圧縮後の時系列データ間の距離以下となるように次元圧縮する。   In this way, upper bounding lemma can be proved. Therefore, in order to prevent the occurrence of false positives, the dimensional compression method used in the dimensional compression unit 12 must satisfy the upper bounding condition. Therefore, the dimension compression unit 12 performs dimension compression so that the distance between time series data before dimension compression is equal to or less than the distance between time series data after dimension compression.

次に、次元圧縮部12で用いる次元圧縮手法PRA(Piecewise Range Approximation)について説明する。   Next, a dimension compression method PRA (Piecewise Range Approximation) used in the dimension compression unit 12 will be described.

図7に示すように、PRAではnデータポイントを有する時系列データをN個の等しいサイズのフレーム(データポイント)に分割し、各フレームのレンジとミッド・レンジを次元圧縮の結果とする。レンジはフレーム内に存在するデータ値の範囲であり、ミッド・レンジはレンジの中心値である。PRAにおける距離は、各フレームにおける時系列データ間の最も遠い最大値と最小値の差を用いて計算される。   As shown in FIG. 7, in PRA, time-series data having n data points is divided into N equal-sized frames (data points), and the range and mid range of each frame are the result of dimensional compression. The range is the range of data values present in the frame, and the mid range is the center value of the range. The distance in the PRA is calculated using the difference between the farthest maximum value and the minimum value between the time series data in each frame.

次元圧縮後の時系列データは、次式のように計数のタプルとなる。

Figure 0004275084
The time-series data after the dimension compression becomes a counting tuple as shown in the following equation.
Figure 0004275084

ここで、j番目の係数のrsjは、j番目のフレームのレンジであり、レンジ計算部23により次のように計算される。

Figure 0004275084
Here, r sj of the j-th coefficient is the range of the j-th frame, and is calculated by the range calculation unit 23 as follows.
Figure 0004275084

ここでmaxsjはフレームにおける最大値を、minsjはフレームにおける最小値を表している。 Here, max sj represents the maximum value in the frame, and min sj represents the minimum value in the frame.

また、j番目の係数のmsjは、j番目のフレームのミッド・レンジであり、ミッド・レンジ計算部24により次のように計算される。

Figure 0004275084
Further, the j th coefficient m sj is the mid range of the j th frame, and is calculated by the mid range calculation unit 24 as follows.
Figure 0004275084

次に計算コストについて説明する。   Next, the calculation cost will be described.

Subsequence MatchingにおいてPRAによる次元圧縮計算コストは、一度計算したレンジ、ミッド・レンジを繰り返し使用しない場合には、O(ln)となる。これはl個の窓に対してN回レンジとミッド・レンジを求めるときの時系列データの長さがn/Nだからである。   In Subsequence Matching, the cost of dimension compression calculation by PRA is O (ln) when the range once calculated and the mid range are not used repeatedly. This is because the length of the time-series data when obtaining N ranges and mid ranges for 1 window is n / N.

これに対し、レンジ、ミッド・レンジを繰り返し使用する場合には、計算コストをO((lN−h)n/N+h)と低くすることができる。ここで、hは一度算出したレンジ、ミッド・レンジを使用して次元圧縮を計算できる回数である。計算コストがこのようになるのは、l個の窓に対してN回のレンジとミッド・レンジを求める総数l・N回の計算において、レンジ、ミッド・レンジを繰り返し使用できない場合は計算コストがn/Nであるのに対して、繰り返し使用できる場合は計算コストがlであるからである。このような計算ができるのは、窓を逐次的に重ねていくので、フレームの最大値と最小値も逐次的に変化するためである。以下では、この点について説明するため、計算判断部22、逐次計算部26での処理について詳細に説明する。   On the other hand, when the range and the mid range are repeatedly used, the calculation cost can be reduced to O ((1N−h) n / N + h). Here, h is the number of times the dimensional compression can be calculated using the once calculated range and mid range. The calculation cost is such that the calculation cost is lower when the range and the mid range cannot be used repeatedly in the calculation of the total number of l · N times for obtaining N ranges and mid ranges for one window. This is because the calculation cost is 1 when it can be used repeatedly while it is n / N. Such calculation can be performed because the maximum and minimum values of the frame change sequentially because the windows are sequentially overlapped. In the following, in order to explain this point, processing in the calculation determination unit 22 and the sequential calculation unit 26 will be described in detail.

窓を逐次的に重ねていく場合、フレームにおける最大値を以下のように更新する。なおここでは、rk・sjをk番目の窓のj番目のレンジとし、mk・sjをk番目の窓のj番目のミッド・レンジとし、maxk・sjをk番目の窓のj番目のフレームの最大値とし、mink・sjをk番目の窓のj番目のフレームの最小値とする。

Figure 0004275084
When the windows are sequentially overlapped, the maximum value in the frame is updated as follows. Here, rk · sj is the jth range of the kth window , mk · sj is the jth mid range of the kth window, and max k · sj is the jth range of the kth window. And min k · sj is the minimum value of the jth frame of the kth window.
Figure 0004275084

i−i)は、図8に示すように、フレームに入る時系列データが1つ前のフレームの最大値より大きくなる場合に、フレームに入る時系列データを新しい最大値とすることを表している。   As shown in FIG. 8, ii) represents that when the time-series data entering the frame becomes larger than the maximum value of the previous frame, the time-series data entering the frame is set as a new maximum value. Yes.

i−ii)は、図9に示すように、フレームから出る時系列データがフレームの最大値での場合に、フレームから出る時系列データにより最大値は小さくなるため、新たにフレームの最大値を求めることを表している。   As shown in FIG. 9, when the time-series data output from the frame is the maximum value of the frame, i-ii) reduces the maximum value due to the time-series data output from the frame. Indicates what you want.

i−iii)は、図10に示すように、フレームにおける最大値が変化しない場合に、1つ前のフレームの計算結果を利用して最大値を計算することを表している。   As shown in FIG. 10, i-iii) indicates that the maximum value is calculated using the calculation result of the previous frame when the maximum value in the frame does not change.

また、フレームにおける最小値を以下のように更新する。

Figure 0004275084
Also, the minimum value in the frame is updated as follows.
Figure 0004275084

ii−i)は、図11に示すように、フレームに入る時系列データが1つ前のフレームの最小値より小さい場合に、フレームに入る時系列データを新しい最小値とすることを表している。   As shown in FIG. 11, ii-i) represents that when the time series data entering the frame is smaller than the minimum value of the previous frame, the time series data entering the frame is set as a new minimum value. .

ii−ii)は、図12に示すように、フレームから出る時系列データがフレームの最小値の場合に、フレームから出る時系列データにより最小値は大きくなるため、新たにフレームの最小値を求めることを表している。   In ii-ii), as shown in FIG. 12, when the time-series data output from the frame is the minimum value of the frame, the minimum value increases due to the time-series data output from the frame. Represents that.

ii−iii)は、図10に示すように、フレームにおける最小値が変化しない場合に、1つ前のフレームの計算結果を利用して最小値を計算することを表している。   As shown in FIG. 10, ii-iii) indicates that the minimum value is calculated using the calculation result of the previous frame when the minimum value in the frame does not change.

次元圧縮を行う際に、i−ii)またはii−ii)の条件に当てはまらなければ、既に計算したレンジ、ミッド・レンジを利用することができる。   When the dimension compression is performed, if the condition of i-ii) or ii-ii) is not satisfied, the already calculated range or mid range can be used.

次に、次元圧縮後距離計算部32における次元圧縮後の時系列データ間の距離の計算方法について説明する。   Next, a method for calculating the distance between time series data after dimension compression in the dimension compression distance calculation unit 32 will be described.

PRAで次元圧縮した後の時系列データ間の距離を以下のように定める。

Figure 0004275084
The distance between time series data after dimension compression with PRA is determined as follows.
Figure 0004275084

ここで定めた距離がupper bounding conditionを満たすことを以下説明する。   It will be described below that the distance determined here satisfies the upper bounding condition.

ユークリッド距離は次のように書き換えることができる。

Figure 0004275084
The Euclidean distance can be rewritten as follows.
Figure 0004275084

ここで次式のようになる。

Figure 0004275084
Here, the following equation is obtained.
Figure 0004275084

ユークリッド距離においては三角不等式が成り立つため、D(sj k,s′j k)は以下のようになる。

Figure 0004275084
Since the triangular inequality holds in the Euclidean distance, D (s j k , s ′ j k ) is as follows.
Figure 0004275084

よって、次式のようになる。

Figure 0004275084
Therefore, the following equation is obtained.
Figure 0004275084

上記の式により、PRAがupper bounding conditionを満たすことがわかる。   From the above equation, it can be seen that PRA satisfies the upper bounding condition.

したがって、本実施の形態によれば、多次元インデクス構造を用いて絞り込まれた時系列データを次元圧縮し、次元圧縮後の時系列データ間の距離が所定の閾値以下の場合に類似と判定することで、次元圧縮後の時系列データを用いて類似判断するので、計算コストを低く抑えることができる。   Therefore, according to the present embodiment, the time-series data narrowed down using the multi-dimensional index structure is dimensionally compressed, and it is determined that they are similar when the distance between the time-series data after the dimension compression is equal to or smaller than a predetermined threshold. Thus, since the similarity determination is performed using the time-series data after dimension compression, the calculation cost can be kept low.

本実施の形態によれば、次元圧縮前の時系列データ間の距離が次元圧縮後の距離以下となるように次元圧縮することで、upper bounding conditionを満たす次元圧縮を行うことになるので、全て正しい類似判断の結果を得ることができる。   According to the present embodiment, dimensional compression that satisfies the upper bounding condition is performed by performing dimensional compression so that the distance between time-series data before dimensional compression is equal to or less than the distance after dimensional compression. A correct similarity determination result can be obtained.

本実施の形態によれば、次元圧縮後の時系列データを用いた類似判断が難しい場合に、次元圧縮前の時系列データを用いて類似判断を行うことで、全て正しくかつ見過ごしのない類似判断の結果を得ることができる。   According to the present embodiment, when it is difficult to make a similarity determination using time-series data after dimension compression, similarity determination using the time-series data before dimension compression is all correct and not overlooked. Result can be obtained.

本実施の形態によれば、前のフレームで使用したレンジおよびミッド・レンジを現在のフレームにおける次元圧縮にも利用することで、同じレンジおよびミッド・レンジを繰り返し計算することがないので、計算コストを更に低く抑えることができる。   According to the present embodiment, since the same range and mid range are not repeatedly calculated by using the range and mid range used in the previous frame for dimension compression in the current frame, the calculation cost is reduced. Can be further reduced.

ここで、類似判断の精度および計算コストについて説明する。例えば、実施例1として、次元圧縮後距離計算部32で次元圧縮した後の時系列データを用いて距離を算出するものとし、次元圧縮部12でupper bounding conditionやlower bounding conditionを満たす必要がないものとする。この場合、例えば100個の類似時系列データがあった場合には、90個の正解と20個の不正解が求められる。計算コストは、従来のO(mn)からO(mN)に低くなる(∵N≪n)。   Here, the accuracy of the similarity determination and the calculation cost will be described. For example, in the first embodiment, the distance is calculated using time-series data after dimension compression by the dimension compression distance calculation unit 32, and the upper bounding condition and the lower bounding condition need not be satisfied by the dimension compression unit 12. Shall. In this case, for example, if there are 100 similar time series data, 90 correct answers and 20 incorrect answers are obtained. The calculation cost is reduced from the conventional O (mn) to O (mN) (∵N << n).

実施例2として、実施例1においてupper bounding conditionを満たす次元圧縮を行うものとする。この場合、類似と判断する計算の結果は全て正しいが、全ての類似した時系列データは求められない。例えば、100個の類似時系列データがあった場合、90個の正解と0個の不正解が得られる。計算コストは、従来のO(mn)からO(mN)に低くなる。   As Example 2, dimensional compression satisfying the upper bounding condition in Example 1 is performed. In this case, all of the calculation results that are determined to be similar are correct, but all similar time-series data cannot be obtained. For example, if there are 100 similar time series data, 90 correct answers and 0 incorrect answers are obtained. The calculation cost is reduced from the conventional O (mn) to O (mN).

実施例3として、実施例2において、類似判断が難しい場合に次元圧縮前の時系列データを用いて距離を算出するものとする。この場合、類似の判断は全て正しく、かつ類似データの見落としはない。例えば、100個の類似時系列データがあった場合、100個の正解と0個の不正解が求められる。計算コストは、従来のO(mn)からO(mN+(m−M)n)に低くなる。   As Example 3, when it is difficult to determine similarity in Example 2, the distance is calculated using time-series data before dimension compression. In this case, all similar determinations are correct and there is no oversight of similar data. For example, if there are 100 similar time series data, 100 correct answers and 0 incorrect answers are obtained. The calculation cost is reduced from the conventional O (mn) to O (mN + (m−M) n).

一実施の形態における類似時系列データ計算装置の構成を示すブロック図である。It is a block diagram which shows the structure of the similar time series data calculation apparatus in one embodiment. 上記類似時系列データ計算装置における類似判断部の構成を示すブロック図である。It is a block diagram which shows the structure of the similarity judgment part in the said similar time series data calculation apparatus. 上記類似判断部における次元圧縮部の構成を示すブロック図である。It is a block diagram which shows the structure of the dimension compression part in the said similarity determination part. 上記類似判断部における第1距離計算部の構成を示すブロック図である。It is a block diagram which shows the structure of the 1st distance calculation part in the said similarity determination part. 上記類似判断部における第2距離計算部の構成を示すブロック図である。It is a block diagram which shows the structure of the 2nd distance calculation part in the said similarity determination part. Subsequence MatchingをWhole Matchingに置き換えることができることを説明するための図である。It is a figure for demonstrating that Subsequence Matching can be substituted to Whole Matching. 次元圧縮を説明するための図である。It is a figure for demonstrating dimension compression. フレームに入る時系列データが最大値になる場合を説明するための図である。It is a figure for demonstrating the case where the time series data which enter a flame | frame become the maximum value. フレームから出る時系列データが最大値になる場合を説明するための図である。It is a figure for demonstrating the case where the time series data which come out of a frame become the maximum value. フレームにおける最大値が変化しない場合を説明するための図である。It is a figure for demonstrating the case where the maximum value in a frame does not change. フレームに入る時系列データが最小値になる場合を説明するための図である。It is a figure for demonstrating the case where the time series data which enter a flame | frame becomes the minimum value. フレームから出る時系列データが最小値になる場合を説明するための図である。It is a figure for demonstrating the case where the time series data which come out of a frame become the minimum value.

符号の説明Explanation of symbols

1…類似時系列データ計算装置
2…データ受信部,3…絞込部
4…類似判断部,5…計算結果送信部
11…データ受信部,12…次元圧縮部
13…第1距離計算部
14…第2距離計算部
15…計算結果送信部
21…データ受信部,22…計算判断部
23…レンジ計算部
24…ミッド・レンジ計算部
25…保存部,26…逐次計算部
27…データ送信部
31…データ受信部
32…次元圧縮後距離計算部
33…第1判定部
34…データ送信部,41…データ受信部
42…次元圧縮前距離計算部
43…第2判定部,44…データ送信部
DESCRIPTION OF SYMBOLS 1 ... Similar time series data calculation apparatus 2 ... Data receiving part, 3 ... Narrowing part 4 ... Similarity judgment part, 5 ... Calculation result transmission part 11 ... Data receiving part, 12 ... Dimension compression part 13 ... 1st distance calculation part 14 ... 2nd distance calculation part 15 ... Calculation result transmission part 21 ... Data reception part, 22 ... Calculation judgment part 23 ... Range calculation part 24 ... Mid range calculation part 25 ... Storage part, 26 ... Sequential calculation part 27 ... Data transmission part DESCRIPTION OF SYMBOLS 31 ... Data reception part 32 ... Dimension compression distance calculation part 33 ... 1st determination part 34 ... Data transmission part, 41 ... Data reception part 42 ... Dimension compression before distance calculation part 43 ... 2nd determination part, 44 ... Data transmission part

Claims (9)

同じ要素数nをもつn次元の2つの時系列データ間の距離によって類似性を判定する装置であって、
時系列データを受信して第1メモリに記憶させる受信手段と、
次元圧縮後の時系列データ組の距離が次元圧縮前の時系列データ組の距離以下となるように、時系列データの次元数を削減する第1の次元圧縮手法を用い、第1メモリから読み出された時系列データの次元圧縮後の時系列データ組の距離が閾値を超える時系列データ組を取り除き、類似判定の対象となる時系列データ組を第2メモリに記憶させる絞込手段と、
次元圧縮後の時系列データ組の距離が次元圧縮前の時系列データ組の距離以上となるように、時系列データの次元数を削減する第2の次元圧縮手法を用い、第2メモリから読み出された時系列データを次元圧縮して第3メモリに記憶させる次元圧縮手段と、
第3メモリから読み出された次元圧縮後の時系列データ間の距離を計算して第4メモリに記憶させる次元圧縮後距離計算手段と、
第4メモリから読み出された距離が前記閾値以下の場合に類似と判定する第1判定手段と、を有し、
前記次元圧縮手段は、第2メモリから読み出された時系列データを一定のフレームで分割したときの時系列データのレンジをフレーム毎に計算して第6メモリに記憶させるレンジ計算手段と、
前記レンジの中央を示すミッド・レンジをフレーム毎に計算して第7メモリに記憶させるミッド・レンジ計算手段と、を有し、
前記レンジと前記ミッド・レンジをもって次元圧縮の結果とすることを特徴とする類似時系列データ計算装置。
An apparatus for determining similarity based on a distance between two n-dimensional time-series data having the same number n of elements,
Receiving means for receiving time series data and storing it in the first memory;
Read from the first memory using the first dimension compression method that reduces the number of dimensions of the time series data so that the distance of the time series data set after dimension compression is less than or equal to the distance of the time series data set before dimension compression. Narrowing-down means for removing the time-series data set in which the distance of the time-series data set after dimension compression of the time-series data that has been issued exceeds a threshold and storing the time-series data set that is the target of similarity determination in the second memory;
Read from the second memory using the second dimension compression method that reduces the number of dimensions of the time series data so that the distance of the time series data set after dimension compression is equal to or greater than the distance of the time series data set before dimension compression. Dimensional compression means for dimensionally compressing the output time-series data and storing it in a third memory;
Dimensional compression distance calculation means for calculating a distance between time series data after dimension compression read from the third memory and storing the distance in the fourth memory;
Distance read from the fourth memory have a, a first judging means judges that similar to the case of equal to or smaller than the threshold value,
The dimension compression means calculates a range of time series data when the time series data read from the second memory is divided into fixed frames for each frame and stores the range in the sixth memory;
Mid-range calculating means for calculating a mid-range indicating the center of the range for each frame and storing it in a seventh memory;
A similar time-series data calculation device characterized in that the range and the mid range are used as a result of dimensional compression .
前記次元圧縮後距離計算手段は、次元圧縮後の時系列データ組みで対応する各フレームについて、2つのレンジの中間値と、2つのミッド・レンジの差の絶対値の和を求め、全フレームにわたる前記和の2乗総和に基づいて距離を計算することを特徴とする請求項1記載の類似時系列データ計算装置。The dimension-compressed distance calculation means obtains the sum of the intermediate value of the two ranges and the absolute value of the difference between the two mid-ranges for each frame corresponding to the time-series data set after the dimension compression, and covers all frames. The similar time series data calculation apparatus according to claim 1, wherein the distance is calculated based on a sum of squares of the sum. 第4メモリから読み出された距離が前記閾値よりも大きい場合に、第2メモリから読み出された次元圧縮前の時系列データ間の距離を計算して第5メモリに記憶させる次元圧縮前距離計算手段と、
第5メモリから読み出された距離が所定の閾値以下の場合に類似と判定する第2判定手段と、
を有することを特徴とする請求項1又は2記載の類似時系列データ計算装置。
When the distance read from the fourth memory is larger than the threshold value, the distance between time series data before dimension compression read from the second memory is calculated and stored in the fifth memory and stored in the fifth memory. A calculation means;
Second determination means for determining similarity when the distance read from the fifth memory is equal to or smaller than a predetermined threshold;
The similar time-series data calculation device according to claim 1, wherein
同じ要素数nをもつn次元の2つの時系列データ間の距離によって類似性を判定する方法であって、
受信手段により時系列データを受信して第1メモリに記憶させるステップと、
絞込手段により次元圧縮後の時系列データ組の距離が次元圧縮前の時系列データ組の距離以下となるように、時系列データの次元数を削減する第1の次元圧縮手法を用い、第1メモリから読み出された時系列データの次元圧縮後の時系列データ組の距離が閾値を超える時系列データ組を取り除き、類似判定の対象となる時系列データ組を第2メモリに記憶させるステップと、
次元圧縮手段により次元圧縮後の時系列データ組の距離が次元圧縮前の時系列データ組の距離以上となるように、時系列データの次元数を削減する第2の次元圧縮手法を用い、第2メモリから読み出された時系列データを次元圧縮して第3メモリに記憶させるステップと、
次元圧縮後距離計算手段により第3メモリから読み出された次元圧縮後の時系列データ間の距離を計算して第4メモリに記憶させるステップと、
第1判定手段により第4メモリから読み出された距離が前記閾値以下の場合に類似と判定するステップと、を有し、
前記次元圧縮手段によるステップでは、レンジ計算手段により、第2メモリから読み出された時系列データを一定のフレームで分割したときの時系列データのレンジをフレーム毎に計算して第6メモリに記憶させるステップと、
ミッドレンジ計算手段により、前記レンジの中央を示すミッド・レンジをフレーム毎に計算して第7メモリに記憶させるステップと、を有し、
前記レンジと前記ミッド・レンジをもって次元圧縮の結果とすることを特徴とする類似時系列データ計算方法。
A method for determining similarity based on a distance between two n-dimensional time-series data having the same number of elements n,
Receiving time-series data by a receiving means and storing it in a first memory;
The first dimensional compression method is used to reduce the number of dimensions of the time series data so that the distance of the time series data set after the dimension compression by the narrowing means is equal to or less than the distance of the time series data set before the dimension compression . Removing a time-series data set in which the distance of a time-series data set after dimension compression of time-series data read from one memory exceeds a threshold value, and storing a time-series data set to be subjected to similarity determination in a second memory When,
The second dimension compression method is used to reduce the number of dimensions of the time series data so that the distance of the time series data set after dimension compression by the dimension compression means is equal to or greater than the distance of the time series data set before dimension compression . Dimensionally compressing time-series data read from two memories and storing them in a third memory;
Calculating a distance between time-series data after dimension compression read from the third memory by a dimension-compressed distance calculating means and storing the distance in the fourth memory;
Distance read from the fourth memory by the first judging means to have a, determining that similar to the case of equal to or smaller than the threshold value,
In the step by the dimension compressing means, the range calculating means calculates the range of the time series data when the time series data read from the second memory is divided into fixed frames for each frame and stores it in the sixth memory. Step to
Calculating a mid range indicating the center of the range for each frame by a mid range calculating means and storing it in a seventh memory;
A similar time series data calculation method, wherein the range and the mid range are used as a result of dimension compression .
前記次元圧縮後距離計算手段によるステップでは、次元圧縮後の時系列データ組みで対応する各フレームについて、2つのレンジの中間値と、2つのミッド・レンジの差の絶対値の和を求め、全フレームにわたる前記和の2乗総和に基づいて距離を計算することを特徴とする請求項4記載の類似時系列データ計算方法。In the step by the distance compression means after the dimension compression, for each frame corresponding to the time series data set after the dimension compression, the sum of the absolute value of the difference between the two ranges and the difference between the two mid ranges is obtained, 5. The similar time series data calculation method according to claim 4, wherein the distance is calculated based on a sum of squares of the sum over the frames. 次元圧縮前距離計算手段により、第4メモリから読み出された距離が前記閾値よりも大きい場合に、第2メモリから読み出された次元圧縮前の時系列データ間の距離を計算して第5メモリに記憶させるステップと、
第2判定手段により、第5メモリから読み出された距離が所定の閾値以下の場合に類似と判定するステップと、
を有することを特徴とする請求項4又は5記載の類似時系列データ計算方法。
When the distance read from the fourth memory is larger than the threshold, the distance between the time series data before dimension compression read from the second memory is calculated by the distance calculation means before dimension compression, Storing in memory;
Determining by the second determination means that the distance read from the fifth memory is similar when the distance is equal to or smaller than a predetermined threshold;
The similar time series data calculation method according to claim 4, wherein:
同じ要素数nをもつn次元の2つの時系列データ間の距離によって類似性を判定する処理を計算機に実行させるプログラムあって、
計算機に対して、
時系列データを受信して第1メモリに記憶させるステップと、
次元圧縮後の時系列データ組の距離が次元圧縮前の時系列データ組の距離以下となるように、時系列データの次元数を削減する第1の次元圧縮手法を用い、第1メモリから読み出された時系列データの次元圧縮後の時系列データ組の距離が閾値を超える時系列データ組を取り除き、類似判定の対象となる時系列データ組を第2メモリに記憶させるステップと、
次元圧縮後の時系列データ組の距離が次元圧縮前の時系列データ組の距離以上となるように、時系列データの次元数を削減する第2の次元圧縮手法を用い、第2メモリから読み出された時系列データを次元圧縮して第3メモリに記憶させるステップと、
第3メモリから読み出された次元圧縮後の時系列データ間の距離を計算して第4メモリに記憶させるステップと、
第4メモリから読み出された距離が前記閾値以下の場合に類似と判定するステップと、を実行させ
前記第2の次元圧縮手法によるステップでは、第2メモリから読み出された時系列データを一定のフレームで分割したときの時系列データのレンジをフレーム毎に計算して第6メモリに記憶させるステップと、
前記レンジの中央を示すミッド・レンジをフレーム毎に計算して第7メモリに記憶させるステップと、を実行させ、
前記レンジと前記ミッド・レンジをもって次元圧縮の結果とすることを特徴とする類似時系列データ計算プログラム。
A program for causing a computer to execute a process of determining similarity based on a distance between two n-dimensional time-series data having the same number of elements n,
For the calculator
Receiving time series data and storing in a first memory;
Read from the first memory using the first dimension compression method that reduces the number of dimensions of the time series data so that the distance of the time series data set after dimension compression is less than or equal to the distance of the time series data set before dimension compression. Removing the time-series data sets in which the distance of the time-series data sets after the dimension compression of the issued time-series data exceeds a threshold and storing the time-series data sets to be subjected to similarity determination in the second memory ;
Read from the second memory using the second dimension compression method that reduces the number of dimensions of the time series data so that the distance of the time series data set after dimension compression is equal to or greater than the distance of the time series data set before dimension compression. Dimensionally compressing the time-series data that is output and storing it in a third memory;
Calculating a distance between time-series data after dimension compression read from the third memory and storing the distance in the fourth memory;
Determining that similar if the distance read from the fourth memory below the threshold, then the run,
In the step of the second dimension compression method, a step of calculating a range of the time series data when the time series data read from the second memory is divided into fixed frames for each frame and storing the range in the sixth memory. When,
Calculating a mid range indicating the center of the range for each frame and storing it in a seventh memory; and
A similar time series data calculation program characterized in that the range and the mid range are used as a result of dimension compression .
前記第2の次元圧縮手法により次元圧縮した後の時系列データ間の距離を計算するステップでは、次元圧縮後の時系列データ組みで対応する各フレームについて、2つのレンジの中間値と、2つのミッド・レンジの差の絶対値の和を求め、全フレームにわたる前記和の2乗総和に基づいて距離を計算することを特徴とする請求項7記載の類似時系列データ計算プログラム。In the step of calculating the distance between the time series data after dimension compression by the second dimension compression method, for each frame corresponding to the time series data set after dimension compression, an intermediate value between two ranges and two 8. The similar time series data calculation program according to claim 7, wherein a sum of absolute values of differences of mid ranges is obtained, and a distance is calculated based on a sum of squares of the sums over all frames. 第4メモリから読み出された距離が前記閾値よりも大きい場合に、第2メモリから読み出された次元圧縮前の時系列データ間の距離を計算して第5メモリに記憶させるステップと、
第5メモリから読み出された距離が所定の閾値以下の場合に類似と判定するステップと、
を実行させることを特徴とする請求項7又は8記載の類似時系列データ計算プログラム。
Calculating a distance between time-series data before dimension compression read from the second memory and storing it in the fifth memory when the distance read from the fourth memory is larger than the threshold;
Determining a similarity when the distance read from the fifth memory is less than or equal to a predetermined threshold;
The similar time series data calculation program according to claim 7 or 8 , characterized in that:
JP2005039734A 2005-02-16 2005-02-16 Similar time series data calculation device, similar time series data calculation method, and similar time series data calculation program Expired - Fee Related JP4275084B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005039734A JP4275084B2 (en) 2005-02-16 2005-02-16 Similar time series data calculation device, similar time series data calculation method, and similar time series data calculation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005039734A JP4275084B2 (en) 2005-02-16 2005-02-16 Similar time series data calculation device, similar time series data calculation method, and similar time series data calculation program

Publications (2)

Publication Number Publication Date
JP2006227835A JP2006227835A (en) 2006-08-31
JP4275084B2 true JP4275084B2 (en) 2009-06-10

Family

ID=36989182

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005039734A Expired - Fee Related JP4275084B2 (en) 2005-02-16 2005-02-16 Similar time series data calculation device, similar time series data calculation method, and similar time series data calculation program

Country Status (1)

Country Link
JP (1) JP4275084B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4954110B2 (en) * 2008-02-06 2012-06-13 三菱電機株式会社 Movement information similarity determination device
JP5632862B2 (en) * 2012-02-13 2014-11-26 日本電信電話株式会社 Data search device, data search method, and data search program
WO2016117086A1 (en) 2015-01-22 2016-07-28 三菱電機株式会社 Chronological data search device and chronological data search program
JP7131414B2 (en) * 2019-01-31 2022-09-06 日本電信電話株式会社 Evaluation device, evaluation method and program

Also Published As

Publication number Publication date
JP2006227835A (en) 2006-08-31

Similar Documents

Publication Publication Date Title
US8719267B2 (en) Spectral neighborhood blocking for entity resolution
US20030037073A1 (en) New differential LSI space-based probabilistic document classifier
US20100088295A1 (en) Co-location visual pattern mining for near-duplicate image retrieval
Assent et al. Anticipatory DTW for efficient similarity search in time series databases
Zhang et al. A new time series representation model and corresponding similarity measure for fast and accurate similarity detection
US20120084305A1 (en) Compiling method, compiling apparatus, and compiling program of image database used for object recognition
EP3893132A1 (en) Method and system for hierarchical time-series clustering with auto encoded compact sequence (aecs)
CN106649423A (en) Retrieval model calculation method based on content relevance
JP4275084B2 (en) Similar time series data calculation device, similar time series data calculation method, and similar time series data calculation program
US9223804B2 (en) Determining capacity of search structures
Bampis et al. High order visual words for structure-aware and viewpoint-invariant loop closure detection
CN110837555A (en) Method, equipment and storage medium for removing duplicate and screening of massive texts
US20020184193A1 (en) Method and system for performing a similarity search using a dissimilarity based indexing structure
US6718315B1 (en) System and method for approximating probabilities using a decision tree
Thuy et al. Efficient segmentation-based methods for anomaly detection in static and streaming time series under dynamic time warping
Sathe et al. Creating probabilistic databases from imprecise time-series data
Costa et al. Dealing with trajectory streams by clustering and mathematical transforms
Luo et al. A sampling approach for skyline query cardinality estimation
JP4673123B2 (en) Similar time series data calculation device, similar time series data calculation method, and similar time series data calculation program
Kriegel et al. Generalizing the optimality of multi-step k-nearest neighbor query processing
Tatti Distances between Data Sets Based on Summary Statistics.
JP4451332B2 (en) Similar time series data calculation device and similar time series data calculation program
Pham Hybrid LSH: faster near neighbors reporting in high-dimensional space
JP2007072752A (en) Similar time series data calculation method, device, and program
Nam et al. Fast stochastic neighbor embedding: a trust-region algorithm

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080620

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080708

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080819

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: 20090210

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090303

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120313

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130313

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees