JP2005108345A - Recorder and program - Google Patents

Recorder and program Download PDF

Info

Publication number
JP2005108345A
JP2005108345A JP2003341757A JP2003341757A JP2005108345A JP 2005108345 A JP2005108345 A JP 2005108345A JP 2003341757 A JP2003341757 A JP 2003341757A JP 2003341757 A JP2003341757 A JP 2003341757A JP 2005108345 A JP2005108345 A JP 2005108345A
Authority
JP
Japan
Prior art keywords
unit
block
rearrangement
real
time data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003341757A
Other languages
Japanese (ja)
Other versions
JP4204433B2 (en
Inventor
Yoshihiro Hori
吉宏 堀
Yuichi Kanai
雄一 金井
Yumi Okamura
由美 岡村
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 JP2003341757A priority Critical patent/JP4204433B2/en
Publication of JP2005108345A publication Critical patent/JP2005108345A/en
Application granted granted Critical
Publication of JP4204433B2 publication Critical patent/JP4204433B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a recorder with which relocation for real-time data is executed in order to keep its real-time characteristics when the data relocation for a storage medium is performed and processing can be resumed in succession by considering usage for the storage medium by a user with the highest priority even after the processing is once interrupted. <P>SOLUTION: Necessity for the relocation is decided for each of the unit blocks consisting of four blocks. When only the real-time data is stored on a unit block m and the real-time data is not stored on the head for this unit block, the relocation for the unit block is decided to be required. In this occasion, the relocation is executed for each of the blocks constituting the unit block, or for each of the four blocks in other words. In the fig., B11-13 for a unit block m and a head block 14 for the unit block m+1 are relocated. In this process, an address for the relocation destination is an unused unit block. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、データを記憶媒体に記憶し、再生するレコーダに関するものであり、特に、既記録データの再配置を行う際に用いて好適なものである。
The present invention relates to a recorder that stores and reproduces data in a storage medium, and is particularly suitable for use in rearranging recorded data.

IT(Information Technology)の発達に伴い、音楽や映像などのコンテンツをデジタルデータ(以下、コンテンツデータと称す)としてデジタル記憶メディアに記憶し、これを再生して楽しむことが可能となってきた。   With the development of IT (Information Technology), it has become possible to store content such as music and video as digital data (hereinafter referred to as content data) on a digital storage medium and play it back.

CD(Compact Disc),DVD(Digital Versatile Disc)などの再生専用デジタル記憶メディアに、コンテンツ提供者側で記憶されたコンテンツデータを再生することから始まり、近年ではDVD-RAM(DVD-Random Access Memory)やHDD(Hard Disk Drive)といったランダムアクセス可能な書き換え型記憶メディアを利用して、利用者側でコンテンツデータを録画することができるようになった。   It starts with playing content data stored on the content provider side on playback-only digital storage media such as CD (Compact Disc) and DVD (Digital Versatile Disc), and in recent years DVD-RAM (DVD-Random Access Memory) Users can now record content data using random-access rewritable storage media such as HDDs (Hard Disk Drives).

HDDを記憶メディアとして用いたものとして、HDDを内蔵したビデオレコーダの商品化が始まっている。   Commercialization of video recorders with built-in HDDs has started, using HDDs as storage media.

このようなビデオレコーダに内蔵されたHDDには、2種類のデータが記憶されることになる。リアルタイムデータとノンリアルタイムデータである。リアルタイムデータは、ビデオデータそのものであり、ノンリアルタムデータは、記憶したビデオデータを管理する管理データや、EPG(Electric Program Guide)などの番組データ、予約録画の予約データなどである。   Two types of data are stored in the HDD built in such a video recorder. Real-time data and non-real-time data. Real-time data is video data itself, and non-realm data is management data for managing stored video data, program data such as EPG (Electric Program Guide), reservation data for reserved recording, and the like.

リアルタイムデータは、リアルタイムで記憶または再生するために所定のビットレートにて連続して記憶または再生を行う必要がある。実際には、HDDに対する書き込み・読み出し時の応答時間に制限を加えると共に、バッファメモリからのデータ読み出し速度を調整することより、ビットレートを補償している。これに対して、ノンリアルタイムデータはリアルタイム性を重視する必要がないデータである。   Real-time data must be stored or reproduced continuously at a predetermined bit rate in order to be stored or reproduced in real time. In practice, the bit rate is compensated by limiting the response time at the time of writing to and reading from the HDD and adjusting the data reading speed from the buffer memory. On the other hand, non-real time data is data that does not require real-time characteristics.

HDDにおけるアクセス(書き込み/読み出し)単位は512バイトのセクタであり、各セクタには、論理アドレスが付与されている。論理ドレスを指定することによって記憶媒体上の位置が指定される。   The access (write / read) unit in the HDD is a 512-byte sector, and a logical address is given to each sector. By specifying the logical dress, the position on the storage medium is specified.

リアルタイムデータを、HDD内の連続する論理アドレスによって指定される一連のセクタに記憶する場合、シークによるアクセス待ち時間が短くなるため、データへのアクセス時間も短くなり、書き込みまたは読み出しが余裕を持って処理される。   When real-time data is stored in a series of sectors specified by consecutive logical addresses in the HDD, the access waiting time due to seek is shortened, so the access time to the data is also shortened, and there is room for writing or reading. It is processed.

しかしながら、ビデオデータに代表されるリアルタイムデータのデータ量は膨大であり、この膨大なデータを常に論理アドレスが連続するセクタに配するようにセクタをHDDに確保することは、実現性に乏しい。   However, the amount of real-time data represented by video data is enormous, and it is not feasible to secure a sector in the HDD so that this enormous amount of data is always allocated to a sector with continuous logical addresses.

これに対して、HDDに内に点在するようにセクタを配した場合、データの書き込みまたは読み出し時に、頻繁にシーク(磁気ヘッドの移動)が発生する。このため、データの書き込みに要するアクセス時間は、シーク毎に費やされるシーク時間および回転待ち時間分遅くなり、アクセスが間に合わなく恐れがある。   On the other hand, when the sectors are arranged so as to be scattered in the HDD, frequent seek (movement of the magnetic head) occurs when data is written or read. For this reason, the access time required for writing data is delayed by the seek time and the rotation waiting time spent for each seek, and there is a fear that access may not be in time.

そこで、リアルタイムデータに対しては、ある程度のデータを連続してアクセスできるように、予め定めた一定数の連続セクタを1つの記憶単位、すなわち、“ユニット”としてアクセスを行う。   Therefore, the real-time data is accessed by using a predetermined number of continuous sectors as one storage unit, that is, “unit” so that a certain amount of data can be continuously accessed.

これに対し、ノンリアルタイムデータは時間的制限がないため、アクセス単位を規定する必要はなく、バッファメモリを介す必要もない。また、このノンリアルタイムデータは、リアルタイムデータに比してデータ量が少ない。したがって、記憶単位については、ビデオレコーダにおいて管理可能な最小の単位で扱かった方が効率がよい。   On the other hand, since non-real time data has no time limit, it is not necessary to define an access unit and it is not necessary to use a buffer memory. Further, the non-real time data has a smaller data amount than the real time data. Therefore, it is more efficient to handle the storage unit in the smallest unit that can be managed by the video recorder.

この最小の単位を“ブロック”と称する。ブロックは、このビデオレコーダにおいて採用されたファイルシステムによって決定されるユニットより小さな単位であり、連続する論理アドレスにて指定されるセクタで構成される。   This minimum unit is referred to as a “block”. A block is a unit smaller than a unit determined by a file system adopted in this video recorder, and is composed of sectors specified by successive logical addresses.

尚、ブロックは、FAT(File Allocation Table)ファイルシステムでは、“クラスタ”と称され、UDF(Universal Disk Format)(例えば、非特許文献1参照)では、論理ブロックと称される。   A block is referred to as a “cluster” in a FAT (File Allocation Table) file system, and is referred to as a logical block in a UDF (Universal Disk Format) (for example, see Non-Patent Document 1).

また、ユニットも、ファイルシステムによって管理される必要があるため、ユニットは連続したブロックによって構成されることが最適である。   In addition, since the unit also needs to be managed by the file system, it is optimal that the unit is constituted by continuous blocks.

このような2種類のデータを混在したデータの管理は、リアルタイムデータを記憶する領域と、ノンリアルタイムデータを記憶する領域を、予め分割して管理するビデオレコーダ独自のファイルシステムを用いることで実現することができる。   Management of data in which two types of data are mixed is realized by using a file system unique to a video recorder that divides and manages an area for storing real-time data and an area for storing non-real-time data. be able to.

他方、ITの発達は、これまで独立して扱われてきたAV機器とPC(personal computer)との境界を取り除いてしまった。このためデジタル記憶メディアを、ビデオレコーダから挿脱可能な可搬型デジタル記憶メディアとした場合には、その可搬型デジタル記憶メディアは、PCにおいても利用可能なデジタル記憶メディアとして扱われることができる。   On the other hand, the development of IT has removed the boundary between AV devices and personal computers (PCs) that have been treated independently. For this reason, when the digital storage medium is a portable digital storage medium that can be inserted into and removed from the video recorder, the portable digital storage medium can be handled as a digital storage medium that can also be used in a PC.

したがって、HDDを内蔵型から可搬型へと進化させたビデオレコーダにおいては、ビデオレコーダ独自のファイルシステムを用いると、PCにおいてデータ記憶できないばかりか、ビデオデータが記憶されていることすら解釈できず、記憶されているビデオデータが削除されてしまうといった危険性があり、独自のファイルシステムの採用は好ましくない。   Therefore, in a video recorder that has evolved HDD from built-in type to portable type, using the video recorder's unique file system, not only can not store data on the PC, it can not even interpret that video data is stored, There is a risk that stored video data will be deleted, and it is not preferable to adopt a unique file system.

これに対して、可搬型デジタル記憶メディアであるDVD-RAMを用いたビデオレコーダの商品化も行われている。たとえば、DVD-RAMを用いたビデオレコーダにおいては、UDFファイルシステムファイルシステムを用いてデータ管理がなされている。   On the other hand, video recorders using DVD-RAM, which is a portable digital storage medium, have been commercialized. For example, in a video recorder using a DVD-RAM, data management is performed using a UDF file system file system.

しかしながら、ユニットは、UDFファイルシステムの管理単位である論理ブロックとは一致しない。そこで、ファイルシステムの管理のもとで、連続したブロックによって構成されるリアルタイムデータを記憶するための専用ファイルを予め確保し、専用ファイル内にユニットの配置を行うよう管理することで、混在した2種類のデータの管理を実現している。   However, the unit does not match the logical block that is the management unit of the UDF file system. Therefore, under the management of the file system, a dedicated file for storing real-time data composed of continuous blocks is secured in advance, and management is performed so that units are arranged in the dedicated file. Management of different types of data is realized.

なお、専用ファイルは、予め連続したブロックを割り当てた大容量の専用ファイルであって、記憶されているリアルタイムデータのデータ量に依存しないリアルタイムデータ専用の領域となる。リアルタイムデータを削除しても、決してブロック(セクタ)を開放することはない。この方法は、内蔵型、可搬型を問わずHDDを用いたレコーダにおいても採用することができる。   The dedicated file is a large-capacity dedicated file to which consecutive blocks are allocated in advance, and is an area dedicated to real-time data that does not depend on the amount of stored real-time data. Deleting real-time data never releases a block (sector). This method can be employed in recorders using HDDs regardless of whether they are built-in or portable.

このように、事前にユニットを配置する領域を事前に確保する方式、すなわち、リアルタイムデータを記憶する領域とノンリアルタイムデータを記憶する領域を予め分けておくことによって、混在した2種類のデータの管理を実現するユニット配置方式を、静的ユニット配置方式と呼ぶ。   In this way, a method for pre-allocating an area for arranging units in advance, that is, management of two types of mixed data by dividing an area for storing real-time data and an area for storing non-real-time data in advance. A unit arrangement method for realizing the above is called a static unit arrangement method.

ビデオレコーダやPCにおいて、可搬型HDDを横断的に利用できることは、ユーザにとってメリットが大きい。この場合、記憶されるデータの管理には、汎用のファイルシステムを用い、いずれの装置においてもデータ記憶状態が確認できること、また、データの記憶されていない空き領域が効率的に利用できること、が望まれる。   The ability to use portable HDDs across video recorders and PCs has great advantages for users. In this case, it is desirable that a general-purpose file system is used for managing the stored data, and that the data storage state can be confirmed in any device, and that an empty area where no data is stored can be used efficiently. It is.

このことからすれば、ビデオデータの記憶の有無に関係なくユニットの配置領域を事前に確保する静的ユニット配置方式よりも、必要に応じてユニットを動的に配置する動的ユニット配置方式が好ましい。
オスタ(OSTA: Optical Storage Technology Association)、”ユニバーサルディスクフォーマット規格第2.01版(Universal Disk Format Specification Revision 2.01)”
Based on this, the dynamic unit arrangement method that dynamically arranges the units as needed is preferable to the static unit arrangement method that secures the unit arrangement area in advance regardless of whether or not the video data is stored. .
OSTA (OSTA: Optical Storage Technology Association), “Universal Disk Format Specification Revision 2.01”

リアルタイムデータとノンリアルタイムデータが混在する形式で記憶されるHDDに対して、動的ユニット配置方式を採用した場合、記憶または削除を行うたびに、データを記憶したブロック(セクタ)の離散化が進み、空きブロック(セクタ)が次第に点在するようになる。   When the dynamic unit placement method is adopted for an HDD that stores real-time data and non-real-time data in a mixed format, the discretization of the block (sector) that stores the data advances each time storage or deletion is performed. The empty blocks (sectors) are gradually scattered.

さらに、可搬型のHDDを用いた場合には、ノンリアルタイムデータの記憶や消去を繰り返すと、空きブロック(セクタ)の点在はさらに顕著に現れてくる。この結果、HDDには十分な空きセクタがあるにもかかわらず、連続したセクタを確保できないために、リアルタイム性を保証したユニットを設けることができなくなり、空きセクタ数から算出される残記憶容量と、確保可能なユニットから算出される残記憶容量との間に著しく差が生じる。このような不都合を解消するために、HDD等では、既記録データの再配置して連続ブロック(セクタ)を確保するための再配置処理が行われる。   Furthermore, in the case of using a portable HDD, when non-real-time data is repeatedly stored and erased, the scatter of empty blocks (sectors) becomes more prominent. As a result, even though there are enough free sectors in the HDD, it is not possible to secure continuous sectors, so it is not possible to provide a unit that guarantees real-time performance, and the remaining storage capacity calculated from the number of free sectors There is a significant difference between the remaining storage capacity calculated from the units that can be secured. In order to eliminate such inconvenience, the HDD or the like performs a rearrangement process for rearranging already recorded data and securing a continuous block (sector).

ところが、PCにおける再配置処理は、全記憶領域についてブロック(セクタ)の使用状況を把握し、データの置き換えを実行するものであることから、再配置処理に時間を要し、また再配置処理時の負荷も大きくなってしまう。また、再配置実行中に、リアルタイムデータの記録あるいは再生を行うと、処理が間に合わないといったようなことが起きる。さらに、再配置処理を一旦中断させ、その後、処理を再開した場合には、再配置処理が始めから行われるため、ユーザの利便性を損ねる。さらに、リアルタイム性を考慮しないファイルシステムでは、リアルタイム性を考慮して記憶されたデータに対して、リアルタイム性を損なうような再配置を行う可能性がある。   However, the relocation processing on the PC is to grasp the usage status of blocks (sectors) for all storage areas and execute data replacement, so it takes time for the relocation processing. The load of will also increase. Also, if real-time data is recorded or played back during relocation execution, processing may not be in time. Furthermore, when the rearrangement process is temporarily interrupted and then restarted, the rearrangement process is performed from the beginning, which impairs the convenience for the user. Furthermore, in a file system that does not consider real-time characteristics, there is a possibility that data stored in consideration of real-time characteristics may be rearranged so as to impair the real-time characteristics.

そこで、本発明は、記憶媒体のデータ再配置処理を行う場合に、リアルタイムデータに対しては、リアルタイム性を保持するよう再配置を行い、さらに、ユーザの記憶媒体の利用を最優先に考え、一旦処理を中断させた後にも継続して処理を再開することができるレコーダを提供することを目的とする。
Therefore, in the case of performing the data rearrangement processing of the storage medium, the present invention rearranges the real-time data so as to maintain the real-time property, and further considers the use of the user's storage medium as the highest priority. It is an object of the present invention to provide a recorder that can resume processing even after the processing is once interrupted.

このような問題を解決するために、本発明は、記憶媒体に記憶されているデータの再配置において、使用ブロックが点在するユニットに対し、その使用ブロックを、他の使用ブロックが点在するユニットに優先的に移動させることによって、連続した空きセクタを構成する。特に、リアルタイムデータについては、ユニットを構成するブロックが、ユニット内に連続して配置されるように再配置を行う。   In order to solve such a problem, in the rearrangement of the data stored in the storage medium, the present invention is arranged such that other used blocks are scattered with respect to a unit where used blocks are scattered. Consecutive empty sectors are constructed by preferentially moving to units. In particular, real-time data is rearranged so that the blocks constituting the unit are continuously arranged in the unit.

各請求項に係る発明の特徴は以下の通りである。   The features of the invention according to each claim are as follows.

請求項1の発明は、ブロック単位でデータが管理されている既記憶データを再配置する再配置処理手段を備えるレコーダにおいて、前記再配置処理手段は、ブロックの整数倍から構成されるユニットブロック単位での再配置処理の必要性を順次判定し、ここで、ユニットブロックにリアルタイムデータを記憶したブロックのみが記憶され、且つ、このユニットブロックの先頭ブロックにリアルタイムデータが記憶されていないとき、当該ユニットブロックを、再配置が必要と判定し、これにより再配置が必要と判定したときは、当該ユニットブロックのリアルタイムデータと、このリアルタイムデータと共に一単位として扱われる次のユニットブロックのリアルタイムデータを、空きのユニットブロックに再配置することを特徴とする。   The invention according to claim 1 is a recorder including rearrangement processing means for rearranging stored data in which data is managed in block units, wherein the rearrangement processing means is a unit block unit composed of an integral multiple of a block. When the necessity of the rearrangement processing in the unit block is sequentially determined, only the block storing the real-time data in the unit block is stored, and when the real-time data is not stored in the head block of the unit block, When it is determined that the block needs to be rearranged, and it is determined that the block needs to be rearranged, the real-time data of the unit block and the real-time data of the next unit block treated as a unit together with this real-time data The unit block is rearranged.

請求項2の発明は、ブロック単位でデータが管理されている既記憶データを再配置する再配置処理手段を備えるレコーダにおいて、前記再配置処理手段は、ブロックの整数倍から構成されるユニットブロック単位での再配置処理の必要性を順次判定し、ここで、ユニットブロックにノンリアルタイムデータを記憶したブロックと、未使用ブロックおよび/もしくはリアルタイムデータを記憶したブロックが混在しているとき、当該ユニットブロックを、再配置が必要と判定し、これにより、再配置が必要と判定したときは、当該ユニットブロックのノンリアルタイムデータを、ノンリアルタイムデータを記憶したブロックと未使用ブロックが混在した他のユニットブロックに再配置することを特徴とする。   According to a second aspect of the present invention, there is provided a recorder including rearrangement processing means for rearranging stored data in which data is managed in block units, wherein the rearrangement processing means is a unit block unit composed of an integral multiple of a block. The necessity of rearrangement processing is sequentially determined, and when a block storing non-real-time data and a block storing unused blocks and / or real-time data are mixed in the unit block, the relevant unit block If it is determined that rearrangement is necessary, and it is determined that rearrangement is necessary, the non-real-time data of the relevant unit block is replaced with another unit block in which blocks storing non-real-time data and unused blocks are mixed. It is characterized by rearranging.

請求項3の発明は、請求項2に記載のレコーダにおいて、前記再配置処理手段は、再配置が必要と判定したときは、当該ユニットブロックのノンリアルタイムデータを、ノンリアルタイムデータを記憶したブロックと未使用ブロックが混在した他のユニットブロックの他、空きのユニットブロックに再配置することを特徴とする。   According to a third aspect of the present invention, in the recorder according to the second aspect, when the rearrangement processing unit determines that rearrangement is necessary, the non-real time data of the unit block is a block storing the non-real time data. In addition to other unit blocks in which unused blocks are mixed, they are rearranged in empty unit blocks.

請求項4の発明は、請求項2あるいは3に記載のレコーダにおいて、前記再配置処理手段は、再配置が必要と判定されたm(1以上の自然数)番目のユニットブロックを、先頭乃至(m−1)番目のユニットブロックのうち、最も先頭に近いユニットブロックに再配置することを特徴とする。   According to a fourth aspect of the present invention, in the recorder according to the second or third aspect, the rearrangement processing unit selects the m th (one or more natural number) unit block determined to be rearranged from the head to (m -1) The unit block is rearranged to the unit block closest to the top among the unit blocks.

請求項5の発明は、請求項4に記載のレコーダにおいて、前記再配置処理手段は、再配置が必要と判定されたm(1以上の自然数)番目のユニットブロックのノンリアルタイムデータを、先頭乃至(m−1)番目のユニットブロックの未記憶ブロックを使い尽くすまで再配置することを特徴とする。   According to a fifth aspect of the present invention, in the recorder according to the fourth aspect, the rearrangement processing means reads the non-real-time data of the mth (one or more natural number) unit block determined to be rearranged, The (m−1) th unit block is rearranged until the unstored block is used up.

請求項6の発明は、請求項1乃至5の何れかに記載のレコーダにおいて、前記再配置処理手段は、再配置処理が中断されたとき、再配置処理の進行状況を示す情報を記憶しておき、再配置処理の再開時には、この情報を参照して、先の再配置処理にて再配置処理を行った最終のユニットブロックに続く次のユニットブロックから順次、再配置処理を実行することを特徴とする。   The invention according to claim 6 is the recorder according to any one of claims 1 to 5, wherein the rearrangement processing unit stores information indicating a progress status of the rearrangement processing when the rearrangement processing is interrupted. When relocation processing is resumed, it is necessary to refer to this information and execute the relocation processing sequentially from the next unit block following the last unit block that has been relocated in the previous relocation processing. Features.

請求項7の発明は、ブロック単位でデータが管理されている既記憶データを再配置する機能をコンピュータに付与するプログラムにおいて、ブロックの整数倍から構成されるユニットブロック単位での再配置処理の必要性を順次判定するステップと、この判定ステップによって再配置が必要と判定されたときに再配置処理を実行するステップとを含み、前記判定ステップは、ユニットブロックにリアルタイムデータを記憶したブロックのみが記憶され、且つ、このユニットブロックの先頭ブロックにリアルタイムデータが記憶されていないとき、当該ユニットブロックを、再配置が必要と判定し、前記再配置ステップは、前記判定ステップにより再配置が必要と判定したときは、当該ユニットブロックのリアルタイムデータと、このリアルタイムデータと共に一単位として扱われる次のユニットブロックのリアルタイムデータを、空きのユニットブロックに再配置することを特徴とする。   According to a seventh aspect of the present invention, in a program for giving a computer a function of rearranging stored data whose data is managed in units of blocks, it is necessary to perform rearrangement processing in units of unit blocks composed of integer multiples of blocks And a step of executing a rearrangement process when it is determined that the rearrangement is necessary by the determination step, and the determination step stores only a block in which real-time data is stored in the unit block. When real-time data is not stored in the head block of this unit block, it is determined that the unit block needs to be rearranged, and the rearrangement step determines that rearrangement is necessary in the determination step When the real-time data of the unit block Real-time data of the next block units are treated as one unit with Mudeta, characterized by relocating the unit blocks of free.

請求項8の発明は、ブロック単位でデータが管理されている既記憶データを再配置する機能をコンピュータに付与するプログラムにおいて、ブロックの整数倍から構成されるユニットブロック単位での再配置処理の必要性を順次判定するステップと、この判定ステップによって再配置が必要と判定されたときに再配置処理を実行するステップとを含み、前記判定ステップは、ユニットブロックにノンリアルタイムデータを記憶したブロックと、未使用ブロックおよび/もしくはリアルタイムデータを記憶したブロックが混在しているとき、当該ユニットブロックを、再配置が必要と判定し、前記再配置ステップは、前記判定ステップにより、再配置が必要と判定したときは、当該ユニットブロックのノンリアルタイムデータを、ノンリアルタイムデータを記憶したブロックと未使用ブロックが混在した他のユニットブロックに再配置することを特徴とする。   According to the invention of claim 8, in a program for giving a computer a function of rearranging stored data in which data is managed in block units, it is necessary to perform rearrangement processing in unit block units composed of integer multiples of blocks. A step of sequentially determining the characteristics, and a step of executing a rearrangement process when it is determined that the rearrangement is necessary by the determination step, and the determination step includes a block storing non-real time data in a unit block; When unused blocks and / or blocks storing real-time data are mixed, it is determined that the unit block needs to be rearranged, and the rearrangement step determines that rearrangement is necessary by the determination step. The non-real time data of the unit block Wherein the storing Mudeta blocks and unused blocks are relocated to other block units are mixed.

請求項9の発明は、請求項8に記載のプログラムにおいて、前記再配置ステップは、再配置が必要と判定したときは、当該ユニットブロックのノンリアルタイムデータを、ノンリアルタイムデータを記憶したブロックと未使用ブロックが混在した他のユニットブロックの他、空きのユニットブロックに再配置することを特徴とする。   According to a ninth aspect of the present invention, in the program according to the eighth aspect, when the rearrangement step determines that rearrangement is necessary, the non-real time data of the unit block is not changed from the block storing the non-real time data. In addition to other unit blocks in which used blocks are mixed, they are rearranged in empty unit blocks.

請求項10の発明は、請求項8あるいは9に記載のプログラムにおいて、前記再配置ステップは、再配置が必要と判定されたm(1以上の自然数)番目のユニットブロックを、先頭乃至(m−1)番目のユニットブロックのうち、最も先頭に近く、且つ、該当するユニットブロックに再配置することを特徴とする。   According to a tenth aspect of the present invention, in the program according to the eighth or ninth aspect, the rearrangement step includes the m th (unit number greater than or equal to 1) unit block determined to be rearranged from the first to (m− 1) The first unit block is closest to the top and rearranged in the corresponding unit block.

請求項11の発明は、請求項10に記載のプログラムにおいて、前記再配置ステップは、再配置が必要と判定されたm(1以上の自然数)番目のユニットブロックのノンリアルタイムデータを、先頭乃至(m−1)番目のユニットブロックの未記憶ブロックを使い尽くすまで再配置することを特徴とする。   According to an eleventh aspect of the present invention, in the program according to the tenth aspect, in the rearrangement step, the non-real-time data of the mth (one or more natural number) unit block determined to be rearranged m-1) rearrangement until the unstored block of the unit block is exhausted.

請求項12の発明は、請求項7乃至11の何れかに記載のプログラムにおいて、前記再配置ステップは、再配置処理が中断されたとき、再配置処理の進行状況を示す情報を記憶しておき、再配置処理の再開時には、この情報を参照して、先の再配置処理にて再配置処理を行った最終のユニットブロックに続く次のユニットブロックから順次、再配置処理を実行することを特徴とする。
According to a twelfth aspect of the invention, in the program according to any one of the seventh to eleventh aspects, the rearrangement step stores information indicating a progress status of the rearrangement process when the rearrangement process is interrupted. When relocation processing is resumed, this information is referred to, and relocation processing is executed sequentially from the next unit block following the last unit block subjected to relocation processing in the previous relocation processing. And

本発明によれば、レコーダは、ユニットブロック単位で再配置処理を行うため、データのリアルタイム性を損なうことなく再配置を行うことができる。また、中断した再配置処理を任意のタイミングで、継続して再開することができるため、ユーザの利便性を高めることができる。
According to the present invention, since the recorder performs rearrangement processing in units of unit blocks, rearrangement can be performed without impairing the real-time property of data. Moreover, since the interrupted rearrangement process can be resumed continuously at an arbitrary timing, the convenience for the user can be improved.

本発明の実施の形態について、図を参照しながら以下に説明する。
Embodiments of the present invention will be described below with reference to the drawings.

図1は、実施の形態に係るビデオレコーダ100の全体構成を示す図である。   FIG. 1 is a diagram showing an overall configuration of a video recorder 100 according to an embodiment.

ビデオレコーダ100には、ランダムアクセス可能な記憶媒体の一例として、HDD115を内蔵する可搬型の記憶メディアであるHDDユニット123が装着されている。また、アナログTV波とアナログ外部入力を入力としている。   The video recorder 100 is equipped with an HDD unit 123, which is a portable storage medium with a built-in HDD 115, as an example of a randomly accessible storage medium. Analog TV waves and analog external inputs are used as inputs.

ビデオレコーダ100は、受信波入力端子101、チューナ102、外部入力端子103、セレクタ104、CCI(Copy Control Information)検出器105、NTSCデコーダ106、符号化器107、スクランブラ108、バッファメモリ109、システムコントローラ110、操作パネル111、リモコン受信部112、時計113、HDDコントローラ114、HDD115、デスクランブラ116、復号器117、NTSCエンコーダ118、CCI埋込器119、外部出力端子120、再配置処理制御部121、挿脱検出部122、HDDユニット123、HDDソケット124、バスAから構成されている。   The video recorder 100 includes a received wave input terminal 101, a tuner 102, an external input terminal 103, a selector 104, a CCI (Copy Control Information) detector 105, an NTSC decoder 106, an encoder 107, a scrambler 108, a buffer memory 109, a system Controller 110, operation panel 111, remote control receiver 112, clock 113, HDD controller 114, HDD 115, descrambler 116, decoder 117, NTSC encoder 118, CCI embedder 119, external output terminal 120, rearrangement processing controller 121 , The insertion / removal detection unit 122, the HDD unit 123, the HDD socket 124, and the bus A.

また、バッファメモリ109は、記憶時に用いる領域109aと再生時に用いる領域109bの2つの領域を備えている。   Further, the buffer memory 109 has two areas, an area 109a used for storage and an area 109b used for reproduction.

受信TV波は、アンテナ(図示されず)によって受信され、受信波入力端子101を介して、チューナ102に入力される。そして、チューナ102において利用者指示により所望のチャンネルに対する入力信号として抽出され、セレクタ104に入力される。   The received TV wave is received by an antenna (not shown) and input to the tuner 102 via the received wave input terminal 101. Then, the tuner 102 extracts it as an input signal for a desired channel in accordance with a user instruction and inputs it to the selector 104.

一方、他の映像機器(図示されず)を信号源とする入力信号は、外部入力端子103を介して、セレクタ104に入力される。セレクタ104では、利用者の指示にしたがって、チューナ102または外部入力端子103を経て入力された入力信号のいずれかを選択し、これをCCI検出回路104およびNTSCデコーダ105に入力する。   On the other hand, an input signal using another video device (not shown) as a signal source is input to the selector 104 via the external input terminal 103. The selector 104 selects either an input signal input via the tuner 102 or the external input terminal 103 in accordance with a user instruction, and inputs this to the CCI detection circuit 104 and the NTSC decoder 105.

CCI検出回路104は、入力信号内の映像信号に埋め込まれているCCIの検出およびコピー可否の判定を行う。CCIとしては、マクロビジョン(Macrovision)、CGMS-A(Copy Generation Management System for Analog Signal)などがあり、映像信号に埋め込まれたこれらの信号を抜き取り、入力された映像信号の記憶の可否および記憶する状態の決定を行う。すなわち、マクロビジョンの埋め込みを検出した場合には、記憶不可、非検出時には記憶可となる。   The CCI detection circuit 104 detects CCI embedded in the video signal in the input signal and determines whether or not copying is possible. CCI includes Macrovision, CGMS-A (Copy Generation Management System for Analog Signal), etc., and extracts these signals embedded in video signals and stores whether or not the input video signals can be stored. Make a state decision. In other words, when macrovision embedding is detected, storage is impossible, and when non-detection is detected, storage is possible.

CGMS-Aの信号を検出し、その内容が「コピー不可」の場合には記憶不可、「1世代だけコピー可」の場合には、スクランブル状態で記憶、「コピー可」の場合には、非スクランブル状態での記憶となる。   When the CGMS-A signal is detected and the content is “copy not possible”, it cannot be stored, when “only one generation can be copied”, it is stored in a scrambled state, and when “copy is possible”, it is not stored. Memorize in scrambled state.

なお、アナログ地上波については、CCIが埋め込まれていないため非スクランブル状態での記憶となる。判定結果は、バスAを介してシステムコンロトローラ110に伝えられる。   Note that analog terrestrial waves are stored in a non-scrambled state because CCI is not embedded. The determination result is transmitted to the system controller 110 via the bus A.

一方、NSTCデコーダ106では、入力信号から、映像信号と音声信号の分離および両信号のデジタル化を行い、デジタル化した映像と音声を符号化器107へ出力する。そして、符号化器107において、データ量の削減を目的とした圧縮符号化方式、例えば、MPEG2(Motion Picture coding Experts Groups phase 2, ISO/IEC13818)方式にしたがった符号列すなわちビデオデータへと変換し、変換後のビデオデータをスクランブラ108に入力する。このビデオデータへの変換によって、データ量は著しく削減される。   On the other hand, NSTC decoder 106 separates the video signal and the audio signal from the input signal and digitizes both signals, and outputs the digitized video and audio to encoder 107. Then, the encoder 107 converts the data into a compression sequence for reducing the amount of data, for example, a code string according to the MPEG2 (Motion Picture coding Experts Groups phase 2, ISO / IEC13818) format, that is, video data. The converted video data is input to the scrambler 108. This conversion to video data significantly reduces the amount of data.

スクランブラ108は、変換されたビデオデータに対してスクランブルを施す。スクランブルとは他の機器へ複製されたとしても再生不能な状態とすることを目的として、ビデオデータを暗号化する処理である。   The scrambler 108 scrambles the converted video data. Scramble is a process of encrypting video data for the purpose of making it unplayable even if copied to another device.

スクランブルの指示は、CCI検出器104によって、「1世代だけコピー可」であることが検出され、スクランブル状態で記憶すると判定された入力信号に対するビデオデータに対して指示される。指示のないビデオデータは、そのまま出力される。   The scramble instruction is issued by the CCI detector 104 for the video data corresponding to the input signal that is detected to be “copyable for one generation” and determined to be stored in the scrambled state. Video data without an instruction is output as it is.

出力されたビデオデータは、バッファメモリ109の領域109aにて一時的に蓄えられ、所定の量のデータが蓄えられると、バッファメモリ109の領域109aに蓄えられたビデオデータは、システムコントローラ110の指示に従って、バスAおよびHDDコントローラ114を介して、デジタル記憶媒体であるHDD115に記憶される。   The output video data is temporarily stored in the area 109a of the buffer memory 109. When a predetermined amount of data is stored, the video data stored in the area 109a of the buffer memory 109 is stored in the direction of the system controller 110. Accordingly, the data is stored in the HDD 115 which is a digital storage medium via the bus A and the HDD controller 114.

再生時に、HDD115から読み出されたビデオデータは、システムコントローラ110の指示に従って、HDDコントローラ114、バスAを介して、バッファメモリ109の領域109bに一時的に蓄えられる。このとき復号器117での復号に必要なビデオデータが、適時供給されるように、常に一定量のビデオデータがバッファメモリ109の領域109bに蓄えられているように、システムコントローラ110が、データ量を制御している。   During playback, the video data read from the HDD 115 is temporarily stored in the area 109b of the buffer memory 109 via the HDD controller 114 and the bus A in accordance with an instruction from the system controller 110. At this time, the system controller 110 stores the data amount so that a certain amount of video data is always stored in the area 109b of the buffer memory 109 so that video data necessary for decoding by the decoder 117 is supplied in a timely manner. Is controlling.

バッファメモリ109の領域109bに蓄えられたビデオデータは、デスクランブラ116に入力され、これがスクランブルされたビデオデータである場合には、スクランブラ108において施されたスクランブルが解除され、スクランブルされていないビデオデータの場合には、そのまま復号器117に出力される。   The video data stored in the area 109b of the buffer memory 109 is input to the descrambler 116, and when this is scrambled video data, the scramble applied in the scrambler 108 is released, and the unscrambled video In the case of data, it is output to the decoder 117 as it is.

復号器117は、ビデオデータ(符号列)の解釈を行い、入力されたビデオデータを元の映像と音声のデジタルデータに復元し、これをNTSCエンコーダ110に出力する。そして、NTSCエンコーダ118においてアナログの映像信号と音声信号に変換して再生信号をCCI埋込器119に出力する。   The decoder 117 interprets the video data (code string), restores the input video data to the original video and audio digital data, and outputs this to the NTSC encoder 110. Then, the NTSC encoder 118 converts it into an analog video signal and audio signal and outputs a reproduction signal to the CCI embedder 119.

CCI埋込器119は、システムコントローラ110の指示にしたがって、「コピー不可」を示すCCI情報を入力された再生信号に埋め込みを行い、出力信号として外部出力端子120を介し外部に出力する。「コピー不可」を示すCCI情報の埋め込み指示は、記憶時にCCI検出回路104にて「1世代だけコピー可」を検出したビデオデータを再生した再生信号に対して指示される。指示を受けない再生信号はそのまま出力信号として外部出力端子120を介し外部に出力する。   The CCI embedder 119 embeds CCI information indicating “copy not possible” in the input reproduction signal in accordance with an instruction from the system controller 110, and outputs it as an output signal to the outside via the external output terminal 120. The instruction to embed CCI information indicating “uncopyable” is instructed with respect to a reproduction signal obtained by reproducing video data for which “copying for only one generation” is detected by the CCI detection circuit 104 during storage. A reproduction signal that does not receive an instruction is output as it is as an output signal to the outside via the external output terminal 120.

なお、バッファメモリ109は、揮発性のメモリであり、それぞれ符号器107、復号器117とHDD115とのアクセスの違いを緩和するための緩衝機能を提供する。   Note that the buffer memory 109 is a volatile memory, and provides a buffering function to alleviate the difference in access between the encoder 107, the decoder 117, and the HDD 115, respectively.

HDDコントローラ114は、HDD115との間のデータ授受を行う制御機能および電気的接続を提供するインタフェースを提供する。   The HDD controller 114 provides a control function for exchanging data with the HDD 115 and an interface for providing an electrical connection.

システムコントローラ110は、ビデオレコーダ全体の制御およびHDD115内のデータ管理等を行い、映像の記憶および再生を実現し、主にマイクロコンピュータによって構成される。   The system controller 110 controls the entire video recorder, manages data in the HDD 115, etc., realizes video storage and playback, and is mainly configured by a microcomputer.

操作パネル111およびリモコン受信部112は、利用者の指示を受け取るための入力装置であり、操作パネル111は直接に利用者の指示を受け取る。リモコン受信部112はリモコン(図示せず)を介して間接的に利用者の指示を受け取る。   The operation panel 111 and the remote control receiving unit 112 are input devices for receiving user instructions, and the operation panel 111 directly receives user instructions. The remote control receiving unit 112 receives a user instruction indirectly via a remote control (not shown).

時計113は、予約録画を行うためのものである。なお、予約録画を管理するための予約データはHDD115に格納される。   The clock 113 is for performing scheduled recording. Note that reservation data for managing reserved recording is stored in the HDD 115.

再配置処理制御部121は、再配置処理開始指示に応じて、記憶済みデータの再配置を行う。また、再配置処理の進行状況を示す情報、例えば、ユニットの参照インデックスを保持するメモリを内部に備える。   The rearrangement process control unit 121 rearranges stored data in response to a rearrangement process start instruction. In addition, a memory that holds information indicating the progress of the rearrangement process, for example, a reference index of the unit, is provided internally.

挿脱検出部122は、HDDユニット123がHDDソケット124に装着、あるいは取り外されたことを検出する。   The insertion / removal detection unit 122 detects that the HDD unit 123 is attached to or removed from the HDD socket 124.

HDDユニット123は、HDD115を内蔵する。HDDユニット123は、HDD115を可搬型とするために外殻に設けたものであり、ビデオレコーダ100のソケット124に対して着脱自在に装着することを除いて、HDD115の提供する機能しか持たない。   The HDD unit 123 has a built-in HDD 115. The HDD unit 123 is provided on the outer shell in order to make the HDD 115 portable, and has only the function provided by the HDD 115 except that it is detachably attached to the socket 124 of the video recorder 100.

なお、以下の説明においては、便宜上、このHDDユニット123そのものをHDD115と同等と見なす。このソケット124に装着されたHDDユニット123へのデータの書き込み、およびHDDユニット123からのデータの読み出しは、HDD115同様にHDDコントローラ114によって制御され実行される。   In the following description, the HDD unit 123 itself is regarded as equivalent to the HDD 115 for convenience. The writing of data to the HDD unit 123 attached to the socket 124 and the reading of data from the HDD unit 123 are controlled and executed by the HDD controller 114 in the same manner as the HDD 115.

このほか、ビデオレコーダ100は、システムコントローラ110の管理下で使用されるシステムメモリ(図示せず)を備え、HDDユニット123が着脱自在であることから、HDDユニット123に依存せず、かつ、ビデオレコーダ100の動作に関連がある情報、例えば、予約録画やEPG情報などのビデオレコーダ100内部で参照する情報をシステムメモリに記憶する。   In addition, the video recorder 100 includes a system memory (not shown) used under the control of the system controller 110, and since the HDD unit 123 is detachable, the video recorder 100 does not depend on the HDD unit 123, and Information related to the operation of the recorder 100, for example, information to be referred to inside the video recorder 100 such as reserved recording and EPG information is stored in the system memory.

次に、本実施例におけるビデオレコーダ100の記憶媒体であるHDD115に記憶される情報について説明する。   Next, information stored in the HDD 115 that is a storage medium of the video recorder 100 in the present embodiment will be described.

HDD115には、映像や音声などのコンテンツデータのリアルタイム性の主データと、主データを管理するファイル管理情報や番組の付属情報等のノンリアルタイム性の副データが記憶される。このファイル管理情報として、後述するブロック管理デーブルが記憶されている。   The HDD 115 stores real-time main data of content data such as video and audio, and non-real-time sub-data such as file management information for managing the main data and program attached information. As this file management information, a block management table described later is stored.

また、HDD115は、可搬型記憶媒体であるためビデオレコーダ100から脱着して、他のビデオレコーダやPCへの装着が可能である。そして、PCでの利用を可能とするために汎用のファイルシステムが用いられている。そして、PCにおいて、データの記憶・削除が、この汎用のファイルシステムの管理下において繰り返されることによって、ため、記憶媒体上に空きブロックの点在率が増加することになる。   Further, since the HDD 115 is a portable storage medium, it can be detached from the video recorder 100 and mounted on another video recorder or PC. A general-purpose file system is used to enable use on a PC. Then, in the PC, data storage / deletion is repeated under the management of this general-purpose file system, so that the percentage of empty blocks scattered on the storage medium increases.

PCにおいては、記憶あるいは削除される主なデータは、ノンリアルタイムデータとする。但し、PCにおいて、本発明のビデオレコーダと同じ機能をプログラムにて実現した場合にはリアルタイムデータを記録することが可能である。   In a PC, the main data stored or deleted is non-real time data. However, real-time data can be recorded on a PC when the same function as the video recorder of the present invention is realized by a program.

次に、ビデオレコーダ100の再配置処理制御部121によるデータ再配置処理について説明する。   Next, data rearrangement processing by the rearrangement processing control unit 121 of the video recorder 100 will be described.

再配置制御処理部121は、システムコントローラ110より指示を受けて動作する。システムコントローラ110は、挿脱検出部122によるHDDソケット124へのHDDユニット123装着の検出結果によって、再配置開始イベントを発行し、再配置処理制御部121を起動する。   The rearrangement control processing unit 121 operates in response to an instruction from the system controller 110. The system controller 110 issues a rearrangement start event and activates the rearrangement processing control unit 121 based on the detection result of the HDD unit 123 mounted in the HDD socket 124 by the insertion / removal detection unit 122.

このとき、ビデオレコーダとしての主たる機能であるコンテンツの録画、再生などが発生した時には、再配置を中断するイベントを発行し、再配置処理を休止させ、前述の中断用件が終了した時点で、再配置を再開するイベントを発行する。この中断用件とは、ユーザがビデオレコーダの操作パネル111やリモコンを用いて再生を開始する場合、コンテンツの削除や複製要求を行う場合、時計113が録画予約時間に達したことにより録画処理が発生する場合、ユーザがHDDユニット123を取り出そうとする場合などである。   At this time, when the recording or playback of the content, which is the main function as a video recorder, is issued, an event for interrupting the rearrangement is issued, the rearrangement process is paused, and when the above-mentioned interrupt request is completed, Issue an event to resume relocation. The interruption request means that when the user starts playback using the operation panel 111 or the remote control of the video recorder, when the content is deleted or duplicated, the recording process is performed when the clock 113 reaches the scheduled recording time. For example, the user may try to take out the HDD unit 123.

このように、データ再配置処理は、ユーザの所望するビデオレコーダの主機能を優先し、空いた時間を利用して行われる。   As described above, the data rearrangement process is performed using the free time by giving priority to the main function of the video recorder desired by the user.

また、本実施例のビデオレコーダ100は、HDD115に記憶されているデータがリアルタイムデータ、あるいは、ノンリアルタイムデータのどちらであるか判別する。この判別は、例えば、UDFのようなリアルタイムデータの属性指定が可能なファイルシステムを採用して記憶する、ファイルシステムとは別に属性の管理ファイルをHDD115に記憶する、リアルタイムデータのファイル名に一定の規則を設けて記憶するなどの方法によって実現することができる。さらには、リアルタイムデータは特定の規則に沿ったデータ列であることに着目して、リアルタイムデータの先頭を識別することによっても可能である。   In addition, the video recorder 100 according to the present embodiment determines whether the data stored in the HDD 115 is real-time data or non-real-time data. This determination is made by, for example, using a file system capable of specifying real-time data attributes such as UDF, storing the attribute management file in the HDD 115 separately from the file system, and determining the file name of the real-time data to be constant. It can be realized by a method of storing rules and storing them. Furthermore, it is possible to identify the beginning of the real-time data by paying attention to the fact that the real-time data is a data string according to a specific rule.

しかしながら、ここでは、HDD115に記憶されているデータがリアルタイムデータ、ノンリアルタイムデータであることが確認できれば、いずれの方法によって確認されるものであってもよい。   However, here, as long as it is possible to confirm that the data stored in the HDD 115 is real-time data or non-real-time data, the data may be confirmed by any method.

次に、再配置処理のフローについて説明する。   Next, the flow of the rearrangement process will be described.

図2は、ビデオレコーダ100におけるデータ再配置処理のフロー図である。   FIG. 2 is a flowchart of data rearrangement processing in the video recorder 100.

図3および図4は、本実施例におけるデータ再配置の模式図である。   3 and 4 are schematic diagrams of data rearrangement in the present embodiment.

HDD115は、ユニットより小さなブロック単位で管理されており、本実施例では、HDD115内に、複数のブロックから構成され、ユニットと同一のデータ量であるユニットブロックを固定的に配置し、このユニットブロック単位でデータ再配置を行うものとする。   The HDD 115 is managed in units of blocks smaller than the unit. In this embodiment, the HDD 115 is composed of a plurality of blocks, and unit blocks having the same data amount as the unit are fixedly arranged. Data relocation is performed in units.

以降、説明を簡単にするために、1ユニットブロック=4ブロックとする。したがって、ユニットブロックは、HDD115内の連続したLBA(Logical Block Address)からなる4ブロック分のデータ記憶領域を指す。尚、HDD115内の全ての領域はユニットブロックに属している。また、図のブロック内に記さされた“R”はリアルタイムデータが記憶されたブロック、“N”は、ノンリアルタイムデータが記憶されたブロック、空白は、データが記憶されていない未使用の状態を示している。   Hereinafter, in order to simplify the description, 1 unit block = 4 blocks. Therefore, the unit block indicates a data storage area for four blocks including continuous LBA (Logical Block Address) in the HDD 115. All areas in the HDD 115 belong to unit blocks. Also, “R” written in the block in the figure is a block in which real-time data is stored, “N” is a block in which non-real-time data is stored, and a blank is an unused state in which no data is stored. Show.

図2のフローを参照して、まず、システムコントローラ110の開始イベントによって再配置処理制御部121が起動すると、ユニットブロックを順に処理していくためのインデックスm(自然数)を0に初期化する(S1)。このインデックスは、データの再配置処理中のユニットブロック番号を示す。これ以後、システムコントローラ110からの中断イベントを受けるか、若しくは、インデックスmが最終ユニットブロックの番号に達するまで、ユニットブロック単位でこのデータ再配置処理が実行される。   With reference to the flow of FIG. 2, first, when the rearrangement processing control unit 121 is activated by a start event of the system controller 110, an index m (natural number) for sequentially processing unit blocks is initialized to 0 ( S1). This index indicates a unit block number during data relocation processing. Thereafter, this data rearrangement process is executed for each unit block until an interruption event is received from the system controller 110 or the index m reaches the number of the last unit block.

再配置処理制御部121は、ユニットブロックmに対して、まず、リアルタイムデータに対するデータの再配置の必要性を判定する(S2)。ここでは、ユニットブロックmを構成するブロックにリアルタイムデータが記憶され、かつ、ユニットブロックmの先頭にリアルタイムデータが記憶されていない場合に、リアルタイムデータに対するデータ再配置が必要である、と判定する。   For the unit block m, the rearrangement processing control unit 121 first determines the necessity of data rearrangement with respect to real-time data (S2). Here, when real-time data is stored in the blocks constituting the unit block m and real-time data is not stored at the head of the unit block m, it is determined that data rearrangement with respect to the real-time data is necessary.

再配置処理制御部121は、リアルタイムデータに対して再配置が必要であると判定すると(S2yes)、未使用のユニットブロック(全ての未使用のブロックから構成されるユニットブロック)を検索する(S3)。   When the reallocation processing control unit 121 determines that reallocation is necessary for realtime data (S2yes), the reallocation data is searched for unused unit blocks (unit blocks including all unused blocks) (S3). ).

この検索の結果(S3)にしたがって、記憶領域内に移動先ユニットブロックが存在する場合(S4Yes)、ユニットブロックmのデータを移動先ユニットブロックに複製する(S5)。一方、移動先の未使用ブロックが存在しない場合(S4No)、複製処理(S5)は行わない。   According to the result of this search (S3), if the destination unit block exists in the storage area (S4 Yes), the data of the unit block m is copied to the destination unit block (S5). On the other hand, if there is no unused block at the move destination (S4 No), the replication process (S5) is not performed.

なお、S3の検索においては、その検索の方法を限定するものではなく、また、検索の結果得られた空きユニットブロックは、記憶領域内のいずれに配されていても良い。   In the search of S3, the search method is not limited, and the empty unit block obtained as a result of the search may be arranged anywhere in the storage area.

以下、S5における複製処理を図3の模式図を用いて説明する。   Hereinafter, the replication process in S5 will be described with reference to the schematic diagram of FIG.

図3(a)は、ユニットブロックmに対する再配置前の状態である。ユニットブロックmを構成するブロックには、リアルタイムデータを記憶する3つのブロックB11,B12,B13が配置されている。ここで、リアルタイムデータは、4ブロックから構成されるユニット単位で扱われるため、ユニットブロックmに続いて、ユニットブロック(m+1)の先頭ブロックB14までの4つのブロックに、一連のリアルタイムデータが記憶されることになる。   FIG. 3A shows a state before relocation with respect to the unit block m. In the block constituting the unit block m, three blocks B11, B12, B13 for storing real-time data are arranged. Here, since real-time data is handled in units of four blocks, a series of real-time data is stored in the four blocks from the unit block m to the first block B14 of the unit block (m + 1). Will be.

図3(a)に示すように、リアルタイムデータのユニットがユニットブロックmとユニットブロック(m+1)をまたいで記憶されている場合、この1ユニット分のデータ(ブロックB11〜B14)が再配置の対象となる。   As shown in FIG. 3A, when a unit of real-time data is stored across the unit block m and the unit block (m + 1), the data for one unit (blocks B11 to B14) is a target for rearrangement. It becomes.

これに対して、ユニットブロックmを構成する先頭ブロックにリアルタイムデータが記憶されている場合には、リアルタイムデータの1ユニットが、全てユニットブロックmに含まれているので、再配置の必要がない。言うまでもなく、ユニットブロックmを構成するブロックにリアルタイムデータが記憶されていない場合も、再配置の必要はない。   On the other hand, when real-time data is stored in the head block constituting the unit block m, one unit of real-time data is included in the unit block m, so that rearrangement is not necessary. Needless to say, there is no need for rearrangement even when real-time data is not stored in the blocks constituting the unit block m.

図3の模式図において、図3(a)のユニットブロック(m−1)が未使用のユニットブロックである。ここに、再配置の対象となったユニット(ブロックB11、B12、B13、B14)を、ユニットブロックm−1に複製する(図3(b)の状態)。この複製によって、ユニットブロック(m−1)内のブロックB21、B22、B23、B24には、それぞれブロックB11、B12、B13、B14と同一のデータが記憶される。しかし、この時点では、ブロック管理テーブルはまだ更新されておらず、ファイルシステム上は、図3(a)の状態として解釈される。   In the schematic diagram of FIG. 3, the unit block (m−1) of FIG. 3A is an unused unit block. Here, the units (blocks B11, B12, B13, B14) to be rearranged are copied to the unit block m-1 (state shown in FIG. 3B). By this duplication, the same data as the blocks B11, B12, B13, and B14 are stored in the blocks B21, B22, B23, and B24 in the unit block (m−1), respectively. However, at this time, the block management table has not been updated yet, and is interpreted as the state of FIG.

図2のフローに戻り、リアルタイムデータの複製(S5)が終了する、あるいは、リアルタイムデータに対する再配置が必要ないと判定される場合(S2no)、続いてノンリアルタイムデータに対するデータ再配置の必要性を判定する(S6)。   Returning to the flow of FIG. 2, when the real-time data replication (S5) ends, or when it is determined that reallocation of real-time data is not necessary (S2no), the necessity of data rearrangement for non-real-time data is subsequently determined. Determine (S6).

ユニットブロックmを構成するブロックに、ノンリアルタイムデータを記憶したブロックと未使用のブロックが混在している場合(S6yes)、例えば、ユニットブロックを構成するブロックに、離散的に記憶されたノンリアルタイムデータは、ブロック単位で再配置される。   When the block constituting the unit block m includes a block storing non-real time data and an unused block (S6yes), for example, the non-real time data discretely stored in the block constituting the unit block Are rearranged in units of blocks.

再配置処理制御部121が、ノンリアルタイムデータに対して再配置が必要であると判定すると(S6Yes)、ユニットブロック0〜(m−1)を検索して、移動先となりうるユニットブロック選択する(S7)。この移動先ユニットブロックとは、未使用のブロックとノンリアルタイムデータ記憶されているブロックが混在しているユニットブロックであり、かつ、最も先頭に近いユニットブロックである。   When the rearrangement processing control unit 121 determines that rearrangement is necessary for the non-real-time data (Yes in S6), the unit block 0 to (m-1) is searched to select a unit block that can be a destination ( S7). This destination unit block is a unit block in which unused blocks and non-real time data stored blocks are mixed, and is the unit block closest to the head.

この検索の結果(S8)にしたがって、ユニットブロック0〜(m−1)に移動先ユニットブロックが存在する場合(S8Yes)、ユニットブロックmのブロックに記憶されているデータを、ブロック単位で移動先ユニットブロックの先頭に近い未使用ブロックから、未使用ブロックの空きがある限り複製を行う(S8)。一方、移動先の未使用ブロックが存在しない場合(S8No)、複製処理(S8)は行わない。   According to the result of this search (S8), if there is a movement destination unit block in unit blocks 0 to (m-1) (Yes in S8), the data stored in the block of unit block m is moved in block units. Duplication is performed from the unused block close to the head of the unit block as long as there is a free unused block (S8). On the other hand, if there is no unused block at the move destination (S8 No), the replication process (S8) is not performed.

なお、S8Noの場合、およびS8において、ユニットブロックm内の全てのデータが移動先ユニットブロックに複製できなかった場合、以後の処理によってユニットブロックmが、移動先ユニットブロックとなる。   In the case of S8 No, and in S8, when all the data in the unit block m cannot be copied to the destination unit block, the unit block m becomes the destination unit block by the subsequent processing.

以下、図4のノンリアルタイムデータに対する再配置を模式図を用いて説明する。図4(a)のユニットブロックmには、1つのノンリアルタイムデータを記憶したブロックA1が配置されている。このブロックA1に記憶されたデータが再配置の対象である。   Hereinafter, rearrangement with respect to the non-real-time data in FIG. 4 will be described with reference to schematic diagrams. In the unit block m in FIG. 4A, a block A1 storing one non-real time data is arranged. The data stored in this block A1 is the object of rearrangement.

また、再配置対象ブロックA1の移動先となるブロックA2が、ユニットブロック2内に存在する。S7では、移動先ユニットブロックとしてユニットブロック2を選択し、S8では、ユニットブロックmのブロックA1内のデータを、ユニットブロック2のブロックA2に複製する。ブロックA1とブロックA2に記憶されているデータは同一である。   Further, the block A2 that is the movement destination of the rearrangement target block A1 exists in the unit block 2. In S7, unit block 2 is selected as the destination unit block. In S8, the data in block A1 of unit block m is copied to block A2 of unit block 2. The data stored in the block A1 and the block A2 are the same.

図4(b)は、データ複製後の状態であり、この時点では、ブロック管理テーブルが更新されていないため、ファイルシステム上は、図4(a)の状態として解釈される。   FIG. 4B shows a state after data replication. At this point, the block management table has not been updated. Therefore, the file system interprets the state as shown in FIG.

図2のフローに戻り、次に、再配置処理制御部121は、ユニットブロックmに対するデータ再配置の結果、すなわち、S5およびS9の結果を反映するようブロック管理デーブルを更新し、ユニットブロックmに対する再配置処理を終了する(S10)。このとき、S5およびS9において、データの複製が行われなかった場合、S10における処理は省略される。   Returning to the flow of FIG. 2, the rearrangement processing control unit 121 then updates the block management table to reflect the result of the data rearrangement for the unit block m, that is, the results of S5 and S9, and the unit block m The rearrangement process is terminated (S10). At this time, if data replication is not performed in S5 and S9, the process in S10 is omitted.

ブロック管理デーブルは、ステップS5およびS9において、新しく割り当てられたブロックにはデータが記憶され、元のブロックは未記憶となった状態を反映して書き換えられる。   In step S5 and S9, the block management table is rewritten to reflect the state in which data is stored in the newly allocated block and the original block is not stored.

図3に示すようなリアルタイムデータの再配置では、ユニットブロック(m−1)を構成するブロックB21、B22、B23、B24を新たにデータを記憶したブロック、元のブロックB11、B12、B13、B14は未使用ブロックであることを示すようブロック管理テーブルを書き換える。この結果、ユニットブロックmおよびユニットブロック(m+1)に含まれて記憶されていたリアルタイムデータのユニットは、ユニットブロック(m−1)に移動する。   In the real-time data rearrangement as shown in FIG. 3, the blocks B21, B22, B23, and B24 constituting the unit block (m-1) are newly stored in the blocks, the original blocks B11, B12, B13, and B14. Rewrites the block management table to indicate that it is an unused block. As a result, the unit of real-time data stored in the unit block m and the unit block (m + 1) moves to the unit block (m−1).

ノンリアルタイムデータの再配置についても、図4で示したように、ユニットブロックm内に配置されたブロックA1に記憶されたノンリアルタイムデータが、ユニットブロック2内の未使用ブロックA2に移動される。   Regarding the rearrangement of the non-real time data, the non-real time data stored in the block A1 arranged in the unit block m is moved to the unused block A2 in the unit block 2 as shown in FIG.

図2のフローに戻り、ユニットブロックmに対してデータの再配置が必要でない(S6no)、あるいは、ユニットブロックmに対するデータの再配置が終了すると(S9)、再配置処理の終了を確認する(S11)。この結果、インデックスmが最終ユニットブロック(総ユニット数―1)の場合(S11Yes)、データの再配置処理を終了し、再配置処理制御部121を停止状態とする。一方、最終ユニットブロックでない場合(S11no)、インデックスmはインクリメントされ(S12)、再び、ステップS2へ移行して、全てのユニットブロックに対する処理が終了するまで繰り返される。   Returning to the flow of FIG. 2, no data rearrangement is required for the unit block m (S6no), or when the data rearrangement for the unit block m is completed (S9), the end of the rearrangement process is confirmed (S9). S11). As a result, when the index m is the last unit block (total number of units-1) (Yes in S11), the data rearrangement process is terminated and the rearrangement process control unit 121 is stopped. On the other hand, if it is not the last unit block (S11no), the index m is incremented (S12), the process proceeds to step S2 again, and is repeated until the processing for all the unit blocks is completed.

なお、上記再配置処理中に、ビデオレコーダ100に対して、ユーザの操作、あるいは録画予約によって、記憶または再生が指示されると、システムコントローラ110から、再配置処理制御部121に再配置処理の中断が通知され、この通知を受けた再配置処理制御部121は、再配置処理を即座に中断する。中断が発生した場合は、再配置処理制御部121の内部のメモリに、再配置処理の進行状況を示す情報としてユニットの参照インデックスmを記憶する。   When the video recorder 100 is instructed to store or play back by the user's operation or recording reservation during the rearrangement process, the system controller 110 instructs the rearrangement process control unit 121 to perform the rearrangement process. The relocation processing control unit 121 that has been notified of the interruption immediately interrupts the relocation processing. When the interruption occurs, the reference index m of the unit is stored in the internal memory of the rearrangement process control unit 121 as information indicating the progress of the rearrangement process.

記憶または再生処理が終了し、再配置処理の再開が可能となると、システムコントローラ110により再配置処理の再開イベントを受け取った再配置処理制御部121は、内部のメモリより再配置処理の進行状況を示すユニットの参照インデックスを読み出し、中断時に再配置処理の対象であったユニットブロックmに対して、S2に戻って処理を再開する。
When the storage or reproduction process is completed and the relocation process can be resumed, the relocation process control unit 121 that has received the relocation process resume event from the system controller 110 indicates the progress of the relocation process from the internal memory. The reference index of the indicated unit is read, and the process returns to S2 to resume the processing for the unit block m that has been subject to the rearrangement process at the time of interruption.

動的ユニット配置方式によるデータ管理として、汎用のファイルシステムのブロック単位で管理するブロック管理テーブルと、ユニット単位での記憶管理を行うユニット管理テーブルの2つの管理テーブルを利用した動的ユニット配置方式を搭載したビデオレコーダに対して行う再配置処理について説明する。   As a data management by the dynamic unit placement method, a dynamic unit placement method using two management tables, a block management table for managing a block unit of a general-purpose file system and a unit management table for managing storage in a unit unit. A rearrangement process performed on the mounted video recorder will be described.

ビデオレコーダは、図1と同一の構成であるため説明を省略する。システムコントローラ110が実行する記憶処理や再生処理および再配置処理制御部121が実行する再配置処理において、記憶媒体上のデータ記憶状況の変化に伴って、実施例1で使用したブロック管理テーブルに加えてユニット管理テーブルに対する更新を行う。なお、PCなどの汎用機のファイルシステムではブロック管理テーブルのみが使用される。   The video recorder has the same configuration as that shown in FIG. In the storage process executed by the system controller 110, the reproduction process, and the rearrangement process executed by the rearrangement process control unit 121, in addition to the block management table used in the first embodiment as the data storage status on the storage medium changes. Update the unit management table. Note that only a block management table is used in a file system of a general-purpose machine such as a PC.

図5は、動的ユニット配置方式における記憶媒体の記憶領域へのデータ配置の一例を図示したものである。201はリアルタイムデータを納めたリアルタイムファイル、202、203、204、205は、ノンリアルタイムデータを納めたノンリアルタイムファイルとして示している。   FIG. 5 shows an example of data arrangement in the storage area of the storage medium in the dynamic unit arrangement method. Reference numeral 201 denotes a real-time file containing real-time data, and 202, 203, 204, and 205 denote non-real-time files containing non-real-time data.

図中の記憶媒体上の記憶領域200は、物理的に連続する領域が論理的にブロックとして分割されていることを示している。ブロック内に記された“R”はリアルタイムデータが記憶されたブロック、“N”は、ノンリアルタイムデータが記憶されたブロック、空白は、データが記憶されていない未使用の状態のブロックを示している。   A storage area 200 on the storage medium in the figure indicates that a physically continuous area is logically divided into blocks. “R” written in the block indicates a block in which real-time data is stored, “N” indicates a block in which non-real-time data is stored, and a blank indicates an unused block in which no data is stored. Yes.

これらのブロックは、汎用のファイルシステムによって記憶や読み出しが処理される最小単位であり、この単位領域の整数倍で記憶や読み出し処理が実行される。   These blocks are the smallest units that are stored and read out by a general-purpose file system, and the storage and reading processes are executed in an integral multiple of this unit area.

ブロック管理テーブル210は、上記の記憶領域200のブロック毎の使用状況を管理するものである。ブロック管理テーブル210を構成するエントリ210a、210b、210c、210d・・・は、記憶領域200の200a、200b、200c、200d・・・の各ブロックに対応しており、使用中のブロックの場合は‘1’、未使用のブロックの場合は‘0’として使用状況を示す。   The block management table 210 manages the usage status of each block of the storage area 200 described above. The entries 210a, 210b, 210c, 210d,... Constituting the block management table 210 correspond to the respective blocks 200a, 200b, 200c, 200d,... In the storage area 200. “1” indicates that the block is unused, and “0” indicates the usage status.

ユニット管理テーブル220は、記憶領域200をユニット単位で扱うユニットブロックに対応して、ユニット情報220a、220b、220c・・・から構成される。   The unit management table 220 includes unit information 220a, 220b, 220c,... Corresponding to the unit blocks that handle the storage area 200 in units.

ユニット情報は、ユニットブロックを構成するブロックの利用状況を示す情報であり、“リアルタイムデータ記憶に使用”/“ノンリアルタイムデータ記憶に一部使用”/“ノンリアルタイムデータ記憶に全使用”/“未使用”によって示す。   The unit information is information indicating the usage status of the blocks constituting the unit block, and is “used for real-time data storage” / “partially used for non-real-time data storage” / “full use for non-real-time data storage” / “unused. Indicated by “use”.

ユニットブロックとブロックとは、記憶媒体200における配置によって一意に対応づけられる。例えば、記憶領域200の200a、200b、200c、200dは、それぞれブロック管理テーブル210上の210a、210b、210c、210dに対応しており、これらはすべて、ユニット管理テーブル220上の220aのユニット情報に対応する。   The unit block and the block are uniquely associated by arrangement in the storage medium 200. For example, 200a, 200b, 200c, and 200d in the storage area 200 correspond to 210a, 210b, 210c, and 210d on the block management table 210, respectively, and these all correspond to the unit information of 220a on the unit management table 220. Correspond.

このように、ユニット管理テーブル220は、記憶媒体200上に配置される全てのユニットブロックに関するユニット情報を保持し、ブロック管理テーブルは、記憶領域200上に配置される全てのブロックに関する情報を保持する。   As described above, the unit management table 220 holds unit information regarding all unit blocks arranged on the storage medium 200, and the block management table holds information regarding all blocks arranged on the storage area 200. .

図5を参照して、ビデオレコーダ100におけるデータの記憶処理について説明する。   With reference to FIG. 5, a data storage process in the video recorder 100 will be described.

リアルタイムデータを記憶する場合、ユニット管理テーブルを検索してユニット情報が“未使用”である未使用のユニットブロックを選択し、1ユニット分のリアルタイムデータを記憶する。そして、使用したユニットブロックに対するユニット情報を“リアルタイムデータ記憶に使用”に変更する。また、データを記憶したブロックに対するブロック管理テーブルの情報を“0”から“1”に変更する。リアルタイムデータの記憶が終了するまで、この処理は続けられる。   When real-time data is stored, the unit management table is searched to select an unused unit block whose unit information is “unused”, and real-time data for one unit is stored. Then, the unit information for the used unit block is changed to “used for real-time data storage”. Also, the information in the block management table for the block storing the data is changed from “0” to “1”. This process is continued until real-time data storage is completed.

一方、ノンリアルタイムデータを記憶する場合、ユニット管理テーブルを検索して、ユニット情報が“ノンリアルタイムデータ記憶に一部使用”のユニットを検索する。該当するユニット存在する場合、そのユニットブロック内のブロックにノンリアルタイムデータをブロック単位で記憶する。もし、該当するユニットがなければ、ユニット管理テーブルを検索して、ユニット情報が“未使用”であるユニット選択し、そのユニットブロック内のブロックにノンリアルタイムデータをブロック単位で記憶する。次に、使用したユニットブロックに対するユニット情報を、使用状況に合わせて“ノンリアルタイムデータ記憶に全使用”あるいは“ノンリアルタイムデータ記憶に一部使用”に変更し、データを記憶したブロックに対するブロック管理テーブルの情報を“0”から“1”に変更する。   On the other hand, when storing non-real time data, the unit management table is searched to search for a unit whose unit information is “partially used for non-real time data storage”. If the corresponding unit exists, non-real time data is stored in blocks in the unit block. If there is no corresponding unit, the unit management table is searched, a unit whose unit information is “unused” is selected, and non-real-time data is stored in blocks in the unit block. Next, change the unit information for the used unit block to “use all for non-real-time data storage” or “partly use for non-real-time data storage” according to the usage situation, and block management table for the block that stores the data Is changed from “0” to “1”.

データの再生については、汎用ファイルシステムによって、ブロック管理テーブルのみの参照で可能となる。   Data reproduction can be performed by referring to only the block management table by a general-purpose file system.

この動的ユニット配置方式を搭載したビデオレコーダ100のみでHDD115が利用される場合には、空きブロック数から算出される残記憶容量と、確保可能なユニットから算出される残記憶容量との間に差が生じることはない。   When the HDD 115 is used only by the video recorder 100 equipped with this dynamic unit arrangement method, the remaining storage capacity calculated from the number of free blocks and the remaining storage capacity calculated from the units that can be secured are used. There is no difference.

しかしながら、HDD115は、可搬型であるが故にPC等の汎用機に装着されて利用される。そして、PC等の汎用機によってノンリアルタイムデータの記憶/削除が行われる機会が増大し、空きブロックが離散的に点在する確立が高くなる。この結果、HDDには十分な空きブロックがあるにもかかわらず、ユニットを構成するための連続した空きブロックを確保できないために、空きブロック数から算出される残記憶容量と、確保可能なユニットから算出される残記憶容量との間に、著しく差が生じてしまう。   However, since the HDD 115 is portable, it is used by being mounted on a general-purpose machine such as a PC. Then, the opportunity for storing / deleting non-real-time data by a general-purpose machine such as a PC increases, and the probability that empty blocks are scattered in a discrete manner increases. As a result, even though there are enough free blocks in the HDD, it is not possible to secure continuous free blocks to configure the unit, so the remaining storage capacity calculated from the number of free blocks and the available units There will be a significant difference from the calculated remaining storage capacity.

これを解消するために、再配置処理を行う。この再配置処理は、HDDユニット123がビデオレコーダに装着されたとき、HDD115上のブロック管理テーブルとユニット管理テーブルの更新日時が異なるとき、HDD115におけるブロック管理テーブルとユニット管理テーブルに矛盾はあるとき、などに行う。   In order to solve this, a rearrangement process is performed. This rearrangement process is performed when the HDD unit 123 is mounted on a video recorder, when the block management table on the HDD 115 and the update date of the unit management table are different, and when there is a contradiction between the block management table and the unit management table in the HDD 115. And so on.

本実施例では、システムコントローラ110が、HDDユニット123装着後に、ブロック管理テーブルとユニット管理テーブルの更新日時が異なることを検出し、これに応じてこの2つの管理テーブル間に発生した矛盾を修正した後に、再配置処理を行うこととする。 したがって、再配置処理のときには、”ユニット”を構成する各ユニットブロックの状態は、ユニット管理テーブルにて規定された状態に一致することになり、”ユニット”を構成するデータは、必ずユニットブロックに配置される。   In this embodiment, the system controller 110 detects that the update date / time of the block management table and the unit management table is different after the HDD unit 123 is mounted, and corrects the contradiction that has occurred between the two management tables accordingly. Later, a rearrangement process is performed. Therefore, at the time of relocation processing, the status of each unit block that constitutes the “unit” matches the status specified in the unit management table, and the data that constitutes the “unit” is always stored in the unit block. Be placed.

図6は、本実施例におけるビデオレコーダ100におけるデータ再配置処理を示すフローチャートである。   FIG. 6 is a flowchart showing a data rearrangement process in the video recorder 100 in the present embodiment.

まず、システムコントローラ110の開始イベントによって再配置処理制御部121が起動すると、ユニットブロックを順に処理していくためのインデックスm(自然数)を0に初期化する(S21)。このインデックスは、再配置中のユニットブロックの番号を示す。   First, when the rearrangement processing control unit 121 is activated by a start event of the system controller 110, an index m (natural number) for sequentially processing unit blocks is initialized to 0 (S21). This index indicates the number of the unit block being rearranged.

以後、システムコントローラ110からの中断イベントを受けるか、若しくは、インデックスmが最終ユニットブロックの番号に達するまで、ユニットブロック単位のデータ再配置処理が実行される。   Thereafter, data relocation processing in units of unit blocks is executed until an interruption event is received from the system controller 110 or the index m reaches the number of the last unit block.

再配置処理制御部121は、ユニット管理テーブルから、ユニットブロックmのユニット情報を取得する(S22)。ユニット情報が、“リアルタイムデータ記憶に使用”/“ノンリアルタイムデータ記憶に全使用”/“未使用”の場合(S22No)、データ再配置を必要としない。ユニット情報が、“ノンリアルタイムデータ記憶に一部使用”の場合(S22Yes)、データの再配置処理を必要とする。   The rearrangement processing control unit 121 acquires unit information of the unit block m from the unit management table (S22). When the unit information is “used for real-time data storage” / “all used for non-real-time data storage” / “not used” (No in S22), data relocation is not required. If the unit information is “partially used for non-real-time data storage” (Yes in S22), data relocation processing is required.

再配置処理制御部121は、ユニット情報が“ノンリアルタイムデータ記憶に一部使用”の場合(S22Yes)、ユニットブロック0〜(m−1)を検索して、移動先となりうるユニットブロックを検索する(S23)。移動先ユニットブロックとは、未使用のブロックと、ノンリアルタイムデータが記憶されているブロックが混在しているユニットブロック、すなわち、ユニット情報が“ノンリアルタイムデータ記憶に一部使用”となっているユニットである。   When the unit information is “partially used for non-real-time data storage” (S22 Yes), the reallocation processing control unit 121 searches for unit blocks 0 to (m−1) to search for a unit block that can be a destination. (S23). The destination unit block is a unit block in which unused blocks and non-real-time data are stored together, that is, a unit whose unit information is “partially used for non-real-time data storage” It is.

選択したユニットブロックの検索の結果(S24)、ユニットブロック0〜(m−1)に、移動先ユニットブロックが存在する場合(S24Yes)、ユニットブロックmのブロックに記憶されているデータをブロック単位で移動先ユニットブロックの未使用ブロックに空きがある限り複製する(S25)。   As a result of the search for the selected unit block (S24), if the destination unit block exists in the unit blocks 0 to (m-1) (Yes in S24), the data stored in the block of the unit block m is displayed in block units. As long as there is a free space in the unused block of the destination unit block, it is duplicated (S25).

一方、移動先となる未使用ブロックが存在しない場合(S24No)、再配置は必要とならない。   On the other hand, if there is no unused block to be moved (No in S24), rearrangement is not necessary.

次に、S25の複製元のブロックに記憶されたデータが複製先のブロックに移動に伴い、ユニット管理テーブル220およびブロック管理テーブル210のデータを変更する(S26)。   Next, as the data stored in the copy source block in S25 moves to the copy destination block, the data in the unit management table 220 and the block management table 210 are changed (S26).

図7は、ユニットブロックmが、ノンリアルタイムデータの記憶に一部使用されている場合の再配置処理を説明する模式図である。ユニットブロックm内には、再配置の対象となるデータを記憶したブロックA3とA4が配置されている。そして、ユニットブロック2(2<m)もまた、ノンリアルタイムデータの記憶に一部使用されているユニットブロックであり、ブロックA5とA6が未使用のブロックである。本再配置処理では、ユニットブロック2が移動先ユニットブロックとなり、ユニットブロックmのブロックA3およびA4に記憶されているデータが、それぞれユニットブロック2のブロックA5とA6に移動される。   FIG. 7 is a schematic diagram for explaining the rearrangement process when the unit block m is partially used for storing non-real-time data. In the unit block m, blocks A3 and A4 storing data to be rearranged are arranged. The unit block 2 (2 <m) is also a unit block partially used for storing non-real time data, and the blocks A5 and A6 are unused blocks. In this rearrangement processing, the unit block 2 becomes the movement destination unit block, and the data stored in the blocks A3 and A4 of the unit block m are moved to the blocks A5 and A6 of the unit block 2, respectively.

図8は、図7に対する再配置後の状態を示す模式図である。   FIG. 8 is a schematic diagram showing a state after rearrangement with respect to FIG.

ユニットブロックmのブロックA3およびA4のデータは、ユニットブロック2のブロックA6およびブロックA7へ移動し、これに伴い、ブロック管理テーブル210およびユニット管理テーブル220が変更されている。   The data of the blocks A3 and A4 of the unit block m are moved to the blocks A6 and A7 of the unit block 2, and the block management table 210 and the unit management table 220 are changed accordingly.

なお、S24Noの場合、およびS25において、ユニットブロックm内の全てのデータが移動先ユニットブロックに複製できなかった場合には、以後の処理においてユニットブロックmが、移動先ユニットブロックとなる。   In the case of S24No and in S25, when all the data in the unit block m cannot be copied to the destination unit block, the unit block m becomes the destination unit block in the subsequent processing.

ユニットブロックmに対する処理が終了すると、データ再配置処理の終了を確認する(S27)。すなわち、インデックスmが、最終ユニットブロック(総ユニット数―1)の場合(S27Yes)、データの再配置処理を終了し、再配置処理制御部121を停止状態にする。一方、インデックスmが最終ユニットブロックでない場合(S27no)、インデックスmはインクリメントされ(S28)、再びステップS22に移行して、全てのユニットブロックに対する処理が終了するまで繰り返し処理される。   When the process for the unit block m is completed, the completion of the data rearrangement process is confirmed (S27). That is, when the index m is the last unit block (total number of units−1) (S27 Yes), the data rearrangement process is terminated and the rearrangement process control unit 121 is stopped. On the other hand, if the index m is not the last unit block (S27no), the index m is incremented (S28), the process proceeds to step S22 again, and the processing is repeated until the processing for all unit blocks is completed.

なお、上記再配置処理中に、ビデオレコーダ100に対するユーザの操作、あるいは録画予約によって、記憶または再生が指示されると、システムコントローラ110から、再配置処理の中断が再配置処理制御部121に通知される。   When storage or playback is instructed by a user operation on the video recorder 100 or a recording reservation during the rearrangement process, the system controller 110 notifies the rearrangement process control unit 121 of interruption of the rearrangement process. Is done.

処理の中断の中断が通知された再配置処理制御部121は、再配置処理を即座に中断する。再配置処理の中断が発生した場合、再配置処理制御部121は、内部のメモリに、再配置処理の進行状況を示す情報としてユニットの参照インデックスmを記憶する。   The rearrangement process control unit 121 that has been notified of the interruption of the process interruption immediately interrupts the rearrangement process. When the rearrangement process is interrupted, the rearrangement process control unit 121 stores the unit reference index m in the internal memory as information indicating the progress of the rearrangement process.

記憶または再生処理が終了し再配置処理の再開が可能となると、システムコントローラ110により再配置処理の再開イベントを受け取った再配置処理制御部121は、中断時に再配置処理の対象としていたユニットブロックmに対して、S22に戻って処理を再開する。   When the storage or reproduction process ends and the relocation process can be resumed, the relocation process control unit 121 that has received the relocation process resumption event from the system controller 110 receives the unit block m that was the target of the relocation process at the time of interruption. In contrast, the process returns to S22 and the process is resumed.

上記の実施例1および実施例2では、ブロック単位で記憶するノンリアルタイムデータと、ブロックの整数倍の単位であるユニット単位で記憶するリアルタイムデータの、データ長の異なる2つのデータを扱う場合について説明したが、本発明のように、2種類のデータ長単位で記憶される場合に限定されるものでなく、3種類以上の単位、すなわち、ブロックと、複数種類のブロック数を1単位として構成されるユニットを管理する場合においても有効である。この場合、ユニットブロックは、それぞれのユニットブロックを構成するブロック数の最小公倍数分のブロックによって構成され、1つのユニットブロックには、単一の単位で記憶されるユニットの属するブロックのみ、あるいは、ノンリアルタイムデータのブロックのみが配置されるように、データ再配置をユニットブロック単位で行うようにすればよい。また、この場合、ユニットの管理単位は、ユニットブロックを構成するブロック数の約数であることが望ましい。
また、実施例2は、ユニット管理テーブルとブロック管理テーブルとの矛盾を事前に解消し、再配置処理を行うものであるが、再配置処理を行いながら、ユニット管理テーブルとブロック管理テーブルとの矛盾を解消することも可能である。具体的には、実施例1の図2の処理フローのS11の前に、処理対象のユニットの記憶状態をユニット管理テーブルに更新する処理を加えることによって実現することができる。
In the first embodiment and the second embodiment described above, a case where two data having different data lengths, that is, non-real-time data stored in units of blocks and real-time data stored in units of units that are integer multiples of blocks is described. However, the present invention is not limited to the case where data is stored in two types of data length units as in the present invention, and is configured with three or more types of units, that is, blocks and a plurality of types of blocks as one unit. This is also effective when managing units. In this case, the unit block is configured by blocks corresponding to the least common multiple of the number of blocks constituting each unit block, and one unit block includes only a block to which a unit stored in a single unit belongs or a non-block. Data relocation may be performed in units of unit blocks so that only real-time data blocks are arranged. In this case, the unit management unit is preferably a divisor of the number of blocks constituting the unit block.
In the second embodiment, inconsistency between the unit management table and the block management table is resolved in advance and relocation processing is performed. However, inconsistency between the unit management table and the block management table while performing the relocation processing. It is also possible to eliminate the problem. Specifically, it can be realized by adding a process of updating the storage state of the processing target unit to the unit management table before S11 of the processing flow of FIG.

本発明のビデオレコーダのブロック図Block diagram of the video recorder of the present invention 実施例1におけるデータ再配置処理フローチャートData rearrangement processing flowchart according to the first embodiment 実施例1におけるデータ再配置の例Example of data rearrangement in the first embodiment 実施例1におけるデータ再配置の例Example of data rearrangement in the first embodiment 動的ユニット配置方式における再配置を説明する図Diagram explaining rearrangement in dynamic unit placement method 実施例2におけるデータ再配置処理フローチャートData rearrangement processing flowchart according to the second embodiment 実施例2におけるデータ再配置の例Example of data rearrangement in the second embodiment 実施例2におけるデータ再配置の例Example of data rearrangement in the second embodiment

符号の説明Explanation of symbols

121 再配置処理制御部       121 Relocation processing control unit

Claims (12)

ブロック単位でデータが管理されている既記憶データを再配置する再配置処理手段を備えるレコーダにおいて、
前記再配置処理手段は、ブロックの整数倍から構成されるユニットブロック単位での再配置処理の必要性を順次判定し、
ここで、ユニットブロックにリアルタイムデータを記憶したブロックのみが記憶され、且つ、このユニットブロックの先頭ブロックにリアルタイムデータが記憶されていないとき、当該ユニットブロックを、再配置が必要と判定し、
これにより再配置が必要と判定したときは、当該ユニットブロックのリアルタイムデータと、このリアルタイムデータと共に一単位として扱われる次のユニットブロックのリアルタイムデータを、空きのユニットブロックに再配置する、
ことを特徴とするレコーダ。
In a recorder comprising rearrangement processing means for rearranging already stored data in which data is managed in block units,
The rearrangement processing means sequentially determines the necessity of rearrangement processing in unit blocks composed of integer multiples of blocks,
Here, when only the block storing the real-time data is stored in the unit block, and when the real-time data is not stored in the head block of this unit block, it is determined that the unit block needs to be rearranged,
When it is determined that rearrangement is necessary, the real-time data of the unit block and the real-time data of the next unit block treated as one unit together with the real-time data are rearranged in empty unit blocks.
A recorder characterized by that.
ブロック単位でデータが管理されている既記憶データを再配置する再配置処理手段を備えるレコーダにおいて、
前記再配置処理手段は、ブロックの整数倍から構成されるユニットブロック単位での再配置処理の必要性を順次判定し、
ここで、ユニットブロックにノンリアルタイムデータを記憶したブロックと、未使用ブロックおよび/もしくはリアルタイムデータを記憶したブロックが混在しているとき、当該ユニットブロックを、再配置が必要と判定し、
これにより、再配置が必要と判定したときは、当該ユニットブロックのノンリアルタイムデータを、ノンリアルタイムデータを記憶したブロックと未使用ブロックが混在した他のユニットブロックに再配置する、
ことを特徴とするレコーダ。
In a recorder comprising rearrangement processing means for rearranging already stored data in which data is managed in block units,
The rearrangement processing means sequentially determines the necessity of rearrangement processing in unit blocks composed of integer multiples of blocks,
Here, when a block storing non-real-time data in a unit block and a block storing unused block and / or real-time data are mixed, it is determined that the unit block needs to be rearranged,
Thereby, when it is determined that the rearrangement is necessary, the non-real time data of the unit block is rearranged in another unit block in which the block storing the non-real time data and the unused block are mixed,
A recorder characterized by that.
請求項2において、
前記再配置処理手段は、再配置が必要と判定したときは、当該ユニットブロックのノンリアルタイムデータを、ノンリアルタイムデータを記憶したブロックと未使用ブロックが混在した他のユニットブロックの他、空きのユニットブロックに再配置する、
ことを特徴とするレコーダ。
In claim 2,
When the relocation processing means determines that relocation is necessary, the non-real time data of the unit block is replaced with an empty unit, in addition to other unit blocks in which a block storing non-real time data and unused blocks are mixed. Rearrange to block,
A recorder characterized by that.
請求項2あるいは3において、
前記再配置処理手段は、再配置が必要と判定されたm(1以上の自然数)番目のユニットブロックを、先頭乃至(m−1)番目のユニットブロックのうち、最も先頭に近いユニットブロックに再配置する、
ことを特徴とするレコーダ。
In claim 2 or 3,
The rearrangement processing unit rearranges the m (natural number greater than or equal to 1) -th unit block determined to be rearranged to the unit block closest to the head among the first to (m−1) -th unit blocks. Deploy,
A recorder characterized by that.
請求項4において、
前記再配置処理手段は、再配置が必要と判定されたm(1以上の自然数)番目のユニットブロックのノンリアルタイムデータを、先頭乃至(m−1)番目のユニットブロックの未記憶ブロックを使い尽くすまで再配置する、
ことを特徴とするレコーダ。
In claim 4,
The rearrangement processing unit uses up the non-real-time data of the m (natural number greater than or equal to 1) th unit block determined to be rearranged and the unstored blocks of the first to (m−1) th unit block. Rearrange,
A recorder characterized by that.
請求項1乃至5の何れかにおいて、
前記再配置処理手段は、再配置処理が中断されたとき、再配置処理の進行状況を示す情報を記憶しておき、再配置処理の再開時には、この情報を参照して、先の再配置処理にて再配置処理を行った最終のユニットブロックに続く次のユニットブロックから順次、再配置処理を実行する、
ことを特徴とするレコーダ。
In any of claims 1 to 5,
When the rearrangement process is interrupted, the rearrangement processing unit stores information indicating a progress status of the rearrangement process, and refers to this information when the rearrangement process is resumed. Execute relocation processing sequentially from the next unit block following the last unit block that has undergone relocation processing in
A recorder characterized by that.
ブロック単位でデータが管理されている既記憶データを再配置する機能をコンピュータに付与するプログラムにおいて、
ブロックの整数倍から構成されるユニットブロック単位での再配置処理の必要性を順次判定するステップと、この判定ステップによって再配置が必要と判定されたときに再配置処理を実行するステップとを含み、
前記判定ステップは、ユニットブロックにリアルタイムデータを記憶したブロックのみが記憶され、且つ、このユニットブロックの先頭ブロックにリアルタイムデータが記憶されていないとき、当該ユニットブロックを、再配置が必要と判定し、
前記再配置ステップは、前記判定ステップにより再配置が必要と判定したときは、当該ユニットブロックのリアルタイムデータと、このリアルタイムデータと共に一単位として扱われる次のユニットブロックのリアルタイムデータを、空きのユニットブロックに再配置する、
ことを特徴とするプログラム。
In a program that gives a computer a function of rearranging stored data whose data is managed in block units,
Sequentially determining the necessity of rearrangement processing in unit block units composed of integer multiples of blocks, and executing the rearrangement processing when it is determined that rearrangement is necessary by this determination step ,
In the determining step, only the block storing real-time data in the unit block is stored, and when the real-time data is not stored in the head block of the unit block, it is determined that the unit block needs to be rearranged,
When the rearrangement step determines that rearrangement is necessary in the determination step, the real-time data of the unit block and the real-time data of the next unit block treated as one unit together with the real-time data are converted into an empty unit block. To rearrange,
A program characterized by that.
ブロック単位でデータが管理されている既記憶データを再配置する機能をコンピュータに付与するプログラムにおいて、
ブロックの整数倍から構成されるユニットブロック単位での再配置処理の必要性を順次判定するステップと、この判定ステップによって再配置が必要と判定されたときに再配置処理を実行するステップとを含み、
前記判定ステップは、ユニットブロックにノンリアルタイムデータを記憶したブロックと、未使用ブロックおよび/もしくはリアルタイムデータを記憶したブロックが混在しているとき、当該ユニットブロックを、再配置が必要と判定し、
前記再配置ステップは、前記判定ステップにより、再配置が必要と判定したときは、当該ユニットブロックのノンリアルタイムデータを、ノンリアルタイムデータを記憶したブロックと未使用ブロックが混在した他のユニットブロックに再配置する、
ことを特徴とするプログラム。
In a program that gives a computer a function of rearranging stored data whose data is managed in block units,
Sequentially determining the necessity of rearrangement processing in unit block units composed of integer multiples of blocks, and executing the rearrangement processing when it is determined that rearrangement is necessary by this determination step ,
The determination step determines that when a block storing non-real time data in a unit block and an unused block and / or a block storing real time data are mixed, the unit block needs to be rearranged,
In the rearrangement step, when the determination step determines that rearrangement is necessary, the non-real time data of the unit block is rearranged to another unit block in which the block storing the non-real time data and the unused block are mixed. Deploy,
A program characterized by that.
請求項8において、
前記再配置ステップは、再配置が必要と判定したときは、当該ユニットブロックのノンリアルタイムデータを、ノンリアルタイムデータを記憶したブロックと未使用ブロックが混在した他のユニットブロックの他、空きのユニットブロックに再配置する、
ことを特徴とするプログラム。
In claim 8,
When the rearrangement step determines that rearrangement is necessary, the non-real-time data of the unit block is replaced with an empty unit block in addition to other unit blocks in which non-real-time data is stored and unused unit blocks. To rearrange,
A program characterized by that.
請求項8あるいは9において、
前記再配置ステップは、再配置が必要と判定されたm(1以上の自然数)番目のユニットブロックを、先頭乃至(m−1)番目のユニットブロックのうち、最も先頭に近く、且つ、該当するユニットブロックに再配置する、
ことを特徴とするプログラム。
In claim 8 or 9,
In the rearrangement step, the m (natural number greater than or equal to 1) -th unit block determined to be rearranged is the closest to the top of the first to (m−1) -th unit blocks and corresponds. Rearrange to unit block,
A program characterized by that.
請求項10において、
前記再配置ステップは、再配置が必要と判定されたm(1以上の自然数)番目のユニットブロックのノンリアルタイムデータを、先頭乃至(m−1)番目のユニットブロックの未記憶ブロックを使い尽くすまで再配置する、
ことを特徴とするプログラム。
In claim 10,
In the rearrangement step, the non-real-time data of the m (natural number greater than or equal to 1) -th unit block determined to be rearranged until the unstored blocks of the first to (m−1) -th unit block are used up. Rearrange,
A program characterized by that.
請求項7乃至11の何れかにおいて、
前記再配置ステップは、再配置処理が中断されたとき、再配置処理の進行状況を示す情報を記憶しておき、再配置処理の再開時には、この情報を参照して、先の再配置処理にて再配置処理を行った最終のユニットブロックに続く次のユニットブロックから順次、再配置処理を実行する、
ことを特徴とするプログラム。

In any of claims 7 to 11,
In the rearrangement step, when the rearrangement process is interrupted, information indicating the progress of the rearrangement process is stored, and when the rearrangement process is resumed, the information is referred to the previous rearrangement process. The relocation processing is executed sequentially from the next unit block following the last unit block subjected to the relocation processing.
A program characterized by that.

JP2003341757A 2003-09-30 2003-09-30 Recorder and program Expired - Fee Related JP4204433B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003341757A JP4204433B2 (en) 2003-09-30 2003-09-30 Recorder and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003341757A JP4204433B2 (en) 2003-09-30 2003-09-30 Recorder and program

Publications (2)

Publication Number Publication Date
JP2005108345A true JP2005108345A (en) 2005-04-21
JP4204433B2 JP4204433B2 (en) 2009-01-07

Family

ID=34536259

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003341757A Expired - Fee Related JP4204433B2 (en) 2003-09-30 2003-09-30 Recorder and program

Country Status (1)

Country Link
JP (1) JP4204433B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007200443A (en) * 2006-01-25 2007-08-09 Sharp Corp Recording and reproducing device
JP2009282752A (en) * 2008-05-22 2009-12-03 Hitachi Systems & Services Ltd Storage device and recording method of file system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007200443A (en) * 2006-01-25 2007-08-09 Sharp Corp Recording and reproducing device
JP2009282752A (en) * 2008-05-22 2009-12-03 Hitachi Systems & Services Ltd Storage device and recording method of file system

Also Published As

Publication number Publication date
JP4204433B2 (en) 2009-01-07

Similar Documents

Publication Publication Date Title
US7600224B2 (en) Information processing apparatus including storage
US20040258390A1 (en) Systems and methods for PVR real time distributed storage, playback, and archival of programs on a network
KR100841436B1 (en) Video recording/reproducing apparatus and control method of memory device of thereof
US6618548B1 (en) Method for copying, recording, and editing data onto disk recording media, and disk recording apparatus
JP4256075B2 (en) File system and storage area management method
JP2005302233A (en) Information memory device, information storing method, and information memory processing program
JP4036056B2 (en) Recording apparatus and method, recording medium, and program
US7441124B2 (en) Recording apparatus and method
US20050259542A1 (en) Reproduction device and method, recording medium, and program
JP4204433B2 (en) Recorder and program
US7346265B2 (en) Recording/reproducing apparatus, recording/reproducing method, medium, and program
JP4668934B2 (en) Recording / playback apparatus and activation control method thereof
JP2008152820A (en) Video audio data recording and reproducing device, video audio data recording and reproducing method, and recording medium
KR20030061948A (en) : Apparatus storing information and method for controlling the File using its
KR100644734B1 (en) Recording/playback apparatus, recording/playback method and presentation medium
JP4056370B2 (en) Recorder
KR20000035410A (en) Apparatus and method for recording, apparatus and method for reproduction, apparatus and method for recording/reproducing, and distribution medium
JP2008171566A (en) Device and method for reproducing data, and device and method for recording data
CN1841543B (en) Recording/playback control device, contents management method and recording/playback apparatus
JP2004296028A (en) Recorder
JP2001043622A (en) Information processor
JP4269915B2 (en) Recording / reproducing apparatus and method, and recording / reproducing system
KR100565784B1 (en) Video and audio data recording/reproducing apparatus having the function of lock setting and control method thereof
JP2001043662A (en) Disk medium managing method
KR100692974B1 (en) Video and audio data recording/reproducing apparatus having the function of lock setting and control method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060929

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080610

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080704

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081014

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

Free format text: PAYMENT UNTIL: 20111024

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111024

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees