JP2006059502A - Method and device for inputting/outputting data - Google Patents

Method and device for inputting/outputting data Download PDF

Info

Publication number
JP2006059502A
JP2006059502A JP2004242733A JP2004242733A JP2006059502A JP 2006059502 A JP2006059502 A JP 2006059502A JP 2004242733 A JP2004242733 A JP 2004242733A JP 2004242733 A JP2004242733 A JP 2004242733A JP 2006059502 A JP2006059502 A JP 2006059502A
Authority
JP
Japan
Prior art keywords
data
index
record
input
stored
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004242733A
Other languages
Japanese (ja)
Inventor
Jun Miyazaki
純 宮崎
Kenji Hatano
賢治 波多野
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.)
Nara Institute of Science and Technology NUC
Original Assignee
Nara Institute of Science and Technology NUC
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 Nara Institute of Science and Technology NUC filed Critical Nara Institute of Science and Technology NUC
Priority to JP2004242733A priority Critical patent/JP2006059502A/en
Publication of JP2006059502A publication Critical patent/JP2006059502A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method for inputting/outputting data, suited to an active type database using a compact disk drive, and a device for inputting/outputting data, using the method. <P>SOLUTION: Retrieval information notified from a mobile device 1 is sent to a control unit 4 through an interface 3 in a compact disk drive 2. Before disk access is performed, for an index stored in an index storage part 51, an index optimization part 41 executes index optimization, i.e., sorting of the physical position of a retrieval target record. A head control unit 45 controls a data reading part 62 to sequentially access the physical positions of records indicated by optimized indexes, and to read the record stored in a data storage part 63. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、小型ディスクドライブに好適なデータ入出力方法、特に小型ディスクドライブを用いた能動型データベースに好適なデータ入出力方法に関し、さらにそのデータ入出力方法を用いたデータ入出力装置に関するものである。   The present invention relates to a data input / output method suitable for a small disk drive, and more particularly to a data input / output method suitable for an active database using a small disk drive, and to a data input / output device using the data input / output method. is there.

近年、小型のノートパソコンやPDA(Personal Digital Assistant)、携帯電話など(以下、これらをモバイル機器と呼ぶ)の登場により、日常的にモバイル機器を携帯することが可能となってきている。モバイル機器は、小型化、高機能化が進んでおり、将来的にはGPS(Global Positioning System)やカメラを内蔵したウェアラブルコンピュータとして利用されると予想される。そして、同時にモバイル機器が、利用者のアシスタントとして動作することへの要求が高まりつつあるため、利用者が求めている情報を状況に応じて判断し、モバイル機器が能動的に情報を提示することが望まれる。   In recent years, with the advent of small notebook personal computers, PDAs (Personal Digital Assistants), mobile phones and the like (hereinafter referred to as mobile devices), it has become possible to carry mobile devices on a daily basis. Mobile devices are becoming smaller and more advanced, and are expected to be used as wearable computers with built-in GPS (Global Positioning System) and cameras in the future. At the same time, since the demand for mobile devices to operate as user assistants is increasing, it is necessary for the mobile device to actively present information by judging the information requested by the user according to the situation. Is desired.

モバイル機器が利用者をアシストする場面は、日常生活の場から災害救助現場など幅広く求められており、ネットワークが利用できない環境においてはモバイル機器単体で動作することが求められる。機器単体で動作するためには、必要なデータをすべて蓄えることが可能な大容量ストレージを備えていることが必要であり、低価格の小型ディスクドライブを利用することが適当である。   A scene where a mobile device assists a user is widely demanded from a place of daily life to a disaster rescue site. In an environment where a network cannot be used, the mobile device is required to operate alone. In order to operate by a single device, it is necessary to have a large-capacity storage capable of storing all necessary data, and it is appropriate to use a low-cost small disk drive.

また、利用者が必要とする情報を能動的に提示するには、あらかじめ登録したルールに基づき動作し、提示する情報のカスタマイズが可能な能動型データベースの利用が有効である(例えば、非特許文献1参照)。
Sharma Chakravarthy, Barbara Blaustein, Alejandoro P. Buchmann, Michael Carey, Umeshwar Dayal, David Goldhirsch, Meichun Hsu, Rajiv Jauhari, Rivka Ladin, Miron Livny, and Dennis McCarthy: "HiPAC: A RESEARCH PROJECT IN ACTIVE TIME-CONSTRAINED DATABASE MANAGEMENT", Xerox Advanced Information Technology, XAIT-89-02 (1989.7).
In order to actively present information required by the user, it is effective to use an active database that operates based on rules registered in advance and allows customization of information to be presented (for example, non-patent literature). 1).
Sharma Chakravarthy, Barbara Blaustein, Alejandoro P. Buchmann, Michael Carey, Umeshwar Dayal, David Goldhirsch, Meichun Hsu, Rajiv Jauhari, Rivka Ladin, Miron Livny, and Dennis McCarthy: "HiPAC: A RESEARCH PROJECT IN ACTIVE TIME-CONSTRAGEMENTD DATABASE" , Xerox Advanced Information Technology, XAIT-89-02 (1989.7).

しかしながら、能動型データベースは通常のデータベースに比べ、イベント処理、コンディションの評価およびアクションがシステムにより自動的に実行されるため、データの参照、イベントの監視など、ディスクアクセスが頻繁に発生し、処理コストが高くなる。   However, compared to a normal database, event processing, condition evaluation and actions are performed automatically by the system in an active database, so disk access occurs frequently, such as data browsing and event monitoring, and processing costs are reduced. Becomes higher.

また一般に、小型ディスクドライブは、現状の構成では、消費電力や耐衝撃性などの問題からディスクの回転速度やヘッドのシークを高速にできないため、ディスクアクセスが低速である。したがって、ヘッドが目的のレコード位置に移動するためのアクセス待ち時間(平均シーク時間+平均回転待ち時間)は数十msと、システム側からみると長時間を要している。一方で、年々記憶密度が上がり、同一回転数でもシーケンシャルアクセス速度は改善されてきている。つまり、小型ディスクドライブを効率よく利用するには、いかにヘッドシーク時間を減少させるかが重要な鍵となる。   In general, a small disk drive has a low disk access speed in the current configuration because the disk rotation speed and head seek cannot be increased due to problems such as power consumption and shock resistance. Therefore, the access waiting time (average seek time + average rotation waiting time) for the head to move to the target record position is several tens of ms, which is a long time when viewed from the system side. On the other hand, the memory density has been increasing year by year, and the sequential access speed has been improved even at the same rotational speed. In other words, in order to efficiently use a small disk drive, how to reduce the head seek time is an important key.

したがって、小型ディスクドライブを用いた能動型データベースを実現するためには、小型ディスクドライブの特性に見合った、ヘッドシーク時間の短いファイルシステム(データ入出力方法)が必要となる。   Therefore, in order to realize an active database using a small disk drive, a file system (data input / output method) with a short head seek time suitable for the characteristics of the small disk drive is required.

本発明は、上記課題に鑑みてなされたものであり、ディスク回転速度が低速な小型ディスクドライブにおいても、ヘッドが目的のレコード位置に移動するためのアクセス待ち時間を短縮することが可能で、能動型データベースに好適なデータ入出力方法、およびそれを用いたデータ入出力装置を提供することを目的とする。   The present invention has been made in view of the above problems, and even in a small disk drive with a low disk rotation speed, it is possible to shorten the access waiting time for the head to move to the target record position, and to It is an object to provide a data input / output method suitable for a type database and a data input / output device using the same.

請求項1記載の発明は、磁気ディスクからなり、データを記憶するためのデータ記憶手段と、前記データ記憶手段からデータの読み取りを行うヘッドの位置を監視するヘッド位置監視手段と、前記データ記憶手段に記憶されたデータのアドレスを指定するインデクスを記憶するインデクス記憶手段を備える半導体記憶装置と、前記データ記憶手段から読み取り対象とされるデータである対象データを読み取る際、前記ヘッド位置監視手段から得られる前記ヘッドの位置に基づき、前記インデクス記憶手段に記憶された前記対象データのアドレスを指定するインデクスを最適化し、前記インデクス記憶手段に記憶させるインデクス最適化手段と、前記インデクス記憶手段に記憶されたインデクスに基づいて前記ヘッドを制御し、前記対象データの読み取りを行うデータ読み取り手段と、を備えることを特徴とする。   The invention according to claim 1 comprises a data storage means for storing data, a head position monitoring means for monitoring the position of a head for reading data from the data storage means, and the data storage means, comprising a magnetic disk. Obtained from the head position monitoring means when reading the target data, which is the data to be read from the data storage means, and a semiconductor storage device having an index storage means for storing an index for designating the address of the data stored in Index optimization means for optimizing an index for designating an address of the target data stored in the index storage means based on the position of the head to be stored, and storing the index storage means in the index storage means; and storing the index storage means in the index storage means The target data is controlled based on the index. Characterized in that it comprises a data reading means for reading, a.

この構成によれば、データ記憶手段としての磁気ディスクにデータを記憶し、そのデータを格納したアドレスを指定するインデクスを、半導体記憶装置に備えられたインデクス記憶手段に記憶する。磁気ディスクから読み取り対象とされるデータである対象データを読み取る際には、ヘッド位置監視手段から得られるヘッドの位置に基づき、インデクス最適化手段は、インデクス記憶手段に記憶された対象データに対応するインデクスを最適化し、インデクス記憶手段に記憶させる。そして、データ読み取り手段により、インデクス記憶手段に記憶されたインデクスに基づいてヘッドが駆動され、対象データが読み取られる。   According to this configuration, the data is stored in the magnetic disk as the data storage means, and the index specifying the address where the data is stored is stored in the index storage means provided in the semiconductor storage device. When reading target data, which is data to be read from the magnetic disk, the index optimizing means corresponds to the target data stored in the index storage means based on the head position obtained from the head position monitoring means. The index is optimized and stored in the index storage means. Then, the data reading unit drives the head based on the index stored in the index storage unit, and reads the target data.

請求項2記載の発明は、請求項1記載のデータ入出力装置において、前記磁気ディスクの直径が1インチ以下の小型ディスクドライブである。   A second aspect of the present invention is the data input / output device according to the first aspect, wherein the magnetic disk is a small disk drive having a diameter of 1 inch or less.

この構成によれば、直径が1インチ以下の磁気ディスクと半導体記憶装置とを備える小型ディスクドライブをデータ入出力装置として用いる。まず、磁気ディスクにデータを記憶し、そのデータを格納したアドレスを指定するインデクスを半導体記憶装置に記憶する。磁気ディスクから対象データを読み取る際には、ヘッド位置監視手段から得られるヘッドの位置に基づき、半導体記憶装置における対象データに対応するインデクスを最適化し、半導体記憶装置に記憶する。そして、半導体記憶装置に記憶されたインデクスに基づいてヘッドを駆動し、対象データを読み取る。   According to this configuration, a small disk drive including a magnetic disk having a diameter of 1 inch or less and a semiconductor storage device is used as a data input / output device. First, data is stored in the magnetic disk, and an index for designating an address storing the data is stored in the semiconductor memory device. When reading the target data from the magnetic disk, the index corresponding to the target data in the semiconductor memory device is optimized based on the head position obtained from the head position monitoring means and stored in the semiconductor memory device. Then, the head is driven based on the index stored in the semiconductor memory device, and the target data is read.

請求項3記載の発明は、請求項1または2に記載のデータ入出力装置において、前記インデクス最適化手段は、前記ヘッド位置監視手段から得られるヘッドの位置に基づき、データ読み取り時に前記ヘッドのアクセス待ち時間が最も短くなるようにインデクスを最適化することを特徴とする。   According to a third aspect of the present invention, in the data input / output device according to the first or second aspect, the index optimization unit is configured to access the head at the time of data reading based on the position of the head obtained from the head position monitoring unit. The index is optimized so as to minimize the waiting time.

この構成によれば、インデクス最適化手段は、ヘッド位置監視手段からヘッドの現在の位置を受け取る。そして、そのヘッド位置からどう移動させたら所定のデータへの移動時間(アクセス待ち時間)が最も短くなるかを計算し、そのようにインデクスを並び替える。   According to this configuration, the index optimization unit receives the current position of the head from the head position monitoring unit. Then, it is calculated how the movement time (access waiting time) to the predetermined data becomes the shortest when moving from the head position, and the indexes are rearranged as such.

請求項4記載の発明は、請求項1乃至3のいずれかに記載のデータ入出力装置において、前記データ記憶手段にデータの書き込みを行うデータ書き込み手段をさらに備えることを特徴とする。   According to a fourth aspect of the present invention, in the data input / output device according to any one of the first to third aspects, the data input / output device further includes data writing means for writing data into the data storage means.

この構成によれば、データ書き込み手段によりデータ記憶手段にデータの書き込みが行われる。   According to this configuration, the data writing unit writes data into the data storage unit.

請求項5記載の発明は、請求項4記載のデータ入出力装置において、前記データ書き込み手段は、すべてのログをデータ記憶手段に書き込むことを特徴とする。   According to a fifth aspect of the present invention, in the data input / output device according to the fourth aspect, the data writing unit writes all logs into the data storage unit.

この構成によれば、すべてのログがデータ記憶手段に書き込まれる。   According to this configuration, all logs are written to the data storage means.

請求項6記載の発明は、請求項4または5に記載のデータ入出力装置において、前記データ書き込み手段は、前記データ記憶手段に記憶されているデータの終端アドレスの次のアドレスにデータを書き込むことを特徴とする。   According to a sixth aspect of the present invention, in the data input / output device according to the fourth or fifth aspect, the data writing means writes data to an address next to the end address of the data stored in the data storage means. It is characterized by.

この構成によれば、データ記憶手段においてすでに記憶されているデータの終端アドレスの次のアドレスに、順次データが追記される。   According to this configuration, data is sequentially added to the address next to the end address of the data already stored in the data storage means.

請求項7記載の発明は、請求項1乃至6のいずれかに記載のデータ入出力装置において、前記データ書き込み手段により、インデクスを前記データ記憶手段に定期的に記憶させるインデクス再記憶手段をさらに備えることを特徴とする。   A seventh aspect of the present invention is the data input / output device according to any one of the first to sixth aspects, further comprising an index re-storing unit that causes the data writing unit to periodically store an index in the data storage unit. It is characterized by that.

この構成によれば、インデクス再記憶手段により、定期的にインデクスがデータ記憶手段に記憶される。   According to this configuration, the index is periodically stored in the data storage unit by the index re-storing unit.

請求項8記載の発明は、請求項4乃至7のいずれかに記載のデータ入出力装置において、コマンドと共に受け取った入力データを特定するためのレコードIDを、前記コマンドに基づいて発行するレコードID制御手段をさらに備えることを特徴とする。   According to an eighth aspect of the present invention, in the data input / output device according to any one of the fourth to seventh aspects, a record ID control for issuing a record ID for specifying input data received together with a command based on the command The apparatus further comprises means.

この構成によれば、コマンドと入力データを受け取ると、レコードID制御手段は、入力されたコマンドに応じて入力データを特定するためのレコードIDを発行する。   According to this configuration, when a command and input data are received, the record ID control means issues a record ID for specifying the input data in accordance with the input command.

請求項9記載の発明は、請求項8記載のデータ入出力装置において、入力データおよび第1のコマンドに基づいて、前記入力データを特定する新たなレコードIDを前記レコードID制御手段から受け取り、前記レコードIDおよび前記入力データを前記データ書き込み手段により前記データ記憶手段に連続データとして書き込む第1の処理手段と、前記連続データのアドレスを指定するインデクスを作成し、該インデクスを前記インデクス記憶手段に記憶させるインデクス付与手段と、をさらに備えることを特徴とする。   According to a ninth aspect of the present invention, in the data input / output device according to the eighth aspect, based on the input data and the first command, a new record ID for identifying the input data is received from the record ID control means, First processing means for writing the record ID and the input data as continuous data to the data storage means by the data writing means, and creating an index for designating the address of the continuous data, and storing the index in the index storage means And an index assigning means.

この構成によれば、まず、第1の処理手段は、入力データおよび第1のコマンドに基づいて、入力データを特定する新たなレコードIDをレコードID制御手段から受け取る。そして、前記レコードIDおよび前記入力データを前記データ書き込み手段により前記データ記憶手段に連続データとして書き込む。続いてインデクス付与手段は、連続データのアドレスを指定するインデクスを作成し、そのインデクスをインデクス記憶手段に記憶する。   According to this configuration, first, the first processing unit receives a new record ID for specifying input data from the record ID control unit based on the input data and the first command. Then, the record ID and the input data are written as continuous data in the data storage means by the data writing means. Subsequently, the index assigning means creates an index that designates the address of the continuous data, and stores the index in the index storage means.

請求項10記載の発明は、請求項8または9に記載のデータ入出力装置において、入力データおよび第2のコマンドに基づいて、前記入力データを特定するレコードIDを前記レコードID制御手段から受け取り、前記レコードIDおよび前記入力データを前記データ書き込み手段により前記データ記憶手段に連続データとして書き込む第2の処理手段と、インデクス記憶手段において、前記入力データを特定するレコードIDと同じレコードIDを有するデータのインデクスを消去し、前記連続データのアドレスを指定するインデクスを作成し、そのインデクスを前記インデクス記憶手段に記憶させるインデクス変更手段と、をさらに備えることを特徴とする。   The invention according to claim 10 is the data input / output device according to claim 8 or 9, wherein the record ID specifying the input data is received from the record ID control means based on the input data and the second command, A second processing means for writing the record ID and the input data as continuous data in the data storage means by the data writing means; and an index storage means for data having the same record ID as the record ID for specifying the input data. Index changing means for deleting the index, creating an index designating the address of the continuous data, and storing the index in the index storage means is further provided.

この構成によれば、まず、第2の処理手段は、入力データおよび第2のコマンドに基づいて、入力データを特定するレコードIDをレコードID制御手段から受け取る。そして、レコードIDおよび入力データを前記データ書き込み手段により前記データ記憶手段に連続データとして書き込む。続いてインデクス変更手段は、インデクス記憶手段において、入力データを特定するレコードIDと同じレコードIDを有するデータのインデクスを消去し、連続データのアドレスを指定するインデクスを作成し、そのインデクスをインデクス記憶手段に記憶する。   According to this configuration, first, the second processing means receives the record ID for specifying the input data from the record ID control means based on the input data and the second command. Then, the record ID and the input data are written as continuous data in the data storage means by the data writing means. Subsequently, the index changing unit deletes the index of the data having the same record ID as the record ID for specifying the input data in the index storage unit, creates an index for designating the address of the continuous data, and stores the index as the index storage unit. To remember.

請求項11記載の発明は、請求項8または9に記載のデータ入出力装置において、入力データおよび第3のコマンドに基づいて、前記入力データを特定するレコードIDを前記レコードID制御手段から受け取り、前記データ記憶手段に記憶され、前記入力データと同じレコードIDを有するデータと前記入力データとを比較し、前記入力データにおいて更新されているデータ部分を求め、前記レコードIDおよび前記更新されているデータ部分を前記データ書き込み手段により前記データ記憶手段に連続データとして書き込む第3の処理手段と、インデクス記憶手段において、前記入力データを特定するレコードIDと同じレコードIDを有するデータのインデクスに、前記連続データのアドレスをリストとして追加し、前記インデクス記憶手段に記憶させるインデクス追加手段と、をさらに備えることを特徴とする。   The invention according to claim 11 is the data input / output device according to claim 8 or 9, wherein the record ID for specifying the input data is received from the record ID control means based on the input data and the third command, The data stored in the data storage means and having the same record ID as the input data is compared with the input data to obtain an updated data portion in the input data, and the record ID and the updated data are obtained. A third processing means for writing a portion as continuous data to the data storage means by the data writing means; and an index storage means for adding the continuous data to an index of data having the same record ID as the record ID for specifying the input data. Address as a list and add the index And further comprising a index additional means for storing the unit.

