JP2013073609A - Information processor and data recording method - Google Patents

Information processor and data recording method Download PDF

Info

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
Application number
JP2011214782A
Other languages
Japanese (ja)
Inventor
Takashi Kojima
隆志 小嶌
Yoshiyuki Hashimoto
佳幸 橋本
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2011214782A priority Critical patent/JP2013073609A/en
Publication of JP2013073609A publication Critical patent/JP2013073609A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an information vehicle data recording device for improving use efficiency of a flash memory.SOLUTION: An information processor 100 for storing vehicle data in a non-volatile ring buffer when a vehicle state fixed in advance is detected includes: vehicle data collection means 32 for collecting vehicle data before and after the vehicle state is detected; vehicle data primary storage means 21 for primarily storing the vehicle data; data deletion means 34 for deleting the vehicle data in the ring buffer for each deletion unit block in the order of older vehicle data; and data writing means 35 for writing the vehicle data stored in the vehicle data primary storage means subsequently to the last vehicle data in the ring buffer. The data deletion means holds the vehicle data in the deletion unit block where the oldest vehicle data is stored until the vehicle state is detected even if a free space which has the size of the vehicle data or more is used up.

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 Patent Document 1, a logical ring buffer in which blocks are arranged in order is configured, and data is recorded sequentially from the first erased sector in a memory block having erased sectors when data is recorded in a flash memory. A recording method is disclosed. In this data recording method, after the data is recorded in the last sector of the memory block, the data of the next memory block on the ring buffer is erased, and at the next recording, the data is sequentially recorded from the first sector of the memory block. Continue recording.

特開2004‐071033号公報JP 2004-071033 A

しかしながら、特許文献1に記載されたデータ記録法では、ブロックを消去してから次回のイベントで車両データを書き込むまで、ブロックに何もデータが書き込まれていない状態が生じているという問題がある。   However, the data recording method described in Patent Document 1 has a problem that no data is written in the block until the vehicle data is written at the next event after the block is erased.

図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 squares 1 to N represent blocks of erase units, and the blocks are logically connected to form a ring buffer.
(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.

従来のデータ記録法の問題を説明する図の一例である。It is an example of the figure explaining the problem of the conventional data recording method. 本実施形態の車両データ記録装置による車両データの記録を模式的に説明する図の一例である。It is an example of the figure which illustrates typically recording of the vehicle data by the vehicle data recording device of this embodiment. 車両データ記録装置の構成図の一例である。It is an example of the block diagram of a vehicle data recording device. 車両データ記録装置の機能ブロック図の一例である。It is an example of the functional block diagram of a vehicle data recording device. 車両データ記録装置の動作手順を示すフローチャート図の一例である。It is an example of the flowchart figure which shows the operation | movement procedure of a vehicle data recording device. ブロックサイズと車両データのサイズの関係を模式的に説明する図の一例である。It is an example of the figure which illustrates typically the relationship between a block size and the size of vehicle data. ブロック間に車両データが跨って記憶されている不揮発メモリを模式的に説明する図の一例である。It is an example of the figure which illustrates typically the non-volatile memory in which vehicle data is stored straddling between blocks. 車両データ記録装置による車両データの記録を模式的に説明する図の一例である(実施例2)。(Example 2) which is an example of the figure which illustrates typically the recording of the vehicle data by a vehicle data recording device. 車両データ記録装置の機能ブロック図の一例である(実施例2)。(Example 2) which is an example of the functional block diagram of a vehicle data recording device. 車両データ記録装置の動作手順を示すフローチャート図の一例である。It is an example of the flowchart figure which shows the operation | movement procedure of a vehicle data recording device. 退避領域の空き容量と車両データのサイズの関係を模式的に説明する図の一例である。It is an example of the figure which illustrates typically the relationship between the free capacity of a save area, and the size of vehicle data.

以下、本発明を実施するための形態について図面を参照しながら説明する。   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 data recording apparatus 100 of the present embodiment. The vehicle data recording device 100 is configured by one or more ECUs (Electronic Control Units), and each ECU is connected via an in-vehicle network 13. The protocol of the in-vehicle network 13 includes CAN (Controller Area Network), FlexRay, Lin (Local Interconnect Network), and the like. In this embodiment, the CAN will be described as an example.

送信制御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 transmission control ECU 12 is an ECU that transmits CAN data (vehicle data) to the reception control ECU 11. Although there is only one transmission control ECU 12 in the figure, there may be two or more ECUs that generate vehicle data. Since the hardware configuration of the transmission control ECU 12 is the same as that of the reception control ECU 11, the illustration is omitted. The reception control ECU 11 and the transmission control ECU 12 are functional names, and the ECU that controls the in-vehicle device can also serve as the reception control ECU 11 and the transmission control ECU 12. Examples of the reception control ECU 11 include a meter ECU, a body ECU, a navigation ECU, a communication control ECU, and the like. Examples of the transmission control ECU 12 include an engine ECU, a brake ECU, a power steering ECU, an airbag ECU, a transmission ECU, and the like. The reception control ECU itself may generate vehicle data.

メータ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 reception control ECU 11 includes an OS / CAN driver 25, a microcomputer 24, a RAM 21, a ROM 22, and a nonvolatile memory 23. The OS abstracts general-purpose functions of the microcomputer 24 so that a program executed by the CPU can use the functions of the microcomputer 24. In addition, the OS manages tasks in a multitask environment, protects data for each task, and performs communication between tasks.

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 microcomputer 24 mainly includes a CPU, a RAM (not shown), a ROM, a DMAC (Direct Memory Access), and an INTC (Interrupt Controller). In the figure, the reception control ECU 11 has a RAM 21, a ROM 22, and a nonvolatile memory 23 in addition to the microcomputer 24, but these can be stored in the microcomputer 24 and configured as one microcomputer 24. The RAM 21 is a volatile storage means used by the program (onboard application), and the ROM 22 is a non-volatile memory 23 that stores the onboard program. The nonvolatile memory 23 is a flash memory according to this embodiment that stores vehicle data. The non-volatile memory 23 is given a logical order for each block which is an erasing unit, and constitutes a ring buffer.

図4は、車両データ記録装置100の機能ブロック図の一例である。図4の各機能はROM22に記憶されたプログラムをマイコン24のCPUが実行し、不揮発メモリ23や、DMAC及びCANコントローラなどのICと協働することで実現される。   FIG. 4 is an example of a functional block diagram of the vehicle data recording device 100. Each function of FIG. 4 is realized by the CPU 24 of the microcomputer 24 executing a program stored in the ROM 22 and cooperating with ICs such as the nonvolatile memory 23 and the DMAC and CAN controllers.

受信制御ECU11は、イベント検出部31、車両データ収集部32、空き領域判定部33、ブロック消去部34、及び、車両データ書き込み部35を有する。イベント検出部31は、車両データを記憶する契機となるイベントの発生を検出する。イベントには、例えば、IG‐ON、IG‐OFF、車速が発進したこと、停止したこと、走行中に車速が所定値以上になったこと、加速度/減速度/横加速度が所定値以上になったこと、ヨーレートが所定値以上になったころ、ABS・ESCが働いたこと、エアバッグが展開したこと、等がある。イベント検出部31は、センサが検出した検出信号や送信制御ECU12が送信するCANデータに基づきイベントを検出する。また、送信制御ECU12からイベント発生の通知そのものを取得してもよい。イベント検出部31は、イベントを検出すると車両データ収集部32に車両データの収集を要求する。   The reception control ECU 11 includes an event detection unit 31, a vehicle data collection unit 32, a free space determination unit 33, a block deletion unit 34, and a vehicle data writing unit 35. The event detection unit 31 detects the occurrence of an event that triggers the storage of vehicle data. Events include, for example, IG-ON, IG-OFF, vehicle speed has started, stopped, vehicle speed has exceeded a predetermined value during driving, acceleration / deceleration / lateral acceleration has exceeded a predetermined value When the yaw rate exceeds a predetermined value, the ABS / ESC has worked, the airbag has been deployed, and the like. The event detection unit 31 detects an event based on a detection signal detected by the sensor and CAN data transmitted by the transmission control ECU 12. In addition, the event occurrence notification itself may be acquired from the transmission control ECU 12. When detecting an event, the event detection unit 31 requests the vehicle data collection unit 32 to collect vehicle data.

車両データ収集部32は、送信制御ECU12から車両データを収集する。記憶される車両データは、車速、加速度(減速度)、アクセル開度、プレーキペダルの踏み込み量、エンジン回転数、ヨーレート、位置情報などである。さらに、カメラが撮影した車両前方、側方、後方等の画像を記録してもよい。   The vehicle data collection unit 32 collects vehicle data from the transmission control ECU 12. The stored vehicle data includes vehicle speed, acceleration (deceleration), accelerator opening, amount of brake pedal depression, engine speed, yaw rate, position information, and the like. Furthermore, you may record the image of the vehicle front, side, back, etc. which the camera image | photographed.

車両データの内容はイベントの種類に関係なく固定である。しかし、車両データの内容はイベントの種類により変えてもよいし、車両データのサイズを変えることは困難ではない。しかし、イベント毎にデータサイズが変わってしまうと、後の解析の際にどのアドレスでイベントが切り替わったのかを判別しにくい。よって、車両データの内容がイベントの種類により変わったとしても、車両データのサイズは共通であることが好ましい。   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 nonvolatile memory 23 is switched to the next vehicle data.

また、車両データ収集部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 RAM 21 periodically, for example, before the occurrence of the event is detected. When the occurrence of an event is detected, the vehicle data after the occurrence of the event is stored in the RAM 21. The vehicle data writing unit 35 writes the vehicle data before the occurrence of the event and the vehicle data after the occurrence of the event stored in the RAM 21 in the nonvolatile memory 23.

空き領域判定部33は、不揮発メモリ23のブロックに空き領域があるか否かを判定する。1回の車両データのサイズ、最後に車両データが書き込まれたアドレス、及び、ブロックのサイズは既知である。よって、空き領域判定部33は、ブロック内に1回分の車両データのサイズの空き領域があるか否かに基づき、不揮発メモリ23のブロックに空き領域があるか否かを判定する。1回分の車両データのサイズの空き領域がない場合、ブロック消去部34に1ブロックの消去を要求する。1回分の車両データのサイズの空き領域がある場合、車両データ書き込み部35に車両データの不揮発メモリ23への書き込みを要求する。   The free space determination unit 33 determines whether there is a free space in the block of the nonvolatile memory 23. The size of the vehicle data at one time, the address at which the vehicle data was written last, and the block size are known. Therefore, the free space determination unit 33 determines whether there is a free space in the block of the nonvolatile memory 23 based on whether there is a free space of the size of the vehicle data for one time in the block. If there is no free space of the size of the vehicle data for one time, the block erasure unit 34 is requested to erase one block. When there is an empty area of the size of the vehicle data for one time, the vehicle data writing unit 35 is requested to write the vehicle data to the nonvolatile memory 23.

ブロック消去部34は、ブロック内に1回分の車両データのサイズの空き領域がない場合、最後に車両データが書き込まれたブロックの次のブロックを消去する。これにより、空き領域が確保される。上記のように、フラッシュメモリはブロック単位でしか消去できない。   The block erasure unit 34 erases the block next to the block in which the vehicle data was last written when there is no empty area of the size of the vehicle data for one time in the block. Thereby, an empty area is secured. As described above, the flash memory can be erased only in units of blocks.

車両データ書き込み部35は、RAM21に記憶された車両データを不揮発メモリ23に書き込む。具体的には、最後に車両データを書き込んだアドレスの次のアドレスから車両データを書き込む。不揮発メモリ23に記憶された車両データの最後のアドレスを、ポインタとして次回の書き込みのためRAM21等に保持しておく。   The vehicle data writing unit 35 writes the vehicle data stored in the RAM 21 into the nonvolatile memory 23. Specifically, the vehicle data is written from the address next to the address where the vehicle data was written last. The last address of the vehicle data stored in the nonvolatile memory 23 is held in the RAM 21 or the like for the next writing as a pointer.

〔動作手順〕
図5は、本実施例の車両データ記録装置100の動作手順を示すフローチャート図の一例である。図5の手順は、例えばIG‐ON後(ハイブリッド車や電気自動車の場合はシステムの起動後)繰り返し実行される。
[Operation procedure]
FIG. 5 is an example of a flowchart showing an operation procedure of the vehicle data recording apparatus 100 of the present embodiment. The procedure of FIG. 5 is repeatedly executed after, for example, IG-ON (after a system startup in the case of a hybrid vehicle or an electric 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 event detection unit 31 has detected the occurrence of an event while collecting vehicle data before the event (S20). When the event detection unit 31 does not detect the occurrence of an event (No in S20), the vehicle data collection unit 32 continues to collect vehicle data before the event.

イベント検出部31がイベントの発生を検出した場合(S20のYes)、車両データ収集部32はイベント後の車両データを収集する(S30)。これにより、イベント発生時に記憶すべき車両データを収集できた。   When the event detection unit 31 detects the occurrence of an event (Yes in S20), the vehicle data collection unit 32 collects vehicle data after the event (S30). Thereby, the vehicle data which should be memorize | stored at the time of event occurrence was able to be collected.

空き領域判定部33は、不揮発メモリ23に車両データを記憶するために必要な空き領域があるか否かを判定する(S40)。空き領域判定部33は、ポインタにより特定した車両データの書き込み先の先頭アドレスに車両データのサイズを加えた値が、1ブロックの最後のアドレスより大きいか否かを判定する。1ブロックの大きさは固定なので、1ブロックの最後のアドレスは既知である。   The free space determination unit 33 determines whether there is a free space necessary for storing the vehicle data in the nonvolatile memory 23 (S40). The free space determination unit 33 determines whether or not a value obtained by adding the size of the vehicle data to the start address of the vehicle data write destination specified by the pointer is larger than the last address of one block. Since the size of one block is fixed, the last address of one block is known.

ブロックに空き領域がある場合(S40のYes)、車両データ書き込み部35は車両データを空き領域に書き込む(S50)。   When there is an empty area in the block (Yes in S40), the vehicle data writing unit 35 writes the vehicle data in the empty area (S50).

一方、ブロックに空き領域がない場合(S40のNo)、ブロック消去部34はブロック単位でブロックを消去する(S60)。   On the other hand, when there is no free area in the block (No in S40), the block erasing unit 34 erases the block in units of blocks (S60).

車両データ書き込み部35は、消去により生成された空き領域に車両データを書き込む(S50)。   The vehicle data writing unit 35 writes the vehicle data in the empty area generated by erasure (S50).

次に、車両データ書き込み部35は、書き込まれた車両データのサイズにしたがい、ポインタを更新する(S70)。これにより、ポインタは、不揮発メモリ23における次回の車両データの書き込み先の先頭アドレスを示す。   Next, the vehicle data writing unit 35 updates the pointer according to the size of the written vehicle data (S70). Thus, the pointer indicates the start address of the next vehicle data write destination in the nonvolatile memory 23.

このように、イベント発生後の車両データを書き込む直前に、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 nonvolatile memory 23 can be improved.

〔変形例〕
これまで説明したように、イベント発生後に1ブロック消去することで、不揮発メモリ23の使用効率を向上できた。しかし、1ブロックのサイズ(以下、ブロックサイズという)に比べ、車両データのサイズが小さいと、ブロックにデータが記憶されていない時間が長くなり使用効率の向上効果が低下する。
[Modification]
As described above, the use efficiency of the nonvolatile memory 23 can be improved by erasing one block after the occurrence of an event. However, if the size of the vehicle data is small compared to the size of one block (hereinafter referred to as the block size), the time during which no data is stored in the block becomes longer and the effect of improving the use efficiency is reduced.

図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 nonvolatile memory 23 in which vehicle data is stored across blocks. The hatched square in the figure is one vehicle data, and straddles the first block and the second block. If the block size is not an integer multiple of the vehicle data size, one vehicle data may be recorded across the blocks. Even if the size of the block is an integral multiple of the size of the vehicle data, if data other than the vehicle data is stored, one vehicle data may be recorded across the blocks.

イベントが発生し、1番目のブロックに車両データを書き込む場合、ブロック消去部34は1番目のブロックを消去するので、1番目のブロックと2番目のブロックに跨っていた車両データは一部のみが消去される。このため、1番目のブロックと2番目のブロックに跨っていた車両データに連続性がなくなり、車両データとしての有用性が低下してしまう(解析に使えなくなる)。連続性がなくなった車両データは解析に使用できないとすれば、実質的に消去された場合と同様に不揮発メモリ23の使用効率を低下させてしまう。   When an event occurs and vehicle data is written to the first block, the block erasure unit 34 erases the first block, so only a part of the vehicle data straddling the first block and the second block is present. Erased. For this reason, the continuity is lost in the vehicle data straddling the first block and the second block, and the usefulness as vehicle data is reduced (cannot be used for analysis). If the vehicle data whose continuity is lost cannot be used for analysis, the use efficiency of the nonvolatile memory 23 is reduced as in the case where the vehicle data is substantially deleted.

そこで、本実施例では、不揮発メモリ23に退避領域を設けておき、退避領域に1ブロック分の車両データが記憶されたら、不揮発メモリ23のブロックを消去して、退避領域の1ブロック分の車両データを書き込む車両データ記録装置100について説明する。   Therefore, in this embodiment, a non-volatile memory 23 is provided with a save area, and when one block of vehicle data is stored in the save area, the block of the non-volatile memory 23 is erased and one block of vehicles in the save area is stored. The vehicle data recording device 100 that writes data will be described.

図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 data recording apparatus 100 of the present embodiment. In FIG. 8, a save area for one block is provided. The save area is provided in the nonvolatile memory 23. A save area may be provided in the RAM 21.
(i) Since an event has occurred, the vehicle data recording device 100 collects vehicle data before and after the event occurs.
(ii) There is already no free space in the nonvolatile memory 23. For this reason, the vehicle data recording device 100 writes the vehicle data in the retreat area.
(iii) Subsequently, since an event has occurred, the vehicle data recording device 100 collects vehicle data before and after the event occurrence.
(iv) When the vehicle data recording device 100 writes the vehicle data in the evacuation area, the vehicle data recording device 100 determines whether or not the data is one block or more, and when the vehicle data of one block or more is evacuated, erases the first block. .
(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 data recording apparatus 100 of the present embodiment. 9, the same parts as those in FIG. 4 are denoted by the same reference numerals, and the description thereof is omitted.

本実施例の空き領域判定部33は、不揮発メモリ23の各ブロックへの書き込みが一巡するまで、ブロックに空き領域があるか否かを判定する。しかし、本実施例では、最後のNブロックへの書き込みが終了すると、常にブロックには空き領域がなくなるので、各ブロックへの書き込みが一巡した後は、空き領域判定部33が空き領域の有無を判定する必要がない。ただ、各ブロックへの書き込みが一巡した後も空き領域判定部33がブロックに空き領域があるか否かを判定しても不都合はない。   The free space determination unit 33 according to the present embodiment determines whether there is a free space in the block until writing to each block of the nonvolatile memory 23 is completed. However, in this embodiment, when the writing to the last N block is completed, there is always no free area in the block. Therefore, after the writing to each block is completed, the free area determination unit 33 determines whether there is a free area. There is no need to judge. However, there is no inconvenience even if the free area determination unit 33 determines whether or not there is a free area in the block even after the writing to each block is completed.

同様に、車両データ書き込み部35は、各ブロックへの書き込みが一巡するまで、車両データをブロックに書き込むが、その後、ブロックに直接、車両データを書き込むことはない。   Similarly, the vehicle data writing unit 35 writes the vehicle data to the block until the writing to each block is completed, but then does not write the vehicle data directly to the block.

各ブロックへの書き込みが一巡した後、不揮発メモリ23には空き領域がないので、本実施例では退避領域書き込み部36が退避領域に車両データを書き込む。いったん、退避領域に書き込むことで、2つのブロックに跨った車両データの一部が消去され、車両データに連続性がなくなる時間を短くできる。   After the writing to each block is completed, there is no free area in the nonvolatile memory 23. Therefore, in this embodiment, the save area writing unit 36 writes the vehicle data in the save area. Once the data is written in the save area, a part of the vehicle data straddling the two blocks is erased, and the time when the continuity of the vehicle data is lost can be shortened.

退避領域操作部37は、退避領域に1ブロック分以上の車両データが記憶されるか否かを実際に記憶する前に判定する。1ブロック分以上の車両データが記憶される場合、ブロック消去部34にブロックの消去を要求する。ブロック消去部34が1ブロックを消去すると、退避領域操作部37は退避領域の車両データ及び最新の車両データを不揮発メモリ23のブロックに書き込む。   The save area operation unit 37 determines whether or not one block or more of vehicle data is stored in the save area before actually storing it. When vehicle data for one block or more is stored, the block erasure unit 34 is requested to erase the block. When the block erasure unit 34 erases one block, the evacuation area operation unit 37 writes the vehicle data in the evacuation area and the latest vehicle data into the block of the nonvolatile memory 23.

図10は、本実施例の車両データ記録装置100の動作手順を示すフローチャート図の一例である。図10のS30までの手順は、図5と同様である。すなわち、イベント検出部31がイベントの発生を検出すると、車両データ収集部32はイベント後の車両データを収集する(S30)。これにより、イベント発生時に記憶すべき車両データを収集できた。   FIG. 10 is an example of a flowchart showing an operation procedure of the vehicle data recording apparatus 100 of the present embodiment. The procedure up to S30 in FIG. 10 is the same as that in FIG. That is, when the event detection unit 31 detects the occurrence of an event, the vehicle data collection unit 32 collects vehicle data after the event (S30). Thereby, the vehicle data which should be memorize | stored at the time of event occurrence was able to be collected.

次に、空き領域判定部33は、不揮発メモリ23に車両データを記憶するために必要な空き領域があるか否かを判定する(S40)。空き領域判定部33は、ポインタにより特定した車両データの書き込み先の先頭アドレスに車両データのサイズを加えた値が、1ブロックの最後のアドレスより大きいか否かを判定する。本実施例では1ブロックを消去しないので、不揮発メモリ23への記憶の一巡後、S40の判定はNoとなる。ブロックに空き領域がある場合(S40のYes)、車両データ書き込み部35は車両データを空き領域に書き込む(S50)。   Next, the free space determination unit 33 determines whether or not there is a free space necessary for storing the vehicle data in the nonvolatile memory 23 (S40). The free space determination unit 33 determines whether or not a value obtained by adding the size of the vehicle data to the start address of the vehicle data write destination specified by the pointer is larger than the last address of one block. Since one block is not erased in this embodiment, the determination in S40 becomes No after one round of storage in the nonvolatile memory 23. When there is an empty area in the block (Yes in S40), the vehicle data writing unit 35 writes the vehicle data in the empty area (S50).

ブロックに空き領域がない場合(S40のNo)、退避領域操作部37は、退避領域に1ブロック分以上の車両データを記憶するか否かを判定する(S110)。すなわち、実際に記録する前に、退避領域にすでに書き込まれた車両データのサイズと、これから書き込む車両データのサイズの合計が、1ブロック分か否かを判定する。書き込む前に判定することで、退避領域のサイズを1ブロック以下に抑制できる。   When there is no free area in the block (No in S40), the save area operation unit 37 determines whether or not to store vehicle data for one block or more in the save area (S110). That is, before actual recording, it is determined whether or not the sum of the size of the vehicle data already written in the save area and the size of the vehicle data to be written is one block. By determining before writing, the size of the save area can be suppressed to 1 block or less.

退避領域に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 area writing unit 36 writes the vehicle data in the empty area of the save area (S120). Further, since the block of the nonvolatile memory 23 should not be erased, the process returns to S10.

退避領域に合計で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 block erasing unit 34 erases one block of the nonvolatile memory 23 in units of blocks (S130).

次に、退避領域操作部37は退避領域の車両データを、消去したブロックに複写する(S140)。   Next, the evacuation area operation unit 37 copies the vehicle data in the evacuation area to the erased block (S140).

そして、RAM21に保持している、最新の車両データを、車両データ書き込み部35が消去したブロックに書き込む(S150)。   Then, the latest vehicle data held in the RAM 21 is written into the block erased by the vehicle data writing unit 35 (S150).

退避領域操作部37は退避領域の車両データを消去する(S160)。   The evacuation area operation unit 37 deletes the vehicle data in the evacuation area (S160).

車両データ書き込み部35は、車両データを書き込んだサイズにしたがい、ポインタを更新する(S70)。これにより、ポインタは、不揮発メモリ23における次回の車両データの書き込み先の先頭アドレスを示す。   The vehicle data writing unit 35 updates the pointer according to the size in which the vehicle data is written (S70). Thus, the pointer indicates the start address of the next vehicle data write destination in the nonvolatile memory 23.

このように、退避領域を設けることで、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 nonvolatile memory 23 is erased for one block, the save area and the vehicle data cannot be stored in one block of the nonvolatile memory 23.

そこで、このような場合、退避領域操作部37は退避領域と最新の車両データで合計1ブロック分を不揮発メモリ23に書き込む。そして、最新の車両データのうち不揮発メモリ23の1ブロックに記憶可能な1ブロック分だけ記憶しておき、1ブロックの超過分は退避メモリに記憶しておけばよい。こうすることで、退避領域は1ブロックしかなくても、1ブロックを超過した分の車両データに対応できる。   In such a case, the save area operation unit 37 writes a total of one block into the nonvolatile memory 23 using the save area and the latest vehicle data. Then, only one block that can be stored in one block of the nonvolatile memory 23 among the latest vehicle data is stored, and the excess of one block may be stored in the save memory. In this way, even if there is only one block in the evacuation area, it is possible to deal with vehicle data that exceeds one block.

または、図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 RAM 21 can be temporarily stored in the save area using the fact that the save area has two blocks.

退避領域に記憶された車両データのサイズが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 area operation unit 37 writes one block of the save area in the nonvolatile memory 23. The excess of one block is stored in the second save memory.

退避領域操作部37は次回の車両データは2番目の退避メモリに続けて記憶し、2番目の退避領域に空き領域がなくなると1番目の退避領域に記憶する。すなわち、退避領域もリングバッファのように使用される。こうすることで、退避領域は2ブロック必要になるが、車両データの書き込み処理を図11(a)よりも簡易化することができる。   The save area operation unit 37 stores the next vehicle data in the second save memory, and stores the next vehicle data in the first save area when there is no more free area in the second save area. That is, the save area is also used like a ring buffer. By doing this, two blocks are required for the save area, but the vehicle data writing process can be simplified as compared with FIG.

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-vehicle network 21 RAM
22 ROM
23 Non-volatile memory 24 Microcomputer 25 OS / CAN driver 100 Vehicle data recording device

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.
消去単位ブロックのサイズは、車両データのサイズの整数倍である、ことを特徴とする請求項1記載の情報処理装置。   2. The information processing apparatus according to claim 1, wherein the size of the erasure unit block is an integral multiple of the size of the vehicle data. 前記不揮発メモリはフラッシュメモリであり、前記車両データ一次記憶手段は揮発性のランダムアクセスメモリである、ことを特徴とする請求項1〜4いずれか1項記載の情報処理装置。   The information processing apparatus according to any one of claims 1 to 4, wherein the nonvolatile memory is a flash memory, and the vehicle data primary storage means is a volatile random access memory. 予め定められた車両状況が検出されると車両データを不揮発性のリングバッファに記憶する情報処理装置のデータ記録方法において、
車両データ収集手段が、前記車両状況が検出された前後の車両データを収集し、車両データ一次記憶手段に一次記憶させるステップと、
データ書き込み手段が、前記車両データ一次記憶手段に記憶された車両データを、前記リングバッファの最後尾の車両データに続いて書き込むステップと、
車両データのサイズ以上の空き領域がなくなった場合、データ消去手段が、前記車両状況が検出されるまで、最も古い車両データが記憶されている消去単位ブロックの車両データを保持し、前記車両状況が検出されたことを契機に最も古い車両データが記憶されている消去単位ブロックの車両データを消去するステップと、
ことを特徴とするデータ記録方法。
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.
JP2011214782A 2011-09-29 2011-09-29 Information processor and data recording method Withdrawn JP2013073609A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (1)

* Cited by examiner, † Cited by third party
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