JPH0535628A - Method and device for encoding data transfer - Google Patents

Method and device for encoding data transfer

Info

Publication number
JPH0535628A
JPH0535628A JP3192891A JP19289191A JPH0535628A JP H0535628 A JPH0535628 A JP H0535628A JP 3192891 A JP3192891 A JP 3192891A JP 19289191 A JP19289191 A JP 19289191A JP H0535628 A JPH0535628 A JP H0535628A
Authority
JP
Japan
Prior art keywords
data
encoded
encoding
data structure
area
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
JP3192891A
Other languages
Japanese (ja)
Other versions
JPH07111699B2 (en
Inventor
Nobuaki Tanaka
中 伸 明 田
Noriyuki Enomoto
本 典 行 榎
Ryota Suehiro
亮 太 末▲廣▼
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP3192891A priority Critical patent/JPH07111699B2/en
Publication of JPH0535628A publication Critical patent/JPH0535628A/en
Publication of JPH07111699B2 publication Critical patent/JPH07111699B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To improve the efficiency for encoding by omitting the storage of information required for encoding in a table and retrieval of it from the table, at the time of encoding plural data coupled by a pointer, in a data transfer device. CONSTITUTION:With respect to a data structure expression 101 given by a user, a data structure generating part 102 for generating a data structure expression 103 to which storage areas A and B are added is provided. At the time of encoding the data having the generated data structure, an encoding part 108 encodes it by utilizing information which is encoded already or not, stored in the storage area A, and offset information of an encoded data storage part 109 stored in the storage area B.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、データ転送装置におけ
る符号化方法およびその装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an encoding method and an apparatus for a data transfer device.

【0002】[0002]

【従来の技術】近年、通信網を介したデータ通信によっ
て、計算機のメモリ上のデータをポインタによる参照関
係を保ちながら転送することが行なわれるようになって
きた。このとき、転送されるデータ列の生成方法は、例
えば文献1「抽象データ型のための値転送方式」、ハー
リィ,リスコフ著、エーシーエム・トランザクションズ
・オン・プログラミング・ランゲージズ・アンド・シス
テム、第4巻、第4冊、1982年、pp527−55
1(M.Herlihy,B.Liskov, “A Value Transmission Met
hod for Abstract Data Types ”,ACM Transactions on
Programming Languages and Systems,Vol.4,No.4,Octo
ber 1982,pp527-551) に記載された例が知られている。
2. Description of the Related Art In recent years, it has become possible to transfer data on a memory of a computer while maintaining a reference relationship by pointers by data communication via a communication network. At this time, the method of generating the data string to be transferred is described in, for example, Document 1 “Value Transfer Method for Abstract Data Type”, by Harley and Liskoff, ACM Transactions on Programming Languages and Systems, Volume 4, Volume 4, 1982, pp 527-55
1 (M. Herlihy, B. Liskov, “A Value Transmission Met
hod for Abstract Data Types ”, ACM Transactions on
Programming Languages and Systems, Vol.4, No.4, Octo
ber, 1982, pp 527-551).

【0003】図4は上記方式におけるデータ転送装置の
データを符号化する部分の構成を示すものである。図4
において、401は転送するデータを記憶する記憶部、
402は転送されるデータ、403はデータ402の中
にあるポインタによって指されているデータ、404は
データ402およびデータ403の中にあるポインタに
よって指されているデータ、405はデータを符号化す
る符号化部、406は符号化部405がデータを符号化
する際に必要な情報を記憶しておくための符号化情報
表、407は符号化済みのデータを記憶しておくための
記憶部である。
FIG. 4 shows the configuration of a portion for encoding data in the data transfer device in the above system. Figure 4
In the figure, 401 is a storage unit for storing data to be transferred,
Reference numeral 402 is data to be transferred, 403 is data pointed to by a pointer in the data 402, 404 is data pointed to by the pointers in the data 402 and the data 403, and 405 is a code for encoding the data. An encoding unit, 406 is an encoding information table for storing information required when the encoding unit 405 encodes data, and 407 is a storage unit for storing encoded data. .

【0004】転送データを記憶する記憶部401は、通
常の計算機における主記憶装置に相当する。主記憶装置
上でのデータの位置は、通常、アドレスとして示され
る。符号化済みデータを記憶する記憶部407の中に記
憶されたデータはデータ通信部によって他の計算機に転
送され、転送されたデータは、復号化部によって復号化
され、主記憶装置上のデータとなる。
The storage unit 401 for storing the transfer data corresponds to the main storage device in an ordinary computer. The location of data on main memory is usually indicated as an address. The data stored in the storage unit 407 that stores encoded data is transferred to another computer by the data communication unit, and the transferred data is decoded by the decoding unit and stored in the main storage device. Become.

【0005】このように記憶部407上のデータは、デ
ータ通信部によって他の計算機に転送されるので、記憶
部407上での絶対位置によってデータ間の参照関係を
表現しても、その参照関係は、データを受け取った計算
機では、解釈することが不可能になる。したがって、記
憶部407上では、データの参照を示すためには、絶対
位置を表わすアドレスではなく、記憶部407の記憶空
間の先頭からの相対位置を示す値を使用する。この相対
位置を示す値をオフセットと呼ぶ。
As described above, since the data in the storage unit 407 is transferred to another computer by the data communication unit, even if the reference relation between the data is expressed by the absolute position in the storage unit 407, the reference relation is expressed. Cannot be interpreted by the computer that received the data. Therefore, on the storage unit 407, a value indicating the relative position from the beginning of the storage space of the storage unit 407 is used instead of the address indicating the absolute position to indicate the data reference. A value indicating this relative position is called an offset.

【0006】以上のように構成されたデータ転送装置に
ついて、以下その動作について説明する。なお、図4の
データ402、データ403、データ404において、
矢印が出ている領域は、ポインタが入っていることを表
わす。また斜めの線が書いてある領域は、ポインタを入
れることのできる領域であるが、そこにはなにもデータ
が入っていないことを示す。
The operation of the data transfer device configured as described above will be described below. In addition, in the data 402, the data 403, and the data 404 of FIG.
The area with an arrow indicates that the pointer is included. The area with diagonal lines indicates that a pointer can be inserted, but that there is no data in it.

【0007】符号化部405に対して、データ402の
符号化の要求があったとする。このとき、最初に符号化
部405は、符号化情報表406を検索し、それ以前に
データ402が符号化されていないことを確認する。次
に、符号化部405は、データ402の記憶部401の
中での位置を示すアドレスと、記憶部407上での相対
位置を示す値すなわちオフセットを符号化情報表406
に格納する。
It is assumed that the encoding unit 405 has been requested to encode the data 402. At this time, first, the encoding unit 405 searches the encoding information table 406 and confirms that the data 402 has not been encoded before that. Next, the coding unit 405 sets the address indicating the position of the data 402 in the storage unit 401 and the value indicating the relative position on the storage unit 407, that is, the offset, to the coding information table 406.
To store.

【0008】次に符号化部405は、データ402の中
にポインタが含まれているので、そのポインタを符号化
する。この場合、ポインタはデータ404を指している
ので、このポインタの符号化の際にも、符号化部405
は符号化情報表406を検索し、データ404がすでに
符号化されていないことを確認する。
Next, the encoding unit 405 encodes the pointer because the data 402 includes the pointer. In this case, since the pointer points to the data 404, the encoding unit 405 also performs the encoding of this pointer.
Searches the encoded information table 406 and confirms that the data 404 has not been encoded.

【0009】その後、符号化部405は、データ404
を符号化し、符号化されたデータ404を記憶部407
に記憶する。
After that, the encoding unit 405 receives the data 404.
And the encoded data 404 is stored in the storage unit 407.
Remember.

【0010】次に符号化部405は、データ402の中
に、もう一つのポインタが含まれていることを確認し、
そのポインタを符号化しようとする。この例では、その
ポインタはデータ403を指している。このポインタを
符号化する際にも、符号化部405は符号化情報表40
6を検索し、データ403がすでに符号化されていない
ことを確認する。次に、符号化部405は、符号化情報
表406にデータ403のアドレスと、記憶部407上
での位置を格納する。さらに、符号化部405は、デー
タ403の中にポインタが含まれていることを確認し、
そのポインタの符号化を開始する。この例では、そのポ
インタはデータ404を指している。
Next, the encoding unit 405 confirms that the data 402 includes another pointer,
Try to encode that pointer. In this example, the pointer points to data 403. When encoding this pointer, the encoding unit 405 also uses the encoding information table 40.
Search for 6 to verify that the data 403 is not already coded. Next, the encoding unit 405 stores the address of the data 403 and the position on the storage unit 407 in the encoding information table 406. Further, the encoding unit 405 confirms that the data 403 includes a pointer,
Start encoding the pointer. In this example, the pointer points to data 404.

【0011】符号化部405は、そのポインタが指すデ
ータ404がすでに符号化されているかどうかを符号化
情報表406を検索して調べる。この例では、すでにデ
ータ404は符号化情報表406に格納されているの
で、データ404はすでに符号化済みであることがわか
る。そこで、符号化部405は、データ404を符号化
し、記憶部407に格納する。
The encoding unit 405 searches the encoding information table 406 to check whether the data 404 pointed to by the pointer has already been encoded. In this example, since the data 404 has already been stored in the coding information table 406, it can be seen that the data 404 has already been coded. Therefore, the encoding unit 405 encodes the data 404 and stores it in the storage unit 407.

【0012】その後、符号化部405は、データ403
の残りの部分を符号化し、記憶部407に格納する。次
に、符号化部405は、データ402の残りの部分を符
号化し、記憶部407に格納し、全データの符号化を終
了する。
After that, the encoding unit 405 receives the data 403.
The remaining part of is encoded and stored in the storage unit 407. Next, the encoding unit 405 encodes the remaining part of the data 402, stores it in the storage unit 407, and ends the encoding of all data.

【0013】記憶部407に格納された符号化済みのデ
ータは、データ通信部によって他の計算機に転送され
て、その計算機上で復号化される。
The coded data stored in the storage unit 407 is transferred to another computer by the data communication unit and decoded on that computer.

【0014】このように、従来のデータ転送装置におい
ても、1つのデータを参照するポインタが複数個あった
場合でも、その参照関係を保持したままデータ群を符号
化し、転送し、復号化することができる。
As described above, even in the conventional data transfer apparatus, even when there are a plurality of pointers that refer to one data, the data group can be encoded, transferred, and decoded while maintaining the reference relationship. You can

【0015】[0015]

【発明が解決しようとする課題】しかしながら、上記の
従来の装置では、1つのデータを符号化するたびに符号
化情報表を検索しなければならず、また、検索の結果、
まだ符号化されていないデータであった場合には、符号
化情報表にその位置情報を格納する必要があり、符号化
するデータの数が大きくなったとき、符号化情報表の検
索、符号化情報表への情報の格納に時間がかかり、符号
化のオーバーヘッドが大きいという問題を有していた。
However, in the above-mentioned conventional apparatus, the encoded information table must be searched every time one data is coded, and as a result of the search,
If the data has not been encoded yet, it is necessary to store the position information in the encoding information table. When the number of data to be encoded becomes large, the encoding information table is searched and encoded. There is a problem in that it takes time to store information in the information table and the overhead of encoding is large.

【0016】本発明は、このような従来の問題を解決す
るものであり、符号化情報表の検索および符号化情報表
への情報の格納の動作を省き、ポインタでつながれたデ
ータ構造を高速に符号化することのできるデータ転送符
号化方法およびその装置を提供することを目的とする。
The present invention solves such a conventional problem by omitting the operations of searching the encoded information table and storing the information in the encoded information table, and speeding up the data structure connected by the pointer. It is an object of the present invention to provide a data transfer encoding method and an apparatus therefor capable of encoding.

【0017】[0017]

【課題を解決するための手段】上記目的を達成するため
に、本発明によるデータ転送符号化方法は、ユーザから
与えられたデータ構造に、データの符号化の際に使用す
る符号化済み情報と、符号化されたときの記憶部の未使
用空間の先頭のからの相対位置情報とを格納する領域を
設け、これらの情報を利用して符号化するようにしたも
のである。
In order to achieve the above object, a data transfer encoding method according to the present invention has a data structure provided by a user and encoded information used when encoding data. An area for storing the relative position information from the beginning of the unused space of the storage unit when encoded is provided, and the information is used for encoding.

【0018】また、本発明によるデータ転送符号化装置
は、符号化データされたデータを記憶空間の先頭から格
納し、未使用空間の先頭の位置を問い合わせられたとき
にはその位置を答えとして返す記憶部と、ユーザから与
えられたデータ構造に対して符号化の際に使用する符号
化情報記憶領域を付加したデータ構造を生成するデータ
構造生成部と、その付加した領域の情報を利用してデー
タ符号化する符号化部とを備えたものである。
Further, the data transfer encoding device according to the present invention stores the encoded data from the head of the storage space and returns the position as an answer when the position of the head of the unused space is inquired. A data structure generated by adding a coded information storage area used for encoding to a data structure given by the user, and a data code using the information of the added area. And an encoding unit for encoding.

【0019】[0019]

【作用】本発明は、上記構成によって、ポインタによっ
て参照関係が表わされている複数のデータを、その参照
関係を保ったまま符号化し転送する場合、符号化するデ
ータごとに符号化情報表の検索や符号化情報表への格納
をすることなく、高速に符号化を行なうことができると
いう効果を有する。
According to the present invention, according to the above configuration, when a plurality of data whose reference relationships are represented by pointers are encoded and transferred while maintaining the reference relationships, each data to be encoded is stored in the encoding information table. This has the effect that encoding can be performed at high speed without searching or storing in the encoded information table.

【0020】[0020]

【実施例】以下、本発明の実施例について、図面を参照
しながら説明する。図1は本発明の一実施例におけるデ
ータ転送符号化装置の構成を示すブロック図である。図
1において、101はユーザが設定したデータ構造表
現、102はデータ構造生成部、103はデータ構造生
成部102によって生成されたデータ構造表現、104
は転送するデータを記憶する記憶部、105は転送され
るデータ、106はデータ105の中にあるポインタに
よって指されているデータ、107はデータ105およ
びデータ106の中にあるポインタによって指されてい
るデータ、108はデータを符号化する符号化部、10
9は符号化されたデータを記憶しておくための記憶部で
ある。データ構造生成部102によって生成されたデー
タ構造表現103の中のAは、そのデータがすでに符号
化済みか否かを示す値を格納するための記憶領域、Bは
そのデータが記憶部109に格納されているときの記憶
部109上での先頭からの相対位置すなわちオフセット
を格納する記憶領域である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a data transfer encoding device according to an embodiment of the present invention. In FIG. 1, 101 is a data structure expression set by the user, 102 is a data structure generation unit, 103 is a data structure expression generated by the data structure generation unit 102, and 104.
Is a storage unit for storing the data to be transferred, 105 is the data to be transferred, 106 is the data pointed to by the pointer in the data 105, 107 is the pointer in the data 105 and the data 106 Data, 108 is an encoding unit for encoding the data, 10
Reference numeral 9 is a storage unit for storing encoded data. A in the data structure representation 103 generated by the data structure generation unit 102 is a storage area for storing a value indicating whether or not the data has already been encoded, and B is the data stored in the storage unit 109. This is a storage area for storing a relative position from the beginning on the storage unit 109, that is, an offset when the current state is set.

【0021】本実施例における重要な構成要素は、デー
タ構造生成部102と、符号化部108に分けられる。
まず最初に、図2に示すブロック図を用いて、データ構
造生成部102の内部構成と、データ構造表現101と
データ構造表現103の内容例について説明する。
The important components in this embodiment are divided into a data structure generation unit 102 and an encoding unit 108.
First, the internal structure of the data structure generation unit 102 and an example of the contents of the data structure representation 101 and the data structure representation 103 will be described using the block diagram shown in FIG.

【0022】図2において、201はデータ構造表現1
01を読み込み、表現されているデータ構造を解析する
データ構造表現解析手段、202はデータ構造表現解析
手段201が解析した結果を記憶しておくためのデータ
構造記憶手段、203はデータ構造記憶手段202に記
憶されているデータ構造に対して、符号化のときに用い
る符号化情報記憶領域A,Bを付け加えるための符号化
用記憶領域追加手段、204は符号化用記憶領域追加手
段203によって符号化情報記憶領域を追加されたデー
タ構造を記憶しておくためのデータ構造記憶手段、20
5はデータ構造記憶手段204に記憶されているデータ
構造を読み取り、プログラミング言語によるデータ構造
の表現を生成するデータ構造表現生成手段である。20
6はデータ構造表現101を読み込んだときに、データ
構造記憶手段202上に記憶されるデータ構造、207
はデータ構造表現101に符号化情報記憶領域を追加し
たときに、データ構造記憶手段204上に記憶されるデ
ータ構造である。
In FIG. 2, 201 is a data structure representation 1
01 is read and data structure expression analysis means for analyzing the expressed data structure, 202 is a data structure storage means for storing the result analyzed by the data structure expression analysis means 201, and 203 is a data structure storage means 202. To the data structure stored in the encoding storage area adding means for adding the encoding information storage areas A and B used at the time of encoding, and 204 is encoded by the encoding storage area adding means 203. A data structure storage means for storing a data structure to which an information storage area is added, 20
Reference numeral 5 is a data structure expression generation means for reading the data structure stored in the data structure storage means 204 and generating an expression of the data structure in a programming language. 20
6 is a data structure stored in the data structure storage means 202 when the data structure representation 101 is read, 207
Is a data structure stored on the data structure storage unit 204 when the encoded information storage area is added to the data structure representation 101.

【0023】次に、データ構造生成部102の動作につ
いて説明する。まず、データ構造表現解析手段201
は、ユーザによって作成されたデータ構造表現101を
読み込み解析する。図2に示した例では、データ構造表
現101はC言語を用いて表現されている。これは、他
のプログラミング言語、例えばパスカル言語などを用い
てもよい。データ構造表現101を読み込んだデータ構
造表現解析手段201は、表現されているデータ構造を
解析して、計算機の主記憶上で使用しやすいデータ構造
206にして、データ構造記憶手段202に格納する。
なお、プログラミング言語で記述されたプログラムを読
み込み、それを主記憶上のデータ構造、たとえばツリー
構造などに変換する方法は、一般的なコンパイラの技術
と同様である。また、プログラミング言語で記述された
プログラムの解析方法および解析した結果の主記憶上で
の表現方法については、たとえば文献2「プログラミン
グ言語処理系」、佐々政孝著、岩波書店、1989年、
に詳しく説明されている。
Next, the operation of the data structure generator 102 will be described. First, the data structure expression analysis means 201
Reads and analyzes the data structure representation 101 created by the user. In the example shown in FIG. 2, the data structure representation 101 is represented using C language. It may use other programming languages, such as Pascal. The data structure representation analysis unit 201 that has read the data structure representation 101 analyzes the represented data structure and stores it in the data structure storage unit 202 as a data structure 206 that is easy to use in the main memory of the computer.
The method of reading a program written in a programming language and converting it into a data structure on the main memory, such as a tree structure, is the same as that of general compiler technology. Further, regarding the analysis method of a program written in a programming language and the expression method of the analysis result on the main memory, for example, Reference 2 “Programming Language Processing System”, Masataka Sasa, Iwanami Shoten, 1989,
Are described in detail in.

【0024】データ構造記憶手段202上に格納された
データ構造206は、ここでは説明を簡単にするため
に、データ構造表現101によって示されたデータ構造
の名前と、そのデータ構造の各要素を表わすリストを用
いて表わすこととする。この場合、データ構造表現10
1に示したデータ構造は、2つのポインタと1つの整数
から成るので、データ構造を示すリストも3つの要素を
持つ。
The data structure 206 stored on the data structure storage means 202 represents the name of the data structure indicated by the data structure representation 101 and each element of the data structure here for the sake of simplicity of explanation. It will be represented using a list. In this case, the data structure representation 10
Since the data structure shown in 1 is composed of two pointers and one integer, the list showing the data structure also has three elements.

【0025】次に、符号化用記憶領域追加手段203
は、データ構造記憶手段202上にあるデータ構造20
6に対して、データの符号化の際に、そのデータがすで
に符号化されているか否かを示すフラグを格納する領域
Aと、すでに格納されている場合には、記憶部109上
で符号化されたデータがどの位置に置かれるかを示す値
であるオフセットを格納する領域Bの2つの領域をつけ
加えたデータ構造207を作り、データ構造記憶手段2
04に格納する。
Next, the encoding storage area adding means 203
Is the data structure 20 stored in the data structure storage means 202.
6, when the data is encoded, an area A for storing a flag indicating whether or not the data has already been encoded, and an encoding in the storage unit 109 if already stored The data structure 207 is created by adding two areas, area B, which stores an offset, which is a value indicating where the stored data is placed.
Store in 04.

【0026】データ構造207は、データ構造206に
これらの2つの記憶領域A,Bを付加したデータ構造で
あるので、データ構造206では、データ構造を示すた
めのリストは3つの要素を持っているのに対し、データ
構造207では、記憶領域A,Bが符号化用記憶領域追
加手段203によって加えられて、リストの要素が5つ
になっている。
Since the data structure 207 is a data structure in which these two storage areas A and B are added to the data structure 206, in the data structure 206, the list for indicating the data structure has three elements. On the other hand, in the data structure 207, the storage areas A and B are added by the encoding storage area adding means 203, so that the list has five elements.

【0027】その後、データ構造表現生成手段205
は、データ構造207を読み込み、データ構造表現10
3を生成する。この場合は、最初にC言語の構造体を示
す予約後「struct」を出力し、その次にデータ構
造名「node」を出力し、その次にデータ構造を示す
部分の始まりを示す「{」を出力し、さらにデータ構造
207の中のデータ構造を示すリストに格納されている
文字列を先頭から順に出力する。次いでデータ構造を示
す部分の終わりを示す「};」を出力する。
After that, the data structure expression generating means 205
Reads the data structure 207 and returns the data structure representation 10
3 is generated. In this case, first, “struct” is output after the reservation indicating the C language structure, then the data structure name “node” is output, and then “{” indicating the start of the portion indicating the data structure. And the character strings stored in the list indicating the data structure in the data structure 207 are sequentially output from the beginning. Then, “};” indicating the end of the portion indicating the data structure is output.

【0028】以上のようにして、データ構造表現101
からデータ構造表現103を生成することができる。
As described above, the data structure representation 101
The data structure representation 103 can be generated from

【0029】このデータ転送装置を使うユーザは、デー
タ構造表現103を含んだプログラムを作成する。ユー
ザが必要とする領域は、記憶領域AおよびBを除く3つ
の領域であり、記憶領域AおよびBはユーザは使用しな
い。ユーザが作成したプログラムが生成したデータは、
記憶部104に格納される。
A user who uses this data transfer device creates a program including the data structure representation 103. The areas required by the user are three areas excluding the storage areas A and B, and the storage areas A and B are not used by the user. The data generated by the program created by the user is
It is stored in the storage unit 104.

【0030】次に、記憶部104に格納されたデータを
転送するために、符号化部108におけるデータの符号
化について説明する。ここでは、転送するデータは、す
べてデータ構造表現103によって表現されたデータ構
造を持つものとし、図1の例ではデータ105を転送す
る場合について説明する。データ105の中には、デー
タ106とデータ107を指すポインタが含まれてお
り、データ106の中にもデータ107を指すポインタ
が含まれている。このデータ転送装置では、これらの、
ポインタによって参照されているデータを、参照関係を
保ったまま転送する。また、符号化を開始する前に、転
送されるデータの中の記憶領域Aには、すべて0を入れ
て初期化しておき、そのデータが、まだ符号化されてい
ないことを示しておく。
Next, the encoding of data in the encoding unit 108 in order to transfer the data stored in the storage unit 104 will be described. Here, it is assumed that all the data to be transferred has a data structure represented by the data structure representation 103, and in the example of FIG. 1, the case of transferring the data 105 will be described. The data 105 includes pointers that point to the data 106 and the data 107, and the data 106 also includes a pointer that points to the data 107. In this data transfer device, these
The data referenced by the pointer is transferred while maintaining the reference relationship. Further, before the encoding is started, the storage area A in the data to be transferred is all initialized with 0s, to show that the data has not been encoded yet.

【0031】次に、図3に示すフローチャートを用い
て、符号化部108が、符号化の要求を受けて符号化を
開始する動作について説明する。符号化の要求を受ける
ときには、同時に符号化を行なうデータを指すポインタ
も受け取る。まず、符号化部108は、符号化の要求を
受けたときに与えられたポインタの指すデータの中の符
号化済みか否かを示す領域である記憶領域Aを調べる
(ステップ301)。ここでは、すでに符号化されてい
るデータの場合は記憶領域Aに1が、まだ符号化されて
いない場合には0が入れられているものとする。もし、
すでに符号化が行なわれていれば、ポインタの指すデー
タのオフセットを格納する領域である記憶領域Bからオ
フセットを取り出し、その値を符号化して記憶部109
に書き込み、実行を終了する(ステップ302)。
Next, with reference to the flowchart shown in FIG. 3, the operation in which the coding unit 108 starts coding upon receiving a coding request will be described. When receiving a request for encoding, a pointer pointing to data to be encoded is also received at the same time. First, the encoding unit 108 checks the storage area A, which is an area indicating whether or not the data is pointed to by the pointer given when the encoding request is received (step 301). Here, it is assumed that 1 is stored in the storage area A in the case of already encoded data, and 0 is stored in the storage area A if not yet encoded. if,
If the encoding has already been performed, the offset is extracted from the storage area B, which is an area for storing the offset of the data pointed to by the pointer, and the value is encoded and stored in the storage unit 109.
, And ends the execution (step 302).

【0032】記憶部109は、有限かつ1次元の記憶空
間を持っており、データ転送装置が転送するデータの符
号化を開始する前に初期化され、記憶空間全体が使用さ
れていない状態になる。この記憶部109は、データの
格納を要求されたときには、そのデータを使用されてい
ない記憶空間の中の先頭に入れ、データを格納した時に
は、格納したデータの大きさ分だけ使用されていない空
間が小さくなる。したがって、記憶部109の使用され
ていない空間の先頭の位置は、そのデータの大きさ分だ
け記憶空間の先頭から最後の方向へ移動する。また、記
憶部109は、通常の単純な記憶部と違って、使用され
ていない記憶空間の先頭の位置への問い合わせを受けた
ときには、使用されていない空間の先頭の位置を、記憶
空間の先頭からのオフセットとして表わす値を返す機能
を持つ。
The storage unit 109 has a finite and one-dimensional storage space, is initialized before the data transfer device starts encoding the data to be transferred, and the entire storage space is in an unused state. . The storage unit 109 puts the data at the beginning of an unused storage space when storage of the data is requested, and when the data is stored, a space not used by the size of the stored data. Becomes smaller. Therefore, the position of the head of the unused space in the storage unit 109 moves in the direction from the head of the storage space to the end by the size of the data. Further, unlike a normal simple storage unit, the storage unit 109, when receiving an inquiry to the start position of the unused storage space, sets the start position of the unused space to the start position of the storage space. It has a function to return a value expressed as an offset from.

【0033】もし、符号化部108が受け取ったポイン
タが指すデータが、まだ符号化されていない0の場合
は、記憶領域Aに1を入れ、その時点で記憶部109に
データを格納した場合に、そのデータ格納される場所の
オフセットを記憶部109に尋ね、その答えを記憶領域
Bに格納する(ステップ303)。
If the data pointed to by the pointer received by the encoding unit 108 is 0 which has not been encoded yet, 1 is put into the storage area A and the data is stored in the storage unit 109 at that time. The storage unit 109 is inquired about the offset of the location where the data is stored, and the answer is stored in the storage area B (step 303).

【0034】次に、符号化部108は、そのデータのす
べての要素を符号化したか否かを調べる(ステップ30
4)。否の場合は、ポインタが指すデータの要素すべて
を1つずつ取り出して(ステップ305)、それぞれの
要素に対しての処理を行なう。すべての要素についての
処理が終わっている場合は、符号化部108全体の処理
を終了する。
Next, the coding unit 108 checks whether all the elements of the data have been coded (step 30).
4). If not, all the elements of the data pointed to by the pointer are taken out one by one (step 305), and the processing is performed for each element. If the processing has been completed for all elements, the processing of the entire encoding unit 108 is completed.

【0035】それぞれの要素に対する処理は、次のよう
なことを行なう。まず、その要素はポインタか否かを調
べる(ステップ306)。ポインタでなければ、その要
素を符号化して記憶部109に格納する(ステップ30
7)。ポインタであれば、符号化部108を再帰的に呼
び出して、そのポインタの指すデータを符号化し、記憶
部109に格納する(ステップ308)。
The processing for each element is as follows. First, it is checked whether the element is a pointer (step 306). If it is not a pointer, the element is encoded and stored in the storage unit 109 (step 30).
7). If it is a pointer, the encoding unit 108 is recursively called to encode the data pointed to by the pointer and store it in the storage unit 109 (step 308).

【0036】記憶部109に格納された符号化済みのデ
ータは、他の計算機に転送され、復号化されて、記憶部
104上での参照関係と同じ参照関係を保ったまま使用
することができる。このときの復号化方式は、前記した
文献1に記載された方法と同じでよい。
The coded data stored in the storage unit 109 is transferred to another computer, decoded, and can be used while maintaining the same reference relationship as that in the storage unit 104. . The decoding method at this time may be the same as the method described in Document 1 described above.

【0037】以上のように、本実施例によれば、符号化
されたデータを記憶空間の先頭から格納し、未使用空間
の先頭の位置を問い合わせられたときには、その位置を
答えとして返す記憶部109と、ユーザからの与えられ
たデータ構造101に対して、符号化の際に使用する符
号化情報記憶領域AおよびBを付加したデータ構造を生
成するデータ構造生成部102と、その付加した領域の
符号化済み情報およびオフセット情報を利用してデータ
を符号化する符号化部108を設けることにより、符号
化を行なう際に、符号化に必要なこれらの情報を、表な
どの符号化されるデータ以外のデータ構造を用いて管理
したり、符号化に必要な情報を表に格納したり、その表
から検索して取り出すような操作をすることなく、必要
な情報をすべて符号化するデータ自体に持たせることが
でき、符号化するデータの中への書き込みおよび符号化
するデータからの情報の読み出しだけで、すべてのデー
タ要素の符号化を行なうことができるので、符号化を高
速化することができる。
As described above, according to the present embodiment, the storage unit which stores the encoded data from the head of the storage space and returns the position as an answer when the position of the head of the unused space is inquired. 109, a data structure generation unit 102 that generates a data structure in which the encoded information storage areas A and B used for encoding are added to the data structure 101 given by the user, and the added area By providing the encoding unit 108 that encodes data by using the encoded information and the offset information of, the information necessary for encoding is encoded in a table or the like when performing the encoding. It manages all the necessary information without managing it using a data structure other than data, storing the information required for encoding in a table, and performing operations such as searching and retrieving from that table. The data itself to be encoded can be provided, and all the data elements can be encoded only by writing in the data to be encoded and reading information from the data to be encoded. It can speed up.

【0038】なお、本実施例では、復号化には従来と同
じ方法を用いたが、復号化に際しても、受信したデータ
を格納する記憶部の中のデータ構造に対して、復号化に
必要な情報を格納する領域を追加し、復号化に際して
は、復号に必要な情報をその領域に記憶させることによ
って、復号化を高速化することも可能である。
In this embodiment, the same method as the conventional method is used for the decoding, but at the time of the decoding, the data structure in the storage unit for storing the received data is necessary for the decoding. It is also possible to speed up the decoding by adding an area for storing information and storing information necessary for decoding in the area when decoding.

【0039】また、本実施例では、記憶領域Aを用い
て、そのデータが符号化済みか否かを表現しているが、
符号化済みでない場合には記憶領域Bは使われていない
ので、符号化済みでない場合には記憶領域Bにオフセッ
トとしては絶対使われない値、たとえば負の値などを入
れて符号化済みでないことを示すこととし、記憶領域B
のみで符号化済みか否かの判断ができるようにして、記
憶領域Aを不必要とすることも可能である。
In this embodiment, the storage area A is used to represent whether or not the data has been encoded.
Since the storage area B is not used when it is not already encoded, the storage area B is not already encoded with a value that is never used as an offset, for example, a negative value, when it is not already encoded. Storage area B
It is also possible to make the storage area A unnecessary by making it possible to determine whether or not it has already been encoded.

【0040】[0040]

【発明の効果】以上のように、本発明は、符号化された
データを記憶空間の先頭から格納し、未使用空間の先頭
の位置を問い合わせられたときは、その位置を答えとし
て返す記憶部を備え、ユーザから与えられたデータ構造
に対して、符号化の際に使用する符号化情報記憶領域を
付加したデータ構造を生成するとともに、その付加した
領域の情報を利用してデータを符号化するようにしたの
で、ポインタによって結ばれたデータ構造を、その参照
関係を保ったままより高速に符号化することができると
いう効果を有する。
As described above, the present invention stores coded data from the beginning of the storage space and returns the position as an answer when the position of the beginning of the unused space is inquired. And to generate a data structure in which the encoded information storage area used for encoding is added to the data structure given by the user, and encode the data using the information in the added area. By doing so, there is an effect that the data structure connected by the pointer can be encoded at a higher speed while maintaining the reference relationship.

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

【図1】本発明の一実施例におけるデータ転送符号化装
置の構成を示すブロック図
FIG. 1 is a block diagram showing the configuration of a data transfer encoding device according to an embodiment of the present invention.

【図2】同装置におけるデータ構造生成部102の内部
構成と、データ構造表現101と103の内容の例を示
したブロック図
FIG. 2 is a block diagram showing an internal configuration of a data structure generation unit 102 and an example of contents of data structure representations 101 and 103 in the same apparatus.

【図3】同装置における符号化部108の動作を示すフ
ローチャート
FIG. 3 is a flowchart showing an operation of an encoding unit in the same device.

【図4】従来のデータ転送装置のデータを符号化する部
分の構成を示すブロック図
FIG. 4 is a block diagram showing a configuration of a portion that encodes data in a conventional data transfer device.

【符号の説明】 101 ユーザによって与えられたデータ構造表現 102 データ構造生成部 103 データ構造生成部によって生成されたデータ構
造表現 104 転送するデータを記憶する記憶部 105 転送されるデータ 106 データ105の中のポインタによって指されて
いるデータ 107 データ105と106の中にポインタによって
指されているデータ 108 符号化部 109 符号化されたデータを記憶する記憶部 A 符号化済み情報を格納する記憶領域 B 記憶部109上でのオフセット情報を格納する記憶
領域 201 データ構造表現解析手段 202 データ構造記憶手段 203 符号化用記憶領域追加手段 204 データ構造記憶手段 205 データ構造表現生成手段 206 データ構造記憶手段202に記憶されるデータ
構造 207 データ構造記憶手段204に記憶されるデータ
構造
[Explanation of Codes] 101 Data structure representation 102 given by user 102 Data structure generation unit 103 Data structure representation 104 generated by data structure generation unit 104 Storage unit for storing data to be transferred 105 Data to be transferred 106 Among data 105 Data 107 pointed to by the pointer 107 data 105 and 106 pointed to by the pointer 108 data encoding unit 109 storage unit A storing encoded data storage region B storing encoded information storage Storage area 201 for storing offset information on unit 109 Data structure expression analysis means 202 Data structure storage means 203 Encoding storage area addition means 204 Data structure storage means 205 Data structure expression generation means 206 Stored in data structure storage means 202 Data structure 207 data Data structure stored in structure storage means 204

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 ユーザから与えられたデータ構造に対し
て、符号化要求のあったデータがすでに符号化済みであ
るか否を示す情報を格納する符号化情報記憶領域を付加
したデータ構造を生成し、この生成されたデータ構造を
持つデータの符号化を行なう際に、前記符号化情報記憶
領域中に符号化済であることを示す情報が含まれていな
い場合には、その領域に符号化済みであることを示す情
報を入れるとともに、符号化されたデータを格納する記
憶部に対して未使用空間の先頭の位置を問い合わせ、そ
の答えとして得られた値を符号化情報記憶領域中に入
れ、符号化要求のあったデータのすべての要素を符号化
して前記記憶部に格納する一方、符号化情報記憶領域中
に符号化済みであることを示す情報が含まれている場合
には、符号化情報記憶領域からそのデータが符号化され
た時の前記記憶部の未使用空間の先頭の位置を示す値を
取り出し、その値を符号化して前記記憶部に格納するデ
ータ転送符号化方法。
1. A data structure in which a coding information storage area for storing information indicating whether or not the data requested to be coded has already been coded is generated with respect to the data structure given by the user. However, when the data having the generated data structure is encoded, if the information indicating that the data has been encoded is not included in the encoding information storage area, the encoding is performed in the area. In addition to entering the information indicating that it has been completed, inquire the position of the beginning of the unused space to the storage unit that stores the encoded data, and enter the value obtained as the answer in the encoded information storage area. , While encoding all the elements of the data for which encoding has been requested and storing them in the storage section, when the encoded information storage area contains information indicating that encoding has been completed, Information storage A data transfer encoding method, wherein a value indicating the position of the beginning of an unused space of the storage unit when the data is encoded is extracted from the area, the value is encoded and stored in the storage unit.
【請求項2】 有限かつ1次元の記憶空間を有し、符号
化データの格納を要求されたときには未使用空間の先頭
に格納し、未使用空間の先頭の位置を問い合わせられた
ときにはその位置を示す値を答えとして返す記憶部と、
ユーザから与えられたデータ構造に対して、符号化の際
に使用する符号化情報記憶領域を付加したデータ構造を
生成するデータ構造生成部と、前記データ構造生成部に
よって生成されたデータ構造を持つデータを、前記符号
化情報記録領域に格納された情報を利用して符号化する
符号化部とを備えたデータ転送符号化装置。
2. A finite and one-dimensional storage space, which stores the encoded data at the beginning of the unused space when requested to be stored, and when the position of the beginning of the unused space is inquired, sets the position. A storage unit that returns the indicated value as an answer,
It has a data structure generation unit for generating a data structure in which a coded information storage area used for encoding is added to a data structure given by a user, and a data structure generated by the data structure generation unit. A data transfer encoding device, comprising: an encoding unit for encoding data using information stored in the encoded information recording area.
【請求項3】 符号化情報記憶領域は、符号化要求のあ
ったデータがすでに符号化済みであるか否かを示す値を
格納する領域と、そのデータが符号化されて記憶部に格
納されている場合に、その先頭からの相対位置を示すオ
フセットを格納する領域の二つの領域である請求項2記
載のデータ転送符号化装置。
3. The encoding information storage area stores an area for storing a value indicating whether or not the data requested to be encoded has already been encoded, and the data is encoded and stored in the storage unit. 3. The data transfer encoding device according to claim 2, wherein the data transfer encoding device has two areas, that is, an area for storing an offset indicating a relative position from the head.
【請求項4】 符号化情報記憶領域は、符号化要求のあ
ったデータが符号化されて記憶部に格納されたときに、
その先頭からの相対位置を示すオフセットを格納すると
ともに、そのデータがまだ符号化されていない場合に
は、オフセットとしては絶対に使用されない値を格納す
ることにより符号化済みでないことを示す一つの領域で
ある請求項2記載のデータ転送符号化装置。
4. The encoded information storage area, when the data requested to be encoded is encoded and stored in the storage unit,
One area that indicates that it has not been encoded by storing an offset that indicates the relative position from the beginning and, if the data has not been encoded, stores a value that is never used as an offset. The data transfer encoding device according to claim 2, wherein
JP3192891A 1991-08-01 1991-08-01 Data transfer encoding method and apparatus thereof Expired - Lifetime JPH07111699B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3192891A JPH07111699B2 (en) 1991-08-01 1991-08-01 Data transfer encoding method and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3192891A JPH07111699B2 (en) 1991-08-01 1991-08-01 Data transfer encoding method and apparatus thereof

Publications (2)

Publication Number Publication Date
JPH0535628A true JPH0535628A (en) 1993-02-12
JPH07111699B2 JPH07111699B2 (en) 1995-11-29

Family

ID=16298699

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3192891A Expired - Lifetime JPH07111699B2 (en) 1991-08-01 1991-08-01 Data transfer encoding method and apparatus thereof

Country Status (1)

Country Link
JP (1) JPH07111699B2 (en)

Also Published As

Publication number Publication date
JPH07111699B2 (en) 1995-11-29

Similar Documents

Publication Publication Date Title
JP3152868B2 (en) Search device and dictionary / text search method
US5640559A (en) System and method of encoding units of data including entity/relationship data, function calls and file data using a common format (CDF) according to formal CDF grammar rules
JP3272014B2 (en) Method and apparatus for creating a data processing dictionary including hierarchical data processing information
US7283959B2 (en) Compact easily parseable binary format for a context-free grammar
US8156156B2 (en) Method of structuring and compressing labeled trees of arbitrary degree and shape
US7627589B2 (en) High performance XML storage retrieval system and method
CA2500422A1 (en) Annotated automaton encoding of xml schema for high performance schema validation
CN110532347A (en) A kind of daily record data processing method, device, equipment and storage medium
CN112363706A (en) Nested combination preprocessing method and equipment
CN100527131C (en) Interdynamic access method and tool of IMS data base
US20050027510A1 (en) Left-corner chart parsing
US8463759B2 (en) Method and system for compressing data
KR100305097B1 (en) Compiler capable of reducing interrupt handling in optimization and its optimization method
JP2746218B2 (en) Resource management device and resource management method
US20090089268A1 (en) XML Update Facility for an XQuery Processor
JPH0535628A (en) Method and device for encoding data transfer
CN111241191A (en) Database synchronization method and device
JP2880192B2 (en) Character string search method and apparatus
JPH0962700A (en) Method and device for constructing dictionary
US6356895B1 (en) Method and computer program product for processing system files using a trigger program
CN116089663A (en) Rule expression matching method and device and computer readable storage medium
Koyama et al. A fast and compact technique of implementing transition tables for finite state automata
CN117873403A (en) Method and system for restoring tmp file in office document IO
CN117407002A (en) Transcoding method, transcoding device, computer equipment and storage medium
CN115169343A (en) Entity relationship extraction method and device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 8

Free format text: PAYMENT UNTIL: 20080714

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

Year of fee payment: 9

Free format text: PAYMENT UNTIL: 20090714

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

Free format text: PAYMENT UNTIL: 20100714

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20100714

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20110714

Year of fee payment: 11

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110714

Year of fee payment: 11