この構成によれば、まず、第3の処理手段は、入力データおよび第3のコマンドに基づいて、入力データを特定するレコードIDをレコードID制御手段から受け取る。そして、データ記憶手段にすでに記憶されているデータと同じレコードIDを持つ入力データがデータ記憶手段に記憶される際、入力データの内、すでに記憶されているデータから更新されているデータ部分とレコードIDをデータ書き込み手段によりデータ記憶手段に連続データとして書き込む。続いて、インデクス記憶手段において、入力データを特定するレコードIDと同じレコードIDを有するデータのインデクスに、連続データのアドレスをリストとして追加し、インデクス記憶手段に記憶させる。   According to this configuration, first, the third processing means receives the record ID for specifying the input data from the record ID control means based on the input data and the third command. When the input data having the same record ID as the data already stored in the data storage means is stored in the data storage means, the data portion and record updated from the already stored data among the input data The ID is written as continuous data in the data storage means by the data writing means. Subsequently, in the index storage means, the addresses of continuous data are added as a list to the index of the data having the same record ID as the record ID specifying the input data, and stored in the index storage means.

請求項12記載の発明は、請求項8乃至11のいずれかに記載のデータ入出力装置において、少なくとも削除対象のデータを指定する情報を含む削除情報および第4のコマンドに基づいて、前記削除対象のデータを特定するレコードIDを前記レコードID制御手段から受け取り、前記レコードIDおよび削除対象のデータであることを示すマークを前記データ書き込み手段により前記データ記憶手段に連続データとして書き込む第4の処理手段と、インデクス記憶手段において、前記入力データを特定するレコードIDと同じレコードIDを有するデータのインデクスを消去するインデクス消去手段と、をさらに備えることを特徴とする。   According to a twelfth aspect of the present invention, in the data input / output device according to any of the eighth to eleventh aspects, the deletion target is based on deletion information including at least information specifying data to be deleted and a fourth command. A fourth processing means for receiving a record ID for identifying the data from the record ID control means and writing the record ID and a mark indicating that the data is to be deleted as continuous data in the data storage means by the data writing means; And the index storage means further comprises index erasure means for erasing the index of data having the same record ID as the record ID for specifying the input data.

この構成によれば、まず、第4の処理手段は、少なくとも削除対象のデータを指定する情報を含む削除情報および第4のコマンドに基づいて、削除対象のデータを特定するレコードIDをレコードID制御手段から受け取る。そして、レコードIDおよび削除対象のデータであることを示すマークをデータ書き込み手段により前記データ記憶手段に連続データとして書き込む。続いてインデクス消去手段は、インデクス記憶手段において、入力データを特定するレコードIDと同じレコードIDを有するデータのインデクスを消去する。   According to this configuration, first, the fourth processing means performs record ID control on the record ID for specifying the data to be deleted based on the deletion information including at least information specifying the data to be deleted and the fourth command. Receive from means. Then, the record ID and the mark indicating the data to be deleted are written as continuous data in the data storage means by the data writing means. Subsequently, the index erasure unit erases the index of the data having the same record ID as the record ID for specifying the input data in the index storage unit.

請求項13記載の発明は、請求項8乃至12のいずれかに記載のデータ入出力装置において、少なくとも検索対象のデータを指定する情報を含む検索情報および第5のコマンドに基づいて、前記検索対象のデータを特定するレコードIDを前記レコードID制御手段から受け取り、前記レコードIDを有するデータのインデクスを前記インデクス記憶手段において特定し、前記インデクス記憶手段に記憶されたインデクスに基づいて、前記データ読み取り手段により前記データ記憶手段から前記検索対象のデータを読み取る第5の処理手段をさらに備えることを特徴とする。   The invention according to claim 13 is the data input / output device according to any one of claims 8 to 12, wherein the search object is based on search information including at least information specifying data to be searched and a fifth command. The data ID is received from the record ID control means, the index of the data having the record ID is specified in the index storage means, and the data reading means is based on the index stored in the index storage means The method further comprises fifth processing means for reading the search target data from the data storage means.

この構成によれば、まず、第5の処理手段は、少なくとも検索対象のデータを指定する情報を含む検索情報および第5のコマンドに基づいて、検索対象のデータを特定するレコードIDをレコードID制御手段から受け取る。続いて、そのレコードIDを有するデータのインデクスをインデクス記憶手段において特定する。そして、データ読み取り手段は、インデクス記憶手段に記憶されたインデクスに基づいて、データ記憶手段から検索対象のデータを読み取る。   According to this configuration, first, the fifth processing means performs record ID control on the record ID for specifying the search target data based on the search information including at least the information specifying the search target data and the fifth command. Receive from means. Subsequently, the index of the data having the record ID is specified in the index storage means. The data reading means reads the data to be searched from the data storage means based on the index stored in the index storage means.

請求項14記載の発明は、請求項4乃至13のいずれかに記載のデータ入出力装置において、前記半導体記憶装置はバッファ手段をさらに備え、前記データ入出力装置は、入力データを前記バッファ手段に記憶するバッファ書き込み手段と、前記バッファ手段の記憶領域を監視するバッファ監視手段と、前記バッファ監視手段により、前記バッファ手段の記憶領域が満たされたことが検出されたとき、前記バッファ手段に記憶されているデータを前記データ書き込み手段により前記データ記憶手段に書き込ませる第1のフラッシュ制御手段とをさらに備えることを特徴とする。   According to a fourteenth aspect of the present invention, in the data input / output device according to any one of the fourth to thirteenth aspects, the semiconductor memory device further includes a buffer unit, and the data input / output device inputs input data to the buffer unit. The buffer writing means for storing, the buffer monitoring means for monitoring the storage area of the buffer means, and when the buffer monitoring means detects that the storage area of the buffer means is filled, the buffer means is stored in the buffer means. And a first flash control means for causing the data writing means to write the data stored in the data storage means.

この構成によれば、入力データをデータ記憶手段に直接書き込むのではなく、バッファ書き込み手段により、一旦バッファ手段に記憶する。そして、バッファ監視手段により、バッファ手段の記憶領域が満たされたことが検出されると、第1のフラッシュ制御手段により、バッファ手段に記憶されているすべての入力データがデータ記憶手段に記憶される。   According to this configuration, the input data is not directly written in the data storage means but is temporarily stored in the buffer means by the buffer writing means. When the buffer monitoring means detects that the storage area of the buffer means is full, the first flash control means stores all input data stored in the buffer means in the data storage means. .

請求項15記載の発明は、請求項4乃至13のいずれかに記載のデータ入出力装置において、前記半導体記憶装置はバッファ手段をさらに備え、前記データ入出力装置は、入力データを前記バッファ手段に記憶するバッファ書き込み手段と、前記バッファ手段に記憶されているデータの属性を監視するバッファ属性監視手段と、前記バッファ属性監視手段により、前記入力データにおいて所定の属性が検出されると直ちに、前記バッファ手段に記憶されているデータを前記データ書き込み手段により前記データ記憶手段に書き込ませる第2のフラッシュ制御手段とをさらに備えることを特徴とする。   According to a fifteenth aspect of the present invention, in the data input / output device according to any one of the fourth to thirteenth aspects, the semiconductor memory device further includes a buffer unit, and the data input / output device inputs input data to the buffer unit. As soon as a predetermined attribute is detected in the input data by the buffer attribute monitoring means for monitoring the attribute of the data stored in the buffer means, and the buffer attribute monitoring means, the buffer And a second flash control means for causing the data storage means to write the data stored in the data storage means to the data storage means.

この構成によれば、入力データをデータ記憶手段に直接書き込むのではなく、バッファ書き込み手段により、一旦バッファ手段に記憶する。そして、バッファ属性監視手段により、所定の属性を有する入力データ、例えば、障害により消失しては問題があるような重要度の高いデータが検出されると直ちに、第2のフラッシュ制御手段により、バッファ手段に記憶されているすべての入力データがデータ記憶手段に記憶される。   According to this configuration, the input data is not directly written in the data storage means but is temporarily stored in the buffer means by the buffer writing means. As soon as input data having a predetermined attribute is detected by the buffer attribute monitoring means, for example, data having a high importance level that is problematic if it is lost due to a failure, the second flash control means performs buffering. All input data stored in the means is stored in the data storage means.

請求項16記載の発明は、請求項1乃至15のいずれかに記載のデータ入出力装置において、前記データ記憶手段である前記磁気ディスクは、前記データ入出力装置に電源が投入されている間は常に回転していることを特徴とする。   According to a sixteenth aspect of the present invention, in the data input / output device according to any one of the first to fifteenth aspects, the magnetic disk as the data storage means is provided while the data input / output device is powered on. It is always rotating.

この構成によれば、ディスクアクセスが行われるか否かに関わらず、データ入出力装置に電源が投入されている間は常に磁気ディスクが回転している。   According to this configuration, the magnetic disk always rotates while the data input / output device is powered on regardless of whether the disk access is performed.

請求項17記載の発明は、請求項1乃至16のいずれかに記載のデータ入出力装置において、前記データ入出力装置は、モバイル機器に着脱自在であることを特徴とする。   According to a seventeenth aspect of the present invention, in the data input / output device according to any one of the first to sixteenth aspects, the data input / output device is detachable from a mobile device.

この構成によれば、本発明に係るデータ入出力装置を備えたモバイル機器を実現し得る。   According to this configuration, a mobile device including the data input / output device according to the present invention can be realized.

請求項18記載の発明は、データ入出力方法において、磁気ディスクからデータの読み取りを行うヘッドの位置を監視するヘッド位置監視工程と、前記磁気ディスクに記憶されたデータのアドレスを指定するインデクスを半導体記憶装置に記憶させるインデクス記憶工程と、前記磁気ディスクから読み取り対象とされるデータである対象データを読み取る際、前記ヘッド位置監視工程から得られる前記ヘッドの位置に基づき、前記インデクス記憶工程により前記半導体記憶装置に記憶された前記対象データのアドレスを指定するインデクスを最適化し、前記半導体記憶装置に記憶させるインデクス最適化工程と、前記半導体記憶装置に記憶されたインデクスに基づいて前記ヘッドを制御し、前記対象データの読み取りを行うデータ読み取り工程と、を備えることを特徴とする。   According to a twenty-eighth aspect of the present invention, in the data input / output method, a head position monitoring step for monitoring a position of a head for reading data from a magnetic disk, and an index for designating an address of data stored in the magnetic disk are provided as semiconductors. An index storage step for storing in the storage device, and when reading target data, which is data to be read from the magnetic disk, based on the position of the head obtained from the head position monitoring step, the index storage step causes the semiconductor to Optimizing an index that specifies an address of the target data stored in a storage device and storing the index in the semiconductor storage device; and controlling the head based on the index stored in the semiconductor storage device; Data reader for reading the target data Characterized in that it comprises a and.

この構成によれば、磁気ディスクに記憶されたデータのアドレスを指定するインデクスがインデクス記憶工程により半導体記憶装置に記憶される。磁気ディスクから対象データを読み取る際には、ヘッド位置監視工程から得られるヘッドの位置に基づき、インデクス最適化工程により半導体記憶装置における対象データに対応するインデクスを最適化し、半導体記憶装置に記憶させる。そして、データ読み取り工程により、半導体記憶装置に記憶されたインデクスに基づいてヘッドを駆動し、対象データを読み取る。   According to this configuration, the index specifying the address of the data stored in the magnetic disk is stored in the semiconductor memory device by the index storage process. When reading the target data from the magnetic disk, the index corresponding to the target data in the semiconductor memory device is optimized by the index optimization step based on the head position obtained from the head position monitoring step, and stored in the semiconductor memory device. Then, in the data reading step, the head is driven based on the index stored in the semiconductor memory device to read the target data.

請求項1記載の発明によれば、データを磁気ディスクに記憶し、インデクスをデータとは別に半導体記憶装置に記憶する。半導体記憶装置は、磁気ディスクに比べてアクセス速度が速いため、磁気ディスクから対象データを読み取る際の、対象データに対応するインデクスの最適化処理が高速に行える。その結果、ヘッドが目的のレコード位置に移動するためのアクセス待ち時間を短縮することが可能であり、対象データの読み取り速度が向上する。   According to the first aspect of the present invention, the data is stored in the magnetic disk, and the index is stored in the semiconductor memory device separately from the data. Since the semiconductor memory device has a higher access speed than the magnetic disk, the optimization processing of the index corresponding to the target data can be performed at high speed when the target data is read from the magnetic disk. As a result, the access waiting time for the head to move to the target record position can be shortened, and the reading speed of the target data is improved.

請求項2記載の発明によれば、データを直径が1インチ以下の磁気ディスクに記憶し、インデクスをデータとは別に半導体記憶装置に記憶する。半導体記憶装置は、磁気ディスクに比べてアクセス速度が速いため、磁気ディスクから対象データを読み取る際の、対象データに対応するインデクスの最適化処理が高速に行える。その結果、ディスク回転速度が低速な小型ディスクドライブにおいても、ヘッドが目的のレコード位置に移動するためのアクセス待ち時間を短縮することが可能であり、対象データの読み取り速度が向上する。   According to the second aspect of the present invention, the data is stored in the magnetic disk having a diameter of 1 inch or less, and the index is stored in the semiconductor memory device separately from the data. Since the semiconductor memory device has a higher access speed than the magnetic disk, the optimization processing of the index corresponding to the target data can be performed at high speed when the target data is read from the magnetic disk. As a result, even in a small disk drive with a low disk rotation speed, it is possible to reduce the access waiting time for the head to move to the target record position, and the target data reading speed is improved.

請求項3記載の発明によれば、ヘッドのアクセス待ち時間が最も短くなるようにインデクスが最適化されているので、シーケンシャルアクセスが可能となり、データ読み取りが高速に行える。   According to the third aspect of the invention, since the index is optimized so as to minimize the access waiting time of the head, sequential access is possible and data reading can be performed at high speed.

請求項4記載の発明によれば、データ書き込み手段をさらに備えているので、任意の形式での書き込みが可能となる。   According to the fourth aspect of the present invention, since data writing means is further provided, writing in an arbitrary format is possible.

請求項5記載の発明によれば、すべてのログが記憶されているので、システムがクラッシュした場合でも、すべてのデータを一貫した状態に回復できる。さらに、データを時系列順に並べることで、テンポラルクエリが実現できる。   According to the fifth aspect of the present invention, since all logs are stored, all data can be recovered to a consistent state even if the system crashes. Furthermore, a temporal query can be realized by arranging data in chronological order.

請求項6記載の発明によれば、データ記憶手段においてデータを追記する領域が決まっており、格納可能な空き領域を検索する必要がない。そのため、効率よく、かつ高速にデータを追記できる。   According to the sixth aspect of the present invention, the area in which data is additionally written is determined in the data storage means, and there is no need to search for a storable free area. Therefore, it is possible to add data efficiently and at high speed.

請求項7記載の発明によれば、システム障害により、インデクス記憶手段からインデクスが消失しても、インデクスをデータ記憶手段から読み込むことができる。そして、それらのタイムスタンプを調べることで、最新のインデクスを復元できる。   According to the seventh aspect of the present invention, even if an index disappears from the index storage means due to a system failure, the index can be read from the data storage means. The latest index can be restored by examining these time stamps.

請求項8記載の発明によれば、レコードID制御手段は、入力されたコマンドに応じて入力データを特定するためのレコードIDを発行するので、入力データとそれ以外の記憶されているデータ間の関係が明確になる。   According to the eighth aspect of the invention, the record ID control means issues a record ID for specifying the input data in accordance with the input command, and therefore, between the input data and the other stored data. The relationship becomes clear.

請求項9記載の発明によれば、処理が単純なうえ、インデクスはデータのレコード数以上に増えないため、メモリの節約が行える。また、すべての入力データがデータ記憶手段に記憶されているので、システムがクラッシュした場合でも、すべてのデータを一貫した状態に回復できる。さらに、データを時系列順に並べることで、テンポラルクエリが実現できる。   According to the ninth aspect of the invention, the processing is simple and the index does not increase beyond the number of data records, so that memory can be saved. Also, since all input data is stored in the data storage means, all data can be recovered to a consistent state even if the system crashes. Furthermore, a temporal query can be realized by arranging data in chronological order.

請求項10記載の発明によれば、インデクスはデータのレコード数以上に増えないため、メモリの節約が行える。また、実際にデータを更新するのではなく、インデクスを変更することでデータの書き換えを行っているため、処理が単純である。さらに、すべての入力データがデータ記憶手段に記憶されているので、システムがクラッシュした場合でも、すべてのデータを一貫した状態に回復できる。さらに、データを時系列順に並べることで、テンポラルクエリが実現できる。   According to the invention described in claim 10, since the index does not increase more than the number of data records, memory can be saved. Further, since the data is rewritten by changing the index instead of actually updating the data, the process is simple. Furthermore, since all input data is stored in the data storage means, all data can be recovered to a consistent state even if the system crashes. Furthermore, a temporal query can be realized by arranging data in chronological order.

請求項11記載の発明によれば、データの変更部分のみがデータ記憶手段に記憶されるため、ディスク領域の節約が可能である。また、すべての入力データがデータ記憶手段に記憶されているので、システムがクラッシュした場合でも、すべてのデータを一貫した状態に回復できる。さらに、データを時系列順に並べることで、テンポラルクエリが実現できる。   According to the eleventh aspect of the invention, since only the changed portion of the data is stored in the data storage means, it is possible to save the disk area. Also, since all input data is stored in the data storage means, all data can be recovered to a consistent state even if the system crashes. Furthermore, a temporal query can be realized by arranging data in chronological order.

請求項12記載の発明によれば、データをデータ記憶手段から削除することなく、インデクスのみを削除することで、システム側にはデータが削除されたように見せることができる。実際は、すべての入力データがデータ記憶手段に記憶されているので、システムがクラッシュした場合でも、すべてのデータを一貫した状態に回復できる。さらに、データを時系列順に並べることで、テンポラルクエリが実現できる。   According to the twelfth aspect of the present invention, it is possible to make the system seem to have deleted data by deleting only the index without deleting the data from the data storage means. In fact, since all input data is stored in the data storage means, all data can be recovered to a consistent state even if the system crashes. Furthermore, a temporal query can be realized by arranging data in chronological order.

請求項13記載の発明によれば、対象データを検索する速度が向上する。また、請求項9、10、12、および13、または請求項9、11、12、および13との組み合わせの場合には、特にデータの入出力処理をデータ入出力装置上で閉じて処理できるため、接続されるモバイル機器に依存しない高レベルのインタフェースを有するデータ入出力装置を提供できる。   According to the thirteenth aspect of the invention, the speed of searching for the target data is improved. In the case of the combination with claims 9, 10, 12, and 13, or the combinations with claims 9, 11, 12, and 13, the data input / output processing can be closed on the data input / output device. A data input / output device having a high-level interface that does not depend on the connected mobile device can be provided.

請求項14記載の発明によれば、データ記憶手段に頻繁にアクセスする必要がなくなり、アクセス時間を短く抑えることができる。   According to the fourteenth aspect of the present invention, it is not necessary to frequently access the data storage means, and the access time can be kept short.

請求項15記載の発明によれば、データ記憶手段に頻繁にアクセスする必要がなくなり、アクセス時間を短く抑えられることに加え、重要なデータを障害で消失することを防ぐことも可能となる。   According to the fifteenth aspect of the present invention, it is not necessary to frequently access the data storage means, the access time can be kept short, and important data can be prevented from being lost due to a failure.

請求項16記載の発明によれば、ディスク停止の状態から起動するまで待つ必要がなく、頻繁に到着するデータを記憶できる。さらに、ディスクの起動や停止に必要な電力がいらなくなるため、消費電力を低く抑えることができる。   According to the sixteenth aspect of the present invention, it is not necessary to wait until the disk is started from the disk stop state, and frequently arriving data can be stored. Furthermore, since the power necessary for starting and stopping the disk is not required, the power consumption can be kept low.

請求項17記載の発明によれば、本発明に係るデータ入出力装置を備えたモバイル機器が実現できる。   According to the invention described in claim 17, a mobile device provided with the data input / output device according to the present invention can be realized.

