JPS62248031A - Data managing method - Google Patents

Data managing method

Info

Publication number
JPS62248031A
JPS62248031A JP61092571A JP9257186A JPS62248031A JP S62248031 A JPS62248031 A JP S62248031A JP 61092571 A JP61092571 A JP 61092571A JP 9257186 A JP9257186 A JP 9257186A JP S62248031 A JPS62248031 A JP S62248031A
Authority
JP
Japan
Prior art keywords
data
register
list
value
link
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
JP61092571A
Other languages
Japanese (ja)
Inventor
Kenji Kira
賢治 吉良
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP61092571A priority Critical patent/JPS62248031A/en
Publication of JPS62248031A publication Critical patent/JPS62248031A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To shorten the retrieval time by executing a rearrangement of a data, when a retrieving request is outputted to a data belonging to the rear part of a list structure of a data group, and receiving the retrieving request of the next time and thereafter, in a state that the data is in front of the list. CONSTITUTION:A retrieving instruction of a data, and a value used for identifying the data are supplied to a retrieving instruction register 1 and a retrieving data register 2, respectively, and a value of a link operating counter 17 is initialized to zero. Subsequently, a store address of the data which is used as an object of comparison is obtained in an address register 12, and this data is stored in an identifying part register 13, a link part register 14, and a data part register 15, respectively. Next, a value of the counter 17 is increased by '1', values of the register 2 and the register 13 are compared, and whether the data is that which is to be derived or not is decided. If it is not the data to be derived, a pointer is renewed, a store address of the data concerned is stored in a history register 11, a value of the register 12 is updated to a value of the register 14, and the processing is returned to an input of the data.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、データ検索を効率よく行うためのデータ管
理方法に関するものである。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a data management method for efficiently performing data searches.

[従来の技術] リスト構造を持ったデータ群に対し、リストの先頭から
の順検索を用いてデータを検索する場合がある。例えば
、ディスクキャシュ・システムにおいて、ディスクとデ
ィスクキャシュ書システムとの間のデータの転送単位で
、ディスクキャシュ・システムにおけるデータ管理のた
めの最小単位であるデータブロックのデータメモリにお
ける格納アドレスを、リスト構造を持ったデータ群とし
て管理する場合がその例である。
[Prior Art] Data may be searched for a data group having a list structure using sequential search from the head of the list. For example, in a disk cache system, the storage address in the data memory of a data block, which is the unit of data transfer between the disk and the disk cache writing system and is the minimum unit for data management in the disk cache system, is stored in a list structure. An example of this is when managing data as a group of data.

第12図に、リスト構造を持つデータ群を管理する例と
してあげたディスクキャシュを説明するだめの説明図で
ある。
FIG. 12 is an explanatory diagram for explaining a disk cache as an example of managing a data group having a list structure.

すなわち、データプロ、りのサイズが 4096(=163)ワード、データメモリの容量が2
0480(=5X 163)ワードのディスクキャシュ
Oシステムにおける例である。
In other words, the size of the data processor is 4096 (=163) words, and the capacity of the data memory is 2.
This is an example in a disk cache O system of 0480 (=5×163) words.

同図(A)は、ディスク及びディスクキャシュ状態を示
す説明図であり、例えば、ディスクキャシュ (+00
)におけるデータメモリ (101)の0000(h)
番地から0OFF(h)番地まではディスク(+02)
上のaddress Aから始まるデータブロックAが
格納されている。なお、(h)は16進表示を示す。
(A) is an explanatory diagram showing the disk and disk cache states. For example, the disk cache (+00
) data memory (101) 0000(h)
Disk (+02) from address to address 0OFF(h)
Data block A starting from address A above is stored. Note that (h) indicates hexadecimal display.

同図CB)は、ディスクキャシュの状79を表わす説明
図であり、制御情報のデータ群を表わしている。
CB) is an explanatory diagram showing the state of the disk cache 79, and shows a data group of control information.

図において、制御情報は、ディスク上のデータブロック
の格納開始番地、制御情報のデータ群にリスト構造を持
たせるためのデータメモリ上における対応するデータブ
ロックの格納開始番地からなり、制御情報メモリ(10
3)と呼ぶ領域に格納されている。また、制御情報のデ
ータ群の作るリストの先頭のデータのアドレスは、リス
ト頭部レジスタ(104)と呼ばれるレジスタの中に保
持されている。
In the figure, the control information consists of the storage start address of the data block on the disk, the storage start address of the corresponding data block on the data memory for giving a list structure to the data group of the control information, and the control information memory (10
It is stored in an area called 3). Further, the address of the first data in the list created by the control information data group is held in a register called a list head register (104).

例えば、制御情報のデータ群の先頭の要、には、制御情
報メモリ(103)の1000(h)番地に格納されて
おり、ディスク (102)上のaddress A番
地から始まるデータブロックAが、ディスクキャシュ(
100)のデータメモリ(101)のoooo(h)番
地から格納されていることを示している。
For example, the beginning of the control information data group is stored at address 1000 (h) of the control information memory (103), and data block A starting from address A on the disk (102) is stored in the control information memory (103). Cash (
100) is stored from address oooo(h) of the data memory (101).

上記第12図のディスクキャシュの例で、ディスクトの
address C番地から始まるデータブロックCに
含まれるデータが必要な場合に、ディスクキャシュ・シ
ステムは、まず、リスト頭部レジスタの指すリストの先
頭の要素の制御情報を調べるが、それはデータブロック
Aに関する制御情報であるから、求める情報ではない。
In the disk cache example shown in FIG. 12 above, if the data contained in data block C starting from address C on the disk is required, the disk cache system first stores the data at the beginning of the list pointed to by the list head register. The control information of the element is checked, but since it is the control information regarding data block A, it is not the desired information.

そこで、当該制御情報のリンクをたどり1次に、100
6 (h)番地の制御情報を調べるが、それは、データ
ブロックBに関する制御情報であるから、求める制御情
報ではない。そこで、さらにリンクをたどり、1004
(h)番地の制御情報を調べ、address Cの値
から、その制御情報がデータブロックCに関するもので
あることを知り、求めるデータブロックが、ディスクキ
ャシュのデータメモリの0200(h)番地から格納さ
れていることを知る。上記の第12図の例のように、リ
スト構造を持ったデータ群に対し、リストの先頭からの
順検索を用いてデータを検索する場合には、求めるデー
タが、リストの先頭の要素を指すボ・fンタ、リストヘ
ッドから数えて、少数回のリンク操作により到達できる
。すなわち、リストヘッドに近いほど、速くデータを得
ることができる。従って、データ検索の効率を向上させ
るためには、検索されるへきデータが、できる限りリス
トヘッドに近いことが必要である。
Therefore, following the link of the control information, 100
6 (h) The control information at the address is checked, but since it is the control information regarding data block B, it is not the desired control information. So, I followed the link further and 1004
(h) Check the control information for the address, find out from the value of address C that the control information is related to data block C, and confirm that the desired data block is stored from address 0200 (h) in the data memory of the disk cache. know that As in the example in Figure 12 above, when searching for data using sequential search from the top of the list for a data group with a list structure, the desired data points to the first element of the list. It can be reached by a small number of link operations, counting from the button and wrist head. That is, the closer the wrist head is, the faster data can be obtained. Therefore, in order to improve the efficiency of data retrieval, it is necessary that the data to be retrieved be as close as possible to the list head.

上記のような要求に応じ得るものとして、従来性われて
いたデータ管理方法を第8図以下を参照して説明する。
A conventional data management method that can meet the above requirements will be described with reference to FIG. 8 and subsequent figures.

第8図は、上記データ管理方法を実施するためのデータ
管理装置の一例を示す構成図である。
FIG. 8 is a configuration diagram showing an example of a data management device for implementing the above data management method.

図において、データ管理装置7i(80)は、検索命令
レジスタ(81)に、データ管理型fi(80)の管理
するデータに対する検索命令を、また、検索データレジ
スタ(82)に、検索すべきデータを識別するための値
を人力情報として格納し、出力レジスタ(82)に、求
めるデータを出力する装置である。
In the figure, a data management device 7i (80) stores a search command for data managed by a data management type fi (80) in a search command register (81) and data to be searched in a search data register (82). This is a device that stores values for identifying the data as human information and outputs the required data to the output register (82).

(20)はメモリであり、このメモリ(20)には、管
理すべきデータ群が格納されているが、そのデータ群に
含まれるデータは、同図に示すように、データが求める
ものであるかどうかを識別するための比較に用いられる
フィールドである識別部(21)、データ群にリスト構
造を持たせるためのフィールドであるリンク部(22)
、出力すべきデータを格納したフィールドであるデータ
部(23)という3つのフィールドから構成されている
(20) is a memory, and this memory (20) stores a data group to be managed, and the data included in the data group is what the data requires, as shown in the figure. an identification section (21), which is a field used for comparison to identify whether the
, and a data section (23) which is a field storing data to be output.

(10)は、リスト頭部レジスタであり、このリスト頭
部レジスタ(10)には、データ群の作るリストの先頭
の要素であるデータの格納番地を保持している。
Reference numeral (10) is a list head register, and this list head register (10) holds the storage address of the data that is the first element of the list created by the data group.

(11)は、ヒストリーレジスタであり、このヒストリ
・レジスタ(11)は、検索処理中に、リスト構造を再
構成する際に用いるデータを格納する。
(11) is a history register, and this history register (11) stores data used when reconstructing the list structure during search processing.

また、(12)は、アドレス・レジスタ、(13)は、
識別部レジスタ、(14)は、リンク部レジスタ、(1
5)は、データ部レジスタであり、これらのレジスタは
、検索処理中に、その時点で比較の対象になっているデ
ータのアドレス、識別部、リンク部、データ部を、それ
ぞれ格納するためのレジスタである。
Also, (12) is an address register, and (13) is
The identification part register (14) is the link part register (1
5) are data part registers, and these registers are used to store the address, identification part, link part, and data part of the data being compared at that time, respectively, during the search process. It is.

次に、上記データ管理装置の動作について第9図のフロ
ーチャートを参照して説明する。
Next, the operation of the data management device will be explained with reference to the flowchart shown in FIG.

第8図の検索命令レジスタ(81)にデータの検索命令
が与えられると、すなわち、検索データレジスタ(82
)にデータの識別に用いられる値が与えられて検索が始
まると、ステップ(30)におし1て、アドレスレジス
タ(12)に、比較の対象となるデータの格納番地を得
る。
When a data search command is given to the search command register (81) in FIG.
) is given a value used to identify the data and a search begins.In step (30), the storage address of the data to be compared is obtained in the address register (12).

次に、第3図に詳細に示したように、ステップ(31)
において、アドレスレジスタ(12)に指定された格納
番地のデータの識別部、リンク部、データ部を、それぞ
れ、識別部レジスタ(13)、リンク部レジスタ(14
)、データ部レジスタ(15)に格納する(ステップ3
11,312,313)。
Next, step (31) as shown in detail in FIG.
, the identification part, link part, and data part of the data at the storage address specified in the address register (12) are stored in the identification part register (13) and link part register (14), respectively.
) and stored in the data section register (15) (step 3
11,312,313).

次に、検索データレジスタ(82)の値と、識別部レジ
スタ(13)の値を比較し、現在比較の対象になってい
るデータが求めるものかどうかを判断する。そして、ち
該データが求めるデータでなければ、分岐(36)を経
由してステップ(32)の処理に移る。
Next, the value of the search data register (82) and the value of the identification unit register (13) are compared to determine whether or not the data currently being compared is what is being sought. If the data is not the desired data, the process proceeds to step (32) via branch (36).

ステップ(32)では、第4図に、その詳細を示したよ
うに、ステップ(321)で、ヒストリレジスタ(11
)に、当該データの格納番地を格納し、ステー。
In step (32), as shown in detail in FIG. 4, in step (321), the history register (11
), store the storage address of the data and stay.

ブ(322)で、アドレスレジスタ(12)の値を、リ
ンク部レジスタ(14)の値に更新し、ステップ(31
)の処理にαるが、データ群に含まれるデータのリンク
部には、リスト構造の次の要素であるデータの格納番地
が指定されているため、アドレスレジスタ(12)に、
比較すべきデータの格納番地、ヒストリレジスタ(11
)に、直前に比較したデータの格納番地を格納してステ
ップ(31)からの処理を繰り返すことになる。
Step (322) updates the value of the address register (12) to the value of the link register (14), and step (31) updates the value of the address register (12) to the value of the link register (14).
), but since the storage address of the data, which is the next element of the list structure, is specified in the link part of the data included in the data group, the address register (12) is
Storage address of data to be compared, history register (11
), the storage address of the data compared immediately before is stored, and the processing from step (31) is repeated.

一方、当該データが先頭のデータであれば、枝(35)
に進み、次に、アドレスレジスタ(12)の値とリスト
頭部レジスタ(10)の値を比較し、当該データが、リ
スト構造の先頭のデータであるかどうかを判断する。そ
して、当該データが先頭のデータであれば、分岐(38
)に進み、ステップ(33)の処理を行ってからステッ
プ(34)の処理へ進み、出力レジスタ(3)にデータ
部レジスタ(15)の値を出力して検索を終了する。た
だし、ステップ(33)においては、第5図に、その詳
細を示したように、ステップ(331)において、メモ
リ(20)内でヒストリレジスタ(11)の値をアドレ
スとするデータのリンク部(22)をリンク部レジスタ
(14)の値に変更し、ステップ(332)ではメモリ
(20)内で、アドレスレジスタ(12)の値をアドレ
スとするデータのリンク部(22)を、リスト頭部レジ
スタ(lO)の値に変更し、ステップ(333)では、
リスト頭部レジスタ(10)の値をアドレスレジスタ(
12)の値に変更する。
On the other hand, if the relevant data is the first data, branch (35)
Next, the value of the address register (12) and the value of the list head register (10) are compared to determine whether the data concerned is the first data of the list structure. If the data is the first data, branch (38
), performs the processing of step (33), and then proceeds to step (34), outputs the value of the data part register (15) to the output register (3), and ends the search. However, in step (33), as shown in detail in FIG. 5, in step (331), the link part ( 22) to the value of the link part register (14), and in step (332), the link part (22) of the data whose address is the value of the address register (12) is changed to the list head in the memory (20). The value of the register (lO) is changed, and in step (333),
The value of the list head register (10) is transferred to the address register (
12).

すなわち、メモリ(20)内のデータ群のリスト構造を
再構成し、求めるデータであった当該データの前後にあ
るデータ間を、当該データの後に続けることになる。
That is, the list structure of the data group in the memory (20) is reconfigured, and the data before and after the desired data are continued after the data.

[発明が解決しようとする問題点] 従来のデータ管理方法を実施するためのデータ管理装置
は、上記のように構成されているので、一定のパターン
に従った検索要求に対しては、データの無駄な並べかえ
が行われて効率が悪いという問題点があった。かかる問
題点をさらに詳細に図を参照して説明する。
[Problems to be Solved by the Invention] Since the data management device for implementing the conventional data management method is configured as described above, it is difficult to retrieve data in response to a search request according to a certain pattern. There was a problem in that efficiency was poor due to unnecessary sorting. This problem will be explained in more detail with reference to the drawings.

第10図は、データ群を持つリスト構造を簡明に表現す
るための定義図である。
FIG. 10 is a definition diagram for simply expressing a list structure having a data group.

同図(A)は、第8図のデータ管理装置(80)のリス
ト頭部レジスタ(lO)及びメモリ(20)を抜き出し
た詳細図であり、それぞれに格納するデータの値の−・
例を表わしている。
FIG. 8A is a detailed diagram of the list head register (lO) and memory (20) of the data management device (80) in FIG. 8, and shows the values of data stored in each.
represents an example.

同図CB)において、head(50)は、リスト頭部
レジスタ(10)を表わしている。また、矢印(60)
は、リスト頭部レジスタ(10)の値が、識別部が八で
あるようなデータの格納番地であることを示し、同図(
A)の場合には、リンク部レジスタ(10)の値が、1
000(h)であることを示してしている。
In FIG. CB), head (50) represents the list head register (10). Also, arrow (60)
indicates that the value of the list head register (10) is the storage address of data whose identification part is 8;
In case A), the value of the link register (10) is 1.
000 (h).

