JP2007072752A - Similar time series data calculation method, similar time series data calculation device, and similar time series data calculation program - Google Patents
Similar time series data calculation method, similar time series data calculation device, and similar time series data calculation program Download PDFInfo
- Publication number
- JP2007072752A JP2007072752A JP2005259010A JP2005259010A JP2007072752A JP 2007072752 A JP2007072752 A JP 2007072752A JP 2005259010 A JP2005259010 A JP 2005259010A JP 2005259010 A JP2005259010 A JP 2005259010A JP 2007072752 A JP2007072752 A JP 2007072752A
- Authority
- JP
- Japan
- Prior art keywords
- series data
- time series
- limit value
- memory
- value
- 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.)
- Pending
Links
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
【課題】時系列データの類否判定における探索漏れを防ぐとともに過剰探索を防ぐ。また、任意の長さのクエリの時系列データにも対応可能とする。
【解決手段】距離計算部4において、距離の下限値が閾値以下の場合に類似として判断することで探索漏れの発生を防ぐとともに、距離の上限値が閾値以下の場合に類似として判断することで過剰探索の発生を防ぐ。また、次元圧縮部3におけるセグメント管理部32により、時系列データを指数的に長さの異なる複数のセグメントに分割して、次元圧縮係数計算部33により各セグメントにおける平均値と標準偏差を求めることで、任意の長さのクエリの時系列データにも対応可能とする。
【選択図】図1
An object of the present invention is to prevent a search omission in determination of similarity of time series data and prevent an excessive search. It is also possible to deal with time-series data of queries having an arbitrary length.
In the distance calculation unit 4, it is determined that the lower limit value of the distance is equal to or less than the threshold value to prevent the occurrence of search omission, and the similarity is determined to be similar when the upper limit value of the distance is equal to or less than the threshold value. Prevent over search. Further, the segment management unit 32 in the dimension compression unit 3 divides the time series data into a plurality of segments having exponentially different lengths, and the dimension compression coefficient calculation unit 33 obtains an average value and a standard deviation in each segment. Thus, it is possible to deal with time-series data of queries of arbitrary length.
[Selection] Figure 1
Description
本発明は、複数の時系列データの中で類似したものを求める方法、装置、プログラムに関する。 The present invention relates to a method, an apparatus, 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, a stock online trading system monitors a large amount of stock prices and searches for companies with similar price movements at high speed. The moving body position management system senses a large number of traveling vehicles, and detects those having a similar movement track at high speed. The seismic monitoring system finds a point where the way of shaking at the time of an earthquake resembles at high speed based on information from a large number of seismometers.
本願では、複数の時系列データのうち、探索時刻から所定の長さのクエリに対して類似した時系列データの組み合わせを探索する問題を扱う。この問題は、時系列データのデータポイント数をn、クエリの長さをl、閾値をε、時系列データX=(x1,x2,...,xn)と時系列データY=(y1,y2,...,yn)のユークリッド距離をD(X,Y)とすると以下の条件を満たす時系列データの組み合わせの集合として表現できる。
一般に、D(X,Y)を求めるには高い計算コストがかかる。これは、時系列データが多数のデータポイントを有するためである。このため、時系列データの距離を計算する際には次元圧縮手法が用いられてきた。代表的な次元圧縮手法として、離散フーリエ変換(非特許文献1参照)、離散ウェブレット変換(非特許文献2参照)、特異値分解(非特許文献3参照)などがある。これらの次元圧縮手法は、探索漏れ(類似している時系列データを類似していないと判定すること)がない特徴がある。この探索漏れがない性質はlower bounding lemmaより保証される。lower bounding lemmaとは、次元圧縮後の時系列データをL(X’,Y’)としたときに、L(X’,Y’)≦D(X,Y)が成り立てば探索漏れが発生しないという補助定理である。すなわち、次元圧縮後の距離が次元圧縮前の距離の下限値であれば探索漏れは発生しないことになる。 In general, high calculation cost is required to obtain D (X, Y). This is because time series data has a large number of data points. For this reason, a dimension compression method has been used when calculating the distance of time series data. Typical dimensional compression methods include discrete Fourier transform (see Non-Patent Document 1), discrete weblet transform (see Non-Patent Document 2), singular value decomposition (see Non-Patent Document 3), and the like. These dimension compression methods have a feature that there is no search omission (determining that similar time-series data is not similar). This search-free property is guaranteed by lower bounding lemma. The lower bounding lemma means that when L (X ′, Y ′) ≦ D (X, Y) holds when the time-series data after dimension compression is L (X ′, Y ′), no search leakage occurs. This is the lemma. That is, if the distance after dimensional compression is the lower limit value of the distance before dimensional compression, no search omission occurs.
なお、ここで扱う時系列データは株価のような離散値と、移動軌跡のような連続値がある。時系列データが離散値である場合、時系列データが類似しているか否かは離散値を用いて時系列データ間の距離が閾値内になるか否かを調べればよい。また、時系列データが連続値である場合は、時系列データは処理する際にサンプリングされ離散値になるため、結局は離散値の処理手法を用いることになる。
従来の次元圧縮手法は以下の2つの点で問題がある。 The conventional dimension compression method has problems in the following two points.
1つ目は探索漏れがない性質しか有しないことである。時系列データの類似探索の応用を考えれば、過剰探索(類似していないシーケンスを類似していると判定すること)が発生しない性質も必要である。 The first is that it has only the property of no search omission. Considering the application of the similar search of time series data, it is necessary to have the property that an excessive search (determining a dissimilar sequence as similar) does not occur.
2つ目は特定の長さのクエリの時系列データにしか対応できないことである。時系列データの類似探索の応用を考えれば、任意の長さのクエリの時系列データにも対応できる必要がある。 The second is that it can only deal with time-series data of queries of a specific length. Considering the application of time series data similarity search, it is necessary to be able to deal with query time series data of any length.
本発明は、上記に鑑みてなされたものであり、その課題とするところは、第1に、探索漏れを防ぐとともに過剰探索を防ぐことにある。第2に、任意の長さのクエリの時系列データにも対応可能とすることにある。 The present invention has been made in view of the above, and the object of the present invention is firstly to prevent search omission and excessive search. Secondly, it is possible to deal with time-series data of queries having an arbitrary length.
第1の本発明に係る類似時系列データ計算方法は、次元圧縮係数計算手段により、類否判断の対象となる一対の時系列データをメモリから読み出し、それぞれについて次元圧縮係数として平均値と標準偏差を求めてメモリに格納するステップと、上限値・下限値計算手段により、平均値と標準偏差をメモリから読み出し、これらを用いて時系列データの距離の上限値および下限値を求めてメモリに格納するステップと、類否判断手段により、上限値、下限値、閾値をメモリから読み出し、下限値が閾値以下でかつ上限値が閾値以下の場合に一対の時系列データは類似であると判断するステップと、を有することを特徴とする。 In the similar time series data calculation method according to the first aspect of the present invention, a pair of time series data to be subjected to similarity determination is read from a memory by a dimension compression coefficient calculation means, and an average value and a standard deviation are respectively obtained as dimension compression coefficients. The average value and the standard deviation are read from the memory by the step of calculating and storing in the memory and the upper limit / lower limit calculation means, and using these, the upper and lower limits of the distance of the time series data are obtained and stored in the memory. And a step of reading the upper limit value, the lower limit value, and the threshold value from the memory by the similarity determination means, and determining that the pair of time series data is similar when the lower limit value is equal to or less than the threshold value and the upper limit value is equal to or less than the threshold value. It is characterized by having.
本発明にあっては、距離の下限値が閾値以下の場合に類似として判断することで、lower bounding lemmaの補助定理により探索漏れがない性質を保証するとともに、距離の上限値が閾値以下の場合に類似として判断することで、upper bounding lemmaの補助定理により過剰探索がない性質を保証する。 In the present invention, by determining that the lower limit value of the distance is equal to or less than the threshold value, it is ensured that there is no search omission according to the lower bounding lemma lemma, and the upper limit value of the distance is equal to or less than the threshold value. Judging by the upper bounding lemma lemma, we guarantee that there is no excessive search.
上記類似時系列データ計算方法は、前記類否判断手段により、下限値が閾値以下でかつ上限値が閾値よりも大きいと判断された場合に、厳密距離計算手段により、次元圧縮前の一対の時系列データをメモリから読み出し、両者の距離を求めてメモリに格納するステップと、類否判断手段により、次元圧縮前の一対の時系列データの距離、閾値をメモリから読み出し、当該距離が閾値以下の場合に一対の時系列データを類似であると判断するステップと、を有することを特徴とする。 In the similar time series data calculation method, when the similarity determination unit determines that the lower limit value is less than or equal to the threshold value and the upper limit value is greater than the threshold value, the exact distance calculation unit calculates the pair of times before dimension compression. The sequence data is read from the memory, the distance between the two is obtained and stored in the memory, and the similarity determination means reads the distance and threshold of the pair of time series data before dimension compression from the memory, and the distance is less than the threshold. Determining that the pair of time-series data is similar to each other.
本発明にあっては、下限値との関係で類似と判断された場合であっても上限値との関係で非類似と判断された場合には、次元圧縮後の時系列データからでは正確な類否判断ができなかったものとして、次元圧縮前の一対の時系列データを用いて両者の距離を求め、この距離と閾値とを比較することで、より厳密な類否判断を行う。 In the present invention, even if it is determined to be similar in relation to the lower limit value, if it is determined to be dissimilar in relation to the upper limit value, it is accurate from the time-series data after dimension compression. It is assumed that the similarity cannot be determined, the distance between the two is obtained using a pair of time-series data before dimension compression, and the distance is compared with a threshold value, thereby making a more exact similarity determination.
上記類似時系列データ計算方法は、セグメント管理手段により、時系列データを指数的に長さの異なる複数のセグメントに分割するステップと、前記次元圧縮係数計算手段により、時系列データの各セグメントにおける平均値と標準偏差を求めるステップと、を有することを特徴とする。 The similar time series data calculation method includes a step of segmenting time series data into a plurality of segments having exponentially different lengths by a segment management means, and an average for each segment of time series data by the dimension compression coefficient calculation means. Obtaining a value and a standard deviation.
本発明にあっては、時系列データを指数的に長さの異なる複数のセグメントに分割して、各セグメントにおける平均値と標準偏差を求めることで、任意の長さのクエリの時系列データにも対応可能とする。 In the present invention, the time-series data is divided into a plurality of segments having exponentially different lengths, and the average value and the standard deviation in each segment are obtained, whereby the time-series data of a query of an arbitrary length is obtained. Is also available.
上記類似時系列データ計算方法は、セグメント計数手段により、特定の長さのセグメントの個数を計数するステップと、セグメント統合手段により、計数した個数が一定値より大きくなった場合にその長さのセグメントを2つ統合するステップと、前記次元圧縮係数計算手段により、統合後のセグメントにおける平均値と標準偏差を求めるステップと、を有することを特徴とする。 The similar time-series data calculation method includes a step of counting the number of segments having a specific length by the segment counting means, and a segment having the length when the counted number exceeds a predetermined value by the segment integration means. And a step of obtaining an average value and a standard deviation in the segment after the integration by the dimension compression coefficient calculation means.
本発明にあっては、計数した特定の長さのセグメントの個数が一定値より大きい場合にその長さのセグメントを2つ統合し、統合後のセグメントにおける平均値と標準偏差を求めることで、次元圧縮の特徴量の更新を可能とする。 In the present invention, when the number of segments of a specific length counted is larger than a certain value, two segments of that length are integrated, and an average value and a standard deviation in the segment after integration are obtained, The feature quantity of dimension compression can be updated.
上記類似時系列データ計算方法は、セグメント管理手段により、時系列データを均等的な長さの複数のセグメントに分割するステップと、前記次元圧縮係数計算手段により、時系列データの各セグメントにおける平均値と標準偏差を求めるステップと、を有することを特徴とする。 The similar time series data calculation method includes a step of segmenting time series data into a plurality of segments of equal length by segment management means, and an average value in each segment of time series data by the dimension compression coefficient calculation means. And obtaining a standard deviation.
本発明にあっては、時系列データを均等的な長さの複数のセグメントに分割して、各セグメントにおける平均値と標準偏差を求めることで、特定の長さのクエリの時系列データに対応可能とする。 In the present invention, the time series data is divided into a plurality of segments of equal length, and the average value and standard deviation in each segment are obtained, thereby supporting the time series data of a specific length query. Make it possible.
第2の本発明に係る類似時系列データ計算装置は、類否判断の対象となる一対の時系列データをメモリから読み出し、それぞれについて次元圧縮係数として平均値と標準偏差を求めてメモリに格納する次元圧縮係数計算手段と、平均値と標準偏差をメモリから読み出し、これらを用いて時系列データの距離の上限値および下限値を求めてメモリに格納する上限値・下限値計算手段と、上限値、下限値、閾値をメモリから読み出し、下限値が閾値以下でかつ上限値が閾値以下の場合に一対の時系列データは類似であると判断する類否判断手段と、を有することを特徴とする。 The similar time-series data calculation apparatus according to the second aspect of the present invention reads a pair of time-series data to be subjected to similarity determination from a memory, obtains an average value and a standard deviation as a dimension compression coefficient for each, and stores them in the memory. Dimensional compression coefficient calculation means, upper limit / lower limit calculation means for reading the average value and standard deviation from the memory, and using these to obtain the upper and lower limit values of the distance of the time series data and storing them in the memory, and the upper limit value And a similarity determination unit that reads the lower limit value and the threshold value from the memory, and determines that the pair of time series data is similar when the lower limit value is equal to or lower than the threshold value and the upper limit value is equal to or lower than the threshold value. .
第3の本発明に係る類似時系列データ計算プログラムは、類否判断の対象となる一対の時系列データをメモリから読み出し、それぞれについて次元圧縮係数として平均値と標準偏差を求めてメモリに格納する処理と、平均値と標準偏差をメモリから読み出し、これらを用いて時系列データの距離の上限値および下限値を求めてメモリに格納する処理と、上限値、下限値、閾値をメモリから読み出し、下限値が閾値以下でかつ上限値が閾値以下の場合に一対の時系列データは類似であると判断する処理と、をコンピュータに実行させることを特徴とする。 A similar time-series data calculation program according to the third aspect of the present invention reads a pair of time-series data to be subjected to similarity determination from a memory, obtains an average value and a standard deviation as a dimension compression coefficient for each, and stores them in the memory. Processing, reading the average value and standard deviation from the memory, using these to obtain the upper limit value and lower limit value of the distance of the time series data, and storing the upper limit value, lower limit value, threshold value from the memory, When the lower limit value is equal to or less than the threshold value and the upper limit value is equal to or less than the threshold value, the computer is caused to execute a process of determining that the pair of time series data is similar.
本発明によれば、距離の上限値と下限値を用いて類否判定を行うことにより、探索漏れや過剰探索の発生を防止することができる。また、時系列データを指数的な長さのセグメントに分割することで、任意の長さのクエリの時系列データにも対応することができる。 According to the present invention, it is possible to prevent occurrence of search omission and excessive search by performing similarity determination using the upper limit value and the lower limit value of the distance. Further, by dividing the time series data into segments of exponential length, it is possible to deal with time series data of an arbitrary length query.
以下、本発明の実施形態について図面を用いて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1のブロック図に示すように、本実施の形態における類似時系列データ計算装置1は、データ受信部2、次元圧縮部3、距離計算部4、計算結果送信部5を有する構成である。類似時系列データ計算装置1は、演算処理装置、メモリ、記憶装置等のハードウェアを備えたコンピュータであり、各部の処理は、これらのハードウェアと協働して動作するプログラムによって実行される。各部の処理について概要から説明する。
As shown in the block diagram of FIG. 1, the similar time-series
データ受信部2は、外部から類似か否かの判断対象となる2つの時系列データと各時系列データのクエリの長さとを受信してメモリに記憶させる。次元圧縮部3は、メモリから各時系列データを読み出し、次元圧縮してメモリに記憶させる。距離計算部4は、メモリから次元圧縮後の各時系列データを読み出し、時系列データ間の距離を計算し、その距離に基づいて両者の類否を判断する。この判断が困難な場合には、メモリから次元圧縮前の各時系列データを読み出し、この時系列データ間の距離を計算し、この距離に基づいて類否を判断する。計算結果送信部5は類否判断の結果を外部へ送信する。
The
図2のブロック図に示すように、次元圧縮部3は、データ受信部31、セグメント管理部32、次元圧縮係数計算部33、計算結果送信部34を有する。
As shown in the block diagram of FIG. 2, the
データ受信部31は、次元圧縮前の時系列データを受信する。セグメント管理部32は、各セグメントの長さを管理し、時系列データを指数的に長さの異なる複数のセグメント、あるいは均等的な長さの複数のセグメントに分割する。次元圧縮係数計算部33は、時系列データの各セグメントにおける平均値と標準偏差を次元圧縮の係数として求めることで、次元圧縮を行う。計算結果送信部は次元圧縮後の時系列データを距離計算部4へ送信する。
The
図3のブロック図に示すように、セグメント管理部32は、データ受信部321、セグメント計数部322、セグメント統合部323、データ送信部324を有する。データ受信部321は、次元圧縮前の時系列データを受信する。セグメント計数部322は特定の長さのセグメントの個数を計数する。セグメント統合部323は、計数した個数が一定値より大きい場合に、その長さのセグメントを2つ統合する。データ送信部324は、統合後のセグメントの組み合わせを次元圧縮係数計算部33に送信する。
As shown in the block diagram of FIG. 3, the
図4のブロック図に示すように、距離計算部4は、データ受信部41、利用セグメント決定部42、距離係数計算部43、上限値計算部44、下限値計算部45、類否判定部46、厳密距離計算部47、判定結果送信部48を有する。
As shown in the block diagram of FIG. 4, the
データ受信部41は、次元圧縮前の時系列データ、クエリの長さ、次元圧縮後の時系列データ(すなわち次元圧縮計数)を受信する。利用セグメント決定部42は、次元圧縮後の距離を計算するときに用いるセグメントを決定する。距離係数計算部43は、次元圧縮係数を用いて時系列データ間の距離係数を計算する。上限値計算部44は、距離係数を用いて距離の上限値を求めてメモリに格納する。下限値計算部45は、距離係数を用いて距離の下限値を求めてメモリに格納する。類否判定部46は、上限値、下限値、閾値をメモリから読み出し、下限値が閾値以下でかつ上限値が閾値以下の場合に一対の時系列データを類似であると判断する。
The
厳密距離計算部47は、類否判定部46により下限値が閾値以下であるが上限値が閾値よりも大きいと判断された場合に、次元圧縮前の一対の時系列データをメモリから読み出し、この時系列データ間の距離を求めてメモリに格納する。この場合、類否判定部46は、この距離と閾値とをメモリから読み出し、この距離が閾値以下の場合に時系列データを類似と判断する。このように厳密な距離を用いることで正確な判断を行う。判定結果送信部48は類否判断の結果を計算結果送信部5へ送信する。
When the
次元圧縮部3で時系列データを次元圧縮しても過剰探索が発生しないことはupper bounding lemmaにより保証される。upper bounding lemmaとは、次元圧縮後のシーケンスの距離をU(X’,Y’)としたときにD(X,Y)≦U(X’,Y’)が成立すれば過剰探索が発生しないとする補助定理である。すなわち、次元圧縮後の距離が次元圧縮前の距離の上限値であれば過剰探索は発生しないことになる。
The upper bounding lemma guarantees that no excessive search occurs even if the time series data is dimensionally compressed by the
また、探索漏れが発生しないことはlower bounding lemmaより保証される。lower bounding lemmaとは、次元圧縮後の時系列データをL(X’,Y’)としたときに、L(X’,Y’)≦D(X,Y)が成り立てば探索漏れが発生しないという補助定理である。すなわち、次元圧縮後の距離が次元圧縮前の距離の下限値であれば探索漏れは発生しないことになる。 Moreover, it is guaranteed by lower bounding lemma that no search omission occurs. The lower bounding lemma means that when L (X ′, Y ′) ≦ D (X, Y) holds when the time-series data after dimension compression is L (X ′, Y ′), no search leakage occurs. This is the lemma. That is, if the distance after dimensional compression is the lower limit value of the distance before dimensional compression, no search omission occurs.
次に、類似時系列データ計算装置1における各部の処理について詳細に説明する。
Next, processing of each unit in the similar time series
まず、次元圧縮部3では、セグメント管理部32により、シーケンスX(nデータポイント)をN個の特定の長さのセグメントに分割してi番目のセグメントをσiとしたとき、次元圧縮係数計算部33では、σiの長さをl(σi)、平均をav(σi)、標準偏差をsd(σi)として次元圧縮後のシーケンスX’を次のように3つの係数のタプルで表現する。
ここでl(σi)については以下の式が成り立つ。
またxi:jをσiのj番目のデータポイントとすると、次元圧縮係数計算部33は、av(σi)とsd(σi)を次のように計算する。
続いて、距離計算部4での処理について図5のフローチャートを参照しながら説明する。この処理では、任意の長さのクエリに対して、距離の下限値を計算するのか、上限値を計算するのかにより、次元圧縮後の距離計算に用いるセグメントが異なる。すなわち、ステップ1(図5において「S1」と示す。以下同じ)において、利用セグメント決定部42は、図6に示すように、下限値を求めるときにはクエリより短いシーケンスの中で最も長いシーケンスにおけるセグメントを利用セグメントとして決定し、上限値を求めるときにはクエリより長いシーケンスの中で最も短いシーケンスにおけるセグメントを利用セグメントとして決定する。各シーケンスは、複数のセグメントを集約して構成される。下限値の計算に用いるセグメントの中で最も番号の小さいものをNl、上限値の計算に用いるセグメントの中で最も番号の小さいものをNuとすると、NlとNuは以下の式を満たすセグメントのうちそれぞれ最大のものと最小のものである。
ステップ2において、距離係数計算部43は、次式により距離係数D1,D2,D3を計算する。
ステップ3において、下限値計算部45は、次式により距離の下限値L(X’,Y’)を計算する。
ここでL(X’,Y’)は以下のように書き換えることができ、D1,D2,D3を予め計算しておくことで、それらをL(X’,Y’)の計算に利用できる。
ステップ4において、類否判定部46は、下限値と閾値を比較し、下限値が閾値より大きい場合には、時系列データは類似ではないと判断して処理を終了する(ステップ5)。一方、下限値が閾値以下の場合には、ステップ6へ進む。
In
ステップ6では、上限値計算部44が、次式により距離の上限値U(X’,Y’)を計算する。
ここで、Nu≦NlなのでU(X’,Y’)は以下のように書き換えることができ、D1,D2,D3を予め計算しておくことで、それらをU(X’,Y’)の計算にも利用できる。
ステップ7において、類否判定部46は、上限値と閾値を比較し、上限値が閾値以下の場合には、時系列データは類似と判断して処理を終了する(ステップ8)。一方、上限値が閾値よりも大きい場合には、時系列データは類似ではないと判断してステップ9へ進む。
In step 7, the
ステップ9では、厳密距離計算部47により、次元圧縮前の時系列データを用いて両者のユークリッド距離を求め、その距離を類否判定部46へ送る。
In step 9, the exact
ステップ10において、類否判定部46は、厳密距離計算部47が計算した距離と閾値とを比較し、その距離が閾値以下の場合には時系列データは類似と判断し(ステップ11)、それ以外の場合には非類似と判断して処理を終了する(ステップ12)。
In step 10, the
次に、上記のように求めた下限値L(X’,Y’)、上限値U(X’,Y’)を用いることで、L(X’,Y’)≦D(X,Y)≦U(X’,Y’)となることを証明する。まずL(X’,Y’)≦D(X,Y)となることを示す。 Next, by using the lower limit value L (X ′, Y ′) and the upper limit value U (X ′, Y ′) obtained as described above, L (X ′, Y ′) ≦ D (X, Y) It proves that ≦ U (X ′, Y ′). First, it is shown that L (X ′, Y ′) ≦ D (X, Y).
D(X,Y)はユークリッド距離なのでk≧lとすると明らかに以下のことが成り立つ。
kにおいては以下の式が成り立つとする。
ここでΔxi:j=av(σi)−xi:jとすると
ここで
であるため
となる。ここでΔxi:jをベクトルとみなしたとき、‖Δxi:j‖をベクトルΔxi:jの大きさとする。すると内積の定義式より
となる。なお、ここでθiはベクトルΔxi:jとベクトルΔyi:jのなす角とする。cosθi≦1であるので、
となる。また同様に、k≦1、cosθi≧1とすれば、D(X,Y)≦U(X’,Y’)となることも示せる。 It becomes. Similarly, if k ≦ 1 and cos θ i ≧ 1, it can be shown that D (X, Y) ≦ U (X ′, Y ′).
次に、セグメント管理部32において指数的に長さの異なるセグメントを管理する処理について詳細に説明する。セグメント管理部32は、レベルhのセグメントの長さを2hとし、図7の模式図に示すように、処理時間によってレベルhを引き上げることで、セグメントの長さが指数的に大きくなるようにセグメント分割を行う。このようにするのは、任意の長さのクエリに対応するためである。これにより、クエリが短い場合も長い場合も、下限値と上限値を計算したときの相対的な誤差は同等になる。
Next, processing for managing segments having exponentially different lengths in the
セグメント統合部323は、各レベルにおいてセグメントの個数がキャパシティcより大きくなった場合に、そのレベルにおける2つのセグメントを統合し、次元圧縮の特徴量の更新をインクリメンタル的に行う。
When the number of segments at each level becomes larger than the capacity c, the
例えばc=2としたときの具体的な更新処理について図8の模式図および図9のフローチャートを用いて説明する。 For example, specific update processing when c = 2 will be described with reference to the schematic diagram of FIG. 8 and the flowchart of FIG.
ステップ21(図9で「S21」と示す。以下同じ)で、セグメント計数部322は、レベルhを初期値0に設定する。そして、ステップ22で、レベルh=0におけるセグメントの個数を計数する。ここでは、セグメントの個数を、レベルh=0で2、h=1で2、h=2で1とする。ここでシーケンスデータが流入してくるとh=0のセグメントは3個になる。セグメントの個数がc(=2)よりも大きくなったので(ステップ24)、ステップ25で、セグメント統合部323は、セグメントを統合してh=1のセグメントを作成する。するとレベルh=1のセグメントも3個になるので、ステップ26でレベルhを1インクリメントして同様に処理する。この処理をレベルhが時系列データの最大のレベルとなるまで繰り返す(ステップ23)。結果として、更新後のセグメントの個数はレベルh=0で1、レベルh=1で1、レベルh=2で2となる。
In step 21 (shown as “S21” in FIG. 9; the same applies hereinafter), the
セグメントσiとσi+1を統合して新たなセグメントσ′iとするときの次元圧縮の特徴量については、以下のように更新する。
次に、セグメント管理部32において均等的な長さのセグメントを管理する処理について詳細に説明する。ここでは、任意の長さのクエリではなく、固定長のクエリに対して類似時系列データを探索することを想定する。この場合は一番前のセグメントは逐次更新し、一番後のセグメントはキャパシティc毎に更新する。次元圧縮係数計算部33は、キャパシティcの値ごとにまとめた均等的な長さの各セグメントにおける時系列データの平均値と標準偏差を求めてメモリに保持する。
Next, processing for managing segments of equal length in the
c=2であるときの具体的な更新処理について図10の模式図を用いて説明する。次元圧縮の特徴量は4つであり、更新前(t=1)においてセグメントの長さは1番目が4、2番目が4、3番目が4、4番目が0である。ここでシーケンスデータが流入してくると(t=2)、セグメントの長さは1番目が4、2番目が4、3番目が4、4番目が1となる。次のシーケンスデータが流入してくると(t=3)、セグメントの長さは1番目が2、2番目が4、3番目が4、4番目が2となる。 A specific update process when c = 2 will be described with reference to the schematic diagram of FIG. There are four dimension compression feature quantities, and the segment length is 4 for the first, 4 for the second, 4 for the third, 4 for the fourth, and 0 before the update (t = 1). Here, when the sequence data flows in (t = 2), the length of the segment is 4 for the first, 4 for the second, 4 for the third, and 1 for the fourth. When the next sequence data flows in (t = 3), the length of the segment is 2 for the first, 4 for the second, 4 for the third, and 2 for the fourth.
セグメントは逐次またはキャパシティcごとに更新するが、このときの次元圧縮の係数は長さli+li+1のセグメントをσ’iとし、長さliのセグメントをσiとし、長さli+1のセグメントをσi+1としたとき以下の式を用いて更新する。
以上、説明したように、本実施の形態によれば、距離計算部4において、距離の下限値が閾値以下の場合に類似として判断することで、lower bounding lemmaの補助定理により探索漏れがない性質を保証するとともに、距離の上限値が閾値以下の場合に類似として判断することで、upper bounding lemmaの補助定理により過剰探索がない性質を保証する。これにより、探索漏れの発生および過剰探索の発生を防ぐことができる。
As described above, according to the present embodiment, the
本実施の形態によれば、セグメント管理部32により、時系列データを指数的に長さの異なる複数のセグメントに分割して、次元圧縮係数計算部33が各セグメントにおける平均値と標準偏差を求めることで、任意の長さのクエリの時系列データにも対応することができる。
According to the present embodiment, the
本実施の形態によれば、類否判定部46により、下限値との関係で類似と判断された場合であっても上限値との関係で非類似と判断された場合には、次元圧縮後の時系列データからでは正確な類否判断ができなかったものとして、厳密距離計算部47により、次元圧縮前の一対の時系列データを用いて両者のユークリッド距離を求め、再度類否判定部46によりユークリッド距離と閾値との比較を行うことで、より厳密な類否判断を行うことができる。
According to the present embodiment, even if it is determined that the
本実施の形態によれば、セグメント計数部322により計数した特定の長さのセグメントの個数が一定値より大きくなった場合に、セグメント統合部323により、その長さのセグメントを2つ統合し、次元圧縮係数計算部33により、統合後のセグメントにおける平均値と標準偏差を求めることで、次元圧縮の特徴量の更新を可能にすることができる。
According to the present embodiment, when the number of segments of a specific length counted by the
本実施の形態によれば、セグメント管理部32により、時系列データを均等的な長さの複数のセグメントに分割して、次元圧縮係数計算部33により、各セグメントにおける平均値と標準偏差を求めることで、特定の長さのクエリの時系列データに対応することができる。
According to the present embodiment, the
本実施の形態によれば、時系列データを指数的または均等的な長さのセグメントに分割することにより、相対的に小さい誤差で時系列データの類否判断を行うことができる。 According to the present embodiment, by dividing the time series data into segments of exponential or equal length, it is possible to determine the similarity of the time series data with a relatively small error.
1…類似時系列データ計算装置
2…データ受信部
3…次元圧縮部
4…距離計算部
5…計算結果送信部
31…データ受信部
32…セグメント管理部
33…次元圧縮係数計算部
34…計算結果送信部
41…データ受信部
42…利用セグメント決定部
43…距離係数計算部
44…上限値計算部
45…下限値計算部
46…類否判定部
47…厳密距離計算部
48…判定結果送信部
321…データ受信部
322…セグメント計数部
323…セグメント統合部
324…データ送信部
DESCRIPTION OF
Claims (7)
上限値・下限値計算手段により、平均値と標準偏差をメモリから読み出し、これらを用いて時系列データの距離の上限値および下限値を求めてメモリに格納するステップと、
類否判断手段により、上限値、下限値、閾値をメモリから読み出し、下限値が閾値以下でかつ上限値が閾値以下の場合に一対の時系列データは類似であると判断するステップと、
を有することを特徴とする類似時系列データ計算方法。 A step of reading out a pair of time series data subject to similarity determination from the memory by the dimension compression coefficient calculating means, obtaining an average value and a standard deviation as a dimension compression coefficient for each, and storing them in the memory;
The average value and the standard deviation are read from the memory by the upper limit / lower limit calculation means, and the upper limit value and the lower limit value of the distance of the time series data are obtained and stored in the memory using these,
A step of reading the upper limit value, the lower limit value, and the threshold value from the memory by the similarity determination means, and determining that the pair of time series data is similar when the lower limit value is equal to or less than the threshold value and the upper limit value is equal to or less than the threshold value;
A similar time series data calculation method characterized by comprising:
類否判断手段により、次元圧縮前の一対の時系列データの距離、閾値をメモリから読み出し、当該距離が閾値以下の場合に一対の時系列データは類似であると判断するステップと、
を有することを特徴とする請求項1記載の類似時系列データ計算方法。 When the similarity determination means determines that the lower limit value is less than or equal to the threshold value and the upper limit value is greater than the threshold value, the exact distance calculation means reads a pair of time series data before dimension compression from the memory, Determining the distance and storing it in memory;
A step of reading the distance and threshold of the pair of time series data before dimension compression from the memory by the similarity determination means, and determining that the pair of time series data is similar when the distance is equal to or less than the threshold;
The similar time series data calculation method according to claim 1, wherein:
前記次元圧縮係数計算手段により、時系列データの各セグメントにおける平均値と標準偏差を求めるステップと、
を有することを特徴とする請求項1又は2記載の類似時系列データ計算方法。 Dividing the time-series data into a plurality of segments exponentially different in length by the segment management means;
Obtaining a mean value and a standard deviation in each segment of the time series data by the dimension compression coefficient calculating means;
The similar time series data calculation method according to claim 1, wherein:
セグメント統合手段により、計数した個数が一定値より大きくなった場合にその長さのセグメントを2つ統合するステップと、
前記次元圧縮係数計算手段により、統合後のセグメントにおける平均値と標準偏差を求めるステップと、
を有することを特徴とする請求項3記載の類似時系列データ計算方法。 Counting the number of segments of a specific length by the segment counting means;
A step of integrating two segments of the length when the counted number becomes larger than a certain value by the segment integration means;
Obtaining a mean value and a standard deviation in the segment after integration by the dimension compression coefficient calculating means;
The similar time series data calculation method according to claim 3, wherein:
前記次元圧縮係数計算手段により、時系列データの各セグメントにおける平均値と標準偏差を求めるステップと、
を有することを特徴とする請求項1又は2記載の類似時系列データ計算方法。 Dividing the time series data into a plurality of segments of equal length by segment management means;
Obtaining a mean value and a standard deviation in each segment of the time series data by the dimension compression coefficient calculating means;
The similar time series data calculation method according to claim 1, wherein:
平均値と標準偏差をメモリから読み出し、これらを用いて時系列データの距離の上限値および下限値を求めてメモリに格納する上限値・下限値計算手段と、
上限値、下限値、閾値をメモリから読み出し、下限値が閾値以下でかつ上限値が閾値以下の場合に一対の時系列データは類似であると判断する類否判断手段と、
を有することを特徴とする類似時系列データ計算装置。 A dimensional compression coefficient calculation means for reading a pair of time series data to be subjected to similarity determination from the memory, obtaining an average value and a standard deviation as a dimensional compression coefficient for each, and storing them in the memory;
An upper limit / lower limit calculation means for reading an average value and a standard deviation from the memory, and using these to obtain an upper limit value and a lower limit value of the distance of the time series data and storing them in the memory,
An similarity determination unit that reads the upper limit value, the lower limit value, and the threshold value from the memory, and determines that the pair of time series data is similar when the lower limit value is equal to or less than the threshold value and the upper limit value is equal to or less than the threshold value;
A similar time-series data calculation device comprising:
平均値と標準偏差をメモリから読み出し、これらを用いて時系列データの距離の上限値および下限値を求めてメモリに格納する処理と、
上限値、下限値、閾値をメモリから読み出し、下限値が閾値以下でかつ上限値が閾値以下の場合に一対の時系列データは類似であると判断する処理と、
をコンピュータに実行させることを特徴とする類似時系列データ計算プログラム。
A process of reading a pair of time series data to be subjected to similarity determination from the memory, obtaining an average value and a standard deviation as a dimensional compression coefficient for each, and storing them in the memory;
A process of reading an average value and a standard deviation from the memory, and using these to obtain an upper limit value and a lower limit value of the distance of the time series data and storing them in the memory,
A process of reading the upper limit value, the lower limit value, and the threshold value from the memory, and determining that the pair of time series data is similar when the lower limit value is equal to or less than the threshold value and the upper limit value is equal to or less than the threshold value;
A similar time series data calculation program characterized by causing a computer to execute.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005259010A JP2007072752A (en) | 2005-09-07 | 2005-09-07 | Similar time series data calculation method, similar time series data calculation device, and similar time series data calculation program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005259010A JP2007072752A (en) | 2005-09-07 | 2005-09-07 | Similar time series data calculation method, similar time series data calculation device, and similar time series data calculation program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2007072752A true JP2007072752A (en) | 2007-03-22 |
Family
ID=37934135
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2005259010A Pending JP2007072752A (en) | 2005-09-07 | 2005-09-07 | Similar time series data calculation method, similar time series data calculation device, and similar time series data calculation program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2007072752A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103729530A (en) * | 2012-10-15 | 2014-04-16 | 富士通株式会社 | Device and method for processing sequence |
| WO2019026134A1 (en) * | 2017-07-31 | 2019-02-07 | 三菱電機株式会社 | Information processing device and information processing method |
| WO2021226922A1 (en) * | 2020-05-14 | 2021-11-18 | 深圳市欢太科技有限公司 | Data compression method, apparatus and device, and readable storage medium |
-
2005
- 2005-09-07 JP JP2005259010A patent/JP2007072752A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103729530A (en) * | 2012-10-15 | 2014-04-16 | 富士通株式会社 | Device and method for processing sequence |
| CN103729530B (en) * | 2012-10-15 | 2017-05-24 | 富士通株式会社 | Device and method for processing sequence |
| WO2019026134A1 (en) * | 2017-07-31 | 2019-02-07 | 三菱電機株式会社 | Information processing device and information processing method |
| US10613960B2 (en) | 2017-07-31 | 2020-04-07 | Mitsubishi Electric Corporation | Information processing apparatus and information processing method |
| WO2021226922A1 (en) * | 2020-05-14 | 2021-11-18 | 深圳市欢太科技有限公司 | Data compression method, apparatus and device, and readable storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6743934B2 (en) | Method, apparatus and system for estimating causal relationship between observed variables | |
| US8015190B1 (en) | Similarity-based searching | |
| CN110569328B (en) | Entity linking method, electronic device and computer equipment | |
| CN105912611B (en) | A Fast Image Retrieval Method Based on CNN | |
| Yagoubi et al. | Dpisax: Massively distributed partitioned isax | |
| CN100416560C (en) | Method and apparatus for clustered evolving data flow through on-line and off-line assembly | |
| US8051021B2 (en) | System and method for resource adaptive classification of data streams | |
| US10580114B2 (en) | Methods and systems for real time 3D-space search and point-cloud registration using a dimension-shuffle transform | |
| US20140324870A1 (en) | Similarity detecting apparatus and directional nearest neighbor detecting method | |
| CN113128582B (en) | Matrix Profile-based time sequence variable-length die body mining method | |
| Tiakas et al. | Skyline queries: An introduction | |
| CN101354728B (en) | A Similarity Measurement Method Based on Interval Weight | |
| Anagnostopoulos et al. | Learning set cardinality in distance nearest neighbours | |
| CN117828002B (en) | Intelligent management method and system for land resource information data | |
| 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 | |
| EP3067804A1 (en) | Data arrangement program, data arrangement method, and data arrangement apparatus | |
| Le Hoang et al. | A farthest first traversal based sampling algorithm for k-clustering | |
| Zhang et al. | Accelerating exact nearest neighbor search in high dimensional Euclidean space via block vectors | |
| JP2007072752A (en) | Similar time series data calculation method, similar time series data calculation device, and similar time series data calculation program | |
| Fu et al. | Financial time series indexing based on low resolution clustering | |
| KR102198459B1 (en) | Clustering method and system for financial time series with co-movement relationship | |
| CN116468102B (en) | Tool image classification model pruning method, device, and computer equipment | |
| CN117555993A (en) | Method, device and medium for retrieving multidimensional data in ERP system | |
| JP4275084B2 (en) | Similar time series data calculation device, similar time series data calculation method, and similar time series data calculation program |