請求項18記載の発明によれば、データを磁気ディスクに記憶し、インデクスをデータとは別に半導体記憶装置に記憶する。半導体記憶装置は、磁気ディスクに比べてアクセス速度が速いため、磁気ディスクから対象データを読み取る際の、対象データに対応するインデクスの最適化処理が高速に行える。その結果、ヘッドが目的のレコード位置に移動するためのアクセス待ち時間を短縮することが可能であり、対象データの読み取り速度が向上する。   According to the invention described in claim 18, the data is stored in the magnetic disk, and the index is stored in the semiconductor memory device separately from the data. Since the semiconductor memory device has a higher access speed than the magnetic disk, the optimization processing of the index corresponding to the target data can be performed at high speed when the target data is read from the magnetic disk. As a result, the access waiting time for the head to move to the target record position can be shortened, and the reading speed of the target data is improved.

以下、本発明に係る実施形態について、図面を参照しながら説明する。   Hereinafter, embodiments according to the present invention will be described with reference to the drawings.

[本実施形態の概略]
本実施形態においては、ウェアラブルコンピュータ向けの高速なデータベースを実現するために、ログファイルシステムを利用し、すべての変更データをログとしてシーケンシャルに追記するファイルシステムを採用する。つまり、ログとは、データベース操作により、データベースに変更が生じた際に記憶する変更データのことである。
[Outline of this embodiment]
In the present embodiment, in order to realize a high-speed database for wearable computers, a log file system is used, and a file system that sequentially adds all changed data as a log is adopted. In other words, the log is change data stored when a change occurs in the database by a database operation.

本実施形態においては、データ更新はシーケンシャルアクセスで行われるため、ディスクI/Oの高速化が図られる。しかしながら、データは頻繁に更新されるため、対象となるデータ集合が必ずしも連続して存在しているとは限らず、データの検索がシーケンシャルに行われるとは限らない。本実施形態においては、小型ディスクドライブ内のディスク制御プロセッサと(バッファ)メモリを利用し、データ検索時のディスクアクセスの最適化を小型ディスクドライブ内で処理させることでこの問題を解決する。   In the present embodiment, since the data update is performed by sequential access, the speed of the disk I / O can be increased. However, since the data is frequently updated, the target data set does not always exist continuously, and the data search is not always performed sequentially. In the present embodiment, this problem is solved by using a disk control processor and (buffer) memory in the small disk drive to process optimization of disk access at the time of data retrieval in the small disk drive.

本実施形態においては、小型ディスクドライブ内のディスク制御プロセッサをデータベース管理システム(DBMS)の処理を行うプロセッサとしても利用する。そして、メモリ(半導体記憶装置)上にはディスク(磁気ディスク)に格納(記憶)したデータの物理的な格納位置(アドレス)を示すインデクスを展開する。一般にインデクスはディスク上のデータを検索する際、高速に処理を行うために利用する。しかし、インデクスは頻繁に更新されるため、ディスク上にインデクスを作成するとインデクスの読み込み、更新、または変更の際、ディスクアクセスが必要となり、ランダムアクセスが発生し処理速度が低下してしまう。   In the present embodiment, the disk control processor in the small disk drive is also used as a processor for processing a database management system (DBMS). Then, an index indicating a physical storage position (address) of data stored (stored) in the disk (magnetic disk) is developed on the memory (semiconductor storage device). In general, an index is used to perform high-speed processing when retrieving data on a disk. However, since indexes are frequently updated, creating an index on a disk requires disk access when reading, updating, or changing the index, resulting in random access and a reduction in processing speed.

本実施形態においては、インデクスを小型ディスクドライブ上のメモリに展開することでこの問題に対処し、シーケンシャルアクセスを十分に利用することを可能とする。   In the present embodiment, this problem is dealt with by expanding the index into the memory on the small disk drive, and the sequential access can be fully utilized.

実際にウェアラブル機器に小型ディスクドライブを装着して利用する場合を想定する。図15は、本発明に係るデータ入出力装置と接続された携帯電話機の操作面側を示す外観構成図である。 図15では、ウェアラブル機器としての携帯電話機のディスク装着部94に、磁気ディスクの直径が1インチ以下であるマイクロドライブなどの小型ディスクドライブ95(データ入出力装置)を装着した例を示している。   Assume that a small disk drive is actually installed in a wearable device. FIG. 15 is an external configuration diagram showing an operation surface side of a mobile phone connected to the data input / output device according to the present invention. FIG. 15 shows an example in which a small disk drive 95 (data input / output device) such as a microdrive having a magnetic disk diameter of 1 inch or less is mounted on a disk mounting portion 94 of a mobile phone as a wearable device.

図15に示した携帯電話機は、携帯電話本体90、使用者に通話情報等を知らせる表示部91、使用者が電話番号の入力やデータベースの動作指示を入力操作するキー入力部92、送受信のためのアンテナ93、および携帯電話本体90内部の各種処理回路(図示せず)により構成される。また、本携帯電話機は、小型ディスクドライブ95を装着する装着部94が携帯電話本体90の側面部に設けられている。このため、使用者が装着部94に小型ディスクドライブ95を装着することにより、携帯電話本体90と小型ディスクドライブ95との間でデータのやり取りを行わせる使用形態が可能となる。   The mobile phone shown in FIG. 15 includes a mobile phone main body 90, a display unit 91 for notifying the user of call information and the like, a key input unit 92 for the user to input telephone numbers and database operation instructions, and for transmission and reception. Antenna 93 and various processing circuits (not shown) in the mobile phone main body 90. In addition, the mobile phone is provided with a mounting portion 94 for mounting the small disk drive 95 on the side surface of the mobile phone main body 90. For this reason, the user can mount the small disk drive 95 in the mounting portion 94 to enable a mode of use in which data is exchanged between the mobile phone main body 90 and the small disk drive 95.

例えば、使用者がスケジュール機能を利用する場合を考える。使用者のある日の予定は、事前に携帯電話本体90のキー入力部92を操作することで小型ディスクドライブ95に記憶されている。使用者が新しい予定を挿入(追加)する場合には、キー入力部92を操作することで小型ディスクドライブ95に新しい予定が記憶される。また、記憶されている予定を更新(変更)する、あるいはすでに存在する予定を削除する、さらには予定を問い合わせる(検索)場合にも同様に、キー入力部92を操作することで小型ディスクドライブ95に記憶されているレコードを更新、削除、または検索することが可能である。   For example, consider a case where a user uses a schedule function. The schedule of a certain day of the user is stored in the small disk drive 95 by operating the key input unit 92 of the mobile phone main body 90 in advance. When the user inserts (adds) a new schedule, the new schedule is stored in the small disk drive 95 by operating the key input unit 92. Similarly, when the stored schedule is updated (changed), the existing schedule is deleted, or the schedule is inquired (searched), the small disk drive 95 is operated by operating the key input unit 92 in the same manner. It is possible to update, delete, or retrieve records stored in.

ここでレコードとは、属性(フィールド)が集まってできた1件分のデータのことである。例えば、住所録なら氏名、住所、電話番号などの属性が集まって1件のレコードになる。   Here, a record is one piece of data formed by collecting attributes (fields). For example, in the case of an address book, attributes such as name, address, and telephone number are collected to form one record.

このように、ウェアラブルコンピュータとしての携帯電話を使用する者が、主体的に情報を取捨選択し、キー入力部92を操作することで小型ディスクドライブ95のデータベース機能を利用することができる。また、これは携帯電話に備わったスケジュール機能を利用する場合だけではなく、例えばカメラ付きの携帯電話であれば、撮像された静止画や動画など、携帯電話により獲得されるデータであれば、小型ディスクドライブ95に記憶することが可能である。   Thus, a person using a mobile phone as a wearable computer can use the database function of the small disk drive 95 by selecting information and operating the key input unit 92. In addition, this is not only a case of using a schedule function provided in a mobile phone. For example, in the case of a mobile phone with a camera, if it is data acquired by the mobile phone, such as a captured still image or a moving image, it is small. It can be stored in the disk drive 95.

また、携帯電話を使用する者が主体的に情報を取捨選択するだけでなく、携帯電話本体が能動的(自動的)に小型ディスクドライブ95へデータを出力したり、それとは逆に、小型ディスクドライブ95からデータを入力したりするように構成することもできる。例えば、GPS機能を備えた携帯電話機であれば、定期的に所有者の位置(携帯電話機の位置)を携帯電話本体90から小型ディスクドライブ95へ、所有者の操作を必要とすることなく自動的に出力させることなどが考えられる。これにより、その日の行動を時系列順に再現することも可能となる。   In addition, the user of the mobile phone not only selectively selects information, but the mobile phone itself actively (automatically) outputs data to the small disk drive 95, and conversely, the small disk For example, data may be input from the drive 95. For example, in the case of a mobile phone having a GPS function, the position of the owner (the position of the mobile phone) is automatically changed from the mobile phone main body 90 to the small disk drive 95 without requiring the owner's operation. It is possible to make it output to. Thereby, it becomes possible to reproduce the action of the day in chronological order.

また、今後、物体に無線ICタグ(RFIDタグ)を備える構成が一般化していくと想定される。例えば、食品を買ってきて冷蔵庫に入れると自動的に識別し、保持している食品のリストを作ったり消費期限を知らせたりするインテリジェント冷蔵庫などのIT家電が構想されている。本発明に係るデータ入出力装置を備えたモバイル機器をウェアラブルコンピュータとして用いれば、それら無線ICタグを備えた物体から送出されたデータを順次記憶し、データベースとして構成することが可能となる。このとき、後述するようにDBMSを小型ディスクドライブ上で閉じた処理を行わせることが可能であるので、モバイル機器に依存しないDBMSが実現する。   In the future, it is assumed that a configuration including a wireless IC tag (RFID tag) on an object will be generalized. For example, IT home appliances such as an intelligent refrigerator that automatically identifies foods when they are bought and put in a refrigerator and makes a list of the foods held and informs the expiration date are conceived. If a mobile device equipped with a data input / output device according to the present invention is used as a wearable computer, it is possible to sequentially store data sent from an object equipped with the wireless IC tag and configure it as a database. At this time, as will be described later, since the DBMS can be closed on the small disk drive, the DBMS independent of the mobile device is realized.

本発明に係るデータ入出力装置を適用し得るのは携帯電話機に制限されることなく、それ以外のモバイル機器、例えばノートパソコンなどのモバイルコンピュータやPDAでも構わない。また、携帯電話に備わった機能を利用して得たデータだけではなく、有線あるいは無線によりほかのデジタル機器から受け取ったデータを、使用者が主体的に、あるいはモバイル機器が能動的に小型ディスクドライブ95に記憶させることも可能である。   The data input / output device according to the present invention can be applied to other mobile devices, such as mobile computers such as notebook personal computers and PDAs, without being limited to mobile phones. In addition, not only data obtained by using functions provided in mobile phones, but also data received from other digital devices by wire or wirelessly can be used mainly by users or by mobile devices. 95 can be stored.

ここで、一例としてGPS情報を小型ディスクドライブに記憶させることを考え、必要なメモリ容量を見積もってみる。現在、GPSにより計測できる精度は水平方向でおよそ10cmとされている。利用者が外出先でモバイル機器を利用した場合を想定すると、10cmの精度は必要ではなく、10m程度で問題ないと考えられる。したがって、歩行時で約10秒に一度のデータの追加が行われることになる。   Here, as an example, let us consider storing GPS information in a small disk drive, and estimate the required memory capacity. Currently, the accuracy that can be measured by GPS is about 10 cm in the horizontal direction. Assuming that the user uses the mobile device on the go, the accuracy of 10 cm is not necessary, and it is considered that there is no problem at about 10 m. Therefore, data is added once every 10 seconds during walking.

また、外出時に利用するデータテーブルは、例えば、位置情報テーブル、店舗情報テーブル、利用者の動作を記憶するプロファイルテーブルなどが挙げられる。上記3テーブルに10秒おきにデータの追加が行われると仮定すると、24時間で約26,000レコードが蓄えられる。このレコードに対するインデクスサイズは105KBとなり、小型ディスクドライブ内のメモリに収めることが可能である。また、自宅から持ち出す初期レコードは、利用者の個人データであると考えられるため、全レコード数が著しく増加することは考えにくい。   Examples of the data table used when going out include a position information table, a store information table, and a profile table that stores user actions. Assuming that data is added to the three tables every 10 seconds, about 26,000 records are stored in 24 hours. The index size for this record is 105 KB, which can be stored in a memory in a small disk drive. Moreover, since the initial record taken out from the home is considered to be personal data of the user, it is unlikely that the total number of records will increase significantly.

さらに、本発明に係るデータ入出力装置を備えたモバイル機器内のデータテーブルに、数日間に渡るデータを追加し使用し続ける必要はなく、その日1日のデータを他の機器、例えばPC(パーソナルコンピュータ)に出力するような使い方も可能である。このような使い方として、モバイル機器の充電時に、その日のデータを自動的にPCに出力するような構成が例示される。そして、例えば、PCにデータを出力した後、ユーザが指定したデータ以外は消去するような構成であれば、必要なメモリ量が増大することが抑えられ、全インデクスをメモリ上に構築することが可能となる。   Furthermore, there is no need to continue to use data for several days in a data table in a mobile device equipped with a data input / output device according to the present invention. It can also be used for output to a computer. An example of such usage is a configuration in which data of the day is automatically output to a PC when the mobile device is charged. For example, if the configuration is such that after data is output to the PC, data other than the data specified by the user is deleted, an increase in the required memory amount can be suppressed, and all the indexes can be built on the memory. It becomes possible.

図1は、本発明に係るデータ入出力装置の一実施形態における機能ブロック図である。モバイル機器1は小型ディスクドライブ2と接続され、これらの間で各種データのやり取りが行われる。本実施形態においては、小型ディスクドライブ2がデータ入出力装置に相当する。   FIG. 1 is a functional block diagram of an embodiment of a data input / output device according to the present invention. The mobile device 1 is connected to a small disk drive 2 and exchanges various data between them. In the present embodiment, the small disk drive 2 corresponds to a data input / output device.

モバイル機器1は、PDAや携帯電話、さらに小型のノートパソコンのような小型コンピュータなどである。   The mobile device 1 is a PDA, a mobile phone, or a small computer such as a small notebook computer.

小型ディスクドライブ2は、例えば、日立GST(HGST)製のマイクロドライブであり、モバイル機器1との通信のためのインタフェース3、小型ディスクドライブ2内の各種制御や計算処理などを行う制御部4、半導体メモリからなるメモリ5、データを記憶するためのディスク部6、およびDBMS機能を実行するためのコード(プログラム)を記憶するコード記憶部7を備える。   The small disk drive 2 is, for example, a micro drive manufactured by Hitachi GST (HGST), an interface 3 for communication with the mobile device 1, a control unit 4 that performs various controls and calculation processing in the small disk drive 2, A memory 5 composed of a semiconductor memory, a disk unit 6 for storing data, and a code storage unit 7 for storing a code (program) for executing a DBMS function are provided.

インタフェース3は、モバイル機器1との通信を行うためのものであるが、後述するように本発明に係る実施形態によれば、モバイル機器1に依存しない、統一的な機能を持たせることが可能である。   The interface 3 is used for communication with the mobile device 1. However, according to the embodiment of the present invention as described later, it is possible to have a unified function independent of the mobile device 1. It is.

制御部4は、例えばCPU(中央処理装置)を備える構成であり、ディスク制御およびデータベース管理システム(DBMS)の機能を有する機能部である。制御部4は、インデクス最適化部41(インデクス最適化手段)、ヘッド位置監視部42(ヘッド位置監視手段)、レコードID制御部43(レコードID制御手段)、記憶データ生成部44、ヘッド制御部45、終端アドレス記憶部46、データベース処理部47、インデクス再記憶部48(インデクス再記憶手段)、インデクス消去部49、インデクス追加部(図略)、インデクス付与部81(インデクス付与手段)および差分データ算出部82を備える構成である。   The control unit 4 includes, for example, a CPU (Central Processing Unit), and is a functional unit having functions of disk control and a database management system (DBMS). The control unit 4 includes an index optimization unit 41 (index optimization unit), a head position monitoring unit 42 (head position monitoring unit), a record ID control unit 43 (record ID control unit), a storage data generation unit 44, and a head control unit. 45, end address storage unit 46, database processing unit 47, index re-storage unit 48 (index re-storage unit), index deletion unit 49, index addition unit (not shown), index assignment unit 81 (index provision unit) and difference data The calculation unit 82 is provided.

ヘッド位置監視部42は、データ記憶部63(データ記憶手段)にデータを書き込む書き込みヘッド、およびデータ記憶部63からデータを読み取る読み取りヘッドが、データ記憶部63において、現在どのアドレスに位置しているかを監視する機能部である。   The head position monitoring unit 42 is at which address in the data storage unit 63 the write head that writes data to the data storage unit 63 (data storage unit) and the read head that reads data from the data storage unit 63 are currently located. Is a functional unit for monitoring

インデクス最適化部41は、データ記憶部63からデータを読み取る際、ヘッド位置監視部42から得られるヘッドの位置に基づき、インデクス記憶部51(インデクス記憶手段)においてデータに対応するインデクスを最適化し、インデクス記憶部51に記憶する機能部である。   When reading data from the data storage unit 63, the index optimization unit 41 optimizes the index corresponding to the data in the index storage unit 51 (index storage unit) based on the head position obtained from the head position monitoring unit 42, This is a functional unit stored in the index storage unit 51.

ここでインデクスの最適化とは、例えば、インデクスに含まれるポインタ、つまりインデクスが指し示すレコードの物理的な位置(アドレス)を、所定の処理が最適に行えるように並べ替えることである。   Here, the optimization of the index means, for example, rearranging the pointer included in the index, that is, the physical position (address) of the record indicated by the index so that predetermined processing can be optimally performed.

レコードID制御部43は、受け取ったコマンドにより、データベースに要求された処理を判断し、それに応じてレコードID(RID)を発行する機能部である。例えば、データベースに要求された処理がレコード挿入である場合には新しいRIDを発行し、要求された処理がレコード更新、削除および検索である場合には、インデクス記憶部51から対応するRIDを取得する機能部である。また、RIDとは、データを特定する符号である。   The record ID control unit 43 is a functional unit that determines processing requested from the database based on the received command and issues a record ID (RID) accordingly. For example, if the requested process is a record insertion, a new RID is issued. If the requested process is a record update, delete, and search, the corresponding RID is acquired from the index storage unit 51. It is a functional part. The RID is a code that identifies data.

記憶データ生成部44は、RID、新規レコードおよびそのレコード長を一つの連続レコードとしてまとめ、データ記憶部63に記憶する形式に整える機能部である。また、記憶データ生成部44は、レコード更新の際には、レコードの変更・修正などの更新処理も行う。   The storage data generation unit 44 is a functional unit that arranges the RID, the new record, and the record length thereof as one continuous record and arranges them into a format for storage in the data storage unit 63. In addition, the storage data generation unit 44 also performs update processing such as change / correction of records when updating records.

ヘッド制御部45は、ヘッド位置監視部42から通知されたヘッド位置情報、終端アドレス記憶部46から通知された記憶部63に記憶されているレコードの終端アドレス情報、またはインデクス記憶部51に記憶されたインデクス情報に基づき、データ書き込み部61(データ書き込み手段)またはデータ読み取り部62(データ読み取り手段)を制御し、データ記憶部63へのアクセスを行わせる機能部である。   The head control unit 45 is stored in the head position information notified from the head position monitoring unit 42, the end address information of the record stored in the storage unit 63 notified from the end address storage unit 46, or the index storage unit 51. This is a functional unit that controls the data writing unit 61 (data writing unit) or the data reading unit 62 (data reading unit) based on the index information to access the data storage unit 63.

終端アドレス記憶部46は、データ記憶部63に記憶されているレコードの終端アドレスを記憶する機能部である。   The end address storage unit 46 is a functional unit that stores the end address of the record stored in the data storage unit 63.

データベース処理部47は、モバイル機器1の入力部(例えば、携帯電話であれば図15におけるキー入力部92など)を介して小型ディスクドライブ2に要求された処理内容を判別し、制御部4内の所定の機能部に通知する機能部である。例えば、データベース処理言語としてSQL(Structured Query Language)を用いる場合であれば、レコードの挿入、更新、削除、あるいは検索は、それぞれINSERT、UPDATE、DELETE、SELECTというコマンドで制御されるが、データベース処理部47はこれらのコマンドの識別を行う機能部である。   The database processing unit 47 determines the processing content requested of the small disk drive 2 via the input unit of the mobile device 1 (for example, the key input unit 92 in FIG. This is a functional unit that notifies a predetermined functional unit. For example, if SQL (Structured Query Language) is used as a database processing language, record insertion, update, deletion, or search is controlled by commands INSERT, UPDATE, DELETE, and SELECT, respectively. A functional unit 47 identifies these commands.

また、データベース処理部47は、モバイル機器から受け取った新規データおよび挿入コマンドに基づいて、新たなレコードIDをレコードID制御部43から受け取り、そのレコードIDおよび新規データをデータ記憶部63に記憶させる挿入処理を行う。   Further, the database processing unit 47 receives a new record ID from the record ID control unit 43 based on the new data and the insert command received from the mobile device, and inserts the record ID and the new data in the data storage unit 63. Process.

さらに、データベース処理部47は、モバイル機器から受け取った更新データおよび更新コマンドに基づいて、データ記憶部63に記憶されたデータの内、更新データに対応するレコードIDをレコードID制御部43から受け取り、そのレコードIDおよび更新データをデータ記憶部63に記憶させる更新処理を行う機能部である。   Further, the database processing unit 47 receives, from the record ID control unit 43, the record ID corresponding to the update data among the data stored in the data storage unit 63 based on the update data and the update command received from the mobile device. This is a functional unit that performs an update process for storing the record ID and update data in the data storage unit 63.

さらに、データベース処理部47は、モバイル機器から受け取った、少なくとも削除対象のレコードを指定する情報を含む削除情報および削除コマンドに基づいて、データ記憶部63に記憶されたデータの内、削除対象のレコードに対応するレコードIDをレコードID制御部43から受け取り、少なくともそのレコードIDをデータ記憶部63に記憶させる削除処理を行う機能部である。   Furthermore, the database processing unit 47 deletes the record to be deleted from the data stored in the data storage unit 63 based on the deletion information and the deletion command including at least information specifying the record to be deleted received from the mobile device. Is a functional unit that performs a deletion process of receiving the record ID corresponding to the item ID from the record ID control unit 43 and storing at least the record ID in the data storage unit 63.

さらに、データベース処理部47は、モバイル機器から受け取った、少なくとも検索対象のレコードを指定する情報を含む検索情報および検索コマンドに基づいて、データ記憶部63に記憶されたデータの内、検索対象のレコードに対応するレコードIDをレコードID制御部42から受け取り、そのレコードIDを有するデータをデータ記憶部63から読み取らせる検索処理を行う機能部である。   Further, the database processing unit 47 selects the search target record from the data stored in the data storage unit 63 based on the search information and the search command including at least information specifying the search target record received from the mobile device. Is a functional unit that performs a search process for receiving the record ID corresponding to the item ID from the record ID control unit 42 and reading the data having the record ID from the data storage unit 63.

本実施形態においては、データモデルの中から一例としてリレーショナル型を取り上げて説明するが、本発明がこれに限られる訳ではない。   In the present embodiment, a relational type will be described as an example from the data model, but the present invention is not limited to this.

インデクス再記憶部48は、所定の時間が経過するごとに、インデクス記憶部51に記憶されているインデクスをデータ記憶部63に記憶させる機能部である。   The index re-storage unit 48 is a functional unit that stores the index stored in the index storage unit 51 in the data storage unit 63 every time a predetermined time elapses.

インデクス消去部49は、データ記憶部63にすでに記憶されているデータと同じレコードIDを持つ入力(更新)データがデータ記憶部63に記憶される際、インデクス記憶部51において記憶されているデータのインデクスを消去し、新しいレコードIDを持つ入力データのインデクスをインデクス記憶部51に記憶する機能部である。   When the input (update) data having the same record ID as the data already stored in the data storage unit 63 is stored in the data storage unit 63, the index deletion unit 49 stores the data stored in the index storage unit 51. This is a functional unit that deletes the index and stores the index of the input data having the new record ID in the index storage unit 51.

インデクス追加部(図略)は、データ記憶部63にすでに記憶されているデータと同じレコードIDを持つ入力データがデータ記憶部63に記憶される際、入力データにおいて、記憶されているデータから更新されているデータ部分のみをデータ記憶部63に記憶し、新しいレコードIDを持つ入力データのインデクスをインデクス記憶部51にさらに追加して記憶する機能部である。   When the input data having the same record ID as the data already stored in the data storage unit 63 is stored in the data storage unit 63, the index addition unit (not shown) updates the input data from the stored data. This is a functional unit that stores only the data portion that has been stored in the data storage unit 63, and additionally stores the index of input data having a new record ID in the index storage unit 51.

インデクス付与部81は、データ記憶部63において格納されたアドレスの先頭を示すインデクスを張り、そのインデクスをメモリ5内のインデクス記憶部51に記憶する機能部である。   The index assigning unit 81 is a functional unit that creates an index indicating the head of the address stored in the data storage unit 63 and stores the index in the index storage unit 51 in the memory 5.

差分データ算出部82は、データ記憶部63に記憶されているデータと入力データとを比較し、入力データにおいて更新されているデータ部分(更新属性値)を求める機能部である。   The difference data calculation unit 82 is a functional unit that compares the data stored in the data storage unit 63 with the input data and obtains a data portion (update attribute value) updated in the input data.

また、インデクス消去部49およびインデクス付与部81は、インデクス変更手段としての機能を有する。また、インデクス追加部(図略)およびインデクス付与部81は、インデクス追加手段としての機能を有する。さらに、インデクス消去部49は、インデクス消去手段としての機能を有する。   The index erasing unit 49 and the index assigning unit 81 have a function as an index changing unit. The index adding unit (not shown) and the index assigning unit 81 have a function as index adding means. Further, the index erasing unit 49 has a function as index erasing means.

メモリ(半導体記憶装置)5は、インデクス記憶部51およびバッファ部52(バッファ手段)を備える構成である。インデクス記憶部51は、データ記憶部63に格納されたデータのアドレスを指定するインデクスを記憶する機能部である。バッファ部52は、インデクス以外のデータを一時記憶するための機能部である。   The memory (semiconductor storage device) 5 includes an index storage unit 51 and a buffer unit 52 (buffer means). The index storage unit 51 is a functional unit that stores an index that specifies an address of data stored in the data storage unit 63. The buffer unit 52 is a functional unit for temporarily storing data other than the index.

ディスク部6は、データ書き込み部61、データ読み取り部62およびデータ記憶部(磁気ディスク)63を備える構成である。データ書き込み部61は、書き込みヘッドを用いてデータ記憶部63にデータの書き込みを行う機能部である。このデータ書き込み部61は、すべてのログをデータ記憶部63に書き込む機能を有する。また、データ読み取り部62は、読み取りヘッドを用いてデータ記憶部63からデータの読み取りを行う機能部である。以下、簡単のために、書き込みヘッドおよび読み取りヘッドをともに、ヘッドと呼ぶことにする。   The disk unit 6 includes a data writing unit 61, a data reading unit 62, and a data storage unit (magnetic disk) 63. The data writing unit 61 is a functional unit that writes data to the data storage unit 63 using a writing head. The data writing unit 61 has a function of writing all logs to the data storage unit 63. The data reading unit 62 is a functional unit that reads data from the data storage unit 63 using a reading head. Hereinafter, for the sake of simplicity, both the write head and the read head are referred to as heads.

そして、データ記憶部63は、データを記憶する機能部であり、例えば、磁性体を塗布したアルミニウムやガラスのディスクを一定の間隔で何枚も重ね合わせた構造になっている。また、本実施形態に係るデータ入出力装置は、携帯電話機などのモバイル機器に着脱自在であることを想定しているため、磁気ディスクであるデータ記憶部63の直径は1インチ以下であることが好ましい。   The data storage unit 63 is a functional unit that stores data. For example, the data storage unit 63 has a structure in which a number of aluminum or glass disks coated with a magnetic material are stacked at regular intervals. Further, since the data input / output device according to the present embodiment is assumed to be detachable from a mobile device such as a cellular phone, the diameter of the data storage unit 63 that is a magnetic disk may be 1 inch or less. preferable.

コード記憶部7は、例えばフラッシュメモリなどから構成され、DBMS機能を実行するためのコードを記憶する機能部である。   The code storage unit 7 is composed of a flash memory, for example, and is a functional unit that stores a code for executing the DBMS function.

従来の小型ディスクドライブ2では、DBMSの機能は主にモバイル機器1が担っており、小型ディスクドライブ2内の制御部(CPU)4は、主にディスク制御を行っていた。その小型ディスクドライブ2に、本発明に係るデータ入出力方法を用い、制御部4にDBMSの機能を持たせることにより、小型ディスクドライブ2上で閉じた処理を行わせることが可能となる。   In the conventional small disk drive 2, the DBMS function is mainly performed by the DBMS 1, and the control unit (CPU) 4 in the small disk drive 2 mainly performs disk control. By using the data input / output method according to the present invention for the small disk drive 2 and providing the control unit 4 with the DBMS function, it is possible to perform a closed process on the small disk drive 2.

これは、例えば、モバイル機器の電源が入れられたとき、コード記憶部7に記憶されたコードが制御部4のデータベース処理部47にロードされることにより実現される。これにより、DBMS機能をモバイル機器1に持たせる必要がなくなり、その結果、モバイル機器1のOS(オペレーティングシステム)に依存しないDBMSが実現する。   This is realized, for example, by loading the code stored in the code storage unit 7 into the database processing unit 47 of the control unit 4 when the mobile device is turned on. This eliminates the need for the mobile device 1 to have a DBMS function, and as a result, a DBMS that does not depend on the OS (operating system) of the mobile device 1 is realized.

したがって、モバイル機器1から小型ディスクドライブ2への動作指示は抽象度の高いもので良くなる。そのため、本発明に係る後述の実施形態によれば、高レベルのインタフェースを提供でき、さらに、小型ディスクドライブ2の高いポータビリティーが実現される。これにより、例えば、小型ディスクドライブ2を用い、Windows(登録商標)マシンで作成したデータベースを、特別の処理を施すことなく別のUNIX(登録商標)マシンで利用することなどが可能となる。   Therefore, the operation instruction from the mobile device 1 to the small disk drive 2 can be high in abstraction. Therefore, according to the embodiments described later according to the present invention, a high-level interface can be provided, and the high portability of the small disk drive 2 is realized. As a result, for example, a database created on a Windows (registered trademark) machine using the small disk drive 2 can be used on another UNIX (registered trademark) machine without any special processing.

また、DBMSを実行するためのコードが、フラッシュメモリなどから構成されるコード記憶部7ではなく、データ記憶部63などに記憶されて、小型ディスクドライブ2内に配置される構成であってもよい。   Further, the code for executing the DBMS may be stored in the data storage unit 63 or the like instead of the code storage unit 7 configured by a flash memory or the like and arranged in the small disk drive 2. .

データ格納方式として以下に2種類の例を示すが、これらはインデクスの作成方法がそれぞれ異なる方式である。インデクスはディスクに格納されたレコード位置をキーとしている。   Two examples of data storage methods are shown below, but these are different methods for creating indexes. The index uses the record position stored on the disk as a key.

1つ目のデータ格納方式は、データ更新時、レコード全体を複製し、追記する方式で、インデクスの指し示すアドレス(ポインタ)は追記されたレコードの先頭アドレスである。これを複製方式と呼ぶ。この複製方式では、データ記憶部63に記憶されているデータと同じレコードIDを持つ入力データがデータ書き込み部61によりデータ記憶部63に書き込まれる際、インデクス記憶部51において記憶されているデータのアドレスを指定するインデクスを消去し、入力データのアドレスを指定するインデクスをインデクス記憶部51に記憶する。   The first data storage method is a method in which the entire record is duplicated and added at the time of data update, and the address (pointer) indicated by the index is the head address of the added record. This is called a replication method. In this replication method, when input data having the same record ID as the data stored in the data storage unit 63 is written into the data storage unit 63 by the data writing unit 61, the address of the data stored in the index storage unit 51 The index specifying the address of the input data is stored in the index storage unit 51.

2つ目のデータ格納方式は、データ更新時に更新された属性情報のみを追記する方式で、もともとのレコードへのポインタは保持したまま、更新された属性へのポインタを新たに作成し、元レコードへのポインタにリストとして追加する。元データへのポインタと更新データの格納先へのポインタによりレコードの作成が可能である。これを差分方式と呼ぶ。この差分方式では、データ記憶部63に記憶されているデータと同じレコードIDを持つ入力データにおいて、記憶されているデータから更新されているデータ部分のみがデータ書き込み部61によりデータ記憶部63に書き込まれる際、入力データのアドレスを指定するインデクスをインデクス記憶部51にさらに追加して記憶する。   The second data storage method is a method of appending only the attribute information updated at the time of data update. The pointer to the original record is newly created while the pointer to the original record is kept, and the original record Add as a list to the pointer to. A record can be created by a pointer to the original data and a pointer to the storage destination of the update data. This is called a differential method. In this differential method, in the input data having the same record ID as the data stored in the data storage unit 63, only the data portion updated from the stored data is written into the data storage unit 63 by the data writing unit 61. At this time, an index for designating the address of the input data is further added and stored in the index storage unit 51.

以下、モバイル機器の一例として、本発明に係る小型ディスクドライブ(データ入出力装置)を備えた携帯電話機を考える。そして、その携帯電話機を携帯している利用者を甲と呼ぶことにする。甲が、定められたスケジュールに新しい予定を追加したり、予定を変更したりする度に、その内容がデータおよび付加情報として携帯電話機から小型ディスクドライブに出力されるとする。また、携帯電話機はGPS機能も備えており、上記のデータと共に位置情報データなどを、小型ディスクドライブに追加する機能を備えるものとして説明を行う。   Hereinafter, as an example of a mobile device, a mobile phone including a small disk drive (data input / output device) according to the present invention is considered. The user who carries the mobile phone is called the former A. It is assumed that each time the user adds a new schedule to the predetermined schedule or changes the schedule, the contents are output as data and additional information from the mobile phone to the small disk drive. Further, the cellular phone also has a GPS function, and description will be made assuming that it has a function of adding location information data and the like to the small disk drive together with the above data.

[第1の実施形態]
まず、第1の実施形態として、前述の複製方式について説明する。本方式は、データの変更が発生した場合、変更の対象となるレコード全体を複製し、変更データ(入力データ)を反映させた後、ディスクに追記する方式である。
[First Embodiment]
First, the above-described duplication method will be described as the first embodiment. In this method, when a data change occurs, the entire record to be changed is duplicated, the changed data (input data) is reflected, and then added to the disk.

図2は、本発明に係るデータ入出力装置の一実施形態である複製方式のデータ格納とインデクスの対応を示す模式図である。(A)はレコードの挿入や更新が行われる前の初期状態、(B)はレコード挿入時、(C)はレコード更新時、そして(D)はレコード削除時のインデクスとデータ記憶部63に記憶されたレコードとの対応を、それぞれ示している。   FIG. 2 is a schematic diagram showing the correspondence between the data storage and the index of the duplication method which is an embodiment of the data input / output device according to the present invention. (A) is the initial state before the record is inserted or updated, (B) is when the record is inserted, (C) is when the record is updated, and (D) is stored in the index and data storage unit 63 when the record is deleted. The correspondence with the recorded records is shown respectively.

また、図3は、本発明に係るデータ入出力装置の一実施形態である複製方式の処理の流れを示すフローチャートである。   FIG. 3 is a flowchart showing a processing flow of a replication method which is an embodiment of the data input / output device according to the present invention.

[初期状態]
まず、(A)の初期状態について説明する。この日、甲は、例えば、自宅で8時にデータAを、10時にデータBを作成し、それぞれ小型ディスクドライブ2に記憶させたとする。そのため、ディスク部6のデータ記憶部63には、レコードID(RID)−001として、甲が8時に作成したデータAがそのデータだけでなく、時刻・位置情報と共に記憶されている。同様に、RID−002として、甲が10時に作成したデータBがそのデータだけでなく、時刻・位置情報と共に記憶されている。また、データ以外の細かな情報は、付加情報として記憶されている。
[initial state]
First, the initial state of (A) will be described. On this day, suppose that, for example, A creates data A at 8 o'clock and B at 10 o'clock at home, and stores them in the small disk drive 2 respectively. For this reason, the data storage unit 63 of the disk unit 6 stores, as record ID (RID) -001, data A created by the former at 8 o'clock along with time / position information. Similarly, as RID-002, data B created by the former at 10:00 is stored along with time / position information as well as the data. Further, fine information other than data is stored as additional information.

そして、RID−001および002のレコードが記憶されているアドレスの先頭を示すインデクスが、メモリ5内のインデクス記憶部51に記憶されている。これを、図2(A)の最上段のインデクスからRID−001へ、上から2段目のインデクスからRID−002への矢印で示す。また、RID−002のデータの終端アドレスは、終端アドレス記憶部46に記憶されている。   An index indicating the head of the address where the records of RID-001 and 002 are stored is stored in the index storage unit 51 in the memory 5. This is indicated by arrows from the topmost index in FIG. 2A to RID-001 and from the second index from the top to RID-002. Further, the end address of the data of RID-002 is stored in the end address storage unit 46.

[レコード挿入]
まず、この(A)の初期状態に、レコードが挿入(追加)される場合((B))について説明する(第1の処理)。甲は自宅から移動し、11時に難波にいたとする。そして、難波で11時にデータCを作成し、それを小型ディスクドライブ2に新規レコード(入力データ)として挿入させるとする(S10)。携帯電話機のアプリケーションソフトは、甲の操作に応じたSQLコマンドを発行するので、今の場合、その新規レコードは、挿入処理に対応する[INSERT]というコマンド(第1のコマンド)と共に、小型ディスクドライブ2内のインタフェース3を介して制御部4に送られる。
Insert record
First, a case where a record is inserted (added) in the initial state of (A) ((B)) will be described (first processing). Suppose that A moved from his home and was in Namba at 11:00. Then, it is assumed that data C is created at 11:00 in Namba and is inserted into the small disk drive 2 as a new record (input data) (S10). Since the application software of the cellular phone issues an SQL command corresponding to the operation of the former, in this case, the new record is a small disk drive along with a command (first command) corresponding to the insertion processing (first command). 2 is sent to the control unit 4 through the interface 3 in the system 2.

制御部4は、コマンドおよび新規レコードを受け取ると、データベース処理部47においてデータベース処理の内容を判別する。今の場合は、[INSERT]というコマンドを受け、レコードの挿入をすることが判断される(S11およびS12)。そして、新規レコードであるため、レコードID制御部43において新しいRIDが発行される(S131)。今の場合は、データ記憶部63にRID−002まで記憶されているので、新しく発行されるRIDは003である。このRID、新規レコードおよびそのレコード長は、記憶データ生成部44において、一つの新規な連続レコードとしてまとめられる(S132)。   When the control unit 4 receives the command and the new record, the database processing unit 47 determines the contents of the database processing. In this case, it is determined to receive a command [INSERT] and insert a record (S11 and S12). Since it is a new record, a new RID is issued in the record ID control unit 43 (S131). In this case, since RID-002 is stored in the data storage unit 63, the newly issued RID is 003. The RID, the new record, and the record length thereof are collected as one new continuous record in the storage data generation unit 44 (S132).

続いて、ヘッド位置監視部42は、現在のヘッド位置をヘッド制御部45に通知する。また、終端アドレス記憶部46は、データ記憶部63に記憶されているレコードの終端アドレスをヘッド制御部45に通知する。ヘッド制御部45は、ヘッド位置監視部42および終端アドレス記憶部46から通知されたこれらの情報に基づき、ヘッドをデータ記憶部63に記憶されている全レコードの終端アドレス、言い換えると、RID−002のレコードの終端アドレスの次のアドレスに移動させる。   Subsequently, the head position monitoring unit 42 notifies the head control unit 45 of the current head position. Further, the end address storage unit 46 notifies the head control unit 45 of the end address of the record stored in the data storage unit 63. Based on the information notified from the head position monitoring unit 42 and the end address storage unit 46, the head control unit 45 stores the head end addresses of all records stored in the data storage unit 63, in other words, RID-002. Move to the next address after the end address of the record.

そして、記憶データ生成部44において生成された新規な連続レコード、すなわちRID−003のレコードがディスク部6に送られ、データ書き込み部61によりデータ記憶部63に書き込まれる(S133)。このとき、ヘッドは、記憶されている全レコードの終端アドレスの次のアドレスに位置しているため、新規な連続レコードは、データ記憶部63において前のレコードに追記される。   Then, a new continuous record generated by the storage data generation unit 44, that is, a record of RID-003 is sent to the disk unit 6, and is written into the data storage unit 63 by the data writing unit 61 (S133). At this time, since the head is located at the address next to the end address of all stored records, a new continuous record is added to the previous record in the data storage unit 63.

新規レコード格納後、インデクス付与部81により、データ記憶部63において格納されたアドレスの先頭を示すインデクスが張られ、そのインデクスはメモリ5内のインデクス記憶部51に記憶される(S134)。そして、RID−003のデータの終端アドレスが、終端アドレス記憶部46に記憶される。これにより、新規レコードの挿入が完了する(S135)。   After storing the new record, the index giving unit 81 creates an index indicating the head of the address stored in the data storage unit 63, and the index is stored in the index storage unit 51 in the memory 5 (S134). Then, the end address of the data of RID-003 is stored in the end address storage unit 46. Thereby, the insertion of the new record is completed (S135).

従来のDBMSでは、新規レコードを挿入する際、格納可能な空き領域を検索するためランダムアクセスが発生し、格納に時間を要していた。本実施形態によれば、レコードを格納する追記場所があらかじめ決まっているため、ランダムアクセスは発生しない。そのため、効率よくデータを追記することが可能となる。   In the conventional DBMS, when a new record is inserted, random access occurs in order to search for a storable free space, and storage takes time. According to the present embodiment, random access does not occur because the additional recording location for storing the record is determined in advance. Therefore, it becomes possible to write data efficiently.

[レコード更新]
続いて、このレコード挿入((B))後の状態で、レコードが更新される場合((C))について説明する(第2の処理)。甲は13時にデータA(RID−001)を書き換え、付加情報をA−1からA−2に更新させるとする(S10)。モバイル機器1は、書き換えられたデータAおよび位置情報などを含むレコード(入力データ)を小型ディスクドライブ2に出力する。そのレコード(更新レコード)は、更新処理に対応する[UPDATE]というコマンド(第2のコマンド)と共に、小型ディスクドライブ2内のインタフェース3を介して制御部4に送られる。
[Record Update]
Next, a case where the record is updated ((C)) in the state after the record insertion ((B)) will be described (second processing). The former rewrites the data A (RID-001) at 13:00 and updates the additional information from A-1 to A-2 (S10). The mobile device 1 outputs a record (input data) including the rewritten data A and position information to the small disk drive 2. The record (update record) is sent to the control unit 4 via the interface 3 in the small disk drive 2 together with a command [UPDATE] corresponding to the update process (second command).

制御部4は、コマンドおよび更新レコードを受け取ると、データベース処理部47においてデータベース処理の内容を判別する。今の場合は、[UPDATE]というコマンドを受け、レコードの更新をすることが判断される(S11およびS12)。   When the control unit 4 receives the command and the update record, the database processing unit 47 determines the content of the database processing. In this case, it is determined to receive a command [UPDATE] and update the record (S11 and S12).

レコードID制御部43は、要求された処理がレコード更新であることを受け、インデクス記憶部51に記憶されているインデクスを利用して更新されるデータを特定し、そのRID(今の場合はRID−001)を取得する(S141)。このRID、更新レコードおよびそのレコード長は、記憶データ生成部44において、一つの変更された連続レコードとしてまとめられる(S142)。   The record ID control unit 43 receives the fact that the requested process is a record update, specifies data to be updated using the index stored in the index storage unit 51, and determines the RID (in this case, the RID -001) is acquired (S141). The RID, the update record, and the record length thereof are collected as one changed continuous record in the storage data generation unit 44 (S142).

続いて、前述のレコード挿入時と同様にして、ヘッド制御部45は、ヘッドをデータ記憶部63に記憶されている全レコードの終端アドレス、言い換えると、RID−003のレコードの終端アドレスの次のアドレスに移動させる。   Subsequently, in the same manner as in the above-described record insertion, the head control unit 45 sets the head to the end address of all records stored in the data storage unit 63, in other words, the end address of the record of RID-003. Move to address.

そして、記憶データ生成部44において生成された更新後の連続レコード、すなわちRID−001がディスク部6に送られ、データ書き込み部61によりデータ記憶部63に書き込まれる(S143)。このとき、ヘッドは、記憶されている全レコードの終端アドレスの次のアドレスに位置しているため、更新後の連続レコードは、データ記憶部63において前のレコードに追記される。   Then, the updated continuous record generated in the storage data generation unit 44, that is, RID-001, is sent to the disk unit 6, and is written in the data storage unit 63 by the data writing unit 61 (S143). At this time, since the head is located at the address next to the end address of all the stored records, the updated continuous record is added to the previous record in the data storage unit 63.

更新レコード格納後、インデクス付与部81により、データ記憶部63において格納されたアドレスの先頭を示すインデクスが張られ、そのインデクスはメモリ5内のインデクス記憶部51に記憶される。このとき、インデクス消去部49により、インデクス記憶部51にすでに記憶されているRID−001(付加情報A−1)に対するインデクスは消去され、更新後のRID−001(付加情報A−2)に対するインデクスのみが記憶される(S144)。   After storing the update record, the index assigning unit 81 creates an index indicating the head of the address stored in the data storage unit 63, and the index is stored in the index storage unit 51 in the memory 5. At this time, the index deletion unit 49 deletes the index for RID-001 (additional information A-1) already stored in the index storage unit 51, and the index for the updated RID-001 (additional information A-2). Only is stored (S144).

さらに、更新前レコードは消去されることなく、データ記憶部63に記憶されたままである。また、RID−001(付加情報A−2)のデータの終端アドレスは、終端アドレス記憶部46に記憶される。これにより、レコードの更新処理が完了する(S145)。   Further, the pre-update record remains stored in the data storage unit 63 without being erased. Further, the end address of the data of RID-001 (additional information A-2) is stored in the end address storage unit 46. This completes the record update process (S145).

[レコード削除]
次に、このレコード更新((C))後の状態で、レコードが削除される場合((D))について説明する(第4の処理)。甲がデータ記憶部63に記憶されたデータB(RID−002)の情報を削除するために、モバイル機器1に対して所定の操作を行う(S10)。モバイル機器1は、少なくとも削除対象のレコードを指定する情報を含む削除情報(入力データ)を小型ディスクドライブ2に出力する。その削除情報は、削除処理に対応する[DELETE]というコマンド(第4のコマンド)と共に、小型ディスクドライブ2内のインタフェース3を介して制御部4に送られる。
[Delete Record]
Next, a case where a record is deleted ((D)) in the state after this record update ((C)) will be described (fourth processing). In order to delete the information of the data B (RID-002) stored in the data storage unit 63, the user performs a predetermined operation on the mobile device 1 (S10). The mobile device 1 outputs deletion information (input data) including information specifying at least a record to be deleted to the small disk drive 2. The deletion information is sent to the control unit 4 via the interface 3 in the small disk drive 2 together with the command [DELETE] corresponding to the deletion process (fourth command).

制御部4は、削除情報を受け取ると、データベース処理部47においてデータベース処理の内容を判別する。今の場合は、[DELETE]というコマンドを受け、レコードの削除をすることが判断される(S11およびS12)。   When the control unit 4 receives the deletion information, the database processing unit 47 determines the contents of the database processing. In this case, it is determined to delete a record in response to a command [DELETE] (S11 and S12).

レコードID制御部43は、要求された処理がレコード削除であることを受け、インデクス記憶部51から削除するレコードのRID(今の場合はRID−002)を取得する(S151)。このRIDおよび削除対象のデータであることを示すマーク(例えば、[DELETE])は、記憶データ生成部44において、一つの連続レコードとしてまとめられる(S152)。   The record ID control unit 43 receives the fact that the requested process is record deletion, and acquires the RID (RID-002 in this case) of the record to be deleted from the index storage unit 51 (S151). The RID and a mark (for example, [DELETE]) indicating data to be deleted are collected as one continuous record in the storage data generation unit 44 (S152).

続いて、前述のレコード挿入時およびレコード更新時と同様にして、ヘッド制御部45は、ヘッドをデータ記憶部63に記憶されている全レコードの終端アドレス、言い換えると、RID−001のレコードの終端アドレスの次のアドレスに移動させる。   Subsequently, in the same manner as the above-described record insertion and record update, the head control unit 45 sets the head to the end address of all records stored in the data storage unit 63, in other words, the end of the record of RID-001. Move to the next address.

そして、記憶データ生成部44において生成された連続レコード、すなわちRID−002がディスク部6に送られ、データ書き込み部61によりデータ記憶部63に書き込まれる(S153)。このとき、ヘッドは、記憶されているレコードの終端アドレスの次のアドレスに位置しているため、連続レコードは、データ記憶部63において前のレコードに追記される。   Then, the continuous record generated in the storage data generation unit 44, that is, RID-002 is sent to the disk unit 6, and is written in the data storage unit 63 by the data writing unit 61 (S153). At this time, since the head is located at the address next to the end address of the stored record, the continuous record is added to the previous record in the data storage unit 63.

連続レコード格納後、インデクス消去部49により、削除するレコードのRIDに対応するインデクスのみが消去される(S154)。このとき、削除対象のレコード、すなわち、RID−002のレコードは実際に消去されることなく、データ記憶部63に記憶されたままである。これにより、レコードの削除処理が完了する(S155)。   After the continuous records are stored, the index deleting unit 49 deletes only the index corresponding to the RID of the record to be deleted (S154). At this time, the record to be deleted, that is, the record of RID-002 is not actually erased but remains stored in the data storage unit 63. Thus, the record deletion process is completed (S155).

従来のDBMSは、削除の実行時、実際にデータ記憶部63上からレコードを削除するが、本実施形態においては削除処理もレコードの追記として取り扱う。つまり、本実施形態においては、実際にレコードをディスク上から削除することはなく、削除情報のみをディスクに追記する。レコード検索時には、インデクスを利用してレコード位置を求めるため、インデクスを削除することでシステム側からはレコードが削除されたように見える。   The conventional DBMS actually deletes the record from the data storage unit 63 when executing the deletion, but in this embodiment, the deletion process is also handled as a record addition. That is, in this embodiment, the record is not actually deleted from the disk, but only the deletion information is added to the disk. When searching for records, the index is used to determine the record position, so deleting the index makes it appear to the system that the record has been deleted.

[レコード検索]
最後に、このレコード更新((C))後の状態で、レコードが検索される場合について説明する(第5の処理)。甲がデータ記憶部63に記憶されたデータA(RID−001)の情報を検索するために、モバイル機器1に対して所定の操作を行う(S10)。モバイル機器1は、少なくとも検索対象のレコードを指定する情報を含む検索情報(入力データ)を小型ディスクドライブ2に出力する。その検索情報は、検索処理に対応する[SELECT]というコマンド(第5のコマンド)と共に、小型ディスクドライブ2内のインタフェース3を介して制御部4に送られる。
[Record Search]
Finally, a case where a record is searched in the state after this record update ((C)) will be described (fifth process). In order to search the information of the data A (RID-001) stored in the data storage unit 63, the user performs a predetermined operation on the mobile device 1 (S10). The mobile device 1 outputs search information (input data) including at least information specifying a record to be searched to the small disk drive 2. The search information is sent to the control unit 4 via the interface 3 in the small disk drive 2 together with a command [SELECT] (fifth command) corresponding to the search process.

制御部4は、検索情報を受け取ると、データベース処理部47においてデータベース処理の内容を判別する。今の場合は、[SELECT]というコマンドを受け、レコードの検索をすることが判断される(S11)。   When the control unit 4 receives the search information, the database processing unit 47 determines the contents of the database processing. In this case, it is determined to receive a command [SELECT] and search for a record (S11).

そして、ディスクアクセスを行う前に、インデクス最適化部41は、インデクス記憶部51に記憶されたインデクスにおいて、インデクスの最適化、つまり検索対象レコードの物理的な位置の並べ替え(ソート)を行う(S161)。このとき、インデクス最適化部41は、ヘッド位置監視部42から得られるヘッドの位置に基づき、例えばアクセス待ち時間(ヘッドが現在の位置からディスクアクセスを開始するまでに要する時間)が最短になるようにインデクス記憶部51においてインデクスを最適化する。つまり、本実施形態におけるインデクスの最適化とは、例えばアクセス待ち時間が最短になるように、インデクスが指し示すレコードの物理的な位置(アドレス)、つまりポインタを並べ替えることである。そして、最適化されたインデクスは、インデクス記憶部51に記憶される。   Then, before performing disk access, the index optimization unit 41 performs index optimization, that is, rearranges (sorts) the physical positions of the search target records in the index stored in the index storage unit 51 ( S161). At this time, based on the head position obtained from the head position monitoring unit 42, for example, the index optimization unit 41 minimizes the access waiting time (the time required for the head to start disk access from the current position). In the index storage unit 51, the index is optimized. In other words, the optimization of the index in the present embodiment means rearranging the physical position (address) of the record pointed to by the index, that is, the pointer so that the access waiting time is minimized. Then, the optimized index is stored in the index storage unit 51.

このポインタの並び替えによるインデクス最適化を、図4を用いて説明する。図4は、本発明に係るデータ入出力装置の一実施形態である複製方式の検索処理の動作説明図である。図4(a)はインデクス最適化前であり、図4(b)はインデクス最適化後の状態を表している。   The index optimization by the rearrangement of pointers will be described with reference to FIG. FIG. 4 is an explanatory diagram of the operation of the search method of the replication method that is an embodiment of the data input / output device according to the present invention. 4A shows a state before index optimization, and FIG. 4B shows a state after index optimization.

ディスク領域には、RIDによって指定されたレコードが記憶されている。この例では、RID−001、002、102、101および103のみを示している。そして、メモリ領域には、各RIDに対応するインデクスが記憶されている。   A record specified by the RID is stored in the disk area. In this example, only RID-001, 002, 102, 101 and 103 are shown. In the memory area, an index corresponding to each RID is stored.

幾度かのレコード更新や挿入により、ディスク領域に記憶されているRIDに対応するインデクスは図4(a)に示したようになっているとする。つまり、例えば、1番目のインデクスのポインタは、ディスクにおけるRID−101の先頭アドレスを示す3000番地であり、2番目のインデクスのポインタは、RID−002の先頭アドレスを示す2800番地である。このように、レコード更新や挿入が幾度か行われると、メモリ領域に記憶されたインデクスのポインタ順と、ディスク領域に記憶されたレコードの順とが複雑に絡み合ってしまう。   Assume that the index corresponding to the RID stored in the disk area is as shown in FIG. That is, for example, the pointer of the first index is address 3000 indicating the start address of RID-101 on the disk, and the pointer of the second index is address 2800 indicating the start address of RID-002. As described above, when the record is updated or inserted several times, the order of the pointers of the indexes stored in the memory area and the order of the records stored in the disk area are complicatedly entangled.

したがって、この図4(a)に示した状態のままで読み取りを行うと、インデクスのポインタが3000、2800、3300・・・と不規則に並んでいるために、ディスクアクセスの際、ヘッドのランダムアクセスが発生し、読み取り速度が低下してしまう。本発明においては、インデクスのポインタ並び替えを行い、シーケンシャルアクセスを行わせる。   Therefore, if reading is performed in the state shown in FIG. 4A, the index pointers are irregularly arranged as 3000, 2800, 3300... Access occurs and reading speed decreases. In the present invention, the index pointers are rearranged to allow sequential access.

今は、ヘッドが1800番地よりも先頭に近いアドレスに位置していると仮定する。そのため、インデクス最適化部41はインデクス記憶部51において、図4(a)のインデクスのポインタを図4(b)に示したように、ディスク上の番地の小さいものから大きいものへと並び替える。このとき、インデクスに記載されている番地とRIDの対応はそのままである。つまり、図4(a)と図4(b)における矢印の始点に対する終点のRIDは同じである。この図4(b)に示した状態で読み取りを行うと、ランダムアクセスは発生せず、シーケンシャルアクセスが行われる。これにより、ディスクからのデータ読み取りが高速に行える。   Now assume that the head is located at an address closer to the head than address 1800. Therefore, the index optimizing unit 41 rearranges the index pointers in FIG. 4A from the smallest address on the disk to the larger one in the index storage unit 51, as shown in FIG. 4B. At this time, the correspondence between the address and RID described in the index remains unchanged. That is, the RID of the end point with respect to the start point of the arrow in FIGS. 4 (a) and 4 (b) is the same. When reading is performed in the state shown in FIG. 4B, random access does not occur and sequential access is performed. As a result, data can be read from the disk at high speed.

本実施形態においては、インデクスのポインタをディスク上の番地の小さいものから大きいものへと並び替えるとして説明したが、本発明はそれに限られることなく、読み取りを始める時点でのヘッド位置を基準として、例えば、アクセス待ち時間が最も短くなるようにインデクスを最適化することも可能である。   In the present embodiment, the index pointer is described as being rearranged from the smallest address on the disk to the larger address, but the present invention is not limited to this, and the head position at the time of starting reading is used as a reference. For example, it is possible to optimize the index so that the access waiting time is the shortest.

また、例えば、重要度の高いデータの書き込みと、重要度の低いデータの検索とが同時に処理される場合、書き込み処理を優先的に行い、その後で検索処理を行うようにインデクスを最適化することも可能である。さらに、例えば、重要度の高い順に処理を行うことを基本にしながらも、ヘッドの移動途中にある重要度の低いデータを読み取り、アクセス時間の短縮も実現するように、重要度順と最短アクセス順とを組み合わせるようにすることも可能である。   Also, for example, when writing data with high importance and searching for data with low importance are processed at the same time, the write processing should be prioritized and the index optimized to perform the search processing after that. Is also possible. Furthermore, for example, while processing is based on the order of importance, the importance order and the shortest access order are used so that the less important data in the middle of moving the head is read and the access time is shortened. It is also possible to combine them.

このインデクス最適化後、続いて、ヘッド位置監視部42は、現在のヘッド位置をヘッド制御部45に通知する。また、最適化されたインデクスが、インデクス記憶部51からヘッド制御部45に出力される。ヘッド制御部45は、ヘッド位置監視部42およびインデクス記憶部51から通知されたこれらの情報に基づき、データ読み取り部62を制御し、最適化されたインデクスが指し示すレコードの物理的な位置にアクセスさせ、データ記憶部63に記憶されているレコードの読み取りを行わせる(S162)。この読み取りはデータ読み取りが終了するまで続けられ(S163)、データ読み取りが終了した時点でレコードの検索処理が完了する(S164)。   After the index optimization, the head position monitoring unit 42 notifies the head control unit 45 of the current head position. Further, the optimized index is output from the index storage unit 51 to the head control unit 45. The head control unit 45 controls the data reading unit 62 based on the information notified from the head position monitoring unit 42 and the index storage unit 51 to access the physical position of the record indicated by the optimized index. Then, the record stored in the data storage unit 63 is read (S162). This reading is continued until the data reading is completed (S163), and when the data reading is completed, the record search process is completed (S164).

また、この複製方式では、処理が単純なうえ、インデクスはレコード数以上に増えないため、メモリの節約が行える。   In addition, this replication method is simple, and the index does not increase beyond the number of records, so that memory can be saved.

[第2の実施形態]
続いて、第2の実施形態として、前述の差分方式について説明する。本方式は、データの変更が発生した場合、変更の対象となるレコードの差分のみを追記する方式である。
[Second Embodiment]
Subsequently, the above-described difference method will be described as a second embodiment. This method is a method in which, when data change occurs, only the difference between records to be changed is added.

図5は、本発明に係るデータ入出力装置の一実施形態である差分方式のデータ格納とインデクスの対応を示す模式図である。(A)はレコードの挿入や更新が行われる前の初期状態、(B)はレコード挿入時、(C)はレコード更新時、そして(D)はレコード削除時のインデクスとデータ記憶部63に記憶されたレコードとの対応を、それぞれ示している。   FIG. 5 is a schematic diagram showing the correspondence between the difference type data storage and the index which is an embodiment of the data input / output apparatus according to the present invention. (A) is the initial state before the record is inserted or updated, (B) is when the record is inserted, (C) is when the record is updated, and (D) is stored in the index and data storage unit 63 when the record is deleted. The correspondence with the recorded records is shown respectively.

また、図6は、本発明に係るデータ入出力装置の一実施形態である複製方式の処理の流れを示すフローチャートである。   FIG. 6 is a flowchart showing a processing flow of a replication method which is an embodiment of the data input / output device according to the present invention.

この図5に示した差分方式において、(A)初期状態、(B)レコード挿入(S131〜S135)および(D)レコード削除(S151〜S155)は、図2に示した複製方式と同じであるため説明を省略し、(C)レコード更新と検索処理についてのみ説明を行う。   In the difference method shown in FIG. 5, (A) initial state, (B) record insertion (S131 to S135) and (D) record deletion (S151 to S155) are the same as the duplication method shown in FIG. Therefore, the description is omitted, and only (C) record update and search processing will be described.

[レコード更新]
まず、レコード挿入((B))後の状態で、レコードが更新される場合((C))について説明する(第3の処理)。甲は13時にデータA(RID−001)を書き換え、付加情報をA−1からA−2に更新させるとする(S20)。モバイル機器1は、書き換えられたデータAおよび位置情報などを含むレコード(入力データ)を小型ディスクドライブ2に出力する。そのレコード(更新レコード)は、更新処理に対応する[UPDATE]というコマンド(第3のコマンド)と共に、小型ディスクドライブ2内のインタフェース3を介して制御部4に送られる。
[Record Update]
First, a case where a record is updated ((C)) in a state after record insertion ((B)) will be described (third process). The former rewrites the data A (RID-001) at 13:00 and updates the additional information from A-1 to A-2 (S20). The mobile device 1 outputs a record (input data) including the rewritten data A and position information to the small disk drive 2. The record (update record) is sent to the control unit 4 through the interface 3 in the small disk drive 2 together with a command [UPDATE] (third command) corresponding to the update process.

制御部4は、コマンドおよび更新レコードを受け取ると、データベース処理部47においてデータベース処理の内容を判別する。今の場合は、[UPDATE]というコマンドを受け、レコードの更新をすることが判断される(S21およびS22)。   When the control unit 4 receives the command and the update record, the database processing unit 47 determines the content of the database processing. In the present case, it is determined to receive a command [UPDATE] and update the record (S21 and S22).

レコードID制御部43は、要求された処理がレコード更新であることを受け、インデクス記憶部51から更新するレコードのRID(今の場合はRID−001)を取得する(S241)。そして、差分データ算出部82は、データ記憶部63に記憶されているRID−001のデータと入力データとを比較し、入力データにおいて更新されているデータ部分(更新属性値)を求める。このRID、更新属性値は、記憶データ生成部44において、一つの変更された連続レコードとしてまとめられる(S242)。つまり、この差分方式においては、変更されていない属性(データA)は、データ記憶部63に記憶されるレコードには含められない。   The record ID control unit 43 receives the fact that the requested process is a record update, and acquires the RID (RID-001 in this case) of the record to be updated from the index storage unit 51 (S241). Then, the difference data calculation unit 82 compares the data of RID-001 stored in the data storage unit 63 with the input data, and obtains a data portion (update attribute value) updated in the input data. The RID and the update attribute value are collected as one changed continuous record in the storage data generation unit 44 (S242). That is, in this difference method, the attribute (data A) that has not been changed is not included in the record stored in the data storage unit 63.

続いて、前述のレコード挿入時と同様にして、ヘッド制御部45は、ヘッドをデータ記憶部63に記憶されている全レコードの終端アドレス、言い換えると、RID−003のレコードの次のアドレスに移動させる。   Subsequently, the head control unit 45 moves the head to the end address of all the records stored in the data storage unit 63, in other words, to the next address of the record of RID-003 in the same manner as the above-described record insertion. Let

そして、記憶データ生成部44において生成された更新後の連続レコード、すなわちRID−001のレコードがディスク部6に送られ、データ書き込み部61によりデータ記憶部63に書き込まれる(S243)。このとき、ヘッドは、記憶されている全レコードの終端アドレスの次のアドレスに位置しているため、更新後の連続レコードは、データ記憶部63において前のレコードに追記される。   Then, the updated continuous record generated in the storage data generation unit 44, that is, the record of RID-001 is sent to the disk unit 6, and is written in the data storage unit 63 by the data writing unit 61 (S243). At this time, since the head is located at the address next to the end address of all the stored records, the updated continuous record is added to the previous record in the data storage unit 63.

更新レコード格納後、インデクス付与部81により、データ記憶部63において格納されたアドレスの先頭を示すインデクスが張られ、そのインデクスはメモリ5内のインデクス記憶部51に記憶される。このとき、制御部4内のインデクス追加部(図略)により、インデクス記憶部51にすでに記憶されているRID−001(付加情報A−1)に対するインデクスのポインタはそのままで、更新後のRID−001(付加情報A−2)に対するインデクスのポインタが、リストとしてさらに付け加えられて記憶される(S244)。つまり、本実施形態においては、インデクス記憶部51においてインデクスに付加されたリストをたどることで、更新属性値の格納位置を知ることができる。また、RID−001(付加情報A−2)のデータの終端アドレスは、終端アドレス記憶部46に記憶される。これにより、レコードの更新処理が完了する(S245)。   After storing the update record, the index assigning unit 81 creates an index indicating the head of the address stored in the data storage unit 63, and the index is stored in the index storage unit 51 in the memory 5. At this time, the index pointer for RID-001 (additional information A-1) already stored in the index storage unit 51 is kept as it is by the index addition unit (not shown) in the control unit 4, and the updated RID- An index pointer for 001 (additional information A-2) is further added and stored as a list (S244). That is, in the present embodiment, the storage location of the update attribute value can be known by following the list added to the index in the index storage unit 51. Further, the end address of the data of RID-001 (additional information A-2) is stored in the end address storage unit 46. This completes the record update process (S245).

前述のインデクス消去部49は、第1の実施形態である複製方式に必要な機能を有する機能部であったが、インデクス追加部を、このインデクス消去部49の代わりに用いることにより、本実施形態に係る差分方式を実行することができる。   The above-described index erasure unit 49 is a functional unit having a function necessary for the duplication method according to the first embodiment. However, by using an index addition unit instead of the index erasure unit 49, the present embodiment It is possible to execute the difference method according to the above.

このように、差分方式では、変更(更新)データのみがディスクに追記されるため、使用するディスク容量が少なくて済む。   In this way, in the differential method, only changed (updated) data is appended to the disk, so that less disk capacity is required.

[レコード検索]
次に、このレコード更新((C))後の状態で、レコードが検索される場合について説明する(第5の処理)。甲がデータ記憶部63に記憶されたデータA(RID−001)の情報を検索するために、モバイル機器1に対して所定の操作を行う。モバイル機器1は、少なくとも検索対象のレコードを指定する情報を含む検索情報(入力データ)を小型ディスクドライブ2に出力する。その検索情報は、検索処理に対応する[SELECT]というコマンド(第5のコマンド)と共に、小型ディスクドライブ2内のインタフェース3を介して制御部4に送られる。
[Record Search]
Next, a case where a record is searched in the state after this record update ((C)) will be described (fifth process). In order to retrieve information of data A (RID-001) stored in the data storage unit 63, the user A performs a predetermined operation on the mobile device 1. The mobile device 1 outputs search information (input data) including at least information specifying a record to be searched to the small disk drive 2. The search information is sent to the control unit 4 via the interface 3 in the small disk drive 2 together with a command [SELECT] (fifth command) corresponding to the search process.

制御部4は、検索情報を受け取ると、データベース処理部47においてデータベース処理の内容を判別する。今の場合は、[SELECT]というコマンドを受け、レコードの検索をすることが判断される(S21)。   When the control unit 4 receives the search information, the database processing unit 47 determines the contents of the database processing. In this case, it is determined to receive a command [SELECT] and search for a record (S21).

そして、ディスクアクセスを行う前に、インデクス最適化部41は、インデクス記憶部51に記憶されたインデクスにおいて、インデクスの最適化、つまり検索対象レコードの物理的な位置の並べ替え(ソート)を行う(S261)。このとき、インデクス最適化部41は、ヘッド位置監視部42から得られるヘッドの位置に基づき、例えばアクセス待ち時間が最短になるようにインデクス記憶部51においてインデクスを最適化する。そして、最適化されたインデクスは、インデクス記憶部51に記憶される。   Then, before performing disk access, the index optimization unit 41 performs index optimization, that is, rearranges (sorts) the physical positions of the search target records in the index stored in the index storage unit 51 ( S261). At this time, the index optimizing unit 41 optimizes the index in the index storage unit 51 based on the head position obtained from the head position monitoring unit 42 so that, for example, the access waiting time is minimized. Then, the optimized index is stored in the index storage unit 51.

ただし、この差分方式(本実施形態)においては、前述の複製方式(第1の実施形態)とは異なり、更新された属性のみが追記され、インデクスにはその更新属性値の物理的な位置を示すリストが付加されている。したがって、インデクスにおいて、検索対象レコードの物理的な位置の並べ替えを行う際には、このリストに付加された分も検索対象レコードに含め、インデクスの最適化を行う必要がある。   However, in this difference method (this embodiment), unlike the above-described duplication method (first embodiment), only the updated attribute is added, and the physical position of the updated attribute value is added to the index. A list to indicate is added. Therefore, when rearranging the physical position of the search target record in the index, it is necessary to optimize the index by including the amount added to this list in the search target record.

続いて、ヘッド位置監視部42は、現在のヘッド位置をヘッド制御部45に通知する。また、最適化されたインデクスが、インデクス記憶部51からヘッド制御部45に出力される。ヘッド制御部45は、ヘッド位置監視部42およびインデクス記憶部51から通知されたこれらの情報に基づき、データ読み取り部62を制御し、最適化されたインデクスが指し示すレコードの物理的な位置に順次アクセスさせ、データ記憶部63に記憶されているレコードの読み取りを行わせる(S262)。この読み取りはデータ読み取りが終了するまで続けられ(S263)、データ読み取りが終了した時点でレコードの検索処理が完了する(S264)。   Subsequently, the head position monitoring unit 42 notifies the head control unit 45 of the current head position. Further, the optimized index is output from the index storage unit 51 to the head control unit 45. The head control unit 45 controls the data reading unit 62 based on the information notified from the head position monitoring unit 42 and the index storage unit 51, and sequentially accesses the physical position of the record indicated by the optimized index. The record stored in the data storage unit 63 is read (S262). This reading is continued until the data reading is completed (S263), and when the data reading is completed, the record search process is completed (S264).

差分方式では、ディスクに記憶するデータは更新された属性値のみなので、ディスク領域の節約が可能である。   In the differential method, the data stored in the disk is only the updated attribute value, so that the disk area can be saved.

以上説明した第1および第2いずれの実施形態においても、インデクスを用いて検索対象レコードの物理的な位置順に並べ替え(ソート)を行っている。インデクスはメモリ5上に記憶されているため、この並べ替えはディスクへのアクセス時間に比べて短時間で行える。さらに、この並べ替えによりランダムアクセスをシーケンシャルアクセスに変換することができるため、レコード間隔が広くない場合には高速な検索が行える。   In both the first and second embodiments described above, sorting is performed in the order of the physical positions of the search target records using the index. Since the index is stored in the memory 5, this rearrangement can be performed in a shorter time than the access time to the disk. Further, random access can be converted into sequential access by this rearrangement, so that a high-speed search can be performed when the record interval is not wide.

以上説明したように、本発明に係る上記実施形態によれば、ディスク回転速度が低速な小型ディスクドライブにおいても、ヘッドが目的のレコード位置に移動するためのアクセス待ち時間を短縮することが可能で、能動型データベースに好適なデータ入出力方法、およびそれを用いたデータ入出力装置を提供できる。   As described above, according to the embodiment of the present invention, it is possible to shorten the access waiting time for the head to move to the target record position even in a small disk drive with a low disk rotation speed. A data input / output method suitable for an active database and a data input / output device using the same can be provided.

[他の好ましい実施形態]
(1)サイズの小さいデータを頻繁にデータ記憶部63(磁気ディスク)に書き込む場合、ディスクアクセスのオーバヘッドが高くなるため、シーケンシャルアクセスの利点が十分に得られない可能性がある。このため、メモリ5上にバッファ部52(ログバッファ)を設け、バッファ書き込み部83(バッファ書き込み手段)により、入力データを一旦このバッファ部52に記憶させる。その後、まとめてデータ記憶部63に書き込むグループコミットの手法を採用し、効率的なデータ処理を実現することが望ましい。
[Other preferred embodiments]
(1) When small-size data is frequently written to the data storage unit 63 (magnetic disk), the overhead of disk access becomes high, so that the advantage of sequential access may not be sufficiently obtained. Therefore, a buffer unit 52 (log buffer) is provided on the memory 5, and input data is temporarily stored in the buffer unit 52 by a buffer writing unit 83 (buffer writing means). After that, it is desirable to adopt a group commit method that writes data to the data storage unit 63 together to realize efficient data processing.

ウェアラブル機器で扱うデータには、位置情報など、たとえデータが消失しても、前後のレコードから推測が可能なデータがある。これらのデータは重要度が低いため、データの消失が発生しても問題がない。一方、例えば、所持金情報など重要度の高いデータをメモリ5上に蓄えると、障害によりデータが消失する危険性があるので、データ記憶部63に強制的にフラッシュする。このようにデータにプライオリティー(重要度)を持たせることで、ディスクフラッシュの制御を行うことが可能である。   Data handled by the wearable device includes data such as position information that can be estimated from previous and subsequent records even if the data is lost. Since these data are low in importance, there is no problem even if data loss occurs. On the other hand, for example, if highly important data such as possession information is stored in the memory 5, there is a risk that the data may be lost due to a failure. Thus, by giving priority (importance) to the data, it is possible to control the disk flash.

図7は、本発明に係るデータ入出力装置の一実施形態におけるグループコミットを説明するための模式図である。グループコミットを実現するための1つの形態は、図7に「データ記録1」として示したものである。この形態では、バッファ書き込み部83により入力データがバッファ部52に書き込まれるとき、バッファ監視部84(バッファ監視手段)がバッファ部52の記憶領域を監視している。そして、バッファ監視部84によりバッファ部52の記憶領域が満たされたことが検出されると、フラッシュ制御部86(第1のフラッシュ制御手段)がデータ書き込み部61を制御し、バッファ部52に記憶されているデータをデータ記憶部63に書き込ませる。   FIG. 7 is a schematic diagram for explaining group commit in an embodiment of the data input / output device according to the present invention. One form for realizing group commit is shown as “data record 1” in FIG. In this embodiment, when the input data is written to the buffer unit 52 by the buffer writing unit 83, the buffer monitoring unit 84 (buffer monitoring unit) monitors the storage area of the buffer unit 52. When the buffer monitoring unit 84 detects that the storage area of the buffer unit 52 is filled, the flash control unit 86 (first flash control unit) controls the data writing unit 61 and stores it in the buffer unit 52. The stored data is written into the data storage unit 63.

また、グループコミットを実現するための別の形態は、図7に「データ記録2」として示したものである。この形態では、バッファ書き込み部83により入力データがバッファ部52に書き込まれるとき、バッファ属性監視部85(バッファ属性監視手段)が入力データの属性を監視している。そして、バッファ属性監視部85により、入力データのプライオリティーが高いこと(所定の属性)が検出されると、フラッシュ制御部86(第2のフラッシュ制御手段)がデータ書き込み部61を制御し、バッファ部52に記憶されているデータを直ちにデータ記憶部63に書き込ませる。   Another form for realizing the group commit is shown as “data recording 2” in FIG. In this embodiment, when the input data is written to the buffer unit 52 by the buffer writing unit 83, the buffer attribute monitoring unit 85 (buffer attribute monitoring means) monitors the attribute of the input data. When the buffer attribute monitoring unit 85 detects that the input data has a high priority (predetermined attribute), the flash control unit 86 (second flash control means) controls the data writing unit 61 to The data stored in the unit 52 is immediately written into the data storage unit 63.

このプライオリティーは、例えば、モバイル機器1を介して小型ディスクドライブ2にデータを記憶させる際、所定のボタンを押下げることなどにより実現させることができる。つまり、所定のボタンを押下げることなどにより、プライオリティーをデータの属性という形で与えるように構成すればよい。   This priority can be realized, for example, by pressing a predetermined button when storing data in the small disk drive 2 via the mobile device 1. In other words, the priority may be given in the form of data attributes by pressing a predetermined button or the like.

(2)本発明の上記実施形態においては、個人で利用するシステムを想定しているため、全体レコード数は少ない。そのため、例えば小型ディスクドライブのメモリ上にインデクスを展開することができ、検索性能を高めることが可能である。しかし、メモリ上のデータは、電源障害時や、プロセスの異常終了時に消失する可能性がある。本発明の別の実施形態においては、定期的にインデクスを小型ディスクドライブ上に記憶する。   (2) In the above embodiment of the present invention, since the system is assumed to be used by individuals, the total number of records is small. Therefore, for example, an index can be developed on the memory of a small disk drive, and search performance can be improved. However, the data on the memory may be lost when a power failure occurs or when the process ends abnormally. In another embodiment of the invention, the index is periodically stored on a small disk drive.

これは、例えば、所定の時間が経過すると、インデクス再起億部48がインデクス記憶部51からインデクス一式を読み取り、それらをデータ書き込み部61を介し、タイムスタンプを付してデータ記憶部63に記憶させることで実現される。   For example, when a predetermined time elapses, the index restart unit 48 reads a set of indexes from the index storage unit 51 and stores them in the data storage unit 63 with a time stamp via the data writing unit 61. This is realized.

システム障害時には、まず、記憶されているすべてのインデクスをデータ読み取り部62を介してデータ記憶部63から読み込む。そして、読み込んだインデクスのタイムスタンプを調べ、最新のインデクスのまとまりを特定する。続いて、その最新のインデクスが記憶された後のログデータをデータ記憶部63上から読み込むことで、データを復元する。これにより、耐障害性について解決することができる。   When a system failure occurs, first, all stored indexes are read from the data storage unit 63 via the data reading unit 62. Then, the time stamp of the read index is checked to identify the latest index group. Subsequently, the data is restored by reading the log data after the latest index is stored from the data storage unit 63. Thereby, it is possible to solve the fault tolerance.

(3)本発明の上記実施形態においては、過去から現在までの情報を検索するテンポラルクエリの実行を想定しているため、データの削除を行わず、変更データはすべてディスクに記憶されているデータの次のアドレスに追記される。そのため、未使用空間が分散的に発生することはなく、ディスクを効率的に使用できる。   (3) In the above embodiment of the present invention, it is assumed that a temporal query for retrieving information from the past to the present is executed. Therefore, data is not deleted, and all changed data is stored in the disk. Is added to the next address. Therefore, unused space does not occur in a distributed manner, and the disk can be used efficiently.

(4)本発明の上記実施形態においては、リレーショナル型のデータモデルを取り上げて説明したが、本発明はこれに限られることなく、カード型やオブジェクト型など、それ以外のデータモデルにも適用できる。   (4) In the above embodiment of the present invention, the relational data model has been described. However, the present invention is not limited to this, and can be applied to other data models such as a card type and an object type. .

本実施例においては、小型ディスクドライブを接続されたPC(パーソナルコンピュータ)を用い、Linux上でシステム構築、およびテストを行った。なお、Linuxとして、gentoo 1. 4. 1(Kernel Version 2.6)、PCとしてIBM ThinkPad (CPU:Pentium(登録商標)3、Memory:384MB)、小型ディスクドライブ2としてHGST製のマイクロドライブDSCM−11000を使用した。このマイクロドライブの性能を表1に示す。   In this example, a system (construction and test) was performed on Linux using a personal computer (PC) connected to a small disk drive. Note that Gentoo 1.4.1 (Kernel Version 2.6) is used as Linux, IBM ThinkPad (CPU: Pentium (registered trademark) 3, Memory: 384MB) as PC, and HGST's Microdrive DSCM-11000 as small disk drive 2. used. Table 1 shows the performance of this microdrive.

Figure 2006059502
Figure 2006059502

本実施例におけるDBMSの処理は、PC内部のCPU(制御部4)およびメモリ5を使用して処理を行い、データは小型ディスクドライブ2に格納した。   The DBMS processing in this embodiment is performed using the CPU (control unit 4) and the memory 5 inside the PC, and the data is stored in the small disk drive 2.

本発明に係る追記型ファイルシステムを構築するため、C言語の低水準入出力を利用してディスクにアクセスを行う。低水準入出力では、ディスクをシーケンシャルにアクセスすることが可能であり、OSがあらかじめ備えるバッファリング機能を利用せず、直接ディスクとデータ転送を行うことが可能となる。一方、高水準入出力を利用すると、OSのバッファリング機能を利用し、ディスクの読み込み場所からバッファ容量に余裕がある限りデータ蓄積を行う。これにより、バッファ内のレコードを利用する際、ディスクアアクセスが必要なく高速に処理を行うことができる利点があるが、バッファに蓄えるためのデータを読み込むため、ヘッドがバッファ容量分だけ移動する。問い合わせに不要な領域が115KBを境にシーケンシャルアクセスとランダムアクセスを使い分けるが、ヘッドがバッファ容量分移動しているため、最適なディスクアクセスを行うことができない。   In order to construct a write-once file system according to the present invention, a disk is accessed using low-level input / output of C language. With low-level input / output, the disk can be accessed sequentially, and data can be directly transferred to and from the disk without using the buffering function provided in advance by the OS. On the other hand, if high-level input / output is used, the buffering function of the OS is used, and data is stored as long as there is a sufficient buffer capacity from the disk reading location. As a result, when using the records in the buffer, there is an advantage that processing can be performed at high speed without the need for disk access. However, since the data to be stored in the buffer is read, the head moves by the buffer capacity. Although the area unnecessary for the inquiry uses 115 KB as a boundary, the sequential access and the random access are properly used. However, since the head moves by the buffer capacity, the optimum disk access cannot be performed.

本実施例においては、ディスクを直接制御しているため、ヘッドは最終アクセスを行ったディスクトラック上にあり、レコード追記場所へのアクセスを平均待ち時間(8.33ms)で行うことが可能となる。   In this embodiment, since the disk is directly controlled, the head is on the disk track where the last access was made, and it is possible to access the record recording location with an average waiting time (8.33 ms). .

本実施例においては、ウイスコンシンベンチマークで利用されるレコードセットを用いてディスクアクセス性能について検証する。ウイスコンシンベンチマークは、208バイトのデータを1レコードとしてデータの読み書きを行うテスト方式である。1レコードは、整数型変数(4バイト)13個と52文字からなる文字型配列(52バイト)3個から構成されている。レコードサイズが208バイトの場合、HGST製マイクロドライブでは、アクセス待ち時間(20.33ms:平均シーク時間12ms+平均待ち時間8.33ms)内にシーケンシャルアクセスでは、約450〜700レコードの読み込みあるいは書き込み処理を実行することが可能である。   In this embodiment, the disk access performance is verified using a record set used in the Wisconsin benchmark. The Wisconsin benchmark is a test method for reading and writing data with 208 bytes of data as one record. One record is composed of 13 integer type variables (4 bytes) and 3 character type arrays (52 bytes) consisting of 52 characters. When the record size is 208 bytes, the micro drive manufactured by HGST reads or writes about 450 to 700 records in sequential access within the access waiting time (20.33 ms: average seek time 12 ms + average waiting time 8.33 ms). It is possible to execute.

図8は、本発明に係るデータ入出力装置の一実施例において、10MB単位のデータのディスク読み書き時間を表す図であり、実線は書き込み(write)、一点鎖線は読み込み(read)、そして、太い実線でそれらの4区間(レコード数)平均を示す。この図からわかるように、書き込み(write)と読み込み(read)双方でほぼ同様な結果が得られている。   FIG. 8 is a diagram showing the disk read / write time of 10 MB data in one embodiment of the data input / output device according to the present invention, where the solid line is write, the alternate long and short dash line is read, and thick. A solid line shows the average of those four sections (number of records). As can be seen from this figure, almost the same result is obtained for both writing and reading.

データ処理初期段階では、小型ディスク内のバッファが利用されるため、高速に処理が行われている。また、ディスク容量が1GBのため、108レコード(10MB×108〜1GB)で処理が終了している。ディスク内バッファを利用しない状態で、平均して約5秒で10MBのデータを読み書きしているため、読み書き速度は約2.0MB/secとなる。これを表1に示した連続読み書き速度(2.5−4.1MB/sec)と比較すると、50%〜80%の性能が出ていることがわかる。2.0MB/secでの記憶が行えると、映像などの蓄積を行うモバイル機器で、MPEG4の規格である384kbpsのビットレートで記憶を行うことが可能である。また、映像を記憶させながら、問い合わせを行うことも可能であると考えられる。   In the initial stage of data processing, since the buffer in the small disk is used, processing is performed at high speed. Further, since the disk capacity is 1 GB, the processing is completed with 108 records (10 MB × 108 to 1 GB). Since 10 MB of data is read and written in about 5 seconds on average without using the on-disk buffer, the read / write speed is about 2.0 MB / sec. When this is compared with the continuous read / write speed (2.5-4.1 MB / sec) shown in Table 1, it can be seen that performance of 50% to 80% is obtained. If storage at 2.0 MB / sec is possible, it is possible to store at a bit rate of 384 kbps, which is the MPEG4 standard, on a mobile device that stores video and the like. It is also possible to make an inquiry while storing the video.

次に、ランダムアクセスとシーケンシャルアクセスで書き込んだ場合の処理時間についての比較を行う。図9(a)はランダムアクセス、図9(b)はシーケンシャルアクセスにおけるデータの格納状態を示す模式図である。   Next, a comparison is made regarding the processing time when writing is performed by random access and sequential access. FIG. 9A is a schematic diagram showing a data storage state in random access and FIG. 9B is a sequential access.

図9(a)に示すように、ランダムアクセスの場合、ポインタから次レコード位置を特定し、ヘッドを移動させ次レコードの読み込みを行う。すなわち、レコードを読み込むたびにヘッドの移動が起こる。ランダムアクセスでは、レコードID、データ、次レコードへのポインタを1レコードとして取り扱う。   As shown in FIG. 9A, in the case of random access, the next record position is specified from the pointer, the head is moved, and the next record is read. That is, the head moves every time a record is read. In random access, a record ID, data, and a pointer to the next record are handled as one record.

それに対して図9(b)に示すように、シーケンシャルアクセスの場合、データは連続的に書かれているため、ヘッドの移動が起こらず、連続的にデータを読み込んでいく。シーケンシャルアクセスでは、レコードID、データを1レコードとして取り扱う。   On the other hand, as shown in FIG. 9B, in the case of sequential access, the data is written continuously, so the head does not move and the data is read continuously. In sequential access, a record ID and data are handled as one record.

本実施例においては、ランダムアクセスにおけるデータアクセス速度が、シーケンシャルアクセスに比べ著しく劣るため、両者の処理速度の差分からアクセス待ち時間を求めることができる。   In this embodiment, since the data access speed in random access is significantly inferior to that in sequential access, the access waiting time can be obtained from the difference between the processing speeds of the two.

図10は、208バイト(1レコード)のレコード処理による、ランダムアクセスおよびシーケンシャルアクセスでのレコード数とアクセス(応答)時間(アクセス待ち時間+ディスクアクセス)との関係を示すグラフである。この図からわかるように、シーケンシャルアクセスはランダムアクセスに比べアクセス時間が非常に速い。しかしながらこの図から、シーケンシャルアクセスとランダムアクセスにおけるアクセス時間の比較を行うことはできない。   FIG. 10 is a graph showing the relationship between the number of records in random access and sequential access and access (response) time (access waiting time + disk access) by 208 byte (1 record) record processing. As can be seen from this figure, the sequential access has a much faster access time than the random access. However, from this figure, it is not possible to compare the access times for sequential access and random access.

そのため、図11に、シーケンシャルアクセスを10,000レコード分行ったときの、レコード数とアクセス(応答)時間との関係を示す。図10からわかるように、ランダムアクセスでは1秒間に約55レコードの処理を行っている。つまり、ランダムアクセスで100レコードを書き込むのに要する時間は、1,998.4msとなる。一方、図11からわかるように、シーケンシャルアクセスでは1秒間に約9,000レコードの処理を行っている。つまり、シーケンシャルアクセスで100レコードを書き込むのに要する時間は14.41msとなる。これから求められたアクセス待ち時間(100レコードを書き込むのに要する時間の差分をレコード数100で割った値)は19.84msであり、表1から求められたアクセス待ち時間(20.33ms:理論値)と比較して妥当な値である。また、この結果から、アクセス待ち時間がディスクアクセスに比べ多大な時間を要していることがわかる。   Therefore, FIG. 11 shows the relationship between the number of records and access (response) time when sequential access is performed for 10,000 records. As can be seen from FIG. 10, in the random access, about 55 records are processed per second. That is, the time required to write 100 records by random access is 1,998.4 ms. On the other hand, as can be seen from FIG. 11, in the sequential access, about 9,000 records are processed per second. That is, the time required to write 100 records by sequential access is 14.41 ms. The access waiting time (the value obtained by dividing the time required to write 100 records by the number of records 100) is 19.84 ms, and the access waiting time determined from Table 1 (20.33 ms: theoretical value). ) Is a reasonable value. From this result, it can be seen that the access waiting time requires much time compared to the disk access.

続いて、ページ単位とレコード単位でのディスクアクセスの処理時間の比較を行う。任意のサイズの単一データを示すレコードに対して、ページとは特定サイズのデータ集合であり、一般に数レコードのデータが含まれる。   Subsequently, the disk access processing time in page units and record units is compared. For a record indicating single data of an arbitrary size, a page is a data set of a specific size and generally includes several records of data.

頻繁にディスクアクセスを繰り返すと、ディスクアクセスのオーバヘッドが生じる。このため、ページ単位アクセスを利用し、一括してデータを書き込むことで、ディスクアクセス頻度を減らすことができ、効率よくデータ処理を行うことが可能となる。なお、ページ単位のサイズは、9レコードを一括して書き込む2KB、19レコードを一括して書き込む4KB、39レコードを一括して書き込む8KBのページサイズでアクセス速度を比較する。   If disk access is repeated frequently, disk access overhead occurs. For this reason, by using page unit access and writing data collectively, the disk access frequency can be reduced and data processing can be performed efficiently. Note that the access speed is compared with the page size of 2 KB for writing 9 records at a time, 4 KB for writing 19 records at a time, and 8 KB for writing 39 records at a time.

図12は、4KBをページサイズとした場合の、バッファを利用したディスクアクセスと、バッファを利用しないディスクアクセスとにおけるレコード数とアクセス(応答)時間との関係を示すグラフである。4,000レコードを書き込む際、ページ単位アクセスでは68.9ms、レコード単位アクセスでは227.7msの時間を要している。この結果から、バッファを用いる方がディスクアクセスのオーバヘッドを大幅に抑えることが可能となることがわかる。   FIG. 12 is a graph showing the relationship between the number of records and the access (response) time in disk access using a buffer and disk access not using a buffer when the page size is 4 KB. When writing 4,000 records, it takes 68.9 ms for page unit access and 227.7 ms for record unit access. From this result, it is understood that the overhead of disk access can be greatly reduced by using the buffer.

次に、図13は、バッファ容量を2KB、4KB、8KBに変化させた場合の、レコード数とアクセス(応答)時間との関係を示すグラフである。2KBのバッファを用いた場合、ディスクアクセスのオーバヘッドが発生していると思われる結果が得られた。バッファ容量を4KBと8KBに換えた場合、この両者の間ではアクセス時間に違いは見られない。したがって、メモリ上に蓄えるデータ量が少ない4KBのバッファを用いる方が適当である。   Next, FIG. 13 is a graph showing the relationship between the number of records and access (response) time when the buffer capacity is changed to 2 KB, 4 KB, and 8 KB. When a 2 KB buffer was used, a result that seems to have caused disk access overhead was obtained. When the buffer capacity is changed to 4 KB and 8 KB, there is no difference in access time between the two. Therefore, it is appropriate to use a 4 KB buffer that stores a small amount of data on the memory.

以上より、4KBのページ単位のシーケンシャルアクセスが最も効率のよい処理方法であることがわかる。   From the above, it can be seen that sequential access in units of 4 KB pages is the most efficient processing method.

本実施例においては、インデクスはディスクに格納されたレコード位置をキーとして張られているため、レコード位置をあらかじめ特定することができる。そして、各レコードの格納場所をアドレス順にソートすることでディスクアクセスを行う。このため、ヘッドの移動を最小限に抑えて検索を行うことが可能である。また、読み込みレコード間隔はインデクスをもとに求めることができるため、レコードの間隔が広く、シーケンシャルアクセスによる読み飛ばしに要する時間がランダムアクセスによるヘッド移動時間を上回る場合には、ランダムアクセスを採用する。表1から求めた理論上のアクセス待ち時間は20.33msであるが、前述したように本実施例におけるアクセス待ち時間は19.84msということがわかっている。19.84ms内にシーケンシャルアクセスにより読み取ることのできるデータ量は約112KBで、208バイトのレコードでは約600レコードに相当する。すなわち、読み飛ばし領域が112KB以上の場合、シーケンシャルアクセスよりもランダムアクセスを利用する方がアクセス時間を短縮できるため、有効である。   In this embodiment, since the index is set using the record position stored on the disk as a key, the record position can be specified in advance. Then, disk access is performed by sorting the storage locations of the records in the order of addresses. Therefore, it is possible to perform a search while minimizing the movement of the head. Further, since the read record interval can be obtained based on the index, random access is adopted when the record interval is wide and the time required for skipping by sequential access exceeds the head movement time by random access. The theoretical access waiting time obtained from Table 1 is 20.33 ms, but as described above, it is known that the access waiting time in this embodiment is 19.84 ms. The amount of data that can be read by sequential access within 19.84 ms is approximately 112 KB, and a 208 byte record corresponds to approximately 600 records. That is, when the skip area is 112 KB or more, it is effective to use random access rather than sequential access because the access time can be shortened.

十分な数のレコードを用意し、300回の検索処理におけるアクセス時間の測定を行った。第n回目の施行ではn個のレコードを検索する。このとき、各レコードの間隔は、{1、3、5、・・・、2n+1}を重複なくランダムに選択するように人工的に与えた。つまり、nが小さいときは、検索されるレコードが密に存在する。そのため、シーケンシャルアクセスによる読み飛ばしが利用される。一方、nが大きいときは、レコード間隔が密な部分ではシーケンシャルアクセスが選択されるが、疎な部分ではランダムアクセスが選択されるように構成した。   A sufficient number of records were prepared, and the access time in 300 times of search processing was measured. In the n-th enforcement, n records are searched. At this time, the interval between the records is artificially given so that {1, 3, 5,..., 2n + 1} is randomly selected without duplication. That is, when n is small, there are densely searched records. For this reason, skipping by sequential access is used. On the other hand, when n is large, the sequential access is selected in the portion where the record interval is dense, but the random access is selected in the sparse portion.

具体的には、前述したディスクの特性を考慮し、レコード間隔が約112KB、すなわち208バイトのレコードで約28ページ以上あればランダムアクセスに切り替わるように設定した。   Specifically, in consideration of the above-mentioned characteristics of the disk, it is set to switch to random access when the record interval is about 112 KB, that is, about 208 pages or more in a 208 byte record.

図14は、アクセス方法を変化させた場合のレコード数とアクセス(応答)時間との関係を示すグラフである。横軸は検索するレコード数nを、縦軸はその検索に要するアクセス時間を示している。この図において、実線が本実施例による結果である。また、比較のため、すべてシーケンシャルアクセスの場合(粗点線)、およびすべてランダムアクセスの場合(細点線)の結果も示してある。   FIG. 14 is a graph showing the relationship between the number of records and the access (response) time when the access method is changed. The horizontal axis indicates the number n of records to be searched, and the vertical axis indicates the access time required for the search. In this figure, the solid line is the result of this example. For comparison, the results for all sequential accesses (coarse dotted line) and for all random accesses (thin dotted line) are also shown.

図14からわかるように、検索レコード数nが小さいとき、すなわちレコード間隔が密のときはシーケンシャルアクセスが選択されている。検索レコード数nが増加するに従い、レコード間隔が疎である部分が増加し、シーケンシャルな読み飛ばしによるアクセス時間が二次関数的に増加する。そして、レコード間隔が112KBを超えるとシーケンシャルアクセスに比べランダムアクセスによりヘッドを移動させた方が目的レコードに到達する時間が早くなる。その分岐点よりさらに検索レコード数が増加した場合、ランダムアクセスを利用する方がより高速である。この図14から明らかなように、本実施例によりディスクアクセスが最適化されていることがわかる。   As can be seen from FIG. 14, sequential access is selected when the number of search records n is small, that is, when the record interval is close. As the number of search records n increases, the portion where the record interval is sparse increases, and the access time due to sequential skipping increases in a quadratic function. When the record interval exceeds 112 KB, the time to reach the target record is faster when the head is moved by random access than by sequential access. When the number of search records further increases from the branch point, it is faster to use random access. As can be seen from FIG. 14, the disk access is optimized according to this embodiment.

以上説明したように、ランダムアクセスとシーケンシャルアクセスとを使い分けることで、常に高速なディスクアクセスを実現することが可能となる。本実施例は、読み飛ばし領域の広い検索処理が発生する機会が少ないと考えられる、個人利用のシステムにおいて特に有効である。   As described above, it is possible to always realize high-speed disk access by properly using random access and sequential access. This embodiment is particularly effective in a system for personal use, in which it is considered that there is little opportunity for search processing with a wide skip area to occur.

また、モバイル機器で小型ディスクドライブを利用するにあたっては、消費電力の問題を考慮する必要がある。ディスクドライブが主に電力を消費するのは、ヘッドの移動時やディスクの起動時である。本実施例においては、ヘッドの動きをスケジュールし、ディスクに対して可能な限りシーケンシャルにアクセスするため、データアクセスを高速化すると共に、ヘッドの移動を最小限に抑えることが実現されている。   Also, when using a small disk drive in a mobile device, it is necessary to consider the problem of power consumption. The disk drive mainly consumes power when the head is moved or when the disk is started. In this embodiment, since the movement of the head is scheduled and the disk is accessed as sequentially as possible, the speed of data access is increased and the movement of the head is minimized.

また、通常、小型ディスクドライブは、ディスクアクセスが行われないとき、ディスクの回転を停止する。しかしながら、モバイル機器に小型ディスクドライブを装着した場合、数秒おきにGPSデータなどが追加されるため、ディスクの停止と起動を繰り返すことはディスクにトルクを与えることになる。その結果、余計な電力を消費することになる。したがって、頻繁に到着するデータを記憶できるようにディスクは、小型ディスクドライブの電源が投入されている間は常に回転しており、停止や起動が起こらない構成とすることが望ましい。これにより、消費電力を低く抑えることが可能となる。さらに、ディスク停止の状態から起動するまで待つ必要がなく、頻繁に到着するデータを記憶できる。   In general, a small disk drive stops the rotation of the disk when the disk is not accessed. However, when a small disk drive is mounted on a mobile device, GPS data and the like are added every few seconds, so repeated stopping and starting of the disk gives torque to the disk. As a result, extra power is consumed. Therefore, it is desirable that the disk is always rotated while the small disk drive is turned on so that frequently arriving data can be stored, so that it does not stop or start. Thereby, power consumption can be kept low. Further, it is not necessary to wait until the disk is started from the disk stopped state, and frequently arriving data can be stored.

本発明に係るデータ入出力装置の一実施形態における機能ブロック図である。It is a functional block diagram in one Embodiment of the data input / output device which concerns on this invention. 本発明に係るデータ入出力装置の一実施形態である複製方式のデータ格納とインデクスの対応を示す模式図である。It is a schematic diagram which shows the correspondence of the data storage of a replication system which is one Embodiment of the data input / output device which concerns on this invention, and an index. 本発明に係るデータ入出力装置の一実施形態である複製方式の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the replication system which is one Embodiment of the data input / output device which concerns on this invention. 本発明に係るデータ入出力装置の一実施形態である複製方式の検索処理の動作説明図である。(a)はインデクス最適化前であり、(b)はインデクス最適化後である。It is operation | movement explanatory drawing of the search process of the replication system which is one Embodiment of the data input / output device which concerns on this invention. (A) is before index optimization, and (b) is after index optimization. 本発明に係るデータ入出力装置の一実施形態である差分方式のデータ格納とインデクスの対応を示す模式図である。It is a schematic diagram which shows a response | compatibility with the data storage of a difference system which is one Embodiment of the data input / output device concerning this invention, and an index. 本発明に係るデータ入出力装置の一実施形態である差分方式の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the difference system which is one Embodiment of the data input / output device which concerns on this invention. 本発明に係るデータ入出力装置の一実施形態におけるグループコミットを説明するための模式図である。It is a schematic diagram for demonstrating the group commit in one Embodiment of the data input / output device which concerns on this invention. 本発明に係るデータ入出力装置の一実施例において、10MB単位のデータのディスク読み書き時間を表す図である。FIG. 4 is a diagram showing a disk read / write time of data in units of 10 MB in an embodiment of the data input / output device according to the present invention. (a)はランダムアクセス、(b)はシーケンシャルアクセスにおけるデータの格納状態を示す模式図である。(A) is a schematic diagram showing a data storage state in random access, and (b) is a sequential access. 本発明に係るデータ入出力装置の一実施例において、1レコード処理による、ランダムアクセスおよびシーケンシャルアクセスでのレコード数とアクセス時間との関係を示すグラフである。6 is a graph showing the relationship between the number of records in random access and sequential access and access time in one embodiment of the data input / output device according to the present invention. 本発明に係るデータ入出力装置の一実施例において、1レコード処理によるシーケンシャルアクセスでのレコード数とアクセス時間との関係を示すグラフである。6 is a graph showing the relationship between the number of records and the access time in sequential access by one-record processing in an embodiment of the data input / output device according to the present invention. 本発明に係るデータ入出力装置の一実施例において、バッファがある場合とない場合におけるシーケンシャルアクセスでのレコード数とアクセス時間との関係を示すグラフである。6 is a graph showing the relationship between the number of records in sequential access and the access time when there is a buffer and when there is no buffer in an embodiment of the data input / output device according to the present invention. 本発明に係るデータ入出力装置の一実施例において、バッファ容量を変化させた場合のシーケンシャルアクセスでのレコード数とアクセス時間との関係を示すグラフである。6 is a graph showing the relationship between the number of records in sequential access and the access time when the buffer capacity is changed in one embodiment of the data input / output device according to the present invention. 本発明に係るデータ入出力装置の一実施例において、アクセス方法を変化させた場合のレコード数とアクセス時間との関係を示すグラフである。5 is a graph showing the relationship between the number of records and the access time when the access method is changed in one embodiment of the data input / output device according to the present invention. 本発明に係るデータ入出力装置と接続された携帯電話機の操作面側を示す外観構成図である。It is an external appearance block diagram which shows the operation surface side of the mobile telephone connected with the data input / output device which concerns on this invention.

符号の説明Explanation of symbols

1 モバイル機器
2 小型ディスクドライブ
3 インタフェース
4 制御部
5 メモリ
6 ディスク部
41 インデクス最適化部
42 ヘッド位置監視部
43 レコードID発行部
44 記憶データ生成部
45 ヘッド制御部
46 終端アドレス記憶部
47 データベース処理部
48 インデクス再記憶部
49 インデクス消去部
81 インデクス付与部
82 差分データ算出部
51 インデクス記憶部
52 バッファ部
61 データ書き込み部
62 データ読み取り部
63 データ記憶部
DESCRIPTION OF SYMBOLS 1 Mobile device 2 Small disk drive 3 Interface 4 Control part 5 Memory 6 Disk part 41 Index optimization part 42 Head position monitoring part 43 Record ID issuing part 44 Storage data generation part 45 Head control part 46 Termination address storage part 47 Database processing part 48 index re-storing unit 49 index erasing unit 81 index assigning unit 82 differential data calculating unit 51 index storing unit 52 buffer unit 61 data writing unit 62 data reading unit 63 data storing unit

Claims (18)

磁気ディスクからなり、データを記憶するためのデータ記憶手段と、
前記データ記憶手段からデータの読み取りを行うヘッドの位置を監視するヘッド位置監視手段と、
前記データ記憶手段に記憶されたデータのアドレスを指定するインデクスを記憶するインデクス記憶手段を備える半導体記憶装置と、
前記データ記憶手段から読み取り対象とされるデータである対象データを読み取る際、前記ヘッド位置監視手段から得られる前記ヘッドの位置に基づき、前記インデクス記憶手段に記憶された前記対象データのアドレスを指定するインデクスを最適化し、前記インデクス記憶手段に記憶させるインデクス最適化手段と、
前記インデクス記憶手段に記憶されたインデクスに基づいて前記ヘッドを制御し、前記対象データの読み取りを行うデータ読み取り手段と、
を備えることを特徴とするデータ入出力装置。
A data storage means for storing data, comprising a magnetic disk;
Head position monitoring means for monitoring the position of the head for reading data from the data storage means;
A semiconductor memory device comprising index storage means for storing an index for designating an address of data stored in the data storage means;
When reading target data that is data to be read from the data storage means, the address of the target data stored in the index storage means is designated based on the position of the head obtained from the head position monitoring means Index optimization means for optimizing the index and storing the index in the index storage means;
Data reading means for controlling the head based on the index stored in the index storage means and reading the target data;
A data input / output device comprising:
前記磁気ディスクの直径が1インチ以下の小型ディスクドライブである請求項1記載のデータ入出力装置。   2. The data input / output device according to claim 1, wherein the magnetic disk is a small disk drive having a diameter of 1 inch or less. 前記インデクス最適化手段は、前記ヘッド位置監視手段から得られるヘッドの位置に基づき、データ読み取り時に前記ヘッドのアクセス待ち時間が最も短くなるようにインデクスを最適化することを特徴とする請求項1または2に記載のデータ入出力装置。   The index optimization means optimizes the index so that the access waiting time of the head is minimized when reading data, based on the position of the head obtained from the head position monitoring means. 2. The data input / output device according to 2. 前記データ記憶手段にデータの書き込みを行うデータ書き込み手段をさらに備えることを特徴とする請求項1乃至3のいずれかに記載のデータ入出力装置。   4. The data input / output device according to claim 1, further comprising data writing means for writing data to the data storage means. 前記データ書き込み手段は、すべてのログをデータ記憶手段に書き込むことを特徴とする請求項4記載のデータ入出力装置。   5. The data input / output device according to claim 4, wherein the data writing means writes all logs into the data storage means. 前記データ書き込み手段は、前記データ記憶手段に記憶されているデータの終端アドレスの次のアドレスにデータを書き込むことを特徴とする請求項4または5に記載のデータ入出力装置。   6. The data input / output device according to claim 4, wherein the data writing unit writes data to an address next to a terminal address of data stored in the data storage unit. 前記データ書き込み手段により、インデクスを前記データ記憶手段に定期的に記憶させるインデクス再記憶手段をさらに備えることを特徴とする請求項4乃至6のいずれかに記載のデータ入出力装置。   7. The data input / output device according to claim 4, further comprising an index re-storing unit that periodically stores an index in the data storage unit by the data writing unit. コマンドと共に受け取った入力データを特定するためのレコードIDを、前記コマンドに基づいて発行するレコードID制御手段をさらに備えることを特徴とする請求項4乃至7のいずれかに記載のデータ入出力装置。   8. The data input / output device according to claim 4, further comprising record ID control means for issuing a record ID for specifying the input data received together with the command based on the command. 入力データおよび第1のコマンドに基づいて、前記入力データを特定する新たなレコードIDを前記レコードID制御手段から受け取り、前記レコードIDおよび前記入力データを前記データ書き込み手段により前記データ記憶手段に連続データとして書き込む第1の処理手段と、
前記連続データのアドレスを指定するインデクスを作成し、該インデクスを前記インデクス記憶手段に記憶させるインデクス付与手段と、
をさらに備えることを特徴とする請求項8記載のデータ入出力装置。
Based on the input data and the first command, a new record ID for specifying the input data is received from the record ID control means, and the record ID and the input data are continuously stored in the data storage means by the data writing means. First processing means for writing as:
Creating an index for specifying the address of the continuous data, and storing the index in the index storage means;
The data input / output device according to claim 8, further comprising:
入力データおよび第2のコマンドに基づいて、前記入力データを特定するレコードIDを前記レコードID制御手段から受け取り、前記レコードIDおよび前記入力データを前記データ書き込み手段により前記データ記憶手段に連続データとして書き込む第2の処理手段と、
インデクス記憶手段において、前記入力データを特定するレコードIDと同じレコードIDを有するデータのインデクスを消去し、前記連続データのアドレスを指定するインデクスを作成し、該インデクスを前記インデクス記憶手段に記憶させるインデクス変更手段と、
をさらに備えることを特徴とする請求項8または9に記載のデータ入出力装置。
Based on the input data and the second command, a record ID for specifying the input data is received from the record ID control means, and the record ID and the input data are written as continuous data in the data storage means by the data writing means. A second processing means;
In the index storage means, an index of data having the same record ID as the record ID for specifying the input data is deleted, an index for designating an address of the continuous data is created, and the index is stored in the index storage means Change means,
The data input / output device according to claim 8, further comprising:
入力データおよび第3のコマンドに基づいて、前記入力データを特定するレコードIDを前記レコードID制御手段から受け取り、前記データ記憶手段に記憶され、前記入力データと同じレコードIDを有するデータと前記入力データとを比較し、前記入力データにおいて更新されているデータ部分を求め、前記レコードIDおよび前記更新されているデータ部分を前記データ書き込み手段により前記データ記憶手段に連続データとして書き込む第3の処理手段と、
インデクス記憶手段において、前記入力データを特定するレコードIDと同じレコードIDを有するデータのインデクスに、前記連続データのアドレスをリストとして追加し、前記インデクス記憶手段に記憶させるインデクス追加手段と、
をさらに備えることを特徴とする請求項8または9に記載のデータ入出力装置。
Based on the input data and the third command, a record ID for specifying the input data is received from the record ID control means, stored in the data storage means, and data having the same record ID as the input data and the input data A third processing means for obtaining an updated data portion in the input data, and writing the record ID and the updated data portion as continuous data in the data storage means by the data writing means; ,
In the index storage means, an index addition means for adding the address of the continuous data as a list to the index of the data having the same record ID as the record ID for specifying the input data, and storing the list in the index storage means;
The data input / output device according to claim 8, further comprising:
少なくとも削除対象のデータを指定する情報を含む削除情報および第4のコマンドに基づいて、前記削除対象のデータを特定するレコードIDを前記レコードID制御手段から受け取り、前記レコードIDおよび削除対象のデータであることを示すマークを前記データ書き込み手段により前記データ記憶手段に連続データとして書き込む第4の処理手段と、
インデクス記憶手段において、前記入力データを特定するレコードIDと同じレコードIDを有するデータのインデクスを消去するインデクス消去手段と、
をさらに備えることを特徴とする請求項8乃至11のいずれかに記載のデータ入出力装置。
Based on deletion information including at least information specifying data to be deleted and a fourth command, a record ID for specifying the data to be deleted is received from the record ID control means, and the record ID and the data to be deleted are Fourth processing means for writing a mark indicating the presence as continuous data to the data storage means by the data writing means;
In the index storage means, index erasure means for erasing the index of data having the same record ID as the record ID for specifying the input data;
The data input / output device according to claim 8, further comprising:
少なくとも検索対象のデータを指定する情報を含む検索情報および第5のコマンドに基づいて、前記検索対象のデータを特定するレコードIDを前記レコードID制御手段から受け取り、前記レコードIDを有するデータのインデクスを前記インデクス記憶手段において特定し、前記インデクス記憶手段に記憶されたインデクスに基づいて、前記データ読み取り手段により前記データ記憶手段から前記検索対象のデータを読み取る第5の処理手段をさらに備えることを特徴とする請求項8乃至12のいずれかに記載のデータ入出力装置。   Based on search information including at least information specifying data to be searched and a fifth command, a record ID for specifying the data to be searched is received from the record ID control means, and an index of data having the record ID is obtained. The apparatus further comprises a fifth processing means for reading the data to be searched from the data storage means by the data reading means based on the index specified in the index storage means and stored in the index storage means. The data input / output device according to claim 8. 前記半導体記憶装置はバッファ手段をさらに備え、
前記データ入出力装置は、入力データを前記バッファ手段に記憶するバッファ書き込み手段と、
前記バッファ手段の記憶領域を監視するバッファ監視手段と、
前記バッファ監視手段により、前記バッファ手段の記憶領域が満たされたことが検出されたとき、前記バッファ手段に記憶されているデータを前記データ書き込み手段により前記データ記憶手段に書き込ませる第1のフラッシュ制御手段とをさらに備えることを特徴とする請求項4乃至13のいずれかに記載のデータ入出力装置。
The semiconductor memory device further comprises buffer means,
The data input / output device includes buffer writing means for storing input data in the buffer means;
Buffer monitoring means for monitoring a storage area of the buffer means;
When the buffer monitoring unit detects that the storage area of the buffer unit is full, the first flash control causes the data writing unit to write the data stored in the buffer unit to the data storage unit The data input / output device according to claim 4, further comprising: means.
前記半導体記憶装置はバッファ手段をさらに備え、
前記データ入出力装置は、入力データを前記バッファ手段に記憶するバッファ書き込み手段と、
前記バッファ手段に記憶されているデータの属性を監視するバッファ属性監視手段と、
前記バッファ属性監視手段により、前記入力データにおいて所定の属性が検出されると直ちに、前記バッファ手段に記憶されているデータを前記データ書き込み手段により前記データ記憶手段に書き込ませる第2のフラッシュ制御手段とをさらに備えることを特徴とする請求項4乃至13のいずれかに記載のデータ入出力装置。
The semiconductor memory device further comprises buffer means,
The data input / output device includes buffer writing means for storing input data in the buffer means;
Buffer attribute monitoring means for monitoring attributes of data stored in the buffer means;
Second flash control means for causing the data writing means to write the data stored in the buffer means to the data storage means as soon as a predetermined attribute is detected in the input data by the buffer attribute monitoring means; The data input / output device according to claim 4, further comprising:
前記データ記憶手段である前記磁気ディスクは、前記データ入出力装置に電源が投入されている間は常に回転していることを特徴とする請求項1乃至15のいずれかに記載のデータ入出力装置。   16. The data input / output device according to claim 1, wherein the magnetic disk as the data storage means is always rotated while the data input / output device is powered on. . 前記データ入出力装置は、モバイル機器に着脱自在であることを特徴とする請求項1乃至16のいずれかに記載のデータ入出力装置。   The data input / output device according to claim 1, wherein the data input / output device is detachable from a mobile device. 磁気ディスクからデータの読み取りを行うヘッドの位置を監視するヘッド位置監視工程と、
前記磁気ディスクに記憶されたデータのアドレスを指定するインデクスを半導体記憶装置に記憶させるインデクス記憶工程と、
前記磁気ディスクから読み取り対象とされるデータである対象データを読み取る際、前記ヘッド位置監視工程から得られる前記ヘッドの位置に基づき、前記インデクス記憶工程により前記半導体記憶装置に記憶された前記対象データのアドレスを指定するインデクスを最適化し、前記半導体記憶装置に記憶させるインデクス最適化工程と、
前記半導体記憶装置に記憶されたインデクスに基づいて前記ヘッドを制御し、前記対象データの読み取りを行うデータ読み取り工程と、
を備えることを特徴とするデータ入出力方法。
A head position monitoring step for monitoring the position of the head for reading data from the magnetic disk;
An index storage step of storing in the semiconductor storage device an index that specifies an address of data stored in the magnetic disk;
When reading target data, which is data to be read from the magnetic disk, based on the position of the head obtained from the head position monitoring step, the target data stored in the semiconductor storage device by the index storage step An index optimization step of optimizing an index for designating an address and storing the index in the semiconductor memory device;
A data reading step of controlling the head based on an index stored in the semiconductor memory device and reading the target data;
A data input / output method comprising:
JP2004242733A 2004-08-23 2004-08-23 Method and device for inputting/outputting data Pending JP2006059502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004242733A JP2006059502A (en) 2004-08-23 2004-08-23 Method and device for inputting/outputting data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004242733A JP2006059502A (en) 2004-08-23 2004-08-23 Method and device for inputting/outputting data

Publications (1)

Publication Number Publication Date
JP2006059502A true JP2006059502A (en) 2006-03-02

Family

ID=36106832

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004242733A Pending JP2006059502A (en) 2004-08-23 2004-08-23 Method and device for inputting/outputting data

Country Status (1)

Country Link
JP (1) JP2006059502A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007280553A (en) * 2006-04-11 2007-10-25 Hitachi Ltd Contents reproducing device with contents directory template
JP2010134788A (en) * 2008-12-05 2010-06-17 Hitachi Ltd Cluster storage device, and method of controlling same
JP2013200601A (en) * 2012-03-23 2013-10-03 Nec Corp Database system, commitment method in database system, and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007280553A (en) * 2006-04-11 2007-10-25 Hitachi Ltd Contents reproducing device with contents directory template
JP4556903B2 (en) * 2006-04-11 2010-10-06 株式会社日立製作所 Content playback device with content directory template
JP2010134788A (en) * 2008-12-05 2010-06-17 Hitachi Ltd Cluster storage device, and method of controlling same
JP2013200601A (en) * 2012-03-23 2013-10-03 Nec Corp Database system, commitment method in database system, and program

Similar Documents

Publication Publication Date Title
CN104412218B (en) Storage medium storing control program, method of controlling information processing device, information processing system, and information processing device
CN101258493B (en) System and method for performing a search operation within a sequential access data storage subsystem
CN100390796C (en) Method and system for delayed deletion of extended attributes
US7925851B2 (en) Storage device
CN101743546B (en) Hierarchical storage management for a file system providing snapshots
CN102349055B (en) To the access time optimization of the file stored on a memory
KR101522848B1 (en) Self-journaling and hierarchical consistency for non-volatile storage
CN107180092B (en) File system control method and device and terminal
US8135677B2 (en) File management system and method
CN100550168C (en) Signal conditioning package, information processing method
US10509739B1 (en) Optimized read IO for mix read/write scenario by chunking write IOs
JP5989875B2 (en) CONTROL PROGRAM, HOST DEVICE CONTROL METHOD, INFORMATION PROCESSING DEVICE, AND HOST DEVICE
CN106662981A (en) Storage device, program, and information processing method
RU2671049C2 (en) Flushing in file system
US20070061540A1 (en) Data storage system using segmentable virtual volumes
US10719245B1 (en) Transactional IO scheduler for storage systems with multiple storage devices
CN109598156A (en) Engine snapshot stream method is redirected when one kind is write
KR100858157B1 (en) System and merhod for map uapdate, storage medium recording that method program, user termianl
US10592123B1 (en) Policy driven IO scheduler to improve write IO performance in hybrid storage systems
US7801858B2 (en) File system and file information processing method
JP2001195197A (en) Digital data sub-system including directory to efficiently provide format information about stored record
JP2006059502A (en) Method and device for inputting/outputting data
US20100228787A1 (en) Online data volume deletion
US10599340B1 (en) Policy driven IO scheduler to improve read IO performance in hybrid storage systems
US20220404987A1 (en) Storage system, storage control device, and storage control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070801

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090316

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090324

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090714