JP6604212B2 - Data processing apparatus, data processing method, and data processing program - Google Patents

Data processing apparatus, data processing method, and data processing program Download PDF

Info

Publication number
JP6604212B2
JP6604212B2 JP2016007234A JP2016007234A JP6604212B2 JP 6604212 B2 JP6604212 B2 JP 6604212B2 JP 2016007234 A JP2016007234 A JP 2016007234A JP 2016007234 A JP2016007234 A JP 2016007234A JP 6604212 B2 JP6604212 B2 JP 6604212B2
Authority
JP
Japan
Prior art keywords
time
data
change point
matches
window
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.)
Active
Application number
JP2016007234A
Other languages
Japanese (ja)
Other versions
JP2017129919A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2016007234A priority Critical patent/JP6604212B2/en
Publication of JP2017129919A publication Critical patent/JP2017129919A/en
Application granted granted Critical
Publication of JP6604212B2 publication Critical patent/JP6604212B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Complex Calculations (AREA)

Description

本発明は、データ処理装置、データ処理方法およびデータ処理プログラムに関する。   The present invention relates to a data processing device, a data processing method, and a data processing program.

複数の時系列データのうち2つの時系列データを比較することで、該2つの時系列データの類似度の演算を行う技術が用いられている。類似度の演算を行う手法の1つにケンドールの順位相関係数を用いた演算がある。   A technique is used in which similarity between two time series data is calculated by comparing two time series data among a plurality of time series data. One of the methods for calculating the similarity is an operation using Kendall's rank correlation coefficient.

関連する技術として、複合ソート法による高速な全ペア類似度検索という技術が提案されている。この技術では、比較対象のデータ期間のそれぞれについて、値の大小関係を文字列として記憶する(例えば、非特許文献1を参照)。   As a related technique, a technique called high-speed all pair similarity search by a composite sort method has been proposed. In this technique, the magnitude relationship of values is stored as a character string for each data period to be compared (for example, see Non-Patent Document 1).

また、携帯機が、認証要求信号の測定部の受信強度を測定し、受信強度の大小関係の変化が所定のパターンと一致するか否かに基づいて、認証要求信号が正規の信号であるかを判定する技術が提案されている(例えば、特許文献1を参照)。   In addition, the portable device measures the reception strength of the measurement unit of the authentication request signal, and whether the authentication request signal is a legitimate signal based on whether the change in the magnitude relationship of the reception strength matches a predetermined pattern. Has been proposed (see, for example, Patent Document 1).

また、端子電圧と所定電圧との大小関係を時系列的にサンプリングし、サンプリングした大小関係と規則的な変化に基づいて、通電制御を行う技術が提案されている(例えば、特許文献2を参照)。   Further, a technique has been proposed in which the magnitude relationship between the terminal voltage and the predetermined voltage is sampled in time series, and the energization control is performed based on the sampled magnitude relationship and regular changes (see, for example, Patent Document 2). ).

津田宏治、「複合ソート法による高速な全ペア類似度検索」、ERATO湊離散構造処理系プロジェクト、2010年度科学技術振興機構ERATO湊離散構造処理系プロジェクト講究録. p.490-495.Koji Tsuda, “Fast All Pair Similarity Search Using Compound Sort Method”, ERATO 湊 Discrete Structure Processing Project, 2010 ERATO 湊 Discrete Structure Processing Project Proceedings. P.490-495.

特開2005−269719号公報JP 2005-269719 A 特開2014−139752号公報JP 2014-139552 A

例えば、比較対象の時系列データのデータ期間のそれぞれについて、値の大小関係を文字列として記憶する方式では、値の大小関係の情報量が多くなる。このため、時系列データの類似度の演算を行う際に使用される情報量が多くなり、演算時間が長くなる。   For example, in the method of storing the value magnitude relationship as a character string for each data period of the time-series data to be compared, the amount of value magnitude information increases. For this reason, the amount of information used when calculating the similarity of time-series data increases, and the calculation time increases.

1つの側面として、本発明は、時系列データ同士を比較する際の演算時間を短くすることを目的とする。   As one aspect, an object of the present invention is to shorten the calculation time when comparing time series data.

1つの態様では、データ処理装置は、比較される2つの時系列データの各々について、時間経過に対する値の増加若しくは減少の傾向が変化する時刻を変化点として検出する検出部と、前記2つの時系列データの各々で個別に設定されている、複数の同一期間幅を含む所定の期間内において、前記2つの時系列データを、前記複数の同一期間幅それぞれについて前記所定の期間内の先頭の時刻からの同一順序同士で順次対比したときに、同一順序の対応する時刻における前記傾向の変化が一致する一致数を、前記2つの時系列データに対する前記変化点の検出時刻から計数する計数部と、前記一致数に基づいて、前記2つの時系列データの間の類似度を演算する演算部と、を含む。 In one embodiment, the data processing device, for each of the two time series data to be compared, a detector for detecting a change point increase or time trend of decrease the value changes over time, when the two Within a predetermined period including a plurality of the same period widths set individually for each of the series data, the two time-series data are set to the first time within the predetermined period for each of the plurality of the same period widths. A counter that counts the number of matches in which the change in tendency at the corresponding time in the same order coincides from the detection time of the change point with respect to the two time-series data when sequentially compared in the same order from A calculation unit that calculates a similarity between the two time-series data based on the number of matches .

1つの側面によれば、時系列データ同士を比較する際の演算時間を短くすることができる。   According to one aspect, the calculation time for comparing time series data can be shortened.

ケンドールの順位相関係数を用いた演算の一例を示す図である。It is a figure which shows an example of the calculation using Kendall's rank correlation coefficient. データ処理装置の一例を示す機能ブロック図である。It is a functional block diagram which shows an example of a data processor. データ処理装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of a data processor. 類似度の演算の手法の一例を示す図である。It is a figure which shows an example of the method of calculation of similarity. 変化点検出の一例を説明する図(その1)である。It is FIG. (1) explaining an example of a change point detection. 変化点検出の一例を説明する図(その2)である。It is FIG. (2) explaining an example of a change point detection. ウィンドウをずらさない場合の類似度の演算の一例を説明する図(その1)である。It is FIG. (1) explaining an example of the calculation of the similarity degree when not shifting a window. ウィンドウをずらさない場合の類似度の演算の一例を説明する図(その2)である。It is FIG. (2) explaining an example of the calculation of the similarity degree when not shifting a window. 双方のウィンドウをずらす場合の類似度の演算の一例を示す図(その1)である。It is FIG. (1) which shows an example of the calculation of the similarity in the case of shifting both windows. 双方のウィンドウをずらす場合の類似度の演算の一例を示す図(その2)である。It is FIG. (2) which shows an example of the calculation of the similarity in the case of shifting both windows. 双方のウィンドウをずらす場合の類似度の演算の一例を示す図(その3)である。It is FIG. (3) which shows an example of the calculation of similarity in the case of shifting both windows. 双方のウィンドウをずらす場合の類似度の演算の一例を示す図(その4)である。It is FIG. (4) which shows an example of the calculation of the similarity in the case of shifting both windows. 双方のウィンドウをずらす場合の類似度の演算の一例を示す図(その5)である。It is FIG. (5) which shows an example of the calculation of the similarity in the case of shifting both windows. 片方のウィンドウをずらす場合の類似度の演算の一例を示す図(その1)である。FIG. 10 is a diagram (part 1) illustrating an example of similarity calculation when one window is shifted; 片方のウィンドウをずらす場合の類似度の演算の一例を示す図(その2)である。It is FIG. (2) which shows an example of the calculation of the similarity in the case of shifting one window. 片方のウィンドウをずらす場合の類似度の演算の一例を示す図(その3)である。FIG. 11 is a diagram (part 3) illustrating an example of similarity calculation when one window is shifted; 片方のウィンドウをずらす場合の類似度の演算の一例を示す図(その4)である。It is FIG. (4) which shows an example of the calculation of the similarity in the case of shifting one window. 片方のウィンドウをずらす場合の類似度の演算の一例を示す図(その5)である。It is FIG. (5) which shows an example of the calculation of the similarity in the case of shifting one window. 片方のウィンドウをずらす場合の類似度の演算の一例を示す図(その6)である。It is FIG. (6) which shows an example of the calculation of the similarity in the case of shifting one window. 片方のウィンドウをずらす場合の類似度の演算の一例を示す図(その7)である。It is FIG. (7) which shows an example of the calculation of the similarity in the case of shifting one window. 時系列データの類似度の演算の3つの具体例を示す図である。It is a figure which shows three specific examples of the calculation of the similarity of time series data. 具体例1を説明する図(その1)である。It is FIG. (The 1) explaining the specific example 1. FIG. 具体例1を説明する図(その2)である。It is FIG. (2) explaining the specific example 1. FIG. 具体例1を説明する図(その3)である。FIG. 6 is a third diagram illustrating a first specific example. 具体例1を説明する図(その4)である。FIG. 4 is a diagram (part 4) for explaining a specific example 1; 具体例1を説明する図(その5)である。FIG. 5 is a fifth diagram illustrating a first specific example; 具体例1を説明する図(その6)である。It is FIG. (6) explaining the specific example 1. FIG. 具体例1を説明する図(その7)である。FIG. 7 is a diagram (part 7) for explaining a specific example 1; 具体例1を説明する図(その8)である。It is FIG. (The 8) explaining the specific example 1. FIG. 具体例1を説明する図(その9)である。It is FIG. (9) explaining the specific example 1. 具体例1を説明する図(その10)である。FIG. 10 is a diagram (No. 10) for explaining a specific example 1; 具体例1を説明する図(その11)である。It is FIG. (11) explaining the specific example 1. 具体例1を説明する図(その12)である。It is FIG. (12) explaining the specific example 1. FIG. 具体例1を説明する図(その13)である。It is FIG. (13) explaining the specific example 1. 具体例1を説明する図(その14)である。It is FIG. (14) explaining the specific example 1. 具体例1を説明する図(その15)である。It is FIG. (15) explaining the specific example 1. FIG. 具体例1を説明する図(その16)である。It is FIG. (16) explaining the specific example 1. FIG. 具体例1を説明する図(その17)である。It is FIG. (17) explaining the specific example 1. 具体例1を説明する図(その18)である。It is FIG. (18) explaining the specific example 1. 具体例1を説明する図(その19)である。It is FIG. (19) explaining the example 1. 具体例1を説明する図(その21)である。It is FIG. (The 21) explaining the specific example 1. 具体例1を説明する図(その22)である。It is FIG. (22) explaining the specific example 1. 具体例1を説明する図(その23)である。It is FIG. (23) explaining the specific example 1. 具体例1を説明する図(その24)である。It is FIG. (The 24) explaining the specific example 1. FIG. 具体例1を説明する図(その25)である。It is FIG. (25) explaining the specific example 1. 具体例1を説明する図(その26)である。It is FIG. (26) explaining the specific example 1. 具体例1を説明する図(その27)である。It is FIG. (27) explaining the specific example 1. FIG. 具体例1を説明する図(その28)である。It is FIG. (28) explaining the specific example 1. 具体例1を説明する図(その29)である。It is FIG. (29) explaining the specific example 1. 具体例1を説明する図(その30)である。It is FIG. (30) explaining the specific example 1. 具体例1を説明する図(その31)である。It is FIG. (The 31) explaining the specific example 1. FIG. 具体例2を説明する図(その1)である。It is FIG. (1) explaining the specific example 2. FIG. 具体例2を説明する図(その2)である。It is FIG. (2) explaining the specific example 2. 具体例2を説明する図(その3)である。It is FIG. (3) explaining the specific example 2. 具体例2を説明する図(その4)である。It is FIG. (4) explaining the specific example 2. 具体例2を説明する図(その5)である。FIG. 6 is a diagram (part 5) illustrating a specific example 2; 具体例2を説明する図(その6)である。It is FIG. (6) explaining the specific example 2. 具体例2を説明する図(その7)である。It is FIG. (The 7) explaining the specific example 2. FIG. 具体例2を説明する図(その8)である。It is FIG. (8) explaining the specific example 2. FIG. 具体例2を説明する図(その9)である。It is FIG. (9) explaining the specific example 2. 具体例2を説明する図(その10)である。It is FIG. (10) explaining the specific example 2. 具体例2を説明する図(その11)である。It is FIG. (11) explaining the specific example 2. 具体例2を説明する図(その12)である。It is FIG. (12) explaining the specific example 2. FIG. 具体例2を説明する図(その13)である。It is FIG. (13) explaining the specific example 2. 具体例2を説明する図(その14)である。It is FIG. (14) explaining the specific example 2. 具体例2を説明する図(その15)である。It is FIG. (15) explaining the specific example 2. 具体例3を説明する図(その1)である。It is FIG. (1) explaining the specific example 3. 具体例3を説明する図(その2)である。It is FIG. (2) explaining the specific example 3. 具体例3を説明する図(その3)である。FIG. 10 is a third diagram illustrating a third specific example; 具体例3を説明する図(その4)である。FIG. 6 is a diagram (part 4) illustrating a specific example 3; 具体例3を説明する図(その5)である。FIG. 10 is a diagram (part 5) illustrating a specific example 3; 具体例3を説明する図(その6)である。It is FIG. (6) explaining the example 3. 具体例3を説明する図(その7)である。It is FIG. (7) explaining the specific example 3. 具体例3を説明する図(その8)である。It is FIG. (The 8) explaining the specific example 3. FIG. 具体例3を説明する図(その9)である。It is FIG. (9) explaining the specific example 3. 具体例3を説明する図(その10)である。It is FIG. (10) explaining the specific example 3. 具体例3を説明する図(その11)である。It is FIG. (11) explaining the specific example 3. 具体例3を説明する図(その12)である。It is FIG. (12) explaining the specific example 3. 具体例3を説明する図(その13)である。It is FIG. (13) explaining the specific example 3. 具体例3を説明する図(その14)である。It is FIG. (14) explaining the specific example 3. 具体例3を説明する図(その15)である。It is FIG. (15) explaining the specific example 3. 具体例3を説明する図(その16)である。It is FIG. (16) explaining the specific example 3. 具体例3を説明する図(その17)である。It is FIG. (17) explaining the example 3. 具体例3を説明する図(その18)である。It is FIG. (18) explaining the specific example 3. 他の値を用いた一致数の例(その1)である。It is an example (the 1) of the number of matches using other values. 他の値を用いた一致数の例(その2)である。It is an example (the 2) of the number of matches using other values. 他の値を用いた一致数の例(その3)である。It is an example (the 3) of the number of matches using other values. 他の値を用いた一致数の例(その4)である。It is an example (the 4) of the number of coincidence using other values. 他の値を用いた一致数の例(その5)である。It is an example (the 5) of the number of matches using other values. 他の値を用いた一致数の例(その6)である。It is an example (the 6) of the number of matches using other values. 実施形態の処理の流れの一例を示すフローチャート(その1)である。It is a flowchart (the 1) which shows an example of the flow of a process of embodiment. 実施形態の処理の流れの一例を示すフローチャート(その2)である。It is a flowchart (the 2) which shows an example of the flow of a process of embodiment. 実施形態の処理の流れの一例を示すフローチャート(その3)である。It is a flowchart (the 3) which shows an example of the flow of a process of embodiment. 実施形態の処理の流れの一例を示すフローチャート(その4)である。It is a flowchart (the 4) which shows an example of the flow of a process of embodiment. 実施形態の処理の流れの一例を示すフローチャート(その5)である。It is a flowchart (the 5) which shows an example of the flow of a process of embodiment. 3種類の時系列データの一例を示す図である。It is a figure which shows an example of three types of time series data.

以下、図面を参照して、実施形態について説明する。実施形態では、ケンドールの順位相関係数を用いて、時系列データ同士の類似度が演算されるものとする。時系列データは、各時刻における値を表すデータである。図1の例では、比較対象の時系列データは、データ1とデータ2とであるものとする。   Hereinafter, embodiments will be described with reference to the drawings. In the embodiment, the similarity between time series data is calculated using Kendall's rank correlation coefficient. The time series data is data representing values at each time. In the example of FIG. 1, it is assumed that time series data to be compared is data 1 and data 2.

図1の例の場合、データ1およびデータ2のデータサイズは「4」であるものとする。以下、データサイズを項目数と称することもある。データサイズ(項目数)は、時系列データの各時刻における値の数である。   In the case of the example of FIG. 1, it is assumed that the data size of data 1 and data 2 is “4”. Hereinafter, the data size may be referred to as the number of items. The data size (number of items) is the number of values at each time of the time series data.

ケンドールの順位相関係数を用いて類似度の演算が行われる場合、比較対象の2つの時系列データの異なる時刻間の値の大小関係の一致数に基づいて、上記の類似度の演算が行われる。   When the similarity calculation is performed using Kendall's rank correlation coefficient, the above similarity calculation is performed based on the number of coincidence of the magnitude relationships between the values of the two time-series data to be compared. Is called.

例えば、時刻(図1では項目と表記)「T3」におけるデータ1の値は「7.2」であり、時刻「T4」における値より大きい。時刻「T3」におけるデータ2の値は「2.2」であり、時刻「T4」における値より大きい。この場合、データ1とデータ2との間の、時刻「T3」と時刻「T4」との大小関係は一致する。   For example, the value of data 1 at time (noted as an item in FIG. 1) “T3” is “7.2”, which is larger than the value at time “T4”. The value of data 2 at time “T3” is “2.2”, which is larger than the value at time “T4”. In this case, the magnitude relationship between the time “T3” and the time “T4” between the data 1 and the data 2 is the same.

ケンドールの順位相関係数を用いた類似度tは以下の式(A)で表される。
t=(4×P/n×(n−1))−1・・・式(A)
The similarity t using the Kendall rank correlation coefficient is expressed by the following equation (A).
t = (4 * P / n * (n-1))-1 ... Formula (A)

以下、類似度を相関値と称することもある。式(A)のうち、Pはデータ1とデータ2との大小関係が一致する数(一致数)である。nは項目数である。図1の例の場合、項目数nは「4」である。   Hereinafter, the similarity may be referred to as a correlation value. In the formula (A), P is the number (the number of matches) in which the magnitude relationship between data 1 and data 2 matches. n is the number of items. In the example of FIG. 1, the number of items n is “4”.

