[go: up one dir, main page]

JP2008077780A - Recording apparatus, recording method and recording program, recording / reproducing apparatus, recording / reproducing method, recording / reproducing program, and imaging apparatus - Google Patents

Recording apparatus, recording method and recording program, recording / reproducing apparatus, recording / reproducing method, recording / reproducing program, and imaging apparatus Download PDF

Info

Publication number
JP2008077780A
JP2008077780A JP2006256723A JP2006256723A JP2008077780A JP 2008077780 A JP2008077780 A JP 2008077780A JP 2006256723 A JP2006256723 A JP 2006256723A JP 2006256723 A JP2006256723 A JP 2006256723A JP 2008077780 A JP2008077780 A JP 2008077780A
Authority
JP
Japan
Prior art keywords
recording
data
written
recording medium
writing
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.)
Pending
Application number
JP2006256723A
Other languages
Japanese (ja)
Inventor
Ryogo Ito
亮吾 伊藤
Hiroshi Shimono
浩 下野
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2006256723A priority Critical patent/JP2008077780A/en
Publication of JP2008077780A publication Critical patent/JP2008077780A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)

Abstract

【課題】 ハードディスクなどに記録を行う際に、振動や衝撃、落下などによる記録エラーが発生してもデータの記録が継続可能とし、記録エラー発生時の記録データが失われることを防ぐようにする。
【解決手段】 ハードディスクに対してデータを記録中に、振動や衝撃、落下などで記録処理がタイムアウトし記録エラーになると、データの記録先がハードディスクから不揮発性メモリに切り換えられ、データの記録が継続される。不揮発性メモリに書き込まれたデータは、例えばハードディスクの再生時など所定のタイミングで、ハードディスクに対して書き戻される。書き戻しが成功すると、不揮発性メモリ内の書き戻されたデータが削除される。
【選択図】 図7
PROBLEM TO BE SOLVED: To make it possible to continue data recording even when a recording error occurs due to vibration, impact, drop or the like when recording on a hard disk or the like, and to prevent the recording data from being lost when the recording error occurs. .
When data is being recorded on a hard disk, if the recording process times out due to vibration, impact, drop, etc. and a recording error occurs, the data recording destination is switched from the hard disk to the non-volatile memory, and data recording continues. Is done. Data written to the nonvolatile memory is written back to the hard disk at a predetermined timing, for example, when the hard disk is played back. When the write-back is successful, the written-back data in the nonvolatile memory is deleted.
[Selection] Figure 7

Description

この発明は、ハードディスクといったランダムアクセス可能なディスク状記録媒体に対する落下や振動、衝撃などにより記録エラーが発生した場合に、記録処理を継続可能とすると共に、記録エラーによる記録データの損失が無いようにした記録装置、記録方法および記録プログラム、記録再生装置、記録再生方法および記録再生プログラム、ならびに、撮像装置に関する。   According to the present invention, when a recording error occurs due to a drop, vibration, impact, or the like on a randomly accessible disk-shaped recording medium such as a hard disk, the recording process can be continued and recording data is not lost due to the recording error. The present invention relates to a recording apparatus, a recording method and a recording program, a recording / reproducing apparatus, a recording / reproducing method, a recording / reproducing program, and an imaging apparatus.

ランダムアクセス可能なディスク状記録媒体の一つであるハードディスクは、記録容量が大きくアクセス速度が高速であることから、コンピュータ装置などの記録媒体として従来から多く用いられていた。近年では、ハードディスクの小型化および大容量化に伴い、携帯用のビデオカメラやオーディオ機器などの記録媒体としての需要も、大幅に伸びている。   A hard disk, which is one of random-accessible disk-shaped recording media, has been widely used as a recording medium for computer devices and the like because of its large recording capacity and high access speed. In recent years, with the miniaturization and increase in capacity of hard disks, the demand for recording media such as portable video cameras and audio devices has also increased significantly.

ハードディスクでは、一般的に、ディスク表面に対してヘッドを近接させ、ディスクを高速に回転させると共にヘッドをディスクの径方向に移動させながらディスク上のアドレスにアクセスして、ディスクに対するデータの記録や、ディスクに記録されたデータの再生を行う。   Generally, in a hard disk, the head is brought close to the disk surface, the disk is rotated at a high speed and the head is moved in the radial direction of the disk to access the address on the disk, and data recording to the disk is performed. Play data recorded on the disc.

ハードディスクは、アクセスが機構的に行われるため、落下や振動、衝撃よりアクセスエラーを起こす可能性がある。すなわち、アクセス中のハードディスクに対して所定量以上の振動や衝撃、加速度が加えられると、ヘッドが例えばディスク面から所定距離以上離れる、ヘッドとディスクとが接触するなどにより、アクセス不能状態に陥ったり、ヘッドおよび/またはディスクを破損してしまうことがある。例えば、ハードディスク装置に振動などを検知するためのセンサを設け、所定量以上の振動を検知すると、記録再生を停止させてヘッドを安全領域に移動させることで、ヘッドとディスクの接触によるヘッドおよび/またはディスクの破損を避けるようにしたものもある。   Since hard disks are accessed mechanically, access errors may occur due to dropping, vibration, and shock. In other words, if a predetermined amount of vibration, shock, or acceleration is applied to the hard disk being accessed, the head may become inaccessible due to, for example, the head moving away from the disk surface by a predetermined distance or contacting the head and the disk. The head and / or the disk may be damaged. For example, a sensor for detecting vibration or the like is provided in a hard disk device, and when a predetermined amount or more of vibration is detected, recording / reproduction is stopped and the head is moved to a safe area. Others try to avoid disc damage.

再生中にアクセスエラーが生じると、データの再生が中断されてしまうことになる。そこで、従来から、ハードディスクに記録されているデータを再生する際に、再生すべきデータの所定量を予めハードディスクから読み出してバッファリングしておくことで、ハードディスクからのデータの再生が途切れた場合に対処することが行われていた。例えば、ビデオデータの場合、ハードディスクに記録されたビデオデータを、再生時刻に対して所定時間分先のデータまでをハードディスクから先読みして、メモリに溜め込むようにする。   If an access error occurs during reproduction, data reproduction is interrupted. Therefore, conventionally, when playing back data recorded on the hard disk, if the playback of data from the hard disk is interrupted by pre-reading and buffering a predetermined amount of data to be played back from the hard disk It was done to deal with. For example, in the case of video data, the video data recorded on the hard disk is prefetched from the hard disk up to a predetermined time ahead of the reproduction time and stored in the memory.

また、ハードディスクは、ヘッドのシーク動作によってもアクセスが中断されてしまうことがある。特許文献1には、シーク動作に伴い発生する再生中断を回避するために、シークによるアクセスが必要となる箇所の先頭部分のデータを所定データ量だけメモリに保持し、シークによりディスク状記録媒体からのデータ再生が困難な期間の間、このメモリに保持したデータを出力するようにした技術が記載されている。
特開2003−125358号公報
Also, access to the hard disk may be interrupted by the seek operation of the head. In Patent Document 1, in order to avoid a reproduction interruption that occurs during a seek operation, a predetermined amount of data is held in a memory by a predetermined amount of data at a location where access by seek is required, and a seek is performed from a disc-shaped recording medium. A technique is described in which data held in this memory is output during a period in which data reproduction is difficult.
JP 2003-125358 A

ここで、略リアルタイムに供給される、ビデオデータやオーディオデータといった時間的に連続するストリームデータを、ハードディスクに対して記録する場合について考える。記録時も、再生時と同様に、記録中のハードディスクに一定量以上の振動や衝撃が加えられた場合、記録エラーが発生する可能性がある。従来では、記録中に記録エラーが発生した場合は記録を停止するしかなく、エラーにより記録できなかったデータを復帰させる方法がなかったという問題点があった。   Here, consider a case in which temporally continuous stream data such as video data and audio data supplied in substantially real time is recorded on a hard disk. During recording, a recording error may occur if a certain amount of vibration or impact is applied to the hard disk during recording, as in playback. Conventionally, when a recording error occurs during recording, recording has to be stopped, and there has been a problem that there has been no method for restoring data that could not be recorded due to the error.

特に、携帯用のビデオカメラの記録媒体としてハードディスクを用いた場合に、落下や振動、衝撃などで記録が停止してしまうと、撮影自体がその時点で中断されてしまい、撮影を再び再開するまでの間の貴重な撮影チャンスを逸してしまうという問題点があった。   In particular, when a hard disk is used as a recording medium for a portable video camera, if the recording stops due to dropping, vibration, impact, etc., the shooting itself will be interrupted at that point until the shooting is resumed. There was a problem of missing a precious photo opportunity between the two.

また、撮影が中断された時点における、唯一無二の撮影タイミングで撮影されたデータが失われることになり、ビデオカメラの機能として問題があった。   In addition, when the shooting is interrupted, data shot at a unique shooting timing is lost, and there is a problem as a function of the video camera.

なお、記録時には、ディスク状記録媒体が未記録の状態であったり、十分な空き容量が存在する場合には、データを媒体上の連続したアドレスに記録することができ、シークによる問題は生じにくいものと考えられる。   During recording, if the disc-shaped recording medium is unrecorded or has a sufficient free space, data can be recorded at consecutive addresses on the medium, and a problem due to seek is unlikely to occur. It is considered a thing.

したがって、この発明の目的は、ハードディスクといったディスク状記録媒体を用いた場合に、落下や振動、衝撃などによる記録エラーが発生してもデータの記録が継続されると共に、記録エラー発生時の記録データが失われることを防ぐことができるようにした記録装置、記録方法および記録プログラム、記録再生装置、記録再生方法および記録再生プログラム、ならびに、撮像装置を提供することにある。   Accordingly, an object of the present invention is to continue recording data even when a recording error occurs due to dropping, vibration, impact, etc. when using a disk-shaped recording medium such as a hard disk, and to record data when a recording error occurs. It is an object to provide a recording apparatus, a recording method and a recording program, a recording / reproducing apparatus, a recording / reproducing method, a recording / reproducing program, and an imaging apparatus that can prevent loss of image data.

第1の発明は、上述した課題を解決するために、ディスク状記録媒体にデータを記録する記録装置において、書き込み要求されたデータをディスク状記録媒体に書き込む記録部と、ディスク状記録媒体に対する書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断部と、記録部によるディスク状記録媒体に対するデータの書き込みを制御する制御部とを有し、制御部は、判断部により書き込み要求されたデータの書き込みが正常に行われないと判断された場合に、書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、書き込み要求されたデータの管理情報を作成し保持するようにしたことを特徴とする記録装置である。   In order to solve the above-described problems, a first invention provides a recording apparatus for recording data on a disk-shaped recording medium, a recording unit for writing the requested data to the disk-shaped recording medium, and writing to the disk-shaped recording medium A determination unit that determines whether or not the requested data is normally written; and a control unit that controls writing of data to the disk-shaped recording medium by the recording unit. When it is determined that the requested data cannot be written normally, the requested data is written to a non-volatile storage medium, and management information for the requested data is created and retained. This is a recording apparatus.

また、第2の発明は、ディスク状記録媒体にデータを記録する記録方法において、書き込み要求されたデータをディスク状記録媒体に書き込む記録のステップと、ディスク状記録媒体に対する書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断のステップと、記録のステップによるディスク状記録媒体に対するデータの書き込みを制御する制御のステップとを有し、制御のステップは、判断のステップにより書き込み要求されたデータの書き込みが正常に行われないと判断された場合に、書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、書き込み要求されたデータの管理情報を作成し保持するようにしたことを特徴とする記録方法である。   According to a second aspect of the present invention, in a recording method for recording data on a disk-shaped recording medium, a recording step of writing the data requested to be written to the disk-shaped recording medium, and writing of the data requested to be written to the disk-shaped recording medium A determination step for determining whether or not the recording is normally performed, and a control step for controlling the writing of data to the disc-shaped recording medium by the recording step. The control step is a write request according to the determination step. When it is determined that writing of the requested data is not performed normally, the requested data is written to the nonvolatile storage medium, and management information of the requested data is created and maintained. Is a recording method characterized by the above.

また、第3の発明は、ディスク状記録媒体にデータを記録する記録方法をコンピュータ装置に実行させる記録プログラムにおいて、記録方法は、書き込み要求されたデータをディスク状記録媒体に書き込む記録のステップと、ディスク状記録媒体に対する書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断のステップと、記録のステップによるディスク状記録媒体に対するデータの書き込みを制御する制御のステップとを有し、制御のステップは、判断のステップにより書き込み要求されたデータの書き込みが正常に行われないと判断された場合に、書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、書き込み要求されたデータの管理情報を作成し保持するようにした記録方法をコンピュータ装置に実行させることを特徴とする記録プログラムである。   According to a third aspect of the present invention, there is provided a recording program for causing a computer apparatus to execute a recording method for recording data on a disk-shaped recording medium. The recording method includes a recording step of writing data requested to be written to the disk-shaped recording medium; A determination step for determining whether or not the data requested to be written to the disk-shaped recording medium is normally written, and a control step for controlling the data writing to the disk-shaped recording medium in the recording step. The control step writes the write-requested data to the nonvolatile storage medium and the write-requested data when it is determined that the write-requested data is not normally written by the determination step. A recording method for creating and storing management information for a computer A recording program for causing executed.

また、第4の発明は、ディスク状記録媒体にデータを記録し、ディスク状記録媒体からデータを再生する記録再生装置において、書き込み要求されたデータをディスク状記録媒体に書き込む記録部と、ディスク状記録媒体に書き込まれたデータを読み出し要求に基づき再生する再生部と、ディスク状記録媒体に対する書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断部と、記録部によるディスク状記録媒体に対するデータの書き込みと、再生部によるディスク状記録媒体からのデータの再生とを制御する制御部とを有し、制御部は、判断部により書き込み要求されたデータの書き込みが正常に行われないと判断された場合に、書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、書き込み要求されたデータの管理情報を作成し保持するようにしたことを特徴とする記録再生装置である。   According to a fourth aspect of the present invention, there is provided a recording / reproducing apparatus for recording data on a disk-shaped recording medium and reproducing the data from the disk-shaped recording medium, a recording unit for writing the requested data to the disk-shaped recording medium, A reproducing unit that reproduces data written on a recording medium based on a read request, a determination unit that determines whether or not the data requested to be written to the disc-shaped recording medium is normally written, and a disc-like unit by the recording unit A controller that controls the writing of data to the recording medium and the reproduction of data from the disk-shaped recording medium by the reproducing unit, and the control unit normally writes the data requested to be written by the judging unit. If it is determined that the data is not written, the requested write data is written to the non-volatile storage medium and the write request is issued. A recording and reproducing apparatus being characterized in that creates management information of the data so as to retain.

また、第5の発明は、ディスク状記録媒体にデータを記録し、ディスク状記録媒体からデータを再生する記録再生方法において、書き込み要求されたデータをディスク状記録媒体に書き込む記録のステップと、ディスク状記録媒体に書き込まれたデータを読み出し要求に基づき再生する再生のステップと、ディスク状記録媒体に対する書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断のステップと、記録のステップによるディスク状記録媒体に対するデータの書き込みと、再生のステップによるディスク状記録媒体からのデータの再生とを制御する制御のステップとを有し、制御のステップは、判断のステップにより書き込み要求されたデータの書き込みが正常に行われないと判断された場合に、書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、書き込み要求されたデータの管理情報を作成し保持するようにしたことを特徴とする記録再生方法である。   According to a fifth aspect of the present invention, there is provided a recording / reproducing method for recording data on a disk-shaped recording medium and reproducing the data from the disk-shaped recording medium. A reproduction step for reproducing the data written on the recording medium based on the read request, a determination step for determining whether or not the writing of the requested data to the disk recording medium is performed normally, and a recording step A step of controlling data writing to the disk-shaped recording medium by the step and a step of controlling data reproduction from the disk-shaped recording medium by the step of reproducing, the control step being requested to be written by the step of judging When it is determined that data writing is not performed normally, a write request is issued. And writes to the nonvolatile storage medium data, a recording and reproducing method is characterized in that so as to retain creates management information of the write requested data.

また、第6の発明は、ディスク状記録媒体にデータを記録し、ディスク状記録媒体からデータを再生する記録再生方法をコンピュータ装置に実行させる記録再生プログラムにおいて、記録再生方法は、書き込み要求されたデータをディスク状記録媒体に書き込む記録のステップと、ディスク状記録媒体に書き込まれたデータを読み出し要求に基づき再生する再生のステップと、ディスク状記録媒体に対する書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断のステップと、記録のステップによるディスク状記録媒体に対するデータの書き込みと、再生のステップによるディスク状記録媒体からのデータの再生とを制御する制御のステップとを有し、制御のステップは、判断のステップにより書き込み要求されたデータの書き込みが正常に行われないと判断された場合に、書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、書き込み要求されたデータの管理情報を作成し保持するようにした記録再生方法をコンピュータ装置に実行させることを特徴とする記録再生プログラムである。   According to a sixth aspect of the present invention, there is provided a recording / reproducing program for causing a computer apparatus to execute a recording / reproducing method for recording data on a disk-shaped recording medium and reproducing the data from the disk-shaped recording medium. The recording step for writing data to the disk-shaped recording medium, the reproduction step for reproducing the data written on the disk-shaped recording medium based on the read request, and the writing of the requested data to the disk-shaped recording medium are performed normally. A determination step for determining whether or not the recording is performed, and a control step for controlling data writing to the disk-shaped recording medium by the recording step and data reproduction from the disk-shaped recording medium by the reproducing step. In the control step, the data requested to be written by the decision step A recording / reproducing method for writing data requested to be written to a nonvolatile storage medium and creating and maintaining management information for the data requested to be written when it is determined that the writing of the data is not normally performed. A recording / reproducing program executed by a computer device.

また、第7の発明は、撮像部で被写体を撮像して得られたビデオデータをディスク状記録媒体に記録し、ディスク状記録媒体からビデオデータを再生する撮像装置において、被写体を撮像してビデオデータを出力する撮像部と、書き込み要求されたビデオデータをディスク状記録媒体に書き込む記録部と、ディスク状記録媒体に書き込まれたビデオデータを読み出し要求に基づき再生する再生部と、ディスク状記録媒体に対する書き込み要求されたビデオデータの書き込みが正常に行われるか否かを判断する判断部と、記録部によるディスク状記録媒体に対するビデオデータの書き込みと、再生部によるディスク状記録媒体からのビデオデータの再生とを制御する制御部とを有し、制御部は、判断部により書き込み要求されたビデオデータの書き込みが正常に行われないと判断された場合に、書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、書き込み要求されたビデオデータの管理情報を作成し保持するようにしたことを特徴とする撮像装置である。   According to a seventh aspect of the present invention, there is provided an imaging apparatus for recording video data obtained by imaging an object by an imaging unit on a disk-shaped recording medium and reproducing the video data from the disk-shaped recording medium. An imaging unit that outputs data, a recording unit that writes video data requested to be written to a disk-shaped recording medium, a reproducing unit that reproduces video data written to the disk-shaped recording medium based on a read request, and a disk-shaped recording medium A determination unit that determines whether or not the video data requested to be written is normally written, writing of video data to the disk-shaped recording medium by the recording unit, and video data from the disk-shaped recording medium by the reproducing unit A control unit for controlling reproduction, and the control unit is configured to store the video data requested to be written by the determination unit. When it is determined that the writing is not normally performed, the write requested data is written to a non-volatile storage medium, and the management information of the requested video data is created and held. It is an imaging device.

上述したように、この発明は、書き込み要求されたデータをディスク状記録媒体に書き込む際に、書き込み要求されたデータの書き込みが正常に行われるか否かを判断し、判断結果に基づき書き込み要求されたデータの書き込みが正常に行われないと判断された場合に、書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、書き込み要求されたデータの管理情報を作成し保持するようにしているため、ディスク状記録媒体に対する書き込み要求されたデータの書き込みが正常に行われない場合でも、書き込み要求によるデータの書き込み処理を継続することができる。   As described above, the present invention determines whether or not the write-requested data is normally written when the write-requested data is written to the disc-shaped recording medium, and the write request is made based on the determination result. When it is determined that the written data is not normally written, the write requested data is written to the nonvolatile storage medium, and the management information of the requested write data is created and held. Even when the data requested to be written to the disk-shaped recording medium is not normally written, the data writing process according to the write request can be continued.

この発明は、上述のように、書き込み要求されたデータをディスク状記録媒体に書き込む際に、書き込み要求されたデータの書き込みが正常に行われるか否かを判断し、判断結果に基づき書き込み要求されたデータの書き込みが正常に行われないと判断された場合に、書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、書き込み要求されたデータの管理情報を作成し保持するようにしているため、ディスク状記録媒体に対する書き込み要求されたデータの書き込みが正常に行われない場合でも、書き込み要求によるデータの書き込み処理を継続することができる効果がある。   As described above, the present invention determines whether or not the data requested to be written is normally written when the data requested to be written is written to the disc-shaped recording medium, and the request for writing is made based on the determination result. When it is determined that the written data is not normally written, the write requested data is written to the nonvolatile storage medium, and the management information of the requested write data is created and held. Even when the data requested to be written to the disk-shaped recording medium is not normally written, there is an effect that the data writing process according to the write request can be continued.

以下、この発明の実施の第1の形態について説明する。この発明では、例えばハードディスクといったディスク状記録媒体に対するデータの記録中に記録エラーが発生した際や記録エラーの発生するおそれがある場合に、記録データを不揮発性メモリなどの他の記録媒体に記憶させ、記録データを退避させるようにする。さらに、この他の記録媒体に記憶された記録データを、所定のタイミングで、ディスク状記録媒体の本来書き込まれるべき位置に書き戻すようにしている。   The first embodiment of the present invention will be described below. In the present invention, for example, when a recording error occurs during recording of data on a disk-shaped recording medium such as a hard disk or when there is a possibility of a recording error, the recording data is stored in another recording medium such as a nonvolatile memory. The recorded data is saved. Further, the recording data stored in the other recording medium is written back to the original writing position on the disc-shaped recording medium at a predetermined timing.

ディスク状記録媒体に記録データを記録中に落下や振動、衝撃などで記録エラーが発生したり、記録エラーが発生するおそれがある状況になっても記録を継続することができ、ディスク状記録媒体に対する記録エラーが発生した場合でも記録データが失われることがない。また、記録エラーに伴い不揮発性メモリなどの他の記録媒体に記憶された記録データを、後にディスク状記録媒体の所定位置に書き込むことで、恰も記録エラーが存在しなかったかの如く、ディスク状記録媒体から記録データの再生を行うことができる。   The recording can be continued even if a recording error occurs due to dropping, vibration, impact, etc. during recording of the recording data on the disk-shaped recording medium, or the recording error may occur. Even if a recording error occurs, the recorded data is not lost. In addition, recording data stored in another recording medium such as a non-volatile memory in association with a recording error is written to a predetermined position of the disk-shaped recording medium later, so that no disk error exists. Recorded data can be reproduced.

先ず、理解を容易とするために、この発明の実施の第1の形態に適用可能なファイルシステムについて、概略的に説明する。この発明の実施の第1の形態では、ファイルシステムとして、FAT(File Allocation Table)を適用する。FATは、コンピュータ装置のOS(Operating System)の一つであるWindows(登録商標)で用いられるファイルシステムであって、エントリのサイズによってFAT16やFAT32と呼ばれる。   First, in order to facilitate understanding, a file system applicable to the first embodiment of the present invention will be schematically described. In the first embodiment of the present invention, FAT (File Allocation Table) is applied as a file system. The FAT is a file system used in Windows (registered trademark) which is one of OS (Operating System) of a computer apparatus, and is called FAT16 or FAT32 depending on the size of an entry.

図1は、FATファイルシステムに基づきフォーマットされたハードディスクのデータ構造の例を示す。図1Aは、FAT16でフォーマットした例を示す。ハードディスク全体は、LBA(Logical Block Address)モードにより、0から始まるLBAという論理的な通し番号でセクタ番号が指定される。ハードディスクの先頭セクタ(LBA=0)には、マスターブートレコード(MBR)が配置される。   FIG. 1 shows an example of the data structure of a hard disk formatted based on the FAT file system. FIG. 1A shows an example formatted with FAT16. The entire hard disk is designated with a sector number by a logical serial number starting from 0 in an LBA (Logical Block Address) mode. A master boot record (MBR) is arranged in the first sector (LBA = 0) of the hard disk.

マスターブートレコードは、図2に一例が示されるように、起動コードと当該ハードディスクに対して割り当てられたパーティションの情報が記述される。図3は、マスターブートレコードにおいてパーティションの情報が記述されるパーティションテーブルの一例の構造を示す。パーティションテーブルは、パーティションに対するアクセスポインタがCHS(Cylinder/Head/Secter)モードおよびLBAモードで記述される。アクセスポインタは、CHSモードでは、開始セクタと終了セクタとで記述され、LBAモードでは、開始セクタとパーティションサイズとで記述される。   In the master boot record, as shown in FIG. 2 as an example, the activation code and the partition information assigned to the hard disk are described. FIG. 3 shows an example of the structure of a partition table in which partition information is described in the master boot record. In the partition table, an access pointer for a partition is described in a CHS (Cylinder / Head / Secter) mode and an LBA mode. The access pointer is described by a start sector and an end sector in the CHS mode, and is described by a start sector and a partition size in the LBA mode.

マスターブートレコードの次に、所定の空き領域を介してパーティションが配置される。パーティションの先頭には、パーティションブートレコード(PBR)が配置され、ディスクパラメータ、最初のファイルを読み込むためのプログラムコードなどが記述される。パーティションブートレコードに続けて、FATが記述される。FATの次には、ルートディレクトリエントリが記述される。このルートディレクトリエントリは、FATにより管理されない領域である。ルートディレクトリエントリの次からがデータ領域とされ、FATにより管理されるクラスタが並べられる。   Next to the master boot record, a partition is arranged through a predetermined free area. A partition boot record (PBR) is arranged at the head of the partition, and describes a disk parameter, a program code for reading the first file, and the like. Following the partition boot record, FAT is described. Following the FAT, a root directory entry is described. This root directory entry is an area not managed by the FAT. Next to the root directory entry is a data area, and clusters managed by the FAT are arranged.

なお、クラスタは、セクタを2n個(nは0以上の整数)集めたもので、FATにおいてデータを管理可能な最小単位である。また、1セクタのサイズは、ハードディスクの場合、512バイトが一般的に用いられる。 A cluster is a collection of 2 n sectors (n is an integer of 0 or more), and is the smallest unit that can manage data in the FAT. As for the size of one sector, 512 bytes is generally used in the case of a hard disk.

図4は、FAT16におけるディレクトリエントリの一例の構造を示す。図4において、横方向の1目盛りは、8ビットを示す。ディレクトリエントリは、1のファイルに対して、先頭から、ファイル名、拡張子名および属性情報が記述され、予約領域を介して、さらにファイルの作成時刻および作成日時、最終アクセス日時、先頭クラスタ番号(高位側)、記録時刻および日付、先頭クラスタ番号(低位側)およびファイルサイズが記述される。このファイル情報が当該ディレクトリエントリが属するパーティションに記録されるファイル数分、記述される。   FIG. 4 shows an exemplary structure of a directory entry in FAT16. In FIG. 4, one scale in the horizontal direction indicates 8 bits. In the directory entry, the file name, extension name, and attribute information are described from the top for one file, and further through the reserved area, the file creation time and creation date, the last access date, the first cluster number ( (High-order side), recording time and date, start cluster number (low-order side), and file size are described. This file information is described for the number of files recorded in the partition to which the directory entry belongs.

なお、FAT32においては、VFAT(Virtual FAT)ファイルシステムにより、最長255文字までのファイル名を指定できるようになっている。VFATシステムでは、FAT16のディレクトリエントリを拡張し、FAT16ファイルシステムと互換性のあるファイル名を保持するディレクトリエントリに加えて、長いファイル名を記録するディレクトリエントリを設けている。   In FAT32, a file name of up to 255 characters can be specified by the VFAT (Virtual FAT) file system. In the VFAT system, the directory entry of FAT16 is expanded, and a directory entry for recording a long file name is provided in addition to a directory entry for holding a file name compatible with the FAT16 file system.

図1Bは、FAT32でフォーマットした例を示す。この場合には、上述のFAT16でフォーマットした例に対して、ルートディレクトリエントリをデータ領域内に配置するようになっている点と、パーティションブートレコードの次に領域FSInfoが置かれる点とが異なっている。領域FSInfoは、空きクラスタ情報が記述される。   FIG. 1B shows an example formatted with FAT32. In this case, the difference is that the root directory entry is arranged in the data area and the area FSInfo is placed next to the partition boot record in the example formatted with the FAT16 described above. Yes. In the area FSInfo, empty cluster information is described.

FATファイルシステムは、データ領域に割り当てられたクラスタ全てと1対1で対応する要素(FATエントリ)が順番に並んだテーブルを用いて、記録領域の管理を行う。図5は、FAT32によるFATの例を示す。FAT32は、図5Aに例示されるように、1のエントリが32ビットのサイズを有する。図5A中、行および列で示されるクラスタ番号のそれぞれにFATエントリが対応付けられ、「RSV」は、予約クラスタを示し、「EOF」は、そのクラスタがファイルの終端であることを示す。FATエントリに16進表記で示される数値は、当該FATエントリで示されるクラスタに連結される次のクラスタのクラスタ番号を表している。   The FAT file system manages the recording area by using a table in which elements (FAT entries) corresponding to all the clusters assigned to the data area in a one-to-one correspondence are arranged in order. FIG. 5 shows an example of FAT by FAT32. In the FAT 32, as illustrated in FIG. 5A, one entry has a size of 32 bits. In FIG. 5A, a FAT entry is associated with each of the cluster numbers indicated by rows and columns, “RSV” indicates a reserved cluster, and “EOF” indicates that the cluster is the end of the file. The numerical value indicated in hexadecimal notation in the FAT entry represents the cluster number of the next cluster linked to the cluster indicated in the FAT entry.

FATファイルシステムでは、後述するディレクトリエントリに基づき先頭クラスタ番号を取得し、先頭クラスタ番号に基づきFATエントリを参照し、連結される次のクラスタのクラスタ番号を見つけながら、ファイルのアクセスを行う。   In the FAT file system, the first cluster number is acquired based on a directory entry described later, and the file is accessed while referring to the FAT entry based on the first cluster number to find the cluster number of the next cluster to be linked.

図5Aの例では、第1のファイルは、先頭クラスタ番号がクラスタ番号「00000007」であって、クラスタ番号「00000008」と続き、クラスタ番号「00000009」でファイル終端となる(図5B参照)。第2のファイルは、先頭クラスタ番号がクラスタ番号「0000000A」であって、クラスタ番号「0000001F」、「00000025」、「00000031」と続き、クラスタ番号「00000030」でファイル終端となる(図5C参照)。第3のファイルは、先頭クラスタ番号がクラスタ番号「0000001B」であって、クラスタ番号「00000011」、「00000012」、「00000013」、「00000014」と続き、クラスタ番号「00000003」でファイル終端となる(図5D参照)。また、第4のファイルは、先頭クラスタ番号がクラスタ番号「0000002C」であって、クラスタ番号「0000002D」、「0000002E」、「0000002F」、「00000038」、「00000039」、「0000003A」と続き、クラスタ番号「0000003B」でファイル終端となる(図5E参照)。   In the example of FIG. 5A, the first file has a cluster number “00000007” as the first cluster number, followed by the cluster number “00000008”, and ends with the cluster number “00000009” (see FIG. 5B). In the second file, the first cluster number is the cluster number “0000000A”, followed by the cluster numbers “0000001F”, “00000025”, “00000031”, and the end of the file is the cluster number “00000030” (see FIG. 5C). . The third file has a cluster number “0000001B” as the first cluster number, followed by the cluster numbers “00000011”, “00000012”, “00000013”, “00000014”, and ends with the cluster number “00000003” ( See FIG. 5D). In the fourth file, the first cluster number is the cluster number “0000002C”, the cluster numbers “0000002D”, “0000002E”, “0000002F”, “00000038”, “00000009”, “0000003A”, and so on. The number “0000003B” is the end of the file (see FIG. 5E).

図6は、上述したファイルシステムを実現するための一例のアーキテクチャを示す。アプリケーション部10、ファイルシステム部11およびデバイスドライバ部12は、ホストCPU(Central Processing Unit)上で動作するプログラムである。記録媒体13は、ハードディスクや不揮発性メモリなどのハードウェアである。ファイルシステム部11は、例えばホストCPU上で動作するOS(Operating System)に含まれる。アプリケーション部10は、このOS上で動作するソフトウェアである。OSは、デバイスドライバ部12を介して、アプリケーション部10と記録媒体13との間の仲介を行う。   FIG. 6 shows an example architecture for realizing the above-described file system. The application unit 10, the file system unit 11, and the device driver unit 12 are programs that operate on a host CPU (Central Processing Unit). The recording medium 13 is hardware such as a hard disk or a nonvolatile memory. The file system unit 11 is included in, for example, an OS (Operating System) operating on the host CPU. The application unit 10 is software that operates on the OS. The OS mediates between the application unit 10 and the recording medium 13 via the device driver unit 12.

なお、ハードディスクは、一般的には、記録媒体そのものであるハードディスク本体と、ハードディスクを駆動するためのドライブ装置とからなるハードディスクドライブ(HDD)として用いられる。   Note that the hard disk is generally used as a hard disk drive (HDD) including a hard disk body that is a recording medium itself and a drive device for driving the hard disk.

アプリケーション部10は、記録媒体13に対してファイルレベルでアクセス要求を出す。このアクセス要求は、ファイルシステム部11に渡される。ファイルシステム部11は、アプリケーション部10から渡されたファイルレベルのアクセス要求を、FATファイルシステムに基づくクラスタレベルのアクセス要求に変換する。例えば、ファイルシステム部11は、ファイルレベルのアクセス要求に基づきFATを参照してアクセスを行うクラスタ番号を取得し、取得されたクラスタ番号からLBAを計算する。このクラスタレベルのアクセス要求は、デバイスドライバ部12に渡され、実際に記録媒体13にアクセスするためのセクタレベルのアクセス要求に変換される。デバイスドライバ部12は、セクタレベルのアクセス要求を、所定のインターフェイスを介して記録媒体13に渡す。   The application unit 10 issues an access request to the recording medium 13 at the file level. This access request is passed to the file system unit 11. The file system unit 11 converts the file level access request passed from the application unit 10 into a cluster level access request based on the FAT file system. For example, the file system unit 11 acquires a cluster number to be accessed by referring to the FAT based on a file level access request, and calculates an LBA from the acquired cluster number. This cluster level access request is transferred to the device driver unit 12 and converted into a sector level access request for actually accessing the recording medium 13. The device driver unit 12 passes the sector level access request to the recording medium 13 via a predetermined interface.

アクセス要求に対するアクセス応答は、上述と逆の流れで行われる。すなわち、記録媒体13におけるセクタレベルのアクセス要求に対する応答が、セクタレベルのアクセス応答としてでバイスドライバ部12に返される。例えば、記録媒体13において、セクタに対するデータの書き込みが成功したか否か、あるいは、セクタからのデータの読み出しが成功したか否かといったセクタレベルの応答が、記録媒体13からデバイスドライバ部12に返される。   The access response to the access request is performed in the reverse flow. That is, a response to the sector level access request in the recording medium 13 is returned to the vice driver unit 12 as a sector level access response. For example, in the recording medium 13, a sector level response is returned from the recording medium 13 to the device driver unit 12, such as whether data writing to the sector is successful or data reading from the sector is successful. It is.

デバイスドライバ部12は、このセクタレベルのアクセス応答を、クラスタレベルのアクセス応答、例えばLBA単位のアクセス応答に変換してファイルシステム部11に渡す。ファイルシステム部11では、このLBAに基づきクラスタ番号を求め、FATを参照して求められたクラスタ番号に対応するファイル情報を取得する。このファイル情報に基づき、ファイルレベルのアクセス応答がファイルシステム部11からアプリケーション部10に返される。   The device driver unit 12 converts the sector level access response into a cluster level access response, for example, an LBA unit access response, and passes the response to the file system unit 11. The file system unit 11 obtains a cluster number based on the LBA, and obtains file information corresponding to the obtained cluster number by referring to the FAT. Based on this file information, a file level access response is returned from the file system unit 11 to the application unit 10.

次に、この発明の実施の第1の形態について説明する。この発明では、落下や振動、衝撃などにより、例えばハードディスクといったディスク状記録媒体に対するデータの書き込みが困難な期間に、ディスク状記録媒体に書き込むべきデータをフラッシュメモリなどの書き換え可能な不揮発性メモリに記憶および保持し、記録データの退避を行う。再生時には、ディスク状記録媒体の当該書き込み困難な期間に対応するアドレスからデータを再生する際には、記録時において当該期間に不揮発性メモリに記憶された対応するデータを再生する。   Next, a first embodiment of the present invention will be described. According to the present invention, data to be written to a disk-shaped recording medium is stored in a rewritable nonvolatile memory such as a flash memory during a period in which writing of data to the disk-shaped recording medium such as a hard disk is difficult due to dropping, vibration, impact, etc. And holds and saves the recorded data. At the time of reproduction, when data is reproduced from an address corresponding to the hard-to-write period of the disk-shaped recording medium, the corresponding data stored in the nonvolatile memory at the time of recording is reproduced.

さらに、不揮発性メモリに記憶され退避されたデータを、所定のタイミングで、ディスク状記録媒体の所定のアドレスに書き戻すことを試みる。データをディスク状記録媒体に対して書き戻すことに成功したら、不揮発性メモリに退避した当該データを不揮発性メモリから削除する。以降は、ディスク状記録媒体からの通常通りの再生が可能とされる。   Furthermore, the data stored and saved in the nonvolatile memory is tried to be written back to a predetermined address of the disk-shaped recording medium at a predetermined timing. If the data is successfully written back to the disk-shaped recording medium, the data saved in the nonvolatile memory is deleted from the nonvolatile memory. Thereafter, normal reproduction from the disk-shaped recording medium is possible.

なお、ディスク状記録媒体に書き込むべきデータを不揮発性メモリに記憶する際に、不揮発性メモリに対して当該データが書き込まれるアドレスを、ディスク状記録媒体のアドレスと対応させることで、ディスク状記録媒体と不揮発性メモリとを用いて記録または再生する際に、恰もディスク状記録媒体のみにアクセスしているように見せることができる。   When data to be written to the disk-shaped recording medium is stored in the nonvolatile memory, the address at which the data is written to the nonvolatile memory is made to correspond to the address of the disk-shaped recording medium, so that the disk-shaped recording medium And non-volatile memory can be recorded or played back, and it can appear that only the disk-shaped recording medium is accessed.

図7を用いて、より具体的に説明する。図7Aは、FAT32によりフォーマットされたハードディスクの一例のデータ構造を示し、図7Bは、不揮発性メモリの一例のアドレス空間を示す。不揮発性メモリにおいても、ハードディスクに合わせて1セクタを512バイトとし、2n個のセクタを集めたクラスタ単位でデータが管理されるようにする。 This will be described more specifically with reference to FIG. FIG. 7A shows an example data structure of a hard disk formatted by FAT32, and FIG. 7B shows an example address space of a nonvolatile memory. Even in the nonvolatile memory, one sector is set to 512 bytes in accordance with the hard disk, and data is managed in a cluster unit in which 2 n sectors are collected.

ハードディスクでは、セクタ単位でデータの書き込みがなされ、セクタへの書き込みが失敗すると、当該セクタに対して再度書き込みを行うように制御される。同一セクタに対する再書き込みを所定時間以上繰り返しても書き込みが成功しない場合、書き込み処理がタイムアウトエラーとなり、記録エラーが発生する。   In the hard disk, data is written in units of sectors, and when writing to a sector fails, control is performed so that writing to the sector is performed again. If rewriting to the same sector is repeated for a predetermined time or more and writing is not successful, the writing process results in a timeout error and a recording error occurs.

例えば、図7Aに例示されるように、アドレスLBA=X1からアドレスLBA=X2で示される範囲にデータを書き込もうとしたときに、落下や振動、衝撃などにより書き込み処理がタイムアウトしたものとする。この場合、アドレスLBA=X1からLBA=X2で示される範囲に書き込むべきデータを、不揮発性メモリのアドレスLBA=Y1からアドレスLBA=Y2の範囲に書き込み(図7B)、ハードディスクに書き込まれるべきデータを不揮発性メモリに退避させる。   For example, as illustrated in FIG. 7A, it is assumed that the writing process times out due to a drop, vibration, shock, or the like when data is to be written in the range indicated by the address LBA = X1 to the address LBA = X2. In this case, the data to be written in the range indicated by the address LBA = X1 to LBA = X2 is written in the range of the address LBA = Y1 to the address LBA = Y2 of the nonvolatile memory (FIG. 7B), and the data to be written to the hard disk is written. Save to non-volatile memory.

このとき、上位のシステムに対して、ハードディスクのアドレスLBA=X1からアドレスLBA=X2の範囲にデータの書き込みがなされているように通知する。これにより、ハードディスクに対する次の書き込みは、不揮発性メモリに対するデータの退避が行われた次のアドレスである、アドレスLBA=X3から行われることになる。   At this time, the host system is notified that data has been written in the range of hard disk address LBA = X1 to address LBA = X2. As a result, the next writing to the hard disk is performed from the address LBA = X3, which is the next address after the data is saved in the nonvolatile memory.

所定のタイミングで、不揮発性メモリに書き込まれ退避されたデータをハードディスクに書き戻すことが試みられる。すなわち、ハードディスクに対して、不揮発性メモリへのデータの退避が行われなかったとした場合に書き込まれるべきハードディスク上のアドレスに、データの書き込みが試みられる。図7の例では、ハードディスクにおいてアドレスLBA=X1からアドレスLBA=X2の範囲に書き込むように要求され不揮発性メモリのアドレスLBA=Y1からアドレスLBA=Y2の範囲に退避されたデータが、ハードディスクのアドレスLBA=X1からアドレスLBA=X2の区間に書き込まれる。不揮発性メモリに書き込まれたデータのハードディスクに対する書き戻しが成功すると、不揮発性メモリ上の当該データが削除される。   At a predetermined timing, an attempt is made to write back the data written and saved in the nonvolatile memory back to the hard disk. That is, data writing is attempted to an address on the hard disk to be written when data is not saved in the nonvolatile memory to the hard disk. In the example of FIG. 7, data that is requested to be written in the range of address LBA = X1 to address LBA = X2 in the hard disk and saved in the range of address LBA = Y1 to address LBA = Y2 of the non-volatile memory is the address of the hard disk. It is written in the section from LBA = X1 to address LBA = X2. When the data written in the nonvolatile memory is successfully written back to the hard disk, the data in the nonvolatile memory is deleted.

別の例として、不揮発性メモリのアドレスLBA=Y3からアドレスLBA=Y4の範囲のデータを、ハードディスクの対応する範囲であるアドレスLBA=X3からアドレスLBA=X4に書き戻す際の書き込み処理が失敗した場合、不揮発性メモリ上の当該データは削除されない。この場合には、ハードディスクにおけるアドレスLBA=X3からアドレスLBA=X4の間のデータにアクセスする際には、不揮発性メモリの対応するアドレスにアクセスする。   As another example, the writing process at the time of writing back the data in the range from the address LBA = Y3 to the address LBA = Y4 in the nonvolatile memory to the address LBA = X4 from the address LBA = X3 corresponding to the hard disk failed. In this case, the data on the nonvolatile memory is not deleted. In this case, when accessing data between the address LBA = X3 and the address LBA = X4 in the hard disk, the corresponding address in the nonvolatile memory is accessed.

次に、この発明の実施の第1の形態について、より詳細に説明する。図8は、この発明の実施の第1の形態に適用可能な、FATによるファイルシステムの一例の構成をより詳細に示す。なお、図8において、上述した図6と共通する部分には同一の符号を付し、詳細な説明を省略する。すなわち、図8におけるアプリケーション部10、ファイルシステム部11およびデバイスドライバ部12は、図6の説明に対応する。   Next, the first embodiment of the present invention will be described in more detail. FIG. 8 shows in more detail the configuration of an example of a FAT file system that can be applied to the first embodiment of the present invention. In FIG. 8, the same reference numerals are given to the portions common to FIG. 6 described above, and detailed description thereof is omitted. That is, the application unit 10, the file system unit 11, and the device driver unit 12 in FIG. 8 correspond to the description of FIG.

ファイルシステム部11は、記録制御部20と記録媒体制御部21とを有し、記録制御部20は、FAT制御部22、クラスタ制御部23およびディレクトリエントリ制御部24を有する。また、記録媒体制御部21は、位置算出部25を有する。   The file system unit 11 includes a recording control unit 20 and a recording medium control unit 21, and the recording control unit 20 includes a FAT control unit 22, a cluster control unit 23, and a directory entry control unit 24. The recording medium control unit 21 has a position calculation unit 25.

ここでは、2の記録媒体13Aおよび13Bが用いられ、デバイスドライバ部12は、これら記録媒体13Aおよび13Bのそれぞれに対応するデバイスドライバ12Aおよび12Bを有する。一例として、記録媒体13Aは、ハードディスクであり、記録媒体13Bは、不揮発性メモリである。   Here, two recording media 13A and 13B are used, and the device driver unit 12 has device drivers 12A and 12B corresponding to the recording media 13A and 13B, respectively. As an example, the recording medium 13A is a hard disk, and the recording medium 13B is a non-volatile memory.

なお、上述したように、ハードディスクは、記録媒体そのものであるハードディスク本体と、ハードディスクを駆動するためのドライブ装置からなるハードディスクドライブとして用いられる。また、不揮発性メモリも同様に、記録または記憶媒体そのものとしての不揮発性メモリ本体と、不揮発性メモリを電気的に駆動する駆動回路とを含む。   As described above, the hard disk is used as a hard disk drive including a hard disk body that is a recording medium itself and a drive device for driving the hard disk. Similarly, the non-volatile memory includes a non-volatile memory main body as a recording or storage medium itself, and a drive circuit that electrically drives the non-volatile memory.

デバイスドライバ12Aおよび12Bは、それぞれ所定のインターフェイスを介して記録媒体13Aおよび13Bに接続される。記録媒体13Aがハードディスクであるこの例では、デバイスドライバ12Aは、例えばATA(AT Attachment)をインターフェイスとして記録媒体13Aと接続される。デバイスドライバ部12は、記録媒体13Aおよび13Bが接続されると、対応するデバイスドライバ12Aおよび12Bによりそれぞれの記録媒体の情報を取得し、記録媒体13Aおよび記録媒体13Bをシステムにマウントする。   The device drivers 12A and 12B are connected to the recording media 13A and 13B via predetermined interfaces, respectively. In this example in which the recording medium 13A is a hard disk, the device driver 12A is connected to the recording medium 13A using, for example, ATA (AT Attachment) as an interface. When the recording media 13A and 13B are connected, the device driver unit 12 acquires information on the respective recording media by the corresponding device drivers 12A and 12B, and mounts the recording media 13A and the recording media 13B in the system.

例えば、ハードディスクである記録媒体13Aが接続されると、記録媒体13Aにアクセスするために必要な情報が記録媒体13Aから取得され、記録媒体13Aがシステムにマウントされる。一例として、デバイスドライバ12Aにより記録媒体13AからMBRが読み込まれ、パーティションテーブルに基づきパーティション情報が取得される。そして、パーティションからFATおよびディレクトリエントリが読み込まれる。このようにして記録媒体13Aの情報が取得され、ドライブ情報26としてファイルシステム部11に保持されることで、記録媒体13のシステムへのマウントが行われる。ドライブ情報26は、例えばCPUのワークメモリとしてのRAM30に記憶され、保持される。   For example, when the recording medium 13A that is a hard disk is connected, information necessary for accessing the recording medium 13A is acquired from the recording medium 13A, and the recording medium 13A is mounted in the system. As an example, the MBR is read from the recording medium 13A by the device driver 12A, and the partition information is acquired based on the partition table. Then, FAT and directory entry are read from the partition. In this way, the information on the recording medium 13A is acquired and held in the file system unit 11 as drive information 26, whereby the recording medium 13 is mounted on the system. The drive information 26 is stored and held in a RAM 30 as a work memory of the CPU, for example.

不揮発性メモリである記録媒体13Bが接続された場合も同様に、記録媒体13Bにアクセスするために必要な情報がデバイスドライバ12Bにより記録媒体13Bから取得され、ドライブ情報27としてファイルシステム部11に保持されることで、記録媒体13Bのシステムへのマウントが行われる。   Similarly, when the recording medium 13B, which is a nonvolatile memory, is connected, information necessary for accessing the recording medium 13B is acquired from the recording medium 13B by the device driver 12B and held in the file system unit 11 as drive information 27 As a result, the recording medium 13B is mounted on the system.

ファイルシステム部11の動作の一例について概略的に説明する。ファイルシステム部11は、アプリケーション部10から、例えば記録媒体13Aにファイルを書き込む書き込み要求が渡されると、ディレクトリエントリ制御部24により、書き込み要求に基づき、書き込むファイルのディレクトリエントリ情報を作成する。このとき、ディレクトリエントリ制御部24は、FAT制御部22に対してファイル書き込み可能な空きクラスタの情報を要求する。ディレクトリエントリ制御部24は、この空きクラスタ情報に基づきファイル書き込みの際の先頭クラスタ番号をクラスタ制御部23に渡す。先頭クラスタ番号は、クラスタ制御部23から位置算出部25に渡され、位置算出部25は、渡されたクラスタ番号をLBAに変換してデバイスドライバ12Aに渡す。   An example of the operation of the file system unit 11 will be schematically described. When a write request for writing a file to, for example, the recording medium 13A is passed from the application unit 10 to the file system unit 11, the directory entry control unit 24 creates directory entry information of the file to be written based on the write request. At this time, the directory entry control unit 24 requests the FAT control unit 22 for information on a free cluster in which a file can be written. The directory entry control unit 24 passes the leading cluster number at the time of file writing to the cluster control unit 23 based on the free cluster information. The leading cluster number is transferred from the cluster control unit 23 to the position calculation unit 25, and the position calculation unit 25 converts the transferred cluster number into an LBA and passes it to the device driver 12A.

アプリケーション部10からファイルシステム部11に渡された記録データは、先ず、この先頭クラスタ番号で示されるクラスタに書き込まれる。以降、クラスタ制御部23は、位置制御部25とやりとりを行いデータを書き込むクラスタのクラスタ番号を指定し、指定されたクラスタ番号が位置算出部25でLBAに変換されて記録データが当該LBAに対して書き込まれると共に、データが書き込まれたクラスタのクラスタ番号がFAT制御部22に渡され、FATに登録される。   The recording data transferred from the application unit 10 to the file system unit 11 is first written in the cluster indicated by the head cluster number. Thereafter, the cluster control unit 23 designates the cluster number of the cluster that exchanges data with the position control unit 25 and writes data, and the designated cluster number is converted into LBA by the position calculation unit 25, and the recorded data is stored in the LBA. And the cluster number of the cluster in which the data is written is transferred to the FAT control unit 22 and registered in the FAT.

このように、アプリケーション部10による記録媒体13に対するファイル単位のアクセス要求は、ファイルシステム部11において、記録制御部20でクラスタ単位のアクセス要求に変換され、さらに記録媒体制御部21でLBAに変換される。デバイスドライバ部12は、このLBAに基づき、例えばATAといった所定のプロトコルを用いたインターフェイスによるコマンドを生成し、このコマンドを記録媒体13に対して供給する。これにより、記録媒体13では、セクタ単位でのアクセスがなされる。   Thus, the file unit access request to the recording medium 13 by the application unit 10 is converted into a cluster unit access request by the recording control unit 20 in the file system unit 11 and further converted into LBA by the recording medium control unit 21. The Based on the LBA, the device driver unit 12 generates a command by an interface using a predetermined protocol such as ATA, and supplies the command to the recording medium 13. As a result, the recording medium 13 is accessed in units of sectors.

例えば、データの書き込み時には、デバイスドライバ部12において所定のインターフェイスによるライトコマンドが生成され、このライトコマンドと記録データとが、記録媒体13に対して渡される。このようにして、記録媒体13に対してセクタ単位で記録データの書き込みがなされる。   For example, when writing data, the device driver unit 12 generates a write command using a predetermined interface, and passes the write command and recording data to the recording medium 13. In this way, recording data is written to the recording medium 13 in units of sectors.

なお、実際には、RAM30の所定領域がバッファメモリとして確保され、記録データは、一旦、このバッファメモリに溜め込まれる。一例として、ファイルシステム部11は、例えばアプリケーション部10からの書き込み要求に基づき、バッファメモリを参照し記録データを書き込むためのクラスタ番号を決める。デバイスドライバ部12は、バッファメモリから記録データを読み出し、ライトコマンドと共に記録媒体13に渡す。   Actually, a predetermined area of the RAM 30 is secured as a buffer memory, and recording data is temporarily stored in the buffer memory. As an example, the file system unit 11 determines a cluster number for writing record data by referring to the buffer memory, for example, based on a write request from the application unit 10. The device driver unit 12 reads the recording data from the buffer memory and passes it to the recording medium 13 together with the write command.

図9は、この発明の実施の第1の形態による一例の記録処理を示すフローチャートである。以下では、図8における記録媒体13Aをハードディスクとし、ハードディスク13Aと記述する。また、図8における記録媒体13Bをフラッシュメモリといった書き換え可能な不揮発性メモリとし、不揮発性メモリ13Bと呼ぶ。これらハードディスク13Aおよび不揮発性メモリ13Bは、予めシステムにマウントされているものとする。また、不揮発性メモリ13Bは、予め、デバイスドライバ12Bによりハードディスク13Aと同様にセクタ単位でアクセスが可能なようにされると共に、ファイルシステム部11によりセクタに対してLBAが対応付けられ、管理される。なお、不揮発性メモリ13Bにおける1セクタのサイズは、ハードディスク13Aにおける1セクタのサイズと同一とする。   FIG. 9 is a flowchart showing an example of recording processing according to the first embodiment of the present invention. Hereinafter, the recording medium 13A in FIG. 8 is referred to as a hard disk, and is described as the hard disk 13A. Further, the recording medium 13B in FIG. 8 is a rewritable nonvolatile memory such as a flash memory, and is called a nonvolatile memory 13B. Assume that the hard disk 13A and the nonvolatile memory 13B are previously mounted in the system. The non-volatile memory 13B can be accessed in advance by the device driver 12B in units of sectors in the same manner as the hard disk 13A, and the file system unit 11 associates and manages LBAs to the sectors. . Note that the size of one sector in the nonvolatile memory 13B is the same as the size of one sector in the hard disk 13A.

このフローチャートによる各処理は、例えばシステムのOSの制御に基づきファイルシステム部11により実行される。より詳細には、ファイルシステム部11の位置算出部25において実行される。例えばアプリケーション部10によりファイルの書き込み要求が出されると、記録データがバッファメモリに所定に溜め込まれると共に、ステップS10で、書き込み処理に即したタイムアウト値が設定される。タイムアウト値は、例えば数秒乃至数十秒が設定される。タイムアウト値は、記録処理に先立ち予め設定しておいてもよい。   Each process according to this flowchart is executed by the file system unit 11 based on, for example, control of the OS of the system. More specifically, it is executed by the position calculation unit 25 of the file system unit 11. For example, when a file write request is issued by the application unit 10, recording data is stored in the buffer memory in a predetermined manner, and in step S10, a timeout value corresponding to the writing process is set. As the timeout value, for example, several seconds to several tens of seconds are set. The timeout value may be set in advance prior to the recording process.

ステップS11で、バッファに溜め込まれたNセクタ分の記録データがハードディスク13Aのセクタ番号Xで示されるセクタから書き込まれる。   In step S11, the recording data for N sectors stored in the buffer is written from the sector indicated by the sector number X of the hard disk 13A.

ハードディスク13Aへの記録データの書き込み処理は、例えば次のように行われる。ファイルシステム部11は、アプリケーション部10によるハードディスク13Aに対するファイルの記録要求に対して、上述したように、ディレクトリエントリを参照してファイル情報を作成または取得すると共に、FATを参照して記録データを書き込むクラスタ番号を取得し位置算出部25によりLBAを計算する。LBAは、デバイスドライバ12Aに渡され、ライトコマンドが生成される。デバイスドライバ12Aは、バッファメモリを制御してセクタ単位で記録データを読み出し、ハードディスク13Aに対して、指定されたセクタ番号のセクタから順次、記録データを書き込むように要求を出す。   For example, the recording data writing process to the hard disk 13A is performed as follows. In response to a file recording request from the application unit 10 to the hard disk 13A, the file system unit 11 creates or acquires file information by referring to the directory entry and writes recording data by referring to the FAT as described above. The cluster number is acquired and the position calculation unit 25 calculates the LBA. The LBA is passed to the device driver 12A, and a write command is generated. The device driver 12A controls the buffer memory to read the recording data in units of sectors, and issues a request to the hard disk 13A to write the recording data sequentially from the sector of the designated sector number.

次のステップS12で、ハードディスク13Aに対する書き込みが成功したか否かが判断される。すなわち、ステップS11における書き込み結果を示すアクセス応答が、ハードディスク13Aからデバイスドライバ12Aを介してファイルシステム部11の位置算出部25に返される。若し、書き込みが成功したと判断されれば、処理はステップS13に移行され、書き込みが成功した旨がファイルシステム部11から上位、例えばアプリケーション部10やOSに通知され、Nセクタ分の記録処理が終了される。   In the next step S12, it is determined whether or not the writing to the hard disk 13A is successful. That is, an access response indicating the write result in step S11 is returned from the hard disk 13A to the position calculation unit 25 of the file system unit 11 via the device driver 12A. If it is determined that the writing has succeeded, the process proceeds to step S13, and the fact that the writing has been successful is notified from the file system unit 11 to, for example, the application unit 10 or the OS, and recording processing for N sectors. Is terminated.

一方、若し、ステップS12でハードディスク13Aに対するNセクタ分の書き込みが成功しなかったと判断されたら、処理はステップS14に移行する。ステップS14では、書き込みが失敗したと判断された理由が、ステップS10で設定されたタイムアウト値に対するタイムアウトエラーであるか否かが判断される。例えば、ハードディスクから、インターフェイスに基づくコマンドにより書き込み失敗の理由が通知される。   On the other hand, if it is determined in step S12 that writing of N sectors to the hard disk 13A has not been successful, the process proceeds to step S14. In step S14, it is determined whether or not the reason for determining that the writing has failed is a timeout error for the timeout value set in step S10. For example, the reason for the writing failure is notified from the hard disk by a command based on the interface.

若し、ステップS14で、書き込みが失敗した理由がタイムアウトエラーではないと判断されたら、処理はステップS20に移行され、書き込みが失敗した旨がファイルシステム部11から上位、例えばアプリケーション部10やOSに通知され、Nセクタ分の記録処理が終了される。   If it is determined in step S14 that the reason why the writing has failed is not a timeout error, the process proceeds to step S20, and the fact that the writing has failed is transferred from the file system unit 11 to a higher level, for example, the application unit 10 or the OS. The recording process for N sectors is completed.

一方、ステップS14で、書き込みが失敗した理由がタイムアウトエラーであると判断されれば、処理はステップS15に移行され、不揮発性メモリ13Bの空き容量が確認される。不揮発性メモリ13Bの空き容量は、後述する退避情報(図10B参照)に基づき取得することができる。なお、この時点では、バッファに記憶されるNセクタ分の記録データは、バッファ内に保持されている。   On the other hand, if it is determined in step S14 that the reason for the write failure is a timeout error, the process proceeds to step S15, and the free capacity of the nonvolatile memory 13B is confirmed. The free capacity of the nonvolatile memory 13B can be acquired based on save information (see FIG. 10B) described later. At this point, the recording data for N sectors stored in the buffer is held in the buffer.

次のステップS16では、ステップS15で取得された不揮発性メモリ13Bの空き容量情報に基づき、ステップS12で書き込みが失敗していると判断されたNセクタ分の記録データを、不揮発性メモリ13Bに退避可能か否かが判断される。すなわち、不揮発性メモリ13BにNセクタ分以上の空き容量があれば、記録データの退避が可能であると判断できる。若し、不揮発性メモリ13BにNセクタ分のデータを書き込めるだけの空き容量が存在しない場合には、書き込みが失敗したとして処理がステップS20に移行され、書き込み失敗が上位に通知される。   In the next step S16, the recording data for N sectors determined to have failed to be written in step S12 based on the free capacity information of the nonvolatile memory 13B acquired in step S15 is saved in the nonvolatile memory 13B. It is determined whether or not it is possible. That is, if the non-volatile memory 13B has a free space of N sectors or more, it can be determined that the recording data can be saved. If there is not enough free space in the nonvolatile memory 13B to write data for N sectors, the processing is shifted to step S20 as the writing has failed, and the writing failure is notified to the upper level.

一方、ステップS16で、不揮発性メモリ13BにNセクタ分以上の空き容量が存在すると判断されたら、Nセクタ分の記録データの退避が可能であるとして処理はステップS17に移行される。ステップS17では、バッファに保持されているNセクタ分の記録データを、不揮発性メモリ13Bに対して、所定のセクタ番号Yで示されるセクタからNセクタ分、書き込む。   On the other hand, if it is determined in step S16 that the non-volatile memory 13B has free space of N sectors or more, the process proceeds to step S17, assuming that the recording data for N sectors can be saved. In step S17, the recording data for N sectors held in the buffer is written into the nonvolatile memory 13B for N sectors from the sector indicated by the predetermined sector number Y.

例えば、ファイルシステム部11は、デバイスドライバ12Bに対してNセクタ分の記録データを不揮発性メモリ13Bに書き込むためのアドレスをLBAで指定すると共に、ハードディスク13Aに対する書き込みが失敗したNセクタ分の記録データをバッファから読み出してデバイスドライバ12Bに渡す。デバイスドライバ12Bは、不揮発性メモリ13Bに対して、LBAで与えられたアドレスを変換したセクタ番号が示すセクタから、Nセクタ分の記録データを順次書き込む。   For example, the file system unit 11 designates the address for writing the recording data for N sectors in the nonvolatile memory 13B to the device driver 12B by LBA, and the recording data for N sectors for which writing to the hard disk 13A has failed. Is read from the buffer and passed to the device driver 12B. The device driver 12B sequentially writes the recording data for N sectors from the sector indicated by the sector number obtained by converting the address given by the LBA into the nonvolatile memory 13B.

このとき、位置算出部25は、デバイスドライバ部12側には、不揮発性メモリ13BのアドレスをLBAで指定し、記録制御部20側には、クラスタ制御部23で指定されたクラスタ番号での書き込みが行われているように通知する。このように位置算出部25すなわち記録媒体制御部21においてアドレス情報を制御することで、記録データを不揮発性メモリ13Bに書き込みながら、当該記録データが恰もハードディスク13Aに記録されているかのように、上位側に見せることができる。これにより、ステップS12で落下や振動、衝撃などにより書き込みが成功しなかったとされた場合でも、記録を継続させることができる。   At this time, the position calculation unit 25 designates the address of the nonvolatile memory 13B by LBA on the device driver unit 12 side, and writes the cluster number designated by the cluster control unit 23 on the recording control unit 20 side. Notify as is done. Thus, by controlling the address information in the position calculation unit 25, that is, the recording medium control unit 21, the recording data is written in the nonvolatile memory 13B, and the recording data is recorded in the hard disk 13A as if it is recorded in the upper level. Can show to the side. Thereby, even if it is determined in step S12 that writing has not succeeded due to dropping, vibration, impact, or the like, recording can be continued.

ステップS18で、不揮発性メモリ13Bに対するNセクタ分の記録データの書き込みが成功したか否かが判断される。例えば、デバイスドライバ12Bから不揮発性メモリ13Bに対するセクタ単位での書き込み要求に対する不揮発性メモリ13Bからの応答に基づき、書き込み成功の可否を判断することができる。若し、書き込みに失敗したと判断されれば、処理はステップS20に移行され、書き込みを要求されたデータの書き込みが失敗した旨が上位に通知される。   In step S18, it is determined whether or not the writing of recording data for N sectors to the nonvolatile memory 13B has succeeded. For example, based on a response from the nonvolatile memory 13B to a write request for each sector from the device driver 12B to the nonvolatile memory 13B, it is possible to determine whether the writing is successful. If it is determined that the writing has failed, the process proceeds to step S20 to notify the upper level that writing of the data requested to be written has failed.

一方、ステップS18で、Nセクタ分の記録データの不揮発性メモリ13Bへの書き込みが成功したと判断されれば、処理はステップS19に移行される。ステップS19では、ハードディスク13Aに対する書き込みが失敗したNセクタ分の記録データを不揮発性メモリ13Bに書き込んだことによる、Nセクタ分の記録データの不揮発性メモリ13Bへの退避情報を作成する。そして、退避情報が作成されると、処理はステップS13に移行され、要求されたデータの書き込みが成功した旨が上位システムに通知される。   On the other hand, if it is determined in step S18 that the recording data for N sectors has been successfully written to the nonvolatile memory 13B, the process proceeds to step S19. In step S19, information for saving the recording data for N sectors to the nonvolatile memory 13B is created by writing the recording data for N sectors for which writing to the hard disk 13A has failed to the nonvolatile memory 13B. When the save information is created, the process proceeds to step S13, and the host system is notified that the requested data has been successfully written.

上述した、ステップS10からステップS20までの一連の処理は、位置算出部25のアクセス要求単位で繰り返される。上述の例では、Nセクタ分の書き込みが完了したら、処理がステップS10またはステップS11に戻され、同様の処理により次のNセクタ分の記録データの記録がなされる。このとき、セクタ数を示しているNの値は、繰り返し毎に異なっていてよい。   The above-described series of processing from step S10 to step S20 is repeated for each access request unit of the position calculation unit 25. In the above example, when the writing for N sectors is completed, the process is returned to step S10 or step S11, and the recording data for the next N sectors is recorded by the same process. At this time, the value of N indicating the number of sectors may be different for each repetition.

図10は、ステップS19で作成される一例の退避情報を示す。この退避情報は、図10Aに例示される、ハードディスク13Aから不揮発性メモリ13Bに対して書き込みが退避された記録データの、ハードディスク13Aに本来書き込まれるべきセクタのアドレス情報(退避元情報)と、不揮発性メモリ13Bに退避して書き込まれたセクタのアドレス情報(退避先情報)とが対応付けられたエントリからなるテーブルと、図10Bに例示される、不揮発性メモリ13Bの使用容量および/または空き容量を示す情報とからなる。   FIG. 10 shows an example of save information created in step S19. The save information includes the address information (save source information) of the sector that should be originally written to the hard disk 13A of the recording data that has been written to the nonvolatile memory 13B from the hard disk 13A, as illustrated in FIG. A table including entries associated with address information (save destination information) of the sector saved and written in the volatile memory 13B, and the used capacity and / or free capacity of the nonvolatile memory 13B illustrated in FIG. 10B It consists of information indicating.

なお、図10Bの不揮発性メモリ13Bの使用容量および/または空き容量を示す情報は、例えば不揮発性メモリ13Bにおいてハードディスク13Aから退避されたデータを書き込んだ容量に基づき取得される。一例として、不揮発性メモリ13Bがハードディスク13Aから退避されたデータを書き込むことにのみ用いられる場合には、ハードディスク13Aからの記録データの退避が全く行われていない状態では、不揮発性メモリ13Bの使用容量が0となる。   Note that the information indicating the used capacity and / or free capacity of the nonvolatile memory 13B in FIG. 10B is acquired based on the capacity in which the data saved from the hard disk 13A is written in the nonvolatile memory 13B, for example. As an example, when the non-volatile memory 13B is used only for writing data saved from the hard disk 13A, the used capacity of the non-volatile memory 13B is in a state where no recorded data is saved from the hard disk 13A. Becomes 0.

退避元情報では、上述のステップS12において書き込みが成功しなかったと判断されたハードディスク13Aのアドレス情報が、開始LBAとして示され、書き込みがハードディスク13Aから不揮発性メモリ13Bに対して退避されたセクタ数が、セクタカウントとして示される。退避先情報についても同様に、上述のステップS17で不揮発性メモリ13Bへの書き込みが開始されたアドレスが開始LBAとして示され、不揮発性メモリ13Bに対して書き込まれたセクタ数が、セクタカウントとして示される。なお、ステップS12でハードディスク13Aに対して書き込みが試みられたNセクタ分の記録データが全て不揮発性メモリ13Bに退避された場合には、退避元情報と退避先情報とでセクタカウントが一致することになる。   In the save source information, the address information of the hard disk 13A determined to have been unsuccessfully written in step S12 described above is indicated as the start LBA, and the number of sectors in which the write was saved from the hard disk 13A to the nonvolatile memory 13B is indicated. , Shown as sector count. Similarly, for the save destination information, the address at which writing to the nonvolatile memory 13B is started in step S17 described above is indicated as the start LBA, and the number of sectors written to the nonvolatile memory 13B is indicated as the sector count. It is. If all the recorded data of N sectors for which writing has been attempted to the hard disk 13A in step S12 is saved in the nonvolatile memory 13B, the sector counts of the save source information and the save destination information match. become.

図10の例では、退避情報の1エントリは、2バイトのデータ長を有するエントリ番号と、退避元情報について、バイトのデータ長を有する開始LBAおよび4バイトのデータ長を有するセクタカウントと、退避先情報について、バイトのデータ長を有する開始LBAおよび4バイトのデータ長を有するセクタカウントとからなり、26バイトのデータ長を有する。すなわち、1の退避記録処理に費やされる退避情報の容量は、高々26バイトである。   In the example of FIG. 10, one entry of save information includes an entry number having a data length of 2 bytes, a start LBA having a data length of bytes, a sector count having a data length of 4 bytes, and a save source information. The previous information consists of a start LBA having a data length of bytes and a sector count having a data length of 4 bytes, and has a data length of 26 bytes. That is, the capacity of save information consumed for one save recording process is at most 26 bytes.

図10Aに示す退避情報と、図10Bに示す不揮発性メモリ13Bの空き容量に関する情報とは、それぞれ書き換え可能な不揮発性のメモリに保持される。この退避情報および空き容量情報を保持する不揮発性メモリは、ハードディスク13Aから退避した記録データを書き込む不揮発性メモリ13Bを兼用して用いてもよいし、別途、メモリを用意することもできる。以下、この退避情報および空き容量情報を保持するメモリを、退避情報保持メモリと呼ぶ。   The save information shown in FIG. 10A and the information related to the free capacity of the nonvolatile memory 13B shown in FIG. 10B are each held in a rewritable nonvolatile memory. The non-volatile memory that holds the save information and the free space information may be used also as the non-volatile memory 13B for writing the recording data saved from the hard disk 13A, or a memory may be prepared separately. Hereinafter, the memory holding the save information and the free capacity information is referred to as save information holding memory.

上述したステップS11による、バッファに溜め込まれた記録データをハードディスク13Aに書き込む処理は、ハードディスク13Aそのものと、当該ハードディスク13Aを駆動するためのドライブ装置からなるハードディスクドライブが有するキャッシュメモリの制御に応じて、図11に例示されるように、3種類の処理が考えられる。   The process of writing the recording data stored in the buffer to the hard disk 13A in step S11 described above is performed according to the control of the cache memory included in the hard disk 13A itself and the hard disk drive including the drive device for driving the hard disk 13A. As illustrated in FIG. 11, three types of processing can be considered.

すなわち、一般的にドライブハードディスクは、内部にキャッシュメモリを有し、ハードディスクドライブに対して入出力されるデータを一時的にキャッシュメモリに溜め込み、キャッシュメモリに対するデータの書き込みおよびキャッシュメモリからのデータの読み出しのタイミングを所定に制御することで、ハードディスクドライブ内におけるハードディスクに対するアクセスを、見かけ上均一化することができる。また、キャッシュメモリに溜め込まれたデータを用いることで、ハードディスクにおけるセクタ書き込みエラーやセクタ読み出しエラーに対し、ある程度、対処できる。キャッシュメモリの制御は、例えばATAといった、ハードディスクドライブのインターフェイスからのコマンドによりなされる。   That is, generally, a drive hard disk has a cache memory inside, temporarily stores data input / output to / from the hard disk drive in the cache memory, writes data to the cache memory, and reads data from the cache memory. By controlling the timing at a predetermined time, access to the hard disk in the hard disk drive can be apparently uniformized. Further, by using the data stored in the cache memory, it is possible to cope with sector write errors and sector read errors in the hard disk to some extent. The cache memory is controlled by a command from the interface of the hard disk drive such as ATA.

図11Aは、ハードディスクドライブがキャッシュメモリを持たないか、キャッシュメモリの制御を行わない場合の例である。すなわち、セクタ書き込みが開始されると、単に、バッファに溜め込まれた記録データを、ハードディスク13Aのセクタ番号Xで示されるセクタからNセクタ分、書き込む(ステップS100)。   FIG. 11A shows an example in which the hard disk drive does not have a cache memory or does not control the cache memory. That is, when sector writing is started, the recording data stored in the buffer is simply written for N sectors from the sector indicated by the sector number X of the hard disk 13A (step S100).

図11Bおよび図11Cは、ハードディスクドライブにおいてキャッシュメモリの制御を行う場合の例である。図11Bの例では、バッファに溜め込まれた記録データを、ハードディスク13Aのセクタ番号Xで示されるセクタからNセクタ分書き込み(ステップS101)、次のステップS102で、ハードディスクドライブ内のキャッシュメモリに溜め込まれているデータを、ハードディスク13Aに所定に書き込む。   FIG. 11B and FIG. 11C are examples when the cache memory is controlled in the hard disk drive. In the example of FIG. 11B, the recording data stored in the buffer is written for N sectors from the sector indicated by the sector number X of the hard disk 13A (step S101), and is stored in the cache memory in the hard disk drive in the next step S102. Is written to the hard disk 13A in a predetermined manner.

図11Cの例では、セクタ書き込みが開始されると、先ず、ハードディスクドライブ内のキャッシュメモリの使用をOFFとし(ステップS103)、ハードディスクドライブに入力される記録データをキャッシュメモリに溜め込まないようにする。そして、ハードディスクドライブに入力された記録データを、ハードディスク13Aのセクタ番号Xで示されるセクタからNセクタ分書き込む(ステップS104)。Nセクタ分の記録データの書き込みが完了したら、ハードディスクドライブ内のキャッシュメモリの使用をONとする(ステップS105)。   In the example of FIG. 11C, when sector writing is started, first, the use of the cache memory in the hard disk drive is turned off (step S103), and the recording data input to the hard disk drive is not stored in the cache memory. The recording data input to the hard disk drive is written for N sectors from the sector indicated by the sector number X of the hard disk 13A (step S104). When writing of recording data for N sectors is completed, use of the cache memory in the hard disk drive is turned on (step S105).

図11A、図11Bおよび図11Cで示した何れの場合であっても、落下や振動、衝撃などによりハードディスク13Aへの書き込み処理がタイムアウトエラーを起こす可能性は、存在する。タイムアウトエラーに対する対処方法は、これら3種類の場合に共通である。   In any of the cases shown in FIG. 11A, FIG. 11B, and FIG. 11C, there is a possibility that the writing process to the hard disk 13A causes a timeout error due to dropping, vibration, impact, or the like. The method for dealing with the timeout error is common to these three cases.

図12は、ハードディスク13Aに対して動画データファイル「M2U00001.MPG」、「M2U00002.MPG」および「M2U00003.MPG」を書き込んだ場合の一例のファイルレイアウトを示す。この図12の例では、クラスタ番号3で示されるクラスタにディレクトリエントリが書き込まれ、ディレクトリエントリに対してファイル「M2U00001.MPG」、「M2U00002.MPG」および「M2U00003.MPG」の情報がそれぞれ書き込まれる。   FIG. 12 shows an example file layout when moving image data files “M2U00001.MPG”, “M2U00002.MPG”, and “M2U00003.MPG” are written to the hard disk 13A. In the example of FIG. 12, a directory entry is written in the cluster indicated by cluster number 3, and information on files “M2U00001.MPG”, “M2U00002.MPG”, and “M2U00003.MPG” is written in the directory entry. .

例えば、ファイル「M2U00001.MPG」が、ディレクトリエントリの情報に基づき先頭クラスタ番号がクラスタ番号4とされ、クラスタ番号4からクラスタ番号Xまでの範囲に書き込まれる。   For example, the file “M2U00001.MPG” is written in the range from the cluster number 4 to the cluster number X with the top cluster number being the cluster number 4 based on the directory entry information.

次のファイル「M2U00002.MPG」は、ディレクトリエントリの情報に基づき先頭クラスタ番号がクラスタ番号X+1とされ、クラスタ番号X+1のクラスタから順次、データの書き込みがなされる。この図12の例では、このファイル「M2U00002.MPG」におけるクラスタ番号X+Nおよびクラスタ番号X+N+1で示すクラスタが、落下や振動、衝撃によるタイムアウトエラーで書き込みが行われていない。   In the next file “M2U00002.MPG”, the first cluster number is set to the cluster number X + 1 based on the directory entry information, and data is sequentially written from the cluster of the cluster number X + 1. In the example of FIG. 12, the cluster indicated by the cluster number X + N and the cluster number X + N + 1 in the file “M2U00002.MPG” is not written due to a time-out error due to dropping, vibration, or impact.

ハードディスク13Aに対する書き込みに際してタイムアウトエラーが発生すると、上述した図10のフローチャートに従い、記録データの記録先がハードディスク13Aから不揮発性メモリ13Bに切り換えられ、ハードディスク13Aのクラスタ番号X+Nおよびクラスタ番号X+N+1で示すクラスタに記録すべき記録データが、不揮発性メモリ13Bに退避される。位置算出部25は、デバイスドライバ部12には不揮発性メモリ13Bに対するLBAを指定し、上位、例えば記録制御部20には、ハードディスク13Aに書き込みがなされているような通知を行う。   When a time-out error occurs when writing to the hard disk 13A, the recording destination of the recording data is switched from the hard disk 13A to the nonvolatile memory 13B according to the flowchart of FIG. 10, and the cluster indicated by the cluster number X + N and cluster number X + N + 1 of the hard disk 13A is changed. Recording data to be recorded is saved in the nonvolatile memory 13B. The position calculation unit 25 designates the LBA for the non-volatile memory 13B in the device driver unit 12, and notifies the upper level, for example, the recording control unit 20 that the data is written in the hard disk 13A.

これにより、ハードディスク13Aにおいてクラスタ番号X+Nの先頭アドレスであるLBA=x1から、クラスタ番号X+N+1の末尾アドレスであるLBA=x2の範囲にはデータが記録されない状態とされる。 As a result, in the hard disk 13A, data is not recorded in the range from LBA = x 1 which is the head address of the cluster number X + N to LBA = x 2 which is the tail address of the cluster number X + N + 1.

以降、この例では次のクラスタからファイル「M2U00002.MPG」の終端クラスタ(クラスタ番号Y)まで、ハードディスク13Aに対して正常に書き込みがなされている。   Thereafter, in this example, data is normally written to the hard disk 13A from the next cluster to the terminal cluster (cluster number Y) of the file “M2U00002.MPG”.

この実施の第1の形態では、不揮発性メモリ13Bに退避されたデータを、所定のタイミングでハードディスク13Aに書き戻すようにしている。不揮発性メモリ13Bに退避したデータをハードディスク13Aに書き戻すタイミングとしては、例えば、(1)ハードディスク13Aに記録されたデータの読み出し時が考えられる。また、(2)システムの起動時または終了時に書き戻しを行うことが考えられる。さらに、ハードディスク13Aのシステムに対するマウント時およびアンマウント時に書き戻しを行うことが考えられる。   In the first embodiment, the data saved in the nonvolatile memory 13B is written back to the hard disk 13A at a predetermined timing. As a timing to write back the data saved in the nonvolatile memory 13B to the hard disk 13A, for example, (1) the time of reading the data recorded on the hard disk 13A can be considered. Also, (2) writing back at the time of starting or ending the system can be considered. Further, it is conceivable to perform write back when mounting or unmounting the hard disk 13A system.

例えば、ハードディスク13Aを搭載した装置を、パーソナルコンピュータといったコンピュータ装置に所定のインターフェイスで接続した際に、ハードディスク13Aをコンピュータ装置に対してマウントすることで、ハードディスク13Aをコンピュータ装置の外部記憶装置として認識させるようにできる。また、システムに電源を投入したり、電源をOFFする際に、ハードディスク13Aのシステムに対するマウント処理およびアンマウント処理が行われる。このマウント時や、マウントを解除するアンマウント時に、ハードディスク13Aに対する書き戻しを行う。ハードディスク13Aを搭載した装置と、コンピュータ装置とを接続するインターフェイスとしては、USB(Universal Serial Bus)やIEEE1394(Institute Electrical and Electronics Engineers 1394)が考えられる。   For example, when a device equipped with the hard disk 13A is connected to a computer device such as a personal computer with a predetermined interface, the hard disk 13A is mounted on the computer device, so that the hard disk 13A is recognized as an external storage device of the computer device. You can Further, when the system is turned on or turned off, the mounting process and the unmounting process for the system of the hard disk 13A are performed. At the time of this mounting or at the time of unmounting for releasing the mount, writing back to the hard disk 13A is performed. USB (Universal Serial Bus) and IEEE 1394 (Institute Electrical and Electronics Engineers 1394) are conceivable as an interface for connecting a device equipped with the hard disk 13A and a computer device.

図13および図14は、(1)の、ハードディスク13Aからデータを読み出す際に、不揮発性メモリ13Bに書き込まれた記録データをハードディスク13Aに対して書き戻す一例の処理を示すフローチャートである。なお、図13および図14において、符号「A」および「B」は、対応する符号に処理が移行することを示す。   FIGS. 13 and 14 are flowcharts showing an example of the process (1) of writing back the recording data written in the nonvolatile memory 13B to the hard disk 13A when reading data from the hard disk 13A. In FIG. 13 and FIG. 14, the symbols “A” and “B” indicate that the processing shifts to the corresponding symbols.

フローチャートの実行に先立って、例えばアプリケーション部10からファイルシステム部11に対して、ハードディスク13Aから読み出すファイル名が渡される。ファイルシステム部11は、記録制御部20において、ディレクトリエントリを参照して渡されたファイル名のエントリを検索し、当該ファイルの先頭セクタ番号を取得する。ファイルシステム部11は、記録制御部20において、さらにFATを参照し、先頭クラスタ番号のクラスタに続くクラスタのクラスタ番号を順次取得し、読み出しを行うアクセス要求を生成する。一例として、クラスタ番号が連続したクラスタに対して連続的にアクセスするように、アクセス要求が生成される。   Prior to execution of the flowchart, for example, the file name to be read from the hard disk 13A is passed from the application unit 10 to the file system unit 11. The file system unit 11 searches the entry of the file name passed with reference to the directory entry in the recording control unit 20, and acquires the head sector number of the file. The file system unit 11 further refers to the FAT in the recording control unit 20, sequentially acquires the cluster number of the cluster following the cluster of the head cluster number, and generates an access request for reading. As an example, an access request is generated so as to continuously access clusters with consecutive cluster numbers.

ステップS30で、記録媒体制御部21は、図10に例示した退避情報を参照し、アクセスが要求されたLBAをチェックする。チェックの結果、次のステップS31で、(A)アクセスが要求された範囲のLBAのデータが全て不揮発性メモリ13Bに退避されているか、(B)当該範囲のLBAのデータが全て退避されずハードディスク13Aに書き込まれているか、(C)当該範囲のうち一部のLBAのデータが不揮発性メモリ13Bに退避されているかで、処理を分岐させる。   In step S30, the recording medium control unit 21 refers to the save information illustrated in FIG. 10 and checks the LBA requested to be accessed. As a result of the check, in the next step S31, (A) all the LBA data in the range requested to be accessed is saved in the nonvolatile memory 13B, or (B) all the LBA data in the range is not saved. Processing is branched depending on whether the data is written in 13A or (C) part of LBA data in the range is saved in the nonvolatile memory 13B.

ステップS31において、(A)の、アクセスが要求された範囲のLBAのデータが全て不揮発性メモリ13Bに退避していると判断された場合、処理はステップS32に移行される。ステップS32では、退避情報に基づき不揮発性メモリ13Bに対してアクセス要求がなされ、不揮発性メモリ13Bからデータの読み出しが行われる。次のステップS33で、ステップS32でのアクセス要求に応じて不揮発性メモリ13Bから読み出されたデータの、ハードディスク13Aに対する書き戻しが試みられる。   If it is determined in step S31 that all the LBA data in the range requested for access in (A) is saved in the nonvolatile memory 13B, the process proceeds to step S32. In step S32, an access request is made to the nonvolatile memory 13B based on the save information, and data is read from the nonvolatile memory 13B. In the next step S33, an attempt is made to write back the data read from the nonvolatile memory 13B to the hard disk 13A in response to the access request in step S32.

一例として、上述した図12を参照し、ハードディスク13Aに対し、クラスタ番号X+Nおよびクラスタ番号X+N+1のクラスタの読み出しが要求された場合、退避情報に基づきハードディスク13Aのクラスタ番号X+Nの先頭アドレスであるLBA=x1からクラスタ番号X+N+1の末尾アドレスであるLBA=x2の範囲に対応するデータが全て、不揮発性メモリ13Bに退避されていることが分かる。記録媒体制御部21は、退避情報の退避先情報に基づき、ハードディスク13Aに対して読み出しが要求されたLBAに対応する、不揮発性メモリ13B上のアドレスにアクセスするようにデバイスドライバ12Bに対してアクセス要求を出す(ステップS32)。この要求に応じて、デバイスドライバ12Bにより、不揮発性メモリ13Bからデータが読み出される。読み出されたデータは、記録媒体制御部21に渡され、不揮発性メモリ13Bのアドレス情報がハードディスク13Aのアドレス情報に変換されて、上位に渡される。 As an example, referring to FIG. 12 described above, when the hard disk 13A is requested to read the cluster having the cluster number X + N and the cluster number X + N + 1, LBA = the leading address of the cluster number X + N of the hard disk 13A based on the save information It can be seen that all data corresponding to the range of LBA = x 2 which is the end address of cluster number X + N + 1 from x 1 is saved in the nonvolatile memory 13B. Based on the save destination information of the save information, the recording medium control unit 21 accesses the device driver 12B so as to access the address on the nonvolatile memory 13B corresponding to the LBA requested to be read from the hard disk 13A. A request is issued (step S32). In response to this request, the device driver 12B reads data from the nonvolatile memory 13B. The read data is transferred to the recording medium control unit 21, and the address information of the nonvolatile memory 13B is converted into the address information of the hard disk 13A and transferred to the upper level.

ステップS33では、記録媒体制御部21は、デバイスドライバ12Aに対して、ステップS32で不揮発性メモリ13Bから読み出されたデータを、退避情報の退避元情報に基づきハードディスク13AのアドレスLBA=x1からLBA=x2に書き込むように要求する。この要求に応じて、デバイスドライバ12Aにより、ハードディスク13Aに対してデータの書き込みが試みられる。 In step S33, the recording medium control unit 21, the device driver 12A, the data read from the nonvolatile memory 13B in step S32, the address LBA = x 1 hard disk 13A on the basis of the evacuation source information save information requesting to write to LBA = x 2. In response to this request, the device driver 12A attempts to write data to the hard disk 13A.

ステップS33による、ハードディスク13Aに対する書き込みが成功したか否かが、ステップS34で判断される。若し、書き込みが成功したと判断されれば、処理はステップS35に移行され、書き込みが成功した分に対応して退避情報の変更を行う。例えば、図10Aの退避情報における対応するエントリが削除されると共に、図10Bの不揮発性メモリ13Bの使用容量および/または空き容量を示す情報が変更される。   In step S34, it is determined whether or not the writing to the hard disk 13A in step S33 is successful. If it is determined that the writing is successful, the process proceeds to step S35, and the save information is changed in accordance with the amount of the writing that is successful. For example, the corresponding entry in the save information in FIG. 10A is deleted, and the information indicating the used capacity and / or free capacity of the nonvolatile memory 13B in FIG. 10B is changed.

不揮発性メモリ13Bに書き込まれたデータのハードディスク13Aに対する書き戻しが成功した場合、このように退避情報が書き換えられて、書き戻しを行ったデータに関する情報が削除される。また、不揮発性メモリ13B上の書き戻しに成功した分のデータが削除される。   When the write back of the data written in the nonvolatile memory 13B to the hard disk 13A is successful, the save information is rewritten in this way, and the information regarding the data that has been written back is deleted. Further, the data corresponding to the successful write back on the nonvolatile memory 13B is deleted.

一方、ステップS34で、例えばタイムアウトエラーやその他の原因によりハードディスク13Aに対する書き込みが失敗したと判断されれば、一連の書き戻し処理が終了され、退避情報が保持される。この場合には、上位から読み出しが要求されたデータは、不揮発性メモリ13Bから読み出されることになる。   On the other hand, if it is determined in step S34 that writing to the hard disk 13A has failed due to, for example, a time-out error or other causes, a series of write-back processing is terminated and the save information is retained. In this case, the data requested to be read from the upper level is read from the nonvolatile memory 13B.

ステップS31で、(B)の、当該範囲のLBAのデータが全て退避されずハードディスク13Aに書き込まれていると判断された場合には、処理はステップS36に移行される。この場合には、上位から指示されたアドレスをそのまま用いて、ハードディスク13Aに対して読み出しのためのアクセスがなされる。上述した図12を参照して、例えばクラスタ番号3およびクラスタ番号4で示されるクラスタをアクセスするように要求された場合、退避情報に基づきこれらのクラスタのデータが不揮発性メモリ13Bに退避されていないことが分かる。記録媒体制御部21は、上位から読み出しを要求されたクラスタ番号からLBAを算出し、デバイスドライバ12Aに渡す。   If it is determined in step S31 that all the LBA data in the range in (B) has not been saved and has been written to the hard disk 13A, the process proceeds to step S36. In this case, the hard disk 13A is accessed for reading using the address instructed from the host as it is. Referring to FIG. 12 described above, for example, when a request is made to access the cluster indicated by cluster number 3 and cluster number 4, the data of these clusters are not saved in the nonvolatile memory 13B based on the save information. I understand that. The recording medium control unit 21 calculates the LBA from the cluster number requested to be read from the host and passes it to the device driver 12A.

ステップS31で、(C)当該範囲のうち一部のLBAのデータが不揮発性メモリ13Bに退避されていると判断された場合には、処理はステップS37に移行される(図14参照)。ステップS37では、退避情報に基づき、ハードディスク13Aおよび不揮発性メモリ13Bのアクセス順序が算出される。   If it is determined in step S31 that (C) part of LBA data in the range has been saved in the nonvolatile memory 13B, the process proceeds to step S37 (see FIG. 14). In step S37, the access order of the hard disk 13A and the nonvolatile memory 13B is calculated based on the save information.

例えば、図12を参照し、上位からクラスタ番号X+N−1からクラスタ番号X+N+2までの範囲を読み出すように要求された場合について考える。退避情報に基づき、要求されたクラスタ番号X+N−1からクラスタ番号X+N+2までの範囲のうち、クラスタ番号X+Nからクラスタ番号X+N+1に対応するLBA=x1からLBA=x2の範囲において、データの不揮発性メモリ13Bへの退避が行われているのが分かる。 For example, with reference to FIG. 12, consider a case in which it is requested to read a range from cluster number X + N-1 to cluster number X + N + 2 from the top. Based on the save information, non-volatility of data in the range from LBA = x 1 to LBA = x 2 corresponding to the cluster number X + N to the cluster number X + N + 1 in the requested range from the cluster number X + N−1 to the cluster number X + N + 2. It can be seen that saving to the memory 13B is performed.

この例の場合、ステップS37において、退避情報に基づき、先ずクラスタ番号X+N−1で示されるクラスタをハードディスク13Aから読み出し、次にクラスタ番号X+Nからクラスタ番号X+N+1までのクラスタについては、不揮発性メモリ13Bの対応するアドレスからデータを読み出す。その次は、クラスタ番号X+N+2で示されるクラスタをハードディスク13Aから読み出すように、ハードディスク13Aおよび不揮発性メモリ13Bのアクセス順序を決める。   In this example, in step S37, based on the save information, the cluster indicated by the cluster number X + N−1 is first read from the hard disk 13A, and the clusters from the cluster number X + N to the cluster number X + N + 1 are stored in the nonvolatile memory 13B. Read data from the corresponding address. Next, the access order of the hard disk 13A and the nonvolatile memory 13B is determined so that the cluster indicated by the cluster number X + N + 2 is read from the hard disk 13A.

ハードディスク13Aに対するアクセス要求を行う場合には(ステップS38)、処理はステップS39に移行されてハードディスク13Aへのアクセス要求がなされ、ハードディスク13Aからデータが読み出される。そして、処理はステップS40に移行され、読み出し要求された全てのアドレスからデータが読み出されたか否かが判断される。若し、要求された全てのアドレスからデータが読み出されていないと判断されたら、処理はステップS38に戻され、次のアクセス順のアドレスに対するアクセスが行われる。   When making an access request to the hard disk 13A (step S38), the process proceeds to step S39, where an access request to the hard disk 13A is made, and data is read from the hard disk 13A. Then, the process proceeds to step S40, and it is determined whether or not data has been read from all addresses requested to be read. If it is determined that the data has not been read from all the requested addresses, the process returns to step S38, and the next access order address is accessed.

不揮発性メモリ13Bからデータを読み出す際には(ステップS38)、上述のステップS32〜ステップS35の処理と同様にして、退避情報に基づき、不揮発性メモリ13Bに対して読み出しアクセスを行い(ステップS41)、読み出されたデータをハードディスク13Aに書き戻す処理を行う(ステップS42)。ハードディスク13Aに対する書き戻しが成功したと判断されたら(ステップS43)、退避情報の対応するエントリと、不揮発性メモリ13Bの対応するデータが削除される(ステップS44)。そして、処理はステップS40に移行される。   When data is read from the non-volatile memory 13B (step S38), read access to the non-volatile memory 13B is performed based on the save information (step S41) in the same manner as in the above-described steps S32 to S35. Then, the read data is written back to the hard disk 13A (step S42). If it is determined that the write-back to the hard disk 13A is successful (step S43), the corresponding entry in the save information and the corresponding data in the nonvolatile memory 13B are deleted (step S44). Then, the process proceeds to step S40.

次に、(2)および(3)の、ハードディスク13Aのマウント時およびアンマウント時に書き戻しを行う一例の処理について、図15〜図17のフローチャートを用いて説明する。図15は、不揮発性メモリ13Bに書き込まれたデータのハードディスク13Aに対する書き戻しを、ハードディスク13Aのシステムへのマウント時に行う場合の一例の処理を示す。例えば、装置の電源を投入し、システムが起動される場合に、ハードディスク13Aのマウントが行われる。また、ハードディスク13Aを用いた装置が所定のインターフェイスでコンピュータ装置と接続され、ハードディスク13Aが当該コンピュータ装置の外部記憶装置として用いられている場合に、インターフェイスが切断された後、ハードディスク13Aを再び使用可能とさせる際に、ハードディスク13Aのマウントが行われる。   Next, an example of processing (2) and (3) in which writing back is performed when the hard disk 13A is mounted and unmounted will be described with reference to the flowcharts of FIGS. FIG. 15 shows an example of processing when data written in the nonvolatile memory 13B is written back to the hard disk 13A when the hard disk 13A is mounted on the system. For example, the hard disk 13A is mounted when the apparatus is turned on and the system is activated. In addition, when a device using the hard disk 13A is connected to a computer device through a predetermined interface and the hard disk 13A is used as an external storage device of the computer device, the hard disk 13A can be used again after the interface is disconnected. In this case, the hard disk 13A is mounted.

例えば装置の電源投入時やインターフェイス切断時に、先ず、ハードディスク13Aに関連する処理以外の所定の処理がなされ(ステップS50)、次に、ハードディスク13Aがシステムにマウントされる(ステップS51)。なお、ハードディスク13Aを用いた装置が所定のインターフェイスでコンピュータ装置に接続されハードディスク13Aが当該コンピュータ装置の外部記憶装置として用いられた後に、インターフェイスが切断される場合には、当該コンピュータ装置側において予め、所定の手順で以てハードディスク13Aのアンマウント処理が行われているものとする。   For example, when the apparatus is turned on or the interface is disconnected, first, predetermined processing other than processing related to the hard disk 13A is performed (step S50), and then the hard disk 13A is mounted on the system (step S51). In addition, when the interface is disconnected after the device using the hard disk 13A is connected to the computer device with a predetermined interface and the hard disk 13A is used as the external storage device of the computer device, the computer device side in advance It is assumed that the hard disk 13A is unmounted according to a predetermined procedure.

ハードディスク13Aがシステムにマウントされると、退避情報保持メモリが参照され、退避情報に基づき不揮発性メモリ13Bに書き込まれているデータをハードディスク13Aに書き戻す処理が行われる(ステップS52)。このステップS52の処理の詳細については、後述する。データのハードディスク13Aへの書き戻しが終了したら、ステップS53で他の所定の処理がなされる。   When the hard disk 13A is mounted on the system, the save information holding memory is referred to, and data written in the nonvolatile memory 13B is written back to the hard disk 13A based on the save information (step S52). Details of the processing in step S52 will be described later. When the data is written back to the hard disk 13A, another predetermined process is performed in step S53.

図16は、不揮発性メモリ13Bに書き込まれたデータのハードディスク13Aに対する書き戻しを、ハードディスク13Aのシステムからのアンマウント時に行う場合の一例の処理を示す。例えば、装置の電源を切断し、システムが停止される場合に、ハードディスク13Aのアンマウントが行われる。また、ハードディスク13Aを用いた装置をコンピュータ装置の外部記憶装置として用いるために、当該ハードディスク13Aを用いた装置を所定のインターフェイスで当該コンピュータ装置に接続した際に、当該ハードディスク13Aを用いた装置においてハードディスク13Aがアンマウントされる。   FIG. 16 shows an example of processing in the case where data written to the nonvolatile memory 13B is written back to the hard disk 13A when the hard disk 13A is unmounted from the system. For example, the hard disk 13A is unmounted when the apparatus is turned off and the system is stopped. Further, in order to use a device using the hard disk 13A as an external storage device of the computer device, when the device using the hard disk 13A is connected to the computer device through a predetermined interface, the hard disk in the device using the hard disk 13A is used. 13A is unmounted.

例えば装置の電源切断時やコンピュータ装置に対して所定のインターフェイスで接続された際に、先ず、バッファメモリやハードディスク13Aが有するキャッシュメモリに溜め込まれた、ハードディスク13Aに対して未書き込みの記録データがハードディスク13Aに対して所定に書き込まれ(ステップS60)、オープン中のファイルがクローズされる(ステップS61)。そして、退避情報保持メモリが参照され、退避情報に基づき不揮発性メモリ13Bに書き込まれているデータをハードディスク13Aに書き戻す処理が行われる(ステップS62)。データのハードディスク13Aに対する書き戻しが終了したら、ハードディスク13Aがシステムからアンマウントされ(ステップS63)、他の所定の処理がなされる。   For example, when the apparatus is turned off or connected to the computer apparatus through a predetermined interface, first, unrecorded recording data stored in the hard disk 13A is stored in the buffer memory or the cache memory of the hard disk 13A. 13A is written in a predetermined manner (step S60), and the open file is closed (step S61). Then, the save information holding memory is referred to, and the process of writing back the data written in the nonvolatile memory 13B to the hard disk 13A based on the save information is performed (step S62). When the data is written back to the hard disk 13A, the hard disk 13A is unmounted from the system (step S63), and other predetermined processing is performed.

図17は、図15におけるステップS52、ならびに、図16におけるステップS62による、不揮発性メモリ13Bのデータをハードディスク13Aに書き戻す一例の処理を示す。先ず、ステップS70で、退避情報保持メモリに保持されている、不揮発性メモリ13Bの使用容量および/または空き容量の情報が取得される(図10B参照)。そして、次のステップS71で、取得された使用容量および/または空き容量の情報に基づき、不揮発性メモリ13Bにハードディスク13Aから退避された記録データが書き込まれているか否かが判断される。   FIG. 17 shows an example of processing for writing back the data in the nonvolatile memory 13B to the hard disk 13A in step S52 in FIG. 15 and step S62 in FIG. First, in step S70, information on the used capacity and / or free capacity of the nonvolatile memory 13B held in the save information holding memory is acquired (see FIG. 10B). Then, in the next step S71, it is determined whether or not the recording data saved from the hard disk 13A is written in the nonvolatile memory 13B based on the acquired used capacity and / or free capacity information.

例えば、不揮発性メモリ13Bがハードディスク13Aから退避された記録データの書き込みにのみ、用いられている場合、不揮発性メモリ13Bの使用量が0であるか否かを調べる。   For example, when the nonvolatile memory 13B is used only for writing the recording data saved from the hard disk 13A, it is checked whether or not the usage amount of the nonvolatile memory 13B is zero.

若し、不揮発性メモリ13Bにハードディスク13Aから退避された記録データが書き込まれていないと判断されたら、不揮発性メモリ13Bからハードディスク13Aへのデータの書き戻しも行われず、図17のフローチャートによる処理が終了される。処理は、図15のステップS53や図16のステップS63の処理にそのまま移行されることになる。   If it is determined that the recording data saved from the hard disk 13A has not been written to the nonvolatile memory 13B, the data is not written back from the nonvolatile memory 13B to the hard disk 13A, and the process according to the flowchart of FIG. Is terminated. The processing is directly transferred to the processing in step S53 in FIG. 15 and step S63 in FIG.

一方、ステップS71で、不揮発性メモリ13Bにハードディスク13Aから退避された記録データが書き込まれていると判断されれば、処理はステップS72に移行され、不揮発性メモリ13Bに書き込まれたデータのハードディスク13Aへの書き戻しが行われる。すなわち、図13のフローチャートを用いて説明したステップS32〜ステップS35の処理と同様にして、退避情報に基づき、不揮発性メモリ13Bに対して読み出しアクセスを行い、読み出されたデータをハードディスク13Aに書き戻す処理を行う(ステップS72)。ハードディスク13Aに対する書き戻しが成功したと判断されたら、退避情報の対応するエントリと、不揮発性メモリ13Bの対応するデータが削除され(ステップS73)、図17のフローチャートによる処理が終了される。   On the other hand, if it is determined in step S71 that the recording data saved from the hard disk 13A has been written in the non-volatile memory 13B, the process proceeds to step S72, and the hard disk 13A of the data written in the non-volatile memory 13B. Is written back. That is, in the same manner as the processing of step S32 to step S35 described with reference to the flowchart of FIG. 13, based on the save information, read access is made to the nonvolatile memory 13B, and the read data is written to the hard disk 13A. Return processing is performed (step S72). If it is determined that the write-back to the hard disk 13A is successful, the corresponding entry in the save information and the corresponding data in the nonvolatile memory 13B are deleted (step S73), and the processing according to the flowchart of FIG.

次に、この発明の実施の第2の形態について説明する。この発明の実施の第2の形態は、上述した発明の実施の第1の形態を携帯用のビデオカメラ装置に適用した例である。図18は、この発明の実施の第2の形態による携帯用ビデオカメラ装置100の一例の構成を示す。   Next, a second embodiment of the present invention will be described. The second embodiment of the present invention is an example in which the first embodiment of the present invention described above is applied to a portable video camera device. FIG. 18 shows an exemplary configuration of a portable video camera apparatus 100 according to the second embodiment of the present invention.

このビデオカメラ装置100は、被写体からの光をCCD(Charge Coupled Device)やCMOS(Complementary Metal-Oxide Semiconductor)イメージセンサといった撮像素子で受光して、受光された光を光電変換により電気信号に変換し所定の処理を施してディジタルビデオデータとし、このディジタルビデオデータをハードディスクといったディスク状記録媒体に記録する。   The video camera apparatus 100 receives light from a subject with an image sensor such as a CCD (Charge Coupled Device) or a CMOS (Complementary Metal-Oxide Semiconductor) image sensor, and converts the received light into an electrical signal by photoelectric conversion. Predetermined processing is performed to obtain digital video data, and this digital video data is recorded on a disk-shaped recording medium such as a hard disk.

ディジタルビデオデータをディスク状記録媒体に記録する際に、落下や振動、衝撃によりタイムアウトエラーが発生したら、ビデオカメラ装置100が有する不揮発性メモリに記録データを書き込み、当該不揮発性メモリに記録データを退避させるようにする。不揮発性メモリに退避された記録データは、ディスク状記録媒体からディジタルビデオデータを再生する際や、ビデオカメラ装置100の電源を切断する際などに、ディスク状記録媒体に書き戻すようにする。   If a time-out error occurs due to dropping, vibration, or shock when recording digital video data on a disk-shaped recording medium, the recording data is written into the nonvolatile memory of the video camera device 100 and the recording data is saved to the nonvolatile memory. I will let you. The recording data saved in the nonvolatile memory is written back to the disk-shaped recording medium when the digital video data is reproduced from the disk-shaped recording medium or when the video camera device 100 is turned off.

また、このビデオカメラ装置100は、有線通信や無線通信により、それぞれ所定のインターフェイスを介して外部の機器と接続することができる。接続される外部の機器がパーソナルコンピュータなどのコンピュータ装置である場合には、ディジタルビデオデータが記録されるディスク状記録媒体を接続先機器にマウントし、接続先機器の外部記録媒体として用いることができるようにされている。ビデオカメラ装置100を接続先機器にマウントおよびアンマウントする際に、不揮発性メモリに退避した記録データをディスク状記録媒体に書き戻すようにする。   The video camera apparatus 100 can be connected to an external device via a predetermined interface by wired communication or wireless communication. When the connected external device is a computer device such as a personal computer, a disk-shaped recording medium on which digital video data is recorded can be mounted on the connection destination device and used as an external recording medium of the connection destination device. Has been. When the video camera device 100 is mounted and unmounted on the connection destination device, the recording data saved in the nonvolatile memory is written back to the disk-shaped recording medium.

図18において、CPU(Central Processing Unit)120は、ROM123に予め記憶されたプログラムデータに基づき、RAM121をワークメモリとして用いてこのビデオカメラ装置100の全体を制御する。CPU120は、ROM123からプログラムデータを読み出しRAM121上に展開して当該プログラムを実行する。このプログラムにより、図6および図8を用いて説明したアプリケーション部10、ファイルシステム部11およびデバイスドライバ部12が実現される。なお、図18では、CPU120とビデオカメラ装置100を構成する各部とが直接的に接続されるように示されているが、これはこの例に限らず、各部がバスに接続され、バスを介してコマンドやデータのやりとりを行うようにしてもよい。   In FIG. 18, a CPU (Central Processing Unit) 120 controls the entire video camera apparatus 100 using a RAM 121 as a work memory based on program data stored in advance in a ROM 123. The CPU 120 reads program data from the ROM 123 and develops it on the RAM 121 to execute the program. By this program, the application unit 10, the file system unit 11, and the device driver unit 12 described with reference to FIGS. 6 and 8 are realized. In FIG. 18, the CPU 120 and each part constituting the video camera device 100 are shown to be directly connected. However, this is not limited to this example, and each part is connected to a bus via the bus. It is also possible to exchange commands and data.

光学レンズ部110は、被写体からの光を光電変換部111が有する撮像素子に導くためのレンズ系、絞り調整機構、フォーカス調整機構、ズーム機構、シャッタ機構などを備え、被写体からの光を集光し光電変換部111に入射させる。絞り調整機構、フォーカス調整機構、ズーム機構、シャッタ機構は、CPU120の制御に基づきカメラ機能部115により制御される。光電変換部111は、例えばCCDやCMOSイメージセンサといった撮像素子を有し、光学レンズ部110を介して入射された光を光電変換により電気信号に変換し、さらに所定の信号処理を施し撮像信号として出力する。   The optical lens unit 110 includes a lens system for guiding light from a subject to an image sensor included in the photoelectric conversion unit 111, an aperture adjustment mechanism, a focus adjustment mechanism, a zoom mechanism, a shutter mechanism, and the like, and collects light from the subject. Then, the light is incident on the photoelectric conversion unit 111. The aperture adjustment mechanism, focus adjustment mechanism, zoom mechanism, and shutter mechanism are controlled by the camera function unit 115 based on the control of the CPU 120. The photoelectric conversion unit 111 has an imaging element such as a CCD or a CMOS image sensor, converts light incident through the optical lens unit 110 into an electrical signal by photoelectric conversion, and performs predetermined signal processing as an imaging signal. Output.

画像信号処理部112は、例えば、光電変換部111から出力された撮像信号をディジタル信号に変換する撮像信号処理部と、撮像信号処理部で撮像信号が変換されたディジタル信号に対して所定の信号処理を施すと共にベースバンドのディジタルビデオデータに変換するビデオ信号処理部と、ビデオ信号処理部で得られたベースバンドのディジタルビデオデータを所定の方式で圧縮符号化する圧縮符号化部とを有する。   The image signal processing unit 112 is, for example, an imaging signal processing unit that converts an imaging signal output from the photoelectric conversion unit 111 into a digital signal, and a predetermined signal for the digital signal obtained by converting the imaging signal by the imaging signal processing unit. A video signal processing unit that performs processing and converts into baseband digital video data, and a compression encoding unit that compresses and encodes baseband digital video data obtained by the video signal processing unit by a predetermined method.

撮像信号処理部は、例えば光電変換部111から出力された撮像信号に対して、CDS(Correlated Double Sampling)回路により画像情報を有する信号だけをサンプリングすると共に、ノイズを除去し、AGC(Auto Gain Control)回路によりゲインを調整する。そして、A/D変換によりディジタル信号に変換する。また、撮像信号処理部は、光電変換部111から出力された撮像信号の情報をCPU120に送る。CPU120は、この情報に基づき光学レンズ部110を制御するための制御信号を生成し、フォーカス調整機構や絞り調整機構などの制御を行う。   The imaging signal processing unit, for example, samples only a signal having image information by a CDS (Correlated Double Sampling) circuit with respect to the imaging signal output from the photoelectric conversion unit 111, removes noise, and performs AGC (Auto Gain Control). ) Adjust the gain with the circuit. And it converts into a digital signal by A / D conversion. In addition, the imaging signal processing unit sends information on the imaging signal output from the photoelectric conversion unit 111 to the CPU 120. The CPU 120 generates a control signal for controlling the optical lens unit 110 based on this information, and controls the focus adjustment mechanism, the aperture adjustment mechanism, and the like.

ビデオ信号処理部は、撮像信号処理部で得られたディジタル信号に対して所定の信号処理を施す。例えば、ビデオ信号処理部は、ディジタル信号に対して検波系の信号処理を施し、R(赤色)、G(緑色)およびB(青色)各色の成分を取り出す。そして、取り出された各色成分に基づきγ補正やホワイトバランス補正などの処理を行い、最終的に1本のベースバンドのディジタルビデオデータとして出力する。   The video signal processing unit performs predetermined signal processing on the digital signal obtained by the imaging signal processing unit. For example, the video signal processing unit performs detection type signal processing on the digital signal, and extracts components of each color of R (red), G (green), and B (blue). Then, processing such as γ correction and white balance correction is performed based on each extracted color component, and finally, it is output as one baseband digital video data.

圧縮符号化部は、ビデオ信号処理部から出力されたベースバンドのディジタルビデオデータを、例えばMPEG2(Moving Pictures Experts Group 2)方式に従い圧縮符号化する。この例に限定されず、例えばH.264|AVCすなわちITU−T(International Telecommunication Union-Telecommunication Standarization Sector)勧告H.264あるいはISO(International Organization for Standarization)/IEC(International Electrotechnical Commission)国際標準14496−10(MPEG−4パート10)Advanced Video Codingに準じた圧縮符号化方式を用いることも考えられる。   The compression encoding unit compresses and encodes the baseband digital video data output from the video signal processing unit in accordance with, for example, MPEG2 (Moving Pictures Experts Group 2) system. The present invention is not limited to this example. H.264 | AV, ie, ITU-T (International Telecommunication Union-Telecommunication Standardization Sector) recommendation H.264. It is also conceivable to use a compression encoding method conforming to H.264 or ISO (International Organization for Standarization) / IEC (International Electrotechnical Commission) International Standard 14496-10 (MPEG-4 Part 10) Advanced Video Coding.

表示部114は、例えばLCD(Liquid Crystal Display)を表示素子として用い、画像信号処理部112から供給されたディジタルビデオデータに基づく表示を行うことができる。表示部114は、撮影時には撮影画像のモニタとして用いられ、再生時には、再生画像を映出させることができる。   The display unit 114 can perform display based on digital video data supplied from the image signal processing unit 112 using, for example, an LCD (Liquid Crystal Display) as a display element. The display unit 114 is used as a monitor of a captured image during shooting, and can display a playback image during playback.

画像入出力部113は、画像信号処理部112から出力されたディジタルビデオデータを外部に出力する。外部から供給されたディジタルビデオデータを画像信号処理部112に供給することもできる。また、画像入出力部113にA/D変換部やD/A変換部を持たせ、画像信号処理部112から出力されたディジタルビデオデータをアナログビデオ信号に変換して出力したり、外部から供給されたアナログビデオ信号をディジタルビデオデータに変換して画像信号処理部112に供給するようにしてもよい。   The image input / output unit 113 outputs the digital video data output from the image signal processing unit 112 to the outside. Digital video data supplied from outside can also be supplied to the image signal processing unit 112. Further, the image input / output unit 113 includes an A / D conversion unit and a D / A conversion unit, and the digital video data output from the image signal processing unit 112 is converted into an analog video signal for output or supplied from the outside. The analog video signal thus converted may be converted into digital video data and supplied to the image signal processing unit 112.

音声入出力部116は、マイクロフォン、スピーカといった音声の入出力手段を有し、外部の音声を音声信号に変換したり、音声信号を音声に変換する。また、音声入出力部116は、音声信号の入出力手段も有する。音声処理部117は、音声入出力部116から供給されるアナログ音声信号をA/D変換してディジタルオーディオデータとし、ノイズ除去や音質補正など所定の音声信号処理を施してベースバンドのディジタルオーディオデータとして出力する。ベースバンドのディジタルオーディオデータを所定の方式で圧縮符号化してもよい。また、音声信号処理部117は、供給されるディジタルオーディオデータに対して音質補正や音量調整などの所定の音声信号処理を施してD/A変換してアナログ音声信号とし、増幅処理などを行い音声入出力部116に供給する。   The audio input / output unit 116 has audio input / output means such as a microphone and a speaker, and converts external audio into an audio signal or converts an audio signal into audio. The audio input / output unit 116 also includes an audio signal input / output unit. The audio processing unit 117 A / D converts the analog audio signal supplied from the audio input / output unit 116 into digital audio data, performs predetermined audio signal processing such as noise removal and sound quality correction, and baseband digital audio data Output as. The baseband digital audio data may be compressed and encoded by a predetermined method. The audio signal processing unit 117 performs predetermined audio signal processing such as sound quality correction and volume adjustment on the supplied digital audio data, D / A converts it to an analog audio signal, performs amplification processing, etc. This is supplied to the input / output unit 116.

操作入力部124は、このビデオカメラ装置100の動作をユーザが操作するための操作子が所定に設けられ、操作子に対する操作に応じた制御信号を出力するこの制御信号は、CPU120に供給される。CPU120は、ユーザ操作に応じてそうさ入力部124から供給された制御信号に基づきなされるプログラムの処理により、ビデオカメラ装置100の各部の動作を制御する。また、操作入力部124に、簡易的な表示部を設け、ビデオカメラ装置100の動作に関する所定の表示を行うようにしてもよい。   The operation input unit 124 is provided with a predetermined operation element for the user to operate the operation of the video camera apparatus 100, and this control signal for outputting a control signal corresponding to the operation on the operation element is supplied to the CPU 120. . The CPU 120 controls the operation of each unit of the video camera device 100 by processing a program based on a control signal supplied from the depth input unit 124 in response to a user operation. Further, a simple display unit may be provided in the operation input unit 124 to perform a predetermined display regarding the operation of the video camera device 100.

ドライブ部126は、CPU120からの命令に基づき記録媒体の制御を行う。例えば、光電変換部111の撮像素子で撮像され画像信号処理部112で所定に圧縮符号化されたディジタルビデオデータを、CPU120の命令に基づき記録媒体に記録する。   The drive unit 126 controls the recording medium based on a command from the CPU 120. For example, digital video data captured by the image sensor of the photoelectric conversion unit 111 and compressed and encoded by the image signal processing unit 112 is recorded on a recording medium based on a command from the CPU 120.

ドライブ部126に対して適用可能な記録媒体は、ランダムアクセス可能な記録媒体であれば特に種類を問わないが、ハードディスクなどの磁気ディスク、記録可能なタイプのDVD(Digital Versatile Disc)やCD(Compact Disc)、Blu−ray Disc(登録商標)といった光ディスク、光磁気ディスクといったディスク状記録媒体、半導体メモリが用いて好適である。   The recording medium applicable to the drive unit 126 is not particularly limited as long as it is a randomly accessible recording medium, but a magnetic disk such as a hard disk, a recordable type DVD (Digital Versatile Disc) or CD (Compact). Disc), Blu-ray Disc (registered trademark) optical disc, magneto-optical disc-like recording medium, and semiconductor memory are suitable.

ここで、半導体メモリとしてフラッシュメモリなどの書き換え可能な不揮発性メモリを用い、画像信号処理部112で圧縮符号化されたディジタルビデオデータを他の記録媒体、例えばハードディスクといったディスク状記録媒体に記録することで、この発明による、ディスク状記録媒体の記録エラーに対する記録データの退避処理が可能となる。   Here, a rewritable nonvolatile memory such as a flash memory is used as the semiconductor memory, and the digital video data compressed and encoded by the image signal processing unit 112 is recorded on another recording medium, for example, a disk-shaped recording medium such as a hard disk. Thus, according to the present invention, recording data can be saved in response to a recording error of the disk-shaped recording medium.

なお、この図18の例では、ドライブ部126が各種記録媒体に共通なように示されているが、実際には、記録媒体毎にドライブ部が設けられる。また、図18に示した全ての記録媒体に対応している必要もなく、ビデオカメラ装置100は、例えば上述の不揮発性メモリとしての半導体メモリと、ハードディスク、記録可能なタイプの光ディスクおよび光磁気ディスクのうち少なくとも1とに対応していればよい。   In the example of FIG. 18, the drive unit 126 is shown to be common to various recording media, but in reality, a drive unit is provided for each recording medium. Further, it is not necessary to support all the recording media shown in FIG. 18, and the video camera apparatus 100 includes, for example, the above-described semiconductor memory as a nonvolatile memory, a hard disk, a recordable optical disk, and a magneto-optical disk. It is sufficient to correspond to at least one of them.

通信部125は、CPU120の制御に基づき、所定のプロトコルを用いて、有線および/または無線により外部機器との通信を行う。有線および/または無線通信のインターフェイスは、ディジタル通信が可能であれば特に種類を問わないが、有線通信としては、USB、IEEE1394、イーサネット(登録商標)などによるLAN(Local Area Network)などが考えられる。また、無線通信としては、IEEE802.11a/b/g、bluetoothなどが考えられる。また、USBやIEEE1394といったインターフェイスで、パーソナルコンピュータなどのホスト機能を有する外部機器と、このビデオカメラ装置100とを接続することで、ビデオカメラ装置100のドライブ部126に接続される記録媒体を、外部機器に対してマウントすることができる。   The communication unit 125 communicates with an external device by wire and / or wireless using a predetermined protocol based on the control of the CPU 120. The wired and / or wireless communication interface is not particularly limited as long as digital communication is possible, but as the wired communication, a LAN (Local Area Network) by USB, IEEE 1394, Ethernet (registered trademark), or the like can be considered. . In addition, IEEE802.11a / b / g, Bluetooth, etc. can be considered as wireless communication. Further, by connecting an external device having a host function such as a personal computer with an interface such as USB or IEEE1394 and the video camera device 100, a recording medium connected to the drive unit 126 of the video camera device 100 can be connected to an external device. Can be mounted on equipment.

センサ127は、ビデオカメラ装置100に加えられた加速度を検出する。センサ127の検出結果は、CPU120に渡される電源部130は、例えばバッテリからなり、このビデオカメラ装置100の各部に対して電源を供給する。電源部130による電源の供給のON/OFFは、例えば操作入力部124に対する所定の操作に応じて、CPU120により制御される。   The sensor 127 detects acceleration applied to the video camera device 100. The detection result of the sensor 127 is transferred to the CPU 120. The power supply unit 130 is formed of a battery, for example, and supplies power to each unit of the video camera device 100. ON / OFF of power supply by the power supply unit 130 is controlled by the CPU 120 in accordance with, for example, a predetermined operation on the operation input unit 124.

この実施の第2の形態によるビデオカメラ装置100の一例の動作について、概略的に説明する。なお、以下では、ストリームデータは、ビデオカメラ装置100に内蔵されるハードディスクドライブのハードディスクを記録媒体として記録されるものとする。また、ドライブ部126には、フラッシュメモリといった不揮発性メモリが他の記録媒体として接続されている。この場合、フラッシュメモリは、このビデオカメラ装置100に予め内蔵されるものとすると、好ましい。   An example of the operation of the video camera apparatus 100 according to the second embodiment will be schematically described. In the following, it is assumed that the stream data is recorded using a hard disk of a hard disk drive built in the video camera apparatus 100 as a recording medium. In addition, a non-volatile memory such as a flash memory is connected to the drive unit 126 as another recording medium. In this case, it is preferable that the flash memory is built in the video camera device 100 in advance.

先ず、ビデオカメラ装置100の電源投入時には、図15のフローチャートを用いて説明したように、電源投入に伴い、ビデオカメラ装置100の各部で所定の処理が行われる(ステップS50)。例えばCPU120によりROM123からプログラムデータが読み込まれ、ファイルシステム部11やデバイスドライバ部12がプログラムにより形成されると共に、アプリケーション部10が起動される。また、ビデオカメラ装置100の各部が初期化される。そして、ドライブ部126に接続された記録媒体(この例では、ハードディスクおよびフラッシュメモリ)がCPU120によりシステムにマウントされ(ステップS51)、退避情報がCPU120に読み込まれる。退避情報は、例えばフラッシュメモリの所定の領域に記憶されている。CPU120は、退避情報に基づき、フラッシュメモリに退避データが存在すれば、当該退避データをハードディスクに書き戻す(ステップS53)。その後、さらに必要な処理が行われる(ステップS54)。   First, when the power of the video camera device 100 is turned on, as described with reference to the flowchart of FIG. 15, predetermined processing is performed in each part of the video camera device 100 as the power is turned on (step S50). For example, the program data is read from the ROM 123 by the CPU 120, the file system unit 11 and the device driver unit 12 are formed by the program, and the application unit 10 is activated. In addition, each unit of the video camera device 100 is initialized. Then, a recording medium (in this example, a hard disk and a flash memory) connected to the drive unit 126 is mounted on the system by the CPU 120 (step S51), and the save information is read into the CPU 120. The save information is stored, for example, in a predetermined area of the flash memory. Based on the save information, if there is save data in the flash memory, the CPU 120 writes the save data back to the hard disk (step S53). Thereafter, further necessary processing is performed (step S54).

記録時には、被写体からの光が光学レンズ部110を介して光電変換部111に入射され、撮像素子により電気信号に変換され、所定の信号処理により撮像信号として出力される。撮像信号は、画像信号処理部112に供給され、画像信号処理部112内の撮像信号処理部でディジタル信号に変換され、このディジタル信号は、ビデオ信号処理部で所定に信号処理されベースバンドのディジタルビデオデータとされる。このベースバンドのディジタルビデオデータは、表示部114に供給され表示素子に表示されると共に、画像入出力部113に供給される。   At the time of recording, light from the subject enters the photoelectric conversion unit 111 via the optical lens unit 110, is converted into an electrical signal by the imaging element, and is output as an imaging signal by predetermined signal processing. The imaging signal is supplied to the image signal processing unit 112, converted into a digital signal by the imaging signal processing unit in the image signal processing unit 112, and this digital signal is subjected to predetermined signal processing by the video signal processing unit and is digitally converted into a baseband digital signal. Video data. The baseband digital video data is supplied to the display unit 114, displayed on the display element, and supplied to the image input / output unit 113.

また、画像信号処理部112は、撮像信号に基づくベースバンドのディジタルビデオデータを所定の方式で圧縮符号化して圧縮ディジタルビデオデータとする。   Further, the image signal processing unit 112 compresses and encodes baseband digital video data based on the imaging signal by a predetermined method to obtain compressed digital video data.

また、音声入力部116が有するマイクロフォンにより音声が収音されてアナログ音声信号とされ、アナログ音声信号が音声信号処理部117でベースバンドのディジタルオーディオデータとされる。   In addition, sound is collected by a microphone included in the sound input unit 116 to be an analog sound signal, and the analog sound signal is converted to baseband digital audio data by the sound signal processing unit 117.

CPU120は、例えば、操作入力部124に対するユーザの記録開始操作に応じて、画像信号処理部112から供給された圧縮ディジタルビデオデータと、音声信号処理部117から供給されたベースバンドのディジタルオーディオデータとを所定に多重化してストリームデータとし、ドライブ部126に供給する。そして、CPU120は、ドライブ部126に対して、当該ストリームデータを記録媒体に記録するように命令を出す。ここでは、ストリームデータは、ファイルに格納されてハードディスクに記録されるものとする。   The CPU 120, for example, in response to a user's recording start operation on the operation input unit 124, the compressed digital video data supplied from the image signal processing unit 112 and the baseband digital audio data supplied from the audio signal processing unit 117. Are multiplexed into predetermined stream data and supplied to the drive unit 126. Then, the CPU 120 instructs the drive unit 126 to record the stream data on a recording medium. Here, the stream data is stored in a file and recorded on a hard disk.

CPU120は、プログラムにより実行されるファイルシステム部11(図8参照)の記録制御部20で、ハードディスク上のディレクトリエントリおよびFATを参照し、ストリームデータが格納されるファイルを記録するための先頭クラスタ番号が求められ、さらに、先頭クラスタ番号のクラスタから連続して記録データが記録されるクラスタのクラスタ番号が取得される。ファイルシステム部11の記録媒体制御部21は、記録制御部20で取得されたクラスタ番号をハードディスクのLBAに変換する。LBAは、CPU120によりプログラムにより実行されるデバイスドライバ部12のハードディスクに対応するデバイスドライバに渡される。デバイスドライバは、LBAと記録データとに基づきハードディスクに対して記録データを書き込むためのコマンドを生成し、このコマンドに基づきハードディスクに対して、例えばセクタ単位で記録データを書き込む。   The CPU 120 refers to the directory entry and FAT on the hard disk in the recording control unit 20 of the file system unit 11 (see FIG. 8) executed by the program, and starts the cluster number for recording the file storing the stream data. Further, the cluster number of the cluster in which the recording data is continuously recorded from the cluster of the head cluster number is acquired. The recording medium control unit 21 of the file system unit 11 converts the cluster number acquired by the recording control unit 20 into the LBA of the hard disk. The LBA is passed to the device driver corresponding to the hard disk of the device driver unit 12 executed by the CPU 120 according to the program. The device driver generates a command for writing the recording data to the hard disk based on the LBA and the recording data, and writes the recording data to the hard disk based on this command, for example, in units of sectors.

ストリームデータをハードディスクに記録している間、CPU120は、センサ127の出力信号を監視している。CPU120は、センサ127により検出された加速度が所定値以上で、ストリームデータのハードディスクへの記録に際して記録エラーが発生する可能性があるような落下や振動、衝撃が、ビデオカメラ装置100に対して加えられたと判断する。CPU120は、センサ127に所定値以上の加速度が検出されると、ストリームデータの記録先をハードディスクからフラッシュメモリに退避させる。   While the stream data is recorded on the hard disk, the CPU 120 monitors the output signal of the sensor 127. The CPU 120 applies a drop, vibration, or shock to the video camera device 100 such that the acceleration detected by the sensor 127 is equal to or greater than a predetermined value and a recording error may occur when the stream data is recorded on the hard disk. It is determined that When the sensor 127 detects an acceleration greater than or equal to a predetermined value, the CPU 120 saves the stream data recording destination from the hard disk to the flash memory.

この場合、記録エラーを事前に回避できるため、図9のフローチャートを用いて説明した処理のうち、ステップS15の不揮発性メモリの空き容量確認処理から、ステップS19の退避情報作成およびステップS13の書き込み成功通知までの処理が行われる。   In this case, since a recording error can be avoided in advance, out of the processing described with reference to the flowchart of FIG. 9, the evacuation information creation in step S19 and the writing success in step S13 from the processing for checking the free space in the nonvolatile memory in step S15. Processing up to notification is performed.

例えば、CPU120は、センサ127の検出結果に基づきビデオカメラ装置100に所定値以上の加速度が加えられたと判断したら、図9のステップS15により、ハードディスクに書き込む記録データの退避先であるフラッシュメモリの空き容量を確認し、退避可能であれば、ハードディスクに書き込むためのバッファメモリに記憶された記録データを、フラッシュメモリに書き込む(ステップS17)。書き込みが成功したら、退避情報を作成し、記憶されている退避情報を更新する(ステップS19)。退避情報は、例えばドライブ部126に別途、フラッシュメモリなどの不揮発性メモリを接続し、当該不揮発性メモリに書き込むことができる。これに限らず、記録データの退避先となるフラッシュメモリの所定の領域を退避情報を書き込むために確保することもできる。記録データのフラッシュメモリへの書き込みが成功したら、上位に対してその旨通知する(ステップS13)。   For example, if the CPU 120 determines that an acceleration greater than or equal to a predetermined value has been applied to the video camera device 100 based on the detection result of the sensor 127, the free space in the flash memory that is the save destination of the recording data to be written to the hard disk is step S15 in FIG. The capacity is confirmed, and if it can be saved, the recording data stored in the buffer memory for writing to the hard disk is written to the flash memory (step S17). If the writing is successful, save information is created and the stored save information is updated (step S19). The save information can be written in the nonvolatile memory by connecting a nonvolatile memory such as a flash memory separately to the drive unit 126, for example. However, the present invention is not limited to this, and a predetermined area of the flash memory as a save destination of the recording data can be secured for writing save information. If the recording data has been successfully written to the flash memory, it is notified to the host (step S13).

CPU120は、センサ127からの検出結果に基づき、ビデオカメラ装置100に対して所定値以上の加速度が加えられている間、記録データのフラッシュメモリに対する退避記録を継続させる。そして、センサ127に検出される加速度が所定値を下回ったら、記録データのフラッシュメモリへの退避を終了し、記録データの記録先をフラッシュメモリからハードディスクに切り換える。   Based on the detection result from the sensor 127, the CPU 120 continues to save and store the recording data in the flash memory while the video camera apparatus 100 is being accelerated by a predetermined value or more. When the acceleration detected by the sensor 127 falls below a predetermined value, the saving of the recording data to the flash memory is terminated, and the recording destination of the recording data is switched from the flash memory to the hard disk.

ハードディスクに記録されたストリームデータの再生時には、図13を用いて説明したように、フラッシュメモリに退避された記録データのハードディスクに対する書き戻しを試みるようにする。例えば、操作入力部124に対するユーザの再生開始操作に応じて、CPU120は、退避情報を読み込む。そして、図13および図14のフローチャートを用いて説明したように、退避情報と読み出しアクセスを要求されたLBAとに基づき、ファイルシステム部11の記録媒体制御部21により、読み出しが要求されたデータの一部または全体がフラッシュメモリに退避されているか否かが判断される(ステップS30)。   At the time of reproducing the stream data recorded on the hard disk, as described with reference to FIG. 13, the recording data saved in the flash memory is attempted to be written back to the hard disk. For example, the CPU 120 reads the save information in response to the user's reproduction start operation on the operation input unit 124. As described with reference to the flowcharts of FIGS. 13 and 14, the recording medium control unit 21 of the file system unit 11 reads the data requested to be read based on the save information and the LBA requested for read access. It is determined whether a part or all of the data has been saved in the flash memory (step S30).

以降、読み出しが要求されたデータが全てフラッシュメモリに退避されていれば、ステップS32〜ステップS35の処理がなされ、フラッシュメモリから当該データが読み出されると共に、退避情報に基づき読み出されたデータをハードディスクに書き戻す処理が行われる。読み出しが要求されたデータがフラッシュメモリに退避されていなければ、ステップS36の処理により、当該データがハードディスクから読み出される。また、読み出しが要求されたデータの一部がフラッシュメモリに退避されていれば、ステップS37〜ステップS44(図14参照)の処理がなされ、退避情報に基づきハードディスクとフラッシュメモリとのアクセス順序が算出され、算出されたアクセス順序と退避情報とに基づき、ハードディスクおよびフラッシュメモリからデータが読み出されると共に、フラッシュメモリから読み出されたデータがハードディスクに書き戻される。   Thereafter, if all of the data requested to be read is saved in the flash memory, the processing in steps S32 to S35 is performed, the data is read from the flash memory, and the data read based on the save information is stored in the hard disk. The process of writing back to is performed. If the data requested to be read is not saved in the flash memory, the data is read from the hard disk by the process of step S36. If a part of the data requested to be read has been saved in the flash memory, the processes in steps S37 to S44 (see FIG. 14) are performed, and the access order between the hard disk and the flash memory is calculated based on the saved information. Then, based on the calculated access order and save information, the data is read from the hard disk and the flash memory, and the data read from the flash memory is written back to the hard disk.

通信部125に対してホスト機能を有する、例えばコンピュータ装置といった他の機器が接続された場合、ビデオカメラ装置100のドライブ部126に接続される記録媒体を当該他の機器にマウントすることができる。これにより、例えばドライブ部126に接続されるハードディスクに記録されるストリームデータを、当該他の機器に対して直接的に送信することや、当該他の機器側からビデオカメラ装置100に対してデータを送信し、ハードディスクに書き込むことができる。また、当該他の機器からビデオカメラ装置100を制御することも可能である。   When another device such as a computer device having a host function is connected to the communication unit 125, a recording medium connected to the drive unit 126 of the video camera device 100 can be mounted on the other device. Accordingly, for example, stream data recorded on a hard disk connected to the drive unit 126 is directly transmitted to the other device, or data is transmitted from the other device to the video camera device 100. Can send and write to hard disk. It is also possible to control the video camera device 100 from the other device.

通信部125に対して、例えばUSBをインターフェイスとして用いてホスト機能を有する他の機器が接続されると、通信部125と当該他の機器の通信インターフェイスとの間でUSBによるプロトコルで以て所定のやりとりが行われ、通信が確立される。それと共に、CPU120は、図16のフローチャートを用いて説明したように、例えばバッファメモリに記憶されている未記録のデータがハードディスクに書き込まれ(ステップS60)、ファイルシステム部11により、オープン中のファイルが全てクローズされる(ステップS61)。また、CPU120により退避情報が読み込まれ、この退避情報に基づきフラッシュメモリに退避された記録データがハードディスクに所定に書き戻される。そして、ドライブ部126に接続されたハードディスクやフラッシュメモリがビデオカメラ装置100のシステムからアンマウントされ(ステップS63)、その後、さらに必要な処理が行われる(ステップS64)。このとき、例えば、接続された他の機器により、ハードディスクのマウント処理が行われる。   When another device having a host function is connected to the communication unit 125 using, for example, USB as an interface, a predetermined protocol is used between the communication unit 125 and the communication interface of the other device using a USB protocol. Communication takes place and communication is established. At the same time, as described with reference to the flowchart of FIG. 16, the CPU 120 writes, for example, unrecorded data stored in the buffer memory to the hard disk (step S60), and the file system unit 11 opens the open file. Are closed (step S61). Further, the save information is read by the CPU 120, and the recording data saved in the flash memory based on the save information is written back to the hard disk in a predetermined manner. Then, the hard disk and flash memory connected to the drive unit 126 are unmounted from the system of the video camera apparatus 100 (step S63), and then further necessary processing is performed (step S64). At this time, for example, a hard disk mounting process is performed by another connected device.

ビデオカメラ装置100の電源切断時にも、図16のフローチャートを用いて説明したように、バッファメモリに記憶されている未記録データのハードディスクに対する書き込みが行われ、オープン中のファイルが全てクローズされ、退避情報に基づきフラッシュメモリに退避された記録データのハードディスクに対する書き戻しの処理が行われる。そして、ドライブ部126に接続されたハードディスクやフラッシュメモリのアンマウント処理がなされ、各部の初期化など、他の必要な処理がなされる。   Even when the video camera device 100 is turned off, as described with reference to the flowchart of FIG. 16, unrecorded data stored in the buffer memory is written to the hard disk, and all open files are closed and saved. Based on the information, the process of writing back the recording data saved in the flash memory to the hard disk is performed. Then, the hard disk or flash memory connected to the drive unit 126 is unmounted, and other necessary processes such as initialization of each unit are performed.

上述では、この発明が撮像素子で撮像された撮像信号に基づくビデオデータを、ハードディスクに記録するようにしたビデオカメラ装置100に適用した例について説明したが、これはこの例に限定されない。例えば、ビデオデータを記録する記録媒体は、ランダムアクセスが可能であり、且つ、装置に対する落下や振動、衝撃によって記録エラーが発生するようなものであれば、他の種類の記録媒体にも適用できる。   In the above description, the example in which the present invention is applied to the video camera device 100 configured to record the video data based on the imaging signal captured by the imaging device on the hard disk has been described. However, the present invention is not limited to this example. For example, a recording medium for recording video data can be applied to other types of recording media as long as random access is possible and a recording error occurs due to dropping, vibration, or impact on the apparatus. .

例えば、記録可能なタイプのDVDやBlu−ray Discといった、記録可能な光ディスクを記録媒体として用いることができる。この場合でも、上述の処理と同様に、センサの検出結果に基づき落下や振動、衝撃により記録エラーを起こす可能性があるをと判断されるか、または、記録データの書き込みに際してタイムアウトエラーが発生した際に、フラッシュメモリに対して記録データを退避させて記録を継続させる。なお、これら記録可能な光ディスクは、一般的には、ビデオカメラ装置100に対して脱着可能とされている。そこで、記録媒体のイジェクト時にも、フラッシュメモリに退避された記録データを記録媒体に書き戻す処理を行うようにする。   For example, a recordable optical disc such as a recordable DVD or Blu-ray Disc can be used as the recording medium. Even in this case, it is determined that there is a possibility of causing a recording error due to dropping, vibration, or shock based on the detection result of the sensor, or a time-out error has occurred when writing the recording data, as in the above-described processing. At this time, the recording data is saved in the flash memory and the recording is continued. Note that these recordable optical discs are generally detachable from the video camera apparatus 100. Therefore, even when the recording medium is ejected, a process of writing back the recording data saved in the flash memory to the recording medium is performed.

また、上述では、記録データの退避先を不揮発性メモリ13Bであるとして説明したが、これはこの例に限定されない。すなわち、記録データの退避先は、装置の電源を切断した際にも記憶内容が失われないような記録媒体であれば、他の種類の記録媒体を適用することができる。例えば、ハードディスク13A自体の空き領域を、記録データの退避先として用いることができる。この場合、例えば、図1Aや図1Bに示すハードディスクのデータ構造における、MBRとPBRとの間の空き領域を、記録データの退避先とすることが考えられる。   In the above description, the save destination of the recording data has been described as being the non-volatile memory 13B, but this is not limited to this example. That is, other types of recording media can be applied as long as the storage destination of the recording data is a recording medium that does not lose the stored contents even when the apparatus is turned off. For example, an empty area of the hard disk 13A itself can be used as a save destination for recording data. In this case, for example, a free area between the MBR and the PBR in the data structure of the hard disk shown in FIGS. 1A and 1B can be considered as a recording data save destination.

さらに、上述では、センサ127で加速度を検出して落下や振動、衝撃の有無を判断するように説明したが、これはこの例に限定されない。例えば、センサ127は、ビデオカメラ装置100内部の温度を検知する温度センサであってもよい。ビデオカメラ装置100内が所定温度以上になったら、ハードディスク13Aにおいて記録エラーが発生する可能性が高くなるとして、ハードディスク13Aに書き込まれる記録データを不揮発性メモリ13Bに退避させることが考えられる。勿論、加速度センサおよび温度センサを共に設け、加速度センサの検出結果と温度センサの検出結果のうち何れか一方でも所定値を超えたら、ハードディスク13Aに書き込まれる記録データを不揮発性メモリ13Bに退避させるようにしてもよい。   Furthermore, in the above description, it has been described that the acceleration is detected by the sensor 127 to determine whether there is a drop, vibration, or impact, but this is not limited to this example. For example, the sensor 127 may be a temperature sensor that detects the temperature inside the video camera apparatus 100. When the inside of the video camera device 100 reaches a predetermined temperature or more, it is considered that the possibility of a recording error occurring in the hard disk 13A increases, and the recording data written to the hard disk 13A can be saved to the nonvolatile memory 13B. Of course, both the acceleration sensor and the temperature sensor are provided, and when either one of the detection result of the acceleration sensor and the detection result of the temperature sensor exceeds a predetermined value, the recording data written in the hard disk 13A is saved in the nonvolatile memory 13B. It may be.

さらにまた、この発明は、図19に一例が示されるような、一般的な構成を有するコンピュータ装置200に対して適用することもできる。図19において、バス201に対してCPU210、RAM211およびROM212、ならびに、入出力インターフェイス220が接続される。CPU210は、ROM212に予め記憶されたプログラムに基づきRAM211をワークメモリとして用いてシステムを起動させ、後述するハードディスク224Bに予め記録されるプログラムデータを読み込んでRAM211に展開し、RAM211上に展開されたプログラムデータに基づきコンピュータ装置200の各部を制御する。   Furthermore, the present invention can also be applied to a computer apparatus 200 having a general configuration as shown in FIG. In FIG. 19, a CPU 210, a RAM 211 and a ROM 212, and an input / output interface 220 are connected to a bus 201. The CPU 210 starts up the system using the RAM 211 as a work memory based on a program stored in advance in the ROM 212, reads program data recorded in advance in a hard disk 224 </ b> B, which will be described later, and develops the program in the RAM 211. Each part of the computer apparatus 200 is controlled based on the data.

入出力インターフェイス220は、接続される各入出力デバイスのデバイスコントローラとして機能するもので、実際には、入出力デバイスの種類に応じてそれぞれ設けられる。   The input / output interface 220 functions as a device controller for each input / output device to be connected, and is actually provided according to the type of the input / output device.

データの入力を受け付ける入力部221のデバイスとしては、例えばキーボード221A、マウス221Bといったポインティングデバイス、スキャナ221Cといった画像入力装置、マイクロフォン221Dといった音声入力装置が考えられる。勿論、CCDやCMOSイメージセンサを撮像素子として用いたビデオカメラも、入力デバイスとして用いることができる。なお、スキャナ221Cは、後述するUSBインターフェイス223AやIEEE1394インターフェイス223Bを接続インターフェイスとして用いて、画像データをコンピュータ装置200に送信する。また、マイクロフォン221Dを入力デバイスとして用いる場合、マイクロフォンから出力されたアナログ音声信号をディジタルオーディオデータに変換するA/D変換手段が必要となる。   As a device of the input unit 221 that receives data input, for example, a pointing device such as a keyboard 221A and a mouse 221B, an image input device such as a scanner 221C, and a voice input device such as a microphone 221D are conceivable. Of course, a video camera using a CCD or CMOS image sensor as an imaging device can also be used as an input device. The scanner 221C transmits image data to the computer apparatus 200 using a USB interface 223A or an IEEE 1394 interface 223B described later as a connection interface. Further, when the microphone 221D is used as an input device, A / D conversion means for converting an analog audio signal output from the microphone into digital audio data is required.

データの出力を行う出力部222のデバイスとしては、ディスプレイ222A、スピーカ222B、プリンタ装置222Cおよびプロッタ装置222Dが考えられる。ディスプレイ222Aは、実際には、CPU210で生成された表示制御信号をビデオ信号に変換するビデオ信号処理部(図示しない)を介して、コンピュータ装置200に対して接続される。スピーカ222Bを出力デバイスとして用いる場合、バス201を介して供給されたディジタルオーディオデータをアナログ音声信号に変換するD/A変換手段が必要となる。また、プリンタ装置222Cおよびプロッタ装置222Dは、後述するUSBインターフェイス223AやIEEE1394インターフェイス223B、さらに他のインターフェイスなどを接続インターフェイスとして用いて、バス201を介して供給される画像信号に基づく印刷を行う。   As a device of the output unit 222 that outputs data, a display 222A, a speaker 222B, a printer device 222C, and a plotter device 222D can be considered. The display 222A is actually connected to the computer device 200 via a video signal processing unit (not shown) that converts the display control signal generated by the CPU 210 into a video signal. When the speaker 222B is used as an output device, D / A conversion means for converting digital audio data supplied via the bus 201 into an analog audio signal is required. Further, the printer device 222C and the plotter device 222D perform printing based on an image signal supplied via the bus 201 using a USB interface 223A, an IEEE 1394 interface 223B, which will be described later, and other interfaces as connection interfaces.

外部とのデータ通信を行う通信部223のデバイスとしては、USBによる通信を司るUSBインターフェイス223A、IEEE1394による通信を司るIEEE1394インターフェイス223B、Bluetoothによる無線通信を司るBluetoothインターフェイス223Cおよび所謂無線LANによる無線通信を司るIEEE802.11a/b/gインターフェイス223Dが考えられる。各インターフェイスは、それぞれ所定のプロトコルを用いて接続先の相手機器と通信を行う。   As a device of the communication unit 223 that performs data communication with the outside, a USB interface 223A that controls communication by USB, an IEEE 1394 interface 223B that controls communication by IEEE 1394, a Bluetooth interface 223C that controls wireless communication by Bluetooth, and so-called wireless LAN are used. A controlling IEEE 802.11a / b / g interface 223D is conceivable. Each interface communicates with a connected device using a predetermined protocol.

データを記録する記録部224のデバイスとしては、記録可能なタイプのDVDやBlu−ray Discといった光ディスク224A、ハードディスクといった磁気ディスク224B、MO(Magneto-Optical Disc)といった光磁気ディスク224C、書き換え可能で不揮発性のメモリであるフラッシュメモリなどの半導体メモリ224Dが考えられる。なお、光ディスク224Aや光磁気ディスク224Cは、対応するドライブ(図示しない)に装填して用いられる。また、ハードディスクは、記録媒体そのものであるハードディスク本体と、ハードディスクを駆動するためのドライブ装置とからなるハードディスクドライブ(HDD)として用いられる。   As a device of the recording unit 224 for recording data, an optical disc 224A such as a recordable DVD or Blu-ray Disc, a magnetic disc 224B such as a hard disk, a magneto-optical disc 224C such as an MO (Magneto-Optical Disc), a rewritable and non-volatile device. A semiconductor memory 224D such as a flash memory that is a volatile memory is conceivable. The optical disk 224A and the magneto-optical disk 224C are used by being loaded into a corresponding drive (not shown). The hard disk is used as a hard disk drive (HDD) including a hard disk body that is a recording medium itself and a drive device for driving the hard disk.

このような構成を有するコンピュータ装置200において、例えばハードディスク(磁気ディスク224B)や、光ディスク224A、光磁気ディスク224Cに対してデータを記録する際に、タイムアウトエラーが発生した場合、図9などを用いて既に説明したような手順で以て、不揮発性メモリである半導体メモリ224Dに記録データを退避させるようにできる。   In the computer device 200 having such a configuration, for example, when a time-out error occurs when data is recorded on the hard disk (magnetic disk 224B), the optical disk 224A, or the magneto-optical disk 224C, FIG. The recording data can be saved in the semiconductor memory 224D, which is a non-volatile memory, by the procedure already described.

さらにまた、この発明を適用可能な装置は、上述したビデオカメラ装置100やコンピュータ装置200に限られない。すなわち、この発明は、ハードディスクなどランダムアクセスが可能で、且つ、落下や振動、衝撃などにより記録エラーが発生する可能性がある記録媒体を用いる装置であれば、他の種類の装置にも適用することができる。例えば、音声信号をハードディスクや光ディスク、光磁気ディスクに記録するようにした録音機にこの発明を適用することができる。   Furthermore, apparatuses to which the present invention can be applied are not limited to the video camera apparatus 100 and the computer apparatus 200 described above. That is, the present invention can be applied to other types of apparatuses as long as the apparatus uses a recording medium that can be randomly accessed such as a hard disk and that may cause a recording error due to dropping, vibration, impact, or the like. be able to. For example, the present invention can be applied to a recorder that records an audio signal on a hard disk, an optical disk, or a magneto-optical disk.

また、近年では、本来の電話機能の他に、ハードディスクを内蔵し、電波により受信した音楽データや、所定のインターフェイスにより有線でコンピュータ装置などに接続して音楽データなどをコンピュータ装置から転送することができるようにした携帯電話端末が普及の兆しを見せている。この発明は、このようなハードディスク内蔵の携帯電話端末にも適用させることができる。   Also, in recent years, in addition to the original telephone function, a hard disk is built in, and music data received by radio waves, or music data etc. can be transferred from the computer device by connecting to a computer device or the like with a predetermined interface by wire. Mobile phone terminals that can be used are showing signs of widespread use. The present invention can also be applied to such a mobile phone terminal with a built-in hard disk.

さらに、上述では、この発明がFATによるファイルシステムに適用されるように説明したが、これは一例であって、この例に限定されるものではない。すなわち、この発明は、ランダムアクセス可能な記録媒体に対して所定単位でアドレス管理を行うようなファイルシステムであれば、他のファイルシステムにも適用可能なものである。   Furthermore, in the above description, the present invention has been described as applied to a file system based on FAT, but this is an example and the present invention is not limited to this example. That is, the present invention can be applied to other file systems as long as the file system performs address management in a predetermined unit for a randomly accessible recording medium.

FATファイルシステムに基づきフォーマットされたハードディスクのデータ構造の例を示す略線図である。It is a basic diagram which shows the example of the data structure of the hard disk formatted based on the FAT file system. マスターブートレコードの一例の構造を示す略線図である。It is a basic diagram which shows the structure of an example of a master boot record. パーティションテーブルの一例の構造を示す略線図である。It is a basic diagram which shows the structure of an example of a partition table. FAT16におけるディレクトリエントリの一例の構造を示す略線図である。It is a basic diagram which shows the structure of an example of the directory entry in FAT16. FAT32によるFATの例を示す略線図である。It is a basic diagram which shows the example of FAT by FAT32. ファイルシステムを実現するための一例のアーキテクチャを示す略線図である。It is a basic diagram which shows an example architecture for implement | achieving a file system. この発明の実施の形態を説明するための略線図である。It is a basic diagram for demonstrating embodiment of this invention. この発明の実施の第1の形態に適用可能な、FATによるファイルシステムの一例の構成をより詳細に示すブロック図である。It is a block diagram which shows in more detail the structure of an example of the file system by FAT applicable to the 1st Embodiment of this invention. この発明の実施の第1の形態による一例の記録処理を示すフローチャートである。It is a flowchart which shows an example recording process by the 1st Embodiment of this invention. 退避情報の一例を示す略線図である。It is a basic diagram which shows an example of evacuation information. バッファに溜め込まれた記録データをハードディスクに書き込む処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process which writes the recording data stored in the buffer to a hard disk. ハードディスクに対して動画データファイル「M2U00001.MPG」、「M2U00002.MPG」および「M2U00003.MPG」を書き込んだ場合の一例のファイルレイアウトを示す略線図である。FIG. 4 is a schematic diagram illustrating an example file layout when moving image data files “M2U00001.MPG”, “M2U00002.MPG”, and “M2U00003.MPG” are written to a hard disk. ハードディスクからデータを読み出す際に、不揮発性メモリに書き込まれた記録データをハードディスクに書き戻す一例の処理を示すフローチャートである。6 is a flowchart illustrating an example of processing for writing back recorded data written in a nonvolatile memory to a hard disk when data is read from the hard disk. ハードディスクからデータを読み出す際に、不揮発性メモリに書き込まれた記録データをハードディスクに書き戻す一例の処理を示すフローチャートである。6 is a flowchart illustrating an example of processing for writing back recorded data written in a nonvolatile memory to a hard disk when data is read from the hard disk. ハードディスクのマウント時およびアンマウント時に書き戻しを行う一例の処理を説明するためのフローチャートである。10 is a flowchart for explaining an example of processing for performing write back when a hard disk is mounted and unmounted. ハードディスクのマウント時およびアンマウント時に書き戻しを行う一例の処理を説明するためのフローチャートである。10 is a flowchart for explaining an example of processing for performing write back when a hard disk is mounted and unmounted. ハードディスクのマウント時およびアンマウント時に書き戻しを行う一例の処理を説明するためのフローチャートである。10 is a flowchart for explaining an example of processing for performing write back when a hard disk is mounted and unmounted. この発明の実施の第2の形態による携帯用ビデオカメラ装置1一例の構成を示すブロック図である。It is a block diagram which shows the structure of an example of the portable video camera apparatus 1 by the 2nd Embodiment of this invention. 一般的なコンピュータ装置の一例の構成を示すブロック図である。It is a block diagram which shows the structure of an example of a general computer apparatus.

符号の説明Explanation of symbols

10 アプリケーション部
11 ファイルシステム部
12 デバイスドライバ部
13 記録媒体
13A ハードディスク
13B 不揮発性メモリ
20 記録制御部
21 記録媒体制御部
22 ディレクトリエントリ制御部
23 クラスタ制御部
24 FAT制御部
25 位置算出部
30 ワークメモリ
100 ビデオカメラ装置
110 光学レンズ部
111 光電変換部
112 画像信号処理部
114 表示部
116 音声入出力部
117 音声処理部
120 CPU
121 RAM
123 ROM
124 操作入力部
125 通信部
126 ドライブ部
127 センサ
DESCRIPTION OF SYMBOLS 10 Application part 11 File system part 12 Device driver part 13 Recording medium 13A Hard disk 13B Non-volatile memory 20 Recording control part 21 Recording medium control part 22 Directory entry control part 23 Cluster control part 24 FAT control part 25 Position calculation part 30 Work memory 100 Video camera device 110 Optical lens unit 111 Photoelectric conversion unit 112 Image signal processing unit 114 Display unit 116 Audio input / output unit 117 Audio processing unit 120 CPU
121 RAM
123 ROM
124 Operation input unit 125 Communication unit 126 Drive unit 127 Sensor

Claims (50)

ディスク状記録媒体にデータを記録する記録装置において、
書き込み要求されたデータをディスク状記録媒体に書き込む記録部と、
上記ディスク状記録媒体に対する上記書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断部と、
上記記録部による上記ディスク状記録媒体に対するデータの書き込みを制御する制御部と
を有し、
上記制御部は、
上記判断部により上記書き込み要求されたデータの上記書き込みが正常に行われないと判断された場合に、該書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、該書き込み要求されたデータの管理情報を作成し保持するようにした
ことを特徴とする記録装置。
In a recording apparatus for recording data on a disk-shaped recording medium,
A recording unit for writing the requested data to the disk-shaped recording medium;
A determination unit that determines whether or not the writing of the data requested to be written to the disk-shaped recording medium is normally performed;
A control unit that controls writing of data to the disk-shaped recording medium by the recording unit;
The control unit
When the determination unit determines that the writing of the data requested to be written is not normally performed, the data requested to be written is written to a nonvolatile storage medium, and the management of the data requested to be written is performed. A recording apparatus characterized in that information is created and held.
請求項1に記載の記録装置において、
上記制御部は、
上記記憶媒体に書き込まれた上記書き込み要求されたデータを、所定のタイミングで、上記管理情報に基づき上記ディスク状記録媒体に書き込むようにした
ことを特徴とする記録装置。
The recording apparatus according to claim 1,
The control unit
A recording apparatus, wherein the write-requested data written to the storage medium is written to the disc-shaped recording medium based on the management information at a predetermined timing.
請求項2に記載の記録装置において、
上記所定のタイミングは、上記ディスク状記録媒体のアンマウント時である
ことを特徴とする記録装置。
The recording apparatus according to claim 2,
The recording apparatus according to claim 1, wherein the predetermined timing is when the disc-shaped recording medium is unmounted.
請求項3に記載の記録装置において、
上記所定のタイミングは、装置の電源切断処理時である
ことを特徴とする記録装置。
The recording apparatus according to claim 3,
The recording apparatus according to claim 1, wherein the predetermined timing is a power-off process of the apparatus.
請求項3に記載の記録装置において、
ホスト機能を有する機器と通信可能な通信部をさらに有し、
上記所定のタイミングは、上記通信部を介して上記ホスト機能を有する機器と接続を行う接続処理時である
ことを特徴とする記録装置。
The recording apparatus according to claim 3,
A communication unit capable of communicating with a device having a host function;
The recording apparatus according to claim 1, wherein the predetermined timing is a connection process for connecting to the device having the host function via the communication unit.
請求項2に記載の記録装置において、
上記所定のタイミングは、上記ディスク状記録媒体のマウント時である
ことを特徴とする記録装置。
The recording apparatus according to claim 2,
The recording apparatus according to claim 1, wherein the predetermined timing is when the disc-shaped recording medium is mounted.
請求項6に記載の記録装置において、
上記所定のタイミングは、装置の電源投入処理時である
ことを特徴とする記録装置。
The recording apparatus according to claim 6, wherein
The recording apparatus according to claim 1, wherein the predetermined timing is a power-on process of the apparatus.
請求項6に記載の記録装置において、
ホスト機能を有する機器と通信可能な通信部をさらに有し、
上記所定のタイミングは、上記通信部を介して接続された上記ホスト機能を有する機器が、該接続を解除したタイミングである
ことを特徴とする記録装置。
The recording apparatus according to claim 6, wherein
A communication unit capable of communicating with a device having a host function;
The recording apparatus according to claim 1, wherein the predetermined timing is a timing at which a device having the host function connected via the communication unit releases the connection.
請求項2に記載の記録装置において、
上記制御部は、
上記記憶媒体に書き込まれた上記書き込み要求されたデータが上記ディスク状記録媒体に書き込まれたら、上記記憶媒体から該書き込み要求されたデータを削除すると共に、上記管理情報の対応する情報を削除する
ことを特徴とする記録装置。
The recording apparatus according to claim 2,
The control unit
When the write-requested data written to the storage medium is written to the disc-shaped recording medium, the write-requested data is deleted from the storage medium and the corresponding information in the management information is deleted. A recording apparatus.
請求項1に記載の記録装置において、
上記判断部は、
上記記録部による上記ディスク状記録媒体に対するデータの書き込みの際に記録エラーが発生したら、上記書き込み要求されたデータの書き込みが正常に行われないと判断する
ことを特徴とする記録装置。
The recording apparatus according to claim 1,
The judgment part
A recording apparatus, wherein if a recording error occurs when data is written to the disk-shaped recording medium by the recording unit, it is determined that the data requested to be written is not normally written.
請求項10に記載の記録装置において、
上記記録エラーは、記録処理のタイムアウトである
ことを特徴とする記録装置。
The recording apparatus according to claim 10.
The recording apparatus, wherein the recording error is a recording processing timeout.
請求項1に記載の記録装置において、
上記ディスク状記録媒体に加えられる加速度、振動、および/または衝撃を検出するセンサ部をさらに有し、
上記判断部は、
上記センサ部により上記加速度、振動、および/または衝撃が検出されたら、上記書き込み要求されたデータの上記書き込みが正常に行われないと判断する
ことを特徴とする記録装置。
The recording apparatus according to claim 1,
A sensor unit for detecting acceleration, vibration, and / or impact applied to the disk-shaped recording medium;
The judgment part
A recording apparatus, wherein when the acceleration, vibration, and / or impact is detected by the sensor unit, it is determined that the writing of the data requested to be written is not normally performed.
請求項1に記載の記録装置において、
上記管理情報は、
少なくとも、上記書き込み要求に基づく上記ディスク状記録媒体上のアドレスを示すアドレス情報と、該書き込み要求されたデータを上記記憶媒体に書き込んだ際の該記憶媒体上のアドレスを示すアドレス情報とが関連付けられる
ことを特徴とする記録装置。
The recording apparatus according to claim 1,
The above management information
At least address information indicating an address on the disk-shaped recording medium based on the write request is associated with address information indicating an address on the storage medium when the data requested to be written is written to the storage medium. A recording apparatus.
請求項1に記載の記録装置において、
上記記憶媒体は、フラッシュメモリである
ことを特徴とする記録装置。
The recording apparatus according to claim 1,
The recording apparatus, wherein the storage medium is a flash memory.
ディスク状記録媒体にデータを記録する記録方法において、
書き込み要求されたデータをディスク状記録媒体に書き込む記録のステップと、
上記ディスク状記録媒体に対する上記書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断のステップと、
上記記録のステップによる上記ディスク状記録媒体に対するデータの書き込みを制御する制御のステップと
を有し、
上記制御のステップは、
上記判断のステップにより上記書き込み要求されたデータの上記書き込みが正常に行われないと判断された場合に、該書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、該書き込み要求されたデータの管理情報を作成し保持するようにした
ことを特徴とする記録方法。
In a recording method for recording data on a disc-shaped recording medium,
A recording step of writing the requested data to the disc-shaped recording medium;
A step of determining whether or not writing of the data requested to be written to the disc-shaped recording medium is normally performed;
A control step of controlling writing of data to the disc-shaped recording medium by the recording step,
The above control steps are:
When it is determined in the determination step that the writing of the data requested to be written is not normally performed, the data requested to be written is written to a nonvolatile storage medium, and the data requested to be written A recording method characterized in that management information is created and held.
ディスク状記録媒体にデータを記録する記録方法をコンピュータ装置に実行させる記録プログラムにおいて、
上記記録方法は、
書き込み要求されたデータをディスク状記録媒体に書き込む記録のステップと、
上記ディスク状記録媒体に対する上記書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断のステップと、
上記記録のステップによる上記ディスク状記録媒体に対するデータの書き込みを制御する制御のステップと
を有し、
上記制御のステップは、
上記判断のステップにより上記書き込み要求されたデータの上記書き込みが正常に行われないと判断された場合に、該書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、該書き込み要求されたデータの管理情報を作成し保持する
ようにした記録方法をコンピュータ装置に実行させる
ことを特徴とする記録プログラム。
In a recording program for causing a computer device to execute a recording method for recording data on a disk-shaped recording medium,
The above recording method is
A recording step of writing the requested data to the disc-shaped recording medium;
A step of determining whether or not writing of the data requested to be written to the disc-shaped recording medium is normally performed;
A control step of controlling writing of data to the disc-shaped recording medium by the recording step,
The above control steps are:
When it is determined in the determination step that the writing of the data requested to be written is not normally performed, the data requested to be written is written to a nonvolatile storage medium, and the data requested to be written A recording program for causing a computer apparatus to execute a recording method for creating and holding management information.
ディスク状記録媒体にデータを記録し、ディスク状記録媒体からデータを再生する記録再生装置において、
書き込み要求されたデータをディスク状記録媒体に書き込む記録部と、
ディスク状記録媒体に書き込まれたデータを読み出し要求に基づき再生する再生部と、
上記ディスク状記録媒体に対する上記書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断部と、
上記記録部による上記ディスク状記録媒体に対するデータの書き込みと、上記再生部による上記ディスク状記録媒体からのデータの再生とを制御する制御部と
を有し、
上記制御部は、
上記判断部により上記書き込み要求されたデータの上記書き込みが正常に行われないと判断された場合に、該書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、該書き込み要求されたデータの管理情報を作成し保持するようにした
ことを特徴とする記録再生装置。
In a recording / reproducing apparatus for recording data on a disk-shaped recording medium and reproducing data from the disk-shaped recording medium,
A recording unit for writing the requested data to the disk-shaped recording medium;
A playback unit for playing back data written on a disk-shaped recording medium based on a read request;
A determination unit that determines whether or not the writing of the data requested to be written to the disk-shaped recording medium is normally performed;
A controller that controls writing of data to the disc-shaped recording medium by the recording unit and reproduction of data from the disc-shaped recording medium by the reproducing unit;
The control unit
When the determination unit determines that the writing of the data requested to be written is not normally performed, the data requested to be written is written to a nonvolatile storage medium, and the management of the data requested to be written is performed. A recording / reproducing apparatus characterized in that information is created and held.
請求項17に記載の記録再生装置において、
上記制御部は、
上記記憶媒体に書き込まれた上記書き込み要求されたデータを、所定のタイミングで、上記管理情報に基づき上記ディスク状記録媒体に書き込むようにした
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 17,
The control unit
A recording / reproducing apparatus, wherein the write-requested data written to the storage medium is written to the disc-shaped recording medium based on the management information at a predetermined timing.
請求項18に記載の記録再生装置において、
上記所定のタイミングは、上記再生部による、上記ディスク状記録媒体に書き込まれたデータの再生時である
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 18,
The recording / reproducing apparatus, wherein the predetermined timing is when the data written in the disc-shaped recording medium is reproduced by the reproducing unit.
請求項18に記載の記録再生装置において、
上記所定のタイミングは、上記ディスク状記録媒体のアンマウント時である
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 18,
The recording / reproducing apparatus, wherein the predetermined timing is when the disc-shaped recording medium is unmounted.
請求項20に記載の記録再生装置において、
上記所定のタイミングは、装置の電源切断処理時である
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 20,
The recording / reproducing apparatus, wherein the predetermined timing is a power-off process of the apparatus.
請求項20に記載の記録再生装置において、
ホスト機能を有する機器と通信可能な通信部をさらに有し、
上記所定のタイミングは、上記通信部を介して上記ホスト機能を有する機器と接続を行う接続処理時である
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 20,
A communication unit capable of communicating with a device having a host function;
The recording / reproducing apparatus according to claim 1, wherein the predetermined timing is a connection process for connecting to the device having the host function via the communication unit.
請求項18に記載の記録再生装置において、
上記所定のタイミングは、上記ディスク状記録媒体のマウント時である
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 18,
The recording / reproducing apparatus, wherein the predetermined timing is when the disc-shaped recording medium is mounted.
請求項23に記載の記録再生装置において、
上記所定のタイミングは、装置の電源投入処理時である
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 23,
The recording / reproducing apparatus, wherein the predetermined timing is a power-on process of the apparatus.
請求項23に記載の記録再生装置において、
ホスト機能を有する機器と通信可能な通信部をさらに有し、
上記所定のタイミングは、上記通信部を介して接続された上記ホスト機能を有する機器が、該接続を解除したタイミングである
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 23,
A communication unit capable of communicating with a device having a host function;
The recording / reproducing apparatus, wherein the predetermined timing is a timing at which a device having the host function connected via the communication unit releases the connection.
請求項18に記載の記録再生装置において、
上記制御部は、
上記記憶媒体に書き込まれた上記書き込み要求されたデータが上記ディスク状記録媒体に書き込まれたら、上記記憶媒体から該書き込み要求されたデータを削除すると共に、上記管理情報の対応する情報を削除する
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 18,
The control unit
When the write-requested data written to the storage medium is written to the disc-shaped recording medium, the write-requested data is deleted from the storage medium and the corresponding information in the management information is deleted. A recording / reproducing apparatus.
請求項26に記載の記録再生装置において、
上記制御部は、
上記再生部により上記ディスク状記録媒体から読み出し要求に基づきデータが再生される際に、
上記管理情報に基づき、上記読み出し要求に示されるデータ範囲に含まれるデータが上記記憶媒体に書き込まれているとされれば、上記ディスク状記録媒体からのデータの再生時に、上記記憶媒体の上記読み出し要求に示されるデータ範囲に含まれるデータに対応する部分では該記憶媒体から対応する該データを読み出すようにした
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 26,
The control unit
When data is reproduced based on a read request from the disk-shaped recording medium by the reproduction unit,
If the data included in the data range indicated in the read request is written to the storage medium based on the management information, the read of the storage medium is performed when reproducing the data from the disc-shaped recording medium. A recording / reproducing apparatus, wherein the data corresponding to the data included in the data range indicated in the request is read from the storage medium.
請求項17に記載の記録再生装置において、
上記判断部は、
上記記録部による上記ディスク状記録媒体に対するデータの書き込みの際に記録エラーが発生したら、上記書き込み要求されたデータの書き込みが正常に行われないと判断する
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 17,
The judgment part
A recording / reproducing apparatus, wherein if a recording error occurs during the writing of data to the disk-shaped recording medium by the recording unit, it is determined that the writing of the requested data is not performed normally.
請求項28に記載の記録再生装置において、
上記記録エラーは、記録処理のタイムアウトである
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 28,
The recording / reproducing apparatus according to claim 1, wherein the recording error is a recording processing timeout.
請求項17に記載の記録再生装置において、
上記ディスク状記録媒体に加えられる加速度、振動、および/または衝撃を検出するセンサ部をさらに有し、
上記判断部は、
上記センサ部により上記加速度、振動、および/または衝撃が検出されたら、上記書き込み要求されたデータの上記書き込みが正常に行われないと判断する
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 17,
A sensor unit for detecting acceleration, vibration, and / or impact applied to the disk-shaped recording medium;
The judgment part
A recording / reproducing apparatus, wherein when the acceleration, vibration, and / or impact is detected by the sensor unit, it is determined that the writing of the data requested to be written is not normally performed.
請求項17に記載の記録再生装置において、
上記管理情報は、
少なくとも、上記書き込み要求に基づく上記ディスク状記録媒体上のアドレスを示すアドレス情報と、該書き込み要求されたデータを上記記憶媒体に書き込んだ際の該記憶媒体上のアドレスを示すアドレス情報とが関連付けられる
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 17,
The above management information
At least address information indicating an address on the disk-shaped recording medium based on the write request is associated with address information indicating an address on the storage medium when the data requested to be written is written to the storage medium. And a recording / reproducing apparatus.
請求項17に記載の記録再生装置において、
上記記憶媒体は、フラッシュメモリである
ことを特徴とする記録再生装置。
The recording / reproducing apparatus according to claim 17,
The recording / reproducing apparatus, wherein the storage medium is a flash memory.
ディスク状記録媒体にデータを記録し、ディスク状記録媒体からデータを再生する記録再生方法において、
書き込み要求されたデータをディスク状記録媒体に書き込む記録のステップと、
ディスク状記録媒体に書き込まれたデータを読み出し要求に基づき再生する再生のステップと、
上記ディスク状記録媒体に対する上記書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断のステップと、
上記記録のステップによる上記ディスク状記録媒体に対するデータの書き込みと、上記再生のステップによる上記ディスク状記録媒体からのデータの再生とを制御する制御のステップと
を有し、
上記制御のステップは、
上記判断のステップにより上記書き込み要求されたデータの上記書き込みが正常に行われないと判断された場合に、該書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、該書き込み要求されたデータの管理情報を作成し保持するようにした
ことを特徴とする記録再生方法。
In a recording / reproducing method for recording data on a disk-shaped recording medium and reproducing data from the disk-shaped recording medium,
A recording step of writing the requested data to the disc-shaped recording medium;
A reproduction step of reproducing data written on the disk-shaped recording medium based on a read request;
A step of determining whether or not writing of the data requested to be written to the disc-shaped recording medium is normally performed;
A control step for controlling the writing of data to the disc-shaped recording medium by the recording step and the reproduction of the data from the disc-shaped recording medium by the reproducing step;
The above control steps are:
When it is determined in the determination step that the writing of the data requested to be written is not normally performed, the data requested to be written is written to a nonvolatile storage medium, and the data requested to be written A recording / reproducing method characterized in that management information is created and held.
ディスク状記録媒体にデータを記録し、ディスク状記録媒体からデータを再生する記録再生方法をコンピュータ装置に実行させる記録再生プログラムにおいて、
上記記録再生方法は、
書き込み要求されたデータをディスク状記録媒体に書き込む記録のステップと、
ディスク状記録媒体に書き込まれたデータを読み出し要求に基づき再生する再生のステップと、
上記ディスク状記録媒体に対する上記書き込み要求されたデータの書き込みが正常に行われるか否かを判断する判断のステップと、
上記記録のステップによる上記ディスク状記録媒体に対するデータの書き込みと、上記再生のステップによる上記ディスク状記録媒体からのデータの再生とを制御する制御のステップと
を有し、
上記制御のステップは、
上記判断のステップにより上記書き込み要求されたデータの上記書き込みが正常に行われないと判断された場合に、該書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、該書き込み要求されたデータの管理情報を作成し保持する
ようにした記録再生方法をコンピュータ装置に実行させる
ことを特徴とする記録再生プログラム。
In a recording / reproducing program for causing a computer apparatus to execute a recording / reproducing method for recording data on a disc-shaped recording medium and reproducing the data from the disc-shaped recording medium,
The above recording / reproducing method is:
A recording step of writing the requested data to the disc-shaped recording medium;
A reproduction step of reproducing data written on the disk-shaped recording medium based on a read request;
A step of determining whether or not writing of the data requested to be written to the disc-shaped recording medium is normally performed;
A control step for controlling the writing of data to the disc-shaped recording medium by the recording step and the reproduction of the data from the disc-shaped recording medium by the reproducing step;
The above control steps are:
When it is determined in the determination step that the writing of the data requested to be written is not normally performed, the data requested to be written is written to a nonvolatile storage medium, and the data requested to be written A recording / reproducing program for causing a computer apparatus to execute a recording / reproducing method for creating and holding management information.
撮像部で被写体を撮像して得られたビデオデータをディスク状記録媒体に記録し、ディスク状記録媒体からビデオデータを再生する撮像装置において、
被写体を撮像してビデオデータを出力する撮像部と、
書き込み要求されたビデオデータをディスク状記録媒体に書き込む記録部と、
ディスク状記録媒体に書き込まれたビデオデータを読み出し要求に基づき再生する再生部と、
上記ディスク状記録媒体に対する上記書き込み要求されたビデオデータの書き込みが正常に行われるか否かを判断する判断部と、
上記記録部による上記ディスク状記録媒体に対するビデオデータの書き込みと、上記再生部による上記ディスク状記録媒体からのビデオデータの再生とを制御する制御部と
を有し、
上記制御部は、
上記判断部により上記書き込み要求されたビデオデータの上記書き込みが正常に行われないと判断された場合に、該書き込み要求されたデータを不揮発性の記憶媒体に書き込むと共に、該書き込み要求されたビデオデータの管理情報を作成し保持するようにした
ことを特徴とする撮像装置。
In an imaging apparatus for recording video data obtained by imaging a subject with an imaging unit on a disk-shaped recording medium and reproducing the video data from the disk-shaped recording medium,
An imaging unit for imaging a subject and outputting video data;
A recording unit for writing the requested video data to a disc-shaped recording medium;
A playback unit for playing back video data written on a disk-shaped recording medium based on a read request;
A determination unit for determining whether or not the writing of the video data requested to be written to the disc-shaped recording medium is normally performed;
A controller for controlling the writing of video data to the disc-shaped recording medium by the recording unit and the reproduction of video data from the disc-shaped recording medium by the reproducing unit;
The control unit
When the determination unit determines that the writing of the video data requested to be written is not normally performed, the data requested to be written is written to a nonvolatile storage medium and the video data requested to be written An imaging apparatus characterized in that the management information is created and held.
請求項35に記載の撮像装置において、
上記制御部は、
上記記憶媒体に書き込まれた上記書き込み要求されたビデオデータを、所定のタイミングで、上記管理情報に基づき上記ディスク状記録媒体に書き込むようにした
ことを特徴とする撮像装置。
The imaging device according to claim 35,
The control unit
An image pickup apparatus, wherein the video data requested to be written written to the storage medium is written to the disc-shaped recording medium based on the management information at a predetermined timing.
請求項36に記載の撮像装置において、
上記所定のタイミングは、上記再生部による、上記ディスク状記録媒体に書き込まれたビデオデータの再生時である
ことを特徴とする撮像装置。
The imaging device according to claim 36,
The imaging apparatus according to claim 1, wherein the predetermined timing is when the video data written on the disc-shaped recording medium is reproduced by the reproducing unit.
請求項36に記載の撮像装置において、
上記所定のタイミングは、上記ディスク状記録媒体のアンマウント時である
ことを特徴とする撮像装置。
The imaging device according to claim 36,
The imaging apparatus according to claim 1, wherein the predetermined timing is when the disc-shaped recording medium is unmounted.
請求項38に記載の撮像装置において、
上記所定のタイミングは、装置の電源切断処理時である
ことを特徴とする撮像装置。
40. The imaging device according to claim 38.
The imaging apparatus according to claim 1, wherein the predetermined timing is a power-off process of the apparatus.
請求項38に記載の撮像装置において、
ホスト機能を有する機器と通信可能な通信部をさらに有し、
上記所定のタイミングは、上記通信部を介して上記ホスト機能を有する機器と接続を行う接続処理時である
ことを特徴とする撮像装置。
40. The imaging device according to claim 38.
A communication unit capable of communicating with a device having a host function;
The imaging apparatus according to claim 1, wherein the predetermined timing is a connection process for connecting to a device having the host function via the communication unit.
請求項36に記載の撮像装置において、
上記所定のタイミングは、上記ディスク状記録媒体のマウント時である
ことを特徴とする撮像装置。
The imaging device according to claim 36,
The imaging apparatus according to claim 1, wherein the predetermined timing is when the disc-shaped recording medium is mounted.
請求項41に記載の撮像装置において、
上記所定のタイミングは、装置の電源投入処理時である
ことを特徴とする撮像装置。
The imaging apparatus according to claim 41,
The imaging apparatus according to claim 1, wherein the predetermined timing is a power-on process of the apparatus.
請求項41に記載の撮像装置において、
ホスト機能を有する機器と通信可能な通信部をさらに有し、
上記所定のタイミングは、上記通信部を介して接続された上記ホスト機能を有する機器が、該接続を解除したタイミングである
ことを特徴とする撮像装置。
The imaging apparatus according to claim 41,
A communication unit capable of communicating with a device having a host function;
The imaging apparatus according to claim 1, wherein the predetermined timing is a timing at which the device having the host function connected via the communication unit releases the connection.
請求項36に記載の撮像装置において、
上記制御部は、
上記記憶媒体に書き込まれた上記書き込み要求されたビデオデータが上記ディスク状記録媒体に書き込まれたら、上記記憶媒体から該書き込み要求されたビデオデータを削除すると共に、上記管理情報の対応する情報を削除する
ことを特徴とする撮像装置。
The imaging device according to claim 36,
The control unit
When the video data requested to be written written to the storage medium is written to the disc-shaped recording medium, the video data requested to be written is deleted from the storage medium and the corresponding information of the management information is deleted. An imaging apparatus characterized by:
請求項44に記載の撮像装置において、
上記制御部は、
上記再生部により上記ディスク状記録媒体から読み出し要求に基づきビデオデータが再生される際に、
上記管理情報に基づき、上記読み出し要求に示されるビデオデータ範囲に含まれるビデオデータが上記記憶媒体に書き込まれているとされれば、上記ディスク状記録媒体からのビデオデータの再生時に、上記記憶媒体の上記読み出し要求に示されるビデオデータ範囲に含まれるビデオデータに対応する部分では該記憶媒体から対応する該ビデオデータを読み出すようにした
ことを特徴とする撮像装置。
45. The imaging device according to claim 44, wherein
The control unit
When video data is played back based on a read request from the disc-shaped recording medium by the playback unit,
If the video data included in the video data range indicated in the read request is written to the storage medium based on the management information, the storage medium can be used when reproducing the video data from the disc-shaped recording medium. An image pickup apparatus, wherein the video data corresponding to the video data included in the video data range indicated in the read request is read from the storage medium.
請求項35に記載の撮像装置において、
上記判断部は、
上記記録部による上記ディスク状記録媒体に対するビデオデータの書き込みの際に記録エラーが発生したら、上記書き込み要求されたビデオデータの書き込みが正常に行われないと判断する
ことを特徴とする撮像装置。
The imaging device according to claim 35,
The judgment part
An image pickup apparatus, wherein if a recording error occurs when video data is written to the disk-shaped recording medium by the recording unit, it is determined that the video data requested to be written is not normally written.
請求項46に記載の撮像装置において、
上記記録エラーは、記録処理のタイムアウトである
ことを特徴とする撮像装置。
The imaging device according to claim 46,
The imaging apparatus, wherein the recording error is a timeout of recording processing.
請求項35に記載の撮像装置において、
上記ディスク状記録媒体に加えられる加速度、振動、および/または衝撃を検出するセンサ部をさらに有し、
上記判断部は、
上記センサ部により上記加速度、振動、および/または衝撃が検出されたら、上記書き込み要求されたビデオデータの上記書き込みが正常に行われないと判断する
ことを特徴とする撮像装置。
The imaging device according to claim 35,
A sensor unit for detecting acceleration, vibration, and / or impact applied to the disk-shaped recording medium;
The judgment part
An imaging apparatus, wherein when the acceleration, vibration, and / or impact is detected by the sensor unit, it is determined that the writing of the video data requested to be written is not normally performed.
請求項35に記載の撮像装置において、
上記管理情報は、
少なくとも、上記書き込み要求に基づく上記ディスク状記録媒体上のアドレスを示すアドレス情報と、該書き込み要求されたビデオデータを上記記憶媒体に書き込んだ際の該記憶媒体上のアドレスを示すアドレス情報とが関連付けられる
ことを特徴とする撮像装置。
The imaging device according to claim 35,
The above management information
At least address information indicating an address on the disk-shaped recording medium based on the write request is associated with address information indicating an address on the storage medium when the video data requested to be written is written to the storage medium. An imaging device characterized in that the imaging device is provided.
請求項35に記載の撮像装置において、
上記記憶媒体は、フラッシュメモリである
ことを特徴とする撮像装置。
The imaging device according to claim 35,
An image pickup apparatus, wherein the storage medium is a flash memory.
JP2006256723A 2006-09-22 2006-09-22 Recording apparatus, recording method and recording program, recording / reproducing apparatus, recording / reproducing method, recording / reproducing program, and imaging apparatus Pending JP2008077780A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006256723A JP2008077780A (en) 2006-09-22 2006-09-22 Recording apparatus, recording method and recording program, recording / reproducing apparatus, recording / reproducing method, recording / reproducing program, and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006256723A JP2008077780A (en) 2006-09-22 2006-09-22 Recording apparatus, recording method and recording program, recording / reproducing apparatus, recording / reproducing method, recording / reproducing program, and imaging apparatus

Publications (1)

Publication Number Publication Date
JP2008077780A true JP2008077780A (en) 2008-04-03

Family

ID=39349668

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006256723A Pending JP2008077780A (en) 2006-09-22 2006-09-22 Recording apparatus, recording method and recording program, recording / reproducing apparatus, recording / reproducing method, recording / reproducing program, and imaging apparatus

Country Status (1)

Country Link
JP (1) JP2008077780A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011114809A (en) * 2009-11-30 2011-06-09 Mega Chips Corp Video-recording data recording and management system
JP2013161490A (en) * 2012-02-01 2013-08-19 Toshiba Corp Magnetic disk device, read/write control method and controller
JP2014130657A (en) * 2012-12-28 2014-07-10 Mega Chips Corp Video recording device and monitoring camera system
WO2022180905A1 (en) * 2021-02-25 2022-09-01 パナソニックIpマネジメント株式会社 Data recording system and method for controlling data recording system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011114809A (en) * 2009-11-30 2011-06-09 Mega Chips Corp Video-recording data recording and management system
JP2013161490A (en) * 2012-02-01 2013-08-19 Toshiba Corp Magnetic disk device, read/write control method and controller
US9514787B2 (en) 2012-02-01 2016-12-06 Kabushiki Kaisha Toshiba Magnetic disk apparatus, read/write control method, and controller
JP2014130657A (en) * 2012-12-28 2014-07-10 Mega Chips Corp Video recording device and monitoring camera system
WO2022180905A1 (en) * 2021-02-25 2022-09-01 パナソニックIpマネジメント株式会社 Data recording system and method for controlling data recording system
JPWO2022180905A1 (en) * 2021-02-25 2022-09-01
JP7752363B2 (en) 2021-02-25 2025-10-10 パナソニックIpマネジメント株式会社 Data recording system and method for controlling the data recording system

Similar Documents

Publication Publication Date Title
US7502549B2 (en) Reproducing apparatus
CN101140781B (en) Apparatus and method for processing information
JP5253042B2 (en) Recording apparatus, control method thereof, and program
JP5268569B2 (en) Recording apparatus and recording method
JP2008077780A (en) Recording apparatus, recording method and recording program, recording / reproducing apparatus, recording / reproducing method, recording / reproducing program, and imaging apparatus
EP1662394A2 (en) Method for accessing data sectors and processing an access failure in a hard disk drive of a mobile communication terminal
JP5523128B2 (en) Recording apparatus and control method thereof
JP2011159240A (en) Recording device and control method of the same
JP5053945B2 (en) Recording medium initialization method and recording medium initialization apparatus
JP4314461B2 (en) Information processing apparatus, imaging apparatus, and information processing method
JP4543641B2 (en) RECORDING DEVICE, RECORDING METHOD, IMAGING DEVICE, AND IMAGING METHOD
JP3975586B2 (en) Recording / reproducing apparatus and method, and program recording medium
KR20090027103A (en) File Divide and Merge Method using File Allocation Table
CN1945716B (en) Recording device and recording medium management method
JP2008226309A (en) Information recording apparatus and information recording method
JP5950798B2 (en) Recording apparatus and control method thereof
JP4356011B2 (en) Recording apparatus and method, imaging apparatus, recording medium, and program
JP2006114145A (en) Movie recording / reproducing apparatus and disk medium protecting method
JP4332516B2 (en) Digital data recording / reproducing device
JP2007059004A (en) Information processing apparatus and method, program, and recording medium
JP4298583B2 (en) Imaging device and mobile phone
JP2004173244A (en) Data recording device, its program, and recording medium
JP4318040B2 (en) Information editing apparatus, imaging apparatus, and information editing method
JP5063382B2 (en) Recording / reproducing apparatus, recording apparatus and reproducing apparatus
JP5683127B2 (en) Recording device