JP2018109900A - In-vehicle electronic control apparatus and log storing method - Google Patents
In-vehicle electronic control apparatus and log storing method Download PDFInfo
- Publication number
- JP2018109900A JP2018109900A JP2017000648A JP2017000648A JP2018109900A JP 2018109900 A JP2018109900 A JP 2018109900A JP 2017000648 A JP2017000648 A JP 2017000648A JP 2017000648 A JP2017000648 A JP 2017000648A JP 2018109900 A JP2018109900 A JP 2018109900A
- Authority
- JP
- Japan
- Prior art keywords
- event
- order
- log
- occurrence
- electronic control
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、車載電子制御装置、およびログ格納方法に関する。 The present invention relates to an on-vehicle electronic control device and a log storage method.
近年の車両には多数の電子機器が搭載される。車両に発生する不具合の原因を究明するためには、それら電子機器の動作の記録であるログを解析することが肝要である。特許文献1には、車両運転中の操作状況及び車両状況の一方または双方を含む運転状況情報を取得する運転状況情報取得部と、車両主電源のONからOFFまでの期間において取得される前記運転状況情報の少なくとも一部のデータからなる車両運転ログを順次生成するログ生成部と、前記運転状況情報を用いて、前記ログ生成部で順次生成された車両運転ログが同一走行に属するものであるかどうかを判定するログ同一性判定部と、前記ログ同一性判定部による判定結果に基づいて前記車両運転ログを連結するログ加工部と、同一走行単位で仕分けられた前記車両運転ログを格納するログ格納部と、を備える車両運転ログ処理システムが開示されている。 Many electronic devices are mounted on recent vehicles. In order to investigate the cause of a problem occurring in a vehicle, it is important to analyze a log that is a record of the operation of these electronic devices. Patent Document 1 discloses a driving status information acquisition unit that acquires driving status information including one or both of an operating status and a vehicle status during driving of the vehicle, and the driving acquired during a period from ON to OFF of the vehicle main power source. A log generation unit that sequentially generates a vehicle driving log including at least a part of the situation information, and a vehicle driving log that is sequentially generated by the log generation unit using the driving status information belongs to the same travel. A log identity determination unit for determining whether or not, a log processing unit for connecting the vehicle operation logs based on a determination result by the log identity determination unit, and the vehicle operation log sorted in the same travel unit A vehicle operation log processing system including a log storage unit is disclosed.
特許文献1に記載されている発明では、イベントの記録に要する記憶領域を削減することができない。 In the invention described in Patent Document 1, the storage area required for event recording cannot be reduced.
本発明の第1の態様による車載電子制御装置は、発生したイベントのログが記録されるログ領域と、正常時の前記イベントの発生順序である正常順序、および前記正常順序に対応する文字列を含むパターン情報が格納される記憶部と、前記正常順序に代えて前記文字列を前記ログ領域に記録することで前記ログを圧縮する圧縮部とを備える。
本発明の第2の態様によるログ格納方法は、発生したイベントのログが記録されるログ領域と、正常時の前記イベントの発生順序である正常順序および前記正常順序に対応する文字列を含むパターン情報が格納される記憶部と、を備える車載電子制御装置において実行されるログ格納方法であって、前記車載電子制御装置が前記正常順序に代えて前記文字列を前記ログ領域に記録することでログを圧縮する。
The on-vehicle electronic control device according to the first aspect of the present invention includes a log area in which a log of an event that has occurred is recorded, a normal order that is the occurrence order of the event at normal time, and a character string corresponding to the normal order. A storage unit storing pattern information to be included, and a compression unit that compresses the log by recording the character string in the log area instead of the normal order.
The log storage method according to the second aspect of the present invention includes a pattern including a log area in which a log of an event that has occurred is recorded, a normal order that is the order of occurrence of the event at normal time, and a character string corresponding to the normal order A storage unit for storing information, and a log storage method executed in an in-vehicle electronic control device, wherein the in-vehicle electronic control device records the character string in the log area instead of the normal order. Compress the log.
本発明によれば、イベントの記録に要する記憶領域を削減することができる。 According to the present invention, the storage area required for event recording can be reduced.
―第1の実施の形態―
以下、図1〜図9を参照して、車載電子制御装置であるECUの第1の実施の形態を説明する。本発明に係るECUは、車両に搭載される。以下では1台のECUについて説明するが、車両に搭載されるECUの数はこれに限定されない。
-First embodiment-
Hereinafter, a first embodiment of an ECU that is an in-vehicle electronic control device will be described with reference to FIGS. The ECU according to the present invention is mounted on a vehicle. Hereinafter, one ECU will be described, but the number of ECUs mounted on the vehicle is not limited to this.
(ECUのハードウエア構成)
図1は、第1の実施の形態にかかるECU100のハードウエア構成を示す図である。ECU100は、CPU11と、ROM12と、RAM13と、不揮発性メモリ14とを備える。CPU11は、ROM12および不揮発性メモリ14に格納されるプログラムをRAM13に展開して実行する。ROM12には変更が不要なプログラム、およびプログラムが使用する定数、たとえばタイムアウトを規定する情報などが格納される。RAM13は揮発性メモリであり、プログラムの展開やプログラムが使用する一時的な情報の格納に使用される。不揮発性メモリ14は電源供給が断たれても情報の記憶が継続される記憶領域であり、プログラムの動作ログや更新される可能性があるプログラム、たとえばオペレーティングシステム(OS)などが格納される。
(ECU hardware configuration)
FIG. 1 is a diagram illustrating a hardware configuration of the
(ECUの機能構成)
図2は、ECU100の機能構成を示す図である。ECU100は、時刻レジスタ111と、パターン認識部112と、イベント情報113と、一時バッファ121と、ログ領域122と、スナップショット領域123とを備える。
(Functional configuration of ECU)
FIG. 2 is a diagram illustrating a functional configuration of the
時刻レジスタ111は、CPU11に内蔵される特定のレジスタである。時刻レジスタ111には現在時刻を示す情報、たとえば「2016年1月2日3時45分6.7890123456秒」が格納される。時刻レジスタ111に格納される値は、CPU11に内蔵される発振子の動作に基づき更新されており、CPU11が実行するプログラムは時刻レジスタ111を参照することで現在時刻を取得できる。
The
パターン認識部112は、イベントの発生の順番を認識して予め定められたパターンと一致するか否かを判断し、予め定められたパターンと一致すると判断すると該当するパターンに対応する識別子(以下、「パターン識別子」と呼ぶ)を提供する。この予め定められたパターンおよび各パターンに対応する識別子は、パターン情報112AとしてROM12または不揮発性メモリ14に保存される。パターン情報112Aには、パターンに含まれる各イベントについて、直前のイベント発生から当該イベントが発生するまでの想定される時間間隔も保存される。パターン情報112Aの一例は後述する。本実施の形態では、パターン情報112Aに保存されるイベントのパターンは全て、想定される正常なイベントの順序(以下、「正常順序」と呼ぶ)である。さらにパターン認識部112は、不図示の報知部を備え、異常を検出すると報知部を用いて異常の発生を報知する。この報知部は、ECU100に接続される他の機器と通信を行い異常を報知してもよいし、RAM13や不揮発性メモリ14に異常の発生を記録することにより異常を報知してもよい。
The
イベント情報113には、複数のイベントについて、イベントの識別子であるイベントIDとそのイベントの識別情報とが関連付けて保存される。イベント情報113は、不揮発性メモリ14に確保される記憶領域である。イベント情報113の一例は後述する。
In the
一時バッファ121は、イベントの識別情報とイベントの発生時刻が一時的に記録される領域である。ただしイベントの識別情報に代えてイベントIDが記録されてもよい。一時バッファ121はRAM13に確保された領域である。詳しくは後述するが、一時バッファ121に記録されるイベントはパターン情報112Aに記載されたいずれかのパターンと一致する可能性があるイベントである。一時バッファ121に記録されたイベントの情報は、そのまま、または置換されてログ領域122に記録される。そしてイベントの情報がログ領域122に記録されると、一時バッファ121に記録されていたそのイベントの情報は消去される。一時バッファ121の一例は後述する。
The
ログ領域122は、イベントの識別情報とイベントの発生時刻が記録される領域である。ただしイベントの識別情報に代えてイベントIDやパターン識別子が記録されてもよい。ログ領域122は不揮発性メモリ14に確保された領域である。ログ領域122に記録されたイベントの情報は、不図示のインタフェースを介してECU100の外部に読みだされる。ログ領域122の一例は後述する。
The
スナップショット領域123は、ECU100の異常が検知された際のECU100の動作状態が記録される領域である。記録されるECU100の動作状態には、ログ領域122に記録される情報が含まれる。
The
(イベント情報)
図3は、イベント情報113の一例を示す図である。イベント情報113はたとえば複数のレコードから構成され、各レコードはイベントの識別子であるイベントIDが格納されるフィールドとイベント識別情報が格納されるフィールドとを有する。イベント情報113のレコード数、すなわちイベント情報113に記録されるイベントの数に制限はない。イベントIDはたとえば1文字のアルファベットであり、本実施の形態では6つのイベントに、A,B,C,X,Y,Zを割り当てる。イベント識別情報は、イベントを識別する様々な情報である。換言すると本実施の形態における「イベント」とは、イベント情報113を用いて識別される事象である。
(event information)
FIG. 3 is a diagram illustrating an example of the
イベント識別情報の構成は限定されないが、たとえばイベントの種別を表すイベントプロパティとパラメータ値を表すイベントパラメータの組み合わせでもよい。イベントプロパティはたとえば、CANフレームの受信、プログラム中の変数の特定値への一致などである。イベントパラメータはたとえば、イベントプロパティがCANフレームの受信である場合に、CANIDの値とデータフィールドに格納される値の組み合わせである。なお以下の説明では、イベントIDがAのイベントを、イベントAなどとも呼ぶ。CPU11は、CPU11の内部の情報、およびRAM13や不揮発性メモリ14に格納された情報にアクセスできるので、イベントの発生時にイベント識別情報を取得できる。
The configuration of the event identification information is not limited, but may be a combination of an event property representing an event type and an event parameter representing a parameter value, for example. The event property is, for example, reception of a CAN frame, matching to a specific value of a variable in the program, or the like. The event parameter is, for example, a combination of a CANID value and a value stored in the data field when the event property is reception of a CAN frame. In the following description, an event whose event ID is A is also referred to as event A or the like. Since the CPU 11 can access information inside the CPU 11 and information stored in the
(パターン情報)
図4は、パターン情報112Aの一例を示す図である。パターン情報112Aはたとえば複数のレコードから構成され、各レコードはあらかじめ定められたイベントの発生順番およびイベントの発生する時間間隔である置換前情報が格納されるフィールドと、イベントのパターンに対応する識別子である置換後情報が格納されるフィールドとを有する。パターン情報112Aのレコード数および各レコードにおけるパターンを構成するイベント数に制限はない。
(Pattern information)
FIG. 4 is a diagram illustrating an example of the
図4に示すように、置換前情報のフィールドには、発生する順番に第1イベント〜第4イベント、および各イベントについて想定される発生の時間間隔が含まれる。パターン情報112Aでは、イベントを識別する情報としてイベント識別情報を用いてもよいが、ここではイベントIDを用いる。たとえば1つ目の例では、想定されるイベントの発生順番は、A,X,Y,Bであり、2つ目の例では、A,X,Cである。そして図4では「想定間隔」のフィールドに各イベントについて想定される発生の時間間隔が記録される。このフィールドに記載される時間の単位は、たとえばナノ秒やマイクロ秒である。
As illustrated in FIG. 4, the pre-replacement information field includes the first event to the fourth event in the order of occurrence, and the occurrence time interval assumed for each event. In the
たとえば1つ目の例において、第1イベントのAと第2イベントのXの間に記載された「500」は、イベントAが発生してからイベントXが発生するまでの想定される時間間隔が「500」であることを示している。同様に、イベントXが発生してからイベントYが発生するまでの想定される時間間隔は「2000」であり、イベントYが発生してからイベントBが発生するまでの想定される時間間隔は「300」であることが示されている。置換後情報のフィールドには、同一レコードの置換前情報に合致するイベントのパターンに合致するパターン識別子として、1つ目の例ではPが、2つ目の例ではQが記載される。置換処理の詳細は後述する。 For example, in the first example, “500” described between A of the first event and X of the second event is an estimated time interval from the occurrence of event A to the occurrence of event X. “500”. Similarly, the assumed time interval from the occurrence of event X to the occurrence of event Y is “2000”, and the assumed time interval from the occurrence of event Y to the occurrence of event B is “2000”. 300 ". In the post-replacement information field, P is described in the first example and Q is described in the second example as a pattern identifier that matches the pattern of the event that matches the pre-replacement information of the same record. Details of the replacement process will be described later.
(一時バッファ)
図5は、一時バッファ121一例を示す図である。一時バッファ121はたとえば複数のレコードから構成され、各レコードにはイベントの識別情報、およびイベントが発生した時刻を示すタイムスタンプが格納される。
(Temporary buffer)
FIG. 5 is a diagram illustrating an example of the
(ログ領域)
図6は、ログ領域122の一例を示す図である。ログ領域122はたとえば複数のレコードから構成され、各レコードにはイベントの識別情報、およびイベントが発生した時刻を示すタイムスタンプが格納される。ただしイベント識別情報の代わりにイベントIDが格納されてもよいし、パターン情報112Aに含まれるパターン識別子が格納されてもよい。
(Log area)
FIG. 6 is a diagram illustrating an example of the
(パターン認識部の動作)
パターン認識部112の動作、および動作例を説明する。パターン認識部112は、一時バッファ121に格納されたイベントの順番が、パターン情報112Aに格納されたいずれかのイベントのパターンと一致すると、以下の置換処理を行う。すなわち、それらのイベントIDを対応するパターン識別子に置き換えるとともに、パターンの最後のイベントが発生した時刻を、そのパターン識別子のイベントが発生した時刻とする。またパターン認識部112は、一時バッファ121に格納されたイベントの順番が、パターン情報112Aに格納されたいずれのイベントのパターンとも一致しないが、いずれかのイベントのパターンと途中まで一致する場合には、置換を行わずに報知部を用いて異常の発生を報知する。さらにパターン認識部112は、一時バッファ121に格納されたイベントの順番がパターン情報112Aに格納されたいずれのイベントのパターンともまったく一致しない場合、すなわち一時バッファ121に格納された先頭のイベントがパターン情報112Aに格納されたいずれのパターンの先頭のイベントとも一致しない場合は、置換および報知のいずれも行わない。
(Operation of pattern recognition unit)
An operation and an operation example of the
図7は、ケース1〜ケース3の3つのケースにおけるパターン認識部112の動作例を示す図である。図7は、各ケースについて、イベント発生状況と全イベント発生後のログ領域122に格納される情報を示している。イベント発生状況の欄には、イベントの発生した順番でイベントIDが記載され、そのイベントの発生が観測された時刻も併記される。なお、いずれのケースも最初のイベントが発生する際には、一時バッファ121には何も記録されていないこととする。また、いずれのケースも最初のイベントが観測された時刻をゼロとする。
FIG. 7 is a diagram illustrating an operation example of the
ケース1では、発生したイベントの順番をイベントIDで表すと、「A,X,Y,B,C」である。先頭から4つのイベントがパターン情報112Aにおける1つ目のパターンに合致するので、これら4つのイベントの代わりにパターン識別子Pがログ領域122に記録される。そしてタイムスタンプはこのパターンの最後のイベントであるイベントBが観測された時刻である「2690」が記録される。5つ目のイベントCは、パターン情報112Aのいずれのパターンとも合致しないので、イベントIDおよび観測時刻がそのまま記録される。
In case 1, the order of events that have occurred is represented by event IDs “A, X, Y, B, C”. Since the four events from the top match the first pattern in the
ケース2では、発生したイベントの順番をイベントIDで表すと、「A,X,Z」である。このイベントのパターンは、パターン情報112Aのいずれのパターンとも合致しないが、1つ目のパターンと途中までは一致する。具体的には、発生した先頭の2つのイベント「A,X」は、パターン情報112Aの1つ目のパターンである「A,X,Y,B」の先頭の2つと一致する。そのため、全体が一致しないので置換は行われないが、部分的に一致するので異常が報知される。ログ領域122には、発生したイベントのイベントID、および観測時刻がそのまま記載される。
In case 2, the order of events that have occurred is represented by event IDs “A, X, Z”. This event pattern does not match any pattern in the
ケース3では、イベントCのみが発生した。パターン情報112Aには、イベントCから始まるパターンが存在しないので、パターン認識部112は置換を行わない。そのためログ領域122には、発生したイベントであるイベントC、およびイベントCの観測時刻がそのまま記載される。
In case 3, only event C occurred. Since there is no pattern starting from the event C in the
(フローチャート)
図8および図9は、第1の実施の形態におけるECU100の動作を示すフローチャートである。CPU11は、ECU100において何らかのイベントが発生するたびに図8および図9により動作が表されるプログラムを実行する。以下に説明するフローチャートの各ステップの実行主体は、ECU100のCPU11である。
ステップS302では、CPU11は、発生したイベントを実行する。続くステップS304では、CPU11は時刻レジスタ111から現在時刻を示す情報、すなわちタイムスタンプを取得する。なお以下では、このタイムスタンプにより表される時刻を、「イベントの発生時刻」や「イベントが観測された時刻」とも呼ぶ。続くステップS306において、CPU11はイベント情報113および発生したイベントのイベント識別情報に基づき、発生したイベントのイベントIDを特定する。
(flowchart)
8 and 9 are flowcharts showing the operation of the
In step S302, the CPU 11 executes the generated event. In subsequent step S <b> 304, the CPU 11 acquires information indicating the current time, that is, a time stamp, from the
続くステップS308では、CPU11は、一時バッファ121に格納されたイベントIDにステップS306において特定したイベントIDを付加したイベントのパターンが、パターン認識部112のいずれかのパターンと前方一致するか否かを判断する。たとえば一時バッファ121に「A,X」が格納され、ステップS306において特定したイベントIDが「Y」の場合には以下のように判断される。すなわち、「A,X」に「Y」を付加した「A,X,Y」は、パターン認識部112の1つ目のパターンである「A,X,Y,B」の先頭の3つと一致するので前方一致検索を肯定判断する。CPU11は、肯定判断する場合はステップS310に進み、否定判断する場合はステップS314に進む。なお、一時バッファ121になにも記録されていない場合は、ステップS306において特定したイベントIDのみを用いた前方一致検索、すなわちステップS306において特定したイベントIDを先頭となるパターンが存在するか否かの判断を行う。
In the subsequent step S308, the CPU 11 determines whether or not the event pattern obtained by adding the event ID specified in step S306 to the event ID stored in the
ステップS310では、CPU11はタイムアウトの有無を判断する。すなわち、直前に発生したイベントの発生時刻と今回のイベントの発生時刻との差が、所定の時間よりも長いか否かを判断する。このタイムアウトの時間は、ROM12に格納されていてもよいし、全てのイベントについて同一でもよいし、イベントごとに異なる値が設定されてもよい。ただし本実施の形態では、このタイムアウトの時間とパターン認識部112の想定間隔とは相関がないものとする。CPU11は、タイムアウトが発生していない、すなわち直前に発生したイベントの発生時刻と今回のイベントの発生時刻との差が所定の時間以内であったと判断する場合はステップS312に進み、タイムアウトが発生したと判断する場合はステップS314に進む。
In step S310, the CPU 11 determines whether there is a timeout. That is, it is determined whether or not the difference between the occurrence time of the event that occurred immediately before and the occurrence time of the current event is longer than a predetermined time. The timeout time may be stored in the
ステップS312では、CPU11は最新のイベントIDとタイムスタンプ、すなわちステップS306において特定したイベントIDおよびステップS304において取得したタイムスタンプを一時バッファ121に保存して図8および図9により動作が表されるプログラムの実行を終了する。ステップS308またはステップS310において否定判定されると実行されるステップS314では、CPU11は一時バッファ121に何か記録されているか否かを判断する。CPU11は、なにも記録されていないと判断する場合はステップS316に進み、何らかの情報が記録されていると判断する場合は図9のステップS330に進む。ステップS316では、CPU11は最新のイベントIDとタイムスタンプ、すなわちステップS306において特定したイベントIDおよびステップS304において取得したタイムスタンプをログ領域122に保存して図8および図9により動作が表されるプログラムの実行を終了する。
In step S312, the CPU 11 stores the latest event ID and time stamp, that is, the event ID specified in step S306 and the time stamp acquired in step S304 in the
図8のステップS314において否定判断されると、図9のステップS330が実行される。このステップS330では、CPU11は、一時バッファ121内のID列、すなわち一時バッファ121に格納されるイベントのパターンが、パターン情報112Aに基づき置換可能か否かを判断する。置換可能と判断する場合はステップS332に進み、置換不可能と判断する場合はステップS340に進む。
If a negative determination is made in step S314 in FIG. 8, step S330 in FIG. 9 is executed. In step S330, the CPU 11 determines whether the ID string in the
ステップS332では、CPU11はステップS330において置換可能と判断された置換により得られるパターン識別子、および置換後のタイムスタンプをログ領域122に保存する。前述のとおり、置換後のタイムスタンプとは該当するパターンに含まれる最後のイベントが発生した時間に対応するタイムスタンプである。続くステップS334では、CPU11は一時バッファを一掃、すなわち一時バッファ121に保存された情報をすべて削除する。続くステップS335では、最新のイベントID、すなわちステップS306において特定したイベントIDがパターン情報112Aに記載されたいずれかのパターンの先頭と一致するか否かを判断する。CPU11は、いずれかのパターンの先頭と一致すると判断する場合はステップS336に進み、いずれとも一致しないと判断する場合はステップS337に進む。ステップS336では、最新のイベントIDとタイムスタンプ、すなわちステップS306において特定したイベントIDおよびステップS304において取得したタイムスタンプを一時バッファ121に保存して図8および図9により動作が表されるプログラムの実行を終了する。ステップS337では、最新のイベントIDとタイムスタンプをログ領域122に保存して図8および図9により動作が表されるプログラムの実行を終了する。
In step S332, the CPU 11 stores the pattern identifier obtained by the replacement determined to be replaceable in step S330 and the time stamp after the replacement in the
ステップS330において否定判断されると実行されるステップS340では、CPU11は、一時バッファ121内の全ての情報をそのままログ領域122に記録し、一時バッファ121内の全ての情報を削除する。続くステップS342では、最新のイベントIDとタイムスタンプ、すなわちステップS306において特定したイベントIDおよびステップS304において取得したタイムスタンプをログ領域122に保存する。続くステップS344では、CPU11は不図示の報知部を用いて異常を報知する。続くステップS346では、CPU11は、ログ領域122に記録されている全ての情報をスナップショット領域123に記録して図8および図9により動作が表されるプログラムの実行を終了する。
In step S340, which is executed when a negative determination is made in step S330, the CPU 11 records all the information in the
(動作例)
図7に示した各ケースについて、図8〜図9に示したフローチャートにおいてCPU11が行う判断を説明する。ただし以下では主にフローチャートの分岐における判断を説明し、分岐のない箇所の説明は省略する。なお前述のとおり、いずれのケースも最初のイベントが発生する際には、一時バッファ121には何も記録されていない。また、いずれのケースでも図8のステップS310における判断はタイムアウトの発生なし、すなわち肯定判断とする。
(Operation example)
For each case shown in FIG. 7, the determination performed by the CPU 11 in the flowcharts shown in FIGS. 8 to 9 will be described. However, in the following, the determination at the branch of the flowchart will be mainly described, and the description of the part without the branch will be omitted. As described above, nothing is recorded in the
図7のケース1において、イベントAが発生するとステップS308においてCPU11は肯定判断を行い、ステップS312において一時バッファ121にイベントAとそのタイムスタンプを記録する。イベントX,Y,Bのいずれが発生した場合にも、イベントAの場合と同様の判断がされる。なぜならば、「A」、「A,X」、「A,X,Y」および「A,X,Y,B」のいずれも、図4に示したパターン情報112Aの1つ目のパターンである「A,X,Y,B」を対象とする前方一致検索で肯定判定されるからである。
In the case 1 of FIG. 7, when the event A occurs, the CPU 11 makes an affirmative determination in step S308, and records the event A and its time stamp in the
最後にイベントCが発生すると、CPU11はステップS308において、「A,X,Y,B,C」について「A,X,Y,B」を対象とする前方一致検索で否定判定する。そしてステップS314において一時バッファ121にイベント「A,X,Y,B」が記録されているので否定判定を行ってステップS330に進む。ステップS330ではCPU11は、一時バッファ121に記録されたイベント「A,X,Y,B」が「P」で置換可能なので肯定判断を行いステップS332に進む。ステップS332ではパターン識別子PとイベントBが発生した時刻を示すタイムスタンプをログ領域122に保存し、ステップS334において一時バッファ121内の情報を削除する。そしてステップS335では最新のイベントCはパターン情報112Aのいずれのパターンの先頭にも一致しないのでステップS337に進み、ステップS337においてイベントCとそのタイムスタンプをログ領域122に記録する。
When event C finally occurs, in step S308, CPU 11 makes a negative determination for “A, X, Y, B, C” by a forward matching search for “A, X, Y, B”. In step S314, since the event “A, X, Y, B” is recorded in the
図7のケース2において、イベントAとイベントXが発生した際のCPU11の動作はケース1と同様である。イベントZが発生すると、「A,X,Z」はパターン認識部112のいずれのパターンとも一致しないのでCPU11はステップS308において否定判断を行う。そしてステップS314では一時バッファ121に格納されている情報があるのでCPU11は否定判断を行いステップS330に進む。ステップS330では一時バッファ121内の「A,X」は置換が不可能なのでCPU11は否定判断を行い、ステップS340以下でイベント「A,X,Z」およびそのタイムスタンプをログ領域122に記録する。
In case 2 of FIG. 7, the operation of the CPU 11 when event A and event X occur is the same as in case 1. When the event Z occurs, “A, X, Z” does not match any pattern of the
図7のケース3において、CPU11はステップS308を否定判断し、ステップS314を肯定判断し、ステップS316においてイベントCおよびそのタイムスタンプをログ領域122に記録する。
In case 3 of FIG. 7, the CPU 11 makes a negative determination in step S <b> 308, makes a positive determination in step S <b> 314, and records the event C and its time stamp in the
上述した第1の実施の形態によれば、次の作用効果が得られる。
(1)車載電子制御装置であるECU100は、発生したイベントのログが記録されるログ領域122と、正常時のイベントの発生順序である正常順序、および正常順序に対応する文字列であるパターン識別子を含むパターン情報112Aが格納される不揮発性メモリ14と、正常順序に代えてパターン識別子をログ領域122に記録することでログを圧縮する圧縮部、すなわちパターン認識部112とを備える。
According to the first embodiment described above, the following operational effects are obtained.
(1) The
正常順序で発生するイベントに関する情報は、障害発生の原因究明において重要度は必ずしも高くないが、正常順序で発生するイベントに関する情報が全く得られなければ原因究明が困難になる。ECU100は、正常順序および正常順序に対応する文字列を記憶するので正常順序を判断できる。さらにECU100は、正常順序そのものを記録する代わりにパターン識別子を記録することで、少ない記憶領域を用いて正常順序でイベントが発生したことを記録することができる。すなわちECU100は、イベントの記録に要する記憶領域を削減することができる。
Information on events that occur in the normal order is not necessarily highly important in investigating the cause of the occurrence of a failure, but it is difficult to find the cause if no information on events that occur in the normal order is obtained. The
(2)パターン認識部112は、イベントの発生順序が正常順序に合致しない場合は、ログの圧縮を行わずにイベントをログ領域122に記録する。障害発生の原因究明には、想定される正常な順序で発生するイベントに関する情報よりも、想定しない順序で発生したイベントに関する情報のほうが重要である。そのため、想定しない順序で発生したイベントは圧縮せずにパターン認識部112に記録し、障害の原因究明に役立てることができる。
(2) The
(3)パターン認識部112は、イベントの発生順序が正常順序と完全に一致せず途中まで一致する場合は(図9のステップS330:NO)不図示の報知部を用いて異常の発生を報知する(図9のステップS344)。正常順序と完全に一致せず途中まで一致する場合とは、途中から正常順序と一致しなくなった場合なので、異常の発生が必ずしも明確でない。そのため、報知を行うことにより異常が発生したことを明確にすることができる。
(3) The
(4)パターン認識部112は、イベントが発生するたびに発生したイベントの順序と正常順序との一致判断を行い、正常順序と途中まで一致すると判断すると(図8のステップS308:YES)、一致する範囲を一時的に記憶して(図8のステップS312)次回の一致判断の負荷を軽減する。
(4) Whenever the event occurs, the
そのため、パターン認識部112の負荷を平準化してECU100のリアルタイム性を確保することができる。たとえば、一定時間の経過後や所定量のログが蓄積されたた後にパターン情報112Aを参照してまとまった量の置換を行うことも考えられるが、その場合は、蓄積された所定量のログを処理するタイミングでパターン認識部112がECU100の多くのリソースを使用することになる。そのため、そのタイミングでは他のプログラムが使用可能なリソースが減少し、所定の時間内に既定の処理を完了できない恐れ、すなわちリアルタイム性を確保できない恐れがある。前述のようにECU100はリアルタイム性を確保できるので、処理のリアルタイム性が要求される車載用の電子制御装置に適する。
Therefore, the load on the
(変形例1)
パターン情報には、異常時におけるイベントの発生順序である異常順序、および異常順序に対応する異常文字列を含む異常パターン情報が格納されてもよい。異常パターン情報も図4に示したパターン情報112Aと同様に置換前情報と置換後情報から構成される。置換前情報に示されるイベントの順序と発生したイベントの順序が一致すると、ログ領域122にはパターン識別子が記録されるとともに異常検知の報知も行われる。
(Modification 1)
The pattern information may store abnormal pattern information including an abnormal order that is the order of occurrence of events at the time of abnormality and an abnormal character string corresponding to the abnormal order. The abnormal pattern information is also composed of pre-replacement information and post-replacement information, similar to the
図10は、変形例1におけるパターン情報112Bの一例を示す図である。パターン情報112Bを構成するフィールドは、図4に示したパターン情報112Aと比べて「正常/異常」のフィールドが追加されている。このフィールドは、そのレコードが正常時パターンと異常時パターンのいずれのパターンであるかを示している。すなわち図10に示す例では、図4の例と同じ2つの正常パターンと、1つの異常パターンが示されている。
FIG. 10 is a diagram illustrating an example of the
この変形例1によれば、次の作用効果が得られる。
(5)不揮発性メモリ14には、異常時におけるイベントの発生順序である異常順序、および異常順序に対応する異常文字列を含む異常パターン情報が格納される。パターン認識部112は、イベントの発生順序が異常順序に合致する場合は、異常順序に代えて異常文字列をログ領域122に記録するとともに、不図示の報知部を用いて異常の発生を報知する。そのため、発生が想定される異常順序を予め定めておくことにより、ログの記録に要する記憶領域を削減することができる。
According to the first modification, the following operational effects can be obtained.
(5) The
(変形例2)
上述した第1の実施の形態では、パターン情報112Aに含まれるイベントの発生順番、すなわち置換前情報は、複数のフィールドから構成される表形式で記録されるとした。しかし、トレースが容易なようにツリー形式で記録してもよい。この場合は、パターン認識部112は現在のノード上の位置を記録し、イベントが発生するたびにツリーを1ノードずつ辿るシーケンシャルな検索を行うことで、図8のステップS308および図9のステップS330の判断を行う。
(Modification 2)
In the first embodiment described above, the occurrence order of events included in the
図11はツリー形式で記録されるパターン情報112Aの置換前情報の一例を示す図である。図11に示されるイベントの発生順序は、図4に示すパターン情報112Aの例と同一である。図11に示すN1〜N5は、ツリーを構成するノードを識別するために便宜的に付与したものである。図11に示すツリーは、N1を頂点とし図示下方向へ広がる。たとえばN2からはN3またはN5に遷移可能であるが、N3からはN4へしか遷移できない。たとえば、3つのイベントがA,X,Yの順に発生すると、パターン認識部112はツリー上の現在の位置がN3であると認識する。この次にイベントCが発生すると、N3から遷移可能なN4には「C」が格納されていないので遷移不能、すなわち前方一致でないとして図8のステップS308において否定判断を行う。なお同様の判断は、図9のステップS330においても可能である。
FIG. 11 is a diagram showing an example of pre-replacement information of the
この変形例2によれば、次の作用効果が得られる。
(6)正常順序はツリー構造のデータベースとして格納され、パターン認識部112は、イベントが発生するたびにツリー構造のデータベースをシーケンシャルに検索する。そのため正常順序における現在の位置に関わらず1回あたりの検索に要する負荷が平準化され、ECU100のリアルタイム性の確保に資する。この効果は正常順序が長いほど顕著である。
According to the second modification, the following operational effects can be obtained.
(6) The normal order is stored as a tree-structured database, and the
(変形例3)
上述した第1の実施の形態では、ECU100が異常を検知するとログ領域122に記録されている全ての情報をスナップショット領域123に記録することとしたが(図9のS346)、ECU100の外部にその情報を保存してもよい。またECU100はその情報を同一の車両内に備えられる不図示の診断装置に伝達してもよい。さらにECU100は、異常の検知に基づき何らかの対策、たとえば制動装置の動作を行ってもよい。
(Modification 3)
In the first embodiment described above, when the
(変形例4)
上述した第1の実施の形態では、パターン認識部112は置換を行った際にログ領域122に最後のイベントのタイムスタンプを転記した。しかし、全てのイベントのタイムスタンプを転記してもよい。たとえば図7(a)に示したケース1では、イベントPのタイムスタンプを「0,410,2490,2690」として記録してもよい。
(Modification 4)
In the first embodiment described above, the
(変形例5)
上述した第1の実施の形態では、ログ領域122に記録されるイベント識別情報としてイベントIDが用いられた。しかしイベントIDに代えて図4に示すイベント識別情報を用いてもよいし、イベントを識別できる情報であれば図4に記載されていない情報をログ領域122に記録してもよい。本変形例によれば、異常発生時の予期できないイベントをログ領域122に記録することができる。
(Modification 5)
In the first embodiment described above, an event ID is used as event identification information recorded in the
(変形例6)
イベント情報113は、不揮発性メモリ14に直接保存されず、不揮発性メモリ14に格納されるプログラムが実行されることによりRAM12上に作成されてもよい。たとえば不揮発性メモリ14にオペレーティングシステム(OS)が格納され、CPU11がOSを実行するとOSが起動処理の一環としてイベント情報113をRAM12上に作成してもよい。
(Modification 6)
The
(変形例7)
第1の実施の形態では、発生したイベントの順序が正常順序と完全に一致せず途中まで一致する場合のみ異常の発生を報知した。しかし、途中まで一致するか否かに関わらず、正常順序と一致しない場合に異常の発生を報知してもよい。すなわち、図8のステップS316の直前または直後に図9のステップS334およびS346を挿入してもよい。
(Modification 7)
In the first embodiment, the occurrence of an abnormality is notified only when the order of events that have occurred does not completely match the normal order and does not match partway. However, the occurrence of an abnormality may be notified when it does not match the normal order regardless of whether or not it is partially matched. That is, steps S334 and S346 in FIG. 9 may be inserted immediately before or after step S316 in FIG.
(変形例8)
第1の実施の形態では、パターン情報112Aに「想定間隔」のフィールドが含まれなくてもよい。
(Modification 8)
In the first embodiment, the
―第2の実施の形態―
図12を参照して、車載電子制御装置であるECUの第2の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、CPUがプログラム中でイベントIDを特定する必要がない点で、第1の実施の形態と異なる。第2の実施の形態におけるECUのハードウエア構成は第1の実施の形態と同様なので説明を省略する。ただしROMに格納されるプログラムが第1の実施の形態と異なる。
-Second embodiment-
With reference to FIG. 12, a second embodiment of an ECU that is an in-vehicle electronic control device will be described. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, and different points will be mainly described. Points that are not particularly described are the same as those in the first embodiment. This embodiment differs from the first embodiment mainly in that the CPU does not need to specify an event ID in the program. Since the hardware configuration of the ECU in the second embodiment is the same as that of the first embodiment, description thereof is omitted. However, the program stored in the ROM is different from that in the first embodiment.
(ECUの機能構成)
図12は、第2の実施の形態におけECU100Aの機能構成を示す図である。ECU100Aは、第1の実施の形態における構成からイベント情報113が除かれている。本実施の形態では、発生するすべてのイベントにイベントIDが付されるのでイベント情報113が不要である。イベントIDは、たとえば不揮発性メモリ14に格納されるOSにより付与される。
(Functional configuration of ECU)
FIG. 12 is a diagram illustrating a functional configuration of the
(ECUの動作)
第2の実施の形態におけるECU100Aの動作は、以下の点を除き第1の実施の形態と同様である。すなわち、第2の実施の形態におけるCPU11は、第1の実施の形態の図8におけるステップS306を実行しなくてよい。
(ECU operation)
The operation of the
上述した第2の実施の形態によれば、ECU100Aはイベント情報113を記憶する必要がなく、イベント識別情報に基づきイベントIDを特定しなくてよい。
According to the second embodiment described above, the
―第3の実施の形態―
図13〜図17を参照して、車載電子制御装置であるECUの第3の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、イベント情報だけでなくタイムスタンプの圧縮も行う点で、第1の実施の形態と異なる。第3の実施の形態におけるECUのハードウエア構成は第1の実施の形態と同様なので説明を省略する。ただしROMに格納されるプログラムが第1の実施の形態と異なる。
-Third embodiment-
A third embodiment of an ECU that is an in-vehicle electronic control device will be described with reference to FIGS. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, and different points will be mainly described. Points that are not particularly described are the same as those in the first embodiment. This embodiment differs from the first embodiment mainly in that not only event information but also time stamp compression is performed. Since the hardware configuration of the ECU in the third embodiment is the same as that of the first embodiment, the description thereof is omitted. However, the program stored in the ROM is different from that in the first embodiment.
(ECUの機能構成)
図13は、第3の実施の形態におけECU100Bの機能構成を示す図である。ECU100Bは、第1の実施の形態における構成からイベント情報113が除かれ、時刻差バッファ124が追加されている。時刻差バッファ124はRAM13に確保される一時的な記憶領域であり、後述する2階差分を算出するために用いられる。本実施の形態では、第2の実施の形態と同様に、発生するすべてのイベントにイベントIDが付されるのでイベント情報113が不要である。イベントIDは、たとえば不揮発性メモリ14に格納されるOSにより付与される。
(Functional configuration of ECU)
FIG. 13 is a diagram illustrating a functional configuration of the
(ECUの動作)
本実施の形態におけるCPU11は、イベントのパターンを置換する場合には、パターンの最後のイベントが発生した時刻のタイムスタンプを記録する代わりに、以下に説明する2階差分を記録する。2階差分とは、現実時刻差と想定時刻差の差である。現実時刻差とは、ある2つのイベントが発生する時刻の差であって現実に観測された時刻の差である。想定時刻差とは、ある2つのイベントが発生する時刻の差であって、想定される時刻の差である。想定時刻差は、予め定められた値であり、ROM12または不揮発性メモリ14に格納される。想定時刻差はたとえばパターン情報112Aに「想定間隔」として記録される。
(ECU operation)
When replacing the event pattern, the CPU 11 in the present embodiment records the second-order difference described below instead of recording the time stamp of the time when the last event of the pattern occurred. The second floor difference is a difference between the actual time difference and the assumed time difference. The actual time difference is the difference between the times when two events occur and is the difference between the actually observed times. The assumed time difference is a difference in time when two events occur, and is a difference in expected time. The assumed time difference is a predetermined value and is stored in the
たとえば、イベントAとイベントBの発生時刻がそれぞれ「2016年1月2日3時00分0.000000000秒」、「2016年1月2日3時01分2.333444555秒」と観測された場合に、現実時刻差は「1分2.333444555秒」である。そして、想定時刻差が「1分2.333444333秒」の場合には、現実時刻差と想定時刻差との差分は「0.000000222秒」である。すなわち、「2.22×10−7秒」または「2.22E−7」と表現できるので、2階差分では現実時刻差に比べてデータ量が少ない。なお、時間分解能が高く、想定時刻差と現実時刻差との差が少ないほど、現実時刻差と2階差分とのデータ量は相違が大きくなる。 For example, when the occurrence times of event A and event B are observed as “January 2, 2016 3: 00: 0.000000000” and “January 2, 2016 3: 01: 2.33344555”, respectively. In addition, the actual time difference is “1 minute 2.333444555”. When the assumed time difference is “1 minute 2.33344333 seconds”, the difference between the actual time difference and the assumed time difference is “0.0000000022 seconds”. That is, since it can be expressed as “2.22 × 10 −7 seconds” or “2.22E-7”, the second-order difference has a smaller data amount than the actual time difference. Note that the higher the time resolution and the smaller the difference between the assumed time difference and the actual time difference, the greater the difference in the data amount between the actual time difference and the second-order difference.
(時刻差バッファ)
図14は、時刻差バッファ124の一例を示す図である。時刻差バッファ124はたとえば複数のレコードから構成され、各レコードはどのイベント同士の間隔であるかを示すイベント間フィールドと、現実に観測される時刻の差である現実時刻差のフィールドと、想定される時刻の差である想定時刻差のフィールドと、現実時刻差フィールドの値と想定時刻差フィールドの値の差が格納される2階差分のフィールドとを有する。
(Time difference buffer)
FIG. 14 is a diagram illustrating an example of the
図14におけるイベントの発生順番、および現実時刻差は図7(a)に示したケース1の先頭の4つのイベントに基づくものである。すなわち、イベントが発生した順番は「A,X,Y,B」であり、それぞれのタイムスタンプは「0,410,2490,2690」である。そのため、現実時刻差が「410,2080,200」となっている。図13における想定時刻差は、図4に示したパターン情報112Aの想定間隔である「500,2000,300」である。図14に示す2階差分は、現実時刻差の値から想定時刻差の値を減じた値としているので、順に「−90、+80、−100」となっている。
The occurrence order of events and the actual time difference in FIG. 14 are based on the top four events in case 1 shown in FIG. That is, the order in which the events occurred is “A, X, Y, B”, and the respective time stamps are “0, 410, 2490, 2690”. Therefore, the actual time difference is “410, 2080, 200”. The assumed time difference in FIG. 13 is “500, 2000, 300” which is the assumed interval of the
(フローチャート)
図15および図16は、第3の実施の形態におけるECU100Bの動作を示すフローチャートである。ただし第1の実施の形態と共通する動作には同一のステップ番号を付して説明を省略する。CPU11は、ECU100Bにおいて何らかのイベントが発生するたびに図15および図16により動作が表されるプログラムを実行する。以下に説明するフローチャートの各ステップの実行主体は、ECU100BのCPU11である。
(flowchart)
15 and 16 are flowcharts showing the operation of the
CPU11は、イベントが発生するとイベントを実行し(ステップS302)、時刻レジスタ111からタイムスタンプを取得する。次にステップS308を実行し、肯定判断をするとステップS310に、否定判断をするとステップS314に進む。ステップS310では肯定判断をするとステップS400に進み、否定判断をするとステップS314に進む。ステップS400では、CPU11は一時バッファ121に何か記録されているか否かを判断する。CPU11は、一時バッファ121に何か記録があると判断する場合はステップS402に進み、一時バッファ121に何も記録されていないと判断する場合はステップS312に進む。ステップS402では、一時バッファ121に記録されている最新のイベントとステップS302において実行したイベントとに対応する想定時刻差をROM12または不揮発性メモリ14から読み込み時刻差バッファ124に書き込む。たとえば一時バッファ121に記録されている最新のイベントがAであり、ステップS302において実行したイベントがXの場合は、パターン情報112Aが図4に示すものである場合は「500」が想定時刻差として時刻差バッファ124に書き込まれる。
When the event occurs, the CPU 11 executes the event (step S302) and obtains a time stamp from the
続くステップS404では、ステップS402において読みこんだ想定時刻差を用いて2階差分を算出して時刻差バッファ124に記録する。すなわち、まず一時バッファ121に記録されている最新のイベントのタイムスタンプと、ステップS304において取得したタイムスタンプとの差を算出して、時刻差バッファ124の現実時刻差のフィールドに記録する。次に時刻差バッファ124の現実時刻差と想定時刻差の差を算出し、これを2階差分として時刻差バッファ124に書き込む。次にステップS312に進む。
In the subsequent step S404, the second-order difference is calculated using the estimated time difference read in step S402 and recorded in the
ステップS400において肯定判断された場合、およびステップS404の次に実行されるステップS312では、最新のイベントIDとタイムスタンプを一時バッファ121に記録する。すなわちステップS302において実行したイベントのイベントIDとステップS304において取得したタイムスタンプを一時バッファ121に記録する。そして図15および図16により動作が表されるプログラムの実行を終了する。
When an affirmative determination is made in step S400, and in step S312 executed after step S404, the latest event ID and time stamp are recorded in the
ステップS308、またはステップS310において否定判定されると実行されるステップS314では、CPU11は一時バッファ121に何か記録されているか否かを判断する。CPU11は、何も記録されていないと判断する場合はステップS316に進み、何らかの情報が記録されていると判断する場合は図16のステップS330に進む。ステップS316では、CPU11は最新のイベントIDとタイムスタンプ、すなわちステップS306において特定したイベントIDおよびステップS304において取得したタイムスタンプをログ領域122に保存して図15および図16により動作が表されるプログラムの実行を終了する。
In step S <b> 314 that is executed when a negative determination is made in step S <b> 308 or step S <b> 310, the CPU 11 determines whether something is recorded in the
図16のステップS330では、CPU11は、一時バッファ121内のID列、すなわち一時バッファ121に格納されるイベントのパターンが、パターン情報112Aに基づき置換可能か否かを判断する。置換可能と判断する場合はステップS412に進み、置換不可能と判断する場合はステップS340に進む。ステップS412では、CPU11はステップS330において置換可能と判断された置換により得られるパターン識別子、および時刻差バッファ124の2階差分の値をログ領域122に保存する。続くステップS414では、CPU11は一時バッファ121および時刻差バッファ124に保存された情報をすべて削除する。続くステップS335以下の処理は第1の実施の形態と同様であり、最新のイベントIDとタイムスタンプを一時バッファ121またはログ領域122に保存して図15および図16により動作が表されるプログラムの実行を終了する。
In step S330 of FIG. 16, the CPU 11 determines whether or not the ID string in the
ステップS330において否定判断されると実行されるステップS340では、CPU11は、一時バッファ121内の全ての情報をそのままログ領域122に記録し、一時バッファ121内の全ての情報を削除する。続くステップS416では時刻差バッファ124内の全ての情報を削除してステップS342に進む。ステップS342以降の処理は第1の実施の形態と同様なので説明を省略する。
In step S340, which is executed when a negative determination is made in step S330, the CPU 11 records all the information in the
(動作例)
図17は、本動作例におけるイベントの発生状況、および全てのイベントが発生した後にログ領域122に記録される情報を示す図である。先頭の4つのイベントがECU100Bにより観測されると、時刻差バッファ124には図14に示す情報が格納される。そして、最後のイベントCが発生すると、図15のステップS308およびS314において否定判断され、図16のステップS330において肯定判断されるので、ステップS412が実行される。そのためログ領域122にイベント識別情報としてパターン識別子Pが記録され、タイムスタンプとして「−90、+80、−100」が記録される。第1の実施の形態では、図7(a)に示すように置換されるパターンに該当する一連のイベントのうち、最後のイベントの観測時刻に対応するタイムスタンプが記録されたが、第3の実施の形態では各イベントが発生した時間の間隔が記録される。
(Operation example)
FIG. 17 is a diagram showing an event occurrence state in this operation example and information recorded in the
上述した第3の実施の形態によれば、次の作用効果が得られる。
(7)パターン情報112Aには、パターン情報に含まれる連続する2つのイベントについてあらかじめ想定された発生時刻の差である想定時刻差、すなわち想定間隔が含まれる。パターン認識部112は、現実の時刻の差であってパターン情報に含まれる連続するイベント同士が発生する時刻の差である現実時刻差を算出し、現実時刻差と想定時刻差との差である2階差分をログ領域にさらに記録する。
そのためECU100Bは、少ない記憶領域を使ってイベントが発生した間隔を記録できる。時刻レジスタ111がカウントする時間の分解能が高く、現実時刻差が想定時刻差に近いほどこの効果は顕著である。
According to the third embodiment described above, the following operational effects can be obtained.
(7) The
Therefore, the
(第3の実施の形態の変形例1)
ECU110Bがイベント情報113を備え、CPU11がイベントIDを特定してもよい。すなわち、図15においてステップS304の次にステップS306を実行してからステップS308に進んでもよい。
(Modification 1 of 3rd Embodiment)
The ECU 110B may include the
(第3の実施の形態の変形例2)
図16のステップS412において、ログ領域122に時刻差バッファ124の値だけでなく、置換されるイベントのいずれかの観測時刻をあわせて記録してもよい。本変形例によれば、ログ領域122に記録された情報を用いて各イベントが発生した時刻も特定することができる。
(Modification 2 of the third embodiment)
In step S412 of FIG. 16, not only the value of the
本発明には以下のログ格納方法も含まれる。
(1)発生したイベントのログが記録されるログ領域と、正常時の前記イベントの発生順序である正常順序および前記正常順序に対応する文字列を含むパターン情報が格納される記憶部と、を備える車載電子制御装置において実行されるログ格納方法であって、前記車載電子制御装置が前記正常順序に代えて前記文字列を前記ログ領域に記録することでログを圧縮するログ格納方法。
(2)上記ログ格納方法において、前記イベントの発生順序が前記正常順序に合致しない場合は、前記車載電子制御装置が前記ログの圧縮を行わずに前記イベントを前記ログ領域に記録するログ格納方法。
(3)上記ログ格納方法において、前記イベントの発生順序が前記正常順序と完全に一致せず途中まで一致する場合は前記車載電子制御装置が異常の発生を報知するログ格納方法。
(4)上記ログ格納方法において、前記イベントが発生するたびに前記車載電子制御装置が発生した前記イベントの順序と前記正常順序との一致判断を行い、前記正常順序と途中まで一致すると判断すると、前記車載電子制御装置が一致する範囲を一時的に記憶するログ格納方法。
(5)上記ログ格納方法において、前記正常順序はツリー構造のデータベースとして格納され、前記イベントが発生するたびに前記車載電子制御装置が前記ツリー構造のデータベースをシーケンシャルに検索するログ格納方法。
(6)上記ログ格納方法において、前記パターン情報には、前記パターン情報に含まれる連続する2つのイベントについてあらかじめ想定された発生時刻の差である想定時刻差が含まれ、前記車載電子制御装置が、前記2つのイベントの現実の発生時刻の差である現実時刻差を算出し、前記現実時刻差と前記想定時刻差との差を前記ログ領域にさらに記録するログ格納方法。
(7)上記ログ格納方法において、前記記憶部には、特定の異常時における前記イベントの発生順序である異常順序、および前記異常順序に対応する異常文字列を含む異常パターン情報がさらに格納され、前記イベントの発生順序が前記異常順序に合致する場合は、前記車載電子制御装置が、前記異常順序に代えて前記異常文字列を前記ログ領域に記録するとともに、異常の発生を報知するログ格納方法。
The present invention also includes the following log storage method.
(1) a log area in which a log of an event that has occurred is recorded, and a storage unit in which pattern information including a normal order that is the occurrence order of the event at a normal time and a character string corresponding to the normal order is stored A log storage method executed in an in-vehicle electronic control device, wherein the in-vehicle electronic control device compresses a log by recording the character string in the log area instead of the normal order.
(2) In the log storage method, when the occurrence order of the events does not match the normal order, the on-vehicle electronic control device records the event in the log area without compressing the log. .
(3) In the log storage method, the vehicle-mounted electronic control device notifies the occurrence of an abnormality when the occurrence order of the events does not completely match the normal order but matches partway.
(4) In the log storage method, each time the event occurs, the in-vehicle electronic control device determines whether the order of the events generated and the normal order match, and determines that the normal order matches halfway, A log storage method for temporarily storing a range in which the in-vehicle electronic control device matches.
(5) In the log storage method, the normal order is stored as a tree-structured database, and the in-vehicle electronic control device sequentially searches the tree-structured database every time the event occurs.
(6) In the log storage method, the pattern information includes an assumed time difference that is a difference between occurrence times assumed in advance for two consecutive events included in the pattern information. A log storage method for calculating a real time difference, which is a difference between actual occurrence times of the two events, and further recording a difference between the real time difference and the assumed time difference in the log area.
(7) In the log storage method, the storage unit further stores abnormal pattern information including an abnormal order that is the order of occurrence of the event at the time of a specific abnormality, and an abnormal character string corresponding to the abnormal order, When the event occurrence order matches the abnormality order, the in-vehicle electronic control device records the abnormality character string in the log area instead of the abnormality order, and notifies the occurrence of abnormality .
ECU100が不図示の入出力インタフェースを備え、必要なときに入出力インタフェースとECU100が利用可能な媒体を介して、他の装置からプログラムが読み込まれてもよい。ここで媒体とは、例えば入出力インタフェースに着脱可能な記憶媒体、または通信媒体、すなわち有線、無線、光などのネットワーク、または当該ネットワークを伝搬する搬送波やディジタル信号、を指す。また、プログラムにより実現される機能の一部または全部がハードウエア回路やFPGAにより実現されてもよい。
上述した各実施の形態および変形例は、それぞれ組み合わせてもよい。
上記では、種々の実施の形態および変形例を説明したが、本発明はこれらの内容に限定されるものではない。本発明の技術的思想の範囲内で考えられるその他の態様も本発明の範囲内に含まれる。
The
The above-described embodiments and modifications may be combined.
Although various embodiments and modifications have been described above, the present invention is not limited to these contents. Other embodiments conceivable within the scope of the technical idea of the present invention are also included in the scope of the present invention.
14 … 不揮発性メモリ
112 … パターン認識部
112A、112B … パターン情報
113 … イベント情報
121 … 一時バッファ
122 … ログ領域
123 … スナップショット領域
124 … 時刻差バッファ
14 ... Nonvolatile memory
112 ...
113… Event information
121… Temporary buffer
122 ... Log area
123 ... Snapshot area
124 ... Time difference buffer
Claims (14)
正常時の前記イベントの発生順序である正常順序、および前記正常順序に対応する文字列を含むパターン情報が格納される記憶部と、
前記正常順序に代えて前記文字列を前記ログ領域に記録することで前記ログを圧縮する圧縮部とを備える車載電子制御装置。 A log area where logs of events that occur are recorded,
A storage unit for storing pattern information including a normal order that is the order of occurrence of the events at a normal time and a character string corresponding to the normal order;
An in-vehicle electronic control device comprising: a compression unit that compresses the log by recording the character string in the log area instead of the normal order.
前記圧縮部は、前記イベントの発生順序が前記正常順序に合致しない場合は、前記ログの圧縮を行わずに前記イベントを前記ログ領域に記録する車載電子制御装置。 The in-vehicle electronic control device according to claim 1,
The compression unit is an in-vehicle electronic control unit that records the event in the log area without compressing the log when the occurrence order of the event does not match the normal order.
異常の発生を報知する報知部をさらに備え、
前記圧縮部は、前記イベントの発生順序が前記正常順序と完全に一致せず途中まで一致する場合は前記報知部を用いて異常の発生を報知する車載電子制御装置。 The in-vehicle electronic control device according to claim 1,
It further includes a notification unit that notifies the occurrence of an abnormality,
The compression unit is an in-vehicle electronic control device that uses the notification unit to notify the occurrence of an abnormality when the occurrence order of the events does not completely match the normal order and does not completely match.
前記圧縮部は、前記イベントが発生するたびに発生した前記イベントの順序と前記正常順序との一致判断を行い、前記正常順序と途中まで一致すると判断すると、一致する範囲を一時的に記憶する車載電子制御装置。 The in-vehicle electronic control device according to claim 1,
The compression unit performs a determination of matching between the order of the events that occur each time the event occurs and the normal order, and if it is determined that the order matches the normal order, temporarily stores the matching range. Electronic control device.
前記正常順序はツリー構造のデータベースとして格納され、
前記圧縮部は、前記イベントが発生するたびに前記ツリー構造のデータベースをシーケンシャルに検索する車載電子制御装置。 The in-vehicle electronic control device according to claim 4,
The normal order is stored as a tree-structured database,
The compression unit is an on-vehicle electronic control device that sequentially searches the tree-structured database every time the event occurs.
前記パターン情報には、前記パターン情報に含まれる連続する2つのイベントについてあらかじめ想定された発生時刻の差である想定時刻差が含まれ、
前記圧縮部は、前記2つのイベントの現実の発生時刻の差である現実時刻差を算出し、前記現実時刻差と前記想定時刻差との差を前記ログ領域にさらに記録する車載電子制御装置。 The in-vehicle electronic control device according to claim 1,
The pattern information includes an assumed time difference that is a difference between occurrence times assumed in advance for two consecutive events included in the pattern information,
The in-vehicle electronic control device, wherein the compression unit calculates a real time difference that is a difference between actual occurrence times of the two events, and further records a difference between the real time difference and the assumed time difference in the log area.
異常の発生を報知する報知部をさらに備え、
前記記憶部には、特定の異常時における前記イベントの発生順序である異常順序、および前記異常順序に対応する異常文字列を含む異常パターン情報がさらに格納され、
前記圧縮部は、前記イベントの発生順序が前記異常順序に合致する場合は、前記異常順序に代えて前記異常文字列を前記ログ領域に記録するとともに、前記報知部を用いて異常の発生を報知する車載電子制御装置。 The in-vehicle electronic control device according to claim 1,
It further includes a notification unit that notifies the occurrence of an abnormality,
The storage unit further stores abnormal pattern information including an abnormal order that is the order of occurrence of the event at the time of a specific abnormality, and an abnormal character string corresponding to the abnormal order,
The compression unit records the abnormal character string in the log area instead of the abnormal order when the occurrence order of the events matches the abnormal order, and notifies the occurrence of abnormality using the notification unit. In-vehicle electronic control device.
前記車載電子制御装置が前記正常順序に代えて前記文字列を前記ログ領域に記録することでログを圧縮するログ格納方法。 An in-vehicle electronic device comprising: a log area in which a log of an event that has occurred is recorded; and a storage unit in which pattern information including a normal order that is the order in which the event occurs and a character string that corresponds to the normal order is stored A log storage method executed in a control device,
A log storage method in which the in-vehicle electronic control device compresses a log by recording the character string in the log area instead of the normal order.
前記イベントの発生順序が前記正常順序に合致しない場合は、前記車載電子制御装置が前記ログの圧縮を行わずに前記イベントを前記ログ領域に記録するログ格納方法。 The log storage method according to claim 8,
A log storage method in which the in-vehicle electronic control device records the event in the log area without compressing the log when the event occurrence order does not match the normal order.
前記イベントの発生順序が前記正常順序と完全に一致せず途中まで一致する場合は前記車載電子制御装置が異常の発生を報知するログ格納方法。 The log storage method according to claim 8,
A log storage method in which the in-vehicle electronic control device notifies the occurrence of an abnormality when the occurrence order of the events does not completely match the normal order and does not completely match.
前記イベントが発生するたびに前記車載電子制御装置が発生した前記イベントの順序と前記正常順序との一致判断を行い、前記正常順序と途中まで一致すると判断すると、前記車載電子制御装置が一致する範囲を一時的に記憶するログ格納方法。 The log storage method according to claim 8,
When the event occurs, the in-vehicle electronic control device performs a match determination between the order of the events generated and the normal order. Log storage method to temporarily store.
前記正常順序はツリー構造のデータベースとして格納され、
前記イベントが発生するたびに前記車載電子制御装置が前記ツリー構造のデータベースをシーケンシャルに検索するログ格納方法。 The log storage method according to claim 11,
The normal order is stored as a tree-structured database,
A log storage method in which the in-vehicle electronic control device sequentially searches the tree-structured database every time the event occurs.
前記パターン情報には、前記パターン情報に含まれる連続する2つのイベントについてあらかじめ想定された発生時刻の差である想定時刻差が含まれ、
前記車載電子制御装置が、前記2つのイベントの現実の発生時刻の差である現実時刻差を算出し、前記現実時刻差と前記想定時刻差との差を前記ログ領域にさらに記録するログ格納方法。 The log storage method according to claim 8,
The pattern information includes an assumed time difference that is a difference between occurrence times assumed in advance for two consecutive events included in the pattern information,
A log storage method in which the in-vehicle electronic control device calculates a real time difference which is a difference between actual occurrence times of the two events, and further records a difference between the real time difference and the assumed time difference in the log area. .
前記記憶部には、特定の異常時における前記イベントの発生順序である異常順序、および前記異常順序に対応する異常文字列を含む異常パターン情報がさらに格納され、
前記イベントの発生順序が前記異常順序に合致する場合は、前記車載電子制御装置が、前記異常順序に代えて前記異常文字列を前記ログ領域に記録するとともに、異常の発生を報知するログ格納方法。 The log storage method according to claim 8,
The storage unit further stores abnormal pattern information including an abnormal order that is the order of occurrence of the event at the time of a specific abnormality, and an abnormal character string corresponding to the abnormal order,
When the event occurrence order matches the abnormality order, the in-vehicle electronic control device records the abnormality character string in the log area instead of the abnormality order, and notifies the occurrence of abnormality .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017000648A JP6735683B2 (en) | 2017-01-05 | 2017-01-05 | In-vehicle electronic control device, log storage method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017000648A JP6735683B2 (en) | 2017-01-05 | 2017-01-05 | In-vehicle electronic control device, log storage method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018109900A true JP2018109900A (en) | 2018-07-12 |
JP6735683B2 JP6735683B2 (en) | 2020-08-05 |
Family
ID=62844450
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017000648A Active JP6735683B2 (en) | 2017-01-05 | 2017-01-05 | In-vehicle electronic control device, log storage method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6735683B2 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06282468A (en) * | 1993-03-30 | 1994-10-07 | Toshiba Corp | Information processor |
JP2006259811A (en) * | 2005-03-15 | 2006-09-28 | Nec Corp | Log creating device, and program |
JP2009043020A (en) * | 2007-08-08 | 2009-02-26 | Nomura Research Institute Ltd | Log analysis support device |
JP2013086583A (en) * | 2011-10-14 | 2013-05-13 | Toyota Motor Corp | Vehicle operation history storage device |
-
2017
- 2017-01-05 JP JP2017000648A patent/JP6735683B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06282468A (en) * | 1993-03-30 | 1994-10-07 | Toshiba Corp | Information processor |
JP2006259811A (en) * | 2005-03-15 | 2006-09-28 | Nec Corp | Log creating device, and program |
JP2009043020A (en) * | 2007-08-08 | 2009-02-26 | Nomura Research Institute Ltd | Log analysis support device |
JP2013086583A (en) * | 2011-10-14 | 2013-05-13 | Toyota Motor Corp | Vehicle operation history storage device |
Non-Patent Citations (1)
Title |
---|
木村 達明 他: "大規模ネットワークの故障診断に向けた監視ログの可視化法", 電子情報通信学会技術研究報告, vol. 第112巻 第463号, JPN6020005895, 28 February 2013 (2013-02-28), JP, pages 495 - 498, ISSN: 0004215980 * |
Also Published As
Publication number | Publication date |
---|---|
JP6735683B2 (en) | 2020-08-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106656536B (en) | Method and equipment for processing service calling information | |
CN109308227B (en) | Fault detection control method and related equipment | |
CN102143008A (en) | Method and device for diagnosing fault event in data center | |
CN111078513A (en) | Log processing method, device, equipment, storage medium and log alarm system | |
JPWO2014049804A1 (en) | System operation tracing method in distributed system | |
CN111177165A (en) | Method, device and equipment for detecting data consistency | |
KR101459868B1 (en) | Communication test device and method thereof | |
CN107357619B (en) | Method, device, equipment and storage medium for generating card configuration file | |
WO2018066661A1 (en) | Log analysis method, system, and recording medium | |
CN109861843B (en) | Method, device and equipment for completely collecting and confirming log files | |
CN110750533A (en) | Data storage method, device and equipment based on multiple service attributes | |
CN109284331B (en) | Certificate making information acquisition method based on service data resources, terminal equipment and medium | |
US8682899B2 (en) | Apparatus and method for managing systems each including a plurality of configuration items | |
CN111897737B (en) | Missing detection method and device for program test of micro-service system | |
JP2018109900A (en) | In-vehicle electronic control apparatus and log storing method | |
US10706207B2 (en) | Circuit design verification apparatus and program | |
CN112463913A (en) | Abnormal event discovery method and system | |
CN115544120A (en) | Multi-sensor event generation system, method, electronic device and storage medium | |
JP2009266031A (en) | Computer system and computer | |
CN111339100B (en) | Data checking method and device | |
CN114141302A (en) | Test method of solid state disk and electronic equipment | |
US10318371B2 (en) | Apparatus and method to determine a setting item causing an incident based on action records therefor | |
JP3498702B2 (en) | Computer system and trace information control method used therefor | |
KR20160043378A (en) | Apparatus and method for updating vehicle device having multiple modules | |
CN115118793B (en) | BLF file analysis fault tolerance method and device and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20170403 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20170927 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190311 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200127 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200218 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200408 |
|
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: 20200707 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200714 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6735683 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |