JPS63276122A - Data block arranging method - Google Patents

Data block arranging method

Info

Publication number
JPS63276122A
JPS63276122A JP11112887A JP11112887A JPS63276122A JP S63276122 A JPS63276122 A JP S63276122A JP 11112887 A JP11112887 A JP 11112887A JP 11112887 A JP11112887 A JP 11112887A JP S63276122 A JPS63276122 A JP S63276122A
Authority
JP
Japan
Prior art keywords
data
address
priority
data block
data blocks
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
JP11112887A
Other languages
Japanese (ja)
Inventor
Motoko Taniguchi
素子 谷口
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP11112887A priority Critical patent/JPS63276122A/en
Publication of JPS63276122A publication Critical patent/JPS63276122A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To obtain a data block arranging method in a short processing time together with estimation of said processing time by reading the data on the data blocks based on the addresses of an address table and an address link table. CONSTITUTION:The priority data '04', '02'... stored in data blocks BLK(0)-(n) of a random arranged data block area DB1 are read successively. Then the addresses of the data blocks are registered into an address table AT in accordance with those priority data. In case many data of the same priority exist like '02', the addresses of these data are registered into an address link table ALT. Then the data on the area DB1 are read out based on the addresses of both tables AT and ALT.

Description

【発明の詳細な説明】 [概要] 多数のデータブロックがランダムな順序で並べられてい
て、データブロック中のデータブロック優先順位を表わ
すデータの数値によりデータブロックの並び換えを行う
データブロック配列化方法であって、優先順位の数値に
対応したアドレステーブル及びアドレスリンクテーブル
に個々のデータブロックを登録し、これらの2つのテー
ブルを参照しながら並び換えを行うようにしたものであ
る。
[Detailed Description of the Invention] [Summary] A data block arranging method in which a large number of data blocks are arranged in a random order, and the data blocks are rearranged according to numerical values of data representing data block priorities in the data blocks. In this system, each data block is registered in an address table and an address link table corresponding to numerical values of priority, and rearrangement is performed while referring to these two tables.

[産業上の利用分野〕 本発明はデータブロック中の優先順位データの数値に応
じて多数のデータブロックを並び換えるデータブロック
配列化方法に関する。
[Industrial Application Field] The present invention relates to a data block arranging method for rearranging a large number of data blocks according to numerical values of priority data in the data blocks.

多数のデータブロックがランダムな順序で並べられてい
て、データブロックに格納されているデータブロック優
先順位に応じて、マイクロスロセ・   ツサがデータ
ブロック中のデータを読み出し、仕事を処理するような
場合、マイクロプロセッサは、はじめにランダムに並べ
られているデータブロックを優先順位の高いもの、或い
は低いものから順番に並び換えるデータブロック配列化
処理が必要となる。
When a large number of data blocks are arranged in a random order and the microprocessor reads the data in the data blocks and processes the work according to the data block priority stored in the data blocks, the microprocessor The processor first needs to perform a data block arrangement process in which the randomly arranged data blocks are arranged in order from the highest priority to the lowest priority.

[従来の技術] 第6図は多数のデータブロックBLK (0)〜BLK
 (n ’)がランダムな順序で並べられているメモリ
領域・の概念図である。各データブロックには上から順
番にアドレス(0)、(1)、(2)。
[Prior art] Figure 6 shows a large number of data blocks BLK (0) to BLK.
FIG. 2 is a conceptual diagram of a memory area in which (n') are arranged in a random order. Each data block has addresses (0), (1), and (2) in order from the top.

・・・(ロ)が付されており、BLKに続り()内の数
字はそのデータブロックのアドレスを示している。各デ
ータブロック内には、データブロック優先順位を表わす
データ(数値“04”、”02”、“01”、・・・)
が格納されている。
...(b) is attached, and the number in parentheses following BLK indicates the address of the data block. Each data block contains data representing the data block priority (numeric values “04”, “02”, “01”, etc.)
is stored.

第7図は、第6図に示すように多数のデータブロックB
LK (0) 〜BLK (n )を優先順位を表わす
データ数値に従って並び換える場合の従来の方法を示す
フローチャートである。このフローチャートにおいて、
データブロックBLK(+>(但しi−Q〜n)の優先
順位を表わすデータ数値をrBLK (i )、YDJ
として表わしている。
FIG. 7 shows a large number of data blocks B as shown in FIG.
12 is a flowchart illustrating a conventional method for rearranging LK (0) to BLK (n) according to data values representing priorities. In this flowchart,
rBLK (i), YDJ
It is expressed as

従来の方法は、アドレス(0)のデータブロックBLK
 (0)から順番にそのデータブロックの優先順位デー
タ数値と、1つ後ろのデータブロックBLK(1)の優
先順位を示すデータ数値を互いに比較しくステップ1)
、後ろのデータブロックBLK(1)の優先順位がこの
場合高いので、ブロックの入れ換えを行い(ステップ2
)、次に、アドレス(1)のデータブロックBLK(1
)と、後ろのデータブロックBLK (2)の優先順位
を示すデータ数値を互いに比較しくステップ3)、この
場合も、後ろのデータブロックBLK (2)の優先順
位が高いので、ブロックの入れ換えを行う(ステップ4
)。
In the conventional method, data block BLK at address (0)
Step 1) Compare the priority data value of the data block in order from (0) with the data value indicating the priority of the next data block BLK (1).
, the rear data block BLK(1) has a high priority in this case, so the blocks are exchanged (step 2).
), then data block BLK(1) at address (1)
) and the data values indicating the priority of the following data block BLK (2) are compared with each other (step 3). In this case as well, since the following data block BLK (2) has a higher priority, the blocks are exchanged. (Step 4
).

以下、ステップ5〜ステツプ12のような手順を経るこ
とによって、アドレス(0)に優先順位を表わすデータ
数値“00″のデータブロックが、アドレス(1)に、
優先順位を表わすデータ数値“01″のデータブロック
が、以下、同様にして優先順位が高い順になるようにデ
ータブロックが並び換えられる。
Hereinafter, by going through steps 5 to 12, the data block with the data value "00" representing the priority will be placed at address (0), and the data block will be placed at address (1).
The data blocks with the data value "01" representing the priority are subsequently rearranged in the same manner so that they are arranged in descending order of priority.

第8図は、第7図に示す各ステップにお番プるデータブ
ロックの配列状態を示している。
FIG. 8 shows the arrangement of data blocks used in each step shown in FIG.

[発明が解決しようとする問題点] このような手順による従来のデータブロックの配列方法
は、優先順位の高いデータブロックがデータ全体の後ろ
の方(アドレスが大きい方)にあった場合、データブロ
ックの入れ換えが多数回にも及び処理時間がかかるとい
う問題がある。又、処理時間がデータブロックの並び方
によっても異なり、処理時間を見積もることができない
という問題点もある。
[Problems to be Solved by the Invention] In the conventional method of arranging data blocks using such a procedure, if a data block with a high priority is located at the end of the entire data (the one with a larger address), the data block There is a problem in that the replacement is performed many times and processing time is required. Another problem is that the processing time varies depending on how the data blocks are arranged, making it impossible to estimate the processing time.

本発明はこれらの点に鑑みてなされたものであって、短
い処理時間で、且つこの処理時間をデータブロック数に
よって見積もることが可能なデータブロック配列方法を
提供することを目的とじている。
The present invention has been made in view of these points, and it is an object of the present invention to provide a data block arrangement method that requires a short processing time and can estimate this processing time based on the number of data blocks.

E問題点を解決するための手段] 第1図は本発明の原理を示すフローチャートで゛ある。Measures to solve problem E] FIG. 1 is a flow chart showing the principle of the present invention.

本発明は多数のデータブロックがランダムな順序で並べ
られていて、データブロック中のデータブロック優先順
位を表わす優先順位データによりデータブロックの並び
換えを行う方法であって、 アドレステーブルとアドレスリンクテーブルとを設け(
ステップ1)、 各データブロック中の優先順位データを順次読み、優先
順位データに対応して当該データブロックのアドレスを
前記アドレステーブルに登録すると共に、同じ優先順位
データが多数存在する場合は当該データブロックのアド
レスを前記アドレスリンクテーブルに登録しくステップ
2)、アドレステーブルに登録したアドレス及び前記ア
ドレスリンクテーブルに登録したアドレスに従って前記
データブロックを読み出して配列する(ステップ3)。
The present invention is a method in which a large number of data blocks are arranged in a random order, and the data blocks are rearranged using priority data representing the priority order of the data blocks in the data blocks. (
Step 1): Read the priority data in each data block sequentially, register the address of the data block in the address table corresponding to the priority data, and if there are many data blocks with the same priority, block the data block. The data blocks are read out and arranged in accordance with the addresses registered in the address table and the addresses registered in the address link table (step 3).

[作用] 各データブロック中の優先順位データを1回読む処理で
、アドレステーブル及びアドレスリンクテーブルが作成
され、これらの各テーブルのアドレスに従ってデータブ
ロックのデータを読み出すことで並び換えが可能となり
、処理を高速化することができる。
[Operation] By reading the priority data in each data block once, an address table and an address link table are created, and by reading the data in the data blocks according to the addresses in these tables, it is possible to rearrange the data, and the processing can be accelerated.

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

第2図は、本発明の方法を実現する装置の一例を示す構
成ブロック図である。図において、1はデータブロック
の並び換え手段で、マイクロプロセッサ(CPU)が用
いられる。2はキーボード、3はCRTのような表示手
段で、これらはデータ入力やプログラム作成等に用いら
れる。4は書き換え可能なメモリ(RAM) 、5は外
部記憶手段で、これらはデータバスDBを介して互いに
結ばれている。
FIG. 2 is a block diagram showing an example of an apparatus for implementing the method of the present invention. In the figure, numeral 1 denotes data block rearrangement means, which uses a microprocessor (CPU). 2 is a keyboard, and 3 is a display means such as a CRT, which are used for data input, program creation, etc. 4 is a rewritable memory (RAM), and 5 is an external storage means, which are connected to each other via a data bus DB.

ここで、ランダムに並べられた多数のデータブロックは
、RAM4或いは外部記憶手段5内に存在し、アドレス
テーブルやアドレスリンクテーブルはRAMJ内のある
領域に設けられる。
Here, a large number of randomly arranged data blocks exist in the RAM 4 or the external storage means 5, and the address table and address link table are provided in a certain area in the RAMJ.

第3図は、第2図装置を用い、本発明の方法によってデ
ータブロックの並び換えを行う場合の動作概念図である
。図において、DBIは、ランダムに並べられた複数の
データブロックBLK (0)〜BLK (n )から
なる領域であり、各データブロックBLK (0)〜B
LK (n )内にはデータブロック優先順位を表わす
優先順位データが格納されている。
FIG. 3 is a conceptual diagram of the operation when data blocks are rearranged by the method of the present invention using the apparatus shown in FIG. In the figure, DBI is an area consisting of a plurality of randomly arranged data blocks BLK (0) to BLK (n), and each data block BLK (0) to B
Priority data representing the data block priority is stored in LK (n).

ATはアドレステーブルエリアで、複数のブロックAR
8(0) 〜AR3(n )からなり、各ブロックの上
段にはデータブロックの始まりアドレスを、下段にはデ
ータブロックの終りアドレスを格納できるようになって
いる。ALTはアドレスリンクテーブルで、複数のブロ
ックLNK (0)〜LNK (n )からなる。DB
2は並び換えられたデータを格納するデータブロックエ
リ、アである。
AT is an address table area where multiple blocks AR
8(0) to AR3(n), and the upper row of each block can store the start address of the data block, and the lower row can store the end address of the data block. ALT is an address link table consisting of a plurality of blocks LNK (0) to LNK (n). DB
2 is a data block area A that stores rearranged data.

本発明の並び換え方法は、データブロック領域DB1の
各データブロックBLK (0)〜BLK(n)中にあ
る優先順位データ“04″、“02”、・・・を順次読
み、この優先順位データに対応してそのデータブロック
のアドレスをアドレステーブルATに登録し、同じ優先
順位データが“02″の場合のように多数(ここでは2
個)存在する場合は、そのアドレスをアドレスリンクテ
ーブルALTに登録し、登録したアドレステーブルAT
及びアドレスリンクテーブルALTのアドレスに従って
データブロック領域DB1のデータを読み出し、領域D
B2に順に格納するようにしている。
The sorting method of the present invention sequentially reads priority data "04", "02", etc. in each data block BLK(0) to BLK(n) of data block area DB1, and The address of that data block is registered in the address table AT in response to
) If the address exists, register it in the address link table ALT, and add it to the registered address table AT.
The data in the data block area DB1 is read out according to the address in the address link table ALT, and the data in the area D is read out.
They are stored in B2 in order.

第4図は、上述した手順におけるアドレステーブル八T
とアドレスリンクテーブルALTへのアドレス登録の詳
細を示すフO−チシ一トである。
FIG. 4 shows the address table 8T in the procedure described above.
This is a page showing details of address registration in the address link table ALT.

データブロックBLK (0)の登録は、優先順位デー
タ(ED) “04″であるから、アドレステーブルA
TのブロックAR8(4)にデータブロックBLK (
0)のアドレスOOを上段及び下段に登録するステップ
11が担当する。以下、各データブロックBLK (1
>、BLK (2)、・・・についても同様にステップ
12.13.・・・で登録を行い、アドレステーブル及
びアドレスリンクテーブルが作成される。各ステップに
おいて、■、■。
Data block BLK (0) is registered as priority data (ED) “04”, so address table A
Data block BLK (
Step 11 is responsible for registering the address OO of 0) in the upper and lower rows. Below, each data block BLK (1
>, BLK (2), . . . in the same manner as steps 12.13. . . . to create an address table and an address link table. At each step, ■, ■.

・・・で示す表示は第3図における矢印■、■、・・・
で示す流れに対応している。
The indications indicated by ... are the arrows ■, ■, ... in Figure 3.
It corresponds to the flow shown in .

第5図は、アドレステーブル及びアドレスリンクテーブ
ルに従ってデータブロックの並び換えを行う動作のフロ
ーチャートである。ここでは優先順位の高いもの(優先
順位データの数値が小さい程優先順位が高いものとする
)から順番に配列する場合を例示しである。
FIG. 5 is a flowchart of the operation of rearranging data blocks according to the address table and address link table. Here, an example is shown in which the items are arranged in order from the highest priority (the smaller the numerical value of the priority data, the higher the priority).

アドレステーブルATには、データブロック優先順位の
高いものから順にそのアドレスが、ブロック始まりアド
レス(上段)とブロック終りアドレス(下段)で格納さ
れており、又、アドレスリンクテーブルALTには、ア
ドレステーブルATで登録されたデータブロック始まり
からデータプロック終りまでに、どのデータブロックが
同じ隈先順位データ値を持っているかを表わしている。
In the address table AT, addresses of data blocks are stored in descending order of priority as block start addresses (upper row) and block end addresses (lower row), and address link table ALT stores addresses in the order of data block priority. It shows which data blocks have the same shading order data value from the start of the data block registered in to the end of the data block.

従って、第5図に示すように、先ず、アドレステーブル
ATを頭から(ブロックAR8(0)から)読み、その
アドレス(EDI) “03”に従って、データブロッ
ク領域DB1の該当アドレス“03″のデータブロック
BLK(3)をデータブロックエリアDB2の先頭アド
レスのブロックBLK’  (0)に格納する(ステッ
プ21)。以下、ステップ22.23.・・・を1!施
することで、データブロックエリアDB2には、上から
順に優先順位の高いデータブロックに並び換えられて格
納される。
Therefore, as shown in FIG. 5, the address table AT is first read from the beginning (block AR8(0)), and according to the address (EDI) "03", the data at the corresponding address "03" in the data block area DB1 is read. Block BLK (3) is stored in block BLK' (0) at the start address of data block area DB2 (step 21). Below, steps 22.23. ...1! As a result, the data blocks are sorted and stored in the data block area DB2 in descending order of priority from the top.

尚、アドレステーブルATを後ろから読み、そのアドレ
スに従って並び換えを行えば、上から順に優先順位の低
いデータブロックに並び換えを行うことができる。
Note that if the address table AT is read from the back and rearranged according to the address, the data blocks can be rearranged from the top to the lowest priority.

[発明の効果] 以上詳細に説明したように、本発明によれば、データア
クセス回数を最小限にすることができ、又、データアク
セス回数がデータの内容に左右されるデータブロック数
によって見積もることができるので、高速に、且つ一定
の処理時間でデータブロックの並び換えを行うことがで
きる。
[Effects of the Invention] As explained in detail above, according to the present invention, the number of data accesses can be minimized, and the number of data accesses can be estimated based on the number of data blocks, which depends on the content of the data. Therefore, data blocks can be rearranged at high speed and within a constant processing time.

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

第1図は本発明の原理を示すフローチャート、第2図は
本発明の方法を実現する装置の構成ブロック図、 第3図は本発明の方法によるデータブロック並び換えの
動作概念図、 第4図はアドレステーブル登録手順を示すフローチャー
ト、 第5図はデータブロック並び換えのフローチャート、 第6図はデータブロックの概念図、 第7図は従来方法のフローチャート、 第8図は第7図番ステップにおtプるデータブロック配
列状態を表わす図である。 第3図において、 DBl、DB2はデータブロック領域、ATはアドレス
テーブル、 ALTはアドレスリンクテーブルである。 第4 図 −J−」−」 1) の  の  の    の 従来方法のフローチャート 第7図 デークブロックの配列状他を茄す図 繭8図
FIG. 1 is a flowchart showing the principle of the present invention, FIG. 2 is a block diagram of the configuration of an apparatus that implements the method of the present invention, FIG. 3 is a conceptual diagram of the operation of rearranging data blocks according to the method of the present invention, and FIG. 4 is a flowchart showing the address table registration procedure, Fig. 5 is a flowchart of data block rearrangement, Fig. 6 is a conceptual diagram of data blocks, Fig. 7 is a flowchart of the conventional method, and Fig. 8 is a flowchart of the step numbered in Fig. 7. FIG. 3 is a diagram showing a state of data block arrangement. In FIG. 3, DB1 and DB2 are data block areas, AT is an address table, and ALT is an address link table. Fig. 4 Flowchart of the conventional method of 1) Fig. 7 Diagram showing arrangement of data blocks etc. Fig. 8 Cocoon

Claims (1)

【特許請求の範囲】 多数のデータブロックがランダムな順序で並べられてい
て、データブロックの中のデータブロック優先順位を表
わす優先順位データによりデータブロックの並び換えを
行う方法であって、 アドレステーブルとアドレスリンクテーブルとを設け(
ステップ1)、 各データブロック中の優先順位データを順次読み、優先
順位データに対応して当該データブロックのアドレスを
前記アドレステーブルに登録すると共に、同じ優先順位
データが多数存在する場合は当該データブロックのアド
レスを前記アドレスリンクテーブルに登録し(ステップ
2)、 前記アドレステーブルに登録したアドレス及び前記アド
レスリンクテーブルに登録したアドレスに従って前記デ
ータブロックを順次読み出して配列する(ステップ3)
ことを特徴とするデータブロック配列化方法。
[Claims] A method in which a large number of data blocks are arranged in a random order, and the data blocks are rearranged using priority data representing the priority order of data blocks among the data blocks, the method comprising an address table and An address link table is provided (
Step 1): Read the priority data in each data block sequentially, register the address of the data block in the address table corresponding to the priority data, and if there are many data blocks with the same priority, block the data block. register the address in the address link table (step 2), and sequentially read and arrange the data blocks according to the address registered in the address table and the address registered in the address link table (step 3).
A data block arrangement method characterized by:
JP11112887A 1987-05-07 1987-05-07 Data block arranging method Pending JPS63276122A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11112887A JPS63276122A (en) 1987-05-07 1987-05-07 Data block arranging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11112887A JPS63276122A (en) 1987-05-07 1987-05-07 Data block arranging method

Publications (1)

Publication Number Publication Date
JPS63276122A true JPS63276122A (en) 1988-11-14

Family

ID=14553153

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11112887A Pending JPS63276122A (en) 1987-05-07 1987-05-07 Data block arranging method

Country Status (1)

Country Link
JP (1) JPS63276122A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02224018A (en) * 1988-11-16 1990-09-06 Namco Ltd Sorting circuit
JPH0644045A (en) * 1992-03-26 1994-02-18 Sega Enterp Ltd Method and device for sorting data

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5977549A (en) * 1982-10-26 1984-05-04 Hitachi Denshi Ltd Data sorting method
JPS6154536A (en) * 1984-08-24 1986-03-18 Hitachi Ltd Data regulating circuit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5977549A (en) * 1982-10-26 1984-05-04 Hitachi Denshi Ltd Data sorting method
JPS6154536A (en) * 1984-08-24 1986-03-18 Hitachi Ltd Data regulating circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02224018A (en) * 1988-11-16 1990-09-06 Namco Ltd Sorting circuit
JPH0644045A (en) * 1992-03-26 1994-02-18 Sega Enterp Ltd Method and device for sorting data

Similar Documents

Publication Publication Date Title
JPS63276122A (en) Data block arranging method
JP2005135221A (en) Method and device for joining spreadsheet data and program
JPS6143338A (en) Searching of thin data base using association technology
JP2735195B2 (en) Table search device
JP2591362B2 (en) Data selection processing method
JP2604787B2 (en) Two-dimensional data storage method
JPS6385823A (en) Multi-key sorter
JPH11320348A (en) Manufacturing process managing system
JPH0782427B2 (en) Sort processing method
JPH03148730A (en) Process queue processing system
JPS60196844A (en) Retrieving device of information
JPH0916662A (en) Design cost management system
JPH05165891A (en) Data registration/retrieval system of data base
JPH01319828A (en) Data processor
JPH02294729A (en) Sort processing system
JPS62231346A (en) Data storage system
JPH04178878A (en) Table record retrieving system
JPS62125449A (en) Cache memory system
JPH07168755A (en) Cell data storing system
JPS6320629A (en) Message generating method
JPH0343848A (en) Logical page control system
JPH02161564A (en) Method for storing data in storage device
JPS62212726A (en) Compression processing system for index key
JPS6027039A (en) Retrieving method of index key
JPH03246741A (en) Synchronous controller