ノード(51)は、識別部がAであるデータを表わして
おり、第10図(A)では、メモリ(20)の1000
(h) i地のデータを表わしている。以下のノート(
52)、(53)、(54)、(55)も同様である。
The node (51) represents data whose identification part is A, and in FIG.
(h) Represents data for location i. Notes below (
The same applies to 52), (53), (54), and (55).

また、矢印(61)は、識別部がAであるデータのリン
ク部の値が、識別部がBであるデータの格納番地である
ことを示しており、第1O図(A)では、メモリ(20
)の1000(h)番地のデータのリンク部が1006
(h)であることを示している。矢印(62)、(63
)、(64)も同様である。
Further, the arrow (61) indicates that the value of the link part of the data whose identification part is A is the storage address of the data whose identification part is B. In FIG. 20
), the link part of the data at address 1000(h) is 1006
(h). Arrows (62), (63
) and (64) are also similar.

tail(56)は、データ群の作るリストの終端記号
を表わしており、第10図(A)では、メモリ(20)
の1008(h)番地のデータである。
Tail (56) represents the terminal symbol of the list created by the data group, and in FIG. 10 (A), memory (20)
This is the data at address 1008(h).

矢印(65)は、識別部がEのデータのリンク部が、終
端記号のデータの格納番地を表わしていることを示して
おり、第10図では、メモリ(20)の1002(h)
番地のデータにおけるリンク部の値がtooth)であ
ることを示している。
The arrow (65) indicates that the link part of the data whose identification part is E represents the storage address of the terminal symbol data, and in FIG.
This indicates that the value of the link part in the address data is (tooth).

以下、データ群の構成するリスト構造を表現するために
、第10図(B)に示した表記法を用いることとする。
Hereinafter, the notation shown in FIG. 10(B) will be used to express the list structure constituted by the data group.

また、識別部がAであるデータのことを特に断らない限
り、巾にAと呼ぶ。
Further, unless otherwise specified, data whose identification part is A will be referred to as A in width.

ここで、従来のデータ管理方法を用いたデータ管理装置
に、A、B、C,・・・・−9Zからなるデータ群が、
第11図(A)のようなリスト構造を持って格納されて
いるとする。この状態のデータ管理装着に、” Aの検
索、次にBの検索、次にCの検索”というパターンを繰
り返す検索要求、すなわち、A、B、C,A、B、C,
A、B、C・・・−という検索要求がかえられた場合の
処理の流れを以下に説明する。
Here, a data group consisting of A, B, C, ...-9Z is stored in a data management device using a conventional data management method.
Assume that the list structure is stored as shown in FIG. 11(A). When the data management device is installed in this state, there are search requests that repeat the pattern of "search for A, then search for B, then search for C", that is, A, B, C, A, B, C,
The flow of processing when search requests A, B, C, . . . are changed will be described below.

まず、八に対する検索要求が与えられた場合、最初に、
リストの先頭のノードが調べるが、第11図(イ)に示
すように、このノードのデータは、Cであり、Aではな
い、そこで、第9図の分岐(36)に従ってCのリンク
をたどり、次に、第2のノードを調べる。ところが、こ
のノードのデータはBであり、やはりAではない、そこ
で、Bのリンクをたどり第3のノードを調べる。このノ
ードのデータはAで、求めるデータであり、かつ、この
ノードは、リストの先頭ではない、そこで、第9図の分
岐(38)に従ってデータの並べかえを行い、Aをリス
トの先頭に移動させる。
First, given a search request for eight, first,
The first node in the list is examined, but as shown in Figure 11 (a), the data of this node is C, not A. Therefore, follow the link of C according to branch (36) in Figure 9. , then examine the second node. However, the data of this node is B, not A. Therefore, the link of B is followed to check the third node. The data of this node is A, which is the desired data, and this node is not at the beginning of the list. Therefore, the data is rearranged according to branch (38) in Figure 9, and A is moved to the beginning of the list. .

このように、Aの検索要求に対して、データ管理装置は
、第11図(イ)に斜線で示したように、Aをリストの
第3のノードに発見し、Aをリストの先頭へ並べかえる
。その結果、データ群のリスト構造は、第11図(つ)
のように再編成される。
In this way, in response to the search request for A, the data management device finds A in the third node of the list and arranges A at the top of the list, as indicated by diagonal lines in FIG. change. As a result, the list structure of the data group is as shown in Figure 11.
will be reorganized as follows.

次に、Bに対する検索要求が出されると、上記と同様、
第11図(つ)にように、Bをリストの第3ノードに発
見し、それをリストの先頭へ並べかえ、その結果は、第
11図(1)のようになる、さらに、Cに対する検索要
求に対しては、第11図(1)のように、Cを第3ノー
ドに発見し、それを先頭へ並べかえ、第11図(オ)の
ような結果を得る。
Next, when a search request is made for B, as above,
As shown in Figure 11 (1), B is found in the third node of the list, and it is rearranged to the top of the list, and the result is as shown in Figure 11 (1). Furthermore, a search request for C is made. , as shown in FIG. 11(1), C is found at the third node and rearranged to the top, resulting in the result shown in FIG. 11(e).

この第11図(オ)の状態で、再びAの検索要求が出さ
れるのであるが、第11図(オ)の状態は、第11図(
イ)の状態と同じであるから、2回口以降のA、B、C
の検索の処理は、1回目の処理の繰り返しである。
In the state shown in FIG. 11(E), a search request for A is issued again, but the state shown in FIG. 11(O) is different from that shown in FIG.
Since the situation is the same as in b), A, B, and C after the second mouth are
The search process is a repetition of the first process.

ここで問題となるのは、A、B、Cのいずれのデータを
発見するのも、リストの第3ノードになってしまうこと
である。
The problem here is that any data A, B, or C is discovered at the third node in the list.

第11図(ア)において、Bはリストの第2ノードに、
また、Cは先頭のノードに存在する。従って、データの
並べかえを行っていなければ、データ管理装置は、Bを
第2、Cを先頭のノードに発見できたはずである。
In Figure 11 (a), B is the second node of the list,
Further, C exists at the first node. Therefore, if the data had not been rearranged, the data management device would have found B as the second node and C as the first node.

従来のデータ管理方法では、データの並びかえを行った
ために、かえって検索効率の低下を招いており、ここで
生じる非効率は、”A、B、C”という検索のパターン
が繰り返されるたびに再現されるという問題点があった
In conventional data management methods, data is rearranged, which leads to a decrease in search efficiency, and this inefficiency is reproduced every time the search pattern of "A, B, C" is repeated. There was a problem that

この発明は、上記のような問題点を解消するためになさ
れたもので、データの並びかえを行ったために生じるデ
ータ検索の非効率化をなくしたデータ管理方法を得るこ
とを目的とする。
This invention was made to solve the above-mentioned problems, and aims to provide a data management method that eliminates the inefficiency of data retrieval caused by rearranging data.

[問題点を解決するための手段] この発明に係るデータ管理方法は、あるデータの検索を
行う場合、その検索処理中のリンク操作の回数であるデ
ータ群の作るリスト構造のリンクのたどった回数を数え
、データを発見した時、あらかじめ定めておいた境界値
と呼ばれるある一定の値と、検索処理中に要したリンク
操作の回数を比較し、リンク操作の回数が境界値以下の
場合には、データの並べかえを行わないようにしたもの
である。
[Means for Solving the Problems] In the data management method according to the present invention, when searching for certain data, the number of times links in a list structure created by a data group are followed, which is the number of link operations during the search process, is determined. When data is found, the number of link operations required during the search process is compared with a certain predetermined value called the boundary value, and if the number of link operations is less than the boundary value, , the data is not rearranged.

すなわち、リスト構造を持ったデータ群を、境界値によ
って、前方部と呼ぶリストの先頭部から境界値以下の回
数のリンク操作により到達できるデータの集合と、後方
部と呼ぶそれ以外のデータの集合とに分け、データ検索
に際して、前方部のデータについては、並べかえを行わ
ず、後方部のデータについては並べかえを行うようにし
たものである。
In other words, for a data group with a list structure, depending on the boundary value, a set of data that can be reached from the beginning of the list by a number of link operations equal to or less than the boundary value is called the front part, and a set of other data is called the rear part. When searching for data, the data in the front part is not rearranged, but the data in the rear part is rearranged.

[作用コ この発明のデータ管理方法においては、データ群のリス
ト構造の後方部に属するデータに検索要求が出された場
合には、データの並べかえを行って、次回以降の検索要
求を、データがリストの前方にある状態で受けるように
して検索時間の短縮を図る。
[Function] In the data management method of the present invention, when a search request is issued for data belonging to the rear part of the list structure of a data group, the data is rearranged so that subsequent search requests can be made The search time is shortened by receiving the file at the front of the list.

また、前方部に屈するデータに検索要求が出された場合
に、データの並べかえは行わず、検索効率の低下を招く
不必要な並べかえを省くようにする。
Further, when a search request is issued for data that bends toward the front, the data is not rearranged, and unnecessary rearrangement that causes a decrease in search efficiency is omitted.

[¥施例] 以下、この発明の一実施例を図について説明する。[¥Example] An embodiment of the present invention will be described below with reference to the drawings.

第1図は、この発明のデータ管理方法を実施するためデ
ータ管理装置の一例を示す構成図である。
FIG. 1 is a block diagram showing an example of a data management device for implementing the data management method of the present invention.

この実施例においては、データの検索処理中にリンク操
作の回数を数えるためのリンク操作カウンタ (17)
及びリスト構造を持つデータ群を前方部と後方部に分け
るための境界を示す値を格納する境界設定レジスタ(1
6)が、データ管理装置(100)内に設けられている
In this embodiment, a link operation counter (17) is used to count the number of link operations during data search processing.
and a boundary setting register (1
6) is provided in the data management device (100).

なお、第1図中の他の構成要素は、第8図の構成要素と
同一である。
Note that other components in FIG. 1 are the same as those in FIG. 8.

次に、動作について説明する。Next, the operation will be explained.

第2図は、第1図に、その構成を示したデータ管理装置
を用いて行う処理の詳細を示すフローチャートである。
FIG. 2 is a flowchart showing details of processing performed using the data management device whose configuration is shown in FIG.

そこで、検索命令レジスタ(1)にデータの検索命令が
、検索データレジスタ(2)にデータの識別に用いる値
が、それぞれ与えられて検索が始まると、ステップ(4
0)において、まず、リンク操作カウンタ (17)を
値を零に初期化する。
Therefore, when a data search command is given to the search command register (1) and a value used for data identification is given to the search data register (2) and the search begins, step (4)
0), first, the link operation counter (17) is initialized to zero.

次に、ステップ(30)において、アドレスレジスタ(
12)に、比較の対象となるデータの格納番地を得る。
Next, in step (30), the address register (
12) Obtain the storage address of the data to be compared.

次に、第3図に、その詳細を示したようにステラ7’(
31)において、アドレスレジスタ(12)に指定され
た格納番地のデータの識別部、リンク部、データ部を、
それぞれ識別部レジスタ (13) 、  リンク部レ
ジスタ(14)、データ部レジスタ (15)に格納す
る(ステップ311,312,313)。
Next, as shown in FIG. 3 in detail, Stella 7' (
31), the identification part, link part, and data part of the data at the storage address specified in the address register (12) are
They are stored in the identification section register (13), link section register (14), and data section register (15), respectively (steps 311, 312, and 313).

次に、ステップ(41)において、リンク操作カウンタ
(17)の値を1だけ増加させる。
Next, in step (41), the value of the link operation counter (17) is increased by one.

次に、検索データレジスタ(2)の値と、識別部レジス
タ(13)の値を比較し、現在比較の対象になっている
データが求めるものかどうかを判断する。そして、当該
データが求めるデータでなければ、分岐(46)に移行
し、ステップ(32)の処理を行う、ここでは、第4図
に、その詳細を示したように、ステラ7’ (32)に
おいては、ヒストリレジスタ(11)に、当該データの
格納番地を格納しくステップ321)、アドレスレジス
タ(12)の値をリンク部レジスタ(14)の値に更新
しくステップ322)、ステップ(31)の処理に戻る
が、データ群に含まれるデータのリンク部に、リスト構
造の次の要素であるデータの格納番地が指定されている
ため、アドレスレジスタ(12)に比較すべきデータの
格納番地、ヒストリレジスタ(11)に、直前に比較し
たデータの格納番地を格納してステップ(31)からの
処理を繰り返すことになる。
Next, the value of the search data register (2) and the value of the identification unit register (13) are compared to determine whether or not the data currently being compared is what is being sought. If the data is not the desired data, the process goes to branch (46) and the process of step (32) is performed.Here, as shown in detail in FIG. Step 321) to store the storage address of the data in the history register (11), step 322) to update the value of the address register (12) to the value of the link register (14), and step 322) of step (31). Returning to the process, since the storage address of the data, which is the next element of the list structure, is specified in the link part of the data included in the data group, the storage address of the data to be compared and the history are stored in the address register (12). The storage address of the data compared immediately before is stored in the register (11), and the processing from step (31) is repeated.

一方、当該データが求めるデータであれば、ステップ(
45)に移行し、リンク操作カウンタ(17)の値と、
境界設定レジスタ(16)の値を比較し、8該データが
リスト構造の前方部に属するか、後方部に属するかを判
断する。
On the other hand, if the data is the desired data, step (
45), the value of the link operation counter (17) and
The values of the boundary setting register (16) are compared and it is determined whether the data belongs to the front part or the rear part of the list structure.

そして、当該データが前方部のデータであれば、分岐(
47)に進み、ステップ(34)でデータ部レジスタ 
(15)の値を出力レジスタ(3)に出力して検索を終
了する。ただし、ステップ(33)においては、第5図
に、その詳細を示したように、メモリ(20)内のデー
タ群のリスト構造を再編成し、求めるデータであった当
該データの前後にあるデータ間を、リンク部で結び、当
該データを、リストの先頭の要素とし、それまで先頭で
あったデータを当該データの後に続ける(ステップ33
1,332,333)。
Then, if the data is in the front part, branch (
47), and in step (34) the data section register is
The value of (15) is output to the output register (3) and the search is completed. However, in step (33), as shown in detail in FIG. The data is connected with a link part, the data is made the first element of the list, and the data that was at the beginning is continued after the data (step 33).
1,332,333).

以上、要するに、この実施例が、従来のデータ管理方法
を用いるデータ管理装置と異る点は、データ検索の処理
中に、リンク操作の回数を数え、その回数と、一定の基
準の比較により、データの並べかえを行う場合と、デー
タの並べかえを行わない場合に処理を分けることである
In summary, this embodiment differs from a data management device using a conventional data management method by counting the number of link operations during data search processing and by comparing the number of link operations with a certain standard. The process is divided into cases where data is sorted and cases where data is not sorted.

次に、上記したこの発明のデータ管理方法におけるデー
タの検索効率が、この発明によって如何に向上するかを
、図を参照して説明する。
Next, how the data retrieval efficiency in the data management method of the present invention described above is improved by the present invention will be explained with reference to the drawings.

第6図は、この発明のデータ管理方法で管理するデータ
群の構造を簡明に表現するための略記法の定義図である
FIG. 6 is a definition diagram of an abbreviation for simply expressing the structure of a data group managed by the data management method of the present invention.

同図(A)は、第1図のデータ管理装置のリスト頭部レ
ジスタ(10)、境界設定レジスタ(16)、及びメモ
リ (20)を抜き出したものであり、それぞれの格納
するデータの一例を表わしている。
Figure 1 (A) shows the list head register (10), boundary setting register (16), and memory (20) extracted from the data management device in Figure 1, and shows an example of the data stored in each. It represents.

同図CB)において、縦線(70)は、データ群を前方
部と後方部に分ける境界を表わしている。
In FIG. CB), a vertical line (70) represents a boundary that divides the data group into a front part and a rear part.

第6図(A)の例では、境界設定レジスタ(16)の値
が0003(h)なので、リストの先頭から3つのデー
タA、B、Cが前方部のデータで、それ以外のり、Eが
後方部のデータであるから、境界(70)は、Cと0と
の間に設定しである。
In the example of FIG. 6(A), the value of the boundary setting register (16) is 0003(h), so the three data A, B, and C from the beginning of the list are the front data, and the remaining data and E are Since this is rear data, the boundary (70) is set between C and 0.

なお、第6図のその他の構成要素は、第10図に示した
構成要素と同一である。
Note that the other components in FIG. 6 are the same as those shown in FIG. 10.

さて、この発明のデータ管理方法を用いたデータ管理装
置に、A、B、C,・・・・・、Zからなるデータ群が
第7図(ア)のようなリスト構造を持って格納されてい
るとする。
Now, in a data management device using the data management method of the present invention, a data group consisting of A, B, C, ..., Z is stored in a list structure as shown in FIG. Suppose that

上記の状態のデータ管理装置に、”A、B、C”の繰り
返し、すなわち、A、B、C,A、B、C,A、B、C
,−−−・・という形の検索要求が与えられた場合を考
え、その処理を追うと以下のようになる。
In the data management device in the above state, repeating "A, B, C", that is, A, B, C, A, B, C, A, B, C
, ---..., and the processing is as follows.

まず、Aの検索要求が出されると、第7図(イ)に斜線
で示したように、リストの第3ノードにAを発見するが
、Aは、前方部のデータなので、従来の管理方法とは異
なり、データの並べかえは行わない。
First, when a search request for A is issued, A is found in the third node of the list, as indicated by diagonal lines in Figure 7 (a), but since A is data in the front part, the conventional management method is used. Unlike , data is not sorted.

次のBの検索要求に対し、データ管理装置(100)は
、第7図(つ)に示したように、BをリスI・の第27
−ドに発見する。この場合もデータの並べかえは行わな
い。
In response to the next search request for B, the data management device (100) retrieves B from the 27th search request of list I, as shown in FIG.
- Discover it quickly. In this case as well, data is not rearranged.

次のCへの検索要求に対しては、データ管理装置1Ii
(100)は、第7図(1)に示したように、今度はC
をリストの先頭のノードに発見する。
In response to the next search request to C, the data management device 1Ii
(100) is now C as shown in Figure 7 (1).
is found in the first node of the list.

この場合も前記と同様にデータの並べかえを行わない。In this case as well, the data is not rearranged as in the above case.

2回目移行の”A、B、C”の検索に際しては、上記の
処理が繰り返される。この例では、データの並べかえは
1度も行われていない、また、従来のデータの管理方法
の例では、不必要な並べかえ操作の影響で、第3ノード
に発見することになっていたB、Cを、それぞれ第27
−ド、先頭メートで発見することができる。
When searching for "A, B, C" for the second time, the above process is repeated. In this example, the data has never been sorted, and in the conventional data management method, B, which would have been discovered in the third node due to unnecessary sorting, C, respectively 27th
- Can be found at the front mate.

[発明の効果] 以上のように、この発明によれば、データ検索の際にデ
ータの無駄な並びかえ操作を省き、従来のデータ管理方
法では、データの並べかえを行っていたために生じてい
たデータ検索の非効率化を抑制することができ、また、
この発明のデータ管理方法は、上記の実施例のように一
定のパターンのデータ検索要求が繰り返される吟にきわ
めて有効であるなどの効果がある。
[Effects of the Invention] As described above, according to the present invention, wasteful data rearranging operations can be omitted when searching for data, and data that was generated due to data rearranging in conventional data management methods can be eliminated. It is possible to suppress search inefficiency, and
The data management method of the present invention has effects such as being extremely effective in cases where a certain pattern of data search requests is repeated as in the above embodiment.

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

第1図は、この発明のデータ管理方法を実施するための
データ管理装置の構成図、i2図は、L記憶1図のデー
タ管理装置におけるデータ検索の処理手順を示すフロー
チャート、第3図は、上記第2図及び第9図のフローチ
ャートにおけるデータ取り込み処理の詳細な内容を示す
フローチャート、第4図は、同じく上記第2図及び第9
図のフローチャートにおけるポインタはりかえ処理の詳
細な内容を示すフローチャート、第5図は、上記第2図
及び第9図のフローチャートにおけるデータの並べかえ
処理の詳細な内容を示すフローチャート、第6図(A)
、(B)は、この発明のデータ管理方法におけるデータ
構造の略記法を示す定義図、第7図(ア)ないしくオ)
は、この発明のデータ管理方法におけるデータ検索の手
順を示す説明図、第8図は、従来のデータ管理方法を実
施するだめのデータ管理装置の構成図、第9図は、上記
第8図のデータ管理装置におけるデータ検索の処理手順
を示すフローチャート、第10図(A)、(B)は、従
来のデータ管理方法におけげノri+\((才λ るデータ構造の略記法を示す定義図、第11−Tは、従
来のデータ管理方法におけるデータ検索の手順をを示す
説明図、第12図(A)、(B)は、リスト構造を持つ
データ群を管理する例としてあげたディスクキャシュの
説明図である。 (1)・・・検索命令レジスタ、 (2)・・・検索データレジスタ、 (3)・・・出力レジスタ、 (10)・・・ リスト頭部レジスタ、(11)・・・
 ヒストリレジスタ、 (12)・・・アドレスレジスタ、 (13)・・・識別部レジスタ。 (14)・・・ リンク部レジスタ、 (15)・・・データ部レジスタ、 (16)・・・境界設定レジスタ、 (17)・・・リンク操作部カウンタ、(20)・・・
 メモリ、 (100)・・・データ管理装置。 なお、各図中、同一符号は同一または相当部分を示す。
FIG. 1 is a block diagram of a data management device for carrying out the data management method of the present invention, FIG. A flowchart showing detailed contents of the data import process in the flowcharts of FIGS. 2 and 9 above, and FIG. 4 are similar to those shown in FIGS.
FIG. 5 is a flowchart showing the detailed content of the pointer reordering process in the flowchart of FIG. 2 and FIG. 9, and FIG.
, (B) is a definition diagram showing the abbreviation of the data structure in the data management method of the present invention, and FIGS. 7(a) to 7(e))
8 is an explanatory diagram showing the data search procedure in the data management method of the present invention, FIG. 8 is a block diagram of a data management device for implementing the conventional data management method, and FIG. 9 is the same as that shown in FIG. 8 above. 10 (A) and 10 (B) are flowcharts showing processing procedures for data retrieval in a data management device. FIGS. , 11-T is an explanatory diagram showing the data search procedure in a conventional data management method, and FIGS. 12(A) and 12(B) are disk caches as an example of managing a data group having a list structure. (1)...Search command register, (2)...Search data register, (3)...Output register, (10)...List head register, (11)...・・・
History register, (12) Address register, (13) Identification unit register. (14)... Link section register, (15)... Data section register, (16)... Boundary setting register, (17)... Link operation section counter, (20)...
Memory, (100)...data management device. In each figure, the same reference numerals indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】[Claims] データの集合にリスト構造を持たせるため、各データに
リンクと呼ばれる新たなフィールドを付加し、各データ
のリンクには、リスト構造において自らの次に位置すべ
きデータのアドレスを格納し、リストの最後尾となるべ
きデータのリンクには、終端記号と呼ばれるあらかじめ
定められた特定の値を格納し、リスト構造により表現さ
れた順序を持つデータの集合であるデータ群に対して、
ある一定の値を持つ境界値を設定し、リストの先頭から
前記境界値以下の回数だけ、リンクをたどることによっ
て到達できるデータの集合を前方部とし、それ以外のデ
ータの集合を後方部として、リストを前方部と後方部に
分け、データを検索する際に、リストの先頭からデータ
を順検索し、求めるデータをリストの前方部に発見した
場合には、単に、要求されたデータを出力し、リストの
後方部に発見した場合には、要求されたデータを出力す
るだけでなく、リスト構造を再編成して、発見したデー
タをリストの前方部に移すことを特徴とするデータ管理
方法。
In order to give a list structure to a set of data, a new field called a link is added to each data, and each data link stores the address of the data that should be located next to it in the list structure. A predetermined specific value called a terminal symbol is stored in the link of the data that should be the last one.
A boundary value having a certain value is set, and the set of data that can be reached by following links from the beginning of the list a number of times less than or equal to the boundary value is defined as the forward part, and the other set of data is defined as the backward part, When searching for data by dividing the list into a front part and a back part, the data is sequentially searched from the beginning of the list, and if the desired data is found in the front part of the list, it simply outputs the requested data. , a data management method characterized by not only outputting the requested data but also reorganizing the list structure and moving the found data to the front part of the list when the data is found in the rear part of the list.
JP61092571A 1986-04-22 1986-04-22 Data managing method Pending JPS62248031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61092571A JPS62248031A (en) 1986-04-22 1986-04-22 Data managing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61092571A JPS62248031A (en) 1986-04-22 1986-04-22 Data managing method

Publications (1)

Publication Number Publication Date
JPS62248031A true JPS62248031A (en) 1987-10-29

Family

ID=14058112

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61092571A Pending JPS62248031A (en) 1986-04-22 1986-04-22 Data managing method

Country Status (1)

Country Link
JP (1) JPS62248031A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000049529A1 (en) * 1999-02-18 2000-08-24 Fujitsu Limited Method and apparatus for searching character string using statistical sorting

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000049529A1 (en) * 1999-02-18 2000-08-24 Fujitsu Limited Method and apparatus for searching character string using statistical sorting

Similar Documents

Publication Publication Date Title
US7454403B2 (en) Method and mechanism of improving performance of database query language statements using data duplication information
US4916655A (en) Method and apparatus for retrieval of a search string
US5398199A (en) Many-valued logic processor for data query systems
US5566329A (en) System and method for mutation of selected assignment operations on large data objects
US5513332A (en) Database management coprocessor for on-the-fly providing data from disk media to all without first storing data in memory therebetween
EP1850250A1 (en) Method and system for renewing an index
EP0037264B1 (en) Associative memory system
US5519860A (en) Central processor index sort followed by direct record sort and write by an intelligent control unit
JPS62248031A (en) Data managing method
JPH07146880A (en) Document retrieval device and method therefor
US7487405B1 (en) Method and mechanism for dynamically configuring logical paths of state machines
JP2880192B2 (en) Character string search method and apparatus
KR100412964B1 (en) Method and apparatus for preparing a logic simulation model and recording medium for storing the same
CN117009187B (en) CID file incremental compiling method, system and equipment for upper computer monitoring system
JP2576589B2 (en) Virtual storage access control method
JP2615046B2 (en) Record addition processing method
JPH02257284A (en) Data processor
JPH05120348A (en) Control system for buffer memory
JPH0642248B2 (en) Information retrieval device
JPH0528194A (en) Data access system
JPH02150920A (en) Retrieving system for maximum value data
JPS63118958A (en) Index file memory device
JPH043251A (en) Method and processor for retrieving document
JPH0130168B2 (en)
JPS62160568A (en) Vector computer