JP2015135535A - File processor and file processing method - Google Patents

File processor and file processing method Download PDF

Info

Publication number
JP2015135535A
JP2015135535A JP2014005605A JP2014005605A JP2015135535A JP 2015135535 A JP2015135535 A JP 2015135535A JP 2014005605 A JP2014005605 A JP 2014005605A JP 2014005605 A JP2014005605 A JP 2014005605A JP 2015135535 A JP2015135535 A JP 2015135535A
Authority
JP
Japan
Prior art keywords
file
packing
processing unit
files
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014005605A
Other languages
Japanese (ja)
Inventor
直人 瀧
Naoto Taki
直人 瀧
稔 宇留島
Minoru Urushima
稔 宇留島
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.)
Hitachi Industry and Control Solutions Co Ltd
Original Assignee
Hitachi Industry and Control Solutions 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 Hitachi Industry and Control Solutions Co Ltd filed Critical Hitachi Industry and Control Solutions Co Ltd
Priority to JP2014005605A priority Critical patent/JP2015135535A/en
Publication of JP2015135535A publication Critical patent/JP2015135535A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a technology for efficiently accommodating a plurality of continuous files in a storage device.SOLUTION: The file processor accommodates a plurality of continuous files in a storage device for storing data for each block. The file processor includes: a packing file preparation processing unit and a packing file division processing unit. The packing file preparation processing unit prepares a packing file that includes the plurality of continuous files and has a packing size that is natural number times a block size. Upon receiving, from a demand-origin client, a read-out demand for demanding the read-out of at least one file, the packing file division processing unit extracts the demanded file from the packing file including the demanded file and transmits it to the demand-origin client.

Description

本発明は、連続した複数のファイルのデータを記憶装置に蓄積する技術に関する。   The present invention relates to a technique for accumulating data of a plurality of continuous files in a storage device.

特開2002−182966号公報(特許文献1)には、複数の連続したファイルに送信先を含む配信ラベルを付加し、その複数の配信ラベル付きファイルをまとめてパッキングする機能を搭載したファイル管理システムが開示されている。   Japanese Patent Laid-Open No. 2002-182966 (Patent Document 1) discloses a file management system having a function of adding a distribution label including a transmission destination to a plurality of continuous files and packing the plurality of files with distribution labels together. Is disclosed.

特開2002−182966号公報JP 2002-182966 A

このように記憶装置に蓄積され、読み出して配信される連続したファイルには、映像および音声を含む動画データファイル、1フレーム/1ファイルの複数のファイルで1つの映像が構成された連番ファイル、サムネイルファイルと呼ばれる映像のカット毎の静止画ファイルで構成されたデータなどがある。   In this way, the continuous files accumulated in the storage device, read out and distributed include a video data file including video and audio, a serial number file in which one video is composed of a plurality of files of one frame / one file, There is data composed of still image files for each cut of video called thumbnail files.

その中で動画データファイルはひとつひとつのファイルのサイズが比較的大きく、連番ファイルとサムネイルファイルはファイルサイズが小さい。   Among them, each video data file has a relatively large file size, and serial file and thumbnail file have a small file size.

大きなファイルをストレージ等の記憶装置に蓄積する場合、データを所定のブロックサイズに分割してブロックに分けて蓄積する。ひとつひとつのファイルのサイズがブロックサイズよりも小さい連番ファイルあるいはサムネイルファイルを、同じ記憶装置に蓄積する場合、ひとつのブロックにひとつのファイルが格納され、記憶装置の記憶領域が効率よく使用されない。   When storing a large file in a storage device such as a storage, the data is divided into a predetermined block size and stored in blocks. When sequential files or thumbnail files each having a smaller file size than the block size are stored in the same storage device, one file is stored in one block, and the storage area of the storage device is not used efficiently.

また、その後、動画データファイルを蓄積するとき、フラグメンテーションにより、ファイルが、連番ファイルあるいはサムネイルファイルが格納されたブロックの残りの領域に分割して格納される場合がある。その場合、記憶装置の記憶領域には、動画データファイルの間に連番ファイルあるいはサムネイルファイルが存在することになる。このように、サイズの異なるファイルを同じ記憶装置に書き込んだり、読み出したりする場合、ファイルのオープン処理やクローズ処理のオーバーヘッドが増大し、処理性能が低下することも考えられる。   After that, when the moving image data file is accumulated, the file may be divided and stored in the remaining area of the block in which the serial number file or the thumbnail file is stored due to fragmentation. In that case, sequential files or thumbnail files exist between the moving image data files in the storage area of the storage device. As described above, when files of different sizes are written to or read from the same storage device, the overhead of file open processing and close processing may increase, and processing performance may be reduced.

本発明の目的は、複数の連続したファイルを記憶装置に効率よく蓄積する技術を提供することである。   An object of the present invention is to provide a technique for efficiently storing a plurality of continuous files in a storage device.

本発明の一態様によるファイル処理装置は、ブロック毎にデータを格納する記憶装置に複数の連続したファイルを蓄積するファイル処理装置であって、連続した複数のファイルを含む、ブロックサイズの自然数倍であるパッキングサイズのパッキングファイルを作成するパッキングファイル作成処理部と、少なくとも1つのファイルの読み出しを要求するための読み出し要求を要求元クライアントから受けると、要求されたファイルを含むパッキングファイルから、前記要求されたファイルを取り出し、前記要求元クライアントに送信するパッキングファイル分割処理部と、を有している。   A file processing apparatus according to an aspect of the present invention is a file processing apparatus that accumulates a plurality of continuous files in a storage device that stores data for each block, and includes a plurality of continuous files, and is a natural number multiple of the block size When receiving from the requesting client a request to read at least one file and a packing file creation processing unit that creates a packing file of a packing size that is, the request is received from the packing file that includes the requested file. And a packing file division processing unit for taking out the transmitted file and transmitting it to the request source client.

本発明によれば、複数の連続したファイルを、ブロックサイズと同じあるいは整数倍のサイズのパッキングファイルにまとめて蓄積するので、複数の連続したファイルを効率よく蓄積することができる。   According to the present invention, a plurality of continuous files are stored together in a packing file having a size equal to or an integral multiple of the block size, so that a plurality of continuous files can be stored efficiently.

実施例1による映像蓄積配信システムのブロック図である。1 is a block diagram of a video accumulation / delivery system according to Embodiment 1. FIG. ファイルシステム140によるパッキングファイル作成処理について説明するための図である。It is a figure for demonstrating the packing file creation process by the file system. パッキングファイル管理テーブル141の具体例を示す図である。It is a figure which shows the specific example of the packing file management table 141. FIG. ファイル構成情報200の具体例を示す図である。It is a figure which shows the specific example of the file structure information. ファイルを書き込むときのパッキングファイル作成処理部142の処理を示すフローチャートである。It is a flowchart which shows the process of the packing file creation process part 142 when writing a file. ファイルを読み出すときのパッキングファイル分割処理部143の処理を示すフローチャートである。It is a flowchart which shows the process of the packing file division | segmentation process part 143 when reading a file. 実施例2による映像蓄積配信システムのブロック図である。It is a block diagram of the image | video accumulation | storage delivery system by Example 2. FIG.

以下、本発明の実施例について図面を用いて説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、実施例1による映像蓄積配信システムのブロック図である。映像蓄積配信システムは、映像蓄積配信サーバ110とストレージ150から構成される。   FIG. 1 is a block diagram of a video storage / delivery system according to the first embodiment. The video storage / delivery system includes a video storage / delivery server 110 and a storage 150.

映像蓄積配信サーバ110は、ファイル転送ミドルウエア120、ファイル共有ミドルウエア130およびファイルシステム140を有し、ブロック毎にデータを格納する記憶装置であるストレージ150に、複数の連続したファイルを蓄積するファイル処理装置である。   The video accumulation / delivery server 110 includes a file transfer middleware 120, a file sharing middleware 130, and a file system 140, and a file that accumulates a plurality of continuous files in a storage 150 that is a storage device that stores data for each block. It is a processing device.

ファイル転送ミドル120は、大容量のデータ転送に特化したミドルウエアであり、一例として映像の蓄積および配信に特化している。ファイル共有ミドルウエア130は、SAMBAなどのファイル共有を実現するミドルウエアであり、一例として映像の蓄積および配信に特化していない、各種ファイルを扱う汎用的なミドルウエアである。ファイル転送ミドルウエア120およびファイル共有ミドルウエア130は映像蓄積配信サーバ110に実装されるミドルウエアの例である。それらに限らず、ストレージ150へのファイルの書き込みおよびその読み出しに関わる様々な種類のミドルウエアが映像蓄積配信サーバ110に実装されうる。ファイルシステム140は、ブロック毎にデータを格納するストレージ150へのファイルの入出力を行うファイルシステムである。   The file transfer middle 120 is middleware specialized for large-capacity data transfer, and as an example, is specialized for video accumulation and distribution. The file sharing middleware 130 is middleware that realizes file sharing such as SAMBA. For example, the file sharing middleware 130 is general-purpose middleware that handles various files that are not specialized for storing and distributing video. The file transfer middleware 120 and the file sharing middleware 130 are examples of middleware implemented in the video accumulation / delivery server 110. However, the present invention is not limited to this, and various types of middleware related to writing and reading of files to and from the storage 150 can be implemented in the video storage / delivery server 110. The file system 140 is a file system that inputs and outputs files to the storage 150 that stores data for each block.

ファイルシステム140は、本実施例に特徴的な構成であるパッキングファイル管理テーブル141、パッキングファイル作成処理部142、パッキングファイル分割処理部143、およびパッキングファイル吐き出し処理部146を有し、更に、書き込みバッファ144および読み出しバッファ145を有する。書き込みバッファ144はパッキングファイルを作成するためのワーク領域であり、読み出しバッファ145はパッキングファイルを分割するためのワーク領域である。   The file system 140 includes a packing file management table 141, a packing file creation processing unit 142, a packing file division processing unit 143, and a packing file discharge processing unit 146, which are characteristic configurations of the present embodiment, and further includes a write buffer. 144 and a read buffer 145. The write buffer 144 is a work area for creating a packing file, and the read buffer 145 is a work area for dividing the packing file.

クライアント161、162は、例えばWindows(登録商標)端末などであり、ネットワークを介してファイル転送ミドルウエア120およびファイル共有ミドルウエア130と接続されており、ストレージ150に格納されているファイルを読み出したり、ストレージ150にファイルを格納したりできる。   The clients 161 and 162 are, for example, Windows (registered trademark) terminals, which are connected to the file transfer middleware 120 and the file sharing middleware 130 via a network, and read out files stored in the storage 150, A file can be stored in the storage 150.

まず、図1に示した映像蓄積配信サーバ110の概略動作について説明する。   First, a schematic operation of the video storage / delivery server 110 shown in FIG. 1 will be described.

映像蓄積配信サーバ110は、ファイルシステム140のパッキングファイル作成処理部142により、複数の連続したファイルをパッキングファイルとしてまとめて、ストレージ150に蓄積する。複数の連続したファイルは、例えば、連番ファイル又はサムネイルファイルである。   The video accumulation / delivery server 110 collects a plurality of continuous files as packing files by the packing file creation processing unit 142 of the file system 140 and accumulates them in the storage 150. The plurality of continuous files are, for example, serial number files or thumbnail files.

その際、パッキングファイル作成処理部142は、ブロックサイズより小さいサイズの連続した複数のファイルを含む、ブロックサイズと同じサイズのパッキングファイル240を作成する。例えば、作成されたパッキングファイル240は書き込みバッファ144を介してストレージ150に書き込まれる。なお、ここでは、一例として、複数のファイルをパッキングするパッキングファイル240のサイズ(パッキングサイズ)をブロックサイズと同じとしたが、これに限定されることはなく、パッキングサイズをブロックサイズの2以上の整数倍としてもよい。   At that time, the packing file creation processing unit 142 creates a packing file 240 having the same size as the block size, including a plurality of continuous files having a size smaller than the block size. For example, the created packing file 240 is written into the storage 150 via the write buffer 144. Here, as an example, the size (packing size) of the packing file 240 that packs a plurality of files is the same as the block size, but the present invention is not limited to this, and the packing size is not less than 2 of the block size. It may be an integer multiple.

また、パッキングファイル分割処理部143は、少なくとも1つのファイルの読み出しを要求するための読み出し要求を要求元のクライアント161、162から受けると、要求されたファイルを含むパッキングファイル240から、要求されたファイルを取り出し、要求元のクライアント161、162に送信する。   In addition, when the packing file division processing unit 143 receives a read request for requesting reading of at least one file from the requesting clients 161 and 162, the requested file is received from the packing file 240 including the requested file. Is transmitted to the requesting clients 161 and 162.

これによれば、複数の連続したファイルを、ブロックサイズと同じサイズのパッキングファイル240にまとめてストレージ150に蓄積することができるので、ストレージ150に複数の連続したファイルを効率よく蓄積することができる。   According to this, since a plurality of continuous files can be collectively stored in the storage 150 in the packing file 240 having the same size as the block size, a plurality of continuous files can be efficiently stored in the storage 150. .

また、その際、パッキングファイル作成処理部142は、書き込みバッファ144にファイルを順次書き込んでパッキングファイル240とし、次のファイルを追加するとパッキングファイル240のサイズがバッファサイズを超える場合に、そのパッキングファイル240にダミーデータを追加し、ブロックサイズと同じサイズのパッキングファイル240を作成する。これによれば、複数のファイルの合計のサイズがブロックサイズにうまく適合しない場合でも、ブロックサイズとサイズを合わせたパッキングファイル240にまとめて、ファイルをその中に搭載することができる。   At that time, the packing file creation processing unit 142 sequentially writes the files in the writing buffer 144 to form the packing file 240, and when the next file is added and the size of the packing file 240 exceeds the buffer size, the packing file 240 Dummy data is added to and a packing file 240 having the same size as the block size is created. According to this, even when the total size of a plurality of files does not fit well with the block size, the files can be loaded into the packing file 240 that combines the block size and the size.

また、パッキングファイル作成処理部142は、連続的に入力されるファイルを順次、書き込みバッファ144のパッキングファイル240に追加してもよい。その場合、パッキングファイル管理テーブル141は、パッキングファイル240に最後にファイルを追加した時刻である最終書き込み時刻を管理するとよい。そして、パッキングファイル吐き出し処理部146は、最終書き込み時刻の後、ファイルがパッキングファイル240に追加されない状態が所定時間継続したら、必要に応じてパッキングファイル240にダミーデータを付加して、ブロックサイズと同じサイズのパッキングファイル240にして、ストレージ150に送信する。これによれば、複数の連続したファイルの末尾においても全てのファイルをパッキングファイル240としてストレージ150に格納することができる。   Further, the packing file creation processing unit 142 may sequentially add files that are continuously input to the packing file 240 of the write buffer 144. In that case, the packing file management table 141 may manage the last writing time that is the time when the file was last added to the packing file 240. Then, after a final writing time, the packing file discharge processing unit 146 adds dummy data to the packing file 240 as necessary when the state where the file is not added to the packing file 240 continues for a predetermined time, and is the same as the block size. A packing file 240 having a size is sent to the storage 150. According to this, all files can be stored in the storage 150 as the packing file 240 even at the end of a plurality of consecutive files.

また、パッキングファイル分割処理部143は、ストレージ150から読み出したパッキングファイル240を読み出しバッファ145に格納し、読み出しが要求されたファイルを要求元のクライアント161、162に送り、その後の読み出し要求で読み出しが要求されたファイルが読み出しバッファ145にあれば、そのファイルを読み出しバッファ145から読み出して要求元のクライアント161、162に送る。これによれば、要求されたファイルが、読み出しバッファ145にあるパッキングファイル240に含まれていれば、ストレージ150置にアクセスすることなく、読み出しバッファ145から読み出して要求元のクライアント161、162に送信するので、ストレージ150へのアクセスを減らし、レスポンス向上とストレージ150の長寿命化を実現することができる。   Further, the packing file division processing unit 143 stores the packing file 240 read from the storage 150 in the reading buffer 145, sends the file requested to be read to the requesting clients 161 and 162, and the reading request is read by the subsequent reading request. If the requested file is in the read buffer 145, the file is read from the read buffer 145 and sent to the requesting clients 161 and 162. According to this, if the requested file is included in the packing file 240 in the read buffer 145, it is read from the read buffer 145 and transmitted to the requesting clients 161 and 162 without accessing the storage 150. Therefore, it is possible to reduce access to the storage 150, improve response, and extend the life of the storage 150.

また、本実施例では、パッキングファイル作成処理部142およびパッキングファイル分割処理部143が、クライアント161、162と通信するファイル転送ミドルウエア120およびパッキングファイル吐き出し処理部146とファイル受け渡しを行い、ストレージ150のデータ書き込みおよび読み出しを行うファイルシステムに組み込まれている。これによれば、パッキングファイル240の作成や分割の機能が、ミドルウエアとは別に共通処理部としてファイルシステム140に組み込まれているので、様々なミドルウエアが混在しても、パッキングファイル240に関する処理がミドルウエアやアプリケーションに依存せず、共通化できる。   In the present embodiment, the packing file creation processing unit 142 and the packing file division processing unit 143 perform file transfer with the file transfer middleware 120 and the packing file discharge processing unit 146 that communicate with the clients 161 and 162, and It is built into a file system that writes and reads data. According to this, since the function for creating and dividing the packing file 240 is incorporated in the file system 140 as a common processing unit separately from the middleware, the processing related to the packing file 240 can be performed even if various middlewares are mixed. Can be shared without depending on middleware and applications.

以下、より具体的な各部の処理等について説明する。   Hereinafter, more specific processing of each unit will be described.

図2は、ファイルシステム140によるパッキングファイル作成処理について説明するための図である。図2の左側にクライアントから見たファイル構成が示され、右側にストレージ150にファイルの実体が格納された様子が示されている。ストレージ150内では、連番ファイルやサムネイルファイルのように連続した複数のファイル210、220、230はパッキングファイル240にまとめられて格納される。   FIG. 2 is a diagram for explaining packing file creation processing by the file system 140. The file structure as viewed from the client is shown on the left side of FIG. 2, and the appearance of the file entity stored in the storage 150 is shown on the right side. In the storage 150, a plurality of continuous files 210, 220, and 230 such as serial number files and thumbnail files are stored together in a packing file 240.

ファイル210〜230のファイル名称は、共通ファイル名称と、その後に続く通番とで構成されている。共通ファイル名称は、連続する複数のファイルに共通する部分である。通番は、共通ファイル名称を持ったファイルの中の個々のファイルを一意に特定する連続番号である。同一の共通ファイル名称の複数のファイルが連続的にパッキングファイル240にパッキングされ、それらのファイルの先頭にファイル構成情報200が付加される。ファイル構成情報200は、パッキングファイル240に含まれているファイルを特定できる情報である。   The file names of the files 210 to 230 are composed of a common file name followed by a serial number. The common file name is a part common to a plurality of continuous files. The serial number is a serial number that uniquely identifies each file among files having a common file name. A plurality of files having the same common file name are successively packed into the packing file 240, and the file configuration information 200 is added to the head of these files. The file configuration information 200 is information that can identify a file included in the packing file 240.

パッキングファイル240のファイル名称は、ファイル210〜230の共通ファイル名称と、パッキングファイルを表すPFという文字と、同じ共通ファイル名称を持つパッキングファイルの通番とで構成されている。パッキングファイル240のファイル名称に同一の共通ファイル名称を含めることで、同じ共通ファイル名称を含む連続するファイルを共に含んだパッキングファイルが識別可能となっている。   The file name of the packing file 240 includes a common file name of the files 210 to 230, characters PF representing the packing file, and a serial number of the packing file having the same common file name. By including the same common file name in the file name of the packing file 240, it is possible to identify a packing file including both continuous files including the same common file name.

図3Aは、パッキングファイル管理テーブル141の具体例を示す図である。図3Bは、ファイル構成情報200の具体例を示す図である。   FIG. 3A is a diagram showing a specific example of the packing file management table 141. FIG. 3B is a diagram illustrating a specific example of the file configuration information 200.

図3Aに示すように、パッキングファイル管理テーブル141には、共通ファイル名称501、パッキングファイル名称502、パッキングファイル格納場所503、パッキングファイルサイズ504、書き込みフラグ505、最終書き込み時刻506、パッキングファイル数507が含まれている。共通ファイル名称501は、連続する複数のパッキングファイルに共通するファイル名称である。同じ共通ファイル名称501のパッキングファイル240に含まれるファイルは同じ共通ファイル名称を含んでいる。パッキングファイル名称502は、パッキングファイルの名称であり、一例として、共通ファイル名称501に、パッキングファイルであることを示すPFが付加されている。パッキングファイル格納場所503は、パッキングファイルが格納されている場所を示す情報である。パッキングファイルサイズ504は、パッキングファイルのサイズを示す情報である。書き込みフラグ505は、パッキングファイルが作成中であるか否かを示すフラグである。最終書き込み時刻506は、作成中のパッキングファイルに最後にファイルを書き込んだ時刻の情報である。パッキングファイル数507は、パッキングファイルに含まれているファイルの個数を示す情報である。パッキングファイルが複数ある場合、それぞれのパッキングファイルごとに、パッキングファイル数のフィールドがある。図3Aの例では、パッキングファイルが1〜NまでN個あり、各パッキングファイルに含まれているファイル数が、それぞれn(1)〜n(N)である。   As shown in FIG. 3A, the packing file management table 141 includes a common file name 501, a packing file name 502, a packing file storage location 503, a packing file size 504, a writing flag 505, a last writing time 506, and the number of packing files 507. include. The common file name 501 is a file name common to a plurality of consecutive packing files. Files included in the packing file 240 having the same common file name 501 include the same common file name. The packing file name 502 is the name of the packing file. As an example, a PF indicating a packing file is added to the common file name 501. The packing file storage location 503 is information indicating a location where the packing file is stored. The packing file size 504 is information indicating the size of the packing file. The write flag 505 is a flag indicating whether or not a packing file is being created. The last write time 506 is information of the time when the file was last written in the packing file being created. The number of packing files 507 is information indicating the number of files included in the packing file. When there are a plurality of packing files, there is a field for the number of packing files for each packing file. In the example of FIG. 3A, there are N packing files 1 to N, and the number of files included in each packing file is n (1) to n (N), respectively.

図3Bに示すように、ファイル構成情報200は、共通ファイル名称511、パッキング対象ファイル数512、およびファイル先頭オフセット513を含んでいる。共通ファイル名称511は、連続する複数のパッキングファイルに共通するファイル名称である。パッキング対象ファイル数512は、パッキングファイルに含まれているファイルの個数を示す情報である。ファイル先頭オフセット513は、パッキングファイルに含まれている各ファイル1〜nの先頭位置を示すオフセット値である。   As illustrated in FIG. 3B, the file configuration information 200 includes a common file name 511, the number of files to be packed 512, and a file head offset 513. The common file name 511 is a file name common to a plurality of consecutive packing files. The number of files to be packed 512 is information indicating the number of files included in the packing file. The file head offset 513 is an offset value indicating the head position of each file 1 to n included in the packing file.

図4は、ファイルを書き込むときのパッキングファイル作成処理部142の処理を示すフローチャートである。   FIG. 4 is a flowchart showing the processing of the packing file creation processing unit 142 when writing a file.

まず、パッキングファイル作成処理部142は、ファイル書き込み要求受信待ちの状態で(ステップ301)、書き込み要求を受信すると、パッキングファイル管理テーブル141を検索し(ステップ302)、書き込みを要求されたファイルがパッキングを行う対象のファイル(パッキング対象)であるか否か判定する(ステップ303)。パッキング対象のファイルに共通する共通ファイル名称がパッキングファイル管理テーブル141に予め登録されており、パッキングファイル作成処理部142は、書き込みを要求されたファイルのファイル名称に、そのパッキング対象の共通ファイル名称が含まれているか否かより、書き込みを要求されたファイルがパッキング対象か否か判定することができる。   First, the packing file creation processing unit 142 waits for reception of a file write request (step 301). When receiving the write request, the packing file creation processing unit 142 searches the packing file management table 141 (step 302), and the file requested to be written is packed. It is determined whether or not the file is a target file (packing target) (step 303). A common file name common to the packing target file is registered in the packing file management table 141 in advance, and the packing file creation processing unit 142 adds the packing target common file name to the file name of the file requested to be written. Whether or not the file requested to be written is a packing target can be determined based on whether or not it is included.

書き込みを要求されたファイルがパッキング対象でなければ、パッキングファイル作成処理部142は、そのファイルをそのままの単独のファイルとしてストレージ150に書き込む(ステップ316)。   If the file requested to be written is not a packing target, the packing file creation processing unit 142 writes the file into the storage 150 as a single file as it is (step 316).

一方、書き込みを要求されたファイルがパッキング対象であれば、パッキングファイル作成処理部142は、作成中のパッキングファイルが存在するか否か判定する(ステップ304)。   On the other hand, if the file requested to be written is a packing target, the packing file creation processing unit 142 determines whether there is a packing file being created (step 304).

作成中のパッキングファイルが存在しない場合、書き込みを要求されたファイルが新たなパッキングファイルの先頭となるので、パッキングファイル作成処理部142は、そのファイルにファイル構成情報200を付与し(ステップ305)、パッキングファイル管理テーブル141を更新し(ステップ306)、新たなパッキングファイルを書込みバッファ144に格納する(ステップ307)。   If the packing file being created does not exist, the file requested to be written becomes the head of the new packing file, and therefore the packing file creation processing unit 142 gives the file configuration information 200 to the file (step 305). The packing file management table 141 is updated (step 306), and a new packing file is stored in the write buffer 144 (step 307).

一方、作成中のパッキングファイルが存在する場合、パッキングファイル作成処理部142は、その作成中のパッキングファイルのサイズと書き込を要求されたファイルのサイズとの合計がブロックサイズ以下であるか否か判定する(ステップ308)。このブロックサイズが、ファイルシステム140のアクセス最小単位であり複数ファイルが格納できるサイズである。   On the other hand, if there is a packing file being created, the packing file creation processing unit 142 determines whether the sum of the size of the packing file being created and the size of the file requested to be written is equal to or smaller than the block size. Determination is made (step 308). This block size is the minimum access unit of the file system 140 and is a size that can store a plurality of files.

合計がブロックサイズ以下の場合、パッキングファイル作成処理部142は、ファイル構成情報200を更新し(ステップ309)、パッキングファイル管理テーブル141を更新し(ステップ310)、書き込みを要求されたファイルを、作成中のパッキングファイルに追加する(ステップ311)。   When the total is equal to or smaller than the block size, the packing file creation processing unit 142 updates the file configuration information 200 (step 309), updates the packing file management table 141 (step 310), and creates a file requested to be written. It is added to the packing file inside (step 311).

合計がブロックサイズ以下でない場合、パッキングファイル作成処理部142は、作成中のパッキングファイルがブロックサイズと同じサイズになるように、パッキングファイルにダミーデータを追加し(ステップ312)、パッキングファイルをストレージに書き込む(ステップ313)。その後、パッキングファイル作成処理部142は、書き込みを要求されたファイルにファイル構成情報200を付与し(ステップ305)、パッキングファイル管理テーブルを更新し(ステップ306)、新たなパッキングファイルを書込みバッファ144に格納する(ステップ307)。   If the total is not less than the block size, the packing file creation processing unit 142 adds dummy data to the packing file so that the packing file being created has the same size as the block size (step 312), and the packing file is stored in the storage. Write (step 313). Thereafter, the packing file creation processing unit 142 adds the file configuration information 200 to the file requested to be written (step 305), updates the packing file management table (step 306), and adds a new packing file to the write buffer 144. Store (step 307).

また、最後のパッキングファイルをストレージ150へ書込むタイミングを決定するため、パッキングファイル管理テーブル141は最終書き込み時刻506を保持している。パッキングファイル吐き出し処理部146は、最終書き込み時刻506からの経過時間を監視しており、最終書き込み時刻506から所定時間が経過する間に更新されていないパッキングファイルをストレージ150に書き込む。   Further, the packing file management table 141 holds a last writing time 506 in order to determine the timing for writing the last packing file to the storage 150. The packing file discharge processing unit 146 monitors the elapsed time from the last writing time 506 and writes a packing file that has not been updated to the storage 150 while a predetermined time has elapsed from the last writing time 506.

図5は、ファイルを読み出すときのパッキングファイル分割処理部143の処理を示すフローチャートである。   FIG. 5 is a flowchart showing the processing of the packing file division processing unit 143 when reading a file.

まず、パッキングファイル分割処理部143は、ファイル読み出し要求受信待ちの状態で(ステップ401)、読み出し要求を受信すると、パッキングファイル管理テーブル141を検索し(ステップ402)、読み出しを要求されたファイルがパッキング対象であるか否か判定する(ステップ403)。そのファイルがパッキング対象であるか否かは、予め登録されている、パッキング対象の共通ファイル名称を、そのファイルのファイル名称が含んでいるか否かで判定できる。   First, the packing file division processing unit 143 waits for reception of a file read request (step 401). Upon receiving the read request, the packing file division processing unit 143 searches the packing file management table 141 (step 402), and the file requested to be read is packed. It is determined whether or not it is a target (step 403). Whether or not the file is to be packed can be determined by whether or not the file name of the file includes a common file name to be packed that has been registered in advance.

読み出しを要求されたファイルがパッキング対象でない場合、パッキングファイル分割処理部143は、そのファイルをストレージ150から読み出し(ステップ409)、要求元のクライアント161、162に送信する(ステップ410)。   If the file requested to be read is not a packing target, the packing file division processing unit 143 reads the file from the storage 150 (step 409) and transmits it to the requesting clients 161 and 162 (step 410).

一方、読み出しを要求されたファイルがパッキング対象である場合、パッキングファイル分割処理部143は、パッキングファイル管理テーブル141から、そのパッキングファイルのパッキングファイル数507およびパッキングファイル名称502を取得する(ステップ404)。パッキングファイル数507は、各パッキングファイル240に何個のファイルが含まれているかを示している。   On the other hand, when the file requested to be read is a packing target, the packing file division processing unit 143 acquires the number of packing files 507 and the packing file name 502 of the packing file from the packing file management table 141 (step 404). . The number of packing files 507 indicates how many files are included in each packing file 240.

各パッキングファイル240のパッキングファイル数507と、読み出しを要求されたファイルの通番とから、読み出しを要求されたファイルが何番目のパッキングファイル240に含まれているか分かる。パッキングファイル分割処理部143は、読み出しを要求されたファイルを含むパッキングファイルが、読み出しバッファ145に読み込まれているか否か判定する(ステップ405)。   From the number of packing files 507 of each packing file 240 and the serial number of the file requested to be read, it is known what number of packing file 240 contains the file requested to be read. The packing file division processing unit 143 determines whether or not a packing file including a file requested to be read has been read into the reading buffer 145 (step 405).

読み出しを要求されたファイルを含むパッキングファイル240が読み出しバッファ145に読み込まれていなければ、パッキングファイル分割処理部143は、そのパッキングファイル240をストレージ150から読み込む(ステップ406)。   If the packing file 240 including the file requested to be read is not read into the reading buffer 145, the packing file division processing unit 143 reads the packing file 240 from the storage 150 (step 406).

ステップ405にて、読み出しを要求されたファイルを含むパッキングファイル240が読み出しバッファ145に読み出されていた場合、あるいは、ステップ406にてパッキングファイルが読み出しバッファ145に読み出された場合、パッキングファイル分割処理部143は、当該パッキングファイル240のファイル構成情報200から対象ファイル先頭オフセット513を取得し、そのオフセットを用いて、パッキングファイルから、読み出しを要求されたファイルを取得し(ステップ407)、要求元に送信する(ステップ410)。   When the packing file 240 including the file requested to be read is read to the read buffer 145 in step 405, or when the packing file is read to the read buffer 145 in step 406, the packing file division is performed. The processing unit 143 acquires the target file head offset 513 from the file configuration information 200 of the packing file 240, and acquires the file requested to be read from the packing file using the offset (Step 407). (Step 410).

第2の実施例は、第1の実施例と異なり、パッキングファイル作成処理部142およびパッキングファイル分割処理部143が、クライアント161、162と通信するファイル転送ミドルウエア120およびファイル共有ミドルウエア130と、ストレージ150のデータ書き込みおよび読み出しを行うファイルシステム140の間に配置される。これにより、パッキングファイル240の作成や分割の機能が、ミドルウエアとファイルシステムのどちらとも別個に、それらの間に共通処理部として配置されているので、ミドルウエアやアプリケーションに依存せず、かつ、ファイルシステムの変更の影響を受けない。   Unlike the first embodiment, the second embodiment includes a file transfer middleware 120 and a file sharing middleware 130 in which the packing file creation processing unit 142 and the packing file division processing unit 143 communicate with the clients 161 and 162. The storage system 150 is arranged between the file systems 140 for writing and reading data. As a result, the function of creating and dividing the packing file 240 is arranged as a common processing unit between the middleware and the file system separately, so that it does not depend on the middleware or application, and Unaffected by file system changes.

図6は、実施例2による映像蓄積配信システムのブロック図である。実施例2の映像蓄積配信システムでは、映像蓄積配信サーバ110は、ファイル転送ミドルウエア120、ファイル共有ミドルウエア130、I/O中継プログラム170、およびファイルシステム140を有している。I/O中継プログラム170は、パッキングファイル管理テーブル141、パッキングファイル作成処理部142、パッキングファイル分割処理部143、書き込みバッファ144、および読み出しバッファ145を有している。すなわち、実施例1では、パッキングファイル管理テーブル141、パッキングファイル作成処理部142、パッキングファイル分割処理部143、書き込みバッファ144、および読み出しバッファ145が、ファイルシステム140に含まれていたが、実施例2では、それらがI/O中継プログラム170に含まれている。パッキングファイル管理テーブル141、パッキングファイル作成処理部142、パッキングファイル分割処理部143、書き込みバッファ144、および読み出しバッファ145のそれぞれの機能および動作は実施例1のものと同じである。   FIG. 6 is a block diagram of a video storage / delivery system according to the second embodiment. In the video storage / delivery system according to the second embodiment, the video storage / delivery server 110 includes a file transfer middleware 120, a file sharing middleware 130, an I / O relay program 170, and a file system 140. The I / O relay program 170 includes a packing file management table 141, a packing file creation processing unit 142, a packing file division processing unit 143, a write buffer 144, and a read buffer 145. That is, in the first embodiment, the file system 140 includes the packing file management table 141, the packing file creation processing unit 142, the packing file division processing unit 143, the write buffer 144, and the read buffer 145. Then, they are included in the I / O relay program 170. The functions and operations of the packing file management table 141, the packing file creation processing unit 142, the packing file division processing unit 143, the write buffer 144, and the read buffer 145 are the same as those in the first embodiment.

本実施例の構成によれば、パッキングファイル管理テーブル141、パッキングファイル作成処理部142、パッキングファイル分割処理部143、書き込みバッファ144、および読み出しバッファ145がファイルシステム140の外にあるI/O中継プログラム170に配置されているので、ファイルシステム140がOS(オペレーティングシステム)のカーネルバージョンに依存して変更されたとしても、ファイルのパッキングに関する処理は、そのままで使用することができる。また、パッキングファイル管理テーブル141、パッキングファイル作成処理部142、パッキングファイル分割処理部143、書き込みバッファ144、および読み出しバッファ145がミドルウeアの外にあるので、ミドルウエアやアプリケーションに依存することもない。   According to the configuration of this embodiment, the I / O relay program in which the packing file management table 141, the packing file creation processing unit 142, the packing file division processing unit 143, the write buffer 144, and the read buffer 145 are outside the file system 140. Therefore, even if the file system 140 is changed depending on the OS (operating system) kernel version, the processing related to the packing of the file can be used as it is. Since the packing file management table 141, the packing file creation processing unit 142, the packing file division processing unit 143, the write buffer 144, and the read buffer 145 are outside the middleware, they do not depend on middleware or applications. .

なお、上述した実施例1、2は、本発明の説明のための例示であり、本発明の範囲をそれらの実施例にのみ限定する趣旨ではない。当業者は、本発明の要旨を逸脱することなしに、他の様々な態様で本発明を実施することができる。例えば、上述した実施例1、2では、同じ共通ファイル名称の複数のファイルを同じパッキングファイルへのパッキング対象とする例を示したが、本発明がこれに限定されることはない。同じパッキングファイルへのパッキング対象を規定する方法の他の例として、同一ディレクトリ内への書き込みが要求された複数のファイルを、同じパッキングファイルへのパッキング対象としてもよい。その場合、例えば、その書き込みが要求された順序がパッキングファイルへ格納順序としてもよい。   In addition, Example 1 and 2 mentioned above are the illustrations for description of this invention, and it is not the meaning which limits the range of this invention only to those Examples. Those skilled in the art can implement the present invention in various other modes without departing from the spirit of the present invention. For example, in the first and second embodiments described above, an example in which a plurality of files having the same common file name are targeted for packing into the same packing file has been described, but the present invention is not limited to this. As another example of the method for defining the packing target in the same packing file, a plurality of files requested to be written in the same directory may be set as packing targets in the same packing file. In this case, for example, the order in which the writing is requested may be set as the storage order in the packing file.

110…映像蓄積配信サーバ、120…ファイル転送ミドルウエア、130…ファイル共有ミドルウエア、140…ファイルシステム、141…パッキングファイル管理テーブル、142…パッキングファイル作成処理部、143…パッキングファイル分割処理部、144…バッファ、145…バッファ、146…パッキングファイル吐き出し処理部、150…ストレージ、161…要求元クライアント、170…I/O中継プログラム、200…ファイル構成情報、210〜230…ファイル、240…パッキングファイル、501…共通ファイル名称、502…パッキングファイル名称、503…パッキングファイル格納場所、504…パッキングファイルサイズ、505…書き込みフラグ、506…最終書き込み時刻、507…パッキングファイル数、511…共通ファイル名称、512…パッキング対象ファイル数、513…ファイル先頭オフセット DESCRIPTION OF SYMBOLS 110 ... Video | video accumulation | storage delivery server, 120 ... File transfer middleware, 130 ... File sharing middleware, 140 ... File system, 141 ... Packing file management table, 142 ... Packing file creation process part, 143 ... Packing file division | segmentation process part, 144 ... Buffer, 145 ... Buffer, 146 ... Packing file discharge processing unit, 150 ... Storage, 161 ... Request source client, 170 ... I / O relay program, 200 ... File configuration information, 210-230 ... File, 240 ... Packing file, 501 ... Common file name, 502 ... Packing file name, 503 ... Packing file storage location, 504 ... Packing file size, 505 ... Write flag, 506 ... Last write time, 507 ... Pack Grayed number of files, 511 ... common file name, 512 ... packing object file number, 513 ... file top offset

Claims (7)

ブロック毎にデータを格納する記憶装置に複数の連続したファイルを蓄積するファイル処理装置であって、
連続した複数のファイルを含む、ブロックサイズの自然数倍であるパッキングサイズのパッキングファイルを作成するパッキングファイル作成処理部と、
少なくとも1つのファイルの読み出しを要求するための読み出し要求を要求元クライアントから受けると、要求されたファイルを含むパッキングファイルから、前記要求されたファイルを取り出し、前記要求元クライアントに送信するパッキングファイル分割処理部と、
を有するファイル処理装置。
A file processing apparatus that accumulates a plurality of continuous files in a storage device that stores data for each block,
A packing file creation processing unit that creates a packing file having a packing size that is a natural number multiple of the block size, including a plurality of continuous files;
When a read request for requesting reading of at least one file is received from the request source client, the requested file is extracted from the packing file including the requested file and transmitted to the request source client. And
A file processing apparatus.
前記パッキングファイル作成処理部は、書き込みバッファにファイルを順次書き込んでパッキングファイルとし、次のファイルを追加すると前記パッキングファイルのサイズが前記パッキングサイズを超える場合に、前記パッキングファイルにダミーデータを追加し、前記パッキングサイズのパッキングファイルを作成する、
請求項1に記載のファイル処理装置。
The packing file creation processing unit sequentially writes a file in a write buffer to form a packing file, and when the next file is added, if the size of the packing file exceeds the packing size, dummy data is added to the packing file, Creating a packing file of the packing size,
The file processing apparatus according to claim 1.
パッキングファイル管理部とパッキングファイル吐き出し部とを更に有し、
前記パッキングファイル作成処理部は、連続的に入力されるファイルを順次パッキングファイルに追加し、
前記パッキングファイル管理部は、前記パッキングファイルに最後にファイルを追加した時刻である最終書き込み時刻を管理し、
前記パッキングファイル吐き出し部は、前記最終書き込み時刻の後、ファイルがパッキングファイルに追加されない状態で所定時間継続したら、当該パッキングファイルを前記パッキングサイズにして送信する、
請求項2に記載のファイル処理装置。
A packing file management unit and a packing file discharge unit;
The packing file creation processing unit sequentially adds files that are input continuously to the packing file,
The packing file management unit manages the last write time that is the time when the file was last added to the packing file,
When the packing file discharge unit continues for a predetermined time after the last writing time without adding the file to the packing file, the packing file is sent out with the packing size as the packing size.
The file processing apparatus according to claim 2.
前記パッキングファイル分割処理部は、前記記憶装置から読み出したパッキングファイルを読み出しバッファに格納し、読み出しが要求されたファイルを要求元クライアントに送り、その後の読み出し要求で読み出しが要求されたファイルが前記読み出しバッファにあれば、当該ファイルを前記読み出しバッファから読み出して前記要求元クライアントに送る、
請求項1に記載のファイル処理装置。
The packing file division processing unit stores the packing file read from the storage device in a read buffer, sends the file requested to be read to the requesting client, and reads the file requested to be read by a subsequent read request. If so, the file is read from the read buffer and sent to the requesting client.
The file processing apparatus according to claim 1.
前記パッキングファイル作成処理部および前記パッキングファイル分割処理部が、クライアントと通信するミドルウエアとファイル受け渡しを行い、前記記憶装置のデータ書き込みおよび読み出しを行うファイルシステムに組み込まれている、請求項1に記載のファイル処理装置。   The packing file creation processing unit and the packing file division processing unit are incorporated in a file system that performs file transfer with middleware communicating with a client, and writes and reads data in the storage device. File processing device. 前記パッキングファイル作成処理部および前記パッキングファイル分割処理部が、クライアントと通信するミドルウエアと、前記記憶装置のデータ書き込みおよび読み出しを行うファイルシステムの間に配置される、請求項1に記載のファイル処理装置。   The file processing according to claim 1, wherein the packing file creation processing unit and the packing file division processing unit are arranged between middleware that communicates with a client and a file system that writes and reads data in the storage device. apparatus. ブロック毎にデータを格納する記憶装置に複数の連続したファイルを蓄積するためのファイル処理方法であって、
連続した複数のファイルを含む、ブロックサイズの自然数倍であるパッキングサイズのパッキングファイルを作成し、
少なくとも1つのファイルの読み出しを要求するための読み出し要求を要求元クライアントから受けると、要求されたファイルを含むパッキングファイルから、前記要求されたファイルを取り出し、
前記取り出したファイルを前記要求元クライアントに送信する、
ファイル処理方法。
A file processing method for accumulating a plurality of continuous files in a storage device that stores data for each block,
Create a packing file with a packing size that is a natural multiple of the block size, including multiple consecutive files,
When a read request for requesting reading of at least one file is received from the requesting client, the requested file is extracted from the packing file including the requested file,
Sending the retrieved file to the requesting client;
File processing method.
JP2014005605A 2014-01-16 2014-01-16 File processor and file processing method Pending JP2015135535A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014005605A JP2015135535A (en) 2014-01-16 2014-01-16 File processor and file processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014005605A JP2015135535A (en) 2014-01-16 2014-01-16 File processor and file processing method

Publications (1)

Publication Number Publication Date
JP2015135535A true JP2015135535A (en) 2015-07-27

Family

ID=53767340

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014005605A Pending JP2015135535A (en) 2014-01-16 2014-01-16 File processor and file processing method

Country Status (1)

Country Link
JP (1) JP2015135535A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111949312A (en) * 2020-08-14 2020-11-17 曙光信息产业(北京)有限公司 Data module packaging method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0465733A (en) * 1990-07-05 1992-03-02 Fujitsu Ltd System for forming backup file
JP2002230889A (en) * 2001-01-31 2002-08-16 Hitachi Ltd Recording system and program for non-rewritable recording medium
JP2003067225A (en) * 2001-05-31 2003-03-07 Matsushita Electric Ind Co Ltd Information providing method, provided information recorder, provided information reader, and cooking unit
JP2010527468A (en) * 2007-04-20 2010-08-12 インターナショナル・ビジネス・マシーンズ・コーポレーション Data placement and destaging in holographic storage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0465733A (en) * 1990-07-05 1992-03-02 Fujitsu Ltd System for forming backup file
JP2002230889A (en) * 2001-01-31 2002-08-16 Hitachi Ltd Recording system and program for non-rewritable recording medium
JP2003067225A (en) * 2001-05-31 2003-03-07 Matsushita Electric Ind Co Ltd Information providing method, provided information recorder, provided information reader, and cooking unit
JP2010527468A (en) * 2007-04-20 2010-08-12 インターナショナル・ビジネス・マシーンズ・コーポレーション Data placement and destaging in holographic storage

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111949312A (en) * 2020-08-14 2020-11-17 曙光信息产业(北京)有限公司 Data module packaging method and device, computer equipment and storage medium
CN111949312B (en) * 2020-08-14 2024-02-09 曙光信息产业(北京)有限公司 Packaging method and device for data module, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
KR102240557B1 (en) Method, device and system for storing data
JP6106901B2 (en) Data processing method and device in distributed file storage system
US9952940B2 (en) Method of operating a shared nothing cluster system
KR20170054299A (en) Reference block aggregating into a reference set for deduplication in memory management
US20170193416A1 (en) Reducing costs related to use of networks based on pricing heterogeneity
US20180060348A1 (en) Method for Replication of Objects in a Cloud Object Store
US11221992B2 (en) Storing data files in a file system
US20120102005A1 (en) File management method and computer system
US20140025899A1 (en) Efficiently Updating and Deleting Data in a Data Storage System
US20150106440A1 (en) Autonomous network streaming
CN106817388B (en) Method and device for acquiring data by virtual machine and host machine and system for accessing data
US10804930B2 (en) Compressed data layout with variable group size
CN109885577A (en) Data processing method, device, terminal and storage medium
US20180107404A1 (en) Garbage collection system and process
JP4713257B2 (en) Data storage device and version management program
CN115470156A (en) RDMA-based memory use method, system, electronic device and storage medium
JP5470974B2 (en) Distributed file system and distributed file storage method
US10311026B2 (en) Compressed data layout for optimizing data transactions
JP7505252B2 (en) File server, deduplication system, processing method, and program
CN107810499B (en) System and method for content storage and retrieval
CN109726144B (en) Data message processing method and device
JP2015135535A (en) File processor and file processing method
JP5494817B2 (en) Storage system, data management apparatus, method and program
CN110958212A (en) Data compression method, data decompression method, device and equipment
US20180314544A1 (en) Combining data blocks from virtual machines

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160225

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170124

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170222

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20170801