JP7011696B1 - Electronics, control methods, and trained models - Google Patents
Electronics, control methods, and trained models Download PDFInfo
- Publication number
- JP7011696B1 JP7011696B1 JP2020170592A JP2020170592A JP7011696B1 JP 7011696 B1 JP7011696 B1 JP 7011696B1 JP 2020170592 A JP2020170592 A JP 2020170592A JP 2020170592 A JP2020170592 A JP 2020170592A JP 7011696 B1 JP7011696 B1 JP 7011696B1
- Authority
- JP
- Japan
- Prior art keywords
- information
- thread
- usage rate
- abnormality
- unit
- 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
- 238000000034 method Methods 0.000 title claims abstract description 88
- 230000005856 abnormality Effects 0.000 claims abstract description 297
- 238000001514 detection method Methods 0.000 claims abstract description 177
- 238000012545 processing Methods 0.000 claims abstract description 111
- 230000008569 process Effects 0.000 claims abstract description 67
- 238000004364 calculation method Methods 0.000 claims abstract description 32
- 238000000605 extraction Methods 0.000 claims abstract description 28
- 239000000284 extract Substances 0.000 claims abstract description 11
- 238000011156 evaluation Methods 0.000 claims description 100
- 238000010801 machine learning Methods 0.000 claims description 40
- 238000010586 diagram Methods 0.000 abstract description 24
- 238000003860 storage Methods 0.000 description 68
- 230000002159 abnormal effect Effects 0.000 description 37
- 230000006870 function Effects 0.000 description 30
- 238000005259 measurement Methods 0.000 description 24
- 238000013528 artificial neural network Methods 0.000 description 22
- 238000004891 communication Methods 0.000 description 22
- 239000011159 matrix material Substances 0.000 description 9
- 230000002787 reinforcement Effects 0.000 description 9
- 230000004913 activation Effects 0.000 description 7
- 238000004422 calculation algorithm Methods 0.000 description 7
- 230000006866 deterioration Effects 0.000 description 7
- 238000012549 training Methods 0.000 description 6
- 230000007958 sleep Effects 0.000 description 5
- 238000013500 data storage Methods 0.000 description 4
- 230000006266 hibernation Effects 0.000 description 4
- 238000012706 support-vector machine Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 238000007637 random forest analysis Methods 0.000 description 3
- 230000007704 transition Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000002547 anomalous effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 238000003066 decision tree Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000009826 distribution Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 238000000342 Monte Carlo simulation Methods 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000001816 cooling Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012417 linear regression Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000007477 logistic regression Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000000306 recurrent effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000026676 system process Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
【課題】実行中の処理の異常を精度よく検出すること。【解決手段】電子機器は、プログラムに基づいて処理を実行するプロセッサと、プロセッサを使用しているスレッドごとのプロセッサの使用率を示す情報を取得する取得部と、取得部が取得した情報に基づいて、プロセッサを使用しているスレッドの合計数に対するプロセッサの使用率が所定範囲であるスレッドの数の割合を示す第1情報を算出する算出部と、取得部が取得した情報に基づいて、プロセッサを使用しているスレッドのうち最も使用されたスレッドである第1スレッドの使用率を示す第2情報を抽出する抽出部と、第1情報と第2情報とに基づいて処理の異常を検出する異常検出部と、を備える。【選択図】図1PROBLEM TO BE SOLVED: To accurately detect an abnormality in a process being executed. An electronic device is based on a processor that executes processing based on a program, an acquisition unit that acquires information indicating the usage rate of the processor for each thread that uses the processor, and information acquired by the acquisition unit. The processor is based on the information acquired by the calculation unit and the acquisition unit, which calculates the first information indicating the ratio of the number of threads whose usage rate of the processor is within the predetermined range to the total number of threads using the processor. The extraction unit that extracts the second information indicating the usage rate of the first thread, which is the most used thread among the threads that are using, and the processing abnormality is detected based on the first information and the second information. It is equipped with an abnormality detection unit. [Selection diagram] Fig. 1
Description
本発明は、電子機器、制御方法、及び学習済みモデルに関する。 The present invention relates to electronic devices, control methods, and trained models.
CPU(Central Processing Unit)などのプロセッサを搭載して処理を実行する電子機器では、実行中の処理が原因となってパフォーマンスの低下などの問題が発生することがある(例えば、特許文献1参照)。 In an electronic device equipped with a processor such as a CPU (Central Processing Unit) to execute processing, problems such as performance deterioration may occur due to the processing being executed (see, for example, Patent Document 1). ..
しかしながら、実行中の処理が異常な状態であるか否かをハードウェアの動作状態などから検出しようとしても、例えばCPUの使用率が高くても単に処理量が多いだけで正常に動作をしている場合もあるため、精度よく検出することが難しかった。 However, even if you try to detect whether or not the processing being executed is in an abnormal state from the operating state of the hardware, for example, even if the CPU usage rate is high, it will operate normally just by a large amount of processing. It was difficult to detect it accurately because it may be present.
本発明は、上記した事情に鑑みてなされたもので、実行中の処理の異常を精度よく検出することができる電子機器、制御方法、及び学習済みモデルを提供することを目的の一つとする。 The present invention has been made in view of the above circumstances, and one of the objects of the present invention is to provide an electronic device, a control method, and a trained model capable of accurately detecting an abnormality in a process being executed.
本発明は上記の課題を解決するためになされたものであり、本発明の第1態様に係る電子機器は、プログラムに基づいて処理を実行するプロセッサと、前記プロセッサを使用しているスレッドごとの前記プロセッサの使用率を示す情報を取得する取得部と、前記取得部が取得した情報に基づいて、前記プロセッサを使用しているスレッドの合計数に対する前記プロセッサの使用率が所定範囲であるスレッドの数の割合を示す第1情報を算出する算出部と、前記取得部が取得した情報に基づいて、前記プロセッサを使用しているスレッドのうち最も使用されたスレッドである第1スレッドの使用率を示す第2情報を抽出する抽出部と、前記第1情報と前記第2情報とに基づいて前記処理の異常を検出する異常検出部と、を備える。 The present invention has been made to solve the above problems, and the electronic device according to the first aspect of the present invention is a processor that executes processing based on a program and a thread that uses the processor. An acquisition unit that acquires information indicating the usage rate of the processor, and a thread whose usage rate of the processor is within a predetermined range with respect to the total number of threads using the processor based on the information acquired by the acquisition unit. Based on the information acquired by the calculation unit that calculates the first information indicating the ratio of the number and the information acquired by the acquisition unit, the usage rate of the first thread, which is the most used thread among the threads using the processor, is calculated. It includes an extraction unit that extracts the second information shown, and an abnormality detection unit that detects an abnormality in the process based on the first information and the second information.
上記電子機器において、前記異常検出部は、以前に取得された前記第1情報、前記第2情報、及び異常の有無に関する情報に基づいて機械学習された学習済みモデルを用いて、前記処理の異常を検出してもよい。 In the electronic device, the abnormality detection unit uses a trained model machine-learned based on the first information, the second information, and information regarding the presence or absence of an abnormality previously acquired, and the abnormality in the processing. May be detected.
上記電子機器において、前記取得部は、前記プロセッサを使用しているスレッドが含まれるアプリケーションを示す情報をさらに取得し、前記抽出部は、前記取得部が取得した情報に基づいて、前記プロセッサを使用しているスレッドの中から前記第1スレッドを含む複数のスレッドの使用率を示す情報を前記第2情報として抽出するとともに、前記第2情報として抽出した複数のスレッドのそれぞれが含まれるアプリケーションを示す第3情報を抽出し前記異常検出部は、前記第1情報と前記第2情報と前記第3情報とに基づいて前記処理の異常を検出してもよい。 In the electronic device, the acquisition unit further acquires information indicating an application including a thread using the processor, and the extraction unit uses the processor based on the information acquired by the acquisition unit. Information indicating the usage rate of a plurality of threads including the first thread is extracted as the second information from the threads, and an application including each of the plurality of threads extracted as the second information is shown. The third information may be extracted and the abnormality detection unit may detect an abnormality in the process based on the first information, the second information, and the third information.
上記電子機器において、前記第1スレッドを含む複数のスレッドの使用率は、前記第1スレッドの使用率と、前記第1スレッドの次に最も使用された第2スレッドの使用率と、前記第2スレッドの次に最も使用された第3スレッドの使用率とを含んでもよい。 In the electronic device, the usage rates of the plurality of threads including the first thread are the usage rate of the first thread, the usage rate of the second thread most used after the first thread, and the second thread. It may include the usage rate of the third most used thread after the thread.
上記電子機器において、前記算出部は、前記第2情報に含まれる複数のスレッド間の使用率の差分を算出し、前記異常検出部は、前記処理の異常を検出する際に、前記第2情報に基づく前記差分に基づく情報をさらに用いて検出してもよい。 In the electronic device, the calculation unit calculates a difference in usage rate between a plurality of threads included in the second information, and the abnormality detection unit calculates the second information when detecting an abnormality in the processing. The information based on the difference based on the above may be further used for detection.
上記電子機器において、前記第3情報に含まれるアプリケーションのそれぞれが同一のアプリケーションであるか否かに基づいて第1評価値を決定する第1評価部をさらに備え、前記異常検出部は、前記処理の異常を検出する際に、前記第3情報に基づく前記第1評価値をさらに用いて検出してもよい。 The electronic device further includes a first evaluation unit that determines a first evaluation value based on whether or not each of the applications included in the third information is the same application, and the abnormality detection unit is the processing. When detecting the abnormality of, the first evaluation value based on the third information may be further used for detection.
上記電子機器において、前記第3情報に含まれるアプリケーションのそれぞれの種類に基づいて第2評価値を決定する第2評価部をさらに備え、前記異常検出部は、前記処理の異常を検出する際に、前記第3情報に基づく前記第2評価値をさらに用いて検出してもよい。 The electronic device further includes a second evaluation unit that determines a second evaluation value based on each type of application included in the third information, and the abnormality detection unit detects an abnormality in the process. , The second evaluation value based on the third information may be further used for detection.
上記電子機器において、前記異常検出部は、以前に取得された前記第1情報、前記第2情報、及び前記第3情報に基づく情報と、異常の有無に関する情報とに基づいて機械学習された学習済みモデルを用いて、前記処理の異常を検出してもよい。 In the electronic device, the abnormality detection unit is machine-learned based on previously acquired information based on the first information, the second information, and the third information, and information on the presence or absence of an abnormality. An abnormality in the above processing may be detected by using the completed model.
また、本発明の第2態様に係る、プログラムに基づいて処理を実行するプロセッサを備える電子機器における制御方法は、取得部が、前記プロセッサを使用しているスレッドごとの前記プロセッサの使用率を示す情報を取得するステップと、算出部が、前記取得部が取得した情報に基づいて、前記プロセッサを使用しているスレッドの合計数に対する前記プロセッサの使用率が所定範囲であるスレッドの数の割合を示す第1情報を算出するステップと、抽出部が、前記取得部が取得した情報に基づいて、前記プロセッサを使用しているスレッドのうち最も使用されたスレッドである第1スレッドの使用率を示す第2情報を抽出するステップと、異常検出部が、前記第1情報と前記第2情報とに基づいて前記処理の異常を検出するステップと、を有する。 Further, in the control method in an electronic device including a processor that executes processing based on a program according to the second aspect of the present invention, the acquisition unit indicates the usage rate of the processor for each thread using the processor. Based on the step of acquiring information and the information acquired by the acquisition unit, the calculation unit determines the ratio of the number of threads whose processor usage rate is within a predetermined range to the total number of threads using the processor. Based on the step of calculating the first information to be shown and the information acquired by the acquisition unit, the extraction unit indicates the usage rate of the first thread, which is the most used thread among the threads using the processor. The abnormality detection unit has a step of extracting the second information and a step of detecting an abnormality in the process based on the first information and the second information.
また、本発明の第3態様に係る、プログラムに基づいて処理を実行するプロセッサを備える電子機器における前記処理の異常を検出するための学習済みモデルは、前記プロセッサを使用しているスレッドの合計数に対する前記プロセッサの使用率が所定範囲であるスレッドの数の割合を示す第1情報と、前記プロセッサを使用しているスレッドのうち最も使用されたスレッドである第1スレッドの使用率を示す第2情報とに基づいて機械学習され、前記処理の異常を検出するよう、コンピュータを機能させる。 Further, the trained model for detecting an abnormality in the processing in the electronic device including the processor that executes the processing based on the program according to the third aspect of the present invention is the total number of threads using the processor. The first information indicating the ratio of the number of threads whose usage rate of the processor is within a predetermined range to the second information, and the second information indicating the usage rate of the first thread, which is the most used thread among the threads using the processor. Machine learning is performed based on the information, and the computer is made to function to detect the abnormality of the processing.
本発明の上記態様によれば、実行中の処理の異常を精度よく検出することができる。 According to the above aspect of the present invention, it is possible to accurately detect an abnormality in the processing during execution.
以下、図面を参照しながら本発明の実施形態について詳しく説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[システムの概要]
まず、本実施形態に係る異常検出システムの概要について説明する。
図1は、本実施形態に係る異常検出システム1の概要を説明するシステム図である。図示する異常検出システム1は、電子機器10と、電子機器10と通信ネットワークNWを介して通信接続可能な機械学習装置30(サーバ装置)とを備えている。機械学習装置30は、学習用データが蓄積されるデータベースを含み、当該学習用データに基づいて機械学習を行い、機械学習した学習済みモデルを提供するサーバ装置である。電子機器10は、例えば、ラップトップ型(ノート型)のパーソナルコンピュータであるが、デスクトップ型やタブレット型などのパーソナルコンピュータであってもよい。電子機器10は、自身のパフォーマンスの低下などの異常(問題)を検出する。
[System overview]
First, an outline of the abnormality detection system according to the present embodiment will be described.
FIG. 1 is a system diagram illustrating an outline of the
電子機器10は、システムの状態に関する状態情報(Rawデータ)を収集し、収集したシステムの状態情報に基づいて、自身の異常を検出する。以下では特に明示しない限り、システムとは、電子機器10が備えるハードウェアやシステムファームウェアなどを用いたシステムのことを指し、異常検出システム1とは異なる概念とする。システムの状態情報には、CPU(Central Processing Unit)使用率などの情報が含まれる。例えば、電子機器10は、実行中のプログラム(プロセス)のスレッドごとのCPU使用率に関する情報などを取得する。また、電子機器10の異常検出部115は、取得したCPU使用率に関する情報などに基づいて、パフォーマンスの低下(システムスローダウン)などの異常を検出する。
The
ここで、異常検出部115は、AI(Artificial Intelligence)エンジンを備えている。異常検出部115は、CPU使用率に関する情報などに基づくデータセットを用いて機械学習された学習済みモデル(以下、「異常検出モデル」と称する)を用いて異常を検出するローカルAIとして機能する。
Here, the
なお、電子機器10が取得するシステムの状態情報には、例えば、CPUの温度、GPU(Graphic Processing Unit)に関する情報(GPU使用率など)、システムの動作状態に基づく情報(BSOD:Blue Screen of Death、ハングアップなど)、バッテリに関する情報(放電カーブ、満充電、残量少、充電開始時間、放電開始時間など)、ファンの回転速度の情報などが含まれてもよい。電子機器10の異常検出部115は、これらの取得した情報のいずれかに基づいて、「バッテリ寿命が短い」、「パフォーマンス低下(処理が遅い)」、「頻繁にシステムがハングアップする」などの異常(問題)や故障などを検出してもよい。
The system status information acquired by the
[第1の実施形態]
第1の実施形態では、電子機器10がスレッドごとのCPU使用率に基づいてパフォーマンスの低下などの異常を検出する態様について説明する。まず、電子機器10がシステムの状態情報を取得するタイミングについて説明する。
[First Embodiment]
In the first embodiment, an embodiment in which the
図2は、本実施形態に係るシステムの状態情報の取得タイミングの一例を示す図である。図示する例は、システムの状態情報の取得タイミングを示しており、縦軸がCPU使用率であり、横軸が時間である。電子機器10は、時刻t1においてトリガイベントを検出すると(1)、当該検出タイミングに応じてシステムの状態情報(System State)を取得する(2)。
FIG. 2 is a diagram showing an example of acquisition timing of system state information according to the present embodiment. In the illustrated example, the acquisition timing of the system state information is shown, the vertical axis is the CPU usage rate, and the horizontal axis is the time. When the
トリガイベントは、例えば、異常検出用のアプリケーションの画面(異常検出に関する各種の操作を受け付ける画面)において、異常検出の開始を指示する操作ボタンへの操作がされたとき、または、CPU使用率が所定の閾値(例えば、10秒間に「100%/コア数」)を超えたときなどに生成される。なお、トリガイベントは、所定の時間間隔(例えば、30分)ごとに生成されてもよい。 The trigger event is, for example, when an operation button instructing the start of abnormality detection is operated on the screen of the application for abnormality detection (the screen that accepts various operations related to abnormality detection), or the CPU usage rate is predetermined. Is generated when the threshold value (for example, "100% / number of cores" in 10 seconds) is exceeded. The trigger event may be generated at predetermined time intervals (for example, 30 minutes).
電子機器10は、時刻t1から所定の期間th(例えば30秒間)の間、CPU使用率を測定する(3)。また、時刻t1から所定の期間th(例えば30秒間)が経過した時刻t2において、電子機器10は、再びシステムの状態情報(System State)を取得する(4)。また、時刻t2において、電子機器10は、プロセス及びスレッドの情報(5)、システム情報(6)などを取得する。例えば、電子機器10は、この時刻t1から時刻t2で取得した情報の差分などから各プロセスのスレッドごとのCPU使用率などのデータを収集する。そして、電子機器10は、収集した情報をファイル(例えば、csvファイル)にして保存する(7)。
The
電子機器10は、収集したスレッドごとのCPU使用率に基づいて、異常(パフォーマンスの低下)を検出する。例えば、単にCPU使用率が高いといっても高負荷のアプリケーションの処理を正常に実行している場合もある。正常な処理と異常な処理とのそれぞれでスレッドごとのCPU使用率が実際にどのような傾向にあるかについて、図3を参照して説明する。
The
図3は、スレッドごとのCPU使用率と異常の有無との関係を調べた実験結果の一例を示す図である。実験では、正常な処理としては、通常の作業中のときのスレッドごとのCPU使用率を測定した。また、異常な処理としては、CPU高負荷問題を持ったアプリケーションの実行中と、無限ループのバグを持ったアプリケーションの実行中とのそれぞれについて、スレッドごとのCPU使用率を測定した。この図では、横軸をCPU使用率、縦軸をスレッドの数として、正常な処理及び異常なし処理のそれぞれについて、どの位のCPU使用率のスレッドが多いかを表している。その結果、実際には、CPU使用率が1~5%のスレッドの数が多い場合には正常な処理であり、異常な処理では、正常な処理のときに比較して、CPU使用率が10~30%や90~100%程度のスレッドの数が相対的に多くなる傾向がある。このように、正常な処理と異常な処理とでは、スレッドごとのCPU使用率に差がある。 FIG. 3 is a diagram showing an example of experimental results for investigating the relationship between the CPU usage rate for each thread and the presence or absence of an abnormality. In the experiment, as a normal process, the CPU usage rate for each thread during normal work was measured. Further, as an abnormal process, the CPU usage rate for each thread was measured for each of the execution of the application having the CPU high load problem and the execution of the application having the bug of the infinite loop. In this figure, the horizontal axis represents the CPU usage rate and the vertical axis represents the number of threads, indicating how many threads have a CPU usage rate for each of normal processing and no abnormality processing. As a result, in reality, when the number of threads having a CPU usage rate of 1 to 5% is large, the processing is normal, and in the abnormal processing, the CPU usage rate is 10 as compared with the normal processing. The number of threads of about 30% or 90 to 100% tends to be relatively large. As described above, there is a difference in the CPU usage rate for each thread between normal processing and abnormal processing.
そこで、電子機器10は、CPU使用率の測定中にCPUを使用していたスレッドの合計数に対するCPU使用率が所定範囲であるスレッドの数の割合(以下、「スレッド使用率比」と称する)を用いて、異常を検出する。
Therefore, in the
図4は、スレッド使用率比の一例を示す図である。この図では、CPU使用率が1~5%、6~10%、・・・、96~99%、100%、といったように5%刻みで、スレッド使用率比が算出される例を示している。「ThreCU0105R」は、CPU使用率の測定中にCPUを使用していたスレッドの合計数に対するCPU使用率が1~5%であるスレッドの数の割合を示す。「ThreCU0610R」は、CPU使用率の測定中にCPUを使用していたスレッドの合計数に対するCPU使用率が6~10%であるスレッドの数の割合を示す。「ThreCU9699R」は、CPU使用率の測定中にCPUを使用していたスレッドの合計数に対するCPU使用率が96~99%であるスレッドの数の割合を示す。「ThreCU100R」は、CPU使用率の測定中にCPUを使用していたスレッドの合計数に対するCPU使用率が100%であるスレッドの数の割合を示す。 FIG. 4 is a diagram showing an example of the thread usage rate. This figure shows an example in which the thread usage rate ratio is calculated in 5% increments such as CPU usage rate of 1 to 5%, 6 to 10%, ..., 96 to 99%, 100%, and so on. There is. "ThreCU0105R" indicates the ratio of the number of threads having a CPU usage rate of 1 to 5% to the total number of threads using the CPU during the measurement of the CPU usage rate. "ThreCU0610R" indicates the ratio of the number of threads having a CPU usage rate of 6 to 10% to the total number of threads using the CPU during the measurement of the CPU usage rate. "ThreCU9699R" indicates the ratio of the number of threads having a CPU usage rate of 96 to 99% to the total number of threads using the CPU during the measurement of the CPU usage rate. "ThreCU100R" indicates the ratio of the number of threads having a CPU usage rate of 100% to the total number of threads using the CPU during the measurement of the CPU usage rate.
また、電子機器10は、収集したスレッドごとのCPU使用率に基づいて、測定中に最も使用されたスレッドの使用率をさらに抽出する。測定中に最も使用されたスレッドとは、測定期間におけるCPU使用率と使用時間の積算値が最も大きいスレッドに相当する。以下では、測定中に最も使用されたスレッドのことを「第1スレッド」と称する。また、測定中に最も使用されたスレッドの使用率のことを「第1スレッド使用率」と称する。
Further, the
電子機器10は、算出したスレッド使用率比と、抽出した第1スレッド使用率とに基づいてAIを用いて異常を検出する。電子機器10は、スレッド使用率比を用いて異常を検出することは可能であるが、スレッド使用率比に加えて第1スレッド使用率も用いることで、スレッド使用率比のみを用いる場合もよりも精度よく異常を検出する。
The
図5を参照して、スレッド使用率比のみの異常検出結果と、スレッド使用率比に加えて第1スレッド使用率も用いた異常検出結果との違いについて説明する。
図5は、本実施形態に係る異常検出方法の説明図である。図5(A)は、スレッド使用率比のみに基づいて機械学習を行った異常検出モデルを用いた異常検出結果の一例を示している。機械学習には、OCSVM(One Class Support Vector Machine)を用いている。スレッド使用率比をパラメータとしたOCSVMを用いて複数回検証した結果について、正常と判定されるものを〇、異常と判定されるものを●で示している。
With reference to FIG. 5, the difference between the abnormality detection result of only the thread usage rate ratio and the abnormality detection result using the first thread usage rate in addition to the thread usage rate ratio will be described.
FIG. 5 is an explanatory diagram of an abnormality detection method according to the present embodiment. FIG. 5A shows an example of anomaly detection results using an anomaly detection model in which machine learning is performed based only on the thread usage rate ratio. OCSVM (One Class Support Vector Machine) is used for machine learning. Regarding the results of multiple verifications using OCSVM with the thread usage ratio as a parameter, those judged to be normal are shown by ◯, and those judged to be abnormal are shown by ●.
図5(B)は、異常と判定された3種類の結果にID1~3を付して、それぞれの第1スレッド使用率(1st Thread usage)とOCSVMによる判定結果(Prediction By OCSVM)と、人が確認した最終の判定結果(Last Prediction)とを示している。ID1は、第1スレッド使用率が47%で、OCSVMにより異常と判定されたが、人が確認した最終の判定結果では正常であった。ID2は、第1スレッド使用率が59%で、OCSVMにより異常と判定され、人が確認した最終の判定結果でも異常であった。ID3は、第1スレッド使用率が60%で、OCSVMにより異常と判定され、人が確認した最終の判定結果でも異常であった。
FIG. 5B shows three types of results determined to be abnormal with
この結果からすると、第1スレッド使用率による閾値判定を異常検出時のパラメータとして追加することで、検出精度が向上することがわかる。例えば、OCSVMにより異常と検出された場合、第1スレッド使用率が50%以上の場合には異常、第1スレッド使用率が50%未満の場合には正常と判定することで、検出精度が向上させることができる。図5(C)は、OCSVMのみによる異常検出の正解率と、OCSVMによる異常検出に第1スレッド使用率による閾値判定を加えたときの異常検出の正解率との比較結果を示している。OCSVMのみによる異常検出の正解率は、59.86%であるのに対して、OCSVMによる異常検出に第1スレッド使用率による閾値(50%)判定を加えたときの異常検出の正解率は、89.02%と検出精度が向上している。なお、閾値は50%に限定されるものではなく、任意の閾値を設定することができる。 From this result, it can be seen that the detection accuracy is improved by adding the threshold value determination based on the first thread usage rate as a parameter at the time of abnormality detection. For example, when an abnormality is detected by OCSVM, the detection accuracy is improved by determining that it is abnormal when the first thread usage rate is 50% or more and normal when the first thread usage rate is less than 50%. Can be made to. FIG. 5C shows a comparison result between the correct answer rate of abnormality detection only by OCSVM and the correct answer rate of abnormality detection when the threshold value determination by the first thread usage rate is added to the abnormality detection by OCSVM. The correct answer rate for abnormality detection by OCSVM alone is 59.86%, whereas the correct answer rate for abnormality detection when the threshold value (50%) judgment based on the first thread usage rate is added to the abnormality detection by OCSVM is The detection accuracy is improved to 89.02%. The threshold value is not limited to 50%, and any threshold value can be set.
例えば、電子機器10は、スレッド使用率比のみに基づいて機械学習を行った異常検出モデルを用いて異常を検出した後に、第1スレッド使用率による閾値判定を行って、最終的な異常の有無を検出する。なお、電子機器10は、スレッド使用率比と第1スレッド使用率との両方に基づいて機械学習を行った異常検出モデルを用いて異常を検出してもよい。
For example, the
次に、電子機器10の構成について詳しく説明する。
(電子機器のハードウェア構成)
図6は、本実施形態に係る電子機器10のハードウェアの構成例を示す概略ブロック図である。電子機器10は、通信部11、表示部12、スピーカ13、入力部14、電源部15、温度センサ17、ファン16、EC(Embedded Controller)18、記憶部19、及びシステム処理部100を含んで構成される。システム処理部100は、CPU101、GPU102、メモリコントローラ103、I/O(Input-Output)コントローラ104、及びシステムメモリ105を含んで構成され、オペレーティングシステム(OS:Operating System)によるシステム処理によって、OS上で各種アプリのプログラムの処理が実行可能である。CPU101とGPU102をプロセッサと総称することがある。
Next, the configuration of the
(Hardware configuration of electronic devices)
FIG. 6 is a schematic block diagram showing a configuration example of the hardware of the
通信部11は、無線または有線による通信ネットワークを介して他の機器と通信可能に接続し、各種のデータの送信および受信を行う。例えば、通信部11は、イーサネット(登録商標)等の有線LANインターフェースやWi-Fi(登録商標)等の無線LANインターフェース等を含んで構成されている。なお、通信部11は、USB(Universal Serial Bus)インターフェースやBluetooth(登録商標)インターフェースを含んで構成されてもよい。
The
表示部12は、映像、画像、テキスト等を表示するディスプレイであり、例えば、液晶ディスプレイパネル、有機ELディスプレイパネルなどを含んで構成される。スピーカ13は、電子音や音声などを出力する。
The
入力部14は、ユーザの入力を受け付ける入力部であり、例えばキーボードやタッチパッドなどの入力デバイスを含んで構成されている。入力部14は、キーボード、タッチパッドなどに対する操作を受け付けることに応じて、操作内容を示す操作信号をEC18へ出力する。なお、入力部14は、表示部12の表示画面に対する操作を受け付けるタッチパネルを含んで構成されてもよい。
The
電源部15は、電子機器10の各部の動作状態に応じて各部へ電源系統を介して電力を供給する。電源部15は、DC(Direct Current)/DCコンバータを備える。DC/DCコンバータは、AC(Alternate Current)/DCアダプタ又はバッテリ151から供給される直流電力の電圧を、各部で要求される電圧に変換する。DC/DCコンバータで電圧が変換された電力が各電源系統を介して各部へ供給される。例えば、電源部15は、EC18から入力される各部の動作状態に応じて制御信号に基づいて各電源系統を介して各部に電力を供給する。
The
温度センサ17は、電子機器10の筐体内部に一又は複数設けられ、環境温度を検出する。例えば、温度センサ17は、CPU101の近傍やバッテリ151の近傍など温度が上昇しやすい箇所に設けられている。
ファン16は、電子機器10の内部の上昇した温度を低下させるための冷却用として設けられている。
One or a plurality of
The
EC18は、CPU101の処理に関わらず、各種デバイス(周辺装置やセンサ等)の監視及び制御を行うマイクロコンピュータが組み込まれた組み込みコントローラであり、バッテリの管理、電源管理、キーボードコントローラなどの機能を有する。例えば、EC18は、入力部14と、電源部15と、ファン16と、温度センサ17とに接続されている。EC18は、入力部14から操作信号を取得する。また、EC18は、不図示の電源ボタンに対する操作に応じて起動信号を生成する。また、EC18は、各部への給電のON/OFFの指示を電源部15に対して行うとともに、バッテリに関する情報(放電カーブ、満充電、残量少、充電開始時間、放電開始時間など)を電源部15から取得する。また、EC18は、温度センサ17の検出結果を取得し、検出結果(温度)に応じて、ファン16のON/OFF、およびON時の回転速度などを制御する。EC18とCPU101とは通信を行うことにより、各種情報や各動作状態などを共有する。
The EC18 is an embedded controller incorporating a microcomputer that monitors and controls various devices (peripheral devices, sensors, etc.) regardless of the processing of the
記憶部19は、SSD(Solid State Drive)、HDD(Hard Disk Drive)、ROM(Read Only Memory)、RAM(Random access memory)などの記憶媒体を含んで構成される。記憶部19には、BIOS、OS、デバイスドライバ、アプリケーションなどの各種のプログラムや、その他、プログラムの処理に必要なデータ、プログラムの処理により取得した各種のデータなどが記憶される。
The
CPU101は、BIOSやOSによるシステム処理により動作状態を制御する。システムの動作状態として少なくとも通常動作状態(パワーオン状態)と待機状態(アイドル状態)との間を遷移可能である。待機状態には、スタンバイ状態、スリープ状態、ハイバネーション状態およびパワーオフ状態が含まれる。
The
スタンバイ状態は、プロセッサの処理能力を通常動作状態よりも低くし、動作中のシステムメモリ105の内容を保持しながら通信部11、表示部12、スピーカ13、及び記憶部19など周辺デバイスの消費電力を通常動作状態よりも少なくする動作状態である。
スリープ状態は、システムメモリ105とEC18とその配下にあるデバイス以外のデバイスへの給電を停止し、プロセッサによるプログラムの実行を伴わない動作モードである。
ハイバネーション状態は、スリープ状態においてプロセッサから即座にアクセス可能とする補助記憶装置にシステムメモリ105に記憶していた情報を全て退避させ、その後、システムメモリ105への給電をさらに停止するモードである。従って、ハイバネーション状態から起動処理を開始する際、CPU101は、補助記憶装置に退避された情報をシステムメモリ105に記憶する。
パワーオフ状態は、EC18とその配下にあるデバイス以外のデバイスへの給電を停止した状態である。
In the standby state, the processing power of the processor is lower than that in the normal operating state, and the power consumption of peripheral devices such as the
The sleep state is an operation mode in which power supply to devices other than the
The hibernation state is a mode in which all the information stored in the
The power-off state is a state in which power supply to devices other than EC18 and devices under it is stopped.
例えば、CPU101は、動作状態が待機状態であって、EC18から起動信号が入力された場合、待機状態から通常動作状態に遷移させる。例えば、動作状態がスリープ状態、ハイバネーション状態またはパワーオフ状態であるとき、電源部15から電力の供給を受け、かつEC18から起動信号が入力されると、CPU101は、起動処理を開始する。CPU101は、起動処理において、システムメモリ105、記憶部19などの最小限のデバイスの検出と初期化を行う(プリブート)。CPU101は、記憶部19からBIOSをシステムメモリ105にロードし、通信部11、表示部12などその他のデバイスの検出と初期化を行う(ポスト処理)。初期化には、初期パラメータの設定などの処理が含まれる。なお、スリープ状態から通常動作状態への遷移(レジューム)においては、ポスト処理の一部が省略されることがある。CPU101は、起動処理が完了した後、OSによるシステム処理の実行を開始する(起動)。
For example, when the operating state is the standby state and the start signal is input from the
また、CPU101は、OSが起動した後、インストールされているアプリケーションのプログラムを実行することにより、当該アプリケーションの機能を実現する。例えば、上述した異常検出処理は、当該異常検出を行うための異常検出アプリケーションとして提供され、異常検出アプリケーションのプログラムを実行することにより、その機能を実現する。
Further, the
GPU102は、CPU101の制御に基づいて画像処理を実行して表示データを生成する。GPU102は、生成した表示データを表示部12に出力する。なお、CPU101とGPU102は、一体化して1個のコアとして形成されてもよいし、個々のコアとして形成されたCPU101とGPU102の相互間で負荷が分担されてもよい。プロセッサの数は、1個に限られず、複数個であってもよい。
The
メモリコントローラ103は、CPU101とGPU102によるシステムメモリ105、記憶部19などからのデータの読出し、書込みを制御する。
I/Oコントローラ104は、通信部11、表示部12、スピーカ13、及びEC18とのデータの入力または出力を制御する。
システムメモリ105は、CPU101が実行するプログラムの読み込み領域ならびに処理データを書き込む作業領域として用いられる。
The
The I / O controller 104 controls the input or output of data with the
The
[電子機器の機能構成]
次に、電子機器10における異常検出処理に関する機能構成について説明する。
図7は、本実施形態に係る電子機器10の機能構成の一例を示すブロック図である。制御部110は、CPU101が異常検出アプリケーションのプログラムを実行することにより実現する異常検出処理の機能構成を示している。制御部110は、取得部111と、算出部112と、抽出部113と、異常検出部115とを備えている。また、異常検出処理に用いるデータを記憶する構成として、記憶部19は、システム情報記憶部191と、算出情報記憶部192と、抽出情報記憶部193と、異常情報記憶部195と、異常検出モデル記憶部196とを備えている。
[Functional configuration of electronic devices]
Next, the functional configuration related to the abnormality detection process in the
FIG. 7 is a block diagram showing an example of the functional configuration of the
取得部111は、電子機器10のシステムの状態に関する状態情報を取得する。例えば、取得部111は、図2を参照して説明したように、予め設定されたタイミングで、実行中のプログラム(プロセス)やスレッドの情報、システム情報(例えば、OSの種類やバージョンの情報)などを取得する。そして、取得部111は、取得した情報を取得したタイミングを示す情報と関連付けて、システム情報記憶部191に記憶させる。
The
例えば、取得部111が取得する情報には、CPU使用率、GPU使用率、メモリ使用率、通信ネットワークの接続状態などのデータが含まれる。具体的には、取得部111が取得する情報には、図2に示す測定期間におけるプロセスの合計数(NumOfProcess)及びスレッドの合計数(NumOfThread)や、スレッドごとのCPU使用率、CPU使用率ごとのプロセスの数、CPU使用率ごとのスレッドの数などのデータが含まれる。例えば、取得部111は、測定されたスレッドごとのCPU使用率に基づいて、例えば5%刻みで、CPU使用率が0%、1~5%、6~10%、・・・、96~99%、100%であるスレッドの数をCPU使用率ごとのスレッドの数として取得する。
For example, the information acquired by the
なお、ここでは、5%刻みでCPU使用率ごとのスレッドの数を取得して異常検出に用いる例としているが、これに限定されるものではなく、例えば10%刻みでCPU使用率ごとのスレッドの数を取得して異常検出に用いるようにしてもよい。 Here, the number of threads for each CPU usage rate is acquired in 5% increments and used for abnormality detection, but the present invention is not limited to this, and for example, threads for each CPU usage rate in 10% increments. You may acquire the number of threads and use them for abnormality detection.
算出部112は、取得部111が取得した情報に基づいて、スレッド使用率比を算出する。前述したように正常な処理ではCPU使用率が1~5%のスレッドの数が多いため、例えば、算出部112は、CPU101を使用しているスレッドの合計数に対するCPU使用率が所定範囲(例えば1~5%)であるスレッドの数の割合を、スレッド使用率比として算出する。そして、算出部112は、算出したスレッド使用率比を異常検出に用いるパラメータとして算出情報記憶部192に記憶させる。
The
図8は、異常検出に用いるスレッド使用率比の算出例を示す図である。CPU使用率の測定中に、CPU101を使用していたスレッドの合計数に対するCPU使用率1~5%のスレッド数の割合をスレッド使用率比「ThreCU0105R」とすると、
ThreCU0105R
=ThreCU0105×100/(NumOfThread-ThreCU00)
で表すことができる。
「ThreCU00」は、CPU使用率の測定中にCPU使用率が0%のスレッドの数である。「ThreCU0105」は、CPU使用率の測定中にCPU使用率が1~5%のスレッドの数である。「NumOfThread」は、CPU使用率の測定中に、実行されていたスレッドの合計数である。
FIG. 8 is a diagram showing a calculation example of the thread usage rate ratio used for abnormality detection. Assuming that the ratio of the number of threads having a CPU usage rate of 1 to 5% to the total number of threads using the
ThreeCU0105R
= ThreeCU0105 × 100 / (NumOfThread-ThreCU00)
Can be represented by.
"ThreCU00" is the number of threads having a CPU usage rate of 0% during the measurement of the CPU usage rate. "ThreCU0105" is the number of threads having a CPU usage rate of 1 to 5% during the measurement of the CPU usage rate. "NumOfThread" is the total number of threads executed during the measurement of CPU usage.
図6に戻り、抽出部113は、取得部111が取得した情報に基づいて、図2に示す測定期間においてCPU101を使用している複数のスレッドのうち第1スレッド使用率を示す情報を抽出する。そして、抽出部113は、抽出した第1スレッド使用率を示す情報を異常検出に用いるパラメータとして抽出情報記憶部193に記憶させる。
Returning to FIG. 6, the
異常検出部115は、算出情報記憶部192及び抽出情報記憶部193を参照して、スレッド使用率比と第1スレッド使用率とに基づいて処理の異常(パフォーマンスの低下など)を検出する。例えば、異常検出部115は、異常を検出するための学習済みモデルである異常検出モデルを用いて、スレッド使用率比と第1スレッド使用率とに基づいて処理の異常を検出する。
The
この異常検出モデルは、以前に電子機器10または他の電子機器で取得されたスレッド使用率比と異常の有無に関する情報とに基づいて機械学習装置30で機械学習された学習済みモデルである。例えば、機械学習のアルゴリズムとしてOCSVMが用いられ、正常なときのスレッド使用率比を学習データとして機械学習させることで異常値との識別境界を決定し、当該識別境界を基準として異常の検出を行う。電子機器10は、この異常検出モデルを事前に機械学習装置30から通信ネットワークNWや記憶媒体を介して取得し、異常検出モデル記憶部196に記憶している。
This abnormality detection model is a trained model machine-learned by the
具体的には、異常検出部115は、算出情報記憶部192を参照して、算出部112により算出されたスレッド使用率比を異常検出モデル(OCSVM)へ入力することにより出力される出力結果で正常/異常の判定を行う(図5(A)、(B)参照)。また、異常検出部115は、OCSVMにより異常と判定された場合には、第1スレッド使用率による閾値判定を行う。例えば、異常検出部115は、OCSVMにより異常と判定された場合には、第1スレッド使用率が50%以上の場合には異常、第1スレッド使用率が50%未満の場合には正常と判定する。なお、機械学習の方法は、OCSVMに限定されるものではなく、教師あり学習、教師なし学習、または強化学習などの任意の方法を適用してもよい。
Specifically, the
また、電子機器10は、スレッド使用率比と第1スレッド使用率との両方に基づいて機械学習を行った異常検出モデルを用いて異常を検出してもよい。この場合、異常検出モデルは、以前に電子機器10または他の電子機器で取得されたスレッド使用率比と第1スレッド使用率と異常の有無に関する情報とに基づいて機械学習装置30で機械学習された学習済みモデルである。機械学習の方法は、教師あり学習、教師なし学習、または強化学習などの任意の方法を適用してもよい。異常検出部115は、算出情報記憶部192及び抽出情報記憶部193を参照して、スレッド使用率比と第1スレッド使用率とを異常検出モデルへ入力することにより出力される出力結果で正常/異常の判定を行う。
Further, the
また、異常検出部115は、異常を検出した場合、異常を示す異常情報を生成し、異常情報記憶部195に記憶させる。例えば、異常検出部115は、検出した異常の内容(例えば、パフォーマンスの低下)、異常なプロセス、異常なスレッドなどを示す情報が含まれる異常情報を生成する。
Further, when the abnormality is detected, the
(異常検出処理の動作)
次に、電子機器10において制御部110が実行する異常検出処理の動作について説明する。図9は、本実施形態に係る異常検出処理の一例を示すフローチャートである。
(ステップS101)制御部110は、予め設定されたタイミングで、電子機器10のシステムの状態情報を取得する。例えば、制御部110は、スレッドごとのCPU使用率などの情報を取得する。そして、制御部110は、取得した情報を取得したタイミングを示す情報と関連付けて、システム情報記憶部191に記憶させる。そして、ステップS103の処理に進む。
(Operation of abnormality detection processing)
Next, the operation of the abnormality detection process executed by the
(Step S101) The
(ステップS103)制御部110は、ステップS101で取得した情報に基づいて、スレッド使用率比を算出する。例えば、制御部110は、測定期間においてCPU101を使用しているスレッドの合計数に対するCPU使用率が1~5%であるスレッドの数の割合を、スレッド使用率比として算出する。そして、制御部110は、算出したスレッド使用率比を異常検出に用いるパラメータとして算出情報記憶部192に記憶させる。そして、ステップS105の処理に進む。
(Step S103) The
(ステップS105)制御部110は、測定期間においてCPU101を使用している複数のスレッドのうち第1スレッド使用率を示す情報を抽出する。そして、制御部110は、抽出した第1スレッド使用率を示す情報を異常検出に用いるパラメータとして抽出情報記憶部193に記憶させる。そして、ステップS107の処理に進む。
(Step S105) The
(ステップS107)制御部110は、ステップS103で算出したスレッド使用率比とステップS105で抽出した第1スレッド使用率とに基づいて処理の異常(パフォーマンスの低下など)を検出する。例えば、制御部110は、算出したスレッド使用率比を異常検出モデル(OCSVM)へ入力することにより出力される出力結果で正常/異常の判定を行う。この異常検出モデルは、以前に電子機器10または他の電子機器で取得されたスレッド使用率比と異常の有無に関する情報とに基づいて機械学習装置30で機械学習された学習済みモデルである。また、制御部110は、OCSVMにより異常と判定された場合には、第1スレッド使用率による閾値判定を行う。例えば制御部110は、OCSVMにより異常と判定された場合には、第1スレッド使用率が50%以上の場合には異常、第1スレッド使用率が50%未満の場合には正常と判定する。
(Step S107) The
なお、制御部110は、以前に電子機器10または他の電子機器で取得されたスレッド使用率比と第1スレッド使用率と異常の有無に関する情報とに基づいて機械学習装置30で機械学習された異常検出モデルを用いて、処理の異常を検出してもよい。例えば、制御部110は、算出したスレッド使用率比と抽出した第1スレッド使用率とを異常検出モデルへ入力することにより出力される出力結果で正常/異常の判定を行ってもよい。そして、制御部110は、正常/異常の判定を行うと、ステップS109の処理に進む。
The
(ステップS109)制御部110は、異常を検出したか否かを判定する。制御部110は、異常を検出したと判定した場合(YES)、ステップS111の処理に進む。一方、制御部110は、異常を検出しないと判定した場合(NO)、異常検出処理を終了する。
(Step S109) The
(ステップS111)制御部110は、異常を検出した場合、異常を示す異常情報を生成し、異常情報記憶部195に記憶させる。例えば、異常情報には、異常の内容(パフォーマンス低下」、異常なプロセス、異常なスレッドなどを示す情報が含まれる。また、制御部110は、異常を検出した場合、異常情報に基づく表示情報を表示部12に表示させ、異常が検出されたことをユーザに通知する。
(Step S111) When the
以上説明したように、本実施形態に係る電子機器10は、プログラムに基づいて処理を実行するCPU101(プロセッサの一例)を備えている。例えば、電子機器10は、CPU101を使用しているスレッドごとのCPU使用率を示す情報を取得する。また、電子機器10は、取得した情報に基づいて、CPU101を使用しているスレッドの合計数に対するCPU使用率が所定範囲(例えば、1~5%)であるスレッドの数の割合を示すスレッド使用率比(第1情報の一例)を算出する。また、電子機器10は、取得した情報に基づいて、CPU101を使用しているスレッドのうち最も使用されたスレッドである第1スレッドの使用率を示す第1スレッド使用率(第2情報の一例)を抽出する。そして、電子機器10は、スレッド使用率比と第1スレッド使用率とに基づいて、処理の異常を検出する。
As described above, the
これにより、電子機器10は、実行中の処理におけるスレッド使用率比のみではなく第1スレッド使用率も用いることにより、実行中の処理の異常を精度よく検出することができる。
As a result, the
例えば、電子機器10は、以前に取得されたスレッド使用率比、第1スレッド使用率、及び異常の有無に関する情報に基づいて機械学習された異常検出モデル(学習済みモデルの一例)を用いて、処理の異常を検出する。これにより、電子機器10は、実行中の処理におけるスレッド使用率比と第1スレッド使用率からAIを用いて精度よく異常を検出することができる。
For example, the
また、異常検出モデルは、プログラムに基づいて処理を実行するCPU101を備える電子機器10における処理の異常を検出するための学習済みモデルの一例である。異常検出モデルは、CPU101を使用しているスレッドの合計数に対するCPU101の使用率が所定範囲であるスレッドの数の割合を示すスレッド使用率比(第1情報の一例)と、CPU101を使用しているスレッドのうち最も使用されたスレッドである第1スレッドの使用率を示す第1スレッド使用率(第2情報の一例)とに基づいて機械学習され、上記処理の異常を検出するようコンピュータを機能させる。
Further, the abnormality detection model is an example of a trained model for detecting an abnormality in processing in an
これにより、電子機器10は、スレッド使用率比のみではなく第1スレッド使用率も用いて機械学習された異常検出モデルを用いることにより、実行中の処理の異常をAIを用いて精度よく検出することができる。
As a result, the
なお、本実施形態では、CPU101を使用しているスレッドの合計数に対するCPU使用率1~5%であるスレッドの数の割合をスレッド使用率比としたが、CPU使用率1~5%に限定されるものではない。例えば、CPU101を使用しているスレッドの合計数に対する任意の特定のCPU使用率であるスレッドの数の割合をスレッド使用率比としてもよい。
In this embodiment, the ratio of the number of threads having a CPU usage rate of 1 to 5% to the total number of threads using the
[第2の実施形態]
次に、本発明の第2の実施形態について説明する。
第1の実施形態では、スレッド使用率比に加えて第1スレッド使用率による閾値判定を加味して異常を検出することにより、スレッド使用率比のみで異常を検出するよりも検出精度を向上させた例を説明した。しかしながら、図5(C)に示すように、異常検出の正解率は90%未満であり、まだ誤検出が一定の割合で発生する。本実施形態では、より精度よく異常を検出することが可能な態様について説明する。なお、本実施形態に係る電子機器10のハードウェア構成は図6に示す構成と同様であるため説明を省略し、第1の実施形態と異なる機能構成及び異常検出処理について説明する。
[Second Embodiment]
Next, a second embodiment of the present invention will be described.
In the first embodiment, the abnormality is detected by adding the threshold value determination based on the first thread usage rate in addition to the thread usage rate ratio, so that the detection accuracy is improved as compared with detecting the abnormality only by the thread usage rate ratio. I explained an example. However, as shown in FIG. 5C, the correct answer rate for anomaly detection is less than 90%, and false positives still occur at a constant rate. In this embodiment, an embodiment capable of detecting an abnormality more accurately will be described. Since the hardware configuration of the
図10を参照して、第1の実施形態で誤検出となる例と、本実施形態で検出に使用するパラメータについて説明する。図10は、本実施形態に係る異常検出方法を説明するための検出結果の一例を示す図である。ここで、第1の実施形態では、図2に示す測定中において最も使用されたスレッドのことを「第1スレッド」、この第1スレッドの使用率のことを「第1スレッド使用率」と称して説明した。本実施形態でも同様に、「第1スレッド」及び「第1スレッド使用率」を用いて説明するが、同様に、2番目に最も使用されたスレッドのことを「第2スレッド」、この第2スレッドの使用率のことを「第2スレッド使用率」と称する。また同様に、3番目に最も使用されたスレッドのことを「第3スレッド」、この第3スレッドの使用率のことを「第3スレッド使用率」と称する。なお、2番目に最も使用されたスレッドとは第1スレッドの次に最も使用されたスレッド(すなわち、第1スレッド使用率の次に高いスレッド使用率のスレッド)である。また、3番目に最も使用されたスレッドとは第2スレッドの次に最も使用されたスレッド(すなわち、第2スレッド使用率の次に高いスレッド使用率のスレッド)である。 With reference to FIG. 10, an example of erroneous detection in the first embodiment and parameters used for detection in the present embodiment will be described. FIG. 10 is a diagram showing an example of a detection result for explaining the abnormality detection method according to the present embodiment. Here, in the first embodiment, the most used thread in the measurement shown in FIG. 2 is referred to as "first thread", and the usage rate of this first thread is referred to as "first thread usage rate". I explained. Similarly, in the present embodiment, the description will be made using the “first thread” and the “first thread usage rate”, but similarly, the second most used thread is referred to as the “second thread”, which is the second thread. The thread usage rate is referred to as "second thread usage rate". Similarly, the third most used thread is referred to as a "third thread", and the usage rate of the third thread is referred to as a "third thread usage rate". The second most used thread is the most used thread after the first thread (that is, the thread with the next highest thread usage rate after the first thread usage rate). The third most used thread is the most used thread after the second thread (that is, the thread with the next highest thread usage rate after the second thread usage rate).
この図では、3種類の異常検出結果にID1~3を付して、それぞれ第1スレッドが含まれるアプリケーションの情報(Most Used app)と第1スレッド使用率(1st Thread usage)、第2スレッドが含まれるアプリケーションの情報(2nd Most Used app)と第2スレッド使用率(2nd Thread usage)、及び第3スレッドが含まれるアプリケーションの情報(3rd Most Used app)と第3スレッド使用率(3rd Thread usage)の測定結果と、第1の実施形態に係る異常検出結果(Prediction By OCSVM+50%thresh)と、実際の異常の有無(Real status)とについて表にして示している。
In this figure,
第1の実施形態に係るスレッド使用率比によるOCSVMと第1スレッド使用率による閾値(50%)判定とを用いた異常検出結果では、ID1が異常と判定され、ID2及びID3が正常と判定される。しかしながら、本例では、実際にはID1が正常であり、ID2及びID3が異常であった。ここで、第1スレッド使用率のみではなく、第2スレッド使用率及び第3スレッド使用率も確認すると、異常なID1では、第1スレッド使用率と第2スレッド使用率との差が2%しかなく小さいことがわかる。一方、正常なID2及びID3では、第1スレッド使用率と第2スレッド使用率との差がそれぞれ30%、56%であり大きいことがわかる。また、第1スレッド使用率と第3スレッド使用率との差についても同様の傾向であり、異常であるときの方が小さい。 In the abnormality detection result using the OCSVM based on the thread usage rate ratio and the threshold value (50%) determination based on the first thread usage rate according to the first embodiment, ID1 is determined to be abnormal, and ID2 and ID3 are determined to be normal. To. However, in this example, ID1 was actually normal, and ID2 and ID3 were abnormal. Here, when not only the 1st thread usage rate but also the 2nd thread usage rate and the 3rd thread usage rate are confirmed, the difference between the 1st thread usage rate and the 2nd thread usage rate is only 2% in the abnormal ID1. It turns out that it is small. On the other hand, in normal ID2 and ID3, the difference between the first thread usage rate and the second thread usage rate is 30% and 56%, respectively, which are large. Further, the difference between the first thread usage rate and the third thread usage rate has the same tendency, and is smaller when it is abnormal.
また、異常なID1では、第1スレッド、第2スレッド、及び第3スレッドのそれぞれが含まれるアプリケーション(App-m1)が同一である。つまり、同一のアプリケーションが複数のスレッドを高い使用率で占有している(CPU使用率が高く使用時間が長い)場合、CPU101の処理が異常な処理になっているといえる。
Further, in the
なお、ID2の各スレッドが含まれるアプリケーション(App-dr5)は、OSによりバックグラウンドで実行されるアプリケーションの一例である。このようなアプリケーションは、強制終了できないため、異常検出の対象から外してもよい。例えば、ゲームのアプリケーションが実行されていることによりCPU使用率が高くなっていても、それは異常で高くなっているわけではなく、正常な処理である。よって、アプリケーションの種類も異常検出に影響する。 The application (App-dr5) including each thread of ID2 is an example of an application executed in the background by the OS. Since such an application cannot be forcibly terminated, it may be excluded from the target of anomaly detection. For example, even if the CPU usage rate is high due to the execution of the game application, it does not mean that the CPU usage rate is abnormally high, but it is a normal process. Therefore, the type of application also affects the abnormality detection.
本実施形態では、電子機器10は、第1スレッド使用率のみではなく、第2スレッド使用率)及び第3スレッド使用率に関する情報を新しいパラメータとして追加することで、異常検出モデルの精度を向上させる。また、電子機器10は、第1スレッド、第2スレッド、及び第3スレッドのそれぞれが含まれるアプリケーションの情報を新しいパラメータとして追加することで、異常検出モデルの精度を向上させる。
In the present embodiment, the
すなわち、電子機器10は、スレッド使用率比と、第1スレッド使用率、第2スレッド使用率、及び第3スレッド使用率に関する情報と、各スレッドが含まれるアプリケーションの情報とに基づいて、処理の異常を検出する。スレッド使用率比については、第1の実施形態で説明した内容と同様であるため、ここでは、スレッド使用率に関する情報と、各スレッドが含まれるアプリケーションの情報とについて詳しく説明する。
That is, the
図11は、スレッド使用率に関する情報の一例を示す図である。前述したように、第1スレッド使用率と第2スレッド使用率との差分や第1スレッド使用率と第3スレッド使用率との差分が、異常の有無に関係する。そこで、スレッド使用率に関する情報として、第1スレッド使用率(ProcCpuUsage1)と、第1スレッド使用率と第2スレッド使用率との差分(ProcCpuUsage2diff)と、第1スレッド使用率と第3スレッド使用率との差分(ProcCpuUsage3diff)とを、異常検出のためのパラメータとして使用する。 FIG. 11 is a diagram showing an example of information regarding the thread usage rate. As described above, the difference between the first thread usage rate and the second thread usage rate and the difference between the first thread usage rate and the third thread usage rate are related to the presence or absence of an abnormality. Therefore, as information on the thread usage rate, the first thread usage rate (ProcCpuUsage1), the difference between the first thread usage rate and the second thread usage rate (ProcCpuUsage2diff), the first thread usage rate, and the third thread usage rate. Difference (ProcCpuUsage3diff) is used as a parameter for abnormality detection.
図12は、アプリケーション情報の一例を示す図である。前述したように、同一のアプリケーションが複数のスレッドを有していることも、異常の有無に関係する。そこで、アプリケーション情報として、第1スレッド、第2スレッド、及び第3スレッドが同一のアプリケーションに含まれるか否かを評価値(Same App)として表し、この評価値を異常検出のためのパラメータとして使用する。例えば、第1スレッドと第3スレッドが同一のアプリケーションに含まれる場合、評価値(Same App)を「1」とする。第1スレッドと第2スレッドが同一のアプリケーションに含まれる場合、評価値(Same App)を「2」とする。第1スレッド、第2スレッド、及び第3スレッドのすべてが同一のアプリケーションに含まれる場合、評価値(Same App)を「3」とする。以下では、この同一のアプリケーションに含まれるか否かにより決まる評価値を第1評価値とも称する。 FIG. 12 is a diagram showing an example of application information. As mentioned above, the fact that the same application has multiple threads is also related to the presence or absence of anomalies. Therefore, as application information, whether or not the first thread, the second thread, and the third thread are included in the same application is expressed as an evaluation value (Same App), and this evaluation value is used as a parameter for abnormality detection. do. For example, when the first thread and the third thread are included in the same application, the evaluation value (Same App) is set to "1". When the first thread and the second thread are included in the same application, the evaluation value (Same App) is set to "2". When the first thread, the second thread, and the third thread are all included in the same application, the evaluation value (Same App) is set to "3". Hereinafter, the evaluation value determined by whether or not the application is included in the same application is also referred to as a first evaluation value.
また、アプリケーション情報として、アプリケーションの種類も評価値として表し、この評価値を異常検出のためのパラメータとして使用する。例えば、第1スレッドが含まれるアプリケーションの種類がブラウザである場合、評価値(Browser)を「1」とする。また、第1スレッドが含まれるアプリケーションの種類がゲームのアプリケーションである場合、評価値(GameApp)を「1」とする。また、第1スレッドが含まれるアプリケーションの種類がOSによりバックグラウンドで実行されるアプリケーションである場合、評価値(OSApp)を「1」とする。以下では、このアプリケーションの種類に基づいて決まる評価値を第2評価値とも称する。 In addition, as application information, the type of application is also expressed as an evaluation value, and this evaluation value is used as a parameter for detecting an abnormality. For example, when the type of the application including the first thread is a browser, the evaluation value (browser) is set to "1". Further, when the type of the application including the first thread is a game application, the evaluation value (GameApp) is set to "1". Further, when the type of the application including the first thread is an application executed in the background by the OS, the evaluation value (OSApp) is set to "1". Hereinafter, the evaluation value determined based on the type of this application is also referred to as a second evaluation value.
なお、上述した第1評価値及び第2評価値の各値は一例であって、上述した値に限定されるものではない。 It should be noted that each of the above-mentioned first evaluation value and second evaluation value is an example, and is not limited to the above-mentioned value.
(電子機器の機能構成)
次に、本実施形態に係る電子機器10の機能構成について説明する。
図13は、本実施形態に係る電子機器10の機能構成の一例を示すブロック図である。制御部110Aは、本実施形態に係る異常検出アプリケーションのプログラムをCPU101が実行することにより実現する異常検出処理の機能構成を示している。制御部110Aは、取得部111と、算出部112と、抽出部113と、評価部114と、異常検出部115とを備えている。また、異常検出処理に用いるデータを記憶する構成として、記憶部19は、システム情報記憶部191と、算出情報記憶部192と、抽出情報記憶部193と、評価情報記憶部194、異常情報記憶部195と、異常検出モデル記憶部196とを備えている。
(Functional configuration of electronic devices)
Next, the functional configuration of the
FIG. 13 is a block diagram showing an example of the functional configuration of the
取得部111は、電子機器10のシステムの状態に関する状態情報を取得する。例えば、取得部111は、図2を参照して説明したように、予め設定されたタイミングで、実行中のプログラム(プロセス)やスレッドの情報、システム情報(例えば、OSの種類やバージョンの情報)などを取得する。
The
例えば、取得部111が取得する情報には、第1の実施形態で説明したように、図2に示す測定期間におけるプロセスの合計数(NumOfProcess)及びスレッドの合計数(NumOfThread)や、スレッドごとのCPU使用率、CPU使用率ごとのプロセスの数、CPU使用率ごとのスレッドの数などのデータが含まれる。また、取得部111が取得する情報には、上記スレッドが含まれるプロセスがいずれのアプリケーションであるかを示すアプリケーション情報をさらに取得する。アプリケーション情報は、アプリケーションを識別可能な情報であり、例えばアプリケーションのプログラムの実行ファイル名であってもよいし、アプリケーションの名称であってもよい。そして、取得部111は、取得した情報を取得したタイミングを示す情報と関連付けて、システム情報記憶部191に記憶させる。
For example, as described in the first embodiment, the information acquired by the
算出部112は、取得部111が取得した情報に基づいて、スレッド使用率比を算出する。算出方法は、第1の実施形態と同様である。例えば、算出部112は、CPU101を使用しているスレッドの合計数に対するCPU使用率が所定範囲(例えば1~5%)であるスレッドの数の割合を、スレッド使用率比として算出する。そして、算出部112は、算出したスレッド使用率比を異常検出に用いるパラメータとして算出情報記憶部192に記憶させる。
The
抽出部113は、取得部111が取得した情報に基づいて、図2に示す測定期間においてCPU101を使用している複数のスレッドのうち第1スレッドを含む複数のスレッドの使用率を示す情報)を示す情報を抽出する。例えば、抽出部113は、第1スレッド使用率と、第2スレッド使用率と、第3スレッド使用率を示す情報を抽出する。そして、抽出部113は、抽出した情報を抽出情報記憶部193に記憶させる。
Based on the information acquired by the
また、算出部112は、抽出部113が抽出した第1スレッド使用率と、第2スレッド使用率と、第3スレッド使用率を示す情報に基づいて、複数のスレッド間の使用率の差分を算出する。例えば、算出部112は、第1スレッド使用率と第2スレッド使用率との差分(ProcCpuUsage2diff)と、第1スレッド使用率と第3スレッド使用率との差分(ProcCpuUsage3diff)とを算出する。そして、算出部112は、第1スレッド使用率(ProcCpuUsage1)と、第1スレッド使用率と第2スレッド使用率との差分(ProcCpuUsage2diff)と、第1スレッド使用率と第3スレッド使用率との差分(ProcCpuUsage3diff)とを、異常検出のためのパラメータとして算出情報記憶部192に記憶させる。
Further, the
評価部114は、取得部111が取得したアプリケーション情報に基づいて、第1スレッド、第2スレッド、及び第3スレッドのそれぞれが含まれるアプリケーションが同一のアプリケーションであるか否かに基づいて第1評価値を決定する。例えば、評価部114は、第1スレッドと第3スレッドが同一のアプリケーションに含まれる場合、第1評価値(Same App)を「1」に決定する。また、評価部114は、第1スレッドと第2スレッドが同一のアプリケーションに含まれる場合、第1評価値(Same App)を「2」に決定する。また、評価部114は、第1スレッド、第2スレッド、及び第3スレッドのすべてが同一のアプリケーションに含まれる場合、第1評価値(Same App)を「3」に決定する。そして、評価部114は、第1スレッド、第2スレッド、及び第3スレッドのそれぞれが含まれるアプリケーションの種類に基づいて決定した第1評価値を、異常検出のためのパラメータとして評価情報記憶部194に記憶させる。
The
また、評価部114は、取得部111が取得したアプリケーション情報に基づいて、第1スレッド、第2スレッド、及び第3スレッドのそれぞれが含まれるアプリケーションの種類に基づいて第2評価値を決定する。
例えば、評価部114は、第1スレッドが含まれるアプリケーションの種類がブラウザである場合、第2評価値として評価値(Browser)を「1」に決定する。また、評価部114は、第1スレッドが含まれるアプリケーションの種類がゲームのアプリケーションである場合、第2評価値として評価値(GameApp)を「1」に決定する。また、評価部114は、第1スレッドが含まれるアプリケーションの種類がOSによりバックグラウンドで実行されるアプリケーションである場合、第2評価値として評価値(OSApp)を「1」に決定する。そして、評価部114は、第1スレッド、第2スレッド、及び第3スレッドのそれぞれが含まれるアプリケーションの種類に基づいて決定した第2評価値を、異常検出のためのパラメータとして評価情報記憶部194に記憶させる。
Further, the
For example, when the type of the application including the first thread is a browser, the
異常検出部115は、スレッド使用率比と、第1スレッド使用率、第2スレッド使用率、及び第3スレッド使用率と、各スレッドが含まれるアプリケーションの情報とに基づいて、処理の異常(パフォーマンスの低下など)を検出する。例えば、異常検出部115は、スレッド使用率比に加えて、第1スレッド使用率(ProcCpuUsage1)と、第1スレッド使用率と第2スレッド使用率との差分(ProcCpuUsage2diff)と、第1スレッド使用率と第3スレッド使用率との差分(ProcCpuUsage3diff)とを用いるとともに(図11参照)、アプリケーションの種類に基づく第1評価値及び第2評価値に基づいて、処理の異常を検出する。
The
以下では、第1スレッド使用率(ProcCpuUsage1)と、第1スレッド使用率と第2スレッド使用率との差分(ProcCpuUsage2diff)と、第1スレッド使用率と第3スレッド使用率との差分(ProcCpuUsage3diff)とをまとめて、「スレッド使用率差分情報」と称する。また、アプリケーションの種類に基づく第1評価値及び第2評価値をまとめて、「アプリケーション評価情報」と称する。 In the following, the difference between the 1st thread usage rate (ProcCpuUsage1), the 1st thread usage rate and the 2nd thread usage rate (ProcCpuUsage2diff), and the difference between the 1st thread usage rate and the 3rd thread usage rate (ProcCpuUsage3diff). Are collectively referred to as "thread usage difference information". Further, the first evaluation value and the second evaluation value based on the type of application are collectively referred to as "application evaluation information".
例えば、異常検出部115は、異常を検出するための学習済みモデルである異常検出モデルを用いて処理の異常を検出する。この異常検出モデルは、以前に電子機器10または他の電子機器で取得されたスレッド使用率比、スレッド使用率差分情報、及びアプリケーション評価情報と、異常の有無に関する情報とに基づいて機械学習装置30で機械学習された学習済みモデルである。機械学習の方法は、教師あり学習、教師なし学習、または強化学習などの任意の方法を適用してもよい。電子機器10は、この異常検出モデルを事前に機械学習装置30から通信ネットワークNWや記憶媒体を介して取得し、異常検出モデル記憶部196に記憶している。
For example, the
具体的には、異常検出部115は、算出情報記憶部192、抽出情報記憶部193、及び評価情報記憶部194を参照して、スレッド使用率比、スレッド使用率差分情報、及びアプリケーション評価情報を異常検出モデルへ入力することにより出力される出力結果で正常/異常の判定を行う(図14参照)。
Specifically, the
図14は、各種の機械学習を用いた異常検出結果の正解率(Accuracy)を比較した図である。図示する例では、Linear SVM、Bernoulli Naive Bayes、Random Forest、Random Tree、SGD、Light GBM、XG Boost Classifier、及びNeural Network(Deep Learning)の8種類の機械学習による異常検出結果の正解率を示している。この中では、Neural Network(Deep Learning)が、正解率99.81%で、最も検出精度が良い。 FIG. 14 is a diagram comparing the accuracy rates of abnormality detection results using various machine learning. In the illustrated example, the Liner SVM, Bernoulli Naive Bayes, Random Forest, Random Tree, SGD, LightGBM, XG Boost Classifier, and Neural Network are shown by machine learning (De) There is. Among them, Neural Network (Deep Learning) has a correct answer rate of 99.81% and has the best detection accuracy.
以下検出精度の良い順に、XG Boost Classifier(正解率:99.51%)、Light GBM(正解率:98.94%)、SGD(正解率:98.86%)、Random Tree(正解率:93.71%)、Random Forest(正解率:90.11%)、Bernoulli Naive Bayes(正解率:87.16%)、Linear SVM(正解率:85.04%)、となっている。 Below, in order of increasing detection accuracy, XG Boost Classifier (correct answer rate: 99.51%), Light GBM (correct answer rate: 98.94%), SGD (correct answer rate: 98.86%), Random Tree (correct answer rate: 93). .71%), Random Forest (correct answer rate: 90.11%), Bernoulli Naive Bayes (correct answer rate: 87.16%), Linear SVM (correct answer rate: 85.04%).
上記の結果からすると、検出精度が最も良いNeural Network(Deep Learning)を用いるのが好適であるが、他の機械学習の方法を用いてもよい。例えば、処理の負荷の大きさなどのような検出精度以外の条件も考慮して、他の機械学習の方法を用いてもよい。 From the above results, it is preferable to use a Neural Network (Deep Learning) having the best detection accuracy, but other machine learning methods may also be used. For example, other machine learning methods may be used in consideration of conditions other than detection accuracy such as the magnitude of the processing load.
(異常検出処理の動作)
次に、電子機器10において制御部110Aが実行する異常検出処理の動作について説明する。図15は、本実施形態に係る異常検出処理の一例を示すフローチャートである。
(ステップS201)制御部110Aは、予め設定されたタイミングで、電子機器10のシステムの状態情報を取得する。例えば、制御部110Aは、スレッドごとのCPU使用率を示す情報、各スレッドのアプリケーション情報などを取得する。そして、制御部110Aは、取得した情報を取得したタイミングを示す情報と関連付けて、システム情報記憶部191に記憶させる。そして、ステップS203の処理に進む。
(Operation of abnormality detection processing)
Next, the operation of the abnormality detection process executed by the
(Step S201) The
(ステップS203)制御部110Aは、ステップS201で取得した情報に基づいて、スレッド使用率比を算出する。例えば、制御部110Aは、測定期間においてCPU101を使用しているスレッドの合計数に対するCPU使用率が1~5%であるスレッドの数の割合を、スレッド使用率比として算出する。そして、制御部110Aは、算出したスレッド使用率比を、異常検出に用いるパラメータとして算出情報記憶部192に記憶させる。そして、ステップS205の処理に進む。
(Step S203) The
(ステップS205)制御部110Aは、ステップS201で取得した情報に基づいて、第1スレッド使用率と、第2スレッド使用率と、第3スレッド使用率を示す情報を抽出する。そして、制御部110Aは、抽出した情報を抽出情報記憶部193に記憶させ、ステップS207の処理に進む。
(Step S205) The
(ステップS207)制御部110Aは、第1スレッド使用率と第2スレッド使用率との差分、及び第1スレッド使用率と第3スレッド使用率との差分とを算出する。そして、制御部110Aは、第1スレッド使用率と、第1スレッド使用率と第2スレッド使用率との差分と、第1スレッド使用率と第3スレッド使用率との差分とが含まれるスレッド使用率差分情報を、異常検出のためのパラメータとして算出情報記憶部192に記憶させる。そして、ステップS209の処理に進む。
(Step S207) The
(ステップS209)制御部110Aは、ステップS201で取得した情報に基づいて、
第1スレッド、第2スレッド、及び第3スレッドのそれぞれが含まれるアプリケーションの種類に基づいて評価値を決定する。例えば、制御部110Aは、第1スレッド、第2スレッド、及び第3スレッドのそれぞれが含まれるアプリケーションが同一のアプリケーションであるか否かに基づいて第1評価値を決定する(図11参照)。また、制御部110Aは、第1スレッド、第2スレッド、及び第3スレッドのそれぞれが含まれるアプリケーションの種類に基づいて第2評価値を決定する。そして、制御部110Aは、第1スレッド、第2スレッド、及び第3スレッドのそれぞれが含まれるアプリケーションの種類に基づいて決定した第1評価値及び第2評価値が含まれるアプリケーション評価情報を、異常検出のためのパラメータとして評価情報記憶部194に記憶させる。そして、ステップS211の処理に進む。
(Step S209) The
The evaluation value is determined based on the type of application including each of the first thread, the second thread, and the third thread. For example, the
(ステップS211)制御部110Aは、スレッド使用率比、スレッド使用率差分情報、及びアプリケーション評価情報に基づいて、処理の異常(パフォーマンスの低下など)を検出する。例えば、制御部110Aは、スレッド使用率比、スレッド使用率差分情報、及びアプリケーション評価情報を異常検出モデルへ入力することにより出力される出力結果で正常/異常の判定を行う。そして、ステップS213の処理に進む。
(Step S211) The
(ステップS213)制御部110Aは、異常を検出したか否かを判定する。制御部110Aは、異常を検出したと判定した場合(YES)、ステップS215の処理に進む。一方、制御部110は、異常を検出しないと判定した場合(NO)、異常検出処理を終了する。
(Step S213) The
(ステップS215)制御部110Aは、異常を検出した場合、異常を示す異常情報を生成し、異常情報記憶部195に記憶させる。例えば、異常情報には、異常の内容(パフォーマンス低下」、異常なプロセス、異常なスレッドなどを示す情報が含まれる。また、制御部110Aは、異常を検出した場合、異常情報に基づく表示情報を表示部12に表示させ、異常が検出されたことをユーザに通知する。
(Step S215) When the
以上説明したように、本実施形態に係る電子機器10は、CPU101(プロセッサの一例)を使用しているスレッドごとのCPU使用率を示す情報と、当該スレッドが含まれるアプリケーションを示す情報を取得する。また、電子機器10は、取得した情報に基づいて、スレッド使用率比(第1情報の一例)を算出する。さらに、電子機器10は、取得した情報に基づいて、CPU101を使用しているスレッドの中から第1スレッドを含む複数のスレッドの使用率を示す情報(第2情報の一例)を抽出するとともに、抽出した複数のスレッドのそれぞれが含まれるアプリケーションを示す情報(第3情報の一例)を抽出する。そして、電子機器10は、スレッド使用率比と、第1スレッドを含む複数のスレッドの使用率を示す情報と、当該スレッドが含まれるアプリケーションを示す情報とに基づいて、処理の異常を検出する。
As described above, the
これにより、電子機器10は、実行中の処理におけるスレッド使用率比のみではなく、第1スレッドを含む複数のスレッドの使用率、及び当該スレッドのそれぞれが含まれるアプリケーション情報も用いることにより、実行中の処理の異常を精度よく検出することができる。例えば、同一のアプリケーションが複数のスレッドを高い使用率で占有している場合、CPU101の処理が異常な処理になっている可能性が高いことから、電子機器10は、その特徴を含むパラメータとして上記の第1情報と第2情報と第3情報とを用いることで、精度よく異常を検出することができる。
As a result, the
例えば、上記第1スレッドを含む複数のスレッドの使用率は、第1スレッドの使用率(第1スレッド使用率)と、第1スレッドの次に最も使用された第2スレッドの使用率(第2スレッド使用率)と、第2スレッドの次に最も使用された第3スレッドの使用率(第3スレッド使用率)とを含む。 For example, the usage rates of the plurality of threads including the first thread are the usage rate of the first thread (first thread usage rate) and the usage rate of the second thread most used after the first thread (second thread usage rate). The thread usage rate) and the usage rate of the third thread most used after the second thread (third thread usage rate) are included.
これにより、電子機器10は、実行中の処理において、スレッド使用率が上位のスレッドの使用率を用いて異常を検出することにより、検出精度を向上させることができる。
As a result, the
具体的には、電子機器10は、第1スレッドを含む複数のスレッドの使用率を示す情報(第2情報の一例)に含まれる複数のスレッド間の使用率の差分を算出する。例えば、電子機器10は、第1スレッド使用率と第2スレッド使用率との差分、及び第1スレッド使用率と第3スレッド使用率との差分を算出する。そして、電子機器10は、処理の異常を検出する際に、スレッド使用率比及び第1スレッド使用率に加え、上記複数のスレッド間の使用率の差分に基づく情報をさらに用いて検出する。
Specifically, the
これにより、電子機器10は、複数のスレッド間のスレッド使用率の差分をさらに用いて異常を検出することにより、検出精度を向上させることができる。例えば、電子機器10は、スレッド使用率が上位の複数のスレッド間のスレッド使用率の差分をさらに用いて異常を検出することにより、検出精度を向上させることができる。
As a result, the
また、電子機器10は、第1スレッドを含む複数のスレッド(例えば、第1スレッド、第2スレッド、及び第3スレッド)のそれぞれが含まれるアプリケーションのそれぞれが同一のアプリケーションであるか否かに基づいて第1評価値を決定する。そして、電子機器10は、処理の異常を検出する際に、上記第1評価値をさらに用いて検出する。
Further, the
これにより、電子機器10は、スレッド使用率が上位のスレッドが同一のアプリケーションであるか否かに基づいて異常を検出することにより、検出精度を向上させることができる。
As a result, the
また、電子機器10は、第1スレッドを含む複数のスレッド(例えば、第1スレッド、第2スレッド、及び第3スレッド)のそれぞれが含まれるアプリケーションのそれぞれの種類に基づいて第2評価値を決定する。そして、電子機器10は、処理の異常を検出する際に、上記第2評価値をさらに用いて検出する。
Further, the
これにより、電子機器10は、スレッド使用率が上位のスレッドが含まれるアプリケーションの種類に基づいて異常を検出することにより、検出精度を向上させることができる。
As a result, the
つまり、電子機器10は、スレッド使用率比(第1情報に基づく情報の一例)、スレッド使用率差分情報(第2情報に基づく情報の一例)、及びアプリケーション評価情報(第3情報に基づく情報の一例)に基づいて、処理の異常を検出する。
That is, the
これにより、電子機器10は、実行中の処理におけるスレッド使用率比のみではなく、スレッド使用率差分情報、及びアプリケーション評価情報も用いるため、実行中の処理の異常を精度よく検出することができる。例えば、同一のアプリケーションが複数のスレッドを高い使用率で占有している場合、CPU101の処理が異常な処理になっている可能性が高いことから、電子機器10は、その特徴を含むパラメータとして上記のスレッド使用率比とスレッド使用率差分情報とアプリケーション評価情報とを用いることで、精度よく異常を検出することができる。
As a result, since the
例えば、電子機器10は、以前に取得されたスレッド使用率比(第1情報に基づく情報の一例)、スレッド使用率差分情報(第2情報に基づく情報の一例)、及びアプリケーション評価情報(第3情報に基づく情報の一例)と、異常の有無に関する情報とに基づいて機械学習された学習済みモデルを用いて、処理の異常を検出する。
For example, the
これにより、電子機器10は、実行中の処理におけるスレッド使用率比とスレッド使用率差分情報とアプリケーション評価情報とからAIを用いて精度よく異常を検出することができる。
As a result, the
また、異常検出モデルは、プログラムに基づいて処理を実行するCPU101を備える電子機器10における処理の異常を検出するための学習済みモデルの一例である。異常検出モデルは、スレッド使用率比(第1情報の一例)と、スレッド使用率差分情報(第2情報に基づく情報の一例)、及びアプリケーション評価情報(第3情報に基づく情報の一例)とに基づいて機械学習され、上記処理の異常を検出するようコンピュータを機能させる。
Further, the abnormality detection model is an example of a trained model for detecting an abnormality in processing in an
これにより、電子機器10は、実行中の処理におけるスレッド使用率比とスレッド使用率差分情報とアプリケーション評価情報とからAIを用いて精度よく異常を検出することができる。
As a result, the
なお、スレッド使用率差分情報には、第1スレッド使用率と、第1スレッド使用率と第2スレッド使用率との差分と、第1スレッド使用率と第3スレッド使用率との差分との3つのパラメータが含まれる例を説明したが、これに限られるものではない。例えば、スレッド使用率差分情報には、第1スレッド使用率と、第1スレッド使用率と第2スレッド使用率との差分との2つのパラメータのみが含まれてもよいし、第1スレッド使用率と、第1スレッド使用率と第3スレッド使用率との差分との2つのパラメータのみが含まれてもよい。また、スレッド使用率差分情報に代えて、第1スレッド使用率と第2スレッド使用率と第3スレッド使用率とが含まれるスレッド使用率情報を異常検出に用いてもよい。 The thread usage difference information includes the difference between the first thread usage rate, the first thread usage rate and the second thread usage rate, and the difference between the first thread usage rate and the third thread usage rate. An example involving two parameters has been described, but is not limited to this. For example, the thread usage difference information may include only two parameters, the first thread usage rate and the difference between the first thread usage rate and the second thread usage rate, or the first thread usage rate. And only two parameters, the difference between the first thread usage rate and the third thread usage rate, may be included. Further, instead of the thread usage rate difference information, thread usage rate information including the first thread usage rate, the second thread usage rate, and the third thread usage rate may be used for abnormality detection.
また、第1スレッド使用率、第2スレッド使用率、及び第3スレッド使用率の上位3つのスレッド使用率を用いたが、これに限られるものではない。例えば、第1スレッド使用率及び第2スレッド使用率の上位2つのスレッド使用率を用いてもよいし、上位3つのうちのいずれか2つのスレッド使用率を用いてもよい。また、第1~第4スレッド使用率などのように、4つ以上のスレッド使用率を用いて、書くスレッド間のスレッド使用率の差分を算出して、スレッド使用率差分情報に含めてもよい。 Further, the top three thread usage rates of the first thread usage rate, the second thread usage rate, and the third thread usage rate are used, but the present invention is not limited to this. For example, the top two thread usage rates of the first thread usage rate and the second thread usage rate may be used, or any two of the top three threads may be used. Further, the difference in the thread usage rate between the threads to be written may be calculated by using four or more thread usage rates such as the first to fourth thread usage rates and included in the thread usage rate difference information. ..
また、アプリケーション評価情報に、同一のアプリケーションであるか否かに基づく第1評価値と、アプリケーションの種類に基づく第2評価値が含まれる例を説明したが、第1評価値と第2評価値のいずれか一方のむが含まれてもよい。 Further, an example in which the application evaluation information includes the first evaluation value based on whether or not the application is the same and the second evaluation value based on the type of application has been described, but the first evaluation value and the second evaluation value have been described. One of the following may be included.
また、第1スレッド、第2スレッド、及び第3スレッドの3つのスレッドについて同一であるか否かに基づいて第1評価値が決定される例を説明したが、第1スレッド、第2スレッド、及び第3スレッドのうちのいずれか2つのスレッドについて同一であるか否かに基づいて第1評価値が決定されてもよい。また、4つ以上のレッドについて同一であるか否かに基づいて第1評価値が決定されてもよい。 Further, an example in which the first evaluation value is determined based on whether or not the three threads of the first thread, the second thread, and the third thread are the same has been described. And the first evaluation value may be determined based on whether or not it is the same for any two threads of the third thread. Further, the first evaluation value may be determined based on whether or not the four or more reds are the same.
また、第2評価値の例として、アプリケーションの種類がブラウザである場合、ゲームのアプリケーションである場合、またはOSによりバックグラウンドで実行されるアプリケーションである場合について説明したが、他の種類のアプリケーションについても第2評価値が適用されてもよい。 Further, as an example of the second evaluation value, a case where the application type is a browser, a game application, or an application executed in the background by the OS has been described, but other types of applications have been described. The second evaluation value may also be applied.
[第3の実施形態]
本実施形態では、異常検出システム1で異常検出処理に用いる学習済みモデル(異常検出モデル)を生成する機械学習装置30の構成について説明する。
図16は、本実施形態に係る機械学習装置30の構成の一例を示すブロック図である。機械学習装置30は、通信部310と、学習データ設定部320と、学習データ記憶部330と、学習部340と、出力部350とを備えている。
[Third Embodiment]
In this embodiment, the configuration of the
FIG. 16 is a block diagram showing an example of the configuration of the
通信部310は、例えば、複数のイーサネット(登録商標)ポートや複数のUSB等のデジタル入出力ポート、WiFi(登録商標)や携帯電話回線などの無線通信ポート等を含んで構成され、通信ネットワークNW(図1参照)を介して他の装置や端末などと通信を行う。
The
学習データ設定部320は、学習済みモデルを生成するために必要な情報を取得する。例えば、学習データ設定部320は、以前に電子機器10または他の電子機器で取得されたシステムの状態情報に基づく情報を、学習済みモデルを生成するために必要な情報として通信部310または光ディスクやメモリカードなどの記憶媒体などを介して取得する。システムの状態情報に基づく情報とは、例えば第1の実施形態に係る異常検出処理では、スレッド使用率比及び第1スレッド使用率を示す情報である。また、例えば、第2の実施形態に係る異常検出処理では、スレッド使用率比、スレッド使用率差分情報、及びアプリケーション評価情報である。
The training
また、学習データ設定部320は、取得したシステムの状態情報に基づく情報に対応する異常の有無に関する情報を取得する。異常の有無とは、システムの状態情報が測定された時点での処理の状態が異常であるか否か(正常/異常)をオペレータや技術者などが判定した結果である。すなわち、この異常の有無に関する情報とは、実際に異常であったか否かを示す情報である。
Further, the learning
なお、学習データ設定部320は、以前に電子機器10または他の電子機器で取得されたシステムの状態情報を通信部310または記憶媒体などを介して取得し、取得したシステムの状態情報に基づいて、スレッド使用率比、第1スレッド使用率、スレッド使用率差分情報、及びアプリケーション評価情報などを、学習済みモデルを生成するために必要なシステムの状態情報に基づく情報として生成し、取得してもよい。その場合、学習データ設定部320は、図7または図13に示す算出部112、抽出部113、及び評価部114に相当する構成の一部または全部を備えてもよい。
The learning
また、学習データ設定部320は、取得したシステムの状態情報に基づく情報と異常の有無に関する情報とを関連付けた関連付け情報を学習データセットとして学習データ記憶部330に記憶させる。これにより、学習データ記憶部330には、以前に電子機器10または他の電子機器で取得されたシステムの状態情報に基づく情報と異常の有無に関する情報とが関連付けられた学習データセットが複数蓄積される。なお、学習データ設定部320は、電子機器10または他の電子機器でシステムの状態情報が測定されるたびに随時システムの状態情報に基づく情報と異常の有無に関する情報とを取得してもよいし、所定のタイミングで定期的にまとめて取得してもよい。
Further, the learning
学習部340は、システムの状態情報に基づく情報と異常の有無に関する情報とが関連付けられた学習データセットを用いて、次の機械学習を行う。具体的には、学習部340は、学習データセットを学習データ記憶部330から読み込む。学習部340は、読み込んだ学習データセットを用いて機械学習を行い、学習済みモデルを生成する。出力部350は、学習済みモデルを、通信部310を介して異常検出システム1へ送信する。これにより、異常検出システム1の学習モデル記憶部234に学習済みモデルが格納されて利用可能となる。なお、学習済みモデルは、通信部310に代えて、光ディスクやメモリカードなどの記憶媒体を介して異常検出システム1の学習モデル記憶部234に格納されてもよい。また、学習済みモデルは、機械学習装置30で機械学習が進むにつれて更新されてもよい。
The
<学習段階>
次に、機械学習の具体例について説明する。学習部340は、学習用のニューラルネットワークに対して、システムの状態情報に基づく情報を入力層に入力する入力変数とし、異常の有無に関する情報を出力層から出力される出力変数として設定する。
<Learning stage>
Next, a specific example of machine learning will be described. The
(ニューラルネットワークについて)
図17は、本実施形態に係るニューラルネットワークの一例を説明するための模式図である。この図のニューラルネットワークは、L個の層lから構成される。l=1の層は入力層、l=2~L-1の層は中間層或いは隠れ層、l=Lの層は出力層とも呼ばれる。
入力層のN個のノードは、xn(n=1、2、3、・・・N)である。つまり、ニューラルネットワークは、入力層に、xnを要素とするベクトルx(=(x1、x2、x3、・・・xN))が入力される。出力層の出力は、M個のym(m=1、2、3、・・・M)である。つまり、ニューラルネットワークは、出力層から、ymを要素とするベクトルy(=(y1、y2、y3、・・・yM))を出力する。
(About neural network)
FIG. 17 is a schematic diagram for explaining an example of the neural network according to the present embodiment. The neural network in this figure is composed of L layers l. The layer with l = 1 is also called an input layer, the layer with l = 2 to L-1 is also called an intermediate layer or a hidden layer, and the layer with l = L is also called an output layer.
The N nodes in the input layer are x n (n = 1, 2, 3, ... N). That is, in the neural network, a vector x (= (x 1 , x 2 , x 3 , ... X N )) having x n as an element is input to the input layer. The output of the output layer is M ( m = 1, 2, 3, ... M). That is, the neural network outputs a vector y (= (y 1 , y 2 , y 3 , ... y M )) having ym as an element from the output layer.
第l層のノードからは、ベクトルu(l+1)が関数f(u(l+1))に入力された値として、ベクトルz(l+1)が出力される。ベクトルu(l+1)は、第l層のノードから出力されるベクトルz(l)に、重み行列w(l+1)を左から乗算し、ベクトルb(l+1)を加算したベクトルである。関数f(u(l))は、活性化関数であり、ベクトルb(l)は、バイアスである。なお、入力層から出力されるベクトルz(1)は、ベクトルxである。 From the node of the first layer, the vector z (l + 1) is output as the value in which the vector u (l + 1) is input to the function f (u (l + 1) ). The vector u (l + 1) is a vector obtained by multiplying the vector z (l) output from the node of the first layer by the weight matrix w (l + 1) from the left and adding the vector b (l + 1) . The function f (u (l) ) is an activation function, and the vector b (l) is a bias. The vector z (1) output from the input layer is a vector x.
(学習処理について)
図18は、本実施形態に係る学習処理の一例を説明するための模式図である。
図18は、図17のニューラルネットワークを用いた学習処理を表す。
学習段階において、ベクトルXiと、教師データとしてのベクトルYiとの組は、学習データセットとされる。ベクトルXiはベクトルxに値が設定されたベクトルであり、ベクトルYiはベクトルyに値が設定されたベクトルである。ニューラルネットワークは、I個の学習データセット(Xi、Yi)(i=1~I)に基づいて、重み行列w(l)が更新される。
(About learning process)
FIG. 18 is a schematic diagram for explaining an example of the learning process according to the present embodiment.
FIG. 18 shows a learning process using the neural network of FIG.
In the learning stage, the pair of the vector X i and the vector Y i as teacher data is regarded as a learning data set. The vector X i is a vector in which a value is set in the vector x, and the vector Y i is a vector in which a value is set in the vector y. In the neural network, the weight matrix w (l) is updated based on I training data sets (X i , Y i ) (i = 1 to I).
具体的には、重み行列w(l)に、初期値が設定される。入力層にデータXiが入力された場合、重み行列w(l)に値が設定されたニューラルネットワークは、出力層から、データXに応じたベクトルy(y(Xi)と表す)を出力する。ベクトルy(Xi)とデータYiの誤差Eは、損失関数を用いて計算される。第l層の勾配ΔEl+1は、各層からの出力zl+1と誤差信号δl+1を用いて計算される。誤差信号δl+1は、誤差信号δlを用いて計算される。なお、このように、出力層側から入力層側へ誤差信号を伝えていくことは、逆伝搬とも呼ばれる。
重み行列w(l)は、勾配ΔEl+1に基づいて更新される。この重み行列w(l)の更新は、I個の学習データセット(Xi、Yi)(i=1~I)に対して、順次、行われる。I個の学習データセット(Xi、Yi)によって重み行列w(l)が更新されたニューラルネットワークが、学習済みモデルである。
Specifically, an initial value is set in the weight matrix w (l) . When data X i is input to the input layer, the neural network whose value is set in the weight matrix w (l) outputs a vector y (expressed as y (X i )) corresponding to the data X from the output layer. do. The error E between the vector y (X i ) and the data Y i is calculated using the loss function. The gradient ΔE l + 1 of the first layer is calculated using the output z l + 1 from each layer and the error signal δ l + 1 . The error signal δ l + 1 is calculated using the error signal δ l . In addition, transmitting the error signal from the output layer side to the input layer side in this way is also called back propagation.
The weight matrix w (l) is updated based on the gradient ΔE l + 1 . The update of the weight matrix w (l) is sequentially performed for I training data sets (X i , Y i ) (i = 1 to I). The trained model is a neural network in which the weight matrix w (l) is updated by I training data sets (X i , Y i ).
(ニューラルネットワークの設定の実施例)
学習部340は、システムの状態情報に基づく情報の各々をベクトルXiとし、異常の有無に関する情報をベクトルYiとして、学習処理を行う。学習部340は、I個の学習データセット(Xi、Yi)(i=1~I)に基づいて、逆伝搬によって重み行列w(l)を更新することで、学習処理を行う。学習処理の結果、学習部340は、重み行列w(l)が更新されたニューラルネットワークを、学習済みモデルとして取得する。つまり、学習部340は、システムの状態情報に基づく情報と異常の有無に関する情報とに基づいて、学習済みモデルを生成する。例えば、学習部340は、スレッド使用率比及び第1スレッド使用率を示す情報と異常の有無に関する情報とに基づいて、CPU101による処理の異常を検出するための学習済みモデルを生成する。また、学習部340は、スレッド使用率比、スレッド使用率差分情報、及びアプリケーション評価情報と異常の有無に関する情報とに基づいて、CPU101による処理の異常を検出するための学習済みモデルを生成する。
(Example of neural network setting)
The
ここで、学習部340は、ニューラルネットワークの層数(L)として、任意の層数を設定することができる。
学習部340は、各層のノードの数(「ノード数」とも称する)として、入力層(l=1の層)のノード数をN個、中間層(l=2の層)のノード数を(M+N)÷2個、出力層(l=3の層)のノード数をM個に設定する。ただし、本発明はこれに限らず、中間層のノード数は、N個又はM個であってもよいし、N個以下、M個以上の個数であってもよい。また、中間層のノード数は、N個以上であってもよいし、M個以上であってもよい。
Here, the
The
学習部340は、ニューラルネットワークの各層の結合として、全結合を設定する。ただし、本発明はこれに限らず、一部或いは全ての層の結合は、非全結合に設定されてもよい。
学習部340は、活性化関数として、全ての層の活性化関数にシグモイド関数を設定する。ただし、本発明はこれに限らず、各層の活性化関数は、ステップ関数、線形結合、ソフトサイン、ソフトプラス、ランプ関数、切断冪関数、多項式、絶対値、動径基底関数、ウェーブレット、maxout等、他の活性化関数であってもよい。また、ある層の活性化関数は、他の層とは異なる種類であってもよい。
The
The
学習部340は、誤差関数として、二乗損失(平均二乗誤差)を設定する。ただし、本発明はこれに限らず、誤差関数は、交差エントロピー、τ-分位損失、Huber損失、ε感度損失(ε許容誤差関数)であってもよい。また、学習部340は、勾配を計算するアルゴリズム(勾配降下アルゴリズム)として、SGD(確率的勾配降下)を設定する。ただし、本発明はこれに限らず、勾配降下アルゴリズムには、Momentum(慣性項) SDG、AdaGrad、RMSprop、AdaDelta、Adam(Adaptive moment estimation)等が用いられても良い。
学習部340は、パーセプトロンのニューラルネットワークに限らず、畳み込みニューラルネットワーク(CNN)、再起型ニューラルネットワーク(RNN)、残差ネットワーク(ResNet)等の他のニューラルネットワークを設定してもよい。
The
The
<実行段階>
電子機器10の異常検出部115は、学習部340が生成した学習済みモデルに対して、現在のシステムの状態情報に基づく情報を入力することで、CPU101による処理の異常の有無(正常/異常)を出力する。具体的には、異常検出部115は、実行段階で取得したシステムの状態情報に基づく情報を、ベクトルxとして入力し、ベクトルyを異常の有無に関する情報として出力する。
このように、異常検出部115は、システムの状態情報に基づく情報と学習部340の学習結果に基づいて、異常の有無に関する情報を出力する。これにより、異常検出部115は、CPU101による処理の異常を検出することができる。
<Execution stage>
The
In this way, the
<学習の変形例>
なお、上記実施形態において、学習処理は、教師なし学習、ニューラルネットワーク以外の教師あり学習、又は、強化学習を用いた学習処理であってもよい。
<Example of learning variant>
In the above embodiment, the learning process may be unsupervised learning, supervised learning other than a neural network, or learning process using reinforcement learning.
(教師なし学習)
学習部340は、I個の学習データセット(Xi、Yi)(i=1~I)について、回帰又は分類を行うことで、教師なし学習の学習処理を行ってもよい。
学習部340は、一または複数の関数のモデルに対して、I個の学習データセット(Xi、Yi)との誤差が小さくなるように、変数を決定する。学習部340は、変数を決定したモデルを、回帰による学習済みモデルとして生成してもよい。
学習部340は、I個の学習データセット(Xi、Yi)を、クラスタリングによって部分集合に分類する。学習部340は、各部分集合(クラスタ)の境界を示す情報を、分類による学習済みモデルとしてもよい。クラスタリングは、単リンク法、完全リンク法、群平均法、セントロイド法、重み付き平均法、メジアン法等の階層的なアルゴリズムであってもよい。また、クラスタリングは、K-means法等の非階層的であってもよい。なお、K-means法の場合、クラスタ数は、予め定められていてもよいし、コンピュータが手動或いは自動で設定してもよい。
(Unsupervised learning)
The
The
The
(教師あり学習)
学習部340は、ニューラルネットワークに限らず、決定木、回帰木、ランダムフォレスト、勾配ブースティング木、線形回帰、ロジスティック回帰、SVM(サポートベクターマシン)等によって、教師あり学習の学習処理を行ってもよい。
決定木による学習処理を行う場合、学習部340は、I個の学習データセット(Xi、Yi)について、ベクトルXiを独立変数に設定し、ベクトルYiを従属変数と設定する。
(Supervised learning)
The
When performing the learning process using the decision tree, the
(強化学習)
学習部340は、学習データセット(Xi、Yi)を用いて、強化学習の学習処理を行ってもよい。例えば、学習部340は、強化学習として、Q値を用いた強化学習(Q学習)を行う。学習部340は、ベクトルYiに基づいて、Q(s、a)を計算する。ここで、sは状態、aは行動を表し、学習部340は、状態sや行動aをベクトルXiに基づいた値であってもよい。なお、本発明はQ学習に限らず、強化学習には、Sarsa、又は、モンテカルロ法が用いられてもよい。
(Reinforcement learning)
The
<変数の変形例>
なお、上記実施形態において、学習データセット(Xi、Yi)は、システムの状態情報に基づく情報と異常の有無に関する情報との一部が用いられても良い。つまり、学習部340は、システムの状態情報に基づく情報と異常の有無に関する情報との組のうち、これらの情報の一部或いはそれらの組み合わせが、予め定められた条件を満たすものを、学習データセット(Xi、Yi)としてもよい。また、学習部340は、システムの状態情報に基づく情報と異常の有無に関する情報との一部或いは全部について、予め定めたルールに従って変換した値を、学習データセット(Xi、Yi)に用いてもよい。例えば、学習部340は、システムの状態情報に基づく情報と異常の有無に関する情報ととの一部或いは全部について、時間変化、空間での変化、又は、異なる測定機会との差分を、学習データセット(Xi、Yi)として用いてもよい。
<Variable transformation example>
In the above embodiment, as the learning data set (X i , Y i ), a part of the information based on the state information of the system and the information regarding the presence or absence of an abnormality may be used. That is, the
以上、図面を参照してこの発明の実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。例えば、各実施形態で説明した構成は、任意に組み合わせてもよい。 Although the embodiments of the present invention have been described in detail with reference to the drawings, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the gist of the present invention. It is possible to do. For example, the configurations described in each embodiment may be combined arbitrarily.
また、上記実施形態では、学習済みモデルを用いて異常の検出を行なう例を説明したが、これに限られるものではない。例えば、第1の実施形態において、学習済みモデルを使用せずに、スレッド使用率比及び第1スレッド使用率の一部または全部と異常の有無(正常or異常)とが関連付けられたデータテーブルを用いて異常の検出を行なうように構成されてもよい。また、学習済みモデルを使用せずに、スレッド使用率比及び第1スレッド使用率に基づいて異常を検出するアルゴリズムを具現化したプログラムを用いて異常の検出を行なうように構成されてもよい。また、第2の実施形態でも同様に、学習済みモデルを使用せずに、スレッド使用率比、スレッド使用率差分情報、及びアプリケーション評価情報の一部または全部と、異常の有無(正常or異常)とが関連付けられたデータテーブルを用いて異常の検出を行なうように構成されてもよい。また、学習済みモデルを使用せずに、スレッド使用率比、スレッド使用率差分情報、及びアプリケーション評価情報に基づいて異常を検出するアルゴリズムを具現化したプログラムを用いて異常の検出を行なうように構成されてもよい。 Further, in the above embodiment, an example of detecting an abnormality using a trained model has been described, but the present invention is not limited to this. For example, in the first embodiment, a data table in which the thread usage ratio and a part or all of the first thread usage rate are associated with the presence or absence of an abnormality (normal or abnormal) without using the trained model is used. It may be configured to be used to detect anomalies. Further, instead of using the trained model, it may be configured to detect anomalies by using a program that embodies an algorithm for detecting anomalies based on a thread utilization ratio and a first thread utilization rate. Similarly, in the second embodiment, the presence / absence of abnormality (normal or abnormal) with a part or all of the thread usage ratio, the thread usage difference information, and the application evaluation information without using the trained model. It may be configured to detect anomalies using a data table associated with. In addition, it is configured to detect anomalies using a program that embodies an algorithm that detects anomalies based on thread utilization ratio, thread utilization difference information, and application evaluation information, without using a trained model. May be done.
また、上記実施形態では、システム処理部100と独立に動作するEC18は、センサハブ、チップセット、などのいずれの処理部であってもよく、EC18以外の処理部がEC18に代えて上述の処理を実行してもよい。また、システム処理部100とEC18とは、一体化された集積回路で構成されてもよい。
Further, in the above embodiment, the EC18 that operates independently of the
なお、上述した電子機器10は、内部にコンピュータシステムを有している。そして、上述した電子機器10が備える各構成の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより上述した電子機器10が備える各構成における処理を行ってもよい。ここで、「記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行する」とは、コンピュータシステムにプログラムをインストールすることを含む。ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータシステム」は、インターネットやWAN、LAN、専用回線等の通信回線を含むネットワークを介して接続された複数のコンピュータ装置を含んでもよい。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。このように、プログラムを記憶した記録媒体は、CD-ROM等の非一過性の記録媒体であってもよい。
The above-mentioned
また、記録媒体には、当該プログラムを配信するために配信サーバからアクセス可能な内部又は外部に設けられた記録媒体も含まれる。なお、プログラムを複数に分割し、それぞれ異なるタイミングでダウンロードした後に電子機器10が備える各構成で合体される構成や、分割されたプログラムのそれぞれを配信する配信サーバが異なっていてもよい。さらに「コンピュータ読み取り可能な記録媒体」とは、ネットワークを介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。また、上記プログラムは、上述した機能の一部を実現するためのものであってもよい。さらに、上述した機能をコンピュータシステムに既に記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。
The recording medium also includes an internal or external recording medium accessible from the distribution server for distributing the program. It should be noted that the program may be divided into a plurality of parts, downloaded at different timings, and then combined with each configuration included in the
また、上述した実施形態における電子機器10が備える各機能の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現してもよい。各機能は個別にプロセッサ化してもよいし、一部、又は全部を集積してプロセッサ化してもよい。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現してもよい。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いてもよい。
Further, a part or all of each function of the
また、上記実施形態の電子機器10は、パーソナルコンピュータに限られるものではなく、スマートフォンなどの携帯型の端末装置であってもよいし、ゲーム装置、家庭用電気製品、業務用電気製品など各種の電子機器に適用できる。
Further, the
1 異常検出システム、10 電子機器、11 通信部、12 表示部、13 スピーカ、14 入力部、15 電源部、16 ファン、17 温度センサ、18 EC、19 記憶部、20 データベース、30 機械学習装置、100 システム処理部、101 CPU、102 GPU、103 メモリコントローラ、104 I/Oコントローラ、105 システムメモリ、110,110A 制御部、111 取得部、112 算出部、113 抽出部、114 評価部、115 異常検出部、191 システム情報記憶部、192 算出情報記憶部、193 抽出情報記憶部、194 評価情報記憶部、195 異常情報記憶部、196 異常検出モデル記憶部 1 Anomaly detection system, 10 Electronic devices, 11 Communication section, 12 Display section, 13 Speaker, 14 Input section, 15 Power supply section, 16 Fan, 17 Temperature sensor, 18 EC, 19 Storage section, 20 Database, 30 Machine learning device, 100 System processing unit, 101 CPU, 102 GPU, 103 memory controller, 104 I / O controller, 105 system memory, 110, 110A control unit, 111 acquisition unit, 112 calculation unit, 113 extraction unit, 114 evaluation unit, 115 abnormality detection Unit, 191 system information storage unit, 192 calculation information storage unit, 193 extraction information storage unit, 194 evaluation information storage unit, 195 abnormality information storage unit, 196 abnormality detection model storage unit.
Claims (10)
前記プロセッサを使用しているスレッドごとの前記プロセッサの使用率を示す情報を取得する取得部と、
前記取得部が取得した情報に基づいて、前記プロセッサを使用しているスレッドの合計数に対する前記プロセッサの使用率が所定範囲であるスレッドの数の割合を示す第1情報を算出する算出部と、
前記取得部が取得した情報に基づいて、前記プロセッサを使用しているスレッドのうち最も使用されたスレッドである第1スレッドの使用率を示す第2情報を抽出する抽出部と、
前記第1情報と前記第2情報とに基づいて前記処理の異常を検出する異常検出部と、
を備える電子機器。 A processor that executes processing based on a program, and
An acquisition unit that acquires information indicating the usage rate of the processor for each thread using the processor, and an acquisition unit.
Based on the information acquired by the acquisition unit, a calculation unit that calculates first information indicating the ratio of the number of threads whose usage rate of the processor is within a predetermined range to the total number of threads using the processor, and a calculation unit.
Based on the information acquired by the acquisition unit, an extraction unit that extracts second information indicating the usage rate of the first thread, which is the most used thread among the threads using the processor, and an extraction unit.
An abnormality detection unit that detects an abnormality in the process based on the first information and the second information.
Electronic equipment equipped with.
以前に取得された前記第1情報、前記第2情報、及び異常の有無に関する情報に基づいて機械学習された学習済みモデルを用いて、前記処理の異常を検出する、
請求項1に記載の電子機器。 The abnormality detection unit is
Using a trained model machine-learned based on previously acquired first information, second information, and information regarding the presence or absence of anomalies, anomalies in the processing are detected.
The electronic device according to claim 1.
前記プロセッサを使用しているスレッドが含まれるアプリケーションを示す情報をさらに取得し、
前記抽出部は、
前記取得部が取得した情報に基づいて、前記プロセッサを使用しているスレッドの中から前記第1スレッドを含む複数のスレッドの使用率を示す情報を前記第2情報として抽出するとともに、前記第2情報として抽出した複数のスレッドのそれぞれが含まれるアプリケーションを示す第3情報を抽出し
前記異常検出部は、
前記第1情報と前記第2情報と前記第3情報とに基づいて前記処理の異常を検出する
請求項1に記載の電子機器。 The acquisition unit
Further acquisition of information indicating the application containing the thread using the processor,
The extraction unit
Based on the information acquired by the acquisition unit, information indicating the usage rate of a plurality of threads including the first thread is extracted as the second information from the threads using the processor, and the second information is extracted. The third information indicating the application including each of the plurality of threads extracted as information is extracted, and the abnormality detection unit is
The electronic device according to claim 1, wherein an abnormality in the processing is detected based on the first information, the second information, and the third information.
請求項3に記載の電子機器。 The usage rates of the plurality of threads including the first thread are the usage rate of the first thread, the usage rate of the second thread most used after the first thread, and the usage rate next to the second thread. Including the usage rate of the third thread used,
The electronic device according to claim 3.
前記第2情報に含まれる複数のスレッド間の使用率の差分を算出し、
前記異常検出部は、
前記処理の異常を検出する際に、前記第2情報に基づく前記差分に基づく情報をさらに用いて検出する、
請求項4に記載の電子機器。 The calculation unit
The difference in the usage rate between the plurality of threads included in the second information is calculated, and the difference is calculated.
The abnormality detection unit is
When detecting the abnormality of the processing, the information based on the difference based on the second information is further used for detection.
The electronic device according to claim 4.
前記異常検出部は、
前記処理の異常を検出する際に、前記第3情報に基づく前記第1評価値をさらに用いて検出する、
請求項3から請求項5のいずれか一項に記載の電子機器。 Further, a first evaluation unit for determining a first evaluation value based on whether or not each of the applications included in the third information is the same application is provided.
The abnormality detection unit is
When detecting the abnormality of the processing, the first evaluation value based on the third information is further used for detection.
The electronic device according to any one of claims 3 to 5.
前記異常検出部は、
前記処理の異常を検出する際に、前記第3情報に基づく前記第2評価値をさらに用いて検出する、
請求項3から請求項6のいずれか一項に記載の電子機器。 Further provided with a second evaluation unit that determines a second evaluation value based on each type of application included in the third information.
The abnormality detection unit is
When detecting the abnormality of the processing, the second evaluation value based on the third information is further used for detection.
The electronic device according to any one of claims 3 to 6.
以前に取得された前記第1情報、前記第2情報、及び前記第3情報に基づく情報と、異常の有無に関する情報とに基づいて機械学習された学習済みモデルを用いて、前記処理の異常を検出する、
請求項3から請求項7のいずれか一項に記載の電子機器。 The abnormality detection unit is
Using the trained model machine-learned based on the previously acquired information based on the first information, the second information, and the third information, and the information regarding the presence or absence of the abnormality, the abnormality of the processing is detected. To detect,
The electronic device according to any one of claims 3 to 7.
取得部が、前記プロセッサを使用しているスレッドごとの前記プロセッサの使用率を示す情報を取得するステップと、
算出部が、前記取得部が取得した情報に基づいて、前記プロセッサを使用しているスレッドの合計数に対する前記プロセッサの使用率が所定範囲であるスレッドの数の割合を示す第1情報を算出するステップと、
抽出部が、前記取得部が取得した情報に基づいて、前記プロセッサを使用しているスレッドのうち最も使用されたスレッドである第1スレッドの使用率を示す第2情報を抽出するステップと、
異常検出部が、前記第1情報と前記第2情報とに基づいて前記処理の異常を検出するステップと、
を有する制御方法。 A control method in an electronic device equipped with a processor that executes processing based on a program.
A step in which the acquisition unit acquires information indicating the usage rate of the processor for each thread using the processor, and
Based on the information acquired by the acquisition unit, the calculation unit calculates first information indicating the ratio of the number of threads whose usage rate of the processor is within a predetermined range to the total number of threads using the processor. Steps and
A step in which the extraction unit extracts second information indicating the usage rate of the first thread, which is the most used thread among the threads using the processor, based on the information acquired by the acquisition unit.
A step in which the abnormality detection unit detects an abnormality in the process based on the first information and the second information.
Control method having.
前記プロセッサを使用しているスレッドの合計数に対する前記プロセッサの使用率が所定範囲であるスレッドの数の割合を示す第1情報と、前記プロセッサを使用しているスレッドのうち最も使用されたスレッドである第1スレッドの使用率を示す第2情報とに基づいて機械学習され、前記処理の異常を検出するよう、
コンピュータを機能させるための学習済みモデル。 A trained model for detecting abnormalities in the processing in an electronic device having a processor that executes processing based on a program.
The first information indicating the ratio of the number of threads whose usage rate of the processor is within a predetermined range to the total number of threads using the processor, and the most used thread among the threads using the processor. Machine learning is performed based on the second information indicating the usage rate of a certain first thread, and the abnormality of the processing is detected.
A trained model for making your computer work.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020170592A JP7011696B1 (en) | 2020-10-08 | 2020-10-08 | Electronics, control methods, and trained models |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020170592A JP7011696B1 (en) | 2020-10-08 | 2020-10-08 | Electronics, control methods, and trained models |
Publications (2)
Publication Number | Publication Date |
---|---|
JP7011696B1 true JP7011696B1 (en) | 2022-01-27 |
JP2022062520A JP2022062520A (en) | 2022-04-20 |
Family
ID=80683258
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020170592A Active JP7011696B1 (en) | 2020-10-08 | 2020-10-08 | Electronics, control methods, and trained models |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7011696B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7175485B1 (en) | 2022-05-27 | 2022-11-21 | 株式会社瑞起 | GAME DEVICE, GAME PROGRAM, GAME PROCESSING METHOD, AND GAME SYSTEM |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010108266A (en) | 2008-10-30 | 2010-05-13 | Nec Corp | Failure detection device, failure detection method, failure detection program, wordbook forming device, and failure occurrence analysis device |
JP2010191738A (en) | 2009-02-19 | 2010-09-02 | Hitachi Ltd | Failure analysis support system |
US20170147422A1 (en) | 2015-11-23 | 2017-05-25 | Alcatel-Lucent Canada, Inc. | External software fault detection system for distributed multi-cpu architecture |
US20190196937A1 (en) | 2016-09-09 | 2019-06-27 | Microsoft Technology Licensing, Llc | Automated Performance Debugging of Production Applications |
JP2020140317A (en) | 2019-02-27 | 2020-09-03 | レノボ・シンガポール・プライベート・リミテッド | Electronic apparatus, control method, program, and learned model |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5468837B2 (en) * | 2009-07-30 | 2014-04-09 | 株式会社日立製作所 | Anomaly detection method, apparatus, and program |
-
2020
- 2020-10-08 JP JP2020170592A patent/JP7011696B1/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010108266A (en) | 2008-10-30 | 2010-05-13 | Nec Corp | Failure detection device, failure detection method, failure detection program, wordbook forming device, and failure occurrence analysis device |
JP2010191738A (en) | 2009-02-19 | 2010-09-02 | Hitachi Ltd | Failure analysis support system |
US20170147422A1 (en) | 2015-11-23 | 2017-05-25 | Alcatel-Lucent Canada, Inc. | External software fault detection system for distributed multi-cpu architecture |
US20190196937A1 (en) | 2016-09-09 | 2019-06-27 | Microsoft Technology Licensing, Llc | Automated Performance Debugging of Production Applications |
JP2020140317A (en) | 2019-02-27 | 2020-09-03 | レノボ・シンガポール・プライベート・リミテッド | Electronic apparatus, control method, program, and learned model |
Also Published As
Publication number | Publication date |
---|---|
JP2022062520A (en) | 2022-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107997767B (en) | Method for recognizing user activity and electronic device thereof | |
JP5524117B2 (en) | Power management based on automatic load detection | |
EP2688311B1 (en) | Method for processing sensor input, in particular for adjusting mobile device state based on user intentions and/or identity | |
US11908465B2 (en) | Electronic device and controlling method thereof | |
US20170031430A1 (en) | Method of managing power and electronic device | |
US11270565B2 (en) | Electronic device and control method therefor | |
US10448204B2 (en) | Individualized presence context publishing | |
JP6792656B2 (en) | Electronics, control methods, programs, and trained models | |
JP2018514095A (en) | On-device behavior analysis to detect malfunctions due to RF interference | |
EP4354036A1 (en) | Electronic apparatus and control method thereof | |
JP7011696B1 (en) | Electronics, control methods, and trained models | |
KR20190088128A (en) | Electronic device and control method thereof | |
US11468270B2 (en) | Electronic device and feedback information acquisition method therefor | |
US12010470B2 (en) | Data processing system, data processing method, sensor apparatus, and receiving apparatus | |
KR20210092071A (en) | Electronic apparatus and control method thereof | |
US9897661B2 (en) | Automatically determining a number of functioning batteries | |
KR102303272B1 (en) | System for predictting a direction of prostate cancer risk | |
CN111316313A (en) | Collation support system, collation support method, and program | |
JP6723401B1 (en) | Electronic device, control method, and program | |
US20210138350A1 (en) | Sensor statistics for ranking users in matchmaking systems | |
JP7002618B1 (en) | Electronic devices and control methods | |
US20230088429A1 (en) | Processing device, processing method, and program | |
CN113170018A (en) | Sleep prediction method, device, storage medium and electronic equipment | |
US20230108988A1 (en) | Garage door opener battery backup system | |
KR20190046403A (en) | An electronic device comprising a battery |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201008 |
|
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: 20220104 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220114 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7011696 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |