JP2018148350A - Threshold determination device, threshold level determination method and program - Google Patents

Threshold determination device, threshold level determination method and program Download PDF

Info

Publication number
JP2018148350A
JP2018148350A JP2017040590A JP2017040590A JP2018148350A JP 2018148350 A JP2018148350 A JP 2018148350A JP 2017040590 A JP2017040590 A JP 2017040590A JP 2017040590 A JP2017040590 A JP 2017040590A JP 2018148350 A JP2018148350 A JP 2018148350A
Authority
JP
Japan
Prior art keywords
abnormality
threshold value
detection
unit
learning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2017040590A
Other languages
Japanese (ja)
Other versions
JP6564799B2 (en
Inventor
泰弘 池田
Yasuhiro Ikeda
泰弘 池田
中野 雄介
Yusuke Nakano
雄介 中野
敬志郎 渡辺
Keishiro Watanabe
敬志郎 渡辺
石橋 圭介
Keisuke Ishibashi
圭介 石橋
川原 亮一
Ryoichi Kawahara
亮一 川原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2017040590A priority Critical patent/JP6564799B2/en
Publication of JP2018148350A publication Critical patent/JP2018148350A/en
Application granted granted Critical
Publication of JP6564799B2 publication Critical patent/JP6564799B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a threshold determination device capable of automatically determining a threshold level used for abnormality detection.SOLUTION: The threshold determination device includes: a detection part that calculates the abnormality degree based on a learning result, which is obtained by learning the data collected from the abnormality detection targets, and the data, which is observed from the abnormality detection targets in a test period, to detect an occurrence of abnormality by comparing the abnormality degree to the threshold level; and a threshold level determination part that determines the threshold level based on the existence of missed anomalies and erroneous detection. When any erroneous detection occurs, the threshold level determination part may increase the threshold level, and when there is any missed anomaly, the threshold level determination part may lower the threshold level.SELECTED DRAWING: Figure 3

Description

本発明は、閾値決定装置、閾値決定方法及びプログラムに関する。   The present invention relates to a threshold determination device, a threshold determination method, and a program.

コンピュータシステムのリアルタイムな異常検知の方法として、システム上の様々なデータを定期的に観測し、データが正常時と異なる傾向を示した場合に「異常」として検知するアルゴリズムが考えられる。   As a method for detecting an abnormality in a computer system in real time, an algorithm that regularly observes various data on the system and detects the abnormality when the data shows a tendency different from the normal time can be considered.

例えば、予め正常時として定義された「学習期間」のデータが教師データとして用いられて学習され、異常検知を行う「テスト期間」においては、観測されたテストデータの傾向と、学習した教師データの傾向との比較が行われる異常検知アルゴリズムが考えられる。   For example, in the “test period” in which data of “learning period” defined in advance as normal time is used as learning data and learned, and abnormality detection is performed, the tendency of the observed test data and the learned teacher data An anomaly detection algorithm that is compared with the trend is considered.

異常検知アルゴリズムとしては様々な手法が提案されているが、その多くにおいてアルゴリズムの出力は、観測されたテストデータの正常状態からの距離で定義される異常度となる。そのため、異常検知を行う際には異常の有無を判断するための異常度の閾値を定める必要がある(例えば、非特許文献1、非特許文献2参照)。   Various methods have been proposed as anomaly detection algorithms. In many cases, the output of the algorithm is an anomaly degree defined by the distance from the normal state of the observed test data. For this reason, when performing abnormality detection, it is necessary to determine an abnormality threshold value for determining the presence or absence of abnormality (see, for example, Non-Patent Document 1 and Non-Patent Document 2).

河嵜光毅,吉川大弘,古橋武,"時系列データの異常検出を目的とした深層学習における再構築誤差の利用可能性に関する検討",The 29th Annual Conference of the Japanese Society for Artificial Intelligence, 2015Mitsutoshi Kawasaki, Daihiro Yoshikawa, Takeshi Furuhashi, "Examination of availability of reconstruction error in deep learning for the purpose of detecting anomalies in time series data", The 29th Annual Conference of the Japanese Society for Artificial Intelligence, 2015 Chandola, Varun, Arindam Banerjee, and Vipin Kumar. "Anomaly detection: A survey." ACM computing surveys (CSUR) 41.3 (2009): 15.Chandola, Varun, Arindam Banerjee, and Vipin Kumar. "Anomaly detection: A survey." ACM computing surveys (CSUR) 41.3 (2009): 15.

異常検知に用いられる閾値の設定が低い場合には、多くの異常を検知できる一方で、実際には異常ではない場合に「異常」と判断してしまう誤検知が増える要因となる。一方、閾値の設定が高い場合には誤検知が少なくなるが、実際に異常である場合に「異常」と判断できない見逃しが増える要因となる。そのため、閾値は目的に応じて適切に定める必要があるが、人手を用いた閾値の設定はオペレータの稼働を増やす要因となり、閾値を自動的に決定するための工夫が必要となる。   When the threshold value used for abnormality detection is low, many abnormalities can be detected. On the other hand, false detections that determine “abnormal” when there is no actual abnormality increase. On the other hand, when the threshold value is set high, false detections are reduced. However, when the threshold value is actually abnormal, there is an increase in oversight that cannot be determined as “abnormal”. For this reason, it is necessary to appropriately determine the threshold value according to the purpose. However, setting the threshold value using a hand is a factor for increasing the operation of the operator, and a device for automatically determining the threshold value is required.

本発明は、上記の点に鑑みてなされたものであって、異常検知に用いられる閾値を自動的に決定することを目的とする。   The present invention has been made in view of the above points, and an object thereof is to automatically determine a threshold value used for abnormality detection.

そこで上記課題を解決するため、閾値決定装置は、異常の検知対象から収集されたデータを学習した学習結果と、テスト期間において異常の検知対象から観測されたデータとに基づいて異常度を算出し、当該異常度を閾値と比較することで異常の発生を検知する検知部と、異常の見逃し及び誤検知の有無に基づいて前記閾値を決定する閾値決定部とを有する。   Therefore, in order to solve the above problem, the threshold value determination device calculates the degree of abnormality based on the learning result obtained by learning the data collected from the abnormality detection target and the data observed from the abnormality detection target during the test period. And a detection unit that detects the occurrence of an abnormality by comparing the degree of abnormality with a threshold value, and a threshold value determination unit that determines the threshold value based on the presence or absence of an abnormality and the presence or absence of erroneous detection.

異常検知に用いられる閾値を自動的に決定することができる。   A threshold value used for abnormality detection can be automatically determined.

第1の実施の形態におけるシステム構成例を示す図である。It is a figure which shows the system configuration example in 1st Embodiment. 第1の実施の形態における異常検知装置10のハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of the abnormality detection apparatus 10 in 1st Embodiment. 第1の実施の形態における異常検知装置10の機能構成例を示す図である。It is a figure which shows the function structural example of the abnormality detection apparatus 10 in 1st Embodiment. 第1の実施の形態における学習処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the learning process in 1st Embodiment. 第1の実施の形態における検知処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the detection process in 1st Embodiment. オートエンコーダを説明するための図である。It is a figure for demonstrating an auto encoder. 第1の実施の形態における閾値決定処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the threshold value determination process in 1st Embodiment. 第2の実施の形態における閾値決定処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the threshold value determination process in 2nd Embodiment. 第3の実施の形態における閾値決定処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the threshold value determination process in 3rd Embodiment.

以下、図面に基づいて本発明の実施の形態を説明する。図1は、第1の実施の形態におけるシステム構成例を示す図である。図1において、ネットワークN1は、異常の検知対象とされるネットワークである。ネットワークN1は、ルータやサーバ装置等の複数のノードが相互に接続されることによって構成され、所定のサービスを提供するために任意のノード間においてパケットの送受信が行われる。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a diagram illustrating an example of a system configuration in the first embodiment. In FIG. 1, a network N1 is a network that is an abnormality detection target. The network N1 is configured by connecting a plurality of nodes such as routers and server devices to each other, and packets are transmitted and received between arbitrary nodes in order to provide a predetermined service.

ネットワークN1の複数箇所には測定装置20が配置されている。測定装置20は、配置箇所を監視することで得られる観測データを複数のタイミングで採取する。収集される観測データの一例として、MIB(Management Information Base)データ、NetFlowによるフローデータ、CPU使用率等が挙げられる。   Measuring devices 20 are arranged at a plurality of locations in the network N1. The measuring device 20 collects observation data obtained by monitoring the arrangement location at a plurality of timings. Examples of collected observation data include MIB (Management Information Base) data, NetFlow flow data, CPU usage rate, and the like.

MIBは、ネットワーク機器を監視するためのメーカ間の共通ポリシーである。MIBデータは、例えば、5分単位で集約され、「時刻、ホスト名、インターフェース(IF)名、入力データ量(ibps)、出力データ量(obps)」等を含む。   MIB is a common policy among manufacturers for monitoring network devices. The MIB data is aggregated in units of, for example, 5 minutes, and includes “time, host name, interface (IF) name, input data amount (ibps), output data amount (obsps)”, and the like.

NetFlowは、フロー単位でのネットワーク監視をおこなう技術であり、通信が終了した段階でそのフローに関する情報が出力される。また、フローとは、「何処」と「何処」が「どのような通信」を「どれだけの量」行っているかを把握するための単位をいい、通信の送り手側のIPアドレス(srcIP)、送り手側のポート番号(srcport)、受け手側のIPアドレス(dstIP)、受け手側のポート番号(dstport)、通信プロトコル(proto)の5属性によりまとめられる。フローデータは、「フロー開始時刻、srcIP、srcport、dstIP、dstport、proto、フロー継続時間、総送信パケット数、総送信バイト数」等を含む。   NetFlow is a technology that performs network monitoring in units of flows, and information about the flows is output when communication is completed. The flow is a unit for grasping “where” and “where” “what kind of communication” “how much” is performed, and the IP address (srcIP) on the sender side of the communication , The sender side port number (srcport), the receiver side IP address (dstIP), the receiver side port number (dstport), and the communication protocol (proto). The flow data includes “flow start time, srcIP, srcport, dstIP, dstport, protocol, flow duration, total number of transmitted packets, total number of transmitted bytes”, and the like.

CPU使用率は、例えば、ネットワークN1に含まれるサーバ装置又はルータ等のCPUの使用率である。   The CPU usage rate is, for example, the usage rate of a CPU such as a server device or a router included in the network N1.

測定装置20によって採取された観測データは、異常検知装置10によって収集される。異常検知装置10は、収集された観測データから、正常時の特徴を学習し、学習結果に基づいて、その後に入力される観測データについて、異常の発生を検知する(異常の有無を判定する)コンピュータである。なお、正常時の特徴の学習が行われる処理を「学習処理」といい、学習処理が行われる期間を「学習期間」という。学習処理において学習された結果に基づいて異常の検知が行われる処理を「テスト処理」といい、テスト処理が行われる期間を「テスト期間」という。   Observation data collected by the measurement device 20 is collected by the abnormality detection device 10. The abnormality detection device 10 learns the characteristics at the normal time from the collected observation data, and detects the occurrence of abnormality in the observation data input thereafter based on the learning result (determines whether there is an abnormality). It is a computer. Note that a process in which normal feature learning is performed is referred to as a “learning process”, and a period in which the learning process is performed is referred to as a “learning period”. A process in which an abnormality is detected based on a result learned in the learning process is referred to as a “test process”, and a period during which the test process is performed is referred to as a “test period”.

異常検知装置10には、実際に異常が発生したときの情報を記録する異常記録装置30が接続されている。異常記録装置30は、ネットワークオペレータ等がネットワークN1の障害情報を記録するためのコンピュータである。例えば、異常記録装置30には、redmineと呼ばれるプロジェクト管理ソフトウェアを利用することができる。異常記録装置30には、情報入力時刻、障害情報及びログサンプル等が記録される。情報入力時刻は、ネットワークオペレータ等が障害情報を入力した時刻であり、障害情報は、ネットワークオペレータが入力した情報の内容であり、ログサンプルは、ネットワークオペレータ等が測定装置20から取得したsyslog等のメッセージである。なお、syslogは、測定装置20がログメッセージをネットワーク上で転送するための規格であり、syslogで転送されるログメッセージは、「時刻、メッセージ、ホスト」等を含む、時刻はメッセージが測定装置20により出力された時刻である。ここでは、このログサンプル内の時刻を、異常が発生した異常発生時刻として扱う。   An abnormality recording device 30 for recording information when an abnormality actually occurs is connected to the abnormality detection device 10. The abnormality recording device 30 is a computer for a network operator or the like to record failure information of the network N1. For example, the abnormality recording device 30 can use project management software called redmin. The abnormality recording device 30 records information input time, failure information, log samples, and the like. The information input time is the time when the network operator or the like inputs the failure information, the failure information is the content of the information input by the network operator, and the log sample is a syslog or the like acquired from the measuring device 20 by the network operator or the like. Message. Syslog is a standard for the measurement device 20 to transfer a log message on the network. The log message transferred by the syslog includes “time, message, host” and the like. Is the time output by. Here, the time in the log sample is treated as an abnormality occurrence time when an abnormality has occurred.

図2は、第1の実施の形態における異常検知装置10のハードウェア構成例を示す図である。図2の異常検知装置10は、それぞれバスBで相互に接続されているドライブ装置100、補助記憶装置102、メモリ装置103、CPU104、及びインタフェース装置105等を有する。   FIG. 2 is a diagram illustrating a hardware configuration example of the abnormality detection apparatus 10 according to the first embodiment. 2 includes a drive device 100, an auxiliary storage device 102, a memory device 103, a CPU 104, an interface device 105, and the like, which are mutually connected by a bus B.

異常検知装置10での処理を実現するプログラムは、CD−ROM等の記録媒体101によって提供される。プログラムを記憶した記録媒体101がドライブ装置100にセットされると、プログラムが記録媒体101からドライブ装置100を介して補助記憶装置102にインストールされる。但し、プログラムのインストールは必ずしも記録媒体101より行う必要はなく、ネットワークを介して他のコンピュータよりダウンロードするようにしてもよい。補助記憶装置102は、インストールされたプログラムを格納すると共に、必要なファイルやデータ等を格納する。   A program that realizes processing in the abnormality detection apparatus 10 is provided by a recording medium 101 such as a CD-ROM. When the recording medium 101 storing the program is set in the drive device 100, the program is installed from the recording medium 101 to the auxiliary storage device 102 via the drive device 100. However, the program need not be installed from the recording medium 101 and may be downloaded from another computer via a network. The auxiliary storage device 102 stores the installed program and also stores necessary files and data.

メモリ装置103は、プログラムの起動指示があった場合に、補助記憶装置102からプログラムを読み出して格納する。CPU104は、メモリ装置103に格納されたプログラムに従って異常検知装置10に係る機能を実行する。インタフェース装置105は、ネットワークに接続するためのインタフェースとして用いられる。   The memory device 103 reads the program from the auxiliary storage device 102 and stores it when there is an instruction to start the program. The CPU 104 executes functions related to the abnormality detection device 10 according to a program stored in the memory device 103. The interface device 105 is used as an interface for connecting to a network.

図3は、第1の実施の形態における異常検知装置10の機能構成例を示す図である。図3において、異常検知装置10は、受信部11、学習処理制御部12、前処理部13、学習部14、検知処理制御部15、検知部16、異常発生情報取得部17及び閾値決定部18等を有する。これら各部は、異常検知装置10にインストールされた1以上のプログラムが、CPU104に実行させる処理により実現される。異常検知装置10は、また、教師データ記憶部121、パラメータ記憶部122、観測データ記憶部123、学習結果記憶部124、学習データ記憶部125、検知結果記憶部126及び異常発生情報記憶部127等を利用する。これら各記憶部は、例えば、補助記憶装置102、又は異常検知装置10にネットワークを介して接続可能な記憶装置等を用いて実現可能である。   FIG. 3 is a diagram illustrating a functional configuration example of the abnormality detection device 10 according to the first embodiment. In FIG. 3, the abnormality detection device 10 includes a reception unit 11, a learning processing control unit 12, a preprocessing unit 13, a learning unit 14, a detection processing control unit 15, a detection unit 16, an abnormality occurrence information acquisition unit 17, and a threshold determination unit 18. Etc. Each of these units is realized by processing that one or more programs installed in the abnormality detection apparatus 10 cause the CPU 104 to execute. The anomaly detection apparatus 10 also includes a teacher data storage unit 121, a parameter storage unit 122, an observation data storage unit 123, a learning result storage unit 124, a learning data storage unit 125, a detection result storage unit 126, an abnormality occurrence information storage unit 127, and the like. Is used. Each of these storage units can be realized using, for example, a storage device that can be connected to the auxiliary storage device 102 or the abnormality detection device 10 via a network.

教師データ記憶部121には、予め正常時に収集されたことが確認されている観測データが教師データとして記憶されている。但し、教師データは、観測データから選別されるのではなく、人為的に作成されてもよい。   In the teacher data storage unit 121, observation data that has been confirmed in advance to be collected in a normal state is stored as teacher data. However, the teacher data may be artificially created instead of being selected from the observation data.

受信部11は、測定装置20から観測データを受信する。受信された観測データは、観測データ記憶部123に記憶される
学習処理制御部12は、学習処理を制御する。
The receiving unit 11 receives observation data from the measurement device 20. The received observation data is stored in the observation data storage unit 123. The learning process control unit 12 controls the learning process.

前処理部13は、教師データの集合、観測データの集合、又は学習データ記憶部125に記憶されている学習データの集合について前処理を実行する。前処理とは、データ集合からの単位時間ごとの特徴量の抽出や、抽出された特徴量の正規化等の処理である。特徴量は、数値ベクトルの形式で表現される。なお、1回目の学習時には、教師データ記憶部121に記憶されている教師データ群が前処理の対象とされる。受信部11によって観測データの受信が開始されると、観測データ群が前処理の対象とされる。更に、検知部16による異常の検知が開始され、正常であると判定され、学習データとして学習データ記憶部125に記憶された観測データが所定数に達すると、当該学習データ群が前処理の対象とされてもよい。   The preprocessing unit 13 performs preprocessing on a set of teacher data, a set of observation data, or a set of learning data stored in the learning data storage unit 125. Pre-processing is processing such as extraction of feature amounts per unit time from a data set and normalization of extracted feature amounts. The feature amount is expressed in the form of a numerical vector. In the first learning, a teacher data group stored in the teacher data storage unit 121 is a target of preprocessing. When reception of observation data is started by the receiving unit 11, the observation data group is subjected to preprocessing. Furthermore, when the detection of the abnormality by the detection unit 16 is started and it is determined that the detection data is normal and the observation data stored in the learning data storage unit 125 as learning data reaches a predetermined number, the learning data group is subjected to preprocessing. It may be said.

前処理部13は、また、教師データ群又は学習データ群について前処理を実行する際に、観測データ又は学習データを正規化するためのパラメータ(以下、「正規化パラメータ」という。)を生成又は更新し、生成又は更新された正規化パラメータをパラメータ記憶部122に記憶する。   The pre-processing unit 13 also generates or normalizes parameters for normalizing observation data or learning data (hereinafter referred to as “normalization parameters”) when performing pre-processing on the teacher data group or learning data group. The updated normalization parameter is stored in the parameter storage unit 122.

学習部14は、教師データ又は学習データに基づいて学習を実行する。学習部14による学習結果は、学習結果記憶部124に記憶される。   The learning unit 14 performs learning based on teacher data or learning data. The learning result by the learning unit 14 is stored in the learning result storage unit 124.

検知処理制御部15は、検知処理を制御する。   The detection process control unit 15 controls the detection process.

検知部16は、観測データ記憶部123に記憶されている観測データが前処理部13によって前処理されることで生成される数値ベクトルと、学習結果記憶部124に記憶されている学習結果とに基づいて異常の発生を検知する。具体的には、検知部16は、前処理された数値ベクトルについて、学習結果との違いを異常度として算出し、当該異常度を閾値と比較することで異常の発生を検知する。閾値は予め設定されるが、以下に説明するように閾値決定部18において適切な値に更新される。異常が検知されなかった数値ベクトルの正規化前の値は、学習データとして学習データ記憶部125に記憶されてもよい。また、検知部16は、単位時間ごとの検知有無、算出された異常度等を検知結果記憶部126に記憶する。   The detection unit 16 uses a numerical vector generated when the observation data stored in the observation data storage unit 123 is preprocessed by the preprocessing unit 13 and a learning result stored in the learning result storage unit 124. The occurrence of abnormality is detected based on this. Specifically, the detection unit 16 detects the occurrence of an abnormality by calculating a difference from the learning result as a degree of abnormality for the preprocessed numerical vector and comparing the degree of abnormality with a threshold value. Although the threshold value is set in advance, the threshold value determination unit 18 updates the threshold value to an appropriate value as described below. The value before normalization of the numerical vector in which no abnormality is detected may be stored in the learning data storage unit 125 as learning data. Further, the detection unit 16 stores the detection presence / absence for each unit time, the calculated degree of abnormality, and the like in the detection result storage unit 126.

異常発生情報取得部17は、異常記録装置30から、異常が発生した異常発生時刻を取得し、異常発生情報記憶部127に記憶する。異常発生時刻は、定期的に(例えば、1日1回)取得されるものとしてよい。   The abnormality occurrence information acquisition unit 17 acquires the abnormality occurrence time when the abnormality has occurred from the abnormality recording device 30 and stores it in the abnormality occurrence information storage unit 127. The abnormality occurrence time may be acquired periodically (for example, once a day).

閾値決定部18は、誤差を考慮して、異常発生情報記憶部127に記憶されている異常発生時刻前後の一定の時間帯に実際に異常が発生したとみなし、検知結果記憶部126に記憶されている検知有無と照合して、異常の見逃し及び誤検知の有無を判断する。その結果、閾値決定部18は、検知部16において異常度との比較に用いられる閾値を決定する。   The threshold value determination unit 18 considers that an error has actually occurred in a certain time zone before and after the abnormality occurrence time stored in the abnormality occurrence information storage unit 127 and stores the abnormality in the detection result storage unit 126. The presence / absence of an abnormality and the presence / absence of a false detection are determined by comparing with the presence or absence of detection. As a result, the threshold determination unit 18 determines a threshold used for comparison with the degree of abnormality in the detection unit 16.

以下、異常検知装置10が実行する処理手順について説明する。図4は、第1の実施の形態における学習処理の処理手順の一例を説明するためのフローチャートである。なお、以下においては、便宜上、フローデータが処理対象である例について示す。   Hereinafter, a processing procedure executed by the abnormality detection apparatus 10 will be described. FIG. 4 is a flowchart for explaining an example of the processing procedure of the learning process in the first embodiment. In the following, for the sake of convenience, an example in which flow data is a processing target will be described.

学習処理が開始されると、学習処理制御部12は、教師データ記憶部121から教師データ群を取得し、当該教師データ群を前処理部13へ入力する(S101)。   When the learning process is started, the learning process control unit 12 acquires a teacher data group from the teacher data storage unit 121, and inputs the teacher data group to the preprocessing unit 13 (S101).

続いて、前処理部13は、入力された教師データ群を、単位時間ごとの集合に分割する(S102)。なお、教師データ記憶部121には、単位時間×Uの期間(学習期間)分の教師データが記憶されていることとする。したがって、教師データ群は、U個の集合に分割される。   Subsequently, the preprocessing unit 13 divides the input teacher data group into sets for each unit time (S102). The teacher data storage unit 121 stores teacher data for a unit time × U period (learning period). Therefore, the teacher data group is divided into U sets.

続いて、前処理部13は、分割された集合ごとに、目的に応じた特徴量を抽出し、抽出された特徴量を各次元の要素とする多次元数値ベクトルを生成する(S103)。   Subsequently, the preprocessing unit 13 extracts a feature amount according to the purpose for each divided set, and generates a multidimensional numerical vector having the extracted feature amount as an element of each dimension (S103).

例えば、単位時間が1分で、前処理部13が、1分間ごとの特徴量を抽出するとする。また、特徴量を、各プロトコル(TCP、UDP)の全送信バイト数であるとする。この場合、先頭の教師データのフロー開始時刻が12:00:00であるとすると、前処理部13は、全教師データのうち、フロー開始時刻tが11:59:00<=t<12:00:00であるような教師データ(フローデータ)の集合について、プロトコルがTCPである全フローの全送信バイト数、プロトコルがUDPである全フローの全送信バイト数等を計算し、それらの特徴量を各次元の要素とする2次元数値ベクトルを生成する。(U−1)個の他の集合についても同様に、数値ベクトルが生成される。   For example, it is assumed that the unit time is 1 minute, and the preprocessing unit 13 extracts the feature amount every minute. Further, the feature amount is assumed to be the total number of transmitted bytes of each protocol (TCP, UDP). In this case, assuming that the flow start time of the first teacher data is 12:00, the pre-processing unit 13 sets the flow start time t of all the teacher data to 11:55:00 <= t <12: For a set of teacher data (flow data) such as 00:00, the total number of transmitted bytes of all flows whose protocol is TCP, the total number of transmitted bytes of all flows whose protocol is UDP, and the like are calculated. A two-dimensional numerical vector having a quantity as an element of each dimension is generated. Similarly, numerical vectors are generated for (U-1) other sets.

なお、特徴量の属性としては、「TCPかつ送信ポート番号が80」のような組合せとして指定することも可能である。また、各フローが「フロー数:1」のような値を持つと見なせば、各属性を持つフローの総フロー数についても同様に計算し、特徴量としてみなすことが可能である。   Note that the attribute of the feature amount can be specified as a combination such as “TCP and transmission port number 80”. Further, if each flow is considered to have a value such as “number of flows: 1”, the total number of flows of each attribute can be calculated in the same manner and regarded as a feature amount.

続いて、前処理部13は、各数値ベクトルにおける各メトリックi(各次元i)の最大値xmax_iを算出し、算出したxmax_1をパラメータ記憶部122に記憶する(S104)。すなわち、第1の実施の形態において、各メトリックiの最大値xmax_iが、正規化パラメータである。   Subsequently, the preprocessing unit 13 calculates the maximum value xmax_i of each metric i (each dimension i) in each numerical vector, and stores the calculated xmax_1 in the parameter storage unit 122 (S104). That is, in the first embodiment, the maximum value xmax_i of each metric i is a normalization parameter.

ここで、U=3とする。また、ステップS103において生成された数値ベクトルが{{80,20},{90,35},{100,50}}であるとする。これは、或る3分におけるTCPの総送信バイト数及びUDPの総送信バイト数がそれぞれ「TCP:80byte,UDP:20byte」、「TCP:90byte,UDP:35byte」、「TCP:100byte,UDP:50byte」であったことを示す。この場合、これらの数値ベクトルの各メトリックの最大値xmax_iは、{100,50}である(すなわち、xmax_1=100,xmax_2=50である)。   Here, U = 3. Further, it is assumed that the numerical vector generated in step S103 is {{80, 20}, {90, 35}, {100, 50}}. This is because the total number of TCP transmission bytes and the total number of UDP transmission bytes in a certain three minutes are “TCP: 80 bytes, UDP: 20 bytes”, “TCP: 90 bytes, UDP: 35 bytes”, and “TCP: 100 bytes, UDP: "50 bytes". In this case, the maximum value xmax_i of each metric of these numerical vectors is {100, 50} (that is, xmax_1 = 100, xmax_2 = 50).

続いて、前処理部13は、正規化パラメータに基づいて、各数値ベクトルを正規化する(S105)。正規化は、各数値ベクトルのメトリックiの値が最大値xmax_iによって除されることにより行われる。したがって、正規化された数値ベクトルは、{{0.8,0.4},{0.9,0.7},{1,1}}となる。   Subsequently, the preprocessing unit 13 normalizes each numerical vector based on the normalization parameter (S105). Normalization is performed by dividing the value of the metric i of each numerical vector by the maximum value xmax_i. Therefore, the normalized numerical vector is {{0.8, 0.4}, {0.9, 0.7}, {1, 1}}.

続いて、学習部14は、当該数値ベクトルについて学習器を利用して学習する(S106)。学習結果は、学習結果記憶部124に記憶される。   Subsequently, the learning unit 14 learns the numerical vector using a learning device (S106). The learning result is stored in the learning result storage unit 124.

続いて、学習処理制御部12は、学習データ記憶部125に、学習期間分の学習データが記憶(蓄積)されるのを待機する(S107)。すなわち、U個の正規化前の数値ベクトルが学習データ記憶部125に記憶されるまで待機が継続する。なお、学習データ記憶部125には、検知部16によって正常である(異常が発生していない)と判定された数値ベクトルが記憶される。   Subsequently, the learning process control unit 12 waits for the learning data for the learning period to be stored (accumulated) in the learning data storage unit 125 (S107). That is, the standby is continued until U number of numerical vectors before normalization are stored in the learning data storage unit 125. The learning data storage unit 125 stores a numerical vector determined to be normal (no abnormality has occurred) by the detection unit 16.

学習期間分の数値ベクトルが学習データ記憶部125に記憶されると(S107でYes)、学習処理制御部12は、学習データ記憶部125から数値ベクトル群を取得し、当該数値ベクトル群を前処理部13へ入力する(S108)。なお、取得された数値ベクトル群は、学習データ記憶部125から削除される。続いて、当該数値ベクトル群について、ステップS104以降が実行される。したがって、次のステップS105では、新たに計算されるxmax_iに基づいて正規化が行われる。   When the numerical vectors for the learning period are stored in the learning data storage unit 125 (Yes in S107), the learning processing control unit 12 acquires the numerical vector group from the learning data storage unit 125, and preprocesses the numerical vector group. Input to the unit 13 (S108). The acquired numerical vector group is deleted from the learning data storage unit 125. Subsequently, step S104 and subsequent steps are executed for the numerical vector group. Therefore, in the next step S105, normalization is performed based on the newly calculated xmax_i.

図5は、第1の実施の形態における検知処理の処理手順の一例を説明するためのフローチャートである。図5の処理手順は、図4のステップS106が少なくとも1回実行された後であれば、いつ開始されてもよい。すなわち、図5の処理手順は、図4の処理手順と並行して実行される。   FIG. 5 is a flowchart for explaining an example of the processing procedure of the detection processing in the first embodiment. The processing procedure in FIG. 5 may be started any time after step S106 in FIG. 4 has been executed at least once. That is, the processing procedure of FIG. 5 is executed in parallel with the processing procedure of FIG.

ステップS201において、検知処理制御部15は、単位時間の経過を待機する。当該単位時間は、図4の説明における単位時間と同じ時間長である。この待機中に、リアルタイムに収集され、受信部11によって受信された観測データは観測データ記憶部123に記憶される
単位時間が経過すると(S201でYes)、検知処理制御部15は、直近の単位時間分の観測データ群を観測データ記憶部123から取得し、当該観測データ群を前処理部13へ入力する(S202)。
In step S201, the detection processing control unit 15 waits for the unit time to elapse. The unit time is the same length as the unit time in the description of FIG. During this standby, the observation data collected in real time and received by the receiving unit 11 is stored in the observation data storage unit 123. When the unit time has elapsed (Yes in S201), the detection processing control unit 15 The observation data group for the time is acquired from the observation data storage unit 123, and the observation data group is input to the preprocessing unit 13 (S202).

続いて、前処理部13は、当該観測データ群から目的に応じた特徴量を抽出し、抽出された特徴量を各次元の要素とする多次元数値ベクトルを生成する(S203)。例えば、プロトコルがTCPである全フローの全送信バイト数、プロトコルがUDPである全フローの全送信バイト数が抽出され、これらを各次元の要素とする2次元数値ベクトルが生成される。ここでは、1つの数値ベクトルが生成される。   Subsequently, the preprocessing unit 13 extracts a feature amount according to the purpose from the observation data group, and generates a multidimensional numerical vector having the extracted feature amount as an element of each dimension (S203). For example, the total number of transmitted bytes of all flows whose protocol is TCP and the total number of transmitted bytes of all flows whose protocol is UDP are extracted, and a two-dimensional numerical vector having these as elements of each dimension is generated. Here, one numerical vector is generated.

続いて、前処理部13は、生成された数値ベクトルを、パラメータ記憶部122に記憶されている最大値xmax_iに基づいて正規化する(S204)。すなわち、当該数値ベクトルの各メトリックiが、最大値xmax_iによって除算される。   Subsequently, the preprocessing unit 13 normalizes the generated numerical vector based on the maximum value xmax_i stored in the parameter storage unit 122 (S204). That is, each metric i of the numeric vector is divided by the maximum value xmax_i.

例えば、図4のステップS104が上記の教師データに基づいて1回のみ実行されている場合、最大値xmax_iは、{100,50}である。したがって、当該数値ベクトルが{60,40}である場合、当該数値ベクトルは、{0.6,0.8}に正規化される。   For example, when step S104 of FIG. 4 is executed only once based on the teacher data, the maximum value xmax_i is {100, 50}. Therefore, when the numerical vector is {60, 40}, the numerical vector is normalized to {0.6, 0.8}.

続いて、検知部16は、異常判定処理を実行する(S205)。異常判定処理では、正規化された数値ベクトルについて、学習結果記憶部124に記憶されている最新の学習結果との違いが異常度として算出される。当該異常度を閾値と比較することによって、ネットワークN1について異常の有無が判定される。検知部16は、判定した異常の有無(すなわち、検知有無)と、算出された異常度とを検知結果記憶部126に記憶する。   Subsequently, the detection unit 16 executes an abnormality determination process (S205). In the abnormality determination process, the difference between the normalized numerical vector and the latest learning result stored in the learning result storage unit 124 is calculated as the degree of abnormality. By comparing the degree of abnormality with a threshold value, it is determined whether there is an abnormality in the network N1. The detection unit 16 stores the determined presence / absence of abnormality (that is, detection presence / absence) and the calculated degree of abnormality in the detection result storage unit 126.

異常が無いと判定された場合(S206でYes)、検知処理制御部15は、当該数値ベクトルの正規化前の数値ベクトルを、学習データとして学習データ記憶部125に記憶する(S207)。異常が有ると判定された場合(S206でNo)、当該数値ベクトルの正規化前の数値ベクトルは、学習データ記憶部125に記憶されない。したがって、学習データ記憶部125には、正常時の数値ベクトルのみが記憶される。   When it is determined that there is no abnormality (Yes in S206), the detection processing control unit 15 stores the numerical vector before normalization of the numerical vector in the learning data storage unit 125 as learning data (S207). When it is determined that there is an abnormality (No in S206), the numerical vector before normalization of the numerical vector is not stored in the learning data storage unit 125. Therefore, the learning data storage unit 125 stores only normal numerical vectors.

続いて、ステップS201以降が繰り返される。なお、ステップS201以降が繰り返される過程において、ステップS204で利用される正規化パラメータは、並行して実行されている図4のステップS104において随時更新される。その結果、入力される観測データのトレンドを考慮して数値ベクトルを正規化することができる。   Subsequently, step S201 and subsequent steps are repeated. Note that, in the process of repeating step S201 and subsequent steps, the normalization parameter used in step S204 is updated as needed in step S104 of FIG. 4 being executed in parallel. As a result, the numerical vector can be normalized in consideration of the trend of the input observation data.

例えば、U=3である場合、ステップS207が3回実行されて、{{60,40},{45,20},{30,30}}が学習データ記憶部125に記憶されたとする。この場合、xmax_1=60、xmax_2=40に更新され、更新結果がパラメータ記憶部122に反映される。   For example, when U = 3, step S207 is executed three times, and {{60, 40}, {45, 20}, {30, 30}} is stored in the learning data storage unit 125. In this case, it is updated to xmax_1 = 60 and xmax_2 = 40, and the update result is reflected in the parameter storage unit 122.

なお、上記では、観測データがフローデータである例について説明したが、フローデータ、MIBデータ、及びCPU使用率が並列的に観測データとして受信されてもよい。この場合、図4及び図5の処理手順の各ステップでは、データ種別ごと(フローデータ、MIBデータ、及びCPU使用率ごと)に実行されればよい。   In the above description, an example in which the observation data is flow data has been described. However, flow data, MIB data, and a CPU usage rate may be received in parallel as observation data. In this case, each step of the processing procedure of FIGS. 4 and 5 may be executed for each data type (flow data, MIB data, and CPU usage rate).

なお、例えば{hostID,interfaceID,ibps,obps}のような形式で与えられるMIBデータについては、「単位時間におけるホストIDaのibps」、「単位時間におけるホストIDaのobps」、「単位時間におけるホストIDbのibps」、「単位時間におけるホストIDbのobps」...「単位時間におけるinterfaceIDxのibps」、「単位時間におけるinterfaceIDxのobps」、「単位時間におけるinterfaceIDyのibps」、「単位時間におけるinterfaceIDyのobps」のように、数値ベクトルを抽出することが可能である。   For example, for MIB data given in a format such as {hostID, interfaceID, ibps, obsps}, “host IDa ibps in unit time”, “host IDa obsps in unit time”, “host IDb in unit time” Ibps of host IDb in unit time "..." interfaces IDx ibs in unit time "," interfaceIDx obsps in unit time "," interfaceIDy ibps in unit time "," interfaceIDy obsps in unit time " It is possible to extract a numerical vector like

続いて、図4のステップS106及び図5のステップS205の一例について説明する。ステップS106及びS205では、データ種別がラベルとして付与された数値ベクトル群が学習部14又は検知部16に入力される。本実施の形態において、ラベルは「フローデータ」、「MIBデータ」、及び「CPU使用率」のいずれかである。ラベルは、例えば、測定装置20又は受信部11によって教師データ及び観測データに付与される。すなわち、観測データの採取元に基づいて当該観測データに付与すべきラベルが特定可能である。当該ラベルは、前処理部13によって生成される数値ベクトルに引き継がれる。   Next, an example of step S106 in FIG. 4 and step S205 in FIG. 5 will be described. In steps S <b> 106 and S <b> 205, a numerical vector group assigned with the data type as a label is input to the learning unit 14 or the detection unit 16. In the present embodiment, the label is any one of “flow data”, “MIB data”, and “CPU usage rate”. For example, the label is given to the teacher data and the observation data by the measuring device 20 or the receiving unit 11. That is, the label to be given to the observation data can be specified based on the observation data collection source. The label is inherited by a numerical vector generated by the preprocessing unit 13.

図4のステップS106において、学習部14は、データ種別ごとに学習器を生成する。学習部14は、入力される数値ベクトルに付与されているラベルに基づいて数値ベクトルを分類し、分類結果に対応する学習器へ当該数値ベクトルを入力する。本実施の形態では「フローデータの学習器」、「MIBデータの学習器」、「CPU使用率の学習器」が生成される。学習器としては数値ベクトルのメトリック間の相関関係の学習による異常検知を行うオートエンコーダや主成分分析等を用いることができる。オートエンコーダについては、例えば、「櫻田 麻由・矢入 健久,"オートエンコーダを用いた次元削減による宇宙機の異常検知", 人工知能学会全国大会論文集 28, 1-3, 2014」に詳しい。主成分分析については、例えば、「Ringberg, Haakon, et al. "Sensitivity of PCA for traffic anomaly detection." ACM SIGMETRICS Performance Evaluation Review 35.1 (2007): 109-120.」に詳しい。本実施の形態では、学習器にオートエンコーダを用いる例について説明する。   In step S106 of FIG. 4, the learning unit 14 generates a learning device for each data type. The learning unit 14 classifies the numerical vector based on the label given to the input numerical vector, and inputs the numerical vector to the learning device corresponding to the classification result. In the present embodiment, a “flow data learning device”, a “MIB data learning device”, and a “CPU usage rate learning device” are generated. As a learning device, it is possible to use an auto encoder, principal component analysis, or the like that performs abnormality detection by learning a correlation between numerical vector metrics. For more information on auto-encoders, refer to “Mayumi Kajita and Takehisa Yairi,“ Detection of spacecraft anomalies by dimension reduction using auto-encoders ”, Proceedings of the Japanese Society for Artificial Intelligence 28, 1-3, 2014”. The principal component analysis is detailed in, for example, “Ringberg, Haakon, et al.“ Sensitivity of PCA for traffic anomaly detection. ”ACM SIGMETRICS Performance Evaluation Review 35.1 (2007): 109-120. In this embodiment, an example in which an auto encoder is used as a learning device will be described.

図6は、オートエンコーダを説明するための図である。オートエンコーダは、ディープラーニングによる異常検知アルゴリズムである。オートエンコーダは、正常時の入力データがメトリック間で相関関係を持ち、低次元に圧縮可能であることを利用する。異常時には入力データの相関関係が崩れるため、圧縮が正しく行われず入力データと出力データとの差が大きくなる。   FIG. 6 is a diagram for explaining the auto encoder. The auto encoder is an anomaly detection algorithm based on deep learning. The auto encoder utilizes the fact that the input data at normal time has a correlation between metrics and can be compressed to a low dimension. Since the correlation between the input data is lost at the time of abnormality, the compression is not performed correctly, and the difference between the input data and the output data becomes large.

図6の(1)に示されるように、学習部14が生成する学習器(オートエンコーダ)は、出力層(Layer L)が入力層(Layer L)に近くなるように学習を行う。具体的には、学習部14は、数値ベクトルを2つに複製し、一方を入力層へ当てはめ、他方を出力層に当てはめて学習を行い、学習結果を出力する。学習結果は、学習結果記憶部124に記憶される。学習結果は、学習器に対するパラメータ群である。なお、学習器は、データ種別ごとに生成されるため、学習結果もデータ種別ごとに出力され、学習結果記憶部124に記憶される。 As shown in (1) of FIG. 6, the learning device (auto encoder) generated by the learning unit 14 performs learning so that the output layer (Layer L 3 ) is close to the input layer (Layer L 1 ). Specifically, the learning unit 14 duplicates the numerical vector, applies one to the input layer, applies the other to the output layer, performs learning, and outputs a learning result. The learning result is stored in the learning result storage unit 124. The learning result is a parameter group for the learning device. Since learning devices are generated for each data type, learning results are also output for each data type and stored in the learning result storage unit 124.

一方、検知部16も、学習部14と同様に、データ種別ごとに学習器を生成する。当該学習器には、学習部14によって生成される学習器と同様にオートエンコーダ又は主成分分析等のうち、学習部14が生成する学習器に対応する方法を用いることができる。   On the other hand, similarly to the learning unit 14, the detection unit 16 also generates a learning device for each data type. As the learning device, a method corresponding to the learning device generated by the learning unit 14 in the auto encoder, the principal component analysis, or the like can be used as in the learning device generated by the learning unit 14.

図5のステップS205において、検知部16は、学習結果記憶部124に記憶されている学習結果に基づいて、「フローデータの学習器」、「MIBデータの学習器」、「CPU使用率の学習器」を生成する。すなわち、検知部16によって生成される学習器は、当該学習結果の出力時において学習部14によって生成された学習器と同じである。検知部16は、図6の(2)に示されるように、ステップS205において入力されたデータ種別ごとの数値ベクトルを当該数値ベクトルのデータ種別に対応する学習器へ入力し、学習器に対する入力データと出力データとの距離(メトリック間の相関関係の崩れの程度を示す指標)を異常度として計算する。本実施の形態ではオートエンコーダの入力層と出力層との距離である平均二乗誤差(MSE:Mean Squared Error)が異常度として計算される。MSEの計算式は、以下の通りである。   In step S205 in FIG. 5, the detection unit 16 performs “flow data learning device”, “MIB data learning device”, and “CPU usage rate learning” based on the learning result stored in the learning result storage unit 124. Is created. That is, the learning device generated by the detection unit 16 is the same as the learning device generated by the learning unit 14 when the learning result is output. As shown in (2) of FIG. 6, the detection unit 16 inputs the numerical vector for each data type input in step S205 to a learning device corresponding to the data type of the numerical vector, and inputs data to the learning device. The distance between the output data and the output data (an index indicating the degree of collapse of the correlation between metrics) is calculated as the degree of abnormality. In the present embodiment, a mean squared error (MSE) that is a distance between the input layer and the output layer of the auto encoder is calculated as the degree of abnormality. The calculation formula of MSE is as follows.

Figure 2018148350
本実施の形態では、フローデータのMSE、MIBデータのMSE、CPU使用率のMSEの3種のMSEが得られる。検知部16は、得られたMSEの平均を、最終的な異常度として計算し、最終的な異常度が予め定められた閾値を超えていた場合に異常であると判定する。そうでない場合、検知部16は、正常とであると判定する。
Figure 2018148350
In the present embodiment, three types of MSEs are obtained: MSE for flow data, MSE for MIB data, and MSE for CPU usage. The detection unit 16 calculates the average of the obtained MSEs as the final abnormality degree, and determines that the abnormality is abnormal when the final abnormality degree exceeds a predetermined threshold. Otherwise, the detection unit 16 determines that it is normal.

図7は、第1の実施の形態における閾値決定処理の処理手順の一例を説明するためのフローチャートである。図7の処理手順は、異常発生情報取得部17によって異常記録装置30から取得された異常発生時刻が異常発生情報記憶部127に記憶されており、図5のステップS205が少なくとも1回実行された後であれば、いつ開始されてもよい。すなわち、図7の処理手順は、図5の処理手順と並行して実行される。   FIG. 7 is a flowchart for explaining an example of the processing procedure of the threshold value determination process in the first embodiment. In the processing procedure of FIG. 7, the abnormality occurrence time acquired from the abnormality recording device 30 by the abnormality occurrence information acquisition unit 17 is stored in the abnormality occurrence information storage unit 127, and step S205 of FIG. 5 is executed at least once. It can be started at any time later. That is, the processing procedure of FIG. 7 is executed in parallel with the processing procedure of FIG.

閾値決定部18は、単位時間ごとに、異常発生情報記憶部127に記憶されている異常発生時刻と、検知結果記憶部126に記憶されている検知有無とを集計する(S301)。例えば、11:59:00<=t<12:00:00に異常発生時刻が存在しない場合、異常無しとし、11:59:00<=t<12:00:00に異常が検知されなかった場合、検知無しとし、以下のように異常有無及び検知有無を集計する。
時間 異常有無 検知有無
12:00 0 0
12:01 1 0
12:02 0 1
12:03 1 1
・・・
ここで、1は異常有り、検知有りを示し、0は異常無し、検知無しを示す。上記の例では、12:01に異常が発生したにもかかわらず検知部16が異常の発生を検知できなかったため、見逃しであると判断できる。また、12:02に異常が発生していないにもかかわらず検知部16が異常の発生を検知したため、誤検知であると判断できる。見逃しは閾値が高いことから生じ、誤検知は閾値が低いことから生じるため、閾値決定部18は、誤検知が発生した場合には閾値を増加させ、見逃しが発生した場合には、閾値を減少させる。
The threshold value determination unit 18 totals the abnormality occurrence time stored in the abnormality occurrence information storage unit 127 and the presence / absence of detection stored in the detection result storage unit 126 for each unit time (S301). For example, if there is no abnormality occurrence time at 11:55:00 <= t <12:00, no abnormality is detected, and no abnormality is detected at 11:55:00 <= t <12:00 If there is no detection, the presence / absence of abnormality and the presence / absence of detection are totaled as follows.
Time Abnormality presence / absence Detection presence / absence 12:00 0 0
12:01 1 0
12:02 0 1
12:03 1 1
...
Here, 1 indicates that there is an abnormality and detection is present, and 0 indicates that there is no abnormality and no detection. In the above example, since the detection unit 16 could not detect the occurrence of the abnormality even though an abnormality occurred at 12:01, it can be determined that it is overlooked. Moreover, since the detection part 16 has detected the occurrence of an abnormality even though no abnormality has occurred at 12:02, it can be determined that it is a false detection. Since an oversight occurs because the threshold is high and an erroneous detection occurs because the threshold is low, the threshold value determination unit 18 increases the threshold value when an erroneous detection occurs, and decreases the threshold value when an oversight occurs. Let

具体的には、閾値決定部18は、異常有無及び検知有無の集計結果から、誤検知の回数n_1及び見逃しの回数n_2を計算する(S302)。12:00〜12:03までの集計結果では、n_1=1,n_2=1として計算される。ここで、誤検知の回数が多いほど、閾値の増加量は大きくすべきであり、見逃しの回数が多いほど、閾値の減少量は小さくすべきである。例えば、現在の閾値をθ_0とすると、新たに適用する閾値θは以下のように決定される。   Specifically, the threshold value determination unit 18 calculates the number of false detections n_1 and the number of misses n_2 from the total results of the presence / absence of abnormality and the presence / absence of detection (S302). In the aggregation results from 12: 00 to 12: 03, the calculation is performed as n_1 = 1 and n_2 = 1. Here, the greater the number of false detections, the greater the increase in the threshold value, and the greater the number of misses, the smaller the decrease in the threshold value. For example, if the current threshold value is θ_0, the newly applied threshold value θ is determined as follows.

θ=θ_0+n_1*Δθ−n_2*Δθ
ここで、Δθは閾値の増減量(n_1*Δθ−n_2*Δθ)を求めるためのパラメータである。このパラメータΔθが大きすぎる場合、閾値θが大きく変動し、誤検知又は見逃しの可能性が高くなることが考えられる。
θ = θ_0 + n_1 * Δθ−n_2 * Δθ
Here, Δθ is a parameter for obtaining the increase / decrease amount of the threshold (n_1 * Δθ−n_2 * Δθ). If this parameter Δθ is too large, the threshold θ may fluctuate greatly, and the possibility of false detection or oversight may increase.

このため、閾値決定部18は、一定期間分の誤検知の回数及び見逃しの回数の計算が終了した場合(S303でYes)、誤検知の回数n_1の標準偏差σ_1及び見逃しの回数n_2の標準偏差σ_2を計算する(S304)。   Therefore, when the calculation of the number of false detections and the number of misses for a certain period is completed (Yes in S303), the threshold determination unit 18 standard deviation σ_1 of the number of false detections n_1 and the standard deviation of the number of misses n_2. σ_2 is calculated (S304).

予め決められた増減量を求めるためのパラメータをΔθ_0とすると、新たに適用するパラメータΔθは、σ_1及びσ_2に基づいて以下のように計算される(S305)。   Assuming that a parameter for obtaining a predetermined increase / decrease amount is Δθ_0, a newly applied parameter Δθ is calculated as follows based on σ_1 and σ_2 (S305).

Δθ=Δθ_0*(1/σ_1)*(1/σ_2)
なお、Δθを上記のように動的に変化させずに、予め決められた固定値、試行錯誤的に得られた固定値等としてもよい。
Δθ = Δθ — 0 * (1 / σ_1) * (1 / σ_2)
Note that Δθ may be a fixed value determined in advance, a fixed value obtained through trial and error, or the like, without dynamically changing as described above.

閾値決定部18は、上記のΔθ、n_1、n_2を用いて、閾値の増減量(n_1*Δθ−n_2*Δθ)を計算し、新たに適用する閾値θを決定する(S306)。   The threshold value determination unit 18 calculates an increase / decrease amount of the threshold value (n_1 * Δθ−n_2 * Δθ) using Δθ, n_1, and n_2, and determines a threshold value θ to be newly applied (S306).

上述したように、第1の実施の形態によれば、閾値の初期値が自動的に適切な閾値に更新される。また、誤検知の回数及び見逃しの回数により適切な閾値の増減量が決定され、誤検知及び見逃しを少なくすることができる。   As described above, according to the first embodiment, the initial threshold value is automatically updated to an appropriate threshold value. In addition, an appropriate threshold increase / decrease amount is determined based on the number of false detections and the number of misses, thereby reducing false detections and misses.

次に、第2の実施の形態について説明する。第2の実施の形態では第1の実施の形態と異なる点について説明する。第2の実施の形態において特に言及されない点については、第1の実施の形態と同様でもよい。   Next, a second embodiment will be described. In the second embodiment, differences from the first embodiment will be described. Points that are not particularly mentioned in the second embodiment may be the same as those in the first embodiment.

第2の実施の形態では、検知部16によって算出された異常度の分布から閾値θを決定する。   In the second embodiment, the threshold value θ is determined from the distribution of the degree of abnormality calculated by the detection unit 16.

図8は、第2の実施の形態における閾値決定処理の処理手順の一例を説明するためのフローチャートである。図8の処理手順は、異常発生情報取得部17によって異常記録装置30から取得された異常発生時刻が異常発生情報記憶部127に記憶されており、図5のステップS205が少なくとも1回実行された後であれば、いつ開始されてもよい。すなわち、図8の処理手順は、図5の処理手順と並行して実行される。   FIG. 8 is a flowchart for explaining an example of a processing procedure of threshold determination processing according to the second embodiment. In the processing procedure of FIG. 8, the abnormality occurrence time acquired from the abnormality recording device 30 by the abnormality occurrence information acquisition unit 17 is stored in the abnormality occurrence information storage unit 127, and step S205 of FIG. 5 is executed at least once. It can be started at any time later. That is, the processing procedure of FIG. 8 is executed in parallel with the processing procedure of FIG.

閾値決定部18は、異常発生情報記憶部127に記憶されている異常発生時刻を参照して、異常が発生していない時間帯において、検知結果記憶部126に記憶されている異常度x_1,・・・,x_N(N:正常時において算出された異常度の数)を取得する(S401)。すなわち、閾値決定部18は、正常時に算出された異常度x_1,・・・,x_Nを取得する。なお、正常時の異常度x_1,・・・,x_Nは、教師データ記憶部121に記憶されている教師データ又は学習データ記憶部125に記憶されている学習データを検知部16に入力することにより求められてもよい。   The threshold value determination unit 18 refers to the abnormality occurrence time stored in the abnormality occurrence information storage unit 127, and the abnormality degree x_1,... Stored in the detection result storage unit 126 in the time zone when no abnormality has occurred. ..., X_N (N: the number of abnormalities calculated in the normal state) is acquired (S401). That is, the threshold value determination unit 18 acquires the abnormalities x_1,..., X_N calculated at the normal time. The abnormalities x_1,..., X_N at normal time are obtained by inputting the teacher data stored in the teacher data storage unit 121 or the learning data stored in the learning data storage unit 125 to the detection unit 16. It may be sought.

閾値決定部18は、異常度x_1,・・・,x_Nの平均μ及び標準偏差σを計算する(S402)。   The threshold value determination unit 18 calculates the average μ and the standard deviation σ of the abnormalities x_1,..., X_N (S402).

閾値決定部18は、正常時の異常度の分布からの外れ度合いを定義し、外れ度合いに基づいて閾値θを決定する(S403)例えば、観測データが入力されたときに検知部16が算出した異常度が正常時の平均+3σを超えた場合に、その観測データは異常であるとみなし、異常度の閾値θをθ=μ+3σとして決定する。   The threshold value determination unit 18 defines the degree of deviation from the distribution of the degree of abnormality at normal time, and determines the threshold θ based on the degree of deviation (S403). For example, the detection unit 16 calculates when observation data is input. When the degree of abnormality exceeds the normal average of + 3σ, the observation data is regarded as abnormal, and the threshold θ of the degree of abnormality is determined as θ = μ + 3σ.

上述したように、第2の実施の形態によれば、正常時のデータから閾値が自動的に決定される。なお、第2の実施の形態において決定された閾値θは、第1の実施の形態において閾値の初期値θ_0として使用することも可能である。   As described above, according to the second embodiment, the threshold value is automatically determined from the normal data. Note that the threshold value θ determined in the second embodiment can be used as the initial value θ_0 of the threshold value in the first embodiment.

第3の実施の形態では、検知部16によって検知された異常の検知精度が目標値を満足するように、閾値θを決定する。異常の検知精度としては、precision、recall又はF値等が存在する。precisionは異常と検知したもののうち実際に異常であったものの割合であり、誤検知の少なさに相当する。recallは本質的に異常であるもののうち異常と検知できたものの割合であり、見逃しの少なさに相当する。F値は、precisionとrecallの調和平均である。   In the third embodiment, the threshold θ is determined so that the detection accuracy of the abnormality detected by the detection unit 16 satisfies the target value. As the abnormality detection accuracy, there are a precision, a recall, an F value, and the like. “Precision” is a ratio of those actually detected out of those detected as abnormal, and corresponds to a small number of false detections. “recall” is a ratio of those which are abnormal in nature and detected as abnormal, and corresponds to a small amount of oversight. The F value is a harmonic average of the precision and the recall.

図9は、第3の実施の形態における閾値決定処理の処理手順の一例を説明するためのフローチャートである。図9の処理手順は、異常発生情報取得部17によって異常記録装置30から取得された異常発生時刻が異常発生情報記憶部127に記憶されており、図5のステップS205が少なくとも1回実行された後であれば、いつ開始されてもよい。すなわち、図9の処理手順は、図5の処理手順と並行して実行される。   FIG. 9 is a flowchart for explaining an example of a processing procedure of threshold value determination processing according to the third embodiment. In the processing procedure of FIG. 9, the abnormality occurrence time acquired from the abnormality recording device 30 by the abnormality occurrence information acquisition unit 17 is stored in the abnormality occurrence information storage unit 127, and step S205 of FIG. 5 is executed at least once. It can be started at any time later. That is, the processing procedure of FIG. 9 is executed in parallel with the processing procedure of FIG.

閾値決定部18は、検知結果記憶部126に記憶されている単位時間ごとの異常度の時系列x_1,・・・,x_Tを取得し、異常発生情報記憶部127に記憶されている異常発生時刻を取得する(S501)。ステップS301と同様に、時間tにおいて異常有りの場合、b_t=1とし、異常無しの場合b_t=0として、異常有無の時系列b_1,・・・,b_Tを生成する。   The threshold value determination unit 18 acquires time series x_1,..., X_T of the degree of abnormality for each unit time stored in the detection result storage unit 126, and the abnormality occurrence time stored in the abnormality occurrence information storage unit 127. Is acquired (S501). As in step S301, when there is an abnormality at time t, b_t = 1 is set, and when there is no abnormality, b_t = 0 is set, and time series b_1,.

目的とする精度のメトリックをrecallとし、recallが目標値rを満足する最大の閾値を採用する場合を考える。この場合、時間t=1,・・・,Tにおいて検知する必要のある異常の数mはm=r*Σ_{t=1,・・・,T}b_tとして計算できる(S502)。   Let us consider a case where the metric having the target accuracy is set to “recall” and the maximum threshold value at which “recall” satisfies the target value “r” is adopted. In this case, the number m of abnormalities that need to be detected at time t = 1,..., T can be calculated as m = r * Σ_ {t = 1,..., T} b_t (S502).

したがって、閾値決定部18は、異常が発生した時刻の異常度{x_t|b_t=1 for t=1,・・・,T}を降順に並べた場合のm番目の値を、閾値θとして決定すればよい(S503)。   Therefore, the threshold value determination unit 18 determines the m-th value when the abnormality levels {x_t | b_t = 1 for t = 1,..., T} at the time when the abnormality occurs are arranged in descending order as the threshold value θ. (S503).

なお、目的とする精度のメトリックがprecision又はF値である場合、閾値の初期値を0として、閾値を徐々に大きくしながらprecision又はF値を計算して、計算されたprecision又はF値が目標値を満足するときの閾値を採用することができる。   When the target accuracy metric is a precision or F value, the initial value of the threshold is set to 0, the precision or F value is calculated while gradually increasing the threshold, and the calculated precision or F value is the target. A threshold value when the value is satisfied can be adopted.

上述したように、第3の実施の形態によれば、異常の検知データの目標値を満たす閾値が自動的に決定される。なお、第3の実施の形態において決定された閾値θは、第1の実施の形態において閾値の初期値θ_0として使用することも可能である。   As described above, according to the third embodiment, the threshold value that satisfies the target value of the abnormality detection data is automatically determined. Note that the threshold value θ determined in the third embodiment can also be used as the initial value θ_0 of the threshold value in the first embodiment.

なお、上記各実施の形態は、ネットワーク以外から収集されるデータに関して適用されてもよい。例えば、コンピュータシステムから収集されるデータに関して上記各実施の形態が適用されてもよい。   Each of the above embodiments may be applied to data collected from other than the network. For example, the above-described embodiments may be applied to data collected from a computer system.

なお、上記各実施の形態において、異常検知装置10は、閾値決定装置の一例である。異常発生情報取得部17は、取得部の一例である。   In each of the above embodiments, the abnormality detection device 10 is an example of a threshold value determination device. The abnormality occurrence information acquisition unit 17 is an example of an acquisition unit.

以上、本発明の実施例について詳述したが、本発明は斯かる特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。   As mentioned above, although the Example of this invention was explained in full detail, this invention is not limited to such specific embodiment, In the range of the summary of this invention described in the claim, various deformation | transformation・ Change is possible.

10 異常検知装置
11 受信部
12 学習処理制御部
13 前処理部
14 学習部
15 検知処理制御部
16 検知部
17 異常発生情報取得部
18 閾値決定部
20 測定装置
30 異常記録装置
100 ドライブ装置
101 記録媒体
102 補助記憶装置
103 メモリ装置
104 CPU
105 インタフェース装置
121 教師データ記憶部
122 パラメータ記憶部
123 観測データ記憶部
124 学習結果記憶部
125 学習データ記憶部
126 検知結果記憶部
127 異常発生情報記憶部
B バス
N1 ネットワーク
DESCRIPTION OF SYMBOLS 10 Abnormality detection apparatus 11 Receiving part 12 Learning process control part 13 Preprocessing part 14 Learning part 15 Detection process control part 16 Detection part 17 Abnormality generation information acquisition part 18 Threshold value determination part 20 Measuring apparatus 30 Abnormal recording apparatus 100 Drive apparatus 101 Recording medium 102 Auxiliary storage device 103 Memory device 104 CPU
105 interface device 121 teacher data storage unit 122 parameter storage unit 123 observation data storage unit 124 learning result storage unit 125 learning data storage unit 126 detection result storage unit 127 abnormality occurrence information storage unit B bus N1 network

Claims (8)

異常の検知対象から収集されたデータを学習した学習結果と、テスト期間において異常の検知対象から観測されたデータとに基づいて異常度を算出し、当該異常度を閾値と比較することで異常の発生を検知する検知部と、
異常の見逃し及び誤検知の有無に基づいて前記閾値を決定する閾値決定部と、
を有する閾値決定装置。
Calculate the degree of abnormality based on the learning result of learning the data collected from the abnormality detection target and the data observed from the abnormality detection target during the test period, and compare the abnormality degree with the threshold value. A detection unit for detecting occurrence;
A threshold value determination unit that determines the threshold value based on whether there is an oversight of an abnormality and a false detection;
A threshold value determination device.
前記閾値決定部は、誤検知が発生した場合には、前記閾値を増加させ、見逃しが発生した場合には、前記閾値を減少させる、請求項1に記載の閾値決定装置。   The threshold value determination device according to claim 1, wherein the threshold value determination unit increases the threshold value when an erroneous detection occurs and decreases the threshold value when an oversight occurs. 前記閾値決定部は、誤検知の回数及び誤検知の回数の標準偏差と、見逃しの回数及び見逃しの回数の標準偏差に基づいて、前記閾値の増減量を計算する、請求項1又は2に記載の閾値決定装置。   The threshold value determination unit calculates the increase / decrease amount of the threshold value based on the number of false detections, the standard deviation of the number of false detections, and the standard deviation of the number of misses and the number of misses. Threshold determination device. 前記閾値決定部は、異常が検出されないときに前記検知部によって算出された異常度の分布からの外れ度合に基づいて、前記閾値を決定する、請求項1乃至3のうちいずれか1項に記載の閾値決定装置。   4. The threshold value determination unit according to claim 1, wherein the threshold value determination unit determines the threshold value based on a degree of deviation from the distribution of the degree of abnormality calculated by the detection unit when no abnormality is detected. 5. Threshold determination device. 異常の検知対象において異常が発生した異常発生時刻を取得する取得部を更に有し、
前記閾値決定部は、前記異常発生時刻に基づいて、前記検知部によって検知された異常の検知精度が目標値を満足するように、前記閾値を決定する、請求項1乃至3のうちいずれか1項に記載の閾値決定装置。
It further has an acquisition unit for acquiring an abnormality occurrence time when an abnormality has occurred in an abnormality detection target,
4. The threshold value determination unit according to claim 1, wherein the threshold value determination unit determines the threshold value based on the abnormality occurrence time so that the detection accuracy of the abnormality detected by the detection unit satisfies a target value. 5. The threshold value determination device according to item.
異常の検知対象において異常が発生した異常発生時刻を取得する取得部を更に有し、
前記閾値決定部は、前記異常発生時刻の時間帯において前記検知部が異常の発生を検知しなかった場合、見逃しであると判断し、前記異常発生時刻の時間帯以外に前記検知部が異常の発生を検知した場合、誤検知であると判断する、請求項1乃至4のうちいずれか1項に記載の閾値決定装置。
It further has an acquisition unit for acquiring an abnormality occurrence time when an abnormality has occurred in an abnormality detection target,
The threshold determination unit determines that the detection unit is overlooked when the detection unit does not detect the occurrence of an abnormality in the time zone of the abnormality occurrence time, and the detection unit is in an abnormal state other than the time zone of the abnormality occurrence time. The threshold value determination apparatus according to any one of claims 1 to 4, wherein when the occurrence is detected, it is determined that the detection is a false detection.
異常の検知対象から収集されたデータを学習した学習結果と、テスト期間において異常の検知対象から観測されたデータとに基づいて異常度を算出し、当該異常度を閾値と比較することで異常の発生を検知する検知手順と、
異常の見逃し及び誤検知の有無に基づいて前記閾値を決定する閾値決定手順と、
をコンピュータが実行する閾値決定方法。
Calculate the degree of abnormality based on the learning result of learning the data collected from the abnormality detection target and the data observed from the abnormality detection target during the test period, and compare the abnormality degree with the threshold value. A detection procedure to detect the occurrence;
A threshold value determination procedure for determining the threshold value based on whether there is an oversight of an abnormality and a false detection;
A threshold determination method in which the computer executes.
請求項1乃至6いずれか一項記載の各部としてコンピュータを機能させるためのプログラム。   The program for functioning a computer as each part as described in any one of Claims 1 thru | or 6.
JP2017040590A 2017-03-03 2017-03-03 Threshold determination device, threshold determination method and program Active JP6564799B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017040590A JP6564799B2 (en) 2017-03-03 2017-03-03 Threshold determination device, threshold determination method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017040590A JP6564799B2 (en) 2017-03-03 2017-03-03 Threshold determination device, threshold determination method and program

Publications (2)

Publication Number Publication Date
JP2018148350A true JP2018148350A (en) 2018-09-20
JP6564799B2 JP6564799B2 (en) 2019-08-21

Family

ID=63592380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017040590A Active JP6564799B2 (en) 2017-03-03 2017-03-03 Threshold determination device, threshold determination method and program

Country Status (1)

Country Link
JP (1) JP6564799B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020175147A1 (en) * 2019-02-28 2020-09-03 日本電信電話株式会社 Detection device and detection program
JP2020154514A (en) * 2019-03-19 2020-09-24 株式会社エヌ・ティ・ティ・データ Learning device, learning method, retrieval device, retrieval method and program
JPWO2020196195A1 (en) * 2019-03-26 2020-10-01
JP2020162055A (en) * 2019-03-27 2020-10-01 富士通株式会社 Information processing method and information processing device
JP2020184239A (en) * 2019-05-09 2020-11-12 三菱電機株式会社 Abnormality detection system
JPWO2020148904A1 (en) * 2019-01-18 2021-11-04 日本電気株式会社 Anomaly detection devices, anomaly detection systems and learning devices, and their methods and programs
US11885720B2 (en) 2019-10-18 2024-01-30 Nec Corporation Time series data processing method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023042945A (en) 2021-09-15 2023-03-28 株式会社東芝 Monitoring device, method, and program

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7173168B2 (en) 2019-01-18 2022-11-16 日本電気株式会社 Anomaly detection device, system, method and program
JPWO2020148904A1 (en) * 2019-01-18 2021-11-04 日本電気株式会社 Anomaly detection devices, anomaly detection systems and learning devices, and their methods and programs
JP2020140580A (en) * 2019-02-28 2020-09-03 日本電信電話株式会社 Detection device and detection program
JP7103274B2 (en) 2019-02-28 2022-07-20 日本電信電話株式会社 Detection device and detection program
WO2020175147A1 (en) * 2019-02-28 2020-09-03 日本電信電話株式会社 Detection device and detection program
JP2020154514A (en) * 2019-03-19 2020-09-24 株式会社エヌ・ティ・ティ・データ Learning device, learning method, retrieval device, retrieval method and program
JPWO2020196195A1 (en) * 2019-03-26 2020-10-01
JP7179159B2 (en) 2019-03-26 2022-11-28 東京エレクトロン株式会社 STATE DETERMINATION DEVICE, STATE DETERMINATION METHOD, COMPUTER-READABLE RECORDING MEDIUM AND PROGRAM
JP2020162055A (en) * 2019-03-27 2020-10-01 富士通株式会社 Information processing method and information processing device
JP7135969B2 (en) 2019-03-27 2022-09-13 富士通株式会社 Information processing method and information processing apparatus
JP2020184239A (en) * 2019-05-09 2020-11-12 三菱電機株式会社 Abnormality detection system
JP7257871B2 (en) 2019-05-09 2023-04-14 三菱電機株式会社 Anomaly detection system
US11885720B2 (en) 2019-10-18 2024-01-30 Nec Corporation Time series data processing method

Also Published As

Publication number Publication date
JP6564799B2 (en) 2019-08-21

Similar Documents

Publication Publication Date Title
JP6564799B2 (en) Threshold determination device, threshold determination method and program
JP6823501B2 (en) Anomaly detection device, anomaly detection method and program
EP3700147A1 (en) System and method for classifying network traffic
US10104124B2 (en) Analysis rule adjustment device, analysis rule adjustment system, analysis rule adjustment method, and analysis rule adjustment program
US7962611B2 (en) Methods, systems and computer program products for detecting flow-level network traffic anomalies via abstraction levels
JP6751168B2 (en) Abnormal factor estimation device, abnormal factor estimation method and program
EP2725512A1 (en) System and method for malware detection using multi-dimensional feature clustering
US20180007578A1 (en) Machine-to-Machine Anomaly Detection
JP6183450B2 (en) System analysis apparatus and system analysis method
US20230018908A1 (en) Feedback-based control system for software defined networks
US9235463B2 (en) Device and method for fault management of smart device
US11677613B2 (en) Root-cause analysis and automated remediation for Wi-Fi authentication failures
WO2020044898A1 (en) Device status monitoring device and program
JP6858798B2 (en) Feature generator, feature generator and program
JP6781776B2 (en) Feature generator, feature generator and program
EP3905619A1 (en) System and method for classifying network devices
Muthukumar et al. Denoising internet delay measurements using weak supervision
JP6488197B2 (en) Anomaly detection method, anomaly detection apparatus, and network system
CN107566187B (en) SLA violation monitoring method, device and system
CN112291213A (en) Abnormal flow analysis method and device based on intelligent terminal
US9311210B1 (en) Methods and apparatus for fault detection
US11805034B1 (en) Systems and methods for detecting large network flows
CN117897702A (en) System and method for automatically evaluating quality of network traffic signatures
CN114629695A (en) Network anomaly detection method, device, equipment and medium
Widanapathirana et al. Adaptive Statistical Signatures of Network Soft-Failures in User Devices

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190408

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190423

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190624

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190729

R150 Certificate of patent or registration of utility model

Ref document number: 6564799

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150