図1の例の場合、データ1とデータ2との大小関係が一致する数は「4」であるため、「P=4」である。従って、項目数nおよび一致数Pを式(A)に当て嵌めると、類似度tは「t=(4×4×/(4×(4−1))=0.33」となる。   In the case of the example of FIG. 1, the number of data 1 and data 2 having the same magnitude relationship is “4”, so “P = 4”. Therefore, when the item number n and the coincidence number P are applied to the equation (A), the similarity t is “t = (4 × 4 × / (4 × (4-1))) = 0.33”.

<データ処理装置の一例>
図2は、実施形態のデータ処理装置1の一例を示す。データ処理装置1は、記憶部11と検出部12と計数部13と演算部14と差分処理部15とを含む。データ処理装置1は、コンピュータの一例である。
<Example of data processing device>
FIG. 2 shows an example of the data processing apparatus 1 of the embodiment. The data processing device 1 includes a storage unit 11, a detection unit 12, a counting unit 13, a calculation unit 14, and a difference processing unit 15. The data processing device 1 is an example of a computer.

記憶部11は、各種の情報を記憶する。例えば、記憶部11は、複数の時系列データを記憶する。複数の時系列データは、例えば、それぞれ異なるセンサが計測したデータであってもよいし、異なる商品の売り上げの経時的な変化を示すデータ等であってもよい。   The storage unit 11 stores various types of information. For example, the storage unit 11 stores a plurality of time series data. The plurality of time-series data may be, for example, data measured by different sensors, or data indicating changes in sales of different products over time.

検出部12は、記憶部11に記憶された複数の時系列データのうち、比較対象の2つの時系列データにおいて、時間差ごとに、時刻間の大小関係が変化する変化点を検出する。計数部13は、検出部12が検出した変化点に基づいて、2つの時系列データの大小関係が一致する数を一致数として計数する。   The detection unit 12 detects a change point at which the magnitude relationship between the times changes for each time difference in the two time series data to be compared among the plurality of time series data stored in the storage unit 11. Based on the change point detected by the detection unit 12, the counting unit 13 counts the number of coincidence of two time-series data as the number of matches.

演算部14は、計数部13が計数した一致数Pおよび項目数nを上述した式(A)に当て嵌めて、2つの時系列データの類似度tを演算する。差分処理部15は、2つの時系列データのうち比較対象の期間をずらす処理や、該期間がずらされた場合における各種の処理を行う。   The calculating unit 14 calculates the similarity t between the two time-series data by fitting the coincidence number P and the item number n counted by the counting unit 13 to the above-described equation (A). The difference processing unit 15 performs a process of shifting the comparison target period of the two time-series data, and various processes when the period is shifted.

<データ処理装置のハードウェア構成の一例>
次に、図3の例を参照して、データ処理装置1のハードウェア構成の一例を説明する。図3の例に示すように、バス100に対して、プロセッサ111とRandom Access Memory(RAM)112とRead Only Memory(ROM)113と補助記憶装置114と媒体接続部115と通信インタフェース116とが接続されている。
<Example of hardware configuration of data processing apparatus>
Next, an example of the hardware configuration of the data processing apparatus 1 will be described with reference to the example of FIG. As shown in the example of FIG. 3, a processor 111, a random access memory (RAM) 112, a read only memory (ROM) 113, an auxiliary storage device 114, a medium connection unit 115, and a communication interface 116 are connected to the bus 100. Has been.

プロセッサ111は任意の処理回路である。プロセッサ111はRAM112に展開されたプログラムを実行する。実行されるプログラムとしては、実施形態の処理を行うデータ処理プログラムが適用されてもよい。ROM113はRAM112に展開されるプログラムを記憶する不揮発性の記憶装置である。   The processor 111 is an arbitrary processing circuit. The processor 111 executes a program expanded in the RAM 112. As a program to be executed, a data processing program for performing the processing of the embodiment may be applied. The ROM 113 is a non-volatile storage device that stores programs developed in the RAM 112.

補助記憶装置114は、種々の情報を記憶する記憶装置であり、例えばハードディスクドライブや半導体メモリ等を補助記憶装置114に適用してもよい。媒体接続部115は、可搬型記録媒体119と接続可能に設けられている。   The auxiliary storage device 114 is a storage device that stores various types of information. For example, a hard disk drive or a semiconductor memory may be applied to the auxiliary storage device 114. The medium connection unit 115 is provided so as to be connectable to the portable recording medium 119.

可搬型記録媒体119としては、可搬型のメモリや光学式ディスク(例えば、Compact Disc(CD)やDigital Versatile Disc(DVD)等)を適用してもよい。この可搬型記録媒体119に実施形態の処理を行うプログラムが記録されていてもよい。   As the portable recording medium 119, a portable memory or an optical disc (for example, Compact Disc (CD), Digital Versatile Disc (DVD), etc.) may be applied. A program for performing the processing of the embodiment may be recorded on the portable recording medium 119.

データ処理装置1のうち、記憶部11は、RAM112や補助記憶装置114等により実現されてもよい。検出部12と計数部13と演算部14と差分処理部15とは与えられたデータ処理プログラムをプロセッサ111が実行することにより実現されてもよい。   In the data processing device 1, the storage unit 11 may be realized by the RAM 112, the auxiliary storage device 114, and the like. The detection unit 12, the counting unit 13, the calculation unit 14, and the difference processing unit 15 may be realized by the processor 111 executing a given data processing program.

RAM112、ROM113、補助記憶装置114および可搬型記録媒体119は、何れもコンピュータ読み取り可能な有形の記憶媒体の一例である。これらの有形な記憶媒体は、信号搬送波のような一時的な媒体ではない。   The RAM 112, the ROM 113, the auxiliary storage device 114, and the portable recording medium 119 are all examples of a tangible storage medium that can be read by a computer. These tangible storage media are not temporary media such as signal carriers.

<類似度の演算の手法の一例>
実施形態では、演算部14は、2つの時系列データの類似度を複数種類の手法で演算する。図4は、以下の(1)〜(3)の3種類の類似度の演算の手法の例を示す。
<Example of similarity calculation method>
In the embodiment, the calculation unit 14 calculates the similarity between two time-series data using a plurality of types of methods. FIG. 4 shows an example of the following three types of similarity calculation methods (1) to (3).

(1)は、4つの時系列データの同じ期間の類似度の演算を行う例を示す。図4の例では、「4つのデータの比較」として示される。この場合、演算部14は、4つの時系列データのうち、2つの時系列データのペアについて、各ペアの類似度の演算を行う。比較対象となる時系列データの数は4つには限定されない。   (1) shows an example of calculating similarity of four time-series data in the same period. In the example of FIG. 4, it is shown as “comparison of four data”. In this case, the calculation unit 14 calculates the similarity of each pair of two time-series data among the four time-series data. The number of time series data to be compared is not limited to four.

(2)は、2つの時系列データの双方について、比較対象の期間がずらされながら、2つの時系列データの類似度の演算が行われる例を示す。
を行う例を示す。
(2) shows an example in which the similarity between two time series data is calculated while the comparison target periods are shifted for both of the two time series data.
An example of performing

(3)は、2つの時系列データのうち一方が固定され、比較対象の片方の期間がずらされながら、2つの時系列データの類似度の演算が行われる例を示す。   (3) shows an example in which one of the two time-series data is fixed and the similarity between the two time-series data is calculated while one of the comparison target periods is shifted.

(1)乃至(3)において、2つの時系列データの全ての時刻が、一致数の計数の対象であってもよいし、2つの時系列データのうち一部の期間が、一致数の計数の対象であってもよい。   In (1) to (3), all the times of the two time-series data may be targets for counting the number of matches, or some periods of the two time-series data are counted for the number of matches. It may be a target.

以下、一致数の計数の対象となる期間をウィンドウと称する。(2)において、差分処理部15は、2つの時系列データの双方のウィンドウを1回ずらすごとに、一致数の変化量を求める。   Hereinafter, the period for which the number of matches is counted is referred to as a window. In (2), the difference processing unit 15 obtains the amount of change in the number of matches each time the windows of the two time series data are shifted once.

差分処理部15がウィンドウをずらす場合、該ウィンドウは、時系列データの1つ後ろの時刻にずらされる(移動される)。ウィンドウは、比較対象の時間帯の最初の時刻を始点にセットされ、1つ後ろの時刻にずらされる。(3)の場合も同様である。   When the difference processing unit 15 shifts the window, the window is shifted (moved) to a time one time after the time-series data. The window is set to start at the first time in the time zone to be compared, and is shifted to the next time. The same applies to (3).

<変化点の検出の一例>
図5は、時系列データの変化点検出の一例を示す。図5の例では、時刻「1」から「10」までの各値がデータ1の時系列データとして示される。時系列データは、記憶部11に記憶される。
<Example of change point detection>
FIG. 5 shows an example of change point detection of time series data. In the example of FIG. 5, each value from time “1” to “10” is shown as time-series data of data 1. The time series data is stored in the storage unit 11.

検出部12は、時間差ごとに、時系列データの各時刻について前後の時刻の値の大小関係を比較し、大小関係が変化する変化点(変化する時刻)を検出する。実施形態では、時間差に応じて、次の時刻の値から見て、前の時刻の値が小さい場合、大小関係は「−」とする。   For each time difference, the detection unit 12 compares the magnitude relations of the time values before and after each time of the time-series data, and detects a change point (change time) at which the magnitude relation changes. In the embodiment, when the value of the previous time is small as seen from the value of the next time according to the time difference, the magnitude relationship is “−”.

また、実施形態では、時間差に応じて、次の時刻の値から見て、前の時刻の値が大きい場合、大小関係は「+」とする。例えば、図5の例において、時間差が「2」の場合、時刻「1」の値と時刻「3」の値とでは、時刻「3」の値が大きい。よって、時間差「2」における、時刻「1」の大小関係は「−」となる。   In the embodiment, when the value of the previous time is large as viewed from the value of the next time according to the time difference, the magnitude relationship is “+”. For example, in the example of FIG. 5, when the time difference is “2”, the value of time “3” is larger between the value of time “1” and the value of time “3”. Therefore, the magnitude relationship between the time “1” and the time difference “2” is “−”.

一方、時間差が「2」の場合、時刻「3」の値と時刻「5」の値とでは、時刻「5」の値が小さい。よって、時間差「2」における、時刻「3」の大小関係は「+」となる。従って、図5の例の場合、時間差が「2」の場合、時刻「3」において、大小関係が変化する。   On the other hand, when the time difference is “2”, the value of time “5” is small between the value of time “3” and the value of time “5”. Therefore, the magnitude relationship of the time “3” in the time difference “2” is “+”. Therefore, in the example of FIG. 5, when the time difference is “2”, the magnitude relationship changes at time “3”.

検出部12は、時間差ごとに、前後の時刻の大小関係が変化する変化点を検出し、検出された変化点を示すデータを変化点データとして記憶部11に記憶する。検出部12は、検出された変化点を示す情報が、時刻と大小関係とで表現された形式の変化点データを記憶部11に記憶する。   The detection unit 12 detects a change point where the magnitude relationship between the previous and next times changes for each time difference, and stores data indicating the detected change point in the storage unit 11 as change point data. The detection unit 12 stores, in the storage unit 11, change point data in a format in which information indicating the detected change point is expressed by a time and a magnitude relationship.

例えば、図5の例の場合、検出部12は、時間差が「2」、時刻「3」において、大小関係が「+」に変化することを検出する。検出部12は、時間差が「2」に対応する変化点データを「3+」の形式で記憶部11に記憶する。   For example, in the example of FIG. 5, the detection unit 12 detects that the magnitude relationship changes to “+” at the time difference “2” and the time “3”. The detection unit 12 stores the change point data corresponding to the time difference “2” in the storage unit 11 in the format “3+”.

図5の例において、2次元のマトリクス(2次元表と称されることもある)が示される。図5以降のマトリクスでは、時系列データの各時刻における値はX方向およびY方向に展開される。該マトリクスの要素は、各時間差における時系列データの各時刻の大小関係を表す。   In the example of FIG. 5, a two-dimensional matrix (sometimes referred to as a two-dimensional table) is shown. In the matrix after FIG. 5, the values of the time-series data at each time are developed in the X direction and the Y direction. The elements of the matrix represent the magnitude relationship of each time of the time series data at each time difference.

マトリクスにおいて、実線は大小関係が「+」であることを示し、点線は大小関係が「−」であることを示す。   In the matrix, the solid line indicates that the magnitude relationship is “+”, and the dotted line indicates that the magnitude relationship is “−”.

図5以降のマトリクスは、大小関係を視覚化したイメージである。該マトリクスでは、時間差ごとの各時刻における大小関係が記述される。従って、大小関係の情報量が多くなり、計数部13が、大小関係の一致数をカウントする場合の処理時間が長くなる。   The matrix after FIG. 5 is an image visualizing the magnitude relationship. In the matrix, the magnitude relationship at each time for each time difference is described. Accordingly, the amount of magnitude-related information increases, and the processing time when the counting unit 13 counts the number of coincidence of magnitude relations becomes long.

従って、実施形態では、計数部13は、図5以降に例示されるマトリクスを使用することなく、大小関係の一致数をカウントする。実施形態では、計数部13は、変化点データに基づいて、大小関係の一致数をカウントする。   Therefore, in the embodiment, the counting unit 13 counts the number of coincidence of magnitude relations without using the matrix illustrated in FIG. In the embodiment, the counting unit 13 counts the number of matches in magnitude relation based on the change point data.

図5以降のマトリクスにおいて、斜め方向の各要素は、1つの時間差についての大小関係を示す。斜め方向の各要素の始点がX方向にずれるごとに、時間差が大きくなる。図5の例の場合、X方向の時刻「3」、Y方向の時刻「1」を始点とした斜め方向の各要素が時間差「2」における大小関係を表す(図5における一点鎖線)。   In the matrix from FIG. 5 onward, each element in the diagonal direction indicates a magnitude relationship for one time difference. The time difference increases each time the starting point of each element in the oblique direction is shifted in the X direction. In the case of the example of FIG. 5, each element in the oblique direction starting from the time “3” in the X direction and the time “1” in the Y direction represents the magnitude relationship at the time difference “2” (the chain line in FIG. 5).

図5のマトリクスの例を参照すると、時間差が「2」の場合、Y方向における時刻「1」、「3」および「7」において、大小関係が変化する。検出部12は、時系列データを検索して、時間差「2」における変化点データを検出する。   Referring to the example of the matrix in FIG. 5, when the time difference is “2”, the magnitude relationship changes at times “1”, “3”, and “7” in the Y direction. The detection unit 12 searches the time series data to detect change point data at the time difference “2”.

図6は、時間差「2」の場合における変化点の検出の一例を示す。図6の例では、説明のため、マトリクスを用いた変化点の検出の例を示すが、検出部12は、マトリクスを用いずに、変化点の検出を行う。   FIG. 6 shows an example of change point detection when the time difference is “2”. In the example of FIG. 6, for the sake of explanation, an example of detection of change points using a matrix is shown, but the detection unit 12 detects change points without using a matrix.

時間差「2」の最初の変化点(図6の例において初期値)は「1−」である。検出部12は、最初の変化点から次の変化点までの間の区間(ブロック)が分離されているか否かを判定する。この区間は、図6の例において、X方向の時刻「3」から「5」、およびY方向の時刻「1」から「3」である。   The first change point of the time difference “2” (initial value in the example of FIG. 6) is “1”. The detection unit 12 determines whether or not a section (block) between the first change point and the next change point is separated. In the example of FIG. 6, this section is times “3” to “5” in the X direction and times “1” to “3” in the Y direction.

区間が分離されているか否かは、該区間のX方向における値の範囲とY方向における値の範囲との間で値が重複するか否かにより決定される。この区間のX方向の値の範囲は「7.5」から「4.5」であり、且つY方向の値は「2.1」から「7.5」である。   Whether or not the sections are separated is determined by whether or not the values overlap between the value range in the X direction and the value range in the Y direction of the section. The range of the value in the X direction in this section is “7.5” to “4.5”, and the value in the Y direction is “2.1” to “7.5”.

この場合、値「4.5」から「7.5」が重複する。従って、検出部12は、上記の区間は、「分離されていない」区間と判定し、変化点を検出する。一方、検出部12は、「分離されている」区間、同じ単調減少区間および同じ単調増加区間については、変化点の検出を行わない。   In this case, the values “4.5” to “7.5” overlap. Therefore, the detection unit 12 determines that the above-described section is a “non-separated” section and detects a change point. On the other hand, the detection unit 12 does not detect change points in the “separated” section, the same monotone decreasing section, and the same monotone increasing section.

単調増加区間は、時系列データの値が減少することなく増加する区間である。単調減少区間は、時系列データの値が増加することなく減少する区間である。同じ単調増加区間および同じ単調減少区間には、変化点が存在しないためである。   The monotonically increasing interval is an interval in which the time series data value increases without decreasing. The monotonically decreasing interval is an interval in which the time series data value decreases without increasing. This is because there are no change points in the same monotonically increasing section and the same monotonically decreasing section.

「分離されていない」区間については、区間のサイズが大きい場合、検出部12は、該区間を複数に分割して、変化点の検出を行ってもよい。   For a section that is not separated, when the section size is large, the detection unit 12 may detect the change point by dividing the section into a plurality of sections.

<ウィンドウをずらさない場合の類似度の演算の一例>
データ1とデータ2との大小関係の一致数の一例について説明する。図7の例において、データ1とデータ2との2つの時系列データは記憶部11に記憶される。計数部13は、2つの時系列データを比較して、大小関係の一致数をカウントする。
<Example of similarity calculation when the window is not shifted>
An example of the number of matches in the magnitude relationship between data 1 and data 2 will be described. In the example of FIG. 7, two time series data of data 1 and data 2 are stored in the storage unit 11. The counting unit 13 compares the two time-series data and counts the number of coincidence in magnitude.

図7の例の場合、データ1の比較対象の期間(ウィンドウ)は、時刻「2」から「6」であり、データ2のウィンドウは、時刻「4」から「8」である。従って、ウィンドウの範囲は「5」である。以下、ウィンドウ範囲を期間幅と称することもある。ウィンドウ範囲は、一致数を計数する期間の一例である。   In the case of the example in FIG. 7, the comparison target period (window) of data 1 is from time “2” to “6”, and the window of data 2 is from time “4” to “8”. Therefore, the window range is “5”. Hereinafter, the window range may be referred to as a period width. The window range is an example of a period for counting the number of matches.

図8は、図7の例に示した2つのデータの一致数のカウントの一例を示す。計数部13は、データ1およびデータ2のそれぞれの期間幅(ウィンドウ)を対象として、大小関係の一致数をカウントする。   FIG. 8 shows an example of the count of the number of matches of the two data shown in the example of FIG. The counting unit 13 counts the number of coincidence in magnitude relation for each period width (window) of data 1 and data 2.

比較対象は、時系列データの値の大小関係であるため、計数部13は、期間幅から「1」を減算した範囲内の大小関係を比較する。データ1とデータ2とでは、先頭の時刻が異なる。   Since the comparison target is the magnitude relationship between the values of the time series data, the counting unit 13 compares the magnitude relationships within a range obtained by subtracting “1” from the period width. Data 1 and data 2 have different leading times.

計数部13は、先頭の時刻から順に大小関係の一致数をカウントする。計数部13は、データ1とデータ2との先頭の時刻を揃えるため、インデックスを用いる。記憶部11には、データ1およびデータ2の時間差ごとの変化点データが記憶される。   The counting unit 13 counts the number of matching in order from the top time. The counting unit 13 uses an index to align the top times of data 1 and data 2. The storage unit 11 stores change point data for each time difference between the data 1 and the data 2.

計数部13は、インデックスを揃えるため、データ1およびデータ2の変化点データの各値から、先頭の時刻から「1」を減算した値を減算する。例えば、計数部13は、データ1の変化点データの各値から「2−1=1」を減算する。また、計数部13は、データ2の変化点データの各値から「4−1=3」を減算する。   The counter 13 subtracts a value obtained by subtracting “1” from the leading time from each value of the change point data of the data 1 and the data 2 in order to align the indexes. For example, the counting unit 13 subtracts “2-1 = 1” from each value of the change point data of the data 1. Further, the counting unit 13 subtracts “4-1 = 3” from each value of the change point data of the data 2.

これにより、データ1とデータ2との始点がインデックスにより揃えられる。計数部13は、ウィンドウ範囲「1」から「3」までの間におけるデータ1とデータ2との一致数をカウントする。   Thereby, the start points of data 1 and data 2 are aligned by the index. The counting unit 13 counts the number of matches between the data 1 and the data 2 in the window range “1” to “3”.

インデックス1における大小関係は、データ1およびデータ2の双方とも「−」である。よって、両者の大小関係は一致するため、計数部13は、大小関係の一致数を加算(インクリメント)する。大小関係の一致数の初期値はゼロである。   The magnitude relationship in index 1 is “-” for both data 1 and data 2. Accordingly, since the magnitude relationship between the two matches, the counting unit 13 adds (increments) the number of matches in the magnitude relationship. The initial value of the number of matches in the magnitude relationship is zero.

インデックス2における大小関係は、データ1は「+」に変化し、データ2は「−」である。インデックス3における大小関係は、データ1は「+」であり、データ2は「−」である。これらの場合、両者の大小関係は一致しないため、大小関係の一致数は変化しない。   As for the magnitude relationship in index 2, data 1 changes to “+” and data 2 is “−”. Regarding the magnitude relationship in the index 3, the data 1 is “+” and the data 2 is “−”. In these cases, since the magnitude relationship between the two does not match, the number of matches in the magnitude relationship does not change.

従って、計数部13は、ウィンドウ範囲内における大小関係の一致数を「1」としてカウントする。計数部13は、時間差「1」、「3」および「4」について、時間差「2」と同様に、データ1とデータ2との大小関係の一致数をカウントする。   Accordingly, the counting unit 13 counts the number of coincidence of magnitude relations within the window range as “1”. The counting unit 13 counts the number of coincidence between the data 1 and the data 2 for the time differences “1”, “3”, and “4” in the same manner as the time difference “2”.

図8の例の場合、一致数の合計は「2」である。この一致数の合計「2」が、上述した式(A)における一致数Pである。演算部14は、ウィンドウ範囲の項目数n(n=5)および一致数P(P=8)を上述した式(A)に当て嵌めて、類似度t=「−0.60」を得る。   In the example of FIG. 8, the total number of matches is “2”. The total “2” of the number of matches is the number of matches P in the above-described formula (A). The computing unit 14 fits the number of items n (n = 5) and the number of matches P (P = 8) in the window range to the above-described equation (A), and obtains the similarity t = “− 0.60”.

<双方のウィンドウをずらす場合の類似度の演算の一例>
次に、データ1およびデータの2の双方のウィンドウをずらす場合の類似度の演算の例について説明する。上述したように、計数部13は、図8の例で示されるウィンドウにおけるデータ1とデータ2との大小関係の一致数をカウントする。この場合、一致数Pは「2」である。
<Example of similarity calculation when shifting both windows>
Next, an example of similarity calculation when both the data 1 and data 2 windows are shifted will be described. As described above, the counting unit 13 counts the number of matches in the magnitude relationship between the data 1 and the data 2 in the window shown in the example of FIG. In this case, the coincidence number P is “2”.

差分処理部15は、データ1とデータ2とのそれぞれのウィンドウを時間軸方向に1つだけ後ろにずらす。計数部13は、ウィンドウの範囲内に変化点が入ったか否か、および該ウィンドウの範囲内から変化点が出たか否かに基づいて、データ1とデータ2との大小関係の一致数をカウントする。   The difference processing unit 15 shifts each window of data 1 and data 2 backward by one in the time axis direction. The counting unit 13 counts the number of coincidence of the magnitude relation between the data 1 and the data 2 based on whether or not the changing point has entered the window range and whether or not the changing point has come out from the window range. To do.

図9以降、実線で囲まれたウィンドウ範囲はウィンドウがずらされる前の範囲を示し、点線で囲まれたウィンドウ範囲はウィンドウがずらされた後の範囲を示す。   In FIG. 9 and subsequent figures, the window range surrounded by a solid line indicates a range before the window is shifted, and the window range surrounded by a dotted line indicates a range after the window is shifted.

図9の例の場合、差分処理部15がウィンドウをずらすことにより、一致数が2つ増え、且つ2つ減る。従って、一致数の変化量は「0=2−2」である。ウィンドウがずらされる前の一致数Pは「2」であったため、計数部13は、一致数Pが「2=2+0」としてカウントする。   In the case of the example in FIG. 9, the difference processing unit 15 shifts the window, so that the number of matches increases by two and decreases by two. Therefore, the amount of change in the number of matches is “0 = 2-2”. Since the coincidence number P before the window is shifted is “2”, the counting unit 13 counts the coincidence number P as “2 = 2 + 0”.

図10の例は、マトリクスにおいて、ウィンドウの位置が変化した場合、変化点がウィンドウから出る場合と、ウィンドウに入る場合とを示す。上述したように、マトリクスは、時系列データの大小関係のイメージである。   The example of FIG. 10 shows the case where the position of the window changes in the matrix, the case where the change point exits the window, and the case where the window enters the window. As described above, the matrix is an image of the magnitude relationship of time series data.

図10以降、基準のウィンドウは、差分処理部15によりずらされる前のウィンドウを示す。更新後のウィンドウは、差分処理部15によりずらされた後のウィンドウを示す。   In FIG. 10 and subsequent figures, the reference window indicates a window before being shifted by the difference processing unit 15. The updated window indicates the window after being shifted by the difference processing unit 15.

図11の例において、データ1における基準ウィンドウ内の前端(X方向の時刻「6」、Y方向の時刻「2」から「6」)の大小関係は全て「+」である。データ2における基準ウィンドウ内の先端(X方向の時刻「8」、Y方向の時刻「4」から「8」)の大小関係は全て「−」である。   In the example of FIG. 11, the magnitude relations of the front ends (time “6” in the X direction and times “2” to “6” in the Y direction) in the reference window in the data 1 are all “+”. All the magnitude relations of the front end (time “8” in the X direction and times “4” to “8” in the Y direction) in the reference window in the data 2 are “−”.

従って、ウィンドウがずらされる前における該ウィンドウ内の先端における大小関係の一致数はゼロである。   Therefore, the number of matches in the magnitude relationship at the tip in the window before the window is shifted is zero.

データ1における基準ウィンドウ外の後端(Y方向の時刻「1」、X方向の時刻「2」から「6」)の大小関係は全て「−」である。データ1における基準ウィンドウ外の後端(Y方向の時刻「3」、X方向の時刻「4」から「8」)の大小関係は全て「−」である。   The magnitude relations of the rear end outside the reference window in data 1 (time “1” in the Y direction and times “2” to “6” in the X direction) are all “−”. The magnitude relations of the rear end outside the reference window in data 1 (time “3” in the Y direction and times “4” to “8” in the X direction) are all “−”.

従って、ウィンドウがずらされる前における該ウィンドウ外の後端における大小関係の一致数は「4」である。一致数の変化量は、「−4=0−4」となる。   Accordingly, the number of coincidence of the magnitude relationship at the rear end outside the window before the window is shifted is “4”. The amount of change in the number of matches is “−4 = 0−4”.

ウィンドウがずらされた際に、変化点がウィンドウに出入りしなければ、一致数の変化量は一定である。一方、ウィンドウがずらされた際に、変化点がウィンドウに出入りする場合、一致数の変化量は変化する。   If the changing point does not enter or exit the window when the window is shifted, the amount of change in the number of matches is constant. On the other hand, when the change point enters and exits the window when the window is shifted, the amount of change in the number of matches changes.

図11の例の場合、ウィンドウがずらされた後(更新後)の一致数は「2」になる。図12の例を参照して、ウィンドウがずらされる際に、該ウィンドウに変化点が含まれる場合の例について説明する。   In the example of FIG. 11, the number of matches after the window is shifted (after update) is “2”. With reference to the example of FIG. 12, an example in which a change point is included in the window when the window is shifted will be described.

差分処理部15は、データ1およびデータ2のウィンドウをずらす。差分処理部15は、変化点データを参照して、ウィンドウがずらされたことにより、変化点が該ウィンドウに出入りするかを判定する。   The difference processing unit 15 shifts the windows for data 1 and data 2. The difference processing unit 15 refers to the change point data and determines whether or not the change point enters and exits the window when the window is shifted.

差分処理部15は、データ1とデータ2との時系列データのウィンドウをずらした際に、変化点データで特定される変化点が該ウィンドウに出入りする場合、該変化点の大小関係を反転させる。   The difference processing unit 15 reverses the magnitude relationship between the change points when the change point specified by the change point data enters and exits the window when the windows of the time series data of the data 1 and the data 2 are shifted. .

図12の例の場合、ウィンドウがずらされる前、時間差「1」および「2」のウィンドウ内前端の大小関係は「×」であった。ウィンドウがずらされることにより、時間差「1」および「2」のウィンドウ内前端に変化点が入る。従って、差分処理部15は、時間差「1」および「2」における変化点の大小関係を反転させる。   In the case of the example in FIG. 12, before the window is shifted, the size relationship between the front ends of the windows with the time differences “1” and “2” is “x”. As the window is shifted, a change point is entered at the front end in the window of the time difference “1” and “2”. Therefore, the difference processing unit 15 inverts the magnitude relationship between the change points at the time differences “1” and “2”.

また、ウィンドウがずらされる前、時間差「3」および「4」のウィンドウ外後端の大小関係は「○」であった。ウィンドウがずらされることにより、時間差「3」および「4」のウィンドウ外後端から変化点が出る。従って、差分処理部15は、時間差「3」および「4」における変化点の大小関係を反転させる。   Further, before the window was shifted, the size relationship between the rear end outside the window of the time difference “3” and “4” was “◯”. By shifting the window, a change point appears from the rear end outside the window of the time difference “3” and “4”. Accordingly, the difference processing unit 15 inverts the magnitude relationship between the change points at the time differences “3” and “4”.

その結果、データ1とデータ2とのウィンドウ内前端の一致数は「2」になり、ウィンドウ外後端の一致数は「2」になる。従って、差分処理部15は、一致数の変化量「0=2−2」を得る。ウィンドウがずらされる前の一致数は「2」であったため、差分処理部15は、一致数「2=2+0」を得る。   As a result, the number of matches at the front end in the window between data 1 and data 2 is “2”, and the number of matches at the rear end outside the window is “2”. Therefore, the difference processing unit 15 obtains the amount of change “0 = 2-2” in the number of matches. Since the number of matches before the window is shifted is “2”, the difference processing unit 15 obtains the number of matches “2 = 2 + 0”.

次に、図13の例を参照して、ウィンドウに対する変化点の位置関係を示す管理テーブルの一例について説明する。検出部12は、データ1およびデータ2の大小関係が変化する変化点を検出する。実施形態では、管理テーブルは記憶部11に記憶される。   Next, an example of a management table indicating the positional relationship of change points with respect to the window will be described with reference to the example of FIG. The detection unit 12 detects a change point at which the magnitude relationship between the data 1 and the data 2 changes. In the embodiment, the management table is stored in the storage unit 11.

また、上述したように、データ1およびデータ2の双方のウィンドウがずれる場合、ウィンドウに入る変化点、およびウィンドウから出る変化点に基づいて、ウィンドウの範囲内の大小関係の一致数が得られる。   Further, as described above, when the windows of both data 1 and data 2 are shifted, the number of coincidence of magnitude relations within the range of the window is obtained based on the change point entering the window and the change point exiting from the window.

そして、得られた一致数Pに基づいて、演算部14が上述した式(A)に基づいて演算を行うことにより、ウィンドウがずれるごとに、2つの時系列データの類似度が演算される。   Then, based on the obtained coincidence number P, the calculation unit 14 performs a calculation based on the above-described equation (A), whereby the similarity between the two time-series data is calculated each time the window is shifted.

検出部12は大小関係の変化点を検出する。計数部13は、ウィンドウと変化点との位置関係を管理する。実施形態では、図13の例に示す管理テーブルにより、差分処理部15は、ウィンドウと変化点との位置関係を管理する。   The detection unit 12 detects a change point of the magnitude relationship. The counting unit 13 manages the positional relationship between the window and the change point. In the embodiment, the difference processing unit 15 manages the positional relationship between the window and the change point using the management table illustrated in the example of FIG.

例えば、データ2において、ウィンドウがずれる前(更新前)は、変化点9番および10番は、ウィンドウの範囲内に入っていない。ただし、次の時間でウィンドウがずれることにより(更新後)、変化点9番および10番は、ウィンドウの範囲内に入る。   For example, in data 2, before the window shifts (before update), the change points No. 9 and No. 10 are not within the window range. However, when the window is shifted at the next time (after updating), the change points 9 and 10 fall within the window range.

ウィンドウの移動方向前端および移動方後端のそれぞれについて、変化点がウィンドウに入るか、または変化点がウィンドウから出るかが管理される。計数部13は、この管理テーブルに基づいて、ウィンドウに入る変化点およびウィンドウから出る変化点を認識することができる。   For each of the front end and the rear end of the moving direction of the window, it is managed whether the change point enters the window or the change point exits the window. The counting unit 13 can recognize the change point entering the window and the change point exiting the window based on the management table.

これにより、計数部31は、管理テーブルを参照するだけで、ウィンドウの位置の変化に応じた一致数の変化量を認識でき、ウィンドウの位置が変化した後の、データ1とデータ2との大小関係の一致数を簡単に得ることができる。   Thus, the counting unit 31 can recognize the amount of change in the number of matches according to the change in the position of the window only by referring to the management table, and the magnitude of the data 1 and the data 2 after the change in the position of the window The number of matching relationships can be easily obtained.

図13の例において、差分処理部15は、時系列データと変化点データとに基づいて、各変化点とウィンドウとの位置関係を認識する。図13の例では、差分処理部15は、ウィンドウ内後端から出る変化点とウィンドウ内前端に位置する変化点とをテーブルを用いて管理する。このテーブルを管理テーブルと称する。   In the example of FIG. 13, the difference processing unit 15 recognizes the positional relationship between each change point and the window based on the time series data and the change point data. In the example of FIG. 13, the difference processing unit 15 manages a change point coming out from the rear end in the window and a change point located at the front end in the window using a table. This table is referred to as a management table.

管理テーブルは、変化点ごとに、ウィンドウ内前端またはウィンドウ外後端に到達するまでの時間(到達時間)を示すテーブルである。到達時間は、ウィンドウ内前端またはウィンドウ外後端に到達するまでに、ウィンドウがずらされる回数を示す。   The management table is a table indicating the time (arrival time) to reach the front end in the window or the rear end outside the window for each change point. The arrival time indicates the number of times the window is shifted before reaching the front end in the window or the rear end outside the window.

図13の例の場合、ウィンドウがずれた後、変化点9番および10番は、ウィンドウに入る。また、ウィンドウがずれた後、変化点1番および2番は、ウィンドウから出る。よって、差分処理部15は、変化点1番、2番、9番および10番を到達時間ゼロとして、管理テーブルを用いて管理する。   In the case of the example of FIG. 13, after the window is shifted, the change points 9 and 10 enter the window. Also, after the window is shifted, change points 1 and 2 exit from the window. Therefore, the difference processing unit 15 manages the change points No. 1, No. 2, No. 9, and No. 10 using the management table with the arrival time being zero.

従って、差分処理部15は、管理テーブルを用いて、ウィンドウと各変化点との位置関係を管理することで、ウィンドウに出入りする変化点を容易に認識することができる。差分処理部15は、ウィンドウがずれた後における一致数の変化量を求める。   Therefore, the difference processing unit 15 can easily recognize a change point entering and exiting the window by managing the positional relationship between the window and each change point using the management table. The difference processing unit 15 obtains the amount of change in the number of matches after the window is shifted.

この際、差分処理部15は、ウィンドウをずらした際に、管理テーブルを参照するだけで、ウィンドウに出入りする変化点を容易に認識することができ、一致数の変化量を迅速に求めることができる。   At this time, when the window is shifted, the difference processing unit 15 can easily recognize the changing point entering and exiting the window only by referring to the management table, and can quickly determine the amount of change in the number of matches. it can.

<片方のウィンドウをずらす場合の類似度の演算の一例>
次に、データ1とデータ2とのうち片方のウィンドウを固定し、他方のウィンドウをずらす場合における類似度の演算について説明する。上述したように、ウィンドウがずらされる前におけるデータ1とデータ2との大小関係の一致数Pは「2」である。
<Example of similarity calculation for shifting one window>
Next, the calculation of the similarity when one of the data 1 and the data 2 is fixed and the other window is shifted will be described. As described above, the matching number P of the magnitude relationship between the data 1 and the data 2 before the window is shifted is “2”.

片方のウィンドウがずらされる場合、計数部13は、ウィンドウの移動方向前端および移動方向後端の一致数の変化量だけでなく、ウィンドウ内での変化点の位置関係も考慮して、データ1とデータ2との大小関係をカウントする。   When one of the windows is shifted, the counting unit 13 considers not only the amount of change in the coincidence number of the front end and the rear end in the moving direction of the window but also the positional relationship between the changing points in the window and the data 1 and The magnitude relationship with data 2 is counted.

図14の例では、データ1のウィンドウは固定され(固定ウィンドウ)、データ2のウィンドウがずらされる。ウィンドウ内の相対位置を基準に見ると、ウィンドウがずらされるごとに、データ1のウィンドウ内の変化点とデータ2のウィンドウ内の変化点との相対位置関係が変化する。   In the example of FIG. 14, the window for data 1 is fixed (fixed window), and the window for data 2 is shifted. Looking at the relative position in the window as a reference, each time the window is shifted, the relative positional relationship between the change point in the data 1 window and the change point in the data 2 window changes.

データ1の固定ウィンドウ内の変化点は固定されているため、データ2のウィンドウ内の変化点が、データ1の固定ウィンドウ内の変化点を追い越す場合がある。計数部13は、この追い越しも考慮して、データ1とデータ2との大小関係をカウントする。   Since the change point in the fixed window of data 1 is fixed, the change point in the window of data 2 may overtake the change point in the fixed window of data 1 in some cases. The counter 13 counts the magnitude relationship between the data 1 and the data 2 in consideration of this overtaking.

図15の例は、データ2のウィンドウ(以下、移動ウィンドウと称することもある)がずらされた後における大小関係の一致数の変化量が「2」である場合を示している。   The example of FIG. 15 shows a case where the amount of change in the number of coincidences in the magnitude relationship after the window of data 2 (hereinafter also referred to as a moving window) is shifted is “2”.

2つのデータのウィンドウのうち、片方のウィンドウを固定し、片方のウィンドウをずらす場合、大小関係の一致数をカウントするため、差分処理部15は、固定ウィンドウに対して、変化点を追加する。   In the case where one of the two data windows is fixed and one of the windows is shifted, the difference processing unit 15 adds a change point to the fixed window in order to count the number of coincidence in magnitude.

図16の例に示すように、差分処理部15は、固定ウィンドウに対して、タイプAとタイプBとタイプCとの3つのタイプを設定する。差分処理部15は、タイプに応じて、固定ウィンドウに対して、変化点を追加する。タイプCの場合、差分処理部15は、変化点を追加しない。   As illustrated in the example of FIG. 16, the difference processing unit 15 sets three types of type A, type B, and type C for the fixed window. The difference processing unit 15 adds a change point to the fixed window according to the type. In the case of type C, the difference processing unit 15 does not add a change point.

タイプAの範囲は、固定ウィンドウ外の前端に設定され、タイプBの範囲は、固定ウィンドウ内の後端に設定される。また、タイプAの範囲とタイプBの範囲とは、同じ時間差の範囲に設定される。   The type A range is set at the front end outside the fixed window, and the type B range is set at the rear end inside the fixed window. The type A range and the type B range are set to the same time difference range.

例えば、図16の例の場合、タイプAの範囲は、固定ウィンドウ外の前端であるY方向の時刻「7」、時間差「1」から「4」に設定される。タイプBの範囲は、固定ウィンドウ内の後端であるX方向の時刻「2」、時間差「1」から「4」に設定される。タイプCは、固定ウィンドウ内のタイプBの範囲以外に設定される。   For example, in the example of FIG. 16, the type A range is set to a time “7” in the Y direction, which is the front end outside the fixed window, and a time difference “1” to “4”. The range of type B is set to a time “2” in the X direction, which is the rear end of the fixed window, and a time difference “1” to “4”. Type C is set outside the range of type B in the fixed window.

差分処理部15は、タイプAの範囲およびタイプBの範囲に変化点の要素がなければ、該要素を変化点として追加する。この際、差分処理部15は、変化点を追加する要素の大小関係を反転させて、変化点を追加する。   If there is no change point element in the type A range and the type B range, the difference processing unit 15 adds the element as a change point. At this time, the difference processing unit 15 adds the change point by inverting the magnitude relation of the element to which the change point is added.

図16の例では、タイプAの範囲に変化点はなく、タイプBの範囲に2つの変化点が存在する。従って、差分処理部15は、大小関係を反転させて、タイプAの範囲に4つの変化点を追加し、タイプBの範囲に2つの変化点を追加する。   In the example of FIG. 16, there is no change point in the type A range, and there are two change points in the type B range. Therefore, the difference processing unit 15 reverses the magnitude relationship, adds four change points to the type A range, and adds two change points to the type B range.

図17は、片方のウィンドウをずらす場合の一致数の変化量の一例を示す。差分処理部15は、上述したタイプごとに、変化量の重み付けを行う。図17の例では、タイプAの範囲の各要素において大小関係が一致する場合、重みは「0」であり、大小関係が一致しない場合、重みは「1」である。   FIG. 17 shows an example of the amount of change in the number of matches when one window is shifted. The difference processing unit 15 weights the amount of change for each type described above. In the example of FIG. 17, the weight is “0” when the magnitude relationship matches in each element of the type A range, and the weight is “1” when the magnitude relationship does not match.

タイプBの範囲の各要素において大小関係が一致する場合、重みは「−1」であり、大小関係が一致しない場合、重みは「0」である。タイプCの範囲の各要素において大小関係が一致する場合、重みは「−1」であり、大小関係が一致しない場合、重みは「1」である。   The weight is “−1” when the magnitude relationship is the same in each element of the type B range, and the weight is “0” when the magnitude relationship is not the same. The weight is “−1” when the magnitude relationship is the same in each element of the type C range, and the weight is “1” when the magnitude relationship is not the same.

図17の例において、「アンカー」は、変化点のある要素を示す。アンカーには、追加された変化点も含まれる。図17の例において、差分処理部15は、データ1の固定ウィンドウ内の各アンカーにおける大小関係と、データ2のウィンドウにおける対応する点の大小関係とが一致するかを検出する。   In the example of FIG. 17, “anchor” indicates an element having a change point. The anchor also includes the added change point. In the example of FIG. 17, the difference processing unit 15 detects whether the magnitude relationship between the anchors in the fixed window of data 1 matches the magnitude relationship of the corresponding points in the window of data 2.

図17の例の場合、タイプAの範囲の4つの要素は全て大小関係が一致し、タイプBの範囲の4つの要素は全て大小関係が一致せず、タイプCの範囲の2つの要素は全て大小関係が一致しない。計数部13は、上記の重みに基づいて、大小関係の一致数の変化量を得る。図17の例の場合、大小関係の一致数の変化量は「2(=0+0+2)」である。   In the example of FIG. 17, all four elements in the type A range have the same magnitude relationship, all four elements in the type B range do not have the same magnitude relationship, and all the two elements in the type C range The magnitude relationship does not match. The counting unit 13 obtains the amount of change in the number of coincidence in magnitude relation based on the weight. In the case of the example in FIG. 17, the amount of change in the number of coincidences in the magnitude relationship is “2 (= 0 + 0 + 2)”.

次に、図18の例を参照して、変化量の重みについて説明する。図18の例において、薄い網掛けは大小関係が「−」である期間を示し、濃い網掛けは大小関係が「+」であることを示す。   Next, the weight of the change amount will be described with reference to the example of FIG. In the example of FIG. 18, light shading indicates a period in which the magnitude relationship is “−”, and dark shading indicates that the magnitude relationship is “+”.

タイプAにおいて、アンカーの位置でデータ1とデータ2との大小関係が一致している場合、データ2のウィンドウがずらされたとしても、ウィンドウ内の一致数は増減しない。従って、この場合の変化量の重みはゼロである。   In Type A, when the magnitude relationship between data 1 and data 2 matches at the anchor position, the number of matches in the window does not increase or decrease even if the window of data 2 is shifted. Therefore, the weight of the change amount in this case is zero.

タイプAにおいて、アンカーの位置でデータ1とデータ2との大小関係が不一致の場合、データ2のウィンドウがずらされると、ウィンドウ内の一致数は1つ増える。従って、この場合の変化量の重みは「1」である。   In type A, when the magnitude relationship between data 1 and data 2 does not match at the anchor position, the number of matches in the window increases by one when the window of data 2 is shifted. Accordingly, the weight of the change amount in this case is “1”.

タイプBにおいて、アンカーの位置でデータ1とデータ2との大小関係が一致している場合、データ2のウィンドウがずらされると、ウィンドウ内の一致数は1つ減る。従って、この場合の変化量の重みは「−1」である。   In type B, when the magnitude relationship between data 1 and data 2 matches at the anchor position, the number of matches in the window decreases by one when the window of data 2 is shifted. Accordingly, the weight of the change amount in this case is “−1”.

タイプBにおいて、アンカーの位置でデータ1とデータ2との大小関係が不一致の場合、データ2のウィンドウがずらされたとしても、ウィンドウ内の一致数は増減しない。従って、この場合の変化量の重みはゼロである。   In Type B, if the magnitude relationship between data 1 and data 2 does not match at the anchor position, the number of matches in the window does not increase or decrease even if the window of data 2 is shifted. Therefore, the weight of the change amount in this case is zero.

タイプCにおいて、アンカーの位置でデータ1とデータ2との大小関係が一致している場合、データ2のウィンドウがずらされると、ウィンドウ内の一致数は1つ減る。従って、この場合の変化量の重みは「−1」である。   In type C, when the magnitude relationship between data 1 and data 2 matches at the anchor position, the number of matches in the window decreases by one when the window of data 2 is shifted. Accordingly, the weight of the change amount in this case is “−1”.

タイプCにおいて、アンカーの位置でデータ1とデータ2との大小関係が不一致の場合、データ2のウィンドウがずらされると、ウィンドウ内の一致数は1つ増える。従って、この場合の変化量の重みは「1」である。   In type C, if the magnitude relationship between data 1 and data 2 does not match at the anchor position, the number of matches in the window increases by one when the window of data 2 is shifted. Accordingly, the weight of the change amount in this case is “1”.

図19は、データ2のウィンドウをずらした後における大小関係の一致数の変化量の一例を示す。図19の例に示されるように、データ2のウィンドウがずらされると、タイプBの2つのアンカーに対応するデータ2のウィンドウ内の点が変化点になる。   FIG. 19 shows an example of the amount of change in the number of coincidences in magnitude relation after the window of data 2 is shifted. As shown in the example of FIG. 19, when the data 2 window is shifted, points in the data 2 window corresponding to two anchors of type B become change points.

この場合、差分処理部15は、上記2つのアンカーを反転させる。図19の例の場合、2つのアンカーの一致関係は不一致であった。差分処理部15は、更新後(データのウィンドウがずらされた後)の2つのアンカーの一致関係を一致に反転させる。   In this case, the difference processing unit 15 inverts the two anchors. In the case of the example of FIG. 19, the coincidence relationship between the two anchors was not coincident. The difference processing unit 15 inverts the coincidence relationship between the two anchors after the update (after the data window is shifted) to coincidence.

図19の例では、データ2のウィンドウがずらされた結果、データ1とデータ2とで対応する点の大小関係の一致が反転された場合、タイプごとの重みに基づいて、差分処理部15は、大小関係の一致数の変化量を得る。   In the example of FIG. 19, as a result of shifting the window of data 2, when the coincidence of the magnitude relations of corresponding points between data 1 and data 2 is reversed, the difference processing unit 15 is based on the weight for each type. , To obtain the amount of change in the number of matches in the magnitude relationship.

図19の例に示されるように、タイプAのアンカーが一致から不一致になった場合、重みはゼロから「1」に変化するため、変化量の差分は「1」になる。タイプAのアンカーが一致から不一致になった場合、重みは「1」からゼロに変化するため、変化量の差分は「−1」になる。   As shown in the example of FIG. 19, when the type A anchor changes from matching to mismatching, the weight changes from zero to “1”, so the difference in change amount is “1”. When the type A anchor changes from match to mismatch, the weight changes from “1” to zero, so the difference in change amount is “−1”.

タイプBのアンカーが一致から不一致になった場合、重みの変化に基づいて、変化量の差分は「1」になる。タイプBのアンカーが不一致から一致になった場合、重みの変化に基づいて、変化量の差分は「−1」になる。   When the type B anchor changes from matching to mismatching, the difference in change amount is “1” based on the change in weight. When the type B anchors are matched from the mismatch, the change amount difference is “−1” based on the change in the weight.

タイプCのアンカーが一致から不一致になった場合、重みの変化に基づいて、変化量の差分は「2」になる。タイプCのアンカーが不一致から一致になった場合、重みの変化に基づいて、変化量の差分は「−2」になる。   When the type C anchor changes from matching to mismatching, the change amount difference is “2” based on the change in weight. When the type C anchors change from mismatch to match, the difference in change amount is “−2” based on the change in weight.

差分処理部15は、各アンカーの変化量の差分を求める。図19の例の場合、タイプBの2つのアンカーが一致から不一致に変化したため、差分処理部15は、大小関係の一致数の変化量から「−2(=−1−1)」を減算する。   The difference processing unit 15 obtains a difference in the change amount of each anchor. In the case of the example in FIG. 19, since the two type B anchors have changed from matching to mismatching, the difference processing unit 15 subtracts “−2 (= −1-1)” from the amount of change in the matching number of magnitude relationships. .

上述したように、更新前(データ2のウィンドウをずらす前)の一致数の変化量は「2」であったため、差分処理部15は、更新後(データ2のウィンドウをずらした後)の一致数の変化量「4(=2−(−2))」を得る。   As described above, since the amount of change in the number of matches before update (before shifting the window of data 2) was “2”, the difference processing unit 15 matches after update (after shifting the window of data 2). The number change amount “4 (= 2 − (− 2))” is obtained.

次に、片方のウィンドウをずらす場合における管理テーブルについて説明する。上述したように、管理テーブルは、ウィンドウと変化点との位置関係を管理するテーブルである。図20は、片方のウィンドウをずらす場合における管理テーブルの一例を示す。   Next, a management table in the case of shifting one of the windows will be described. As described above, the management table is a table that manages the positional relationship between the window and the change point. FIG. 20 shows an example of the management table when one window is shifted.

差分処理部15は、データ1のアンカーの各要素およびデータ2の各変化点にアドレスを付与する。図20の例では、差分処理部15は、アンカーの各要素のアドレスに対してアルファベットを付与し、データ2の各変化点のアドレスに対して数字を付与する。   The difference processing unit 15 assigns an address to each element of the anchor of data 1 and each change point of data 2. In the example of FIG. 20, the difference processing unit 15 assigns an alphabet to the address of each element of the anchor, and assigns a number to the address of each change point of the data 2.

例えば、管理テーブルの「4−b」は、データ2の変化点のアドレスが「4」であり、且つアンカーのアドレスが「b」であることを示す。更新前における「4−b」は、データ2のウィンドウがずらされる前のアドレスを示す。   For example, “4-b” in the management table indicates that the address of the change point of data 2 is “4” and the address of the anchor is “b”. “4-b” before the update indicates an address before the window of data 2 is shifted.

データ2のウィンドウがずらされた場合、差分処理部15は、ウィンドウに入った変化点について、アンカーの付け替えを行うか否かを判定する。差分処理部15は、以下の2つの基準に応じて、アンカーの付け替えを行う。
(1)ウィンドウに入った変化点が1つ前のアンカーに対応する場合
(2)ウィンドウに入った変化点の1つ後ろの変化点が、該変化点のアンカーに対応する場合
When the window of data 2 is shifted, the difference processing unit 15 determines whether or not to change the anchor for the changing point that has entered the window. The difference processing unit 15 performs anchor replacement according to the following two criteria.
(1) When the change point entering the window corresponds to the previous anchor (2) When the change point immediately after the change point entering the window corresponds to the anchor of the change point

図20の例の場合、アドレス「4−b」のうち「b」より前に対応するアンカーはない。従って、差分処理部15は、上記(1)を満たしていないと判定する。また、ウィンドウに入った変化点のアドレス「4−b」の1つ後ろの変化点は「5」である。   In the case of the example of FIG. 20, there is no corresponding anchor before “b” in the address “4-b”. Therefore, the difference processing unit 15 determines that the above (1) is not satisfied. In addition, the change point immediately after the address “4-b” of the change point entering the window is “5”.

ただし、データ2の変化点のアドレス「5」はアンカー「i」に対応する。つまり、差分処理部15は、管理テーブルでは、データ2の変化点のアドレス「5」を「5−i」として管理する。   However, the address “5” of the change point of data 2 corresponds to the anchor “i”. That is, the difference processing unit 15 manages the address “5” of the change point of the data 2 as “5-i” in the management table.

従って、変化点「4」のアンカーは「b」であり、1つ後ろの変化点「5」のアンカーは「i」であるため、アンカーが対応していない。このため、差分処理部15は、上記(2)の条件が満たされていないと判定する。   Therefore, the anchor of the change point “4” is “b”, and the anchor of the next change point “5” is “i”, so the anchor does not correspond. For this reason, the difference processing unit 15 determines that the condition (2) is not satisfied.

<各種具体例の説明>
次に、図21の例に示される3つの時系列データ(データ1からデータ3)について、時系列データの類似度の演算の3つの具体例を説明する。
<Description of various specific examples>
Next, three specific examples of calculating the similarity of time series data for the three time series data (data 1 to data 3) shown in the example of FIG. 21 will be described.

具体例1(図21の(1))は、データ1とデータ2との間の類似度、データ1とデータ3との間の類似度、およびデータ2とデータ3との間の類似度を演算する例である。類似度の演算の対象となる期間は時刻「2」から「8」である。類似度の演算の対象となる期間は、上述したウィンドウである。   Specific example 1 ((1) in FIG. 21) shows the similarity between data 1 and data 2, the similarity between data 1 and data 3, and the similarity between data 2 and data 3. This is an example of calculation. The period for which the similarity is calculated is from time “2” to “8”. The period for which the similarity is calculated is the window described above.

具体例2(図21の(2))は、類似度の演算の対象となる時系列データはデータ1およびデータ2の2つである。具体例2では、類似度の演算の対象となる期間は時刻「1」から「7」および時刻「4」から「10」である。   In specific example 2 ((2) in FIG. 21), the time series data to be subjected to the calculation of the similarity is two data 1 and data 2. In the second specific example, the period for which the similarity is calculated is time “1” to “7” and time “4” to “10”.

具体例2では、差分処理部15は、データ1およびデータ2の双方のウィンドウをずらしながら、一致数の変化量を求める。そして、具体例2では、演算部14は、合計4ペアの類似度(相関値)を演算する。   In the second specific example, the difference processing unit 15 obtains the amount of change in the number of matches while shifting the windows of both data 1 and data 2. And in the specific example 2, the calculating part 14 calculates the similarity (correlation value) of a total of 4 pairs.

具体例3(図21の(3))は、類似度の演算の対象となる時系列データはデータ1およびデータ2の2つである。具体例3では、類似度の演算の対象となる期間は時刻「3」から「9」および時刻「4」から「10」である。   In specific example 3 ((3) in FIG. 21), the time series data that is the target of similarity calculation is data 1 and data 2. In the third specific example, the period for which the similarity is calculated is time “3” to “9” and time “4” to “10”.

具体例3では、差分処理部15は、データ1およびデータ2ののうち、データ1のウィンドウを固定し、データ2のウィンドウをずらしながら、一致数の変化量を求める。そして、具体例3では、演算部14は、合計4ペアの類似度(相関値)を演算する。   In the third specific example, the difference processing unit 15 fixes the window of the data 1 out of the data 1 and the data 2, and obtains the amount of change in the number of matches while shifting the window of the data 2. And in the specific example 3, the calculating part 14 calculates the similarity (correlation value) of a total of 4 pairs.

<具体例1>
図22は、時間差が「1」の場合における変化点の検出の例を示す。図22の例に示される時系列データにおいて、時刻「1」から「3」は値が単調増加し、時刻「3」から「7」は値が単調減少し、「7」から「10」は値が単調減少する。
<Specific example 1>
FIG. 22 shows an example of change point detection when the time difference is “1”. In the time-series data shown in the example of FIG. 22, the values monotonically increase from time “1” to “3”, the values monotonously decrease from time “3” to “7”, and “7” to “10” The value decreases monotonously.

従って、値の大小関係が変化する時刻は「1」、「3」、「7」および「10」である。図22以降の例において、実線の矢印は、単調増加区間を示し、破線の矢印は単調減少区間を示す。   Therefore, the time when the magnitude relationship of the values changes is “1”, “3”, “7”, and “10”. In the examples after FIG. 22, the solid arrow indicates a monotonically increasing section, and the broken arrow indicates a monotonically decreasing section.

検出部12は、値の大小関係が変化する時刻に加えて、該時刻の前の時刻を考慮して、変化点を検出する。検出部12は、図23の例のうち、区間「1」から「2」、区間「2」から「3」、区間「3」から「6」、区間「6」から「7」、および区間「7」から「9」を比較処理する対象の区間として、変化点を検出する。   The detection unit 12 detects the change point in consideration of the time before the time in addition to the time when the magnitude relationship of the values changes. In the example of FIG. 23, the detection unit 12 includes the sections “1” to “2”, the sections “2” to “3”, the sections “3” to “6”, the sections “6” to “7”, and the sections A change point is detected as a section to be compared from “7” to “9”.

上記の各区間は、図23の例において、「比較元」として表記されており、「比較元」はマトリクスのY方向である。「比較先」は、時間差が「1」であるため、「比較元」の時刻に「1」を加算した時刻になる。「比較先」は、マトリクスのX方向である。   In the example of FIG. 23, each of the above sections is described as “comparison source”, and “comparison source” is the Y direction of the matrix. Since the time difference is “1”, “comparison destination” is a time obtained by adding “1” to the time of “comparison source”. The “comparison destination” is the X direction of the matrix.

図24は、時刻「1」と時刻「2」との間の時間差の一例を示す。時刻「1」の値は「2.1」であり、時刻「2」の値は「5.3」である。時刻「1」と時刻「2」との間の時間差は初期値である。   FIG. 24 shows an example of the time difference between time “1” and time “2”. The value of time “1” is “2.1”, and the value of time “2” is “5.3”. The time difference between time “1” and time “2” is an initial value.

時刻「1」の値は、時刻「2」の値より小さいため、時刻「1」と時刻「2」との大小関係は「−」になる。従って、検出部12は、時間差「1」で「1−」を検出する。図24の例のマトリクスでは、Y方向(比較元)の時刻が「1」であり、且つX方向(比較先)の時刻が「2」の点が「−」の変化点となる。   Since the value of the time “1” is smaller than the value of the time “2”, the magnitude relationship between the time “1” and the time “2” is “−”. Therefore, the detection unit 12 detects “1” with the time difference “1”. In the example matrix of FIG. 24, a point where the time in the Y direction (comparison source) is “1” and the time in the X direction (comparison destination) is “2” is a change point of “−”.

図25は、時刻「1」から「2」の間を比較元とし、時刻「2」から「3」の間を比較先とした場合の変化点の検出の一例を示す。この場合、比較元の時刻「2」の値と比較先の時刻「3」の値とが同じである。   FIG. 25 shows an example of detection of a change point when the time between “1” and “2” is the comparison source and the time between “2” and “3” is the comparison destination. In this case, the value of the comparison source time “2” and the value of the comparison destination time “3” are the same.

ただし、検出部12は、比較元と比較先とで一致する値が1つの場合、比較元の区間と比較先の区間とは分離されているとみなす。従って、比較元の区間と比較先の区間とは分離されているため、検出部12は変化点を検出しない。   However, when there is one value that matches the comparison source and the comparison destination, the detection unit 12 considers that the comparison source section and the comparison destination section are separated. Accordingly, since the comparison source section and the comparison destination section are separated, the detection unit 12 does not detect the change point.

図26は、時刻「2」から「3」の間を比較元とし、時刻「3」から「4」の間を比較先とした場合の変化点の検出の一例を示す。この場合、比較元の区間と比較先の区間とでは、値「6.2」から値「7.5」までが重複する。よって、検出部12は、比較元の区間と比較先の区間とが分離されていないことを検出する。   FIG. 26 shows an example of change point detection when the comparison is made between time “2” and “3” and comparison is made between time “3” and “4”. In this case, the value “6.2” to the value “7.5” overlap in the comparison source section and the comparison destination section. Therefore, the detection unit 12 detects that the comparison source section and the comparison target section are not separated.

従って、検出部12は、上記の区間で、大小関係が変化する変化点があれば、該変化点を検出する。図26の例の場合、時刻「3」において、値の大小関係が変化する。つまり、時刻「2」の値は時刻「3」の値より小さいため、大小関係は「−」である。   Therefore, if there is a change point where the magnitude relationship changes in the above section, the detection unit 12 detects the change point. In the case of the example of FIG. 26, the magnitude relationship of values changes at time “3”. That is, since the value of time “2” is smaller than the value of time “3”, the magnitude relationship is “−”.

一方、時刻「3」の値は時刻「4」の値より大きいため、大小関係は「+」である。このため、検出部12は、時刻「3」において、値の大小関係が変化したことを検出する。つまり、検出部12は、時刻「3」を変化点として検出する。検出部12は、変化点データのうち時間差「1」に「3+」を追加する。   On the other hand, since the value of time “3” is larger than the value of time “4”, the magnitude relationship is “+”. For this reason, the detection unit 12 detects that the magnitude relationship between the values has changed at time “3”. That is, the detection unit 12 detects time “3” as a change point. The detection unit 12 adds “3+” to the time difference “1” in the change point data.

次に、図27の例に示されるように、検出部12は、比較元の時刻「3」から「6」の区間および比較先の時刻「4」から「7」の区間で、大小関係が変化する変化点があれば、該変化点を検出する。   Next, as shown in the example of FIG. 27, the detection unit 12 has a magnitude relationship between the comparison source time “3” to “6” and the comparison target time “4” to “7”. If there is a changing point that changes, the changing point is detected.

比較元の時刻「3」から「6」の区間および比較先の時刻「4」から「7」の区間は、単調減少区間である。よって、この単調減少区間に変化点は存在しない。従って、検出部12は、同じ単調減少区間における変化点の検出をスキップする。   The section from time “3” to “6” of the comparison source and the section from time “4” to “7” of the comparison destination are monotonously decreasing sections. Therefore, there is no change point in this monotonically decreasing section. Therefore, the detection unit 12 skips the detection of change points in the same monotonically decreasing section.

図28は、時刻「6」から「7」の間を比較元とし、時刻「7」から「8」の間を比較先とした場合の変化点の検出の一例を示す。比較元の区間と比較先の区間とは値が重複するため、検出部12は、比較元の区間と比較先の区間とが分離されていないことを検出する。   FIG. 28 shows an example of detection of a change point in the case where the time “6” to “7” is the comparison source and the time “7” to “8” is the comparison destination. Since the comparison source section and the comparison destination section have overlapping values, the detection unit 12 detects that the comparison source section and the comparison destination section are not separated.

従って、検出部12は、上記の区間で、大小関係が変化する変化点があれば、該変化点を検出する。図28の例の場合、時刻「7」において、値の大小関係が変化したことを検出する。検出部17は、変化点データのうち時間差「7」に「7−」を追加する。   Therefore, if there is a change point where the magnitude relationship changes in the above section, the detection unit 12 detects the change point. In the case of the example of FIG. 28, it is detected that the magnitude relationship between the values has changed at time “7”. The detection unit 17 adds “7−” to the time difference “7” in the change point data.

図29の例において、比較元の時刻「7」から「9」の区間および比較先の時刻「8」から「10」の区間は、単調増加区間である。よって、この単調増加区間に変化点は存在しない。従って、検出部12は、同じ単調増加区間における変化点の検出をスキップする。   In the example of FIG. 29, the section from time “7” to “9” of the comparison source and the section from time “8” to “10” of the comparison destination are monotonically increasing sections. Therefore, there is no change point in this monotonically increasing section. Therefore, the detection unit 12 skips the detection of change points in the same monotonically increasing section.

次に、時間差が「2」の場合における変化点の検出について説明する。図30の例に示されるように、値の大小関係が変化する時刻は「1」、「3」、「7」および「10」である。   Next, detection of a change point when the time difference is “2” will be described. As shown in the example of FIG. 30, the time when the magnitude relationship of the values changes is “1”, “3”, “7”, and “10”.

時間差が「2」であるため、「何れかが反転する時刻」は、上記の各時刻から「2」を減算した時刻「−1」、「1」、「5」および「8」である。従って、比較元の区間および比較先の区間は、図30の例に示す区間になる。   Since the time difference is “2”, “the time at which one is inverted” is times “−1”, “1”, “5”, and “8” obtained by subtracting “2” from each of the above times. Therefore, the comparison source section and the comparison destination section are sections shown in the example of FIG.

時間差が「2」の場合、値の大小関係を比較する対象となる時刻の時間差は「2」である。例えば、図31の例の場合、検出部12は、時刻「1」と時刻「3」との間の値の大小関係を比較する。   When the time difference is “2”, the time difference of the time for which the magnitude relation of the values is compared is “2”. For example, in the example of FIG. 31, the detection unit 12 compares the magnitude relationship between the values of time “1” and time “3”.

この場合、時刻「1」の値は、時刻「3」の値より小さいため、大小関係は「−」になる。検出部12は、時間差「2」の初期値に「1−」を追加する。なお、検出部12は、時間差「1」についての処理が終了した変化点データに、時間差「2」の変化点データを追加する。   In this case, since the value of time “1” is smaller than the value of time “3”, the magnitude relation is “−”. The detection unit 12 adds “1” to the initial value of the time difference “2”. Note that the detection unit 12 adds the change point data of the time difference “2” to the change point data for which the process for the time difference “1” has been completed.

図32は、時刻「1」から「3」の間を比較元とし、時刻「3」から「5」の間を比較先とした場合の変化点の検出の一例を示す。比較元の区間と比較先の区間とで値は重複する。従って、検出部12は、この区間で変化点があれば、該変化点を検出する。   FIG. 32 shows an example of detection of a change point when the time “1” to “3” is the comparison source and the time “3” to “5” is the comparison destination. Values overlap in the comparison source section and the comparison destination section. Therefore, if there is a change point in this section, the detection unit 12 detects the change point.

検出部12は、変化点を検出する区間を分割してもよい。図32の例では、検出部12は、上記の区間を2つに分割し、それぞれの区間で変化点を検出する。区間が大きい場合、検出部12は、1つの区間から変化点の検出を行うよりも、分割された小サイズの区間から変化点の検出を行う方が効率的な場合がある。   The detection unit 12 may divide a section in which a change point is detected. In the example of FIG. 32, the detection unit 12 divides the above section into two, and detects a change point in each section. When the section is large, it may be more efficient for the detection unit 12 to detect the change point from the divided small-sized section than to detect the change point from one section.

図32の例の場合、検出部12は、上記の区間を2つの区間に分割する。1つ目の区間は、比較元の時刻が「1」から「2」であり、比較先の時刻が「3」から「4」の区間である。2つ目の区間は、比較元の時刻が「2」から「3」であり、比較先の時刻が「4」から「5」の区間である。   In the example of FIG. 32, the detection unit 12 divides the above-described section into two sections. The first section is a section in which the comparison source time is “1” to “2” and the comparison destination time is “3” to “4”. The second section is a section in which the comparison source time is “2” to “3” and the comparison destination time is “4” to “5”.

1つ目の区間では、値の大小関係に変化がないため、検出部12は、変化点を検出しない。2つ目の区間では、時刻「3」において、値の大小関係が変化する。このため、検出部12は、2つ目の区間で変化点を検出する。従って、検出部12は、時間差「2」の変化点データに「3+」を追加する。   In the first section, there is no change in the magnitude relationship between the values, so the detection unit 12 does not detect the change point. In the second section, the magnitude relationship of values changes at time “3”. For this reason, the detection part 12 detects a change point in the 2nd area. Therefore, the detection unit 12 adds “3+” to the change point data of the time difference “2”.

図33は、時刻「3」から「5」の間を比較元とし、時刻「5」から「7」の間を比較先とした場合の変化点の検出の一例を示す。この区間は、単調減少区間であるため、変化点は存在しない。従って、検出部12は、同じ単調減少区間における変化点の検出をスキップする。   FIG. 33 shows an example of detection of a change point when the time “3” to “5” is the comparison source and the time “5” to “7” is the comparison destination. Since this section is a monotone decreasing section, there is no change point. Therefore, the detection unit 12 skips the detection of change points in the same monotonically decreasing section.

図34は、時刻「5」から「7」の間を比較元とし、時刻「7」から「9」の間を比較先とした場合の変化点の検出の一例を示す。この区間は、値が分離されていない。よって、検出部12は、この区間に変化点があれば、該変化点を検出する。   FIG. 34 shows an example of detection of a change point when the time “5” to “7” is the comparison source and the time “7” to “9” is the comparison destination. In this interval, values are not separated. Therefore, if there is a change point in this section, the detection unit 12 detects the change point.

図34の例では、検出部12は、上記の区間を2つに分割する。1つ目の区間は、時刻「5」から「6」の間が比較元であり、時刻「7」から「8」の間が比較先である。2つ目の区間は、時刻「6」から「7」の間が比較元であり、時刻「8」から「9」の間が比較先である。   In the example of FIG. 34, the detection unit 12 divides the above section into two. In the first section, the comparison source is between time “5” and “6”, and the comparison destination is between time “7” and “8”. In the second section, the time between “6” and “7” is the comparison source, and the time between “8” and “9” is the comparison destination.

1つ目の区間では、値の大小関係は変化しない。よって、検出部12は、1つ目の区間から変化点を検出しない。2つ目の区間では、時刻「7」において値の大小関係が変化する。検出部12は、時刻「7」を変化点として検出し、時間差「2」の変化点データに「7−」を追加する。   In the first section, the magnitude relationship between values does not change. Therefore, the detection unit 12 does not detect a change point from the first section. In the second section, the magnitude relationship of values changes at time “7”. The detection unit 12 detects the time “7” as a change point, and adds “7−” to the change point data of the time difference “2”.

図35は、時刻「7」から「8」の間を比較元とし、時刻「9」から「10」の間を比較先とした場合の変化点の検出の一例を示す。この区間は、同じ単調増加区間であるため、検出部12は、変化点を検出しない。従って、変化点の検出はスキップされる。   FIG. 35 shows an example of detection of a change point when the time “7” to “8” is the comparison source and the time “9” to “10” is the comparison destination. Since this section is the same monotonically increasing section, the detection unit 12 does not detect a change point. Therefore, detection of the change point is skipped.

検出部12は、時間差「3」から「9」まで上述した処理を繰り返す。これにより、検出部12は、図36の例に示されるような変化点データを生成する。計数部13は、変化点データに基づいて、大小関係の一致数をカウントし、演算部14は、2つの時系列データの類似度を演算する。   The detection unit 12 repeats the above-described processing from the time difference “3” to “9”. Thereby, the detection part 12 produces | generates change point data as shown by the example of FIG. The counting unit 13 counts the number of coincidence of magnitude relationships based on the change point data, and the calculation unit 14 calculates the similarity between the two time series data.

例えば、比較対象の時系列データのそれぞれについて、時間差ごとの大小関係を全て記憶する場合、記憶する大小関係の情報量は多くなる。このため、大小関係の一致数をカウントする処理に長い時間がかかり、類似度の演算時間も長くなる。   For example, when all the magnitude relationships for each time difference are stored for each time-series data to be compared, the amount of information on the magnitude relationship to be stored increases. For this reason, it takes a long time to process the number of coincidences of the magnitude relationship, and the calculation time of the similarity also becomes long.

また、比較対象の時系列データのそれぞれについて、時間差ごとの値の大小関係を全て記憶する場合、記憶する情報量が多くなる。   Further, when all the magnitude relationships of values for each time difference are stored for each time series data to be compared, the amount of information to be stored increases.

上述したように、検出部12は、時系列データの変化点を記憶部11に記憶する。計数部13は、該変化点に基づいて、大小関係の一致数をカウントし、演算部14は、大小関係の一致数Pに基づいて、時系列データ同士の類似度の演算を行う。   As described above, the detection unit 12 stores the change point of the time series data in the storage unit 11. The counting unit 13 counts the number of matches in magnitude relation based on the change point, and the calculation unit 14 calculates the similarity between the time series data based on the number of matches P in magnitude relation.

演算部14は、大小関係の変化点に基づいてカウントされた大小関係の一致数Pを用いて、時系列データ同士の類似度の演算を行うため、時間差ごとの全ての大小関係に基づいて演算を行う場合と比較して、演算する対象の情報が少なくなる。このため、類似度の演算を行うための演算時間が短くなる。   Since the calculation unit 14 calculates the degree of similarity between the time series data using the number of coincidence P of the magnitude relationship counted based on the change point of the magnitude relationship, the calculation unit 14 calculates based on all the magnitude relationships for each time difference. Compared with the case of performing, the information to be calculated is reduced. For this reason, the calculation time for calculating the similarity is shortened.

また、時系列データの時間差ごとの大小関係を全て記憶する場合と比較すると、大小関係の変化点のみを示す変化点データを記憶する方が、記憶する情報量が少なくなる。さらに、検出部12は、同じ単調増加区間や同じ単調減少区間等をスキップして変化点を検出するため、変化点を迅速に検出することができる。   Compared with the case where all the magnitude relationships for each time difference of the time series data are stored, the amount of information to be stored is smaller when the change point data indicating only the change points of the magnitude relationship is stored. Furthermore, since the detecting unit 12 skips the same monotonically increasing section, the same monotonically decreasing section, and the like and detects the changing point, it can quickly detect the changing point.

図37は、データ2およびデータ3の変化点データの例を示す。検出部12は、上述したデータ1の場合と同様に、データ2およびデータ3の変化点を検出し、変化点データを記憶部11に記憶する。   FIG. 37 shows an example of change point data of data 2 and data 3. As in the case of the data 1 described above, the detection unit 12 detects the change points of the data 2 and the data 3 and stores the change point data in the storage unit 11.

次に、時刻「2」から「8」までの間におけるデータ1とデータ2との大小関係の一致数について説明する。図38は、データ1およびデータ2の変化点データと、それぞれのマトリクスとの一例を示す。   Next, the number of matches in the magnitude relationship between data 1 and data 2 from time “2” to “8” will be described. FIG. 38 shows an example of change point data of data 1 and data 2 and respective matrices.

計数部13が、時刻「2」から「8」までの間におけるデータ1とデータ2との大小関係の一致数をカウントする場合、ウィンドウ範囲は「7」である。従って、図39の例に示されるように、一致数をカウントする対象は、時間差「1」から「6」の間である。   When the counting unit 13 counts the number of coincidence of the magnitude relationship between the data 1 and the data 2 from the time “2” to “8”, the window range is “7”. Therefore, as shown in the example of FIG. 39, the target of counting the number of matches is between the time differences “1” to “6”.

データ1は「D1」と表記され、データ2は「D2」と表記される。計数部13は、データ1とデータ2との間の大小関係の一致数をカウントするため、ウィンドウの端が「1」になるようにオフセットを求める。   Data 1 is represented as “D1”, and data 2 is represented as “D2”. The counting unit 13 obtains an offset so that the end of the window becomes “1” in order to count the number of coincidence of the magnitude relationship between the data 1 and the data 2.

データ1およびデータ2のウィンドウは、時刻「2」から始まるため、データ1のオフセットも、データ2のオフセットも「1(=2−1)」になる。上述したように、時間差が「1」の場合、ウィンドウ範囲は、時刻「1」から「6(=7−1)」になる。   Since the window of data 1 and data 2 starts from time “2”, the offset of data 1 and the offset of data 2 are both “1 (= 2-1)”. As described above, when the time difference is “1”, the window range is changed from the time “1” to “6 (= 7-1)”.

図40の例に示されるように、類似度の演算の対象となる2つの時系列データのそれぞれについて、変化点を示すテーブルを変化点テーブルと称する。変化点テーブルの各項目には、変化点の情報が格納される。各項目の括弧には、変化点の値からオフセットの値を減じた値が格納されてもよい。   As shown in the example of FIG. 40, a table indicating a change point for each of two time-series data to be subjected to similarity calculation is referred to as a change point table. Information on change points is stored in each item of the change point table. A value obtained by subtracting the offset value from the change point value may be stored in parentheses of each item.

図40の例には、データ1およびデータ2のマトリクスが示される。図40の例において、2つのマトリクスの間には、時間差に応じた変化点のY方向に対応する位置が示される。一点鎖線は、ウィンドウ範囲を示す。   In the example of FIG. 40, a matrix of data 1 and data 2 is shown. In the example of FIG. 40, the position corresponding to the Y direction of the change point according to the time difference is shown between the two matrices. The alternate long and short dash line indicates the window range.

図41は、データ1の変化点「1−」とデータ2の変化点「1−」との比較の例を示す。データ1およびデータ2の変化点「1−」は、ウィンドウ範囲から外れている。図41の例において、2つのマトリクスの間の点線で囲まれた2つの変化点が、データ1の変化点「1−」およびデータ2の変化点「1−」である。   FIG. 41 shows an example of comparison between the change point “1-” of data 1 and the change point “1-” of data 2. The change point “1-” of data 1 and data 2 is out of the window range. In the example of FIG. 41, two change points surrounded by a dotted line between two matrices are a change point “1-” of data 1 and a change point “1-” of data 2.

これら2つの変化点は、大小関係の一致数をカウントする対象となるウィンドウ範囲から外れている。よって、計数部13は、これら2つの変化点については、大小関係が一致するかを判定しない。つまり、図41の例の時点での一致数は「0」である。   These two change points are out of the window range to be counted for the number of coincidence in magnitude relation. Therefore, the counting unit 13 does not determine whether the magnitude relations coincide with each other regarding these two change points. That is, the number of matches at the time of the example in FIG. 41 is “0”.

また、計数部13は、変化点テーブルのうち、データ1の変化点「1−」の項目およびデータ2の変化点「1−」の項目の括弧に、変化点の値からオフセットの値を減じた値を格納する。   In addition, the counting unit 13 subtracts the offset value from the change point value in parentheses of the change point “1-” item of data 1 and the change point “1-” item of data 2 in the change point table. Store the stored value.

図41は、データ1の変化点「1−」とデータ2の変化点「1−」との比較の例を示す。データ1およびデータ2の変化点「1−」は、ウィンドウ範囲から外れている。図41の例において、2つのマトリクスの間の点線で囲まれた2つの変化点が、データ1の変化点「1−」およびデータ2の変化点「1−」である。   FIG. 41 shows an example of comparison between the change point “1-” of data 1 and the change point “1-” of data 2. The change point “1-” of data 1 and data 2 is out of the window range. In the example of FIG. 41, two change points surrounded by a dotted line between two matrices are a change point “1-” of data 1 and a change point “1-” of data 2.

これら2つの変化点は、大小関係の一致数をカウントする対象となるウィンドウ範囲から外れている。よって、計数部13は、これら2つの変化点については、大小関係が一致するかを判定しない。つまり、図41の例の時点での一致数は「0」である。   These two change points are out of the window range to be counted for the number of coincidence in magnitude relation. Therefore, the counting unit 13 does not determine whether the magnitude relations coincide with each other regarding these two change points. That is, the number of matches at the time of the example in FIG. 41 is “0”.

計数部13は、大小関係の一致数についての処理が終わると、変化点テーブルの各変化点のうち、インデックスの値が最も低い変化点に、比較対象を移す。よって、次に、比較対象となる変化点は、変化点「2+」である。   When the processing for the number of coincidence in magnitude relation is completed, the counting unit 13 moves the comparison target to the change point with the lowest index value among the change points in the change point table. Therefore, the change point to be compared next is the change point “2+”.

図42は、データ1の変化点「1−」とデータ2の変化点「2+」との比較の例を示す。データ1の変化点「1−」は、ウィンドウ範囲から外れている。従って、図42の例の時点での一致数は「0」である。   FIG. 42 shows an example of comparison between the change point “1-” of data 1 and the change point “2+” of data 2. The change point “1-” of data 1 is out of the window range. Therefore, the number of matches at the time of the example of FIG. 42 is “0”.

次に、比較対象となる変化点はデータ1については、変化点「3+」であり、データ2については変化点「3−」である。これら2つの変化点のインデックスは同じ値である。この場合、計数部13は、データ1の変化点およびデータ2の変化点を共に移す。   Next, the change point to be compared is the change point “3+” for the data 1 and the change point “3-” for the data 2. These two change point indexes have the same value. In this case, the counting unit 13 moves the change point of the data 1 and the change point of the data 2 together.

図43は、データ1の変化点「3+」とデータ2の変化点「3−」との比較の例を示す。計数部13は、データ1とデータ2とのそれぞれについて、変化点における大小関係に基づいて、大小関係の一致数をカウントする。   FIG. 43 shows an example of comparison between the change point “3+” of data 1 and the change point “3-” of data 2. The counting unit 13 counts the number of coincidence of the magnitude relation for each of the data 1 and the data 2 based on the magnitude relation at the change point.

図43の例の場合、データ1の変化点「3+」のオフセットは「2」であり、データ2の変化点「3−」のオフセットは「2」である。両者の大小関係は一致しない。従って、図43の例の時点での一致数は「0」である。   In the example of FIG. 43, the offset of the change point “3+” of data 1 is “2”, and the offset of the change point “3-” of data 2 is “2”. The magnitude relationship between the two does not match. Therefore, the number of matches at the time of the example of FIG. 43 is “0”.

図44の例は、データ1の比較対象が次の変化点「7−」に移された場合を示す。データ1の変化点「7ー」のオフセットは「6」であり、ウィンドウ範囲内におけるオフセット「6」以前の大小関係は「−」である。   The example of FIG. 44 illustrates a case where the comparison target of data 1 is moved to the next change point “7−”. The offset of the change point “7−” of data 1 is “6”, and the magnitude relationship before the offset “6” in the window range is “−”.

データ2の変化点「3−」のオフセットは「2」であり、ウィンドウ範囲内におけるオフセット「2」以降の大小関係は「−」である。よって、データ1とデータ2との大小関係は、オフセット「6」において一致する。   The offset of the change point “3-” of data 2 is “2”, and the magnitude relationship after the offset “2” in the window range is “−”. Therefore, the magnitude relationship between the data 1 and the data 2 matches at the offset “6”.

このため、計数部13は、大小関係の一致数を加算する。大小関係の一致数の初期値はゼロであるため、この時点における大小関係の一致数は「1」である。   For this reason, the counting unit 13 adds the number of matches in magnitude relation. Since the initial value of the number of matches in the magnitude relationship is zero, the number of matches in the magnitude relationship at this time is “1”.

図45の例に示されるように、計数部13は、データ2の比較対象を次の変化点「8+」に移す。この時点では、ウィンドウ範囲内におけるデータ1とデータ2との大小関係の比較は終了している。従って、計数部13は、一致数がゼロとして、時間差「1」における大小関係の一致数をカウントする処理を終了する。   As shown in the example of FIG. 45, the counting unit 13 moves the comparison target of the data 2 to the next change point “8+”. At this point, the comparison of the magnitude relationship between data 1 and data 2 within the window range has been completed. Accordingly, the counting unit 13 sets the number of matches as zero, and ends the process of counting the number of matches in the magnitude relationship at the time difference “1”.

次に、時間差「2」の場合における大小関係の一致数について説明する。図46の例において、時間差が「2」であるため、ウィンドウ範囲は「1」から「5」の間になる。   Next, the number of coincidence of magnitude relations when the time difference is “2” will be described. In the example of FIG. 46, since the time difference is “2”, the window range is between “1” and “5”.

図47は、データ1の変化点「1−」とデータ2の変化点「1−」との比較の例を示す。これら2つの変化点は、ウィンドウ範囲から外れている。よって、計数部13は、これら2つの変化点については、大小関係が一致するかを判定しない。つまり、図47の例の時点での一致数は「0」である。   FIG. 47 shows an example of comparison between the change point “1-” of data 1 and the change point “1-” of data 2. These two changing points are out of the window range. Therefore, the counting unit 13 does not determine whether the magnitude relations coincide with each other regarding these two change points. That is, the number of matches at the time of the example of FIG. 47 is “0”.

図48の例に示されるように、データ1の変化点「3+」とデータ2の変化点「3−」とのオフセットは同じである。計数部13は、データ1の変化点「3+」とデータ2の変化点「3−」とに比較対象を移す。   As shown in the example of FIG. 48, the offset of the change point “3+” of data 1 and the change point “3-” of data 2 is the same. The counting unit 13 moves the comparison target to the change point “3+” of the data 1 and the change point “3-” of the data 2.

データ1の変化点「3+」のオフセットは「2」であり、ウィンドウ範囲内におけるオフセット「2」以前の大小関係は「+」である。データ2の変化点「3−」のオフセットは「2」であり、ウィンドウ範囲内におけるオフセット「2」以前の大小関係は「−」である。   The offset of the change point “3+” of data 1 is “2”, and the magnitude relationship before the offset “2” in the window range is “+”. The offset of the change point “3-” of data 2 is “2”, and the magnitude relationship before the offset “2” in the window range is “−”.

よって、両者の大小関係は一致しない。計数部13は、大小関係の一致数を加算しない。時間差「2」における大小関係の一致数の初期値はゼロであるため、この時点における大小関係の一致数はゼロである。   Therefore, the magnitude relationship between the two does not match. The counting unit 13 does not add the number of matches in magnitude relation. Since the initial value of the number of matches in the magnitude relationship at the time difference “2” is zero, the number of matches in the magnitude relationship at this time is zero.

図49の例に示されるように、データ1の変化点「7−」とデータ2の変化点「7+」とのインデックスは同じである。計数部13は、データ1の変化点「7−」とデータ2の変化点「7+」とに比較対象を移す。   As shown in the example of FIG. 49, the index of the change point “7−” of data 1 and the change point “7+” of data 2 are the same. The counting unit 13 moves the comparison target to the change point “7−” of data 1 and the change point “7+” of data 2.

データ1の変化点「3+」から変化点「7−」までの大小関係は「−」である。データ2の変化点「3−」から変化点「7+」までの大小関係は「+」である。よって、両者の大小関係は一致しないため、計数部13は、大小関係の一致数を加算しない。   The magnitude relationship from the change point “3+” to the change point “7−” of data 1 is “−”. The magnitude relationship from the change point “3-” to the change point “7+” in data 2 is “+”. Therefore, since the magnitude relationship between the two does not match, the counting unit 13 does not add the number of matches in the magnitude relationship.

従って、この時点における大小関係の一致数はゼロになるため、時間差「2」における一致数はゼロとして処理が終了する。   Accordingly, since the number of coincidence of the magnitude relationship at this time is zero, the number of coincidence at the time difference “2” is zero, and the processing is ended.

計数部13は、上述したように、時間差「1」および時間差「2」について、データ1とデータ2との大小関係の一致数のカウントを行う。上述したように、大小関係の一致数のカウントは、大小関係の変化点に基づいて行われる。   As described above, the counting unit 13 counts the number of matches in the magnitude relationship between the data 1 and the data 2 for the time difference “1” and the time difference “2”. As described above, the count of the number of coincidence in the magnitude relationship is performed based on the change point in the magnitude relationship.

計数部13は、時間差「1」および「2」と同様に、時間差「3」から「7」までの大小関係の一致数のカウントを行う。上述したように、データ1とデータ2との類似度の演算を行う対象となる期間は、時刻「2」と「8」の間の期間である。   The counting unit 13 counts the number of coincidences of the magnitude relationship from the time differences “3” to “7”, similarly to the time differences “1” and “2”. As described above, the period for which the similarity between data 1 and data 2 is calculated is a period between times “2” and “8”.

計数部13は、時間差ごとの一致数を合計する。図50の例の場合、計数部13は、時刻「2」と「8」との間におけるデータ1とデータ2との大小関係の一致数Pが「1」であることを得る。   The counting unit 13 sums up the number of matches for each time difference. In the case of the example in FIG. 50, the counting unit 13 obtains that the coincidence number P between the data 1 and the data 2 between the times “2” and “8” is “1”.

演算部14は、計数部13がカウントした一致数Pと、時系列データのデータサイズ(項目数=n)とを用いて、上述した式(A)により、時刻「2」と「8」との間におけるデータ1とデータ2との類似度(相関値)を演算する。   The calculation unit 14 uses the coincidence number P counted by the counting unit 13 and the data size of the time-series data (number of items = n) to calculate the times “2” and “8” according to the above equation (A). The similarity (correlation value) between data 1 and data 2 is calculated.

一致数Pは「P=1」であり、項目数nは、時刻「2」から「8」までのウィンドウ範囲の時間(項目)の数であるため、「n=7」である。よって、演算部14は、上述した式(A)を用いて演算を行い、類似度「t=(4×1/7×(7−1))−1」を得る。この演算結果は、約「−0.90」となる。   The number of matches P is “P = 1”, and the number of items n is “n = 7” because it is the number of times (items) in the window range from time “2” to “8”. Therefore, the calculation unit 14 performs calculation using the above-described formula (A) to obtain a similarity “t = (4 × 1/7 × (7-1)) − 1”. The calculation result is approximately “−0.90”.

従って、上記のウィンドウ範囲におけるデータ1とデータ2との類似度(相関値)は、約「−0.90」であることが得られる。   Therefore, the similarity (correlation value) between data 1 and data 2 in the window range is about “−0.90”.

具体例1では、演算部14は、データ1とデータ2との類似度だけでなく、データ1とデータ3との類似度、およびデータ2とデータ3との類似度の演算も行う。   In the first specific example, the calculation unit 14 calculates not only the similarity between the data 1 and the data 2 but also the similarity between the data 1 and the data 3 and the similarity between the data 2 and the data 3.

図51の例に示されるように、上記のウィンドウ範囲におけるデータ1とデータ3との時間差ごとの大小関係の一致数を合計した値は「11」である。演算部14は、一致数P(P=11)および項目数n(n=7)を用いて、式(A)の演算を行う。演算結果(類似度t)は、約「−0.05」である。   As shown in the example of FIG. 51, the total value of the number of coincidence of the magnitude relationships for each time difference between the data 1 and the data 3 in the window range is “11”. The calculation unit 14 performs the calculation of Expression (A) using the number of matches P (P = 11) and the number of items n (n = 7). The calculation result (similarity t) is about “−0.05”.

上記のウィンドウ範囲におけるデータ2とデータ3との時間差ごとの大小関係の一致数を合計した値は「9」である。演算部14は、一致数P(P=9)および項目数n(n=7)を用いて、式(A)の演算を行う。演算結果(類似度t)は、約「−0.14」である。   A value obtained by summing up the number of coincidence of magnitude relations for each time difference between data 2 and data 3 in the window range is “9”. The calculation unit 14 performs the calculation of Expression (A) using the number of matches P (P = 9) and the number of items n (n = 7). The calculation result (similarity t) is about “−0.14”.

従って、データ1とデータ2とデータ3とのうち2つの時系列データのペアの3組の類似度が得られる。   Therefore, three sets of similarities of two time-series data pairs of data 1, data 2, and data 3 are obtained.

<具体例2>
具体例2は、比較対象の2つの時系列データにおける双方のウィンドウをずらしながら、2つの時系列データの類似度を演算する例である。図52の例において、変化点テーブルは、順番の項目を含む。順番は、比較対象の変化点の順番を示す。
<Specific example 2>
Specific example 2 is an example in which the similarity between two time series data is calculated while shifting both windows in the two time series data to be compared. In the example of FIG. 52, the change point table includes items of order. The order indicates the order of the change points to be compared.

また、具体例2では、図52の例に示される差分処理テーブルが用いられる。差分処理テーブルは、時間差と一致数と後端の一致と前端の一致と次の後端と次の前端との項目を含む。   In the specific example 2, the difference processing table shown in the example of FIG. 52 is used. The difference processing table includes items of time difference, number of matches, rear end match, front end match, next rear end, and next front end.

時間差は、差分処理の対象となる時間差を示す。一致数は、時間差に応じた2つの時系列データの一致数を示す。後端の一致は、ウィンドウ外の後端における2つの時系列データの大小関係が一致するか否かを示す。前端の一致は、ウィンドウ内の前端における2つの時系列データの大小関係が一致するか否かを示す。   The time difference indicates a time difference to be subjected to difference processing. The number of matches indicates the number of matches of two time series data according to the time difference. The rear end coincidence indicates whether the magnitude relationship between the two time-series data at the rear end outside the window coincides. The coincidence of the front end indicates whether or not the magnitude relationship between the two time series data at the front end in the window coincides.

次の後端は、ウィンドウがずらされた後に、次にウィンドウの後端から出る変化点を示す。次の前端は、ウィンドウがずらされた後に、次にウィンドウに入る変化点を示す。   The next trailing edge indicates the transition point that emerges from the trailing edge of the window after the window is shifted. The next front edge indicates the transition point that enters the next window after the window is shifted.

図53の例では、計数部13は、データ1の変化点「1−」とデータ2の変化点「1−」とを対象として、大小関係の一致数をカウントする。データ1は時間「1」で大小関係が「−」に反転する。データ2も時間「1」で大小関係が「−」に反転する。   In the example of FIG. 53, the counting unit 13 counts the number of coincidence of magnitude relations for the change point “1-” of data 1 and the change point “1-” of data 2. Data 1 is time “1” and the magnitude relationship is inverted to “−”. Data 2 also reverses the magnitude relationship to “−” at time “1”.

よって、データ1とデータ2との大小関係は一致するため、計数部13は、一致数を加算する。これにより、一致数は「1」になる。差分処理部15は、差分処理テーブルの一致数を「1」にする。   Therefore, since the magnitude relationship between data 1 and data 2 matches, the counting unit 13 adds the number of matches. As a result, the number of matches becomes “1”. The difference processing unit 15 sets the number of matches in the difference processing table to “1”.

データ1の変化点「1−」およびデータ2の変化点「1−」は、変化点テーブルにおいて、オフセットが「1」であるため、ウィンドウ外の後端に位置する。また、2つの変化点の大小関係は「−」である。   The change point “1-” of data 1 and the change point “1-” of data 2 are located at the rear end outside the window because the offset is “1” in the change point table. The magnitude relationship between the two change points is “−”.

従って、差分処理部15は、後端の一致の項目を「○」にする。また、データ1の変化点「1−」およびデータ2の変化点「1−」は、ウィンドウがずらされると、ウィンドウから出る。   Therefore, the difference processing unit 15 sets the matching item at the rear end to “◯”. Further, the change point “1-” of data 1 and the change point “1-” of data 2 come out of the window when the window is shifted.

差分処理部15は、上記2つの変化点を示す情報を変化点テーブルのうち、次の項目に格納する。図53の例では、上記の変化点を示す情報は、データ番号と順番と到達時間との情報を含む。   The difference processing unit 15 stores information indicating the two change points in the next item in the change point table. In the example of FIG. 53, the information indicating the change point includes information on the data number, the order, and the arrival time.

データ番号は、時系列データを特定する番号を示す。例えば、「D1」はデータ1を示す。順番は、変化点テーブルの順番を示す。   The data number indicates a number that identifies time-series data. For example, “D1” indicates data 1. The order indicates the order of the change point table.

括弧内の到達時間は、変化点がウィンドウから出るまでの時間を示す。ウィンドウが1回ずらされると、時刻が1つ後ろにずれる。例えば、到達時間が「1」の場合、ウィンドウが1回ずらされると、変化点はウィンドウから出ることを示す。   The arrival time in parentheses indicates the time until the change point comes out of the window. When the window is shifted once, the time shifts backward by one. For example, when the arrival time is “1”, when the window is shifted once, the change point indicates that the window comes out of the window.

例えば、図53の例において、変化点を示す情報「D1−1(1)」は、該変化点はデータ1の変化点であることを示す。また、該変化点の順番は「1」であることを示し、ウィンドウが1回ずらされると、該変化点はウィンドウから出ることを示す。   For example, in the example of FIG. 53, the information “D1-1 (1)” indicating the change point indicates that the change point is the change point of the data 1. In addition, the order of the change points is “1”, and when the window is shifted once, the change points come out of the window.

次に、データ2の比較の対象が変化点「2+」に移る。ウィンドウ内の2つの時系列データの大小関係が一致するか否かを判定する処理は、具体例1と同様である。図54の例に示されるように、一致数は変化しない。   Next, the comparison target of data 2 moves to the change point “2+”. The processing for determining whether or not the magnitude relationship between two time-series data in the window matches is the same as in the first specific example. As shown in the example of FIG. 54, the number of matches does not change.

また、ウィンドウがずらされていないことから、後端の一致および次の後端についても変化はない。よって、図54の例に示されるように、差分処理テーブルの内容に変化はない。   Further, since the windows are not shifted, there is no change in the rear end coincidence and the next rear end. Therefore, as shown in the example of FIG. 54, there is no change in the contents of the difference processing table.

次に、図55の例に示されるように、データ1の比較の対象が変化点「3+」に移り、データ2の比較の対象が変化点「3−」に移る。この場合、2つの変化点のオフセットが同じであるため、データ1の変化点とデータ2の変化点とが共に次に移る。   Next, as shown in the example of FIG. 55, the comparison target of data 1 moves to the change point “3+”, and the comparison target of data 2 moves to the change point “3-”. In this case, since the two change points have the same offset, both the change point of data 1 and the change point of data 2 move to the next.

ウィンドウはずらされておらず、一致数も変化しないことから、差分処理テーブルの内容に変化はない。   Since the windows are not shifted and the number of matches does not change, the content of the difference processing table does not change.

次に、図56の例に示されるように、データ1の比較の対象が変化点「7−」に移る。ウィンドウはずらされておらず、一致数も変化しないことから、差分処理テーブルのうち、時間差、一致数、後端の一致および次の後端の項目の情報は変化しない。   Next, as shown in the example of FIG. 56, the comparison target of data 1 moves to the change point “7−”. Since the window is not shifted and the number of matches does not change, the time difference, the number of matches, the rear end match, and the information of the next rear end item in the difference processing table do not change.

差分処理部15は、データ1の比較の対象の変化点「7−」がウィンドウから出たため、データ1の前端とデータ2の前端とが一致するか否かを判定する。データ2はウィンドウの前端に到達していないため、差分処理部15は、差分処理テーブルのうち前端の一致の項目を「×」とする。   The difference processing unit 15 determines whether or not the front end of the data 1 matches the front end of the data 2 because the change point “7−” to be compared with the data 1 comes out of the window. Since the data 2 has not reached the front end of the window, the difference processing unit 15 sets “X” as the matching item at the front end in the difference processing table.

また、ウィンドウがずらされた場合、データ1の変化点「7−」がウィンドウに入る。次の前端に格納される変化点を示す情報は、データ番号と順番と到達時間との情報を含む。これらの情報は、次の後端に格納される変化点を示す情報と同様である。   When the window is shifted, the change point “7−” of data 1 enters the window. The information indicating the change point stored at the next front end includes information on the data number, the order, and the arrival time. These pieces of information are the same as the information indicating the change point stored at the next rear end.

データ1の変化点「7−」の場合、データ番号は「D1」であり、順番は「3」であり、到達時間は「1」である。従って、差分処理部15は、差分処理テーブルのうち次の前端の項目に「D1−3(1)」という情報を格納する。   In the case of the change point “7−” of data 1, the data number is “D1”, the order is “3”, and the arrival time is “1”. Therefore, the difference processing unit 15 stores the information “D1-3 (1)” in the next front end item in the difference processing table.

次に、図57の例に示されるように、データ2の比較の対象が変化点「8+」に移る。ウィンドウはずらされておらず、一致数も変化しないことから、差分処理テーブルのうち、時間差、一致数、後端の一致および次の後端の項目の情報は変化しない。   Next, as shown in the example of FIG. 57, the comparison target of the data 2 moves to the change point “8+”. Since the window is not shifted and the number of matches does not change, the time difference, the number of matches, the rear end match, and the information of the next rear end item in the difference processing table do not change.

ウィンドウの前端におけるデータ1の大小関係は「+」であり、データ2の大小関係は「−」である。よって、ウィンドウの前端において、データ1とデータ2とは大小関係が一致しない。差分処理部15は、差分処理テーブルのうち前端の一致の項目を「×」とする。   The magnitude relation of data 1 at the front end of the window is “+”, and the magnitude relation of data 2 is “−”. Therefore, the size relationship between data 1 and data 2 does not match at the front end of the window. The difference processing unit 15 sets “x” as the matching item at the front end in the difference processing table.

また、ウィンドウが2回ずらされた場合、データ2の変化点「8+」はウィンドウに入る。よって、差分処理部15は、差分処理テーブルのうち、次の前端の項目に「D2−4(2)」を追加する。   When the window is shifted twice, the change point “8+” of data 2 enters the window. Therefore, the difference processing unit 15 adds “D2-4 (2)” to the next front end item in the difference processing table.

以上により、差分処理部15は、時間差が「1」の場合の差分処理テーブルを生成する。差分処理部15は、時間差が「1」の場合と同様の処理を行い、時間差が「2」から「6」の場合の差分処理テーブルを生成する。   As described above, the difference processing unit 15 generates a difference processing table when the time difference is “1”. The difference processing unit 15 performs the same processing as when the time difference is “1”, and generates a difference processing table when the time difference is “2” to “6”.

図58は、生成された差分処理テーブルの一例を示す。計数部13は、時間差「1」から「6」までの大小関係の一致数を合計し、一致数P(P=4)を得る。演算部14は、上述した式(A)に、「P=4」、「n=7」を当て嵌めて演算し、類似度(相関値)t(t=−0.62)を得る。   FIG. 58 shows an example of the generated difference processing table. The counting unit 13 sums up the number of matches in the magnitude relationship from the time difference “1” to “6” to obtain the number of matches P (P = 4). The calculation unit 14 performs calculation by fitting “P = 4” and “n = 7” to the above-described formula (A) to obtain a similarity (correlation value) t (t = −0.62).

差分処理部15は、時間差「1」から「6」の差分処理テーブルに基づいて、前端の一致の項目の「○」の数を合計する。図58の例の場合、前端の一致の「○」の数の合計は「1」である。また、差分処理部15は、後端の一致の項目の「○」の数を合計する。図58の例の場合、後端の一致の「○」の数の合計は「4」である。   The difference processing unit 15 sums up the number of “◯” of the matching items at the front end based on the difference processing table of the time differences “1” to “6”. In the case of the example in FIG. 58, the total number of “O” s corresponding to the front end is “1”. Further, the difference processing unit 15 sums up the number of “◯” of the matching items at the rear end. In the case of the example in FIG. 58, the total number of “o” s corresponding to the trailing ends is “4”.

差分処理部15は、前端の一致の「○」の数の合計から後端の一致の「○」の数の合計を減算する。図58の例の場合、減算結果は「−3」になる。この減算結果が、一致数の変化量(図58以降、一致数の変化と表記することがある)である。   The difference processing unit 15 subtracts the sum of the number of matching “◯” at the rear end from the sum of the number of matching “◯” at the front end. In the example of FIG. 58, the subtraction result is “−3”. This subtraction result is the amount of change in the number of matches (may be referred to as a change in the number of matches after FIG. 58).

ウィンドウがずらされた際に、大小関係の変化点がウィンドウから出入りしなければ、一致数の変化量は一定である。一方、ウィンドウがずらされた際に、大小関係の変化点がウィンドウから出入りする場合、一致数の変化量は変化する。   If the change point of the magnitude relationship does not enter or exit from the window when the window is shifted, the amount of change in the number of matches is constant. On the other hand, when the change point of the magnitude relationship enters and exits from the window when the window is shifted, the amount of change in the number of matches changes.

次に、具体例2における管理テーブルの例について説明する。図59の例に示される差分処理テーブルは、図58の例で示した差分処理テーブルのうち、一致数と後端の一致数と前端の一致との項目を省略して表したテーブルである。   Next, an example of the management table in specific example 2 will be described. The difference processing table shown in the example of FIG. 59 is a table in which the items of the number of matches, the number of matches at the rear end, and the match at the front end are omitted from the difference processing table shown in the example of FIG.

管理テーブルは、到達時間と後端と前端との項目を含む。管理テーブルは、ウィンドウに対する変化点の位置関係を示すテーブルである。後端の項目には、後端に到達するまでの時間ごとに、変化点を示す情報が格納される。前端の項目には、前端に到達するまでの時間ごとに、変化点を示す情報が格納される。   The management table includes items of arrival time, rear end, and front end. The management table is a table showing the positional relationship of change points with respect to the window. In the rear end item, information indicating a change point is stored for each time until the rear end is reached. In the front end item, information indicating a change point is stored for each time until the front end is reached.

差分処理部15は、差分処理テーブルの次の後端および次の前端に格納された変化点を示す情報と時間差とに基づいて、管理テーブルを生成する。管理テーブルに格納される変化点を示す情報は、時間差とデータ番号と順番との情報を含む。   The difference processing unit 15 generates a management table based on the information indicating the change point stored in the next rear end and the next front end of the difference processing table and the time difference. Information indicating a change point stored in the management table includes information on a time difference, a data number, and an order.

例えば、図59の例では、時間差「4」における次の後端の項目の変化点を示す情報は「D1−3(3)」である。このうち、「D1」はデータ番号を示し、「3」は順番を示し、括弧内の「3」は到達時間を示す。   For example, in the example of FIG. 59, the information indicating the change point of the next rear end item in the time difference “4” is “D1-3 (3)”. Among these, “D1” indicates the data number, “3” indicates the order, and “3” in parentheses indicates the arrival time.

差分処理部15は、差分処理テーブルから各変化点を抽出し、括弧内の到達時間に応じて、各変化点を管理テーブルに格納する。例えば、次の前端の変化点を示す情報が「D1−3(3)」である場合、差分処理部15は、管理テーブルの到達時間が「3」の前端の項目に該変化点を示す情報を格納する。   The difference processing unit 15 extracts each change point from the difference processing table, and stores each change point in the management table according to the arrival time in parentheses. For example, when the information indicating the next front end change point is “D1-3 (3)”, the difference processing unit 15 indicates the change point in the front end item of the management table arrival time “3”. Is stored.

図59の例では、差分処理部15は、変化点を示す情報を、時間差とデータ番号と順番とを含む情報に変換して、管理テーブルに格納する。例えば、上述した次の前端の変化点を示す情報が「D1−3(3)」の場合、時間差は「4」、データ番号は「D1」、順番は「3」である。   In the example of FIG. 59, the difference processing unit 15 converts information indicating a change point into information including a time difference, a data number, and an order, and stores the information in the management table. For example, when the information indicating the next front end change point is “D1-3 (3)”, the time difference is “4”, the data number is “D1”, and the order is “3”.

差分処理部15は、管理テーブルのうち、到達時間「3」の前端の項目に「4−D1−3」の形式で変化点を示す情報を格納する。差分処理部15は、差分処理テーブルに格納された各変化点を示す情報について同様の処理を行い、図59の例に示すような管理テーブルを記憶部11に記憶する。   The difference processing unit 15 stores information indicating the change point in the form of “4-D1-3” in the front end item of the arrival time “3” in the management table. The difference processing unit 15 performs the same processing on information indicating each change point stored in the difference processing table, and stores a management table as illustrated in the example of FIG.

図60の例は、データ1およびデータ2の双方のウィンドウがずらされた場合の例を示す。この場合、差分処理部15は、図59の例の管理テーブルの到達時間を1つ繰り上げ、データ1およびデータ2のオフセットをインクリメントする。図60の例の場合、データ1およびデータ2のオフセットの値は「1」になる。   The example of FIG. 60 shows an example when the windows of both data 1 and data 2 are shifted. In this case, the difference processing unit 15 increments the arrival time of the management table in the example of FIG. 59 by one and increments the offsets of the data 1 and the data 2. In the example of FIG. 60, the offset value of data 1 and data 2 is “1”.

図61は、差分処理部15が管理テーブルを更新する一例を示す。データ1のウィンドウがずれることにより、時間差「1」における変化点「1−」(管理テーブルにおいては、「1−D1−1」で表される)は、ウィンドウの後端から出る。   FIG. 61 shows an example in which the difference processing unit 15 updates the management table. As the window of data 1 shifts, the change point “1-” (represented by “1-D1-1” in the management table) at the time difference “1” comes from the rear end of the window.

時間差「1」における変化点「1−」がウィンドウから出たため、差分処理部15は、差分処理テーブルの時間差「1」におけるウィンドウの後端の一致を反転する。図61の例の場合、時間差「1」におけるウィンドウの後端の一致は「○」であったため、差分処理部15は、「○」を「×」に反転する。   Since the change point “1-” at the time difference “1” comes out of the window, the difference processing unit 15 inverts the coincidence of the trailing edge of the window at the time difference “1” in the difference processing table. In the example of FIG. 61, the coincidence of the trailing edges of the window at the time difference “1” is “◯”, and therefore the difference processing unit 15 inverts “◯” to “×”.

上述したように、一致数の変化量は、差分処理テーブルにおける前端の一致の「○」の数の合計値から後端の一致の「○」の数の合計値を減算した値である。ウィンドウがずらされる前の一致数の変化量は「−3」であった。   As described above, the amount of change in the number of matches is a value obtained by subtracting the total value of the number of matching “O” at the rear end from the total value of the number of matching “O” at the leading end in the difference processing table. The amount of change in the number of matches before the window was shifted was “−3”.

後端の一致における「○」が「×」に反転した場合、一致数の変化量は増える。図61の例の場合、時間差「1」における後端の一致が「×」に変化したため、一致数の変化量は1つ増える。   When “◯” in the matching at the rear end is inverted to “×”, the amount of change in the number of matches increases. In the case of the example of FIG. 61, the match at the rear end at the time difference “1” has changed to “x”, and thus the amount of change in the number of matches increases by one.

時間差「1」における変化点「1−」の次の変化点は「3+」である。この変化点「3+」が次の後端になる。差分処理部15は、この変化点「3+」を管理テーブルに格納する。   The next change point after the change point “1-” in the time difference “1” is “3+”. This change point “3+” becomes the next rear end. The difference processing unit 15 stores the change point “3+” in the management table.

変化点「3+」はデータ1の変化点であり、時間差は「1」であり、順番は「2」である。差分処理部15は、変化点「3+」を示す情報を「1−D1−2」の形式で管理テーブルの後端に格納する。   The change point “3+” is a change point of the data 1, the time difference is “1”, and the order is “2”. The difference processing unit 15 stores information indicating the change point “3+” in the form of “1-D1-2” at the rear end of the management table.

図62は、データ1の時間差「6」における変化点「2+」に着目した場合の管理テーブルの更新の例を示す。ウィンドウがずれることにより、データ1の時間差「6」における変化点「2+」(管理テーブルにおいては、「6−D1−2」で表される)は、ウィンドウの前端から入る。   FIG. 62 shows an example of updating the management table when attention is paid to the change point “2+” in the time difference “6” of the data 1. As the window shifts, a change point “2+” (represented by “6-D1-2” in the management table) in the time difference “6” of data 1 enters from the front end of the window.

ウィンドウがずれると、時間差「6」の変化点「−1」は、ウィンドウから出る。従って、データ1の時間差「6」における次の後端は、変化点「2+」になる。また、該変化点「2+」がウィンドウの後端に到達するまでの時間(到達時間)は「1」である。   When the window shifts, the change point “−1” of the time difference “6” comes out of the window. Therefore, the next rear end in the time difference “6” of the data 1 is the change point “2+”. The time (arrival time) until the change point “2+” reaches the rear end of the window is “1”.

差分処理部15は、管理テーブルの前端から後端に「6−D1−2」を移動する。また、データ1の時間差「6」における変化点「2+」がウィンドウに入ったため、差分処理部15は差分処理テーブルの時間差「6」における前端の一致を反転させる。   The difference processing unit 15 moves “6-D1-2” from the front end to the rear end of the management table. Further, since the change point “2+” at the time difference “6” of the data 1 has entered the window, the difference processing unit 15 inverts the coincidence of the front end at the time difference “6” of the difference processing table.

時間差「6」における前端の一致が「×」に反転されたため、一致数の変化量は1つ減る。従って、一致数の変化量は「−3(=−3+1−1)」になる。   Since the match at the front end at the time difference “6” is inverted to “x”, the amount of change in the number of matches is reduced by one. Therefore, the amount of change in the number of matches is “−3 (= −3 + 1−1)”.

差分処理部15は、管理テーブルのうち到達時間がゼロの全ての変化点について、上述した処理を行う。図63は、到達時間がゼロの全ての変化点について処理された管理テーブルの例を示す。差分処理部15は、処理を行った変化点を管理テーブルから削除する。   The difference processing unit 15 performs the above-described processing for all the change points in which the arrival time is zero in the management table. FIG. 63 shows an example of a management table that has been processed for all change points whose arrival time is zero. The difference processing unit 15 deletes the processed change point from the management table.

差分処理部15は、差分処理テーブルの後端の一致および前端の一致の更新を行う。図63の例において、例えば、時間差「1」の後端の一致は、2回反転されるため、更新されない。   The difference processing unit 15 updates the rear end match and the front end match of the difference processing table. In the example of FIG. 63, for example, the coincidence of the trailing edge of the time difference “1” is inverted twice and thus is not updated.

ウィンドウがずらされることにより、データ1の時間差「1」の変化点「1−」は、ウィンドウから出る。これにより、差分処理テーブルのうち、該変化点の後端の一致は反転される。   By shifting the window, the change point “1−” of the time difference “1” of the data 1 comes out of the window. Thereby, in the difference processing table, the match at the rear end of the change point is reversed.

また、データ2の時間差「1」の変化点「1−」も、ウィンドウがずらされることにより、ウィンドウから出る。これにより、差分処理テーブルのうち、該変化点の後端の一致は反転される。   Further, the change point “1−” of the time difference “1” of the data 2 also comes out of the window by shifting the window. Thereby, in the difference processing table, the match at the rear end of the change point is reversed.

従って、差分処理テーブルのうち、時間差「1」の後端の一致は、2回反転されることになるため、この場合、差分処理部15は、時間差「1」の後端の一致を更新しない。   Accordingly, in the difference processing table, the match at the trailing edge of the time difference “1” is inverted twice. In this case, the difference processing unit 15 does not update the matching at the trailing edge of the time difference “1”. .

図63の例の場合、差分処理テーブルのうち、前端の一致の「○」の数の合計と後端の一致の「○」の数の合計とは変化しない。よって、ウィンドウがずらされた後(更新後)の一致数の変化量は「−3」になる。   In the case of the example in FIG. 63, the sum of the number of matching “O” at the front end and the sum of the number of matching “O” at the rear end in the difference processing table do not change. Therefore, the amount of change in the number of matches after the window is shifted (after update) is “−3”.

図64の例に示されるように、差分処理部15は、ウィンドウがずらされる前の一致数「4」に、一致数の変化量「−3」を加算する。これにより、ウィンドウがずらされた後のデータ1とデータ2との大小関係の一致数は「1(=4−3)」になる。   As shown in the example of FIG. 64, the difference processing unit 15 adds the amount of change “−3” of the number of matches to the number of matches “4” before the window is shifted. As a result, the number of matches in the magnitude relationship between the data 1 and the data 2 after the window is shifted is “1 (= 4-3)”.

演算部14は、一致数P(P=1)、項目数(n=7)を上述した式(A)に当て嵌めて演算し、演算結果として、ウィンドウがずらされた後の類似度「t=−0.90」を得る。   The calculation unit 14 calculates the number of matches P (P = 1) and the number of items (n = 7) by applying the above formula (A), and as a calculation result, the similarity “t” after the window is shifted. = −0.90 ”.

図65は、次に、ウィンドウがずらされた場合における類似度(相関値)の演算の例を示す。ウィンドウがずらされたため、変化点データのオフセットは1つ増える。ウィンドウがずらされる前の一致数の変化量は「−3」である。   FIG. 65 shows an example of calculating the similarity (correlation value) when the window is shifted. Since the window is shifted, the offset of the change point data is increased by one. The amount of change in the number of matches before the window is shifted is “−3”.

差分処理テーブルにおいて、時間差「3」における前端の一致と、時間差「1」における前端の一致とが反転する。両者は、逆方向に反転するため、前端の一致のみに着目すると、一致数の変化量はゼロである。   In the difference processing table, the match of the front end at the time difference “3” and the match of the front end at the time difference “1” are reversed. Since both are reversed in the opposite direction, when only focusing on the coincidence at the front end, the amount of change in the coincidence number is zero.

差分処理テーブルの後端の一致において、時間差「1」、「4」、「5」および「6」の4つが、「○」から「×」に変化する。よって、一致数の変化量は4つ増える。ウィンドウがずらされる前の一致数の変化量は「−3」であったため、ウィンドウがずらされた後の一致数の変化量は「1(=−3+4)」になる。   In the coincidence at the rear end of the difference processing table, the four time differences “1”, “4”, “5”, and “6” change from “◯” to “X”. Therefore, the amount of change in the number of matches increases by four. Since the amount of change in the number of matches before the window is shifted is “−3”, the amount of change in the number of matches after the window is shifted is “1 (= −3 + 4)”.

差分処理部15は、ウィンドウがずらされる前の一致数は「1」に一致数の変化量「1」を加算して、一致数P(P=2)を得る。   The difference processing unit 15 adds the change number “1” of the number of matches to “1” as the number of matches before the window is shifted to obtain the number of matches P (P = 2).

演算部14は、一致数P(P=2)、項目数n(n=7)を上述した式(A)に当て嵌めて類似度tの演算を行う。これにより、演算部14は、類似度「t=−0.81」を得る。   The calculation unit 14 calculates the similarity t by fitting the number of matches P (P = 2) and the number of items n (n = 7) to the above-described formula (A). Thereby, the calculation unit 14 obtains the similarity “t = −0.81”.

図66は、次に、ウィンドウがずらされた場合における類似度の演算の例を示す。差分処理部15は、ウィンドウがずらされたため、データ1およびデータ2のオフセットを「3」に更新する。   Next, FIG. 66 shows an example of similarity calculation when the window is shifted. The difference processing unit 15 updates the offset of data 1 and data 2 to “3” because the window is shifted.

図66の例において、差分処理テーブルの時間差「1」および「4」における前端の一致が「○」に反転している。   In the example of FIG. 66, the coincidence of the leading ends in the time differences “1” and “4” in the difference processing table is inverted to “◯”.

よって、差分処理部15は、ウィンドウがずらされる前の変化量「1」に「2」を加算して、一致数の変化量「3」を得る。また、ウィンドウがずらされる前の一致数は「2」であったため、差分処理部15は、「2」に「3」を加算して、一致数P(P=5)を得る。   Therefore, the difference processing unit 15 adds “2” to the change amount “1” before the window is shifted to obtain the change amount “3” of the number of matches. Since the number of matches before the window is shifted is “2”, the difference processing unit 15 adds “3” to “2” to obtain the number of matches P (P = 5).

演算部14は、一致数P(P=5)、項目数n(n=7)を上述した式(A)に当て嵌めて類似度tの演算を行う。これにより、演算部14は、類似度「t=−0.52」を得る。ウィンドウは、データ1およびデータ2の末尾までずらされたため、処理は完了する。   The calculation unit 14 calculates the similarity t by fitting the number of matches P (P = 5) and the number of items n (n = 7) to the above-described equation (A). Thereby, the calculation unit 14 obtains the similarity “t = −0.52”. Since the window has been shifted to the end of data 1 and data 2, the processing is completed.

<具体例3>
次に、類似度の演算を行う対象である2つの時系列データのうち、片方の時系列データのウィンドウを固定し、他方の時系列データのウィンドウをずらす場合における類似度の演算の例について説明する。
<Specific example 3>
Next, an example of similarity calculation when the window of one time series data is fixed and the window of the other time series data is shifted among the two time series data to be subjected to similarity calculation will be described. To do.

図67の例において、データ1の変化点データのうち、時間「3」から「9」までがウィンドウ範囲であるとする。図67の例に示されるように、差分処理部15は、オフセット「2(=時間「3」−時間「1」)」として、以下の処理を行う。   In the example of FIG. 67, it is assumed that time “3” to “9” of the change point data of data 1 is the window range. As illustrated in the example of FIG. 67, the difference processing unit 15 performs the following processing as an offset “2 (= time“ 3 ”−time“ 1 ”)”.

データ1のウィンドウは固定される。時間差「1」の変化点「1−」は、ウィンドウに入っていない。変化点テーブルのうち、次の変化点「3+」はウィンドウ内のうち後端に位置する。よって、該変化点「3+」のアンカーは、タイプBである。   The window for data 1 is fixed. The change point “1-” of the time difference “1” is not in the window. In the change point table, the next change point “3+” is located at the rear end in the window. Therefore, the anchor of the change point “3+” is type B.

差分処理部15は、アンカーに関するデータ(以下、アンカーデータ)に上記の変化点「3+」の情報を追加する。差分処理部15は、変化点「3+」のオフセットである括弧内の「1」と、タイプBであることを特定する情報と、大小関係が「+」である情報とをアンカーデータに追加する。図68の例では、この情報は「B1+」である。   The difference processing unit 15 adds the information on the change point “3+” to the data related to the anchor (hereinafter, anchor data). The difference processing unit 15 adds “1” in parentheses, which is an offset of the change point “3+”, information specifying type B, and information having a magnitude relationship of “+” to the anchor data. . In the example of FIG. 68, this information is “B1 +”.

図69の例において、変化点「7−」は、ウィンドウ内のうち後端ではない場所に位置する。よって、該変化点「7−」のアンカーは、タイプCであり、オフセットは「5」である。差分処理部15は、アンカーデータに「C5−」を追加する。   In the example of FIG. 69, the change point “7−” is located at a location other than the rear end in the window. Therefore, the anchor of the change point “7−” is type C, and the offset is “5”. The difference processing unit 15 adds “C5-” to the anchor data.

差分処理部15は、時間差「1」について、ウィンドウの前端に変化点があるかを判定する。変化点テーブルのうち最後の変化点は「7−」である。よって、図70の例の場合、ウィンドウの前端に変化点はない。   The difference processing unit 15 determines whether there is a change point at the front edge of the window for the time difference “1”. The last change point in the change point table is “7−”. Therefore, in the example of FIG. 70, there is no change point at the front edge of the window.

この場合、上述したように、差分処理部15は、変化点を追加する。ウィンドウの前端の時間は「10」であるため、オフセットは「7」である。また、時間「10」における大小関係は「+」である。よって、差分処理部15は、アンカーデータに「A7+」を追加する。   In this case, as described above, the difference processing unit 15 adds a change point. Since the time at the front edge of the window is “10”, the offset is “7”. The magnitude relationship at time “10” is “+”. Therefore, the difference processing unit 15 adds “A7 +” to the anchor data.

図71は、時間差「1」から「6」までのアンカーデータの例を示す。差分処理部15は、時間差「1」の場合と同様の処理を行い、時間差「2」から「6」までのアンカーデータを生成する。時間差ごとのアンカーデータは、データ1における固定されたウィンドウの情報である。   FIG. 71 shows an example of anchor data from the time difference “1” to “6”. The difference processing unit 15 performs the same processing as in the case of the time difference “1”, and generates anchor data from the time difference “2” to “6”. Anchor data for each time difference is information of a fixed window in data 1.

次に、データ1とデータ2との大小関係の一致数の例について説明する。具体例3では、データ1とデータ2とを比較する場合、差分処理部15は、データ1についてはアンカーテーブルを用い、データ2については変化点テーブルを用いる。   Next, an example of the number of matches in the magnitude relationship between data 1 and data 2 will be described. In Specific Example 3, when data 1 and data 2 are compared, the difference processing unit 15 uses an anchor table for data 1 and a change point table for data 2.

図71の例の場合、データ2のウィンドウ範囲は、時間「1」から「7」までである。一方、データ1のウィンドウ範囲は時間「3」から「9」までである。上述したように、差分処理部15は、オフセット「2」を考慮して、データ1のアンカーデータを生成する。   In the case of the example of FIG. 71, the window range of the data 2 is from time “1” to “7”. On the other hand, the window range of data 1 is from “3” to “9”. As described above, the difference processing unit 15 generates anchor data of data 1 in consideration of the offset “2”.

図72の例では、比較の対象は、データ1については、アンカー「B1+」であり、データ2については、変化点「1−」である。アンカー「B1−」は、上述したように、データ1における変化点「3」に対応する。   In the example of FIG. 72, the comparison target is the anchor “B1 +” for data 1 and the change point “1-” for data 2. The anchor “B1-” corresponds to the change point “3” in the data 1 as described above.

図72の例において、差分処理部15は、アンカーテーブルを生成する。アンカーテーブルは、時間差に応じた、一致数とアンカーの一致関係と次にアンカーに到達する変化点との情報を含む。   In the example of FIG. 72, the difference processing unit 15 generates an anchor table. The anchor table includes information on the number of matches, the matching relationship between the anchors, and the change point that reaches the anchor next, according to the time difference.

アンカーの一致関係は、比較対象であるデータ1のアンカーとデータ2の変化点との大小関係が一致するか否かを示す。図72の例では、アンカーの一致関係は、アンカーの順番ごとに、一致するか否かを示す。   The anchor correspondence relationship indicates whether or not the magnitude relationship between the anchor of data 1 to be compared and the change point of data 2 matches. In the example of FIG. 72, the matching relationship between anchors indicates whether or not they match for each anchor order.

アンカー「B1+」と変化点「1−」とは大小関係が逆である。アンカー「B1−」においてデータ1とデータ2との大小関係が一致しないため、差分処理部15は、アンカーテーブルの1番を「×」にする。また、アンカー「B1+」と変化点「1−」との大小関係が一致しないため、計数部13は、大小関係の一致数を加算しない。   The magnitude relationship between the anchor “B1 +” and the change point “1-” is opposite. Since the magnitude relationship between the data 1 and the data 2 does not match in the anchor “B1-”, the difference processing unit 15 sets the number 1 in the anchor table to “x”. Further, since the magnitude relationship between the anchor “B1 +” and the change point “1-” does not match, the counting unit 13 does not add the number of matches in the magnitude relationship.

図73の例は、比較の対象が、データ1のアンカー「B1+」とデータ2の変化点「2+」とである場合を示す。データ1の変化点「1+」からデータ2の変化点「2+」までの大小関係は「+」であり、データ1のアンカー「B1+」の大小関係と一致する。よって、差分処理部15は、大小関係の一致数を加算する。   The example of FIG. 73 shows a case where the comparison targets are the anchor “B1 +” of data 1 and the change point “2+” of data 2. The magnitude relationship from the change point “1+” of data 1 to the change point “2+” of data 2 is “+”, which matches the magnitude relationship of the anchor “B1 +” of data 1. Therefore, the difference processing unit 15 adds the number of coincidence in magnitude relation.

データ2の変化点「2+」は、ウィンドウがずらされると、ウィンドウ内の後端に位置する。差分処理部15は、アンカーテーブルのうち「次にアンカーに到達する変化点」に、データ2の変化点「2+」の情報を格納する。   The change point “2+” of data 2 is located at the rear end of the window when the window is shifted. The difference processing unit 15 stores the information of the change point “2+” of the data 2 in “change point that reaches the anchor next” in the anchor table.

差分処理部15は、データ2の変化点の順番を示す情報と、該変化点がアンカー(この場合は、ウィンドウ内の後端)に到達するまでにウィンドウがずらされる回数(時間)の情報と、対応するアンカーの順番を示す情報とを、アンカーテーブルに格納する。   The difference processing unit 15 includes information indicating the order of the change points of the data 2, information on the number of times (time) the window is shifted before the change points reach the anchor (in this case, the rear end in the window), and The information indicating the order of the corresponding anchors is stored in the anchor table.

図73の例では、データの変化点「2+」の順番を示す情報は「2」である。該変化点「2+」はウィンドウが1回ずらされると、アンカーに到達する。対応するアンカーは「B1+」であるため、対応するアンカーの順番を示す情報は「1」である。   In the example of FIG. 73, the information indicating the order of the data change point “2+” is “2”. The change point “2+” reaches the anchor when the window is shifted once. Since the corresponding anchor is “B1 +”, the information indicating the order of the corresponding anchor is “1”.

差分処理部15は、アンカーテーブルのうち「次にアンカーに到達する変化点」に、変化点「2+」を示す情報として、「2(1)−1」を格納する。括弧内の値は、上記の変化点がアンカーに到達するまでにウィンドウがずらされる回数を示す。   The difference processing unit 15 stores “2 (1) −1” as information indicating the change point “2+” in “change point that reaches the anchor next” in the anchor table. The value in parentheses indicates the number of times the window is shifted before the above change point reaches the anchor.

図74の例は、比較の対象が、データ1のアンカー「B1+」とデータ2の変化点「3−」とである場合を示す。データ1の変化点「2+」からデータ2の変化点「3−」までの大小関係は「−」であり、データ1のアンカー「B1+」の大小関係と一致しない。よって、差分処理部15は、大小関係の一致数を加算しない。   The example of FIG. 74 shows a case where the comparison targets are the anchor “B1 +” of data 1 and the change point “3-” of data 2. The magnitude relationship from the change point “2+” of data 1 to the change point “3-” of data 2 is “−”, which does not match the magnitude relationship of the anchor “B1 +” of data 1. Therefore, the difference processing unit 15 does not add the number of coincidence in magnitude relation.

図75の例に示されるように、差分処理部15は、比較の対象を、データ1のアンカー「C5−」とデータ2の変化点「3−」とに移す。データ1の変化点「2+」からデータ2の変化点「3−」までの大小関係は「−」であり、データ2のアンカー「C5−」の大小関係と一致する。よって、差分処理部15は、大小関係の一致数を加算する。   As shown in the example of FIG. 75, the difference processing unit 15 moves the comparison target to the anchor “C5-” of data 1 and the change point “3-” of data 2. The magnitude relationship from the change point “2+” of data 1 to the change point “3-” of data 2 is “−”, which matches the magnitude relationship of the anchor “C5-” of data 2. Therefore, the difference processing unit 15 adds the number of coincidence in magnitude relation.

また、データ1のアンカー「C5−」において、該アンカー「C5−」と変化点「3−」とは大小関係が一致する。よって、差分処理部15は、「アンカーの一致関係」の2番目を「○」にする。   In the anchor “C5-” of data 1, the anchor “C5-” and the change point “3-” have the same magnitude relationship. Therefore, the difference processing unit 15 sets the second “anchor matching relationship” to “◯”.

図76の例に示されるように、差分処理部15は、比較の対象を、データ1のアンカー「A7+」とデータ2の変化点「3−」とに移す。データ1の変化点「2+」からデータ2の変化点「3−」までの大小関係は「−」であり、データ1のアンカー「B1+」の大小関係と一致する。よって、差分処理部15は、大小関係の一致数を加算する。   As shown in the example of FIG. 76, the difference processing unit 15 moves the comparison target to the anchor “A7 +” of data 1 and the change point “3-” of data 2. The magnitude relationship from the change point “2+” of data 1 to the change point “3-” of data 2 is “−”, which matches the magnitude relationship of the anchor “B1 +” of data 1. Therefore, the difference processing unit 15 adds the number of coincidence in magnitude relation.

また、データ1のアンカー「A7+」において、該アンカー「A7+」と変化点「3−」とは大小関係が一致しない。よって、差分処理部15は、「アンカーの一致関係」の3番目を「×」にする。   Further, in the anchor “A7 +” of the data 1, the anchor “A7 +” does not coincide with the change point “3-”. Therefore, the difference processing unit 15 sets the third “anchor matching relationship” to “x”.

図77の例に示されるように、ウィンドウがずらされると、データ2の変化点「8+」はウィンドウの前端に位置する。差分処理部15は、アンカーテーブルのうち「次にアンカーに到達する変化点」に、データ2の変化点「8+」の情報を格納する。   As shown in the example of FIG. 77, when the window is shifted, the change point “8+” of data 2 is located at the front end of the window. The difference processing unit 15 stores the information of the change point “8+” of the data 2 in “change point that reaches the anchor next” in the anchor table.

データ2の変化点「8+」の順番を示す情報は「4」であり、該変化点がアンカー(この場合はウィンドウの前端)に到達するまでにウィンドウがずらされる回数は「1」であり、対応するアンカーの順番は「3」である。よって、差分処理部15は、「次にアンカーに到達する変化点」に「4(1)−3」を追加する。   The information indicating the order of the change point “8+” of data 2 is “4”, and the number of times the window is shifted before the change point reaches the anchor (in this case, the front end of the window) is “1”. The corresponding anchor order is “3”. Therefore, the difference processing unit 15 adds “4 (1) -3” to “the changing point that reaches the anchor next”.

以上により、時間差「1」についての処理が終了する。差分処理部15は、時間差「1」と同様の処理を、時間差「2」から「6」について行う。図78は、時間差ごとのアンカーテーブルの一例を示す。   Thus, the process for the time difference “1” is completed. The difference processing unit 15 performs the same processing as the time difference “1” for the time differences “2” to “6”. FIG. 78 shows an example of an anchor table for each time difference.

図79の例において、差分処理部15は、アンカーテーブルの「次にアンカーに到達する変化点」に格納された各変化点の情報を、アンカーに到達するまでにウィンドウがずらされる回数順(時間順)に管理する。   In the example of FIG. 79, the difference processing unit 15 uses the information of each change point stored in “change point that reaches the anchor next” in the anchor table in order of the number of times that the window is shifted before reaching the anchor (time (In order).

差分処理部15は、アンカーテーブルのうち「次にアンカーに到達する変化点」の各変化点の情報のうち、ウィンドウがずらされる回数を到達時間として、到達時間順に各変化点の情報を管理テーブルに格納する。   The difference processing unit 15 manages the information of each change point in the order of arrival time, with the arrival time being the number of times the window is shifted among the information of each change point of “the next change point reaching the anchor” in the anchor table. To store.

図79の例では、差分処理部15は、各変化点の情報を「時間差―変化点の順番―アンカーの順番」の形式で管理テーブルに格納する。例えば、アンカーテーブルの「次にアンカーに到達する変化点」に格納された情報が「2(1)−1」の場合、差分処理部15は、「1−2−1」の形式で該変化点の情報を管理テーブルに格納する。   In the example of FIG. 79, the difference processing unit 15 stores information on each change point in the management table in the format of “time difference—change point order—anchor order”. For example, when the information stored in “change point reaching the next anchor” in the anchor table is “2 (1) -1”, the difference processing unit 15 changes the change in the form “1-2-1”. The point information is stored in the management table.

これにより、差分処理部15は、管理テーブルを用いて、ウィンドウがずらされた場合における変化点の到達時間を管理する。   Thereby, the difference processing unit 15 manages the arrival time of the change point when the window is shifted using the management table.

図79の例のアンカーテーブルにおいて、一致数の合計は「8(=3+3+2)」である。演算部14は、一致数P(P=8)、項目数n(n=7)を上述した式(A)に当て嵌めて演算を行い、類似度t「t=−0.23」を得る。   In the anchor table of the example of FIG. 79, the total number of matches is “8 (= 3 + 3 + 2)”. The computing unit 14 performs computation by fitting the number of matches P (P = 8) and the number of items n (n = 7) to the above-described formula (A) to obtain a similarity t “t = −0.23”. .

上述したように、類似度の演算を行う対象の2つの時系列データうち、片方の時系列データのウィンドウを固定し、他方の時系列データのウィンドウをずらす場合、アンカーのタイプごとに一致数の変化量および変化量の差分に重みが付与される。   As described above, when the window of one time-series data is fixed and the window of the other time-series data is shifted among the two time-series data to be subjected to the similarity calculation, the number of matches is different for each anchor type. A weight is assigned to the change amount and the difference between the change amounts.

例えば、時間差「1」の「B1+×」は、アンカー「B1+」に対応するデータ2の変化点「1−」と大小関係が一致しないことを示す。従って、「B1+×」は、タイプBであり、且つ大小関係が不一致であることを示すため、重みはゼロである。   For example, “B1 ++” of the time difference “1” indicates that the magnitude relationship does not coincide with the change point “1-” of the data 2 corresponding to the anchor “B1 +”. Therefore, “B1 + ×” is type B and the weight relationship is zero to indicate that the magnitude relationship is inconsistent.

また、時間差「1」の「C5−○」は、アンカー「C5−」に対応する変化点「3−」と大小関係が一致することを示す。従って、「C5−○」は、タイプCであり、且つ大小関係が一致することを示すため、重みは「−1」である。   In addition, “C5- ◯” with a time difference “1” indicates that the magnitude relationship is coincident with the change point “3-” corresponding to the anchor “C5-”. Therefore, “C5- ◯” is type C, and the weight is “−1” to indicate that the magnitude relationship is the same.

差分処理部15は、時間差ごとのアンカーデータに重み付けを行い、全てのアンカーの重みを合計する。図80の例の場合、重みの合計は「−2」である。この重みの合計が一致数の変化量になる。   The difference processing unit 15 weights the anchor data for each time difference and sums the weights of all anchors. In the example of FIG. 80, the total weight is “−2”. The sum of these weights becomes the amount of change in the number of matches.

上述したように、ウィンドウがずらされる前の大小関係の一致数は「8」である。差分処理部15は、ウィンドウがずらされる前の大小関係の一致数に一致数の変化量を加算する。これにより、ウィンドウがずらされた後(更新後)の大小関係の一致数Pは、「P=8+(−2)=6」となる。   As described above, the number of matches in the magnitude relationship before the window is shifted is “8”. The difference processing unit 15 adds the amount of change in the number of matches to the number of matches in the magnitude relationship before the window is shifted. As a result, the number of coincidence P in the magnitude relation after the window is shifted (after update) is “P = 8 + (− 2) = 6”.

演算部14は、一致数P(P=6)、項目数n(n=7)を上述した式(A)に当て嵌めて演算を行い、類似度t「t=−0.42」を得る。   The computing unit 14 performs computation by fitting the number of matches P (P = 6) and the number of items n (n = 7) to the above-described formula (A) to obtain the similarity t “t = −0.42”. .

図81は、データ2のウィンドウがずらされた場合の一例を示す。ウィンドウがずらされたため、差分処理部15は、データ2のオフセットを1つ増やす。ウィンドウがずらされたことにより、管理テーブルの到達時間がずらされる。   FIG. 81 shows an example when the window of data 2 is shifted. Since the window is shifted, the difference processing unit 15 increases the offset of the data 2 by one. Due to the shifting of the window, the arrival time of the management table is shifted.

例えば、ウィンドウがずらされたことにより、データ2の変化点「2+」は、アンカーに到達する。該変化点「2+」は、管理テーブルでは、「1−2−1」として管理される。   For example, the change point “2+” of the data 2 reaches the anchor because the window is shifted. The change point “2+” is managed as “1-2-1” in the management table.

差分処理部15は、管理テーブルにおいて「1−2−1」が到達時間ゼロに達したため、「1−2−1」に対応するアンカー「B1−」の大小関係の一致を反転させる。これにより、時間差「1」におけるアンカー「B1−」は「○」に反転される。   Since “1-2-1” has reached zero arrival time in the management table, the difference processing unit 15 reverses the matching of the magnitude relationship of the anchor “B1-” corresponding to “1-2-1”. As a result, the anchor “B1−” at the time difference “1” is inverted to “◯”.

差分処理部15は、アンカー「B1−」の大小関係が「×」から「○」に反転したため、一致数の変化を1つ減らす。   The difference processing unit 15 reduces the change in the number of matches by one because the magnitude relationship of the anchor “B1-” is inverted from “×” to “◯”.

また、データの変化点「2+」の次の変化点「3−」は、アンカー「B1+」からアンカー「C5−」の間に存在するため、差分処理部15は、変化点「3−」に関する情報を管理テーブルに追加する。データ2の変化点「3−」は、管理テーブルでは、「1−3−1」として管理される。   Further, since the next change point “3-” of the data change point “2+” exists between the anchor “B1 +” and the anchor “C5-”, the difference processing unit 15 relates to the change point “3-”. Add information to the management table. The change point “3-” of data 2 is managed as “1-3-1” in the management table.

図82の例において、管理テーブルの到達時間ゼロのうち「1−4−3」は、上述したように、データ2の変化点「8+」であることを示す。この変化点「8+」は、アンカー「A7+」に対応する。   In the example of FIG. 82, “1-4-3” of zero arrival time in the management table indicates the change point “8+” of data 2 as described above. This change point “8+” corresponds to the anchor “A7 +”.

従って、差分処理部15は、アンカー「A7+」の大小関係を「○」に反転する。差分処理部15は、アンカー「A7+」の大小関係が「×」から「○」に反転したため、一致数の変化量を1つ減らす。   Therefore, the difference processing unit 15 reverses the magnitude relationship of the anchor “A7 +” to “◯”. The difference processing unit 15 decreases the amount of change in the number of matches by one because the magnitude relationship of the anchor “A7 +” is inverted from “×” to “◯”.

データ2の変化点「8+」は、ウィンドウが2回ずらされると、アンカー「C5−」に達する。アンカー「C5−」を示す順番は「2」である。よって、差分処理部15は、データ2の変化点「8+」を示す管理テーブルの「1−4−3」を「1−4−2」として、到達時間「2」に格納する。   The change point “8+” of data 2 reaches the anchor “C5−” when the window is shifted twice. The order indicating the anchor “C5-” is “2”. Therefore, the difference processing unit 15 stores “1-4-3” in the management table indicating the change point “8+” of the data 2 as “1-4-2” and stores it in the arrival time “2”.

また、差分処理部15は、データ2の変化点「9−」を示す「1−5−3」を管理テーブルに追加する。   Also, the difference processing unit 15 adds “1-5-3” indicating the change point “9-” of the data 2 to the management table.

図83は、全ての時間差について、差分処理部15が処理した例を示す。差分処理部15は、データ1の全てのアンカーについて、タイプごとの重み付けに基づいて、変化量の差分を求める処理を行い、「−2」を得る。   FIG. 83 shows an example in which the difference processing unit 15 has processed all time differences. The difference processing unit 15 performs a process for obtaining a difference in the amount of change for all anchors of the data 1 based on the weighting for each type to obtain “−2”.

ウィンドウがずれる前の一致数の変化量は「−2」であったため、一致数の変化量は「−4(=(−2)+(−2))」となる。ウィンドウがずれる前の大小関係の一致数は「6」であったため、ウィンドウがずれた後の一致数Pは「P=6−4=2」になる。   Since the amount of change in the number of matches before the window is shifted is “−2”, the amount of change in the number of matches is “−4 (= (− 2) + (− 2))”. Since the number of matches in the magnitude relationship before the window is shifted is “6”, the number of matches P after the window is shifted is “P = 6−4 = 2”.

演算部14は、一致数P(P=2)、項目数n(n=7)を上述した式(A)に当て嵌めて演算を行い、類似度t「t=−0.80」を得る。   The computing unit 14 performs computation by fitting the number of matches P (P = 2) and the number of items n (n = 7) to the above-described formula (A) to obtain the similarity t “t = −0.80”. .

また、差分処理部15は、到達時間ゼロの変化点の情報を削除し、上述した処理を行い、管理テーブルを更新する。   Further, the difference processing unit 15 deletes the information of the change point with zero arrival time, performs the above-described processing, and updates the management table.

図84は、次にウィンドウがずれた場合の例を示す。差分処理部15は、アンカーデータに基づいて、タイプごとの重み付けを行い、変化量の差分「5」を得る。ウィンドウがずれる前の一致数の変化量は「−4」であったため、差分処理部15は、「−4」に「5」を加算して、一致数の変化量「1」を得る。   FIG. 84 shows an example when the window is shifted next. The difference processing unit 15 performs weighting for each type based on the anchor data, and obtains a difference “5” in the amount of change. Since the amount of change in the number of matches before the window is shifted is “−4”, the difference processing unit 15 adds “5” to “−4” to obtain the amount of change in the number of matches “1”.

ウィンドウがずれる前の一致数は「2」であったため、差分処理部15は、これに一致数の変化量「1」を加算して、一致数P(P=3)を得る。演算部14は、一致数P(P=3)、項目数n(n=7)を上述した式(A)に当て嵌めて演算を行い、類似度t「t=−0.71」を得る。   Since the number of matches before the window is shifted was “2”, the difference processing unit 15 adds the amount of change “1” to the number of matches to obtain the number of matches P (P = 3). The computing unit 14 performs computation by fitting the number of matches P (P = 3) and the number of items n (n = 7) to the above-described formula (A) to obtain the similarity t “t = −0.71”. .

図84の例に示されるように、データ2の期間は時間「1」から「10」までである。ウィンドウは、データ2の期間の末尾まで移動したため、具体例3の処理が終了する。   As shown in the example of FIG. 84, the period of the data 2 is from time “1” to “10”. Since the window has moved to the end of the period of data 2, the processing of specific example 3 ends.

<他の値を用いた一致数の例>
次に、上述した各例とは異なる値を用いた2つの時系列データの大小関係の一致数の例について説明する。図85の例の変化点テーブルに示されるように、オフセットおよび変化点の値は、上述した各例とは異なる。「D1」はデータ1であり、「D2」はデータ2である。
<Example of number of matches using other values>
Next, an example of the number of coincidence in magnitude relation between two time series data using values different from the above examples will be described. As shown in the change point table of the example of FIG. 85, the offset and change point values are different from the above-described examples. “D1” is data 1 and “D2” is data 2.

図85の例において、2つの時系列データの期間は、時間「1」から「20」までとする。従って、データ1およびデータ2の期間は「20」である。また、図85は、時間差「4」の場合の例を示す。この場合、ウィンドウ範囲は「1」から「16」になる。   In the example of FIG. 85, the period of the two time-series data is from time “1” to “20”. Therefore, the period of data 1 and data 2 is “20”. FIG. 85 shows an example when the time difference is “4”. In this case, the window range is “1” to “16”.

図86の例に示されるように、計数部13は、変化点テーブルのうち、データ1の始点のオフセット補正後の位置を求める。オフセット補正後の位置は、上述したインデックスである。図86の例の場合、オフセット補正後の位置は「−3=4−7」である。   As shown in the example of FIG. 86, the counting unit 13 obtains the position after offset correction of the start point of data 1 in the change point table. The position after offset correction is the index described above. In the case of the example in FIG. 86, the position after offset correction is “−3 = 4-7”.

オフセット補正後の位置が「−」であるため、データ1の変化点「4+」はウィンドウに入っていない。従って、この時点では、計数部13は、一致数を加算しないため、一致数はゼロである。   Since the position after offset correction is “−”, the change point “4+” of data 1 is not in the window. Accordingly, at this time, the counting unit 13 does not add the number of matches, and therefore the number of matches is zero.

計数部13は、オフセットの値が小さい変化点から順番に比較の対象を移す。図87の例に示されるように、データ1の変化点「19−」のオフセットは「12」であり、データ2の変化点「8−」のオフセットは「6」である。   The counting unit 13 moves the comparison target in order from the changing point where the offset value is small. As shown in the example of FIG. 87, the offset of the change point “19−” of data 1 is “12”, and the offset of the change point “8−” of data 2 is “6”.

従って、計数部13は、データ1の変化点「4+」とデータ2の変化点「8−」とを比較の対象として、大小関係の一致数を求める。データ1におけるオフセット補正後の位置「−3」以降の大小関係は「+」である。また、データ2におけるオフセット補正後の位置「6」以降の大小関係は「−」であり、「5」以前の大小関係は「+」である。   Accordingly, the counting unit 13 obtains the number of coincidence of magnitude relations by using the change point “4+” of data 1 and the change point “8−” of data 2 as a comparison target. The magnitude relationship after the position “−3” after offset correction in data 1 is “+”. Further, the magnitude relationship after the position “6” after offset correction in the data 2 is “−”, and the magnitude relationship before “5” is “+”.

よって、オフセット補正後の位置「1」から「5」までの範囲の大小関係は「+」であり、一致する。計数部13は、大小関係が一致する数をカウントする。従って、一致数は、「5」になる。   Therefore, the magnitude relationship in the range from the position “1” to “5” after offset correction is “+”, which matches. The counting unit 13 counts the number of matching magnitude relationships. Therefore, the number of matches is “5”.

図88の例に示されるように、次にオフセット補正後の値が最も小さい変化点は「19−」である。データ1は、ウィンドウ範囲に対して、オフセット補正後の位置が「11」より前の大小関係は「+」である。データ2は、オフセット補正後の位置が「7」から「11」までの間における大小関係は「−」である。   As shown in the example of FIG. 88, the change point with the smallest value after the offset correction is “19−”. In the data 1, the magnitude relationship before the position after offset correction with respect to the window range is “+” is “+”. In the data 2, the magnitude relationship between the positions after offset correction from “7” to “11” is “−”.

よって、オフセット補正後の位置が「7」から「11」までの間におけるデータ1とデータ2とは不一致である。一方、データ1は、オフセット補正後の位置「12」以降、大小関係が「+」になる。   Therefore, the data 1 and the data 2 in the positions after the offset correction from “7” to “11” are inconsistent. On the other hand, the magnitude relation of data 1 becomes “+” after the position “12” after the offset correction.

このため、オフセット補正後の位置「12」において、データ1とデータ2との大小関係が一致する。計数部13は、一致数をカウントして、一致数「1」を得る。ここまでの、一致数の合計は「6=1+5」である。   For this reason, the magnitude relationship between data 1 and data 2 coincides at position “12” after offset correction. The counter 13 counts the number of matches and obtains the number of matches “1”. The total number of matches so far is “6 = 1 + 5”.

図89の例に示されるように、次にオフセット補正後の値が最も小さい変化点はデータ1の「22+」である。データ1は、オフセット補正後の位置「13」から「14」の大小関係は「−」であり、「15」以降の大小関係は「+」である。   As shown in the example of FIG. 89, the next change point with the smallest value after offset correction is “22+” of data 1. In data 1, the magnitude relationship between the positions “13” to “14” after offset correction is “−”, and the magnitude relationship after “15” is “+”.

データ2は、オフセット補正後の位置「6」以降の大小関係は「−」である。よって、データ1とデータ2とは、オフセット補正後の位置「13」から「14」において大小関係が一致する。従って、計数部13は、一致数をカウントして、一致数「2」を得る。ここまでの、一致数の合計は「8=6+2」である。   In the data 2, the magnitude relationship after the position “6” after the offset correction is “−”. Therefore, data 1 and data 2 have the same magnitude relationship at positions “13” to “14” after offset correction. Accordingly, the counting unit 13 counts the number of matches and obtains the number of matches “2”. The total number of matches so far is “8 = 6 + 2”.

図90の例に示されるように、次にオフセット補正後の値が最も小さい変化点はデータ2の「23+」である。データ1は、オフセット補正後の位置「15」以降の大小関係は「+」である。   As shown in the example of FIG. 90, the next change point with the smallest value after offset correction is “23+” of data 2. In the data 1, the magnitude relationship after the position “15” after the offset correction is “+”.

データ2は、オフセット補正後の位置「6」から「20」までの大小関係は「−」である。ウィンドウ範囲は「1」から「16」であるため、この場合の比較の対象は、オフセット補正後の位置「15」から「16」になる。   In the data 2, the magnitude relationship from the position “6” to “20” after the offset correction is “−”. Since the window range is “1” to “16”, the comparison target in this case is the position “15” to “16” after offset correction.

データ1のオフセット補正後の位置「15」から「16」の大小関係は「+」であり、データ2のオフセット補正後の位置「15」から「16」の大小関係は「−」である。よって、この範囲でのデータ1とデータ2との大小関係は一致しない。   The magnitude relationship between positions “15” to “16” after offset correction of data 1 is “+”, and the magnitude relation between positions “15” to “16” after offset correction of data 2 is “−”. Therefore, the magnitude relationship between data 1 and data 2 in this range does not match.

従って、計数部13がカウントする一致数はゼロである。ここまでの一致数の合計は「8=8+0」である。   Therefore, the number of matches counted by the counting unit 13 is zero. The total number of matches so far is “8 = 8 + 0”.

以上のようにして、計数部13は、ウィンドウ範囲「1」から「16」におけるデータ1とデータ2との一致数をカウントする。   As described above, the counting unit 13 counts the number of matches between the data 1 and the data 2 in the window range “1” to “16”.

<実施形態の処理の流れを示すフローチャートの一例>
次に、実施形態の処理の流れを示すフローチャートについて説明する。図91の例に示されるように、データ処理装置1は、類似度の演算の対象となる時系列データおよび該時系列データのうち比較対象となるウィンドウ(期間)を決定する(ステップS1)。以下、時系列データを系列と称することがある。
<An example of a flowchart showing the flow of processing of the embodiment>
Next, a flowchart showing a processing flow of the embodiment will be described. As shown in the example of FIG. 91, the data processing apparatus 1 determines time-series data that is a target of similarity calculation and a window (period) that is a comparison target among the time-series data (step S1). Hereinafter, the time series data may be referred to as a series.

実施形態では、検出部12は、対象となる時系列データを記憶部11から読み出す。少なくとも2つの時系列データが記憶部11から読み出される。検出部12は、対象となる全ての時系列データについてウィンドウの範囲内で変化点を検出する(ステップS2)。以下、変化点を検出する処理を処理Aと称する。   In the embodiment, the detection unit 12 reads target time-series data from the storage unit 11. At least two pieces of time series data are read from the storage unit 11. The detection unit 12 detects a change point within the window range for all time series data to be processed (step S2). Hereinafter, the process of detecting the change point is referred to as process A.

演算部14が、対象となる全ての時系列データについて類似度の演算を行った場合(ステップS3でno)、処理は終了する。   When the calculation unit 14 calculates the similarity for all target time-series data (no in step S3), the process ends.

差分処理部15は、比較対象の2つの時系列データに設定された双方のウィンドウが固定されるか、双方のウィンドウがずらされるか、または片方のウィンドウがずらされるかを判定する(ステップS4)。   The difference processing unit 15 determines whether both windows set in the two time-series data to be compared are fixed, both windows are shifted, or one window is shifted (step S4). .

差分処理部15は、双方のウィンドウをずらすことができるか、片方のウィンドウをずらすことができるか、または双方のウィンドウをずらすことができないか、の何れかに基づいて、ステップS4の判定を行ってもよい。   The difference processing unit 15 performs the determination in step S4 based on whether either of the windows can be shifted, one of the windows can be shifted, or both of the windows cannot be shifted. May be.

双方のウィンドウが固定された場合、ウィンドウがずらされることなく、検出された変化点に基づいて、類似度が演算される(ステップS5)。ステップS5の処理は、上述した具体例1の処理(以下、処理Bと称する)である。   When both windows are fixed, the similarity is calculated based on the detected change point without shifting the windows (step S5). The process of step S5 is the process of specific example 1 described above (hereinafter referred to as process B).

双方のウィンドウがずらされる場合、差分処理部15が双方のウィンドウをずらしながら差分処理を行い、演算部14により類似度が演算される(ステップS6)。ステップS6の処理は、上述した具体例2の処理(以下、処理Cと称する)である。   When both windows are shifted, the difference processing unit 15 performs difference processing while shifting both windows, and the calculation unit 14 calculates the similarity (step S6). The process of step S6 is the process of specific example 2 described above (hereinafter referred to as process C).

片方のウィンドウがずらされる場合、差分処理部15が片方のウィンドウをずらしながら差分処理を行い、演算部14により類似度が演算される(ステップS7)。ステップS7の処理は、上述した具体例3の処理(以下、処理Dと称する)である。   When one of the windows is shifted, the difference processing unit 15 performs difference processing while shifting one of the windows, and the similarity is calculated by the calculation unit 14 (step S7). The process of step S7 is the process of specific example 3 described above (hereinafter referred to as process D).

処理A(変化点を検出する処理)について、図92のフローチャートを参照して説明する。検出部12は、対象となる各時系列データのうち、変化点を検出する処理を行っていない時系列データがあるかを判定する(ステップS11)。   Process A (process for detecting a change point) will be described with reference to the flowchart of FIG. The detection unit 12 determines whether there is time-series data that has not been subjected to the process of detecting the change point among the target time-series data (step S11).

全ての時系列データについて変化点を検出する処理が済んでいる場合(ステップS11でno)、処理は終了する。変化点を検出する処理が済んでいない時系列データが存在する場合(ステップS11でyes)、検出部12は、該時系列データを記憶部11から取得し、該時系列データの期間を得る(ステップS12)。   If the process of detecting the change point has been completed for all time series data (no in step S11), the process ends. When there is time-series data that has not been subjected to the process of detecting the change point (yes in step S11), the detection unit 12 acquires the time-series data from the storage unit 11 and obtains the period of the time-series data ( Step S12).

検出部12は、取得された時系列データのうち単調区間(単調増加区間および単調減少区間)を検出する(ステップS13)。検出部12は、変数i(iは整数)に「1」を代入する。変数iは、時間差を示す。   The detection unit 12 detects a monotone section (monotonically increasing section and monotonically decreasing section) in the acquired time series data (step S13). The detection unit 12 assigns “1” to the variable i (i is an integer). The variable i indicates a time difference.

検出部12は、変数iが時系列データの期間未満であるかを判定する(ステップS15)。変数iが時系列データの期間以上である場合(ステップS15でno)、処理はステップS11に戻る。   The detection unit 12 determines whether the variable i is less than the time series data period (step S15). When the variable i is equal to or longer than the time series data period (no in step S15), the process returns to step S11.

変数iが時系列データの期間未満である場合(ステップS15でyes)、検出部12は、上記の単調区間と変数iとに基づいて、上述したブロックを決定する(ステップS16)。そして、検出部12は、最初の変化点の値(初期値)を検出する(ステップS17)。   When the variable i is less than the time series data period (yes in step S15), the detection unit 12 determines the above-described block based on the monotonic section and the variable i (step S16). Then, the detection unit 12 detects the first change point value (initial value) (step S17).

検出部12は、未処理のブロックが存在するかを判定する(ステップS18)。未処理のブロックが存在する場合(ステップS18でyes)、該ブロックが同じ単調区間に含まれるかを判定する(ステップS19)。   The detection unit 12 determines whether there is an unprocessed block (step S18). When there is an unprocessed block (yes in step S18), it is determined whether the block is included in the same monotone section (step S19).

該ブロックが同じ単調区間に含まれない場合(ステップS19でno)、検出部12は、該ブロックが、「値の範囲が分離されているブロック」であるかを判定する(ステップS20)。   When the block is not included in the same monotone section (no in step S19), the detection unit 12 determines whether the block is “a block in which a range of values is separated” (step S20).

該ブロックが「値の範囲が分離されているブロック」でない場合(ステップS20でno)、該ブロックは変化点検出の対象のブロックである。この場合、検出部12は、ブロックの長さが長いかを判定する(ステップS21)。   When the block is not a “block whose value range is separated” (no in step S20), the block is a block for which a change point is to be detected. In this case, the detection unit 12 determines whether the block length is long (step S21).

ブロックの長さは、時系列データの範囲である。ブロックの長さが長いか否かは、任意に設定されてよい。例えば、ブロックの長さに閾値が設定され、ブロックの長さが該閾値を超えた場合に、ブロックの長さが長いと判定されてもよい。   The length of the block is a range of time series data. Whether or not the length of the block is long may be arbitrarily set. For example, a threshold value may be set for the block length, and when the block length exceeds the threshold value, it may be determined that the block length is long.

ブロックの長さが長いと判定された場合(ステップS21でyes)、検出部12は、上述したように、ブロックを分割する(ステップS22)。ブロックが分割された後、処理はステップS21に戻る。従って、1つのブロックが2つのブロックに分割される場合もあり、3つ以上のブロックに分割される場合もある。   When it is determined that the length of the block is long (yes in step S21), the detection unit 12 divides the block as described above (step S22). After the block is divided, the process returns to step S21. Therefore, one block may be divided into two blocks, or may be divided into three or more blocks.

検出部12は、ブロック内(時系列データの範囲)内で大小関係が変化する変化点を探索する(ステップS23)。そして、検出部12は、変化点を探索するブロックを次のブロックに移す(ステップS24)。ステップS19でyesの場合、およびステップS20でyesの場合、処理はステップS24に移る。   The detection unit 12 searches for a change point where the magnitude relationship changes within the block (the range of the time-series data) (step S23). And the detection part 12 moves the block which searches a change point to the following block (step S24). If yes in step S19 and yes in step S20, the process proceeds to step S24.

ステップS18でnoの場合、つまり未処理のブロックが存在しない場合、検出部12は、変数iをインクリメントする(ステップS25)。検出部12は、以上の処理を、変数iが時系列データの期間に達するまで行う。   If no in step S18, that is, if there is no unprocessed block, the detection unit 12 increments the variable i (step S25). The detection unit 12 performs the above processing until the variable i reaches the time series data period.

次に、処理Bについて、図93のフローチャートを参照して、説明する。処理Bの場合、比較対象の2つの時系列データのウィンドウは固定される。最初に、比較期間(ウィンドウ範囲)が決定される(ステップS31)。   Next, process B will be described with reference to the flowchart of FIG. In the case of process B, the windows of the two time series data to be compared are fixed. First, a comparison period (window range) is determined (step S31).

計数部13は、変数P(Pは整数)にゼロを代入する(ステップS32)。変数Pは、一致数を示す。また、計数部13は、変数iに「1」を代入する(ステップS33)。   The counting unit 13 substitutes zero for the variable P (P is an integer) (step S32). The variable P indicates the number of matches. The counting unit 13 substitutes “1” for the variable i (step S33).

計数部13は、変数iが時系列データの期間未満であるかを判定する(ステップS34)。変数iが時系列データの期間未満の場合(ステップS34でyes)、検出部12は、変数iの時間差の変化点データを選択する(ステップS35)。   The counting unit 13 determines whether the variable i is less than the time series data period (step S34). When the variable i is less than the time series data period (yes in step S34), the detection unit 12 selects change point data of the time difference of the variable i (step S35).

計数部13は、上述した具体例1の処理を行い、変化点データの各変化点について、時系列データのウィンドウ範囲内の一致数を求め、該一致数を変数Pに加算する(ステップS36)。   The counting unit 13 performs the process of the first specific example described above, obtains the number of matches within the window range of the time-series data for each change point of the change point data, and adds the number of matches to the variable P (step S36). .

計数部13は、変数iをインクリメントし(ステップS37)、処理はステップS34に戻る。時間差を示す変数iが時系列データの期間に達するまで、ステップS35乃至S37の処理が行われる。   The counting unit 13 increments the variable i (step S37), and the process returns to step S34. The processes in steps S35 to S37 are performed until the variable i indicating the time difference reaches the time series data period.

変数iが時系列データの期間に達した場合(ステップS34でno)、計数部13は、一致数を合計して、一致数Pを求める。演算部14は、一致数Pおよび項目数を、上述した式(A)に当て嵌めて演算を行い、時系列データ同士の類似度を得る(ステップS38)。その後、処理Bは終了する。   When the variable i has reached the time series data period (no in step S34), the counting unit 13 adds up the number of matches to obtain the number of matches P. The calculation unit 14 performs calculation by applying the number of matches P and the number of items to the above-described formula (A), and obtains the similarity between the time series data (step S38). Thereafter, the process B ends.

次に、処理Cについて、図94のフローチャートを参照して、説明する。最初に、比較期間(ウィンドウ範囲)が決定される(ステップS41)。計数部13は、上述した具体例1の処理を行い、最初に設定されたウィンドウの範囲内の大小関係の一致数Pを求める(ステップS42)。   Next, the process C will be described with reference to the flowchart of FIG. First, a comparison period (window range) is determined (step S41). The counting unit 13 performs the above-described processing of the first specific example, and obtains a matching number P of magnitude relations within the range of the initially set window (step S42).

差分処理部15は、ウィンドウの前端および後端における一致数を用いて、具体例2で説明した一致数の変化量dを求める(ステップS43)。演算部14は、一致数Pおよび項目数を、上述した式(A)に当て嵌めて演算を行い、類似度を得る(ステップS44)。   The difference processing unit 15 uses the number of matches at the front end and the rear end of the window to obtain the amount of change d of the number of matches described in the specific example 2 (step S43). The computing unit 14 performs computation by applying the number of matches P and the number of items to the above-described equation (A) to obtain a similarity (step S44).

差分処理部15は、ウィンドウをずらすことができる次の時刻が存在するかを判定する(ステップS45)。ウィンドウをずらすことができる次の時刻が存在する場合(ステップS45でyes)、差分処理部15は、比較対象の2つの時系列データにそれぞれ設定されたウィンドウをずらす(ステップS46)。   The difference processing unit 15 determines whether there is a next time at which the window can be shifted (step S45). If there is a next time at which the window can be shifted (Yes in step S45), the difference processing unit 15 shifts the windows respectively set for the two time-series data to be compared (step S46).

差分処理部15は、上述した具体例2の処理を行い、ウィンドウに出入りする変化点に基づいて、一致数の変化量dを更新する(ステップS47)。差分処理部15は、ウィンドウがずらされる前に求められた一致数Pに、一致数の変化量dを加算する(ステップS48)。   The difference processing unit 15 performs the processing of the specific example 2 described above, and updates the amount of change d of the number of matches based on the changing points entering and exiting the window (step S47). The difference processing unit 15 adds the amount of change d of the number of matches to the number of matches P obtained before the window is shifted (step S48).

これにより、ウィンドウがずらされた後における大小関係の一致数Pが得られる。ステップS44において、演算部14は、ウィンドウがずらされた後の一致数Pおよびウィンドウ範囲内の項目数を、上述した式(A)に当て嵌めて演算を行い、類似度を得る。   Thereby, the coincidence number P of the magnitude relation after the window is shifted is obtained. In step S44, the calculation unit 14 performs calculation by fitting the number of matches P after the window is shifted and the number of items in the window range to the above-described equation (A), and obtains the similarity.

ステップS45において、ウィンドウをずらすことができる次の時刻が存在するかが判定される。ウィンドウをずらすことができる次の時刻が存在しないと判定された場合(ステップS45でno)、処理Cは終了する。   In step S45, it is determined whether there is a next time when the window can be shifted. When it is determined that there is no next time at which the window can be shifted (No in step S45), the process C ends.

次に、処理Dについて、図95のフローチャートを参照して、説明する。最初に、比較期間(ウィンドウ範囲)が決定される(ステップS51)。計数部13は、上述した具体例1の処理を行い、最初に設定されたウィンドウの範囲内の大小関係の一致数Pを求める(ステップS52)。   Next, process D will be described with reference to the flowchart of FIG. First, a comparison period (window range) is determined (step S51). The counting unit 13 performs the process of the specific example 1 described above, and obtains a matching number P of magnitude relations within the range of the initially set window (step S52).

差分処理部15は、固定された時系列データ(ずらさない系列の変化点)およびウィンドウの前端および後端のアンカーにおける一致数を用いて、一致数の変化量dを求める(ステップS53)。   The difference processing unit 15 obtains a change amount d of the number of matches using the fixed time-series data (sequence change points not shifted) and the number of matches at the anchors at the front and rear ends of the window (step S53).

演算部14は、一致数Pおよびウィンドウ範囲内の項目数を上述した式(A)に当て嵌めて、2つの時系列データの類似度を得る(ステップS54)。   The calculation unit 14 applies the number of matches P and the number of items in the window range to the above-described formula (A) to obtain the similarity between the two time-series data (step S54).

差分処理部15は、固定されない方のウィンドウをずらすことができる次の時刻が存在するかを判定する(ステップS55)。ウィンドウをずらすことができる次の時刻が存在する場合(ステップS55でyes)、差分処理部15は、固定されていない方のウィンドウをずらす(ステップS56)。   The difference processing unit 15 determines whether there is a next time at which the non-fixed window can be shifted (step S55). If there is a next time at which the window can be shifted (Yes in step S55), the difference processing unit 15 shifts the window that is not fixed (step S56).

差分処理部15は、上述した具体例3の処理を行い、ウィンドウがずらされる前に求められた一致数Pに、一致数の変化量dを加算する(ステップS57)。これにより、ウィンドウがずらされた後における大小関係の一致数Pが得られる。   The difference processing unit 15 performs the process of the specific example 3 described above, and adds the amount of change d of the number of matches to the number of matches P obtained before the window is shifted (step S57). Thereby, the coincidence number P of the magnitude relation after the window is shifted is obtained.

演算部14は、ウィンドウがずらされた後における、一致数Pおよびウィンドウ範囲内の項目数を上述した式(A)に当て嵌めて、2つの時系列データの類似度を得る(ステップS58)。   The calculation unit 14 applies the number of matches P and the number of items in the window range after the window is shifted to the above-described formula (A) to obtain the similarity between the two time-series data (step S58).

差分処理部15は、上述したアンカーに到達した変化点から一致数の変化量dを更新する(ステップS59)。ステップS55において、ウィンドウをずらすことができる次の時刻が存在しない場合(ステップS55でno)、処理Dは終了する。   The difference processing unit 15 updates the change amount d of the number of matches from the change point that has reached the anchor described above (step S59). If there is no next time at which the window can be shifted in step S55 (no in step S55), the process D ends.

<その他>
図96は、3種類の時系列データ(データA、データBおよびデータC)の例を示す。データAは、値の変化が緩やかなデータであり、局所性が大きい時系列データである。データAのような時系列データは、変化点が少ないため、大小関係の一致数を求める時間が短くなり、時系列データ同士の類似度の演算時間も短くなる。
<Others>
FIG. 96 shows an example of three types of time series data (data A, data B, and data C). Data A is time-series data with a slow local change and a large locality. Since time series data such as data A has few change points, the time for obtaining the number of coincidence of magnitude relations is shortened, and the time for calculating the degree of similarity between the time series data is also shortened.

データBは、細かい周期でサンプリングされたデータであり、波形全体として、時系列データの値は、小さい値から大きい値に変化する。このような時系列データも、局所性がある程度大きいため、大小関係の一致数を求める時間が短くなり、時系列データ同士の類似度の演算時間も短くなる。   The data B is data sampled at a fine cycle, and the value of the time series data changes from a small value to a large value as a whole waveform. Since such time-series data also has a certain degree of locality, the time for obtaining the number of coincidence of magnitude relations is shortened, and the time for calculating the similarity between the time-series data is also shortened.

データCは、値の変動が大きい時系列データである。データCのような時系列データは、局所性が小さく、変化点が多くなるため、大小関係の一致数を求める時間が、データAおよびデータBよりは長くなる。   Data C is time-series data with large fluctuations in value. Since time series data such as data C has a small locality and a large number of change points, the time for obtaining the number of coincidences of magnitude relationship is longer than that of data A and data B.

従って、データCの場合、データAやデータBと比較して、時系列データ同士の類似度の演算時間が長くなる。ただし、データCの場合であっても、変化点に基づいて、大小関係の一致数を求め、該一致数に基づいて類似度の演算を行っているため、類似度の演算時間は短くなる。   Therefore, in the case of data C, the time for calculating the degree of similarity between time series data is longer than that of data A and data B. However, even in the case of data C, the number of coincidence of magnitude relation is obtained based on the change point, and the degree of similarity is calculated based on the number of coincidence, so that the time for calculating the degree of similarity is shortened.

本実施形態は、以上に述べた実施の形態に限定されるものではなく、本実施形態の要旨を逸脱しない範囲内で種々の構成または実施形態を取ることができる。   The present embodiment is not limited to the above-described embodiment, and various configurations or embodiments can be taken without departing from the gist of the present embodiment.

1 データ処理装置
11 記憶部
12 検出部
13 計数部
14 演算部
15 差分処理部
111 プロセッサ
112 RAM
113 ROM
DESCRIPTION OF SYMBOLS 1 Data processor 11 Memory | storage part 12 Detection part 13 Counting part 14 Calculation part 15 Difference processing part 111 Processor 112 RAM
113 ROM

Claims (8)

比較される2つの時系列データの各々について、時間経過に対する値の増加若しくは減少の傾向が変化する時刻を変化点として検出する検出部と、
前記2つの時系列データの各々で個別に設定されている、複数の同一期間幅を含む所定の期間内において、前記2つの時系列データを、前記複数の同一期間幅それぞれについて前記所定の期間内の先頭の時刻からの同一順序同士で順次対比したときに、同一順序の対応する時刻における前記傾向の変化が一致する一致数を、前記2つの時系列データに対する前記変化点の検出時刻から計数する計数部と、
前記一致数に基づいて、前記2つの時系列データの間の類似度を演算する演算部と、
を備えることを特徴とするデータ処理装置。
For each of the two time-series data to be compared, a detection unit that detects a time at which the tendency of an increase or decrease in value with respect to time changes as a change point;
The two time is set separately for each of the series data, within a predetermined period including a plurality of identical period width, the two time-series data, said predetermined time period for the plurality of same period width respectively When the same order from the first time is sequentially compared, the number of matches in which the change in tendency at the corresponding time in the same order matches is counted from the detection time of the change point for the two time-series data. A counting unit;
An arithmetic unit that calculates the similarity between the two time-series data based on the number of matches ;
A data processing apparatus comprising:
前記検出部は、前記2つの時系列データそれぞれに含まれている各時刻の値についての、該値の時刻から所定の時間差を持つ後の時刻の値に対しての大小関係を、各時刻における前記傾向を表す情報として、前記時間差ごとに検出すると共に、検出した前記大小関係を時刻順に並べた場合に、時間経過に対して前記大小関係が変化する時刻を、前記変化点として、前記時間差ごとに検出し、
前記計数部は、前記時間差ごと前記一致数を計数
前記演算部は、前記時間差ごとの前記一致数に基づいて、前記類似度を演算する、
ことを特徴とする請求項1記載のデータ処理装置。
The detection unit is configured to determine a magnitude relationship with respect to a time value at a later time having a predetermined time difference from the time of each time value included in each of the two time series data. As the information representing the trend, when the detected magnitude relations are arranged in order of time while being detected for each time difference, the time when the magnitude relation changes with the passage of time is used as the change point for each time difference. To detect
The counting unit counts the number of matches for each of the time differences,
The computing unit computes the similarity based on the number of matches for each time difference.
The data processing apparatus according to claim 1.
前記2つの時系列データについて設定されている前記所定の期間を時間軸上でずらし、該所定の期間がずらされた際に変化する一致数の変化量を求める差分処理部、をさらに備え、
前記計数部は、前記所定の時間がずらされる前に前記計数部が計数した一致数と前記差分処理部により求められた前記一致数の変化量とに基づいて、前記所定の期間がずらされた後の一致数を求め
前記演算部は、前記所定の期間がずらされた後の一致数にさらに基づいて、前記類似度を演算する、
ことを特徴とする請求項2記載のデータ処理装置。
Shifting the predetermined period set for the two time series data on the time axis, a difference processing unit for determining the number of matches of variation which changes in the predetermined time period is shifted, further comprising a
The counting unit shifts the predetermined period based on the number of matches counted by the counting unit before the predetermined time is shifted and the amount of change in the number of matches obtained by the difference processing unit. match the number of the sought after,
The calculation unit calculates the similarity based further on the number of matches after the predetermined period is shifted.
The data processing apparatus according to claim 2.
前記2つの時系列データの双方について前記所定の期間時間軸上において同一の向きに同一の時間ずらされる場合において、前記差分処理部は、前記変化点のうちから、前記所定の期間を前記時間軸上で1時刻分ずらした際前記所定の期間に含まれることとなる、または前記所定の期間から外れることとなる変化点を選択し、該選択された変化点の前記大小関係を反転させた場合に生じ、該選択された変化点についての前記傾向の変化が一致する数の変化の変化量を、前記1時刻分ずらした際の前記一致数の変化量として求める
ことを特徴とする請求項3記載のデータ処理装置。
In the case where the predetermined period is shifted in the same direction on the time axis by the same time for both of the two time series data , the difference processing unit determines the predetermined period from the change points as the time. It will be included in the predetermined time period when shifted 1 time min on the axis, or selecting the change point as a departing from the predetermined time period, by inverting the size relation of the selected change points and arising when the variation in the number of changes in a change in the tendency matches for the selected change points, determined as the number of matches variation at the time of shifting the 1 time amount,
The data processing apparatus according to claim 3.
前記差分処理部は、前記2つの時系列データと前記時間差ごとの前記変化点を示す変化点データとに基づいて、前記所定の期間と前記変化点との時間軸上での位置関係をテーブルで管理する、
ことを特徴とする請求項3または4記載のデータ処理装置。
The difference processing unit is a table showing a positional relationship on the time axis between the predetermined period and the change point based on the two time series data and the change point data indicating the change point for each time difference. to manage,
The data processing apparatus according to claim 3 or 4, characterized in that
前記2つの時系列データのうち、一方の時系列データについて前記所定の期間がずらされ、他方の時系列データについて前記所定の期間がずらされない場合には、前記差分処理部は、
前記他方の時系列データについて、前記所定の期間の後に続く最初の時刻である前端と、前記所定の期間内における最初の時刻である後端との各々が前記変化点であるどうかを前記時間差ごとに判定し
前記前端と前記後端との各々において前記変化点ではないと判定された時刻について、該時刻を新たに前記変化点に設定すると共に、新たに設定した前記変化点である時刻について検出していた前記大小関係を反転する、
処理を行うと共に、
前記処理後の前記他方の時系列データにおける前記変化点である時刻についての前記大小関係が、ずらされる前の前記一方の時系列データにおける前記対応する時刻についての前記大小関係と一致するか否かを、前記時間差ごとに、前記前端である前記変化点と、前記後端である変化点と、前記所定の期間内の時刻のうち前記後端ではない変化点とについて判定し、
前記前端である前記変化点については、前記大小関係が一致すると判定した場合には重み「0」を該変化点に与え、前記大小関係が一致しないと判定した場合には重み「+1」を該変化点に与え、
前記後端である前記変化点については、前記大小関係が一致すると判定した場合には重み「−1」を該変化点に与え、前記大小関係が一致しないと判定した場合には重み「0」を該変化点に与え、
前記所定の期間内の時刻のうち前記後端ではない変化点については、前記大小関係が一致すると判定した場合には重み「−1」を該変化点に与え、前記大小関係が一致しないと判定した場合には重み「+1」を該変化点に与え、
各変化点に与えられた重みを合計した値を、前記一方の時系列データについて前記所定の期間を前記時間軸上で1時刻分ずらした際の前記一致数の変化量として求める、
ことを特徴とする請求項3記載のデータ処理装置。
The two time of the series data, said for one of the time-series data given period is shifted, when the other of the time series data is the predetermined time period is not shifted, the differential processing unit,
For the time series data of the other, each with the front end is the first time, said assimilation each of the rear end is the first time is the changing point within said predetermined period time difference subsequent to the predetermined time period To
Regarding the time determined to be not the change point at each of the front end and the rear end, the time is newly set as the change point, and the time that is the newly set change point is detected. Reverse the magnitude relationship,
As well as processing
Whether the magnitude relationship for the time that is the change point in the other time series data after the processing matches the magnitude relationship for the corresponding time in the one time series data before being shifted For each time difference, the change point that is the front end, the change point that is the rear end, and a change point that is not the rear end of the time within the predetermined period,
For the change point that is the front end, a weight “0” is given to the change point when it is determined that the magnitude relationship matches, and a weight “+1” is assigned to the change point when the magnitude relationship does not match. To the change point,
For the change point that is the rear end, a weight “−1” is given to the change point when it is determined that the magnitude relationship matches, and a weight “0” when it is determined that the magnitude relationship does not match. Is given to the change point,
For a change point that is not the rear end of the time within the predetermined period, when it is determined that the magnitude relationship matches, a weight “−1” is given to the change point, and it is determined that the magnitude relationship does not match. If this is the case, give the weight “+1” to the change point,
A value obtained by summing the weights given to each change point is obtained as a change amount of the number of coincidence when the predetermined period is shifted by one time on the time axis with respect to the one time series data.
The data processing apparatus according to claim 3.
コンピュータが、
比較される2つの時系列データの各々について、時間経過に対する値の増加若しくは減少の傾向が変化する時刻を変化点として検出し、
前記2つの時系列データの各々で個別に設定されている、複数の同一期間幅を含む所定の期間内において、前記2つの時系列データを、前記複数の同一期間幅それぞれについて前記所定の期間内の先頭の時刻からの同一順序同士で順次対比したときに、同一順序の対応する時刻における前記傾向の変化が一致する一致数を、前記2つの時系列データに対する前記変化点の検出時刻から計数し、
前記一致数に基づいて、前記2つの時系列データの間の類似度を演算する、
ことを特徴とするデータ処理方法。
Computer
For each of the two time-series data to be compared, the time at which the tendency of increase or decrease in value over time changes is detected as a change point,
The two time is set separately for each of the series data, within a predetermined period including a plurality of identical period width, the two time-series data, said predetermined time period for the plurality of same period width respectively When the same order from the first time in the order is sequentially compared, the number of matches in which the change in tendency at the corresponding time in the same order matches is counted from the detection time of the change point for the two time series data. ,
Calculating a similarity between the two time-series data based on the number of matches ;
A data processing method.
コンピュータに、
比較される2つの時系列データの各々について、時間経過に対する値の増加若しくは減少の傾向が変化する時刻を変化点として検出し、
前記2つの時系列データの各々で個別に設定されている、複数の同一期間幅を含む所定の期間内において、前記2つの時系列データを、前記複数の同一期間幅それぞれについて前記所定の期間内の先頭の時刻からの同一順序同士で順次対比したときに、同一順序の対応する時刻における前記傾向の変化が一致する一致数を、前記2つの時系列データに対する前記変化点の検出時刻から計数し、
前記一致数に基づいて、前記2つの時系列データの間の類似度を演算する、
処理を実行させることを特徴とするデータ処理プログラム。
On the computer,
For each of the two time-series data to be compared, the time at which the tendency of increase or decrease in value over time changes is detected as a change point,
The two time is set separately for each of the series data, within a predetermined period including a plurality of identical period width, the two time-series data, said predetermined time period for the plurality of same period width respectively When the same order from the first time in the order is sequentially compared, the number of matches in which the change in tendency at the corresponding time in the same order matches is counted from the detection time of the change point for the two time series data. ,
Calculating a similarity between the two time-series data based on the number of matches ;
A data processing program for executing a process.
JP2016007234A 2016-01-18 2016-01-18 Data processing apparatus, data processing method, and data processing program Active JP6604212B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016007234A JP6604212B2 (en) 2016-01-18 2016-01-18 Data processing apparatus, data processing method, and data processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016007234A JP6604212B2 (en) 2016-01-18 2016-01-18 Data processing apparatus, data processing method, and data processing program

Publications (2)

Publication Number Publication Date
JP2017129919A JP2017129919A (en) 2017-07-27
JP6604212B2 true JP6604212B2 (en) 2019-11-13

Family

ID=59394760

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016007234A Active JP6604212B2 (en) 2016-01-18 2016-01-18 Data processing apparatus, data processing method, and data processing program

Country Status (1)

Country Link
JP (1) JP6604212B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6852002B2 (en) * 2018-02-13 2021-03-31 日立Geニュークリア・エナジー株式会社 Data search method, data search device and program
CN110288003B (en) * 2019-05-29 2022-01-18 北京师范大学 Data change identification method and equipment

Also Published As

Publication number Publication date
JP2017129919A (en) 2017-07-27

Similar Documents

Publication Publication Date Title
CN109344789B (en) Face tracking method and device
US9373054B2 (en) Method for selecting frames from video sequences based on incremental improvement
JP6103080B2 (en) Method and apparatus for detecting the type of camera motion in a video
JP6604212B2 (en) Data processing apparatus, data processing method, and data processing program
WO2020029883A1 (en) Method and device for generating video fingerprint
CN104933090A (en) Information searching method and terminal
Hocking et al. Generalized functional pruning optimal partitioning (gfpop) for constrained changepoint detection in genomic data
US8407187B2 (en) Validating files using a sliding window to access and correlate records in an arbitrarily large dataset
JP2006031378A (en) Apparatus for complementing time-series data, its method, and its program
JP4801566B2 (en) Data stream monitoring device, data stream monitoring method, program thereof, and recording medium
KR101623113B1 (en) Apparatus and method for learning and classification of decision tree
CN107122949B (en) E-mail screening method and device
CN114254204A (en) Data processing method, device, medium and electronic equipment
CN112632337A (en) Element management method applied to firework filter and firework filter
JP5746765B2 (en) Determining the representative image of the video
JP2010092088A (en) Ordering device, ordering method, and program
WO2019185037A1 (en) Data set processing method and system and storage medium
CN110991508A (en) Anomaly detector recommendation method, device and equipment
JP6748372B2 (en) Data processing device, data processing method, and data processing program
CN116686281A (en) Image display method, terminal, chip and storage medium
US20150070517A1 (en) Selection apparatus, selection method, and storage medium
JP7166796B2 (en) Information processing device, information processing method, and program
JP7243837B2 (en) Information processing device, information processing system, information processing method, and program
WO2022230115A1 (en) Information processing device, information processing method, and information processing program
JP2021060635A (en) Information processing device, information processing method, and information processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180912

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190626

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190709

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190905

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20190905

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20190905

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190930

R150 Certificate of patent or registration of utility model

Ref document number: 6604212

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150