JP6848546B2 - Change point detection device and change point detection method - Google Patents
Change point detection device and change point detection method Download PDFInfo
- Publication number
- JP6848546B2 JP6848546B2 JP2017044995A JP2017044995A JP6848546B2 JP 6848546 B2 JP6848546 B2 JP 6848546B2 JP 2017044995 A JP2017044995 A JP 2017044995A JP 2017044995 A JP2017044995 A JP 2017044995A JP 6848546 B2 JP6848546 B2 JP 6848546B2
- Authority
- JP
- Japan
- Prior art keywords
- change point
- score
- point score
- calculation unit
- series data
- 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
Links
Images
Landscapes
- Testing And Monitoring For Control Systems (AREA)
- Complex Calculations (AREA)
Description
本発明は、時系列データの異常検知に関し、特に複数の時系列データを含むデータ系列の中から変化点を検出する変化点検出装置および変化点検出方法に関する。 The present invention relates to anomaly detection of time series data, and more particularly to a change point detection device and a change point detection method for detecting a change point from a data series including a plurality of time series data.
時系列データに含まれる異常は、従来から様々な手法によって検知されている(例えば、特許文献1〜7参照)。時系列データの異常検知の手法は、その目的により、時系列データのパターンが変化する部分を検知する「変化点検出」と、通常では起こりえないデータ点を検知する「外れ値検出」と、通常のパターンとは異なる区間を検知する「異常部位検出」と、の3つに大別される。 Abnormalities contained in time series data have been conventionally detected by various methods (see, for example, Patent Documents 1 to 7). The methods for detecting abnormalities in time-series data are, depending on the purpose, "change point detection" that detects the part where the pattern of time-series data changes, and "outlier detection" that detects data points that cannot normally occur. It is roughly divided into three types: "abnormal part detection" that detects a section different from the normal pattern.
特許文献1および2には、変化点検出に関する技術が開示されている。特許文献1の変化点検出装置は、自己回帰モデルに基づく忘却型学習アルゴリズムによって、データ系列の変化の度合いをスコア化し、スコアが閾値を超えた時刻を変化点として検出するものである。また、特許文献2の異常値検出装置は、ベクトルの類似度比較を用いて、最新の時系列データが異常値であるか否かを検出するものである。 Patent Documents 1 and 2 disclose techniques for detecting change points. The change point detection device of Patent Document 1 scores the degree of change in the data series by a failure-oblivious learning algorithm based on an autoregressive model, and detects the time when the score exceeds the threshold value as the change point. Further, the outlier detection device of Patent Document 2 detects whether or not the latest time series data is an outlier by using vector similarity comparison.
特許文献3および4に記載の技術は、外れ値検出を目的としたものである。特許文献3の状態変化警報装置は、カオス推論により、過去のデータ系列から予測値を算出し、予測値から大きく外れる時系列データを外れ値として検出するものである。また、特許文献4の異常検出装置は、統計値および微分値などに基づく複数の異常判定基準を設定しておき、すべての異常判定基準を満たす時系列データを外れ値として検出するものである。 The techniques described in Patent Documents 3 and 4 are aimed at detecting outliers. The state change alarm device of Patent Document 3 calculates a predicted value from a past data series by chaos inference, and detects time series data that greatly deviates from the predicted value as an outlier. Further, the abnormality detection device of Patent Document 4 sets a plurality of abnormality determination criteria based on statistical values, differential values, and the like, and detects time-series data satisfying all the abnormality determination criteria as outliers.
特許文献5〜7に記載の技術は、異常部位検出を目的として、各々の手法により通常のパターンとの違いを検出している。特許文献5の異常検出装置は、動的時間伸縮法に基づく手法を用いることにより、区間の時間的な伸縮に対応している。特許文献6の異常検知装置は、2つのデータ系列から得られる変化量の差に基づいて、異常部位を検出している。特許文献7の異常検出システムは、グルーピングされたデータ系列から算出される統計量を比較することにより、異常部位を検出している。 The techniques described in Patent Documents 5 to 7 detect a difference from a normal pattern by each method for the purpose of detecting an abnormal portion. The abnormality detection device of Patent Document 5 corresponds to the temporal expansion and contraction of the section by using a method based on the dynamic time expansion and contraction method. The abnormality detection device of Patent Document 6 detects an abnormality portion based on the difference in the amount of change obtained from the two data series. The abnormality detection system of Patent Document 7 detects an abnormality portion by comparing statistics calculated from a grouped data series.
しかしながら、上述の変化点検出および外れ値検出に関して、特許文献1および3に記載の技術では、過去のデータ系列の遷移から異常を捕捉しようとしており、特許文献2および4に記載の技術では、過去の時系列データの集合の統計量又は変位から異常を捕捉しようとしている。すなわち、特許文献1〜4に記載の技術では、過去の時系列データを一定量蓄積した後でなければ、異常を検知することが困難である。仮に、充分に時系列データを蓄積していない短いデータ系列に対して、各々の手法を適用することを考えると、特許文献1及び3に記載の技術では、モデル構築の段階で妥当な予測モデルが生成されない。また、特許文献2および4に記載の技術では、過去の時系列データの統計量又は変異の傾向を捕捉することができない。したがって、特許文献1〜4に記載の技術では、特に、時系列データの蓄積量が充分でない状況において、本来の変化点でのデータの取りこぼしが生じる、という課題がある。 However, regarding the above-mentioned change point detection and outlier detection, the techniques described in Patent Documents 1 and 3 try to capture anomalies from the transition of past data series, and the techniques described in Patent Documents 2 and 4 have past. I am trying to capture anomalies from the statistic or displacement of a set of time series data. That is, with the techniques described in Patent Documents 1 to 4, it is difficult to detect an abnormality only after a certain amount of past time series data has been accumulated. Considering that each method is applied to a short data series in which time series data is not sufficiently accumulated, the techniques described in Patent Documents 1 and 3 are appropriate prediction models at the model construction stage. Is not generated. In addition, the techniques described in Patent Documents 2 and 4 cannot capture the statistic of past time series data or the tendency of mutation. Therefore, the techniques described in Patent Documents 1 to 4 have a problem that data is missed at the original change point, particularly in a situation where the amount of time-series data accumulated is not sufficient.
同様に、特許文献5〜7に記載の技術では、過去のデータ系列の特定部位を通常のパターンとし、通常のパターンから得られる特徴量を利用して異常を捕捉するため、過去の時系列データの一定量の蓄積が不可欠となる。例えば、各種のセンサが検出した時系列データから異常を検出する場合、多くのセンサで秒間数個から数千個以上のデータがサンプリングされるため、通常のパターンとして利用できる過去の時系列データが潤沢にある。しかしながら、月間数件程度のエラーログなどにおける異常検知を対象とした場合、特許文献5〜7に記載された手法の適用は困難である。よって、時系列データが充分に蓄積されている場合はもとより、時系列データの蓄積量が少ない場合においても、異常検知を精度よく行う変化点検出装置および変化点検出方法が望まれている。 Similarly, in the techniques described in Patent Documents 5 to 7, the specific part of the past data series is set as a normal pattern, and the feature amount obtained from the normal pattern is used to capture the abnormality, so that the past time series data Accumulation of a certain amount is indispensable. For example, when anomalies are detected from time-series data detected by various sensors, many sensors sample several to several thousand or more data per second, so past time-series data that can be used as a normal pattern can be used. It is abundant. However, it is difficult to apply the methods described in Patent Documents 5 to 7 when anomaly detection is performed in error logs of several cases per month. Therefore, there is a demand for a change point detection device and a change point detection method that accurately detect anomalies not only when the time series data is sufficiently accumulated but also when the amount of time series data accumulated is small.
本発明に係る変化点検出装置は、外部から入力される時系列データをもとに自己回帰モデルによる推定値を算出する自己回帰モデル算出部と、時系列データの新しさに応じて相対的に重みが増えるよう、時系列データに重み付け処理を施して加重データを作成する加重データ作成部と、時系列データとして、加重データ作成部において作成された加重データを用いてマハラノビス距離を算出するマハラノビス距離算出部と、自己回帰モデル算出部において算出された推定値と、マハラノビス距離算出部において算出されたマハラノビス距離とを統合して解析することにより、時系列データの変化の大小をスコアとして換算して出力する変化点スコア算出部と、を有するものである。 The change point detection device according to the present invention has a self-return model calculation unit that calculates an estimated value by a self-return model based on time-series data input from the outside, and a relative to the newness of the time-series data. A weighted data creation unit that creates weighted data by weighting time-series data so that the weight increases, and a maharanobis distance that calculates the maharanobis distance using the weighted data created by the weighted data creation unit as time-series data. By integrating and analyzing the estimated value calculated by the calculation unit, the self-return model calculation unit, and the Maharanobis distance calculated by the Maharanobis distance calculation unit, the magnitude of the change in the time series data is converted as a score. It has a change point score calculation unit to be output.
また、本発明に係る変化点検出方法は、外部から入力される時系列データをもとに自己回帰モデルによる推定値を算出する自己回帰モデル算出ステップと、時系列データの新しさに応じて相対的に重みが増えるよう、時系列データに重み付け処理を施して加重データを作成する加重データ作成ステップと、時系列データとして、加重データ作成ステップで作成した加重データを用いてマハラノビス距離を算出するマハラノビス距離算出ステップと、自己回帰モデル算出ステップで算出した推定値と、マハラノビス距離算出ステップで算出したマハラノビス距離とを統合して解析することにより、時系列データの変化の大小をスコアとして換算して出力する変化点スコア算出ステップと、を有している。 Further, the change point detection method according to the present invention is relative to the self-return model calculation step of calculating the estimated value by the self-return model based on the time-series data input from the outside , and the relative according to the novelty of the time-series data. Maharanobis that calculates the Maharanobis distance using the weighted data creation step that creates weighted data by weighting the time series data and the weighted data created in the weighted data creation step as time series data. By integrating and analyzing the distance calculation step, the estimated value calculated in the self-return model calculation step, and the Maharanobis distance calculated in the Maharanobis distance calculation step, the magnitude of the change in the time series data is converted into a score and output. It has a change point score calculation step to be performed.
本発明によれば、自己回帰モデルによる推定値とマハラノビス距離との両方を異常検知に用いることから、時系列データの蓄積量が少ない場合でも精度のよい異常検知を行うことができるため、時系列データの多少を問わず、高精度な異常検知を行うことができる。 According to the present invention, since both the estimated value by the autoregressive model and the Mahalanobis distance are used for abnormality detection, accurate abnormality detection can be performed even when the amount of time-series data accumulated is small. Highly accurate abnormality detection can be performed regardless of the amount of data.
実施の形態.
図1は、本発明の実施の形態に係る変化点検出装置の構成を示すブロック図である。図1に示すように、変化点検出装置100は、入力部10と、前処理部20と、データ蓄積部30と、自己回帰モデル算出部40と、自己回帰値蓄積部45と、加重データ作成部50と、マハラノビス距離算出部60と、マハラノビス距離蓄積部65と、変化点スコア算出部70と、変化点スコア蓄積部75と、出力部80と、を有している。
Embodiment.
FIG. 1 is a block diagram showing a configuration of a change point detection device according to an embodiment of the present invention. As shown in FIG. 1, the change
入力部10は、外部から得られる時系列データを異常検知の対象として受け付けるものである。外部から得られる時系列データとは、何れも図示はしていないが、加速度センサ、振動センサ、電波センサ、もしくはマイクロフォンといった各種のセンシングデバイスから取得されるセンシングデータ、又はデータベースに蓄積されているエラーログデータなどである。変化点検出装置100は、サンプリング周期数ミリ秒のセンシングデータでも、1ヶ月のエラー件数の集計といったログデータでも、異常検知の対象となる時系列データとして適用することができる。すなわち、変化点検出装置100は、サンプリング間隔によらず、様々な時系列データを異常検知の対象として適用することができる。
The
前処理部20は、入力部10が受け付けた時系列データを、変化点検出を行うためのパラメータに変換するものである。つまり、前処理部20は、時系列データの種別に応じて、サブサンプリング又はフィルタリングなどの前処理を行うものである。
The preprocessing
前処理の一例としては、AD変換により、アナログのセンシングデータをディジタル値に変換する処理、必要最低限のデータをデータ蓄積部30に蓄積させるためのサブサンプリング、適切な周波数成分のみを抽出するための短時間フーリエ変換、又はデータの値域を規定するための正規化処理がある。すなわち、前処理部20は、AD変換、サブサンプリング、短時間フーリエ変換、及び正規化処理のうちの少なくとも1つを実行するように構成されている。また、前処理部20は、前処理後の時系列データのデータ系列について、時系列順を保持させて各時系列データをデータ蓄積部30に格納するものである。
As an example of preprocessing, AD conversion is used to convert analog sensing data into digital values, subsampling to store the minimum required data in the
データ蓄積部30は、過去のデータ系列を蓄積するものである。より具体的に、データ蓄積部30は、前処理部20による前処理後の時系列データを逐次格納するものである。ここで、N個(Nは任意の自然数)の時系列データを含むデータ系列を「x1,x2,…,xN−1,xN」と表す。データ系列内の各時系列データは、付された数字が大きいほど新しいデータであるものとする。すなわち、データ系列「x1,x2,…,xN−1,xN」の中では、x1が最も古い時系列データであり、xNが最も新しい時系列データである。
The
自己回帰モデル算出部40は、外部から入力される時系列データをもとに、自己回帰モデル(autoregressive model)により推定値を算出するものである。そして、自己回帰モデル算出部40は、算出した自己回帰モデルの推定値を、自己回帰値蓄積部45に逐次格納するものである。つまり、自己回帰値蓄積部45は、自己回帰モデル算出部40において算出された推定値を蓄積するものである。
The autoregressive model calculation unit 40 calculates an estimated value by an autoregressive model based on time series data input from the outside. Then, the autoregressive model calculation unit 40 sequentially stores the calculated estimated value of the autoregressive model in the autoregressive
自己回帰モデルにおいて、データ系列がp次のAR(Auto Regressive )モデルに従うとき、xNは、過去のデータ系列を用いて、下記の式1で表される。ここで、φj(j=1,2,…,p)は係数であり、εNは期待値がゼロで分散が一定数のホワイトノイズを示す。 In the autoregressive model, when the data series follows the p-th order AR (Auto Regressive) model, x N is expressed by the following equation 1 using the past data series. Here, φ j (j = 1, 2, ..., P) is a coefficient, and ε N indicates white noise with an expected value of zero and a constant variance.
同様に、データ系列がq次のMA(Moving Average)モデルに従うとき、xNは下記の式2で表される。ここで、θj(j=1,2,…,q)は係数であり、εNは期待値がゼロで且つ分散が一定数のホワイトノイズを示す。 Similarly, when the data series follows a q-th order MA (Moving Average) model, x N is expressed by Equation 2 below. Here, θj (j = 1, 2, ..., Q) is a coefficient, and ε N indicates white noise having an expected value of zero and a constant variance.
さらに、次数(p,q)のARMA(Auto Regressive Moving Average)モデルに従うとき、xNは下記の式3で表される。ここで、 Further, according to the ARMA (Autoregressive Moving Average) model of order (p, q), x N is expressed by the following equation 3. here,
そして、ARIMA(Auto Regressive Integrated Moving Average)モデルは、式3のARMAモデルをd次階差にしたものであり、d=1のときは下記の式4で表され、d=2のときは式3をもとに下記の式5で表される。 The ARIMA (Autoregressive Integrated Moving Average) model is the ARMA model of Equation 3 with the d-th order difference. When d = 1, it is represented by Equation 4 below, and when d = 2, the equation is expressed. Based on 3, it is expressed by the following equation 5.
式1〜式5におけるパラメータ(p,d,q)、係数φj,θj(j=1,2,…,p)、およびホワイトノイズεNは、一般に、ユールウォーカー法又は最尤法を使って解析的に求められる。本実施の形態においても、自己回帰モデル算出部40は、これらの方法に従ってパラメータの推定を行う。 The parameters (p, d, q), coefficients φ j , θ j (j = 1, 2, ..., P) and white noise ε N in Eqs. 1 to 5 generally refer to the Yulewalker method or the maximum likelihood method. Obtained analytically using. Also in this embodiment, the autoregressive model calculation unit 40 estimates the parameters according to these methods.
上記の処理によって得られた最適な自己回帰モデルの推定値に対して、実際の時系列データxNが大きく異なるとき、その時系列データxNが過去のデータ系列と乖離している、つまり変化点であると判断することができる。これが時系列データを充分に蓄積しているデータ系列、つまり長いデータ系列に対する変化点検出の原理である。すなわち、特に時系列データが充分に蓄積されている場合に有用な変化点検出の原理である。 When the actual time series data x N is significantly different from the estimated value of the optimum autoregressive model obtained by the above processing, the time series data x N deviates from the past data series, that is, the change point. Can be determined to be. This is the principle of change point detection for a data series in which time series data is sufficiently accumulated, that is, a long data series. That is, it is a principle of change point detection that is particularly useful when time series data is sufficiently accumulated.
加重データ作成部50は、マハラノビス距離に基づく変化点を検出するための事前処理を行うものである。すなわち、加重データ作成部50は、時系列データの新しさに応じて相対的に重みが増えるよう、時系列データに重み付け処理を施し、加重データを作成するものである。本実施の形態において、加重データ作成部50は、データ系列に含まれる各時系列データに対し、新しい時系列データの重みが相対的に増えるように重み付け処理を行うものである。換言すれば、加重データ作成部50は、データ系列に含まれる各時系列データに対し、古い時系列データの重みが相対的に減少するように重み付け処理を行うものである。
The weighted
より具体的に、加重データ作成部50は、N個の時系列データを含むデータ系列である「x1,x2,…,xN−1,xN」に対して、下記の式6で示す重み付け処理を行うものである。式6において、x’tは加重データのデータ系列である。また、iは2以上の整数であり、データ系列内の時系列データの数などに応じて適宜変更することができる。この重み付け処理により、データ系列に含まれる最新の時系列データ(xN)から遡ってi個より前の時系列データ(x1,x2,…,xN−(i+1))の重みが特に低減され、新しい時系列データに対する変化をより鋭敏に検出できるようになる。
More specifically, the weighted
マハラノビス距離算出部60は、外部から入力される時系列データをもとにマハラノビス距離を算出するものである。本実施の形態において、マハラノビス距離算出部60は、加重データ作成部50において重み付けされた時系列データ、すなわち加重データに対してマハラノビス距離の算出を行うものである。
The Mahalanobis
より具体的に、マハラノビス距離算出部60は、下記の式7に示す、加重データのデータ系列x’tに対するマハラノビス距離dtを算出するものである。ここで、μはデータ系列の平均を表し、Σは共分散行列を表す。また、マハラノビス距離算出部60は、算出したマハラノビス距離dtをマハラノビス距離蓄積部65に逐次格納するものである。つまり、マハラノビス距離蓄積部65は、マハラノビス距離算出部60において算出されたマハラノビス距離dtを蓄積するものである。
More specifically, the Mahalanobis
このように、加重データ作成部50による前処理を経てマハラノビス距離算出部60が算出したマハラノビス距離dtを用いることで、過去のデータ系列の集合からの乖離が大きい時系列データを変化点として検出することができる。これが充分に時系列データを蓄積していないデータ系列、つまり短いデータ系列に対する変化点検出の原理である。すなわち、時系列データの蓄積量が少ない場合にも有用な変化点検出の原理である。
In this way, by using the Mahalanobis distance dt calculated by the Mahalanobis
変化点スコア算出部70は、自己回帰モデルを使った変化点の判断と、マハラノビス距離を用いた変化点の判断との両方を実施し、データ系列の長い短いに依存しない変化点検出を実現するものである。すなわち、変化点スコア算出部70は、自己回帰モデル算出部40において算出された推定値と、マハラノビス距離算出部60において算出されたマハラノビス距離とを統合して解析することにより、時系列データの変化の大小をスコアとして換算するものである。本実施の形態において、変化点スコア算出部70は、自己回帰モデルによる推定値と、加重移動平均を用いたマハラノビス距離とを、同一の尺度の値に換算することにより、現在の時系列データの異常度合いを数値化するものである。
The change point
変化点スコア算出部70は、図1に示すように、第1演算部71と、第2演算部72と、比較演算部73と、を有している。
As shown in FIG. 1, the change point
第1演算部71は、データ蓄積部30から時系列データを取得し、自己回帰値蓄積部45から自己回帰モデルの推定値を取得するようになっている。第1演算部71は、データ蓄積部30に蓄積された時系列データと、自己回帰値蓄積部45に蓄積された自己回帰モデルの推定値との差である乖離値Dを算出するようになっている。また、第1演算部71は、過去における乖離値Dの最大値を、距離最大値dtMAXとして変化点スコア蓄積部75に格納するようになっている。第1演算部71は、距離最大値dtMAXを適宜更新するようになっている。
The
第1演算部71は、算出した乖離値Dの乖離最大値DMAXに対する割合、すなわち「D/DMAX」を第1変化点スコアとして求めるものである。そして、第1演算部71は、求めた第1変化点スコアを変化点スコア蓄積部75に蓄積させるものである。
The
さらに、第1演算部71は、第1変化点スコアが1を大きく上回るか否かを判定する変化点抽出機能を有している。より具体的に、第1演算部71は、第1変化点スコアが1を大きく上回るか否かを判定するときの判定基準をαとすると、第1変化点スコアである「D/DMAX」が「1+判定基準α」よりも大きいか否かを判定する機能を有している。ここで、判定基準αは、「(過去の第1変化点スコアの平均値)+係数×(過去の第1変化点スコアの標準偏差)」など、第1変化点スコアが正規分布に従うと仮定して設定することができる。係数としては、例えば3を用いることができる。係数は、適宜変更するようにしてもよい。
Further, the
また、第1演算部71は、変化点抽出機能により、第1変化点スコアが1を大きく上回る場合、その時点、すなわち当該第1変化点スコアに対応する時系列データが入力された時点がデータ系列の変化点であると判断するものである。その際、第1演算部71は、変化点と判断した時点における第1変化点スコアに、出力側の外部機器が他の第1変化点スコアと区別するための識別情報を付加するようになっている。本実施の形態において、第1演算部71は、変化点と判断した時点における第1変化点スコアに、異常なデータであることを示すフラグを立てるようになっている。
Further, in the
ところで、変化点と判断された時点における第1変化点スコアは、異常を示すものである。そのため、当該第1変化点スコアの元となる乖離値Dは、突飛な値であると考えられ、乖離最大値DMAXとして用いることは適当でない。よって、第1演算部71は、変化点と判断された時点における第1変化点スコアの元となる乖離値Dによっては、乖離最大値DMAXを更新しないようになっている。
By the way, the first change point score at the time when it is determined to be the change point indicates an abnormality. Therefore, the dissociation value D, which is the basis of the first change point score, is considered to be an outlandish value, and it is not appropriate to use it as the maximum dissociation value D MAX. Therefore, the
第2演算部72は、マハラノビス距離蓄積部65からマハラノビス距離dtを取得するようになっている。また、第2演算部72は、過去におけるマハラノビス距離dtの最大値を、距離最大値dtMAXとして変化点スコア蓄積部75に格納するようになっている。第2演算部72は、距離最大値dtMAXを適宜更新するようになっている。
The
第2演算部72は、取得したマハラノビス距離dtを用いて、第1変化点スコアと同一の尺度である第2変化点スコアを求めるものである。より具体的に、第2演算部72は、距離最大値dtMAXに対する、現在の時系列データのマハラノビス距離dtの割合、すなわち「dt/dtMAX」を第2変化点スコアとして求めるものである。そして、第2演算部72は、求めた第2変化点スコアを変化点スコア蓄積部75に蓄積させるものである。
The
さらに、第2演算部72は、第2変化点スコアが1を大きく上回るか否かを判定する変化点抽出機能を有している。より具体的に、第2演算部72は、第2変化点スコアが1を大きく上回るか否かを判定するときの判定基準をβとすると、第2変化点スコアである「dt/dtMAX」が「1+判定基準β」よりも大きいか否かを判定する機能を有している。ここで、判定基準βは、「(過去の第2変化点スコアの平均値)+係数×(過去の第2変化点スコアの標準偏差)」など、第2変化点スコアが正規分布に従うと仮定して設定することができる。係数としては、例えば3を用いることができる。係数は、適宜変更するようにしてもよい。
Further, the
また、第2演算部72は、変化点抽出機能により、第2変化点スコアが1を大きく上回る場合、その時点、すなわち当該第2変化点スコアに対応する時系列データが入力された時点がデータ系列の変化点であると判断するものである。その際、第2演算部72は、変化点と判断した時点における第2変化点スコアに、出力側の外部機器が他の第2変化点スコアと区別するための識別情報を付加するようになっている。本実施の形態において、第2演算部72は、変化点と判断した時点における第2変化点スコアに、異常なデータであることを示すフラグを立てるようになっている。
Further, the
ところで、変化点と判断された時点における第2変化点スコアは、異常を示すものである。そのため、当該第2変化点スコアの元となるマハラノビス距離dtは、突飛な値であると考えられ、距離最大値dtMAXとして用いることは適当でない。よって、第2演算部72は、変化点と判断された時点における第2変化点スコアの元となるマハラノビス距離dtによっては、距離最大値dtMAXを更新しないようになっている。
By the way, the second change point score at the time when it is determined to be the change point indicates an abnormality. Therefore, the Mahalanobis distance dt, which is the source of the second change point score, is considered to be an outlandish value, and it is not appropriate to use it as the maximum distance value dtMAX. Therefore, the
比較演算部73は、複数の時系列データの各々について、第1演算部71が求めた第1変化点スコアと、第2演算部72が求めた第2変化点スコアとの大小を比較するものである。そして、比較演算部73は、複数の時系列データの各々について、第1変化点スコアと第2変化点スコアとのうちで大きい方を変化点スコアとして出力部80に受け渡すものである。
The
すなわち、変化点スコア算出部70は、自己回帰モデル算出部40によって自己回帰値蓄積部45に蓄積される自己回帰モデルの推定値と、マハラノビス距離算出部60によってマハラノビス距離蓄積部65に蓄積されるマハラノビス距離dtとを用いて、変化点の判断を行うものである。変化点スコア蓄積部75は、第1演算部71が求めた第1変化点スコアと、第2演算部72が求めた第2変化点スコアとを蓄積するものである。
That is, the change point
出力部80は、現在の変化点スコアを外部に出力するものである。すなわち、比較演算部73から逐次受け渡される変化点スコアを最終的な検出結果として出力するものである。出力部80から出力される変化点スコアは、例えば、ネットワークトラフィック、又は道路の交通流の異常検知など、様々な用途に利用することができる。
The
また、本実施の形態において、第1演算部71および第2演算部72は、変化点と判断した時点における変化点スコアにフラグを立てるようになっている。そのため、出力部80に接続された出力側の外部機器は、第1演算部71又は第2演算部72によって付されたフラグに応じて、例えば、利用者に注意を促すためのアラートを表示することができる。
Further, in the present embodiment, the
ここで、変化点検出装置100の上記各機能は、回路デバイスなどのハードウェアで実現することもできるし、例えば、マイコン、DSP(Digital Signal Processor)、又はCPU(Central Processing Unit)等の演算装置上で実行されるソフトウェアとして実現することもできる。また、データ蓄積部30、自己回帰値蓄積部45、マハラノビス距離蓄積部65、および変化点スコア蓄積部75は、RAM(Random Access Memory)及びROM(Read Only Memory)、フラッシュメモリ等のPROM(Programmable ROM)、又はHDD(Hard Disk Drive)等により構成することができる。
Here, each of the above-mentioned functions of the change
図2は、図1の変化点検出装置の動作を示すフローチャートである。図2を参照して、本実施の形態における変化点検出方法について説明する。 FIG. 2 is a flowchart showing the operation of the change point detection device of FIG. The change point detection method according to the present embodiment will be described with reference to FIG.
まず、入力部10は、外部から得られる時系列データを受け付けて、前処理部20に受け渡す(ステップS101)。前処理部20は、入力部10から取得した時系列データに前処理を施し、前処理後の時系列データをデータ蓄積部30に記憶させる。つまり、前処理部20は、時系列データに対する前処理として、必要に応じて、AD変換、サブサンプリング、短時間フーリエ変換、及び正規化処理のうちの少なくとも1つを実行する(ステップS102)。
First, the
ここで、変化点検出装置100は、長いデータ系列の変化点を検出するための処理として、自己回帰モデルに基づく変化点検出を実行する。すなわち、自己回帰モデル算出部40は、データ蓄積部30から前処理後の時系列データを取得し、自己回帰モデルにより推定値を算出する(ステップS103:自己回帰モデル算出ステップ)。
Here, the change
次に、第1演算部71は、データ蓄積部30に蓄積された時系列データと、自己回帰値蓄積部45に蓄積された自己回帰モデルの推定値との差である乖離値Dを算出する。次いで、第1演算部71は、算出した乖離値Dの乖離最大値DMAXに対する割合である第1変化点スコアを求める。そして、第1演算部71は、求めた第1変化点スコアを変化点スコア蓄積部75に格納する(ステップS104:第1演算ステップ)。
Next, the
また、変化点検出装置100は、短いデータ系列の変化点を検出するための処理として、マハラノビス距離に基づく変化点検出を、自己回帰モデルに基づく変化点検出と並行して実施する。すなわち、加重データ作成部50は、時系列データの新しさに応じて相対的に重みが増えるよう、式6に基づく重み付け処理を時系列データに施し、加重データを作成する(ステップS105:加重データ作成ステップ)。次いで、マハラノビス距離算出部60は、式7に基づき、加重データ作成部50において作成された加重データに対するマハラノビス距離を算出する(ステップS106:マハラノビス距離算出ステップ)。
Further, the change
次に、第2演算部72は、現在の時系列データのマハラノビス距離dtの距離最大値dtMAXに対する割合である第2変化点スコアを求める。そして、第2演算部72は、求めた第2変化点スコアを変化点スコア蓄積部75に格納する(ステップS107:第2演算ステップ)。
Next, the
続いて、比較演算部73は、第1演算部71が求めた第1変化点スコアと、第2演算部72が求めた第2変化点スコアとのうちで大きい方を、最終的な検出結果としての変化点スコアに決定し、決定した変化点スコアを出力部80に受け渡す(ステップS108:比較演算ステップ)。出力部80は、比較演算部73から受け渡された変化点スコアを検出結果として出力する(ステップS109)。なお、上記ステップS104、ステップS107、およびステップS108の工程は、本発明の「変化点スコア算出ステップ」に相当する。変化点検出装置100は、上記ステップS101からS109までの一連の処理を、データ系列ごとに各時系列データに対して実行する。
Subsequently, the
このように、本実施の形態における変化点検出方法は、自己回帰モデルと加重移動平均を用いたマハラノビス距離とを利用することにより、過去のデータ系列が多い場合と少ない場合の何れにおいても、時系列データのパターンが変化する部分を精度よく検知することができる。ところで、上記の変化点検出方法は、主に長いデータ系列の変化点を検出するための処理(ステップS103、S104)と、主に短いデータ系列の変化点を検出するための処理(ステップS105〜S107)と、を行うようになっているが、長い短いというのは相対的な尺度である。つまり、上記の変化点検出方法は、データ系列の長い短い、すなわち時系列データの蓄積量の多い少ないを一定の閾値で規定することなく、並行して各処理を進めるため、変化点の取りこぼしが発生しづらいという利点がある。 As described above, the change point detection method in the present embodiment uses the autoregressive model and the Mahalanobis distance using the weighted moving average, regardless of whether the past data series is large or small. It is possible to accurately detect the part where the pattern of the series data changes. By the way, the above-mentioned change point detection method mainly includes a process for detecting a change point in a long data series (steps S103 and S104) and a process for detecting a change point in a short data series (steps S105 and S105). S107) and, but long and short are relative measures. That is, in the above-mentioned change point detection method, each process is carried out in parallel without defining a long and short data series, that is, a large amount and a small amount of time-series data accumulated by a certain threshold value, so that the change point is missed. There is an advantage that it is hard to occur.
以上のように、変化点検出装置100は、自己回帰モデルによる推定値とマハラノビス距離との両方を異常検知に用いることから、時系列データの蓄積量が少ない場合でも精度のよい異常検知を行うことができるため、時系列データの多少を問わず、高精度な異常検知を行うことができる。すなわち、変化点検出装置100は、比較的長い期間に亘って蓄積された時系列データから変化点を検出するために、自己回帰モデルを使って指標を求める処理を行い、比較的短い期間内に蓄積された時系列データから変化点を検出するために、マハラノビス距離という指標を求める処理を行う。そのため、過去に得られた正常なデータ系列が充分にある場合はもとより、従来の手法では検出することが困難であった過去のデータ系列が少ない場合においても、異常検知を精度よく行うことができる。そして、変化点検出装置100は、データ系列の長い短いを一定の閾値で規定することなく、自己回帰モデルに基づく処理とマハラノビス距離に基づく処理とを並行して行うため、変化点の取りこぼしの発生を抑制することができる。
As described above, since the change
また、第1変化点スコアと第2変化点スコアとは同一の尺度の値であり、変化点検出装置100は、第1変化点スコアと第2変化点スコアとのうちで大きい方を出力するようになっている。そのため、より変化の大きな出力値をもとに異常の発生の有無を判断できることから、異常の発見の効率化を図ることができる。
Further, the first change point score and the second change point score are values of the same scale, and the change
上述した実施の形態は、変化点検出装置および変化点検出方法における好適な具体例であり、本発明の技術的範囲は、これらの態様に限定されるものではない。例えば、上記実施の形態では、変化点検出装置100が、第1変化点スコアと第2変化点スコアとのうちで大きい方を出力する場合を例示したが、これに限定されるものではない。例えば、変化点スコア算出部70は、比較演算部73を設けずに構成し、第1変化点スコアと第2変化点スコアとの双方を出力部80に受け渡すようにしてもよい。ただし、このようにすると、出力される変化点が多くなり、そこから本質的な異常を見極める手間が増加する可能性がある。この点、本実施の形態における変化点検出装置100は、時系列データの変化の度合いを、同一の尺度である第1変化点スコアと第2変化点スコアとに指標化して出力するようになっている。そのため、出力された各変化点スコアの優先度の判断が容易となり、効率的に異常を見出すことができる。もっとも、比較演算部73は、第1変化点スコアと第2変化点スコアとの大小比較を行った上で、大きい方にフラグを立てて双方を出力するようにしてもよい。このようにすれば、当該フラグに応じて、出力側の外部機器に、例えば利用者に注意を促すためのアラートを表示させることが可能となり、さらに異常の発見の効率化を図ることができる。
The above-described embodiment is a suitable specific example in the change point detection device and the change point detection method, and the technical scope of the present invention is not limited to these modes. For example, in the above embodiment, the case where the change
10 入力部、20 前処理部、30 データ蓄積部、40 自己回帰モデル算出部、45 自己回帰値蓄積部、50 加重データ作成部、60 マハラノビス距離算出部、65 マハラノビス距離蓄積部、70 変化点スコア算出部、71 第1演算部、72 第2演算部、73 比較演算部、75 変化点スコア蓄積部、80 出力部、100 変化点検出装置、D 乖離値、DMAX 乖離最大値、dt マハラノビス距離、dtMAX 距離最大値。 10 Input unit, 20 Preprocessing unit, 30 Data storage unit, 40 Autoregressive model calculation unit, 45 Autoregressive value storage unit, 50 Weighted data creation unit, 60 Mahalanobis distance calculation unit, 65 Mahalanobis distance storage unit, 70 Change point score Calculation unit, 71 1st calculation unit, 72 2nd calculation unit, 73 comparison calculation unit, 75 change point score accumulation unit, 80 output unit, 100 change point detector, D deviation value, D MAX deviation maximum value, dt Mahalanobis Distance, dtMAX distance maximum value.
Claims (10)
前記時系列データの新しさに応じて相対的に重みが増えるよう、前記時系列データに重み付け処理を施して加重データを作成する加重データ作成部と、
前記時系列データとして、前記加重データ作成部において作成された前記加重データを用いてマハラノビス距離を算出するマハラノビス距離算出部と、
自己回帰モデル算出部において算出された前記推定値と、前記マハラノビス距離算出部において算出された前記マハラノビス距離とを統合して解析することにより、前記時系列データの変化の大小をスコアとして換算して出力する変化点スコア算出部と、を有する変化点検出装置。 The autoregressive model calculation unit that calculates the estimated value by the autoregressive model based on the time series data input from the outside,
A weighted data creation unit that creates weighted data by weighting the time-series data so that the weights increase relatively according to the newness of the time-series data.
As the time series data, the Mahalanobis distance calculation unit that calculates the Mahalanobis distance using the weighted data created by the weighted data creation unit, and the Mahalanobis distance calculation unit.
By integrating and analyzing the estimated value calculated by the autoregressive model calculation unit and the Mahalanobis distance calculated by the Mahalanobis distance calculation unit, the magnitude of the change in the time series data is converted as a score. A change point detection device having a change point score calculation unit and an output change point score calculation unit.
現在における前記時系列データと前記推定値との差である乖離値を算出し、前記乖離値に基づいて第1変化点スコアを求める第1演算部と、
前記マハラノビス距離を換算して、前記第1変化点スコアと同一の尺度である第2変化点スコアを求める第2演算部と、
前記第1変化点スコアと前記第2変化点スコアとのうちで大きい方を前記スコアとして出力する比較演算部と、を有する請求項1に記載の変化点検出装置。 The change point score calculation unit
A first calculation unit that calculates a divergence value, which is the difference between the current time series data and the estimated value, and obtains a first change point score based on the divergence value.
A second calculation unit that converts the Mahalanobis distance to obtain a second change point score, which is the same scale as the first change point score.
The change point detection device according to claim 1 , further comprising a comparison calculation unit that outputs the larger of the first change point score and the second change point score as the score.
現在における前記時系列データと前記推定値との差である乖離値を算出すると共に、当該乖離値の、過去における前記乖離値の最大値に対する割合を第1変化点スコアとして求める第1演算部と、
現在における前記マハラノビス距離の、過去における前記マハラノビス距離の最大値に対する割合を第2変化点スコアとして求める第2演算部と、を有する請求項1に記載の変化点検出装置。 The change point score calculation unit
With the first calculation unit that calculates the divergence value that is the difference between the current time series data and the estimated value, and obtains the ratio of the divergence value to the maximum value of the divergence value in the past as the first change point score. ,
The Mahalanobis distance in the current, the change-point detection apparatus according to claim 1 having, a second arithmetic unit for determining a ratio as a second change point score for the maximum value of the Mahalanobis distance in the past.
前記第1変化点スコアと前記第2変化点スコアとのうちで大きい方を前記スコアとして出力する比較演算部を有する請求項3に記載の変化点検出装置。 The change point score calculation unit
The change point detection device according to claim 3 , further comprising a comparison calculation unit that outputs the larger of the first change point score and the second change point score as the score.
前記時系列データの新しさに応じて相対的に重みが増えるよう、前記時系列データに重み付け処理を施して加重データを作成する加重データ作成ステップと、
前記時系列データとして、前記加重データ作成ステップで作成した前記加重データを用いてマハラノビス距離を算出するマハラノビス距離算出ステップと、
前記自己回帰モデル算出ステップで算出した前記推定値と、前記マハラノビス距離算出ステップで算出した前記マハラノビス距離とを統合して解析することにより、前記時系列データの変化の大小をスコアとして換算して出力する変化点スコア算出ステップと、を有する変化点検出方法。 An autoregressive model calculation step that calculates an estimated value by an autoregressive model based on time series data input from the outside,
A weighted data creation step in which weighted data is created by weighting the time-series data so that the weights increase relatively according to the newness of the time-series data.
The Mahalanobis distance calculation step for calculating the Mahalanobis distance using the weighted data created in the weighted data creation step as the time series data, and the Mahalanobis distance calculation step.
By integrating and analyzing the estimated value calculated in the autoregressive model calculation step and the Mahalanobis distance calculated in the Mahalanobis distance calculation step, the magnitude of the change in the time series data is converted into a score and output. A change point detection method having a change point score calculation step and a change point score calculation step.
現在における前記時系列データと前記推定値との差である乖離値を算出し、前記乖離値に基づいて第1変化点スコアを求める第1演算ステップと、
前記マハラノビス距離を換算して、前記第1変化点スコアと同一の尺度である第2変化点スコアを求める第2演算ステップと、
前記第1変化点スコアと前記第2変化点スコアとのうちで大きい方を前記スコアとして出力する比較演算ステップと、を有する請求項6に記載の変化点検出方法。 The change point score calculation step is
The first calculation step of calculating the divergence value, which is the difference between the current time series data and the estimated value, and obtaining the first change point score based on the divergence value,
The second calculation step of converting the Mahalanobis distance to obtain the second change point score, which is the same scale as the first change point score,
The change point detection method according to claim 6 , further comprising a comparison calculation step of outputting the larger of the first change point score and the second change point score as the score.
現在における前記時系列データと前記推定値との差である乖離値を算出すると共に、当該乖離値の、過去における前記乖離値の最大値に対する割合を第1変化点スコアとして求める第1演算ステップと、
現在における前記マハラノビス距離の、過去における前記マハラノビス距離の最大値に対する割合を第2変化点スコアとして求める第2演算ステップと、を有する請求項6に記載の変化点検出方法。 The change point score calculation step is
With the first calculation step of calculating the divergence value which is the difference between the current time series data and the estimated value and obtaining the ratio of the divergence value to the maximum value of the divergence value in the past as the first change point score. ,
The change point detection method according to claim 6 , further comprising a second calculation step of obtaining the ratio of the current Mahalanobis distance to the maximum value of the Mahalanobis distance in the past as a second change point score.
前記第1変化点スコアと前記第2変化点スコアとのうちで大きい方を前記スコアとして出力する比較演算ステップをさらに有する請求項8に記載の変化点検出方法。 The change point score calculation step is
The change point detection method according to claim 8 , further comprising a comparison calculation step in which the larger of the first change point score and the second change point score is output as the score.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017044995A JP6848546B2 (en) | 2017-03-09 | 2017-03-09 | Change point detection device and change point detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017044995A JP6848546B2 (en) | 2017-03-09 | 2017-03-09 | Change point detection device and change point detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018147442A JP2018147442A (en) | 2018-09-20 |
JP6848546B2 true JP6848546B2 (en) | 2021-03-24 |
Family
ID=63591336
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017044995A Active JP6848546B2 (en) | 2017-03-09 | 2017-03-09 | Change point detection device and change point detection method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6848546B2 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111367747B (en) * | 2018-12-25 | 2023-07-04 | 中国移动通信集团浙江有限公司 | Index abnormal detection early warning device based on time annotation |
CN109492193B (en) * | 2018-12-28 | 2020-11-27 | 同济大学 | Abnormal network data generation and prediction method based on deep machine learning model |
JP7225893B2 (en) | 2019-02-18 | 2023-02-21 | オムロンヘルスケア株式会社 | Blood pressure value analysis support device, blood pressure value analysis support system, blood pressure value analysis support method, and program |
JP7127571B2 (en) | 2019-02-18 | 2022-08-30 | オムロンヘルスケア株式会社 | Blood pressure level change detection device, blood pressure level change detection method, and program |
JP7377637B2 (en) | 2019-06-28 | 2023-11-10 | 三菱重工業株式会社 | Abnormality detection device, abnormality detection method, and program |
JP2023013078A (en) * | 2021-07-15 | 2023-01-26 | パナソニックIpマネジメント株式会社 | Information processing device, information processing method, and program |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009048240A (en) * | 2007-08-13 | 2009-03-05 | Tokyo Institute Of Technology | Detection method, detection device, monitoring method, and monitoring system of moving object in moving image |
JP5140476B2 (en) * | 2008-03-31 | 2013-02-06 | アズビル株式会社 | Abnormality detection method and abnormality detection device |
JP5895457B2 (en) * | 2010-11-25 | 2016-03-30 | Jfeスチール株式会社 | Anomaly monitoring system and anomaly monitoring method |
JP5953779B2 (en) * | 2012-02-01 | 2016-07-20 | 富士ゼロックス株式会社 | Failure prediction system, failure prediction device, and program |
JP6252344B2 (en) * | 2014-05-07 | 2017-12-27 | 株式会社デンソー | Data recording apparatus and data recording program |
JP6323157B2 (en) * | 2014-05-14 | 2018-05-16 | 株式会社デンソー | Diagnostic data extraction device, vehicle diagnostic device |
JP5826892B1 (en) * | 2014-06-02 | 2015-12-02 | ヤンマー株式会社 | Change point detection apparatus, change point detection method, and computer program |
JP2016095751A (en) * | 2014-11-17 | 2016-05-26 | 富士通株式会社 | Abnormality unit identification program, abnormality unit identification method and abnormality unit identification system |
-
2017
- 2017-03-09 JP JP2017044995A patent/JP6848546B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2018147442A (en) | 2018-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6848546B2 (en) | Change point detection device and change point detection method | |
US9833196B2 (en) | Apparatus, system, and method for detecting activities and anomalies in time series data | |
WO2019049688A1 (en) | Abnormal sound detecting device, abnormality model learning device, abnormality detecting device, abnormal sound detecting method, abnormal sound generating device, abnormal data generating device, abnormal sound generating method, and program | |
US20110191076A1 (en) | Error detection method and system | |
US20190376840A1 (en) | Anomalous sound detection apparatus, degree-of-anomaly calculation apparatus, anomalous sound generation apparatus, anomalous sound detection training apparatus, anomalous signal detection apparatus, anomalous signal detection training apparatus, and methods and programs therefor | |
US11068744B2 (en) | Operation state classification apparatus | |
CN113518011B (en) | Abnormality detection method and apparatus, electronic device, and computer-readable storage medium | |
KR101872342B1 (en) | Method and device for intelligent fault diagnosis using improved rtc(real-time contrasts) method | |
JP2014525096A (en) | Monitoring method using kernel regression modeling with pattern sequence | |
US10228994B2 (en) | Information processing system, information processing method, and program | |
JP2014525097A (en) | A system of sequential kernel regression modeling for forecasting and forecasting | |
WO2013105164A1 (en) | Abnormal signal determining apparatus, abnormal signal determining method, and abnormal signal determining program | |
US11835430B2 (en) | Anomaly score estimation apparatus, anomaly score estimation method, and program | |
AU2013204156B2 (en) | Classification apparatus and program | |
CN111160106B (en) | GPU-based optical fiber vibration signal feature extraction and classification method and system | |
KR20160005094A (en) | Quantitative analysis of signal related measurements for trending and pattern recognition | |
CN111811642B (en) | Fault detection method and fault detection device for excavator engine | |
JP2008008708A (en) | Judgment knowledge creation system, judgment knowledge creation method, program, and recording medium | |
CN110858072B (en) | Method and device for determining running state of equipment | |
JP4760614B2 (en) | Method for selecting learning data of signal identification device | |
JP2019067069A (en) | Abnormality detecting apparatus, abnormality detecting method and abnormality detecting program | |
JP4886461B2 (en) | Abnormality monitoring device | |
JP2009110262A (en) | Filter device, filtering method for filter device and filtering program | |
CN116106672B (en) | Vehicle network resonance detection method and device based on data driving and engineering knowledge | |
CN109840386B (en) | Damage identification method based on factor analysis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191115 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20201030 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20201201 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210126 |
|
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: 20210202 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210215 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6848546 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |