JP2013073609A - Information processor and data recording method - Google Patents
Information processor and data recording method Download PDFInfo
- Publication number
- JP2013073609A JP2013073609A JP2011214782A JP2011214782A JP2013073609A JP 2013073609 A JP2013073609 A JP 2013073609A JP 2011214782 A JP2011214782 A JP 2011214782A JP 2011214782 A JP2011214782 A JP 2011214782A JP 2013073609 A JP2013073609 A JP 2013073609A
- Authority
- JP
- Japan
- Prior art keywords
- vehicle data
- vehicle
- data
- block
- unit block
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、予め定められた車両状況が検出されると車両データを不揮発性のリングバッファに記憶する情報処理装置に関する。 The present invention relates to an information processing apparatus that stores vehicle data in a non-volatile ring buffer when a predetermined vehicle situation is detected.
走行中の車両データは、メーカ等が故障の原因を特定したり不具合の発生当時の状況を解析するために役立つことが多い。このため、車両に、車両データを記録する車両データ記録装置が搭載されることがある。車両データには車載された各種のセンサの検出値が含まれる。車両データはイベントの発生を契機にして記録されるため、走行している限り不定期に発生しうる。 The running vehicle data is often useful for manufacturers and the like to identify the cause of the failure and analyze the situation at the time of the occurrence of the malfunction. For this reason, a vehicle data recording device that records vehicle data may be mounted on the vehicle. The vehicle data includes detection values of various sensors mounted on the vehicle. Since vehicle data is recorded when an event occurs, it can occur irregularly as long as the vehicle is traveling.
車両データ記録装置の記録媒体としては、IG‐OFF後も記録を保持するように、不揮発メモリが利用される。不揮発メモリにはフラッシュメモリ、HDD、EEPROM等があるが、サイズ、安定性、コスト、及び、書き込み速度などの点からフラッシュメモリが採用されることが少なくない。しかしながら、フラッシュメモリは、ブロック単位(イレーズブロック)でしかデータの消去が行えないという制約を有している(書き込みはバイト又はワード単位で可能)。また、車両データ記録装置が単にデータの書き変えを繰り返すと特定のブロックのデータの書き換え回数が増大する。ところが、フラッシュメモリは書き換え可能な回数に上限があるため、そのブロックだけ早く寿命を迎えてしまい、フラッシュメモリ全体の製品寿命が短くなってしまう。 As a recording medium of the vehicle data recording device, a non-volatile memory is used so as to hold the recording even after IG-OFF. Non-volatile memory includes flash memory, HDD, EEPROM, and the like, but flash memory is often adopted in terms of size, stability, cost, and writing speed. However, the flash memory has a restriction that data can be erased only in units of blocks (erase blocks) (writing is possible in units of bytes or words). Further, when the vehicle data recording device simply repeats data rewriting, the number of times of rewriting data of a specific block increases. However, the flash memory has an upper limit on the number of times it can be rewritten, so that the block reaches the end of its life earlier, and the product life of the entire flash memory is shortened.
このため、あるブロックへの書き換えが集中することを回避したり、ブロックの書き換え回数を平均化する技術が知られている(例えば、特許文献1参照。)。特許文献1には、ブロックを順番に並べた論理的なリングバッファを構成し、フラッシュメモリにデータを記録するときには消去済みセクタを有するメモリブロック内の先頭の消去済みセクタから順次データを記録するデータ記録法が開示されている。このデータ記録方は、メモリブロックの最終セクタにデータが記録された後にはリングバッファ上における次のメモリブロックのデータを消去しておき、次回の記録時は、メモリブロックの先頭セクタから順次データの記録を継続する。
For this reason, a technique for avoiding concentration of rewriting to a certain block or averaging the number of rewriting of a block is known (see, for example, Patent Document 1). In
しかしながら、特許文献1に記載されたデータ記録法では、ブロックを消去してから次回のイベントで車両データを書き込むまで、ブロックに何もデータが書き込まれていない状態が生じているという問題がある。
However, the data recording method described in
図1は従来のデータ記録法の問題を説明する図の一例である。1〜Nの四角は消去単位のブロックを表し、各ブロックが論理的に連結されてリングバッファを形成している。
(i) 車両データ記録装置は、イベントが発生する前後の車両データを収集する。
(ii) 車両データ記録装置はフラッシュメモリに車両データを書き込む(図ではN番目のブロック)。
(iii) ブロックの最後に車両データを書き込むと、車両データ記録装置は、次のブロックを消去する(図では1番目のブロック)。
(iv) 車両データ記録装置は、次のイベントが発生するとイベントの前後の車両データを収集する。
(v) 車両データ記録装置は、すでに消去してあるブロック(図では1番目のブロック)の先頭に車両データを書き込む。
FIG. 1 is an example of a diagram for explaining a problem of a conventional data recording method. The
(i) The vehicle data recording device collects vehicle data before and after an event occurs.
(ii) The vehicle data recording device writes the vehicle data to the flash memory (Nth block in the figure).
(iii) When the vehicle data is written at the end of the block, the vehicle data recording device erases the next block (the first block in the figure).
(iv) When the next event occurs, the vehicle data recording device collects vehicle data before and after the event.
(v) The vehicle data recording device writes the vehicle data at the head of the already erased block (the first block in the figure).
このように(iii)〜(v)の間、フラッシュメモリのブロックには車両データが記録されていない時間が生じてしまい、メモリの使用効率が低下している。 As described above, during the period from (iii) to (v), a time during which vehicle data is not recorded occurs in the flash memory block, and the use efficiency of the memory is reduced.
本発明は、上記課題に鑑み、フラッシュメモリの使用効率を向上させる情報車両データ記録装置を提供することを目的とする。 In view of the above problems, an object of the present invention is to provide an information vehicle data recording apparatus that improves the use efficiency of a flash memory.
本発明は、予め定められた車両状況が検出されると車両データを不揮発性のリングバッファに記憶する情報処理装置において、前記車両状況が検出された前後の車両データを収集する車両データ収集手段と、前記車両データ収集手段が収集した車両データを一次記憶する車両データ一次記憶手段と、車両データのサイズ以上の空き領域がなくなると、前記リングバッファの車両データを消去単位ブロック毎に古い順に消去するデータ消去手段と、前記車両データ一次記憶手段に記憶された車両データを、前記リングバッファの最後尾の車両データに続けて書き込むデータ書き込み手段と、を有し、前記データ消去手段は、車両データのサイズ以上の空き領域がなくなっても前記車両状況が検出されるまで、最も古い車両データが記憶されている消去単位ブロックの車両データを保持し、前記車両状況が検出されたことを契機に最も古い車両データが記憶されている消去単位ブロックの車両データを消去する、ことを特徴とする。 The present invention provides an information processing apparatus for storing vehicle data in a non-volatile ring buffer when a predetermined vehicle situation is detected, and vehicle data collection means for collecting vehicle data before and after the vehicle situation is detected. The vehicle data primary storage means for primary storage of the vehicle data collected by the vehicle data collection means, and when there is no free space larger than the size of the vehicle data, the vehicle data in the ring buffer is erased in chronological order for each erase unit block. Data erasing means; and data writing means for writing the vehicle data stored in the vehicle data primary storage means in succession to the last vehicle data in the ring buffer, wherein the data erasing means Even if there is no more free space than the size, the oldest vehicle data is stored until the vehicle status is detected. It holds vehicle data erase unit block, wherein the vehicle condition is deleted vehicle data erase unit block oldest vehicle data in response to having been detected are stored, characterized in that.
フラッシュメモリの使用効率を向上させる情報車両データ記録装置を提供することができる。 It is possible to provide an information vehicle data recording device that improves the use efficiency of the flash memory.
以下、本発明を実施するための形態について図面を参照しながら説明する。 Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.
図2は、本実施形態の車両データ記録装置による車両データの記録を模式的に説明する図の一例である。
(i) 車両データ記録装置は、イベントが発生する前後の車両データを収集する。
(ii) 車両データ記録装置はフラッシュメモリに車両データを書き込む(図ではN番目のブロック)。
(iii) 車両データ記録装置はブロックに車両データを書き込んでも、次のブロックを消去しない。
(iv) 車両データ記録装置は、次のイベントが発生する前後の車両データを収集する。
(v) ブロックに空き領域がない場合、車両データ記録装置は、リングバッファにおける次のブロックを消去する(図では1番目のブロック)。
(vi) 車両データ記録装置は、消去したブロックの先頭に車両データを書き込む。
FIG. 2 is an example of a diagram schematically illustrating the recording of vehicle data by the vehicle data recording apparatus of the present embodiment.
(i) The vehicle data recording device collects vehicle data before and after an event occurs.
(ii) The vehicle data recording device writes the vehicle data to the flash memory (Nth block in the figure).
(iii) Even if the vehicle data recording device writes the vehicle data in the block, it does not erase the next block.
(iv) The vehicle data recording device collects vehicle data before and after the next event occurs.
(v) If there is no free space in the block, the vehicle data recording device erases the next block in the ring buffer (the first block in the figure).
(vi) The vehicle data recording device writes the vehicle data at the head of the erased block.
車両データ記録装置は、(iii)において次のブロックを消去せず、次のイベントが発生した段階でブロックを消去するので、ブロックに車両データが記録されていない時間がほとんどなくなり、フラッシュメモリの使用効率を向上できる。 The vehicle data recording device does not erase the next block in (iii), but erases the block when the next event occurs, so there is almost no time when no vehicle data is recorded in the block, and the flash memory is used. Efficiency can be improved.
〔構成例〕
図3は、本実施形態の車両データ記録装置100の構成図の一例を示す。車両データ記録装置100は、1つ以上のECU(Electronic Control Unit)により構成され、各ECUは車載ネットワーク13を介して接続されている。車載ネットワーク13のプロトコルには、CAN(Controller Area Network)、FlexRay、Lin(Local Interconnect Network)等があるが、本実施形態ではCANを例にして説明する。
[Configuration example]
FIG. 3 shows an example of a configuration diagram of the vehicle
送信制御ECU12はCANデータ(車両データ)を受信制御ECU11に送信するECUである。図では1つの送信制御ECU12しかないが、車両データを生成するECUは2台以上あってもよい。送信制御ECU12のハード的な構成は受信制御ECU11と同等なので図示は省略した。なお、受信制御ECU11及び送信制御ECU12は機能的な呼称であり、車載装置を制御するECUが受信制御ECU11及び送信制御ECU12を兼ねることができる。受信制御ECU11としては、例えば、メータECU、ボディECU、ナビECU、通信制御ECU等が挙げられる。送信制御ECU12としては、エンジンECU、ブレーキECU、パワステECU、エアバッグECU、トランスミッションECU等が挙げられる。受信制御ECU自身が車両データを生成することもある。
The
メータECUは、スイッチ類(例えば、ターンシグナルスイッチ、ハンドブレーキスイッチ等)の操作状態、他のECUから取得した信号(車速、エンジン回転数、ドアロック状態、シートベルト装着状態、ワイパ作動状態等)を数値や揺動する針の指針位置に変換して表示する。ボディECUは、カーテシスイッチのオン/オフを検出したり、車内灯を制御したり、乗員の操作に基づきドアロック/アンロック等を行う。ナビECUは、GNSS(Global Navigation Satellite Systems)などを使用して車両の位置情報を検出し、周辺の道路地図と自車位置アイコンを液晶ディスプレイなどの表示装置に表示する。また、目的地までの経路を算出し右左折や車線変更などの経路案内を行う。ナビECUにはラジオやテレビの受信機能、CD,DVD,BDプレーヤなどのオーディオビジュアル機能が搭載されることがある。通信制御ECUは、携帯電話網や無線LAN、WIMAXなどの無線通信網に接続して、各種のサーバと通信する。不揮発メモリに記憶された車両データの一部又は全体を外部のサーバに送信することがある。 Meter ECU is the operation state of switches (eg, turn signal switch, hand brake switch, etc.), signals acquired from other ECUs (vehicle speed, engine speed, door lock state, seat belt wearing state, wiper operating state, etc.) Is converted into a numerical value or the pointer position of the swinging needle and displayed. The body ECU detects on / off of the courtesy switch, controls the interior lamp, and performs door locking / unlocking based on the operation of the occupant. The navigation ECU detects position information of the vehicle using GNSS (Global Navigation Satellite Systems) or the like, and displays a surrounding road map and a vehicle position icon on a display device such as a liquid crystal display. In addition, the route to the destination is calculated and route guidance such as turning left and right or changing lanes is performed. The navigation ECU may be equipped with a radio or television reception function and an audiovisual function such as a CD, DVD, or BD player. The communication control ECU is connected to a wireless communication network such as a mobile phone network, a wireless LAN, and WIMAX, and communicates with various servers. Some or all of the vehicle data stored in the nonvolatile memory may be transmitted to an external server.
エンジンECUは、アクセル開度等を検出してスロットル開度や燃料噴射量を決定し、また、クランク角に基づき点火タイミングを制御する。ブレーキECUは各車輪の回転速度からスリップを検出し、スリップしている車輪の制動力を低減することで車輪ロックを回避するABS(Anti‐lock Brake System)制御や、発信時の車輪の空転を検出した場合に車輪に制動力を加えるTRC(Traction Control)制御を行う。この他、ヨーレート、ステアリング舵角、車輪速度等に基づき、各輪の制動力を調整するESC(Electronic Stability Control)制御を行う。パワステECUは運転者の操舵トルクを検出して、モータを駆動させ運転者の操舵方向にステアリングシャフトを回転させる操舵支援を行う。また、LKA(Lane Keeping Assist system)が作動している間は、カメラECUが認識した走行レーンの略中央を走行するようにステアリングシャフトを回転駆動する。エアバッグECUは、車両に働いた加減速度や横減速度を解析して対応するエアバッグ(運転席、助手席、サイドエアバッグ、カーテンエアバッグ等)を展開する。トランスミッションECUは、アクセル開度やブレーキ操作によるエンジン回転数の増減、加速度、及び、車速等に応じてトランスミッションフルードが通過するバルブを開閉してギアを切り換える。 The engine ECU detects the accelerator opening and the like, determines the throttle opening and the fuel injection amount, and controls the ignition timing based on the crank angle. The brake ECU detects slip from the rotational speed of each wheel, and reduces the braking force of the wheel that is slipping to prevent wheel lock (ABS), and performs idling of the wheel at the time of transmission. When detected, TRC (Traction Control) control for applying a braking force to the wheel is performed. In addition, ESC (Electronic Stability Control) control is performed to adjust the braking force of each wheel based on the yaw rate, steering angle, wheel speed, and the like. The power steering ECU detects the steering torque of the driver, and performs steering support for driving the motor and rotating the steering shaft in the steering direction of the driver. Further, while the LKA (Lane Keeping Assist system) is operating, the steering shaft is rotationally driven so as to travel substantially in the center of the travel lane recognized by the camera ECU. The airbag ECU deploys airbags (driver seat, passenger seat, side airbag, curtain airbag, etc.) by analyzing acceleration / deceleration and lateral deceleration acting on the vehicle. The transmission ECU switches the gear by opening and closing a valve through which the transmission fluid passes according to the accelerator opening and the increase / decrease in engine speed due to a brake operation, acceleration, vehicle speed, and the like.
受信制御ECU11は、OS/CANドライバ25、マイコン24、RAM21、ROM22、及び、不揮発メモリ23を有する。OSはマイコン24の汎用的な機能を抽象化してCPUが実行するプログラムがマイコン24の機能を利用することを可能にする。また、OSは、マルチタスク環境ではタスク管理したり、タスク毎にデータを保護したり、タスク間通信を行う。
The
CANドライバは、不図示のCANコントローラにCANデータの送信を要求したり、CANコントローラが受信したCANデータからデータ部分を取り出す。すなわち、CANドライバは、プログラムが送信要求したデータを、CANプロトコルのフォーマットに格納し、CANコントローラのバッファに設定する。また、CANコントローラが予め定められたCAN IDのCANデータを受信した場合、CANドライバはCANプロトコルのフォーマットに従いCANデータから取り出したデータをプログラムに送出する。 The CAN driver requests a CAN controller (not shown) to transmit CAN data, or extracts a data portion from the CAN data received by the CAN controller. That is, the CAN driver stores data requested by the program in the CAN protocol format and sets it in the buffer of the CAN controller. When the CAN controller receives CAN data with a predetermined CAN ID, the CAN driver sends data extracted from the CAN data to the program according to the CAN protocol format.
マイコン24は、主にCPU、不図示のRAM、ROM、DMAC(Direct Memory Access)、INTC(Interrupt Controller)を有する。また、図では、受信制御ECU11がマイコン24外に、RAM21、ROM22、及び、不揮発メモリ23を有するが、これらをマイコン24内に格納して、1つのマイコン24として構成することもできる。RAM21はプログラム(車載されたアプリケーション)が使用する揮発性の記憶手段であり、ROM22は車載されたプログラムを記憶する不揮発メモリ23である。不揮発メモリ23は、車両データを記憶する本実施形態のフラッシュメモリである。不揮発メモリ23は、消去単位であるブロック毎に論理的な順番が付与されており、リングバッファを構成している。
The
図4は、車両データ記録装置100の機能ブロック図の一例である。図4の各機能はROM22に記憶されたプログラムをマイコン24のCPUが実行し、不揮発メモリ23や、DMAC及びCANコントローラなどのICと協働することで実現される。
FIG. 4 is an example of a functional block diagram of the vehicle
受信制御ECU11は、イベント検出部31、車両データ収集部32、空き領域判定部33、ブロック消去部34、及び、車両データ書き込み部35を有する。イベント検出部31は、車両データを記憶する契機となるイベントの発生を検出する。イベントには、例えば、IG‐ON、IG‐OFF、車速が発進したこと、停止したこと、走行中に車速が所定値以上になったこと、加速度/減速度/横加速度が所定値以上になったこと、ヨーレートが所定値以上になったころ、ABS・ESCが働いたこと、エアバッグが展開したこと、等がある。イベント検出部31は、センサが検出した検出信号や送信制御ECU12が送信するCANデータに基づきイベントを検出する。また、送信制御ECU12からイベント発生の通知そのものを取得してもよい。イベント検出部31は、イベントを検出すると車両データ収集部32に車両データの収集を要求する。
The
車両データ収集部32は、送信制御ECU12から車両データを収集する。記憶される車両データは、車速、加速度(減速度)、アクセル開度、プレーキペダルの踏み込み量、エンジン回転数、ヨーレート、位置情報などである。さらに、カメラが撮影した車両前方、側方、後方等の画像を記録してもよい。
The vehicle data collection unit 32 collects vehicle data from the
車両データの内容はイベントの種類に関係なく固定である。しかし、車両データの内容はイベントの種類により変えてもよいし、車両データのサイズを変えることは困難ではない。しかし、イベント毎にデータサイズが変わってしまうと、後の解析の際にどのアドレスでイベントが切り替わったのかを判別しにくい。よって、車両データの内容がイベントの種類により変わったとしても、車両データのサイズは共通であることが好ましい。 The content of the vehicle data is fixed regardless of the type of event. However, the contents of the vehicle data may be changed depending on the type of event, and it is not difficult to change the size of the vehicle data. However, if the data size changes for each event, it is difficult to determine at which address the event has been switched in the later analysis. Therefore, even if the content of the vehicle data changes depending on the type of event, the size of the vehicle data is preferably the same.
また、イベントの種類により車両データのサイズを変える場合、車両データにイベントIDを追加することが好適である。イベントIDにより、1回の車両データのサイズが定まるので、不揮発メモリ23の車両データがどのアドレスで次の車両データに切り替わったのかを判別できる。
Moreover, when changing the size of vehicle data according to the kind of event, it is suitable to add event ID to vehicle data. Since the size of one vehicle data is determined by the event ID, it is possible to determine at which address the vehicle data in the
また、車両データ収集部32は、イベント発生前の車両データとイベント発生後の車両データとをそれぞれ収集する。イベント発生前の車両データとしては、車速、加速度(減速度)、アクセル開度やブレーキペダルの踏み込み量などが挙げられる。イベント発生後の車両データとしては、エンジン回転数、ヨーレート、位置情報などが挙げられる。イベント発生の前と後で、同じデータを収集することを妨げるものではない。車両データ収集部32は、イベントの発生が検出される前から、例えば定期的にイベント発生前の車両データをRAM21に記憶しておく。そして、イベントの発生が検出されると、イベント発生後の車両データをRAM21に記憶する。車両データ書き込み部35は、RAM21に記憶されているイベント発生前の車両データ、及び、イベント発生後の車両データを不揮発メモリ23に書き込む。
Further, the vehicle data collection unit 32 collects vehicle data before the event occurrence and vehicle data after the event occurrence, respectively. Vehicle data before the occurrence of an event includes vehicle speed, acceleration (deceleration), accelerator opening, and brake pedal depression amount. Examples of vehicle data after the occurrence of an event include engine speed, yaw rate, and position information. It does not preclude collecting the same data before and after the event occurs. The vehicle data collection unit 32 stores the vehicle data before the occurrence of the event in the
空き領域判定部33は、不揮発メモリ23のブロックに空き領域があるか否かを判定する。1回の車両データのサイズ、最後に車両データが書き込まれたアドレス、及び、ブロックのサイズは既知である。よって、空き領域判定部33は、ブロック内に1回分の車両データのサイズの空き領域があるか否かに基づき、不揮発メモリ23のブロックに空き領域があるか否かを判定する。1回分の車両データのサイズの空き領域がない場合、ブロック消去部34に1ブロックの消去を要求する。1回分の車両データのサイズの空き領域がある場合、車両データ書き込み部35に車両データの不揮発メモリ23への書き込みを要求する。
The free
ブロック消去部34は、ブロック内に1回分の車両データのサイズの空き領域がない場合、最後に車両データが書き込まれたブロックの次のブロックを消去する。これにより、空き領域が確保される。上記のように、フラッシュメモリはブロック単位でしか消去できない。
The
車両データ書き込み部35は、RAM21に記憶された車両データを不揮発メモリ23に書き込む。具体的には、最後に車両データを書き込んだアドレスの次のアドレスから車両データを書き込む。不揮発メモリ23に記憶された車両データの最後のアドレスを、ポインタとして次回の書き込みのためRAM21等に保持しておく。
The vehicle
〔動作手順〕
図5は、本実施例の車両データ記録装置100の動作手順を示すフローチャート図の一例である。図5の手順は、例えばIG‐ON後(ハイブリッド車や電気自動車の場合はシステムの起動後)繰り返し実行される。
[Operation procedure]
FIG. 5 is an example of a flowchart showing an operation procedure of the vehicle
車両データ収集部32は、イベント前の車両データを収集する(S10)。 The vehicle data collection unit 32 collects vehicle data before the event (S10).
車両データ収集部32は、イベント前の車両データを収集しながら、イベント検出部31がイベントの発生を検出したか否かを判定する(S20)。イベント検出部31がイベントの発生を検出しない場合(S20のNo)、車両データ収集部32はイベント前の車両データの収集を継続する。
The vehicle data collection unit 32 determines whether the
イベント検出部31がイベントの発生を検出した場合(S20のYes)、車両データ収集部32はイベント後の車両データを収集する(S30)。これにより、イベント発生時に記憶すべき車両データを収集できた。
When the
空き領域判定部33は、不揮発メモリ23に車両データを記憶するために必要な空き領域があるか否かを判定する(S40)。空き領域判定部33は、ポインタにより特定した車両データの書き込み先の先頭アドレスに車両データのサイズを加えた値が、1ブロックの最後のアドレスより大きいか否かを判定する。1ブロックの大きさは固定なので、1ブロックの最後のアドレスは既知である。
The free
ブロックに空き領域がある場合(S40のYes)、車両データ書き込み部35は車両データを空き領域に書き込む(S50)。
When there is an empty area in the block (Yes in S40), the vehicle
一方、ブロックに空き領域がない場合(S40のNo)、ブロック消去部34はブロック単位でブロックを消去する(S60)。
On the other hand, when there is no free area in the block (No in S40), the
車両データ書き込み部35は、消去により生成された空き領域に車両データを書き込む(S50)。
The vehicle
次に、車両データ書き込み部35は、書き込まれた車両データのサイズにしたがい、ポインタを更新する(S70)。これにより、ポインタは、不揮発メモリ23における次回の車両データの書き込み先の先頭アドレスを示す。
Next, the vehicle
このように、イベント発生後の車両データを書き込む直前に、1ブロック消去することで、ブロックが消去されている時間を短くでき、不揮発メモリ23の使用効率を向上できる。
As described above, by erasing one block immediately before writing the vehicle data after the occurrence of the event, the time during which the block is erased can be shortened, and the use efficiency of the
〔変形例〕
これまで説明したように、イベント発生後に1ブロック消去することで、不揮発メモリ23の使用効率を向上できた。しかし、1ブロックのサイズ(以下、ブロックサイズという)に比べ、車両データのサイズが小さいと、ブロックにデータが記憶されていない時間が長くなり使用効率の向上効果が低下する。
[Modification]
As described above, the use efficiency of the
図6は、ブロックサイズと車両データのサイズの関係を模式的に説明する図の一例である。図6(a)では、ブロックサイズよりも車両データのサイズの方が小さいため、データが記憶されていない領域が大きくなってしまう。イベントが発生することで、データが記憶されていない領域は、順次、小さくなるが、データが記憶されていない領域はメモリの使用効率を低下させている。 FIG. 6 is an example of a diagram for schematically explaining the relationship between the block size and the size of the vehicle data. In FIG. 6A, since the size of the vehicle data is smaller than the block size, an area where no data is stored becomes large. When an event occurs, the area in which no data is stored is sequentially reduced, but the area in which no data is stored reduces the memory use efficiency.
これに対し、図6(b)では車両データのサイズがブロックサイズの半分程度になっている。この場合、ブロックが消去され、1つの車両データが書き込まれた直後から、データが記憶されていない領域をブロックサイズの半分以下に抑制することができる。したがって、ブロックサイズに対し車両データのサイズが大きいほど、メモリの使用効率を向上させやすい。 On the other hand, in FIG. 6B, the size of the vehicle data is about half of the block size. In this case, immediately after the block is erased and one vehicle data is written, the area in which no data is stored can be suppressed to half or less of the block size. Therefore, the larger the vehicle data size is relative to the block size, the easier it is to improve the memory usage efficiency.
図6(c)では、車両データのサイズとブロックサイズが同じになっている。この場合、ブロックが消去され、1つの車両データが書き込まれた直後から、データが記憶されていない領域をゼロにすることができる。 In FIG. 6C, the vehicle data size and the block size are the same. In this case, an area in which no data is stored can be made zero immediately after the block is erased and one vehicle data is written.
また、図6(d)では、車両データのサイズがブロックサイズの整数倍になっている。この場合、2ブロックが消去され、1つの車両データが書き込まれた直後から、データが記憶されていない領域をゼロにすることができる。したがって、図6(c)(d)のように、車両データのサイズがブロックサイズの整数倍の場合に、最もメモリの使用効率を向上させることができる。 Further, in FIG. 6D, the size of the vehicle data is an integral multiple of the block size. In this case, an area in which no data is stored can be made zero immediately after two blocks are erased and one vehicle data is written. Therefore, as shown in FIGS. 6C and 6D, when the size of the vehicle data is an integer multiple of the block size, the memory use efficiency can be improved most.
本実施例では、ブロック間に車両データが跨って記憶されている場合について説明する。
図7は、ブロック間に車両データが跨って記憶されている不揮発メモリ23を模式的に説明する図の一例である。図の斜線の四角が1つの車両データであり、1番目のブロックと2番目のブロックに跨っている。ブロックのサイズが車両データのサイズの整数倍でない場合、1つの車両データがブロック間に跨って記録されることがある。ブロックのサイズが車両データのサイズの整数倍であっても、車両データ以外のデータが記憶されていれば、1つの車両データがブロック間に跨って記録されるおそれがある。
In this embodiment, a case where vehicle data is stored across blocks will be described.
FIG. 7 is an example of a diagram schematically illustrating the
イベントが発生し、1番目のブロックに車両データを書き込む場合、ブロック消去部34は1番目のブロックを消去するので、1番目のブロックと2番目のブロックに跨っていた車両データは一部のみが消去される。このため、1番目のブロックと2番目のブロックに跨っていた車両データに連続性がなくなり、車両データとしての有用性が低下してしまう(解析に使えなくなる)。連続性がなくなった車両データは解析に使用できないとすれば、実質的に消去された場合と同様に不揮発メモリ23の使用効率を低下させてしまう。
When an event occurs and vehicle data is written to the first block, the
そこで、本実施例では、不揮発メモリ23に退避領域を設けておき、退避領域に1ブロック分の車両データが記憶されたら、不揮発メモリ23のブロックを消去して、退避領域の1ブロック分の車両データを書き込む車両データ記録装置100について説明する。
Therefore, in this embodiment, a
図8は、本実施例の車両データ記録装置100による車両データの記録を模式的に説明する図の一例である。図8では1ブロック分の退避領域が設けられている。退避領域は、不揮発メモリ23に設けられている。退避領域をRAM21に設けてもよい。
(i) イベントが発生したため、車両データ記録装置100がイベント発生前後の車両データを収集する。
(ii) すでに、不揮発メモリ23の空き領域がなくなっている。このため、車両データ記録装置100は、退避領域に車両データを書き込む。
(iii) 続いて、イベントが発生したため、車両データ記録装置100がイベント発生前後の車両データを収集する。
(iv) 車両データ記録装置100は、退避領域に車両データを書き込むと、1ブロック分以上か否かを判定し、1ブロック分以上の車両データが退避される場合、1番目のブロックを消去する。
(v) 1ブロックの空き容量が生成されたので、退避領域の車両データ及び最も新しい車両データを書き込む。退避領域の車両データは不要になったので消去しておく。
FIG. 8 is an example of a diagram schematically illustrating the recording of vehicle data by the vehicle
(i) Since an event has occurred, the vehicle
(ii) There is already no free space in the
(iii) Subsequently, since an event has occurred, the vehicle
(iv) When the vehicle
(v) Since one block of free space has been generated, the vehicle data in the evacuation area and the latest vehicle data are written. The vehicle data in the evacuation area is no longer needed and is deleted.
このような手順によれば、従来では(ii)の時点で1ブロック分の車両データが消去されたのに比べ、(iv)で1ブロック分の車両データが消去されるまで、1番目のブロックと2番目のブロックに跨った車両データの連続性がなくなる時間を短くできる。 According to such a procedure, compared with the case where the vehicle data for one block was deleted at the time of (ii) in the past, the first block until the vehicle data for one block was deleted at (iv). And the time when the continuity of the vehicle data straddling the second block is lost can be shortened.
図9は、本実施例の車両データ記録装置100の機能ブロック図の一例を示す。図9において図4と同一部には同一の符号を付しその説明は省略する。
FIG. 9 shows an example of a functional block diagram of the vehicle
本実施例の空き領域判定部33は、不揮発メモリ23の各ブロックへの書き込みが一巡するまで、ブロックに空き領域があるか否かを判定する。しかし、本実施例では、最後のNブロックへの書き込みが終了すると、常にブロックには空き領域がなくなるので、各ブロックへの書き込みが一巡した後は、空き領域判定部33が空き領域の有無を判定する必要がない。ただ、各ブロックへの書き込みが一巡した後も空き領域判定部33がブロックに空き領域があるか否かを判定しても不都合はない。
The free
同様に、車両データ書き込み部35は、各ブロックへの書き込みが一巡するまで、車両データをブロックに書き込むが、その後、ブロックに直接、車両データを書き込むことはない。
Similarly, the vehicle
各ブロックへの書き込みが一巡した後、不揮発メモリ23には空き領域がないので、本実施例では退避領域書き込み部36が退避領域に車両データを書き込む。いったん、退避領域に書き込むことで、2つのブロックに跨った車両データの一部が消去され、車両データに連続性がなくなる時間を短くできる。
After the writing to each block is completed, there is no free area in the
退避領域操作部37は、退避領域に1ブロック分以上の車両データが記憶されるか否かを実際に記憶する前に判定する。1ブロック分以上の車両データが記憶される場合、ブロック消去部34にブロックの消去を要求する。ブロック消去部34が1ブロックを消去すると、退避領域操作部37は退避領域の車両データ及び最新の車両データを不揮発メモリ23のブロックに書き込む。
The save
図10は、本実施例の車両データ記録装置100の動作手順を示すフローチャート図の一例である。図10のS30までの手順は、図5と同様である。すなわち、イベント検出部31がイベントの発生を検出すると、車両データ収集部32はイベント後の車両データを収集する(S30)。これにより、イベント発生時に記憶すべき車両データを収集できた。
FIG. 10 is an example of a flowchart showing an operation procedure of the vehicle
次に、空き領域判定部33は、不揮発メモリ23に車両データを記憶するために必要な空き領域があるか否かを判定する(S40)。空き領域判定部33は、ポインタにより特定した車両データの書き込み先の先頭アドレスに車両データのサイズを加えた値が、1ブロックの最後のアドレスより大きいか否かを判定する。本実施例では1ブロックを消去しないので、不揮発メモリ23への記憶の一巡後、S40の判定はNoとなる。ブロックに空き領域がある場合(S40のYes)、車両データ書き込み部35は車両データを空き領域に書き込む(S50)。
Next, the free
ブロックに空き領域がない場合(S40のNo)、退避領域操作部37は、退避領域に1ブロック分以上の車両データを記憶するか否かを判定する(S110)。すなわち、実際に記録する前に、退避領域にすでに書き込まれた車両データのサイズと、これから書き込む車両データのサイズの合計が、1ブロック分か否かを判定する。書き込む前に判定することで、退避領域のサイズを1ブロック以下に抑制できる。
When there is no free area in the block (No in S40), the save
退避領域に1ブロック分以上の車両データが記憶されない場合(S110のNo)、退避領域書き込み部36は、退避領域の空き領域に車両データを書き込む(S120)。また、不揮発メモリ23のブロックを消去すべきでないので、処理はS10に戻る。
When vehicle data for one block or more is not stored in the save area (No in S110), the save
退避領域に合計で1ブロック分以上の車両データが記憶される場合(S110のYes)、ブロック消去部34はブロック単位で不揮発メモリ23の1ブロックを消去する(S130)。
When vehicle data for one block or more is stored in the evacuation area in total (Yes in S110), the
次に、退避領域操作部37は退避領域の車両データを、消去したブロックに複写する(S140)。
Next, the evacuation
そして、RAM21に保持している、最新の車両データを、車両データ書き込み部35が消去したブロックに書き込む(S150)。
Then, the latest vehicle data held in the
退避領域操作部37は退避領域の車両データを消去する(S160)。
The evacuation
車両データ書き込み部35は、車両データを書き込んだサイズにしたがい、ポインタを更新する(S70)。これにより、ポインタは、不揮発メモリ23における次回の車両データの書き込み先の先頭アドレスを示す。
The vehicle
このように、退避領域を設けることで、2つのブロックに車両データが跨って記憶されている場合、跨った車両データの連続性がなくなる時間を最小限にできる。 Thus, by providing the retreat area, when vehicle data is stored across two blocks, the time when the continuity of the straddled vehicle data is lost can be minimized.
〔1ブロック超過分の車両データについて〕
例えば、ステップS110で退避領域に1ブロックより大きい車両データが記憶される場合、超過分の車両データについて説明する。
[Vehicle data for one block excess]
For example, when vehicle data larger than one block is stored in the save area in step S110, the excess vehicle data will be described.
図11(a)は、退避領域の空き容量と車両データのサイズの関係を模式的に説明する図の一例である。退避領域の空き容量よりも車両データの方が大きい場合、不揮発メモリ23を1ブロック分消去しても、退避領域と車両データを全て、不揮発メモリ23の1ブロックには記憶できない。
FIG. 11A is an example for schematically explaining the relationship between the free space in the save area and the size of the vehicle data. If the vehicle data is larger than the free capacity of the save area, even if the
そこで、このような場合、退避領域操作部37は退避領域と最新の車両データで合計1ブロック分を不揮発メモリ23に書き込む。そして、最新の車両データのうち不揮発メモリ23の1ブロックに記憶可能な1ブロック分だけ記憶しておき、1ブロックの超過分は退避メモリに記憶しておけばよい。こうすることで、退避領域は1ブロックしかなくても、1ブロックを超過した分の車両データに対応できる。
In such a case, the save
または、図11(b)のように退避領域を2ブロック設けてもよい。この場合は、退避領域が2ブロックあることを利用して、RAM21に記憶されている最新の車両データをいったん退避領域に記憶することができる。
Alternatively, as shown in FIG. 11B, two save areas may be provided. In this case, the latest vehicle data stored in the
退避領域に記憶された車両データのサイズが1ブロック以上になった場合、退避領域操作部37が退避領域の1ブロック分を不揮発メモリ23に書き込む。そして、1ブロックの超過分は2番目の退避メモリに記憶しておく。
When the size of the vehicle data stored in the save area becomes 1 block or more, the save
退避領域操作部37は次回の車両データは2番目の退避メモリに続けて記憶し、2番目の退避領域に空き領域がなくなると1番目の退避領域に記憶する。すなわち、退避領域もリングバッファのように使用される。こうすることで、退避領域は2ブロック必要になるが、車両データの書き込み処理を図11(a)よりも簡易化することができる。
The save
11 受信制御ECU
12 送信制御ECU
13 車載ネットワーク
21 RAM
22 ROM
23 不揮発メモリ
24 マイコン
25 OS/CANドライバ
100 車両データ記録装置
11 Reception control ECU
12 Transmission control ECU
13 In-
22 ROM
23
Claims (6)
前記車両状況が検出された前後の車両データを収集する車両データ収集手段と、
前記車両データ収集手段が収集した車両データを一次記憶する車両データ一次記憶手段と、
車両データのサイズ以上の空き領域がなくなると、前記リングバッファの車両データを古い順に消去単位ブロックで消去するデータ消去手段と、
前記車両データ一次記憶手段に記憶された車両データを、前記リングバッファの最後尾の車両データに続けて書き込むデータ書き込み手段と、を有し、
前記データ消去手段は、車両データのサイズ以上の空き領域がなくなっても前記車両状況が検出されるまで、最も古い車両データが記憶されている消去単位ブロックの車両データを保持し、前記車両状況が検出されたことを契機に最も古い車両データが記憶されている消去単位ブロックの車両データを消去する、
ことを特徴とする情報処理装置。 In an information processing apparatus that stores vehicle data in a nonvolatile ring buffer when a predetermined vehicle situation is detected,
Vehicle data collection means for collecting vehicle data before and after the vehicle situation is detected;
Vehicle data primary storage means for primarily storing vehicle data collected by the vehicle data collection means;
When there is no more free space than the size of the vehicle data, data erasing means for erasing the vehicle data in the ring buffer in the erasing unit block from the oldest
Data writing means for continuously writing the vehicle data stored in the vehicle data primary storage means to the last vehicle data of the ring buffer;
The data erasing means retains the vehicle data of the erasure unit block in which the oldest vehicle data is stored until the vehicle situation is detected even if there is no free space equal to or larger than the size of the vehicle data. Erasing the vehicle data of the erasure unit block in which the oldest vehicle data is stored when it is detected,
An information processing apparatus characterized by that.
前記退避メモリに車両データを書き込む退避領域書き込み手段と、を有し、
前記データ消去手段は、退避領域に書き込まれている車両データと、前記車両状況が検出されたために新たに生じた車両データの合計サイズが消去単位ブロック以上のサイズである場合に、最も古い車両データが記憶されている消去単位ブロックの車両データを消去する、
ことを特徴とする請求項1記載の情報処理装置。 Save memory of the same size as the erase unit block,
Evacuation area writing means for writing vehicle data to the evacuation memory,
The data erasing means is the oldest vehicle data when the total size of the vehicle data written in the save area and the newly generated vehicle data due to the detection of the vehicle status is equal to or larger than the erase unit block. Erases the vehicle data of the erase unit block in which is stored,
The information processing apparatus according to claim 1.
前記退避領域に書き込まれている車両データ及び前記車両状況が検出されたために新たに生じた車両データのうち1消去単位ブロック分を、前記データ消去手段が消去した消去単位ブロックの空き領域に書き込み、1消去単位ブロックの超過分を前記退避領域に書き込む退避領域操作手段、を有することを特徴とする請求項2記載の情報処理装置。 When the total size of the vehicle data written in the evacuation area and the newly generated vehicle data because the vehicle status is detected is larger than the erase unit block,
Write one erasure unit block of the vehicle data written in the evacuation area and the vehicle data newly generated due to the detection of the vehicle status into the empty area of the erasure unit block erased by the data erasure means, 3. The information processing apparatus according to claim 2, further comprising save area operation means for writing an excess of one erase unit block into the save area.
車両データ収集手段が、前記車両状況が検出された前後の車両データを収集し、車両データ一次記憶手段に一次記憶させるステップと、
データ書き込み手段が、前記車両データ一次記憶手段に記憶された車両データを、前記リングバッファの最後尾の車両データに続いて書き込むステップと、
車両データのサイズ以上の空き領域がなくなった場合、データ消去手段が、前記車両状況が検出されるまで、最も古い車両データが記憶されている消去単位ブロックの車両データを保持し、前記車両状況が検出されたことを契機に最も古い車両データが記憶されている消去単位ブロックの車両データを消去するステップと、
ことを特徴とするデータ記録方法。 In a data recording method of an information processing apparatus for storing vehicle data in a non-volatile ring buffer when a predetermined vehicle situation is detected,
Vehicle data collection means collects vehicle data before and after the vehicle situation is detected, and temporarily stores the vehicle data in primary storage means;
A data writing means for writing the vehicle data stored in the vehicle data primary storage means subsequent to the last vehicle data in the ring buffer;
When there is no free space equal to or larger than the size of the vehicle data, the data erasing means holds the vehicle data of the erasure unit block storing the oldest vehicle data until the vehicle situation is detected, and the vehicle situation is Erasing the vehicle data of the erasure unit block in which the oldest vehicle data is stored in response to being detected;
And a data recording method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011214782A JP2013073609A (en) | 2011-09-29 | 2011-09-29 | Information processor and data recording method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011214782A JP2013073609A (en) | 2011-09-29 | 2011-09-29 | Information processor and data recording method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2013073609A true JP2013073609A (en) | 2013-04-22 |
Family
ID=48478018
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011214782A Withdrawn JP2013073609A (en) | 2011-09-29 | 2011-09-29 | Information processor and data recording method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013073609A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113868236A (en) * | 2021-09-29 | 2021-12-31 | 东风汽车有限公司东风日产乘用车公司 | Electric vehicle fault monitoring method, device and computer readable storage medium |
-
2011
- 2011-09-29 JP JP2011214782A patent/JP2013073609A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113868236A (en) * | 2021-09-29 | 2021-12-31 | 东风汽车有限公司东风日产乘用车公司 | Electric vehicle fault monitoring method, device and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20090024274A1 (en) | Recording device and recording method | |
JP6496502B2 (en) | Operating system replacement in in-vehicle computing systems | |
EP1416349B1 (en) | Driving workload estimation | |
JP5650444B2 (en) | Vehicle drive recorder and recorded information management method | |
JP6011379B2 (en) | Tamper detection system, electronic control unit | |
JP5696636B2 (en) | Information processing apparatus and data recording method | |
JP2015032314A5 (en) | ||
JP2002183876A (en) | Vehicle data recording method, device thereof, memory device, and computer program | |
JP6451959B2 (en) | Operation management system | |
JP6142338B2 (en) | Operation management system | |
JP5712304B2 (en) | Drive recorder and display device | |
JP2013101426A (en) | On-vehicle communication device | |
JP5544886B2 (en) | In-vehicle information storage device | |
JP2010238022A (en) | Fault diagnosis information recording apparatus | |
JP2013073609A (en) | Information processor and data recording method | |
JP7156148B2 (en) | In-vehicle recording device | |
US10977934B2 (en) | Information providing system, vehicle-mounted device, and information providing method | |
JP5811109B2 (en) | Driving support system and driving support method | |
JP7211279B2 (en) | Drive recorder, data recording method and program | |
JP3922348B2 (en) | In-vehicle data storage device | |
WO2020241088A1 (en) | Vehicular recording control device, recording control method, and program | |
JP2005166072A (en) | Recorder for driving | |
WO2020241179A1 (en) | Vehicular recording control device, recording control method, and program | |
JP2012113637A (en) | Behavior data recording device for vehicle | |
JP2023140118A (en) | Control device and vehicle |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20141202 |