JPH06215028A - Multi-level summary data generating system - Google Patents

Multi-level summary data generating system

Info

Publication number
JPH06215028A
JPH06215028A JP5023217A JP2321793A JPH06215028A JP H06215028 A JPH06215028 A JP H06215028A JP 5023217 A JP5023217 A JP 5023217A JP 2321793 A JP2321793 A JP 2321793A JP H06215028 A JPH06215028 A JP H06215028A
Authority
JP
Japan
Prior art keywords
data
level
input
node
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP5023217A
Other languages
Japanese (ja)
Other versions
JP2665120B2 (en
Inventor
Kimisuke Wake
公介 和気
Takeshi Kanbe
武司 神辺
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
NEC Solution Innovators Ltd
Original Assignee
NEC Corp
NEC Solution Innovators 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 NEC Corp, NEC Solution Innovators Ltd filed Critical NEC Corp
Priority to JP5023217A priority Critical patent/JP2665120B2/en
Publication of JPH06215028A publication Critical patent/JPH06215028A/en
Application granted granted Critical
Publication of JP2665120B2 publication Critical patent/JP2665120B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To accelerate processing by reducing arithmetic at the time of multihierarchical summary data generating arithmetic. CONSTITUTION:Data with symbolizing key to identify a node number are stored in a data storage means 107, concerning data inputted by a data input means 103, the master node numbers of previous data and present input data are acquired from a node information input means 102 by a summary arithmetic means 102, when those numbers are equal, the arithmetic of arithmetical rules is performed and when they are different, the arithmetic result and new data with symbolizing key added the master node number of previous data are passed through a symbolizing key applying means 105 and outputted from a data output means 106 to the data storage means.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、サマリデータを生成す
る方式に関し、特に、多階層データについて各ノードの
サマリデータを求める方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of generating summary data, and more particularly to a method of obtaining summary data of each node for multi-layer data.

【0002】[0002]

【従来の技術】従来、この種のサマリレコードを生成す
る場合、各階層についてノードの分類が出来るようにキ
ーを設定し、そのキーに従って、下位のサマリデータを
全て求め、次に上位のサマリデータを求める場合には、
前に求めた下位のサマリデータを入力データとして、演
算するという方式を階層数分繰り返していた。
2. Description of the Related Art Conventionally, when this kind of summary record is generated, a key is set so that nodes can be classified for each hierarchy, all lower-order summary data is obtained according to the key, and next higher-order summary data is obtained. When seeking
The calculation method using the lower-level summary data obtained previously as input data was repeated for the number of layers.

【0003】この様な方式の例としては、特開平1−1
97882、「領域の演算方法」が参照できる。
An example of such a system is disclosed in Japanese Patent Laid-Open No. 1-1.
97882, "Region Calculation Method".

【0004】図7は従来の領域の演算方法の領域分割図
であり、CADによる機械設計の対象となる形状データ
を作成する場合への応用例である。図7(a)に斜線で
示す様な分解形状Aを、複数領域に分割して階層的な表
現による木構造のデータ構成とし、スピードが問題化し
ている領域の集合演算を並列的に高速化しようとするも
のである。
FIG. 7 is an area division diagram of a conventional area calculation method, which is an application example in the case of creating shape data to be the object of mechanical design by CAD. The decomposed shape A as indicated by the diagonal lines in FIG. 7A is divided into a plurality of regions to form a tree-structured data structure with a hierarchical representation, and the set operation of regions where speed is a problem is accelerated in parallel. Is what you are trying to do.

【0005】図7(a)では、分解形状Aを2次元的配
置の木状表現のため全体を301、302、303、3
04に4分割し、さらに部分301を301−1、30
1−2、301−3、301−4……に分割し、また、
それを304−1−1、304−1−2、304−1−
3、304−1−4……のように分割して、図7(b)
に示すように、分割した各部分が斜線で示す形状Aの領
域に含まれる場合は●、すべて領域の外であれば○、と
して図7(a)のそれぞれの4分割部分を左下、右下、
左上、右上の順に、図7(b)に左から右に対応付けて
記録する。
In FIG. 7 (a), the decomposed shape A is represented as a tree-like representation in a two-dimensional arrangement.
It is divided into four into 04, and the part 301 is further divided into 301-1 and 30.
It is divided into 1-2, 301-3, 301-4 ...
304-1-1, 304-1-2, 304-1-
3, 304-1-4 ..., and is divided as shown in FIG.
As shown in FIG. 7, if each of the divided parts is included in the area of the shape A indicated by diagonal lines, it is indicated by ●, and if it is outside the area, it is indicated by ○, and the four divided parts in FIG. ,
In the order of the upper left and the upper right, recording is performed by associating from left to right in FIG.

【0006】図7(b)の階層表現データは、また、図
8(a)のようにメモリ上では、ポインタと「0,1」
の数値により表現され、0は○の空きを、1は●の実を
表わす。
The hierarchical expression data shown in FIG. 7 (b) also has a pointer and "0, 1" on the memory as shown in FIG. 8 (a).
It is represented by the numerical value of 0, 0 represents the vacancy of 1 and 1 represents the fruit of ●.

【0007】次に、このデータを1次元的な記号列に変
換する。この変換は図7(b)または図8(a)の木構
造を左から右に縦型にたどり、階層を1段下に下るとき
を’(’,●を‘1’,○を‘0’,階層を1段上に上
るときを’)’、と順番に記述することにより、分解形
状Aは、 A;((1101)10((1101)101)) の記号列に変換される。
Next, this data is converted into a one-dimensional symbol string. This conversion traces the tree structure of FIG. 7 (b) or FIG. 8 (a) vertically from left to right, and when descending one level down, it is '(', ● for '1', ○ for '0'. The decomposition shape A is converted into a symbol string of A; ((1101) 10 ((1101) 101)) by describing in order, "," when the hierarchy goes up one step, """.

【0008】同様に、図8(b)に示す分解形状Bは、 B;(0(0001)(0001)1) の記号列に変換できる。Similarly, the decomposed shape B shown in FIG. 8B can be converted into a symbol string of B; (0 (0001) (0001) 1).

【0009】この「A,B」から図8(c)に示す形状
領域C=(A and B)を求めるには、記号列
「A,B」を先頭から順次取り出し、集合演算を部分的
な演算の連続として行ない、C=(A and B)
を、 C;(0(0001)0((1101)101)) として求める。
In order to obtain the shape region C = (A and B) shown in FIG. 8C from "A, B", the symbol string "A, B" is sequentially taken out from the beginning, and the set operation is partially performed. Performed as a series of operations, C = (A and B)
Is obtained as C; (0 (0001) 0 ((1101) 101)).

【0010】このように、’(’,’)’、を階層につ
いてノードを識別するキー記号として、301−1、3
01−2、301−3、301−4、あるいは、304
−1−1、304−1−2、304−1−3、304−
1−4等の下位のサマリデータから、上位のサマリデー
タを求めつぎつぎと演算を繰り返し行うものである。こ
こではCADを例としてあげたが、CADに限定するも
のではない。
As described above, 30'-1, 3'are used as the key symbols for identifying the nodes in the hierarchy with '(', ')'.
01-2, 301-3, 301-4, or 304
-1-1, 304-1-2, 304-1-3, 304-
Higher-order summary data is obtained from lower-order summary data such as 1-4, and the operation is repeated. Although CAD is given here as an example, the invention is not limited to CAD.

【0011】[0011]

【発明が解決しようとする課題】このような従来の方式
では、上位のサマリデータを求めるために、下位のサマ
リデータを全て求めて出力し、その求めたサマリデータ
を入力としてサマリ演算を行うので、データの入出力が
多くなり処理に時間がかかるという問題があった。
In such a conventional method, in order to obtain the higher-order summary data, all the lower-order summary data are obtained and output, and the obtained summary data is input to perform the summary calculation. However, there was a problem that the input and output of data increased and the processing took time.

【0012】本発明は上述の問題点に鑑みて、多階層を
構成するノードの相互関連を表現する情報を格納してお
くことにより、多階層サマリデータ生成におけるデータ
の入出力を削減し高速化を可能にする多階層サマリデー
タ生成方式を提供することを目的としている。
In view of the above-mentioned problems, the present invention stores information expressing the interrelationship of nodes constituting a multi-layer, thereby reducing the data input / output in the multi-layer summary data generation and increasing the speed. The purpose is to provide a multi-level summary data generation method that enables the.

【0013】[0013]

【課題を解決するための手段】本発明の多階層サマリデ
ータ生成方式は、個々の素データを類別し、類別後の同
一集団についてサマリ演算を施して得られたデータをサ
マリデータとし、類別された集団が更に上位の集団の要
素となるようにして多レベルの階層を構成している多階
層サマリデータを生成する方式において、入力データと
して素データ、および出力データとして求めたサマリデ
ータの先頭にノード番号を識別するための記号化キーを
付加した記号化キー付データを格納するデータ記憶手段
と、前記データ記憶手段から素データを1件ごとに入力
し、入力データ終了時にはEOFを出力するデータ入力
手段と、データを入力するための入力ファイル名とデー
タを出力するための出力ファイル名を指定するコマンド
入力手段と、記号化キー付与手段から記号化キー付きデ
ータを入力し前記データ記憶手段に出力するデータ出力
手段と、あるノードのノード番号を入力し該ノードの親
のノード番号を返すノード情報入力手段と、サマリ演算
手段から入力したサマリ演算結果と前データの親のノー
ド番号から新しく記号化キーを作成し、前記演算結果に
新しく記号化キー付データを付加しデータ出力手段に出
力する記号化キー付与手段と、前記データ入力手段から
素データをEOFが返るまで1件づつ入力し、記憶して
いた前データと現データのノード番号を前記ノード情報
入力手段に出力しそのノードの親のノード番号を入力し
て該2つのノードの各親のノード番号が等しいときはデ
ータを演算規則に従ってサマリ演算を行い、等しくない
ときはそれまでサマリ演算した演算結果と前データの親
のノード番号を前記記号化キー付与手段に出力するサマ
リ演算手段を有している。
According to the multi-layer summary data generation method of the present invention, individual raw data are classified, and the data obtained by performing a summary operation on the same group after classification is used as summary data and classified. In the method of generating multi-level summary data that configures a multi-level hierarchy by setting the group as an element of a higher-level group, at the beginning of the summary data obtained as raw data as input data and output data Data storing means for storing data with a symbolized key to which a symbolic key for identifying a node number is stored, and data for inputting raw data from the data storing means one by one and outputting EOF at the end of the input data Input means, command input means for specifying input file name for inputting data and output file name for outputting data, and symbol Data output means for inputting the data with symbolized key from the key giving means and outputting it to the data storage means, node information input means for inputting the node number of a certain node and returning the node number of the parent of the node, and summary computing means From the summary operation result input from the above and the parent node number of the previous data, a new symbolization key is created, and data with a symbolization key is newly added to the operation result and output to the data output means. The raw data is input from the data input means one by one until the EOF is returned, and the node numbers of the previous data and the current data that have been stored are output to the node information input means, and the node number of the parent of the node is input. If the node numbers of the parents of the two nodes are the same, the data is calculated according to the calculation rule. If they are not the same, the calculation is performed up to that point. The parent node number of the fruit before the data has a summary calculation means for outputting to the symbolized key providing means.

【0014】また、前記サマリ演算手段において、現在
のレベルを表わすレベルカウントを行い、各レベル毎に
サマリ演算結果記憶領域を用意し、2つのノードの各親
ノード番号の比較が等しくない場合、演算結果を前記記
号化キー付与手段によってキーを付加してからデータ出
力手段によりデータ記憶手段に格納し、前記レベルカウ
ントを1レベル上げ1レベル下位の記憶領域を現レベル
の記憶領域に足し込み、1レベル下位の記憶領域に素デ
ータを記憶する演算処理を行うことを特徴としている。
Further, in the summary calculation means, a level count representing the current level is counted, a summary calculation result storage area is prepared for each level, and when the comparison of the parent node numbers of the two nodes is not equal, the calculation is performed. The result is stored in the data storage means by the data output means after the key is added by the symbolized key giving means, and the level count is increased by one level and the storage area lower by one level is added to the storage area of the current level. It is characterized in that arithmetic processing is performed to store raw data in a storage area at a lower level.

【0015】また、前記EOFには前記親ノード番号と
は決して一致しない0のノード番号を割り当て前記デー
タ入力手段からEOFが返った場合、演算結果を前記記
号化キー付与手段によってキーを付加したのちデータ出
力手段によりデータ記憶手段によりデータ記憶手段に格
納し、前記レベルカウントを1レベル上げ1レベル下位
の記憶領域を現レベルの記憶領域に足し込み、レベルカ
ウントが最上位レベルに達した場合にデータ記憶手段を
クローズする演算処理を行うことを特徴としている。
Further, the EOF is assigned a node number of 0 which never matches the parent node number, and when the EOF is returned from the data input means, the operation result is added with a key by the encoding key giving means. The data output means stores the data in the data storage means, the level count is increased by one level, the storage area lower by one level is added to the storage area of the current level, and the data is stored when the level count reaches the highest level. It is characterized in that arithmetic processing for closing the storage means is performed.

【0016】[0016]

【作用】上記構成によれば、多階層を構成するノードの
相互の関連を表現するノード番号を識別する記号化キー
を付加した情報をデータ記憶手段に格納しておき、そこ
から入力した2ノードの親ノードが同一かをノード情報
入力手段の情報によって判定を行い、サマリ演算手段は
両方の親ノード番号が同一の場合は演算規則のサマリ演
算を行い、異なる場合には既に求めた演算結果と前デー
タの親のノード番号を付加した新しい記号化キー付デー
タをデータ記憶手段に格納し、レベルカウントを1レベ
ル上げたのち、1レベル下位の記憶領域を現レベルの記
憶領域に足し込み、1レベル下位の記憶領域に素データ
を記憶するように処理をして行くので、入力データとし
ての下位のサマリデータは出力した後も保持し、それを
用いて上位のサマリデータを演算することができる。
According to the above structure, information to which a symbol key for identifying the node number expressing the mutual relation of the nodes forming the multi-layer is added is stored in the data storage means, and the two nodes inputted from there are stored. Whether the parent nodes are the same is determined by the information of the node information input means, and the summary calculation means performs the summary calculation of the calculation rule when both the parent node numbers are the same, and when the different parent node numbers are different from the already calculated calculation result. The new symbolized keyed data to which the parent node number of the previous data is added is stored in the data storage means, the level count is increased by one level, and the storage area one level lower is added to the current level storage area. Since the raw data is stored in the storage area at the lower level of the level, the lower level summary data as input data is retained after being output, and it is used to store the upper level summary data. Data can be calculated.

【0017】[0017]

【実施例】本発明の一実施例について図を参照しながら
詳細に説明する。
An embodiment of the present invention will be described in detail with reference to the drawings.

【0018】図1は本発明の一実施例による多階層サマ
リデータ生成方式の構成図である。図1を参照すると、
本発明の一実施例はコマンド入力手段101と、ノード
情報入力手段102と、データ入力手段103と、サマ
リ演算手段104と、記号化キー付与手段105と、デ
ータ出力手段106と、データ記憶手段107とから構
成される。
FIG. 1 is a block diagram of a multi-layer summary data generation system according to an embodiment of the present invention. Referring to FIG.
One embodiment of the present invention is a command input unit 101, a node information input unit 102, a data input unit 103, a summary calculation unit 104, a symbol key addition unit 105, a data output unit 106, and a data storage unit 107. Composed of and.

【0019】コマンド入力手段101は、素データを入
力するための入力ファイル名と記号化キー付データを出
力するための出力ファイル名を入力する手段であり、ノ
ード情報入力手段102は、あるノードのノード番号を
入力して、そのノードの親のノード番号を返す手段であ
り、データ入力手段103は、コマンド入力手段101
で指定された、データ記憶手段107上の入力ファイル
から入力したデータを、1件ずつサマリ演算手段104
に出力し、入力データ終了時にEOFを(End of
File)を出力する手段であり、サマリ演算手段1
04は、データ入力手段103からデータをEOFが返
るまで1件ずつ入力し、記憶していた前データと現デー
タのノード番号をノード情報入力手段102に出力し、
そのノードの親のノード番号を入力し、その親のノード
番号が等しいとき、データを演算規則に従ってサマリ演
算し、等しくないとき、それまでサマリ演算した演算結
果と前データの親のノード番号を記号化キー付与手段1
05に出力し、データ入力手段103からEOFが返る
まで、上記操作を繰り返す手段であり、記号化キー付与
手段105は、サマリ演算手段104から入力したサマ
リ演算結果と前データの親のノード番号から、新しく記
号化キーを作成し、演算結果に新しく記号化キーを付加
し、データ出力手段106に作成した記号化キー付デー
タを出力する手段であり、データ出力手段106は、記
号化キー付与手段105から記号化キー付データを入力
し、コマンド入力手段101で指定された、データ記憶
手段107上の出力ファイルに記号化キー付データを出
力する手段であり、データ記憶手段107は、入力デー
タである素データと求めたサマリデータの先頭にノード
番号を識別するための記号化キーを付加した記号化キー
付データを格納しておく手段である。
The command input means 101 is means for inputting an input file name for inputting raw data and an output file name for outputting data with symbolized keys, and the node information input means 102 is for a certain node. The data input means 103 is a means for inputting a node number and returning the parent node number of the node.
The data input from the input file on the data storage means 107 designated by the above is calculated one by one in the summary calculation means 104.
To the end of the input data and EOF (End of of
Is a means for outputting File), and is a summary calculation means 1
04 inputs data one by one from the data input means 103 until EOF is returned, outputs the stored previous data and the node number of the current data to the node information input means 102,
Enter the node number of the parent of the node, and when the node numbers of the parents are equal, perform a summary operation on the data according to the operation rules, and if they are not equal, use the symbol to indicate the operation result of the summary operation up to that point and the parent node number of the previous data. Key giving means 1
It is a means for repeating the above operation until the data input means 103 returns EOF from the data input means 103, and the encoding key addition means 105 uses the summary operation result input from the summary operation means 104 and the parent node number of the previous data. Is a means for creating a new symbol key, adding a new symbol key to the operation result, and outputting the created data with the symbol key to the data output means 106. The data output means 106 is the symbol key adding means. 105 is a means for inputting the data with symbolized key from 105 and outputting the data with symbolized key to the output file on the data storage means 107 designated by the command input means 101. Store the raw data and the data with symbolization key with the symbolization key for identifying the node number added to the beginning of the obtained summary data. Is a place means.

【0020】次に全体の処理の流れを説明する。Next, the flow of the entire processing will be described.

【0021】コマンド入力手段101から入力ファイル
名と出力ファイル名を入力し、サマリ演算手段104
は、データ入力手段103から素データをEOFが返る
まで1件ずつ入力し、記憶していた前データと現データ
の、ノード番号をノード情報入力手段102に出力し、
それぞれのノードの親のノード番号を入力し、各親のノ
ード番号が等しいか比較し、等しいとき、データを演算
規則に従ってサマリ演算し、等しくないとき、それまで
サマリ演算した演算結果と前データの親のノード番号を
記号化キー付与手段105に出力し、記号化キー付与手
段105は、演算結果に記号化したキーを付加した記号
化キー付データをデータ出力手段106に出力し、デー
タ出力手段106は、キー付与手段105から記号化キ
ー付データを入力し、データ記憶手段107に出力し、
データ入力手段103からEOFが返ったとき、サマリ
演算手段104は、演算したサマリデータを出力する。
An input file name and an output file name are input from the command input means 101, and the summary calculation means 104
Inputs the raw data from the data input means 103 one by one until the EOF is returned, and outputs the node numbers of the stored previous data and current data to the node information input means 102,
Enter the parent node number of each node, compare the node numbers of each parent for equality, and if they are equal, calculate the data according to the calculation rules.If they are not equal, calculate the result of the summary calculation up to that time and the previous data The parent node number is output to the symbolic key assigning means 105, and the symbolic key assigning means 105 outputs the symbolized key-attached data obtained by adding the symbolized key to the calculation result to the data output means 106, and the data output means. 106 receives the symbolized key-attached data from the key giving means 105 and outputs it to the data storage means 107,
When EOF is returned from the data input means 103, the summary calculation means 104 outputs the calculated summary data.

【0022】次に主な処理の動作概要を説明する。Next, the operation outline of the main processing will be described.

【0023】図2は、図1のサマリ演算手段104の動
作概要を表したフローチャートであり、図2に示す処理
において使用されるレベルカウントは現在のレベルを表
し、サマリ演算結果領域はレベル毎に用意されているも
のとする。
FIG. 2 is a flow chart showing an outline of the operation of the summary calculation means 104 of FIG. 1. The level count used in the processing shown in FIG. 2 represents the current level, and the summary calculation result area is for each level. It shall be prepared.

【0024】まず、サマリ演算の結果を格納する領域を
全レベルについて初期化し、レベルカウンタを初期化し
(ステップ201)、コマンド入力手段101から、入
力ファイル名と出力ファイル名を入力し(ステップ20
2)、データ記憶手段107上の指定された入力ファイ
ルと出力ファイルをオープンし(ステップ203)、デ
ータ入力手段103から素データを1件入力し、レベル
カウントを最下位レベルにし(ステップ204)、デー
タ入力手段103からEOFが返った場合、ステップ2
15へ飛び、EOFでない場合、ステップ206へ飛び
(ステップ205)、入力したデータのノード番号を記
憶し(ステップ206)、入力したデータと1つ前の記
憶したデータの注目するノード番号をノード情報入力手
段102に出力し、それぞれの親のノード番号を取得し
(ステップ207、208)、ノード情報入力手段10
2から入力した、現在のデータの親のノード番号と1つ
前に入力したデータの親のノード番号が等しいか比較
し、等しい場合ステップ210へ飛び、等しくない場合
ステップ211へ飛び(ステップ209)、親が等しい
データを、サマリ演算手段104によって演算し、ステ
ップ204へ飛び(ステップ210)、等しくない場
合、サマリ演算手段104によって演算された演算結果
と一つ前に入力したデータの親のノード番号から記号化
キー付与手段105によって新しく記号化キー付データ
を作成し、データ出力手段106によってデータ記憶手
段107に格納し(ステップ211)、注目しているレ
ベルを1レベル上げ(ステップ212)、1レベル下位
の記憶領域を、現レベルの記憶領域に足し込み(ステッ
プ213)、1レベル下位の記憶領域に素データを記憶
し、ステップ207飛び(ステップ214)、ステップ
205でデータ入力手段103からEOFが返った場
合、サマリ演算手段104によって演算された演算結果
と1つ前に入力したデータの親のノード番号から記号化
キー付与手段105によって新しく記号化キー付データ
を作成し、データ出力手段106によってデータ記憶手
段107に格納し(ステップ215)、注目しているレ
ベルを1レベル上げ(ステップ216)、1レベル下位
の記憶領域を、現レベルの記憶領域に足し込む(ステッ
プ217)、レベルカウンタが最上位レベルかどうかを
判定し、最上位レベルならば、ステップ219へ飛び、
そうでなければ、ステップ215へ飛び(ステップ21
8)、レベルカウンタが最上位レベルならば、データ記
憶手段107をクローズして、終了する(ステップ21
9)。
First, the area for storing the result of the summary calculation is initialized for all levels, the level counter is initialized (step 201), and the input file name and the output file name are input from the command input means 101 (step 20).
2) Open the designated input file and output file on the data storage means 107 (step 203), input one piece of raw data from the data input means 103, and set the level count to the lowest level (step 204). When EOF is returned from the data input means 103, step 2
If it is not EOF, the process jumps to step 206 (step 205), the node number of the input data is stored (step 206), and the focused node number of the input data and the data stored immediately before is stored in the node information. The information is output to the input unit 102, the node numbers of the respective parents are acquired (steps 207 and 208), and the node information input unit 10
The node number of the parent of the current data input from 2 and the node number of the parent of the previous data input are compared, and if they are equal, the process jumps to step 210, and if they are not equal, the process jumps to step 211 (step 209). , The data having the same parent is calculated by the summary calculating means 104, and the process jumps to step 204 (step 210). If they are not equal, the calculation result calculated by the summary calculating means 104 and the parent node of the data previously input A new symbolized key-attached data is created from the number by the symbolized key giving means 105, stored in the data storage means 107 by the data output means 106 (step 211), and the level of interest is increased by one level (step 212). Add the storage area one level lower to the storage area of the current level (step 213), one level When the raw data is stored in the storage area of the order and jumps to step 207 (step 214) and EOF is returned from the data input means 103 in step 205, the calculation result calculated by the summary calculation means 104 and the previous one are input. A new symbolized key-attached data is created by the symbolized key assigning means 105 from the parent node number of the data, stored in the data storage means 107 by the data output means 106 (step 215), and the level of interest is increased by one level. (Step 216) Add the storage area of one level lower to the storage area of the current level (step 217), determine whether the level counter is the highest level, and if it is the highest level, jump to step 219.
Otherwise, jump to step 215 (step 21
8) If the level counter is at the highest level, the data storage means 107 is closed and the process ends (step 21).
9).

【0025】次に具体的な処理について述べる。Next, specific processing will be described.

【0026】コマンド入力手段101と、ノード情報入
力手段102と、データ入力手段103と、サマリ演算
手段104と、記号化キー付与手段105と、データ出
力手段106をコンピュータのプログラムとし、それぞ
れコマンド入力プログラム、ノード情報入力プログラ
ム、データ入力プログラム、サマリ演算プログラム、記
号化キー付与プログラム、データ出力プログラムとし、
データ記憶手段107をファイルとする。
The command input means 101, the node information input means 102, the data input means 103, the summary calculation means 104, the symbol key addition means 105, and the data output means 106 are computer programs, and the respective command input programs are used. , Node information input program, data input program, summary calculation program, symbol key addition program, data output program,
The data storage means 107 is a file.

【0027】多階層サマリデータの階層数が3で、図3
のようなノードの木構造をもつ例をとって説明する。
The number of layers of the multi-level summary data is 3, and
An example having a tree structure of nodes such as

【0028】コマンド入力には、入力ファイル名と出力
ファイル名を指定する。
In the command input, an input file name and an output file name are designated.

【0029】図3で、ノード番号1の“全国”がノード
番号2の“関東”と、ノード番号3の“東京”と、ノー
ド番号4“神奈川”と、ノード番号5の“中部”と、ノ
ード番号6の“愛知”と、ノード番号7の“静岡”で構
成される地域軸を考える。
In FIG. 3, “Nationwide” with node number 1 is “Kanto” with node number 2, “Tokyo” with node number 3, “Kanagawa” with node number 4, and “Chubu” with node number 5, Consider a regional axis composed of node number 6 “Aichi” and node number 7 “Shizuoka”.

【0030】以上のノードの構成では入力データは、
“東京・10”、“神奈川・20”、“愛知・30”、
“静岡・40”の4レコードである。(図5)また、サ
マリデータは図4に示すようにノード番号とレコード部
分とで構成されている。
In the above node configuration, the input data is
"Tokyo 10", "Kanagawa 20", "Aichi 30",
There are 4 records of "Shizuoka 40". (FIG. 5) Further, the summary data is composed of a node number and a record part as shown in FIG.

【0031】“東京・10”のレコードが入力される
と、まずノード番号3を記憶しておき、次にレコードの
データ部“10”をサマリ演算プログラムによって2レ
ベルの演算領域に格納する。
When the record "Tokyo 10" is input, the node number 3 is stored first, and then the data portion "10" of the record is stored in the 2-level operation area by the summary operation program.

【0032】“神奈川・20”のレコードを入力する
と、ノード番号4を記憶しておき、ノード情報入力プロ
グラムに現レコード“神奈川”のノード番号4を出力
し、現ノードである“関東”のノード番号2を入力す
る。サマリ演算プログラムで、親ノードが等しいか判定
する。親ノードのノード番号が2で等しいので、サマリ
演算プログラムの2レベルの演算領域で前データ“1
0”と現データ“20”の演算を行う。
When the record "Kanagawa / 20" is input, the node number 4 is stored, the node number 4 of the current record "Kanagawa" is output to the node information input program, and the node of the current node "Kanto" is output. Enter the number 2. The summary calculation program determines whether the parent nodes are the same. Since the node number of the parent node is equal to 2, the previous data “1” is set in the 2-level operation area of the summary operation program.
0 "and the current data" 20 "are calculated.

【0033】次に“愛知・30”を入力すると、ノード
番号6を記憶し、ノード情報入力プログラムに現レコー
ド“愛知”のノード番号6を出力し、親ノードである
“中部”のノード番号5を入力する。サマリ演算プログ
ラムで、親ノードが等しいかどうか判定する。親ノード
のノード番号が5であり、前データの親ノードと異なる
ので、記号化キー付与プログラムによって、サマリ演算
プログラムで演算されたサマリデータ“30”に、新し
い記号化キーを地域軸が“東京”と“神奈川”の親ノー
ド“関東”で、“関東・30”(2)と付加し、データ
出力プログラムによって、ファイルに出力し、1レベル
の演算領域に演算されたサマリデータ“30”を足し込
む。次にレベルを1つアップし、現レコードを“中部”
として、ノード情報入力プログラムにそのノード番号5
を出力し、親ノード“全国”のノード番号1を入力す
る。サマリ演算プログラムで親ノードが等しいかどうか
を判定する。親ノードのノード番号が1で等しいので、
サマリ演算プログラムの1レベルの演算領域は保持し、
2レベルの演算領域はクリアする。その後、サマリ演算
プログラムの2レベルの演算領域に現データ“愛知・3
0”のデータ部“30”を出力する。
Next, when "Aichi.30" is input, the node number 6 is stored, the node number 6 of the current record "Aichi" is output to the node information input program, and the node number 5 of the parent node "Chubu" is output. Enter. The summary calculation program determines whether the parent nodes are equal. Since the node number of the parent node is 5, which is different from the parent node of the previous data, a new symbol key is added to the summary data “30” calculated by the symbol calculation key addition program by the summary calculation program by the region axis “Tokyo”. In the parent node "Kanto" of "" and "Kanagawa", add "Kanto30" (2), output to a file by the data output program, and output the summary data "30" to the one-level operation area. Add in. Next level up by one and the current record is "Chubu"
As the node number 5 in the node information input program
Is output, and the node number 1 of the parent node “national” is input. The summary calculation program determines whether the parent nodes are equal. Since the node number of the parent node is 1 and equal,
Hold the 1-level operation area of the summary operation program,
The 2-level calculation area is cleared. After that, the current data "Aichi-3
The data part "30" of 0 "is output.

【0034】次に“静岡・40”を入力すると、ノード
番号7を記憶しておき、ノード情報入力プログラムに現
レコード“静岡”のノード番号7を出力し、親ノードで
ある“中部”のノード番号5を入力する。サマリ演算プ
ログラムで、親ノードが等しいかどうか判定する。親ノ
ードが5で等しいので、前データ“30”と演算を行
う。この結果、サマリ演算プログラムの2レベルの演算
領域には“70”が出力される。
Next, when "Shizuoka / 40" is input, the node number 7 is stored, the node number 7 of the current record "Shizuoka" is output to the node information input program, and the parent node "Chubu" node is output. Enter the number 5. The summary calculation program determines whether the parent nodes are equal. Since the parent nodes are equal to 5, the operation is performed with the previous data “30”. As a result, "70" is output to the 2-level operation area of the summary operation program.

【0035】次にEOFが返ると、入力ファイルをクロ
ーズし、EOFにはノード番号として0が割り当てられ
ているので、その親のノードは従来のものとは決して一
致しないものになる。記号化キー付与プログラムによっ
て、演算されたデータ“70”に、新しい記号化キーを
地域軸が“愛知”と“静岡”の親ノード“中部”で、
“中部・70”(5)と付加し、データ出力プログラム
によって、ファイルに出力し、1レベルの演算領域に演
算されたサマリデータ“70”を足し込む。次にレベル
を1つアップし、記号化キー付与プログラムによって、
演算されたデータ“100”に新しい記号化キーを地域
軸が“関東”と“中部”の親ノード“全国”で、“全国
・100”(1)と付加し、データ出力プログラムによ
って、ファイルに出力する。(図6)以上の処理によ
り、全てのノードの組み合わせのサマリデータが生成さ
れる。このようにして本実施例においては従来例に比較
して、多階層ノード間の関連情報をもとにサマリデータ
演算の削減が可能となり高速化を達成することができ
る。
Next, when EOF is returned, the input file is closed, and since EOF is assigned 0 as the node number, the parent node will never match the conventional one. A new symbol key is added to the data "70" calculated by the symbol key addition program at the parent node "Chubu" of the regional axes "Aichi" and "Shizuoka".
"Chubu-70" (5) is added, and the data output program outputs the data to a file and adds the calculated summary data "70" to the one-level operation area. Next, increase the level by one, and by the encoding key addition program,
A new symbol key is added to the calculated data "100" at the parent node "national" where the regional axes are "Kanto" and "Chubu", and "national 100" (1) is added to the file by the data output program. Output. (FIG. 6) Through the above processing, summary data of combinations of all nodes is generated. As described above, in the present embodiment, as compared with the conventional example, it is possible to reduce the calculation of the summary data based on the related information between the multi-layer nodes and to achieve the speedup.

【0036】[0036]

【発明の効果】以上説明したように、本発明は、多階層
を構成するノードの相互の関連を表現する情報をデータ
記憶手段に格納しておき、入力した2ノードについて上
位のノードが同一かどうかをノード情報入力手段の情報
を元にサマリ演算手段で判定し、1つ前に入力したデー
タと現在入力したデータの上位のノードが同一かどうか
によって、同一のときは上位のサマリ演算を施し、異な
るときは既に求めたサマリ演算結果を出力するようにし
たので、データの入出力を減らし高速化することができ
る効果がある。
As described above, according to the present invention, information expressing the mutual relation of the nodes forming the multi-layer is stored in the data storage means, and whether the upper two nodes are the same as the input two nodes. Whether or not the higher-order node of the previously input data and the currently input data is the same is determined by the summary operation means based on the information of the node information input means, and if the same, the higher-order summary operation is performed. When different, the already-calculated summary calculation result is output, so that there is an effect that data input / output can be reduced and the speed can be increased.

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

【図1】本発明の一実施例による多階層サマリデータの
生成方式の構成図である。
FIG. 1 is a configuration diagram of a multi-layer summary data generation method according to an embodiment of the present invention.

【図2】図1に示すサマリ演算手段の処理のフローチャ
ートである。
FIG. 2 is a flowchart of processing of a summary calculation means shown in FIG.

【図3】本発明のサマリデータのノード構造の一例を示
す図である。
FIG. 3 is a diagram showing an example of a node structure of summary data according to the present invention.

【図4】本発明のサマリデータの構造の一例を示す図で
ある。
FIG. 4 is a diagram showing an example of a structure of summary data of the present invention.

【図5】図3に示すサマリデータのキーの内容を示す図
である。
5 is a diagram showing contents of keys of the summary data shown in FIG.

【図6】図5に示すキーにより作成したサマリデータを
示す図である。
FIG. 6 is a diagram showing summary data created by the keys shown in FIG.

【図7】従来の領域の演算方法の領域分割図で、(a)
は分解形状、(b)は木構造を示す。
FIG. 7 is an area division diagram of a conventional area calculation method, (a)
Shows a decomposed shape, and (b) shows a tree structure.

【図8】従来の領域演算の説明図で、(a)はメモリ構
造、(b),(c)は分解形状を示す。
FIG. 8 is an explanatory diagram of a conventional area calculation, in which (a) shows a memory structure, and (b) and (c) show decomposed shapes.

【符号の説明】[Explanation of symbols]

101 コマンド入力手段 102 ノード情報入力手段 103 データ入力手段 104 サマリ演算手段 105 記号化キー付与手段 106 データ出力手段 107 データ記憶手段 101 Command Input Means 102 Node Information Input Means 103 Data Input Means 104 Summary Computation Means 105 Symbolization Key Adding Means 106 Data Output Means 107 Data Storage Means

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 個々の素データを類別し、類別後の同一
集団についてサマリ演算を施して得られたデータをサマ
リデータとし、類別された集団が更に上位の集団の要素
となるようにして多レベルの階層を構成している多階層
サマリデータを生成する方式において、 入力データとして素データ、および出力データとして求
めたサマリデータの先頭にノード番号を識別するための
記号化キーを付加した記号化キー付データを格納するデ
ータ記憶手段と、 前記データ記憶手段から素データを1件ごとに入力し、
入力データ終了時にはEOFを出力するデータ入力手段
と、 データを入力するための入力ファイル名とデータを出力
するための出力ファイル名を指定するコマンド入力手段
と、 記号化キー付与手段から記号化キー付データを入力し前
記データ記憶手段に出力データ出力手段と、 あるノードのノード番号を入力し該ノードの親のノード
番号を返すノード情報入力手段と、 サマリ演算手段から入力したサマリ演算結果と前データ
の親のノード番号から新しく記号化キーを作成し、 前記演算結果に新しく記号化キー付データを付加しデー
タ出力手段に出力する記号化キー付与手段と、 前記データ入力手段から素データをEOFが返るまで1
件ずつ入力し、記憶していた前データと現データのノー
ド番号を前記ノード情報入力手段に出力しそのノードの
親のノード番号を入力して該2つのノードの各親のノー
ド番号が等しいときはデータを演算規則に従ってサマリ
演算を行い、等しくないときはそれまでサマリ演算した
演算結果と前データの親のノード番号を前記記号化キー
付与手段に出力するサマリ演算手段を有することを特徴
とする多階層サマリデータ生成方式。
1. The data obtained by classifying individual raw data and performing a summary operation on the same group after classification is used as summary data, and the classified group becomes a higher-order group element and is then made into a large number. In the method to generate multi-level summary data that configures the hierarchy of levels, the raw data as input data and the summary data obtained as output data are symbolized by adding a symbol key to identify the node number at the beginning. Data storage means for storing keyed data, and raw data is input from the data storage means one by one,
Data input means for outputting EOF at the end of input data, command input means for designating an input file name for inputting data and an output file name for outputting data, and a symbol key attaching means for attaching a symbol key Output data output means for inputting data to the data storage means, node information input means for inputting the node number of a certain node and returning the node number of the parent of the node, summary operation result and previous data input from the summary operation means A new symbolic key is created from the parent node number of, the symbolic key attaching means for newly adding the symbolic keyed data to the operation result and outputting the data to the data output means, and the raw data from the data input means 1 to return
When the node numbers of the previous data and the current data that have been stored are output to the node information input means and the parent node number of the node is input and the node numbers of the respective parents of the two nodes are equal Has a summary calculation means for performing a summary calculation on the data according to the calculation rule, and outputting the calculation result obtained by the summary calculation until that time and the node number of the parent of the previous data to the encoding key giving means when the data are not equal. Multi-level summary data generation method.
【請求項2】 前記サマリ演算手段において、現在のレ
ベルを表わすレベルカウントを行い各レベル毎にデータ
記憶手段上にサマリ演算結果記憶領域を用意し、2つの
ノードの各親ノード番号の比較が等しくない場合、演算
結果を前記記号化キー付与手段によってキーを付加した
のちデータ出力手段によりデータ記憶手段に格納し、前
記レベルカウントを1レベル上げ1レベル下位の記憶領
域を現レベルの記憶領域に足し込み、1レベル下位の記
憶領域に素データを記憶する演算処理を行うことを特徴
とする請求項1に記載の多階層サマリデータ生成方式。
2. The summary calculation means counts the level representing the current level, prepares a summary calculation result storage area on the data storage means for each level, and compares the parent node numbers of two nodes equally. If not, the operation result is stored in the data storage means by the data output means after adding the key by the symbolization key provision means, and the level count is increased by one level and the storage area lower by one level is added to the storage area of the current level. 2. The multi-layer summary data generation method according to claim 1, wherein the arithmetic processing is performed to store the raw data in a storage area lower by one level.
【請求項3】 前記EOFには前記親ノード番号とは決
して一致しない0のノード番号を割り当て前記データ入
力手段からEOFが返った場合、演算結果を前記記号化
キー付与手段によってキーを付加したのちデータ出力手
段によりデータ記憶手段に格納し、前記レベルカウント
を1レベル上げ1レベル下位の記憶領域を現レベルの記
憶領域に足し込み、前記レベルカウントが最上位レベル
に達した場合に前記データ記憶手段をクローズする演算
処理を行うことを特徴とする請求項1又は2に記載の多
階層サマリデータ生成方式。
3. A node number of 0 which never matches the parent node number is assigned to the EOF, and when the EOF is returned from the data input means, a key is added to the calculation result by the encoding key giving means. The data storage means stores the data in the data storage means, increases the level count by one level, adds a storage area of one level lower to the storage area of the current level, and outputs the data storage means when the level count reaches the highest level. 3. The multi-layer summary data generation method according to claim 1 or 2, characterized in that a calculation process for closing is performed.
JP5023217A 1993-01-19 1993-01-19 Multi-level summary data generation method Expired - Fee Related JP2665120B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5023217A JP2665120B2 (en) 1993-01-19 1993-01-19 Multi-level summary data generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5023217A JP2665120B2 (en) 1993-01-19 1993-01-19 Multi-level summary data generation method

Publications (2)

Publication Number Publication Date
JPH06215028A true JPH06215028A (en) 1994-08-05
JP2665120B2 JP2665120B2 (en) 1997-10-22

Family

ID=12104497

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5023217A Expired - Fee Related JP2665120B2 (en) 1993-01-19 1993-01-19 Multi-level summary data generation method

Country Status (1)

Country Link
JP (1) JP2665120B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6019249A (en) * 1983-07-13 1985-01-31 Nec Corp Control system of summary information
JPH03252868A (en) * 1990-03-02 1991-11-12 Fujitsu Ltd Revision number control processing system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6019249A (en) * 1983-07-13 1985-01-31 Nec Corp Control system of summary information
JPH03252868A (en) * 1990-03-02 1991-11-12 Fujitsu Ltd Revision number control processing system

Also Published As

Publication number Publication date
JP2665120B2 (en) 1997-10-22

Similar Documents

Publication Publication Date Title
Pemantle et al. Analytic combinatorics in several variables
Engelfriet Some open questions and recent results on tree transducers and tree languages
Schulz et al. Performance of clause selection heuristics for saturation-based theorem proving
CN107103050A (en) A kind of big data Modeling Platform and method
US5787010A (en) Enhanced dynamic programming method for technology mapping of combinational logic circuits
Haken et al. An exponential lower bound for the size of monotone real circuits
US10402175B2 (en) Parsing source code into a linear array
JPH0877010A (en) Method and device for data analysis
Mishchenko An introduction to zero-suppressed binary decision diagrams
Wang Big data algebra (BDA): a denotational mathematical structure for big data science and engineering
Fitting et al. Beyond two: Theory and applications of multiple-valued logic
US9536029B2 (en) Linear array hierarchy navigation
Bartlett et al. An ordering heuristic to develop the binary decision diagram based on structural importance
Weigel et al. Compiling constraint satisfaction problems
WO2006038498A1 (en) Arrangement generation method and arrangement generation program
CN111475511A (en) Data storage method, data access method, data storage device, data access device and data access equipment based on tree structure
JPH06215028A (en) Multi-level summary data generating system
Sasao et al. Applications of zero-suppressed decision diagrams
Rojo et al. GaCoVi: a Correlation Visualization to Support Interpretability-Aware Feature Selection for Regression Models.
Kuchuk et al. Method of building the semantic network of distributed search in e-learning
Zafar et al. Classification of reusable components based on clustering
Magdalena et al. Hierarchical computable aggregations
Heavey et al. A model management systems approach to manufacturing systems design
Zabezhailo Some capabilities of enumeration control in the DSM method. Part two
Akadal et al. A Novel Automatic Relational Database Normalization Method

Legal Events

Date Code Title Description
S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20080620

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20090620

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20100620

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20100620

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20110620

Year of fee payment: 14

LAPS Cancellation because of no payment of annual fees