JP2004005423A - File data storage managing method, file data storage device, program executing processing for storing file data, and recording medium - Google Patents

File data storage managing method, file data storage device, program executing processing for storing file data, and recording medium Download PDF

Info

Publication number
JP2004005423A
JP2004005423A JP2003030411A JP2003030411A JP2004005423A JP 2004005423 A JP2004005423 A JP 2004005423A JP 2003030411 A JP2003030411 A JP 2003030411A JP 2003030411 A JP2003030411 A JP 2003030411A JP 2004005423 A JP2004005423 A JP 2004005423A
Authority
JP
Japan
Prior art keywords
unit
data
file data
real
stored
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003030411A
Other languages
Japanese (ja)
Other versions
JP3631234B2 (en
Inventor
Yuichi Kanai
金井 雄一
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2003030411A priority Critical patent/JP3631234B2/en
Publication of JP2004005423A publication Critical patent/JP2004005423A/en
Application granted granted Critical
Publication of JP3631234B2 publication Critical patent/JP3631234B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently store real-time file data, having large capacity with suppressing fragmentation generated by repeatedly storing and erasing file data having small capacity. <P>SOLUTION: A unit is constituted from a block, depended on a physical storage unit and also a plurality of contiguous blocks. This unit is configured to capacity, to assure real-time processing. The real-time file data, such as video data are stored in units. The data to be processed in non-real-time are stored in units of the block. A unit management table is arranged, and whether the unit is available at recording is recognized, on the basis of the unit management table. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、ファイルデータ記憶管理方法、ファイルデータ記憶装置、ファイルデータを記憶するための処理を実行するプログラムおよび記憶媒体に関し、特に、リアルタイムファイルデータと非リアルタイムファイルデータを効率的に記憶し得るものである。
【0002】
【従来の技術】
一つのファイルを構成するデータ(以下、ファイルデータという)を記憶媒体に記憶する場合、記憶媒体の記憶領域を所定の同一容量に分割したブロックに対してファイルデータを割り当てる方法がとられる。このファイル記憶方法では、ブロック管理テーブルによって、各ブロックの使用/未使用が管理されている。
【0003】
ファイルデータの記憶は、このブロック管理テーブルを参照して未使用ブロックを検索し、ファイルデータの容量に従って複数の未使用ブロックをデータ記憶用として割り当てることにより行われる。この際、どのブロックを用いてファイル情報を記憶したかを示すファイル構成テーブルが作成される。このファイル構成テーブルとしては、例えば、FAT(File Allocation Table)などが用いられる。FATはファイルを構成するブロックの物理的な繋がりを規定するものである。具体的には、ブロックに付されたユニークなブロック番号を用いて、記憶領域の全てのブロックに対し、そのブロック番号とそのブロックと論理的に続くブロックの番号とを対応づけるテーブルが作成される。
【0004】
【発明が解決しようとする課題】
ブロック長以上の容量を持つファイルデータ、例えば映像やオーディオなどの記憶容量の大きいデータを記憶する場合には、複数のブロックに跨ってファイルデータが格納されることとなる。ここで、記憶媒体上の物理的に非連続な領域に飛び飛びにデータが記憶されると、これらのデータをリアルタイム処理して読出す場合に、ドライブヘッドの移動時間によって、アクセスをスムーズに行なうことができず、連続的なデータ処理が困難になってしまう可能性がある。したがって、このようなリアルタイム処理される大容量データの記憶を考慮すると、一つのブロックの容量を大きく設定し、物理的に連続した領域を少しでも大きく確保するようにするのが望ましい。
【0005】
一方、ファイルのデータ容量は、ファイルの種類によってさまざまであり、ごく小さな文書ファイル等のように、非常にデータ容量の小さいファイルも存在する。
【0006】
しかしながら、現状のファイル記憶方法においては、ファイルデータの記憶はブロック単位で実行されるため、1つのブロックに2つ以上のファイルデータを記憶することはできない。したがって、ブロックの容量を大きく取りすぎると、各ブロック内に、実際のデータは記憶されていないが他のファイルのデータを記憶することが不可能な空き領域が増加してしまい、その結果、記憶領域の使用効率が著しく低下してしまうという問題が生じる。
【0007】
反対に、ブロックの容量を小さくしすぎると、大容量のファイルデータを記録する場合に、リンクされるブロックの数が非常に大きくなり、これらのデータを読出す際のアクセス性能の低下が懸念される。
【0008】
また、データを頻繁に入出力することによって、データの記憶・消去が繰り返されると、物理的に連続した空き領域を確保することが困難となり、いわゆるフラグメンテーション(断片化)が生じるという問題点も起こり得る。
【0009】
図14に、記憶媒体に対するファイルデータの割り当ての一例と、その際のブロック管理テーブルおよび各ブロックの使用状態を示す。同図のブロック管理テーブル中、1はそのブロックが使用されている状態、0はそのブロックが未使用の状態を示す。また、図中のハッチ部30xが使用ブロック、無地部30yが未使用の空きブロックである。図14では、空ブロックが点在しており、フラグメンテーションが発生している。
【0010】
これに対し、例えば図15に示すように、4つのブロックを一つのブロックとみなすように管理テーブルを構成することもできる。このようにブロック管理テーブルで扱うデータ容量を大きくすることで、前述のフラグメンテーションの問題をある程度解決することができる。しかしこのようにすると、前述したように、記憶領域の使用効率が著しく低下することとなる。
【0011】
そこで、本発明は、かかる問題を解消し、リアルタイムファイルの記憶再生に適したファイルデータの割り当てを行いながら、同時に、フラグメンテーションの発生を抑制することにより、容量の小さいファイルデータをも効率的に記憶再生し得るデータ記憶方法を提供することを目的としている。
【0012】
【課題を解決するための手段】
本発明は、連続した複数のブロックからユニットを構成し、このユニットの属性をユニット属性テーブルによって管理するものである。このユニット属性テーブルは、各ユニットの使用状況と、リアルタイムデータを記憶可能か否かを規定する情報を含んでいる。
【0013】
記憶されるファイルデータがリアルタイムデータである場合、前記ユニット属性テーブルを参照して、リアルタイムデータが記憶可能な未使用のユニットを検索し、検索されたユニットに含まれる前記ブロックにこのファイルデータが記憶される。また、記憶されるファイルデータが非リアルタイムデータである場合、前記ユニット属性テーブルを参照して、そのユニット中の一部のブロックに既に非リアルタイムデータが記憶されているユニットを検索し、この検索により獲得されたユニットに含まれる未使用のブロックにこのファイルデータを記憶される。
【0014】
このように、記憶されるファイルデータがリアルタイムデータであるか非リアルタイムデータによって、記録処理を変更することにより、未使用のユニット数を増加させることができ、よって、効率的にリアルタイムデータの記憶を行うことができるようになる。
【0015】
本発明の一つの局面は、たとえば、ブロックにデータが記憶されているか否かを管理するブロック管理テーブルと、連続した複数の前記ブロックから構成したユニットの属性を管理するユニット属性テーブルと、前記ユニット属性テーブルに基づいてファイルデータを記憶するデータ記憶処理とを含むファイルデータ記憶方法として把握することができる。
【0016】
ここで、ユニット属性テーブルは、各ユニットの使用状況と、リアルタイムデータを記憶可能か否かを規定する情報を含むものである。また、データ記憶処理は、記憶されるファイルデータがリアルタイムデータである場合、前記ユニット属性テーブルを参照して、リアルタイムデータが記憶可能な未使用のユニットを検索し、検索されたユニットに含まれる前記ブロックにこのファイルデータを記憶し、記憶されるファイルデータが非リアルタイムデータである場合、前記ユニット属性テーブルを参照して、そのユニット中の一部のブロックに既に非リアルタイムデータが記憶されているユニットを検索し、この検索により獲得されたユニットに含まれる未使用のブロックにこのファイルデータを記憶する処理を含む。
【0017】
本発明の他の局面は、たとえば、ブロックにデータが記憶されているか否かを管理するブロック管理テーブルを生成するための手段と、連続した複数の前記ブロックから構成したユニットの属性を管理するユニット属性テーブルを生成するための手段と、前記ユニット属性テーブルに基づいてファイルデータを記憶する処理を実行するための手段とを含むファイルデータ記憶装置として把握することができる。
【0018】
本発明のさらに他の局面は、たとえば、ブロックにデータが記憶されているか否かを管理するブロック管理テーブルを生成する処理と、連続した複数の前記ブロックからユニットを構成し、且つ、各ユニットの属性を管理するユニット属性テーブルを生成する処理と、前記ユニット属性テーブルに基づいてファイルデータを記憶するデータ記憶処理を含む処理を実行するためのプログラムとして把握することもできる。
【0019】
本発明のさらに他の局面は、たとえば、主データの他に、少なくとも、前記ブロックにデータが記憶されているか否かを管理するブロック管理テーブルと、連続した複数の前記ブロックから構成したユニットの属性を管理するユニット属性テーブルが記憶された記憶媒体として把握することもできる。
【0020】
以上の各局面の改良として、前記属性管理テーブルが、さらに、各ユニットに対する書き込みおよび/または読み出しレートのランクを規定する情報を含むようにすることもできる。この際、各局面におけるデータ記憶処理は、記憶されるファイルデータがリアルタイムデータである場合、前記ユニット属性テーブルを参照して、このファイルデータに要求される書き込みおよび/または読み出しレートを満たす未使用の前記ユニットを検索し、検索されたユニットに含まれる前記ブロックにこのファイルデータを記憶する処理を含む。
【0021】
このように構成すると、要求されるビットレートが相違する種々のリアルタイムファイルデータを、記録領域上に効率的に振り分けて記録することができ、よって、記録領域の使用効率をより向上させることができるとのメリットをさらに奏することができる。
【0022】
本発明の前記ならびにその他の目的と新規な特徴は、以下に示す実施の形態の説明を添付図面と照らし合わせて読むと、より完全に明らかとなるであろう。
【0023】
本発明の請求項における「ブロック」は、実施形態においては、「ブロック」に相当する。また、本発明の請求項における「ユニット」は、実施形態においては、「ユニット」に相当する。また、本発明の請求項における「ブロック管理テーブル」は、実施形態においては、「ブロック管理テーブル210」に相当する。また、本発明の請求項における「ユニット属性テーブル」は、実施形態においては、「ユニット管理テーブル211」に相当する。また、本発明の請求項における「記憶媒体」は、実施形態においては、「ハードディスクドライブ118(これに内蔵されたハードディスク)」に相当する。
【0024】
ただし、以下の実施の形態は、あくまでも、本発明の一つの実施形態であって、本発明ないし各構成要件の用語の意義は、以下の実施の形態に記載されたものに制限されるものではない。
【0025】
【発明の実施の形態】
以下、本発明の実施の形態について図面を参照して説明する。
【0026】
A.第1の実施形態
図1は、本発明の一実施形態におけるデジタル記録再生装置の全体構成を示すブロック図である。なお、図1において、太線で示した信号線は、映像および/または音声データの流れを表わす信号線であり、細線で示した信号線は、制御信号の流れを表わす信号線である。
【0027】
デジタル記録再生装置は、アンテナ100、外部入力端子101、チューナ102および103、セレクタ104、A/Dコンバータ105および106、MPEG2ビデオエンコーダ107および108、オーディオエンコーダ109および110、マルチプレクサ/デマルチプレクサ111、MPEG2ビデオデコーダ112、オーディオデコーダ113、D/Aコンバータ114、バッファメモリ115および116、ハードディスクドライブコントローラモジュール117、ハードディスクドライブ118、システムコントローラ119、メモリ120、ユーザインタフェース121、グラフィックコントローラ122、テレビジョンモニタ123、リアルタイムクロックモジュール124、デジタルインプット125、デジタルアウトプット126、LED127から構成されている。
【0028】
図1を参照して、アンテナ100で受信した、例えばテレビジョン放送の信号電波は、チューナ102および103に同時に与えられる。
【0029】
チューナ102は、アンテナ100で受信した信号電波から、ユーザによって指定された1つのチャネルの信号電波を選択し、映像信号と音声信号とからなるアナログのテレビジョン信号に復調してセレクタ104の一方入力に与える。セレクタ104の他方入力には、ビデオテープレコーダ(VTR)、カムコーダ等の各種の外部テレビジョン信号源が接続可能な外部入力端子101が接続される。
【0030】
セレクタ104は、チューナ102からの出力または外部入力端子101からの入力のいずれかを選択してA/Dコンバータ105に与えるとともに、グラフィックコントローラ122の1つの入力に与える。一般に、セレクタ104は、外部入力端子101に何らかの外部信号源が接続されている場合には、外部入力端子101からの入力を選択し、接続されていない場合にはチューナ102の出力を選択する。
【0031】
A/Dコンバータ105は、セレクタ104から出力されるアナログのテレビジョン信号の映像信号および音声信号をそれぞれデジタル信号に変換し、デジタル映像信号をMPEG2ビデオエンコーダ107に与えるとともに、デジタル音声信号をオーディオエンコーダ109に与える。
【0032】
MPEG2ビデオエンコーダ107は、与えられたデジタル映像信号を圧縮してマルチプレクサ/デマルチプレクサ111に与え、オーディオエンコーダ109は、与えられたデジタル音声信号を圧縮してマルチプレクサ/デマルチプレクサ111に与える。マルチプレクサ/デマルチプレクサ111は、与えられた映像信号のストリームと音声信号のストリームとをマルチプレクスし、MPEG2のシステムストリームに変換する。
【0033】
一方、チューナ103は、アンテナ100で受信した信号電波から、ユーザによって指定された1つのチャネルの信号電波を選択し、映像信号と音声信号とからなるアナログのテレビジョン信号に復調してA/Dコンバータ106に与えるとともに、グラフィックコントローラ122のもう1つの入力に与える。
【0034】
A/Dコンバータ106は、チューナ103から出力されるアナログのテレビジョン信号の映像信号および音声信号をそれぞれデジタル信号に変換し、デジタル映像信号をMPEG2ビデオエンコーダ108に与えるとともに、デジタル音声信号をオーディオエンコーダ110に与える。
【0035】
MPEG2ビデオエンコーダ108は、与えられたデジタル映像信号を圧縮してマルチプレクサ/デマルチプレクサ111に与え、オーディオエンコーダ110は、与えられたデジタル音声信号を圧縮してマルチプレクサ/デマルチプレクサ111に与える。マルチプレクサ/デマルチプレクサ111は、与えられた映像信号のストリームと音声信号のストリームとをマルチプレクスし、MPEG2のシステムストリームに変換する。
【0036】
このデジタル記録再生装置には、ランダムアクセス可能な記憶媒体の一例としてのハードディスクを内蔵するハードディスクドライブ(以下、HDD)118が、取外し可能に装着される。以下の説明においては、便宜上この単体のHDD118そのものを書き込み読み出し可能な記憶媒体と見なすことにする。このHDD118へのデータの書込、およびHDD118からのデータの読出は、後述するようにHDDコントローラモジュール117によって実行される。
【0037】
上述のマルチプレクサ/デマルチプレクサ111と、このHDDコントローラモジュール117との間には、バッファメモリ115を途中に含む第1のデータバスと、バッファメモリ116を途中に含む第2のデータバスとからなる2系統のデータチャネルが設けられている。
【0038】
さらに、デジタルインプット125を介して外部接続された他の装置からのデジタルデータがバッファメモリ115に入力可能であり、一方バッファメモリ116のデジタルデータは、デジタルアウトプット126を介して外部接続された他の装置へ出力可能である。
【0039】
したがって、後述するように、バッファメモリ115および116を介して、マルチプレクサ/デマルチプレクサ111と、HDDコントローラモジュール117と、デジタルインプット125およびデジタルアウトプット126との間で、MPEG2のシステムストリームデータのやり取りが行なわれることになる。
【0040】
マルチプレクサ/デマルチプレクサ111は、バッファメモリ115および116から受取ったMPEG2のシステムストリームを、映像信号のストリームと音声信号のストリームとにデマルチプレクスし、前者をMPEG2ビデオデコーダ112に、後者をオーディオデコーダ113に与える。
【0041】
MPEG2ビデオデコーダ112は、与えられた映像信号のストリームをデコードしてD/Aコンバータ114に与え、オーディオデコーダ113は、与えられた音声信号のストリームをデコードしてD/Aコンバータ114に与える。D/Aコンバータ114は、与えられた信号をそれぞれアナログ信号に変換し、映像信号と音声信号とからなるアナログのテレビジョン信号をグラフィックコントローラ122のさらにもう1つの入力に与える。
【0042】
グラフィックコントローラ122は、セレクタ104と、チューナ103と、D/Aコンバータ114とからそれぞれ与えられたアナログのテレビジョン信号のいずれかを選択して、デジタル記録再生装置の外部に接続されたテレビジョンモニタ123に与える。
【0043】
マルチプレクサ/デマルチプレクサ111およびグラフィックコントローラ122の動作は、システムコントローラ120から与えられる制御信号によって制御される。
【0044】
また、このデジタル記録再生装置がデジタルインプット125およびデジタルアウトプット126を介して外部の他の装置と接続されたときに、システムコントローラ119からの制御信号はデジタルインプット125を介して(細線)他の装置のシステムコントローラ(図示せず)に与えられ、そのシステムコントローラからの制御信号は、デジタルアウトプット126を介して(細線)、このデジタル記録再生装置のシステムコントローラ119に与えられる。
【0045】
システムコントローラ119には、ユーザインタフェース121と、メモリ120と、リアルタイムクロックモジュール124とが接続される。
【0046】
図1に示したこの発明に係る上記デジタル記録再生装置の記憶、再生、消去等の基本動作原理については、ハードディスクドライブ118に対するファイル記憶方法との関係において後で詳細に説明する。
【0047】
次に、本実施の形態における記憶媒体であるハードディスクに記憶される情報について説明する。
【0048】
図2に示すように、記憶媒体であるハードディスクにデータをファイルとして記憶する場合、映像や音声などの記憶されるべきデータ自体(以下主データ20という)と、主データ20がファイルとして構成されるために必要な管理情報(以下メタデータ21という)がハードディスクに記憶される。
【0049】
メタデータ21は、ブロック管理テーブル210、ユニット管理テーブル211、ファイル管理情報212の3つの情報からなり、本デジタル記録再生装置において、記憶媒体の初期設定時に生成され、データが記録あるいは消去されるごとに更新される。
【0050】
以下に、図3を用いて、上記各管理情報について説明する。
【0051】
図3は、ユニット管理テーブルを用いた記録方法を模式的に説明する図である。
【0052】
<ブロック管理テーブル>
ブロック管理テーブル210は各ブロックの使用状況を管理するものである。当該ブロック管理テーブル210を構成するエントリ210a、210b、210c、210d、…は記憶領域30a、30b、30c、30d、…のブロックに対応しており、ブロックの使用状況に応じ、使用中のブロックの場合は“1”、未使用のブロックの場合は“0”を示す。
【0053】
<ユニット管理テーブル>
ユニット管理テーブル211は、HDD118の記憶領域をユニット単位のアドレス空間とみなしてユニット番号を順に付けたときに、それぞれのユニットの使用状態を管理する。
【0054】
ユニットは、エントリ211a、211b、…から構成され、例えば、エントリ211aは、ブロック管理テーブル210上のエントリ210a、210b、210c、210dに対応したユニットのエントリである。ユニット管理テーブル211は、そのユニットについて、リアルタイムファイルを記憶できるか否かを示すユニット状態情報と、ユニットの使用状況を示すユニット使用状況情報を示す。
【0055】
ここで、ユニットにリアルタイムファイルを記憶できるか否かは、例えば、後述の第2の実施形態における判別と同様、リード/ライトを実行するための特殊コマンドによる記憶・再生動作をモニタし、リアルタイムにて記憶・再生が保証されるかを判別することによってなされる。
【0056】
各ユニットのユニット状態情報とユニット使用状況情報は、図2に示す如く区分されている。ユニット使用状況情報において、“未使用”とは、ユニットを構成しているブロック全てが記憶可能である状態をいう。また、“RT全使用”とは、ユニットを構成しているブロック全てを連続してリアルタイムファイルの記憶に使用している状態をいう。また、“NRT一部使用”とは、ユニットを構成しているブロックの一部を非リアルタイムファイルの記憶に使用している状態をいう。また、“NRT全使用”とは、ユニットを構成しているブロック全てを非リアルタイムファイルの記憶に使用している状態をいう。
【0057】
ユニットは、リアルタイム処理をするために必要なサイズであるため、リアルタイムファイルにより一部使用されている状態は存在しない。また、ユニット内にリアルタイムファイルとノンリアルタイムファイルの両方が存在することはない。したがって、ユニットが“NRT一部使用”の場合、残りのブロックには非リアルタイムファイルのみ記憶可能である。
【0058】
<ファイル管理情報>
図2に戻り、ファイル管理情報212は、主データ20がファイルとして認識されるための管理情報である。
【0059】
主データ20に対応したファイルのファイル管理情報212には、主データ20を構成するブロックのリンク情報が記録されている。具体的には、主データ20に関する属性情報(図中非表示)と、ブロックの開始アドレス情報が参照順に記憶されている。
【0060】
上記属性情報は、主データ20が、リアルタイムに処理されるデータか否かを示す情報を含む。
【0061】
リアルタイムファイル201(図3参照)には、上記マルチプレクサ/デマルチプレクサ111によって作成されたMPEG2のシステムストリームなど、リアルタイムに処理される主データ20が、上述のユニット単位のデータとして格納される。
【0062】
したがって、リアルタイムファイル201の全体の容量は、必ずユニット単位容量の整数倍である。また、ブロック単位で記録を行なっているHDD118においても、リアルタイムファイル201の開始アドレスは、ユニットの境界にあたるアドレスでなくてはならない。これは、ユニット管理テーブル211において、記憶空間をユニット単位のアドレス空間とみなすためである。
【0063】
このリアルタイムファイル201のファイル構成を示すファイル管理情報212には、このリアルタイムファイル201が割り当てられているユニットに対応したブロックのリンク情報が記憶される。
【0064】
非リアルタイムファイル202の場合、リアルタイムに処理される必要がない主データ20が、ブロック単位のデータとして格納されるため、この非リアルタイムファイル201の全体の容量は、ブロック単位容量の整数倍となる。
【0065】
また、非リアルタイムファイル202のファイル構成を示すファイル管理情報212には、リアルタイムファイルと同様に、この非リアルタイムファイル202が割り当てられているブロックのリンク情報が記憶される。
【0066】
<ユニットの容量>
次に、本デジタル記録再生装置において、複数のストリームデータをリアルタイムで同時に扱うために必要なユニットの容量について説明する。
【0067】
まず、バッファメモリ115、116の容量Cと、書き込み/読み出しの単位ブロック長Lと、HDDコントローラモジュール117とHDD118との間のワーストケースのデータ転送レートBhddと、MPEG2システムストリームのレートBsysと、HDD118のシーク時間のワースト値Twとの関係について説明する。
【0068】
ただし、シーク時間のワースト値Twは、単なるヘッドのシークのみに要する時間ではなく、シークを開始してから実際にデータの書き込み/読み出しが始まるまでにかかる、シーク時間、回転待ち時間、ヘッド切換時間、ECC/EDC等の誤り訂正に要する時間、等の群遅延のワースト値をすべて考慮した時間である。
【0069】
同時に処理するストリーム数をNとした場合、すべてのストリームのリアルタイム性を保持するためには、以下の式を満たす必要がある。
Bhdd×Ts>N×(Tw+Ts)×Bsys …(1)
【0070】
ただし、Tsは、HDD118に対して、書き込み/読み出しの単位ブロック長Lを書き込み/読み出しするのに要する時間であり、Ts=L/Bhddで表わされる。
【0071】
上記の式(1)は、データの読み出しの場合は、あるストリームにおいて単位ブロックで読み出しを行なったデータ量が、N本のストリームを処理するのにかかるN回のシーク時間とN回のデータ書き込み/読み出し時間との和の時間内で消費し尽くさないように設計する必要があることを意味している。
【0072】
さらに、データの書き込みの場合は、N本のストリームを処理するのにかかる時間中に、バッファメモリ115、116に蓄積されるデータ量は最悪のケースで、N×(Tw+Ts)×Bsysであることを意味している。
【0073】
したがって、バッファメモリ115、116の容量Cは、以下の式を満たす必要がある。
C>N×(Tw+Ts)×Bsys …(2)
【0074】
上記の式(1)および(2)を満たすような設計を行なうことにより、N本のストリームを同時にリアルタイムで処理することが可能となる。ただし、Bhdd>N×Bsysを満たす範囲内でNを設定しなければならない。
【0075】
なお、HDD118からリアルタイムファイルのデータをバッファメモリ115、116に転送する場合、ユニット単位で読み出すと最も効率良く処理することができる。このとき、ユニット容量Usizeは次式で表わすことができる。
Usize= L…(3)
【0076】
ここで、上記の通り、Ts=L/Bhddだから、この関係式と(3)式とを上記(1)式に代入することにより、Usize容量の条件式として、下式を得ることができる。
Usize>N×(Tw+(Usize/Bhdd))×Bsys …(4)
【0077】
この容量のユニットに、一定時間の映像データと音声データとを格納する。なおこの実施形態の装置においては、MPEG2でエンコードされた映像データ(Group of Pictures:以下、GOP)とそれに対応する音声データとをマルチプレクサ/デマルチプレクサ111によってマルチプレクスしてシステムストリームとしている。
【0078】
また、1GOPのピクチャ数を15とすると、1ユニットの再生時間は次のようになる。
5*(15/30)=2.5秒
【0079】
ここで、これらのパラメータについて、ユニット単位での再生が保証されているかどうかの検証を行なう。
【0080】
前述の定義より、書き込み/読み出しの単位ユニット長をL=2752512バイトとすると、MPEG2のシステムストリームのレートBsysは、
Bsys=L/2.5=1101004バイト/秒
となる。
【0081】
本デジタル記録再生装置において、ストリームの本数をN=2とし、シーク時間のワースト値をTw=50ms、HDDコントローラモジュール118とHDD119との間のワーストケースのデータ転送レートをBhdd=5MB/秒とすると、
Ts=L/Bhdd=550ms
が成り立つ。したがって、式(1)の左辺Bhdd*Tsは、
Bhdd*Ts=5×10*550×10−3=2.7×10
式(1)の右辺N*(Tw+Ts)*Bsysは、
N*(Tw+Ts)*Bsys=2*(50+550)×10−3*1101004=1.32×10―
となり、上述の式(1)を満たすことになる。したがって、定義されたこれらのパラメータにおいてユニット単位でのデータの再生が保証される。
【0082】
次に、フローチャートを用いて、ファイルのリード(読み出し)およびライト(書き込み)動作を説明する。
【0083】
図4は、ファイルデータのリード動作を説明するフローチャートである。
【0084】
まず、ファイルがアプリケーションによってオープンされると(ステップS1)、当該ファイルのファイル管理情報が読み出され、このファイル管理情報中のリンク情報が参照される。上記の如く、リンク情報は、当該ファイル情報を記憶する各ブロックの開始アドレスを参照順に規定するものである。ファイル情報の読み出しは、このリンク情報を先頭から順番に参照して各ブロックの開始アドレスを取得し、取得した開始アドレスが示す記憶領域上のブロックからデータを順番に読み出すことによって行われる。ここで、リンク情報の参照位置は、ポインタによって管理される。
【0085】
まず、このリンク情報の先頭にポインタがセットされ(ステップS2)、ファイル情報を記憶する最初ブロックの開始アドレスが取得される。そして、この開始アドレスが示す記憶領域上のブロックからデータが読み出される(ステップS3)。
【0086】
次に、このブロックがファイルを構成する論理的なブロックの最後か否かが判断され(ステップS4)、最後である場合は、ファイルをクローズして(ステップS5)、リード動作が終了される。他方、ブロックがファイルを構成する論理的なブロックの最後でなく続くブロックが存在する場合は、リンク情報の参照位置を示すポインタが1つ進められ(ステップS2)、ファイル情報を記憶する次のブロックの開始アドレスが取得される。そして、このブロック開始アドレスが示す記憶領域上のブロックからデータが読み出される(ステップS3)。
【0087】
以上のデータ読み出しは、ステップS4にて、ポインタが示すブロックが最後のブロックであると判断されるまで繰り返される。これにより、当該ファイル情報が全て記憶媒体から読み出される。
【0088】
図5は、リアルタイムファイルのライト動作を説明するフローチャートである。
【0089】
アプリケーションがリアルタイムファイルをオープンすると(ステップS11)、まず、ユニット管理テーブル211を参照して、未使用ユニットが検索される(ステップS12)。
【0090】
検索の結果得られた未使用ユニットは新たにファイルを記憶するためのユニットに割り当てられ、記憶すべき主データ20がそのユニットに対応する一連のブロックに順次記憶される。この際、記憶に使用したユニットに対応するユニット管理テーブル211のユニット使用状況情報が“未使用”から“RT全使用”に変更される。また、記憶に使用されたブロックのフラグを“1”に変更するよう、ブロック管理テーブル211が更新される。さらに、ファイル管理情報212に、記録に使用された各ブロックのリンク情報が追加される(ステップS13)。
【0091】
次に、記憶すべきデータが残っているか否かが判断され(ステップS14)、記憶すべきデータが残っていない場合は、ファイルをクローズし(ステップS15)、処理を終了する。他方、記憶すべきデータが残っている場合は、さらに、未使用ユニットが検索され(ステップS12)。そして、検索により得られたユニットにデータが記憶される(ステップS13)。以上のデータ記憶の処理は、ステップS14にて、記憶すべきデータが残っていないと判断されるまで繰り返される。
【0092】
図6は、非リアルタイムファイルのライト動作を説明するフローチャートである。
【0093】
アプリケーションが非リアルタイムファイルをオープンすると(ステップS21)、まず、ユニット管理テーブル211を参照して、NRT一部使用ユニットが存在するか否かが検索される(ステップS22)。検索の結果、NRT一部使用ユニットが存在しない場合、再びユニット管理テーブル211を参照して、未使用ユニットが検索される(ステップS24)。そして、得られた未使用ユニットに対応するブロックが、主データ20を記憶するためのブロックとして割り当てられる。
【0094】
また、記憶のために使用されたユニットに対応するユニット管理テーブル211のユニット使用状況情報が“未使用”から“NRT一部使用”に変更される(ステップS25)。
【0095】
一方、ステップS22における検索の結果、NRT一部使用ユニットが存在する場合、得られたNRT一部使用ユニット中の未使用ブロックが、主データ20を記憶するためのブロックとして割り当てられる(ステップS23)。ここで、NRT一部使用ユニット中の未使用ブロックが記憶により全て使用される場合、このユニットのユニット使用状況情報が“NRT一部使用”から“NRT全使用”に変更される。
【0096】
そして、ステップS23またはS24にて割り当てられた未使用ブロックに主データ20が記憶されると共に、記憶に使用されたブロックのフラグを“1”に変更するよう、ブロック管理テーブル210が更新される。また、ファイル管理情報212に記憶に使用されたブロックのリンク情報が追加される(ステップS26)。
【0097】
次に、記憶すべきデータが残っているか否かが判断され(ステップS27)、記憶すべきデータが残っていない場合は、ファイルをクローズし(ステップS28)、処理が終了される。他方、記憶すべきデータが残っている場合は、さらに、未使用ユニットおよび未使用ブロックが検索され、検索により得られたブロックにデータを記憶する処理(ステップS22〜S26)が繰り返される。
【0098】
図7は、リアルタイムファイルの削除動作を説明するフローチャートである。
【0099】
アプリケーションが削除するリアルタイムファイルを選択すると(ステップS31)、選択したリアルタイムファイルを記憶するブロックのうち先頭のブロックが、ファイル管理情報212のリンク情報を参照して獲得される。さらに、ユニット管理テーブル211中のユニットサイズ情報から当該ブロックに対応するユニットが算出される(ステップS32)。そして、このブロックに記憶されたデータが順次消去される。
【0100】
このようにしてブロックに記憶されたデータが消去されると、このブロックの使用状況を示すブロック管理テーブル210が、使用中であることを示す“1”から未使用であることを示す“0”に変更される。さらに、一ユニット中の全てのブロックについてデータ消去がなされると、このユニットの使用状況を示すユニット管理テーブル211のユニット使用状況情報が“RT全使用”から“未使用”に変更される(ステップS33)。
【0101】
そして、削除すべきデータが残っているか否かが判断され(ステップS34)、削除すべきデータが残っていない場合は、ファイル管理情報212からこのファイルの管理情報が削除され(ステップS35)、処理が終了される。
【0102】
他方、削除すべきデータが残っている場合は、ファイル管理情報212のリンク情報を指すポインタが1つ進められ、次のブロックが獲得され、ユニット管理テーブル211中のユニットサイズ情報からブロックに対応したユニットが算出される(ステップS32)。そして、上記と同様にして、ブロック管理テーブル210およびユニット管理テーブル211が更新される(ステップS33)。この更新処理(ステップS32、S33)は、ステップS34にて、削除すべきデータが残っていないと判断されるまで繰り返される。
【0103】
図8は、非リアルタイムファイルの削除動作を説明するフローチャートである。
【0104】
アプリケーションが削除する非リアルタイムファイルを選択すると(ステップS41)、選択した非リアルタイムファイルを記憶するブロックのうち先頭のブロックが、ファイル管理情報212のリンク情報を参照して獲得される。
【0105】
次に、このブロックの使用状況を示すブロック管理テーブル210が、使用中であることを示す“1”から未使用であることを示す“0”に変更される(ステップS43)。さらに、このブロックに対応するユニットが含む他のブロックの使用状況が調べられ(ステップS44)、ユニットを構成する全てのブロックが未使用となった場合には、このユニットの使用状況を示すユニット管理テーブル211のユニット使用状況情報が“未使用”に変更される(ステップS46)。
【0106】
また、ユニットを構成するブロックの一部が使用されている状態となった場合には、このユニットの使用状況を示すユニット管理テーブル211のユニット使用状況情報が“NRT一部使用”に変更される(ステップS45)。
【0107】
次に、削除すべきデータが残っているか否かが判断され(ステップS47)、判断の結果、削除すべきデータが残っていない場合は、ファイル管理情報212からこのファイルの管理情報が削除され(ステップS48)、処理が終了される。他方、削除すべきデータが残っている場合は、ファイル管理情報212のリンク情報を指すポインタが1つ進められ、次のブロックが獲得される(ステップS42)。そして、上記と同様にして、ブロック管理テーブル210およびユニット管理テーブル211が更新される(ステップS43〜S46)。この更新処理(ステップS42〜S46)は、ステップS47にて、削除すべきデータが残っていないと判断されるまで繰り返される。
【0108】
図9は、記憶媒体の初期化動作を説明するフローチャートである。
【0109】
本装置で記憶媒体を初めて使用する時、その記憶媒体が本装置で使用できるように、記憶領域の管理に使用される管理データ、具体的には、メタデータ21中のブロック管理テーブル210、ユニット管理テーブル211が生成され、初期設定がなされる。
【0110】
ユニットの容量およびユニット数については、アプリケーションが規定し、これに従いユニット管理テーブル211が初期設定される(ステップS51)。
【0111】
ブロック管理テーブル210には、全ブロックについて、その使用状況が未使用である“0”が設定される(ステップS52)。
【0112】
ユニット管理テーブル211には、全ユニットについて、その状態情報として、リアルタイムファイルが記憶可能であることを示す”RT使用可能ユニット”が設定され、また、ユニットの使用状況として、ユニットを構成するブロック全てが記憶可能であることを示す“未使用”が設定される(ステップS52)。
【0113】
以上のように、本実施の形態では、主データの記憶媒体における記憶場所を管理する時、従来のファイル記憶方法で用いてきた物理的な記憶単位に依存したブロックの他に、リアルタイムに処理されるデータを記憶するのに適した記録単位であるユニットが用いられる。
【0114】
このユニットは、リアルタイム処理が保証された容量に設定され、連続した複数のブロックで構成され、ユニットとブロックは、ユニット管理テーブルのユニットサイズ情報を用いた演算により一意に対応付けられるため、ユニット単位で記憶した映像データなどのリアルタイムファイルをユニット単位で記憶した場合でも、ユニット管理テーブル211を必須とせず、ブロック管理テーブル210のみを用いて、ブロック単位でファイルデータを読み出すことが可能となる。
【0115】
また、非リアルタイムに処理されるデータに対しては、従来と同様に、ブロック単位でデータが記憶されるが、このときのブロックの使用状況に対応して、ユニット管理テーブルも更新される。
【0116】
このように、データの属性によって、記憶単位を換えることにより、記憶媒体を効率よく使用することが可能となり、ひいては、記憶領域のフラグメンテーションの発生を抑制することもできる。
【0117】
B.第2の実施形態
ところで、上記実施の形態においては、ユニット管理テーブルは、ユニットの使用・未使用に応じて、「RT使用可能ユニット」と「RT使用不可能ユニット」の2種類のユニットのみ規定するものであった。しかしながら、データの記録・消去を繰り返すうちに、エラー訂正では補償し得ない欠陥領域が発生する。これにより、ユニットが未使用であっても、そのユニットをリアルタイムファイルの記憶・再生用に使用できない場合が生じ得る。
【0118】
すなわち、ハードディスク等の記憶媒体には、欠陥領域の発生に対応するために、通常代替領域が準備されている。欠陥領域が生じた場合には、代替領域に対してデータの割り当てが行われる。
【0119】
しかし、代替領域は通常、一連の記憶領域とは物理的に離間して配されている。したがって、代替領域にデータを記憶する場合には、記憶、再生時に、シークや回転まち等の余分な時間が掛かってしまう。よって、ユニットが未使用状況となっていても、そのユニットに欠陥領域が存在する場合には、リアルタイムファイルの記憶・再生に必要な書き込み/読み出しレートを保証できない場合が起こり得る。かかる理由により、ユニットが未使用であっても、欠陥領域が発生すると、そのユニットを、RT使用可能ユニットとしてそのまま使用することはできない場合が起こり得る。
【0120】
他方、たとえばデジタル放送においては、HD(High Definition)放送の場合のビットレートは約24Mbpsで、SD(StandardDefinition)放送の場合のビットレートは約8Mbpsである。したがって、所定のユニットに欠陥領域が発生した場合、そのユニットをHD放送用に使用できなくても、よりレートの低いSD放送用として使用可能な場合もあり得る。かかる理由から、欠陥領域の発生によってユニットの書き込み/読み出しレートが低下したとしても、一律にそのユニットを「RT使用不可能」とするのは適当でない。
【0121】
そこで、本実施の形態においては、書き込み/読み出しレートのランク区分をユニット毎に付し、このランク区分を上記ユニット管理テーブルに含めておく。そして、リアルタイムファイルの書き込み時には、かかるランク区分を参照して、そのファイルの転送レートを保証し得るユニットを対象ユニットとして選択するようにする。
【0122】
各ユニットは、初期状態においては、最上位のレートのランク区分とされている。そして、その後の書き込み/読み出し時に、リアルタイムファイルの転送レートを保証し得たかが判別され、ここで保証し得なかった場合には、そのファイルの転送レートよりも低いランク区分に変更される。
【0123】
リアルタイムファイルの転送レートを保証し得たか否かは、たとえば、HDD(ハードディスクドライブ)をAVデータ記憶用途に使用する場合に用いられる特殊コマンドを使用して判別される。このコマンドは、リアルタイム性重視のコマンドで、時間制限付きリードおよびライトを実行するコマンドである。
【0124】
<時間制限付リード・ライトコマンド>
ここでの時間の定義は、指定した時間内にHDDがホスト側に必ず応答を返すことである。これらのコマンドを使用した場合、HDD側の処理の優先度は、以下の通りである。
【0125】
1.指定時間内に正常にデータの入出力を終えホストに通知する。
2.途中にエラーが発生して、リトライや代替処理が必要な場合;
指定時間内に処理可能な場合は、それを実行する。指定時間を超える場合は、エラーを無視し、指定時間内に指定セクタ数の入出力処理を終了させて、ホストに通知する。この場合、ホストに対し、「エラーが発生したが入出力完了」という形で通知し、エラー情報はログに残しておく。
3.発生したエラーを無視しても入出力処理が終了しない場合;
指定時間以内に処理を中断し、「タイムアウトエラー」という形でホストに通知する。本来、指定時間内に応答を返すことが前提であるが、例外として、少なくとも1度はリード・ライトを行ない、この時点で既に指定時間をオーバーしている時のみ、指定時間内に応答しなくてよいものとする。但し、「指定時間オーバー」であることをホストに知らせる必要がある。
【0126】
以上の通り、記憶媒体であるHDDのメディア上の前記ユニットに欠陥があった場合、その部分のデータアクセスにおけるリアルタイム性は低下する。そこで、ユニット毎の前記ユニット状態情報として、ユニットが保証できるビットレートのランク区分を備えておけば、これを参照して、さまざまなビットレートのデータをそれぞれ適したユニットに配することにより、リアルタイム性を保証し、かつ、記憶媒体を有効に利用した記憶が実現できる。
【0127】
以下、かかる実施の形態のより具体的な構成および制御について説明する。
【0128】
<メディアの代替>
記憶媒体であるHDDのメディア上に欠陥があった場合、通常代替ブロックが割り当てられる。
【0129】
光ディスクなどの場合は、代替ブロックの位置、数等が規格として決められているがHDDの場合には、コマンドインタフェースのみが規定されており、内部構造は、ドライブベンダー毎に相違する。従って、代替処理シーケンス、代替ブロック位置、代替ブロックをリード及びライトする場合のオーバーヘッド時間等は規定されていない。これはリアルタイム処理する場合に問題となり、以下に説明する。
【0130】
<物理アドレス、論理アドレスの関係とフラグメンテーション>
図13に、メディア上の物理アドレス、論理アドレス、欠陥ブロック管理リストの関係を示す。以下、欠陥ブロックの処理手順とそれに伴うフラグメンテーションに関して説明する。
【0131】
ハードディスクを例に取った場合、通常、使用開始時においては、ホストからアクセスされる論理アドレスの連続性は、メディア上の物理アドレスの連続性を持っていると考えて良い。本来、製品出荷時にすでにある欠陥セクタは出荷時に代替処理されるが、ここでは簡略化のため省略する。
【0132】
ディスク上には、後発的な欠陥ブロックのための代替ブロックが準備されている。ハードディスクの場合、その数や物理的位置に関しては、規定されておらず、例えば、ディスクの最内周にまとめて代替ブロック領域が配置される。この領域に対しては、当然論理アドレスへのマッピングはない。
【0133】
図13に示すように、例えば、論理ブロックAが欠陥ブロックと判断された場合、ドライブは、その論理ブロックAに対応する物理ブロックAを代替ブロックB+1にマッピングしなおす。その情報は、欠陥リストに登録される。
【0134】
このように、欠陥ブロックの代替処理が行われると、その代替処理が行われたブロックに対応するユニットでは、論理的アドレスは連続していても、実は論理ブロックAで物理的には非連続な状態となり、そのブロックの前後でシークが発生する。これがリアルタイム処理にとって致命的になる原因である。
【0135】
<AVストリームの実時間保証と代替処理との相関関係>
以下に、AVストリームの実時間処理例を示す。
【0136】
ワーストケースの転送レートa(MB/s)、ワーストケースの(シーク時間+回転待ち時間)b(sec)、ユニットサイズc(MB)、AVストリームのビットレートd(MB/s)とすると、
ワーストケースのユニットへのアクセス(読み出し/書き込み)時間は、
y=c/a(sec)、
ユニット単位のAVストリームの再生時間は、
z=c/d(sec)
となる。
【0137】
1つのAVストリームのリアルタイム処理における関係は、次式となる。
y+b<zすなわち、y<z−b
【0138】
2つのAVストリームのリアルタイム処理における関係は、次式となる。
2*(y+b)<zすなわち、y<z/2−b
【0139】
1つのAVストリームでユニットのn個所が代替ブロックに配置されている場合のリアルタイム処理における関係は、次式となる。
y+(n+1)b<zすなわち、y<z−(n+1)b
【0140】
2つのAVストリームで交互にアクセスされるユニットにおいて、連続してアクセスされる任意の2つのユニットに、合計n個所が代替ブロックに配置されている場合のリアルタイム処理における関係は、次式となる。
2y+(n+2)b<zすなわち、y<z/2−(n+2)b/2
【0141】
このように、代替処理が多ければ多いほど、ユニットのアクセス時間が長くなる。そして、ある閾値を超えるとリアルタイム性が破綻する。
【0142】
したがって、代替ブロックが増えたある地点でユニットを使用不可にすることが必要となる。
【0143】
<ユニット管理テーブル>
ユニット管理テーブル211は、HDD118の記憶領域をユニット単位のアドレス空間とみなしてユニット番号を順に付けたときに、それぞれのユニットの使用状態を管理する。
【0144】
ユニットは、図3に示す如く、エントリ211a、211b、…から構成され、例えば、エントリ211aは、ブロック管理テーブル210上のエントリ210a、210b、210c、210dに対応したユニットのエントリである。ユニット管理テーブル211は、そのユニットについて、リアルタイムファイルを記憶できるか否かを示すユニット状態情報と、ユニットの使用状況を示すユニット使用状況情報を規定する。
【0145】
各ユニットのユニット状態情報とユニット使用状況情報は、図10に示す如く区分されている。
【0146】
ユニット使用状況情報は、第1の実施形態と同様、“RT全使用”、“未使用”、“NRT一部使用”、“NRT全使用”の4つの状況を示す。
【0147】
ユニット状態情報には、“RT使用可能ユニット”もしくは“RT使用不可能ユニット”のどちらかが示される。ここで、“RT使用可能ユニット”とは、リアルタイム情報が記録可能である状態をいう。また、“RT使用不可能ユニット”とは、リアルタイム情報が記録不可能である状態をいう。
【0148】
上記“RT使用可能ユニット”は、さらにリアルタイムストリームのビットレートによって、例えば、“30MbpsまでのRTストリームで使用可能ユニット”、“15MbpsまでのRTストリームで使用可能ユニット”、“5MbpsまでのRTストリームで使用可能ユニット”の3段階に区分けされる。
【0149】
上記の通り、例えば、デジタル放送において、HD放送の場合のビットレートは、約24Mbpsで、SD放送のビットレートは約8Mbpsである。この場合、HD放送番組の記憶に使用できなくなったユニットでも、SD放送番組の記憶に使用可能となる場合がある。また、アナログ放送を記録する場合、例えば、10Mbpsの高画質録画モード、6Mbpsの標準録画モード、3Mbpsの長時間録画モードの異なる3つのビットレートが想定される。この場合も、高画質録画モードで使用できなくなったユニットが標準録画モードもしくは、長時間録画モードで使用可能となる場合もある。
【0150】
ユニットは、物理メディアに連続して記録できる領域であるが、欠陥ブロックが発見された場合には、代替領域にそのブロックが再割当てされる。この場合、論理的には、連続であっても物理的には、そこに境界が発生しシーク、回転待ち時間がかかる。これは、場合によってはリアルタイム処理に致命的となる。
【0151】
したがって、初期状態においては、ユニットはリアルタイム処理として、最も高いビットレートランクで使用可能であるが、使用を続けていくにつれて、ユニットが対応可能なビットレートは変化するため、システム側が使用可能か否かをチェックし、使用不可能と判断した場合は、リアルタイム情報記録不可能とすることが必要となる。
【0152】
このシステム側のチェックは、例えば、ユニット単位のリードあるいはライトを前述の時間制限をつけた時間制限付きコマンドを用いて行うことにより実行することができる。この時間制限のパラメータは、ビットレートに応じてリアルタイム処理が破綻しない限界の時間である。
【0153】
このコマンドを使用して、時間制限オーバーしたユニットは、そのビットレートでは使用不可能ということで、ビットレートのランクをコマンドのビットレートより低いランクとする。
【0154】
ここで、コマンドのビットレートとは、コマンドがリードおよびライト動作の対象とするデータサイズを、制限時間で割ったものである。最低のビットレートでも使用不可能になったユニットは、リアルタイム情報記録不可能ユニットとされる。
【0155】
図11は、第2の実施形態におけるファイルのリード動作を説明するフローチャートである。
【0156】
まず、ファイルがアプリケーションによってオープンされると(ステップS61)、ファイルのファイル管理情報212に記憶されたリンク情報が参照される。このとき、ポインタを用いてリンク情報の参照位置が管理される。このポインタが指す位置のリンク情報からブロック開始アドレスが得られ、このブロック開始アドレスが示す記憶領域上のブロックからデータが時間制限つきAVコマンドで読み出される(ステップS62)。
【0157】
次に、上記時間制限付リードコマンドにより、「指定時間オーバー」が発生したか否かが判断される(ステップS63)。その結果、「指定時間オーバー」エラーが発生した場合は、使用したユニットに対応するユニット管理テーブル211のユニット状態情報における対応可能なビットレートランクが、このコマンドのビットレートよりも低いランクに変更される(ステップS64)。
【0158】
そして、読み出し中のブロックがファイルを構成する論理的なブロックの最後か否かが判断され(ステップS65)、最後である場合は、ファイルがクローズされ(ステップS66)、リード動作が終了される。
【0159】
読み出し中のブロックがファイルを構成する論理的なブロックの最後でなく続くブロックが存在する場合は、リンク情報の参照位置を示すポインタを1進め、次のリンク情報からブロック開始アドレスが得られ、このブロック開始アドレスが示す記憶領域上のブロックからデータが読み出される(ステップS62)。この読み出し処理(ステップS62〜S64)は、ステップS65にて、読み出し中のブロックが最後であると判別されるまで繰り返される。
【0160】
図12は、第2の実施形態におけるリアルタイムファイルのライト動作を説明するフローチャートである。
【0161】
アプリケーションがリアルタイムファイルをオープンすると(ステップS71)、まず、ユニット管理テーブル211を参照して、未使用であり、かつ、書き込みビットレートで使用可能なユニットが検索される。(ステップS72)。
【0162】
検索の結果得られたユニットが新たにファイルを記憶するためのユニットに割り当てられ、記憶すべき主データ20がそのユニットに対応する一連のブロックに、時間制限付ライトコマンドで記憶される。この際、記憶に使用されたユニットに対応するユニット管理テーブル211のユニット使用状況情報が“未使用”から“RT全使用”に変更される。また、記憶に使用されたブロックのフラグを“1”に変更するよう、ブロック管理テーブル211が更新される。さらに、ファイル管理情報212に、記録に使用された各ブロックのリンク情報が追加される(ステップS73)。
【0163】
次に、ステップS73での時間制限付ライトコマンドにより、「指定時間オーバー」が発生したか否かが判断される(ステップS74)。その結果、「指定時間オーバー」エラーが発生した場合は、使用したユニットに対応するユニット管理テーブル211のユニット状態情報における対応可能なビットレートランクが、コマンドのビットレートよりも低いランクに変更される(ステップS75)。
【0164】
次に、記憶すべきデータが残っているか否かが判断され(ステップS76)、記憶すべきデータが残っていない場合は、ファイルをクローズし(ステップS77)、処理が終了される。他方、記憶すべきデータが残っている場合は、さらに、ステップS72からの処理が繰り返される。
【0165】
リード動作およびライト動作において、各々読みこみエラーおよび書きこみエラーがないと想定すると、時間制限つきコマンドで「指定時間オーバー」エラーが発生する場合は、ブロックが既にフラグメント状態にあると判断することができる。したがって、この場合には、ユニットの状態情報における対応可能なビットレートランクをコマンドのビットレートより低いランクとする。
【0166】
尚、第2の実施形態による記憶媒体の初期化動作は、第1の実施形態における記憶媒体の初期化動作(図9)と同様になされる。ここで、ステップS52においては、その状態情報として、ビットレートが最も高いリアルタイムファイルを記憶できることを示す“RT使用可能ユニット(ビットレートaMbpsまで)”がさらに設定される。
【0167】
以上、本実施の形態によれば、上記第1の実施の形態と同様、リアルタイムファイルと非リアルタイムファイルのライト処理を、円滑且つ効率的に行うことができるとのメリットに加え、さらに要求されるビットレートが相違する種々のリアルタイムファイルデータを、同一のHDD上に効率的に振り分けて記録することができ、よって、HDDの使用効率をより向上させることができるとのメリットを奏することができる。
【0168】
なお、本発明は上記実施の形態に限定されるものではないことは言うまでもない。上記実施の形態では、MPEGデータを記録再生するデジタル記録再生装置を例に挙げて説明したが、その他、オーディオデータのみを記録再生するデジタル記録再生装置や、インターネット経由で入手したデータを記録再生する記録再生装置にも広く利用できる。
【0169】
また、図2、図10に示す各種管理テーブルの生成処理や、図4から図9、図11、図12に示す処理を実行するためのプログラムは、HDDコントロールモジュール117にプリインストールする形態の他、CD−ROM等の記憶媒体からのダウンロード、あるいはインターネットを経由したアプリケーションサーバからのダウンロードによっても実現できる。
【0170】
その他、メタデータの更新タイミングや、メタデータファイルの構成タイミング等についても適宜変更可能である。
【0171】
【発明の効果】
本発明のファイル記録管理方法によれば、リアルタイムファイルの再生に適したファイルアロケーションを行い、かつ、サイズの小さいデータによる記憶領域のフラグメンテーションの発生を抑制することができ、記憶領域の使用効率を向上させることができる。
【図面の簡単な説明】
【図1】第1の実施形態に係る記録再生装置の全体構成図
【図2】第1の実施形態に係る記録情報の構造を示す図
【図3】第1の実施形態に係る記録方法を模式的に示す図
【図4】第1の実施形態に係るリード動作のフローチャート
【図5】第1の実施形態に係るライト動作のフローチャート
【図6】第1の実施形態に係るライト動作のフローチャート
【図7】第1の実施形態に係る削除動作のフローチャート
【図8】第1の実施形態に係る削除動作のフローチャート
【図9】第1の実施形態に係る記憶媒体の初期化動作のフローチャート
【図10】第2の実施形態に係る記録情報の構造を示す図
【図11】第2の実施形態に係るリード動作のフローチャート
【図12】第2の実施形態に係るライト動作のフローチャート
【図13】メディア上の物理アドレスと論理アドレスと欠陥セクタリストの関係を示す図
【図14】従来のファイル記録方法におけるファイルの構成を示す図
【図15】従来のファイル記録方法におけるファイルの構成を示す図
【符号の説明】
30、30a〜30d  ブロック
201  リアルタイムファイル1
202  非リアルタイムファイル2
210  ブロック管理テーブル
210a〜210d  ブロック管理テーブルのエントリ
211  ユニット管理テーブル
211a、211b  ユニット管理テーブルのエントリ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a file data storage management method, a file data storage device, a program for executing a process for storing file data, and a storage medium, and more particularly to a method capable of efficiently storing real-time file data and non-real-time file data. It is.
[0002]
[Prior art]
When storing data constituting one file (hereinafter, referred to as file data) in a storage medium, a method of allocating file data to blocks obtained by dividing a storage area of the storage medium into a predetermined same capacity is adopted. In this file storage method, use / non-use of each block is managed by a block management table.
[0003]
The storage of file data is performed by searching for unused blocks by referring to the block management table and allocating a plurality of unused blocks for data storage according to the capacity of the file data. At this time, a file configuration table indicating which block is used to store the file information is created. As this file configuration table, for example, a FAT (File \ Allocation \ Table) is used. The FAT defines the physical connection of the blocks making up the file. Specifically, using a unique block number assigned to a block, a table is created for all blocks in the storage area, in which the block numbers are associated with the numbers of the blocks logically following the blocks. .
[0004]
[Problems to be solved by the invention]
When storing file data having a capacity equal to or greater than the block length, for example, data having a large storage capacity such as video and audio, the file data is stored over a plurality of blocks. Here, if data is intermittently stored in physically discontinuous areas on the storage medium, when these data are processed in real time and read out, it is necessary to smoothly perform access depending on the moving time of the drive head. And it may be difficult to perform continuous data processing. Therefore, in consideration of storage of such large-volume data that is processed in real time, it is desirable to set the capacity of one block to be large and to secure a physically continuous area as much as possible.
[0005]
On the other hand, the data capacity of a file varies depending on the type of the file, and there is also a file having a very small data capacity such as a very small document file.
[0006]
However, in the current file storage method, file data is stored in block units, so that two or more file data cannot be stored in one block. Therefore, if the capacity of the block is set too large, the free space in each block in which actual data is not stored but data of another file cannot be stored increases. There is a problem that the use efficiency of the area is significantly reduced.
[0007]
On the other hand, if the capacity of the blocks is made too small, the number of linked blocks becomes very large when recording large-capacity file data, and there is a concern that the access performance when reading these data may be degraded. You.
[0008]
In addition, if data is repeatedly stored and erased due to frequent input / output of data, it becomes difficult to secure a physically continuous free area, and so-called fragmentation (fragmentation) occurs. obtain.
[0009]
FIG. 14 shows an example of file data allocation to a storage medium, a block management table at that time, and a use state of each block. In the block management table of FIG. 1, 1 indicates a state where the block is used, and 0 indicates a state where the block is unused. A hatched portion 30x in the figure is a used block, and a plain portion 30y is an unused empty block. In FIG. 14, empty blocks are scattered, and fragmentation has occurred.
[0010]
On the other hand, for example, as shown in FIG. 15, the management table can be configured so that four blocks are regarded as one block. By increasing the data volume handled in the block management table in this way, the above-described fragmentation problem can be solved to some extent. However, in this case, as described above, the use efficiency of the storage area is significantly reduced.
[0011]
Therefore, the present invention solves such a problem and, while allocating file data suitable for storage and reproduction of a real-time file, simultaneously suppresses the occurrence of fragmentation, thereby efficiently storing small-sized file data. It is an object to provide a data storage method that can be reproduced.
[0012]
[Means for Solving the Problems]
According to the present invention, a unit is composed of a plurality of continuous blocks, and the attributes of the unit are managed by a unit attribute table. The unit attribute table includes the usage status of each unit and information defining whether real-time data can be stored.
[0013]
When the file data to be stored is real-time data, an unused unit capable of storing real-time data is searched by referring to the unit attribute table, and the file data is stored in the block included in the searched unit. Is done. Further, when the stored file data is non-real-time data, the unit attribute table is referred to to search for a unit in which non-real-time data is already stored in some blocks in the unit. The file data is stored in an unused block included in the acquired unit.
[0014]
As described above, the number of unused units can be increased by changing the recording process depending on whether the file data to be stored is real-time data or non-real-time data. Will be able to do it.
[0015]
One aspect of the present invention is, for example, a block management table for managing whether data is stored in a block, a unit attribute table for managing attributes of a unit composed of a plurality of continuous blocks, And a data storage process for storing file data based on the attribute table.
[0016]
Here, the unit attribute table includes the usage status of each unit and information defining whether or not real-time data can be stored. Further, when the file data to be stored is real-time data, the data storage process refers to the unit attribute table to search for an unused unit capable of storing real-time data, and includes the unit included in the searched unit. When this file data is stored in a block and the stored file data is non-real-time data, a unit in which the non-real-time data is already stored in some blocks in the unit is referred to by referring to the unit attribute table. , And storing the file data in an unused block included in the unit obtained by the search.
[0017]
Another aspect of the present invention provides, for example, a unit for generating a block management table for managing whether data is stored in a block, and a unit for managing attributes of a unit composed of a plurality of continuous blocks. It can be understood as a file data storage device including a unit for generating an attribute table and a unit for executing processing for storing file data based on the unit attribute table.
[0018]
Still another aspect of the present invention provides, for example, a process of generating a block management table that manages whether data is stored in a block, and forming a unit from a plurality of continuous blocks, and It can also be grasped as a program for executing a process including a process of generating a unit attribute table for managing attributes and a process including a data storage process of storing file data based on the unit attribute table.
[0019]
Still another aspect of the present invention provides, for example, at least, in addition to main data, at least a block management table for managing whether data is stored in the block, and an attribute of a unit constituted by a plurality of continuous blocks. Can be grasped as a storage medium in which a unit attribute table for managing is stored.
[0020]
As an improvement of each of the above aspects, the attribute management table may further include information defining a rank of a write and / or read rate for each unit. At this time, when the file data to be stored is real-time data, the data storage processing in each aspect refers to the unit attribute table to store unused file data satisfying the write and / or read rate required for the file data. A process of searching for the unit and storing the file data in the block included in the searched unit.
[0021]
With this configuration, it is possible to efficiently sort and record various real-time file data having different required bit rates on the recording area, so that the use efficiency of the recording area can be further improved. The advantage of this can be further achieved.
[0022]
The above and other objects and novel features of the present invention will become more fully apparent from the following description of the embodiments when read with reference to the accompanying drawings.
[0023]
“Block” in the claims of the present invention corresponds to “block” in the embodiment. A “unit” in the claims of the present invention corresponds to a “unit” in the embodiment. Further, the “block management table” in the claims of the present invention corresponds to the “block management table 210” in the embodiment. The “unit attribute table” in the claims of the present invention corresponds to the “unit management table 211” in the embodiment. Further, the “storage medium” in the claims of the present invention corresponds to “the hard disk drive 118 (hard disk built therein)” in the embodiment.
[0024]
However, the following embodiments are merely one embodiment of the present invention, and the meanings of the terms of the present invention and each component are not limited to those described in the following embodiments. Absent.
[0025]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0026]
A. First embodiment
FIG. 1 is a block diagram showing an overall configuration of a digital recording / reproducing apparatus according to an embodiment of the present invention. In FIG. 1, signal lines indicated by thick lines are signal lines indicating the flow of video and / or audio data, and signal lines indicated by thin lines are signal lines indicating the flow of control signals.
[0027]
The digital recording / reproducing apparatus includes an antenna 100, an external input terminal 101, tuners 102 and 103, a selector 104, A / D converters 105 and 106, MPEG2 video encoders 107 and 108, audio encoders 109 and 110, a multiplexer / demultiplexer 111, MPEG2 Video decoder 112, audio decoder 113, D / A converter 114, buffer memories 115 and 116, hard disk drive controller module 117, hard disk drive 118, system controller 119, memory 120, user interface 121, graphic controller 122, television monitor 123, Real-time clock module 124, digital input 125, digital And a Toputto 126, LED 127.
[0028]
Referring to FIG. 1, for example, a signal wave of a television broadcast received by antenna 100 is given to tuners 102 and 103 simultaneously.
[0029]
The tuner 102 selects a signal wave of one channel designated by the user from the signal waves received by the antenna 100, demodulates the signal wave into an analog television signal including a video signal and an audio signal, and inputs the signal to one input of the selector 104. Give to. The other input of the selector 104 is connected to an external input terminal 101 to which various external television signal sources such as a video tape recorder (VTR) and a camcorder can be connected.
[0030]
The selector 104 selects one of the output from the tuner 102 and the input from the external input terminal 101 and supplies the selected signal to the A / D converter 105 and also to one input of the graphic controller 122. Generally, the selector 104 selects the input from the external input terminal 101 when some external signal source is connected to the external input terminal 101, and selects the output of the tuner 102 when not connected.
[0031]
The A / D converter 105 converts the video signal and the audio signal of the analog television signal output from the selector 104 into digital signals, respectively, supplies the digital video signal to the MPEG2 video encoder 107, and converts the digital audio signal into an audio encoder. Give to 109.
[0032]
The MPEG2 video encoder 107 compresses the provided digital video signal and provides the same to the multiplexer / demultiplexer 111, and the audio encoder 109 compresses the provided digital audio signal and provides the same to the multiplexer / demultiplexer 111. The multiplexer / demultiplexer 111 multiplexes the supplied video signal stream and audio signal stream and converts them into an MPEG2 system stream.
[0033]
On the other hand, the tuner 103 selects a signal wave of one channel designated by the user from the signal waves received by the antenna 100, demodulates the signal wave into an analog television signal including a video signal and an audio signal, and performs A / D conversion. It is provided to the converter 106 and to another input of the graphic controller 122.
[0034]
The A / D converter 106 converts the video signal and the audio signal of the analog television signal output from the tuner 103 into digital signals, respectively, supplies the digital video signal to the MPEG2 video encoder 108, and converts the digital audio signal into an audio encoder. Give to 110.
[0035]
The MPEG2 video encoder 108 compresses the given digital video signal and provides it to the multiplexer / demultiplexer 111, and the audio encoder 110 compresses the given digital audio signal and provides it to the multiplexer / demultiplexer 111. The multiplexer / demultiplexer 111 multiplexes the supplied video signal stream and audio signal stream and converts them into an MPEG2 system stream.
[0036]
A hard disk drive (hereinafter, HDD) 118 having a built-in hard disk as an example of a randomly accessible storage medium is detachably attached to the digital recording / reproducing apparatus. In the following description, this single HDD 118 itself will be regarded as a writable and readable storage medium for convenience. The writing of data to the HDD 118 and the reading of data from the HDD 118 are executed by the HDD controller module 117 as described later.
[0037]
A first data bus including a buffer memory 115 in the middle and a second data bus including a buffer memory 116 in the middle are provided between the multiplexer / demultiplexer 111 and the HDD controller module 117. A system data channel is provided.
[0038]
Further, digital data from another device externally connected via a digital input 125 can be input to the buffer memory 115, while digital data from the buffer memory 116 can be input to another external device via a digital output 126. Can be output to other devices.
[0039]
Therefore, as will be described later, the exchange of the MPEG2 system stream data between the multiplexer / demultiplexer 111, the HDD controller module 117, the digital input 125 and the digital output 126 via the buffer memories 115 and 116. Will be done.
[0040]
The multiplexer / demultiplexer 111 demultiplexes the MPEG2 system stream received from the buffer memories 115 and 116 into a video signal stream and an audio signal stream, and outputs the former to the MPEG2 video decoder 112 and the latter to the audio decoder 113. Give to.
[0041]
The MPEG2 video decoder 112 decodes the supplied video signal stream and supplies it to the D / A converter 114, and the audio decoder 113 decodes the supplied audio signal stream and supplies it to the D / A converter 114. The D / A converter 114 converts the applied signals into analog signals, respectively, and supplies an analog television signal including a video signal and an audio signal to another input of the graphic controller 122.
[0042]
The graphic controller 122 selects one of the analog television signals supplied from the selector 104, the tuner 103, and the D / A converter 114, and selects a television monitor connected to the outside of the digital recording / reproducing apparatus. Give to 123.
[0043]
The operations of the multiplexer / demultiplexer 111 and the graphic controller 122 are controlled by control signals provided from the system controller 120.
[0044]
When this digital recording / reproducing apparatus is connected to another external apparatus via a digital input 125 and a digital output 126, a control signal from the system controller 119 is transmitted via the digital input 125 to another thin line. The control signal is supplied to a system controller (not shown) of the apparatus, and a control signal from the system controller is supplied to the system controller 119 of the digital recording / reproducing apparatus via a digital output 126 (thin line).
[0045]
A user interface 121, a memory 120, and a real-time clock module 124 are connected to the system controller 119.
[0046]
The basic operation principle of the digital recording / reproducing apparatus according to the present invention shown in FIG. 1 such as storage, reproduction, and erasure will be described later in detail in relation to a file storage method for the hard disk drive 118.
[0047]
Next, information stored in a hard disk as a storage medium in the present embodiment will be described.
[0048]
As shown in FIG. 2, when data is stored as a file on a hard disk serving as a storage medium, data to be stored such as video and audio (hereinafter referred to as main data 20) and the main data 20 are configured as a file. Necessary management information (hereinafter referred to as metadata 21) is stored in the hard disk.
[0049]
The metadata 21 is composed of three pieces of information: a block management table 210, a unit management table 211, and file management information 212. In the digital recording / reproducing apparatus, the metadata 21 is generated at the time of initial setting of a storage medium, and each time data is recorded or erased. Will be updated to
[0050]
Hereinafter, each of the management information will be described with reference to FIG.
[0051]
FIG. 3 is a diagram schematically illustrating a recording method using a unit management table.
[0052]
<Block management table>
The block management table 210 manages the use status of each block. The entries 210a, 210b, 210c, 210d,... Constituting the block management table 210 correspond to the blocks of the storage areas 30a, 30b, 30c, 30d,. In this case, "1" is shown, and in the case of an unused block, "0" is shown.
[0053]
<Unit management table>
The unit management table 211 manages the use state of each unit when the storage area of the HDD 118 is regarded as an address space in units and numbered in order.
[0054]
The unit is composed of entries 211a, 211b,... For example, the entry 211a is an entry of a unit corresponding to the entries 210a, 210b, 210c, 210d on the block management table 210. The unit management table 211 shows unit status information indicating whether or not a real-time file can be stored for the unit, and unit usage status information indicating the usage status of the unit.
[0055]
Here, whether or not a real-time file can be stored in the unit is determined, for example, by monitoring a storage / reproduction operation by a special command for executing read / write, similarly to the determination in the second embodiment described later, in real time. This is done by determining whether storage / reproduction is guaranteed.
[0056]
The unit status information and the unit use status information of each unit are divided as shown in FIG. In the unit use status information, “unused” refers to a state in which all blocks constituting the unit can be stored. The “RT full use” refers to a state in which all blocks constituting the unit are continuously used for storing a real-time file. Further, "partially using the NRT" means a state in which a part of the blocks constituting the unit is used for storing a non-real-time file. “All use of NRT” means a state in which all the blocks constituting the unit are used for storing the non-real-time file.
[0057]
Since the unit has a size necessary for real-time processing, there is no state where the unit is partially used by the real-time file. Also, neither real-time file nor non-real-time file exists in the unit. Therefore, when the unit is "partially used for NRT", only the non-real-time file can be stored in the remaining blocks.
[0058]
<File management information>
Returning to FIG. 2, the file management information 212 is management information for the main data 20 to be recognized as a file.
[0059]
In the file management information 212 of the file corresponding to the main data 20, link information of blocks constituting the main data 20 is recorded. Specifically, attribute information (not shown in the figure) regarding the main data 20 and start address information of the block are stored in the order of reference.
[0060]
The attribute information includes information indicating whether the main data 20 is data to be processed in real time.
[0061]
In the real-time file 201 (see FIG. 3), main data 20 to be processed in real time, such as an MPEG2 system stream created by the multiplexer / demultiplexer 111, is stored as the above-described unit data.
[0062]
Therefore, the total capacity of the real-time file 201 is always an integral multiple of the unit capacity. Also, in the HDD 118 that performs recording in block units, the start address of the real-time file 201 must be an address corresponding to a unit boundary. This is because in the unit management table 211, the storage space is regarded as an address space for each unit.
[0063]
The file management information 212 indicating the file configuration of the real-time file 201 stores link information of a block corresponding to the unit to which the real-time file 201 is assigned.
[0064]
In the case of the non-real-time file 202, since the main data 20 that does not need to be processed in real time is stored as data in block units, the total capacity of the non-real-time file 201 is an integral multiple of the block unit capacity.
[0065]
The file management information 212 indicating the file configuration of the non-real-time file 202 stores link information of a block to which the non-real-time file 202 is allocated, similarly to the real-time file.
[0066]
<Unit capacity>
Next, a description will be given of the capacity of a unit required for simultaneously handling a plurality of stream data in real time in the digital recording / reproducing apparatus.
[0067]
First, the capacity C of the buffer memories 115 and 116, the unit block length L of writing / reading, the worst case data transfer rate Bhdd between the HDD controller module 117 and the HDD 118, the rate Bsys of the MPEG2 system stream, and the HDD 118 Of the seek time with the worst value Tw will be described.
[0068]
However, the worst value Tw of the seek time is not the time required only for the seek of the head but the seek time, the rotation waiting time, and the head switching time required from the start of the seek to the actual start of data writing / reading. , The time required for error correction such as ECC / EDC, etc., and the time considering all worst values of group delay.
[0069]
Assuming that the number of streams to be processed simultaneously is N, the following equation must be satisfied in order to maintain the real-time properties of all the streams.
Bhdd × Ts> N × (Tw + Ts) × Bsys (1)
[0070]
Here, Ts is a time required for writing / reading the unit block length L of writing / reading to / from the HDD 118, and is represented by Ts = L / Bhdd.
[0071]
In the above equation (1), in the case of data reading, the amount of data read in a unit block in a certain stream is determined by the N seek times and the N data writes required to process N streams. This means that it is necessary to design so as not to be consumed within the sum of the time and the read time.
[0072]
Further, in the case of writing data, the amount of data stored in the buffer memories 115 and 116 during the time required to process N streams should be N × (Tw + Ts) × Bsys in the worst case. Means
[0073]
Therefore, the capacity C of the buffer memories 115 and 116 needs to satisfy the following equation.
C> N × (Tw + Ts) × Bsys (2)
[0074]
By performing a design that satisfies the above equations (1) and (2), it becomes possible to simultaneously process N streams in real time. However, N must be set within a range that satisfies Bhdd> N × Bsys.
[0075]
When data of a real-time file is transferred from the HDD 118 to the buffer memories 115 and 116, processing can be performed most efficiently by reading the data in units. At this time, the unit capacity Usize can be expressed by the following equation.
Usize = L ... (3)
[0076]
Here, as described above, since Ts = L / Bhdd, the following equation can be obtained as a conditional equation for the Usize capacity by substituting this relational equation and equation (3) into equation (1).
Usize> N × (Tw + (Usize / Bhdd)) × Bsys (4)
[0077]
Video data and audio data for a certain period of time are stored in a unit having this capacity. In the apparatus of this embodiment, MPEG-2 encoded video data (Group of Pictures: GOP) and corresponding audio data are multiplexed by a multiplexer / demultiplexer 111 to form a system stream.
[0078]
If the number of pictures in one GOP is 15, the reproduction time of one unit is as follows.
5 * (15/30) = 2.5 seconds
[0079]
Here, it is verified whether or not reproduction of each of these parameters is guaranteed in units.
[0080]
From the above definition, if the unit length of writing / reading is L = 27552512 bytes, the rate Bsys of the MPEG2 system stream is
Bsys = L / 2.5 = 1110004 bytes / second
It becomes.
[0081]
In this digital recording / reproducing apparatus, assuming that the number of streams is N = 2, the worst value of the seek time is Tw = 50 ms, and the worst case data transfer rate between the HDD controller module 118 and the HDD 119 is Bhdd = 5 MB / sec. ,
Ts = L / Bhdd = 550ms
Holds. Therefore, the left side Bhdd * Ts of the equation (1) is
Bhdd * Ts = 5 × 106* 550 × 10-3= 2.7 × 106
The right side N * (Tw + Ts) * Bsys of the equation (1) is
N * (Tw + Ts) * Bsys = 2 * (50 + 550) × 10-3* 1101004 = 1.32 × 10-6
Which satisfies the above equation (1). Therefore, reproduction of data in units of units is guaranteed with these defined parameters.
[0082]
Next, file read (read) and write (write) operations will be described with reference to flowcharts.
[0083]
FIG. 4 is a flowchart illustrating a file data read operation.
[0084]
First, when a file is opened by an application (step S1), file management information of the file is read, and link information in the file management information is referred to. As described above, the link information specifies the start address of each block that stores the file information in the reference order. The reading of the file information is performed by referring to the link information in order from the beginning, acquiring the start address of each block, and sequentially reading data from the block on the storage area indicated by the acquired start address. Here, the reference position of the link information is managed by a pointer.
[0085]
First, a pointer is set at the head of this link information (step S2), and the start address of the first block storing the file information is obtained. Then, data is read from the block on the storage area indicated by the start address (step S3).
[0086]
Next, it is determined whether or not this block is the last logical block constituting the file (step S4). If it is the last, the file is closed (step S5), and the read operation is terminated. On the other hand, if there is a block that follows the logical block constituting the file rather than the last block, the pointer indicating the reference position of the link information is advanced by one (step S2), and the next block storing the file information is advanced. Is obtained. Then, data is read from the block on the storage area indicated by the block start address (step S3).
[0087]
The above data reading is repeated until it is determined in step S4 that the block indicated by the pointer is the last block. Thereby, all the file information is read from the storage medium.
[0088]
FIG. 5 is a flowchart illustrating a write operation of a real-time file.
[0089]
When the application opens the real-time file (step S11), first, an unused unit is searched with reference to the unit management table 211 (step S12).
[0090]
The unused unit obtained as a result of the search is newly assigned to a unit for storing a file, and the main data 20 to be stored is sequentially stored in a series of blocks corresponding to the unit. At this time, the unit use status information in the unit management table 211 corresponding to the unit used for storage is changed from “unused” to “RT all used”. Further, the block management table 211 is updated so that the flag of the block used for storage is changed to “1”. Further, link information of each block used for recording is added to the file management information 212 (step S13).
[0091]
Next, it is determined whether or not data to be stored remains (step S14). If there is no data to be stored, the file is closed (step S15), and the process ends. On the other hand, if data to be stored remains, an unused unit is further searched (step S12). Then, the data is stored in the unit obtained by the search (step S13). The above data storage processing is repeated until it is determined in step S14 that there is no data to be stored.
[0092]
FIG. 6 is a flowchart illustrating a non-real-time file write operation.
[0093]
When the application opens the non-real-time file (step S21), first, the unit management table 211 is searched for whether or not an NRT partially used unit exists (step S22). If there is no NRT partially used unit as a result of the search, an unused unit is searched again by referring to the unit management table 211 (step S24). Then, the block corresponding to the obtained unused unit is allocated as a block for storing the main data 20.
[0094]
Further, the unit use status information of the unit management table 211 corresponding to the unit used for storage is changed from “unused” to “partially used NRT” (step S25).
[0095]
On the other hand, if there is an NRT partially used unit as a result of the search in step S22, an unused block in the obtained NRT partially used unit is allocated as a block for storing main data 20 (step S23). . Here, when all the unused blocks in the NRT partially used unit are used by storage, the unit usage status information of this unit is changed from “NRT partially used” to “NRT fully used”.
[0096]
Then, the main data 20 is stored in the unused block allocated in step S23 or S24, and the block management table 210 is updated so that the flag of the block used for storage is changed to “1”. Further, link information of the block used for storage is added to the file management information 212 (step S26).
[0097]
Next, it is determined whether or not data to be stored remains (step S27). If there is no data to be stored, the file is closed (step S28), and the process ends. On the other hand, if there is data to be stored, an unused unit and an unused block are further searched, and the process of storing data in the block obtained by the search (steps S22 to S26) is repeated.
[0098]
FIG. 7 is a flowchart illustrating a real-time file deletion operation.
[0099]
When the application selects a real-time file to be deleted (step S31), the first block among the blocks storing the selected real-time file is obtained with reference to the link information of the file management information 212. Further, a unit corresponding to the block is calculated from the unit size information in the unit management table 211 (step S32). Then, the data stored in this block is sequentially erased.
[0100]
When the data stored in the block is erased in this way, the block management table 210 indicating the use status of the block changes from “1” indicating that the block is being used to “0” indicating that it is not used. Is changed to Further, when data is erased for all blocks in one unit, the unit use status information in the unit management table 211 indicating the use status of this unit is changed from "RT all use" to "unused" (step). S33).
[0101]
Then, it is determined whether or not data to be deleted remains (step S34). If there is no data to be deleted, the management information of this file is deleted from the file management information 212 (step S35), and the processing is performed. Is terminated.
[0102]
On the other hand, if data to be deleted remains, the pointer to the link information of the file management information 212 is advanced by one, the next block is obtained, and the block corresponding to the block is obtained from the unit size information in the unit management table 211. A unit is calculated (step S32). Then, similarly to the above, the block management table 210 and the unit management table 211 are updated (step S33). This updating process (steps S32 and S33) is repeated until it is determined in step S34 that there is no data to be deleted.
[0103]
FIG. 8 is a flowchart illustrating the operation of deleting a non-real-time file.
[0104]
When the application selects a non-real-time file to be deleted (step S41), the first block among the blocks storing the selected non-real-time file is acquired with reference to the link information of the file management information 212.
[0105]
Next, the block management table 210 indicating the use status of this block is changed from “1” indicating that the block is being used to “0” indicating that it is not used (step S43). Further, the use status of other blocks included in the unit corresponding to this block is checked (step S44), and when all the blocks constituting the unit are unused, unit management indicating the use status of this unit is performed. The unit use status information in the table 211 is changed to "unused" (step S46).
[0106]
When a part of the block constituting the unit is used, the unit use status information of the unit management table 211 indicating the use status of the unit is changed to “NRT partial use”. (Step S45).
[0107]
Next, it is determined whether or not data to be deleted remains (step S47). If the result of the determination is that there is no data to be deleted, the management information of this file is deleted from the file management information 212 ( Step S48), the process ends. On the other hand, when data to be deleted remains, the pointer indicating the link information of the file management information 212 is advanced by one, and the next block is obtained (step S42). Then, similarly to the above, the block management table 210 and the unit management table 211 are updated (steps S43 to S46). This updating process (steps S42 to S46) is repeated until it is determined in step S47 that there is no data to be deleted.
[0108]
FIG. 9 is a flowchart illustrating the initialization operation of the storage medium.
[0109]
When a storage medium is used for the first time in the present apparatus, the management data used for managing the storage area, specifically, the block management table 210 in the metadata 21, the unit, so that the storage medium can be used in the present apparatus. A management table 211 is generated, and initial settings are made.
[0110]
The application specifies the capacity of the unit and the number of units, and the unit management table 211 is initialized according to the application (step S51).
[0111]
In the block management table 210, “0” is set to “unused” for all blocks (step S52).
[0112]
In the unit management table 211, “RT usable unit” indicating that a real-time file can be stored is set as status information for all units, and all units constituting the unit are used as unit usage status. Is set to "unused" indicating that the can be stored (step S52).
[0113]
As described above, in the present embodiment, when managing the storage location of the main data in the storage medium, in addition to the block depending on the physical storage unit used in the conventional file storage method, it is processed in real time. A unit that is a recording unit suitable for storing data to be stored is used.
[0114]
This unit is set to a capacity that guarantees real-time processing, and is composed of a plurality of continuous blocks. Units and blocks are uniquely associated with each other by calculation using unit size information in the unit management table. Even if a real-time file such as video data stored in step (1) is stored in units, the file data can be read out in blocks by using only the block management table 210 without making the unit management table 211 essential.
[0115]
In addition, for data processed in a non-real time manner, data is stored in block units as in the conventional case, but the unit management table is also updated in accordance with the block usage status at this time.
[0116]
As described above, by changing the storage unit according to the attribute of the data, the storage medium can be used efficiently, and the occurrence of fragmentation of the storage area can be suppressed.
[0117]
B. Second embodiment
By the way, in the above embodiment, the unit management table defines only two types of units, “RT usable unit” and “RT unusable unit”, according to whether the unit is used or not used. . However, while data recording / erasing is repeated, a defect area occurs which cannot be compensated by error correction. As a result, even if the unit is unused, there may be a case where the unit cannot be used for storing and reproducing the real-time file.
[0118]
That is, a storage area such as a hard disk is usually provided with an alternative area in order to cope with the occurrence of a defective area. When a defective area occurs, data is allocated to the substitute area.
[0119]
However, the replacement area is usually physically separated from the series of storage areas. Therefore, when data is stored in the alternative area, extra time such as seek and rotation is required during storage and reproduction. Therefore, even if a unit is in an unused state, if a defective area exists in the unit, a write / read rate necessary for storage / reproduction of a real-time file may not be guaranteed. For this reason, even if the unit is unused, if a defective area occurs, the unit may not be used as it is as an RT usable unit.
[0120]
On the other hand, for example, in digital broadcasting, the bit rate for HD (High Definition) broadcasting is about 24 Mbps, and the bit rate for SD (Standard Definition) broadcasting is about 8 Mbps. Therefore, when a defective area occurs in a predetermined unit, even if the unit cannot be used for HD broadcasting, it may be usable for SD broadcasting at a lower rate. For this reason, even if the writing / reading rate of a unit is reduced due to the occurrence of a defective area, it is not appropriate to make the unit "RT unusable" uniformly.
[0121]
Therefore, in the present embodiment, a rank division of the write / read rate is assigned to each unit, and this rank division is included in the unit management table. Then, when writing a real-time file, a unit that can guarantee the transfer rate of the file is selected as a target unit by referring to the rank division.
[0122]
Each unit is initially ranked at the highest rate rank. Then, at the time of subsequent writing / reading, it is determined whether or not the transfer rate of the real-time file can be guaranteed. If the transfer rate cannot be guaranteed here, the rank is changed to a rank lower than the transfer rate of the file.
[0123]
Whether or not the transfer rate of the real-time file can be guaranteed is determined using, for example, a special command used when an HDD (hard disk drive) is used for AV data storage. This command is a command for emphasizing real-time property, and is a command for executing time-limited read and write.
[0124]
<Read / write command with time limit>
The definition of time here is that the HDD always returns a response to the host within the specified time. When these commands are used, the processing priority on the HDD side is as follows.
[0125]
1. Completes input / output of data normally within the specified time and notifies the host.
2. When an error occurs in the middle and a retry or alternative processing is required;
If it can be processed within the specified time, execute it. If the time exceeds the specified time, the error is ignored, the input / output processing for the specified number of sectors is completed within the specified time, and the host is notified. In this case, the host is notified in the form of "error occurred but input / output completed", and error information is recorded in a log.
3. When the I / O processing does not end even if the generated error is ignored;
Interrupt the processing within the specified time and notify the host in the form of a "time-out error". Originally, it is assumed that a response is returned within the specified time. However, as an exception, read / write is performed at least once, and no response is made within the specified time only when the specified time is already exceeded at this point. It is fine. However, it is necessary to notify the host that "the specified time is over".
[0126]
As described above, when the unit on the storage medium of the HDD has a defect, the real-time property in data access of the part is reduced. Therefore, if the unit status information for each unit is provided with a rank division of the bit rate that can be guaranteed by the unit, by referring to this, data of various bit rates are allocated to the appropriate units, thereby real-time In addition, it is possible to realize storage that guarantees the performance and effectively uses the storage medium.
[0127]
Hereinafter, a more specific configuration and control of such an embodiment will be described.
[0128]
<Replacement of media>
When there is a defect on the medium of the HDD which is a storage medium, a replacement block is usually assigned.
[0129]
In the case of an optical disk or the like, the position, the number, and the like of the substitute blocks are determined as standards, but in the case of an HDD, only the command interface is defined, and the internal structure differs for each drive vendor. Therefore, the substitution processing sequence, the substitution block position, the overhead time when reading and writing the substitution block, and the like are not specified. This poses a problem in real-time processing, and will be described below.
[0130]
<Relationship between physical address and logical address and fragmentation>
FIG. 13 shows a relationship among a physical address, a logical address, and a defective block management list on a medium. Hereinafter, the processing procedure of a defective block and the accompanying fragmentation will be described.
[0131]
When a hard disk is taken as an example, usually, at the start of use, the continuity of the logical address accessed from the host may be considered to be the continuity of the physical address on the medium. Originally, defective sectors already existing at the time of product shipment are replaced at the time of shipment, but are omitted here for simplicity.
[0132]
A substitute block for a late defective block is prepared on the disk. In the case of a hard disk, its number and physical position are not specified, and, for example, a substitute block area is arranged on the innermost circumference of the disk. Naturally, there is no mapping to a logical address for this area.
[0133]
As shown in FIG. 13, for example, when the logical block A is determined to be a defective block, the drive remaps the physical block A corresponding to the logical block A to the substitute block B + 1. That information is registered in the defect list.
[0134]
As described above, when the replacement processing of the defective block is performed, in the unit corresponding to the block in which the replacement processing is performed, even though the logical address is continuous, the logical block A is physically non-consecutive. State, and seek occurs before and after the block. This is a cause that is fatal for real-time processing.
[0135]
<Correlation between real-time guarantee of AV stream and alternative processing>
The following is an example of real-time processing of an AV stream.
[0136]
Assuming that the worst case transfer rate a (MB / s), the worst case (seek time + rotation waiting time) b (sec), the unit size c (MB), and the AV stream bit rate d (MB / s),
The worst case unit access (read / write) time is
y = c / a (sec),
The playback time of an AV stream in units of
z = c / d (sec)
It becomes.
[0137]
The relationship in the real-time processing of one AV stream is as follows.
y + b <z, that is, y <z−b
[0138]
The relationship in the real-time processing of two AV streams is as follows.
2 * (y + b) <z, that is, y <z / 2−b
[0139]
The relationship in real-time processing when n units of a unit are arranged in a substitute block in one AV stream is as follows.
y + (n + 1) b <z, that is, y <z− (n + 1) b
[0140]
In a unit alternately accessed by two AV streams, a relationship in real-time processing in a case where a total of n locations are arranged in a substitute block in any two units continuously accessed is as follows.
2y + (n + 2) b <z, that is, y <z / 2− (n + 2) b / 2
[0141]
As described above, the greater the number of alternative processes, the longer the unit access time. Then, when the threshold value is exceeded, the real-time property is broken.
[0142]
Therefore, it is necessary to disable a unit at a certain point where the number of replacement blocks increases.
[0143]
<Unit management table>
The unit management table 211 manages the use state of each unit when the storage area of the HDD 118 is regarded as an address space in units and numbered in order.
[0144]
As shown in FIG. 3, the unit is composed of entries 211a, 211b,... For example, the entry 211a is an entry of a unit corresponding to the entries 210a, 210b, 210c, 210d on the block management table 210. The unit management table 211 defines unit status information indicating whether or not a real-time file can be stored for the unit, and unit usage information indicating the usage status of the unit.
[0145]
The unit status information and the unit use status information of each unit are divided as shown in FIG.
[0146]
As in the first embodiment, the unit usage status information indicates four statuses of “RT full use”, “unused”, “NRT partial use”, and “NRT full use”.
[0147]
The unit status information indicates either “RT usable unit” or “RT unusable unit”. Here, the “RT usable unit” refers to a state in which real-time information can be recorded. The "RT unusable unit" refers to a state in which real-time information cannot be recorded.
[0148]
The “RT usable unit” further includes, for example, “a unit usable in an RT stream up to 30 Mbps”, “a unit usable in an RT stream up to 15 Mbps”, and an “RT stream up to 5 Mbps” depending on the bit rate of the real-time stream. It is divided into three stages of "usable unit".
[0149]
As described above, for example, in digital broadcasting, the bit rate for HD broadcasting is about 24 Mbps, and the bit rate for SD broadcasting is about 8 Mbps. In this case, a unit that cannot be used for storing an HD broadcast program may be usable for storing an SD broadcast program. When recording an analog broadcast, three different bit rates, for example, a high-quality recording mode of 10 Mbps, a standard recording mode of 6 Mbps, and a long-time recording mode of 3 Mbps are assumed. Also in this case, a unit that cannot be used in the high-quality recording mode may be usable in the standard recording mode or the long-time recording mode.
[0150]
The unit is an area that can be continuously recorded on the physical medium, but when a defective block is found, the block is reallocated to an alternative area. In this case, even if it is logically continuous, physically, a boundary occurs there, and seek and rotation wait time is required. This can be fatal to real-time processing in some cases.
[0151]
Therefore, in the initial state, the unit can be used at the highest bit rate rank as real-time processing, but as the use continues, the bit rate supported by the unit changes, so whether the system side can be used or not. Is checked, and if it is determined that it cannot be used, it is necessary to disable real-time information recording.
[0152]
The check on the system side can be executed, for example, by performing a read or write in a unit unit using a time-limited command with the above-mentioned time limit. The parameter of the time limit is a limit time during which the real-time processing does not fail according to the bit rate.
[0153]
By using this command, a unit whose time limit has been exceeded is unavailable at that bit rate, and the rank of the bit rate is set to a rank lower than the bit rate of the command.
[0154]
Here, the bit rate of the command is obtained by dividing the data size to be read and written by the command by the time limit. A unit that cannot be used even at the lowest bit rate is regarded as a unit that cannot record real-time information.
[0155]
FIG. 11 is a flowchart illustrating a file read operation according to the second embodiment.
[0156]
First, when a file is opened by an application (step S61), the link information stored in the file management information 212 of the file is referred to. At this time, the reference position of the link information is managed using the pointer. The block start address is obtained from the link information at the position indicated by the pointer, and data is read from the block on the storage area indicated by the block start address by a time-limited AV command (step S62).
[0157]
Next, it is determined whether or not “specified time over” has occurred by the read command with time limitation (step S63). As a result, when an “over time” error occurs, the corresponding bit rate rank in the unit status information of the unit management table 211 corresponding to the used unit is changed to a rank lower than the bit rate of this command. (Step S64).
[0158]
Then, it is determined whether or not the block being read is the last logical block constituting the file (step S65). If it is the last, the file is closed (step S66), and the read operation is terminated.
[0159]
If there is a block in which the block being read is not the last block of the logical block constituting the file, the pointer indicating the reference position of the link information is advanced by one, and the block start address is obtained from the next link information. Data is read from the block on the storage area indicated by the block start address (step S62). This reading process (steps S62 to S64) is repeated until it is determined in step S65 that the block being read is the last block.
[0160]
FIG. 12 is a flowchart illustrating a real-time file write operation according to the second embodiment.
[0161]
When the application opens the real-time file (step S71), first, the unit management table 211 is searched for an unused unit that can be used at the write bit rate. (Step S72).
[0162]
The unit obtained as a result of the search is newly assigned to a unit for storing a file, and the main data 20 to be stored is stored in a series of blocks corresponding to the unit by a time-limited write command. At this time, the unit use status information in the unit management table 211 corresponding to the unit used for storage is changed from “unused” to “RT all used”. Further, the block management table 211 is updated so that the flag of the block used for storage is changed to “1”. Further, link information of each block used for recording is added to the file management information 212 (step S73).
[0163]
Next, it is determined whether or not "specified time over" has occurred by the time-limited write command in step S73 (step S74). As a result, when an “over time” error occurs, the corresponding bit rate rank in the unit status information of the unit management table 211 corresponding to the used unit is changed to a rank lower than the bit rate of the command ( Step S75).
[0164]
Next, it is determined whether or not data to be stored remains (step S76). If there is no data to be stored, the file is closed (step S77), and the process ends. On the other hand, when data to be stored remains, the processing from step S72 is further repeated.
[0165]
In a read operation and a write operation, assuming that there is no read error or write error, respectively, if a "time limit exceeded" error occurs in a time-limited command, it may be determined that the block is already in a fragmented state. it can. Therefore, in this case, the corresponding bit rate rank in the unit status information is set to a rank lower than the bit rate of the command.
[0166]
The operation for initializing the storage medium according to the second embodiment is performed in the same manner as the operation for initializing the storage medium according to the first embodiment (FIG. 9). Here, in step S52, "RT usable unit (up to bit rate aMbps)" indicating that a real-time file having the highest bit rate can be stored is further set as the state information.
[0167]
As described above, according to the present embodiment, similarly to the first embodiment, in addition to the merit that the real-time file and the non-real-time file can be written smoothly and efficiently, there is a further demand. Various real-time file data having different bit rates can be efficiently sorted and recorded on the same HDD, and therefore, there is an advantage that the usage efficiency of the HDD can be further improved.
[0168]
It is needless to say that the present invention is not limited to the above embodiment. In the above-described embodiment, a digital recording / reproducing apparatus for recording / reproducing MPEG data has been described as an example. However, a digital recording / reproducing apparatus for recording / reproducing only audio data or recording / reproducing data obtained via the Internet may be used. It can be widely used for recording and playback devices.
[0169]
The programs for generating the various management tables shown in FIGS. 2 and 10 and for executing the processes shown in FIGS. 4 to 9, 11 and 12 are the same as those in the form preinstalled in the HDD control module 117. , Or from a storage medium such as a CD-ROM, or from an application server via the Internet.
[0170]
In addition, the update timing of the metadata, the configuration timing of the metadata file, and the like can be appropriately changed.
[0171]
【The invention's effect】
According to the file recording management method of the present invention, it is possible to perform file allocation suitable for reproducing a real-time file, and to suppress the occurrence of fragmentation of a storage area due to small-sized data, thereby improving the use efficiency of the storage area. Can be done.
[Brief description of the drawings]
FIG. 1 is an overall configuration diagram of a recording / reproducing apparatus according to a first embodiment.
FIG. 2 is a view showing the structure of recording information according to the first embodiment;
FIG. 3 is a diagram schematically showing a recording method according to the first embodiment.
FIG. 4 is a flowchart of a read operation according to the first embodiment;
FIG. 5 is a flowchart of a write operation according to the first embodiment;
FIG. 6 is a flowchart of a write operation according to the first embodiment;
FIG. 7 is a flowchart of a deletion operation according to the first embodiment.
FIG. 8 is a flowchart of a deletion operation according to the first embodiment.
FIG. 9 is a flowchart of an operation of initializing the storage medium according to the first embodiment;
FIG. 10 is a diagram showing a structure of recording information according to a second embodiment.
FIG. 11 is a flowchart of a read operation according to the second embodiment;
FIG. 12 is a flowchart of a write operation according to the second embodiment.
FIG. 13 is a diagram showing a relationship among a physical address, a logical address, and a defective sector list on a medium.
FIG. 14 is a diagram showing a file configuration in a conventional file recording method.
FIG. 15 is a diagram showing a file configuration in a conventional file recording method.
[Explanation of symbols]
30, 30a-30d block
201 @ Real-time file 1
202 @ Non-real-time file 2
210 block management table
210a to 210d Entry in block management table
211 Unit management table
211a, 211b @ Unit management table entry

Claims (24)

複数のブロックに分割された記憶領域にファイルデータを記憶するファイルデータ記憶管理方法であって、
連続した複数の前記ブロックから構成したユニットの属性を管理するユニット属性テーブルに基づいてファイルデータを記憶することを特徴とするファイルデータ記憶管理方法。
A file data storage management method for storing file data in a storage area divided into a plurality of blocks,
A file data storage management method characterized by storing file data based on a unit attribute table for managing attributes of a unit composed of a plurality of continuous blocks.
請求項1において、前記ブロックにデータが記憶されているか否かを管理するブロック管理テーブルを、更に含み、
前記ユニット属性テーブルは、各ユニットの使用状況と、リアルタイムデータを記憶可能か否かを規定する情報を含み、
前記データ記憶処理は、
記憶されるファイルデータがリアルタイムデータである場合、前記ユニット属性テーブルを参照して、リアルタイムデータが記憶可能な未使用のユニットを検索し、検索されたユニットに含まれる前記ブロックにこのファイルデータを記憶し、
記憶されるファイルデータが非リアルタイムデータである場合、前記ユニット属性テーブルを参照して、そのユニット中の一部のブロックに既に非リアルタイムデータが記憶されているユニットを検索し、この検索により獲得されたユニットに含まれる未使用のブロックにこのファイルデータを記憶する処理を含むことを特徴とするファイルデータ記憶管理方法。
2. The device according to claim 1, further comprising a block management table for managing whether data is stored in the block,
The unit attribute table includes a use status of each unit and information that specifies whether real-time data can be stored,
The data storage processing includes:
If the stored file data is real-time data, the unit attribute table is referred to, an unused unit capable of storing the real-time data is searched, and the file data is stored in the block included in the searched unit. And
When the stored file data is non-real-time data, the unit attribute table is searched for a unit in which non-real-time data is already stored in some blocks in the unit, and the unit is obtained by this search. And storing the file data in unused blocks included in the unit.
請求項2において、
前記データ記憶処理は、記憶されるファイルデータが非リアルタイムデータである場合、前記ユニット属性テーブルを参照して、そのユニット中の一部のブロックに既に非リアルタイムデータが記憶されているユニットを獲得できないとき、前記ユニット属性テーブルを参照して、未使用のユニットを検索し、この検索により獲得されたユニットに含まれる前記ブロックにこのファイルデータを記憶する処理を含むことを特徴とするファイルデータ記憶管理方法。
In claim 2,
In the data storage processing, when file data to be stored is non-real-time data, a unit in which non-real-time data is already stored in some blocks in the unit cannot be acquired by referring to the unit attribute table. File data storage management, comprising: searching for an unused unit by referring to the unit attribute table; and storing the file data in the block included in the unit obtained by the search. Method.
請求項2または3において、前記ユニット属性テーブルは、さらに、各ユニットに対する書き込みおよび/または読み出しレートのランクを規定する情報を含み、
前記データ記憶処理は、記憶されるファイルデータがリアルタイムデータである場合、前記ユニット属性テーブルを参照して、このファイルデータに要求される書き込みおよび/または読み出しレートを満たす未使用の前記ユニットを検索し、検索されたユニットに含まれる前記ブロックにこのファイルデータを記憶する処理を含むことを特徴とするファイルデータ記憶管理方法。
4. The unit attribute table according to claim 2, wherein the unit attribute table further includes information defining a rank of a write and / or read rate for each unit,
When the file data to be stored is real-time data, the data storage processing refers to the unit attribute table to search for an unused unit that satisfies a write and / or read rate required for the file data. And storing the file data in the block included in the searched unit.
請求項4において、ファイルデータの書き込みまたは読み出し時に、前記ユニットに対する書き込みまたは読み出しをこのファイルデータに要求される書き込みおよび/または読み出しレートにてなし得なかった場合、このユニットの書き込み/読み出しレートのランクを、このファイルデータに要求された書き込み/読み出しレートのランクよりも低いランクに変更するレートランク変更処理を、更に含むことを特徴とするファイルデータ記憶管理方法。5. The rank of the write / read rate of the unit according to claim 4, wherein when writing or reading the file data, writing or reading to or from the unit cannot be performed at a writing and / or reading rate required for the file data. And a rate rank changing process for changing the rank of the file data to a rank lower than the rank of the write / read rate requested for the file data. 請求項2から5の何れかにおいて、ファイルデータの記憶に使用されたブロックのリンクをファイルデータ毎に規定するリンクテーブルを、更に含むことを特徴とするファイルデータ記憶管理方法。6. The file data storage management method according to claim 2, further comprising a link table that defines a link of a block used for storing the file data for each file data. 請求項2から6の何れかにおいて、前記ユニットの容量Usizeは、
Usize>N×(Tw+(Usize/Bhdd))×Bsys、
(但し、記憶装置手段との間のデータ転送最低レートBhdd、データストリームのビットレートBsys、前記記憶手段におけるシーク時間のワースト値Tw、同時に処理するストリーム数をNとする)を満たすことを特徴とするファイルデータ記憶管理方法。
The capacity Usize of the unit according to any one of claims 2 to 6,
Usize> N × (Tw + (Usize / Bhdd)) × Bsys,
(However, the minimum data transfer rate Bhdd with respect to the storage device means, the bit rate Bsys of the data stream, the worst value Tw of the seek time in the storage means, and the number of streams to be simultaneously processed are N). File data storage management method.
複数のブロックに分割された記憶領域にファイルデータを記憶するファイルデータ記憶装置であって、
前記ブロックにデータが記憶されているか否かを管理するブロック管理テーブルを生成するための手段と、
連続した複数の前記ブロックから構成したユニットの属性を管理するユニット属性テーブルを生成するための手段と、
前記ユニット属性テーブルに基づいてファイルデータを記憶するための手段とを備え、
前記ユニット属性テーブルは、各ユニットの使用状況と、リアルタイムデータを記憶可能か否かを規定する情報を含み、
前記データを記憶するための手段は、
記憶されるファイルデータがリアルタイムデータである場合、前記ユニット属性テーブルを参照して、リアルタイムデータが記憶可能な未使用のユニットを検索し、検索されたユニットに含まれる前記ブロックにこのファイルデータを記憶し、
記憶されるファイルデータが非リアルタイムデータである場合、前記ユニット属性テーブルを参照して、そのユニット中の一部のブロックに既に非リアルタイムデータが記憶されているユニットを検索し、この検索により獲得されたユニットに含まれる未使用のブロックにこのファイルデータを記憶することを特徴とするファイルデータ記憶装置。
A file data storage device that stores file data in a storage area divided into a plurality of blocks,
Means for generating a block management table for managing whether data is stored in the block,
Means for generating a unit attribute table for managing attributes of a unit composed of a plurality of continuous blocks,
Means for storing file data based on the unit attribute table,
The unit attribute table includes a use status of each unit and information that specifies whether real-time data can be stored,
The means for storing the data comprises:
If the stored file data is real-time data, the unit attribute table is referred to, an unused unit capable of storing the real-time data is searched, and the file data is stored in the block included in the searched unit. And
When the stored file data is non-real-time data, the unit attribute table is searched for a unit in which non-real-time data is already stored in some blocks in the unit, and the unit is obtained by this search. A file data storage device for storing the file data in unused blocks included in the unit.
請求項8において、
前記データを記憶するための手段は、記憶されるファイルデータが非リアルタイムデータである場合、前記ユニット属性テーブルを参照して、そのユニット中の一部のブロックに既に非リアルタイムデータが記憶されているユニットを獲得できないとき、前記ユニット属性テーブルを参照して、未使用のユニットを検索し、この検索により獲得されたユニットに含まれる前記ブロックにこのファイルデータを記憶することを特徴とするファイルデータ記憶装置。
In claim 8,
When the file data to be stored is non-real-time data, the unit for storing the data refers to the unit attribute table, and the non-real-time data is already stored in some blocks in the unit. When a unit cannot be obtained, an unused unit is searched by referring to the unit attribute table, and the file data is stored in the block included in the unit obtained by the search. apparatus.
請求項8または9において、前記ユニット属性テーブルは、さらに、各ユニットに対する書き込みおよび/または読み出しレートのランクを規定する情報を含み、
前記データを記憶するための手段は、記憶されるファイルデータがリアルタイムデータである場合、前記ユニット属性テーブルを参照して、このファイルデータに要求される書き込みおよび/または読み出しレートを満たす未使用の前記ユニットを検索し、検索されたユニットに含まれる前記ブロックにこのファイルデータを記憶することを特徴とするファイルデータ記憶装置。
10. The unit attribute table according to claim 8 or 9, wherein the unit attribute table further includes information defining a rank of a write and / or read rate for each unit,
The means for storing the data, when the file data to be stored is real-time data, refers to the unit attribute table, and stores the unused unused data satisfying the write and / or read rate required for the file data. A file data storage device which searches for a unit and stores the file data in the block included in the searched unit.
請求項10において、ファイルデータの書き込みまたは読み出し時に、前記ユニットに対する書き込みまたは読み出しをこのファイルデータに要求される書き込みおよび/または読み出しレートにてなし得なかった場合、このユニットの書き込み/読み出しレートのランクを、このファイルデータに要求された書き込み/読み出しレートのランクよりも低いランクに変更する処理を実行するための手段を、更に含むことを特徴とするファイルデータ記憶装置。11. The rank of the write / read rate of the unit according to claim 10, wherein, when writing or reading the file data, if writing or reading to or from the unit cannot be performed at a writing and / or reading rate required for the file data. File data storage device, further comprising means for executing a process of changing the rank of the file data to a rank lower than the rank of the write / read rate requested for the file data. 請求項8から11の何れかにおいて、ファイルデータの記憶に使用されたブロックのリンクをファイルデータ毎に規定するリンクテーブル生成するための手段を、更に含むことを特徴とするファイルデータ記憶装置。The file data storage device according to any one of claims 8 to 11, further comprising means for generating a link table that specifies a link of a block used for storing the file data for each file data. 請求項8から12の何れかにおいて、前記ユニットの容量Usizeは、
Usize>N×(Tw+(Usize/Bhdd))×Bsys、
(但し、記憶装置手段との間のデータ転送最低レートBhdd、データストリームのビットレートBsys、前記記憶手段におけるシーク時間のワースト値Tw、同時に処理するストリーム数をNとする)を満たすことを特徴とするファイルデータ記憶装置。
The capacity Usize of the unit according to any one of claims 8 to 12,
Usize> N × (Tw + (Usize / Bhdd)) × Bsys,
(However, the minimum data transfer rate Bhdd with respect to the storage device means, the bit rate Bsys of the data stream, the worst value Tw of the seek time in the storage means, and the number of streams to be simultaneously processed are N). File data storage device.
複数のブロックに分割された記憶領域にファイルデータを記憶するための処理を実行するプログラムであって、
連続した複数の前記ブロックからユニットを構成し、各ユニットの属性を管理するユニット属性テーブルを生成するステップと、
前記ユニット属性テーブルに基づいてファイルデータを記憶するデータ記憶ステップとを含むことを特徴とするプログラム。
A program for executing a process for storing file data in a storage area divided into a plurality of blocks,
Constructing a unit from a plurality of continuous blocks, and generating a unit attribute table for managing attributes of each unit;
Storing a file data based on the unit attribute table.
請求項14において、前記ブロックにデータが記憶されているか否かを管理するブロック管理テーブルを生成するステップを、更に含み、
前記ユニット属性テーブルは、各ユニットの使用状況と、リアルタイムデータを記憶可能か否かを規定する情報を含み、
前記データ記憶ステップは、
記憶されるファイルデータがリアルタイムデータである場合、前記ユニット属性テーブルを参照して、リアルタイムデータが記憶可能な未使用のユニットを検索し、検索されたユニットに含まれる前記ブロックにこのファイルデータを記憶し、
記憶されるファイルデータが非リアルタイムデータである場合、前記ユニット属性テーブルを参照して、そのユニット中の一部のブロックに既に非リアルタイムデータが記憶されているユニットを検索し、この検索により獲得されたユニットに含まれる未使用のブロックにこのファイルデータを記憶するステップを含むことを特徴とするプログラム。
15. The method according to claim 14, further comprising: generating a block management table for managing whether data is stored in the block.
The unit attribute table includes a use status of each unit and information that specifies whether real-time data can be stored,
The data storage step includes:
If the stored file data is real-time data, the unit attribute table is referred to, an unused unit capable of storing the real-time data is searched, and the file data is stored in the block included in the searched unit. And
When the stored file data is non-real-time data, the unit attribute table is searched for a unit in which non-real-time data is already stored in some blocks in the unit, and the unit is obtained by this search. A step of storing the file data in an unused block included in the unit.
請求項15において、前記データ記憶ステップは、記憶されるファイルデータが非リアルタイムデータである場合、前記ユニット属性テーブルを参照して、そのユニット中の一部のブロックに既に非リアルタイムデータが記憶されているユニットを獲得できないとき、前記ユニット属性テーブルを参照して、未使用のユニットを検索し、この検索により獲得されたユニットに含まれる前記ブロックにこのファイルデータを記憶するステップを含むことを特徴とするプログラム。16. The data storage step according to claim 15, wherein when the stored file data is non-real-time data, the non-real-time data is already stored in some blocks in the unit with reference to the unit attribute table. When the unit cannot be acquired, the unit attribute table is searched for an unused unit by referring to the unit attribute table, and the file data is stored in the block included in the unit acquired by the search. Program to do. 請求項15または16において、前記ユニット属性テーブルは、さらに、各ユニットに対する書き込みおよび/または読み出しレートのランクを規定する情報を含み、
前記データ記憶ステップは、記憶されるファイルデータがリアルタイムデータである場合、前記ユニット属性テーブルを参照して、このファイルデータに要求される書き込みおよび/または読み出しレートを満たす未使用の前記ユニットを検索し、検索されたユニットに含まれる前記ブロックにこのファイルデータを記憶するステップを含むことを特徴とするプログラム。
17. The unit attribute table according to claim 15, wherein the unit attribute table further includes information defining a rank of a write and / or read rate for each unit,
When the file data to be stored is real-time data, the data storage step refers to the unit attribute table to search for an unused unit that satisfies a write and / or read rate required for the file data. And storing the file data in the block included in the searched unit.
請求項17において、ファイルデータの書き込みまたは読み出し時に、前記ユニットに対する書き込みまたは読み出しをこのファイルデータに要求される書き込みおよび/または読み出しレートにてなし得なかった場合、このユニットの書き込み/読み出しレートのランクを、このファイルデータに要求された書き込み/読み出しレートのランクよりも低いランクに変更するレートランク変更ステップを、更に含むことを特徴とするプログラム。18. The rank of the write / read rate of the unit according to claim 17, wherein when writing or reading the file data, writing or reading to or from the unit cannot be performed at a writing and / or reading rate required for the file data. The program further comprises a rate rank changing step of changing the file rank to a rank lower than the rank of the write / read rate requested for the file data. 請求項15から18の何れかにおいて、ファイルデータの記憶に使用されたブロックのリンクをファイルデータ毎に規定するリンクテーブルを生成するステップを、更に含むことを特徴とするプログラム。19. The program according to claim 15, further comprising a step of generating a link table that specifies a link of a block used for storing the file data for each file data. 請求項15から19の何れかにおいて、前記ユニットの容量Usizeは、
Usize>N×(Tw+(Usize/Bhdd))×Bsys、
(但し、記憶装置手段との間のデータ転送最低レートBhdd、データストリームのビットレートBsys、前記記憶手段におけるシーク時間のワースト値Tw、同時に処理するストリーム数をNとする)を満たすことを特徴とするプログラム。
20. The unit according to claim 15, wherein a capacity Usize of the unit is:
Usize> N × (Tw + (Usize / Bhdd)) × Bsys,
(However, the minimum data transfer rate Bhdd with respect to the storage device means, the bit rate Bsys of the data stream, the worst value Tw of the seek time in the storage means, and the number of streams to be simultaneously processed are N). Program to do.
複数のブロックに分割された記憶領域にファイルデータが記憶される記憶媒体であって、
前記ブロックにデータが記憶されているか否かを管理するブロック管理テーブルと、
連続した複数の前記ブロックから構成したユニットの属性を管理するユニット属性テーブルとが記憶されていることを特徴とする記憶媒体。
A storage medium in which file data is stored in a storage area divided into a plurality of blocks,
A block management table that manages whether data is stored in the block,
A storage medium storing a unit attribute table for managing attributes of a unit formed of a plurality of continuous blocks.
請求項21において、前記ユニット属性テーブルは、各ユニットの使用状況と、リアルタイムデータを記憶可能か否かを規定する情報を含むことを含むことを特徴とする記憶媒体。22. The storage medium according to claim 21, wherein the unit attribute table includes a use status of each unit and information specifying whether real-time data can be stored. 請求項22において、前記ユニット属性テーブルは、さらに、各ユニットに対する書き込みおよび/または読み出しレートのランクを規定する情報を含むことを特徴とする記憶媒体。23. The storage medium according to claim 22, wherein the unit attribute table further includes information defining a rank of a writing and / or reading rate for each unit. 請求項22または23において、この記憶媒体は、ファイルデータの記憶に使用されたブロックのリンクをファイルデータ毎に規定するリンクテーブルを更に記憶することを特徴とする記憶媒体。24. The storage medium according to claim 22, wherein the storage medium further stores a link table that specifies a link of a block used for storing the file data for each file data.
JP2003030411A 2002-02-08 2003-02-07 File data storage management method, file data storage device, program for executing processing for storing file data, and storage medium Expired - Fee Related JP3631234B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003030411A JP3631234B2 (en) 2002-02-08 2003-02-07 File data storage management method, file data storage device, program for executing processing for storing file data, and storage medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2002031793 2002-02-08
JP2002088273 2002-03-27
JP2003030411A JP3631234B2 (en) 2002-02-08 2003-02-07 File data storage management method, file data storage device, program for executing processing for storing file data, and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2004322082A Division JP3717922B2 (en) 2002-02-08 2004-11-05 File data storage management method, file data storage device, program for executing processing for storing file data, and storage medium

Publications (2)

Publication Number Publication Date
JP2004005423A true JP2004005423A (en) 2004-01-08
JP3631234B2 JP3631234B2 (en) 2005-03-23

Family

ID=30449107

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003030411A Expired - Fee Related JP3631234B2 (en) 2002-02-08 2003-02-07 File data storage management method, file data storage device, program for executing processing for storing file data, and storage medium

Country Status (1)

Country Link
JP (1) JP3631234B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005096220A1 (en) * 2004-03-31 2005-10-13 Matsushita Electric Industrial Co., Ltd. Memory card and memory card system
JP2007074452A (en) * 2005-09-08 2007-03-22 Sony Corp Broadcast receiver/video recorder and its simultaneous recording method
JP2009087255A (en) * 2007-10-02 2009-04-23 Canon Inc Data storage device, data storage method, and program
JP2009110287A (en) * 2007-10-30 2009-05-21 Fujitsu Ltd Access control device and access control method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005096220A1 (en) * 2004-03-31 2005-10-13 Matsushita Electric Industrial Co., Ltd. Memory card and memory card system
KR100826065B1 (en) * 2004-03-31 2008-04-29 마츠시타 덴끼 산교 가부시키가이샤 Memory card and memory card system
US7433245B2 (en) 2004-03-31 2008-10-07 Matsushita Electric Industrial Co., Ltd. Memory card able to guarantee a recoding rate and memory card system using the memory card
JP2007074452A (en) * 2005-09-08 2007-03-22 Sony Corp Broadcast receiver/video recorder and its simultaneous recording method
JP4529847B2 (en) * 2005-09-08 2010-08-25 ソニー株式会社 Recording apparatus and simultaneous recording method thereof
JP2009087255A (en) * 2007-10-02 2009-04-23 Canon Inc Data storage device, data storage method, and program
JP2009110287A (en) * 2007-10-30 2009-05-21 Fujitsu Ltd Access control device and access control method

Also Published As

Publication number Publication date
JP3631234B2 (en) 2005-03-23

Similar Documents

Publication Publication Date Title
US6285827B1 (en) Optical disc recording apparatus, computer-readable recording medium recording a file management program, and optical disc
US7647470B2 (en) Memory device and controlling method for elongating the life of nonvolatile memory
US20060008257A1 (en) Intelligent caching scheme for streaming file systems
US6370325B2 (en) Optical disc recording apparatus, computer-readable recording medium recording a file management program, and optical disc
JP2012094242A (en) Data processor
US7058770B2 (en) Method and apparatus for controlling the recording of digital information, by using unit management table
US7197238B2 (en) File system, storage area managing method, and storage medium thereof
JP3170499B1 (en) Information recording medium, recording method and reproducing method therefor, system control unit therefor, information recording apparatus and information reproducing apparatus
US7509342B2 (en) File data storage management method, file data storage device, program executing processing for storing file data, and storage medium
KR100982118B1 (en) Recording device, recording method, and recording medium
JP4241839B2 (en) Data and file system information recording apparatus and recording method
WO2011121870A1 (en) Data recording device, and data recording method
JP4251219B2 (en) Editing apparatus and editing method
JP3631234B2 (en) File data storage management method, file data storage device, program for executing processing for storing file data, and storage medium
US20050259542A1 (en) Reproduction device and method, recording medium, and program
JP3717922B2 (en) File data storage management method, file data storage device, program for executing processing for storing file data, and storage medium
JP2005216119A (en) Recording medium
JP2003296156A (en) Information recording management device, data recording and regenerating device, information recording management method and file management method
US8565584B2 (en) Editing apparatus and editing method
JP2000276856A (en) Device and method for recording data and device and method for reproducing data
EP2256648A1 (en) Method for storing data files, method for reading data content, and data store
JP2000149427A (en) Recorder and recording method, reproducer and reproducing method, recording and reproducing device and method therefor, and provision medium
JP3698630B2 (en) Information recording medium, recording method and reproducing method thereof, system control unit thereof, information recording apparatus and information reproducing apparatus thereof
JP3171584B1 (en) Information recording medium, recording method and reproducing method therefor, system control unit therefor, information recording apparatus and information reproducing apparatus
JP3171585B1 (en) Information recording medium, recording method and reproducing method therefor, system control unit therefor, information recording apparatus and information reproducing apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040330

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20040331

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20040419

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040907

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041105

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20041130

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041215

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081224

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081224

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091224

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101224

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101224

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111224

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121224

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131224

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees