JP4391793B2 - File update device - Google Patents

File update device Download PDF

Info

Publication number
JP4391793B2
JP4391793B2 JP2003350068A JP2003350068A JP4391793B2 JP 4391793 B2 JP4391793 B2 JP 4391793B2 JP 2003350068 A JP2003350068 A JP 2003350068A JP 2003350068 A JP2003350068 A JP 2003350068A JP 4391793 B2 JP4391793 B2 JP 4391793B2
Authority
JP
Japan
Prior art keywords
information
update
file
recording medium
updated
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.)
Expired - Fee Related
Application number
JP2003350068A
Other languages
Japanese (ja)
Other versions
JP2004157997A (en
Inventor
卓治 前田
信治 井上
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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial 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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2003350068A priority Critical patent/JP4391793B2/en
Publication of JP2004157997A publication Critical patent/JP2004157997A/en
Application granted granted Critical
Publication of JP4391793B2 publication Critical patent/JP4391793B2/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)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Description

本発明は、半導体メモリ等といった記録媒体に格納されたファイルを更新する技術に関し、特に更新が途中で停止した場合に発生する、ファイル構成データの格納状態とファイルの管理情報との論理的な不整合を、解消するための技術に関する。   The present invention relates to a technique for updating a file stored in a recording medium such as a semiconductor memory, and in particular, a logical error between a storage state of file configuration data and file management information that occurs when the update is stopped halfway. The present invention relates to a technique for eliminating the alignment.

従来、半導体メモリ、磁気ディスク、光磁気ディスク等の記録媒体中の記録領域に格納されたデータの管理は、ファイルシステムにより実現されている。ファイルシステムでは、記録領域を、物理的な最小アクセス単位であるセクタの集合であるクラスタに分割して、1以上のクラスタに記録されるデータをファイルとして管理する。なお、ファイルシステムにより管理がなされた記録媒体におけるファイルは、同一のファイルシステムに対応した機器間で授受され得る。   Conventionally, management of data stored in a recording area in a recording medium such as a semiconductor memory, a magnetic disk, or a magneto-optical disk is realized by a file system. In the file system, the recording area is divided into clusters, which are sets of sectors that are physical minimum access units, and data recorded in one or more clusters is managed as a file. A file on a recording medium managed by the file system can be exchanged between devices corresponding to the same file system.

以下、従来のファイルシステムの1つであるFATファイルシステムについて説明する。
FATファイルシステムはパーソナルコンピュータ(PC)等の情報処理装置で一般に用いられているファイルシステムであり、ファイルを構成するデータの物理的な格納位置をFAT(File Allocation Table)と呼ばれるテーブルにより管理するという特徴を持つ。
Hereinafter, a FAT file system which is one of the conventional file systems will be described.
The FAT file system is a file system generally used in an information processing apparatus such as a personal computer (PC), and manages a physical storage position of data constituting a file by a table called FAT (File Allocation Table). Has characteristics.

図1は、あるFATファイルシステムにおける記憶領域内のデータ構造を示す図である。
図1に示すFATファイルシステムでは、記録媒体中の記録領域を論理アドレスに従って見た場合の先頭に、記録領域を管理するために管理情報領域100を設けてある。なお、その記録領域中において、ファイルを構成するデータ等を格納するためのデータ領域110は管理情報領域100の後方に位置付けられている。
FIG. 1 is a diagram showing a data structure in a storage area in a FAT file system.
In the FAT file system shown in FIG. 1, a management information area 100 is provided for managing the recording area at the head when the recording area in the recording medium is viewed according to the logical address. In the recording area, a data area 110 for storing data constituting the file is positioned behind the management information area 100.

管理情報領域100は、記録領域を複数のパーティションと呼ばれる領域に分割して管理するための情報を格納するマスターブートレコード・パーティションテーブル101と、1つのパーティション内の管理情報を格納するパーティションブートセクタ102と、ファイルに含まれるデータの物理的な格納位置を示すFAT103及びFAT104と、ルートディレクトリ直下に存在するファイル又はディレクトリの情報を格納するルートディレクトリエントリ105とから構成される。なお、FAT103及びFAT104は、ファイルに含まれるデータの物理的な格納位置を示す重要な領域であることから二重化されており、同内容となっている。   The management information area 100 includes a master boot record / partition table 101 that stores information for managing a recording area divided into a plurality of areas called partitions, and a partition boot sector 102 that stores management information in one partition. And FAT 103 and FAT 104 indicating the physical storage location of data contained in the file, and a root directory entry 105 for storing information on the file or directory existing immediately under the root directory. The FAT 103 and the FAT 104 are duplicated because they are important areas indicating the physical storage positions of data included in the file, and have the same contents.

データ領域110は、クラスタに分割され管理されており、各クラスタにはファイルを構成するデータが格納されている。1クラスタより多い量のデータで構成されるファイルについては、その構成データを複数のクラスタに分けて格納しており、ファイルに対応する各クラスタ間のつながりは、FAT103及びFAT104に格納されたリンク情報により管理されている。   The data area 110 is divided into clusters and managed, and each cluster stores data constituting a file. For a file composed of a larger amount of data than one cluster, the configuration data is divided into a plurality of clusters, and the link between the clusters corresponding to the file is linked information stored in the FAT 103 and the FAT 104. It is managed by.

なお、FATファイルシステムについては、ISO/IEC9293、“Information Technology−Volume and file structure of diskcartridges for information interchange”(1994年)等に詳しく説明されている。
図2は、ファイルの管理情報であるディレクトリエントリを示す図であり、図3は、FATを示す図であり、図4は、ファイル内容を構成するデータを示す図である。
The FAT file system is described in detail in ISO / IEC9293, “Information Technology-Volume and file structure of disk cartridges for information interchange” (1994) and the like.
2 is a diagram showing a directory entry which is file management information, FIG. 3 is a diagram showing FAT, and FIG. 4 is a diagram showing data constituting the file contents.

以下、図2〜図4を用いて、FATファイルシステムにおけるディレクトリエントリとファイルを構成するデータとの関係について説明する。
ルートディレクトリエントリやデータ領域の一部には、図2に示すような、ファイル名やファイルサイズ等の1ファイルについての管理情報であるディレクトリエントリ201が格納される。
Hereinafter, the relationship between the directory entry in the FAT file system and the data constituting the file will be described with reference to FIGS.
In a part of the root directory entry and data area, a directory entry 201 as management information for one file such as a file name and a file size as shown in FIG. 2 is stored.

ファイルを構成するデータの格納先であるデータ領域はクラスタ単位で管理されており、各クラスタには一意に識別可能なクラスタ番号が付与されている。ファイルを構成するデータが格納されているクラスタを特定するために、ディレクトリエントリ201には、ファイルを構成するデータの先頭部分が格納されているクラスタのクラスタ番号(開始クラスタ番号)が、ファイル名及びファイルサイズとともに格納されている。   A data area that is a storage destination of data constituting the file is managed in cluster units, and each cluster is assigned a uniquely identifiable cluster number. In order to identify the cluster in which the data constituting the file is stored, the directory entry 201 includes the cluster number (starting cluster number) of the cluster in which the head portion of the data constituting the file is stored, the file name and Stored with file size.

図2に例示するディレクトリエントリ201は、FILE1.TXTというファイル名と、10という開始クラスタ番号と、60キロバイト(KB)というファイルサイズとから構成されている。これは、FILE1.TXTという名前のファイルを構成するデータの先頭は10番のクラスタに格納されており、ファイル内容を構成する全データのサイズの合計は60キロバイトであることを示している。   The directory entry 201 illustrated in FIG. It consists of a file name of TXT, a start cluster number of 10, and a file size of 60 kilobytes (KB). This is because FILE1. The head of the data constituting the file named TXT is stored in the cluster No. 10, indicating that the total size of all the data constituting the file content is 60 kilobytes.

複数のクラスタにデータが格納されているファイルの場合における、開始クラスタ番号で示されるクラスタに後続するクラスタの番号を特定するための情報は、FAT上のリンク情報である。
図3に示すFAT202には、各クラスタ番号に対応したフィールドであるFATエントリが設けられており、各FATエントリには、対応するクラスタがファイル内容を構成するデータとして使用されているかいないかの別と、使用されている場合には、同一ファイル内容を構成するデータが記録されているところの後続先となるクラスタの番号が格納される。なお、FATエントリには、対応するクラスタに後続先のクラスタがない場合には終端を意味する値として、例えば0xFFFが、格納される。
In the case of a file in which data is stored in a plurality of clusters, information for specifying a cluster number subsequent to the cluster indicated by the start cluster number is link information on the FAT.
The FAT 202 shown in FIG. 3 is provided with a FAT entry that is a field corresponding to each cluster number, and each FAT entry indicates whether or not the corresponding cluster is used as data constituting the file contents. If it is used, the number of the cluster that will be the succeeding destination where the data constituting the same file content is recorded is stored. In the FAT entry, for example, 0xFFF is stored as a value indicating the end when there is no subsequent cluster in the corresponding cluster.

図3の例では、10番のクラスタに対応するFATエントリに11が格納されているため、10番のクラスタは、11番のクラスタにリンクしていることになる。同様に11番のクラスタに対応するFATエントリには12が、12番のクラスタに対応するFATエントリには13がそれぞれ格納されており、10番、11番、12番、13番のクラスタがこの順にリンクされていることになる。次に13番のクラスタに対応するFATエントリには0xFFFが格納されているが、0xFFFはリンクの終端を意味していることから、10番のクラスタから始まるリンクは、13番のクラスタまでで終了することになる。   In the example of FIG. 3, since 11 is stored in the FAT entry corresponding to the 10th cluster, the 10th cluster is linked to the 11th cluster. Similarly, 12 is stored in the FAT entry corresponding to the 11th cluster, and 13 is stored in the FAT entry corresponding to the 12th cluster. The 10th, 11th, 12th, and 13th clusters are stored in the FAT entry. It will be linked in order. Next, 0xFFF is stored in the FAT entry corresponding to the 13th cluster, but since 0xFFF means the end of the link, the link starting from the 10th cluster ends up to the 13th cluster. Will do.

また、14番のクラスタに対応するFATエントリに格納されている0は、そのクラスタがファイルを構成するデータとして割り当てられておらず、空き領域であることを意味している。
図4では、図2及び図3で例示したFILE1.TXTという名前のファイルを構成するデータが、4つのクラスタに分割されたデータ1、データ2、データ3及びデータ4であることを示している。
Further, 0 stored in the FAT entry corresponding to the 14th cluster means that the cluster is not assigned as data constituting the file and is a free area.
In FIG. 4, the FILE1. It shows that the data constituting the file named TXT is data 1, data 2, data 3 and data 4 divided into four clusters.

次に、FATファイルシステムにおけるファイル内容の更新について説明する。
ファイル内容を更新するためには、記録媒体にファイルを構成する新たなデータを書き込むとともに、ディレクトリエントリ、FAT1、FAT2の情報を書き換える必要がある。ファイル内容を更新中である情報処理装置の電源が遮断される等により、更新が途中で停止してしまった場合には、ディレクトリエントリ、FAT1又はFAT2と実際のファイルを構成するデータの状態とに不整合が生じ、ファイルの格納位置を正しく認識することができず、ファイルにアクセスすることができなくなる。
Next, updating of file contents in the FAT file system will be described.
In order to update the file contents, it is necessary to write new data constituting the file to the recording medium and rewrite the information of the directory entry, FAT1, and FAT2. If the update is stopped halfway due to the power supply of the information processing apparatus that is updating the file contents being cut off, the directory entry, FAT1 or FAT2, and the status of the data constituting the actual file are changed. Inconsistency occurs, the file storage position cannot be recognized correctly, and the file cannot be accessed.

従来、ファイルの更新の途中における情報処理装置の電源遮断の発生等により、そのファイルの更新が途中で停止した場合に、ファイルに関する上述の不整合を解消する方法として、次に情報処理装置が起動した際に、ファイル復旧処理を実施する方法が提案されている(例えば、特許文献1参照。)。
従来のファイル復旧処理を実施する方法では、記録媒体中のファイルの更新に際しての旧ファイル内容と新ファイル内容との並存状態において、新ファイル内容と整合するようにディレクトリエントリ、FAT1、FAT2を更新する手順をFAT1、ディレクトリエントリ、FAT2の順に定め、処理が完了した手順を示すフラグ等の復旧用情報をその記録媒体の特定位置に記録する。この復旧用情報を元に、FAT1の更新途中で処理が停止していた場合には、FAT2をFAT1に上書きしファイル更新前の状態に戻す。また、ディレクトリエントリ及びFAT2の更新途中で処理が停止していた場合には、ディレクトリエントリの更新を行うと共に、FAT1をFAT2に上書きしファイルの更新処理を完結させる。これにより、ファイルに関する不整合が解消され、ファイルが正しく認識される状態になる。
特開2002−63057号公報
Conventionally, when the update of a file is stopped halfway due to the occurrence of a power shutdown of the information processing device in the middle of the file update, the information processing device is then started as a method for resolving the above inconsistency related to the file. In such a case, a method for performing a file restoration process has been proposed (see, for example, Patent Document 1).
In the conventional method of executing the file recovery process, the directory entry, FAT1, and FAT2 are updated so as to be consistent with the new file contents in the state where the old file contents and the new file contents coexist at the time of updating the file in the recording medium. The procedure is determined in the order of FAT1, directory entry, and FAT2, and recovery information such as a flag indicating the procedure that has been processed is recorded at a specific position on the recording medium. Based on this recovery information, if the process is stopped during the update of FAT1, FAT2 is overwritten with FAT1 to return to the state before the file update. If the processing is stopped in the middle of updating the directory entry and FAT2, the directory entry is updated and FAT1 is overwritten on FAT2 to complete the file update processing. As a result, the inconsistency regarding the file is resolved, and the file is correctly recognized.
JP 2002-63057 A

ところで、上記従来技術において、記録媒体中のファイルの更新に際してその記録媒体中に記録される復旧用情報は、ファイルに関する不整合が生じない場合即ち異常が生じない場合においては不要となる情報である。
従って、その記録媒体を、本来の目的であるファイル記録のために、無駄なく有効に利用しようとする見地からは、異常時にしか必要とならない情報をその記録媒体に記録しないことが望まれる。
By the way, in the above prior art, the recovery information recorded in the recording medium when the file in the recording medium is updated is unnecessary information when no inconsistency regarding the file occurs, that is, when no abnormality occurs. .
Therefore, from the viewpoint of effectively using the recording medium without waste for the purpose of file recording, which is the original purpose, it is desirable not to record information that is necessary only in an abnormal state on the recording medium.

そこで、本発明は、異常時にしか必要とならない情報を記録媒体に記録することなく、その記録媒体中のファイル更新が途中で停止した場合において生じるファイルに関する不整合を解消することを可能にするためのファイル更新装置等を提供することを目的とする。   Therefore, the present invention makes it possible to eliminate inconsistencies relating to files that occur when file updating in a recording medium is stopped halfway without recording information that is necessary only in an abnormal state on the recording medium. An object of the present invention is to provide a file updating apparatus and the like.

上記目的を達成するために、本発明に係るファイル更新装置は、ファイル内容を構成するデータの第1記録媒体中の格納位置を示す位置情報を記録してある第1記録媒体を着脱可能であり、第1記録媒体中のファイルを複数の更新手順を経て更新するファイル更新装置であって、第2記録媒体と、どの更新手順まで実施済みであるかを示す進行情報を第2記録媒体中に記録する進行記録手段と、更新前のファイル内容を構成するデータとは別に、更新後のファイル内容を構成するデータを第1記録媒体中に記録する新データ記録手段と、前記新データ記録手段により記録された更新後のファイル内容を構成するデータについての第1記録媒体中の格納位置を示す更新情報を第2記録媒体中に記録する更新情報記録手段と、更新後のファイル内容を構成するデータについて前記更新情報記録手段により更新情報が記録された後に、当該更新情報に基づいて、当該データについての第1記録媒体中の格納位置を示すように、当該ファイルの更新前の内容を構成するデータの格納位置を示している第1記録媒体中の位置情報を更新する位置情報更新手段とを備えることを特徴とする。   In order to achieve the above object, a file updating apparatus according to the present invention is detachable from a first recording medium on which position information indicating a storage position in a first recording medium of data constituting file contents is recorded. A file updating apparatus for updating a file in the first recording medium through a plurality of updating procedures, and the second recording medium and progress information indicating up to which updating procedure has been executed in the second recording medium Separately from the progress recording means for recording and the data constituting the file contents before the update, the new data recording means for recording the data constituting the file contents after the update in the first recording medium, and the new data recording means Update information recording means for recording, in the second recording medium, update information indicating the storage position in the first recording medium for the data constituting the recorded file content after the update, and in the updated file After the update information is recorded by the update information recording means on the data constituting the file, the content before the update of the file so as to indicate the storage position of the data in the first recording medium based on the update information And position information updating means for updating the position information in the first recording medium indicating the storage position of the data constituting the data.

本発明に係るファイル更新装置は、上述の構成を備えることにより、第1記録媒体中の位置情報が複数手順で更新される場合において更新途中で第1記録媒体へのアクセス機構の電源断や第1記録媒体の取り外し等により更新が停止して、位置情報とデータの格納位置との間等において不整合が生じても、後に第2記録媒体中の情報を用いれば、後に位置情報の更新を再度行って完結させることができるようになる。しかも、異常時において不整合の解消に有用となる進行情報及び更新情報を、ファイルが記録されている第1記録媒体に保持しないので、第1記録媒体の領域が、無駄なくファイルの記録のために用いられ得る。   The file updating apparatus according to the present invention has the above-described configuration, so that when the position information in the first recording medium is updated by a plurality of procedures, the access mechanism to the first recording medium is turned off or the second information is updated. Even if the update is stopped due to the removal of one recording medium and the inconsistency occurs between the position information and the data storage position, the position information is updated later if the information in the second recording medium is used later. You will be able to complete it again. In addition, since the progress information and update information useful for resolving inconsistency at the time of abnormality are not held in the first recording medium on which the file is recorded, the area of the first recording medium can be used for recording the file without waste. Can be used.

また、第1記録媒体がファイル更新装置から外された場合等においても、第1記録媒体中に、不整合の解消に有用となるだけの通常は無意味な情報が残されているのは、ユーザからこの情報が閲覧され得ることを想定すれば、ユーザを混乱させかねない。これに対して、本発明に係るファイル更新装置では、通常は無意味な情報を、着脱可能な第1記録媒体ではなく装置内部の第2記録媒体に記録し外部に出さないため、ファイル更新装置から第1記録媒体を取り外して閲覧するユーザにとっての混乱を防止できる可能性が高まる。   Also, even when the first recording medium is removed from the file update device, etc., normally meaningless information that is useful for resolving inconsistencies remains in the first recording medium. Assuming that this information can be browsed by the user, it can confuse the user. On the other hand, in the file updating apparatus according to the present invention, normally meaningless information is recorded on the second recording medium inside the apparatus instead of the detachable first recording medium and is not output outside. Therefore, the possibility of preventing confusion for the user who removes the first recording medium from the user for browsing is increased.

ここで、前記進行記録手段が記録する進行情報は、更新後のファイル内容を構成するデータについて前記更新情報が記録された後であるか否かを識別可能な情報であり、前記ファイル更新装置は、更に、所定条件が満たされた場合に、更新後のファイル内容を構成するデータについて更新情報が記録された後であるか否かを進行情報に基づき判定し、判定結果が肯定的なときには、当該更新情報に基づいて、当該データについての第1記録媒体中の格納位置を示すように第1記録媒体中の位置情報を更新する再更新手段を備えることとしてもよい。   Here, the progress information recorded by the progress recording means is information that can identify whether or not the update information is recorded for the data constituting the updated file content, and the file update device Further, when the predetermined condition is satisfied, it is determined based on the progress information whether update information is recorded for the data constituting the updated file content, and when the determination result is affirmative, Based on the update information, re-update means for updating the position information in the first recording medium so as to indicate the storage position of the data in the first recording medium may be provided.

所定条件は、例えば、ファイル更新装置が更新途中で、第1記録媒体へのアクセス機構への電源の遮断等により第1記録媒体内のファイルの更新が不可能な状態になった後、改めてその電源から電力が供給されたということ等である。つまり、ファイルの復元つまり不整合状態を解消するための再更新を実行する必要がありかつ実行可能な状況になったときに満たされるような条件である。従って、所定条件は、更新途中で第1記録媒体がファイル更新装置から取り外されることにより更新が途中で停止し、かつ、その後に第1記録媒体が再度ファイル更新装置に装着されたという条件であってもよい。   The predetermined condition is, for example, after the file update device is in the process of being updated and the file in the first recording medium cannot be updated due to the power interruption to the access mechanism to the first recording medium. For example, power is supplied from the power source. In other words, the condition is satisfied when it is necessary to execute file restoration, that is, re-update for eliminating the inconsistent state, and when an executable situation is reached. Therefore, the predetermined condition is a condition that the update is stopped halfway due to the removal of the first recording medium from the file update device in the middle of the update, and then the first recording medium is mounted in the file update device again. May be.

これにより、一旦更新処理が途中で停止していたとしても、所定条件が満たされた後に、第1記録媒体中のファイルについての更新後の状態と整合するように第1記録媒体中の例えばFATやディレクトリエントリ等の位置情報を再更新することが可能になるという効果が発揮される。なお、ファイルの更新途中で第1記録媒体への電源が遮断された場合であっても、第2記録媒体は例えば不揮発性のメモリや、第1記録媒体のアクセス機構への電源とは別個の電源から長期的に電力の供給を受けるように構成された揮発性メモリであることとすれば、更新情報が特に消去されない限り、上述の効果は発揮される。   As a result, even if the updating process is stopped halfway, after the predetermined condition is satisfied, for example, the FAT in the first recording medium is matched with the updated state of the file in the first recording medium. As a result, the positional information such as the directory entry can be re-updated. Even if the power to the first recording medium is interrupted during the file update, the second recording medium is separate from the power to the nonvolatile memory or the access mechanism of the first recording medium, for example. If the volatile memory is configured to be supplied with power from the power source for a long time, the above-described effects are exhibited unless the update information is specifically erased.

また、前記ファイル更新装置は、更に、第1記録媒体中のファイルの更新前に、第1記録媒体から固有の媒体識別情報を読み出して自装置内に保持する媒体識別情報記録手段と、自装置に装着されている記録媒体の媒体識別情報を読み出して、その読み出した媒体識別情報と前記保持している媒体識別情報とを照合して両者が不一致の場合には、前記再更新手段による位置情報の更新を抑止する再更新抑止手段とを備えることとしてもよい。   The file update apparatus further includes a medium identification information recording unit that reads unique medium identification information from the first recording medium and stores the unique medium identification information in the apparatus before updating the file in the first recording medium. When the medium identification information of the recording medium mounted on the disk is read out, the read medium identification information and the held medium identification information are collated, and the two do not match, the position information by the re-update means It is good also as providing the re-update suppression means which suppresses update of these.

これにより、更新されたものと同一の記録媒体が装着されている場合に限って、ファイルの復元を、つまり、ファイル内容を構成するデータの記録状態と整合するように位置情報を再度更新することを、行うことになるため、他の記録媒体の内容の破壊等を防止できるようになる。
また、前記ファイル更新装置は、第1記録媒体中の複数のファイルを更新対象とし、前記第1記録媒体中の位置情報は、第1記録媒体中の全ファイルについてのファイル内容を構成するデータの格納位置を示し、前記進行記録手段は、更新対象とされたファイル毎に進行情報を記録し、前記新データ記録手段は、更新対象とされた複数のファイルそれぞれについて、更新後の当該ファイルの内容を構成するデータの第1記録媒体中への記録を行い、前記更新情報記録手段は、前記新データ記録手段により記録された更新後のファイルそれぞれについて、対応する更新情報の記録を行い、前記位置情報更新手段は、前記更新情報記録手段により更新情報が記録されたところの各ファイルについての更新情報に基づいて、第1記録媒体中の位置情報の更新を行い、前記再更新手段は、前記所定条件が満たされた場合に、複数のファイルそれぞれについて、対応する進行情報に基づいて、更新後の当該ファイルに対応する更新情報が記録された後であると判定できるならば、当該ファイルに係る更新情報に基づいて、第1記録媒体中の位置情報を更新することとしてもよい。
Thereby, only when the same recording medium as the updated one is mounted, the restoration of the file, that is, the position information is updated again so as to be consistent with the recording state of the data constituting the file content. Therefore, it becomes possible to prevent destruction of the contents of other recording media.
Further, the file update device sets a plurality of files in the first recording medium as update targets, and the position information in the first recording medium includes data constituting the file contents of all files in the first recording medium. The storage position is indicated, the progress recording means records progress information for each file to be updated, and the new data recording means has the contents of the updated file for each of the plurality of files to be updated. Is recorded in the first recording medium, and the update information recording means records the corresponding update information for each of the updated files recorded by the new data recording means. The information updating unit is configured to detect the position information in the first recording medium based on the update information about each file where the update information is recorded by the update information recording unit. The re-updating unit is configured to update the update information corresponding to the updated file based on the corresponding progress information for each of the plurality of files when the predetermined condition is satisfied. If it can be determined, the position information in the first recording medium may be updated based on the update information related to the file.

これにより、複数のファイルが並行して更新されている場合においても、ファイル毎に、更新後の状態を示すように、第1記録媒体中の位置情報の不整合を解消することができるようになる。なお、更新情報は、例えば、各ファイルについての、先頭クラスタの情報と、それから連続するクラスタのリンクを示す情報とを意味する。
また、前記ファイル更新装置は、更に、前記新データ記録手段によりデータの記録がなされたファイルについてのクローズ指示を取得するクローズ指示取得手段を備え、前記進行記録手段が記録する進行情報は、ファイルについてクローズ指示が取得された後であるか否かも識別可能な情報であり、前記位置情報更新手段は、更新後のファイル内容を構成するデータについて前記更新情報が記録された後であってかつ前記クローズ指示取得手段により当該ファイルについてのクローズ指示が取得された後に限り、当該ファイルに係る更新情報に基づいて、第1記録媒体中の位置情報の更新を行い、前記再更新手段は、前記所定条件が満たされた場合に、複数のファイルそれぞれについて、対応する進行情報に基づいて、更新後の当該ファイルに対応する更新情報が記録された後であってかつクローズ指示が取得された後であると判定できるときに限って、当該ファイルに係る更新情報に基づいて、第1記録媒体中の位置情報を更新することとしてもよい。
Thereby, even when a plurality of files are updated in parallel, the inconsistency of the position information in the first recording medium can be resolved so that the updated state is indicated for each file. Become. Note that the update information means, for example, information on the leading cluster and information indicating the links of the subsequent clusters for each file.
The file update apparatus further includes a close instruction acquisition unit that acquires a close instruction for a file for which data has been recorded by the new data recording unit, and the progress information recorded by the progress recording unit is for a file. Whether or not it is after the close instruction is acquired is also identifiable information, and the position information update means is after the update information is recorded on the data constituting the updated file contents and the close Only after the close instruction for the file is acquired by the instruction acquisition means, the position information in the first recording medium is updated based on the update information related to the file, and the re-update means When satisfied, for each of multiple files, the updated file based on the corresponding progress information The position information in the first recording medium is updated based on the update information relating to the file only when it can be determined that the corresponding update information has been recorded and the close instruction has been acquired. It is good to do.

これにより、クローズ指示が取得された時点以後についてのみ、更新後のファイル内容を構成するデータの位置を示すように、第1記録媒体中の位置情報の更新及び再更新を行うため、クローズ前のファイルについては第1記録媒体中では位置情報が更新されないことになる。例えばファイルの更新が複数回にわたってなされる場合においてその更新が完結していないとき、つまりクローズ前であるときは、第1記録媒体中の位置情報は、更新前のファイル内容を構成するデータの位置を示すので、クローズによって位置情報の更新がコントロールされるようになる。従って、複数のファイルが相互に関連する1つのグループを形成している場合に、全てのファイルの更新が完了した時点でそれぞれをクローズすることで、グループを構成する全てのファイルについてタイミングを合わせて、第1記録媒体中の位置情報の更新を行わせることができるようになる。   Thus, only after the time when the close instruction is acquired, the position information in the first recording medium is updated and re-updated so as to indicate the position of the data constituting the updated file content. For the file, the position information is not updated in the first recording medium. For example, when the file is updated several times, when the update is not completed, that is, before the closing, the position information in the first recording medium is the position of the data constituting the file content before the update. Therefore, updating of the position information is controlled by closing. Therefore, when a plurality of files form a group related to each other, the timing of all the files constituting the group is adjusted by closing each of them when the update of all the files is completed. The position information in the first recording medium can be updated.

また、前記第1記録媒体には、第1記録媒体中のクラスタ毎に当該クラスタにいずれかのファイル内容を構成するデータが格納されているか否かを示し、かつ、同一ファイルの内容を構成するデータが格納されるクラスタ間に繋がりがあることを示すFAT情報と、第1記録媒体中のファイル毎についての、当該ファイル内容を構成するデータの先頭が格納されるクラスタを示すディレクトリ情報とが記録されており、前記第1記録媒体中の位置情報は、前記FAT情報のうち、いずれのファイル内容を構成するデータも格納されていないクラスタを示す部分である未使用クラスタ情報を除くものと、前記ディレクトリ情報とから構成されており、前記更新情報記録手段が記録するファイルそれぞれについての前記更新情報は、前記新データ記録手段により記録された更新後の当該ファイルの内容を構成するデータが格納された第1記録媒体中のクラスタ間に繋がりがあることを示す連続関係情報と、更新後の当該ファイルの内容を構成するデータの先頭が格納されるクラスタを示すエントリ情報とから構成され、前記位置情報更新手段は、前記更新情報記録手段により更新情報が記録されたところの各ファイルについて、当該ファイルの内容を構成するデータに係る連続関係情報に基づいて、前記新データ記録手段により記録された更新後の当該ファイル内容を構成するデータが格納されたクラスタ間に繋がりがあることを示すようにFAT情報を更新し、かつ、当該ファイルに係るエントリ情報に基づいて、更新後の当該ファイル内容を構成するデータの先頭が格納されるクラスタを示すように当該ファイルについてのディレクトリ情報を更新し、前記再更新手段は、更新情報中の連続関係情報に基づいてFAT情報を更新し、かつ、更新情報中のエントリ情報に基づいてディレクトリ情報を更新することにより、位置情報を更新することとしてもよい。   Further, the first recording medium indicates whether or not data constituting any file content is stored in the cluster for each cluster in the first recording medium, and constitutes the content of the same file. FAT information indicating that there is a connection between clusters in which data is stored, and directory information indicating a cluster in which the head of data constituting the file content is stored for each file in the first recording medium. And the positional information in the first recording medium excludes unused cluster information which is a part indicating a cluster in which no data constituting any file content is stored in the FAT information, The update information for each file recorded by the update information recording means is the new data. Continuation relation information indicating that there is a connection between clusters in the first recording medium in which data constituting the content of the updated file recorded by the recording means is stored, and configuring the content of the updated file And the location information update means configures the contents of the file for each file where the update information is recorded by the update information recording means. Based on the continuous relationship information related to the data, update the FAT information so as to indicate that there is a connection between the clusters in which the data constituting the updated file content recorded by the new data recording means is stored, In addition, based on the entry information related to the file, a class in which the head of the data constituting the updated file content is stored is stored. The renewal means updates the FAT information based on the continuous relationship information in the update information, and updates the directory information based on the entry information in the update information. The position information may be updated by updating.

これにより、FAT情報と各ディレクトリ情報とによって各ファイルの位置を表すファイルシステムに従って記録された第1記録媒体中におけるファイルの更新の際の異常停止に対する復元を、第1記録媒体中に復元に必要な情報を特段記録することなく実行することが可能になる。なお、連続関係情報は、実施形態中で示すメインFATの一部又はサブFATの一部に相当する。   Thereby, it is necessary to restore in the first recording medium the abnormal stop at the time of updating the file in the first recording medium recorded according to the file system representing the position of each file by the FAT information and each directory information. This makes it possible to execute such information without special recording. Note that the continuous relationship information corresponds to a part of the main FAT or a part of the sub FAT shown in the embodiment.

また、前記ファイル更新装置は、更に、前記更新情報記録手段による更新後のファイル内容を構成するデータについての更新情報の記録後に、当該ファイルの更新前の内容を構成するデータが格納されていた第1記録媒体中のクラスタには、いずれかのファイル内容を構成するデータが格納されていないことを示す未使用情報を第2記録媒体に記録する未使用領域解放手段を備え、前記位置情報更新手段は、FAT情報の更新を、前記未使用領域解放手段により記録された未使用情報を未使用クラスタ情報に反映するように行い、前記再更新手段は、FAT情報の更新を、前記未使用情報を未使用クラスタ情報に反映するように行うこととしてもよい。   Further, the file update device further stores data constituting the content before update of the file after recording update information on the data constituting the file content after update by the update information recording means. The cluster in one recording medium includes unused area releasing means for recording unused information indicating that data constituting any file content is not stored in the second recording medium, and the position information updating means Updates the FAT information so that the unused information recorded by the unused area releasing means is reflected in the unused cluster information, and the re-update means updates the FAT information to update the unused information. It may be performed so as to be reflected in unused cluster information.

これにより、ファイルの更新に対応して、更新後のファイル内容を構成するデータの記録位置を示すようにFAT情報を更新し、更に更新前のファイル内容を構成するデータが記録されていたクラスタは未使用なクラスタであることを示すようにFAT情報を更新するような更新処理が、途中で異常停止した場合であっても、後に、その未使用のクラスタがあればそれを適切に未使用と示すようにFAT情報を更新することができるようになる。   Thereby, in response to the update of the file, the FAT information is updated so as to indicate the recording position of the data constituting the updated file content, and the cluster in which the data constituting the file content before the update is recorded is Even if an update process that updates the FAT information so as to indicate that it is an unused cluster is abnormally stopped in the middle, if there is an unused cluster later, it is appropriately treated as unused. As shown, the FAT information can be updated.

また、前記ファイル更新装置は、更に、全てのファイルの更新前に第1記録媒体中のFAT情報を第2記録媒体中の領域である作業FAT領域に作業FAT情報として複写するFAT複写手段と、前記新データ記録手段によりデータの記録がなされたファイルについてのクローズ指示を取得するクローズ指示取得手段とを備え、前記進行記録手段が記録する進行情報は、ファイルについてクローズ指示が取得された後であるか否かも識別可能な情報であり、前記新データ記録手段は、未使用情報又は全ての連続関係情報と、作業FAT情報とに基づいて、更新後のファイルを構成するデータを、既に更新後の他のファイル内容を構成するデータが記録されているクラスタ以外のクラスタに記録し、前記更新情報記録手段は更に、取得されたクローズ指示に係るファイルについての連続関係情報を作業FAT情報に反映させ、当該ファイルの更新前の内容を構成するデータが格納されていた第1記録媒体中のクラスタにはいずれかのファイル内容を構成するデータが格納されていないことを示す未使用情報をも作業FAT情報に反映させ、前記位置情報更新手段は、前記作業FAT情報に基づいてFAT情報を更新し、前記再更新手段は、前記所定条件が満たされた場合に、(a)複数のファイルそれぞれについて、対応する進行情報に基づいて、当該ファイルについてのクローズ指示が取得された後であると判定できるときには、当該ファイルに係る連続関係情報及び未使用情報を作業FAT情報に反映させ、(b)作業FAT情報に基づいてFAT情報を更新し、(c)対応する進行情報が、当該ファイルについてのクローズ指示が取得されたことを示すところの全てのファイルについてのエントリ情報に基づいてディレクトリ情報を更新することとしてもよい。   The file updating apparatus further includes FAT copying means for copying FAT information in the first recording medium as work FAT information to a work FAT area, which is an area in the second recording medium, before updating all files; A closing instruction acquisition unit that acquires a closing instruction for a file whose data has been recorded by the new data recording unit, and the progress information recorded by the progress recording unit is after the closing instruction is acquired for the file Whether or not the new data recording means can update the data constituting the updated file based on the unused information or all the continuous relationship information and the work FAT information. Recording is performed in a cluster other than the cluster in which data constituting other file contents is recorded, and the update information recording means further includes the acquired cluster. The continuous relation information about the file related to the file instruction is reflected in the work FAT information, and any file content is stored in the cluster in the first recording medium in which the data constituting the content before the update of the file is stored. The unused information indicating that the data to be configured is not stored is also reflected in the work FAT information, the position information update means updates the FAT information based on the work FAT information, and the re-update means When the predetermined condition is satisfied, (a) for each of a plurality of files, when it can be determined that the close instruction for the file is obtained based on the corresponding progress information, the continuity relationship for the file Information and unused information are reflected in the work FAT information, (b) the FAT information is updated based on the work FAT information, and (c) the corresponding progress information is It is also possible to update the directory information based on the entry information of all the files that exhibit the close instruction for the file has been acquired.

これにより、クローズ前であっても更新されたファイルについてはそのファイル内容を構成するデータが記録された第1記録媒体中のクラスタは空いていないものと管理し、空いているクラスタにのみ新たな更新後のファイル内容を構成するデータの記録を行い、かつ、クローズ後にのみ更新後のファイル内容を構成するデータの位置を、第1記録媒体中のFAT情報及びディレクトリ情報に反映させることが実現される。   As a result, for a file that has been updated even before being closed, it is managed that the cluster in the first recording medium in which the data constituting the file content is recorded is not free, and only a new cluster is available for the free cluster. It is possible to record the data constituting the updated file contents and reflect the position of the data constituting the updated file contents in the FAT information and the directory information in the first recording medium only after closing. The

また、前記ファイル更新装置は、更に、再更新に際して、更新後のファイル内容を構成するデータが第1記録媒体に記録されている場合においては当該データの格納位置を示すように位置情報を更新すべきである旨を示す指示を取得する更新反映指示取得手段を備え、前記再更新手段は、前記所定条件が満たされた場合でありかつ前記更新反映指示取得手段により指示が取得されている場合においては、作業FAT情報に基づくFAT情報の前記更新の前に、更に複数のファイルそれぞれについて、対応する進行情報に基づいて、更新後の当該ファイル内容を構成するデータに対応する更新情報が記録された後であると判定できるときにも、当該ファイルに係る連続関係情報及び未使用情報を作業FAT情報に反映させることとしてもよい。   The file updating apparatus further updates the position information to indicate the storage position of the data when the data constituting the updated file content is recorded on the first recording medium at the time of re-updating. An update reflection instruction acquisition means for acquiring an instruction indicating that the update should be performed, and the re-update means is when the predetermined condition is satisfied and the instruction is acquired by the update reflection instruction acquisition means Before the update of the FAT information based on the work FAT information, for each of a plurality of files, update information corresponding to the data constituting the updated file contents is recorded based on the corresponding progress information. Even when it can be determined later, the continuous relationship information and unused information related to the file may be reflected in the work FAT information.

これにより、ファイル更新装置への指示次第で、クローズ前であっても更新後のファイル内容を構成するデータが第1記録媒体に記録されていれば第1記録媒体中のFAT情報を更新するようにさせることが可能になる。
また、前記第1記録媒体は、相互に独立し、所定のアクセス制限が設けられた認証領域と、当該アクセス制限が設けられていない通常領域とから構成され、第1記録媒体中の位置情報は、認証領域内の各ファイル内容を構成するデータの当該認証領域内での格納位置を示す第1位置情報と、通常領域内の各ファイル内容を構成するデータの当該通常領域内での格納位置を示す第2位置情報とから構成され、前記進行記録手段が記録する進行情報は、認証領域内のファイルの更新がどの更新手順まで実施済みであるかを示す第1進行情報と、通常領域内のファイルの更新がどの更新手順まで実施済みであるかを示す第2進行情報とから構成され、前記新データ記録手段は、認証領域内のファイルについては更新前のファイル内容を構成するデータとは別に、更新後の当該ファイル内容を構成するデータを認証領域内に記録し、通常領域内のファイルについては更新前のファイル内容を構成するデータとは別に、更新後の当該ファイル内容を構成するデータを通常領域内に記録し、前記更新情報記録手段が記録する更新情報は、前記新データ記録手段により認証領域内に記録された更新後のファイル内容を構成するデータについての当該認証領域内での格納位置を示す第1更新情報と、前記新データ記録手段により通常領域内に記録された更新後のファイル内容を構成するデータについての当該通常領域内での格納位置を示す第2更新情報とから構成され、前記位置情報更新手段は、更新後のファイル内容を構成するデータについて前記更新情報記録手段により第1更新情報が記録された後に、当該第1更新情報を参照して、当該データについての認証領域内での格納位置を示すように、当該ファイルの更新前の内容を構成するデータの格納位置を示している第1位置情報を更新し、更新後のファイル内容を構成するデータについて前記更新情報記録手段により第2更新情報が記録された後に、当該第2更新情報を参照して、当該データについての通常領域内での格納位置を示すように、当該ファイルの更新前の内容を構成するデータの格納位置を示している第2位置情報を更新することとしてもよい。
Thus, depending on the instruction to the file updating apparatus, the FAT information in the first recording medium is updated if the data constituting the updated file content is recorded on the first recording medium even before the closing. It becomes possible to make it.
The first recording medium is composed of an authentication area that is independent of each other and provided with a predetermined access restriction, and a normal area that is not provided with the access restriction, and position information in the first recording medium is First location information indicating the storage position of the data constituting each file content in the authentication area in the authentication area, and the storage position of the data constituting the file content in the normal area in the normal area The progress information recorded by the progress recording means includes first progress information indicating which update procedure the file in the authentication area has been updated to, and in the normal area. Second update information indicating to which update procedure the update of the file has been performed, and the new data recording means, for the file in the authentication area, the data constituting the file content before the update. Separately, the data constituting the updated file contents is recorded in the authentication area, and the files in the normal area are configured separately from the data constituting the file contents before the update. The update information recorded by the update information recording means is recorded in the normal area, and the update information recorded by the new data recording means is stored in the authentication area for the data constituting the updated file content recorded in the authentication area. First update information indicating the storage position in the normal area, and second update information indicating the storage position in the normal area for the data constituting the updated file contents recorded in the normal area by the new data recording means The position information update means records the first update information by the update information recording means for the data constituting the updated file contents. Later, referring to the first update information, the first position information indicating the storage position of the data constituting the content before the update of the file so as to indicate the storage position of the data in the authentication area And after the second update information is recorded by the update information recording means on the data constituting the updated file content, the second update information is referred to and the data is stored in the normal area. As indicated by the position, the second position information indicating the storage position of the data constituting the content before the update of the file may be updated.

これにより、認証領域と通常領域とを併せ持つ記録媒体について、領域別にファイルの復元を行うことができるようになる。
また、前記第1記録媒体は、フラッシュメモリであり、前記第2記録媒体は、第1記録媒体より高速アクセス可能なメモリであることとしてもよい。
これにより、フラッシュメモリ内に記録したファイルを更新する場合に、もしフラッシュメモリ内に復元に必要な更新情報を随時記録することとすれば、フラッシュメモリはその性質により部分的なデータの記録のためのアクセス速度が遅いため、ファイルの更新処理が遅延してしまうところを、更新情報をフラッシュメモリより高速アクセス可能なメモリに記録するため、ファイルの更新処理の遅延をある程度は防ぐことができるようになる。
As a result, for a recording medium having both an authentication area and a normal area, a file can be restored for each area.
The first recording medium may be a flash memory, and the second recording medium may be a memory that can be accessed at a higher speed than the first recording medium.
As a result, when a file recorded in the flash memory is updated, if the update information necessary for restoration is recorded in the flash memory at any time, the flash memory records partial data due to its nature. Since the access speed is slow, the update process of the file is recorded in the memory that can be accessed at a higher speed than the flash memory, so that the delay of the file update process can be prevented to some extent. Become.

また、前記第2記録媒体は、RAMであり、第1記録媒体の電源とは独立した電源から電力が供給されることとしてもよい。
これにより、第1記録媒体内のファイルの更新途中で第1記録媒体への電源が遮断されて更新が停止してしまう事態が生じても、その場合にともにRAMへの電源が遮断されることはない。RAMとして、電源が供給されている限り記録内容を保持するタイプの一般に比較的高速なRAMを利用することができる。なお、通常は第1記録媒体への電源が遮断されてもRAM中の更新情報が消滅することはないため、第1記録媒体への電源が復活した後にその更新情報を用いて復元を行うことが可能になる。
The second recording medium may be a RAM, and power may be supplied from a power source independent of the power source of the first recording medium.
As a result, even when the power to the first recording medium is cut off during the update of the file in the first recording medium and the updating stops, the power to the RAM is cut off at that time. There is no. As the RAM, as long as power is supplied, a relatively high-speed RAM of the type that retains recorded contents can be used. Normally, the update information in the RAM does not disappear even if the power to the first recording medium is cut off. Therefore, the restoration is performed using the update information after the power to the first recording medium is restored. Is possible.

また、本発明に係るファイル更新方法は、ファイル内容を構成するデータの第1記録媒体中の格納位置を示す位置情報を記録してある第1記録媒体におけるファイルを複数の更新手順を経て更新するファイル更新方法であって、どの更新手順まで実施済みであるかを示す進行情報を第2記録媒体中に記録する進行記録ステップと、更新前のファイル内容を構成するデータとは別に、更新後のファイル内容を構成するデータを第1記録媒体中に記録する新データ記録ステップと、前記新データ記録ステップにより記録された更新後のファイル内容を構成するデータについての第1記録媒体中の格納位置を示す更新情報を第2記録媒体中に記録する更新情報記録ステップと、更新後のファイル内容を構成するデータについて前記更新情報記録ステップにより更新情報が記録された後に、当該更新情報に基づいて、当該データについての第1記録媒体中の格納位置を示すように、当該ファイルの更新前の内容を構成するデータの格納位置を示している第1記録媒体中の位置情報を更新する位置情報更新ステップとを含むことを特徴とする。   The file update method according to the present invention updates a file on the first recording medium in which position information indicating a storage position in the first recording medium of data constituting the file contents is recorded through a plurality of update procedures. In the file update method, the progress recording step for recording the progress information indicating which update procedure has been performed in the second recording medium and the data constituting the file content before the update A new data recording step for recording data constituting the file content in the first recording medium, and a storage position in the first recording medium for the data constituting the updated file content recorded by the new data recording step. Update information recording step for recording the update information shown in the second recording medium, and the update information recording step for the data constituting the file content after the update. After the update information is recorded by the group, the storage location of the data constituting the content before the update of the file is indicated based on the update information so that the storage location of the data in the first recording medium is indicated. And a position information update step of updating the position information in the first recording medium.

これにより、第1記録媒体中の位置情報が複数手順で更新される場合において更新途中で第1記録媒体へのアクセス機構の電源断や第1記録媒体の取り外し等により更新が停止して、位置情報とデータの格納位置との間等において不整合が生じても、後に第2記録媒体中の情報を用いれば、後に位置情報の更新を再度行って完結させることができるようになる。しかも、異常時において不整合の解消に有用となる進行情報及び更新情報を、ファイルが記録されている第1記録媒体に保持しないので、第1記録媒体の領域が、無駄なくファイルの記録のために用いられ得る。   As a result, when the position information in the first recording medium is updated in a plurality of procedures, the updating stops due to the power supply of the access mechanism to the first recording medium being disconnected or the first recording medium being removed during the updating. Even if inconsistency occurs between the information and the data storage position, if the information in the second recording medium is used later, the position information can be updated again later to be completed. In addition, since the progress information and update information useful for resolving inconsistency at the time of abnormality are not held in the first recording medium on which the file is recorded, the area of the first recording medium can be used for recording the file without waste. Can be used.

以下、本発明のファイル更新装置の実施形態に係る情報処理装置について、図面を用いて説明する。
<実施形態1>
<構成及び利用データ>
図5は、本発明の実施形態1に係る情報処理装置の構成図である。
Hereinafter, an information processing apparatus according to an embodiment of a file updating apparatus of the present invention will be described with reference to the drawings.
<Embodiment 1>
<Configuration and usage data>
FIG. 5 is a configuration diagram of the information processing apparatus according to the first embodiment of the present invention.

情報処理装置300は、例えばPCや、携帯情報端末(PDA)等であり、例えばメモリカード等である情報記録媒体360を装着するためのメモリカードスロット等を備えており、装着された情報記録媒体360中のファイルを編集して更新する機能を有する。
この情報処理装置300は、図5に示すように、CPU310、主電源320、不揮発性メモリ330、RAM340、補助電源350を備え、また特に図示はしていないが、キーやボタン等を介してユーザ操作を受け付ける入力インタフェースや、ユーザに情報を提示するためのディスプレイ等をも備えている。
The information processing apparatus 300 is, for example, a PC or a personal digital assistant (PDA), and includes a memory card slot for mounting an information recording medium 360 such as a memory card. 360 has a function of editing and updating a file in 360.
As shown in FIG. 5, the information processing apparatus 300 includes a CPU 310, a main power source 320, a non-volatile memory 330, a RAM 340, and an auxiliary power source 350. An input interface for accepting operations and a display for presenting information to the user are also provided.

ここで、主電源320は、充電式の電池であり、情報処理装置300内の各部及び情報記録媒体360に電力を供給するものである。なお、この主電源320は、あまり長期間電力を供給し続けることができず、例えば数時間や数日等の情報処理装置の連続使用により電池残量が0になることが想定されている。
不揮発性メモリ330は、CPU310上で動作するプログラムを格納しているメモリであり、特に、ファイルの更新及び復元に関する処理を実現するためのファイル処理プログラム331を格納しており、図示しないアプリケーションプログラムやシステムプログラム等も格納している。ここで、復元とは、ファイルの更新過程においての電源断等により更新が完全に終了しなかった場合において生じる不正な状態を解消するために、ファイルに関連する情報を再更新することをいう。
Here, the main power source 320 is a rechargeable battery, and supplies power to each unit in the information processing apparatus 300 and the information recording medium 360. The main power source 320 cannot continue to supply power for a long period of time. For example, it is assumed that the remaining battery level becomes zero due to continuous use of the information processing apparatus for several hours or days.
The non-volatile memory 330 is a memory that stores a program that operates on the CPU 310, and particularly stores a file processing program 331 for realizing processing related to file update and restoration. System programs are also stored. Here, the term “restore” refers to re-updating information related to a file in order to eliminate an illegal state that occurs when the update is not completely completed due to a power interruption or the like in the file update process.

RAM340は、補助電源350から常時電力の供給を受けてデータを常時保持するメモリであり、たとえ主電源320から情報処理装置300の各部への電力供給が停止したとしてもこのRAM340内のデータは保持され続ける。なお、補助電源350は、ある程度長期にわたって電力の供給を継続するような一次電池である。
このRAM340内には、情報記録媒体360中のデータの物理的な格納位置を示すメインFAT341と、ファイルの更新により新たに記録されたデータの物理的な格納位置を示すサブFAT342と、更新対象のファイル毎に対応したオープンファイル情報343とが格納される。メインFAT341及びサブFAT342は、情報記録媒体360におけるクラスタ単位でのデータの格納位置を示すことになる。
The RAM 340 is a memory that constantly receives power from the auxiliary power supply 350 and constantly holds data. Even if the power supply from the main power supply 320 to each part of the information processing apparatus 300 is stopped, the data in the RAM 340 is retained. Continue to be. The auxiliary power supply 350 is a primary battery that continues to supply power for a long period of time.
In the RAM 340, a main FAT 341 indicating a physical storage position of data in the information recording medium 360, a sub FAT 342 indicating a physical storage position of data newly recorded by updating a file, and an update target Open file information 343 corresponding to each file is stored. The main FAT 341 and the sub FAT 342 indicate data storage positions in cluster units in the information recording medium 360.

また、オープンファイル情報343は、エントリ情報344、処理ステータス345及び復元情報346を含む。
ここで、エントリ情報344は、更新対象とされたファイルの名前、ファイル内容を構成するデータが格納された先頭のクラスタの番号(以下、「開始クラスタ番号」ともいう。)、ファイル内容を構成するデータのサイズ(以下、「ファイルサイズ」ともいう。)等の情報を含む。
The open file information 343 includes entry information 344, processing status 345, and restoration information 346.
Here, the entry information 344 constitutes the name of the file to be updated, the number of the first cluster in which the data constituting the file content is stored (hereinafter also referred to as “start cluster number”), and the file content. It includes information such as data size (hereinafter also referred to as “file size”).

処理ステータス345は、更新の進行度合いを示す情報、即ちファイルの更新が複数の手順によりなされるところ、どの手順まで実行されたかを示す情報である。この処理ステータスは、ファイルの更新の過程で逐次変更され、ファイルの更新が途中で停止してファイルを管理する情報に不整合が生じた際にその不整合を解消するためになされる復元処理において参照されることになる。   The processing status 345 is information indicating the degree of progress of the update, that is, information indicating how far the file has been updated by a plurality of procedures. This processing status is changed in the course of the file update, and when the file update stops halfway and the information managing the file becomes inconsistent, the restoration process is performed to resolve the inconsistency. Will be referenced.

また、復元情報346は、ファイルが記録されている情報記録媒体においてファイルの位置を示している情報を、ファイルの更新前の状態に戻すために必要となる情報、つまり更新前のファイルを構成するデータが格納されていた先頭のクラスタの番号等である。
また、情報処理装置300に装着される情報記録媒体360は、その中に記録されているデータがFATファイルシステムにより管理されており、記録領域を複数のパーティションに分割して管理するための情報を格納するマスターブートレコード・パーティションテーブル361と、1つのパーティション内の管理情報を格納するパーティションブートセクタ362と、セクタの所定数の集合であるクラスタのそれぞれについてファイル構成データを格納しているか否かに加えてクラスタ間のリンク関係を示すFAT363及びFAT364と、ルートディレクトリ直下に存在するファイル又はディレクトリの情報を格納するルートディレクトリエントリ365と、ファイルを構成するデータを格納するためのデータ領域366とを有している。なお、FAT363及びFAT364は、二重化されたテーブルであり、基本的に同内容となることが予定されている。また、クラスタ間のリンク関係とは、同じファイルを構成するデータを格納しているクラスタ間の繋がりのことである。
The restoration information 346 constitutes information necessary for returning information indicating the position of the file in the information recording medium on which the file is recorded to the state before the file is updated, that is, the file before the update. This is the number of the first cluster in which data is stored.
In addition, the information recording medium 360 mounted on the information processing apparatus 300 has data recorded therein managed by the FAT file system, and information for dividing the recording area into a plurality of partitions for management. Whether file configuration data is stored for each of the master boot record / partition table 361 to be stored, the partition boot sector 362 for storing management information in one partition, and a cluster which is a set of a predetermined number of sectors. In addition, there are FAT 363 and FAT 364 indicating the link relationship between clusters, a root directory entry 365 for storing information of files or directories existing immediately under the root directory, and a data area 366 for storing data constituting the file. do it That. Note that the FAT 363 and the FAT 364 are duplicated tables and are basically scheduled to have the same contents. Further, the link relationship between clusters is a connection between clusters storing data constituting the same file.

各ファイルを構成するデータの情報記録媒体360における記録位置は、ルートディレクトリエントリ365に格納されるディレクトリエントリ又はデータ領域366に格納されるディレクトリエントリと、FAT363又はFAT364によって特定される。
<動作>
以下、上述した情報処理装置300の動作について説明する。
The recording position of the data constituting each file in the information recording medium 360 is specified by the directory entry stored in the root directory entry 365 or the directory entry stored in the data area 366 and the FAT 363 or FAT 364.
<Operation>
Hereinafter, the operation of the information processing apparatus 300 described above will be described.

情報処理装置300は、CPU310によるファイル処理プログラム331の実行により、ユーザによる電源ボタンの押下等に対応して主電源320が電力の供給を開始した時点つまり装置が起動された時点から、前回の起動時においてファイルの更新が完了しないで電源断等により異常終了していた場合には後述の復元処理を実行し、その後に情報記録媒体360が装着されている状態になったときに、更新準備処理を行い、その後に、各ファイルについて、後述する更新処理を行う。   The information processing apparatus 300 starts from the time when the main power supply 320 starts supplying power in response to the user pressing the power button or the like by the execution of the file processing program 331 by the CPU 310, that is, from the time when the apparatus is started. At this time, if the file update is not completed and the process is abnormally terminated due to a power failure or the like, a restoration process described later is executed, and then the update preparation process is performed when the information recording medium 360 is loaded. After that, update processing described later is performed for each file.

なお、更新準備処理は、情報記録媒体360中のFAT363をRAM340中のメインFAT341にコピーして、サブFAT342を0クリアし、オープンファイル情報の内容を全て無効化する処理である。
図6は、情報記録媒体360の内容例、及び、更新準備処理がなされた後におけるRAM340の内容例を示す図である。
The update preparation process is a process for copying the FAT 363 in the information recording medium 360 to the main FAT 341 in the RAM 340, clearing the sub FAT 342 to 0, and invalidating all the contents of the open file information.
FIG. 6 is a diagram illustrating a content example of the information recording medium 360 and a content example of the RAM 340 after the update preparation process is performed.

同図に示すように、情報記録媒体360内のあるディレクトリエントリは、FILE1.TXTというファイル名の42KBのファイルについて示しており、そのファイルを構成するデータが3番のクラスタから格納されていることをも示している。同図中のデータ領域において斜線パターンで塗りつぶしてある部分は、そのファイルを構成するデータが格納されているクラスタを示す。   As shown in the figure, a directory entry in the information recording medium 360 is FILE1. It shows a 42 KB file having a file name of TXT, and also shows that data constituting the file is stored from the third cluster. In the data area in the figure, a portion filled with a diagonal line pattern indicates a cluster in which data constituting the file is stored.

同図中のFATは、基本的に同内容であるFAT1とFAT2とを代表して示したものであり、この例では3番目、4番目、5番目のクラスタがリンクしていることを示しており、ディレクトリエントリと合わせて参照すると、FILE1.TXTというファイル名のファイルを構成するデータは3番目、4番目、5番目のクラスタにこの順に記録されていることが判明する。なお、5番目のクラスタに対応するFATエントリには、このクラスタでファイルを構成するデータが終了することを意味する、つまりクラスタのリンクの終端を意味する0xFFFが、格納されている。また、6番目、7番目等のクラスタに対応するFATエントリには0が格納されており、これらのクラスタにはファイルを構成するデータが格納されていないことを意味している。   The FAT in the figure is representative of FAT1 and FAT2 which are basically the same contents, and in this example, the third, fourth and fifth clusters are linked. FILE1.. And FILE1. It turns out that the data constituting the file having the file name TXT is recorded in this order in the third, fourth and fifth clusters. The FAT entry corresponding to the fifth cluster stores 0xFFF, which means that the data constituting the file in this cluster ends, that is, the end of the cluster link. In addition, 0 is stored in the FAT entries corresponding to the sixth and seventh clusters, which means that data constituting the file is not stored in these clusters.

また、更新準備処理の結果として、RAM340内に、情報記録媒体360のFATをコピーしたものであるメインFATと、全て0値を設定したサブFATと、無効化されたオープンファイル情報とが格納される。なお、無効化されたオープンファイル情報が格納されているということは、有効なオープンファイル情報が格納されていないことを意味する。   In addition, as a result of the update preparation process, a main FAT that is a copy of the FAT of the information recording medium 360, a sub FAT set to all 0 values, and invalidated open file information are stored in the RAM 340. The Note that invalid open file information is stored means that valid open file information is not stored.

以下、情報処理装置300においてファイル処理プログラム331の一部により実現される更新処理について説明する。
図7は、情報処理装置300による更新処理の概要を示すフローチャートである。
この更新処理は、更新対象とされた各ファイルについて独立的に実行されるものであり、複数のファイルについて並行して実行され得ることが想定されている。ファイル処理プログラム331は、アプリケーションプログラムやシステムプログラムの実行に際してファイルの更新が要求された場合にこの更新処理を実行する。
Hereinafter, update processing realized by a part of the file processing program 331 in the information processing apparatus 300 will be described.
FIG. 7 is a flowchart illustrating an overview of update processing by the information processing apparatus 300.
This update process is executed independently for each file to be updated, and it is assumed that a plurality of files can be executed in parallel. The file processing program 331 executes the update process when a file update is requested when executing the application program or the system program.

まず、情報処理装置300は、情報記録媒体360中のファイルについて完全に更新が完了しない場合において更新前の状態に戻すことができるようにするために、元のデータをコピーすることを主な内容とするオープン処理を実行し(ステップS11)、ファイルの更新に応じてクローズ指示を取得する迄は更新後のデータを情報記録媒体360に記録する更新後データ記録処理を実行し(ステップS12、S13)、更新の完了を意味するクローズ指示を取得した場合にはクローズ処理を実行し(ステップS14)、更新後のファイルを構成するデータの所在位置を管理する情報を情報記録媒体360に記録するための管理情報記録処理を実行する(ステップS15)。なお、クローズ指示は、ユーザ操作に応じて又は所定の条件判断に基づきアプリケーションプログラム又はシステムプログラムからなされるものである。   First, the information processing apparatus 300 copies the original data so that the file in the information recording medium 360 can be returned to the state before the update when the update is not completely completed. (Step S11), and the updated data recording process for recording the updated data in the information recording medium 360 is executed until the close instruction is acquired in accordance with the update of the file (steps S12, S13). ) When a close instruction indicating completion of update is acquired, a close process is executed (step S14), and information for managing the location of data constituting the updated file is recorded in the information recording medium 360. The management information recording process is executed (step S15). The close instruction is issued from an application program or a system program in response to a user operation or based on a predetermined condition determination.

以下、ステップS11、S12、S14及びS15の各処理内容について、その処理により変化するデータの例を用いながら詳細に説明する。
図8は、情報処理装置300によるオープン処理を示すフローチャートである。
まず、ファイル処理プログラム331をCPU310により実行する情報処理装置300は、アプリケーションプログラム又はシステムプログラムによって更新対象とされたファイルについてのディレクトリエントリを情報記録媒体360から取得し、RAM340内のオープンファイル情報中のエントリ情報に書き込む(ステップS501)。なお、オープンファイル情報中の処理ステータスは”0”にする。
Hereafter, each processing content of step S11, S12, S14, and S15 is demonstrated in detail, using the example of the data which changes with the processing.
FIG. 8 is a flowchart showing the open process by the information processing apparatus 300.
First, the information processing apparatus 300 that executes the file processing program 331 by the CPU 310 acquires the directory entry for the file that is the update target by the application program or the system program from the information recording medium 360, and stores the directory entry in the open file information in the RAM 340. The entry information is written (step S501). Note that the processing status in the open file information is set to “0”.

続いて、情報処理装置300は、ステップS501において取得したディレクトエントリ中のファイルサイズを参照して、RAM340内のメインFAT341及びサブFAT342からデータ領域366中にそのファイルサイズの空き領域が存在するか検索する(ステップS502)。空き領域が存在しない場合、エラー発生の旨をディスプレイに表示し更新処理を終了する。ステップS502の検索においては、メインFAT341とサブFAT342との両方においてFATエントリの内容が0であるクラスタを空きであると判断する。   Subsequently, the information processing apparatus 300 refers to the file size in the directory entry acquired in step S501 and searches the main FAT 341 and the sub FAT 342 in the RAM 340 for a free area of the file size in the data area 366. (Step S502). If there is no free space, an error message is displayed on the display and the update process is terminated. In the search in step S502, it is determined that a cluster whose FAT entry content is 0 in both the main FAT 341 and the sub FAT 342 is empty.

ステップS502に続いて、情報処理装置300は、ステップS501において取得したディレクトリエントリ中の開始クラスタ番号を参照し、オープンファイル情報中の復元情報として記録し(ステップS503)、検索された空き領域の先頭クラスタの番号を、オープンファイル情報中のエントリ情報の開始クラスタ番号として記録する(ステップS504)。   Subsequent to step S502, the information processing apparatus 300 refers to the start cluster number in the directory entry acquired in step S501, records it as restoration information in the open file information (step S503), and starts the searched free area. The cluster number is recorded as the starting cluster number of the entry information in the open file information (step S504).

次に、情報処理装置300は、検索した空き領域のクラスタに対応するサブFAT342内のFATエントリにリンクを書き込み(S505)、その空き領域であった情報記録媒体360中のクラスタに、更新対象ファイルを構成するデータをコピーする(S506)。なお、情報処理装置300は、ステップS505、S506の処理を、クラスタ単位で、更新対象ファイルのデータを全てコピーし終えるまで繰り返し行う(S507)。更新対象のファイルを構成する全てのデータのコピーが完了すると、そのファイルについてのオープンファイル情報中の処理ステータスに“1”を設定する(ステップS508)。   Next, the information processing apparatus 300 writes a link to the FAT entry in the sub FAT 342 corresponding to the searched free area cluster (S505), and the update target file is stored in the cluster in the information recording medium 360 that was the free area. Is copied (S506). The information processing apparatus 300 repeats the processes in steps S505 and S506 until all the data of the update target file is copied in units of clusters (S507). When the copying of all the data constituting the file to be updated is completed, “1” is set as the processing status in the open file information for the file (step S508).

このようにオープン処理では、更新対象のファイルに関する情報をRAM上に読み込み、ファイルアクセスの準備を行うと共に、更新対象のファイル内容を構成するデータを情報記録媒体上の空き領域にコピーし、以後はそのコピーしたデータに対して行うため、更新処理が途中で停止したような場合において、オープン時点の状態にファイルを復元することが可能になる。   In this way, in the open process, information on the file to be updated is read into the RAM and preparation for file access is made, and data constituting the file contents to be updated is copied to a free area on the information recording medium. Since the process is performed on the copied data, the file can be restored to the open state when the update process is stopped in the middle.

図9は、オープン処理後のデータ状態を例示する図である。
同図では、情報記録媒体中のFILE1.TXTという名前のファイルが更新対象とされた場合の例を示しており、そのファイルを構成するデータは更新前においては3番、4番、5番のクラスタに記録されており、そのことからFATとメインFATとは3番、4番、5番のクラスタに対応するFATエントリが0以外の値となっている様子を示している。
FIG. 9 is a diagram illustrating a data state after the open process.
In the figure, FILE1. An example in which a file named TXT is an update target is shown, and the data constituting the file is recorded in the third, fourth, and fifth clusters before the update. And the main FAT indicate that FAT entries corresponding to the third, fourth, and fifth clusters have values other than zero.

そしてファイルサイズが42KBであるため、ステップS502による空き領域の検索結果として、同図の例では6番、7番、8番のクラスタが検索されたものとしている。なお、ここでは、情報記録媒体360の容量は64MBであり、1クラスタが16KBである例について示している。
また、ステップS503により復元情報にはディレクトリエントリにおける開始クラスタ番号である3が記録され、ステップS504によりエントリ情報の開始クラスタ番号が6とされ、ステップS505〜S507により、サブFATの6番〜8番のクラスタに対応するFATエントリにはリンクが格納され、更新前のファイルを構成するデータは、6番〜8番のクラスタにコピーされ、ステップS508により処理ステータスが”1”にされた後の状態が、図9に現れている。
Since the file size is 42 KB, it is assumed that the clusters of No. 6, No. 7, and No. 8 are searched in the example of FIG. Here, the capacity of the information recording medium 360 is 64 MB, and an example in which one cluster is 16 KB is shown.
Further, in step S503, the starting cluster number 3 in the directory entry is recorded in the restoration information, the starting cluster number of the entry information is set to 6 in step S504, and the sub FATs Nos. 6 to 8 are set in steps S505 to S507. A link is stored in the FAT entry corresponding to the cluster No., and the data constituting the file before the update is copied to the clusters No. 6 to No. 8, and the status after the processing status is set to “1” in Step S508 Is shown in FIG.

図10は、情報処理装置300による更新後データ記録処理を示すフローチャートである。
情報処理装置300は、メインFAT341及びサブFAT342から書込み位置を決定し(ステップS701)、情報記録媒体360中のその決定した位置に更新後のファイル内容を構成するデータを記録する(ステップS702)。なお、データを上書きする場合には、サブFAT342を参照して元に上書き位置を決定し、データを追加する場合は、メインFAT341及びサブFAT342から空き領域を検索して書き込み位置を決定する。また、更新後のファイル内容は、ユーザ操作等に応じて又は所定の演算に基づきアプリケーションプログラム又はシステムプログラムにより決定される。
FIG. 10 is a flowchart showing post-update data recording processing by the information processing apparatus 300.
The information processing apparatus 300 determines a writing position from the main FAT 341 and the sub FAT 342 (step S701), and records data constituting the updated file content at the determined position in the information recording medium 360 (step S702). When overwriting data, the sub FAT 342 is referred to determine the overwrite position based on the original data. When adding data, the empty area is searched from the main FAT 341 and the sub FAT 342 to determine the write position. The updated file contents are determined by an application program or a system program in accordance with a user operation or the like or based on a predetermined calculation.

ステップS702においてデータを記録した後に情報処理装置300は、その記録によってFATが変更されるべき場合にはそのデータを記録したクラスタに対応するようにサブFAT342中のリンクを更新し(ステップS703)、ファイルサイズに変更が生じる場合にはそのファイルについてのオープンファイル情報中のエントリ情報中のファイルサイズを更新し(ステップS704)、続いてそのオープンファイル情報中の処理ステータスに”2”を設定する(ステップS705)。   After recording the data in step S702, the information processing apparatus 300 updates the link in the sub FAT 342 so as to correspond to the cluster in which the data is recorded when the FAT is to be changed by the recording (step S703). If the file size is changed, the file size in the entry information in the open file information for the file is updated (step S704), and then “2” is set in the processing status in the open file information ( Step S705).

図11は、更新後データ記録処理後のデータ状態を例示する図である。
同図は、図9に続いた状態を示しており、FILE1.TXTという名前のファイル内容を構成するデータが格納されている7番のクラスタの内容が上書き更新され、そのファイル内容を構成するデータとして9番のクラスタが追加された状態(ステップS701、S702)が、データ領域に現れている。
FIG. 11 is a diagram illustrating the data state after the post-update data recording process.
This figure shows the state following FIG. The state (steps S701 and S702) in which the contents of the 7th cluster in which data constituting the file content named TXT is stored is overwritten and updated, and the 9th cluster is added as the data constituting the file contents. Appear in the data area.

また、図11は、サブFATのFATエントリが更新され(ステップS703)、6番から9番までクラスタが連続していることを示しており、また、エントリ情報中のファイルサイズが42KBから60KBに更新されており(ステップS704)、処理ステータスが”2”にされた様子を示している(ステップS705)。
図12は、情報処理装置300によるクローズ処理を示すフローチャートである。
Further, FIG. 11 shows that the FAT entry of the sub FAT is updated (step S703), and that clusters are continuous from No. 6 to No. 9, and the file size in the entry information is changed from 42 KB to 60 KB. It has been updated (step S704) and the processing status is set to “2” (step S705).
FIG. 12 is a flowchart illustrating the closing process by the information processing apparatus 300.

情報処理装置300は、更新対象としているファイルについてのオープンファイル情報中の処理ステータスに”3”を設定し(ステップS901)、続いて、エントリ情報中の開始クラスタ番号を取得する(S902)。
ステップS902に続いて、情報処理装置300は、取得した開始クラスタ番号から始まるリンクをサブFAT342上から得て、メインFAT341にコピーし(ステップS903)、全てのリンクのコピーが完了すると、サブFAT342におけるそのリンクを解放する(ステップS904)。なお、リンクの解放は、あるクラスタに対応するFATエントリが他のクラスタの番号又は0xFFFという値を有しているところ、そのFATエントリの内容を0という値に変更することにより、なされる。
The information processing apparatus 300 sets “3” as the processing status in the open file information for the file to be updated (step S901), and then acquires the start cluster number in the entry information (S902).
Subsequent to step S902, the information processing apparatus 300 obtains a link starting from the acquired start cluster number from the sub FAT 342, copies it to the main FAT 341 (step S903), and completes copying of all links. The link is released (step S904). The link is released by changing the contents of the FAT entry to a value of 0 when the FAT entry corresponding to a certain cluster has a value of another cluster or a value of 0xFFF.

ステップS904を終えた後に、情報処理装置300は、更新対象としているファイルについてのオープンファイル情報中の処理ステータスに”4”を設定し(ステップS905)、続いて、更新前の開始クラスタ番号を示している復元情報、即ち更新前のファイル内容を構成するデータを格納していた先頭のクラスタ番号を示している復元情報を参照して、その開始クラスタ番号を取得し(ステップS906)、その開始クラスタ番号のクラスタに対応するFATエントリから始まるリンクを、メインFATから解放し(ステップS907)、処理ステータスに”5”を設定する(ステップS908)。   After finishing step S904, the information processing apparatus 300 sets “4” as the processing status in the open file information for the file to be updated (step S905), and then indicates the start cluster number before the update. The starting cluster number is obtained by referring to the restoring information indicating the leading cluster number storing the restoration information, that is, the data constituting the file contents before the update (step S906). The link starting from the FAT entry corresponding to the numbered cluster is released from the main FAT (step S907), and the processing status is set to “5” (step S908).

図13は、クローズ処理におけるステップS903の実行後のデータ状態を例示する図である。同図は、図11に続いた状態を示している。
エントリ情報から開始クラスタ番号として6が取得され(ステップS902)、サブFATにおいて6番のクラスタに対応するFATエントリからリンクされた7番、8番及び9番のクラスタに対応するFATエントリの内容が、メインFATにコピーされた状態(ステップS903)が、図11に現れている。
FIG. 13 is a diagram illustrating a data state after execution of step S903 in the close process. This figure shows a state following FIG.
6 is acquired as the starting cluster number from the entry information (step S902), and the contents of the FAT entries corresponding to the seventh, eighth and ninth clusters linked from the FAT entry corresponding to the sixth cluster in the sub FAT are indicated. The state copied to the main FAT (step S903) appears in FIG.

図14は、複数のファイルが更新対象とされ、並行的に、更新処理が実施されている状況におけるメインFATの更新の様子を示す図である。
クローズ処理におけるステップS903によって、クローズ処理が行われたファイルについてのみ、そのファイルを構成するデータに係るサブFAT中のリンク情報が、メインFATにコピーされることになる。同図の例では、そのファイルについてクローズ指示が取得されたFILE1.TXTという名前のファイルについては、更新後のファイル内容を構成するデータが格納されたクラスタを示す情報がサブFATからメインFATにコピーされるが、未だクローズ指示が取得されていない即ち更新中であるFILE2.TXTという名前のファイルについては、更新後のファイル内容を構成するデータが格納されたクラスタを示す情報はサブFATのみに存在し、メインFATにはコピーされないことを示している。後述する管理情報記録処理によりメインFATは情報記録媒体360中のFATにコピーされることになるため、クローズされたファイルについてのみ更新後のファイルを構成するデータの所在位置を示す情報がFATに記録されることになる。
FIG. 14 is a diagram illustrating how the main FAT is updated in a situation where a plurality of files are to be updated and update processing is being performed in parallel.
In step S903 in the close process, the link information in the sub FAT related to the data constituting the file is copied to the main FAT only for the file that has been subjected to the close process. In the example shown in the figure, FILE1. For a file named TXT, information indicating a cluster in which data constituting the updated file content is stored is copied from the sub FAT to the main FAT, but the close instruction has not yet been acquired, that is, being updated. FILE2. As for a file named TXT, information indicating a cluster in which data constituting the updated file content is stored exists only in the sub FAT, and is not copied to the main FAT. Since the main FAT is copied to the FAT in the information recording medium 360 by the management information recording process to be described later, information indicating the location of data constituting the updated file is recorded in the FAT only for the closed file. Will be.

図15は、クローズ処理におけるステップS905の実行後のデータ状態を例示する図である。同図は、図13に続いた状態を示している。
図13で示されていたサブFAT中の、FILE1.TXTの更新後のファイル内容を構成するデータが格納されているクラスタを示すリンク情報が、ステップS904によりクリアされていることが図15には現れており、また、ステップS905により処理ステータスが4にされていることが図15には現れている。
FIG. 15 is a diagram illustrating a data state after execution of step S905 in the close process. This figure shows a state following FIG.
In the sub-FAT shown in FIG. FIG. 15 shows that the link information indicating the cluster storing the data constituting the file contents after the TXT update is cleared in step S904, and the processing status is set to 4 in step S905. This is shown in FIG.

図16は、クローズ処理が終了後のデータ状態を例示する図である。同図は、図15に続いた状態を示している。
図15で示されていたメインFAT中の、FILE1.TXTの更新前のファイル内容を構成するデータが格納されているクラスタを示すリンク情報が、ステップS907によりクリアされており、また、処理ステータスがステップS908により5にされていることが図16には現れている。
FIG. 16 is a diagram exemplifying a data state after the closing process is completed. This figure shows a state following FIG.
In the main FAT shown in FIG. FIG. 16 shows that the link information indicating the cluster in which the data constituting the file contents before the TXT update is stored is cleared in step S907, and the processing status is set to 5 in step S908. Appears.

図17は、情報処理装置300による管理情報記録処理を示すフローチャートである。
情報処理装置300は、クローズ処理を行った後に、RAM340内のメインFAT341の内容を、情報記録媒体360中のFATの領域にコピーすることでFATを更新する(ステップS1301)。FATの領域へのコピーは、詳細に言えばFAT1とFAT2との両方へのコピーのことである。
FIG. 17 is a flowchart showing management information recording processing by the information processing apparatus 300.
After performing the close process, the information processing apparatus 300 updates the FAT by copying the contents of the main FAT 341 in the RAM 340 to the FAT area in the information recording medium 360 (step S1301). Specifically, copying to the FAT area refers to copying to both FAT1 and FAT2.

FATの更新に続いて、情報処理装置300は、RAM340内のクローズしたファイルについてのオープンファイル情報に含まれるエントリ情報を、情報記録媒体360内の対応するファイルのディレクトリエントリに反映させるよう書込みを行い(ステップS1302)、オープンファイル情報をクリアして処理ステータスに0を設定し(ステップS1303)、管理情報記録処理を終了する。   Following the update of the FAT, the information processing apparatus 300 writes so that the entry information included in the open file information for the closed file in the RAM 340 is reflected in the directory entry of the corresponding file in the information recording medium 360. (Step S1302), the open file information is cleared and the processing status is set to 0 (Step S1303), and the management information recording process is terminated.

図18は、管理情報記録処理の実行後のデータ状態を例示する図である。同図は、図16に続いた状態を示している。
図16で示されていたFAT中の、FILE1.TXTの更新前のファイル内容を構成するデータが格納されているクラスタを示すリンク情報、つまり3番〜5番のクラスタに対応するFATエントリに格納されている値が、ステップS1301により0でクリアされており、また、ディレクトリエントリは更新されており、FILE1.TXTに関するオープンファイル情報はクリアされていることが図18には現れている。
FIG. 18 is a diagram illustrating a data state after execution of the management information recording process. This figure shows a state following FIG.
In the FAT shown in FIG. The link information indicating the cluster in which the data constituting the file contents before the TXT update is stored, that is, the value stored in the FAT entry corresponding to the third to fifth clusters is cleared to 0 in step S1301. In addition, the directory entry has been updated and FILE1. FIG. 18 shows that the open file information regarding TXT is cleared.

以下、情報処理装置300においてファイル処理プログラム331の一部により実現される復元処理について説明する。
復元処理は、主電源の遮断等によりファイル更新が完了しないで途中において停止していた場合に、次に主電源から電力が供給できるようになった後、例えば主電源である電池が再充電されてユーザにより電源オンにする操作がなされた後、に実行される処理である。
Hereinafter, a restoration process realized by a part of the file processing program 331 in the information processing apparatus 300 will be described.
In the restoration process, if the file update is not completed because the main power supply is shut off, etc., and the process is stopped halfway, the battery, which is the main power supply, is recharged after the main power supply can be supplied next. This process is executed after the user performs an operation to turn on the power.

図19は、情報処理装置300による復元処理を示すフローチャートである。
情報処理装置300は、復元処理を開始すると、まず、RAM340に保持されている各オープンファイル情報に、順番に着目し、その中の処理ステータスを判別する(ステップS1501)。判別の結果、その処理ステータスが”3”であれば、その着目しているオープンファイル情報内のエントリ情報中の開始クラスタ番号のFATエントリから始まり、内容が0xFFFであるFATエントリまで続くリンクをサブFATから探して、それらのFATエントリの内容をメインFATの同じクラスタに対応するFATエントリにコピーし、そのサブFAT中のそれらのFATエントリの内容を0にクリアし(ステップS1502)、処理ステータスに”4”を設定する(ステップS1503)。
FIG. 19 is a flowchart showing the restoration process by the information processing apparatus 300.
When starting the restoration process, the information processing apparatus 300 first pays attention to each open file information held in the RAM 340 in order, and determines the processing status therein (step S1501). If the processing status is “3” as a result of the determination, the link starting from the FAT entry of the start cluster number in the entry information in the open file information of interest and continuing to the FAT entry whose content is 0xFFF Search from the FAT, copy the contents of those FAT entries to the FAT entries corresponding to the same cluster of the main FAT, clear the contents of those FAT entries in the sub-FAT to 0 (step S1502), and set the processing status. “4” is set (step S1503).

処理ステータスが”3”で停止している場合にはサブFATからメインFATにリンクをコピーしている途中、或いはサブFAT上のリンクを解放している途中で、更新処理が停止したことを示すことから、復元処理において、このステップS1502が実行される。
なお、サブFAT上のリンクを解放している途中で更新処理が停止した場合にはエントリ情報中の開始クラスタ番号に対応するサブFAT上のリンク情報が0に設定されているので、このときには、ステップS1502においては、エントリ情報中の開始クラスタ番号のFATエントリから始まり、内容が0xFFFであるFATエントリまで続くリンクをメインFAT上から探して、それと同じクラスタに対応するサブFAT上のFATエントリの内容を0にクリアする。
When the processing status is “3” and stopped, it indicates that the update processing has stopped while copying the link from the sub FAT to the main FAT or releasing the link on the sub FAT. Therefore, step S1502 is executed in the restoration process.
If the update process is stopped while releasing the link on the sub FAT, the link information on the sub FAT corresponding to the start cluster number in the entry information is set to 0. In step S1502, the main FAT is searched for a link that starts from the FAT entry of the start cluster number in the entry information and continues to the FAT entry whose content is 0xFFF, and the contents of the FAT entry on the sub FAT corresponding to the same cluster. Is cleared to 0.

ステップS1503を実行した場合に、又は、ステップS1501の判別の結果その処理ステータスが”4”である場合に、情報処理装置300は、着目しているオープンファイル情報内のエントリ情報の復元情報が示すところの、更新前のファイル内容を構成するデータの開始クラスタ番号を得て、その開始クラスタ番号に対応するメインFAT上のFATエントリからリンクされているFATエントリ内の値を全て0クリアし、リンクを解放し(ステップS1504)、処理ステータスに”5”を設定する(ステップS1505)。   When step S1503 is executed, or when the processing status is “4” as a result of the determination in step S1501, the information processing apparatus 300 indicates the restoration information of the entry information in the open file information of interest. However, the start cluster number of the data constituting the file contents before the update is obtained, all the values in the FAT entry linked from the FAT entry on the main FAT corresponding to the start cluster number are cleared to 0, and the link Is released (step S1504), and the processing status is set to “5” (step S1505).

なお、メインFAT上のリンクの解放中に処理が停止した場合でも、復元処理において正しくそのリンクの解放が行えるように、リンク解放時には復元情報に解放前リンクのクラスタ番号と解放後リンクのクラスタ番号とを格納した後に、解放前リンクのクラスタ番号を解放する。なお、解放前リンクのクラスタ番号と解放後リンクのクラスタ番号とは、復元情報に一度に即ち一命令の実行により記録される。   In addition, even if the processing is stopped while releasing the link on the main FAT, the cluster number of the link before release and the cluster number of the link after release are included in the restoration information when releasing the link so that the link can be correctly released in the restoration process. And the cluster number of the link before release is released. Note that the cluster number of the link before release and the cluster number of the link after release are recorded in the restoration information at once, that is, by executing one instruction.

例えばクラスタ番号3、4、5のリンクを解放する場合、復元情報に3、4を格納した後、メインFAT上のクラスタ番号3に対応するFATエントリに空き領域を示す0を設定する。次に、復元情報を4、5に変更した後、メインFAT上のクラスタ番号4に対応するFATエントリに位置を空き領域を示す0を設定する。最後に復元情報を5、0xFFFに設定した後、メインFAT上のクラスタ番号5に対応するFATエントリに空き領域を示す0を設定し、復元情報に0を設定する。この手順によりメインFATの解放を行うことで、解放の途中で処理が停止した場合でも、次回の復元処理において解放を続行することができるようになる。   For example, when releasing the links of cluster numbers 3, 4, and 5, after storing 3 and 4 in the restoration information, 0 indicating a free area is set in the FAT entry corresponding to cluster number 3 on the main FAT. Next, after the restoration information is changed to 4 and 5, 0 indicating the empty area is set in the FAT entry corresponding to the cluster number 4 on the main FAT. Finally, after the restoration information is set to 5, 0xFFF, 0 indicating a free area is set in the FAT entry corresponding to the cluster number 5 on the main FAT, and 0 is set in the restoration information. By releasing the main FAT according to this procedure, even if the process is stopped during the release, the release can be continued in the next restoration process.

ステップS1505が終了した後、或いは着目しているオープンファイル情報の処理ステータスが”0”、”1”、”2”、”5”のいずれかであった場合には、情報処理装置300は、全てのオープンファイル情報について既に着目したか否かを判定し(ステップS1506)、未着目のオープンファイル情報があればそれに着目してステップS1501に戻って処理を行い、全てのオープンファイル情報に着目済みであれば、RAM340内のメインFATの内容を、情報記録媒体360内のFAT1及びFAT2にコピーする(ステップS1507)。   After step S1505 is completed, or when the processing status of the open file information of interest is one of “0”, “1”, “2”, “5”, the information processing apparatus 300 It is determined whether or not all open file information has already been focused (step S1506). If there is unfocused open file information, the process returns to step S1501 with attention focused on all open file information, and all open file information has been focused. If so, the contents of the main FAT in the RAM 340 are copied to the FAT1 and FAT2 in the information recording medium 360 (step S1507).

ステップS1507に続いて情報処理装置300は、全てのオープンファイル情報の中から処理ステータスが”5”であるものを検索して、検索した全てのオープンファイル情報についての各エントリ情報を、情報記録媒体360中の対応するファイルのディレクトリエントリに反映させるよう書込みを行い(ステップS1508)、全てのオープンファイル情報を0でクリアして、復元処理を終了する。   Subsequent to step S1507, the information processing apparatus 300 searches for all open file information having a processing status of “5”, and stores each entry information for all the searched open file information as an information recording medium. Writing is performed so as to be reflected in the directory entry of the corresponding file in 360 (step S1508), all open file information is cleared to 0, and the restoration process is terminated.

以上の復元処理により、ファイルのクローズ指示が取得された後に更新処理が途中で停止していたファイルについては、更新後の状態にファイルが復元され、クローズ指示が取得される前に更新処理が途中で停止していたファイルについては、オープン時の状態つまり更新前の状態にファイルが復元される。なお、複数のファイルオープン情報それぞれに着目して個別に処理ステータスに応じてファイルの復元を行うため、複数のファイルが並行的に更新されている場合でも、それぞれにファイルの更新の進行度に応じて適切にファイルを復元すること、即ちファイルを管理するためのFATやディレクトリエントリを整合する状態になるように再更新することが、可能となる。
<実施形態2>
<構成及び利用データ>
図20は、本発明の実施形態2に係る情報処理装置の構成図である。
As a result of the above restoration process, for files that have been suspended during the update process after the file close instruction is acquired, the file is restored to the updated state, and the update process is in progress before the close instruction is acquired. For files that were stopped in step 1, the files are restored to the open state, that is, the state before the update. Note that since each file is restored according to the processing status, focusing on each of the file open information, even if multiple files are updated in parallel, depending on the progress of the update of each file. Thus, it is possible to restore the file appropriately, that is, to re-update the FAT and directory entry for managing the file so as to be in a consistent state.
<Embodiment 2>
<Configuration and usage data>
FIG. 20 is a configuration diagram of an information processing apparatus according to the second embodiment of the present invention.

実施形態2に係る情報処理装置1300は、実施形態1で示した情報処理装置300とほとんど同じ構成を備えるが、サブFATを用いずにファイルについての更新処理及び復元処理を行う点で、情報処理装置300と異なる。なお、図20中の情報処理装置1300の構成要素のうち、情報処理装置300と同一のものについては図中で同じ符号を用いている。   The information processing apparatus 1300 according to the second embodiment has almost the same configuration as the information processing apparatus 300 shown in the first embodiment, but is different in that it performs update processing and restoration processing on files without using a sub FAT. Different from the device 300. Note that, among the components of the information processing apparatus 1300 in FIG. 20, the same reference numerals are used for the same elements as the information processing apparatus 300.

この情報処理装置1300においては、情報記録媒体360中のファイルの更新が繰り返しなされた場合に、ファイルのクローズ指示がなされなくても、最後の更新が情報記録媒体360中のFATやディレクトリエントリに反映される。そして、更新処理の途中で主電源の遮断等により更新処理が停止した場合にその後の復元処理によってなされるファイルの復元は、既にデータの更新がなされその更新された位置を示す情報がRAMに格納されていれば、最後の更新がなされた状態になるようにFAT等を再更新して実現される。   In this information processing apparatus 1300, when the file in the information recording medium 360 is repeatedly updated, the last update is reflected in the FAT or directory entry in the information recording medium 360 even if the file closing instruction is not given. Is done. Then, when the update process is stopped due to the main power supply shut off during the update process, the file is restored by the subsequent restore process. The data is already updated and the information indicating the updated position is stored in the RAM. If it has been done, it is realized by re-updating FAT or the like so that the last update has been made.

この情報処理装置1300は、図20に示すように、CPU310、主電源320、不揮発性メモリ1330、RAM1340、補助電源350を備え、また特に図示はしていないが、キーやボタン等を介してユーザ操作を受け付ける入力インタフェースや、ユーザに情報を提示するためのディスプレイ等をも備えている。
ここで、不揮発性メモリ1330は、CPU310上で動作するプログラムを格納しているメモリであり、特に、クローズ前の更新を有効とするタイプのファイルの更新及び復元に関する処理を実現するためのファイル処理プログラム1331を格納しており、図示しないアプリケーションプログラムやシステムプログラム等も格納している。
As shown in FIG. 20, the information processing apparatus 1300 includes a CPU 310, a main power source 320, a non-volatile memory 1330, a RAM 1340, and an auxiliary power source 350. An input interface for accepting operations and a display for presenting information to the user are also provided.
Here, the non-volatile memory 1330 is a memory that stores a program that operates on the CPU 310, and in particular, file processing for realizing processing related to update and restoration of a file that enables update before closing. A program 1331 is stored, and application programs, system programs, and the like (not shown) are also stored.

RAM1340は、電池等である補助電源350から常時電力の供給を受けてデータを常時保持するメモリであり、たとえ主電源320から情報処理装置1300の各部への電力供給が停止したとしてもこのRAM1340内のデータは保持され続ける。このRAM1340内には、情報記録媒体360中のFATを更新するための作業に用いられるメインFAT1341と、更新対象のファイル毎に対応したオープンファイル情報1343とが格納される。メインFAT1341は、情報記録媒体360におけるクラスタ単位でのデータの格納位置を示すことになる。   The RAM 1340 is a memory that constantly receives power from the auxiliary power supply 350 such as a battery and constantly holds data. Even if the power supply from the main power supply 320 to each part of the information processing apparatus 1300 is stopped, the RAM 1340 Data will continue to be retained. The RAM 1340 stores a main FAT 1341 used for work for updating the FAT in the information recording medium 360 and open file information 1343 corresponding to each file to be updated. The main FAT 1341 indicates a data storage position in cluster units in the information recording medium 360.

また、オープンファイル情報1343は、エントリ情報1344、処理ステータス1345及び復元情報1346を含む。ここで、エントリ情報1344は、エントリ情報344と同様であり、処理ステータス1345は、更新の進行度合いを示す情報、即ちファイルの更新が複数の手順によりなされるところ、どの手順まで実行されたかを示す情報である。この処理ステータス1345は、ファイルの更新の過程で逐次変更され、ファイルの更新が途中で停止してファイルを管理する情報に不整合が生じた際にその不整合を解消するためになされる復元処理において参照されることになる。   The open file information 1343 includes entry information 1344, processing status 1345, and restoration information 1346. Here, the entry information 1344 is the same as the entry information 344, and the processing status 1345 indicates information indicating the degree of progress of the update, that is, up to which procedure the file has been updated by a plurality of procedures. Information. This processing status 1345 is sequentially changed during the process of updating the file, and when the file update is stopped in the middle and an inconsistency occurs in the information managing the file, a restoration process is performed to eliminate the inconsistency Will be referred to.

また、復元情報1346は、復元に必要な情報であり、更新後のファイル内容を構成するデータが格納された先頭のクラスタの番号(以下、「新リンク開始クラスタ番号」という。)と、更新前のファイル内容を構成するデータが格納されていた先頭のクラスタの番号(以下、「更新開始クラスタ番号」という。)とから構成される。
<動作>
以下、上述した情報処理装置1300の動作について説明する。
The restoration information 1346 is information necessary for restoration, and is the number of the first cluster (hereinafter referred to as “new link start cluster number”) in which data constituting the updated file content is stored, and before the update. And the number of the first cluster (hereinafter referred to as “update start cluster number”) in which the data constituting the file contents is stored.
<Operation>
Hereinafter, the operation of the information processing apparatus 1300 will be described.

情報処理装置1300は、CPU310によるファイル処理プログラム1331の実行により、ユーザによる電源ボタンの押下等に対応して主電源320が電力の供給を開始した時点つまり装置が起動された時点から、前回の起動時においてファイルの更新が完了しないで電源断等により異常終了していた場合には後述の復元処理を実行し、その後に情報記録媒体360が装着されている状態になったときに、更新準備処理を行い、その後に、各ファイルについて、後述する更新処理を行う。   The information processing apparatus 1300 starts from the time when the main power supply 320 starts supplying power in response to the user pressing the power button or the like by the execution of the file processing program 1331 by the CPU 310, that is, from the time when the apparatus is started. At this time, if the file update is not completed and the process is abnormally terminated due to a power failure or the like, a restoration process described later is executed, and then the update preparation process is performed when the information recording medium 360 is loaded. After that, update processing described later is performed for each file.

なお、更新準備処理は、情報記録媒体360中のFAT363をRAM1340中のメインFAT1341にコピーして、オープンファイル情報の内容を全て無効化する処理である。
更新準備処理の結果として、RAM1340内に、情報記録媒体360のFATをコピーしたものであるメインFAT1341と、無効化されたオープンファイル情報とが格納される。なお、無効化されたオープンファイル情報が格納されているということは、有効なオープンファイル情報が格納されていないことを意味する。
The update preparation process is a process of copying the FAT 363 in the information recording medium 360 to the main FAT 1341 in the RAM 1340 and invalidating all the contents of the open file information.
As a result of the update preparation process, the main FAT 1341, which is a copy of the FAT of the information recording medium 360, and invalidated open file information are stored in the RAM 1340. Note that invalid open file information is stored means that valid open file information is not stored.

以下、情報処理装置1300においてファイル処理プログラム1331の一部により実現される更新処理について説明する。
図21は、情報処理装置1300による更新処理の概要を示すフローチャートである。
この更新処理は、更新対象とされた各ファイルについて独立的に実行されるものであり、複数のファイルについて並行して実行され得ることが想定されている。ファイル処理プログラム1331は、アプリケーションプログラムやシステムプログラムの実行に際してファイルの更新が要求された場合にこの更新処理を実行する。
Hereinafter, update processing realized by a part of the file processing program 1331 in the information processing apparatus 1300 will be described.
FIG. 21 is a flowchart illustrating an overview of update processing by the information processing apparatus 1300.
This update process is executed independently for each file to be updated, and it is assumed that a plurality of files can be executed in parallel. The file processing program 1331 executes this update processing when a file update is requested when executing the application program or the system program.

まず、情報処理装置1300は、オープン処理を実行し(ステップS21)、ファイルの更新に応じてクローズ指示を取得する迄は更新後のデータを情報記録媒体360に記録する等を内容とするファイル更新処理を実行し(ステップS22、S23)、更新の完了を意味するクローズ指示を取得した場合には、更新後のファイルを構成するデータの所在位置を管理する情報を情報記録媒体360に記録するための管理情報記録処理を実行する(ステップS24)。   First, the information processing apparatus 1300 executes an open process (step S21), and updates the file to record the updated data in the information recording medium 360 until the close instruction is acquired according to the update of the file. When processing is executed (steps S22 and S23) and a close instruction signifying completion of update is acquired, information for managing the location of data constituting the updated file is recorded in the information recording medium 360. The management information recording process is executed (step S24).

以下、ステップS21、S22及びS24の各処理内容について、実施形態1で用いたFILE1.TXTという名前のファイルについての更新を例にして詳細に説明する。
図22は、情報処理装置1300によるオープン処理を示すフローチャートである。
情報処理装置1300は、まず更新対象のファイルについてのディレクトリエントリを情報記録媒体360から取得し、RAM1340内のオープンファイル情報に含まれるエントリ情報として記録する(ステップS1601)。つまり、1つのオープンファイル情報のエントリ情報に、FILE1.TXTのファイル名、更新開始クラスタ番号及びファイルサイズが設定される。
Hereinafter, for each processing content of steps S21, S22, and S24, FILE1. An update for a file named TXT will be described in detail as an example.
FIG. 22 is a flowchart showing an open process by the information processing apparatus 1300.
The information processing apparatus 1300 first acquires a directory entry for the file to be updated from the information recording medium 360 and records it as entry information included in the open file information in the RAM 1340 (step S1601). In other words, the entry information of one open file information includes FILE1. The TXT file name, update start cluster number, and file size are set.

続いて、情報処理装置1300は、その更新対象のファイルについてのオープンファイル情報中の処理ステータスに”11”を設定し(ステップS1602)、オープン処理を終える。
図23は、情報処理装置1300によるファイル更新処理を示すフローチャートである。
Subsequently, the information processing apparatus 1300 sets “11” as the process status in the open file information for the file to be updated (step S1602), and ends the open process.
FIG. 23 is a flowchart showing file update processing by the information processing apparatus 1300.

情報処理装置1300は、オープン処理においてエントリ情報として記録したファイルサイズを参照して、RAM1340内のメインFAT1341からそのファイルサイズの空き領域が存在するかを検索する(ステップS1701)。なお、ステップS1701の検索においては、メインFAT1341においてFATエントリの内容が0であるクラスタを空きであると判断する。   The information processing apparatus 1300 refers to the file size recorded as the entry information in the open process and searches the main FAT 1341 in the RAM 1340 for an empty area of the file size (step S1701). In the search in step S1701, it is determined that a cluster in which the content of the FAT entry is 0 in the main FAT 1341 is empty.

ステップS1701に続いて、情報処理装置1300は、更新対象のファイルのオープンファイル情報中の復元情報に、空き領域のクラスタ番号である新リンク開始クラスタ番号と、ファイルの更新開始クラスタ番号とを記録し(ステップS1702)、処理ステータスに”12”を設定する(ステップS1703)。なお、ステップS1702では、新リンク開始クラスタ番号をエントリ情報における開始クラスタ番号としても設定する。   Subsequent to step S1701, the information processing apparatus 1300 records the new link start cluster number that is the cluster number of the free area and the update start cluster number of the file in the restoration information in the open file information of the file to be updated. (Step S1702), “12” is set in the processing status (Step S1703). In step S1702, the new link start cluster number is also set as the start cluster number in the entry information.

ステップS1703に続いて、情報処理装置1300は、情報記録媒体360のデータ領域366における空き領域に更新後のファイル内容を構成するデータを書込み(ステップS1704)、そのデータを書き込んだ各クラスタのリンクを示すように、メインFATを更新し(ステップS1705)、その書き込んだデータのサイズを示すようにエントリ情報中のファイルサイズを更新し(ステップS1706)、処理ステータスに”13”を設定する(ステップS1707)。   Subsequent to step S1703, the information processing apparatus 1300 writes the data constituting the updated file contents in the free area in the data area 366 of the information recording medium 360 (step S1704), and links each cluster into which the data has been written. As shown, the main FAT is updated (step S1705), the file size in the entry information is updated to indicate the size of the written data (step S1706), and the processing status is set to “13” (step S1707). ).

ステップS1707の後に、情報処理装置1300は、RAM1340中のメインFATから更新前のファイル内容を構成するデータが格納されていたクラスタを示すリンクを解放し(ステップS1708)、処理ステータスに”14”を設定し(ステップS1709)、ファイル更新処理を終える。
図24は、ファイル更新処理におけるステップS1703の実行後のデータ状態を例示する図である。
After step S1707, the information processing apparatus 1300 releases the link indicating the cluster in which the data constituting the file content before update is stored from the main FAT in the RAM 1340 (step S1708), and sets “14” as the processing status. Setting is performed (step S1709), and the file update process is terminated.
FIG. 24 is a diagram illustrating a data state after execution of step S1703 in the file update process.

同図の情報記録媒体の内容例が示すように、更新対象となる情報記録媒体360中のファイルの内容を構成するデータは、データ領域366における3番、4番、5番のクラスタに格納されており、そのファイルのファイル名はFILE1.TXTであって、ファイルサイズが42KBである。
また、同図は、FILE1.TXTという名前のファイルについてのオープンファイル情報中の復元情報として、その更新前のファイル内容を構成するデータが格納されている先頭クラスタの番号である3が、更新開始クラスタ番号として設定され、ステップS1701の検索結果である空いているクラスタであって更新後のファイル内容を格納する予定のクラスタの番号である6が、新リンク開始クラスタ番号として設定されており、処理ステータスに”12”が設定されている状態を示している。
As shown in the example of the contents of the information recording medium in the figure, the data constituting the contents of the file in the information recording medium 360 to be updated is stored in the third, fourth, and fifth clusters in the data area 366. The file name of the file is FILE1. It is TXT and the file size is 42 KB.
The figure also shows FILE1. As the restoration information in the open file information for the file named TXT, 3 which is the number of the first cluster in which the data constituting the file content before the update is stored is set as the update start cluster number, and step S1701 is performed. The number 6 of the free cluster that is the search result of this and that is scheduled to store the updated file contents is set as the new link start cluster number, and the processing status is set to “12”. It shows the state.

図25は、ファイル更新処理におけるステップS1707の実行後のデータ状態を例示する図である。同図は、図24に続いた状態を示している。
この図25は、ステップS1704により、情報記録媒体360内の6番目〜9番目のクラスタに、更新後のファイル内容を構成するデータが記録され、これに対応してステップS1705によりメインFATの6番目〜9番目のFATエントリに、6番目〜9番目のクラスタが連続していることを示すような値が設定されており、また、ステップS1706によりエントリ情報中のファイルサイズが60KBに更新され、ステップS1707により処理ステータスに”13”が設定された状態を示している。
FIG. 25 is a diagram exemplifying a data state after execution of step S1707 in the file update process. This figure shows a state following FIG.
In FIG. 25, the data constituting the updated file contents is recorded in the sixth to ninth clusters in the information recording medium 360 in step S1704, and the sixth data of the main FAT is recorded in step S1705. A value indicating that the sixth to ninth clusters are continuous is set in the ninth to ninth FAT entries, and the file size in the entry information is updated to 60 KB in step S1706. A state in which “13” is set as the processing status in S1707 is shown.

また、図26は、ファイル更新処理が完了した後のデータ状態を例示する図である。同図は、図25に続いた状態を示している。
この図26では、ステップS1708によりメインFAT上から更新前のファイル内容を構成するデータが格納されていたクラスタに係るリンクが解放され、即ち、3番目、4番目及び5番目の各クラスタに対応するメインFAT上のFATエントリの内容が0にクリアされており、処理ステータスに”14”が設定されている。
FIG. 26 is a diagram illustrating a data state after the file update process is completed. This figure shows a state following FIG.
In FIG. 26, the link related to the cluster in which the data constituting the file contents before update is stored from the main FAT is released from the main FAT in step S1708, that is, corresponding to the third, fourth, and fifth clusters. The contents of the FAT entry on the main FAT are cleared to 0, and “14” is set as the processing status.

なお、メインFAT上のリンクの解放中に処理が停止した場合でも、復元処理において正しくそのリンクの解放が行えるように、リンク解放時には復元情報に解放前リンクのクラスタ番号と解放後リンクのクラスタ番号とを格納した後に、解放前リンクのクラスタ番号を解放する。例えばクラスタ番号3、4、5のリンクを解放する場合、復元情報に3、4を格納した後、メインFAT上のクラスタ番号3に対応するFATエントリに空き領域を示す0を設定する。次に、復元情報を4、5に変更した後、メインFAT上のクラスタ番号4に対応するFATエントリに位置を空き領域を示す0を設定する。最後に復元情報を5、0xFFFに設定した後、メインFAT上のクラスタ番号5に対応するFATエントリに空き領域を示す0を設定し、復元情報に0を設定する。この手順によりメインFATの解放を行うことで、解放の途中で処理が停止した場合でも、次回の復元処理において解放を続行することができるようになる。このような手順でのリンクの解放により図26では、復元情報に0が設定されている。   In addition, even if the processing is stopped while releasing the link on the main FAT, the cluster number of the link before release and the cluster number of the link after release are included in the restoration information when releasing the link so that the link can be correctly released in the restoration process. And the cluster number of the link before release is released. For example, when releasing the links of cluster numbers 3, 4, and 5, after storing 3 and 4 in the restoration information, 0 indicating a free area is set in the FAT entry corresponding to cluster number 3 on the main FAT. Next, after the restoration information is changed to 4 and 5, 0 indicating the empty area is set in the FAT entry corresponding to the cluster number 4 on the main FAT. Finally, after the restoration information is set to 5, 0xFFF, 0 indicating a free area is set in the FAT entry corresponding to the cluster number 5 on the main FAT, and 0 is set in the restoration information. By releasing the main FAT according to this procedure, even if the process is stopped during the release, the release can be continued in the next restoration process. By releasing the link in such a procedure, 0 is set in the restoration information in FIG.

図27は、情報処理装置1300による管理情報記録処理を示すフローチャートである。
同図に示すように、情報処理装置1300は、まず、メインFATを情報記録媒体360内のFATの領域にコピーすることでFATを更新する(ステップS2101)。FATの領域へのコピーは、詳細に言えばFAT1とFAT2との両方へのコピーのことである。FATの更新に続いて、情報処理装置1300は、ファイルについてのRAM1340内のオープンファイル情報に含まれるエントリ情報を、情報記録媒体360内の対応するファイルのディレクトリエントリに反映させるよう書込みを行い(ステップS2102)、オープンファイル情報をクリアして処理ステータスに0を設定し(ステップS2103)、管理情報記録処理を終了する。
FIG. 27 is a flowchart showing management information recording processing by the information processing apparatus 1300.
As shown in the figure, the information processing apparatus 1300 first updates the FAT by copying the main FAT to the FAT area in the information recording medium 360 (step S2101). Specifically, copying to the FAT area refers to copying to both FAT1 and FAT2. Subsequent to the FAT update, the information processing apparatus 1300 writes the entry information included in the open file information in the RAM 1340 for the file to be reflected in the directory entry of the corresponding file in the information recording medium 360 (step S2102), the open file information is cleared and the processing status is set to 0 (step S2103), and the management information recording process is terminated.

以下、情報処理装置1300においてファイル処理プログラム1331の一部により実現される復元処理について説明する。
図28は、情報処理装置1300による復元処理を示すフローチャートである。
情報処理装置1300は、復元処理を開始すると、まず、RAM1340に保持されている各オープンファイル情報に、順番に着目し、その中の処理ステータスを判別する(ステップS2201)。判別の結果、処理ステータスに応じて、ステップS2202、ステップS2204又はステップS2206を行う。
Hereinafter, a restoration process realized by a part of the file processing program 1331 in the information processing apparatus 1300 will be described.
FIG. 28 is a flowchart showing restoration processing by the information processing apparatus 1300.
When the information processing apparatus 1300 starts the restoration process, the information processing apparatus 1300 first pays attention to the order of each open file information held in the RAM 1340, and determines the processing status therein (step S2201). As a result of the determination, step S2202, step S2204 or step S2206 is performed according to the processing status.

ステップS2201の判別の結果、その処理ステータスが”12”であれば、その着目しているオープンファイル情報内の復元情報における新リンク開始クラスタ番号を参照して、メインFAT1341上のそのクラスタ番号に対応するFATエントリから始まるリンクを解放し(ステップS2202)、処理ステータスに”11”を設定する(ステップS2203)。   If the processing status is “12” as a result of the determination in step S2201, the new link start cluster number in the restoration information in the open file information of interest is referred to, and the cluster number on the main FAT 1341 is supported. The link starting from the FAT entry to be released is released (step S2202), and the processing status is set to “11” (step S2203).

なお、ステップS2202におけるリンクの解放途中で処理の実行が停止した場合であっても正しくリンクの解放が再開できるように、リンク解放の際には復元情報の新リンク開始クラスタ番号を更新して、解放前のクラスタ番号と解放後のクラスタ番号とを格納した後に、解放前として格納したクラスタ番号を0で上書きする。例えば3番、4番、5番のクラスタのリンクを解放する場合には、まず復元情報に3、4を格納した後、メインFAT上の3番のクラスタに対応するFATエントリに空き領域を示す0を設定し、次に、復元情報を4、5に変更した後、メインFAT上の4番のクラスタに対応するFATエントリに0を設定し、最後に復元情報を5、0xFFFに設定した後で、メインFAT上の5番のクラスタに対応するFATエントリに0を設定する。この手順でメインFAT上のリンクの解放を行うことにより、解放途中で処理の実行が停止した場合であっても、次回の復元処理において解放を続行することができるようになる。   It should be noted that the new link start cluster number of the restoration information is updated at the time of link release so that the link release can be resumed correctly even if the execution of processing is stopped in the middle of the link release in step S2202. After storing the cluster number before release and the cluster number after release, the cluster number stored as before release is overwritten with 0. For example, when releasing the links of the third, fourth, and fifth clusters, first, 3 and 4 are stored in the restoration information, and then a free area is indicated in the FAT entry corresponding to the third cluster on the main FAT. After 0 is set, and then the restoration information is changed to 4, 5 and then, the FAT entry corresponding to the fourth cluster on the main FAT is set to 0, and finally the restoration information is set to 5, 0xFFF Thus, 0 is set in the FAT entry corresponding to the fifth cluster on the main FAT. By releasing the link on the main FAT in this procedure, the release can be continued in the next restoration process even if the execution of the process is stopped during the release.

ステップS2201の判別の結果、その処理ステータスが”13”であれば、その着目しているオープンファイル情報内の復元情報における更新開始クラスタ番号を参照して、メインFAT1341上のそのクラスタ番号に対応するFATエントリから始まるリンクを解放し(ステップS2204)、処理ステータスに”14”を設定する(ステップS2205)。なお、ステップS2204においても、ステップS2202と同様に、リンク解放の際には復元情報の更新開始クラスタ番号を更新して、解放前のクラスタ番号と解放後のクラスタ番号とを格納してから、解放前として格納したクラスタ番号を0で上書きする手順を用いて、リンクの解放を行う。   As a result of the determination in step S2201, if the processing status is “13”, the update start cluster number in the restoration information in the focused open file information is referred to and corresponds to the cluster number on the main FAT 1341. The link starting from the FAT entry is released (step S2204), and the processing status is set to “14” (step S2205). In step S2204, as in step S2202, when the link is released, the update information update start cluster number is updated, the cluster number before release and the cluster number after release are stored, and then released. The link is released using the procedure of overwriting the previously stored cluster number with 0.

ステップS2203又はステップS2205が終了した後、或いは着目しているオープンファイル情報の処理ステータスが”0”、”11”、”14”のいずれかであった場合には、情報処理装置1300は、全てのオープンファイル情報について既に着目したか否かを判定し(ステップS2206)、未着目のオープンファイル情報があればそれに着目してステップS2201に戻って処理を行い、全てのオープンファイル情報に着目済みであれば、RAM1340内のメインFATの内容を、情報記録媒体360内のFAT1及びFAT2にコピーする(ステップS2207)。   After step S2203 or step S2205 ends, or when the processing status of the open file information of interest is one of “0”, “11”, and “14”, the information processing apparatus 1300 It is determined whether or not the open file information has already been focused (step S2206), and if there is unfocused open file information, the process returns to step S2201 while paying attention, and all open file information has been focused. If there is, the contents of the main FAT in the RAM 1340 are copied to FAT1 and FAT2 in the information recording medium 360 (step S2207).

ステップS2207に続いて情報処理装置1300は、全てのオープンファイル情報の中から処理ステータスが”14”であるものを検索して、検索した全てのオープンファイル情報についての各エントリ情報を、情報記録媒体360中の対応するファイルのディレクトリエントリに反映させるよう書込みを行い(ステップS2208)、復元処理を終了する。   Subsequent to step S2207, the information processing apparatus 1300 retrieves all open file information having a processing status of “14”, and stores each entry information for all retrieved open file information as an information recording medium. Writing is performed so as to be reflected in the directory entry of the corresponding file in 360 (step S2208), and the restoration process is terminated.

以上の復元処理により、更新後のファイルを構成するデータが情報記録媒体中に記録された後であってかつ、そのデータが格納された位置に関する情報がRAM中に保持され、つまり、メインFAT及びエントリ情報によりその位置が表された後においては、その更新後の状態にファイルが復元され、それ以外の場合には、その更新前の状態にファイルが復元される。なお、複数のファイルオープン情報それぞれに着目して個別に処理ステータスに応じてファイルの復元を行うため、複数のファイルが並行的に更新されている場合でも、それぞれにファイルの更新の進行度に応じて適切にファイルを復元すること、即ちファイルを管理するためのFATやディレクトリエントリを整合する状態になるように再更新することが、可能となる。
<実施形態3>
以下、上述の実施形態1で示した情報処理装置300のファイル更新及び復元に係る機能と、実施形態2で示した情報処理装置1300のファイル更新及び復元に係る機能とを組み合わせて、ファイル単位で選択的に適用する情報処理装置(以下、「複合情報処理装置」という。)について説明する。
Through the above restoration process, information about the location where the data is stored is stored in the RAM after the data constituting the updated file is recorded in the information recording medium, that is, the main FAT and After the position is represented by the entry information, the file is restored to the state after the update. In other cases, the file is restored to the state before the update. Note that since each file is restored according to the processing status, focusing on each of the file open information, even if multiple files are updated in parallel, depending on the progress of the update of each file. Thus, it is possible to restore the file appropriately, that is, to re-update the FAT and directory entry for managing the file so as to be in a consistent state.
<Embodiment 3>
Hereinafter, the file update / restore function of the information processing apparatus 300 shown in the first embodiment and the file update / restore function of the information processing apparatus 1300 shown in the second embodiment are combined in units of files. An information processing apparatus (hereinafter referred to as “composite information processing apparatus”) that is selectively applied will be described.

複合情報処理装置は、情報処理装置300及び情報処理装置1300の有する構成要素を兼ね備える。
この複合情報処理装置では、各ファイルを更新対象とする際つまりオープンする際に、ユーザ操作を反映する等したアプリケーションプログラム又はシステムプログラムによって、実施の形態1で示したようなクローズ前は実際には更新が有効とならないタイプか、実施の形態2で示したようなクローズ前であっても最後の更新が有効となるタイプかの選択指定がなされることが想定されている。その選択指定に応じて、複合情報処理装置は、その更新対象とするファイルについて、図7に示した更新処理か図21に示した更新処理のいずれかを実施する。但し、図21に示した更新処理におけるファイル更新処理(図23参照)のステップS1701は若干修正して適用し、メインFATのみから空き領域を検索するのではなく、メインFAT及びサブFATから空き領域を検索するようにする。
The composite information processing apparatus combines the constituent elements of the information processing apparatus 300 and the information processing apparatus 1300.
In this composite information processing apparatus, when each file is to be updated, that is, when it is opened, an application program or system program that reflects a user operation or the like is actually used before the closing as described in the first embodiment. It is assumed that a selection is made as to whether the update is not valid or whether the last update is valid even before closing as shown in the second embodiment. In response to the selection designation, the composite information processing apparatus performs either the update process shown in FIG. 7 or the update process shown in FIG. 21 for the file to be updated. However, step S1701 of the file update process (see FIG. 23) in the update process shown in FIG. 21 is applied with a slight modification, and a free area is not searched only from the main FAT but from the main FAT and the sub FAT. To search for.

以下、複合情報処理装置においてファイル処理プログラムにより実現される復元処理について説明する。
図29は、複合情報処理装置による復元処理を示すフローチャートである。
複合情報処理装置は、復元処理を開始すると、まず、RAMに保持されている各オープンファイル情報に、順番に着目し、その中の処理ステータスを判別する(ステップS2401)。判別の結果、処理ステータスに応じて、ステップS2402、ステップS2403、ステップS2404、ステップS2405又はステップS2406を行う。
Hereinafter, restoration processing realized by the file processing program in the composite information processing apparatus will be described.
FIG. 29 is a flowchart showing restoration processing by the composite information processing apparatus.
When starting the restoration process, the composite information processing apparatus first pays attention to the respective open file information held in the RAM in order, and determines the processing status therein (step S2401). As a result of the determination, step S2402, step S2403, step S2404, step S2405, or step S2406 is performed according to the processing status.

ステップS2401の判別の結果、その処理ステータスが”3”であれば、その着目しているオープンファイル情報内のエントリ情報中の開始クラスタ番号のFATエントリから始まり、内容が0xFFFであるFATエントリまで続くリンクをサブFATから探して、それらのFATエントリの内容をメインFATの同じクラスタに対応するFATエントリにコピーし、そのサブFAT中のそれらのFATエントリの内容を0にクリアし、処理ステータスに”4”を設定する(ステップS2402)。   If the processing status is “3” as a result of the determination in step S2401, the processing starts from the FAT entry of the start cluster number in the entry information in the open file information of interest and continues to the FAT entry whose content is 0xFFF. Search for links from the sub-FAT, copy the contents of those FAT entries to the FAT entry corresponding to the same cluster of the main FAT, clear the contents of those FAT entries in the sub-FAT to 0, and set the processing status to “ 4 ″ is set (step S2402).

またステップS2401の判別の結果、処理ステータスが”4”である場合、又は、ステップS2402を実行した後に、複合情報処理装置は、着目しているオープンファイル情報内のエントリ情報の復元情報が示すところの、更新前のファイル内容を構成するデータの開始クラスタ番号を得て、その開始クラスタ番号に対応するメインFAT上のFATエントリからリンクされているFATエントリ内の値を全て0クリアし、リンクを解放し、処理ステータスに”5”を設定する(ステップS2403)。   When the processing status is “4” as a result of the determination in step S2401, or after executing step S2402, the composite information processing apparatus indicates the restoration information of the entry information in the open file information of interest. The start cluster number of the data constituting the file contents before update is obtained, all the values in the FAT entry linked from the FAT entry on the main FAT corresponding to the start cluster number are cleared to 0, and the link is It is released and “5” is set in the processing status (step S2403).

ステップS2401の判別の結果、処理ステータスが”12”であれば、その着目しているオープンファイル情報内の復元情報における新リンク開始クラスタ番号を参照して、メインFAT上のそのクラスタ番号に対応するFATエントリから始まるリンクを解放し処理ステータスに”11”を設定する(ステップS2404)。
ステップS2401の判別の結果、処理ステータスが”13”であれば、その着目しているオープンファイル情報内の復元情報における更新開始クラスタ番号を参照して、メインFAT上のそのクラスタ番号に対応するFATエントリから始まるリンクを解放し、処理ステータスに”14”を設定する(ステップS2405)。
As a result of the determination in step S2401, if the processing status is “12”, the new link start cluster number in the restoration information in the focused open file information is referred to and corresponds to the cluster number on the main FAT. The link starting from the FAT entry is released and “11” is set in the processing status (step S2404).
If the processing status is “13” as a result of the determination in step S2401, the update start cluster number in the restoration information in the focused open file information is referred to, and the FAT corresponding to the cluster number on the main FAT is displayed. The link starting from the entry is released, and “14” is set in the processing status (step S2405).

ステップS2403、ステップS2404又はステップS2405が終了した後、或いは着目しているオープンファイル情報の処理ステータスが”0”、”1”、”2”、”5”、”11”、”14”のいずれかであった場合には、複合情報処理装置は、全てのオープンファイル情報について既に着目したか否かを判定し(ステップS2406)、未着目のオープンファイル情報があればそれに着目してステップS2401に戻って処理を行い、全てのオープンファイル情報に着目済みであれば、RAM内のメインFATの内容を、情報記録媒体360内のFAT1及びFAT2にコピーする(ステップS2407)。   After step S2403, step S2404, or step S2405 is completed, or the processing status of the open file information of interest is any of “0”, “1”, “2”, “5”, “11”, “14” If it is, the composite information processing apparatus determines whether or not all open file information has already been focused (step S2406), and if there is unfocused open file information, focuses on that and proceeds to step S2401. Returning to the process, if all the open file information has been focused, the contents of the main FAT in the RAM are copied to the FAT1 and FAT2 in the information recording medium 360 (step S2407).

ステップS2407に続いて複合情報処理装置は、全てのオープンファイル情報の中から処理ステータスが”5”又は”14”であるものを検索して、検索した全てのオープンファイル情報についての各エントリ情報を、情報記録媒体360中の対応するファイルのディレクトリエントリに反映させるよう書込みを行い(ステップS2408)、復元処理を終了する。
<実施形態4>
<構成及び利用データ>
図30は、本発明の実施形態4に係る情報処理装置の構成図である。
Subsequent to step S2407, the composite information processing apparatus retrieves all pieces of open file information having a processing status of “5” or “14”, and obtains each entry information for all of the retrieved open file information. Then, writing is performed so as to be reflected in the directory entry of the corresponding file in the information recording medium 360 (step S2408), and the restoration process is terminated.
<Embodiment 4>
<Configuration and usage data>
FIG. 30 is a configuration diagram of an information processing apparatus according to the fourth embodiment of the present invention.

実施形態4に係る情報処理装置2300は、例えば携帯情報端末(PDA)や携帯電話機等であり、例えば、SDメモリカード等の半導体メモリカードである情報記録媒体2370を装着するためのスロットを備えており、装着された情報記録媒体2370中のファイルを編集して更新する機能を有する。なお、SDメモリカードは、松下電器産業(株)、米国サンディスク社、(株)東芝の商標である。   The information processing apparatus 2300 according to the fourth embodiment is, for example, a personal digital assistant (PDA) or a mobile phone, and includes a slot for mounting an information recording medium 2370 that is a semiconductor memory card such as an SD memory card. And has a function of editing and updating a file in the loaded information recording medium 2370. SD memory card is a trademark of Matsushita Electric Industrial Co., Ltd., SanDisk Corporation of the United States, and Toshiba Corporation.

情報処理装置2300に装着される情報記録媒体2370は、媒体識別子(媒体ID)2371を含んでおり、記録領域として認証領域2372と通常領域2376とを有しており、更に外部との認証やデータの授受に関する制御を行う制御部2780を有している。認証領域は、情報処理装置2300との間で相互認証を行うために必要なファイル等を記録する領域であって所定のアクセス制限がかけられている領域であり、通常領域は、認証以外に用いられ特にアクセス制限がかけられておらず、画像や音声その他のデータで構成されるファイルを記録する領域である。   An information recording medium 2370 attached to the information processing apparatus 2300 includes a medium identifier (medium ID) 2371, and has an authentication area 2372 and a normal area 2376 as recording areas, and further authentication and data from the outside. Has a control unit 2780 for performing control related to the exchange of information. The authentication area is an area for recording files and the like necessary for mutual authentication with the information processing apparatus 2300 and is subjected to predetermined access restrictions. The normal area is used for purposes other than authentication. This is an area for recording a file made up of images, sounds and other data, with no particular access restrictions.

認証領域2372及び通常領域2376はそれぞれその領域内部に記録されているデータがFATファイルシステムにより管理されており、認証領域2372は、FAT2373、ルートディレクトリエントリ2374及びデータ領域2375を含み、通常領域2376は、FAT2377、ルートディレクトリエントリ2378及びデータ領域2379を含む。   Data recorded in the authentication area 2372 and the normal area 2376 are managed by the FAT file system. The authentication area 2372 includes a FAT 2373, a root directory entry 2374, and a data area 2375. , FAT 2377, root directory entry 2378, and data area 2379.

この情報処理装置2300は、図30に示すように、CPU310、主電源320、不揮発性メモリ2330、RAM2340、補助電源350を備え、また特に図示はしていないが、キーやボタン等を介してユーザ操作を受け付ける入力インタフェースや、ユーザに情報を提示するためのディスプレイ等をも備えている。なお、情報処理装置2300の構成要素のうち、情報処理装置300と構成要素と同じものには図5と同じ符号で示しており、ここでは詳しい説明は省略する。   As shown in FIG. 30, the information processing apparatus 2300 includes a CPU 310, a main power source 320, a non-volatile memory 2330, a RAM 2340, and an auxiliary power source 350. An input interface for accepting operations and a display for presenting information to the user are also provided. Of the constituent elements of the information processing apparatus 2300, the same constituent elements as those of the information processing apparatus 300 are denoted by the same reference numerals as in FIG. 5, and detailed description thereof is omitted here.

ここで、不揮発性メモリ2330は、CPU310上で動作するプログラムを格納しているメモリであり、特に、情報記録媒体2370からその媒体固有の媒体IDを取得するための媒体ID取得プログラム2331と、認証領域におけるファイルの更新及び復元に関する処理を実現するための認証ファイル処理プログラム2332と、通常領域におけるファイルの更新及び復元に関する処理を実現するための通常ファイル処理プログラム2333とを格納しており、図示しないアプリケーションプログラムやシステムプログラム等も格納している。   Here, the non-volatile memory 2330 is a memory storing a program that operates on the CPU 310, and in particular, a medium ID acquisition program 2331 for acquiring a medium ID unique to the medium from the information recording medium 2370, and an authentication An authentication file processing program 2332 for realizing processing related to file update and restoration in the area and a normal file processing program 2333 for realizing processing relating to file update and restoration in the normal area are stored, not shown. Application programs and system programs are also stored.

RAM2340は、電池等である補助電源350から常時電力の供給を受けてデータを常時保持するメモリであり、たとえ主電源320から情報処理装置2300の各部への電力供給が停止したとしてもこのRAM2340内のデータは保持され続ける。
このRAM2340内には、情報記録媒体2370から媒体ID取得プログラム2331により取得された媒体IDを値として設定される媒体情報2341と、認証領域におけるデータの物理的な格納位置を示す認証メインFAT2342と、ファイルの更新により新たに認証領域に記録されたデータの物理的な格納位置を示す認証サブFAT2343と、通常領域におけるデータの更新作業に用いるための通常メインFAT2345と、認証領域内の更新対象のファイル毎に対応した認証オープンファイル情報2344と、通常領域内の更新対象のファイル毎に対応した通常オープンファイル情報2346とが格納される。認証メインFAT2342、認証サブFAT2343及び通常メインFAT2345は、情報記録媒体360におけるクラスタ単位でのデータの格納位置を示すことになる。
The RAM 2340 is a memory that constantly receives power from the auxiliary power supply 350 such as a battery and constantly holds data. Even if the power supply from the main power supply 320 to each part of the information processing apparatus 2300 is stopped, the RAM 2340 Data will continue to be retained.
In the RAM 2340, medium information 2341 set with a medium ID acquired from the information recording medium 2370 by the medium ID acquisition program 2331 as a value, an authentication main FAT 2342 indicating a physical storage position of data in the authentication area, Authentication sub FAT 2343 indicating the physical storage location of data newly recorded in the authentication area by updating the file, normal main FAT 2345 for use in data update work in the normal area, and the file to be updated in the authentication area Authentication open file information 2344 corresponding to each file and normal open file information 2346 corresponding to each file to be updated in the normal area are stored. The authentication main FAT 2342, the authentication sub FAT 2343, and the normal main FAT 2345 indicate the storage positions of data in cluster units in the information recording medium 360.

ここで、認証オープンファイル情報2344は、実施形態1で示したオープンファイル情報343と同様のデータ形式であり、エントリ情報2361、処理ステータス2362及び復元情報2363を含む。また、通常オープンファイル情報2346は、実施形態2で示したオープンファイル情報1343と同様のデータ形式であり、エントリ情報2364、処理ステータス2365及び復元情報2366を含む。   Here, the authentication open file information 2344 has the same data format as the open file information 343 shown in the first embodiment, and includes entry information 2361, processing status 2362, and restoration information 2363. The normal open file information 2346 has the same data format as the open file information 1343 shown in the second embodiment, and includes entry information 2364, a processing status 2365, and restoration information 2366.

<動作>
以下、上述した情報処理装置2300の動作について説明する。
情報処理装置2300は、CPU310による各プログラムの実行により、ユーザによる電源ボタンの押下等に対応して主電源320が電力の供給を開始した時点つまり装置が起動された時点から、前回の起動時においてファイルの更新が完了しないで電源断等により異常終了していた場合には後述の復元処理を実行し、その後に情報記録媒体2370が装着されている状態になったときに、更新準備処理を行い、その後に、各ファイルについて、更新処理を行う。
<Operation>
Hereinafter, the operation of the information processing apparatus 2300 will be described.
The information processing apparatus 2300 starts from the time when the main power supply 320 starts to supply power in response to the user pressing the power button or the like by the execution of each program by the CPU 310, that is, from the time when the apparatus is activated, If the file update is not completed and the process is abnormally terminated due to a power interruption or the like, the restoration process described later is executed, and then the update preparation process is performed when the information recording medium 2370 is mounted. Thereafter, update processing is performed for each file.

なお、更新準備処理として、情報処理装置2300は、情報記録媒体2370が装着されている状態になったときに、まずCPU310により媒体ID取得プログラム2331を実行し、この媒体ID取得プログラム2331の実行により、情報処理装置2300は、情報記録媒体2370の制御部2780との間で予め定められた認証手順に従って相互認証を行い、認証に成功した場合即ち、正当な情報処理装置と正当な情報記録媒体との関係が満たされた場合に、制御部2780を介して情報記録媒体2370中の媒体ID2371を取得してRAM2340に媒体情報2341として格納する。続いて更新準備処理として、情報処理装置2300は、情報記録媒体2370中のFAT2373をRAM2340中の認証メインFAT2342にコピーして、情報記録媒体2370中のFAT2377をRAM2340中の通常メインFAT2345にコピーして、認証オープンファイル情報の内容及び通常オープンファイル情報の内容を全て無効化する。   As the update preparation process, the information processing apparatus 2300 first executes the medium ID acquisition program 2331 by the CPU 310 when the information recording medium 2370 is loaded, and the execution of the medium ID acquisition program 2331 The information processing apparatus 2300 performs mutual authentication according to a predetermined authentication procedure with the control unit 2780 of the information recording medium 2370, and when the authentication is successful, that is, a legitimate information processing apparatus and a legitimate information recording medium When the above relationship is satisfied, the medium ID 2371 in the information recording medium 2370 is acquired via the control unit 2780 and stored in the RAM 2340 as the medium information 2341. Subsequently, as an update preparation process, the information processing apparatus 2300 copies the FAT 2373 in the information recording medium 2370 to the authentication main FAT 2342 in the RAM 2340, and copies the FAT 2377 in the information recording medium 2370 to the normal main FAT 2345 in the RAM 2340. The contents of the authentication open file information and the contents of the normal open file information are all invalidated.

また、更新処理としては、情報処理装置2300は、認証領域中のファイルを更新対象とする場合には、認証メインFAT2342、認証サブFAT2343及び認証オープンファイル情報2344を用いて、認証ファイル処理プログラム2332の実行により、実施形態1で示した更新処理と同様の処理を行う(図7、図8、図10、図12、図17参照)。ここで、認証メインFAT2342は、メインFAT341に対応し、認証サブFAT2343はサブFAT342に対応し、認証オープンファイル情報2344はオープンファイル情報343に対応する。また、情報処理装置2300は、通常領域中のファイルを更新対象とする場合には、通常メインFAT2345及び通常オープンファイル情報2346を用いて、通常ファイル処理プログラム2333の実行により、実施形態2で示した更新処理と同様の処理を行う(図21〜図23、図27参照)。ここで、通常メインFAT2345は、メインFAT1341に対応し、通常オープンファイル情報2346はオープンファイル情報1343に対応する。   As the update process, the information processing apparatus 2300 uses the authentication main FAT 2342, the authentication sub FAT 2343, and the authentication open file information 2344 to update the file in the authentication area. By execution, the same process as the update process shown in the first embodiment is performed (see FIGS. 7, 8, 10, 12, and 17). Here, the authentication main FAT 2342 corresponds to the main FAT 341, the authentication sub FAT 2343 corresponds to the sub FAT 342, and the authentication open file information 2344 corresponds to the open file information 343. Further, when a file in the normal area is to be updated, the information processing apparatus 2300 uses the normal main FAT 2345 and the normal open file information 2346 to execute the normal file processing program 2333, which is described in the second embodiment. Processing similar to the update processing is performed (see FIGS. 21 to 23 and FIG. 27). Here, the normal main FAT 2345 corresponds to the main FAT 1341, and the normal open file information 2346 corresponds to the open file information 1343.

以下、情報処理装置2300において実行される復元処理について説明する。
復元処理は、前回の起動中に主電源の遮断等によりファイル更新が完了しないで途中において停止していた場合に、次に主電源から電力が供給できるようになった後、例えば主電源である電池が再充電されてユーザにより電源オンにする操作がなされた後、に実行される処理である。
Hereinafter, the restoration process executed in the information processing apparatus 2300 will be described.
The restoration process is, for example, the main power supply after the power supply can be supplied next from the main power supply when the file update is not completed due to the main power shutoff etc. This process is executed after the battery is recharged and the user turns on the power.

図31は、情報処理装置2300による復元処理を示すフローチャートである。
情報処理装置2300は、復元処理を開始すると、まず、情報記録媒体2370から制御部2780を介して媒体IDを読み出し(ステップS3101)、その読み出した媒体IDと、前回の起動中になされた更新準備処理によりRAM2340に格納されている媒体情報2341とを比較し、両者が一致するかを判定する(ステップS3102)。もし一致しなければ、前回、ファイルの更新を行った情報記録媒体と別個の情報記録媒体が現在装着されていることになるので、特にファイルの復元をすることなく、復元処理を終了する。
FIG. 31 is a flowchart showing restoration processing by the information processing apparatus 2300.
When the information processing apparatus 2300 starts the restoration process, the information processing apparatus 2300 first reads the medium ID from the information recording medium 2370 via the control unit 2780 (step S3101), and the read medium ID and the update preparation made during the previous activation. The medium information 2341 stored in the RAM 2340 is compared with the processing, and it is determined whether or not they match (step S3102). If they do not coincide with each other, an information recording medium that is different from the information recording medium in which the file was updated last time is currently mounted, and thus the restoration process is terminated without particularly restoring the file.

また、ステップS3102において、両者が一致すると判定した場合には、情報処理装置2300は、認証ファイル処理プログラム2332の一部を実行して認証領域についての復元処理を実施する(ステップS3103)。このステップS3103における認証領域についての復元処理は、実施形態1で示した復元処理(図19参照)と同様の処理である。   If it is determined in step S3102 that the two match, the information processing apparatus 2300 executes a part of the authentication file processing program 2332 and performs restoration processing for the authentication area (step S3103). The restoration process for the authentication area in step S3103 is the same as the restoration process (see FIG. 19) described in the first embodiment.

ステップS3103に続いて、情報処理装置2300は、通常ファイル処理プログラム2333の一部を実行して通常領域についての復元処理を実施する(ステップS3104)。このステップS3104における通常領域についての復元処理は、実施形態2で示した復元処理(図28参照)と同様の処理である。
<変形例>
以下、実施形態1〜4で示した情報処理装置における復元処理の変形例について説明する。
Subsequent to step S3103, the information processing apparatus 2300 executes a part of the normal file processing program 2333 to perform restoration processing for the normal area (step S3104). The restoration process for the normal area in step S3104 is the same process as the restoration process (see FIG. 28) shown in the second embodiment.
<Modification>
Hereinafter, modified examples of the restoration process in the information processing apparatus described in the first to fourth embodiments will be described.

図32は、復元処理の変形例である復元選択処理を示すフローチャートである。
実施形態1〜4で示した復元処理を、図32の復元選択処理に置き換えることができる。
この変形例に係る情報処理装置(以下、「変形情報処理装置」という。)は、RAM内の全てのオープンファイル情報における処理ステータスが0であるか否かを判定し(ステップS3201〜S3203)、いずれも0であれば更新処理が途中で停止したのではないことを意味するので、復元選択処理を終了する。
FIG. 32 is a flowchart illustrating a restoration selection process that is a modification of the restoration process.
The restoration process shown in the first to fourth embodiments can be replaced with the restoration selection process of FIG.
The information processing apparatus according to this modification (hereinafter referred to as “modified information processing apparatus”) determines whether or not the processing status in all open file information in the RAM is 0 (steps S3201 to S3203). If both are 0, it means that the update process is not stopped halfway, and the restoration selection process is terminated.

また、1つでも処理ステータスが0以外のオープンファイル情報があれば、変形情報処理装置は、復元用の情報が存在する旨をディスプレイに表示し(ステップS3204)、復元を実行するか復元用の情報を破棄するかをユーザに選択させるための表示を行って、ユーザからその選択を受け付ける(ステップS3205)。なお、復元用の情報は、RAM上のメインFATとオープンファイル情報と、もし存在すればサブFATとである。   If there is at least one open file information whose processing status is other than 0, the modified information processing apparatus displays on the display that information for restoration exists (step S3204), and executes restoration or restoration information. A display for allowing the user to select whether to discard the information is performed, and the selection is accepted from the user (step S3205). The information for restoration includes the main FAT and open file information on the RAM, and the sub FAT if present.

受け付けた選択が、復元する旨であれば(ステップS3206)、変形情報処理装置は、各実施形態において示した復元処理を実行し(ステップS3207)、復元選択処理を終了する。また、受け付けた選択が、復元用の情報を破棄する旨であれば、変形情報処理装置は、復元用の情報を0でクリアし(ステップS3208)、復元選択処理を終了する。   If the accepted selection is to restore (step S3206), the modified information processing apparatus executes the restoration process shown in each embodiment (step S3207) and ends the restoration selection process. If the received selection is to discard the restoration information, the modified information processing apparatus clears the restoration information with 0 (step S3208) and ends the restoration selection process.

このように、復元選択処理によれば、ユーザが復元の実行可否を選択できるので、更新の際と復元の際とで情報記録媒体が相違するような場合や、更新後に情報記録媒体が一旦取り外されて他の情報処理装置によって書き換えられて再度もとの情報処理装置に装着されたような場合等、つまり復元処理が有効に機能しない場合において、復元処理が実行されることをユーザが抑止することができるようになる。
<補足>
以上、本発明に係るファイル更新装置について、実施形態に基づいて説明したが、本発明は、勿論これらの実施形態に限られない。以下、実施形態の変形に関して説明する。
(1)実施形態1では、ファイルの更新後であってもクローズ指示取得前であれば、復元処理においてその更新後のファイル内容を構成するデータの位置を示すように情報記録媒体中のFATやディレクトリエントリの更新を実施することはない例を示したが、クローズ指示取得前であっても更新後のファイル内容を構成するデータの位置を示すようにRAM内のサブFAT情報やオープンファイル情報が記録されていれば、復元処理においてその更新後のデータ位置を示すようにFATやディレクトリエントリを更新することとしてもよいし、更新途中で停止した際の進行状況がクローズ指示取得前であったとしても、復元処理においてファイル内容の更新をFAT等に反映するか、それとも反映させないかをユーザに選択させて、その選択に応じた復元を行うこととしてもよい。
(2)実施形態1等で示した主電源320は、充電式電池に限られず、家屋の壁コンセントから電力を取得してその電力を情報処理装置300内の各部及び情報記録媒体360に供給する機構であることとしてもよい。また、補助電源350も、主電源320とは独立して電力を供給することができる電源であれば、必ずしも一次電池である必要はない。
(3)実施形態1等では、ファイルシステムとしてFATファイルシステムを使用する場合におけるファイルの更新及び復元の方法を示したが、ファイルシステムはこれに限定されることなく例えばFAT32ファイルシステム等を使用する場合にも同様の更新及び復元の方法を用いることができる。また、情報記録媒体の記憶容量は64MBに限られることはなく、1クラスタのサイズも16KBに限られることはない。また、FATエントリの値として0が未使用のクラスタを示すこととしたが、0以外の数値をこの意味で用いることとしてもよく、また0xFFFがリンクの終端であるクラスタを示すこととしたが、0xFFF以外の数値をこの意味で用いることとしてもよい。
(4)実施形態1等では、補助電源により常時電源が供給されるRAM内に、復元用情報つまりファイルの復元に必要な情報を、保持することとしたが、主電源に電源が供給されない状態でも、保持している復元用情報が消えないようなものであれば、他の種類の記録媒体、例えば不揮発性メモリ等に、復元用情報を保持することとしてもよい。
As described above, according to the restoration selection process, the user can select whether or not restoration can be executed. Therefore, when the information recording medium is different between the update and the restoration, or the information recording medium is temporarily removed after the update. The user prevents the restoration process from being executed when it is rewritten by another information processing apparatus and attached to the original information processing apparatus again, that is, when the restoration process does not function effectively. Will be able to.
<Supplement>
The file updating apparatus according to the present invention has been described based on the embodiments. However, the present invention is not limited to these embodiments, of course. Hereinafter, modifications of the embodiment will be described.
(1) In the first embodiment, even after the file is updated, if the close instruction has not been acquired, the FAT or the like in the information recording medium indicates the position of the data constituting the updated file content in the restoration process. Although an example in which the directory entry is not updated is shown, the sub FAT information and the open file information in the RAM indicate the position of the data constituting the updated file contents even before the close instruction is acquired. If recorded, it is possible to update the FAT or directory entry so as to indicate the updated data position in the restoration process, and it is assumed that the progress status when stopping in the middle of the update was before obtaining the close instruction. In the restoration process, the user can select whether or not to update the file contents in the FAT, etc. Restoration may be performed in accordance with.
(2) The main power source 320 shown in the first embodiment or the like is not limited to a rechargeable battery, and acquires power from a wall outlet of a house and supplies the power to each unit in the information processing apparatus 300 and the information recording medium 360. It may be a mechanism. The auxiliary power supply 350 is not necessarily a primary battery as long as it can supply power independently of the main power supply 320.
(3) In the first embodiment and the like, a file update and restoration method in the case where the FAT file system is used as the file system has been described. However, the file system is not limited to this, and for example, the FAT32 file system is used. In this case, the same update and restoration method can be used. Further, the storage capacity of the information recording medium is not limited to 64 MB, and the size of one cluster is not limited to 16 KB. Further, although 0 indicates an unused cluster as the value of the FAT entry, a numerical value other than 0 may be used in this sense, and 0xFFF indicates a cluster at the end of the link. Numerical values other than 0xFFF may be used in this sense.
(4) In the first embodiment and the like, the restoration information, that is, the information necessary for restoring the file is held in the RAM to which the power is always supplied by the auxiliary power, but the power is not supplied to the main power supply. However, as long as the stored restoration information is not lost, the restoration information may be held in another type of recording medium, such as a nonvolatile memory.

また、情報記録媒体は、フラッシュメモリであってもよい。特に、情報記録媒体がフラッシュメモリであって、復元用情報を格納するメモリは、そのフラッシュメモリよりアクセスが高速にできるものであれば、フラッシュメモリ中のファイルの更新の際において、復元のためだけに有用な情報の記録に要する時間を、より短くすることが可能になる。
(5)実施形態2では、ファイル先頭から上書き更新する場合について説明したが(図23参照)、ファイル内の任意の位置を上書き更新する場合、或いはファイルにデータを追記する場合についても同様の手順で処理することとしてもよい。
The information recording medium may be a flash memory. In particular, if the information recording medium is a flash memory and the memory for storing restoration information can be accessed faster than the flash memory, it can be used only for restoration when updating the file in the flash memory. It is possible to shorten the time required for recording useful information.
(5) In the second embodiment, the case of overwriting and updating from the beginning of the file has been described (see FIG. 23). However, the same procedure is applied to overwriting and updating an arbitrary position in the file, or when adding data to the file. It is good also as processing with.

また、実施形態2では、ファイル更新処理において、新データ書込み用に空き領域を取得し、新データを書込む場合について説明したが、一旦ファイル更新処理が開始された後は、古いデータを破壊しても構わないときに、空き領域を取得せずに古いデータの上に直接上書きをしてもよい。
(6)実施形態4では情報記録媒体から媒体IDを取得して、更新の際と復元の際とで情報処理装置に装着されている記録媒体が同一のものであるか否かを判定することとしたが、個々の情報記録媒体に固有な媒体IDに限られず、情報記録媒体の特定位置に格納されている情報のハッシュ値等を用いて記録媒体の同一性を判定することとしてもよい。
(7)実施形態1〜4及び変形例で示した情報処理装置の処理手順(図7等のフローチャートに示した手順等)を、コンピュータ等に実行させるためのコンピュータプログラムを、記録媒体に記録し又は各種通信路等を介して、流通させ頒布することもできる。このような記録媒体には、ICカード、光ディスク、フレキシブルディスク、ROM等がある。流通、頒布されたコンピュータプログラムは、コンピュータ等にインストール等されることにより利用に供され、そのコンピュータ等は当該コンピュータプログラムを実行して、実施形態1〜4や変形例で示したような更新処理、復元処理、復元選択処理等を行うことができるようになる。
In the second embodiment, a case has been described in the file update process where a free area is acquired for writing new data and new data is written. However, once the file update process is started, old data is destroyed. When it does not matter, the old data may be directly overwritten without acquiring the free space.
(6) In the fourth embodiment, the medium ID is acquired from the information recording medium, and it is determined whether the recording medium loaded in the information processing apparatus is the same when updating and when restoring. However, it is not limited to the medium ID unique to each information recording medium, and the identity of the recording medium may be determined using a hash value of information stored at a specific position of the information recording medium.
(7) A computer program for causing a computer or the like to execute the processing procedure of the information processing apparatus shown in Embodiments 1 to 4 and the modification (the procedure shown in the flowchart of FIG. 7 and the like) is recorded on a recording medium. Alternatively, it can be distributed and distributed via various communication paths. Examples of such a recording medium include an IC card, an optical disk, a flexible disk, and a ROM. The computer program distributed and distributed is used by being installed in a computer or the like, and the computer or the like executes the computer program to perform update processing as shown in the first to fourth embodiments or the modified examples. , Restoration processing, restoration selection processing, and the like can be performed.

本発明に係るファイル更新装置は、記録媒体に記録されているファイルの更新途中において電源断等で更新が停止してしまった場合において、適切にファイルを復元することを可能にする装置であり、ファイルを扱う各種の情報処理装置において利用可能である。   The file update apparatus according to the present invention is an apparatus that enables appropriate restoration of a file when the update is stopped due to a power interruption or the like during the update of the file recorded on the recording medium, It can be used in various information processing apparatuses that handle files.

あるFATファイルシステムにおける記憶領域内のデータ構造を示す図である。It is a figure which shows the data structure in the storage area in a certain FAT file system. ファイルの管理情報であるディレクトリエントリを示す図である。It is a figure which shows the directory entry which is the management information of a file. FATを示す図である。It is a figure which shows FAT. ファイル内容を構成するデータを示す図である。It is a figure which shows the data which comprise file content. 本発明の実施形態1に係る情報処理装置の構成図である。It is a block diagram of the information processing apparatus which concerns on Embodiment 1 of this invention. 情報記録媒体360の内容例、及び、更新準備処理がなされた後におけるRAM340の内容例を示す図である。It is a figure which shows the example of the content of the information recording medium 360, and the example of the content of RAM340 after an update preparation process was made. 情報処理装置300による更新処理の概要を示すフローチャートである。5 is a flowchart illustrating an overview of update processing by the information processing apparatus 300. 情報処理装置300によるオープン処理を示すフローチャートである。5 is a flowchart showing an open process by the information processing apparatus 300. オープン処理後のデータ状態を例示する図である。It is a figure which illustrates the data state after an open process. 情報処理装置300による更新後データ記録処理を示すフローチャートである。10 is a flowchart showing post-update data recording processing by the information processing apparatus 300. 更新後データ記録処理後のデータ状態を例示する図である。It is a figure which illustrates the data state after the data recording process after an update. 情報処理装置300によるクローズ処理を示すフローチャートである。5 is a flowchart illustrating a closing process by the information processing apparatus 300. クローズ処理におけるステップS903の実行後のデータ状態を例示する図である。It is a figure which illustrates the data state after execution of step S903 in a close process. 複数のファイルが更新対象とされ、並行的に、更新処理が実施されている状況におけるメインFATの更新の様子を示す図である。It is a figure which shows the mode of the update of main FAT in the condition where several files are made into update object and the update process is implemented in parallel. クローズ処理におけるステップS905の実行後のデータ状態を例示する図である。It is a figure which illustrates the data state after execution of step S905 in a close process. クローズ処理が終了後のデータ状態を例示する図である。It is a figure which illustrates the data state after a close process is complete | finished. 情報処理装置300による管理情報記録処理を示すフローチャートである。5 is a flowchart showing management information recording processing by the information processing apparatus 300. 管理情報記録処理の実行後のデータ状態を例示する図である。It is a figure which illustrates the data state after execution of management information recording processing. 情報処理装置300による復元処理を示すフローチャートである。10 is a flowchart illustrating a restoration process by the information processing apparatus 300. 本発明の実施形態2に係る情報処理装置の構成図である。It is a block diagram of the information processing apparatus which concerns on Embodiment 2 of this invention. 情報処理装置1300による更新処理の概要を示すフローチャートである。12 is a flowchart illustrating an overview of update processing by the information processing apparatus 1300. 情報処理装置1300によるオープン処理を示すフローチャートである。12 is a flowchart illustrating an open process by the information processing apparatus 1300. 情報処理装置1300によるファイル更新処理を示すフローチャートである。12 is a flowchart illustrating file update processing by the information processing apparatus 1300. ファイル更新処理におけるステップS1703の実行後のデータ状態を例示する図である。It is a figure which illustrates the data state after execution of step S1703 in a file update process. ファイル更新処理におけるステップS1707の実行後のデータ状態を例示する図である。It is a figure which illustrates the data state after execution of step S1707 in a file update process. ファイル更新処理が完了した後のデータ状態を例示する図である。It is a figure which illustrates the data state after a file update process is completed. 情報処理装置1300による管理情報記録処理を示すフローチャートである。11 is a flowchart showing management information recording processing by the information processing apparatus 1300. 情報処理装置1300による復元処理を示すフローチャートである。10 is a flowchart illustrating restoration processing by the information processing apparatus 1300. 複合情報処理装置による復元処理を示すフローチャートである。It is a flowchart which shows the decompression | restoration process by a composite information processing apparatus. 本発明の実施形態4に係る情報処理装置の構成図である。It is a block diagram of the information processing apparatus which concerns on Embodiment 4 of this invention. 情報処理装置2300による復元処理を示すフローチャートである。10 is a flowchart showing restoration processing by the information processing apparatus 2300. 復元処理の変形例である復元選択処理を示すフローチャートである。It is a flow chart which shows restoration selection processing which is a modification of restoration processing.

符号の説明Explanation of symbols

300、1300、2300 情報処理装置
310 CPU
320 主電源
330、1330、2330 不揮発性メモリ
331、1331 ファイル処理プログラム
340、1340、2340 RAM
341、1341 メインFAT
342 サブFAT
343、1343 オープンファイル情報
344、1344、2361、2364 エントリ情報
345、1345、2362、2365 処理ステータス
346、1346、2363、2366 復元情報
350 補助電源
360、2370 情報記録媒体
361 パーティションテーブル
362 パーティションブートセクタ
363、364、2373、2377 FAT
365、2374、2378 ルートディレクトリエントリ
366、2375、2379 データ領域
2331 媒体ID取得プログラム
2332 認証ファイル処理プログラム
2333 通常ファイル処理プログラム
2341 媒体情報
2342 認証メインFAT
2343 認証サブFAT
2344 認証オープンファイル情報
2345 通常メインFAT
2346 通常オープンファイル情報
2371 媒体ID
2372 認証領域
2376 通常領域
2780 制御部
300, 1300, 2300 Information processing device 310 CPU
320 Main power supply 330, 1330, 2330 Non-volatile memory 331, 1331 File processing program 340, 1340, 2340 RAM
341, 1341 Main FAT
342 Sub FAT
343, 1343 Open file information 344, 1344, 2361, 2364 Entry information 345, 1345, 2362, 2365 Processing status 346, 1346, 2363, 2366 Restoration information 350 Auxiliary power supply 360, 2370 Information recording medium 361 Partition table 362 Partition boot sector 363 364, 2373, 2377 FAT
365, 2374, 2378 Root directory entry 366, 2375, 2379 Data area 2331 Medium ID acquisition program 2332 Authentication file processing program 2333 Normal file processing program 2341 Medium information 2342 Authentication main FAT
2343 Authentication Sub FAT
2344 Authentication open file information 2345 Normal main FAT
2346 Normal open file information 2371 Medium ID
2372 Authentication area 2376 Normal area 2780 Control unit

Claims (12)

第1記録媒体中の全ファイルそれぞれについてファイル内容を構成するデータの第1記録媒体中の格納位置を示す位置情報を記録してある第1記録媒体を着脱可能であり、第1記録媒体中の複数のファイルを複数の更新手順を経て更新するファイル更新装置であって、
第2記録媒体と、
どの更新手順まで実施済みであるかを示す進行情報を更新対象とされたファイル毎に第2記録媒体中に記録する進行記録手段と、
更新前のファイル内容を構成するデータとは別に、更新対象とされた複数のファイルそれぞれについて、更新後のファイル内容を構成するデータを第1記録媒体中に記録する新データ記録手段と、
前記新データ記録手段により記録された更新後のファイルそれぞれについて、ファイル内容を構成するデータについての第1記録媒体中の格納位置を示す更新情報を第2記録媒体中に記録する更新情報記録手段と、
更新後のファイルそれぞれに対応して、更新後のファイル内容を構成するデータについて前記更新情報記録手段により更新情報が記録された後に、当該更新情報に基づいて、当該データについての第1記録媒体中の格納位置を示すように、当該ファイルの更新前の内容を構成するデータの格納位置を示している第1記録媒体中の位置情報を更新する位置情報更新手段と
第1記録媒体中の複数のファイルについて複数の更新手順を経てなされる更新の途中で更新の実行が不可能な状態になったことにより更新が停止した後に、更新の実行が可能な状態になった場合において、複数のファイルそれぞれについて、更新後のファイル内容を構成するデータについて更新情報が記録された後であるか否かを進行情報に基づき判定し、判定結果が肯定的なときには、当該更新情報に基づいて、当該データについての第1記録媒体中の格納位置を示すように第1記録媒体中の位置情報を更新する再更新手段とを備える
ことを特徴とするファイル更新装置。
The first recording medium in which the position information indicating the storage position in the first recording medium of the data constituting the file contents for each of all the files in the first recording medium is removable. A file update device for updating a plurality of files through a plurality of update procedures,
A second recording medium;
Progress recording means for recording progress information indicating which update procedure has been performed in the second recording medium for each file to be updated ;
A new data recording means for recording data constituting the updated file content in the first recording medium for each of a plurality of files to be updated separately from the data constituting the file content before the update,
Update information recording means for recording, in the second recording medium, update information indicating the storage position in the first recording medium of the data constituting the file contents for each of the updated files recorded by the new data recording means. ,
Corresponding to each of the updated files , after the update information is recorded by the update information recording means on the data constituting the updated file contents, in the first recording medium for the data based on the update information Position information updating means for updating the position information in the first recording medium indicating the storage position of the data constituting the content before the update of the file ,
A plurality of files in the first recording medium can be executed after the update is stopped because the update cannot be executed in the middle of the update performed through a plurality of update procedures. In this case, for each of a plurality of files, it is determined based on the progress information whether update information is recorded for the data constituting the updated file contents, and if the determination result is affirmative, the update is performed. A file update apparatus comprising: re-update means for updating position information in the first recording medium so as to indicate a storage position in the first recording medium for the data based on the information .
前記ファイル更新装置は、更に、
第1記録媒体中のファイルの更新前に、第1記録媒体から固有の媒体識別情報を読み出して自装置内に保持する媒体識別情報記録手段と、
自装置に装着されている記録媒体の媒体識別情報を読み出して、その読み出した媒体識別情報と前記保持している媒体識別情報とを照合して両者が不一致の場合には、前記再更新手段による位置情報の更新を抑止する再更新抑止手段とを備える
ことを特徴とする請求項記載のファイル更新装置。
The file update device further includes:
Medium identification information recording means for reading the unique medium identification information from the first recording medium and holding it in the apparatus before updating the file in the first recording medium;
When the medium identification information of the recording medium loaded in the apparatus is read and the read medium identification information and the held medium identification information are collated and they do not match, the re-update means file update apparatus according to claim 1, characterized in that it comprises a re-update suppressing unit for suppressing the update of the location information.
前記ファイル更新装置は、更に、前記新データ記録手段によりデータの記録がなされたファイルについてのクローズ指示を取得するクローズ指示取得手段を備え、
前記進行記録手段が記録する進行情報は、ファイルについてクローズ指示が取得された後であるか否かも識別可能な情報であり、
前記位置情報更新手段は、更新後のファイル内容を構成するデータについて前記更新情報が記録された後であってかつ前記クローズ指示取得手段により当該ファイルについてのクローズ指示が取得された後に限り、当該ファイルに係る更新情報に基づいて、第1記録媒体中の位置情報の更新を行い、
前記再更新手段は、第1記録媒体中の複数のファイルについて複数の更新手順を経てなされる更新の途中で更新の実行が不可能な状態になったことにより更新が停止した後に、更新の実行が可能な状態になった場合において、複数のファイルそれぞれについて、対応する進行情報に基づいて、更新後の当該ファイルに対応する更新情報が記録された後であってかつクローズ指示が取得された後であると判定できるときに限って、当該ファイルに係る更新情報に基づいて、第1記録媒体中の位置情報を更新する
ことを特徴とする請求項記載のファイル更新装置。
The file update apparatus further includes a close instruction acquisition unit that acquires a close instruction for a file in which data is recorded by the new data recording unit,
The progress information recorded by the progress recording means is information that can also be identified whether or not it is after a close instruction is acquired for a file,
The position information update means is the file only after the update information is recorded for the data constituting the updated file contents and after the close instruction for the file is acquired by the close instruction acquisition means. Updating the position information in the first recording medium based on the update information according to
The re-updating unit executes the update after the update is stopped due to a state in which the update cannot be performed in the middle of the update performed for the plurality of files in the first recording medium through the plurality of update procedures. After the update information corresponding to the updated file is recorded and the close instruction is acquired for each of a plurality of files based on the corresponding progress information only when it determined that, based on the update data relating to the file, the file update apparatus of claim 1, wherein updating the location information in the first recording medium.
前記第1記録媒体には、
第1記録媒体中のクラスタ毎に当該クラスタにいずれかのファイル内容を構成するデータが格納されているか否かを示し、かつ、同一ファイルの内容を構成するデータが格納されるクラスタ間に繋がりがあることを示すFAT情報と、
第1記録媒体中のファイル毎についての、当該ファイル内容を構成するデータの先頭が格納されるクラスタを示すディレクトリ情報とが記録されており、
前記第1記録媒体中の位置情報は、前記FAT情報のうち、いずれのファイル内容を構成するデータも格納されていないクラスタを示す部分である未使用クラスタ情報を除くものと、前記ディレクトリ情報とから構成されており、
前記更新情報記録手段が記録するファイルそれぞれについての前記更新情報は、前記新データ記録手段により記録された更新後の当該ファイルの内容を構成するデータが格納された第1記録媒体中のクラスタ間に繋がりがあることを示す連続関係情報と、更新後の当該ファイルの内容を構成するデータの先頭が格納されるクラスタを示すエントリ情報とから構成され、
前記位置情報更新手段は、前記更新情報記録手段により更新情報が記録されたところの各ファイルについて、
当該ファイルの内容を構成するデータに係る連続関係情報に基づいて、前記新データ記録手段により記録された更新後の当該ファイル内容を構成するデータが格納されたクラスタ間に繋がりがあることを示すようにFAT情報を更新し、かつ、
当該ファイルに係るエントリ情報に基づいて、更新後の当該ファイル内容を構成するデータの先頭が格納されるクラスタを示すように当該ファイルについてのディレクトリ情報を更新し、
前記再更新手段は、更新情報中の連続関係情報に基づいてFAT情報を更新し、かつ、更新情報中のエントリ情報に基づいてディレクトリ情報を更新することにより、位置情報を更新する
ことを特徴とする請求項記載のファイル更新装置。
In the first recording medium,
Each cluster in the first recording medium indicates whether or not data constituting any file content is stored in the cluster, and there is a connection between clusters in which data constituting the same file content is stored. FAT information indicating that there is,
For each file in the first recording medium, directory information indicating a cluster in which the head of data constituting the file content is stored is recorded,
The location information in the first recording medium includes the FAT information excluding unused cluster information which is a portion indicating a cluster in which no data constituting the file content is stored, and the directory information. Configured,
The update information for each file recorded by the update information recording means is between clusters in the first recording medium in which the data constituting the contents of the updated file recorded by the new data recording means is stored. Consists of continuous relationship information indicating that there is a connection, and entry information indicating a cluster in which the head of the data constituting the content of the updated file is stored,
The location information update means, for each file where the update information is recorded by the update information recording means,
Based on the continuity information relating to the data constituting the contents of the file, it indicates that there is a connection between the clusters in which the data constituting the updated file contents recorded by the new data recording means are stored. Updated FAT information, and
Based on the entry information related to the file, the directory information about the file is updated so as to indicate the cluster where the head of the data constituting the updated file content is stored,
The re-update means updates the location information by updating the FAT information based on the continuous relationship information in the update information, and updating the directory information based on the entry information in the update information. The file update apparatus according to claim 1 .
前記ファイル更新装置は、更に、
前記更新情報記録手段による更新後のファイル内容を構成するデータについての更新情報の記録後に、当該ファイルの更新前の内容を構成するデータが格納されていた第1記録媒体中のクラスタには、いずれかのファイル内容を構成するデータが格納されていないことを示す未使用情報を第2記録媒体に記録する未使用領域解放手段を備え、
前記位置情報更新手段は、FAT情報の更新を、前記未使用領域解放手段により記録された未使用情報を未使用クラスタ情報に反映するように行い、
前記再更新手段は、FAT情報の更新を、前記未使用情報を未使用クラスタ情報に反映するように行う
ことを特徴とする請求項記載のファイル更新装置。
The file update device further includes:
After recording the update information about the data constituting the updated file content by the update information recording means, the cluster in the first recording medium in which the data constituting the content before the update of the file is stored Comprising unused area releasing means for recording unused information indicating that data constituting the file contents is not stored in the second recording medium,
The location information updating unit performs updating of the FAT information so that the unused information recorded by the unused area releasing unit is reflected in the unused cluster information.
The file updating apparatus according to claim 4 , wherein the re-update means updates the FAT information so that the unused information is reflected in the unused cluster information.
前記ファイル更新装置は、更に、
全てのファイルの更新前に第1記録媒体中のFAT情報を第2記録媒体中の領域である作業FAT領域に作業FAT情報として複写するFAT複写手段と、
前記新データ記録手段によりデータの記録がなされたファイルについてのクローズ指示を取得するクローズ指示取得手段とを備え、
前記進行記録手段が記録する進行情報は、ファイルについてクローズ指示が取得された後であるか否かも識別可能な情報であり、
前記新データ記録手段は、未使用情報又は全ての連続関係情報と、作業FAT情報とに基づいて、更新後のファイルを構成するデータを、既に更新後の他のファイル内容を構成するデータが記録されているクラスタ以外のクラスタに記録し、
前記更新情報記録手段は更に、取得されたクローズ指示に係るファイルについての連続関係情報を作業FAT情報に反映させ、当該ファイルの更新前の内容を構成するデータが格納されていた第1記録媒体中のクラスタにはいずれかのファイル内容を構成するデータが格納されていないことを示す未使用情報をも作業FAT情報に反映させ、
前記位置情報更新手段は、前記作業FAT情報に基づいてFAT情報を更新し、
前記再更新手段は、第1記録媒体中の複数のファイルについて複数の更新手順を経てなされる更新の途中で更新の実行が不可能な状態になったことにより更新が停止した後に、更新の実行が可能な状態になった場合において、(a)複数のファイルそれぞれについて、対応する進行情報に基づいて、当該ファイルについてのクローズ指示が取得された後であると判定できるときには、当該ファイルに係る連続関係情報及び未使用情報を作業FAT情報に反映させ、(b)作業FAT情報に基づいてFAT情報を更新し、(c)対応する進行情報が、当該ファイルについてのクローズ指示が取得されたことを示すところの全てのファイルについてのエントリ情報に基づいてディレクトリ情報を更新する
ことを特徴とする請求項記載のファイル更新装置。
The file update device further includes:
FAT copying means for copying FAT information in the first recording medium as work FAT information to a work FAT area which is an area in the second recording medium before updating all files;
A close instruction obtaining means for obtaining a close instruction for a file whose data has been recorded by the new data recording means,
The progress information recorded by the progress recording means is information that can also be identified whether or not it is after a close instruction is acquired for a file,
The new data recording means records the data constituting the updated file based on the unused information or all the continuous relationship information and the work FAT information, and the data constituting the other updated file contents. Recorded in a cluster other than the
In the first recording medium in which the update information recording means further reflects the continuous relationship information about the acquired file related to the close instruction in the work FAT information, and the data constituting the contents before the update of the file is stored. In this cluster, unused information indicating that data constituting any file content is not stored is also reflected in the work FAT information.
The position information update means updates the FAT information based on the work FAT information,
The re-updating unit executes the update after the update is stopped due to a state in which the update cannot be performed in the middle of the update performed for the plurality of files in the first recording medium through the plurality of update procedures. (A) For each of a plurality of files , if it can be determined that the close instruction for the file has been acquired based on the corresponding progress information, the continuous The related information and unused information are reflected in the work FAT information, (b) the FAT information is updated based on the work FAT information, and (c) the corresponding progress information indicates that the close instruction for the file has been acquired. 6. The file updating apparatus according to claim 5, wherein the directory information is updated based on the entry information for all the indicated files.
前記ファイル更新装置は、更に、
再更新に際して、更新後のファイル内容を構成するデータが第1記録媒体に記録されている場合においては当該データの格納位置を示すように位置情報を更新すべきである旨を示す指示を取得する更新反映指示取得手段を備え、
前記再更新手段は、第1記録媒体中の複数のファイルについて複数の更新手順を経てなされる更新の途中で更新の実行が不可能な状態になったことにより更新が停止した後に、更新の実行が可能な状態になった場合でありかつ前記更新反映指示取得手段により指示が取得されている場合においては、作業FAT情報に基づくFAT情報の前記更新の前に、更に複数のファイルそれぞれについて、対応する進行情報に基づいて、更新後の当該ファイル内容を構成するデータに対応する更新情報が記録された後であると判定できるときにも、当該ファイルに係る連続関係情報及び未使用情報を作業FAT情報に反映させる
ことを特徴とする請求項記載のファイル更新装置。
The file update device further includes:
At the time of re-updating, when data constituting the updated file content is recorded on the first recording medium, an instruction indicating that the location information should be updated to indicate the storage location of the data is acquired. An update reflection instruction acquisition means is provided,
The re-updating unit executes the update after the update is stopped due to a state in which the update cannot be performed in the middle of the update performed for the plurality of files in the first recording medium through the plurality of update procedures. If the instruction is acquired by the update reflection instruction acquisition unit, before each update of the FAT information based on the work FAT information, a plurality of files are handled. Even when it can be determined that the update information corresponding to the data constituting the updated file contents is recorded based on the progress information to be updated, the continuous relationship information and the unused information related to the file are stored in the work FAT. The file update apparatus according to claim 6 , wherein the file update apparatus is reflected in the information.
前記第1記録媒体は、相互に独立し、所定のアクセス制限が設けられた認証領域と、当該アクセス制限が設けられていない通常領域とから構成され、
第1記録媒体中の位置情報は、認証領域内の各ファイル内容を構成するデータの当該認証領域内での格納位置を示す第1位置情報と、通常領域内の各ファイル内容を構成するデータの当該通常領域内での格納位置を示す第2位置情報とから構成され、
前記進行記録手段が記録する進行情報は、認証領域内のファイルの更新がどの更新手順まで実施済みであるかを示す第1進行情報と、通常領域内のファイルの更新がどの更新手順まで実施済みであるかを示す第2進行情報とから構成され、
前記新データ記録手段は、認証領域内のファイルについては更新前のファイル内容を構成するデータとは別に、更新後の当該ファイル内容を構成するデータを認証領域内に記録し、通常領域内のファイルについては更新前のファイル内容を構成するデータとは別に、更新後の当該ファイル内容を構成するデータを通常領域内に記録し、
前記更新情報記録手段が記録する更新情報は、前記新データ記録手段により認証領域内に記録された更新後のファイル内容を構成するデータについての当該認証領域内での格納位置を示す第1更新情報と、前記新データ記録手段により通常領域内に記録された更新後のファイル内容を構成するデータについての当該通常領域内での格納位置を示す第2更新情報とから構成され、
前記位置情報更新手段は、
更新後のファイル内容を構成するデータについて前記更新情報記録手段により第1更新情報が記録された後に、当該第1更新情報を参照して、当該データについての認証領域内での格納位置を示すように、当該ファイルの更新前の内容を構成するデータの格納位置を示している第1位置情報を更新し、更新後のファイル内容を構成するデータについて前記更新情報記録手段により第2更新情報が記録された後に、当該第2更新情報を参照して、当該データについての通常領域内での格納位置を示すように、当該ファイルの更新前の内容を構成するデータの格納位置を示している第2位置情報を更新する
ことを特徴とする請求項1記載のファイル更新装置。
The first recording medium is composed of an authentication area that is independent of each other and provided with a predetermined access restriction, and a normal area that is not provided with the access restriction.
The position information in the first recording medium includes first position information indicating a storage position of data constituting each file content in the authentication area in the authentication area, and data constituting each file content in the normal area. Second position information indicating the storage position in the normal area,
The progress information recorded by the progress recording means includes first progress information indicating which update procedure the file in the authentication area has been updated and up to which update procedure the file in the normal area has been updated. Second progress information indicating whether or not,
The new data recording means records the data constituting the updated file contents in the authentication area separately from the data constituting the file contents before the updating in the authentication area, and the files in the normal area. In addition to the data that constitutes the file contents before the update, the data that constitutes the file contents after the update is recorded in the normal area,
The update information recorded by the update information recording means is first update information indicating the storage position in the authentication area of the data constituting the updated file content recorded in the authentication area by the new data recording means. And second update information indicating the storage position in the normal area for the data constituting the updated file content recorded in the normal area by the new data recording means,
The location information update means
After the first update information is recorded by the update information recording means for the data constituting the updated file content, the storage location of the data in the authentication area is indicated by referring to the first update information. In addition, the first location information indicating the storage location of the data constituting the content before the update of the file is updated, and the second update information is recorded by the update information recording means for the data constituting the file content after the update. After that, the second update information is referred to, so that the storage position of the data constituting the content before the update of the file is indicated so as to indicate the storage position of the data in the normal area. The file update apparatus according to claim 1, wherein the position information is updated.
前記第1記録媒体は、フラッシュメモリであり、
前記第2記録媒体は、第1記録媒体より高速アクセス可能なメモリである
ことを特徴とする請求項1記載のファイル更新装置。
The first recording medium is a flash memory;
The file update apparatus according to claim 1, wherein the second recording medium is a memory that can be accessed at a higher speed than the first recording medium.
前記第2記録媒体は、RAMであり、第1記録媒体の電源とは独立した電源から電力が供給される
ことを特徴とする請求項記載のファイル更新装置。
The file update apparatus according to claim 9, wherein the second recording medium is a RAM, and power is supplied from a power source independent of a power source of the first recording medium.
第1記録媒体中の全ファイルそれぞれについてファイル内容を構成するデータの第1記録媒体中の格納位置を示す位置情報を記録してある第1記録媒体における複数のファイルを複数の更新手順を経て更新するファイル更新方法であって、
どの更新手順まで実施済みであるかを示す進行情報を更新対象とされたファイル毎に第2記録媒体中に記録する進行記録ステップと、
更新前のファイル内容を構成するデータとは別に、更新対象とされた複数のファイルそれぞれについて、更新後のファイル内容を構成するデータを第1記録媒体中に記録する新データ記録ステップと、
前記新データ記録ステップにより記録された更新後のファイルそれぞれについて、ファイル内容を構成するデータについての第1記録媒体中の格納位置を示す更新情報を第2記録媒体中に記録する更新情報記録ステップと、
更新後のファイルそれぞれに対応して、更新後のファイル内容を構成するデータについて前記更新情報記録ステップにより更新情報が記録された後に、当該更新情報に基づいて、当該データについての第1記録媒体中の格納位置を示すように、当該ファイルの更新前の内容を構成するデータの格納位置を示している第1記録媒体中の位置情報を更新する位置情報更新ステップと
第1記録媒体中の複数のファイルについて複数の更新手順を経てなされる更新の途中で更新の実行が不可能な状態になったことにより更新が停止した後に、更新の実行が可能な状態になった場合において、複数のファイルそれぞれについて、更新後のファイル内容を構成するデータについて更新情報が記録された後であるか否かを進行情報に基づき判定し、判定結果が肯定的なときには、当該更新情報に基づいて、当該データについての第1記録媒体中の格納位置を示すように第1記録媒体中の位置情報を更新する再更新ステップとを含む
ことを特徴とするファイル更新方法。
A plurality of files in the first recording medium that is recorded with position information indicating a first storage location in the recording medium of data constituting the file content for each all the files in the first recording medium through a plurality of update procedure updates File update method to
A progress recording step of recording progress information indicating which update procedure has been performed in the second recording medium for each file to be updated ;
A new data recording step for recording, in the first recording medium, data constituting the updated file content for each of a plurality of files to be updated separately from the data constituting the file content before the update,
An update information recording step for recording, in the second recording medium, update information indicating the storage position in the first recording medium of the data constituting the file content for each of the updated files recorded in the new data recording step; ,
Corresponding to each of the updated files , after the update information is recorded by the update information recording step for the data constituting the updated file contents, the data is recorded in the first recording medium based on the update information. A position information update step for updating the position information in the first recording medium indicating the storage position of the data constituting the content before the update of the file, so as to indicate the storage position of the file ,
A plurality of files in the first recording medium can be executed after the update is stopped because the update cannot be executed in the middle of the update performed through a plurality of update procedures. In this case, for each of a plurality of files, it is determined based on the progress information whether update information is recorded for the data constituting the updated file contents, and if the determination result is affirmative, the update is performed. And a re-updating step of updating the position information in the first recording medium so as to indicate the storage position in the first recording medium of the data based on the information .
第1記録媒体中の全ファイルそれぞれについてファイル内容を構成するデータの第1記録媒体中の格納位置を示す位置情報を記録してある第1記録媒体における複数のファイルを、複数の更新手順を経て更新するファイル更新処理を、CPUを含む装置に実行させるためのプログラムであって、
前記ファイル更新処理は、
どの更新手順まで実施済みであるかを示す進行情報を更新対象とされたファイル毎に前記装置に内蔵された第2記録媒体中に記録する進行記録ステップと、
更新前のファイル内容を構成するデータとは別に、更新対象とされた複数のファイルそれぞれについて、更新後のファイル内容を構成するデータを第1記録媒体中に記録する新データ記録ステップと、
前記新データ記録ステップにより記録された更新後のファイルそれぞれについて、ファイル内容を構成するデータについての第1記録媒体中の格納位置を示す更新情報を第2記録媒体中に記録する更新情報記録ステップと、
更新後のファイルそれぞれに対応して、更新後のファイル内容を構成するデータについて前記更新情報記録ステップにより更新情報が記録された後に、当該更新情報に基づいて、当該データについての第1記録媒体中の格納位置を示すように、当該ファイルの更新前の内容を構成するデータの格納位置を示している第1記録媒体中の位置情報を更新する位置情報更新ステップと
第1記録媒体中の複数のファイルについて複数の更新手順を経てなされる更新の途中で更新の実行が不可能な状態になったことにより更新が停止した後に、更新の実行が可能な状態になった場合において、複数のファイルそれぞれについて、更新後のファイル内容を構成するデータについて更新情報が記録された後であるか否かを進行情報に基づき判定し、判定結果が肯定的なときには、当該更新情報に基づいて、当該データについての第1記録媒体中の格納位置を示すように第1記録媒体中の位置情報を更新する再更新ステップとを含む
ことを特徴とするプログラム。
Multiple files in the first recording medium that is recorded with position information indicating the storage position in the first recording medium of data constituting the file content for each all the files in the first recording medium, through a plurality of update procedure A program for causing a device including a CPU to execute a file update process to be updated,
The file update process
A progress recording step of recording progress information indicating which update procedure has been performed in a second recording medium built in the device for each file to be updated ;
A new data recording step for recording, in the first recording medium, data constituting the updated file content for each of a plurality of files to be updated separately from the data constituting the file content before the update,
An update information recording step for recording, in the second recording medium, update information indicating the storage position in the first recording medium of the data constituting the file content for each of the updated files recorded in the new data recording step; ,
Corresponding to each of the updated files , after the update information is recorded by the update information recording step for the data constituting the updated file contents, the data is recorded in the first recording medium based on the update information. A position information update step for updating the position information in the first recording medium indicating the storage position of the data constituting the content before the update of the file, so as to indicate the storage position of the file ,
A plurality of files in the first recording medium can be executed after the update is stopped because the update cannot be executed in the middle of the update performed through a plurality of update procedures. In this case, for each of a plurality of files, it is determined based on the progress information whether update information is recorded for the data constituting the updated file contents, and if the determination result is affirmative, the update is performed. And a re-updating step of updating the position information in the first recording medium so as to indicate the storage position in the first recording medium of the data based on the information .
JP2003350068A 2002-10-17 2003-10-08 File update device Expired - Fee Related JP4391793B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003350068A JP4391793B2 (en) 2002-10-17 2003-10-08 File update device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2002302936 2002-10-17
JP2003350068A JP4391793B2 (en) 2002-10-17 2003-10-08 File update device

Publications (2)

Publication Number Publication Date
JP2004157997A JP2004157997A (en) 2004-06-03
JP4391793B2 true JP4391793B2 (en) 2009-12-24

Family

ID=32827956

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003350068A Expired - Fee Related JP4391793B2 (en) 2002-10-17 2003-10-08 File update device

Country Status (1)

Country Link
JP (1) JP4391793B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100578085B1 (en) 2004-09-08 2006-05-10 엘지전자 주식회사 Playback Performance Improvement Method of Optical Writable Medium
JP2006134123A (en) * 2004-11-08 2006-05-25 Ishida Co Ltd Data recording device and merchandise handling apparatus having same
JP4806183B2 (en) 2004-12-24 2011-11-02 富士通セミコンダクター株式会社 File information writing processing method and program
US8244958B2 (en) * 2005-05-09 2012-08-14 Sandisk Il Ltd. Method and system for facilitating fast wake-up of a flash memory system
JP2007233638A (en) 2006-02-28 2007-09-13 Sony Corp Information processor, information processing method, and computer program
JP2007316944A (en) * 2006-05-25 2007-12-06 Toshiba Corp Data processor, data processing method and data processing program
TWI431464B (en) * 2009-04-29 2014-03-21 Micro Star Int Co Ltd Computer system with power control and power control method
JP5578486B2 (en) * 2010-08-03 2014-08-27 日本電気株式会社 Database system, database update method, and database update program
JP6201298B2 (en) * 2012-11-14 2017-09-27 オムロン株式会社 Controller and program

Also Published As

Publication number Publication date
JP2004157997A (en) 2004-06-03

Similar Documents

Publication Publication Date Title
KR100973871B1 (en) File-update apparatus
EP2096546B1 (en) Write once recording device
CN101743546B (en) Hierarchical storage management for a file system providing snapshots
US5559957A (en) File system for a data storage device having a power fail recovery mechanism for write/replace operations
KR100920716B1 (en) Ruggedized block device driver
JP4722704B2 (en) INFORMATION RECORDING MEDIUM, ACCESS DEVICE AND ACCESS METHOD FOR INFORMATION RECORDING MEDIUM
JP5485163B2 (en) Access module, information recording module, controller, and information recording system
JP2008243138A (en) Storage system and data restoration method
EP1510920A2 (en) Apparatus and method for controlling booting operation of computer system
WO2005015406A1 (en) Semiconductor memory card, and accessing device and method
CN105988895B (en) Snapshot processing method and device
JP4391793B2 (en) File update device
JP7208000B2 (en) Information processing device and information processing device control method
JP2006018796A (en) Data processing method and device, and storage device and its processing program
KR100637787B1 (en) Method and program for file information write processing
JP2005216119A (en) Recording medium
JPH01204163A (en) File controller
JP2005353046A (en) Recording medium, host device, and data processing method
JP2009205591A (en) Access module, information recording module, and information recording system
US20060143423A1 (en) Storage device, data processing method thereof, data processing program thereof, and data processing system
JP3620241B2 (en) File management apparatus, file management method, recording medium, and file management system
JP2009205590A (en) Access module, information recording module, controller, and information recording system
JPH03166634A (en) Information recording/reproducing system
JP6644427B2 (en) FAT file system and its program
JP2007004782A (en) Semiconductor memory card

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060712

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090519

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090625

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

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

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

Free format text: PAYMENT UNTIL: 20121016

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4391793

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20131016

Year of fee payment: 4

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees