JP6839844B2 - Recording device, vehicle and recording method - Google Patents

Recording device, vehicle and recording method Download PDF

Info

Publication number
JP6839844B2
JP6839844B2 JP2017048088A JP2017048088A JP6839844B2 JP 6839844 B2 JP6839844 B2 JP 6839844B2 JP 2017048088 A JP2017048088 A JP 2017048088A JP 2017048088 A JP2017048088 A JP 2017048088A JP 6839844 B2 JP6839844 B2 JP 6839844B2
Authority
JP
Japan
Prior art keywords
pattern
unit
recording
cycle
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017048088A
Other languages
Japanese (ja)
Other versions
JP2018152745A (en
Inventor
吉治 今本
吉治 今本
正人 田邉
正人 田邉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Intellectual Property Management Co Ltd
Original Assignee
Panasonic Intellectual Property Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Intellectual Property Management Co Ltd filed Critical Panasonic Intellectual Property Management Co Ltd
Priority to JP2017048088A priority Critical patent/JP6839844B2/en
Publication of JP2018152745A publication Critical patent/JP2018152745A/en
Application granted granted Critical
Publication of JP6839844B2 publication Critical patent/JP6839844B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Description

本発明は、データ処理技術に関し、特に記録装置、車両および記録方法に関する。 The present invention relates to data processing techniques, particularly to recording devices, vehicles and recording methods.

近年、自動車には、多数の電子制御ユニット(Electronic Control Unit、以下「ECU」と呼ぶ。)が搭載されている。これらのECUを繋ぐネットワークは車載ネットワークと呼ばれる。車載ネットワークには多数の規格が存在するが、広く普及した規格としてCAN(Controller Area Network)がある。 In recent years, a large number of electronic control units (Electronic Control Units, hereinafter referred to as "ECUs") are mounted on automobiles. The network connecting these ECUs is called an in-vehicle network. There are many standards for in-vehicle networks, but CAN (Controller Area Network) is a widely used standard.

特開2010−144060号公報JP-A-2010-144060

車載ネットワークを流れるデータを記録して車両内の記録媒体または車両外のサーバへ保存することにより、エラーの発生原因または車両の故障を調べる手がかりとすることが期待される。一方、車両の製造コストおよびシステムの運用コストを抑制するために、記録媒体の記憶領域またはネットワーク帯域の効率的な利用が求められる。 By recording the data flowing through the in-vehicle network and storing it in the recording medium inside the vehicle or the server outside the vehicle, it is expected to be a clue to investigate the cause of the error or the failure of the vehicle. On the other hand, efficient use of the storage area or network bandwidth of the recording medium is required in order to suppress the manufacturing cost of the vehicle and the operating cost of the system.

上記特許文献1では、収集したパケットをポート番号に応じて圧縮して保存する通信記録装置が記載されている。しかし、上記特許文献1の技術は、TCP/IP等、高いレイヤでのデータ蓄積を目的とするものであり、より低レイヤのパケット到着間隔等のデータは欠落してしまう。 Patent Document 1 describes a communication recording device that compresses and stores collected packets according to a port number. However, the technique of Patent Document 1 is aimed at accumulating data in a higher layer such as TCP / IP, and data such as a packet arrival interval in a lower layer is lost.

本発明はこうした状況に鑑みてなされたものであり、1つの目的は、車載ネットワークを流れるデータを効率的に蓄積することである。 The present invention has been made in view of such a situation, and one object is to efficiently store data flowing through an in-vehicle network.

上記課題を解決するために、本発明のある態様の記録装置は、IDが付与された複数種類のパケットが、予め定められた周期において車載ネットワークで伝送される順序のパターンを複数記憶する記憶部と、車載ネットワークから複数種類のパケットを受信する受信部と、記憶部に記憶された複数のパターンのうち、受信部により受信された複数種類のパケットの受信順序が合致する周期ごとのパターンを検査データとして記録する第1記録部と、受信部により受信された複数種類のパケットのデータを検査データとして記録する第2記録部と、を備える。 In order to solve the above problems, the recording device of a certain aspect of the present invention is a storage unit that stores a plurality of patterns in the order in which a plurality of types of packets to which IDs are assigned are transmitted on an in-vehicle network in a predetermined cycle. And, among the receiving unit that receives multiple types of packets from the in-vehicle network and the multiple patterns stored in the storage unit, the pattern for each cycle in which the receiving order of the multiple types of packets received by the receiving unit matches is inspected. It includes a first recording unit that records data, and a second recording unit that records data of a plurality of types of packets received by the receiving unit as inspection data.

本発明の別の態様もまた、記録装置である。この装置は、IDが付与された複数種類のパケットを車載ネットワークから受信する受信部と、受信部により受信された複数種類のパケットのIDと、各パケットの受信時刻とを検査データとして記録する第1記録部と、受信部により受信された複数種類のパケットのデータを検査データとして記録し、同じIDが付与されたパケットのデータをグループ化して記録する第2記録部と、第2記録部により記録されたパケットのデータを圧縮する圧縮部と、を備える。 Another aspect of the present invention is also a recording device. This device records as inspection data a receiving unit that receives a plurality of types of packets to which an ID is assigned from an in-vehicle network, IDs of the plurality of types of packets received by the receiving unit, and a reception time of each packet. The first recording unit, the second recording unit that records the data of a plurality of types of packets received by the receiving unit as inspection data, and groups and records the data of the packets with the same ID, and the second recording unit. It includes a compression unit that compresses the data of the recorded packet.

本発明のさらに別の態様は、記録方法である。この方法は、IDが付与された複数種類のパケットが、予め定められた周期において車載ネットワークで伝送される順序のパターンを複数記憶する記憶部を備える装置が、車載ネットワークから複数種類のパケットを受信し、記憶部に記憶された複数のパターンのうち、受信した複数種類のパケットの受信順序が合致する周期ごとのパターンを検査データとして記録し、受信した複数種類のパケットのデータを検査データとして記録する。 Yet another aspect of the present invention is the recording method. In this method, a device including a storage unit that stores a plurality of patterns of the order in which a plurality of types of ID-assigned packets are transmitted in a vehicle-mounted network in a predetermined cycle receives a plurality of types of packets from the vehicle-mounted network. Then, among the plurality of patterns stored in the storage unit, the pattern for each cycle in which the reception order of the received multiple types of packets matches is recorded as inspection data, and the data of the received multiple types of packets is recorded as inspection data. To do.

なお、以上の構成要素の任意の組合せ、本発明の表現を、コンピュータプログラム、コンピュータプログラムを記録した記録媒体、本装置を搭載した車両などの間で変換したものもまた、本発明の態様として有効である。 It should be noted that any combination of the above components and the expression of the present invention converted between a computer program, a recording medium on which the computer program is recorded, a vehicle equipped with the present device, and the like are also effective as aspects of the present invention. Is.

本発明によれば、車載ネットワークを流れるデータを効率的に蓄積することができる。 According to the present invention, data flowing through the in-vehicle network can be efficiently accumulated.

図1(a)と図1(b)は、CANのトラフィックを模式的に示す図である。1 (a) and 1 (b) are diagrams schematically showing CAN traffic. 図2(a)は、伝送パターンの例を示す図であり、図2(b)は、記録ECUにより記録される検査データの例を示す図である。FIG. 2A is a diagram showing an example of a transmission pattern, and FIG. 2B is a diagram showing an example of inspection data recorded by the recording ECU. 第1実施例の車両の機能構成を示すブロック図である。It is a block diagram which shows the functional structure of the vehicle of 1st Example. 第1実施例の記録ECUの動作を示すフローチャートである。It is a flowchart which shows the operation of the recording ECU of 1st Example. 図4のS12の検査データ記録処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the inspection data recording process of S12 of FIG. パケットの受信パターンの例を示す図である。It is a figure which shows the example of the packet reception pattern. 図7(a)は、基準パターンの例を示す図であり、図7(b)は、差分パターンの例を示す図である。FIG. 7A is a diagram showing an example of a reference pattern, and FIG. 7B is a diagram showing an example of a difference pattern. 図4のS12の検査データ記録処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the inspection data recording process of S12 of FIG. 複数の周期において受信されたパケットのIDを示す。Indicates the ID of the packet received in a plurality of cycles. 図10(a)は、差分パターンの例を示す図であり、図10(b)は、差分パターンを説明する図である。FIG. 10A is a diagram showing an example of a difference pattern, and FIG. 10B is a diagram for explaining a difference pattern. 図4のS12の検査データ記録処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the inspection data recording process of S12 of FIG. 図12(a)と図12(b)は、異常の可能性があるパケットの受信パターンを示す図である。12 (a) and 12 (b) are diagrams showing reception patterns of packets that may be abnormal. 第4実施例の車両の機能構成を示すブロック図である。It is a block diagram which shows the functional structure of the vehicle of 4th Example. 第4実施例の記録ECUの動作を示すフローチャートである。It is a flowchart which shows the operation of the recording ECU of 4th Example.

[第1実施例]
実施例の車両の構成を説明する前に概要を説明する。実施例の車両は記録ECUを備える。記録ECUは、車両における攻撃の有無または自動運転の正常性をクラウド上の検査装置に検査させることを目的として、CANを流れるパケット(CANメッセージ、フレームとも言える。)を検査データとして蓄積する。車両から検査装置への検査データのアップロードでは、帯域が限られたWLAN(Wireless LAN)を使用する。クラウドおよびWLANは、通信費が比較的高く、検査データのサイズを低減することが重要になる。
[First Example]
An outline will be given before explaining the configuration of the vehicle of the embodiment. The vehicle of the embodiment includes a recording ECU. The recording ECU accumulates packets (can also be called CAN messages or frames) flowing through the CAN as inspection data for the purpose of having an inspection device on the cloud inspect the presence or absence of an attack in the vehicle or the normality of automatic driving. When uploading inspection data from the vehicle to the inspection device, a WLAN (Wireless LAN) with a limited bandwidth is used. Communication costs are relatively high for clouds and WLANs, and it is important to reduce the size of inspection data.

実施例の記録ECUは、CANを流れるパケットの周期性を利用して、検査データのサイズを低減する。具体的には、記録ECUは、受信したパケットを周期ごとにグループ化し、周期ごとに出現パターン(後述の伝送パターン)を使用して冗長性を除去したパケットデータを検査データとして蓄積する。実施例において蓄積対象とするパケットは、周期的に送信されるパケットであり、言い換えれば、所定期間おきに繰り返し送信されるパケットである。パケットをグループ化する周期を以下「グループ周期」とも呼ぶ。周期は、同じID(CAN−ID、フレームIDとも言える)のパケットが一定期間おきに繰り返し送信される場合に、その一定期間とも言える。 The recording ECU of the embodiment utilizes the periodicity of the packet flowing through the CAN to reduce the size of the inspection data. Specifically, the recording ECU groups received packets for each cycle, and accumulates packet data from which redundancy has been removed by using an appearance pattern (transmission pattern described later) for each cycle as inspection data. The packet to be accumulated in the embodiment is a packet that is periodically transmitted, in other words, a packet that is repeatedly transmitted at predetermined intervals. The cycle for grouping packets is also referred to as "group cycle" below. The cycle can also be said to be a fixed period when packets having the same ID (which can also be called CAN-ID or frame ID) are repeatedly transmitted at regular intervals.

なお、グループ周期は、パケットの送信周期と別の値に定められてもよい。グループ周期は、例えば、同じIDのパケットを2個受信する期間に設定されてもよく、言い換えれば、パケットの送信周期の2倍に設定されてもよい。また、ID−Aのパケットの送信周期Aと、ID−Bのパケットの送信周期Bとが異なる場合、グループ周期は、その差異を考慮した値に定められてもよい。例えば、グループ周期は、送信周期Aと送信周期bの公倍数の値に定められてもよい。 The group cycle may be set to a value different from the packet transmission cycle. The group cycle may be set to, for example, a period during which two packets having the same ID are received, in other words, may be set to twice the packet transmission cycle. Further, when the transmission cycle A of the packet of ID-A and the transmission cycle B of the packet of ID-B are different, the group cycle may be set to a value in consideration of the difference. For example, the group cycle may be set to a value that is a common multiple of the transmission cycle A and the transmission cycle b.

図1(a)と図1(b)は、CANのトラフィックを模式的に示す。図1(a)のIDとPL(ペイロード)の組が1つのパケットを示している。この例では、ID1のパケット、ID2のパケット、ID3のパケットがそれぞれ3回伝送されている。図1(b)は、ID1のパケット〜ID3のパケットの受信タイミング10を示している。ここでの周期T1、周期T2、周期T3は、1つのパケットを受信可能な単位時間であるタイムスロットを9個含む。例えば、周期T1では、2番目のタイムスロットでID1のパケットを受信し、3番目のタイムスロットでID2のパケットを受信し、4番目のタイムスロットでID3のパケットを受信したことを示している。 1 (a) and 1 (b) schematically show CAN traffic. The pair of ID and PL (payload) in FIG. 1A indicates one packet. In this example, the ID1 packet, the ID2 packet, and the ID3 packet are transmitted three times each. FIG. 1B shows the reception timing 10 of the packet of ID1 to the packet of ID3. Here, the period T1, the period T2, and the period T3 include nine time slots which are unit times in which one packet can be received. For example, in the cycle T1, it is shown that the packet of ID1 is received in the second time slot, the packet of ID2 is received in the third time slot, and the packet of ID3 is received in the fourth time slot.

なお、タイムスロットは、グループ周期におけるパケットの到着時刻(オフセット時間)を示す。例えば、グループ周期が20ミリ秒でタイムスロットが2ミリ秒である場合、当該グループ周期には10個のタイムスロットが存在する。グループ周期におけるタイムスロットの個数は、パケット到着間隔の記録精度になる。例えば、グループ周期の開始から2.5ミリ秒後等の中間に到達したパケットには、切り上げ・切り捨て・四捨五入等の既定の方法でタイムスロットが割り当てられるからである。したがって、グループ周期におけるタイムスロットの個数を増加させれば(上の例ではタイムスロットの個数を20にすれば)、より高い精度での記録が可能になる。なお、グループ周期における各タイムスロットは必ずしも等間隔でなくてもよい。 The time slot indicates the arrival time (offset time) of the packet in the group cycle. For example, if the group period is 20 milliseconds and the time slot is 2 milliseconds, there are 10 time slots in the group period. The number of time slots in the group cycle is the recording accuracy of the packet arrival interval. For example, a packet that arrives in the middle, such as 2.5 milliseconds after the start of the group cycle, is assigned a time slot by a default method such as rounding up, rounding down, or rounding off. Therefore, if the number of time slots in the group cycle is increased (in the above example, the number of time slots is set to 20), recording with higher accuracy becomes possible. Note that the time slots in the group cycle do not necessarily have to be evenly spaced.

図2(a)は、伝送パターン11の例を示す。伝送パターン11は、予め定められた長さの1周期中に、異なるIDが付与された複数種類のパケットが車載ネットワークで伝送される順序のパターンを示すデータである。また、伝送パターン11は、1周期中に、記録ECU22が、複数種類のパケットを受信する順序のパターンとも言える。図2(a)のPt(パターン)1は、2番目のタイムスロットでID1のパケットを受信し、3番目のタイムスロットでID2のパケットを受信し、4番目のタイムスロットでID3のパケットを受信するパターンである。Pt2は、2番目のタイムスロットでID2のパケットを受信し、3番目のタイムスロットでID1のパケットを受信し、4番目のタイムスロットでID3のパケットを受信するパターンである。 FIG. 2A shows an example of the transmission pattern 11. The transmission pattern 11 is data indicating a pattern of the order in which a plurality of types of packets to which different IDs are assigned are transmitted in the vehicle-mounted network in one cycle of a predetermined length. Further, the transmission pattern 11 can be said to be a pattern in which the recording ECU 22 receives a plurality of types of packets in one cycle. Pt (pattern) 1 of FIG. 2A receives the packet of ID1 in the second time slot, receives the packet of ID2 in the third time slot, and receives the packet of ID3 in the fourth time slot. It is a pattern to do. Pt2 is a pattern in which the packet of ID2 is received in the second time slot, the packet of ID1 is received in the third time slot, and the packet of ID3 is received in the fourth time slot.

図2(b)は、記録ECUにより記録される検査データの例を示す。検査データは、クラウド上の検査装置により検査されるデータである。検査データは、メタデータ、周期データ、ペイロードデータを含む。メタデータは、基準時間、周期時間、伝送パターンの定義を含む。基準時間は、検査開始時刻でもよく、最初の周期の開始時刻でもよい。周期時間は、1周期の時間の長さである。伝送パターンの定義は、例えば、図2(a)に示したように、複数種類のパケットの伝送順序を示すデータでもよい。 FIG. 2B shows an example of inspection data recorded by the recording ECU. The inspection data is data that is inspected by an inspection device on the cloud. The inspection data includes metadata, periodic data, and payload data. Metadata includes definitions of reference time, cycle time, and transmission pattern. The reference time may be the inspection start time or the start time of the first cycle. The cycle time is the length of time of one cycle. The definition of the transmission pattern may be, for example, data indicating the transmission order of a plurality of types of packets, as shown in FIG. 2A.

記録ECUは、1周期ごとに、周期の識別子(例えば「T1」)と、その周期における伝送パターンの識別子(例えば「Pt1」)との組を周期データとして記録する。また、記録ECUは、パケットのIDごとにペイロードのデータをグループ化して、ペイロードデータとして記録する。 The recording ECU records a set of a cycle identifier (for example, "T1") and a transmission pattern identifier (for example, "Pt1") in that cycle as cycle data for each cycle. Further, the recording ECU groups the payload data for each packet ID and records it as the payload data.

CANを流れるパケットの検査では、パケットの受信時刻が重要な情報になる。しかし、受信した複数のパケットのそれぞれに受信時刻を付加すると検査データのサイズが大きくなってしまう。そこで実施例では、パケットのペイロードデータとは別個に、周期ごとの伝送パターンを記録しておく。これにより、各パケットの受信タイミングを事後の検証時に把握可能(言い換えれば復元可能)にしつつ、各パケットへの受信時刻の付加が不要になり、検査データのサイズを低減することができる。また、複数の周期に同じ伝送パターンを適用でき、検査データのサイズを低減することができる。 In the inspection of packets flowing through the CAN, the reception time of the packet is important information. However, if the reception time is added to each of the plurality of received packets, the size of the inspection data becomes large. Therefore, in the embodiment, the transmission pattern for each cycle is recorded separately from the payload data of the packet. This makes it possible to grasp the reception timing of each packet at the time of subsequent verification (in other words, restore it), eliminate the need to add the reception time to each packet, and reduce the size of the inspection data. Further, the same transmission pattern can be applied to a plurality of cycles, and the size of inspection data can be reduced.

実施例1の構成を詳細に説明する。図3は、第1実施例の車両14の機能構成を示すブロック図である。本明細書のブロック図において示される各ブロックは、ハードウェア的には、コンピュータのCPU・メモリをはじめとする素子や機械装置で実現でき、ソフトウェア的にはコンピュータプログラム等によって実現されるが、ここでは、それらの連携によって実現される機能ブロックを描いている。これらの機能ブロックはハードウェア、ソフトウェアの組合せによっていろいろなかたちで実現できることは、当業者には理解されるところである。 The configuration of the first embodiment will be described in detail. FIG. 3 is a block diagram showing a functional configuration of the vehicle 14 of the first embodiment. Each block shown in the block diagram of the present specification can be realized by an element such as a computer CPU / memory or a mechanical device in terms of hardware, and can be realized by a computer program or the like in terms of software. Then, I draw a functional block realized by their cooperation. Those skilled in the art will understand that these functional blocks can be realized in various forms by combining hardware and software.

車両14は、LAN・WAN・インターネット等の通信網を介してクラウド上の検査装置16に接続される。車両14は、送信ECU20と記録ECU22を備える。送信ECU20と記録ECU22は、CAN24を介して接続される。なお、検査装置16は、車両14内の装置であってもよく、CAN24を介して記録ECU22と接続されてもよい。 The vehicle 14 is connected to the inspection device 16 on the cloud via a communication network such as LAN, WAN, or the Internet. The vehicle 14 includes a transmission ECU 20 and a recording ECU 22. The transmission ECU 20 and the recording ECU 22 are connected via the CAN 24. The inspection device 16 may be a device in the vehicle 14 or may be connected to the recording ECU 22 via the CAN 24.

送信ECU20は、CAN24へパケットを出力することにより、CAN24を介して他の車載装置(他のECU等)へパケットを送信するECUである。送信ECU20は、不図示のセンサーまたは不図示のアクチュエータに接続されたECUでもよく、カーナビゲーション装置またはIVI(In-Vehicle Infotainment)装置を制御するECUでもよい。図3では、送信ECU20を1つ描いたが、実際の車両14は、複数の送信ECU20を備えてもよい。また、1つの送信ECU20は、異なるIDを付与した複数種類のパケットをCAN24へ送信してもよい。 The transmission ECU 20 is an ECU that outputs a packet to the CAN 24 and transmits the packet to another in-vehicle device (another ECU or the like) via the CAN 24. The transmission ECU 20 may be an ECU connected to a sensor (not shown) or an actuator (not shown), or may be an ECU that controls a car navigation device or an IVI (In-Vehicle Infotainment) device. Although one transmission ECU 20 is drawn in FIG. 3, the actual vehicle 14 may include a plurality of transmission ECUs 20. Further, one transmission ECU 20 may transmit a plurality of types of packets with different IDs to the CAN 24.

送信ECU20は、パケット生成部30と通信部32を含む。パケット生成部30は、他の車載装置へ送信すべきメッセージをペイロードに含むパケットを生成する。通信部32は、パケット生成部30により生成されたパケットを、CANプロトコルにしたがってCAN24へ出力する。 The transmission ECU 20 includes a packet generation unit 30 and a communication unit 32. The packet generation unit 30 generates a packet including a message to be transmitted to another in-vehicle device in the payload. The communication unit 32 outputs the packet generated by the packet generation unit 30 to the CAN 24 according to the CAN protocol.

記録ECU22は、送信ECU20からCAN24へ出力されたパケットを監視し、蓄積するECUである。実施例では、記録ECU22は専用の装置として実装されるが、変形例として、記録ECU22の機能が、他の車載装置の機能の一部として実装されてもよい。例えば、CAN24の複数のバス間でフレームの中継およびルーティングを実行するCGW(Central GateWay)のECUに、記録ECU22の機能が組み込まれてもよい。 The recording ECU 22 is an ECU that monitors and stores packets output from the transmitting ECU 20 to the CAN 24. In the embodiment, the recording ECU 22 is implemented as a dedicated device, but as a modification, the function of the recording ECU 22 may be implemented as a part of the function of another in-vehicle device. For example, the function of the recording ECU 22 may be incorporated into the ECU of the CGW (Central GateWay) that executes frame relay and routing between a plurality of buses of the CAN 24.

記録ECU22は、パラメータ記憶部40、時刻管理部42、検査データ記憶部44、通信部46、パケット記録部48、検査データ送信部50を含む。これらの機能ブロックに対応する複数のモジュールを含むコンピュータプログラムが記録ECU22のメモリに格納されてもよい。記録ECU22のCPUは、そのコンピュータプログラムを適宜読み出して実行することにより、各機能ブロックの機能を発揮してもよい。 The recording ECU 22 includes a parameter storage unit 40, a time management unit 42, an inspection data storage unit 44, a communication unit 46, a packet recording unit 48, and an inspection data transmission unit 50. A computer program including a plurality of modules corresponding to these functional blocks may be stored in the memory of the recording ECU 22. The CPU of the recording ECU 22 may exert the function of each functional block by appropriately reading and executing the computer program.

パラメータ記憶部40は、図2(b)に示した態様の検査データを記録するための各種パラメータを記憶する。具体的には、パラメータ記憶部40は、予め定められた周期時間(例えば24ミリ秒)と、予め定められた複数の伝送パターンを記憶する。 The parameter storage unit 40 stores various parameters for recording the inspection data of the aspect shown in FIG. 2 (b). Specifically, the parameter storage unit 40 stores a predetermined period time (for example, 24 milliseconds) and a plurality of predetermined transmission patterns.

時刻管理部42は、現在時刻を管理する。検査データ記憶部44は、検査データを記憶する記憶領域である。通信部46は、CANプロトコルにしたがって、異なるIDが付与された複数種類のパケットをCAN24から受信する。また、通信部46は、WLANを介して検査装置16と通信する。 The time management unit 42 manages the current time. The inspection data storage unit 44 is a storage area for storing inspection data. The communication unit 46 receives a plurality of types of packets with different IDs from the CAN 24 according to the CAN protocol. Further, the communication unit 46 communicates with the inspection device 16 via the WLAN.

パケット記録部48は、パラメータ記憶部40に記憶されたパラメータと、通信部46により受信されたパケットとに基づく検査データを検査データ記憶部44に格納する。検査データ送信部50は、検査データ記憶部44に格納された検査データを、通信部46を介して検査装置16へ送信する。 The packet recording unit 48 stores the inspection data based on the parameters stored in the parameter storage unit 40 and the packets received by the communication unit 46 in the inspection data storage unit 44. The inspection data transmission unit 50 transmits the inspection data stored in the inspection data storage unit 44 to the inspection device 16 via the communication unit 46.

パケット記録部48は、パターン記録部52、ペイロード記録部54、圧縮部56を含む。パターン記録部52は、パラメータ記憶部40に記憶された複数の伝送パターンのうち、或る周期に受信された複数種類のパケットの受信順序が合致する伝送パターンを、当該周期の伝送パターンとして特定する。すなわち、パターン記録部52は、検査データ作成期間内の複数の周期について、周期ごとの伝送パターンを特定する。パターン記録部52は、各周期の識別子と、各周期の伝送パターンとを対応付けた周期データを検査データ記憶部44に格納する(図2(b))。 The packet recording unit 48 includes a pattern recording unit 52, a payload recording unit 54, and a compression unit 56. The pattern recording unit 52 specifies, among the plurality of transmission patterns stored in the parameter storage unit 40, a transmission pattern in which the reception order of a plurality of types of packets received in a certain cycle matches, as a transmission pattern in the cycle. .. That is, the pattern recording unit 52 specifies a transmission pattern for each cycle for a plurality of cycles within the inspection data creation period. The pattern recording unit 52 stores the cycle data in which the identifier of each cycle and the transmission pattern of each cycle are associated with each other in the inspection data storage unit 44 (FIG. 2B).

ペイロード記録部54は、或る周期に受信された複数種類のパケットそれぞれのペイロードデータを、IDごとに区分けして検査データ記憶部44に格納する(図2(b))。言い換えれば、ペイロード記録部54は、同じIDが付与されたパケットのペイロードデータをグループ化して検査データ記憶部44に記録する。ペイロード記録部54は、同一ファイル内のIDごとの領域に、各IDのペイロードデータを分けて記録してもよい。また、ペイロード記録部54は、各IDのペイロードデータを、IDごとに異なるファイルに記録してもよい。 The payload recording unit 54 stores the payload data of each of the plurality of types of packets received in a certain cycle in the inspection data storage unit 44 by classifying them by ID (FIG. 2B). In other words, the payload recording unit 54 groups the payload data of the packets to which the same ID is assigned and records them in the inspection data storage unit 44. The payload recording unit 54 may separately record the payload data of each ID in the area for each ID in the same file. Further, the payload recording unit 54 may record the payload data of each ID in a different file for each ID.

なお、パターン記録部52とペイロード記録部54は、周期データとペイロードデータを異なる記憶領域に記録する。例えば、(1)周期データとペイロードデータを同一ファイルの別領域に論理的に分けて記録してもよい。また、(2)周期データとペイロードデータのそれぞれを異なるファイルに記録してもよい。 The pattern recording unit 52 and the payload recording unit 54 record the periodic data and the payload data in different storage areas. For example, (1) periodic data and payload data may be logically divided and recorded in different areas of the same file. Further, (2) periodic data and payload data may be recorded in different files.

圧縮部56は、検査データ記憶部44に格納された検査データを公知のアルゴリズム(例えばgzip)により圧縮する。圧縮部56は、ペイロード記録部54により記録され、かつ、IDごとにグループ化されたペイロードデータを圧縮する。同じIDのパケットは、ペイロードの内容が類似することが多いため、IDごとにグループ化されたペイロードデータを圧縮することで、圧縮の効率を高めることができる。なお、圧縮部56は、IDごとにグループ化されたペイロードデータをグループ単位(言い換えればID単位)で圧縮してもよい。例えば、図2(b)に示すペイロードデータの場合、ID1、ID2、ID3それぞれのペイロードデータを別個に圧縮してもよい。 The compression unit 56 compresses the inspection data stored in the inspection data storage unit 44 by a known algorithm (for example, gzip). The compression unit 56 compresses the payload data recorded by the payload recording unit 54 and grouped by ID. Since packets with the same ID often have similar payload contents, the efficiency of compression can be improved by compressing the payload data grouped by ID. The compression unit 56 may compress the payload data grouped by ID in group units (in other words, ID units). For example, in the case of the payload data shown in FIG. 2B, the payload data of each of ID1, ID2, and ID3 may be compressed separately.

以上の構成による記録ECU22の動作を説明する。
図4は、第1実施例の記録ECU22の動作を示すフローチャートである。電源オン(イグニッションオン)等の開始条件が満たされると、パケット記録部48は、パラメータ記憶部40からパラメータを読み込む(S10)。パケット記録部48は、1周期分の検査データ記録処理を実行する(S12)。予め定められた個数の周期分、検査データの記録が未完了であれば(S14のN)、S12に戻り、次の周期の検査データ記録処理を実行する。予め定められた個数の周期分、検査データの記録が完了すると(S14のY)、圧縮部56は、検査データを圧縮する(S16)。検査データ送信部50は、圧縮された検査データを検査装置16へ送信する(S18)。
The operation of the recording ECU 22 with the above configuration will be described.
FIG. 4 is a flowchart showing the operation of the recording ECU 22 of the first embodiment. When the start condition such as power on (ignition on) is satisfied, the packet recording unit 48 reads the parameter from the parameter storage unit 40 (S10). The packet recording unit 48 executes the inspection data recording process for one cycle (S12). If the inspection data recording is not completed for the predetermined number of cycles (N in S14), the process returns to S12 and the inspection data recording process for the next cycle is executed. When the recording of the inspection data is completed for a predetermined number of cycles (Y in S14), the compression unit 56 compresses the inspection data (S16). The inspection data transmission unit 50 transmits the compressed inspection data to the inspection device 16 (S18).

図5は、図4のS12の検査データ記録処理の詳細を示すフローチャートである。不図示だが、パターン記録部52は、検査データ記録処理の開始時に、現在時刻を基準時刻として検査データ記憶部44に格納し、予め定められた1周期の時間と、既存の伝送パターンを検査データ記憶部44にさらに格納する(図2(b)のメタデータ)。通信部46は、CAN24のバスからパケットを受信する(S20)。パターン記録部52は、時刻管理部42から現在時刻を受信時刻として取得し、パケットと受信時刻の組を所定の記憶領域に一時的に記憶させる(S22)。1周期の時間が未経過であれば(S24のN)、S20に戻り、新たなパケットと受信時刻の組を記録する処理を繰り返す。 FIG. 5 is a flowchart showing details of the inspection data recording process of S12 of FIG. Although not shown, the pattern recording unit 52 stores the current time as a reference time in the inspection data storage unit 44 at the start of the inspection data recording process, and inspects the time of one predetermined cycle and the existing transmission pattern. Further stored in the storage unit 44 (metadata of FIG. 2B). The communication unit 46 receives the packet from the bus of CAN 24 (S20). The pattern recording unit 52 acquires the current time as the reception time from the time management unit 42, and temporarily stores the set of the packet and the reception time in a predetermined storage area (S22). If the time of one cycle has not elapsed (N in S24), the process returns to S20 and the process of recording a new packet and a set of reception time is repeated.

グループ周期の1周期の時間が経過すると(S24のY)、パターン記録部52は、今周期に受信された各パケットの受信時刻にしたがって各パケットの受信順序を特定する。パターン記録部52は、各パケットの受信順序と、既存の伝送パターン(すなわち図4のS10で読み込まれた伝送パターン)とを比較する(S26)。パケットの受信順序に合致する既存の伝送パターンが存在する場合(S28のY)、パターン記録部52は、今周期の識別子と、上記合致する既存の伝送パターンの識別子とを対応付けて検査データ記憶部44に格納する(図2(b)の周期データ)(S30)。 When the time of one cycle of the group cycle elapses (Y in S24), the pattern recording unit 52 specifies the reception order of each packet according to the reception time of each packet received in the current cycle. The pattern recording unit 52 compares the reception order of each packet with the existing transmission pattern (that is, the transmission pattern read in S10 of FIG. 4) (S26). When there is an existing transmission pattern that matches the packet reception order (Y in S28), the pattern recording unit 52 stores the inspection data by associating the identifier of the current cycle with the identifier of the existing transmission pattern that matches. Stored in unit 44 (periodic data in FIG. 2B) (S30).

パケットの受信順序に合致する既存の伝送パターンが存在しなければ(S28のN)、パターン記録部52は、その受信順序を示す新たな伝送パターンのデータを生成する(S32)。パターン記録部52は、新たな伝送パターンのデータをパラメータ記憶部40および検査データ記憶部44(図2(b)のメタデータ)に格納する。また、パターン記録部52は、今周期の識別子と、新たな伝送パターンの識別子とを対応付けて検査データ記憶部44に格納する(図2(b)の周期データ)(S30)。ペイロード記録部54は、今周期に受信されたパケットのペイロードデータを、パケットのID単位にグループ化して、検査データ記憶部44に格納する(図2(b)のペイロードデータ)(S34)。 If there is no existing transmission pattern that matches the packet reception order (N in S28), the pattern recording unit 52 generates data of a new transmission pattern indicating the reception order (S32). The pattern recording unit 52 stores the data of the new transmission pattern in the parameter storage unit 40 and the inspection data storage unit 44 (metadata of FIG. 2B). Further, the pattern recording unit 52 stores the identifier of the current cycle and the identifier of the new transmission pattern in the inspection data storage unit 44 in association with each other (cycle data in FIG. 2B) (S30). The payload recording unit 54 groups the packet payload data received in this cycle into packet ID units and stores them in the inspection data storage unit 44 (payload data in FIG. 2B) (S34).

なお、1つの周期におけるパケットの受信および一時記憶処理(S20〜S24)と、周期終了後の検査データ記録処理(S26〜S34)は、並行して実行されてもよい。例えば、第1周期が終了後、第1周期で受信されたパケットに基づく検査データが記録されることと並行して、第2周期におけるパケットの受信および一時記憶処理が実行されてもよい。 Note that packet reception and temporary storage processing (S20 to S24) in one cycle and inspection data recording processing (S26 to S34) after the end of the cycle may be executed in parallel. For example, after the end of the first cycle, the packet reception and temporary storage processing in the second cycle may be executed in parallel with the recording of the inspection data based on the packets received in the first cycle.

検査データの記録処理と検査データの圧縮処理は、並行して実行されてもよい。また、全ての検査データを検査データ記憶部44に記録後、検査データの圧縮処理が実行されてもよい。検査データの圧縮処理は、記録ECU22とは別の装置(別のECU)が実行してもよい。 The inspection data recording process and the inspection data compression process may be executed in parallel. Further, after recording all the inspection data in the inspection data storage unit 44, the inspection data compression process may be executed. The inspection data compression process may be executed by a device (another ECU) different from the recording ECU 22.

[第2実施例]
第1実施例では、1周期内のタイムスロットとパケットのIDとを直接対応付けた伝送パターンを用いて検査データを記録した。第2実施例では、基準となる1つの伝送パターン(以下「基準パターン」とも呼ぶ。)と、各周期におけるパケットの受信パターンとの差分を示す差分パターンを用いて検査データを記録する。
[Second Example]
In the first embodiment, inspection data was recorded using a transmission pattern in which a time slot within one cycle and a packet ID are directly associated with each other. In the second embodiment, inspection data is recorded using a difference pattern indicating a difference between one reference transmission pattern (hereinafter, also referred to as “reference pattern”) and a packet reception pattern in each cycle.

図6は、パケットの受信パターンの例を示す。本発明者は、実験により、異なるID(例えばID1、2、3)のパケットの受信タイミングが必ずしも同じにはならないことを発見した。例えば、電源オンのタイミング依存で、または、異なる車両間では、ID2のパケットのオフセットが異なることがある。同様に、ID3のパケットのオフセットが異なることがある。例えば、図6の周期T1では、ID1のパケットとID2のパケットとの間隔は5であり、ID1のパケットとID3のパケットとの間隔は10である。しかし、電源のオン/オフを挟んだ次回の検査データ記録時には、これらの間隔(言い換えれば受信タイミング)が異なる値になることがある。 FIG. 6 shows an example of a packet reception pattern. The present inventor has discovered through experiments that the reception timings of packets with different IDs (for example, IDs 1, 2, and 3) are not necessarily the same. For example, the offset of the ID2 packet may differ depending on the timing of power-on or between different vehicles. Similarly, the offset of the ID3 packet may be different. For example, in the cycle T1 of FIG. 6, the interval between the ID1 packet and the ID2 packet is 5, and the interval between the ID1 packet and the ID3 packet is 10. However, at the time of the next inspection data recording with the power on / off, these intervals (in other words, reception timing) may be different values.

このような状況において、第1実施例のように1周期内のタイムスロットとパケットのIDとを直接対応付けると、オフセットの変化に合わせた個数の伝送パターンを用意する必要がある。また、複数の周期間で同じパターンを使用することが難しくなる。そこで、第2実施例の記録ECU22は、1周期目を基準パターンとし、基準パターンからの差分を示す差分パターンを用いて検査データを記録する。図6では、基準パターンでの受信タイミングを網掛けを施した基準タイミング62で示している。 In such a situation, if the time slot within one cycle and the packet ID are directly associated with each other as in the first embodiment, it is necessary to prepare a number of transmission patterns according to the change in offset. It also makes it difficult to use the same pattern between multiple cycles. Therefore, the recording ECU 22 of the second embodiment records the inspection data using the difference pattern indicating the difference from the reference pattern, with the first cycle as the reference pattern. In FIG. 6, the reception timing in the reference pattern is shown by the shaded reference timing 62.

図7(a)は、基準パターンの例を示し、図7(b)は、差分パターンの例を示す。図7(a)は、図6の周期T1の受信パターンに基づいて設定された基準パターンを示している。図7(b)は、図7(a)の基準パターンとの差分を示す差分パターンである。同図の差分パターンでは、タイムスロットが後ろにずれた場合、正の値が設定され、タイムスロットが前にずれた場合、負の値が設定される。例えば、図6の周期T2に対して差分パターン2が記録され、図6の周期T3に対して差分パターン1が記録される。 FIG. 7A shows an example of a reference pattern, and FIG. 7B shows an example of a difference pattern. FIG. 7A shows a reference pattern set based on the reception pattern of the period T1 of FIG. FIG. 7B is a difference pattern showing a difference from the reference pattern of FIG. 7A. In the difference pattern in the figure, a positive value is set when the time slot is shifted backward, and a negative value is set when the time slot is shifted forward. For example, the difference pattern 2 is recorded for the period T2 of FIG. 6, and the difference pattern 1 is recorded for the period T3 of FIG.

第2実施例の記録ECU22の機能構成は、第1実施例(図3)と同様である。以下、第1実施例と同じ構成は説明を適宜省略し、異なる構成を主に説明する。 The functional configuration of the recording ECU 22 of the second embodiment is the same as that of the first embodiment (FIG. 3). Hereinafter, the same configuration as that of the first embodiment will be omitted as appropriate, and different configurations will be mainly described.

パラメータ記憶部40は、予め定められた複数の差分パターンをパラメータとして記憶する。パターン記録部52は、最初の周期における複数種類のパケットの受信順序を基準パターンとして生成し、基準パターンのデータ(識別子を含む)を検査データ記憶部44に記録する(図2(b)のメタデータ)。パターン記録部52は、最初の周期の識別子と基準パターンの識別子との組を検査データ記憶部44に記録する(図2(b)の周期データ)。 The parameter storage unit 40 stores a plurality of predetermined difference patterns as parameters. The pattern recording unit 52 generates the reception order of a plurality of types of packets in the first cycle as a reference pattern, and records the data (including the identifier) of the reference pattern in the inspection data storage unit 44 (meta of FIG. 2B). data). The pattern recording unit 52 records a set of the identifier of the first cycle and the identifier of the reference pattern in the inspection data storage unit 44 (cycle data in FIG. 2B).

パターン記録部52は、2回目以降の周期における複数種類のパケットの受信順序と基準パターンとの差分を抽出し、その差分に合致する差分パターンを特定する。パターン記録部52は、2回目以降の周期の識別子と差分パターンの識別子との組を、図2(b)の周期データとして検査データ記憶部44に記録する。 The pattern recording unit 52 extracts the difference between the reception order of a plurality of types of packets and the reference pattern in the second and subsequent cycles, and identifies the difference pattern that matches the difference. The pattern recording unit 52 records a set of the identifier of the second and subsequent cycles and the identifier of the difference pattern in the inspection data storage unit 44 as the cycle data of FIG. 2B.

以上の構成による記録ECU22の動作を説明する。図4に示した第1実施例の記録ECU22の動作は、第2実施例の記録ECU22にも当てはまる。以下、第1実施例と異なる点として、1周期分の検査データ記録処理を説明する。 The operation of the recording ECU 22 with the above configuration will be described. The operation of the recording ECU 22 of the first embodiment shown in FIG. 4 also applies to the recording ECU 22 of the second embodiment. Hereinafter, the inspection data recording process for one cycle will be described as a difference from the first embodiment.

図8は、図4のS12の検査データ記録処理の詳細を示すフローチャートである。同図のS40〜S44は、図5のS20〜S24と同じであるため、説明を省略する。1回の周期が終了すると(S44のY)、パターン記録部52は、基準パターンを生成済か否かを判定する。基準パターンが未生成の場合であり、第2実施例では最初の周期の終了時に(S46のN)、パターン記録部52は、最初の周期におけるパケットの受信順序を示す基準パターンのデータを生成する。パターン記録部52は、基準パターンのデータを検査データ記憶部44に格納する(S48)。パターン記録部52は、最初の周期の識別子と基準パターンの識別子の組を周期データとして検査データ記憶部44に格納する(S56)。S58は図5のS34と同じであるため、説明を省略する。 FIG. 8 is a flowchart showing details of the inspection data recording process of S12 of FIG. Since S40 to S44 in the figure are the same as S20 to S24 in FIG. 5, the description thereof will be omitted. When one cycle ends (Y in S44), the pattern recording unit 52 determines whether or not the reference pattern has been generated. This is a case where the reference pattern has not been generated. In the second embodiment, at the end of the first cycle (N in S46), the pattern recording unit 52 generates data of the reference pattern indicating the packet reception order in the first cycle. .. The pattern recording unit 52 stores the data of the reference pattern in the inspection data storage unit 44 (S48). The pattern recording unit 52 stores a set of the identifier of the first cycle and the identifier of the reference pattern as cycle data in the inspection data storage unit 44 (S56). Since S58 is the same as S34 in FIG. 5, the description thereof will be omitted.

基準パターンが生成済の場合であり、第2実施例では2番目以降の周期の終了時に(S46のY)、パターン記録部52は、今周期におけるパケットの受信パターンを基準パターンを使用して正規化する。言い換えれば、パターン記録部52は、受信パターンと基準パターンとの差分を抽出する(S50)。抽出した差分に合致する既存の差分パターン(「特定差分パターン」と呼ぶ。)が存在する場合(S52のY)、パターン記録部52は、今周期の識別子と、特定差分パターンの識別子の組を周期データとして検査データ記憶部44に格納する(S56)。 This is the case where the reference pattern has already been generated. In the second embodiment, at the end of the second and subsequent cycles (Y in S46), the pattern recording unit 52 normalizes the packet reception pattern in the current cycle using the reference pattern. To become. In other words, the pattern recording unit 52 extracts the difference between the reception pattern and the reference pattern (S50). When there is an existing difference pattern (referred to as "specific difference pattern") that matches the extracted difference (Y in S52), the pattern recording unit 52 sets the identifier of the current cycle and the identifier of the specific difference pattern. It is stored in the inspection data storage unit 44 as periodic data (S56).

抽出した差分に合致する既存の差分パターンが存在しなければ(S52のN)、パターン記録部52は、その差分を示す新たな差分パターンのデータを生成する(S54)。パターン記録部52は、新たな差分パターンのデータをパラメータ記憶部40および検査データ記憶部44に格納する。また、パターン記録部52は、今周期の識別子と、新たな差分パターンの識別子の組を周期データとして検査データ記憶部44に格納する(S56)。検査装置16は、基準パターンと差分パターンを組み合わせることで、各周期におけるパケットの受信タイミングを把握することができる。 If there is no existing difference pattern that matches the extracted difference (N in S52), the pattern recording unit 52 generates data of a new difference pattern indicating the difference (S54). The pattern recording unit 52 stores the data of the new difference pattern in the parameter storage unit 40 and the inspection data storage unit 44. Further, the pattern recording unit 52 stores a set of the identifier of the current cycle and the identifier of the new difference pattern as cycle data in the inspection data storage unit 44 (S56). The inspection device 16 can grasp the packet reception timing in each cycle by combining the reference pattern and the difference pattern.

第2実施例の態様によると、電源オンのタイミングや車両の種類等の要因によりパケット送信のタイミングがずれる場合でも、各周期におけるパケット受信のパターンとして共通の差分パターンを適用できる。これにより、検査データのサイズを低減できる。 According to the aspect of the second embodiment, even when the packet transmission timing is deviated due to factors such as the power-on timing and the vehicle type, a common difference pattern can be applied as the packet reception pattern in each cycle. As a result, the size of the inspection data can be reduced.

[第3実施例]
図9は、本発明者の実験結果であり、複数の周期において受信されたパケットのIDを示す。同図は、左から右へ、最初の第1タイムスロットから最後の第10タイムスロットを並べており、各タイムスロットで受信されたパケットのIDを示している。ID224のパケットは、破線で示すように、後の周期になるほど後のタイムスロットで受信されている。逆に、ID247のパケットは、一点鎖線で示すように、後の周期になるほど前のタイムスロットで受信されている。タイムスロットの位置がずれる理由は、送信ECU20が、本来想定される時間間隔であり、すなわち記録ECU22で定められた周期(例えば24ミリ秒)より短い間隔(例えば23.9ミリ秒)もしくは長い間隔(例えば24.2ミリ秒)でパケットを送信するからである。
[Third Example]
FIG. 9 shows the experimental results of the present inventor and shows the IDs of packets received in a plurality of cycles. The figure arranges the first tenth time slot to the last tenth time slot from left to right, and shows the ID of the packet received in each time slot. As shown by the broken line, the packet with ID 224 is received in a later time slot as the cycle becomes later. On the contrary, the packet of ID 247 is received in the earlier time slot as the later cycle is reached, as shown by the alternate long and short dash line. The reason why the position of the time slot shifts is that the transmitting ECU 20 has an originally assumed time interval, that is, an interval shorter (for example, 23.9 milliseconds) or a longer interval than the period (for example, 24 milliseconds) determined by the recording ECU 22. This is because the packet is transmitted in (for example, 24.2 milliseconds).

この場合、第1実施例の方式では多くの伝送パターンが必要になり、第2実施例の方式でも多くの差分パターンが必要になる。周期を経るにつれ、差分が大きくなっていくからである。そこで、第3実施例の記録ECU22は、直前の周期におけるパケットの受信パターンを基準パターンとして、今周期におけるパケットの受信パターンと基準パターンとの差分を検査データに記録する。言い換えれば、記録ECU22は、周期Nと周期N+1において、同一IDのパケットが出現する位置の差分を記録していく。 In this case, the method of the first embodiment requires many transmission patterns, and the method of the second embodiment also requires many difference patterns. This is because the difference increases as the cycle goes by. Therefore, the recording ECU 22 of the third embodiment records the difference between the packet reception pattern and the reference pattern in the current cycle in the inspection data, using the packet reception pattern in the immediately preceding cycle as the reference pattern. In other words, the recording ECU 22 records the difference between the positions where the packets having the same ID appear in the period N and the period N + 1.

図10(a)は、差分パターンの例を示す。ここでは、5つのIDに関する差分パターンを示している。発明者の実験では、7万周期を、約500個の差分パターンで表現可能であった。図10(a)の差分パターンのうち、出現頻度が最も高い差分パターンは、「0、0、0、0、0」(すなわち差分なし)であり、その出現頻度は7190回であった。図10(b)は、差分パターンを説明する図である。同図は、図10(a)の差分パターン64に対応する。差分パターン64は、今周期、ID235のパケットが受信されたタイムスロットが、前周期より1つ前にずれたことを示している。 FIG. 10A shows an example of the difference pattern. Here, the difference patterns relating to the five IDs are shown. In the inventor's experiment, 70,000 cycles could be represented by about 500 difference patterns. Among the difference patterns in FIG. 10A, the difference pattern having the highest frequency of appearance was "0, 0, 0, 0, 0" (that is, no difference), and the frequency of appearance was 7190 times. FIG. 10B is a diagram for explaining the difference pattern. This figure corresponds to the difference pattern 64 of FIG. 10 (a). The difference pattern 64 indicates that the time slot in which the packet of ID 235 was received in this cycle is shifted to one before the previous cycle.

このように、直前の周期のパケットの受信パターンと、今周期におけるパケットの受信パターンとの差分を逐次記録していくことで、各周期におけるパケット受信のパターンとして共通の差分パターンを適用できる。例えば、本発明者の実験では、7万周期のうち7190周期に、同じ差分パターン「0、0、0、0、0」を適用できた。これにより、検査データのサイズを低減できる。 In this way, by sequentially recording the difference between the packet reception pattern of the immediately preceding cycle and the packet reception pattern of the current cycle, a common difference pattern can be applied as the packet reception pattern in each cycle. For example, in the experiment of the present inventor, the same difference pattern "0, 0, 0, 0, 0" could be applied to 7190 cycles out of 70,000 cycles. As a result, the size of the inspection data can be reduced.

第3実施例の記録ECU22の機能構成は、第1実施例(図3)と同様である。以下、第1実施例と同じ構成は説明を適宜省略し、異なる構成を主に説明する。 The functional configuration of the recording ECU 22 of the third embodiment is the same as that of the first embodiment (FIG. 3). Hereinafter, the same configuration as that of the first embodiment will be omitted as appropriate, and different configurations will be mainly described.

パラメータ記憶部40は、予め定められた複数の差分パターンをパラメータとして記憶する。パターン記録部52は、最初の周期における複数種類のパケットの受信順序を基準パターンとして生成し、基準パターンのデータ(識別子を含む)を検査データ記憶部44に記録する(図2(b)のメタデータ)。パターン記録部52は、最初の周期の識別子と基準パターンの識別子の組を検査データ記憶部44に記録する(図2(b)の周期データ)。 The parameter storage unit 40 stores a plurality of predetermined difference patterns as parameters. The pattern recording unit 52 generates the reception order of a plurality of types of packets in the first cycle as a reference pattern, and records the data (including the identifier) of the reference pattern in the inspection data storage unit 44 (meta of FIG. 2B). data). The pattern recording unit 52 records a set of the identifier of the first cycle and the identifier of the reference pattern in the inspection data storage unit 44 (cycle data in FIG. 2B).

パターン記録部52は、2回目以降の周期(以下「今周期」とも呼ぶ。)における複数種類のパケットの受信順序と基準パターンとの差分を抽出し、その差分に合致する差分パターンを特定する。パターン記録部52は、今周期の識別子と、特定した差分パターンの識別子の組を検査データ記憶部44に記録する(図2(b)の周期データ)。パターン記録部52は、今周期における複数種類のパケットの受信順序を新たな基準パターンとして一時的に記憶する。 The pattern recording unit 52 extracts the difference between the reception order of a plurality of types of packets and the reference pattern in the second and subsequent cycles (hereinafter, also referred to as “current cycle”), and identifies a difference pattern that matches the difference. The pattern recording unit 52 records a set of the identifier of the current cycle and the identifier of the specified difference pattern in the inspection data storage unit 44 (cycle data of FIG. 2B). The pattern recording unit 52 temporarily stores the reception order of a plurality of types of packets in the current cycle as a new reference pattern.

以上の構成による記録ECU22の動作を説明する。図4に示した第1実施例の記録ECU22の動作は、第3実施例の記録ECU22にも当てはまる。以下、第1実施例と異なる点として、1周期分の検査データ記録処理を説明する。 The operation of the recording ECU 22 with the above configuration will be described. The operation of the recording ECU 22 of the first embodiment shown in FIG. 4 also applies to the recording ECU 22 of the third embodiment. Hereinafter, the inspection data recording process for one cycle will be described as a difference from the first embodiment.

図11は、図4のS12の検査データ記録処理の詳細を示すフローチャートである。同図のS60〜S64は、図5のS20〜S24と同じであるため、説明を省略する。1回の周期が終了し(S64のY)、今周期が最初の周期であれば(S66のY)、パターン記録部52は、今周期におけるパケットの受信順序を示す受信パターンのデータ(例えば図2(a)の形式)を生成する。パターン記録部52は、生成した受信パターンのデータをメタデータとして検査データ記憶部44に格納する(S68)。パターン記録部52は、最初の周期の識別子と受信パターンの識別子の組を周期データとして検査データ記憶部44に格納する(S76)。S78は、図5のS34と同じであるため、説明を省略する。 FIG. 11 is a flowchart showing details of the inspection data recording process of S12 of FIG. Since S60 to S64 in the figure are the same as S20 to S24 in FIG. 5, the description thereof will be omitted. If one cycle ends (Y in S64) and the current cycle is the first cycle (Y in S66), the pattern recording unit 52 receives data of a reception pattern indicating the packet reception order in the current cycle (for example, FIG. 2 (a) format) is generated. The pattern recording unit 52 stores the generated reception pattern data as metadata in the inspection data storage unit 44 (S68). The pattern recording unit 52 stores a set of the identifier of the first cycle and the identifier of the reception pattern as cycle data in the inspection data storage unit 44 (S76). Since S78 is the same as S34 in FIG. 5, the description thereof will be omitted.

2回目以降の周期が終了した場合(S66のN)、パターン記録部52は、直前の周期におけるパケットの受信パターンと、今周期におけるパケットの受信パターンとを比較し、差分を抽出する(S70)。抽出した差分に合致する既存の差分パターン(「特定差分パターン」と呼ぶ。)が存在する場合(S72のY)、パターン記録部52は、今周期の識別子と特定差分パターンの識別子の組を周期データとして検査データ記憶部44に格納する(S76)。 When the second and subsequent cycles are completed (N in S66), the pattern recording unit 52 compares the packet reception pattern in the immediately preceding cycle with the packet reception pattern in the current cycle, and extracts the difference (S70). .. When there is an existing difference pattern (referred to as "specific difference pattern") that matches the extracted difference (Y in S72), the pattern recording unit 52 cycles the set of the identifier of the current cycle and the identifier of the specific difference pattern. It is stored as data in the inspection data storage unit 44 (S76).

抽出した差分に合致する既存の差分パターンが存在しなければ(S72のN)、パターン記録部52は、その差分を示す新たな差分パターンのデータを生成する(S74)。パターン記録部52は、新たな差分パターンのデータをパラメータ記憶部40および検査データ記憶部44に格納する。また、パターン記録部52は、今周期の識別子と、新たな差分パターンの識別子の組を周期データとして検査データ記憶部44に格納する(S76)。検査装置16は、最初の周期におけるパケットの受信パターンに対して、各周期に至るまでの1つ以上の差分パターンを順次適用していくことで、各周期におけるパケットの受信タイミングを把握することができる。 If there is no existing difference pattern that matches the extracted difference (N in S72), the pattern recording unit 52 generates data of a new difference pattern indicating the difference (S74). The pattern recording unit 52 stores the data of the new difference pattern in the parameter storage unit 40 and the inspection data storage unit 44. Further, the pattern recording unit 52 stores a set of the identifier of the current cycle and the identifier of the new difference pattern as cycle data in the inspection data storage unit 44 (S76). The inspection device 16 can grasp the packet reception timing in each cycle by sequentially applying one or more difference patterns up to each cycle to the packet reception pattern in the first cycle. it can.

[第4実施例]
図12(a)と図12(b)は、異常の可能性があるパケットの受信パターンを示す。図12(a)では、周期T2と周期T3で、ID3のパケットを複数回受信している。また、図12(b)では、周期T2と周期T3で、ID3のパケットを本来の送信周期からずれたタイミングで受信している。このように、車両14に異常が生じた場合、CAN24におけるパケットの伝送パターンは通常時と異なるものになる。なお、車両14の異常は、車両14が攻撃を受けていること(ECUの乗っ取り等)を含み、また、車両14で故障が発生したことを含む。
[Fourth Example]
12 (a) and 12 (b) show the reception patterns of packets that may be abnormal. In FIG. 12A, the ID3 packet is received a plurality of times in the cycle T2 and the cycle T3. Further, in FIG. 12B, the packet of ID3 is received at a timing deviated from the original transmission cycle in the cycle T2 and the cycle T3. In this way, when an abnormality occurs in the vehicle 14, the packet transmission pattern in the CAN 24 becomes different from the normal time. The abnormality of the vehicle 14 includes that the vehicle 14 is under attack (such as taking over the ECU) and that a failure has occurred in the vehicle 14.

そこで、第4実施例の記録ECU22は、CAN24から受信された複数種類のパケットの受信順序が合致するパターンに基づいて、車両14の異常を検出する。これにより、車両14が攻撃を受けていること、また、車両14に故障が生じたこと等の検出が容易になる。以下、第1実施例と同じ構成は説明を適宜省略し、異なる構成を主に説明する。 Therefore, the recording ECU 22 of the fourth embodiment detects the abnormality of the vehicle 14 based on the pattern in which the reception order of the plurality of types of packets received from the CAN 24 matches. As a result, it becomes easy to detect that the vehicle 14 is under attack and that the vehicle 14 has a failure. Hereinafter, the same configuration as that of the first embodiment will be omitted as appropriate, and different configurations will be mainly described.

図13は、第4実施例の車両14の機能構成を示すブロック図である。第4実施例の車両14は、第1実施例の車両14の構成に加えて、異常検出部70と異常処理部72をさらに備える。 FIG. 13 is a block diagram showing a functional configuration of the vehicle 14 of the fourth embodiment. The vehicle 14 of the fourth embodiment further includes an abnormality detection unit 70 and an abnormality processing unit 72 in addition to the configuration of the vehicle 14 of the first embodiment.

パラメータ記憶部40は、車両14の異常時に生じるパケットの受信パターン(以下「異常時受信パターン」とも呼ぶ。)と、車両14の異常時に生じる受信パターンに関する統計値(以下「異常時統計値」とも呼ぶ。)とをさらに記憶する。異常時受信パターンは、図2(a)に示した伝送パターンの形式でもよく、図7(b)および図10(a)に示した差分パターンの形式でもよい。異常時統計値は、所定の受信パターン(例えば異常とは言えないグレーゾーンの受信パターン)の出現頻度でもよい。 The parameter storage unit 40 includes a packet reception pattern generated when the vehicle 14 is abnormal (hereinafter, also referred to as “abnormal reception pattern”) and a statistical value regarding a reception pattern generated when the vehicle 14 is abnormal (hereinafter, also referred to as “abnormal statistical value”). Call.) And memorize further. The abnormal reception pattern may be in the form of the transmission pattern shown in FIG. 2 (a) or in the form of the difference pattern shown in FIGS. 7 (b) and 10 (a). The abnormal time statistical value may be the appearance frequency of a predetermined reception pattern (for example, a reception pattern in a gray zone that cannot be said to be abnormal).

異常検出部70は、パケット記録部48により検査データ記憶部44に記録されたパケットの受信パターン(伝送パターンまたは差分パターン)を取得し、その受信パターンがパラメータ記憶部40に記憶された異常時受信パターンに合致するか否かを判定する。合致する場合、異常検出部70は、車両14が異常な状態であることを検出する。 The abnormality detection unit 70 acquires the reception pattern (transmission pattern or difference pattern) of the packet recorded in the inspection data storage unit 44 by the packet recording unit 48, and the reception pattern is stored in the parameter storage unit 40 at the time of abnormality. Determine if it matches the pattern. If they match, the abnormality detection unit 70 detects that the vehicle 14 is in an abnormal state.

また、異常検出部70は、検査データ記憶部44に記録された複数の受信パターンを取得し、複数の受信パターンに基づいて所定の統計処理を実行し、統計値を算出する。異常検出部70は、算出した統計値がパラメータ記憶部40に記憶された異常時統計値に合致するか否かを判定する。合致する場合、異常検出部70は、車両14が異常な状態であることを検出する。なお、異常検出部70は、受信パターンに基づく統計値が異常時統計値に不一致であるが、両者の差異が所定範囲内の場合、車両14を異常と判定してもよい。また、異常時統計値は、異常と判定する閾値でもよく、異常検出部70は、受信パターンに基づく統計値が、その閾値以上(もしくは閾値未満)である場合に、車両14を異常と判定してもよい。 Further, the abnormality detection unit 70 acquires a plurality of reception patterns recorded in the inspection data storage unit 44, executes predetermined statistical processing based on the plurality of reception patterns, and calculates a statistical value. The abnormality detection unit 70 determines whether or not the calculated statistical value matches the abnormal time statistical value stored in the parameter storage unit 40. If they match, the abnormality detection unit 70 detects that the vehicle 14 is in an abnormal state. The abnormality detection unit 70 may determine that the vehicle 14 is abnormal when the statistical value based on the reception pattern does not match the abnormal statistical value, but the difference between the two is within a predetermined range. Further, the abnormality value may be a threshold value for determining abnormality, and the abnormality detection unit 70 determines that the vehicle 14 is abnormality when the statistical value based on the reception pattern is equal to or more than (or less than) the threshold value. You may.

異常処理部72は、異常検出部70により車両14の異常が検出された場合に、所定の異常時処理を実行する。例えば、異常処理部72は、異常時処理として、異常が検出された受信パターンに基づいて攻撃または故障に関する検査処理を実行してもよい。また、異常処理部72は、異常時処理として、車両14のディスプレイ(不図示)に車両14の異常を表示させてもよく、所定の外部装置(例えば検査装置16)へ車両14の異常を通知してもよい。さらにまた、異常処理部72は、異常時処理として、車両14の異常を示すログデータを所定の記憶領域に保存してもよい。 When the abnormality detection unit 70 detects an abnormality in the vehicle 14, the abnormality processing unit 72 executes a predetermined abnormality processing. For example, the abnormality processing unit 72 may execute an inspection process related to an attack or a failure based on a reception pattern in which an abnormality is detected as an abnormality processing. Further, the abnormality processing unit 72 may display the abnormality of the vehicle 14 on the display (not shown) of the vehicle 14 as the processing at the time of abnormality, and notifies the predetermined external device (for example, the inspection device 16) of the abnormality of the vehicle 14. You may. Furthermore, the abnormality processing unit 72 may store log data indicating an abnormality of the vehicle 14 in a predetermined storage area as an abnormality processing.

以上の構成による記録ECU22の動作を説明する。図14は、第4実施例の記録ECU22の動作を示すフローチャートである。S80およびS82は、図4のS10およびS12と同じであるため、説明を省略する。S82の処理の詳細は、第1実施例(図5)、第2実施例(図8)、第3実施例(図11)のいずれも適用可能である。異常検出部70は、検査データ記憶部44に記録された受信パターンが異常時受信パターンに一致するか否かを判定する。一致する場合(S84のY)、異常処理部72は、所定の異常時処理を実行する(S90)。 The operation of the recording ECU 22 with the above configuration will be described. FIG. 14 is a flowchart showing the operation of the recording ECU 22 of the fourth embodiment. Since S80 and S82 are the same as S10 and S12 in FIG. 4, the description thereof will be omitted. The details of the processing of S82 can be applied to any of the first embodiment (FIG. 5), the second embodiment (FIG. 8), and the third embodiment (FIG. 11). The abnormality detection unit 70 determines whether or not the reception pattern recorded in the inspection data storage unit 44 matches the reception pattern at the time of abnormality. If they match (Y in S84), the abnormality processing unit 72 executes a predetermined error processing (S90).

不一致の場合(S84のN)、異常検出部70は、受信パターンの統計値を算出する(S86)。統計値は、今周期における特定の受信パターンの出現頻度(回数、割合等)であってもよく、または、複数の周期に亘る特定の受信パターンの出現頻度であってもよい。異常検出部70は、算出した統計値が異常時統計値に一致するか否かを判定する。一致する場合(S88のY)、異常処理部72は、所定の異常時処理を実行する(S90)。不一致の場合(S88のN)、異常時処理を行わずにS92へ進む。S92以降の処理は、図4のS14以降の処理と同じであるため、説明を省略する。 In the case of a mismatch (N in S84), the abnormality detection unit 70 calculates a statistical value of the reception pattern (S86). The statistical value may be the appearance frequency (number of times, ratio, etc.) of a specific reception pattern in the current cycle, or may be the appearance frequency of a specific reception pattern over a plurality of cycles. The abnormality detection unit 70 determines whether or not the calculated statistical value matches the abnormal statistical value. If they match (Y in S88), the abnormality processing unit 72 executes a predetermined error processing (S90). If there is a discrepancy (N in S88), the process proceeds to S92 without performing the error processing. Since the processing after S92 is the same as the processing after S14 in FIG. 4, the description thereof will be omitted.

第4実施例では、ブラックリスト方式で車両14の異常を検出した。変形例として、ホワイトリスト方式で車両14の異常を検出してもよい。例えば、パラメータ記憶部40は、車両14の正常時に生じるパケットの受信パターンと、受信パターンに関する統計値を記憶してもよい。異常検出部70は、パターン記録部52により記録された受信パターンが、正常時の受信パターンに一致する場合(もしくは差異が所定範囲内の場合)に車両14を正常と判定してもよい。また、異常検出部70は、パターン記録部52により記録された受信パターンが、正常時の受信パターンに不一致の場合(もしくは差異が所定範囲を超える場合)に車両14を異常と判定してもよい。統計値による異常判定も同様である。なお、後述するように、異常の検出処理は、記録ECU22とは別の装置が実行してもよい。 In the fourth embodiment, the abnormality of the vehicle 14 was detected by the blacklist method. As a modification, the abnormality of the vehicle 14 may be detected by the white list method. For example, the parameter storage unit 40 may store the reception pattern of the packet generated when the vehicle 14 is normal and the statistical value regarding the reception pattern. The abnormality detection unit 70 may determine the vehicle 14 as normal when the reception pattern recorded by the pattern recording unit 52 matches the normal reception pattern (or when the difference is within a predetermined range). Further, the abnormality detection unit 70 may determine the vehicle 14 as an abnormality when the reception pattern recorded by the pattern recording unit 52 does not match the normal reception pattern (or when the difference exceeds a predetermined range). .. The same applies to the abnormality judgment based on statistical values. As will be described later, the abnormality detection process may be executed by a device other than the recording ECU 22.

以上、本発明を第1実施例〜第4実施例をもとに説明した。これらの実施例は例示であり、各構成要素あるいは各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。 The present invention has been described above based on the first to fourth embodiments. These examples are examples, and it will be understood by those skilled in the art that various modifications are possible for each component or combination of each processing process, and that such modifications are also within the scope of the present invention.

変形例を説明する。上記実施例では言及していないが、圧縮部56は、検査データ記憶部44に記録された複数のIDのパケットのペイロードデータを、IDごとに異なる圧縮アルゴリズムを使用して圧縮してもよい。これにより、検査データのサイズを一層低減することができる。 A modified example will be described. Although not mentioned in the above embodiment, the compression unit 56 may compress the payload data of the packets of a plurality of IDs recorded in the inspection data storage unit 44 by using a compression algorithm different for each ID. As a result, the size of the inspection data can be further reduced.

別の変形例を説明する。パラメータ記憶部40に記憶される複数の伝送パターンまたは差分パターン(ここでは総称して「パターン」と呼ぶ)の識別子(ID)として、出現頻度が相対的に高いパターンに、データサイズが相対的に小さい識別子が割り当てられてもよい。また、出現頻度が高いパターンほど、データサイズが小さい識別子が割り当てられてもよい。これにより、検査データのサイズを一層低減することができる。 Another modification will be described. As an identifier (ID) of a plurality of transmission patterns or difference patterns (collectively referred to as "patterns" here) stored in the parameter storage unit 40, a pattern having a relatively high frequency of appearance has a relatively high data size. A small identifier may be assigned. In addition, an identifier with a smaller data size may be assigned as the pattern appears more frequently. As a result, the size of the inspection data can be further reduced.

さらに別の変形例を説明する。記録ECU22は、検査データ記録処理の開始前に、統計情報を学習する学習部を備えてもよい。学習部は、所定期間、CAN24から受信されるパケットのIDを監視し、パケットのIDと受信タイミングとに基づいて、CAN24を流れるパケットの中から周期性のあるパケットを検出してもよい。また、学習部は、同じIDのパケットの複数回の受信タイミングに基づいて、当該パケットの送信周期を検出してもよい。また、学習部は、複数のパケットの送信周期に基づいて、検査データ作成期間における1周期の時間を設定してもよい。例えば、複数のパケットの送信周期の平均値、最頻値、または中央値等を1周期の時間に設定してもよい。 Yet another modification will be described. The recording ECU 22 may include a learning unit for learning statistical information before starting the inspection data recording process. The learning unit may monitor the ID of the packet received from the CAN 24 for a predetermined period, and detect a periodic packet from the packets flowing through the CAN 24 based on the packet ID and the reception timing. Further, the learning unit may detect the transmission cycle of the packet based on a plurality of reception timings of the packet having the same ID. Further, the learning unit may set the time of one cycle in the inspection data creation period based on the transmission cycle of a plurality of packets. For example, the average value, the mode value, the median value, or the like of the transmission cycle of a plurality of packets may be set to the time of one cycle.

さらに別の変形例を説明する。上記実施例では、複数種類のパケットの受信順序を伝送パターンまたは差分パターンを使用して記録した。変形例として、車両14のパケット記録部48は、パターン記録部52に代えて、複数種類のパケットの受信順序をパターンを使用せずに記録する受信順序記録部を備えてもよい。受信順序記録部は、CAN24から受信された複数のパケットのIDと、各パケットの受信時刻とを対応付けた第1の検査データを検査データ記憶部44に記録する。ペイロード記録部54は、実施例と同様に、CAN24から受信された複数のパケットのペイロードデータをIDを単位にグループ化して第2の検査データとして検査データ記憶部44に記録する。 Yet another modification will be described. In the above embodiment, the reception order of a plurality of types of packets is recorded using a transmission pattern or a difference pattern. As a modification, the packet recording unit 48 of the vehicle 14 may include a reception order recording unit that records the reception order of a plurality of types of packets without using a pattern, instead of the pattern recording unit 52. The reception order recording unit records in the inspection data storage unit 44 the first inspection data in which the IDs of the plurality of packets received from the CAN 24 and the reception time of each packet are associated with each other. Similar to the embodiment, the payload recording unit 54 groups the payload data of a plurality of packets received from the CAN 24 in units of IDs and records them in the inspection data storage unit 44 as the second inspection data.

圧縮部56は、検査データ記憶部44に格納された第1および第2の検査データを公知のアルゴリズムにより圧縮する。圧縮部56は、実施例と同様に、ペイロード記録部54により記録され、かつ、IDごとにグループ化されたペイロードデータを圧縮する。グループ単位(言い換えればID単位)で圧縮してもよい。同じIDのパケットは、ペイロードの内容が類似することが多い。したがって、IDごとにグループ化されたペイロードデータを圧縮することで、圧縮率を高めることができる。 The compression unit 56 compresses the first and second inspection data stored in the inspection data storage unit 44 by a known algorithm. Similar to the embodiment, the compression unit 56 compresses the payload data recorded by the payload recording unit 54 and grouped by ID. It may be compressed in group units (in other words, ID units). Packets with the same ID often have similar payload contents. Therefore, the compression rate can be increased by compressing the payload data grouped by ID.

さらに別の変形例を説明する。上記第4実施例では、検査データに基づいて異常を検出する機能を記録ECU22が備えた。変形例として、第4実施例に記載の異常検出部70および異常処理部72の機能を記録ECU22以外の装置(以下、単に「外部装置」と呼ぶ。)が備えてもよい。この外部装置は、記録ECU22とは異なる車両14のECUであってもよく、また、車両14外部のサーバ等(例えば検査装置16)であってもよい。 Yet another modification will be described. In the fourth embodiment, the recording ECU 22 has a function of detecting an abnormality based on inspection data. As a modification, the functions of the abnormality detecting unit 70 and the abnormality processing unit 72 described in the fourth embodiment may be provided by a device other than the recording ECU 22 (hereinafter, simply referred to as an “external device”). The external device may be an ECU of the vehicle 14 different from the recording ECU 22, or may be a server or the like (for example, an inspection device 16) outside the vehicle 14.

本変形例では、記録ECU22の検査データ送信部50は、検査データ記憶部44に格納された検査データのうち周期データを外部装置へ送信し、外部装置は、周期データに基づいて車両14の状態を簡易的にチェックしてもよい。簡易チェックにて異常が検出された場合、外部装置は、その旨を記録ECU22へ通知し、記録ECU22は、周期データ+ペイロードデータを外部装置へ送信してもよい。外部装置は、周期データ+ペイロードデータに基づいて、車両14の状態を詳細にチェックしてもよい。 In this modification, the inspection data transmission unit 50 of the recording ECU 22 transmits the periodic data of the inspection data stored in the inspection data storage unit 44 to the external device, and the external device determines the state of the vehicle 14 based on the periodic data. May be simply checked. When an abnormality is detected by the simple check, the external device may notify the recording ECU 22 to that effect, and the recording ECU 22 may transmit periodic data + payload data to the external device. The external device may check the state of the vehicle 14 in detail based on the periodic data + payload data.

なお、実施例および変形例に記載の技術は、以下の項目によって特定されてもよい。
[項目1]
IDが付与された複数種類のパケットが、予め定められた周期において車載ネットワークで伝送される順序のパターンを複数記憶する記憶部と、
前記車載ネットワークから前記複数種類のパケットを受信する受信部と、
前記記憶部に記憶された複数のパターンのうち、前記受信部により受信された複数種類のパケットの受信順序が合致する周期ごとのパターンを検査データとして記録する第1記録部と、
前記受信部により受信された複数種類のパケットのデータを前記検査データとして記録する第2記録部と、を備える記録装置。
車載ネットワークを流れるパケットの検査では、パケットの受信時刻が検査の重要な手がかりになる。しかし、受信した複数のパケットのそれぞれに受信時刻を付加すると、検査データのサイズが大きくなってしまう。上記記録装置によると、パケットの受信順序に合致する周期ごとのパターンを記録する。これにより、各パケットの受信タイミングを事後の検査時に把握可能にしつつ、各パケットへの受信時刻の付加が不要になり、検査データのサイズを低減することができる。
[項目2]
前記記憶部は、前記複数のパターンとして、所定の基準パターンからの差分を定めた複数の差分パターンを記憶し、
前記第1記録部は、前記受信部により受信された複数種類のパケットの受信順序と前記基準パターンとの差分に合致する周期ごとの差分パターンを前記検査データとして記録する、項目1に記載の記録装置。
この態様によると、各周期におけるパケット受信のパターンとして共通の差分パターンを適用しやすくなる。これにより、検査データのサイズを低減しやすくなる。
[項目3]
前記検査データを圧縮する圧縮部をさらに備え、
前記第2記録部は、同じIDが付与されたパケットのデータをグループ化して記録し、
前記圧縮部は、前記第2記録部により記録されたパケットのデータを圧縮する、項目1または2に記載の記録装置。
同じIDが付与されたパケットのデータは類似することが多いため、本項目の態様によると、圧縮の効率を高めることができる。
[項目4]
前記受信部により受信された複数種類のパケットの受信順序が合致する周期ごとのパターンに基づいて、車両の異常を検出する異常検出部をさらに備える項目1から3のいずれかに記載の記録装置。
車両に異常が生じた場合、車載ネットワークにおけるパケットの伝送パターンは正常時と異なるものになるため、本項目の態様によると。車両の異常を検出しやすくなる。
[項目5]
前記受信部により受信された複数種類のパケットの受信順序が合致する周期ごとのパターンを、本記録装置の外部に設けられた、車両の異常を検出する異常検出部へ送信する送信部をさらに備える、項目1から3のいずれかに記載の記録装置。
[項目6]
IDが付与された複数種類のパケットを車載ネットワークから受信する受信部と、
前記受信部により受信された複数種類のパケットのIDと、各パケットの受信時刻とを検査データとして記録する第1記録部と、
前記受信部により受信された複数種類のパケットのデータを前記検査データとして記録し、同じIDが付与されたパケットのデータをグループ化して記録する第2記録部と、
前記第2記録部により記録されたパケットのデータを圧縮する圧縮部と、を備える記録装置。
同じIDが付与されたパケットのデータは類似することが多いため、この記録装置によると、圧縮の効率を高めることができる。
[項目7]
項目1から6のいずれかに記載のパケット記録装置を備える車両。
この車両によると、パケットの受信順序に合致する周期ごとのパターンを記録する。これにより、各パケットの受信タイミングを事後の検査時に把握可能にしつつ、各パケットへの受信時刻の付加が不要になり、検査データのサイズを低減することができる。
[項目8]
IDが付与された複数種類のパケットが、予め定められた周期において車載ネットワークで伝送される順序のパターンを複数記憶する記憶部を備える装置が、
前記車載ネットワークから前記複数種類のパケットを受信し、
前記記憶部に記憶された複数のパターンのうち、受信した複数種類のパケットの受信順序が合致する周期ごとのパターンを検査データとして記録し、
前記受信した複数種類のパケットのデータを前記検査データとして記録する、記録方法。
この記録方法によると、パケットの受信順序に合致する周期ごとのパターンを記録する。これにより、各パケットの受信タイミングを事後の検査時に把握可能にしつつ、各パケットへの受信時刻の付加が不要になり、検査データのサイズを低減することができる。
The techniques described in the examples and modifications may be specified by the following items.
[Item 1]
A storage unit that stores a plurality of patterns in the order in which a plurality of types of ID-assigned packets are transmitted on an in-vehicle network in a predetermined cycle.
A receiving unit that receives the plurality of types of packets from the in-vehicle network, and
Among the plurality of patterns stored in the storage unit, a first recording unit that records as inspection data a pattern for each cycle in which the reception order of the plurality of types of packets received by the reception unit matches.
A recording device including a second recording unit that records data of a plurality of types of packets received by the receiving unit as the inspection data.
In the inspection of packets flowing through the in-vehicle network, the reception time of the packet is an important clue for the inspection. However, if the reception time is added to each of the plurality of received packets, the size of the inspection data becomes large. According to the recording device, a pattern for each cycle that matches the packet reception order is recorded. This makes it possible to grasp the reception timing of each packet at the time of subsequent inspection, eliminates the need to add the reception time to each packet, and reduces the size of inspection data.
[Item 2]
The storage unit stores, as the plurality of patterns, a plurality of difference patterns in which differences from a predetermined reference pattern are determined.
The recording according to item 1, wherein the first recording unit records as the inspection data a difference pattern for each cycle that matches the difference between the reception order of the plurality of types of packets received by the receiving unit and the reference pattern. apparatus.
According to this aspect, it becomes easy to apply a common difference pattern as a packet reception pattern in each cycle. This makes it easier to reduce the size of the inspection data.
[Item 3]
Further provided with a compression unit for compressing the inspection data,
The second recording unit groups and records the data of packets to which the same ID is assigned, and records the data.
The recording device according to item 1 or 2, wherein the compression unit compresses packet data recorded by the second recording unit.
Since the data of packets to which the same ID is assigned are often similar, the efficiency of compression can be improved according to the aspect of this item.
[Item 4]
The recording device according to any one of items 1 to 3, further comprising an abnormality detection unit for detecting an abnormality in a vehicle based on a pattern for each cycle in which the reception order of a plurality of types of packets received by the reception unit matches.
If an abnormality occurs in the vehicle, the packet transmission pattern in the in-vehicle network will be different from the normal one, so according to the aspect of this item. It becomes easier to detect abnormalities in the vehicle.
[Item 5]
A transmission unit for transmitting a pattern for each cycle in which the reception order of the plurality of types of packets received by the reception unit matches is further provided to an abnormality detection unit for detecting an abnormality in the vehicle, which is provided outside the recording device. , The recording device according to any one of items 1 to 3.
[Item 6]
A receiver that receives multiple types of ID-assigned packets from the in-vehicle network,
A first recording unit that records the IDs of a plurality of types of packets received by the receiving unit and the reception time of each packet as inspection data.
A second recording unit that records the data of a plurality of types of packets received by the receiving unit as the inspection data, and groups and records the data of the packets to which the same ID is assigned.
A recording device including a compression unit that compresses packet data recorded by the second recording unit.
Since the data of packets to which the same ID is assigned are often similar, the efficiency of compression can be improved according to this recording device.
[Item 7]
A vehicle including the packet recording device according to any one of items 1 to 6.
According to this vehicle, a pattern for each cycle that matches the packet reception order is recorded. This makes it possible to grasp the reception timing of each packet at the time of subsequent inspection, eliminates the need to add the reception time to each packet, and reduces the size of inspection data.
[Item 8]
A device including a storage unit that stores a plurality of patterns in the order in which a plurality of types of ID-assigned packets are transmitted on an in-vehicle network in a predetermined cycle.
Upon receiving the plurality of types of packets from the in-vehicle network,
Among the plurality of patterns stored in the storage unit, the pattern for each cycle in which the reception order of the received plurality of types of packets matches is recorded as inspection data.
A recording method for recording the data of a plurality of types of received packets as the inspection data.
According to this recording method, a pattern for each cycle that matches the packet reception order is recorded. This makes it possible to grasp the reception timing of each packet at the time of subsequent inspection, eliminates the need to add the reception time to each packet, and reduces the size of inspection data.

上述した実施例および変形例の任意の組み合わせもまた本発明の実施の形態として有用である。組み合わせによって生じる新たな実施の形態は、組み合わされる実施例および変形例それぞれの効果をあわせもつ。また、請求項に記載の各構成要件が果たすべき機能は、実施例および変形例において示された各構成要素の単体もしくはそれらの連携によって実現されることも当業者には理解されるところである。 Any combination of the examples and modifications described above is also useful as an embodiment of the present invention. The new embodiments resulting from the combination have the effects of the combined examples and the modifications. It is also understood by those skilled in the art that the functions to be fulfilled by each of the constituent elements described in the claims are realized by a single component or a cooperation thereof shown in the examples and modifications.

14 車両、 22 記録ECU、 24 CAN、 40 パラメータ記憶部、 48 パケット記録部、 52 パターン記録部、 54 ペイロード記録部、 56 圧縮部、 70 異常検出部。 14 vehicle, 22 recording ECU, 24 CAN, 40 parameter storage unit, 48 packet recording unit, 52 pattern recording unit, 54 payload recording unit, 56 compression unit, 70 abnormality detection unit.

Claims (7)

IDが付与された複数種類のパケットが、予め定められた周期において車載ネットワークで伝送される順序のパターンを複数記憶する記憶部と、
前記車載ネットワークから前記複数種類のパケットを受信する受信部と、
前記記憶部に記憶された複数のパターンのうち、前記受信部により受信された複数種類のパケットの受信順序が合致する周期ごとのパターンを検査データとして記録する第1記録部と、
前記受信部により受信された複数種類のパケットのデータを前記検査データとして記録する第2記録部と、
を備える記録装置。
A storage unit that stores a plurality of patterns in the order in which a plurality of types of ID-assigned packets are transmitted on an in-vehicle network in a predetermined cycle.
A receiving unit that receives the plurality of types of packets from the in-vehicle network, and
Among the plurality of patterns stored in the storage unit, a first recording unit that records as inspection data a pattern for each cycle in which the reception order of the plurality of types of packets received by the reception unit matches.
A second recording unit that records data of a plurality of types of packets received by the receiving unit as the inspection data, and a second recording unit.
A recording device comprising.
前記記憶部は、前記複数のパターンとして、所定の基準パターンからの差分を定めた複数の差分パターンを記憶し、
前記第1記録部は、前記受信部により受信された複数種類のパケットの受信順序と前記基準パターンとの差分に合致する周期ごとの差分パターンを前記検査データとして記録する、
請求項1に記載の記録装置。
The storage unit stores, as the plurality of patterns, a plurality of difference patterns in which differences from a predetermined reference pattern are determined.
The first recording unit records as the inspection data a difference pattern for each cycle that matches the difference between the reception order of the plurality of types of packets received by the receiving unit and the reference pattern.
The recording device according to claim 1.
前記検査データを圧縮する圧縮部をさらに備え、
前記第2記録部は、同じIDが付与されたパケットのデータをグループ化して記録し、
前記圧縮部は、前記第2記録部により記録されたパケットのデータを圧縮する、
請求項1または2に記載の記録装置。
Further provided with a compression unit for compressing the inspection data,
The second recording unit groups and records the data of packets to which the same ID is assigned, and records the data.
The compression unit compresses the data of the packet recorded by the second recording unit.
The recording device according to claim 1 or 2.
前記受信部により受信された複数種類のパケットの受信順序が合致する周期ごとのパターンに基づいて、車両の異常を検出する異常検出部をさらに備える請求項1から3のいずれかに記載の記録装置。 The recording device according to any one of claims 1 to 3, further comprising an abnormality detection unit that detects an abnormality in a vehicle based on a pattern for each cycle in which the reception order of a plurality of types of packets received by the reception unit matches. .. 前記受信部により受信された複数種類のパケットの受信順序が合致する周期ごとのパターンを、本記録装置の外部に設けられた、車両の異常を検出する異常検出部へ送信する送信部をさらに備える、
請求項1から3のいずれかに記載の記録装置。
A transmission unit for transmitting a pattern for each cycle in which the reception order of the plurality of types of packets received by the reception unit matches is further provided to an abnormality detection unit for detecting an abnormality in the vehicle, which is provided outside the recording device. ,
The recording device according to any one of claims 1 to 3.
請求項1からのいずれかに記載の記録装置を備える車両。 A vehicle including the recording device according to any one of claims 1 to 5. IDが付与された複数種類のパケットが、予め定められた周期において車載ネットワークで伝送される順序のパターンを複数記憶する記憶部を備える装置が、
前記車載ネットワークから前記複数種類のパケットを受信し、
前記記憶部に記憶された複数のパターンのうち、受信した複数種類のパケットの受信順序が合致する周期ごとのパターンを検査データとして記録し、
前記受信した複数種類のパケットのデータを前記検査データとして記録する、
記録方法。
A device including a storage unit that stores a plurality of patterns in the order in which a plurality of types of ID-assigned packets are transmitted on an in-vehicle network in a predetermined cycle.
Upon receiving the plurality of types of packets from the in-vehicle network,
Among the plurality of patterns stored in the storage unit, the pattern for each cycle in which the reception order of the received plurality of types of packets matches is recorded as inspection data.
The data of the received plurality of types of packets is recorded as the inspection data.
Recording method.
JP2017048088A 2017-03-14 2017-03-14 Recording device, vehicle and recording method Active JP6839844B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017048088A JP6839844B2 (en) 2017-03-14 2017-03-14 Recording device, vehicle and recording method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017048088A JP6839844B2 (en) 2017-03-14 2017-03-14 Recording device, vehicle and recording method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2020209011A Division JP2021057908A (en) 2020-12-17 2020-12-17 Recording unit and vehicle

Publications (2)

Publication Number Publication Date
JP2018152745A JP2018152745A (en) 2018-09-27
JP6839844B2 true JP6839844B2 (en) 2021-03-10

Family

ID=63681882

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017048088A Active JP6839844B2 (en) 2017-03-14 2017-03-14 Recording device, vehicle and recording method

Country Status (1)

Country Link
JP (1) JP6839844B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112019006487B4 (en) 2018-12-28 2023-12-28 Panasonic Intellectual Property Management Co., Ltd. Electronic control unit, electronic control system and program
JP7312769B2 (en) * 2018-12-28 2023-07-21 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Statistical Information Generating Device, Statistical Information Generating Method, and Program
JP7268562B2 (en) * 2019-09-30 2023-05-08 富士通株式会社 METHOD AND INFORMATION PROCESSING APPARATUS FOR ESTIMATING MESSAGE FEATURES

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4349916B2 (en) * 2004-01-09 2009-10-21 東芝キヤリア株式会社 Data collection method and relay device

Also Published As

Publication number Publication date
JP2018152745A (en) 2018-09-27

Similar Documents

Publication Publication Date Title
JP7013603B2 (en) Anomaly detection method, anomaly detection device and anomaly detection system
US11296965B2 (en) Abnormality detection in an on-board network system
US20170142187A1 (en) Method for Uploading All of In-Vehicle Data to the Cloud in an Efficient, Automated, Secure, and Reliable Fashion
JP6839844B2 (en) Recording device, vehicle and recording method
CN110546921B (en) Fraud detection method, fraud detection apparatus, and program
US11997119B2 (en) Vehicle log transmission device, vehicle log analysis server, vehicle log analysis system, and vehicle log transmission/reception method
CN113708995B (en) Network fault diagnosis method, system, electronic equipment and storage medium
CN109428785A (en) A kind of fault detection method and device
US20230048058A1 (en) Anomaly determination method, anomaly determination device, and recording medium
CN113364624B (en) Mixed cloud flow acquisition method and system based on edge computing
JP2007096799A (en) Monitoring apparatus of vehicle-mounted electronic control network
JP2007251828A (en) In-vehicle database system
JP2021057908A (en) Recording unit and vehicle
JP7392586B2 (en) Log sending control device
CN113055203B (en) Method and device for recovering exception of SDN control plane
KR102313636B1 (en) Operation method of communication node for time sinchronizating in vehicle network
JP5050889B2 (en) Data transmission method and data transmission apparatus
JP2019169877A (en) Monitoring system, monitoring method, and computer program
US20140355412A1 (en) Computer implemented method for tracking and checking measures and computer programs thereof
CN115580471A (en) Fraud detection method, fraud detection apparatus, and storage medium
EP4208992A1 (en) Safety extension for precision time protocol (ptp)
JP7147635B2 (en) Unauthorized transmission data detector
JP7439668B2 (en) Log sending control device
Abbas et al. Anomaly detection system for altered signal values within the intra-vehicle network
CN111492625B (en) Illegal detection method and illegal detection device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20180417

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191129

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201027

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201110

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201217

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210201

R151 Written notification of patent or utility model registration

Ref document number: 6839844

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

SZ03 Written request for cancellation of trust registration

Free format text: JAPANESE INTERMEDIATE CODE: R313Z03