JP2964831B2 - Structural data processing device - Google Patents
Structural data processing deviceInfo
- Publication number
- JP2964831B2 JP2964831B2 JP5096676A JP9667693A JP2964831B2 JP 2964831 B2 JP2964831 B2 JP 2964831B2 JP 5096676 A JP5096676 A JP 5096676A JP 9667693 A JP9667693 A JP 9667693A JP 2964831 B2 JP2964831 B2 JP 2964831B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- depth
- structural
- component
- input
- 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.)
- Expired - Fee Related
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9027—Trees
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99941—Database schema or data structure
- Y10S707/99942—Manipulating data structure, e.g. compression, compaction, compilation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99941—Database schema or data structure
- Y10S707/99944—Object-oriented database structure
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Document Processing Apparatus (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、木構造をなす構造デー
タを処理する構造データ処理装置に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a structural data processing apparatus for processing structural data having a tree structure.
【0002】[0002]
【従来の技術】木構造をなす構造データの表現方法の一
つとして、構成要素を深さ優先の順序に並べ、構成要素
の構造上の位置情報を数値列で表現することが行なわれ
ている。一般に広く知られている方法としては、同じ深
さ、すなわち、兄弟関係を数値で表現し、この数値を各
深さ毎に設けて数値列の形で表現する方式が知られてい
る。この数値列中の各数値が、各深さにおける順位を表
現することになる。この表現方式では、深さの大きな構
成要素の位置情報は、数値列中の数値の個数が多いこと
になる。具体的な例は、ISO8613ODA(Ope
n Document Architecture)で
示された「オブジェクト識別子」である。2. Description of the Related Art As one method of expressing structural data having a tree structure, components are arranged in a depth-first order, and structural position information of the components is represented by a numerical sequence. . As a generally well-known method, there is known a method of expressing the same depth, that is, a sibling relationship by a numerical value, and providing this numerical value for each depth and expressing the numerical value in the form of a numerical sequence. Each numerical value in the numerical value sequence represents a rank at each depth. In this expression method, the position information of a component having a large depth has a large number of numerical values in a numerical value sequence. A specific example is ISO8613 ODA (Open
n Document Architecture).
【0003】図11は、従来の構造データの表現方式の
説明図である。図11(B)には、木構造のデータの一
例を示しており、木構造の構成要素を「○」で示してい
る。この木構造では、根レベルの構成要素の下層には、
3つの子供レベルとなる構成要素が存在し、子供レベル
の左端の構成要素の下層には、孫レベルの2つの構成要
素が、子供レベルの右端の構成要素の下層には、孫レベ
ルの3つの構成要素が存在している。このような、木構
造のデータを表現する方法として、例えば、図11
(A)に示すような、シーケンシャルデータで表現する
ことができる。この例では、シーケンシャルデータ内の
「[」と「]」で囲まれたデータが構成要素を表す。
「[」と「]」で囲まれたデータのうちの最初の「/」
で区切られた数値列は、構造上の位置情報であり、次の
「@」は構造データ内の構成要素に付帯する識別子など
の属性情報を表す。最後の文字列は構成要素の名前であ
り、ない場合もある。この構成要素を表すデータは、固
定長データであっても、可変長データであってもよい。FIG. 11 is an explanatory diagram of a conventional structure data expressing method. FIG. 11B shows an example of tree-structured data, in which the components of the tree structure are indicated by “O”. In this tree structure, below the root level components are:
There are three child-level components, two grandchild-level components below the leftmost component of the child level, and three grandchild-level components below the rightmost component of the child level. Component is present. As a method of expressing such tree-structured data, for example, FIG.
It can be represented by sequential data as shown in FIG. In this example, data enclosed by "[" and "]" in the sequential data represents a component.
First "/" in data enclosed in "[" and "]"
Numerical strings separated by are positional information on the structure, and the next “@” represents attribute information such as an identifier attached to a component in the structural data. The last string is the name of the component, which may or may not be present. The data representing this component may be fixed-length data or variable-length data.
【0004】構造上の位置情報である数値列は、各数値
が深さごとの位置情報を表している。このとき、数値列
は前から順に根からの深さを表している。例えば、1番
目の数値は根の深さ、2番目の数値は根の子どもの深さ
を表している。つまり、数値列の数値の個数は深さを表
している。ここで順序は0番から始まるものとする。ま
た、この数値列の各数値は兄弟の構成要素の順序を表し
ている。このようにして、位置情報から構造上の位置を
決定する。例えば、図11(A)に示したシーケンシャ
ルデータのうち、「[0/2/1@孫1]」の位置情報
を示す数値列「0/2/1」は、根レベルの0番目の構
成要素「根0」の下層、すなわち、子供レベルの2番目
の構成要素「子供2」のさらに下層、すなわち、孫レベ
ルの1番目の位置に構成要素「孫1」が位置することを
表している。[0004] In a numerical sequence, which is structural positional information, each numerical value represents positional information for each depth. At this time, the numerical sequence represents the depth from the root in order from the front. For example, the first number indicates the depth of the root, and the second number indicates the depth of the child at the root. That is, the number of numerical values in the numerical sequence represents the depth. Here, it is assumed that the order starts from number 0. Also, each numerical value in this numerical sequence represents the order of the sibling constituent elements. In this way, the position on the structure is determined from the position information. For example, in the sequential data shown in FIG. 11A, the numerical value sequence “0/2/1” indicating the position information of “[0/2/1 @ grandchild 1]” is the 0th configuration of the root level. This represents that the component "grandchild 1" is located at a lower layer of the element "root 0", that is, a lower layer of the second component "child 2" of the child level, that is, at the first position of the grandchild level. .
【0005】このように、図11(B)に示した木構造
のデータを、図11(A)に示すような、見かけ上、シ
ーケンシャルのデータとして扱うことにより、木構造の
構造データを直接扱えない外部装置を利用することが可
能となる。例えば、特開平4−84342号公報に記載
されているように、木構造のデータを扱えない、通常の
データ管理システムを利用して、木構造のデータを格納
することができるようになる。[0005] In this way, by treating the tree-structured data shown in FIG. 11 (B) as apparently sequential data as shown in FIG. 11 (A), the tree-structured data can be directly handled. It is possible to use external devices that are not available. For example, as described in Japanese Patent Application Laid-Open No. 4-84342, it is possible to store tree-structured data using a normal data management system that cannot handle tree-structured data.
【0006】図10は、従来の構造データ処理装置のブ
ロック図である。図中、1は構造データ処理装置、2は
データ入力手段、3は構造データ加工手段、4は編集手
段、5は検索手段、6は表示手段、7は入力手段、8は
データ出力手段、10は外部装置である。構造データ処
理装置1は、データ入力手段2、構造データ加工手段
3、表示手段6、入力手段7、データ出力手段8を有す
る。図11(A)に示したようなシーケンシャルデータ
を、データ格納装置やデータ転送装置などの外部装置1
0から構造データとして入力し、図11(B)に示した
ような木構造の構造データとして加工処理し、図11
(A)に示したようなシーケンシャルデータとして出力
する。こうして、見かけ上、シーケンシャルデータによ
り入出力を行なうことにより、構造データを直接扱えな
い外部装置も利用可能となる。FIG. 10 is a block diagram of a conventional structured data processing apparatus. In the figure, 1 is a structural data processing device, 2 is data input means, 3 is structural data processing means, 4 is editing means, 5 is search means, 6 is display means, 7 is input means, 8 is data output means, 10 Is an external device. The structural data processing device 1 includes a data input unit 2, a structural data processing unit 3, a display unit 6, an input unit 7, and a data output unit 8. The sequential data as shown in FIG. 11A is transferred to an external device 1 such as a data storage device or a data transfer device.
0 is input as structural data, processed as tree-structured data as shown in FIG.
It is output as sequential data as shown in FIG. In this way, by inputting / outputting apparently sequential data, an external device which cannot directly handle structural data can be used.
【0007】データ入力手段2は、図11(A)に示す
ようなシーケンシャルデータを外部装置10から入力
し、図11(B)に示すような木構造の構造データに変
換して構造データ加工手段3に出力する。同様に、デー
タ出力手段8は、構造データ加工手段3から図11
(B)に示すような構造データを入力し、図11(A)
に示すようなシーケンシャルデータに変換して外部装置
10に出力する。The data input means 2 receives the sequential data as shown in FIG. 11A from the external device 10 and converts the data into a tree structure data as shown in FIG. Output to 3. Similarly, the data output means 8 transmits data from the structural data processing means 3 to FIG.
Input the structure data as shown in FIG.
Is converted to sequential data as shown in FIG.
【0008】構造データ加工手段3は、編集手段4や、
検索手段5、その他構造データの処理手段等を有し、表
示手段6への情報の表示および入力手段7からの入力デ
ータの処理なども行なう。The structural data processing means 3 includes an editing means 4,
It has a search means 5, other processing means for structural data, etc., and also displays information on the display means 6 and processes input data from the input means 7.
【0009】構造データ処理装置1の動作は大きく3つ
に分けることができる。それは、データの入力、加工、
出力である。次にこの3つの動作を順に説明する。The operation of the structural data processing apparatus 1 can be roughly divided into three. It involves data entry, processing,
Output. Next, these three operations will be described in order.
【0010】データ入力動作は、例えばデータ転送装置
やデータ格納装置など、構造データをそのままでは扱え
ない外部装置10から、深さ優先の順に並べられている
構造データの構成要素をシーケンシャルデータとしてデ
ータ入力手段2に入力する。可変長の数値列で表された
データ内の位置情報から、構造上の位置を一意に決定
し、その後入力されたデータ、例えば、図11(A)の
「@」以降のデータから構造データの構成要素を生成
し、その構成要素を先の構造データ内の位置に組み込
む。The data input operation is performed by, for example, inputting the structural elements of the structural data arranged in the depth-first order as sequential data from an external device 10 that cannot directly handle the structural data, such as a data transfer device or a data storage device. Input to means 2. The position in the structure is uniquely determined from the position information in the data represented by the variable-length numerical string, and the structure data is converted from the input data, for example, the data after “@” in FIG. Generate a component and incorporate the component into a location in the previous structure data.
【0011】データの加工は、入出力以外の構造データ
各種団3に組み込まれているあらゆる手段を利用して、
編集、印刷などを行なう。目的に合わせて適宜、手段を
追加して、特殊な加工処理も実現可能である。例えば、
編集は、表示手段6に表示された対象データを入力手段
7で選択して、移動,削除,コピーなどを、編集手段4
によって行なう。編集には、構造データに対する構造操
作と構造データの内容に対する内容操作とがある。構造
の編集には構造編集手段を、構成要素の内容の編集には
内容編集手段を適宜用意することになる。例えば、構造
内の構成要素を検索するためには、検索手段5が必要と
なる。Data processing is performed by using any means incorporated in the structural data group 3 other than input / output.
Edit, print, etc. Special processing can be realized by adding means as appropriate for the purpose. For example,
Editing is performed by selecting target data displayed on the display means 6 with the input means 7 and moving, deleting, copying, etc., using the editing means 4.
Performed by Editing includes a structure operation on the structure data and a content operation on the contents of the structure data. A structure editing means is appropriately prepared for editing the structure, and a content editing means is appropriately prepared for editing the contents of the constituent elements. For example, to search for a component in a structure, a search unit 5 is required.
【0012】データの出力動作は、データ転送装置やデ
ータ格納装置など構造データを、そのままでは扱えない
外部装置10へシーケンシャルデータとして出力する。
つまり、データ出力手段8によって、まずデータ内の位
置情報を可変長の数値列に変換して構成要素に付与す
る。そして、構造データの構成要素を深さ優先の順に出
力可能なシーケンシャルデータに変換して外部装置10
へ出力する。In the data output operation, structural data such as a data transfer device or a data storage device is output as sequential data to an external device 10 that cannot be handled as it is.
That is, the data output unit 8 first converts the position information in the data into a variable-length numerical sequence and adds it to the constituent elements. Then, the components of the structure data are converted into sequential data which can be output in the order of depth priority, and the external device 10
Output to
【0013】深さ優先の順に構成要素を出力する手順
は、一般的に知られている。まず、木構造の根となる構
成要素の位置情報を、0が1つからなる数値列とする。
根の位置情報および属性情報を出力したら、子供が存在
するときは、子供の位置情報を作成し、出力する。さら
に子供があるときは再帰的に繰り返す。子供の位置情報
は、先の構成要素より1つ深さが深いので、まず位置情
報に値0の数値を追加する。子供が複数のときは、追加
した最後の数値を増加し、0から順に数値を割り振る。
例えば、構成要素「0/2」の子供は「0/2/0」
「0/2/1」という具合である。The procedure for outputting components in depth-first order is generally known. First, the position information of the component that is the root of the tree structure is set as a numerical sequence of 0s.
After the root position information and the attribute information are output, if there is a child, the child position information is created and output. If there are more children, repeat recursively. Since the position information of the child is one deeper than the previous component, a numerical value of 0 is first added to the position information. When there are a plurality of children, the last numerical value added is increased, and numerical values are sequentially allocated from 0.
For example, the child of the component “0/2” is “0/2/0”
It is "0/2/1".
【0014】上述のような位置情報が付帯する構成要素
の構造上の深さに依存した可変長データを用いた場合、
数値の個数のデータもしくは数値列の区切りを示すため
のデータが必要となる。さらに、構造上の深さに依存し
てデータ量が大きくなるという欠点がある。この不利益
は、転送、比較、格納など、あらゆるデータ処理につき
まとう問題である。一般に装置内部での処理に比べて、
外部とのデータ転送は処理時間がかかる。さらに、デー
タ転送の処理時間は、データ量にほぼ比例する。そのた
め、転送するデータ量が大きくなると、転送時間がかか
ることになる。また、データ量が大きいと、占有するメ
モリを多く必要とする。すると、一度に処理できる情報
量が少なくなる。さらに、情報量に比べて、データ量が
大きくなるので、データ格納装置に多くの情報を格納で
きない。データ保存のために高価で大容量のデータ格納
装置を用意しなければならない等、種々の問題がある。In the case where variable length data depending on the structural depth of the component accompanied by the position information as described above is used,
Data of the number of numerical values or data for indicating a break of a numerical string is required. Further, there is a disadvantage that the data amount increases depending on the structural depth. This disadvantage is a problem with all data processing, such as transfer, comparison, and storage. Generally, compared to processing inside the device,
Data transfer with the outside takes processing time. Further, the processing time of the data transfer is almost proportional to the data amount. Therefore, if the amount of data to be transferred is large, it takes a long time to transfer. Also, when the data amount is large, a large amount of memory is required. Then, the amount of information that can be processed at one time decreases. Further, since the data amount is larger than the information amount, much information cannot be stored in the data storage device. There are various problems, such as the need to prepare an expensive and large-capacity data storage device for storing data.
【0015】ここで、簡単な例でデータ量を考察してみ
る。例えば、根を深さ0として、深さ10の二分木の構
造を表現することを考える。便宜上、数値1つを1バイ
ト、終端も1バイトとする。根の位置情報に必要なデー
タ量は終端と合わせてたかだか2バイトである。末端、
すなわち、深さ10の構成要素の位置情報は、数値が1
1個となり、終端と合わせて12バイト必要となる。ま
た、末端の構造要素の個数は、210=1024=1キロ
個であるから、末端の構成要素全部に必要な容量は12
バイト×1キロ個=12キロバイトである。同様にし
て、他の深さの構成要素に必要な位置情報を総計する
と、深さ10の二分木では2キロ個の構成要素の構造を
表現するために、22キロバイト必要となる。Here, the data amount will be considered with a simple example. For example, let us consider expressing the structure of a binary tree having a depth of 10 with the root at a depth of 0. For convenience, one numerical value is 1 byte, and the end is 1 byte. The data amount necessary for the root position information is at most 2 bytes including the end. End,
That is, the position information of the component having a depth of 10 has a numerical value of 1
It becomes one, and 12 bytes are required including the end. Since the number of structural elements at the end is 2 10 = 1024 = 1 kilo, the capacity required for all the structural elements at the end is 12
Byte x 1 kilobyte = 12 kilobytes. Similarly, when the positional information required for components at other depths is summed up, a binary tree with a depth of 10 requires 22 kilobytes to represent the structure of 2 kilo components.
【0016】同様にして、深さ20の二分木では、2メ
ガ個の構成要素の構造を表現するために、42メガバイ
ト必要となる。すべての構成要素の位置情報は、先頭の
数値が0であるので、省略することが可能である。それ
でも、深さ10の二分木で20キロバイト、深さ20の
二分木で40メガバイトが必要となる。Similarly, a binary tree having a depth of 20 requires 42 megabytes to express the structure of 2 mega components. The position information of all the constituent elements can be omitted because the leading numerical value is 0. Still, a 10-deep binary tree requires 20 kilobytes and a 20-deep binary tree requires 40 megabytes.
【0017】実際には、数値1つを1バイトで表現して
いたのでは、255個の兄弟しか表現できない。これ
は、階層データベースのように同じ形式の大容量のデー
タを扱う場合には、大きな制限となってしまう。数値1
つを2バイトにすると、深さ10の二分木では40キロ
バイト、深さ20の二分木で80メガバイトも必要とな
る。Actually, if one numerical value is expressed by one byte, only 255 siblings can be expressed. This is a great limitation when handling large volumes of data in the same format, such as a hierarchical database. Number 1
If each is 2 bytes, a binary tree having a depth of 10 requires 40 kilobytes, and a binary tree having a depth of 20 requires 80 megabytes.
【0018】近年のデータ圧縮技術では、データ圧縮率
は2分の1から最大で10分の1程度である。このデー
タ圧縮技術を用いたとしても、深さ10の二分木では4
キロバイト、深さ20の二分木で8メガバイトも必要と
なる。なお、このようなデータ圧縮/展開装置を組み込
む場合には、システム全体としてコストがかかるという
問題もある。In recent data compression techniques, the data compression ratio is about half to a maximum of about one tenth. Even with this data compression technique, a binary tree with a depth of 10
A binary tree with a depth of 20 kilobytes would require 8 megabytes. In addition, when such a data compression / decompression device is incorporated, there is also a problem that the cost is increased as a whole system.
【0019】[0019]
【発明が解決しようとする課題】本発明は、上述した状
況を鑑みてなされたもので、外部装置との入出力を行な
う際に用いるシーケンシャルデータのデータ量を減少さ
せることのできる構造データ処理装置を提供することを
目的とするものである。SUMMARY OF THE INVENTION The present invention has been made in view of the above situation, and has a structure data processing apparatus capable of reducing the amount of sequential data used when performing input / output with an external device. The purpose is to provide.
【0020】[0020]
【課題を解決するための手段】本発明は、請求項1に記
載の発明においては、木構造をなす構造データを処理す
る構造データ処理装置において、構造データのノードと
なる構成要素が構造上の深さ情報を数値データとして有
し、深さ優先の順序に並べられたシーケンシャルデータ
が入力され木構造のデータに変換するデータ入力手段
と、データ入力手段により変換の際に入力されたシーケ
ンシャルデータの構成要素の構造上の深さ情報が示す数
値に基づいて該構成要素の親となる構成要素を探索し構
造位置を決定する構造位置決定手段を有することを特徴
とするものである。According to a first aspect of the present invention, in a structure data processing apparatus for processing a structure data having a tree structure, a structural element serving as a node of the structure data is structured. A data input unit that has depth information as numerical data, and receives sequential data arranged in a depth-first order and converts the data into a tree-structured data; and a data input unit that converts the sequential data input during the conversion. The present invention is characterized in that it has a structure position determining means for searching for a parent component of the component based on a numerical value indicated by structural depth information of the component and determining a structure position.
【0021】また、請求項2に記載の発明においては、
木構造をなす構造データを処理する構造データ処理装置
において、木構造のデータに基づき深さ優先の順序で構
成要素をたどって該構成要素ごとに構造上の位置情報と
して数値の深さ情報を持たせてシーケンシャルデータを
生成し該シーケンシャルデータを出力するデータ出力手
段を有することを特徴とするものである。Further, in the second aspect of the present invention,
In a structural data processing apparatus for processing structural data having a tree structure, components are traced in a depth-first order based on the tree structure data, and each of the components has numerical depth information as structural position information. And data output means for generating sequential data and outputting the sequential data.
【0022】[0022]
【作用】本発明によれば、請求項1において、入力され
るシーケンシャルデータは、深さ優先の順で並べられて
おり、位置情報として、木構造の根、すなわち、深さ優
先の順で先頭の構成要素からの深さ情報を数値データと
して有している。データ入力手段において木構造のデー
タに変換する際に、構造位置決定手段により、入力され
たシーケンシャルデータの構造上の深さ情報が示す数値
に基づいて、その構成要素の親となる構成要素を探索
し、木構造の構造位置が決定される。このとき、同じ深
さの構成要素の位置は、深さ毎の構成要素の並び順から
構造位置を決定することができる。According to the present invention, in claim 1, the input sequential data is arranged in a depth-first order, and the position information is a root of a tree structure, that is, a head in a depth-first order. Has depth information as numerical data. When the data is converted into tree-structured data by the data input unit, the structure position determining unit searches for the parent component of the component based on the numerical value indicated by the structural depth information of the input sequential data. Then, the structure position of the tree structure is determined. At this time, as for the positions of the components having the same depth, the structural position can be determined from the arrangement order of the components for each depth.
【0023】また、請求項2において、データ出力手段
により、木構造構造データから構造の深さ情報を得て、
これに基づき深さ優先の順序で構成要素をたどって、構
成要素ごとに、構造上の位置情報として数値の深さ情報
を有するシーケンシャルデータを作成し、出力される。Further, according to the present invention, the data output means obtains structure depth information from the tree structure data,
Based on this, the components are traced in the order of depth priority, and for each component, sequential data having numerical depth information as structural position information is created and output.
【0024】これにより、外部装置との入出力に用いら
れるシーケンシャルデータは、数値の深さ情報を有して
いるだけでよいので、転送および格納時のデータ量を減
少させることができる。Thus, the sequential data used for input / output with the external device only needs to have numerical depth information, so that the data amount at the time of transfer and storage can be reduced.
【0025】[0025]
【実施例】図1は、本発明の構造データ処理装置の一実
施例を示すブロック図である。図中、図10と同様の部
分には同じ符号を付して説明を省略する。9は構造位置
決定手段である。データ入力手段2は、深さ優先の順序
に並べられ、構造上の深さ情報を有するシーケンシャル
データが入力される。入力されたシーケンシャルデータ
から得られた深さ情報と、生成途中の構造の深さの情報
を基に、構造位置決定手段9を用いて構造上の位置を決
め、木構造の構造データを生成する。また、データ出力
手段8は、木構造の構造データから、構造上の深さ情報
を有し、深さ優先の順序に並べられたシーケンシャルデ
ータを生成し、出力する。FIG. 1 is a block diagram showing an embodiment of a structural data processing apparatus according to the present invention. In the figure, the same parts as those in FIG. 9 is a structural position determining means. The data input means 2 is arranged in a depth-first order, and receives sequential data having structural depth information. Based on the depth information obtained from the input sequential data and the information on the depth of the structure being generated, the position on the structure is determined using the structure position determining means 9 to generate the tree structure data. . The data output means 8 generates and outputs sequential data having structural depth information and arranged in a depth-first order from the tree-structured structural data.
【0026】図2は、本発明で用いる構造データの表現
方式の一例の説明図である。図2(A)には、シーケン
シャルデータを示しており、また、図2(B)には木構
造のデータの一例を示している。木構造は、図11と同
様である。図2では、深さ情報を数値で表している。こ
こでは、便宜上、深さが深くなるごとに増す数値として
扱う。しかし、その必要はなく、深さを比較できるデー
タであればよい。また、例えば深さに対する値の増加率
や、文字列、配列といったデータ型などの値の表現形等
は、どのようであってもよい。図2(A)に示したシー
ケンシャルデータでは、「[」と「]」で囲まれたデー
タが構成要素を表し、「[」と「]」で囲まれたデータ
のうちの最初の数値が深さ情報、次の「@」は構成要素
の属性情報を表している。最後の文字列は構成要素の名
前であり、ない場合もある。FIG. 2 is an explanatory diagram of an example of a structure data expressing method used in the present invention. FIG. 2A shows sequential data, and FIG. 2B shows an example of tree-structured data. The tree structure is the same as in FIG. In FIG. 2, the depth information is represented by numerical values. Here, for convenience, it is treated as a numerical value that increases as the depth increases. However, there is no need to do so, as long as the data can compare depths. Further, for example, the rate of increase of the value with respect to the depth, the expression form of the value such as a data type such as a character string or an array, or the like may be any. In the sequential data shown in FIG. 2A, data enclosed by "[" and "]" represents a component, and the first numerical value of data enclosed by "[" and "]" is a depth. Information, and the next “@” represents attribute information of the component. The last string is the name of the component, which may or may not be present.
【0027】図2に示した例では、深さ情報として、根
レベルに数値0を、子供レベルに数値1を、孫レベルに
数値2を用いている。根となる要素は、深さ優先の順序
に並べたとき、最初に並べられ、深さ情報「0」、属性
情報「@」、名前「根」により構成される。また、深さ
優先の順序で並べるとき、同じ深さの要素は一定の順序
で出現するように並べられる。例えば、最も左に位置す
る要素から出現するとすれば、根の要素の次には、子供
レベルの最も左に位置する要素が並べられる。その次に
は、もしあれば、その孫レベル以降の要素が順に並べら
れる。図2に示した例では、子供レベルの最左端の要素
の下の2つの孫レベルの要素が並べられる。孫レベル以
降の要素がなくなると、次の子供レベルの要素、すなわ
ち、図2(B)の中央の子供レベルの要素が並べられ
る。さらに、図2(B)に示した要素のうち、子供レベ
ルの名前「子供2」が付されている要素が並べられ、そ
の孫レベルの要素が続く。In the example shown in FIG. 2, as depth information, a numerical value 0 is used for a root level, a numerical value 1 is used for a child level, and a numerical value 2 is used for a grandchild level. When the root element is arranged in the depth-first order, it is arranged first and is composed of depth information “0”, attribute information “@”, and name “root”. Also, when arranging in the depth-first order, elements having the same depth are arranged so as to appear in a certain order. For example, if it appears from the element at the leftmost position, the element at the leftmost position at the child level is arranged next to the element at the root. Next, elements, if any, from the grandchild level are ordered. In the example shown in FIG. 2, two grandchild-level elements below the leftmost element of the child level are arranged. When there is no element after the grandchild level, the element of the next child level, that is, the element of the middle child level in FIG. 2B is arranged. Further, among the elements shown in FIG. 2B, the elements to which the child-level name “child 2” is attached are arranged, and the grandchild-level elements follow.
【0028】図1のデータ入力手段2には、図2(A)
に示したような構造を有するシーケンシャルデータが入
力され、深さ優先順に並んでいる構成要素を図2(B)
に示すような木構造の構造データに変換する。また、デ
ータ出力手段8は、図2(B)に示したような木構造の
構造データを、深さ優先順にたどり、図2(A)に示し
たようなシーケンシャルデータを出力する。ここで、出
力する位置情報は深さ情報だけである。The data input means 2 shown in FIG.
2 (B), the sequential data having the structure as shown in FIG.
Is converted into tree-structured data as shown in FIG. The data output means 8 traces the tree-structured data as shown in FIG. 2B in the order of depth priority, and outputs sequential data as shown in FIG. 2A. Here, the output position information is only the depth information.
【0029】このようなシーケンシャルデータを用いる
ことにより、実際にどのくらいデータ量が小さくなるか
を、前述の二分木の例で考察してみる。本発明で用いる
シーケンシャルデータでは、構成要素ごとに構造上の位
置情報として深さ情報を持たせるだけである。前述の二
分木の例では、深さ情報に数値データとして4バイトを
要したとしても、深さ10の二分木で8キロバイト、深
さ20の二分木で16メガバイトで済む。実際には、深
さ情報は1バイトで十分であるので、深さ10の二分木
では2キロバイト、深さ20の二分木で2メガバイトで
済む。従来のシーケンシャルデータと比べて、深さ10
の二分木においてデータ量は20分の1、深さ20では
40分の1のデータ量となる。従来の構造データ処理装
置において、近年のデータ圧縮技術を持ってしても、深
さ10の二分木では4キロバイト、深さ20の二分木で
8メガバイトも必要であったことを考えると、本発明の
方式はデータ圧縮装置を組み込んだ従来装置よりも、デ
ータ容量の点、処理コストの点で優れていることが分か
る。もちろん、本発明の構造データ処理装置または外部
装置にデータ圧縮/展開装置を組み込むことは可能であ
る。その場合には、さらにデータ容量の点で有利にな
り、データ転送を高速に行なえることは明白である。The extent to which the amount of data is actually reduced by using such sequential data will be examined using the above-described binary tree example. In the sequential data used in the present invention, only depth information is provided as structural position information for each component. In the above example of a binary tree, even if the depth information requires 4 bytes as numerical data, a binary tree having a depth of 10 requires only 8 kilobytes and a binary tree having a depth of 20 requires 16 megabytes. Actually, one byte is sufficient for the depth information, so that a binary tree having a depth of 10 requires 2 kilobytes and a binary tree having a depth of 20 requires 2 megabytes. Compared to conventional sequential data, the depth is 10
In the binary tree, the data amount is 1/20, and when the depth is 20, the data amount is 1/40. Considering that the conventional structure data processing device requires 4 kilobytes for a binary tree with a depth of 10 and 8 megabytes for a binary tree with a depth of 20 even with the recent data compression technology, It can be seen that the method of the present invention is superior in terms of data capacity and processing cost as compared with a conventional device incorporating a data compression device. Of course, it is possible to incorporate the data compression / decompression device into the structural data processing device or the external device of the present invention. In that case, it is clear that the data capacity is further improved and the data transfer can be performed at high speed.
【0030】図1に戻り、構造データ加工手段3は、構
造データの加工処理を行なう。この構造データ加工手段
3には、編集手段4や検索手段5等、加工処理に必要な
手段がある。例えば、構造データが構造化文書であれ
ば、自動割り付けを実現するために、割り付け手段を有
する構成とすることもできる。このように、構造データ
の加工に必要な手段が複数あってもよい。構造データの
加工に必要な手段の数や構成に、特に制限はない。同様
にして、従来のデータを利用するために、従来のデータ
入力手段やデータ出力手段を有していてもよい。Returning to FIG. 1, the structural data processing means 3 performs processing of the structural data. The structural data processing means 3 includes means necessary for processing, such as an editing means 4 and a search means 5. For example, if the structural data is a structured document, it may be configured to have an assigning means in order to realize automatic assignment. Thus, there may be a plurality of means necessary for processing the structural data. There is no particular limitation on the number or configuration of means required for processing the structural data. Similarly, a conventional data input unit or data output unit may be provided to use the conventional data.
【0031】一般に、ODAに代表される構造化文書中
には、深さ優先順(論理順序)に構成要素(論理オブジ
ェクト)が並んでいる。従って、構造データ加工手段3
に構造化文書の編集/加工/印刷/表示などに必要な手
段を追加して、処理対象である構造データをODAに代
表される構造化文書の文書データとすると、本発明の構
造データ処理装置1を構造化文書処理装置として用いる
ことができる。また、対象とするデータを幾何図形の構
造データとし、3次元の座標を持つ幾何図形データを処
理する幾何図形処理手段や3次元データ表示手段を構造
データ加工手段3に加えると、本発明の構造データ処理
装置1をCADシステムとして用いることが可能とな
る。Generally, in a structured document represented by ODA, components (logical objects) are arranged in a depth-first order (logical order). Therefore, the structural data processing means 3
In the case where structural data to be processed is defined as document data of a structured document represented by ODA by adding means necessary for editing / processing / printing / displaying the structured document to the structured data processing apparatus of the present invention, 1 can be used as a structured document processing device. Further, when the target data is set as the structural data of the geometrical figure, a geometrical figure processing means for processing the geometrical figure data having three-dimensional coordinates and a three-dimensional data display means are added to the structural data processing means 3. The data processing device 1 can be used as a CAD system.
【0032】構造位置決定手段9は、構成要素に附属の
深さ情報だけでなく、構成要素の順序をも利用して構造
上の位置を決定する。この順序は、構成要素が物理的に
並んでいる必要はなく、かつ、入力順序が深さ優先順で
なくともよい。しかし、この場合には、何らかの手段
で、構成要素の深さ優先で並べたときの順序と、深さが
比較できる必要がある。例えば、構成要素に深さ優先で
並べたときの順序を表すデータを持たせるように構成し
てもよいし、また、別に深さ優先順のインデックス情報
を作成してもよい。なお、深さ情報を持つ構成要素が深
さ優先順に並んでいない場合は、すべてのデータを入力
してから、深さ優先順に並べ変え、並べ変えられたデー
タをデータ入力手段の入力データとする。以下の説明で
は、データの入力順序を深さ優先順序とし、深さ情報を
構成要素の付帯情報として有するものとする。The structural position determining means 9 determines the structural position using not only the depth information attached to the components but also the order of the components. In this order, the components do not need to be physically arranged, and the input order does not need to be the depth priority order. However, in this case, it is necessary to be able to compare the depth of the components with the depth of the components by some means. For example, a configuration may be adopted in which data representing the order when the components are arranged in a depth-first order may be provided, or index information in a depth-first order may be separately created. If the components having the depth information are not arranged in the order of the depth priority, all the data are input, and then rearranged in the order of the depth priority, and the rearranged data is used as the input data of the data input unit. . In the following description, it is assumed that the data input order is the depth priority order, and that the depth information is included as incidental information of the components.
【0033】本発明の構造データ処理装置の一実施例の
動作を説明する。構造データ加工処理は、入力手段7に
よって利用者の命令を受け取り、編集手段4や検索手段
5および図示しない印刷手段等によって、利用者の所望
する処理を行なう。構造データ加工処理を始めとするデ
ータ入出力処理以外の処理は、構造化文書処理やCAD
等に代表される一般的な構造データの処理であるので、
ここでは割愛する。The operation of one embodiment of the structural data processing apparatus of the present invention will be described. In the structural data processing process, a user's instruction is received by the input unit 7, and a process desired by the user is performed by the editing unit 4, the search unit 5, the printing unit (not shown), and the like. Processing other than data input / output processing such as structural data processing is performed by structured document processing or CAD
Since it is processing of general structure data represented by
I omit it here.
【0034】図3は、データ入力処理の一例を説明する
ためのフローチャート、図4は、親を捜す処理の部分を
説明するためのフローチャートである。利用者が入力手
段7によってデータ入力処理を指定したり、入力データ
が外部から送られてきた場合などに、データ入力処理が
開始される。深さ優先順にシーケンシャルデータを入力
しながら、構造データを生成する。FIG. 3 is a flowchart for explaining an example of the data input process, and FIG. 4 is a flowchart for explaining a part of the process of searching for a parent. The data input processing is started when the user specifies the data input processing by the input means 7 or when the input data is sent from the outside. Structural data is generated while inputting sequential data in a depth-first order.
【0035】図3のS21において、初期化処理を行な
う。このステップでは、まず、データ入力処理に必要な
前処理を行ない、データ入力の準備をした後、木構造の
根である構成要素を1つ入力し、変数PARENTに代
入する。変数PARENTは、次に入力された構成要素
の構造上の親の候補であり、かつ、構造上の位置がいち
ばん深いものを表す。実際には最後に構造に組み込まれ
た構成要素である。In S21 of FIG. 3, an initialization process is performed. In this step, first, preprocessing necessary for data input processing is performed, and data input is prepared. Then, one component, which is the root of the tree structure, is input and assigned to a variable PARENT. The variable PARENT is a candidate for a structural parent of a component input next, and represents a component having the deepest structural position. In fact, it is the last component incorporated into the structure.
【0036】S22において、構成要素の存在を確認す
る。シーケンシャルデータの構成要素がなくなった場合
には後処理を行ない、データ入力処理を終了する。まだ
存在する場合は、S23以降の構成要素の入力、構造の
組立て処理を行なう。In S22, the existence of the component is confirmed. When there are no more components of the sequential data, post-processing is performed, and the data input process ends. If it still exists, the input of components and the assembling process of the structure after S23 are performed.
【0037】S23において、構成要素の入力処理を行
なう。入力処理は、深さ優先順序で構成要素が並んでい
るデータ中から、次の構成要素の開始から終端までのデ
ータを入力して、構成要素を再現する。例えば、図2に
示した例では、図2(A)のシーケンシャルデータの
「[」から「]」までを1つの構成要素として入力し、
深さ情報、属性情報「@」を利用して、図2(B)に示
した「○」に相当する構成要素を生成する。In S23, the input processing of the component is performed. In the input processing, data from the start to the end of the next component is input from data in which the components are arranged in the depth priority order, and the component is reproduced. For example, in the example shown in FIG. 2, “[] to“] ”of the sequential data in FIG. 2A is input as one component,
Using the depth information and the attribute information “@”, a component corresponding to “○” shown in FIG. 2B is generated.
【0038】S24において、構造位置決定手段9によ
り、親を捜す処理を行なう。変数PARENTに代入さ
れている構成要素は、S23で入力した構成要素の親の
候補である。親であるかどうかは、入力した構成要素の
深さ情報を利用して判別する。判別方法は、変数PAR
ENTの構成要素の深さが、入力した構成要素の深さよ
り浅いかどうか調べればよい。図4のS26において、
この判別を行なう。変数PARENTの構成要素の深さ
のほうが浅ければ、変数PARENTの構成要素が親と
なる。変数PARENTの構成要素の深さが、入力した
構成要素に比べて同じもしくは深い場合は、S27にお
いて、現在変数PARENTに代入されている構成要素
の親を、新たな親の候補として、あらためて変数PAR
ENTに代入し、S28において、新たに変数PARE
NTに代入された構成要素の存在を確認した後、S26
からの動作を繰り返す。In S24, the structure position determining means 9 performs processing for searching for a parent. The component assigned to the variable PARENT is a candidate for the parent of the component input in S23. Whether the user is a parent is determined by using the input depth information of the component. The determination method is the variable PAR
It is sufficient to check whether the depth of the component of ENT is smaller than the depth of the input component. In S26 of FIG.
This determination is made. If the depth of the component of the variable PARENT is smaller, the component of the variable PARENT becomes the parent. If the depth of the component of the variable PARENT is the same as or deeper than the input component, the parent of the component currently substituted for the variable PARENT is set as a new parent candidate in step S27.
ENT, and a new variable PARE is set in S28.
After confirming the existence of the component assigned to NT, S26
Repeat the operation from.
【0039】S25において、構成要素の挿入を行な
う。すなわち、S24において見つかった親に対して、
入力した構成要素をいちばん最後の子供として、木構造
に接続する。変数PARENTに入力した構成要素を代
入して、次の構成要素の親の候補とする。以上の処理に
より、1つの構成要素についての入力処理が終了する。
S22へ戻り、次の構成要素に関する処理を、入力すべ
き構成要素がなくなるまで繰り返す。In step S25, components are inserted. That is, for the parent found in S24,
Connect the input component to the tree structure as the last child. The input component is substituted for the variable PARENT, and is set as a parent candidate of the next component. With the above processing, the input processing for one component is completed.
Returning to S22, the process for the next component is repeated until there is no component to be input.
【0040】図5は、構造上の位置の決定方法の説明図
である。図中、「○」に「*」印は既に確定している構
成要素を、「◎」印は既に確定している構成要素のうち
の親の候補となり得る構成要素を、「○」印は入力した
構成要素の候補となり得る位置を示している。この図
は、図3のS24、すなわち、図4に示した親の位置の
決定方法を図示している。深さ優先順で入力する場合、
必ず親となる構成要素が先に入力され、構造上の位置が
確定している。図中の最後に入力された構成要素が変数
PARENTに代入されている。すでに入力された構成
要素は根から構造化されている。FIG. 5 is an explanatory diagram of a method of determining a structural position. In the figure, “*” indicates a component that has already been determined, “◎” indicates a component that can be a parent candidate among components that have already been determined, and “○” indicates a component that has been determined. This shows the position that can be a candidate for the input component. This figure illustrates S24 of FIG. 3, that is, the method of determining the parent position shown in FIG. When entering in depth-first order,
The parent component is always input first, and the structural position is determined. The component input last in the figure is substituted for the variable PARENT. The components already entered are structured from the root.
【0041】いま、変数PARENTの構成要素の深さ
をNとすると、入力される構成要素の深さは深さ1から
N+1までが候補となり得る。図中の「◎」が親の候補
となり、「○」が入力された構成要素の位置の候補とな
る。このとき、深さ情報を利用して、親の候補である変
数PARENTの構成要素から、深い順に親であるか否
かを調べる。そして、変数PARENTの構成要素の深
さが入力された構成要素の深さよりも浅くなったときの
変数PARENTを親とすればよい。親が見つかれば、
入力された構成要素をその親の子供として、木構造に挿
入すればよい。こうして、構成要素の位置を確定でき
る。入力した構成要素の深さが、1からN+1までにな
いときはエラーとなる。Now, assuming that the depth of the component of the variable PARENT is N, the depth of the input component can be a depth from 1 to N + 1. In the drawing, “◎” is a candidate for the parent, and “な る” is a candidate for the position of the input component. At this time, using the depth information, it is checked from the constituent elements of the variable PARENT which is a candidate for the parent whether or not the parent is the parent in descending order. Then, the variable PARENT when the depth of the component of the variable PARENT becomes shallower than the depth of the input component may be set as the parent. If parents are found,
What is necessary is just to insert the input component into the tree structure as a child of the parent. Thus, the position of the component can be determined. If the depth of the input component is not between 1 and N + 1, an error occurs.
【0042】図6は、データ入力処理の別の例を説明す
るためのフローチャート、図7は、別の例における親を
捜す処理の部分を説明するためのフローチャートであ
る。この例では、各深さごとに最後に入力した構成要素
に対して、深さをキーとした構成要素のインデックスを
用意する。入力された構成要素の深さ情報に基づきイン
デックスを参照することにより、直接、位置を決定する
ことができる。この例の場合は、順に親を変えながら比
較する必要がないので、処理速度を向上することができ
る。図6および図7では、配列INDEX[]を用意
し、深さごとの最後の構成要素を保存する。ただし、最
大の深さ分のインデックス領域を用意する必要がある。FIG. 6 is a flowchart for explaining another example of the data input process, and FIG. 7 is a flowchart for explaining a part of the process of searching for a parent in another example. In this example, an index of a component using the depth as a key is prepared for the component input last for each depth. The position can be determined directly by referring to the index based on the input depth information of the component. In the case of this example, it is not necessary to perform comparison while changing parents in order, so that the processing speed can be improved. In FIGS. 6 and 7, an array INDEX [] is prepared, and the last component for each depth is stored. However, it is necessary to prepare an index area for the maximum depth.
【0043】図6のS31において、初期化処理を行な
う。このステップでは、図3のS21で行なった初期化
処理に加え、配列INDEX[]の深さ0に根を代入す
る。S32において、構成要素の存在を確認し、S33
において、構成要素を入力する。In S31 of FIG. 6, an initialization process is performed. In this step, in addition to the initialization processing performed in S21 of FIG. 3, a root is substituted for the depth 0 of the array INDEX []. In S32, the existence of the component is confirmed, and in S33
In, the components are input.
【0044】S34において、構造位置決定手段によ
り、親を探す処理を行なう。図7のS36において、新
たに入力した構成要素の深さが、変数PARENTの構
成要素、すなわち、最後に入力した構成要素の深さ+1
を越えないことを検査する。通常、越えることはありえ
ない。入力した構成要素の親は、配列INDEX[入力
した構成要素の深さ−1]である。すなわち、入力した
構成要素の深さ情報から、親の構成要素が即座にわか
る。S37において、配列INDEX[入力した構成要
素の深さ−1]を参照し、変数PARENTに代入す
る。S38において、親が存在することを確認し、親を
捜す処理を終了する。In S34, a process of searching for a parent is performed by the structure position determining means. In S36 of FIG. 7, the depth of the newly input component is the component of the variable PARENT, that is, the depth of the last input component + 1.
Inspect not to exceed. Usually it cannot be exceeded. The parent of the input component is the array INDEX [input component depth-1]. That is, the parent component can be immediately identified from the input component depth information. In S37, it refers to the array INDEX [depth of input component -1] and substitutes it for variable PARENT. In S38, it is confirmed that the parent exists, and the processing for searching for the parent is ended.
【0045】S35において、入力した構成要素を木構
造に挿入するとともに、変数PARENTと配列IND
EX[入力した構成要素の深さ]に、只今入力した構成
要素を代入する。以上の処理により、1つの構成要素に
ついての処理が終了する。S32へ戻り、構成要素がな
くなるまで繰り返す。In S35, the input component is inserted into the tree structure, and the variable PARENT and the array IND are inserted.
The component just input is substituted for EX [depth of input component]. With the above processing, the processing for one component is completed. It returns to S32 and repeats until there is no component.
【0046】図8は、データ出力処理の一例を説明する
ためのフローチャート、図9は、構成要素の出力処理の
部分を説明するためのフローチャートである。利用者が
入力手段7によってデータ出力処理を指定したり、構造
データ加工処理が終了した場合などにより、データ出力
処理が開始される。FIG. 8 is a flowchart for explaining an example of the data output process, and FIG. 9 is a flowchart for explaining a portion of the component output process. The data output process is started when the user specifies the data output process by the input unit 7 or when the structural data processing process ends.
【0047】S41において、初期化処理を行なう。こ
のステップでは、変数DEPTHを0とするとともに、
根を取り出す。そして、S42において、構成要素の出
力処理を行なう。At S41, an initialization process is performed. In this step, while setting the variable DEPTH to 0,
Remove roots. Then, in S42, output processing of the component is performed.
【0048】図9のS43において、図2(B)に示し
たような木構造の構成要素のデータを、図2(A)に示
したようなシーケンシャルデータの構成要素のデータに
変換する。そして、S44において、構成要素のデータ
に変数DEPTHの内容、すなわち、構成上の深さ情報
を付加して出力する。In S43 of FIG. 9, the data of the component of the tree structure as shown in FIG. 2B is converted into the data of the component of sequential data as shown in FIG. 2A. Then, in S44, the content of the variable DEPTH, that is, the configuration depth information is added to the data of the component and output.
【0049】S45からS48の処理は、S44で出力
した構成要素の子供の構成要素に関する処理を行なう。
S45において、子供の存在を確認する。もし子供が存
在しなければ、このレベルでの子供の出力処理を終了す
る。子供が存在する場合には、S46において、変数D
EPTHに1を加える。そして、S47において、構成
要素の出力処理、すなわち、図9に示した処理を再帰的
に呼び出し、1つの子供の構成要素に対する出力処理を
行なう。このとき、孫やそれ以下のレベルの構成要素に
ついても、再帰的に構成要素の出力処理が呼び出されて
出力される。孫の構成要素がなくなった時点で、再帰的
に呼び出した構成要素の出力処理から戻るので、S48
において、変数DEPTHから1を減じ、親のレベルへ
戻り、S45乃至S48の処理を繰り返すことにより、
すべての子供の構成要素についての出力処理を行なう。In the processing of S45 to S48, processing relating to the child component of the component output in S44 is performed.
In S45, the presence of a child is confirmed. If the child does not exist, the output processing of the child at this level ends. If there is a child, in step S46, the variable D
Add 1 to EPTH. Then, in S47, the output process of the component, that is, the process shown in FIG. 9 is recursively called, and the output process for the component of one child is performed. At this time, the output process of the component is recursively called and output for the component of the grandchild and the components below the grandchild. When there is no longer a grandchild component, the process returns from the recursively called component output process.
In, by subtracting 1 from the variable DEPTH, returning to the parent level, and repeating the processing of S45 to S48,
Output processing is performed for all child components.
【0050】最終的に、根の子供の構成要素の出力処理
が終了すると、S42の処理が終了する。最後に後処理
を行ない、データ出力処理を終わる。Finally, when the output processing of the component of the child of the root ends, the processing of S42 ends. Finally, post-processing is performed, and the data output processing ends.
【0051】本発明の構造データ処理装置の一実施例の
具体例を説明する。一般に、本発明の構造データ処理装
置は、計算機(コンピュータシステム)によって実現す
ることができる。A specific example of one embodiment of the structural data processing apparatus of the present invention will be described. Generally, the structural data processing device of the present invention can be realized by a computer (computer system).
【0052】データ入力手段2は、計算機の入力装置
と、装置を制御しデータを入力し、構造データを生成す
るソフトウェアおよびそのソフトウェアを実行するCP
Uで構成することができる。計算機外部に接続されたデ
ータ入力装置から入力されるシーケンシャルデータを、
構造データの構成要素に変換する。作成された構成要素
を組み上げて、構造データとして構造データ加工手段3
へ出力する。The data input means 2 includes an input device of a computer, software for controlling the device, inputting data, generating structural data, and a CP for executing the software.
U. Sequential data input from a data input device connected to the outside of the computer
Convert to structural data components. Structural data processing means 3 assembling the created constituent elements as structural data
Output to
【0053】データ出力手段8は、計算機のデータ出力
装置と、装置を制御し構造データの構成要素を出力する
ソフトウェアおよびそのソフトウェアを実行するCPU
で構成することができる。構成要素を計算機外部に出力
可能なデータに変換し、データ出力装置を制御してシー
ケンシャルデータを出力する。The data output means 8 includes a data output device of a computer, software for controlling the device and outputting structural data components, and a CPU for executing the software.
Can be configured. The component is converted into data that can be output to the outside of the computer, and the data output device is controlled to output sequential data.
【0054】データ入力手段2にデータを入力したり、
データ出力手段8が出力したデータを受け取る外部装置
10としては、例えば、データ通信機器を外部装置と
し、通信機器との接続装置を入力/出力と情報を交換す
ることができる。同様にして、磁気ディスク装置などの
データ格納装置を外部装置とすると、データを格納、保
存しておくことができる。外部装置は、1つに限らず、
一度に複数の装置を接続することが可能である。この場
合、各装置に共通のデータ入力手段2及びデータ出力手
段8を有する構成としてもよいし、複数のデータ入力手
段2と複数のデータ出力手段8を備える構成としてもよ
い。また、入出力が同じ外部装置に接続される必要はな
く、データ入力手段2にデータを入力する外部装置と、
データ出力手段8からデータを受け取る外部装置は別で
あってもよい。例えば、入力専用のデータ通信装置と、
出力専用のデータ通信装置を接続し、定形のデータ加工
処理を構造データ加工手段3で行ない、自動的に定形処
理を行なう構造データ自動定形処理装置などを構成する
ことも可能である。When data is input to the data input means 2,
As the external device 10 that receives the data output by the data output unit 8, for example, a data communication device can be an external device, and a device connected to the communication device can exchange information with input / output. Similarly, when a data storage device such as a magnetic disk device is an external device, data can be stored and stored. The number of external devices is not limited to one,
It is possible to connect more than one device at a time. In this case, each device may be configured to have a common data input unit 2 and a plurality of data output units 8, or may be configured to include a plurality of data input units 2 and a plurality of data output units 8. Also, the input and output need not be connected to the same external device, and an external device for inputting data to the data input means 2;
An external device that receives data from the data output unit 8 may be different. For example, an input-only data communication device,
It is also possible to connect an output-only data communication device, perform a fixed-form data processing by the structural data processing means 3, and configure a structural data automatic fixed-form processing device that automatically performs the fixed-form processing.
【0055】構造位置決定手段9は、構成要素を操作す
るソフトウェア及びそのソフトウェアを実行するCPU
から構成することができる。もしくはハードウェアで構
成することも可能である。構成要素から深さ情報を取得
し、親の候補の構成要素の深さと比較し、構成要素の構
造上の位置を特定する。The structural position determining means 9 includes software for operating the components and a CPU for executing the software.
Can be composed of Alternatively, it can be configured by hardware. The depth information is acquired from the component, and compared with the depth of the parent candidate component, to specify the structural position of the component.
【0056】入力手段7は、キーボードや、マウス、タ
ッチパネルなどポインティングデバイス等の入力装置で
構成することができ、利用者の指示をシステムに与え
る。表示手段6は、CRT、液晶などのディスプレイ装
置で構成することができる。また、スピーカなどの音声
発生装置を含んでいてもよい。The input means 7 can be constituted by an input device such as a keyboard, a pointing device such as a mouse or a touch panel, and gives an instruction of a user to the system. The display means 6 can be constituted by a display device such as a CRT and a liquid crystal. Further, a sound generation device such as a speaker may be included.
【0057】例えば、本発明の構造データ処理装置を利
用して、構造化文書編集装置を構成することができる。
このとき、処理対象である構造データは、構造化文書で
ある。外部装置としては、磁気ディスク装置などのデー
タ格納装置や通信装置を用いることができる。構造デー
タ加工手段3としては、文書印刷手段や、文書内容編集
手段を備え、それらを制御するソフトウェアおよび自動
レイアウト処理プログラムなどで構成すればよい。For example, a structured document editing device can be configured using the structured data processing device of the present invention.
At this time, the structural data to be processed is a structured document. As the external device, a data storage device such as a magnetic disk device or a communication device can be used. The structure data processing means 3 may include a document printing means and a document content editing means, and may be constituted by software for controlling them, an automatic layout processing program, and the like.
【0058】表示手段6に表示された編集用のメニュー
やコマンドを、入力手段7から入力する。その中の保存
コマンドを実行すると、構造化文書の構造データをデー
タ出力手段8に渡す。データ出力手段8では、前述の動
作に基づき、構造化文書の構成要素を出力可能なデータ
に展開し、深さ情報を付与して、シーケンシャルデータ
として、外部装置10である磁気ディスク装置に書き込
む。反対に、読み出しコマンドを実行すると、データ入
力手段2を通して、磁気ディスク装置に保存されたシー
ケンシャルな構造化文書のデータを構成要素ごとに取り
出し、深さ情報を基に構造を組み立てる。An editing menu or command displayed on the display means 6 is input from the input means 7. When the save command is executed, the structure data of the structured document is transferred to the data output means 8. The data output unit 8 expands the components of the structured document into data that can be output based on the above-described operation, adds depth information to the data, and writes the data as sequential data to the magnetic disk device that is the external device 10. Conversely, when the read command is executed, the data of the sequential structured document stored in the magnetic disk device is extracted for each component through the data input means 2, and the structure is assembled based on the depth information.
【0059】さらには、構造化文書の部分構造や構成要
素を外部通信装置を介して、他の構造化文書編集装置と
通信しながら編集することにより、同時編集などを支援
することができる。Furthermore, simultaneous editing and the like can be supported by editing the partial structure and components of the structured document while communicating with another structured document editing device via an external communication device.
【0060】前述のように、構造データとして図形デー
タを扱い、CADシステムなどに応用することも可能で
ある。このとき、外部装置として、図面を印刷するため
に、プロッタなどの印刷装置などを加えることができ
る。As described above, figure data can be handled as structural data and applied to a CAD system or the like. At this time, a printing device such as a plotter or the like can be added as an external device for printing a drawing.
【0061】[0061]
【発明の効果】以上の説明から明らかなように、本発明
によれば、従来の構造データ処理装置に比べて、データ
量が十分小さい構造データにより入出力を行なうことが
できるので、入出力処理時間を大幅に減らし、計算機シ
ステム全体の処理時間を少なくすることができる。ま
た、データ量が少ないので、占有する記憶領域が少なく
て済み、例えば、小規模なシステムでも実現可能になる
とともに、高価で容量の大きなデータ格納装置でなくて
も、多くの情報を保存できる。従来と同等のシステム構
成であれば、余ったメモリをインデックス、キャッシュ
などに利用できるため、高速なデータ参照を期待するこ
とができる。また、クラスタリングなどデータの局所性
を利用する場合も有利である。データを参照する場合に
も、少ない領域を検索するだけで済むので、高速に検索
を行なうことができる、という効果がある。As is apparent from the above description, according to the present invention, input / output can be performed with structural data having a sufficiently small data amount as compared with the conventional structural data processing apparatus. The time can be greatly reduced, and the processing time of the entire computer system can be reduced. Further, since the data amount is small, the storage area occupied is small. For example, a small-scale system can be realized, and a large amount of information can be stored without using an expensive and large-capacity data storage device. With a system configuration equivalent to that of the related art, the surplus memory can be used for an index, a cache, and the like, so that high-speed data reference can be expected. It is also advantageous to use data locality such as clustering. Even when referring to data, only a small area needs to be searched, so that there is an effect that the search can be performed at high speed.
【図1】 本発明の構造データ処理装置の一実施例を示
すブロック図である。FIG. 1 is a block diagram showing one embodiment of a structural data processing device of the present invention.
【図2】 本発明で用いる構造データの表現方式の一例
の説明図である。FIG. 2 is an explanatory diagram of an example of a structure data expressing method used in the present invention.
【図3】 データ入力処理の一例を説明するためのフロ
ーチャートである。FIG. 3 is a flowchart illustrating an example of a data input process.
【図4】 親を捜す処理の部分を説明するためのフロー
チャートである。FIG. 4 is a flowchart illustrating a part of a process of searching for a parent.
【図5】 構造上の位置の決定方法の説明図である。FIG. 5 is an explanatory diagram of a method for determining a structural position.
【図6】 データ入力処理の別の例を説明するためのフ
ローチャートである。FIG. 6 is a flowchart illustrating another example of the data input process.
【図7】 別の例における親を捜す処理の部分を説明す
るためのフローチャートである。FIG. 7 is a flowchart illustrating a part of a process of searching for a parent in another example.
【図8】 データ出力処理の一例を説明するためのフロ
ーチャートである。FIG. 8 is a flowchart illustrating an example of a data output process.
【図9】 構成要素の出力処理の部分を説明するための
フローチャートである。FIG. 9 is a flowchart illustrating a part of a component output process.
【図10】 従来の構造データ処理装置のブロック図で
ある。FIG. 10 is a block diagram of a conventional structural data processing device.
【図11】 従来の構造データの表現方式の説明図であ
る。FIG. 11 is an explanatory diagram of a conventional structure data expressing method.
1 構造データ処理装置、2 データ入力手段、3 構
造データ加工手段、4編集手段、5 検索手段、6 表
示手段、7 入力手段、8 データ出力手段、9 構造
位置決定手段、10 外部装置。1 structural data processing device, 2 data input means, 3 structural data processing means, 4 editing means, 5 search means, 6 display means, 7 input means, 8 data output means, 9 structure position determination means, 10 external devices.
Claims (2)
データ処理装置において、構造データのノードとなる構
成要素が構造上の深さ情報を数値データとして有し、深
さ優先の順序に並べられたシーケンシャルデータが入力
され木構造のデータに変換するデータ入力手段と、デー
タ入力手段により変換の際に入力されたシーケンシャル
データの構成要素の構造上の深さ情報が示す数値に基づ
いて該構成要素の親となる構成要素を探索し構造位置を
決定する構造位置決定手段を有することを特徴とする構
造データ処理装置。1. A structural data processing apparatus for processing structural data having a tree structure, wherein constituent elements serving as nodes of the structural data have structural depth information as numerical data, and are arranged in a depth-first order. Inputting means for receiving the sequential data and converting the data into a tree-structured data, and the component based on the numerical value indicated by the structural depth information of the component of the sequential data input at the time of conversion by the data inputting means. A structure data processing apparatus comprising: a structure position determining unit that searches for a constituent element that is a parent of the system and determines a structure position.
データ処理装置において、木構造のデータに基づき深さ
優先の順序で構成要素をたどって該構成要素ごとに構造
上の位置情報として数値の深さ情報を持たせてシーケン
シャルデータを生成し該シーケンシャルデータを出力す
るデータ出力手段を有することを特徴とする構造データ
処理装置。2. A structural data processing apparatus for processing structural data having a tree structure, wherein the structural elements are traced in a depth-first order based on the data of the tree structure, and numerical values are designated as structural positional information for each of the structural elements. A structural data processing apparatus comprising: data output means for generating sequential data with depth information and outputting the sequential data.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5096676A JP2964831B2 (en) | 1993-03-31 | 1993-03-31 | Structural data processing device |
| US08/219,894 US5600826A (en) | 1993-03-31 | 1994-03-30 | Structured data processor for converting between sequential and tree structured data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5096676A JP2964831B2 (en) | 1993-03-31 | 1993-03-31 | Structural data processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH06290086A JPH06290086A (en) | 1994-10-18 |
| JP2964831B2 true JP2964831B2 (en) | 1999-10-18 |
Family
ID=14171406
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP5096676A Expired - Fee Related JP2964831B2 (en) | 1993-03-31 | 1993-03-31 | Structural data processing device |
Country Status (2)
| Country | Link |
|---|---|
| US (1) | US5600826A (en) |
| JP (1) | JP2964831B2 (en) |
Families Citing this family (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5778371A (en) * | 1994-09-13 | 1998-07-07 | Kabushiki Kaisha Toshiba | Code string processing system and method using intervals |
| JPH08255155A (en) * | 1995-03-16 | 1996-10-01 | Fuji Xerox Co Ltd | Device and method for full-text registered word retrieval |
| JP3549608B2 (en) * | 1995-04-04 | 2004-08-04 | 富士通株式会社 | Method and apparatus for determining structure of hierarchical data based on identifier |
| US7284187B1 (en) * | 1997-05-30 | 2007-10-16 | Aol Llc, A Delaware Limited Liability Company | Encapsulated document and format system |
| US6012057A (en) * | 1997-07-30 | 2000-01-04 | Quarterdeck Corporation | High speed data searching for information in a computer system |
| US6029170A (en) * | 1997-11-25 | 2000-02-22 | International Business Machines Corporation | Hybrid tree array data structure and method |
| DE19817617C1 (en) * | 1998-04-21 | 1999-09-09 | Deutsche Telekom Mobil | Data conversion method for converting data between different data processor formats, e.g. for digital mobile radio network |
| US6484190B1 (en) * | 1998-07-01 | 2002-11-19 | International Business Machines Corporation | Subset search tree integrated graphical interface |
| US6557040B1 (en) * | 1999-07-26 | 2003-04-29 | Microsoft Corporation | Providing for the omission of root information from depth-related requests according to standard request/response protocols |
| US6941317B1 (en) | 1999-09-14 | 2005-09-06 | Eragen Biosciences, Inc. | Graphical user interface for display and analysis of biological sequence data |
| US7039238B2 (en) * | 2000-12-01 | 2006-05-02 | Sri International | Data relationship model |
| US7593923B1 (en) * | 2004-06-29 | 2009-09-22 | Unisys Corporation | Functional operations for accessing and/or building interlocking trees datastores to enable their use with applications software |
| US20060190343A1 (en) * | 2005-02-24 | 2006-08-24 | Word Of Mouth Marketing, Inc. | Method of marketing memberships in a consumer group |
| US8010850B2 (en) | 2005-08-31 | 2011-08-30 | Microsoft Corporation | Client extended error handling |
| US7600030B2 (en) * | 2005-08-31 | 2009-10-06 | Microsoft Corporation | Compounding of HTTP authoring protocol |
| US9933978B2 (en) | 2010-12-16 | 2018-04-03 | International Business Machines Corporation | Method and system for processing data |
| JP5883937B2 (en) * | 2012-09-07 | 2016-03-15 | 株式会社日立製作所 | Computer system, data management method, and recording medium for storing program |
| JP6162553B2 (en) * | 2013-09-11 | 2017-07-12 | 株式会社 ディー・エヌ・エー | Image processing apparatus and image processing program |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5230048A (en) * | 1986-09-03 | 1993-07-20 | Wang Laboratories, Inc. | Data processing system with tree and list data structure |
| US5321606A (en) * | 1987-05-19 | 1994-06-14 | Hitachi, Ltd. | Data transforming method using externally provided transformation rules |
| JPH0650489B2 (en) * | 1988-02-05 | 1994-06-29 | 日本電気株式会社 | ASN. 1 Information data conversion method |
| JPH02135549A (en) * | 1988-11-16 | 1990-05-24 | Hitachi Ltd | How to display the file list |
| JPH02281372A (en) * | 1989-04-24 | 1990-11-19 | Sharp Corp | Inserted adverbe phrase processing method in machine translation equipment |
| US5295261A (en) * | 1990-07-27 | 1994-03-15 | Pacific Bell Corporation | Hybrid database structure linking navigational fields having a hierarchial database structure to informational fields having a relational database structure |
| JPH0484342A (en) * | 1990-07-27 | 1992-03-17 | Nec Corp | System for storing tree-structure data in file |
| US5303367A (en) * | 1990-12-04 | 1994-04-12 | Applied Technical Systems, Inc. | Computer driven systems and methods for managing data which use two generic data elements and a single ordered file |
| JPH087674B2 (en) * | 1991-02-28 | 1996-01-29 | インターナショナル・ビジネス・マシーンズ・コーポレイション | Tree generation system and method |
| US5506985A (en) * | 1991-10-17 | 1996-04-09 | Ricoh Company, Ltd. | Method and apparatus for format conversion of a hierarchically structured page description language document |
| US5530957A (en) * | 1992-08-07 | 1996-06-25 | At&T Corp. | Storing trees in navigable form |
-
1993
- 1993-03-31 JP JP5096676A patent/JP2964831B2/en not_active Expired - Fee Related
-
1994
- 1994-03-30 US US08/219,894 patent/US5600826A/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| US5600826A (en) | 1997-02-04 |
| JPH06290086A (en) | 1994-10-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2964831B2 (en) | Structural data processing device | |
| JP4657432B2 (en) | Device for converting hierarchical structured documents | |
| US5150308A (en) | Parameter and rule creation and modification mechanism for use by a procedure for synthesis of logic circuit designs | |
| JP2003067185A (en) | Application editing device and data processing method and program | |
| WO2007020850A1 (en) | Information processing method, information processing device, and information processing program | |
| JP2788850B2 (en) | Optimal menu inquiry method and editing method of structural data by hierarchical menu inquiry | |
| JP2000076119A (en) | Control method for node-link data part arranged inside memory | |
| JP2009521026A (en) | Method and system for editing text with search and replace functions that leverage derivation of search and replace inputs | |
| CA2275391C (en) | File processing method, data processing device, and storage medium | |
| JP3788956B2 (en) | Structured document display method, structured document display device, and program | |
| JP5428316B2 (en) | Identifier shortening display program, identifier shortening display device, and identifier shortening display method | |
| JP3348833B2 (en) | Video synthesis device | |
| JP3529658B2 (en) | TRIE STRUCTURE CHARACTER STRING SEARCH METHOD, DEVICE, AND RECORDING MEDIUM RECORDING CHARACTER STRING SEARCH PROGRAM | |
| Barker et al. | A Development of an Intelligent Man-machine Interface for Computer-aided Design, Simulation and Implementation of Control Systems | |
| JP4319827B2 (en) | Document search program | |
| JP3511724B2 (en) | Document search method | |
| JP3843574B2 (en) | Document conversion rule generation device, document conversion rule generation method, and computer-readable recording medium recording a document conversion rule generation program | |
| Wiseman et al. | Rainbow—a multi‐purpose CAD system | |
| JPH04278634A (en) | Tree growth system and method | |
| US20040199376A1 (en) | Method and apparatus for compiling two-level morphology rules | |
| JP4118212B2 (en) | Board game system via communication network | |
| JP2002056041A (en) | Hardware description language hierarchy information reflection method | |
| JP2959606B2 (en) | Logical connection data storage method | |
| JP2982725B2 (en) | Automatic program generator | |
| JPH0798707A (en) | Document processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20070813 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080813 Year of fee payment: 9 |
|
| LAPS | Cancellation because of no payment of annual fees |