JPS63148345A - Data managing system - Google Patents

Data managing system

Info

Publication number
JPS63148345A
JPS63148345A JP61294691A JP29469186A JPS63148345A JP S63148345 A JPS63148345 A JP S63148345A JP 61294691 A JP61294691 A JP 61294691A JP 29469186 A JP29469186 A JP 29469186A JP S63148345 A JPS63148345 A JP S63148345A
Authority
JP
Japan
Prior art keywords
time
data
storage means
record
data storage
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
JP61294691A
Other languages
Japanese (ja)
Inventor
Kyoji Kawagoe
恭二 川越
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP61294691A priority Critical patent/JPS63148345A/en
Publication of JPS63148345A publication Critical patent/JPS63148345A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To efficiently take out data with a small capacity by taking out time series data at a specified time with a time index data storage means and an index data storage means in case of data retrieval. CONSTITUTION:In case of the retrieval of data at a time 15, the record pointer p1 of a time index data storage means 22 is obtained and is used to take out the contents of a record, and the record pointer p3 of a time data storage means 23 is obtained. This record pointer is used to take out the contents of the record of a data storage means 23, and the address of the record having data to be obtained in a time series data storage means 24 is obtained. That is, the time 10 of time index data having a value just preceding the time of obtained time data is subtracted from a given time to detect the position of the time 15, namely, a fifth place from the left in the record indicated by the pointer p3, and '1' in this position means that data at the time 15 exists in the time series data storage means 24.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ファイルを有する計算機システムにおけるデ
ータ管理方式に関し、特に時系列データの管理方式に関
する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a data management method in a computer system having files, and particularly to a time-series data management method.

〔従来の技術〕[Conventional technology]

従来、ファイルを用いた時系列データの管理には順編成
ファイルが用いられる。このとき、ファイルには時間の
昇順にソートされて保管されるが、データ内部に時刻の
データを入れておき、指定時刻のデータを取り出すには
先頭レコードからこの時刻のデータをチェックしながら
当該データを探索することが行われてきた。しかし、従
来のデータ管理方式では、この順に必要なところまで読
むためにデータ検索に時間がかかるという問題があった
。これを解決するために時系列データに時刻に関する索
引をもつファイルを構築し、この索引ファイルを用いて
指定時刻のデータを検索するのであるが、この索引ファ
イルに(時刻とレコードポインタ)の組を木構造で保管
するBトリー法が用いられていた。
Conventionally, sequential files are used to manage time-series data using files. At this time, the file is sorted and stored in ascending order of time, but time data is stored inside the data, and in order to retrieve data at a specified time, check the data at this time from the first record. has been explored. However, with conventional data management methods, there was a problem in that it took time to search for data because it required reading up to the necessary parts in this order. To solve this problem, we construct a file with a time index for time series data, and use this index file to search for data at a specified time. The B-tree method was used to store it in a wooden structure.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上記の従来のデータ管理方式では、レコードごとに(時
刻とポインタ)をもつため索引ファイルの容量が増加す
る問題点があった。また、索引ファイル容量の増加はア
クセスに必要なディスクアクセスの増加を引き起こすと
いう問題点があった。
The conventional data management method described above has a problem in that the capacity of the index file increases because each record has a time and a pointer. Furthermore, there is a problem in that an increase in the index file capacity causes an increase in the number of disk accesses required for access.

本発明の目的は、このような問題点を解決したデータ管
理方式を提供することにある。
An object of the present invention is to provide a data management system that solves these problems.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、時間に関係したデータである時系列データを
保持するファイルをアクセスする情報処理装置のデータ
管理方式において、 データ蓄積の際に、時系列データを時刻の昇順にあらか
じめ定められた個数ずつレコードに格納した時系列デー
タ格納手段と、 あらかじめ設定された最小時刻で刻まれた時間軸上で前
記格納時系列データの時刻が対応するか否かを示すフラ
グを持ちあるいはこれを適当な圧縮アルゴリズムで圧縮
されたデータを持ち時刻の昇順で保管された時刻データ
格納手段と、前記時刻データ格納手段の各レコードへの
索引データを格納した時刻索引データ格納手段と、前記
時刻索引データ格納手段に格納された時刻索引レコード
あるいは後記索引レコードへの索引データを格納した索
引レコードからなる索引データ格納手段とを備え、 データを検索する際、指定時刻の時系列データを前記時
刻索引データ格納手段と索引データ格納手段を用いて行
うことを特徴としている。
The present invention provides a data management method for an information processing device that accesses a file holding time-series data, which is data related to time. It has a time series data storage means stored in a record and a flag indicating whether or not the time of the stored time series data corresponds on a time axis carved at a preset minimum time, or it can be processed using an appropriate compression algorithm. time data storage means having compressed data stored in ascending order of time; time index data storage means storing index data for each record of the time data storage means; and storage in the time index data storage means. and an index data storage means consisting of an index record storing index data for a time index record or an index record to be described later, and when searching for data, the time series data at a specified time is transferred to the time index data storage means and the index data. It is characterized in that it is carried out using a storage means.

〔作用〕[Effect]

本発明によれば、レコードごとに(時刻とレコードポイ
ンタ)を格納することなく、指定時刻のデータを検索す
る際に索引データ格納手段より求めるべきデータに対応
した時刻索引データ格納手段のレコードを求め、そのの
ち当該レコード内の時刻データ格納手段へのポインタを
見つけ、時刻データ格納手段内の求めるべきデータに対
応した位置を調べ、この位置から時系列データ格納手段
の求めるべきデータを含むレコードが決定でき、更にこ
のレコードの読み込みによって求めるべき指定時刻のデ
ータを取り出すことが可能である。
According to the present invention, when searching for data at a specified time, a record in the time index data storage means corresponding to the data to be obtained from the index data storage means is obtained without storing (time and record pointer) for each record. Then, find the pointer to the time data storage means in the record, check the position corresponding to the data to be sought in the time data storage means, and determine the record containing the data to be found in the time series data storage means from this position. Furthermore, by reading this record, it is possible to extract the data at the specified time that should be obtained.

更に、データを取り出すために必要なディスクアクセス
を減少することが可能となる。
Furthermore, it is possible to reduce the disk access required to retrieve data.

〔実施例〕〔Example〕

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

第1図は、本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing one embodiment of the present invention.

すなわち、時系列データ格納手段24、時刻データ格納
手段23、時刻索引データ格納手段22、索引データ格
納手段21の各々についてアクセス手段(時系列データ
アクセス手段14、時刻データアクセス手段13、時刻
索引データアクセス手段12、索引データアクセス手段
11)を設け、与えられた時刻に対して索引データ、時
刻索引データ、時刻データそして時系列データを探索し
ていくものである。
That is, for each of the time series data storage means 24, time data storage means 23, time index data storage means 22, and index data storage means 21, the access means (time series data access means 14, time data access means 13, time index data access means 12 and index data access means 11) are provided to search index data, time index data, time data, and time series data for a given time.

第1図のブロック図を説明するために次表に示す時系列
データに関して、第2図に示す時系列データ格納手段2
4、時刻データ格納手段23、時刻索引データ格納手段
22、索引データ格納手段21の内容を例とする。
In order to explain the block diagram of FIG. 1, regarding the time series data shown in the following table, the time series data storage means 2 shown in FIG.
4. The contents of the time data storage means 23, time index data storage means 22, and index data storage means 21 are taken as an example.

時系列データ ここで、時刻データ格納手段23のデータ圧縮がないと
きを考える。また、時刻索引データと索引データに関し
ては、索引を持てばよいため、説明の都合上、各々索引
されるレコードの最終時刻と索引されるレコード内の時
系列データ個数と索引されるレコードへのポインタを持
つものとする。
Time series data Here, let us consider the case where the time data storage means 23 does not compress the data. In addition, for time index data and index data, since it is sufficient to have an index, for convenience of explanation, the last time of the record to be indexed, the number of time series data in the record to be indexed, and the pointer to the record to be indexed. shall have.

今仮に、時刻15のデータを検索する際、索引データア
クセス手段11で時刻索引データ格納手段22のレコー
ドポインタを求める。これは、まず、索引データ内の時
刻と与えられた時刻15とを比較し、与えられた時刻を
越える最小の時刻に対応する索引データを見つけそのレ
コードポインタを得る。
Now, when searching for data at time 15, the index data access means 11 obtains the record pointer of the time index data storage means 22. This first compares the time in the index data with the given time 15, finds the index data corresponding to the minimum time exceeding the given time, and obtains its record pointer.

第シ図では、時刻20が前記条件を満足するため、その
レコードポインタp、が得られる。
In FIG. 2, since time 20 satisfies the above condition, the record pointer p is obtained.

そののち、時刻索引データアクセス手段12で、索引デ
ータアクセス手段11で求められた時刻索引データ格納
手段22へのレコードポインタを用いて時刻索引データ
格納手段のレコードの内容を取り出して、時刻データ格
納手段23のレコードポインタを求める。これは、まず
、時刻索引データ内の時刻と与えられた時刻15とを比
較し、与えられた時刻を越える最小の時刻に対応する時
刻索引データを見つけ、そのレコードポインタを得る。
After that, the time index data access means 12 retrieves the contents of the record in the time index data storage means using the record pointer to the time index data storage means 22 obtained by the index data access means 11, and Find the record pointer of 23. This first compares the time in the time index data with the given time 15, finds the time index data corresponding to the minimum time exceeding the given time, and obtains its record pointer.

第2図では、時刻20が前記条件を満足するため、その
レコードのポインタp、が得られる。
In FIG. 2, since time 20 satisfies the above condition, the pointer p of that record is obtained.

次に、時刻データアクセス手段13で、時刻索引データ
アクセス手段12で求められた時刻データ格納手段23
へのレコードポインタを用いて時刻データ格納手段のレ
コードの内容を取り出して、時系列データ格納手段24
の求めるべきデータを持つレコードの番地を求める。こ
れは、まず、求めた時刻データの時刻の直前の値をもつ
時刻索引データの時刻を取り出す。今の場合、これは時
刻10である。この値を与えられた時刻から引くことで
ポインタp3の示すレコード内の時刻15の位置が判る
Next, the time data access means 13 uses the time data storage means 23 obtained by the time index data access means 12.
The content of the record in the time data storage means is retrieved using the record pointer to the time series data storage means 24.
Find the address of the record that has the data you want. First, the time of the time index data having the value immediately before the time of the obtained time data is extracted. In the present case, this is time 10. By subtracting this value from the given time, the position of time 15 in the record indicated by pointer p3 can be found.

すなわち、圧縮がされていない第2図の時刻データ格納
手段23では、これは左から5番目の値に当たる。これ
が1であれば時系列データ格納手段24に与えられた時
刻のデータが存在し、0であれば存在しないことを意味
する。今、値が1であるため時系列データが存在する。
That is, in the uncompressed time data storage means 23 of FIG. 2, this corresponds to the fifth value from the left. If this is 1, it means that data at the time given to the time series data storage means 24 exists, and if it is 0, it means that data does not exist. Now, since the value is 1, time series data exists.

そのレコードは時刻索引データの時刻10のところのデ
ータ個数6と、時刻データのp3レコード内の時刻15
以下の時刻で値が1のフラグの個数2との和8を、時系
列データ格納手段24のルコードに格納する個数4で割
った値を越えるか等しい最小の整数値2が求める時系列
データを含むレコードである。
The record has the data number 6 at time 10 of the time index data and time 15 in the p3 record of time data.
The minimum integer value 2 that exceeds or is equal to the value obtained by dividing the sum of 2 and the number of flags whose value is 1 at the following times by 4, which is stored in the code of the time series data storage means 24, is the time series data to be found. This is the record that contains.

また、与えられた時刻が23の場合には、時刻データ格
納手段23のレコードを見つけるには時刻索引ファイル
の時刻30のレコードを索引する索引ファイルのレコー
ドの直前の時刻に相当するデータ個数9をさらに加える
必要がある。これは、時刻23が時刻索引ファイルレコ
ード内の先頭でかつその索引ファイルレコード内の先頭
にないためである。
Furthermore, when the given time is 23, in order to find the record in the time data storage means 23, the number of data 9 corresponding to the time immediately before the record in the index file that indexes the record at time 30 in the time index file is calculated. More needs to be added. This is because time 23 is at the beginning of the time index file record and not at the beginning of the index file record.

最後に、時系列データアクセス手段14で、時刻データ
アクセス手段13で求められた時系列データ格納手段2
4の求めるべきデータを持つレコードの番地より当該レ
コードを読み込み、出力結果としてその内容を通知する
Finally, the time series data access means 14 uses the time series data storage means 2 obtained by the time data access means 13.
The record is read from the address of the record having the data to be obtained in step 4, and the contents are notified as the output result.

次に、時刻データ格納手段23のデータが圧縮されてい
るときを、第3図に示すように時刻データが圧縮されて
いるときを例として説明する。第3図の時刻データ格納
手段23では先の実施例のフラグが1のものについて左
からの順番を整数値列としたものである。
Next, a case in which the data in the time data storage means 23 is compressed will be described by taking as an example a case in which the time data is compressed as shown in FIG. In the time data storage means 23 of FIG. 3, the order from the left is an integer value string for the flags of 1 in the previous embodiment.

先の実施例で説明した与えられた時刻が15のとき、索
引データアクセス手段11は先の実施例と同様の方法で
時刻索引データ格納手段22のレコードのポインタp、
を得る。その後、時刻索引データアクセス手段12で先
の実施例と同様の方法で時刻データ格納手段23のレコ
ードへのポインタp、を得る。ポインタp3の示すレコ
ード内の整数値列の要素と、時刻15からの時刻索引デ
ータ内の直前のデータの最終時刻8を引いた7とを比較
する。
When the given time described in the previous embodiment is 15, the index data access means 11 uses the same method as in the previous embodiment to access the record pointer p of the time index data storage means 22,
get. Thereafter, the time index data access means 12 obtains a pointer p to the record in the time data storage means 23 in the same manner as in the previous embodiment. The element of the integer value string in the record pointed to by pointer p3 is compared with 7, which is obtained by subtracting the final time 8 of the immediately preceding data in the time index data from time 15.

一致する値が存在するため、時刻15に対する時系列デ
ータが存在し、時刻索引データ内の直前のデータの持つ
レコード内データ個数5とポインタp3の示すレコード
内の整数値列での値7の左からの位置、すなわち3とを
足した値が時系列データ格納手段のルコードに格納する
個数4で割った値を越えるか等しい最小の整数値2が、
時系列データ格納手段での求めるべきデータを含むレコ
ードである。
Since there is a matching value, time series data for time 15 exists, and the number of data in the record 5 of the immediately preceding data in the time index data and the left of the value 7 in the integer value string in the record indicated by pointer p3 The minimum integer value 2 that is equal to or exceeds the value divided by the number 4 stored in the code of the time series data storage means is
This is a record containing data to be obtained in the time-series data storage means.

〔発明の効果〕〔Effect of the invention〕

このように、本発明によれば時系列データ格納手段の各
レコードのポインタを格納せずに、指定時刻のデータを
対数オーダの時間で取り出すことができる。したがって
、従来のデータ管理方式に比べ少ない容量で効率よくデ
ータを取り出すことが可能となった。
As described above, according to the present invention, data at a specified time can be retrieved in logarithmic order time without storing pointers for each record in the time-series data storage means. Therefore, it has become possible to efficiently retrieve data with less capacity than conventional data management methods.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例を示すブロック図、第2図は
時系列データの本発明で用いた格納方法を示す図、 第3図は第2図と同じ時系列データに対して時刻データ
格納手段のデータ圧縮を行ったときの格納方法を示す図
である。 11・・・・・索引データアクセス手段12・・・・・
時刻索引データアクセス手段13・・・・・時刻データ
アクセス手段14・・・・・時系列データアクセス手段
21・・・・・索引データ格納手段 22・・・・・時刻索引データ格納手段23・・・・・
時刻データ格納手段 24・・・・・時系列データ格納手段 時刻 第1図 第3図
Fig. 1 is a block diagram showing an embodiment of the present invention, Fig. 2 is a diagram showing a storage method used in the present invention for time series data, and Fig. 3 is a block diagram showing the storage method used in the present invention for time series data. FIG. 6 is a diagram showing a storage method when data is compressed in a data storage means. 11... Index data access means 12...
Time index data access means 13... Time data access means 14... Time series data access means 21... Index data storage means 22... Time index data storage means 23... ...
Time data storage means 24... Time series data storage means Time Fig. 1 Fig. 3

Claims (1)

【特許請求の範囲】[Claims] (1)時間に関係したデータである時系列データを保持
するファイルをアクセスする情報処理装置のデータ管理
方式において、 データ蓄積の際に、時系列データを時刻の昇順にあらか
じめ定められた個数ずつレコードに格納した時系列デー
タ格納手段と、 あらかじめ設定された最小時刻で刻まれた時間軸上で前
記格納時系列データの時刻が対応するか否かを示すフラ
グを持ちあるいはこれを適当な圧縮アルゴリズムで圧縮
されたデータを持ち時刻の昇順で保管された時刻データ
格納手段と、 前記時刻データ格納手段の各レコードへの索引データを
格納した時刻索引データ格納手段と、前記時刻索引デー
タ格納手段に格納された時刻索引レコードあるいは後記
索引レコードへの索引データを格納した索引レコードか
らなる索引データ格納手段とを備え、 データを検索する際、指定時刻の時系列データを前記時
刻索引データ格納手段と索引データ格納手段を用いて行
うことを特徴とするデータ管理方式。
(1) In a data management method for an information processing device that accesses a file that holds time-related data (time-related data), when data is stored, a predetermined number of records are recorded of time-series data in ascending order of time. It has a time series data storage means stored in the memory and a flag indicating whether or not the times of the stored time series data correspond to each other on a time axis carved at a preset minimum time, or this is stored using an appropriate compression algorithm. a time data storage means having compressed data and stored in ascending order of time; a time index data storage means storing index data for each record of the time data storage means; and index data storage means consisting of an index record storing index data for a time index record or an index record to be described later, and when searching for data, the time series data at a specified time is stored in the time index data storage means and the index data storage means. A data management method characterized by using means.
JP61294691A 1986-12-12 1986-12-12 Data managing system Pending JPS63148345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61294691A JPS63148345A (en) 1986-12-12 1986-12-12 Data managing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61294691A JPS63148345A (en) 1986-12-12 1986-12-12 Data managing system

Publications (1)

Publication Number Publication Date
JPS63148345A true JPS63148345A (en) 1988-06-21

Family

ID=17811056

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61294691A Pending JPS63148345A (en) 1986-12-12 1986-12-12 Data managing system

Country Status (1)

Country Link
JP (1) JPS63148345A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0452837A (en) * 1990-06-15 1992-02-20 Tokyo Electric Co Ltd Data processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0452837A (en) * 1990-06-15 1992-02-20 Tokyo Electric Co Ltd Data processor

Similar Documents

Publication Publication Date Title
US8402071B2 (en) Catalog that stores file system metadata in an optimized manner
US5809494A (en) Method for rapidly and efficiently hashing records of large databases
US20090089256A1 (en) Compressed storage of documents using inverted indexes
JPS63148345A (en) Data managing system
US20030051005A1 (en) Apparatus for encapsulating data within a self-defining file and method thereof
US6076089A (en) Computer system for retrieval of information
US20110029570A1 (en) Systems and methods for contextualized caching strategies
CN116975067B (en) Method, device, computer equipment and medium for storing modeless data
JPS61256442A (en) Method for increasing record retrieving speed
JPS61278932A (en) Method of processing data addition
CN117349401B (en) Metadata storage method, device, medium and equipment for unstructured data
CN115827653B (en) Pure column type updating method and device for HTAP and mass data
JPS61103242A (en) High-speed retrieval system
JPS62121532A (en) Data retrieving method
CN117891414A (en) Data storage method based on perfect hash and related equipment
JPH02116936A (en) Reorganizing system
JP2747009B2 (en) Record addition method for indexed sequential files
JP3145727B2 (en) Data retrieval device
CN114691681A (en) Data processing method and device, electronic equipment and readable storage medium
CN117472875A (en) Data reading method, computer device, and computer-readable storage medium
JPH0557624B2 (en)
CN114911806A (en) Method and related device for updating data
CN117290390A (en) Method for memory mapping on big data retrieval based on special index
JPS628819B2 (en)
JPH0228846A (en) Data storing system