JP2007004326A - Data access method and program therefor - Google Patents

Data access method and program therefor Download PDF

Info

Publication number
JP2007004326A
JP2007004326A JP2005181478A JP2005181478A JP2007004326A JP 2007004326 A JP2007004326 A JP 2007004326A JP 2005181478 A JP2005181478 A JP 2005181478A JP 2005181478 A JP2005181478 A JP 2005181478A JP 2007004326 A JP2007004326 A JP 2007004326A
Authority
JP
Japan
Prior art keywords
data
data group
storage means
designated
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2005181478A
Other languages
Japanese (ja)
Other versions
JP4540556B2 (en
Inventor
Yuko Kondo
祐子 近藤
Masanobu Fujihira
雅信 藤平
Nobuyuki Odera
信行 大寺
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.)
Kobe Steel Ltd
Original Assignee
Kobe Steel 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 Kobe Steel Ltd filed Critical Kobe Steel Ltd
Priority to JP2005181478A priority Critical patent/JP4540556B2/en
Publication of JP2007004326A publication Critical patent/JP2007004326A/en
Application granted granted Critical
Publication of JP4540556B2 publication Critical patent/JP4540556B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To attain high speed access in processing for performing access to data in a data file of a large size stored in a storage device, especially, repeated access to a data group in an arbitrary portion of extent. <P>SOLUTION: A data file in a storage device is successively accessed from the top to designated data, and the association of the ID of record groups for the predetermined number of records and a leading address in the storage device is registered in an index memory, and the record group to which the designated data are belonging is transferred to a work memory, and data access to the work memory is performed. When any designated data are not present in the work memory, the record group at the leading address already registered in the index memory is transferred to the work memory, and the data file is successively accessed from the leading address already registered in the index memory to the designated data, and the record group to which the designated data are belonging is transferred to the work memory, and data access to the work memory is performed. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は,所定の記憶手段に記憶された大サイズのデータファイル中のデータに高速にアクセスするためのデータアクセス方法及びそのプログラムに関するものである。   The present invention relates to a data access method and a program for accessing data in a large-sized data file stored in a predetermined storage means at high speed.

一般に,サイズ(ボリューム)の大きいデータファイルは,ハードディスク装置や光磁気ディスク装置等のディスク式の記憶装置に代表されるように,ビット単価が低い反面,アクセス速度が比較的遅い記憶手段に記憶させて利用されることが多い。以下,このような記憶手段を低速メモリという。これに対し,RAM等は,アクセス速度が高速である反面,ビット単価が高い。以下,このような記憶手段を高速メモリという。
低速メモリに記憶された大サイズのデータファイルについて,アクセス対象とするデータ(以下,指定データという)にアクセスする場合,例えば,レコード番号等のように,データファイル中における指定データの識別情報(例えば,データファイル中における相対位置情報等,以下,指定データIDという)がまず指定される。そして,通常は,OS(オペレーションシステム)等が備えるファイルシステムを通じて得られる低速メモリにおけるデータファイルの先頭アドレス(先頭データの位置を表すアドレス(ポインタ))に位置するデータから,指定データに到達するまで,即ち,前記指定データIDに対応するデータに到達するまで,順次後続するデータにアクセスすることになる。即ち,データにアクセスするごとに,ファイルシステムを通じて次の(後続の)データのアドレスが得られるので,そのアドレスを順次辿って指定データにアクセスする。以下,このようなデータアクセスをシーケンシャルアクセスという。
In general, large data files (volumes) are stored in storage means that have a low bit rate but a relatively slow access speed, as represented by disk-type storage devices such as hard disk devices and magneto-optical disk devices. Often used. Hereinafter, such a storage means is referred to as a low speed memory. On the other hand, the RAM and the like have a high bit rate while having a high access speed. Hereinafter, such a storage means is referred to as a high-speed memory.
When accessing the data to be accessed (hereinafter referred to as specified data) for a large data file stored in low-speed memory, for example, identification information of the specified data in the data file (eg, record number) , Relative position information in the data file, hereinafter referred to as designated data ID) is designated first. Usually, from the data located at the top address (address (pointer) indicating the position of the top data) of the data file in the low-speed memory obtained through the file system included in the OS (operation system) or the like until the designated data is reached. That is, subsequent data is sequentially accessed until the data corresponding to the designated data ID is reached. That is, every time data is accessed, the address of the next (subsequent) data is obtained through the file system, and the designated data is accessed by sequentially tracing the address. Hereinafter, such data access is referred to as sequential access.

しかしながら,頻繁なデータアクセスを行う場合,指定データにアクセスする度に前記シーケンシャルアクセスを行うと,データアクセスに多大な時間を要するという問題が生じる。
もちろん,予めデータファイル全体を高速メモリに転送しておいた後に,高速メモリにおいてデータアクセスを行えば高速アクセスが可能となる反面,高いメモリコストを要するばかりでなく,システム(コンピュータ)全体のパフォーマンスが悪化するという問題も生じる。
一方,特許文献1には,マスタファイル(データファイルの一例)のうち,更新処理が少ない固定項目のデータを高速メモリに索引順編成ファイルとして,更新処理の多い変動項目のデータを大容量の磁気ディスク装置に直編成ファイルとして各々構築することにより,固定項目と変動項目との各々への同時アクセスを可能として待ち合わせ時間を削減するマスタファイルのメンテナンス方式が示されている。
また,特許文献2には,被測定物の測定データの全領域を予め複数の小領域に分割するとともに,全小領域各々の始点・終点及び測定順序を記憶しておき,任意の小領域の測定データをメモリ内に蓄積して外部メモリに転送するデータ蓄積方法が示されている。
特開平4−304536号公報 特開平10−2762号公報
However, when frequent data access is performed, if the sequential access is performed every time specified data is accessed, there is a problem that it takes a long time to access the data.
Of course, if the data file is transferred to the high-speed memory in advance and then the data is accessed in the high-speed memory, high-speed access is possible. On the other hand, not only high memory cost is required, but also the performance of the entire system (computer) is improved. The problem of worsening also arises.
On the other hand, Patent Document 1 discloses that, among master files (an example of a data file), fixed item data with little update processing is stored as an index sequential file in a high-speed memory, and variable item data with many update processing is stored in a large-capacity A master file maintenance method is shown in which a fixed item and a variable item can be simultaneously accessed by constructing each as a directly-organized file in a disk device, thereby reducing waiting time.
In Patent Document 2, the entire area of the measurement data of the object to be measured is divided into a plurality of small areas in advance, and the start point / end point of each of the small areas and the measurement order are stored. A data storage method for storing measurement data in a memory and transferring it to an external memory is shown.
JP-A-4-304536 JP-A-10-2762

しかしながら,特許文献1に示される技術では,アクセス頻度の高いデータ(前記変動項目のデータ)について,毎回,アクセス速度の遅い磁気ディスクに対するアクセスが行われるため,アクセス処理全体の速度が遅くなるという問題点があった。
また,特許文献2に示される技術を,低速メモリに記憶されたサイズの大きなデータに対するアクセスに適用した場合,全ての小領域の始点・終点の情報を予め記憶するために,大サイズのデータ全てに対して少なくとも一通り事前アクセスを行う必要が生じ,データサイズが大きいほど処理の開始が遅くなるという問題点があった。
ここで,大サイズのデータファイルに対するアクセス処理には,あるデータにアクセスした後,さらにそのデータやその前後の比較的近い一部の範囲に存在するのデータ群に対して繰り返しアクセスすることが頻繁に行われる処理がある。例えば,いわゆる表計算ソフトにおけるデータのグラフ化処理等がその一例である。このような一部のデータ群への繰り返しアクセスが行われる処理では,少なくともその一部のデータ群について高速アクセス可能な状態をつくることができれば,アクセス処理全体の高速化を図ることができる。
従って,本発明は上記事情に鑑みてなされたものであり,その目的とするところは,磁気ディスク装置等の2次記憶媒体を有する所定の記憶手段に記憶された大サイズのデータファイル中のデータに高速にアクセスすることを可能とし,特に,データファイル中の任意の一部の範囲に存在するデータ群への繰り返しアクセスが行われる処理への適用に好適なデータアクセス方法及びそのプログラムを提供することにある。
However, in the technique disclosed in Patent Document 1, since the access to the magnetic disk having a low access speed is performed every time for the frequently accessed data (the data of the variable item), the speed of the entire access process is slow. There was a point.
In addition, when the technique disclosed in Patent Document 2 is applied to access to large data stored in a low-speed memory, all large data is stored in order to store in advance information on the start and end points of all small areas. However, there is a problem that at least one prior access is required, and the start of processing is delayed as the data size increases.
Here, in accessing a large data file, it is often the case that after accessing a certain data, the data and a data group existing in a relatively close range before and after that data are repeatedly accessed. There is a process to be performed. One example is data graphing processing in so-called spreadsheet software. In such a process in which a partial data group is repeatedly accessed, the entire access process can be speeded up if at least a part of the data group can be accessed at a high speed.
Accordingly, the present invention has been made in view of the above circumstances, and an object of the present invention is to provide data in a large data file stored in a predetermined storage means having a secondary storage medium such as a magnetic disk device. A data access method and program suitable for application to a process in which a data group existing in an arbitrary partial range in a data file is repeatedly accessed are provided. There is.

上記目的を達成するために本発明は,磁気ディスク装置等の2次記憶媒体を有する所定の記憶手段(以下,第1の記憶手段という)に記憶された複数の単位データからなるデータファイルについて,そのデータファイルにおけるアクセス対象とする前記単位データ(以下,指定データという)の識別情報(以下,指定データIDという)に基づいて,前記第1の記憶手段からこれより高速アクセスが可能な第2の記憶手段にデータ転送をした上で前記指定データにアクセスするデータアクセス方法,或いはそのようなアクセス処理をコンピュータに実行させるためのデータアクセスプログラムの発明であって,以下の各手順を有する方法或いはコンピュータに実行させるためのプログラムである。
即ち,前記指定データIDに基づいて,前記データファイルをその先頭から予め定められた設定数(以下,設定単位データ数という)分ごとの前記単位データの集合(前記データファイルにおける,ひとまとまりの一部の範囲に存在する前記単位データの集合を意味し,以下,データ群という)各々に区分した場合におけるそのデータ群各々の識別情報(以下,データ群IDという)の中から,前記指定データが属する前記データ群に対応する前記データ群IDである指定データ群IDを特定する指定データ群ID特定手順と,
前記データ群IDと前記第1の記憶手段における前記データ群の先頭アドレスを表すデータ群アドレスとが対応付けられて記憶される記憶手段(以下,第3の記憶手段という)を参照し,前記指定データ群IDに対応する前記データ群アドレスを検索するデータ群アドレス検索手順と,
そのデータ群アドレス検索手順の実行により前記指定データ群IDに対応する前記データ群アドレスが見つからなかった場合(即ち,前記第3の記憶手段に記憶されていなかった場合)に,前記第1の記憶手段において,前記第3の記憶手段に記憶された前記データ群アドレスのうち前記データファイルにおける最も後尾側の前記データ群に対応する前記データ群アドレス,若しくはそれが存在しない場合(即ち,前記第3の記憶手段に前記データ群アドレスの登録がない場合)は前記データファイルの先頭アドレスをアクセス開始アドレスとし,そのアクセス開始アドレスに存在する前記単位データから順に後続する前記単位データに順次アクセス(前記シーケンシャルアクセス)しつつ,前記設定単位データ数分の前記単位データにアクセスするごとに,そのアクセスにより得られる前記データ群アドレスとこれに対応する前記データ群IDとを対応付けて前記第3の記憶手段に追加記憶させる処理を,前記指定データが属する前記データ群にアクセスするまで行うデータ群アドレス登録手順と,
そのデータ群アドレス登録手順が実行された場合に,前記指定データが属する前記データ群を前記第1の記憶手段から前記第2の記憶手段に転送する第1のデータ群転送手順と,
前記データ群アドレス検索手順の実行により前記指定データ群IDに対応する前記データ群アドレスが見つかった場合に,その見つかったデータ群アドレスに存在する前記データ群を前記第1の記憶手段から前記第2の記憶手段に転送する第2のデータ群転送手順と,
前記第2の記憶手段における前記指定データにアクセスする第2記憶手段アクセス手順と,を有するデータアクセス方法或いはそれらの手順をコンピュータに実行させるためのデータアクセスプログラムである。
ここで,前記単位データ及びその識別情報(例えば,データファイル中における相対位置の情報)の一例としては,各々1レコード分のデータ及びそのレコード番号である場合が考えられる。
To achieve the above object, the present invention relates to a data file composed of a plurality of unit data stored in a predetermined storage means (hereinafter referred to as a first storage means) having a secondary storage medium such as a magnetic disk device. Based on identification information (hereinafter referred to as designated data ID) of the unit data (hereinafter referred to as designated data) to be accessed in the data file, the second storage that can be accessed at higher speed from the first storage means. A data access method for accessing the designated data after transferring data to a storage means, or a data access program for causing a computer to execute such access processing, wherein the method or computer comprises the following steps: It is a program for making it run.
That is, based on the designated data ID, the set of unit data (a set of unit data in the data file) for each predetermined number of data files (hereinafter referred to as the number of set unit data) from the top of the data file. In the case where each of the data groups is divided into each of the data groups (hereinafter referred to as data group IDs), the designated data is determined from the identification information (hereinafter referred to as data group IDs). A specified data group ID specifying procedure for specifying a specified data group ID that is the data group ID corresponding to the data group to which the data belongs;
Refer to the storage means (hereinafter referred to as third storage means) in which the data group ID and the data group address representing the start address of the data group in the first storage means are stored in association with each other. A data group address search procedure for searching for the data group address corresponding to the data group ID;
When the data group address corresponding to the designated data group ID is not found by execution of the data group address search procedure (that is, when the data group address is not stored in the third storage means), the first storage In the means, the data group address corresponding to the rearmost data group in the data file among the data group addresses stored in the third storage means, or when the data group address does not exist (that is, the third group If the data group address is not registered in the storage means, the start address of the data file is used as the access start address, and the subsequent unit data is sequentially accessed from the unit data existing at the access start address (the sequential Access to the unit data corresponding to the number of set unit data. Each time the data group address obtained by the access and the corresponding data group ID are associated with each other and additionally stored in the third storage unit, the data group to which the designated data belongs Data group address registration procedure to be performed until access,
A first data group transfer procedure for transferring the data group to which the designated data belongs when the data group address registration procedure is executed from the first storage means to the second storage means;
When the data group address corresponding to the specified data group ID is found by executing the data group address search procedure, the data group existing at the found data group address is transferred from the first storage means to the second storage unit. A second data group transfer procedure for transferring to the storage means;
A data access method having a second storage means access procedure for accessing the designated data in the second storage means, or a data access program for causing a computer to execute these procedures.
Here, as an example of the unit data and its identification information (for example, information on the relative position in the data file), the case of data for one record and its record number can be considered.

また,前記第2の記憶手段に前記指定データが存在するか否かを判別するデータ存否判別手順を有する方法,或いはコンピュータに実行させるプログラムとし,前記データ群アドレス検索手順が,前記データ存否判別手順により前記第2の記憶手段に前記指定データが存在しないと判別された場合に実行されるようにしたものが考えられる。
さらに,前記データ群アドレス登録手順により追加記憶される情報量の増大に応じて前記第3の記憶手段の記憶領域が拡大されるようにしたものも考えられる。
Further, a method having a data presence / absence determination procedure for determining whether or not the designated data exists in the second storage means, or a program to be executed by a computer, wherein the data group address search procedure is the data existence determination procedure. Thus, it can be considered that the processing is executed when it is determined that the designated data does not exist in the second storage means.
Further, a storage area of the third storage means may be expanded in accordance with an increase in the amount of information additionally stored by the data group address registration procedure.

本発明によれば,以下のような作用効果が得られる。
まず,初期状態では,高速データアクセスが可能なRAM等により構成される前記第2の記憶手段にも,前記第3の記憶手段にも,何らデータが存在しない状態である。
従って,初期状態においては,前記データ群アドレス登録手順により,前記データファイルの先頭アドレスに位置する前記単位データから後続データに順次アクセスし,前記指定データが属する前記データ群に至るまで,前記第1の記憶手段でのデータアクセスを行いつつ,前記データ群アドレスとこれに対応する前記データ群IDとを対応付けて前記第3の記憶手段に追加記憶させる処理を行い,さらに,前記指定データが属する前記データ群を前記第2の記憶手段(高速メモリ)へ転送する。
これにより,以後,前記指定データIDが設定された場合,これに対応する前記指定データが前記第2の記憶手段に存在する限り,前記第2記憶手段アクセス手順を実行することにより,前記第2の記憶手段内の前記指定データに対して高速にアクセスすることが可能となる。
さらに,初期状態においても,前述の特許文献2に示されるように,大サイズのデータファイルにおける全ての前記データ群について,一通り事前アクセスを行ってその先頭アドレス(始点)の情報を予め記憶するのではなく,指定データが属するデータ群に至るまでしか順次アクセス(シーケンシャルアクセス)は行われないため,処理開始の遅延を最小限に抑えることが可能となる。
しかも,前記データ群アドレス登録手順の実行により,前記データ群IDと前記データ群アドレスとの対応関係が前記第3の記憶手段に記憶(登録)されるので,前記指定データが前記第2の記憶手段に存在しない場合でも,前記指定データに対して高速にアクセスすることが可能となる。
即ち,前記指定データが属する前記データ群の前記データ群アドレスが前記第3の記憶手段に存在する場合(アドレス既登録の場合)には,検索により得た前記データ群アドレスに存在する前記データ群を速やかに前記第2の記憶手段に転送し,その第2の記憶手段において前記指定データへの高速アクセスが可能となる。
According to the present invention, the following effects can be obtained.
First, in an initial state, there is no data in the second storage means or the third storage means constituted by a RAM or the like capable of high-speed data access.
Therefore, in the initial state, the data group address registration procedure sequentially accesses the subsequent data from the unit data located at the head address of the data file until the first data group to which the designated data belongs is reached. While performing data access in the storage means, the data group address and the data group ID corresponding to the data group address are associated with each other and additionally stored in the third storage means, and the designated data belongs The data group is transferred to the second storage means (high-speed memory).
Thereby, when the designated data ID is set thereafter, as long as the designated data corresponding to the designated data ID exists in the second storage means, the second storage means access procedure is executed to execute the second storage means access procedure. It is possible to access the designated data in the storage means at high speed.
Furthermore, even in the initial state, as shown in the above-mentioned Patent Document 2, all the data groups in the large-sized data file are pre-accessed and information on the start address (start point) is stored in advance. Instead, sequential access (sequential access) is performed only up to the data group to which the designated data belongs, so that the processing start delay can be minimized.
Moreover, since the correspondence relationship between the data group ID and the data group address is stored (registered) in the third storage means by executing the data group address registration procedure, the designated data is stored in the second storage. Even if it does not exist in the means, the designated data can be accessed at high speed.
That is, when the data group address of the data group to which the designated data belongs exists in the third storage means (when the address has already been registered), the data group existing at the data group address obtained by the search. Is quickly transferred to the second storage means, and the second storage means can quickly access the designated data.

また,前記指定データが属する前記データ群の前記データ群アドレスが前記第3の記憶手段に存在しない場合(アドレス未登録の場合)でも,少なくとも既に登録済みの前記データ群アドレスのうち,前記データファイルにおける最後尾側のものを起点とし,そこから順次アドレスを辿って前記指定データが属する前記データ群を前記第2の記憶手段に転送し,その第2の記憶手段において前記指定データへの高速アクセスが可能となる。
これらにより,前記第1の記憶手段において前記指定データにたどり着くまでのシーケンシャルアクセスを毎回行う必要がなく,アクセス処理全体の高速化が可能となる。
また,本発明は,前記データファイルにおける任意の一部の範囲に存在するデータ群への繰り返しアクセスが行われる処理に適用すれば,データアクセスの高速化がより顕著となる。
即ち,前記第2の記憶手段には,前記データファイルにおける前記指定データが属する前記データ群(一部の範囲に存在する単位データの集合)が格納(転送)されるので,前記データファイル中の任意の一部の範囲に存在するデータ群への繰り返しアクセスが行われる処理に本発明を適用すれば,前記第1の記憶手段にアクセスすることなく,前記第2記憶手段アクセス手順により前記第2の記憶手段にダイレクトにアクセスする頻度が増え,アクセス処理の高速化により好適である。
特に,前記第2の記憶手段に前記指定データが存在するか否かを判別し(データ存否判別手順),前記第2の記憶手段に前記指定データが存在しないと判別された場合に,前記データ群アドレス検索手順が実行されるようにすれば,その後の無駄な前記データ群の転送(第1の記憶手段から第2の記憶手段への転送)がなくなり効率的である。
また,前記第2の記憶手段として,1つの前記データ群のサイズに相当する容量だけ確保すればよいため,システム(コンピュータ)全体のパフォーマンスが悪化するという問題も回避できる。
さらに,前記データ群アドレス登録手順により追加記憶される情報量の増大に応じて前記第3の記憶手段の記憶領域が拡大されるようにすれば,前記第3の記憶手段の記憶容量が必要最小限に抑えられる。
In addition, even when the data group address of the data group to which the designated data belongs does not exist in the third storage means (when the address is not registered), at least the data file address among the already registered data group addresses. The data group to which the designated data belongs is transferred to the second storage means by sequentially following the addresses from the last side in the above, and high-speed access to the designated data in the second storage means Is possible.
Accordingly, it is not necessary to perform sequential access every time until the designated data is reached in the first storage means, and the entire access process can be speeded up.
Further, when the present invention is applied to a process in which repeated access to a data group existing in an arbitrary partial range in the data file is performed, the speed of data access becomes more remarkable.
That is, the second storage means stores (transfers) the data group to which the specified data in the data file belongs (a set of unit data existing in a part of the range). If the present invention is applied to a process in which a data group existing in an arbitrary partial range is repeatedly accessed, the second storage means access procedure does not access the first storage means, and the second storage means accesses the second storage means. The frequency of direct access to the storage means increases, which is preferable for speeding up the access processing.
In particular, it is determined whether or not the specified data exists in the second storage means (data existence determination procedure), and when it is determined that the specified data does not exist in the second storage means, the data If the group address search procedure is executed, the subsequent useless transfer of the data group (transfer from the first storage means to the second storage means) is eliminated, which is efficient.
Further, since it is sufficient to ensure only a capacity corresponding to the size of one data group as the second storage means, it is possible to avoid the problem that the performance of the entire system (computer) deteriorates.
Further, if the storage area of the third storage means is expanded in accordance with the increase in the amount of information additionally stored by the data group address registration procedure, the storage capacity of the third storage means is the minimum necessary. It can be suppressed to the limit.

以下添付図面を参照しながら,本発明の実施の形態について説明し,本発明の理解に供する。尚,以下の実施の形態は,本発明を具体化した一例であって,本発明の技術的範囲を限定する性格のものではない。
ここに,図1は本発明の実施形態に係るデータアクセスプログラムを実行する情報処理装置Xの概略構成を表すブロック図,図2は情報処理装置Xがデータ処理プログラムを実行することにより行われるデータアクセス処理の手順を表すフローチャート,図3は情報処理装置Xにおけるメモリ構成を表す概略図である。
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings so that the present invention can be understood. The following embodiment is an example embodying the present invention, and does not limit the technical scope of the present invention.
FIG. 1 is a block diagram showing a schematic configuration of the information processing apparatus X that executes the data access program according to the embodiment of the present invention, and FIG. 2 shows data that is executed when the information processing apparatus X executes the data processing program. FIG. 3 is a schematic diagram showing a memory configuration in the information processing apparatus X. FIG.

<装置概要>
以下,図1を用いて,本発明の実施形態に係るデータ処理プログラム30を実行する情報処理装置Xの構成について説明する。
ここで,データ処理プログラム30(データアクセスプログラムの一例)は,情報処理装置Xが備える磁気ディスク装置等の大容量の記憶手段であるデータ記憶部7に記憶された複数のレコードデータ(単位データの一例)からなるデータファイルにアクセスするためのプログラムであり,アクセス対象とするレコードデータの識別情報であって,その前記データファイル中における相対位置の情報である指定レコードID(指定データIDの一例)が設定された場合に,その指定レコードIDに対応するレコードデータ(以下,指定レコードデータという(指定データの一例))にアクセスする処理を情報処理装置X(コンピュータの一例)に実行させるためのプログラムである。
情報処理装置Xは,磁気ディスク等の2次記憶媒体を有する大容量の記憶手段である前記データ記憶部7を備えたパーソナルコンピュータ等の計算機によりそのハードウェアが構成され,これがその記憶手段に予め記憶された前記データ処理プログラム30を実行することによりデータアクセス装置として機能するものである。即ち,前記データ処理プログラム30は,前記情報処理装置X(コンピュータの一例)が備えるCPU1に,データアクセス処理を実行させ,データアクセス装置として機能させるためのプログラムである。
<Device overview>
Hereinafter, the configuration of the information processing apparatus X that executes the data processing program 30 according to the embodiment of the present invention will be described with reference to FIG.
Here, the data processing program 30 (an example of a data access program) is a plurality of record data (unit data) stored in the data storage unit 7 which is a large-capacity storage means such as a magnetic disk device provided in the information processing apparatus X. A specified record ID (an example of a specified data ID) that is identification information of record data to be accessed and information on a relative position in the data file. Is set, a program for causing the information processing apparatus X (an example of a computer) to execute processing for accessing record data corresponding to the designated record ID (hereinafter referred to as designated record data (an example of designated data)) It is.
The information processing apparatus X is configured with hardware by a computer such as a personal computer having the data storage unit 7 which is a large-capacity storage unit having a secondary storage medium such as a magnetic disk, and this is stored in advance in the storage unit. By executing the stored data processing program 30, it functions as a data access device. That is, the data processing program 30 is a program for causing the CPU 1 included in the information processing apparatus X (an example of a computer) to execute data access processing and function as a data access apparatus.

図1に示すように,情報処理装置Xは,各種プログラムを実行することにより各種の演算処理を行うCPU1,そのCPU1により実行されるプログラムや一時記憶データが展開される高速メモリであるRAM2,前記CPU1により実行されるBIOS等のプログラムが予め記憶されたROM3,キーボードやマウス等の入力手段を構成する入力装置4,液晶表示パネル等からなる表示装置5,及び前記CPU1により実行或いは参照される前記データ処理プログラム30や1又は複数のデータファイル10が記憶されるハードディスク等の記憶手段であるデータ記憶部7等がバス8を通じて接続されて構成されている。
ここで,前記RAM2は,前記データ記憶部7(第1の記憶手段の一例)よりも高速アクセスが可能な記憶手段(第2の記憶手段の一例)である。
また,前記データ記憶部7(第1の記憶手段の一例)に予め記憶されている前記データファイル10は,例えば,複数のレコードデータ(単位データの一例)からなるCSV形式(カンマ区切りされた複数項目のデータからなるレコードデータ各々が,改行コードで区切られた形式)のファイル等である。
前記データ処理プログラム30は,前記データファイル10を構成する各データにアクセスする処理を情報処理装置Xに実行させるプログラムである。
この他,前記データ記憶部7には,前記データ処理プログラム30に対し,アクセス対象とする前記指定レコードデータの前記データファイル10中における相対位置の指定情報である前記指定レコードID(例えば,レコード番号)を設定する(引き渡す)処理と,前記データ処理プログラム30により得られたデータ基づく各種の演算処理とを情報処理装置Xに実行させるプログラムであるデータ処理プログラムも記憶されている(不図示)。
さらに,当該情報処理装置Xを構成する各ハードウェアと前記データ処理プログラム30や前記データ処理プログラムを含む各種アプリケーションプログラムとの間の中継処理を行うOS(オペレーションシステム)及びファイルシステムのプログラムも前記データ記憶部7に記憶されている。
As shown in FIG. 1, the information processing apparatus X includes a CPU 1, which performs various arithmetic processes by executing various programs, a RAM 2, which is a high-speed memory in which programs executed by the CPU 1 and temporary storage data are expanded. ROM 3 in which programs such as BIOS executed by the CPU 1 are stored in advance, an input device 4 constituting input means such as a keyboard and a mouse, a display device 5 including a liquid crystal display panel, etc., and the CPU 1 that is executed or referred to A data storage unit 7, which is a storage means such as a hard disk in which the data processing program 30 and one or a plurality of data files 10 are stored, is connected through a bus 8.
Here, the RAM 2 is a storage unit (an example of a second storage unit) that can be accessed at a higher speed than the data storage unit 7 (an example of a first storage unit).
Further, the data file 10 stored in advance in the data storage unit 7 (an example of the first storage unit) is, for example, a CSV format (a comma-separated plurality of data) including a plurality of record data (an example of unit data). Each record data consisting of item data is a file in a format delimited by a line feed code.
The data processing program 30 is a program for causing the information processing apparatus X to execute processing for accessing each data constituting the data file 10.
In addition, the data storage unit 7 stores the specified record ID (for example, a record number) that is information specifying relative position in the data file 10 of the specified record data to be accessed with respect to the data processing program 30. ) Is also stored (not shown), which is a program that causes the information processing apparatus X to execute processing for setting (handing over) and various arithmetic processing based on data obtained by the data processing program 30.
Further, an OS (operation system) and a file system program for performing relay processing between each hardware constituting the information processing apparatus X and the data processing program 30 and various application programs including the data processing program are also included in the data. It is stored in the storage unit 7.

<データアクセス処理について>
次に,図2に示すフローチャート及び図3に示すメモリ構成の概略図を用いて,前記情報処理装置Xが前記データ処理プログラム30を実行することにより行われるデータアクセス処理の手順について説明する。以下,S1,S2,…は,処理手順(ステップ)の識別符号を表す。
前記データ処理プログラム30は,当該情報処理装置Xにより実行される基本プログラムであるOS(オペレーションシステム)を基礎として(OSの上で)実行され,OSは,前記データ記憶部7に記憶された各種データにアクセスする際のデータアクセス管理を行うファイルシステムを有している。前記データ処理プログラム30は,そのファイルシステムを通じて前記データ記憶部7に記憶された各種データにアクセス可能である。
前記データ処理プログラム30が実行されると,まず,所定の初期設定処理が行われる(S1)。
この初期設定処理では,データファイル選択処理,区分レコード数の設定処理,及びワークメモリ21や索引メモリ22(図3参照)の確保処理等が行われる。
前記データファイル選択処理は,前記データ記憶部7に複数存在するデータファイル10の中から,当該データアクセス処理においてアクセス対象とするものを選択する処理である。例えば,前記入力装置4を通じて利用者により入力された情報に従ってファイル選択を行う。以下,単にデータファイル10といえば,このデータファイル選択処理により選択されたデータファイル10を指すものとする。
前記区分レコード数とは,データファイル10をその先頭から所定の複数レコード分ごとのレコードデータの集合(以下,レコード群という)各々に区分する場合における,そのレコード群を構成するレコードの数の設定値である。この初期設定処理では,その区分レコード数を,例えば,前記入力装置4を通じて利用者により入力された情報に従って設定する。以下,区分レコード数の値をmとする。
前記ワークメモリ21とは,図3に示すように,前記RAM2内に確保される一部のメモリ領域であり,データファイル10から,一の前記レコード群が転送される領域である。その領域のサイズは,初期設定処理で選択されたデータファイル10の1レコード分のデータサイズに,同じく初期設定処理で設定された前記区分レコード数mを掛け算して求まるサイズである。このように,前記ワークメモリの容量は,前記データファイル10のサイズに比べてごく小容量で済むため,システム(情報処理装置X)全体のパフォーマンスが特に悪化することはない。
また,前記索引メモリ22とは,前記RAM2内に確保される一部のメモリ領域であり,詳しくは後述するが,前記データ記憶部7におけるデータファイル10中の前記レコード群各々について,そのレコード群IDとそれが位置する先頭アドレス(そのアドレスを指すポインタ情報等を含む概念である)とが対応付けられて記憶される領域である。この索引メモリ22の領域サイズは不定であり,本初期設定処理において予め定められたサイズの領域が確保された後,必要に応じて拡張される。なお,この索引メモリ22の領域は,例えば,前記データ記憶部7に確保すること等も考えられる。
本初期設定処理では,前記RAM2内に,前記ワークメモリ21及び前記索引メモリ22の各領域を確保する処理が行われる。
<About data access processing>
Next, the procedure of data access processing performed by the information processing apparatus X executing the data processing program 30 will be described using the flowchart shown in FIG. 2 and the schematic diagram of the memory configuration shown in FIG. Hereinafter, S1, S2,... Represent identification codes of processing procedures (steps).
The data processing program 30 is executed (on the OS) on the basis of an OS (operation system) that is a basic program executed by the information processing apparatus X, and the OS is stored in the data storage unit 7. It has a file system that performs data access management when accessing data. The data processing program 30 can access various data stored in the data storage unit 7 through the file system.
When the data processing program 30 is executed, a predetermined initial setting process is first performed (S1).
In this initial setting process, a data file selection process, a setting process for the number of divided records, a process for securing the work memory 21 and the index memory 22 (see FIG. 3), and the like are performed.
The data file selection process is a process of selecting a plurality of data files 10 existing in the data storage unit 7 to be accessed in the data access process. For example, file selection is performed according to information input by the user through the input device 4. Hereinafter, simply referring to the data file 10 indicates the data file 10 selected by the data file selection process.
The number of divided records is the setting of the number of records constituting the record group when the data file 10 is divided into a set of record data (hereinafter referred to as a record group) for a plurality of predetermined records from the beginning. Value. In this initial setting process, the number of classification records is set according to information input by the user through the input device 4, for example. Hereinafter, it is assumed that the value of the number of segmented records is m.
As shown in FIG. 3, the work memory 21 is a partial memory area secured in the RAM 2, and is an area to which one record group is transferred from the data file 10. The size of the area is a size obtained by multiplying the data size of one record of the data file 10 selected in the initial setting process by the number m of segmented records set in the initial setting process. Thus, the capacity of the work memory is very small compared to the size of the data file 10, so that the overall performance of the system (information processing apparatus X) is not particularly deteriorated.
The index memory 22 is a part of memory area secured in the RAM 2, which will be described in detail later. For each record group in the data file 10 in the data storage unit 7, the record group This is an area in which an ID is stored in association with a head address (a concept including pointer information indicating the address) where the ID is located. The area size of the index memory 22 is indefinite, and after an area having a predetermined size is secured in this initial setting process, it is expanded as necessary. It should be noted that the area of the index memory 22 may be secured in the data storage unit 7, for example.
In this initial setting process, a process for securing each area of the work memory 21 and the index memory 22 in the RAM 2 is performed.

次に,前記データファイル10中におけるアクセス対象とするレコードデータである前記指定レコードデータの,データファイル10中における相対位置情報を表す識別情報である前記指定レコードIDの設定処理が実行される(S2)。
この処理では,例えば,前記データ処理プログラムの実行により,利用者により前記入力装置4を通じて入力されるレコード番号情報等に従って前記指定レコードIDが決定され,その指定レコードIDを前記データ処理プログラムから取得すること等により設定される。
次に,ステップS2で前記指定レコードIDが設定されると,その指定レコードIDに対応する指定レコード群IDの特定処理が行われる(S3)。
前記指定レコード群IDとは,データファイル10を,その先頭から予め定められたレコード数(=m)である前記区分レコード数(設定単位データ数の一例)分ごとのレコードデータの集合である前記レコード群各々に区分した場合に,そのコード群各々のデータファイル10中における相対位置情報を表す識別情報であるレコード群ID各々のうち,前記指定レコードデータが属する前記レコード群に対応する前記レコード群IDであり,本処理ではこれが特定される(レコード群ID特定手順の一例)。
例えば,前記指定レコードIDが,データファイル10における先頭レコードを0とするレコード番号(0〜n)で表される場合,そのレコード番号を前記区分レコード数mで除算したときの商の値を前記指定レコード群IDとして特定すること等が考えられる。
例えば,前記区分レコード数m=1000,前記指定レコードIDが2050である場合に,前記指定レコード群IDの値iを,2050÷1000の商である2とする。
Next, the setting process of the designated record ID, which is identification information representing the relative position information in the data file 10, of the designated record data that is the record data to be accessed in the data file 10 is executed (S2). ).
In this process, for example, by executing the data processing program, the specified record ID is determined according to record number information or the like input by the user through the input device 4, and the specified record ID is acquired from the data processing program. It is set by.
Next, when the specified record ID is set in step S2, the specified record group ID corresponding to the specified record ID is specified (S3).
The designated record group ID is a set of record data for the number of segmented records (an example of the number of set unit data) that is a predetermined number of records (= m) from the top of the data file 10. The record group corresponding to the record group to which the designated record data belongs among the record group IDs that are identification information representing the relative position information in the data file 10 of the code group when the record group is divided. This is an ID, which is specified in this process (an example of a record group ID specifying procedure).
For example, when the specified record ID is represented by a record number (0 to n) in which the first record in the data file 10 is 0, the value of the quotient obtained by dividing the record number by the number m of divided records is It may be specified as a specified record group ID.
For example, when the number of segmented records m = 1000 and the designated record ID is 2050, the value i of the designated record group ID is 2 which is a quotient of 2050 ÷ 1000.

次に,前記RAM2のワークメモリ21(第2の記憶手段)に,前記指定レコードデータが存在するか否か,即ち,前記指定レコードデータが属する前記レコード群が存在するか否かを判別するデータ存否判別処理(S4,S5:データ存否判別手順の一例)が実行される。
本処理では,前記ワークメモリ21にその時点で記憶されている前記レコード群が,前記指定レコードデータが属するレコード群であるか否かが判別される。ここでは,前記RAM2における所定のワーク識別データ領域23(図3参照)に,前記ワークメモリ21にその時点で記憶されている前記レコード群を特定する前記レコード群IDを格納しておき,そのレコード群IDが前記指定レコード群ID(=i)と一致するか否かを照合する(S4)。この照合により一致すれば前記指定レコードデータが前記ワークメモリ21に存在すると判別し(S5のY側),一致しなければ(前記ワーク識別データ領域23にデータが存在しない場合を含む)前記指定レコードデータが前記ワークメモリ21に存在しないと判別する(S5のN側)。
Next, data for determining whether or not the specified record data exists in the work memory 21 (second storage means) of the RAM 2, that is, whether or not the record group to which the specified record data belongs exists. Existence determination processing (S4, S5: an example of data existence determination procedure) is executed.
In this process, it is determined whether or not the record group stored at that time in the work memory 21 is a record group to which the designated record data belongs. Here, the record group ID for identifying the record group stored at that time in the work memory 21 is stored in a predetermined work identification data area 23 (see FIG. 3) in the RAM 2, and the record It is checked whether or not the group ID matches the designated record group ID (= i) (S4). If there is a match, it is determined that the designated record data exists in the work memory 21 (Y side of S5), and if there is no match (including the case where no data exists in the work identification data area 23), the designated record It is determined that the data does not exist in the work memory 21 (N side of S5).

次に,前記データ存否判別処理(S4,S5)により前記指定レコードデータが存在しないと判別された場合,前記レコード群ID(データ群IDの一例)と前記レコード群の先頭アドレス(データ群アドレスの一例)とが対応付けられて記憶される前記索引メモリ22(第3の記憶手段の一例)を参照し,ステップS3(レコード群ID特定手順の一例)で特定された前記レコード群IDに対応する前記先頭アドレスを検索する処理が実行される(S6,データ群アドレス検索手順の一例)。
ここで,前記先頭アドレスとは,前記データ記憶部7(第1の記憶手段)における前記レコード群各々の先頭位置を表す情報(ポインタ情報等)であり,元々はOSが備える前記ファイルシステムから得られる情報である。即ち,前記データ記憶部7に記憶された前記データファイル10に対し,前記ファイルシステムを通じてファイルの先頭アドレス(即ち,先頭レコードの先頭アドレス)の位置から順次アクセス(シーケンシャルアクセス)をする場合に,各データにアクセスするごとに,後続するデータ(ここでは,レコード)の先頭アドレスが前記ファイルシステムから得られる。
次に,ステップS6の検索の結果判別が行われ(S7),ステップS6の検索実行により前記先頭アドレスが見つからなかった場合,前記索引メモリ22に記憶された前記レコード群各々の先頭アドレスのうち前記データファイル10における最も後尾側の前記レコード群に対応するものが後に使用する起点アドレスとして設定され(S9),一方そのような先頭アドレスが存在しない場合(即ち,前記索引メモリ22に前記先頭アドレスの記憶情報が無い場合,S8のN側)には前記データファイル10の先頭アドレス(先頭レコードのアドレス)が前記起点アドレスとして設定される(S10)。
Next, when it is determined by the data existence determination process (S4, S5) that the designated record data does not exist, the record group ID (an example of the data group ID) and the start address (data group address of the data group address) The index memory 22 (an example of the third storage unit) stored in association with one another is referred to, and corresponds to the record group ID specified in step S3 (an example of the record group ID specifying procedure). A process of searching for the head address is executed (S6, an example of a data group address search procedure).
Here, the head address is information (pointer information or the like) indicating the head position of each record group in the data storage unit 7 (first storage means), and originally obtained from the file system provided in the OS. Information. That is, when the data file 10 stored in the data storage unit 7 is sequentially accessed (sequential access) from the position of the head address of the file (that is, the head address of the head record) through the file system, Each time data is accessed, the head address of the following data (here, record) is obtained from the file system.
Next, the result of the search in step S6 is determined (S7), and if the start address is not found by the search execution in step S6, among the start addresses of each of the record groups stored in the index memory 22, The data file 10 corresponding to the record group at the tail end is set as a starting address to be used later (S9). On the other hand, when such a head address does not exist (that is, the index memory 22 stores the head address). If there is no stored information, the leading address (address of the leading record) of the data file 10 is set as the starting point address (S10) on the N side of S8.

さらに,前記起点アドレスの設定がなされた場合,その起点アドレスに位置する前記レコードデータから順に,後続するレコードデータに対して前記データ記憶部7(第1の記憶手段)において順次アクセスするとともに,前記区分レコード数分のレコードデータにアクセスするごとに,そのアクセスにより前記ファイルシステムを通じて得られる前記レコード群の先頭アドレスと,これに対応する前記レコード群IDとを対応付けて前記索引メモリ22に追加記憶させる処理を,前記指定レコードデータが属する前記レコード群における最後尾のレコードデータに対するアクセスがなされるまで行われる(S11,データ群アドレス登録手順の一例)。その際,前記指定レコードデータが属する前記レコード群の次の前記レコード群についても,そのレコード群ID及び先頭アドレスが前記索引メモリ22に追加記憶される。
例えば,前記指定レコードIDがレコード番号で指定され,前記指定レコード群IDがそのレコード番号を前記区分レコード数mで除算した商iとして特定された場合,レコード群ID=0〜i+1各々と,その各々に対応するレコード群の先頭アドレス(図3における「0,3256,17642,33427,…」)とが対応付けられて前記索引メモリ22に記憶される。
これにより,図3に示すように,前記RAM2内の前記索引メモリ22の領域に,前記レコード群ごとにそのレコード群IDと前記データ記憶部7におけるその先頭アドレスとが関連づけられた索引情報が,前記データファイル10における先頭のレコードデータから,前記指定レコードデータの次のレコードデータまでの範囲について登録(記憶)される。
ここで,ステップS11の処理(データ群アドレス登録手順の一例)では,当該処理により追加記憶される情報量の増大に応じて,前記RAM2内における前記索引メモリ22の記憶領域が拡大して確保される。
Further, when the start address is set, the subsequent data is sequentially accessed in the data storage unit 7 (first storage means) sequentially from the record data located at the start address, and Each time the record data for the number of divided records is accessed, the start address of the record group obtained through the file system by the access is associated with the record group ID corresponding thereto and additionally stored in the index memory 22 This process is performed until the last record data in the record group to which the designated record data belongs is accessed (S11, an example of a data group address registration procedure). At that time, the record group ID and the start address of the record group next to the record group to which the designated record data belongs are additionally stored in the index memory 22.
For example, when the specified record ID is specified by a record number, and the specified record group ID is specified as a quotient i obtained by dividing the record number by the number m of divided records, each record group ID = 0 to i + 1, The head addresses (“0, 3256, 17642, 33427,... In FIG. 3) of the record group corresponding to each are associated and stored in the index memory 22.
Thereby, as shown in FIG. 3, the index information in which the record group ID and the start address in the data storage unit 7 are associated with each record group in the area of the index memory 22 in the RAM 2 is as follows. The range from the first record data in the data file 10 to the next record data of the specified record data is registered (stored).
Here, in the process of step S11 (an example of a data group address registration procedure), the storage area of the index memory 22 in the RAM 2 is expanded and secured in accordance with the increase in the amount of information additionally stored by the process. The

次に,ステップS11の処理(データ群アドレス登録手順の一例)が実行された際に,前記指定レコードデータが属する前記レコード群(mレコード分のレコードデータ)が,前記データ記憶部7から前記ワークメモリ21に転送される(S12,第1の集合データ転送手順の一例)。
一方,ステップS6の検索(データ群アドレス検索手順)の実行により前記指定レコード群IDに対応する前記先頭アドレスが見つかった場合(S7のY側),その見つかった先頭アドレスに直接アクセスされ,その先頭アドレスに位置する(その先頭アドレスを始点とする)前記レコード群(指定レコード群)が前記データ記憶部7から前記ワークメモリ21に転送される(S12,第2の集合データ転送手順の一例)。
これにより,前記索引メモリ22に予め先頭アドレスが登録済みの前記レコード群については,前記データファイルの先頭アドレスから順にシーケンシャルアクセスを行うことなく,ダイレクトに指定レコード群にアクセスできる。
ここで,前記レコード群の前記ワークメモリ21への転送(S12)が行われた際に,転送したレコード群に対応する前記レコード群IDが,前記ワーク識別データ領域23に格納される。これにより,ワークメモリ21の内容とワーク識別データ領域23の内容との整合がとられる。
Next, when the process of step S11 (an example of a data group address registration procedure) is executed, the record group (record data for m records) to which the designated record data belongs is transferred from the data storage unit 7 to the work. It is transferred to the memory 21 (S12, an example of a first aggregate data transfer procedure).
On the other hand, when the start address corresponding to the specified record group ID is found by executing the search (data group address search procedure) in step S6 (Y side of S7), the found start address is directly accessed, and the start address The record group (designated record group) located at (starting from the start address) is transferred from the data storage unit 7 to the work memory 21 (S12, an example of a second set data transfer procedure).
As a result, the specified record group can be directly accessed without performing sequential access in order from the start address of the data file for the record group in which the start address is registered in the index memory 22 in advance.
Here, when the record group is transferred to the work memory 21 (S 12), the record group ID corresponding to the transferred record group is stored in the work identification data area 23. As a result, the contents of the work memory 21 and the contents of the work identification data area 23 are matched.

そして,ステップS5の前記データ存否判別処理により前記指定レコードデータが前記ワークメモリ21に存在すると判別された場合(S5のY側),又はステップS12の処理の実行により前記指定レコードデータが属する前記レコード群の前記ワークメモリ21への転送が実行された場合に,ワークメモリ21における前記指定レコードデータに対するアクセスが行われ,その指定レコードデータが,前記データ処理プログラムに引き渡される(S13,第2記憶手段アクセス手順の一例)。これにより,前記データ処理プログラムにおいて,前記指定レコードデータについての所定のデータ処理が行われる。例えば,前記データ処理プログラムが前記データファイル10のデータをグラフ化する処理を行うプログラムである場合,CSV形式の前記指定レコードデータについて,区切り記号であるカンマの除去処理,及びそのカンマで区切られた数値を表すテキストデータを数値データに変換する処理,数値変換後のデータをグラフ化する処理等が行われる。
以後,前述のステップS2〜S13の処理が,前記データ処理プログラムを通じて前記指定レコードIDが指定されるごとに繰り返される。
Then, when it is determined that the specified record data exists in the work memory 21 by the data presence / absence determination process of step S5 (Y side of S5), or the record to which the specified record data belongs by executing the process of step S12 When the group is transferred to the work memory 21, the specified record data in the work memory 21 is accessed, and the specified record data is transferred to the data processing program (S13, second storage means). Example of access procedure). As a result, predetermined data processing is performed on the designated record data in the data processing program. For example, if the data processing program is a program that performs a process of graphing the data of the data file 10, the comma-deletion process that is a delimiter for the specified record data in the CSV format, and the comma separated Processing for converting text data representing a numerical value into numerical data, processing for graphing the data after numerical conversion, and the like are performed.
Thereafter, the processes in steps S2 to S13 described above are repeated every time the designated record ID is designated through the data processing program.

以上示したデータアクセス処理によれば,まず,初期状態では,高速データアクセスが可能な前記ワークメモリ21にも,前記索引メモリ22にも,何らデータが存在しない状態である。このため,アクセス対象とする前記指定レコードデータの前記指定レコードIDが設定された場合に,ステップS4,S5の処理において,指定レコードデータがワークメモリ21に存在しない(S5のN側)と判別され,かつ,ステップS8において,ステップS3で特定された前記指定レコード群IDが見つからないと判別される(S8のN側)状態となる。
よって,初期状態においては,ステップS10を経てステップS11に移行する処理により,前記データファイル10の先頭アドレスに位置するレコードデータから順にアクセスし,指定レコードデータが属するレコード群に至るまで,前記データ記憶部7でのシーケンシャルアクセスを行いつつ,各レコード群の先頭アドレスとこれに対応するレコード群IDとを対応付けて前記索引メモリ22に追加記憶させるステップS11の処理を行い,さらに,ステップS12の処理によって指定レコードデータが属するレコード群をワークメモリ21(高速メモリ)に転送する。
これにより,以後,前記指定レコードIDが設定(S2)された場合,指定レコードデータがワークメモリ21に存在する限り,ステップS4,S5のデータ存否判別処理からステップS13移行して,ワークメモリ21へのアクセス処理を実行することになり,ワークメモリ21内の指定レコードデータに対して高速にアクセスすることが可能となる。
According to the data access processing described above, first, in the initial state, there is no data in the work memory 21 and the index memory 22 capable of high-speed data access. For this reason, when the specified record ID of the specified record data to be accessed is set, it is determined in the processes of steps S4 and S5 that the specified record data does not exist in the work memory 21 (N side of S5). In step S8, it is determined that the specified record group ID specified in step S3 is not found (N side of S8).
Therefore, in the initial state, the data storage is performed until the record group to which the designated record data belongs is accessed in order from the record data located at the head address of the data file 10 by the processing that proceeds to step S11 through step S10. While performing sequential access in the section 7, the processing of step S11 is performed in which the head address of each record group and the corresponding record group ID are associated and stored in the index memory 22, and the processing of step S12 is further performed. The record group to which the designated record data belongs is transferred to the work memory 21 (high-speed memory).
As a result, when the designated record ID is set (S2) thereafter, as long as the designated record data exists in the work memory 21, the process proceeds from the data presence / absence determination processing in steps S4 and S5 to step S13 and enters the work memory 21. Thus, the designated record data in the work memory 21 can be accessed at high speed.

さらに,初期状態において,大サイズのデータファイル10における全てのレコード群について,一通り事前アクセスを行ってその先頭アドレス(始点)の情報を予め記憶するのではなく,ステップS11の処理により,指定レコードデータが属するデータ群に至るまでしかシーケンシャルアクセスは行われないため,処理開始の遅延を最小限に抑えることが可能となる。
しかも,索引メモリ22への各レコード群の先頭アドレスの登録処理(S11)により,レコード群IDとレコード群の先頭アドレスとの対応関係が索引メモリ22に記憶(登録)されるので,指定レコードデータがワークメモリ21に存在しない場合(S7のN側)でも,指定レコードデータに対して高速にアクセスすることが可能となる。
即ち,指定レコード群IDに対応する先頭アドレスが検索メモリ22に存在する場合(アドレス既登録の場合)には,ステップS6の検索により得た先頭アドレスに位置するレコード群を速やかにワークメモリ21に転送し(S7→S12),ワークメモリ21において指定レコードデータへの高速アクセスが可能となる。
Further, in the initial state, all the record groups in the large-size data file 10 are not preliminarily accessed and the information of the start address (start point) is stored in advance, but the specified record is processed by the process of step S11. Since sequential access is performed only up to the data group to which the data belongs, it is possible to minimize the processing start delay.
Moreover, the correspondence between the record group ID and the start address of the record group is stored (registered) in the index memory 22 by the registration process (S11) of the start address of each record group in the index memory 22, so that the designated record data Is not present in the work memory 21 (N side of S7), the designated record data can be accessed at high speed.
That is, when the head address corresponding to the designated record group ID exists in the search memory 22 (when the address has already been registered), the record group located at the head address obtained by the search in step S6 is promptly stored in the work memory 21. The data is transferred (S7 → S12), and high-speed access to the designated record data becomes possible in the work memory 21.

また,指定レコード群IDに対応する先頭アドレスが索引メモリ22に存在しない場合(アドレス未登録の場合)でも(S7のN側),少なくとも既に登録済みのレコード群の先頭アドレスのうち,データファイル10における最後尾側のものを起点とし(S9),そこから順次アドレスを辿って指定レコードデータが属するレコード群をワークメモリ21に転送し(S11,S12),ワークメモリ21において指定レコードデータへの高速アクセスが可能となる。
これらにより,データ記憶部7において,指定レコードデータにたどり着くまで,データファイル10における先頭データからシーケンシャルアクセスを毎回行う必要がなく,アクセス処理全体の高速化が可能となる。
特に,前記データ処理プログラムが前述したデータのグラフ化処理である場合にように,データファイル10における任意の一部の範囲に存在するデータ群への繰り返しアクセスが行われる処理に適用すれば,データアクセスの高速化がより顕著となり好適である。
即ち,ワークメモリ21には,データファイル10における指定レコードデータが属するレコード群(一部の範囲に存在するデータ群)が転送されるので,データファイル10中の任意の一部の範囲に存在するデータ群への繰り返しアクセスが行われる処理が行われる場合,データ記憶部7にアクセスすることなく,高速なワークメモリ21にダイレクトにアクセスする頻度が増え,アクセス処理のがより高速化される。
Even when the head address corresponding to the designated record group ID does not exist in the index memory 22 (when the address is not registered) (N side of S7), at least the head address of the record group already registered, the data file 10 (S9), the addresses are sequentially traced from there, and the record group to which the designated record data belongs is transferred to the work memory 21 (S11, S12). Access is possible.
As a result, it is not necessary to perform sequential access from the top data in the data file 10 every time until the specified record data is reached in the data storage unit 7, and the entire access process can be speeded up.
In particular, if the data processing program is applied to a process in which repeated access to a data group existing in an arbitrary partial range in the data file 10 is performed, as in the case of the data graphing process described above, data The speeding up of access becomes more remarkable, which is preferable.
That is, since the record group to which the designated record data in the data file 10 belongs (data group existing in a part of the range) is transferred to the work memory 21, it exists in an arbitrary part of the range of the data file 10. When a process for repeatedly accessing a data group is performed, the frequency of direct access to the high-speed work memory 21 without accessing the data storage unit 7 is increased, and the access process is further speeded up.

本発明は,記憶手段に記憶されたデータファイルに対するアクセス処理を行うプログラム等に利用可能である。   The present invention can be used for a program or the like that performs access processing on a data file stored in a storage means.

本発明の実施形態に係るデータアクセスプログラムを実行する情報処理装置Xの概略構成を表すブロック図。1 is a block diagram illustrating a schematic configuration of an information processing apparatus X that executes a data access program according to an embodiment of the present invention. 情報処理装置Xが実行データアクセスプログラムを実行することにより行われるデータアクセス処理の手順を表すフローチャート。The flowchart showing the procedure of the data access process performed when the information processing apparatus X executes an execution data access program. 情報処理装置Xにおけるメモリ構成を表す概略図。3 is a schematic diagram showing a memory configuration in the information processing apparatus X. FIG.

符号の説明Explanation of symbols

X…情報処理装置
1…CPU
2…RAM
3…ROM
4…入力装置
5…表示装置
7…データ記憶部
S1,S2,,…処理手順(ステップ)
X ... information processing apparatus 1 ... CPU
2 ... RAM
3 ... ROM
4 ... Input device 5 ... Display device 7 ... Data storage units S1, S2,... Processing procedure (step)

Claims (4)

所定の第1の記憶手段に記憶された複数の単位データからなるデータファイルにおけるアクセス対象とする前記単位データである指定データの識別情報を表す指定データIDに基づいて,前記第1の記憶手段からこれより高速アクセスが可能な第2の記憶手段にデータ転送をした上で前記指定データにアクセスするデータアクセス方法であって,
前記指定データIDに基づいて,前記データファイルをその先頭から予め定められた設定単位データ数分ごとの前記単位データの集合であるデータ群各々に区分した場合における該データ群各々の識別情報であるデータ群IDの中から,前記指定データが属する前記データ群に対応する前記データ群IDである指定データ群IDを特定する指定データ群ID特定手順と,
前記データ群IDと前記第1の記憶手段における前記データ群の先頭アドレスを表すデータ群アドレスとが対応付けられて記憶される第3の記憶手段を参照し,前記指定データ群IDに対応する前記データ群アドレスを検索するデータ群アドレス検索手順と,
前記データ群アドレス検索手順の実行により前記指定データ群IDに対応する前記データ群アドレスが見つからなかった場合に,前記第1の記憶手段において,前記第3の記憶手段に記憶された前記データ群アドレスのうち前記データファイルにおける最も後尾側の前記データ群に対応する前記データ群アドレス若しくはそれが存在しない場合は前記データファイルの先頭アドレスをアクセス開始アドレスとし,該アクセス開始アドレスに存在する前記単位データから順に後続する前記単位データに順次アクセスしつつ,前記設定単位データ数分の前記単位データにアクセスするごとに該アクセスにより得られる前記データ群アドレスとこれに対応する前記データ群IDとを対応付けて前記第3の記憶手段に追加記憶させる処理を,前記指定データが属する前記データ群にアクセスするまで行うデータ群アドレス登録手順と,
前記データ群アドレス登録手順が実行された場合に,前記指定データが属する前記データ群を前記第1の記憶手段から前記第2の記憶手段に転送する第1のデータ群転送手順と,
前記データ群アドレス検索手順の実行により前記指定データ群IDに対応する前記データ群アドレスが見つかった場合に,該データ群アドレスに存在する前記データ群を前記第1の記憶手段から前記第2の記憶手段に転送する第2のデータ群転送手順と,
前記第2の記憶手段における前記指定データにアクセスする第2記憶手段アクセス手順と,
を有してなることを特徴とするデータアクセス方法。
Based on the designated data ID representing the identification information of the designated data that is the unit data to be accessed in the data file composed of a plurality of unit data stored in the predetermined first storage means, the first storage means A data access method for accessing the designated data after transferring data to a second storage means capable of high-speed access.
Identification information of each data group when the data file is divided into data groups each of which is a set of unit data corresponding to a predetermined number of set unit data from the beginning based on the designated data ID A designated data group ID identifying procedure for identifying a designated data group ID that is the data group ID corresponding to the data group to which the designated data belongs, from among the data group IDs;
Reference is made to third storage means in which the data group ID is stored in association with the data group address representing the start address of the data group in the first storage means, and the data group ID corresponding to the designated data group ID is stored. A data group address retrieval procedure for retrieving a data group address;
When the data group address corresponding to the specified data group ID is not found by execution of the data group address search procedure, the data group address stored in the third storage means is stored in the first storage means. The data group address corresponding to the data group at the rearmost side in the data file, or when there is no data group, the start address of the data file is set as the access start address, and the unit data existing at the access start address is used. Each time the unit data corresponding to the number of set unit data is accessed, the data group address obtained by the access is associated with the corresponding data group ID while sequentially accessing the subsequent unit data. The process of additionally storing in the third storage means is the designation A data group address registration procedure carried out until accessing the data group over data belongs,
A first data group transfer procedure for transferring, when the data group address registration procedure is executed, the data group to which the designated data belongs, from the first storage unit to the second storage unit;
When the data group address corresponding to the specified data group ID is found by executing the data group address search procedure, the data group existing at the data group address is transferred from the first storage means to the second storage. A second data group transfer procedure for transferring to the means;
A second storage means access procedure for accessing the designated data in the second storage means;
A data access method comprising:
前記第2の記憶手段に前記指定データが存在するか否かを判別するデータ存否判別手順を有し,
前記データ群アドレス検索手順が,前記データ存否判別手順により前記第2の記憶手段に前記指定データが存在しないと判別された場合に実行されてなる請求項1に記載のデータアクセス方法。
A data presence / absence determination procedure for determining whether or not the specified data exists in the second storage means;
2. The data access method according to claim 1, wherein the data group address search procedure is executed when it is determined by the data existence determination procedure that the designated data does not exist in the second storage means.
前記データ群アドレス登録手順により追加記憶される情報量の増大に応じて前記第3の記憶手段の記憶領域が拡大されてなる請求項1又は2のいずれかに記載のデータアクセス方法。   3. The data access method according to claim 1, wherein a storage area of the third storage unit is expanded in accordance with an increase in information amount additionally stored by the data group address registration procedure. 所定の第1の記憶手段に記憶された複数の単位データからなるデータファイルにおけるアクセス対象とする前記単位データである指定データの識別情報を表す指定データIDに基づいて,前記第1の記憶手段からこれより高速アクセスが可能な第2の記憶手段にデータ転送をした上で前記指定データにアクセスする処理をコンピュータに実行させるためのデータアクセスプログラムであって,
前記指定データIDに基づいて,前記データファイルをその先頭から予め定められた設定単位データ数分ごとの前記単位データの集合であるデータ群各々に区分した場合における該データ群各々の識別情報であるデータ群IDの中から,前記指定データが属する前記データ群に対応する前記データ群IDである指定データ群IDを特定する指定データ群ID特定手順と,
前記データ群IDと前記第1の記憶手段における前記データ群の先頭アドレスを表すデータ群アドレスとが対応付けられて記憶される第3の記憶手段を参照し,前記指定データ群IDに対応する前記データ群アドレスを検索するデータ群アドレス検索手順と,
前記データ群アドレス検索手順の実行により前記指定データ群IDに対応する前記データ群アドレスが見つからなかった場合に,前記第1の記憶手段において,前記第3の記憶手段に記憶された前記データ群アドレスのうち前記データファイルにおける最も後尾側の前記データ群に対応する前記データ群アドレス若しくはそれが存在しない場合は前記データファイルの先頭アドレスをアクセス開始アドレスとし,該アクセス開始アドレスに存在する前記単位データから順に後続する前記単位データに順次アクセスしつつ,前記設定単位データ数分の前記単位データにアクセスするごとに該アクセスにより得られる前記データ群アドレスとこれに対応する前記データ群IDとを対応付けて前記第3の記憶手段に追加記憶させる処理を,前記指定データが属する前記データ群にアクセスするまで行うデータ群アドレス登録手順と,
前記データ群アドレス登録手順が実行された場合に,前記指定データが属する前記データ群を前記第1の記憶手段から前記第2の記憶手段に転送する第1のデータ群転送手順と,
前記データ群アドレス検索手順の実行により前記指定データ群IDに対応する前記データ群アドレスが見つかった場合に,該データ群アドレスに存在する前記データ群を前記第1の記憶手段から前記第2の記憶手段に転送する第2のデータ群転送手順と,
前記第2の記憶手段における前記指定データにアクセスする第2記憶手段アクセス手順と,
をコンピュータに実行させるためのデータアクセスプログラム。
Based on the designated data ID representing the identification information of the designated data that is the unit data to be accessed in the data file composed of a plurality of unit data stored in the predetermined first storage means, the first storage means A data access program for causing a computer to execute a process of accessing the designated data after transferring data to a second storage means capable of high-speed access.
Identification information of each data group when the data file is divided into data groups each of which is a set of unit data corresponding to a predetermined number of set unit data from the beginning based on the designated data ID A designated data group ID identifying procedure for identifying a designated data group ID that is the data group ID corresponding to the data group to which the designated data belongs, from among the data group IDs;
Reference is made to third storage means in which the data group ID is stored in association with the data group address representing the start address of the data group in the first storage means, and the data group ID corresponding to the designated data group ID is stored. A data group address retrieval procedure for retrieving a data group address;
When the data group address corresponding to the specified data group ID is not found by execution of the data group address search procedure, the data group address stored in the third storage means is stored in the first storage means. The data group address corresponding to the data group at the rearmost side in the data file, or when there is no data group, the start address of the data file is set as the access start address, and the unit data existing at the access start address is used. Each time the unit data corresponding to the number of set unit data is accessed, the data group address obtained by the access is associated with the corresponding data group ID while sequentially accessing the subsequent unit data. The process of additionally storing in the third storage means is the designation A data group address registration procedure carried out until accessing the data group over data belongs,
A first data group transfer procedure for transferring, when the data group address registration procedure is executed, the data group to which the designated data belongs, from the first storage unit to the second storage unit;
When the data group address corresponding to the specified data group ID is found by executing the data group address search procedure, the data group existing at the data group address is transferred from the first storage means to the second storage. A second data group transfer procedure for transferring to the means;
A second storage means access procedure for accessing the designated data in the second storage means;
Data access program for causing a computer to execute.
JP2005181478A 2005-06-22 2005-06-22 Data access method and program thereof Expired - Fee Related JP4540556B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005181478A JP4540556B2 (en) 2005-06-22 2005-06-22 Data access method and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005181478A JP4540556B2 (en) 2005-06-22 2005-06-22 Data access method and program thereof

Publications (2)

Publication Number Publication Date
JP2007004326A true JP2007004326A (en) 2007-01-11
JP4540556B2 JP4540556B2 (en) 2010-09-08

Family

ID=37689914

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005181478A Expired - Fee Related JP4540556B2 (en) 2005-06-22 2005-06-22 Data access method and program thereof

Country Status (1)

Country Link
JP (1) JP4540556B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009134609A (en) * 2007-11-30 2009-06-18 Seiko Epson Corp Variable length data storage device, variable length data storage method, variable length data reading method, and program for the same
JP2011022768A (en) * 2009-07-15 2011-02-03 Toshiba Corp Portable electronic device, ic card, and control method for portable electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05108480A (en) * 1990-06-29 1993-04-30 Digital Equip Corp <Dec> Cache arrangement for file system in digital-data processing system
JPH0863397A (en) * 1994-08-24 1996-03-08 Hitachi Ltd Method for controlling disk cache
JPH09198296A (en) * 1996-01-16 1997-07-31 Matsushita Graphic Commun Syst Inc Image information processing system
JPH09265429A (en) * 1996-01-23 1997-10-07 Fujitsu Ltd Data distribution device, storage device, their controlling method and data transfer system
JPH1049411A (en) * 1996-08-08 1998-02-20 Hitachi Ltd Two step search processing system for linear list type cache memory information
JP2004288213A (en) * 2004-05-19 2004-10-14 Hitachi Ltd Data processing system and data processing method
JP2004362092A (en) * 2003-06-03 2004-12-24 Canon Inc File system with fat cache function

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05108480A (en) * 1990-06-29 1993-04-30 Digital Equip Corp <Dec> Cache arrangement for file system in digital-data processing system
JPH0863397A (en) * 1994-08-24 1996-03-08 Hitachi Ltd Method for controlling disk cache
JPH09198296A (en) * 1996-01-16 1997-07-31 Matsushita Graphic Commun Syst Inc Image information processing system
JPH09265429A (en) * 1996-01-23 1997-10-07 Fujitsu Ltd Data distribution device, storage device, their controlling method and data transfer system
JPH1049411A (en) * 1996-08-08 1998-02-20 Hitachi Ltd Two step search processing system for linear list type cache memory information
JP2004362092A (en) * 2003-06-03 2004-12-24 Canon Inc File system with fat cache function
JP2004288213A (en) * 2004-05-19 2004-10-14 Hitachi Ltd Data processing system and data processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009134609A (en) * 2007-11-30 2009-06-18 Seiko Epson Corp Variable length data storage device, variable length data storage method, variable length data reading method, and program for the same
JP2011022768A (en) * 2009-07-15 2011-02-03 Toshiba Corp Portable electronic device, ic card, and control method for portable electronic device

Also Published As

Publication number Publication date
JP4540556B2 (en) 2010-09-08

Similar Documents

Publication Publication Date Title
US10437481B2 (en) Data access method and related apparatus and system
US7149865B2 (en) Memory allocation using mask-bit pattern to encode metadata within memory address
US20170017395A1 (en) Storage apparatus, data processing method and storage system
JP5842768B2 (en) Deduplication apparatus, deduplication method, and deduplication program
US20080140691A1 (en) Method, Device and Computer Program Product for Optimizing File Placement in a Storage System
US20180349422A1 (en) Database management system, database server, and database management method
CN111984729A (en) Heterogeneous database data synchronization method, device, medium and electronic equipment
JP4480479B2 (en) Storage system
CN114327917A (en) Memory management method, computing device and readable storage medium
US9213759B2 (en) System, apparatus, and method for executing a query including boolean and conditional expressions
US7991976B2 (en) Permanent pool memory management method and system
CN114942863A (en) Cascade snapshot processing method, device and equipment and storage medium
EP1850250A1 (en) Method and system for renewing an index
JP2000357115A (en) Device and method for file retrieval
JP4540556B2 (en) Data access method and program thereof
US8332595B2 (en) Techniques for improving parallel scan operations
CN104951244A (en) Data access method and data access equipment
CN111290700A (en) Distributed data reading and writing method and system
US8341376B1 (en) System, method, and computer program for repartitioning data based on access of the data
JP2010237837A (en) File system, and data rearrangement method and program therefor
JP3781007B2 (en) Data transfer method between computers
CN108959517B (en) File management method and device and electronic equipment
CN117393046B (en) Space transcriptome sequencing method, system, medium and equipment
JPH02165353A (en) Conversation type data processing system
JP4668562B2 (en) Memory management program and memory management method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070928

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100524

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130702

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees