JP2006079492A - Difference data generation device, difference data generation method and difference data generation program - Google Patents

Difference data generation device, difference data generation method and difference data generation program Download PDF

Info

Publication number
JP2006079492A
JP2006079492A JP2004264948A JP2004264948A JP2006079492A JP 2006079492 A JP2006079492 A JP 2006079492A JP 2004264948 A JP2004264948 A JP 2004264948A JP 2004264948 A JP2004264948 A JP 2004264948A JP 2006079492 A JP2006079492 A JP 2006079492A
Authority
JP
Japan
Prior art keywords
data
difference
difference data
old
new
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
JP2004264948A
Other languages
Japanese (ja)
Other versions
JP4036852B2 (en
Inventor
Satoshi Mitsui
聡 三井
Ryozo Kiyohara
良三 清原
Daizo Kikko
大造 橘高
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2004264948A priority Critical patent/JP4036852B2/en
Publication of JP2006079492A publication Critical patent/JP2006079492A/en
Application granted granted Critical
Publication of JP4036852B2 publication Critical patent/JP4036852B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the size of difference data in updating (version-up) the data such as a program. <P>SOLUTION: In a difference data generation device 100, a first difference data generation section 102 reads old data 192 and new data 191 stored on a data storage section 190 to generate difference data 193 before conversion using a conventional Move command code and an ADD command code. A second difference data generation section 130 generates difference data 194 after conversion using a particular Move command code not updating the value of the processing pointer of the new data after Move processing and using a Skip command code only updating the value of the processing point of the new data on the basis of the difference data 193 before conversion. A difference data output section 140 compares the data size of the difference data 193 before conversion with that of the difference data 194 after conversion to output the difference data having a smaller data size as the difference data. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、データ更新のための差分データ生成装置、差分データ生成方法および差分データ生成プログラムに関するものである。   The present invention relates to a difference data generation apparatus, a difference data generation method, and a difference data generation program for data update.

パーソナルコンピュータや組込み機器(携帯電話、カーナビゲーションシステムなど)などの装置では、プロセッサによって扱われるプログラムなどのデータを更新(バージョンアップ)することがある。バージョンアップの際には、記憶媒体や通信網を介して更新前データと更新後データの差分データを装置に送り、装置内で差分データを更新前データに適用して更新後データを生成する、という方法が一般的である。なお、更新前データと更新後データの差分データは、バージョンアップ対象の装置とは別の装置(差分データ生成装置)においてあらかじめ生成される。   In an apparatus such as a personal computer or an embedded device (such as a mobile phone or a car navigation system), data such as a program handled by a processor may be updated (version up). When upgrading, send the difference data between the pre-update data and the post-update data to the device via the storage medium or the communication network, and apply the difference data to the pre-update data in the device to generate the post-update data. This method is common. Note that the difference data between the pre-update data and the post-update data is generated in advance in a device (difference data generation device) different from the device to be upgraded.

通信帯域の狭い無線網などを使用して差分情報を装置に送付するようなシステムにおいては特に、差分データのサイズは小さいことが望ましい。そして、差分データの表現方法、抽出方法を工夫することによって、差分データサイズを小さくすることが可能である。   Particularly in a system in which difference information is sent to a device using a wireless network having a narrow communication band, the size of the difference data is desirably small. Then, the difference data size can be reduced by devising the differential data expression method and extraction method.

図1は、旧データ192と新データ191を示す図である。
各種データ、特に組込み機器向けプログラムやカーナビゲーションシステム向けの地図データなどのバージョンアップに際しては、図1に示すように、旧データ192と新データ191との位置がずれて、且つ、ずれた部分について飛び飛びでデータの内容が変更になっている、というパターンの更新が多く見られる。
図1ではAとA’、CとC’、EとE’、GとG’の内容が同一でBとB’、DとD’、FとF’の内容が変更になっている。
FIG. 1 is a diagram showing old data 192 and new data 191.
When upgrading various data, especially programs for embedded devices and map data for car navigation systems, as shown in FIG. 1, the positions of the old data 192 and the new data 191 are misaligned and the misaligned portion. There are many pattern updates where the contents of the data are changed by jumping.
In FIG. 1, the contents of A and A ′, C and C ′, E and E ′, and G and G ′ are the same, and the contents of B and B ′, D and D ′, and F and F ′ are changed.

図2は、従来例による差分データを示す図である。
図1に示す旧データ192と新データ191とに対する差分データとして一般的な差分データ表現方法を図2に基づいて説明する。
一般的な差分データ表現方法には、例えばWalter F.Tichyの論文「The String−to−String Correction Problem with Block Moves」がある。
この表現方法は、旧データ192の一部、あるいは全部からデータを移動して前記新データ191にコピーすることを意味するMove命令と、新データ191に当該差分データ中に記述したデータを追加することを意味するAdd命令とを差分データ表現に用いる方法である。
図1の例に適用すると(ただしA〜G、A’〜G’の範囲に限定)、図2に示すような差分データで旧データ192と新データ191の間の差分を表現することが出来る。
AからA’、CからC’、EからE’、GからG’のデータの移行はMove命令で表され、B’、D’、F’への新規データの追加はAdd命令で表されている。
Move命令は位置情報として旧データにおける対象データの位置するアドレスを示している。
Move命令には旧データ192における位置情報が必要となるため、図2のようにMove命令とAdd命令が交互に現れるようなケースではMove命令の位置情報が差分データサイズ増加の要因の一つとなってしまう。
FIG. 2 is a diagram showing difference data according to a conventional example.
A general differential data expression method as differential data for the old data 192 and the new data 191 shown in FIG. 1 will be described with reference to FIG.
As a general differential data expression method, for example, Walter F. et al. There is a paper by Tichy "The String-to-String Correction Problem with Block Moves".
In this expression method, a Move instruction that means that data is moved from a part or all of the old data 192 and copied to the new data 191 and the data described in the difference data are added to the new data 191. This is a method of using the Add instruction meaning that the difference data is expressed.
When applied to the example of FIG. 1 (but limited to the range of A to G and A ′ to G ′), the difference between the old data 192 and the new data 191 can be expressed by the difference data as shown in FIG. .
Data migration from A to A ′, C to C ′, E to E ′, G to G ′ is represented by the Move instruction, and addition of new data to B ′, D ′, and F ′ is represented by the Add instruction. ing.
The Move instruction indicates the address where the target data is located in the old data as position information.
Since the Move instruction requires position information in the old data 192, in the case where the Move instruction and the Add instruction appear alternately as shown in FIG. 2, the position information of the Move instruction becomes one of the factors for increasing the difference data size. End up.

このMove命令の位置情報により差分データサイズが増加することに対して、Move命令には新データ191と旧データ192のオフセット情報を用い、Move命令を表現する際には直前のMove命令のオフセット情報を参照し、オフセットが同じ場合は1ビットのフラグを立てて直前のMove命令とオフセットが同じであることを示すことで、Move命令のオフセット情報を省略するという方法が開示されている(特許文献1)。
オフセットとは、旧データ192内の移行データを新データ191内の移行位置に移行する際の相対値を示す。
普通にオフセット情報を示すには1ビットより多くのデータが必要であることから(例えば1byte)、前記方法によって余分なオフセット情報を省略し、差分データサイズを小さくすることができる。
The difference data size is increased by the position information of the Move instruction, whereas the offset information of the new data 191 and the old data 192 is used for the Move instruction, and when the Move instruction is expressed, the offset information of the immediately preceding Move instruction is used. When the offset is the same, a method of omitting the offset information of the Move instruction is disclosed by setting a 1-bit flag to indicate that the offset is the same as the previous Move instruction (Patent Literature). 1).
The offset indicates a relative value when the migration data in the old data 192 is migrated to the migration position in the new data 191.
Normally, more data than 1 bit is required to indicate offset information (for example, 1 byte), so that the offset data can be omitted by the above method and the differential data size can be reduced.

前記特許文献1の方法によって表現される図1に対する差分データは図3に示すような形式になる。
図1に示すAからA’、CからC’、EからE’、GからG’のデータ移行についてMove命令の位置情報をオフセットで表すと、オフセットはそれぞれ「+100」で同じとなる。図3は、連続する同一オフセットである「+100」を1ビットの「flag」で表したものである。
Difference data with respect to FIG. 1 expressed by the method of Patent Document 1 has a format as shown in FIG.
When the position information of the Move instruction is represented by an offset for data transfer from A to A ′, from C to C ′, from E to E ′, and from G to G ′ shown in FIG. In FIG. 3, “+100”, which is the same continuous offset, is represented by 1-bit “flag”.

しかしながら前記差分表現方法では、図4に示すようにB’、F’が旧データ192の別の位置(H)からのMove命令で表現できる場合には、Move命令のオフセットが連続して同じ値をとらないため、前記フラグを用いたオフセット情報の省略はあまり効果がない。   However, in the differential expression method, when B ′ and F ′ can be expressed by a Move instruction from another position (H) of the old data 192 as shown in FIG. 4, the offsets of the Move instruction are continuously the same value. Therefore, omission of offset information using the flag is not very effective.

図4に示す旧データ192から新データ191への更新を特許文献1の方法によって表現すると図5のようになる。
この場合には、「flag」は1ヶ所しか使用できず、フラグを用いたオフセット情報の省略にあまり効果が無いことを示している。
When the update from the old data 192 shown in FIG. 4 to the new data 191 is expressed by the method of Patent Document 1, it is as shown in FIG.
In this case, “flag” can be used only in one place, which indicates that the omission of offset information using a flag is not very effective.

図4のようなケースに対して効果のある方法として、特許文献1ではMove命令で頻繁に用いられるオフセット情報は一つまたは複数のビットで表現する、という方法について開示されている。この方法によって、図4におけるA’、C’、E’、G’のMove命令についてオフセット情報を一つまたは複数のビットで表現することで差分データサイズを小さくすることができる。
図4においては、「flag」を含め「+100」をオフセットとするMove命令が4つあり、「+100」を示すビット表現を用いることで差分データサイズを小さくする。
As an effective method for the case shown in FIG. 4, Patent Document 1 discloses a method of expressing offset information frequently used in Move instructions by one or a plurality of bits. By this method, the differential data size can be reduced by expressing the offset information with one or a plurality of bits for the Move instructions A ′, C ′, E ′, and G ′ in FIG.
In FIG. 4, there are four Move instructions including “flag” with “+100” as an offset, and the differential data size is reduced by using a bit expression indicating “+100”.

しかしながら、図6に示すようにA’がAだけでなくIとも等しく、E’がEだけでなくJとも等しいようなケースでは、特許文献1で開示された処理では必ずしもA→A’、E→E’というMove命令が差分として抽出されるとは限らない。同一オフセットを一つまたは複数のビットで表現するような手法では、同じオフセットが出来るだけ多く現れた方が差分データを小さくすることが出来るが、図6のようなケースでI→A’、J→E’というようにMove命令が差分として抽出された場合、差分データのサイズ削減効果は小さくなってしまう。   However, as shown in FIG. 6, in the case where A ′ is equal to not only A but also I and E ′ is not only equal to E but also J, the process disclosed in Patent Document 1 does not necessarily require A → A ′, E → The Move command E ′ is not always extracted as a difference. In the method of expressing the same offset by one or a plurality of bits, the difference data can be reduced if the same offset appears as much as possible. However, in the case shown in FIG. 6, I → A ′, J If the Move instruction is extracted as a difference, such as E ′, the effect of reducing the size of the difference data is reduced.

図6に示す旧データ192から新データ191への更新を特許文献1の方法によって表現すると図7のようになる。
この場合には、同一オフセットは「+100」が2ヶ所にあるだけで、「+100」という値を示す「+100flag」を2ヶ所で使用することしかできない。また、「+100flag」が「+100」という値であることを示す別情報を持たなければ行けないことからも差分データのサイズ削減効果は小さくなってしまう。
特開2004−152136号公報
When the update from the old data 192 shown in FIG. 6 to the new data 191 is expressed by the method of Patent Document 1, it is as shown in FIG.
In this case, the same offset has only “+100” in two places, and “+100 flag” indicating a value of “+100” can only be used in two places. In addition, the effect of reducing the size of the difference data is reduced because it is necessary to have “+100 flag” unless it has other information indicating that the value is “+100”.
JP 2004-152136 A

一つのバージョンのデータを別のバージョンのデータに更新するためのデータ更新システムにおいて、更新前データと更新後データの差分データサイズを小さくすることが要求されている。このような状況において、各種データ、特に組込み機器向けプログラムやカーナビゲーションシステム向けの地図データなどのバージョンアップに際しては、図1や図4、図6のようなパターンの更新が多く見受けられるが、従来の技術では前記のようなパターンに対して小さいサイズで差分データを表現できなかったり、小さいサイズで差分データを表現できる可能性があってもそのような表現で差分データを抽出することが保証されないという課題があった。   In a data update system for updating one version of data to another version, it is required to reduce the difference data size between the pre-update data and the post-update data. In such a situation, when updating various data, particularly programs for embedded devices and map data for car navigation systems, many patterns are updated as shown in FIGS. 1, 4, and 6. In this technique, even if there is a possibility that the difference data cannot be expressed with a small size or the difference data can be expressed with a small size with respect to the pattern as described above, it is not guaranteed that the difference data is extracted with such an expression. There was a problem.

本発明は、上記課題の解決を踏まえてなされたもので、従来の技術では差分データを小さいサイズで表現できなかったような更新パターンにおいて差分データを小さく表現できることと、差分データを小さく表現することが出来る可能性がある場合に的確に差分データを小さく表現することができるようにすることなどを目的とする。   The present invention has been made based on the solution of the above-described problem. It is possible to express the difference data small in an update pattern that cannot be expressed in a small size with the conventional technology, and to express the difference data small. The purpose is to make it possible to accurately express the difference data when there is a possibility of being able to do so.

本発明の差分データ生成装置は、旧データと新データとを記憶するデータ記憶部と、データ記憶部に記憶された旧データと新データとを読み込んで、旧データポインタの示す位置とコピーサイズとを示し、旧データポインタの示す位置にあるデータを新データポインタの示す位置からコピーサイズ分コピーし、新データポインタの示す位置からコピーサイズ分移動した位置を示す値を新データポインタに設定することを示す第1Move命令コードを差分データに含めるかの判定と、追加データと追加データサイズとを示し、新データポインタの示す位置から追加データを追加し、新データポインタの示す位置を追加データサイズ分移動した位置を示す値を新データポインタに設定することを示すAdd命令コードを差分データに含めるかの判定と、旧データポインタの示す位置とコピーサイズとを示し、旧データポインタの示す位置にあるデータを新データポインタの示す位置からコピーサイズ分コピーし、新データポインタの値を更新しないことを示す第2Move命令コードを差分データに含めるかの判定と、ポインタ更新サイズを示し、新データポインタの示す位置からポインタ更新サイズ分移動した位置を示す値を新データポインタに設定することを示すSkip命令コードを差分データに含めるかの判定とを行い記憶部に記憶し、判定結果に基づいて差分データを生成して記憶部に記憶する差分データ生成部とを備えたことを特徴とする。   The difference data generation device of the present invention includes a data storage unit that stores old data and new data, and reads the old data and new data stored in the data storage unit, and the position and copy size indicated by the old data pointer The data at the position indicated by the old data pointer is copied by the copy size from the position indicated by the new data pointer, and a value indicating the position moved by the copy size from the position indicated by the new data pointer is set in the new data pointer. Indicating whether to include the first Move instruction code indicating the difference data, additional data and additional data size, adding additional data from the position indicated by the new data pointer, and adding the position indicated by the new data pointer to the additional data size Whether the difference data includes an Add instruction code indicating that a value indicating the moved position is set in the new data pointer Indicates the position and copy size indicated by the old data pointer, indicates that the data at the position indicated by the old data pointer is copied from the position indicated by the new data pointer by the copy size, and the value of the new data pointer is not updated. Skip instruction code indicating whether to include the second Move instruction code in the difference data, the pointer update size, and a value indicating the position moved by the pointer update size from the position indicated by the new data pointer is set in the new data pointer And a difference data generation unit for generating difference data based on the determination result and storing the difference data in the storage unit.

本発明によれば、例えば、従来の技術では差分データを小さいサイズで表現できなかったような更新パターンにおいて差分データを小さく表現できる。   According to the present invention, for example, the difference data can be expressed in a small size in an update pattern that cannot be expressed in a small size in the conventional technique.

実施の形態1.
まず、差分データの表現方法について説明する。
差分データ生成装置では従来のMove命令(第1Move命令または第1Move命令コード)、Add命令(Add命令コード)に加えて特殊Move命令(第2Move命令または第2Move命令コード)とSkip命令(Skip命令コード)とを差分データの表現に用いる。
特殊Move命令は、旧データ192の一部、あるいは全部からデータを移動して前記新データ191にコピーした後に、前記新データ191に対する書換えポインタを前記コピーデータの先頭に移動させることを意味する。
Skip命令は、新データ191に対する書換えポインタを前方に指定長分進めることを意味する。
Embodiment 1 FIG.
First, a method for expressing difference data will be described.
In the differential data generation device, in addition to the conventional Move instruction (first Move instruction or first Move instruction code) and Add instruction (Add instruction code), a special Move instruction (second Move instruction or second Move instruction code) and a Skip instruction (Skip instruction code) ) Are used to express difference data.
The special Move instruction means moving the data from a part or all of the old data 192 and copying it to the new data 191, and then moving the rewrite pointer for the new data 191 to the head of the copy data.
The Skip instruction means that the rewrite pointer for the new data 191 is advanced forward by a specified length.

ここで、各差分命令のフォーマットの例を図8に示す。
ただし、図8に示すのはあくまでも説明のための例であって、本発明の効果が図8に示すフォーマットに限定されていることを示すものではない。
Move命令は、Moveを表す命令識別子1byte(バイト)と旧データ192と新データ191とのオフセット(Moveオフセット)2byte、Move対象のデータ長(Moveサイズ)4byteで表現している。
Add命令は、Addを表す命令識別子1byteとAddするサイズ(Addサイズ)2byte、および実際にAddする内容(Addデータ)で表現している。また、AddデータのサイズはAddサイズである。
特殊Move命令は、特殊Moveを表す命令識別子1byteと旧データ192と新データ191とのオフセット(特殊Moveオフセット)2byte、Move対象のデータ長(特殊Moveサイズ)4byteで表現する。
Skip命令は、Skipを表す命令識別子1byteとSkipするサイズ(Skipサイズ)4byteで表現している。
Skip命令ではMove命令や特殊Move命令とは異なりオフセット情報が不要であるため、Move命令や特殊Move命令と比較して小さいサイズで表現することができる。
Here, an example of the format of each differential instruction is shown in FIG.
However, what is shown in FIG. 8 is merely an example for explanation, and does not indicate that the effect of the present invention is limited to the format shown in FIG.
The Move instruction is expressed by an instruction identifier 1 byte (byte) representing Move, an offset (Move offset) 2 bytes of the old data 192 and the new data 191, and a data length (Move size) 4 bytes of the Move target.
The Add instruction is expressed by an instruction identifier 1 byte indicating Add, a size (Add size) 2 bytes to be added, and contents (Add data) to be actually added. The size of the Add data is the Add size.
The special Move instruction is expressed by an instruction identifier 1 byte representing the special Move, an offset (special Move offset) 2 bytes of the old data 192 and the new data 191, and a data length (special Move size) 4 bytes of the Move target.
The Skip instruction is expressed by an instruction identifier 1 byte representing Skip and a size to be skipped (Skip size) 4 bytes.
Unlike the Move instruction and the special Move instruction, the Skip instruction does not require offset information, so that it can be expressed in a smaller size than the Move instruction and the special Move instruction.

図9には、図1で示す更新パターンにおける、A’からG’までの部分の差分データを示している。
差分データは従来の方法としてMove命令とAdd命令だけを用い、Move命令の位置情報をオフセットで表した場合の差分データである。
この場合、図8に示す命令フォーマットを使用すると、Move命令(7byte)が4つで28byte、Add命令(3byte+Addサイズ)が13byte、23byte、13byteで差分データの合計サイズは77byteになる。
FIG. 9 shows the difference data of the part from A ′ to G ′ in the update pattern shown in FIG.
The difference data is difference data when only the Move instruction and the Add instruction are used as a conventional method, and the position information of the Move instruction is expressed by an offset.
In this case, when the instruction format shown in FIG. 8 is used, there are four Move instructions (7 bytes), 28 bytes, Add instructions (3 bytes + Add size) are 13 bytes, 23 bytes, and 13 bytes, and the total size of the difference data is 77 bytes.

図10は、図1で示す更新パターンにおける、A’からG’までの部分の差分データを特殊Move命令とSkip命令とを使用して示している。
図中において特殊Move命令を「Move’」で示す。
最初の特殊Move命令によって、旧データ192のAからGまでのデータを新データ191のA’からG’にコピーした後、新データ191の更新ポインタをA’の先頭に戻す。
次にSkip命令によって更新ポインタを100byte進めてB’の先頭に移動させる。
次にAdd命令によってB’の内容10byte分のデータを追加する。
それ以降も同様の処理を行う。このような差分データ表現によって、A’からG’までの間を更新することが可能である。
なお、この場合の差分データのサイズは、特殊Move命令が7byte、Skip命令(5byte)が4つで20byte、Add命令(3byte+Addサイズ)が13byte、23byte、13byteで合計76byteであり、図9に示した従来の差分データより小さいサイズになっている。
図1の例に対しては、差分データのサイズは1byteしか小さくなっていないが、MoveとAddの繰り返し数が大きくなるにつれて差分データとしてより小さくなる。
FIG. 10 shows the difference data of the part from A ′ to G ′ in the update pattern shown in FIG. 1 using a special Move instruction and a Skip instruction.
In the figure, the special Move instruction is indicated by “Move ′”.
After the data from A to G of the old data 192 is copied from A ′ to G ′ of the new data 191 by the first special Move instruction, the update pointer of the new data 191 is returned to the head of A ′.
Next, the update pointer is advanced by 100 bytes by the Skip instruction and moved to the head of B ′.
Next, data for 10 bytes of content of B ′ is added by the Add instruction.
Thereafter, the same processing is performed. It is possible to update between A ′ and G ′ by such differential data representation.
The size of the difference data in this case is 7 bytes for the special Move instruction, 4 bytes for the Skip instruction (5 bytes), 20 bytes, and 13 bytes for the Add instruction (3 bytes + Add size), 23 bytes, 13 bytes, which is 76 bytes in total, as shown in FIG. The size is smaller than the conventional difference data.
For the example of FIG. 1, the size of the difference data is only 1 byte, but the difference data becomes smaller as the number of Move and Add repetitions increases.

なお、差分データを使用して行う旧データから新データへのデータ更新処理は、特殊Move命令が差分データに現れた時点でMoveサイズ分のコピーを行うのではなく、特殊Move命令のオフセットとMoveサイズを記憶部に記憶し、その後に発生するSkip命令の適用時に、前記Skip命令の対象範囲が前記特殊Move命令のMove範囲に含まれるかどうかを判断し、含まれている場合には前記Skip命令をMove命令に置き換えて処理することも可能である。
このSkip命令をMove命令に置き換える処理は、前記特殊Move命令のオフセットをMoveオフセットとし、前記Skip命令のSkipサイズをMoveサイズとすることで行える。
この更新処理によって、特殊Move命令をその意味通りに処理した際の無駄なコピー処理を回避することが可能となる。
例えば、図1の例では新データ191におけるB’、D’、F’部分へのコピーをしなくてもよいことになる。
Note that the data update process from the old data to the new data performed using the difference data does not copy the Move size when the special Move instruction appears in the difference data, but the offset of the special Move instruction and the Move. The size is stored in the storage unit, and it is determined whether or not the target range of the Skip instruction is included in the Move range of the special Move instruction when the Skip instruction generated thereafter is applied, and if included, the Skip An instruction can be replaced with a Move instruction for processing.
The process of replacing the Skip instruction with the Move instruction can be performed by setting the offset of the special Move instruction as the Move offset and setting the Skip size of the Skip instruction as the Move size.
By this update processing, it is possible to avoid useless copy processing when the special Move instruction is processed as it is meant.
For example, in the example of FIG. 1, it is not necessary to copy to the B ′, D ′, and F ′ portions of the new data 191.

次に、従来の方法では効率的に差分データを表現できない図4のパターンが効率的に表現できることを図11と図12とを用いて説明する。   Next, it will be described with reference to FIGS. 11 and 12 that the pattern of FIG. 4 which cannot efficiently express the difference data by the conventional method can be efficiently expressed.

図11は、図4の更新パターンに対して位置情報をMoveオフセットで表したMove命令とAdd命令とで表した従来の差分データを示している。
この場合の差分データは、Move命令が6つで42byte、Add命令が23byteで合計65byteになる。
FIG. 11 shows conventional difference data in which the position information is expressed by a Move offset and an Add instruction with respect to the update pattern of FIG.
The difference data in this case is 6 bytes for Move instructions, 42 bytes, and 23 bytes for Add instructions, for a total of 65 bytes.

図12は、図4の更新パターンに対して特殊Move命令とSkip命令とを使用して表した差分データである。
この場合の差分データは、特殊Move命令が7byte、Move命令が2つで14byte、Skip命令が4つで20byte、Add命令が23byteで合計64byteとなり、図11で示した従来の差分データより小さいサイズになっている。
FIG. 12 shows difference data expressed using the special Move instruction and Skip instruction for the update pattern of FIG.
The difference data in this case is 7 bytes for the special Move instruction, 14 bytes for the Move instruction, 14 bytes for the Skip instruction, 20 bytes for the Skip instruction, 23 bytes for the Add instruction, and a total size of 64 bytes, which is smaller than the conventional difference data shown in FIG. It has become.

また、特許文献1のオフセット省略フラグを用いた場合にはMove命令のオフセットが同じ値で連続しないために差分データサイズ圧縮の効果が薄れるのに対し、特殊Move命令は図4の更新パターンでも図1の更新パターンと同様に使用することが可能であり、差分データサイズの圧縮効果が薄れることはない。   Further, when the offset omission flag of Patent Document 1 is used, the effect of the differential data size compression is reduced because the offset of the Move instruction is not continuous with the same value, whereas the special Move instruction is also illustrated in the update pattern of FIG. It can be used in the same manner as the update pattern 1 and the compression effect of the differential data size is not diminished.

上記において、特殊Move命令とSkip命令とを使用して差分データを生成すれば、従来のMove命令の命令サイズとSkip命令の命令サイズとのサイズ差分、差分データのデータサイズを小さくすることができることを説明した。
このため、図6の更新パターンに対してもSkip命令の使用が多くなるに従い、従来の差分データに比べ差分データを小さくすることができる。
In the above, if the difference data is generated using the special Move instruction and the Skip instruction, the size difference between the instruction size of the conventional Move instruction and the instruction size of the Skip instruction and the data size of the difference data can be reduced. Explained.
For this reason, the difference data can be made smaller than the conventional difference data as the use of the Skip instruction increases for the update pattern of FIG.

次に、特殊Move命令とSkip命令とを使用した差分データを生成する差分データ生成装置について説明する。   Next, a difference data generation apparatus that generates difference data using a special Move instruction and a Skip instruction will be described.

図13は、実施の形態1における差分データ生成装置100の外観を示す図である。
図13において、差分データ生成装置100は、システムユニット910、CRT(Cathode Ray Tube)表示装置901、キーボード(K/B)902、マウス903、コンパクトディスク装置(CDD)905、プリンタ装置906、スキャナ装置907を備え、これらはケーブルで接続されている。
さらに、差分データ生成装置100は、FAX機932、電話器931とケーブルで接続され、また、ローカルエリアネットワーク(LAN)942、ウェブサーバ941を介してインターネット940に接続されている。
FIG. 13 is a diagram illustrating an appearance of the difference data generation device 100 according to the first embodiment.
In FIG. 13, a differential data generating apparatus 100 includes a system unit 910, a CRT (Cathode Ray Tube) display device 901, a keyboard (K / B) 902, a mouse 903, a compact disk device (CDD) 905, a printer device 906, a scanner device. 907, which are connected by a cable.
Further, the differential data generating apparatus 100 is connected to a FAX machine 932 and a telephone 931 by a cable, and is connected to the Internet 940 via a local area network (LAN) 942 and a web server 941.

図14は、実施の形態1における差分データ生成装置100のハードウェア構成図である。
図14において、差分データ生成装置100は、プログラムを実行するCPU(Central Processing Unit)911を備えている。CPU911は、バス912を介してROM913、RAM914、通信ボード915、CRT表示装置901、K/B902、マウス903、FDD(Flexible Disk Drive)904、磁気ディスク装置920、CDD905、プリンタ装置906、スキャナ装置907と接続されている。
RAM914は、揮発性メモリの一例である。ROM913、FDD904、CDD905、磁気ディスク装置920、光ディスク装置は、不揮発性メモリの一例である。これらは、記憶装置あるいは記憶部の一例である。
通信ボード915は、FAX機932、電話器931、LAN942等に接続されている。
例えば、通信ボード915、K/B902、スキャナ装置907、FDD904などは、情報入力部の一例である。
また、例えば、通信ボード915、CRT表示装置901などは、出力部の一例である。
FIG. 14 is a hardware configuration diagram of the difference data generation device 100 according to the first embodiment.
In FIG. 14, the differential data generation device 100 includes a CPU (Central Processing Unit) 911 that executes a program. The CPU 911 includes a ROM 913, a RAM 914, a communication board 915, a CRT display device 901, a K / B 902, a mouse 903, an FDD (Flexible Disk Drive) 904, a magnetic disk device 920, a CDD 905, a printer device 906, and a scanner device 907 via a bus 912. Connected with.
The RAM 914 is an example of a volatile memory. The ROM 913, the FDD 904, the CDD 905, the magnetic disk device 920, and the optical disk device are examples of nonvolatile memories. These are examples of a storage device or a storage unit.
The communication board 915 is connected to a FAX machine 932, a telephone 931, a LAN 942, and the like.
For example, the communication board 915, the K / B 902, the scanner device 907, the FDD 904, and the like are examples of the information input unit.
Further, for example, the communication board 915, the CRT display device 901, and the like are examples of the output unit.

ここで、通信ボード915は、LAN942に限らず、直接、インターネット940、或いはISDN等のWAN(ワイドエリアネットワーク)に接続されていても構わない。直接、インターネット940、或いはISDN等のWANに接続されている場合、差分データ生成装置100は、インターネット940、或いはISDN等のWANに接続され、ウェブサーバ941は不用となる。
磁気ディスク装置920には、オペレーティングシステム(OS)921、ウィンドウシステム922、プログラム群923、ファイル群924が記憶されている。プログラム群923は、CPU911、OS921、ウィンドウシステム922により実行される。
Here, the communication board 915 is not limited to the LAN 942 and may be directly connected to the Internet 940 or a WAN (Wide Area Network) such as ISDN. When directly connected to a WAN such as the Internet 940 or ISDN, the differential data generating apparatus 100 is connected to a WAN such as the Internet 940 or ISDN, and the web server 941 is unnecessary.
The magnetic disk device 920 stores an operating system (OS) 921, a window system 922, a program group 923, and a file group 924. The program group 923 is executed by the CPU 911, the OS 921, and the window system 922.

上記プログラム群923には、各実施の形態の説明において「〜部」として説明する機能を実行するプログラムが記憶されている。プログラムは、CPU911により読み出され実行される。
ファイル群924には、各実施の形態の説明において、「〜の判定結果」、「〜の判断結果」、「〜の計算結果」、「〜の処理結果」として説明するものが、「〜ファイル」として記憶されている。
また、各実施の形態の説明において説明するフローチャートの矢印の部分は主としてデータの入出力を示し、そのデータの入出力のためにデータは、磁気ディスク装置920、FD(Flexible Disk cartridge)、光ディスク、CD(コンパクトディスク)、MD(ミニディスク)、DVD(Digital Versatile Disk)等のその他の記録媒体に記録される。あるいは、信号線やその他の伝送媒体により伝送される。
The program group 923 stores a program for executing a function described as “˜unit” in the description of each embodiment. The program is read and executed by the CPU 911.
In the description of each embodiment, the file group 924 includes what is described as “determination result of”, “determination result of”, “calculation result of”, and “processing result of”. Is stored.
In addition, the arrows in the flowcharts described in the description of each embodiment mainly indicate input / output of data. For the input / output of the data, the data is a magnetic disk device 920, an FD (Flexible Disk cartridge), an optical disk, It is recorded on other recording media such as CD (compact disc), MD (mini disc), DVD (Digital Versatile Disk). Alternatively, it is transmitted through a signal line or other transmission medium.

また、各実施の形態の説明において「〜部」として説明するものは、ROM913に記憶されたファームウェアで実現されていても構わない。或いは、ソフトウェアのみ、或いは、ハードウェアのみ、或いは、ソフトウェアとハードウェアとの組み合わせ、さらには、ファームウェアとの組み合わせで実施されても構わない。   In addition, what is described as “˜unit” in the description of each embodiment may be realized by firmware stored in the ROM 913. Alternatively, it may be implemented by software alone, hardware alone, a combination of software and hardware, or a combination of firmware.

また、各実施の形態を実施するプログラムは、磁気ディスク装置920、FD、光ディスク、CD、MD、DVD等のその他の記録媒体による記録装置を用いて記憶されても構わない。   In addition, the program for implementing each embodiment may be stored using a recording device using another recording medium such as the magnetic disk device 920, FD, optical disk, CD, MD, or DVD.

図15は、実施の形態1における差分データ生成装置100の内部構成図である。
図15において、実施の形態1における差分データ生成装置100は、旧データから新データに移行するために、旧データのデータ位置を示す旧データポインタと新データのデータ位置を示す新データポインタとを制御する情報と、移行するデータの情報とに関する命令コード(Move命令コード、Add命令コード、特殊Move命令コード、Skip命令コード)を含む差分データを生成する。
また、差分データを生成するためにデータ記憶部190と差分データ生成部110とを備える。
FIG. 15 is an internal configuration diagram of the difference data generation device 100 according to the first embodiment.
In FIG. 15, the difference data generating apparatus 100 according to the first embodiment uses an old data pointer indicating the data position of the old data and a new data pointer indicating the data position of the new data in order to shift from the old data to the new data. Difference data including an instruction code (Move instruction code, Add instruction code, special Move instruction code, Skip instruction code) related to information to be controlled and data to be transferred is generated.
In addition, a data storage unit 190 and a difference data generation unit 110 are provided to generate difference data.

差分データ生成部110は、差分データ第1生成部120と差分データ第2生成部130と差分データ出力部140とを備えて差分データを生成し出力する。   The difference data generation unit 110 includes a difference data first generation unit 120, a difference data second generation unit 130, and a difference data output unit 140, and generates and outputs difference data.

差分データ第1生成部120は、データ記憶部190に記憶された旧データ192と新データ191とに基づいて以下の処理を行う。
旧データポインタの示す位置とコピーサイズとを示し、旧データポインタの示す位置にあるデータを新データポインタの示す位置からコピーサイズ分コピーし、新データポインタの示す位置をコピーサイズ分移動した値を新データポインタに設定することを示す第1Move命令コード(従来のMove命令コード)を差分データに含めるかの判定を行う。
また、追加データと追加データサイズとを示し、新データポインタの示す位置から追加データを追加し、新データポインタの示す位置を追加データサイズ分移動した位置を示す値を新データポインタに設定することを示すAdd命令コードを差分データに含めるかの判定を行う。
そして、判定結果に基づいて変換前差分データ193(特殊Move命令とSkip命令とを使用しない差分データ)を生成し、データ記憶部190に記憶する。
The first difference data generation unit 120 performs the following processing based on the old data 192 and the new data 191 stored in the data storage unit 190.
Shows the position and copy size indicated by the old data pointer, copies the data at the position indicated by the old data pointer by the copy size from the position indicated by the new data pointer, and moves the value indicated by the new data pointer by the copy size. It is determined whether or not the first Move instruction code (conventional Move instruction code) indicating setting to the new data pointer is included in the difference data.
In addition, the additional data and the additional data size are indicated, the additional data is added from the position indicated by the new data pointer, and the value indicating the position moved by the additional data size is set in the new data pointer. It is determined whether or not an Add instruction code indicating “” is included in the difference data.
Based on the determination result, pre-conversion difference data 193 (difference data that does not use the special Move instruction and Skip instruction) is generated and stored in the data storage unit 190.

差分データ第2生成部130は、データ記憶部190に記憶された変換前差分データ193に基づいて以下の処理を行う。
旧データポインタの示す位置とコピーサイズとを示し、旧データポインタの示す位置にあるデータを新データポインタの示す位置からコピーサイズ分コピーし、新データポインタの値を更新しないことを示す第2Move命令コード(特殊Move命令コード)を差分データに含めるかの判定を行う。
また、ポインタ更新サイズを示し、ポインタ更新サイズ分移動した位置を示す値を新データポインタに設定することを示すSkip命令コードを差分データに含めるかの判定を行う。
そして、判定結果に基づいて変換後差分データ194(特殊Move命令とSkip命令とを使用する差分データ)を生成し、データ記憶部190に記憶する。
The second difference data generation unit 130 performs the following process based on the pre-conversion difference data 193 stored in the data storage unit 190.
A second Move instruction indicating the position indicated by the old data pointer and the copy size, copying the data at the position indicated by the old data pointer by the copy size from the position indicated by the new data pointer, and not updating the value of the new data pointer It is determined whether a code (special Move instruction code) is included in the difference data.
In addition, it is determined whether or not to include the Skip instruction code indicating the pointer update size and indicating that the value indicating the position moved by the pointer update size is set in the new data pointer in the difference data.
Based on the determination result, post-conversion difference data 194 (difference data using a special Move instruction and a Skip instruction) is generated and stored in the data storage unit 190.

差分データ出力部140は、データ記憶部190に記憶された変換前差分データ193のデータサイズと変換後差分データ194のデータサイズとを比較し、データサイズの小さい方を差分データとして出力する。   The difference data output unit 140 compares the data size of the pre-conversion difference data 193 stored in the data storage unit 190 with the data size of the post-conversion difference data 194, and outputs the smaller data size as difference data.

図1の更新パターンを旧データ192から新データ191への更新とした場合は、図9の差分データが変換前差分データ193に相当し、図10の差分データが変換後差分データ194に相当し、サイズの小さい変換後差分データ194が適用される差分データになる。   When the update pattern in FIG. 1 is an update from the old data 192 to the new data 191, the difference data in FIG. 9 corresponds to the pre-conversion difference data 193, and the difference data in FIG. 10 corresponds to the post-conversion difference data 194. The difference data 194 having a smaller size is applied to the difference data.

図16は、実施の形態1における差分データ生成装置100の処理の流れを示すフローチャートである。
図16に示すように、差分データ生成装置100は以下の処理を行う。
FIG. 16 is a flowchart showing a process flow of the difference data generation apparatus 100 according to the first embodiment.
As illustrated in FIG. 16, the difference data generation device 100 performs the following processing.

まず、差分データ第1生成部120は、データ記憶部190に記憶された新データ191と旧データ192とを入力し、入力した新データ191と旧データ192とに基づいて変換前差分データ193を生成しデータ記憶部190に記憶する(S101)。   First, the first difference data generation unit 120 inputs the new data 191 and the old data 192 stored in the data storage unit 190, and based on the input new data 191 and old data 192, the difference data 193 before conversion is obtained. The data is generated and stored in the data storage unit 190 (S101).

差分データ第1生成部120が行う変換前差分データ193の生成処理は、従来の差分抽出処理を用いることができる。
例えば、Walter F.Tichyの論文「The String−to−String Correction Problem with Block Moves」において使用されている処理で変換前差分データ193を生成する。
A conventional difference extraction process can be used for the generation process of the pre-conversion difference data 193 performed by the first difference data generation unit 120.
For example, Walter F.M. The pre-conversion difference data 193 is generated by the process used in the paper “The String-to-String Correction Problem with Block Moves” by Tichy.

次に、差分データ第2生成部130は、データ記憶部190に記憶された変換前差分データ193を入力し、入力した変換前差分データ193に基づいて変換後差分データ194を生成しデータ記憶部190に記憶する(S102)。   Next, the second difference data generation unit 130 receives the pre-conversion difference data 193 stored in the data storage unit 190, generates post-conversion difference data 194 based on the input pre-conversion difference data 193, and the data storage unit 190 (S102).

図17は、実施の形態1における差分データ第2生成部130の処理の流れを示すフローチャートである。
S102の差分データ第2生成部130の変換後差分データ194生成処理について図17に基づいて説明する。
まず、変換前差分データ193からすべてのMove命令のオフセット情報を抽出する(S201)。
次に、同一オフセットを持つMove命令が複数個ある場合には、これらのMove命令の内、先頭のMove命令の直前の位置に特殊Move命令を挿入する。
このとき、特殊Move命令のMoveサイズは、最後のMove命令でMoveするデータの終了アドレスと、先頭のMove命令でMoveするデータの開始アドレスの差を設定する。
また、特殊Move命令のオフセットはMove命令のオフセットと同一にする。
次に、前記同一オフセットを持つMove命令すべてをSkip命令に置き換える(S203)。
このとき、Skipサイズは置き換え対象Move命令のMoveサイズと同じにする。
こうすることで、差分データ406を特殊Move命令を用いた差分データに変換することができる。
FIG. 17 is a flowchart illustrating a process flow of the differential data second generation unit 130 in the first embodiment.
The post-conversion difference data 194 generation process of the difference data second generation unit 130 in S102 will be described with reference to FIG.
First, the offset information of all Move instructions is extracted from the pre-conversion difference data 193 (S201).
Next, when there are a plurality of Move instructions having the same offset, a special Move instruction is inserted at a position immediately before the first Move instruction among these Move instructions.
At this time, the move size of the special Move instruction is set to the difference between the end address of the data to be moved by the last Move instruction and the start address of the data to be moved by the first Move instruction.
Also, the offset of the special Move instruction is made the same as the offset of the Move instruction.
Next, all Move instructions having the same offset are replaced with Skip instructions (S203).
At this time, the Skip size is made the same as the Move size of the replacement target Move instruction.
In this way, the difference data 406 can be converted into difference data using a special Move instruction.

差分データ第2生成部130の変換後差分データ194生成処理の動作例を図1と図9と図10を用いて説明する。
S201において、図9に示す変換前差分データ193からMove命令のオフセット情報を抽出することで、オフセット「+100」のMove命令が4つあることが分かる。
この4つのMove命令は図1のA’、C’、E’、G’に相当する。
S202において、これらMove命令の先頭にあたる「Move +100 100」命令の直前に特殊Move命令「Move’ +100 440」を挿入する。
S203において、各Move命令をSkip命令に置き換えることで、変換後差分データ194が生成される。
生成される変換後差分データ194は図10に示す差分データである。
An operation example of the converted difference data 194 generation process of the second difference data generation unit 130 will be described with reference to FIGS. 1, 9, and 10.
In S201, by extracting the offset information of the Move instruction from the pre-conversion difference data 193 shown in FIG. 9, it is understood that there are four Move instructions with the offset “+100”.
These four Move instructions correspond to A ′, C ′, E ′, and G ′ in FIG.
In S202, a special Move instruction “Move ′ + 100 440” is inserted immediately before the “Move +100 100” instruction at the head of these Move instructions.
In S203, the converted difference data 194 is generated by replacing each Move instruction with a Skip instruction.
The generated difference data 194 after conversion is the difference data shown in FIG.

図16において、差分データ出力部140は、データ記憶部190に記憶された変換前差分データ193と変換後差分データ194とを入力し、変換後差分データ194と変換前差分データ193とのサイズを比較する。そして、変換後差分データ194のサイズの方が小さい場合は、変換後差分データ194を差分データとして出力する。また、変換前差分データ193のサイズの方が小さい場合は、変換前差分データ193を差分データとして出力する(S103)。   In FIG. 16, the difference data output unit 140 receives the pre-conversion difference data 193 and the post-conversion difference data 194 stored in the data storage unit 190, and sets the sizes of the post-conversion difference data 194 and the pre-conversion difference data 193. Compare. If the size of the converted difference data 194 is smaller, the converted difference data 194 is output as difference data. If the size of the pre-conversion difference data 193 is smaller, the pre-conversion difference data 193 is output as difference data (S103).

なお、前記の差分データ第2生成部130の変換後差分データ194生成処理では、同一オフセットのMove命令が複数個あった場合には、前記に該当するすべてのMove命令を特殊Move命令でまとめていた。
但し、前記に該当する一部のMove命令のみを特殊Move命令でまとめても構わない。
さらに、前記に該当するMove命令の様々な組合せに対して特殊Move命令を適用し、その際にもっとも差分データサイズが小さい組合せを判定し特殊Move命令を挿入しても構わない。
Note that, in the post-conversion difference data 194 generation process of the difference data second generation unit 130, when there are a plurality of Move instructions with the same offset, all the Move instructions corresponding to the above are grouped together with a special Move instruction. It was.
However, only a part of the Move instructions corresponding to the above may be collected by a special Move instruction.
Furthermore, the special Move instruction may be applied to various combinations of the Move instructions corresponding to the above, and the combination having the smallest difference data size may be determined and the special Move instruction may be inserted.

以上の構成、および処理を有することによって、差分データ生成装置100は従来の技術では差分データを小さいサイズで表現できなかったような更新パターンにおいて差分データを小さく表現することができる。   By having the above configuration and processing, the differential data generation apparatus 100 can express the differential data small in an update pattern that cannot be expressed in a small size by the conventional technology.

また、差分データ生成部110が差分データ第1生成部120と差分データ第2生成部130とを備えることで、変換前差分データ193と変換後差分データ194とを生成でき、さらに、差分データ出力部140を備えることで、よりサイズの小さい差分データを選択することができる。   Further, the difference data generation unit 110 includes the difference data first generation unit 120 and the difference data second generation unit 130, so that the pre-conversion difference data 193 and the post-conversion difference data 194 can be generated. By providing the unit 140, difference data having a smaller size can be selected.

実施の形態2.
実施の形態2において、上記実施の形態1と異なる部分を説明し、その他の部分は上記実施の形態1と同様であるものとする。
図18は、実施の形態2における差分データ生成装置100の内部構成図である。
図18において、データ記憶部190は、旧データ192の各部分のデータである部分データの位置を示す旧データ配置情報データ197と、新データ191の各部分のデータである部分データの位置を示す新データ配置情報データ196とを記憶する。
また、差分データ生成部110は、部分データ対応付け部150と差分抽出部160とを備える。
Embodiment 2. FIG.
In the second embodiment, parts different from the first embodiment will be described, and the other parts are the same as those in the first embodiment.
FIG. 18 is an internal configuration diagram of the difference data generation device 100 according to the second embodiment.
In FIG. 18, the data storage unit 190 indicates old data arrangement information data 197 that indicates the position of partial data that is data of each part of the old data 192 and the position of partial data that is data of each part of the new data 191. New data arrangement information data 196 is stored.
The difference data generation unit 110 includes a partial data association unit 150 and a difference extraction unit 160.

部分データ対応付け部150は、データ記憶部190に記憶された新データ配置情報データ196と旧データ配置情報データ197とを入力し、新データ配置情報データ196に示される新データ191の部分データと、旧データ配置情報データ197に示される旧データ192の部分データとを対応付けた部分データ対応付け情報データ198を生成しデータ記憶部190に記憶する。   The partial data association unit 150 inputs the new data arrangement information data 196 and the old data arrangement information data 197 stored in the data storage unit 190, and the partial data of the new data 191 indicated by the new data arrangement information data 196 Then, partial data association information data 198 in which the partial data of the old data 192 indicated in the old data arrangement information data 197 is associated is generated and stored in the data storage unit 190.

差分抽出部160は、データ記憶部190に記憶された部分データ対応付け情報データ198と旧データ192と新データ191とに基づいて、特殊Move命令とSkip命令とを使用した差分データ195を生成する。   The difference extraction unit 160 generates difference data 195 using a special Move instruction and a Skip instruction based on the partial data association information data 198, the old data 192, and the new data 191 stored in the data storage unit 190. .

図19は、実施の形態2における新旧データと配置情報データとを示す図である。
旧データ192は4つの部分データA、B、C、Dから構成される。また、この情報は旧データ配置情報データ197に記載されている。
旧データ配置情報データ197の「A 0 500」という行は、部分データAがアドレス0からサイズ500の範囲にあることを示している。
同様に新データ191にも部分データA、B、C、Dが存在する。
なお図19の例では、新データ配置情報データ196が旧データ配置情報データ197に対して部分データAのサイズが200増えていること、部分データBの開始アドレスが200増加していること、部分データCの開始アドレスが200増えてサイズが100増加していること、部分データDの開始アドレスが300増えてサイズが300減少していることが分かる。
FIG. 19 is a diagram showing old and new data and arrangement information data in the second embodiment.
The old data 192 is composed of four partial data A, B, C, and D. This information is described in the old data arrangement information data 197.
The row “A 0 500” of the old data arrangement information data 197 indicates that the partial data A is in the range of the address 0 to the size 500.
Similarly, partial data A, B, C, and D also exist in the new data 191.
In the example of FIG. 19, the new data arrangement information data 196 has the partial data A size increased by 200 compared to the old data arrangement information data 197, the partial data B start address has increased by 200, It can be seen that the start address of data C is increased by 200 and the size is increased by 100, and the start address of partial data D is increased by 300 and the size is decreased by 300.

一般的には新旧データ間では部分データは1対1で対応することが多いが、旧データ192では存在しなかった部分データが新データ191には存在したり、旧データ192には存在した部分データが新データ191には存在しない、というケースもある。   In general, there is often a one-to-one correspondence between partial data between old and new data, but partial data that did not exist in the old data 192 exists in the new data 191 or exists in the old data 192. In some cases, the data does not exist in the new data 191.

旧データ192および新データ191の配置情報データには、新旧データがプログラムのバイナリイメージである場合には、プログラムをリンクする際に出力されるリンクマップファイルを用いることができる。このリンクマップファイルとはプログラム内の配置情報が記述されたものである。
また、配置情報は必ずしもデータとは別情報として提供されなければならないわけではなく、データ内に配置情報も含むようなデータであれば、配置情報としてデータそのものを使用することも可能である。データ内に配置情報を含むデータには、例えばDLL(Dynamic Link Library)がある。
As the arrangement information data of the old data 192 and the new data 191, when the old and new data is a binary image of a program, a link map file output when the program is linked can be used. This link map file is a description of arrangement information in the program.
Further, the arrangement information does not necessarily have to be provided as information different from the data. If the data includes arrangement information in the data, the data itself can be used as the arrangement information. Data including arrangement information in the data includes, for example, DLL (Dynamic Link Library).

そして、部分データとは例えば、プログラムのリンクにおけるセクションのことを指す。
また、旧データ192、新データ191それぞれが唯一つの部分データから構成される、とみなすことも可能である。この場合、配置情報データは必要ない。
The partial data refers to a section in a program link, for example.
It is also possible to regard that the old data 192 and the new data 191 are each composed of only one partial data. In this case, arrangement information data is not necessary.

図20は、実施の形態2における部分データ対応付け情報データ198を示す図である。
部分データ対応付け部150は、旧データ配置情報データ197と新データ配置情報データ196とに基づいて、旧データ192と新データ191の部分データの対応付けを行い、図20に示すような部分データ対応付け情報データ198を生成する。
図20において、部分データ対応付け情報データ198は、旧データ192と新データ191との部分データA同士、部分データB同士、部分データC同士、部分データD同士のオフセットとサイズとを対応付けている。また、同一サイズである部分データBについて同一サイズフラグを設定している。
FIG. 20 is a diagram showing partial data association information data 198 in the second embodiment.
The partial data association unit 150 associates the partial data of the old data 192 and the new data 191 based on the old data arrangement information data 197 and the new data arrangement information data 196, and the partial data as shown in FIG. The association information data 198 is generated.
In FIG. 20, the partial data association information data 198 correlates the offsets and sizes of the partial data A, the partial data B, the partial data C, and the partial data D of the old data 192 and the new data 191. Yes. Further, the same size flag is set for the partial data B having the same size.

部分データ対応付け情報データ198を使用して差分データを生成する方法を以下に示す。
第一の方法では、対応付けられた部分データ同士のサイズが同じ場合は、その領域全体を特殊Move命令で表現した後、旧部分データの先頭と新部分データの先頭とから順番に比較して行き、一致する部分にはSkip命令を、一致しない部分にはAdd命令もしくは旧データ192の違う部分のデータを指定したMove命令を割り当てる。
A method for generating difference data using the partial data association information data 198 will be described below.
In the first method, if the sizes of the associated partial data are the same, the entire area is expressed by a special Move instruction, and then compared in order from the beginning of the old partial data and the beginning of the new partial data. The Skip instruction is assigned to the matching part, and the Add instruction or the Move instruction designating the data of the different part of the old data 192 is assigned to the non-matching part.

第一の方法を図21を用いて説明する。
対応付けられた旧データ192の部分データ(p1からp6の間に位置するデータ)と新データ191の部分データ(q1からq6の間に位置するデータ)のサイズが同じであったとする。
この場合、最初にp1からp6及びq1からq6のサイズと、p1とq1のオフセットをそれぞれ特殊Moveサイズと特殊Moveオフセットとする特殊Move命令を生成する。
そして、旧データ192のp1、新データ191のq1にそれぞれ着目する。
次に、p1、q1からそれぞれ1単位(例えば1byte)ずつ旧データ192と新データ191を比較して行く。
p2とq2に到達し、旧データ192と新データ191とで異なる位置が見つかると、まず新データ191のq1からq2の間をSkip命令で表現する。
次に、p2、q2から1単位ずつ旧データ192と新データ191を比較して行き、p3とq3で再び新旧データ192の一致を発見する。
この時点でp2からp3の範囲に対する差分データを生成する。
ここで、p2からp3の範囲に対する差分データの生成方法として、新データ191のp2からp3の部分はAdd命令で表現するか、旧データ192から一致する部分を発見してMove命令で表現するか、もしくはAdd命令とMove命令の組合せで表現する、などの方法を用いることが出来る。
そして再びp3、q3から同様の処理を継続して行き、最終的にp6とq6に到達した時点でSkip命令を出力して処理を終了する。
The first method will be described with reference to FIG.
Assume that the size of the associated partial data of the old data 192 (data positioned between p1 and p6) and the partial data of the new data 191 (data positioned between q1 and q6) are the same.
In this case, first, a special Move instruction is generated with the sizes from p1 to p6 and q1 to q6 and the offsets of p1 and q1 as the special Move size and special Move offset, respectively.
Then, pay attention to p1 of the old data 192 and q1 of the new data 191.
Next, the old data 192 and the new data 191 are compared by 1 unit (for example, 1 byte) from p1 and q1, respectively.
When p2 and q2 are reached and different positions are found between the old data 192 and the new data 191, first, a portion between q1 and q2 of the new data 191 is represented by a Skip instruction.
Next, the old data 192 and the new data 191 are compared one by one from p2 and q2, and a match between the new and old data 192 is found again at p3 and q3.
At this point, difference data for the range from p2 to p3 is generated.
Here, as a method of generating difference data for the range from p2 to p3, whether the part from p2 to p3 of the new data 191 is expressed by the Add instruction, or a matching part is found from the old data 192 and expressed by the Move instruction Alternatively, a method of expressing by a combination of an Add instruction and a Move instruction can be used.
Then, the same processing is continued again from p3 and q3, and when the p6 and q6 are finally reached, a Skip instruction is output and the processing is terminated.

図22は、実施の形態2における差分抽出部160の処理の流れを示すフローチャートである。
上記第一の差分データ生成方法の処理の流れについて図22に基づいて説明する。
差分抽出部160は、データ記憶部190に記憶された部分データ対応付け情報データ198の同一サイズフラグを参照し、旧データ192と新データ191とで対応する同一サイズの部分データを検索し、検索した部分データに対して以下の処理を行い、特殊Move命令とSkip命令とを生成する。
FIG. 22 is a flowchart illustrating a process flow of the difference extraction unit 160 according to the second embodiment.
The process flow of the first difference data generation method will be described with reference to FIG.
The difference extraction unit 160 refers to the same size flag of the partial data association information data 198 stored in the data storage unit 190, searches for the corresponding partial data of the same size in the old data 192 and the new data 191, and performs a search. The following processing is performed on the partial data thus generated to generate a special Move instruction and a Skip instruction.

まず、検索した旧データ192と新データ191との部分データのサイズと、旧データ192の部分データが新データ191の部分データに対する相対アドレスを、特殊Moveサイズおよび特殊Moveオフセットとする特殊Move命令を生成する(S201)。
次に、未処理の部分データに対し、旧データ192の部分データと新データ191の部分データとから1バイトずつ取得する(S203)。
次に、取得した旧データ192の1バイトと新データ191の1バイトとを比較する(S204)。
取得した旧データ192の1バイトと新データ191の1バイトとを比較した結果、同一値である場合、旧データ192の部分データと新データ191の部分データとからの1バイトずつの取得(S203)と比較(S204)とを、未処理データが無いと判定する(S202)か、取得した1バイトが異なる(S204)まで繰り返す。
取得した旧データ192の1バイトと新データ191の1バイトとを比較した結果、異なる値である場合、取得した旧データ192の部分データと新データ191の部分データの同一であった部分について、同一部分のサイズをSkipサイズとするSkip命令を生成する(S205)。
First, a special Move instruction that sets the size of the partial data of the retrieved old data 192 and new data 191 and the relative address of the partial data of the old data 192 relative to the partial data of the new data 191 as a special Move size and special Move offset. Generate (S201).
Next, for each unprocessed partial data, one byte is acquired from the partial data of the old data 192 and the partial data of the new data 191 (S203).
Next, 1 byte of the acquired old data 192 and 1 byte of the new data 191 are compared (S204).
As a result of comparing the acquired 1 byte of the old data 192 and 1 byte of the new data 191, if the values are the same, acquisition of 1 byte at a time from the partial data of the old data 192 and the partial data of the new data 191 (S203) ) And comparison (S204) are repeated until it is determined that there is no unprocessed data (S202) or the acquired 1 byte is different (S204).
As a result of comparing 1 byte of the acquired old data 192 and 1 byte of the new data 191, if the values are different, the acquired partial data of the old data 192 and the partial data of the new data 191 are the same. A Skip instruction that sets the size of the same part to the Skip size is generated (S205).

また、取得した旧データ192の1バイトと新データ191の1バイトとを比較した結果、同一値であった後、未処理の部分データが無いと判定した場合(S202)、S205と同様にして同一部分のサイズをSkipサイズとするSkip命令を生成し、処理を終える(S210)。   Further, as a result of comparing 1 byte of the acquired old data 192 and 1 byte of the new data 191, if it is determined that there is no unprocessed partial data after the same value (S202), the same as S205 A Skip instruction that sets the size of the same part to the Skip size is generated, and the process ends (S210).

Skip命令を生成(S205)後、未処理の部分データの有無を判定する(S206)。
未処理の部分データが有ると判定した場合、未処理の部分データに対し、旧データ192の部分データと新データ191の部分データとから1バイトずつ取得する(S207)。
次に、取得した旧データ192の1バイトと新データ191の1バイトとを比較する(S208)。
取得した旧データ192の1バイトと新データ191の1バイトとを比較した結果、異なる値である場合、旧データ192の部分データと新データ191の部分データとからの1バイトずつの取得(S207)と比較(S208)とを、未処理データが無いと判定する(S206)か、取得した1バイトが同一値を示す(S208)まで繰り返す。
取得した旧データ192の1バイトと新データ191の1バイトとを比較した結果、同一値である場合、取得した旧データ192の部分データと新データ191の部分データとで異なった部分について、Add命令、Move命令を生成する。例えば、異なる部分のサイズと異なる部分の新データ191とをAddサイズおよびAddデータとするAdd命令を生成し、S202から処理を繰り返す(S209)。
After generating the Skip instruction (S205), the presence / absence of unprocessed partial data is determined (S206).
If it is determined that there is unprocessed partial data, 1 byte is acquired from the partial data of the old data 192 and the partial data of the new data 191 for the unprocessed partial data (S207).
Next, 1 byte of the acquired old data 192 and 1 byte of the new data 191 are compared (S208).
As a result of comparing the acquired 1 byte of the old data 192 and 1 byte of the new data 191, if the values are different, acquisition of 1 byte at a time from the partial data of the old data 192 and the partial data of the new data 191 (S207 ) And comparison (S208) are repeated until it is determined that there is no unprocessed data (S206), or the acquired 1 byte indicates the same value (S208).
As a result of comparing 1 byte of the acquired old data 192 and 1 byte of the new data 191, if the values are the same, the difference between the acquired partial data of the old data 192 and the partial data of the new data 191 is added. An instruction and a Move instruction are generated. For example, an Add instruction is generated with the size of the different part and the new data 191 of the different part as Add size and Add data, and the process is repeated from S202 (S209).

また、取得した旧データ192の1バイトと新データ191の1バイトとを比較した結果、異なる値であった後、未処理の部分データが無いと判定した場合(S206)、S209と同様にしてAdd命令、Move命令を生成し、処理を終える(S211)。   Further, as a result of comparing 1 byte of the acquired old data 192 and 1 byte of the new data 191, if it is determined that there is no unprocessed partial data after different values (S206), the same as S209 An Add instruction and a Move instruction are generated, and the process ends (S211).

上記説明において、特殊Move命令を生成する(S201)前に、旧データ192と新データ191の先頭から順次比較を行って最初に一致した部分を特殊Move命令の対象範囲の先頭とし、旧データ192と新データ191の末尾から順次先頭方向に向かって比較を行って最初に一致した部分を特殊Move命令の対象範囲の末尾とする、といった処理を追加してもよい。
これにより、無駄な領域のコピーを防ぐことができる。
In the above description, before the special Move instruction is generated (S201), the old data 192 and the new data 191 are sequentially compared from the beginning and the first matching portion is set as the beginning of the target range of the special Move instruction. In addition, a process may be added in which comparison is performed sequentially from the end of the new data 191 toward the top and the first matching portion is set as the end of the target range of the special Move instruction.
As a result, useless copying of the area can be prevented.

また、さらに特殊Move命令を用いない従来の方法により差分データを抽出し、差分データサイズを比較してサイズの小さい方を当該部分データに対する差分データとして出力してもよい。
そのためには、上記実施の形態1で説明した差分データ第1生成部120と差分データ出力部140とを実施の形態2における差分データ生成装置100が備えればよい。
これにより、差分データ生成装置100は、より小さいサイズの差分データを出力できる。
Further, the difference data may be extracted by a conventional method that does not use a special Move instruction, the difference data sizes are compared, and the smaller one may be output as the difference data for the partial data.
For that purpose, the difference data generation device 100 according to the second embodiment may include the first difference data generation unit 120 and the difference data output unit 140 described in the first embodiment.
Thereby, the difference data generation device 100 can output difference data having a smaller size.

実施の形態2において、差分データ生成装置100は、旧データ配置情報データ197と新データ配置情報データ196とを入力として、同一サイズである旧データの部分データと新データの部分データとに対して、特殊Move命令とSkip命令とを使用した差分データを生成できることを説明した。   In the second embodiment, the difference data generation apparatus 100 receives the old data arrangement information data 197 and the new data arrangement information data 196 as input, and performs the partial data of the old data and the new data having the same size. It has been explained that difference data using a special Move instruction and a Skip instruction can be generated.

実施の形態3.
実施の形態3では、部分データ対応付け情報データ198を使用した差分データの第2の生成方法について説明する。
実施の形態3において、上記実施の形態と異なる部分を説明し、その他の部分は上記実施の形態と同様であるものとする。
図23は、実施の形態3における差分データ生成装置100の内部構成図である。
差分データ生成装置100の内部構成について、上記実施の形態1の図15および上記実施の形態2の図18と異なる構成を図23に基づいて説明し、その他の構成は図15および図18と同様であるものとする。
Embodiment 3 FIG.
In the third embodiment, a second generation method of difference data using the partial data association information data 198 will be described.
In the third embodiment, parts different from the above embodiment will be described, and the other parts are the same as those in the above embodiment.
FIG. 23 is an internal configuration diagram of the difference data generation device 100 according to the third embodiment.
Regarding the internal configuration of the difference data generation device 100, a configuration different from FIG. 15 of the first embodiment and FIG. 18 of the second embodiment will be described based on FIG. 23, and the other configurations are the same as those of FIG. 15 and FIG. Suppose that

差分データ第1生成部120はLCS(Longest Common Subsequence)抽出部121を備える。
また、差分データ第1生成部120は部分データ対応付け情報データ198と新データ191と旧データ192とを入力として、特殊Move命令とSkip命令とを使用しない差分データである変換前差分データ193を出力する。
差分データ第2生成部130は、部分データ対応付け情報データ198と変換前差分データ193とを入力として、特殊Move命令とSkip命令とを使用した変換後差分データ194を出力する。
The first difference data generation unit 120 includes an LCS (longest common subsequence) extraction unit 121.
Further, the first difference data generation unit 120 receives the partial data association information data 198, the new data 191 and the old data 192 as input, and obtains the pre-conversion difference data 193 which is difference data not using the special Move instruction and the Skip instruction. Output.
The differential data second generation unit 130 receives the partial data association information data 198 and the pre-conversion difference data 193, and outputs post-conversion difference data 194 using a special Move instruction and a Skip instruction.

LCS抽出部121は、旧データ192と新データ191とで対応する部分データから最長共通部分列(LCS)を抽出する。
LCSの抽出については、従来の技術として例えば「E.W.Myers, “An O(ND) difference algorithm and its variations”, Algorithmixa, 1 (1986), pp251−266」などの効率的なアルゴリズムが知られており、これら従来の技術を用いることができる。
LCSには、旧データ192から新データ191へのコピーに際して、旧データ192での順番と新データ191での順番が入れ替わるようなコピーは検出しない、という特徴がある。
図6の例で説明すると、JからE’へのコピーとGからG’へのコピーは同時に検出されず、EからE’、GからG’へのコピーは同時に検出可能である。
この特徴から、図1や図6に示すような旧データ192から新データ191への更新において位置ずれが発生し、かつ途中にデータの変更が発生しているようなケースにおいて、特殊Move命令で表現できるパターン、つまり同一オフセットのMove命令が連続するパターンを検出できる確率が、図6のJからE’、GからG’を同時に抽出できる通常の差分データ抽出方法と比べて高いといえる。このため、LCSの抽出により、差分データを小さく表現することが出来る可能性がある場合に的確に差分データを小さく表現し、特殊Move命令とSkip命令を使用してより効果的な差分データを生成することができる。
The LCS extraction unit 121 extracts the longest common partial sequence (LCS) from the partial data corresponding to the old data 192 and the new data 191.
For the extraction of LCS, an efficient algorithm such as “EW Myers,“ An O (ND) difference algorithm and its variations ”, Algorithmmixa, 1 (1986), pp251-266” is known as a conventional technique. These conventional techniques can be used.
The LCS has a feature that, when copying from the old data 192 to the new data 191, a copy in which the order in the old data 192 and the order in the new data 191 are switched is not detected.
In the example of FIG. 6, the copy from J to E ′ and the copy from G to G ′ are not detected at the same time, and the copy from E to E ′ and from G to G ′ can be detected at the same time.
Due to this feature, in the case where a position shift occurs in the update from the old data 192 to the new data 191 as shown in FIG. 1 or FIG. It can be said that the probability that a pattern that can be expressed, that is, a pattern in which a Move instruction with the same offset is continuous can be detected is higher than that of a normal differential data extraction method that can simultaneously extract J to E ′ and G to G ′. Therefore, by extracting LCS, when there is a possibility that the difference data can be expressed small, the difference data is accurately expressed small, and more effective difference data is generated using the special Move instruction and the Skip instruction. can do.

差分データ第1生成部120はLCSを求めた後、LCSと判定された部分列をMove命令で表現し、それでない部分はAdd命令で表現することで変換前差分データ193を生成する。
図24の例では、AとA’、BとB’・・・GとG’が共通部分と判定され、それぞれがMove命令で表現され、残りの部分はAdd命令で表現される。
After obtaining the LCS, the first difference data generation unit 120 generates the pre-conversion difference data 193 by expressing the partial sequence determined as the LCS with the Move instruction and expressing the other portion with the Add instruction.
In the example of FIG. 24, A and A ′, B and B ′... G and G ′ are determined as common parts, each is represented by a Move instruction, and the remaining part is represented by an Add instruction.

次に、差分データ第2生成部130が行う同一オフセットのMove命令を集めて一つの特殊Move命令に置き換える処理について説明する。
処理の一例として、上記実施の形態1で説明したように、同一オフセットのMove命令のうち先頭から末尾までを一つの特殊Move命令で表現する処理が考えられる。
また、差分データを先頭から探索して行き、最初に見つかったMove命令のオフセットを記憶し、同一オフセットではないMove命令が見つかるまで、もしくは比較範囲である部分データの末尾に到達するまでの範囲を特殊Move命令で表現する動作も考えられる。
この際、Add命令については読み飛ばすものとする。
Next, the process performed by the differential data second generation unit 130 to collect Move instructions with the same offset and replace them with one special Move instruction will be described.
As an example of the process, as described in the first embodiment, a process of expressing the move instruction having the same offset from the beginning to the end with one special Move instruction can be considered.
Also, the difference data is searched from the beginning, the offset of the first move instruction found is stored, and the range until the move instruction that is not the same offset is found or until the end of the partial data that is the comparison range is obtained. An operation expressed by a special Move instruction is also conceivable.
At this time, the Add instruction is skipped.

後者の処理を図24を用いて説明する。
新データ191のA’に対するMove命令を最初に読み込み、そのオフセット情報を記憶しておく。
A’に対するMove命令の次はAdd命令であり、これは無視する。
次にB’に対するMove命令が見つかり、オフセット情報は前出のA’に対するMove命令のオフセット情報と同一なので、B’に対するMove命令も特殊Move命令の範囲候補とする。
同様にしてC’、D’に対するMove命令も同一オフセットであるので、特殊Move命令の範囲候補とする。
Add命令をはさんでE’に対するMove命令を発見するが、このオフセット情報はA’に対するオフセット情報とは異なる。
そのため、A’から直前のMove命令の対象、つまりD’までを特殊Move命令の対象範囲として出力する。
また、異なるオフセット情報が発見されたので、E’に対するMove命令以降は、E’に対するMove命令のオフセット情報を比較するオフセット情報として処理を進める。
結果、E’、F’、G’に対するMove命令のオフセット情報が同一であり、またG’が部分データの末尾なので、E’からG’への範囲を特殊Move命令の対象範囲とする。
The latter process will be described with reference to FIG.
The Move instruction for A ′ of the new data 191 is first read and the offset information is stored.
Following the Move instruction for A 'is the Add instruction, which is ignored.
Next, the Move instruction for B ′ is found, and the offset information is the same as the offset information of the Move instruction for A ′ described above. Therefore, the Move instruction for B ′ is also set as a range candidate for the special Move instruction.
Similarly, the Move instruction for C ′ and D ′ has the same offset, and is therefore a range candidate for the special Move instruction.
A Move instruction for E ′ is found across the Add instruction, but this offset information is different from the offset information for A ′.
For this reason, the target of the previous Move instruction, that is, D ′, is output as the target range of the special Move instruction.
Also, since different offset information has been found, after the Move instruction for E ′, the process proceeds as offset information for comparing the offset information of the Move instruction for E ′.
As a result, the offset information of the Move instruction for E ′, F ′, and G ′ is the same, and since G ′ is the end of the partial data, the range from E ′ to G ′ is set as the target range of the special Move instruction.

次に、差分データ第2生成部130の動作を説明する。
図24の例では、A’からD’の範囲、およびE’からG’の範囲を表す差分データの先頭に特殊Move命令を挿入し、Move命令はSkip命令に置き換える。
また、Add命令はそのままAdd命令として表現するか、Add命令に相当する新データ191の範囲について旧データ192から一致部分を探してMove命令に置き換える。
また、D’とE’にはさまれた範囲についてはそのままAdd命令を出力するか、もしくは旧データ192全体から一致部分を探してMove命令で表現し変換後差分データ194を生成する。
Next, the operation of the differential data second generation unit 130 will be described.
In the example of FIG. 24, a special Move instruction is inserted at the head of the difference data representing the range from A ′ to D ′ and the range from E ′ to G ′, and the Move instruction is replaced with a Skip instruction.
Also, the Add instruction is directly expressed as an Add instruction, or a matching portion is searched from the old data 192 for the range of the new data 191 corresponding to the Add instruction and replaced with the Move instruction.
For the range between D ′ and E ′, the Add instruction is output as it is, or a matching portion is searched from the entire old data 192 and expressed by the Move instruction, and converted difference data 194 is generated.

差分データ出力部140は、変換前差分データ193と変換後差分データ194とのサイズを比較し、サイズの小さい方を差分データとして出力する。
これにより、より小さい差分データを選択することができる。
The difference data output unit 140 compares the sizes of the pre-conversion difference data 193 and the post-conversion difference data 194, and outputs the smaller one as difference data.
Thereby, smaller difference data can be selected.

図25は、実施の形態3における差分データ第1生成部120の処理の流れを示すフローチャートである。
また、図26は実施の形態3における差分データ第2生成部130の処理の流れを示すフローチャートである。
上記に説明した差分データ第1生成部120と差分データ第2生成部130との処理の流れを図25および図26に基づいて説明する。
FIG. 25 is a flowchart illustrating a process flow of the first difference data generation unit 120 according to the third embodiment.
FIG. 26 is a flowchart showing a process flow of the differential data second generation unit 130 in the third embodiment.
The flow of processing between the difference data first generation unit 120 and the difference data second generation unit 130 described above will be described with reference to FIGS. 25 and 26.

図25において、差分データ第1生成部120は以下の処理を行い、変換前差分データ193を生成する。
部分データ対応付け情報データ198を参照し、旧データ192と新データ191とから対応する部分データを取得する(S302)。
LCS抽出部121を起動し、取得した部分データからLCSを抽出する(S303)。
抽出したLCSに対して、LCSの長さと、LCSの旧データ192における新データ191に対する相対位置を示す値とを、MoveサイズおよびMoveオフセットにしたMove命令を生成する(S304)。
抽出したLCSのサイズを判定する(S305)。
抽出したLCSのサイズが一定値以上であれば、同一の部分データに対して、抽出したLCSの次に長い共通部分列を抽出し(S303)、抽出した共通部分列に対するMove命令の生成(S304)を行う。LCSのサイズを判定する一定値は任意であり、例えば、Move命令で表した方がAdd命令で表すより命令コードのサイズが小さくなる値である。図8に示す命令コードフォーマットの場合、LCSのサイズが4byte以上かの判定を行う。
抽出したLCSのサイズが一定値未満であれば、LCSとして抽出されなかった部分に対してAdd命令を生成する(S306)。
Add命令を生成(S306)後、部分データ対応付け情報データ198を参照し、旧データ192と新データ191とから新たに部分データを取得し(S302)、LCSの抽出(S303)、Move命令の生成(S304)、Add命令の生成(S306)を行う。
部分データ対応付け情報データ198を参照した結果、新たに部分データが無い場合、処理を終える(S301)。
In FIG. 25, the first difference data generation unit 120 performs the following process to generate pre-conversion difference data 193.
The corresponding partial data is acquired from the old data 192 and the new data 191 with reference to the partial data association information data 198 (S302).
The LCS extraction unit 121 is activated and LCS is extracted from the acquired partial data (S303).
For the extracted LCS, a Move instruction is generated in which the length of the LCS and the value indicating the relative position of the LCS old data 192 relative to the new data 191 are set to the Move size and the Move offset (S304).
The size of the extracted LCS is determined (S305).
If the size of the extracted LCS is equal to or greater than a certain value, a common partial sequence next to the extracted LCS is extracted for the same partial data (S303), and a Move instruction is generated for the extracted common partial sequence (S304). )I do. The fixed value for determining the size of the LCS is arbitrary. For example, the instruction code size is smaller when represented by the Move instruction than when represented by the Add instruction. In the case of the instruction code format shown in FIG. 8, it is determined whether the LCS size is 4 bytes or more.
If the size of the extracted LCS is less than a certain value, an Add instruction is generated for the portion that has not been extracted as the LCS (S306).
After generating the Add instruction (S306), the partial data association information data 198 is referred to, and new partial data is acquired from the old data 192 and the new data 191 (S302), the LCS is extracted (S303), and the Move instruction Generation (S304) and generation of an Add instruction (S306) are performed.
If there is no new partial data as a result of referring to the partial data association information data 198, the process is terminated (S301).

次に、図26において、差分データ第2生成部130は以下の処理を行い、変換後差分データ194を生成する。
変換後差分データ194から命令コードを取得する(S402)。
取得した命令コードを判定する(S403)。
取得した命令コードがAdd命令の場合、次の命令コードを取得し(S402)、取得した命令コードを判定する(S403)。
取得した命令コードがMove命令の場合、Moveオフセットを判定する(S404)。
取得したMove命令のMoveオフセットが、取得した一つ前のMove命令のMoveオフセットと同一である場合、取得したMove命令をSkip命令に置換する(S405)。
Move命令をSkip命令に置換(S405)後、次の命令コードを取得し(S402)、取得した命令コードを判定し(S403)、処理を繰り返す。
取得したMove命令のMoveオフセットが、取得した直前のMove命令のMoveオフセットと同一でない場合、特殊Move命令を挿入する(S406)。
また、一つ前の特殊Move命令のMoveオフセットに、Skip命令に置き換えたMove命令のMoveオフセットを設定する。
また、一つ前の特殊Move命令のMoveサイズに、Move命令から置き換えたSkip命令のSkipサイズと、Skip命令に挟まれたAdd命令のAddサイズとの合計サイズを設定する。
特殊Move命令を挿入(S406)後、次の命令コードを取得し(S402)、取得した命令コードを判定し(S403)、処理を繰り返す。
全ての命令コードを処理し、取得する命令コードが無いと判定した場合、処理を終了する(S401)。
Next, in FIG. 26, the difference data second generation unit 130 performs the following processing to generate converted difference data 194.
An instruction code is acquired from the converted difference data 194 (S402).
The acquired instruction code is determined (S403).
When the acquired instruction code is an Add instruction, the next instruction code is acquired (S402), and the acquired instruction code is determined (S403).
If the acquired instruction code is a Move instruction, a Move offset is determined (S404).
When the Move offset of the acquired Move instruction is the same as the Move offset of the previous Move instruction acquired, the acquired Move instruction is replaced with a Skip instruction (S405).
After replacing the Move instruction with the Skip instruction (S405), the next instruction code is acquired (S402), the acquired instruction code is determined (S403), and the process is repeated.
If the Move offset of the acquired Move instruction is not the same as the Move offset of the immediately preceding Move instruction, a special Move instruction is inserted (S406).
Also, the Move offset of the Move instruction replaced with the Skip instruction is set in the Move offset of the previous special Move instruction.
In addition, the total size of the Skip size of the Skip instruction replaced from the Move instruction and the Add size of the Add instruction sandwiched between the Skip instructions is set as the Move size of the previous special Move instruction.
After inserting the special Move instruction (S406), the next instruction code is acquired (S402), the acquired instruction code is determined (S403), and the process is repeated.
If all instruction codes are processed and it is determined that there is no instruction code to be acquired, the process ends (S401).

以上の構成および処理を有することによって、差分データ生成装置100は、従来の技術では差分データを小さいサイズで表現できなかったような更新パターンにおいて差分データを小さく表現することができる。
また、差分データを小さく表現することが出来る可能性がある場合に的確に差分データを小さく表現することができる。
By having the above configuration and processing, the differential data generating apparatus 100 can express the differential data small in an update pattern that cannot be expressed in a small size by the conventional technique.
Further, when there is a possibility that the difference data can be expressed in a small size, the difference data can be accurately expressed in a small size.

実施の形態4.
実施の形態4では、部分データ対応付け情報データ198を使用した差分データの第3の生成方法について説明する。
実施の形態4において、上記実施の形態と異なる部分を説明し、その他の部分は上記実施の形態と同様であるものとする。
図27は、実施の形態4における差分データ生成装置100の内部構成図である。
差分データ生成装置100の内部構成について、上記実施の形態1の図15、上記実施の形態2の図18および上記実施の形態3の図23と異なる構成を図27に基づいて説明し、その他の構成は図15、図18および図23と同様であるものとする。
Embodiment 4 FIG.
In the fourth embodiment, a third generation method of difference data using the partial data association information data 198 will be described.
In the fourth embodiment, parts different from the above embodiment will be described, and the other parts are the same as those in the above embodiment.
FIG. 27 is an internal configuration diagram of the difference data generation device 100 according to the fourth embodiment.
Regarding the internal configuration of the difference data generation device 100, a configuration different from FIG. 15 of the first embodiment, FIG. 18 of the second embodiment and FIG. 23 of the third embodiment will be described based on FIG. The configuration is the same as in FIGS. 15, 18 and 23.

差分データ生成部110は、差分LCS抽出部170を備える。
差分LCS抽出部170は、LCS抽出部171を備える。
また、差分LCS抽出部170は、部分データ対応付け情報データ198と新データ191と旧データ192とを入力とし、差分データ195を生成する。
また、LCS抽出部171は、上記実施の形態3のLCS抽出部121と同様にLCSの抽出を行なう。
The difference data generation unit 110 includes a difference LCS extraction unit 170.
The differential LCS extraction unit 170 includes an LCS extraction unit 171.
The differential LCS extraction unit 170 receives the partial data association information data 198, the new data 191 and the old data 192, and generates differential data 195.
The LCS extraction unit 171 performs LCS extraction in the same manner as the LCS extraction unit 121 of the third embodiment.

図28は、実施の形態4における部分データ対応付け情報データ198を示す図である。
実施の形態4において部分データ対応付け部150は、図28に示すような部分データ対応付け情報データ198を生成する。
部分データ対応付け情報データ198は、部分結合データフラグ項目を持ち、図19において、旧データ192の部分データA、B、C、Dを結合したデータと、新データ191の部分データA、B、C、Dを結合したデータとが同一サイズであることを示している。
FIG. 28 is a diagram showing partial data association information data 198 in the fourth embodiment.
In the fourth embodiment, the partial data association unit 150 generates partial data association information data 198 as shown in FIG.
The partial data association information data 198 has a partial combined data flag item. In FIG. 19, the partial data A, B, C, and D of the old data 192 are combined with the partial data A, B, and new data 191 of FIG. The data obtained by combining C and D has the same size.

図29は、実施の形態4における差分LCS抽出部170の処理の流れを示すフローチャートである。
実施の形態4における差分LCS抽出部170の差分データ生成処理について図29に基づいて説明する。
FIG. 29 is a flowchart showing a process flow of the differential LCS extraction unit 170 in the fourth embodiment.
The difference data generation process of the difference LCS extraction unit 170 in the fourth embodiment will be described with reference to FIG.

図28に示すような部分データ対応付け情報データ198から一つデータを取得し、部分データが部分結合データに含まれるか判定する(S502)。
部分データが部分結合データに含まれる場合、結合部分データに含まれる部分データのオフセットと合計サイズとを、特殊Moveオフセットおよび特殊Moveサイズとする特殊Move命令を生成する(S504)。
結合部分データに含まれる各部分データに対して、LCSを抽出し、Skip命令とAdd命令との生成を行う(S505〜S510)。
S505〜S510の処理は、上記実施の形態3の図25に示す差分データ第1生成部120の処理S301〜S306と同様であり、差分LCS抽出部170は、抽出したLCSに対してMove命令ではなくSkip命令を生成する(S506)。
結合部分データに含まれる全ての部分データに対して処理し、取得する部分データが無いと判定した場合(S505)、次の結合部分データを取得し、特殊Move命令を生成し、処理を繰り返す。
部分データが部分結合データに含まれない場合、上記実施の形態2の図22や、上記実施の形態3の図25および図26に示す処理を行い、部分結合データに含まれない部分データに対する差分データを生成する(S503)。
部分データ対応付け情報データ198に示される全ての部分データを処理した場合、処理を終了する(S501)。
One piece of data is acquired from the partial data association information data 198 as shown in FIG. 28, and it is determined whether the partial data is included in the partial combined data (S502).
If the partial data is included in the partial combined data, a special Move instruction is generated that sets the offset and total size of the partial data included in the combined partial data as a special Move offset and a special Move size (S504).
An LCS is extracted for each partial data included in the combined partial data, and a Skip instruction and an Add instruction are generated (S505 to S510).
The processing of S505 to S510 is the same as the processing S301 to S306 of the difference data first generation unit 120 shown in FIG. 25 of the third embodiment, and the difference LCS extraction unit 170 uses the Move instruction for the extracted LCS. Instead, a Skip instruction is generated (S506).
If all partial data included in the combined partial data are processed and it is determined that there is no partial data to be acquired (S505), the next combined partial data is acquired, a special Move instruction is generated, and the process is repeated.
When the partial data is not included in the partial combined data, the processing shown in FIG. 22 of the second embodiment and the processes shown in FIGS. 25 and 26 of the third embodiment is performed, and the difference with respect to the partial data not included in the partial combined data Data is generated (S503).
If all the partial data indicated in the partial data association information data 198 has been processed, the process is terminated (S501).

上記実施の形態において、以下のことを説明した。
新旧2つのデータに対して、旧データ192から新データ191へバージョンアップするための差分データを抽出する差分データ生成装置において、前記差分データとして、前記旧データ192の一部、あるいは全部からデータを移動して前記新データ191にコピーすることを意味する0個以上のMove命令と、新データ191に当該差分データ中に記述したデータを追加することを意味する0個以上のAdd命令と、前記旧データ192の一部、あるいは全部からデータを移動して前記新データ191にコピーした後に、前記新データ191に対する書換えポインタを前記コピーデータの先頭に移動させることを意味する0個以上の特殊Move命令と、前記新データ191に対する書換えポインタを前方に指定長分進めることを意味する0個以上のSkip命令とで構成される差分データを生成する差分データ生成装置100について説明した。
In the above embodiment, the following has been described.
In the difference data generation apparatus that extracts difference data for upgrading from the old data 192 to the new data 191 with respect to the old and new two data, as the difference data, data from a part or all of the old data 192 is obtained. Zero or more Move instructions that mean to move and copy to the new data 191; zero or more Add instructions that mean to add the data described in the differential data to the new data 191; Zero or more special Moves, which means that the rewrite pointer for the new data 191 is moved to the beginning of the copy data after the data is moved from a part or all of the old data 192 and copied to the new data 191. This means that the instruction and the rewrite pointer for the new data 191 are moved forward by the specified length. Been described difference data generator 100 for generating a composed difference data at zero or more Skip instructions that.

また、差分データ生成装置100が、特殊Move命令を含まない形式で旧データ192から新データ191へバージョンアップするための差分データを抽出する差分抽出処理手段と、前記特殊Move命令を含まない形式の差分データに対して、特殊Move命令で表現した方が差分データサイズが小さくなるような箇所を発見して、特殊Move命令を含んだ表現に置き換える差分データ変換手段とを有すること説明した。   Further, the difference data generation apparatus 100 includes a difference extraction processing means for extracting difference data for upgrading from the old data 192 to the new data 191 in a format not including the special Move instruction, and a format not including the special Move instruction. It has been described that difference data conversion means for finding a portion where the difference data size is smaller when expressed with the special Move instruction for the difference data and replacing it with an expression including the special Move instruction.

また、差分データ生成装置100が、新旧データ192、もしくは新旧データ192に付随して提供される配置情報データに含まれる新旧データ192の配置情報を元に、新旧データ192の部分データ同士を対応付ける部分データ対応付け手段と、前記領域対応付け機能によって対応付けられた新旧データ192の部分データ同士を比較して差分データを生成する差分抽出処理手段とを有し、差分抽出処理手段が、対応付けられた部分データ同士のデータ長が同一の場合には、差分データの構成要素として前記部分データ領域分のコピーを示す特殊Move命令を用いることを説明した。   Further, the difference data generation device 100 associates the partial data of the old and new data 192 with each other based on the arrangement information of the old and new data 192 included in the new and old data 192 or the arrangement information data provided accompanying the old and new data 192. A data extraction unit that compares the partial data of the old and new data 192 associated by the region association function and generates difference data, and the difference extraction unit is associated In the case where the data lengths of the partial data are the same, it has been described that a special Move instruction indicating a copy of the partial data area is used as a component of the difference data.

また、差分抽出処理手段が、対応付けられた部分データ同士のデータ長が同一の場合には、新旧データ192の先頭から同一オフセット同士を比較し、最初に一致する位置から最後に一致する位置までの間を特殊Move命令で表現することを説明した。   Further, when the data length of the associated partial data is the same, the difference extraction processing unit compares the same offsets from the top of the new and old data 192, and from the first matching position to the last matching position. It was explained that the space is expressed by a special Move instruction.

差分抽出処理手段が、対応付けられた部分データ同士に対して最長共通部分系列を求め、求まった最長共通部分列を差分データとして表現する最長共通部分系列計算手段と、最長共通部分系列計算手段によって生成された差分データから特殊Move命令で表現する範囲を0個以上選び出す複写範囲決定手段と、複写範囲決定手段によって特殊Move命令で表現することが決まった範囲を特殊Move命令を用いた差分データで置き換える差分データ生成手段から構成されること説明した。   The difference extraction processing means obtains the longest common partial sequence for the associated partial data, the longest common partial sequence calculating means for expressing the obtained longest common partial sequence as difference data, and the longest common partial sequence calculating means Copy range determination means for selecting zero or more ranges to be expressed by the special Move instruction from the generated difference data, and the range determined to be expressed by the special Move instruction by the copy range determination means is the difference data using the special Move instruction. It has been explained that it is composed of differential data generating means for replacement.

差分データ生成手段が、複写範囲決定手段によって特殊Move命令で表現することが決まった範囲は特殊Move命令を用いた差分データで置き換え、そうでない範囲に対しては通常の差分データを新たに生成する差分データ生成手段であることを説明した。   The difference data generating means replaces the range determined to be expressed by the special Move instruction by the copy range determining means with the difference data using the special Move instruction, and newly generates normal difference data for the other range. The difference data generating means has been described.

差分抽出処理手段が、特殊Move命令を構成要素として含む差分データと、特殊Move命令を構成要素として含まない差分データとの2種類を生成し、サイズの小さい方の差分データを差分データとして出力することを説明した。   The difference extraction processing means generates two types of difference data including the special Move instruction as a component and difference data not including the special Move instruction as a component, and outputs the smaller difference data as the difference data. I explained that.

差分抽出処理手段が、特殊Move命令を構成要素として含むように生成された差分データの各特殊Move命令に相当する新データ191の範囲に対して、特殊Move命令を使用しないパターンでも差分抽出を行い、前記範囲の差分データについて特殊Move命令を使用した差分データと使用しない差分データとでデータサイズを比較し、特殊Move命令を使用しない差分データの方がサイズが小さい場合は前記新データ191の範囲に対する差分データを前記特殊Move命令を使用しない差分データに置き換えることを説明した。   The difference extraction processing means performs difference extraction even in a pattern in which the special Move instruction is not used for the range of the new data 191 corresponding to each special Move instruction of the difference data generated so as to include the special Move instruction as a component. The difference data of the range is compared with the difference data using the special Move instruction and the difference data not using the difference data. When the difference data not using the special Move instruction is smaller in size, the range of the new data 191 It has been described that the difference data with respect to is replaced with difference data that does not use the special Move instruction.

旧データ192と新データ191を示す図。The figure which shows the old data 192 and the new data 191. 従来例による差分データを示す図。The figure which shows the difference data by a prior art example. 従来例による差分データを示す図。The figure which shows the difference data by a prior art example. 旧データ192と新データ191を示す図。The figure which shows the old data 192 and the new data 191. 従来例による差分データを示す図。The figure which shows the difference data by a prior art example. 旧データ192と新データ191を示す図。The figure which shows the old data 192 and the new data 191. 従来例による差分データを示す図。The figure which shows the difference data by a prior art example. 実施の形態1における差分データの命令コードフォーマットを示す図。FIG. 3 shows an instruction code format of difference data in the first embodiment. 従来例による差分データを示す図。The figure which shows the difference data by a prior art example. 実施の形態1における差分データを示す図。FIG. 4 shows difference data in the first embodiment. 従来例による差分データを示す図。The figure which shows the difference data by a prior art example. 実施の形態1における差分データを示す図。FIG. 4 shows difference data in the first embodiment. 実施の形態1における差分データ生成装置100の外観を示す図。FIG. 3 is a diagram illustrating an appearance of a difference data generation device 100 according to the first embodiment. 実施の形態1における差分データ生成装置100のハードウェア構成図。FIG. 2 is a hardware configuration diagram of the difference data generation device 100 according to the first embodiment. 実施の形態1における差分データ生成装置100の内部構成図。FIG. 2 is an internal configuration diagram of a difference data generation device 100 according to the first embodiment. 実施の形態1における差分データ生成装置100の処理の流れを示すフローチャート。3 is a flowchart showing a process flow of the differential data generation device 100 according to the first embodiment. 実施の形態1における差分データ第2生成部130の処理の流れを示すフローチャート。5 is a flowchart showing a flow of processing of a differential data second generation unit 130 in the first embodiment. 実施の形態2における差分データ生成装置100の内部構成図。The internal block diagram of the difference data generation apparatus 100 in Embodiment 2. FIG. 実施の形態2における新旧データと配置情報データとを示す図。The figure which shows the old and new data and arrangement | positioning information data in Embodiment 2. FIG. 実施の形態2における部分データ対応付け情報データ198を示す図。The figure which shows the partial data matching information data 198 in Embodiment 2. FIG. 実施の形態2における旧データ192と新データ191を示す図。FIG. 6 shows old data 192 and new data 191 in the second embodiment. 実施の形態2における差分抽出部160の処理の流れを示すフローチャート。9 is a flowchart showing a process flow of a difference extraction unit 160 in the second embodiment. 実施の形態3における差分データ生成装置100の内部構成図。The internal block diagram of the difference data generation apparatus 100 in Embodiment 3. FIG. 実施の形態3における旧データ192と新データ191を示す図。FIG. 11 shows old data 192 and new data 191 in the third embodiment. 実施の形態3における差分データ第1生成部120の処理の流れを示すフローチャート。10 is a flowchart showing a flow of processing of a difference data first generation unit 120 according to Embodiment 3. 実施の形態3における差分データ第2生成部130の処理の流れを示すフローチャート。9 is a flowchart showing a flow of processing of a difference data second generation unit in Embodiment 3. 実施の形態4における差分データ生成装置100の内部構成図。The internal block diagram of the difference data generation apparatus 100 in Embodiment 4. FIG. 実施の形態4における部分データ対応付け情報データ198を示す図。The figure which shows the partial data matching information data 198 in Embodiment 4. FIG. 実施の形態4における差分LCS抽出部170の処理の流れを示すフローチャート。10 is a flowchart showing a process flow of a differential LCS extraction unit 170 in the fourth embodiment.

符号の説明Explanation of symbols

100 差分データ生成装置、110 差分データ生成部、120 差分データ第1生成部、121 LCS抽出部、130 差分データ第2生成部、140 差分データ出力部、150 部分データ対応付け部、160 差分抽出部、170 差分LCS抽出部、171 LCS抽出部、190 データ記憶部、191 新データ、192 旧データ、193 変換前差分データ、194 変換後差分データ、195 差分データ、196 新データ配置情報データ、197 旧データ配置情報データ、198 部分データ対応付け情報データ、901 CRT表示装置、902 K/B、903 マウス、904 FDD、905 CDD、906 プリンタ装置、907 スキャナ装置、910 システムユニット、911 CPU、912 バス、913 ROM、914 RAM、915 通信ボード、920 磁気ディスク装置、921 OS、922 ウィンドウシステム、923 プログラム群、924 ファイル群、931 電話器、932 FAX機、940 インターネット、941 ウェブサーバ、942 LAN。   100 differential data generation device, 110 differential data generation unit, 120 differential data first generation unit, 121 LCS extraction unit, 130 differential data second generation unit, 140 differential data output unit, 150 partial data association unit, 160 differential extraction unit , 170 Difference LCS extraction unit, 171 LCS extraction unit, 190 Data storage unit, 191 New data, 192 Old data, 193 Difference data before conversion, 194 Difference data after conversion, 195 Difference data, 196 New data arrangement information data, 197 Old Data arrangement information data, 198 partial data association information data, 901 CRT display device, 902 K / B, 903 mouse, 904 FDD, 905 CDD, 906 printer device, 907 scanner device, 910 system unit, 911 CPU, 912 bus, 913 ROM, 914 RAM, 915 communication board, 920 magnetic disk unit, 921 OS, 922 window system, 923 program group, 924 file group, 931 telephone, 932 FAX machine, 940 Internet, 941 Web server, 942 LAN.

Claims (10)

旧データから新データに移行するために、旧データのデータ位置を示す旧データポインタと新データのデータ位置を示す新データポインタとを制御する情報と、移行するデータの情報とに関する命令コードを含む差分データを生成する差分データ生成装置において、
旧データと新データとを記憶するデータ記憶部と、
データ記憶部に記憶された旧データと新データとを読み込んで、
旧データポインタの示す位置とコピーサイズとを示し、旧データポインタの示す位置にあるデータを新データポインタの示す位置からコピーサイズ分コピーし、新データポインタの示す位置からコピーサイズ分移動した位置を示す値を新データポインタに設定することを示す第1Move命令コードを差分データに含めるかの判定と、
追加データと追加データサイズとを示し、新データポインタの示す位置から追加データを追加し、新データポインタの示す位置を追加データサイズ分移動した位置を示す値を新データポインタに設定することを示すAdd命令コードを差分データに含めるかの判定と、
旧データポインタの示す位置とコピーサイズとを示し、旧データポインタの示す位置にあるデータを新データポインタの示す位置からコピーサイズ分コピーし、新データポインタの値を更新しないことを示す第2Move命令コードを差分データに含めるかの判定と、
ポインタ更新サイズを示し、新データポインタの示す位置からポインタ更新サイズ分移動した位置を示す値を新データポインタに設定することを示すSkip命令コードを差分データに含めるかの判定とを行い記憶部に記憶し、判定結果に基づいて差分データを生成して記憶部に記憶する差分データ生成部と
を備えたことを特徴とする差分データ生成装置。
In order to move from old data to new data, includes information for controlling the old data pointer indicating the data position of the old data and the new data pointer indicating the data position of the new data, and an instruction code relating to the information of the data to be transferred In the difference data generation device that generates the difference data,
A data storage unit for storing old data and new data;
Read the old data and new data stored in the data storage unit,
Indicates the position indicated by the old data pointer and the copy size, copies the data at the position indicated by the old data pointer by the copy size from the position indicated by the new data pointer, and moves the position moved by the copy size from the position indicated by the new data pointer. Determining whether to include in the difference data a first Move instruction code indicating setting a value to be indicated in the new data pointer;
Indicates additional data and additional data size, indicates that additional data is added from the position indicated by the new data pointer, and a value indicating the position moved by the additional data size is set to the new data pointer. Determining whether to include the Add instruction code in the difference data;
A second Move instruction indicating the position indicated by the old data pointer and the copy size, copying the data at the position indicated by the old data pointer by the copy size from the position indicated by the new data pointer, and not updating the value of the new data pointer Whether to include the code in the difference data;
Indicates the pointer update size, and determines whether or not to include in the difference data a Skip instruction code indicating that a value indicating the position moved by the pointer update size from the position indicated by the new data pointer is set in the new data pointer. A difference data generation apparatus comprising: a difference data generation unit that stores and generates difference data based on a determination result and stores the difference data in a storage unit.
上記差分データ生成部は、
データ記憶部に記憶された旧データと新データとに基づいて、第1Move命令コードを差分データに含めるかの判定と、Add命令コードを差分データに含めるかの判定とを行い、第2Move命令コードとSkip命令コードとを含まない差分データを生成する差分データ第1生成部と、
差分データ第1生成部が生成した差分データを入力し、入力した差分データに基づいて、第2Move命令コードを差分データに含めるかの判定と、Skip命令コードを差分データに含めるかの判定とを行い、判定結果に基づいて差分データを生成する差分データ第2生成部と
を備えたことを特徴とする請求項1記載の差分データ生成装置。
The difference data generation unit
Based on the old data and the new data stored in the data storage unit, a determination is made as to whether the first Move instruction code is included in the difference data, and a determination is made as to whether the Add instruction code is included in the difference data. The second Move instruction code And a difference data first generation unit for generating difference data not including the Skip instruction code,
The difference data generated by the difference data first generation unit is input, and based on the input difference data, whether to include the second Move instruction code in the difference data and whether to include the Skip instruction code in the difference data are determined. The difference data generation apparatus according to claim 1, further comprising a difference data second generation unit configured to perform difference data generation based on a determination result.
上記データ記憶部は、さらに、
旧データの各部分のデータである部分データの位置を示す旧データ配置情報データと、
旧データの部分データに対応している新データの部分データの位置を示す新データ配置情報データとを記憶し、
上記差分データ生成部は、
上記データ記憶部に記憶された旧データ配置情報データと新データ配置情報データとにおいて対応する旧データの部分データと新データの部分データとが同一サイズの場合に、第2Move命令コードを差分データに含めると判定し、対応する旧データの部分データを対応する新データの部分データの位置にコピーすることを示す第2Move命令コードを含む差分データを生成する
ことを特徴とする請求項1記載の差分データ生成装置。
The data storage unit further includes:
Old data arrangement information data indicating the position of partial data that is data of each part of the old data,
Storing new data arrangement information data indicating the position of the partial data of the new data corresponding to the partial data of the old data,
The difference data generation unit
In the case where the old data partial data and the new data partial data corresponding to the old data arrangement information data and the new data arrangement information data stored in the data storage unit have the same size, the second Move instruction code is converted into the difference data. 2. The difference according to claim 1, further comprising: generating difference data including a second Move instruction code that determines to include and copies the corresponding partial data of the old data to the position of the corresponding partial data of the new data. Data generator.
上記データ記憶部は、
旧データの各部分のデータである部分データの位置を示す旧データ配置情報データと、
旧データの部分データに対応している新データの部分データの位置を示す新データ配置情報データとを記憶し、
上記差分データ生成部は、
上記データ記憶部に記憶された旧データ配置情報データと新データ配置情報データとにおいて対応する旧データの部分データと新データの部分データとが同一サイズの場合に、第2Move命令コードを差分データに含めると判定し、対応する旧データの部分データと対応する新データの部分データとの共通部分列を検索し、旧データの部分データのうち、先頭の共通部分列から最終の共通部分列までを、新データの部分データのうち、先頭の共通部分列から最終の共通部分列の位置にコピーすることを示す第2Move命令コードを含む差分データを生成する
ことを特徴とする請求項1記載の差分データ生成装置。
The data storage unit is
Old data arrangement information data indicating the position of partial data that is data of each part of the old data,
Storing new data arrangement information data indicating the position of the partial data of the new data corresponding to the partial data of the old data,
The difference data generation unit
In the case where the old data partial data and the new data partial data corresponding to the old data arrangement information data and the new data arrangement information data stored in the data storage unit have the same size, the second Move instruction code is converted into the difference data. It is determined to include, the common partial sequence of the corresponding partial data of the old data and the corresponding partial data of the new data is searched, and from the first common partial sequence to the final common partial sequence of the partial data of the old data 2. The difference data according to claim 1, further comprising: generating difference data including a second Move instruction code indicating that copying is performed from the first common partial sequence to the position of the final common partial sequence among the partial data of the new data. Data generator.
上記差分データ生成部は、
データ記憶部に記憶された旧データと新データとに基づいて、第1Move命令コードを差分データに含めるかの判定と、Add命令コードを差分データに含めるかの判定とを行い、第2Move命令コードとSkip命令コードとを含まない差分データを生成する差分データ第1生成部と、
上記データ記憶部に記憶された旧データ配置情報データと新データ配置情報データとにおいて対応する旧データの部分データと新データの部分データとが同一サイズの場合に、第2Move命令コードを差分データに含めると判定し、対応する旧データの部分データを対応する新データの部分データの位置にコピーすることを示す第2Move命令コードを含む差分データを生成する差分データ第2生成部と
差分データ第1生成部が生成した差分データと差分データ第2生成部が生成した差分データとを入力し、入力した差分データのデータサイズを比較し、データサイズの小さい方を差分データとして出力する差分データ出力部と
を備えることを特徴とする請求項3または請求項4記載の差分データ生成装置。
The difference data generation unit
Based on the old data and the new data stored in the data storage unit, a determination is made as to whether the first Move instruction code is included in the difference data, and a determination is made as to whether the Add instruction code is included in the difference data. The second Move instruction code And a difference data first generation unit for generating difference data not including the Skip instruction code,
In the case where the old data partial data and the new data partial data corresponding to the old data arrangement information data and the new data arrangement information data stored in the data storage unit have the same size, the second Move instruction code is converted into the difference data. A difference data second generation unit that generates difference data including a second Move instruction code that determines to include and copies the corresponding partial data of the old data to the position of the corresponding partial data of the new data; The difference data output unit that inputs the difference data generated by the generation unit and the difference data generated by the difference data second generation unit, compares the data size of the input difference data, and outputs the smaller data size as the difference data The difference data generation device according to claim 3, further comprising:
上記データ記憶部は、
旧データの各部分のデータである部分データの位置を示す旧データ配置情報データと、
旧データの部分データに対応している新データの部分データの位置を示す新データ配置情報データとを記憶し、
上記差分データ生成部は、
上記データ記憶部に記憶された旧データ配置情報データと新データ配置情報データとで対応する旧データの部分データと新データの部分データとの最長共通部分列を検索する最長共通部分列検索部と、
上記データ記憶部に記憶された旧データと新データとに基づいて、第1Move命令コードを差分データに含めるかの判定と、Add命令コードを差分データに含めるかの判定とを行い、最長共通部分列検索部が検索した最長共通部分列を旧データから新データにコピーすることを示す第1Move命令コードを含み、第2Move命令コードとSkip命令コードとを含まない差分データを生成する差分データ第1生成部と、
差分データ第1生成部が生成した差分データを入力し、入力した差分データに基づいて、第2Move命令コードを差分データに含めるかの判定と、Skip命令コードを差分データに含めるかの判定とを行い、判定結果に基づいて差分データを生成する差分データ第2生成部と
を備えたことを特徴とする請求項1記載の差分データ生成装置。
The data storage unit is
Old data arrangement information data indicating the position of partial data that is data of each part of the old data,
Storing new data arrangement information data indicating the position of the partial data of the new data corresponding to the partial data of the old data,
The difference data generation unit
A longest common subsequence search unit that searches for the longest common subsequence of the partial data of the old data and the partial data of the new data corresponding to the old data arrangement information data and the new data arrangement information data stored in the data storage unit; ,
Based on the old data and new data stored in the data storage unit, a determination is made as to whether the first Move instruction code is included in the difference data and a determination is made as to whether the Add instruction code is included in the difference data. First difference data for generating difference data including a first Move instruction code indicating that the longest common partial sequence searched by the column search unit is copied from the old data to the new data, and not including the second Move instruction code and the Skip instruction code A generator,
The difference data generated by the difference data first generation unit is input, and based on the input difference data, whether to include the second Move instruction code in the difference data and whether to include the Skip instruction code in the difference data are determined. The difference data generation apparatus according to claim 1, further comprising a difference data second generation unit configured to perform difference data generation based on a determination result.
上記差分データ第1生成部は、
第1Move命令コードを差分データに含めると判定した場合、旧データポインタの示す位置を新データポインタの示す位置に対する相対値で表す第1Move命令コードを含む差分データを生成し、
上記差分データ第2生成部は、
上記差分データ第1生成部が生成した差分データを入力し、入力した差分データに含まれる第1Move命令コードを抽出し、抽出した第1Move命令コードの中から、旧データポインタの示す新データポインタに対する相対値が同一である第1Move命令コードを複数取得し、取得した複数の第1Move命令コードを、第2Move命令コードとSkip命令コードとの少なくともいずれかに変換して差分データを生成する
ことを特徴とする請求項2または請求項6記載の差分データ生成装置。
The difference data first generation unit includes:
If it is determined that the first Move instruction code is included in the difference data, the difference data including the first Move instruction code that represents the position indicated by the old data pointer as a relative value with respect to the position indicated by the new data pointer is generated.
The difference data second generation unit
The difference data generated by the difference data first generation unit is input, the first Move instruction code included in the input difference data is extracted, and the new data pointer indicated by the old data pointer is extracted from the extracted first Move instruction code. A plurality of first Move instruction codes having the same relative value are acquired, and the plurality of acquired first Move instruction codes are converted into at least one of a second Move instruction code and a Skip instruction code to generate difference data. The difference data generation device according to claim 2 or 6.
上記差分データ生成部は、さらに、
上記差分データ第1生成部が生成した差分データと上記差分データ第2生成部が生成した差分データとを入力し、入力した差分データのデータサイズを比較し、データサイズの小さい方を差分データとして出力する差分データ出力部を備えた
ことを特徴とする請求項2または請求項6または請求項7いずれかに記載の差分データ生成装置。
The difference data generation unit further includes:
The difference data generated by the first difference data generation unit and the difference data generated by the second difference data generation unit are input, the data sizes of the input difference data are compared, and the smaller data size is set as difference data. The differential data generation apparatus according to claim 2, further comprising a differential data output unit for outputting.
旧データから新データに移行するために、旧データのデータ位置を示す旧データポインタと新データのデータ位置を示す新データポインタとを制御する情報と、移行するデータの情報とに関する命令コードを含む差分データを生成する差分データ生成装置の差分データ生成方法において、
旧データと新データとを記憶部に記憶するデータ記憶工程と、
データ記憶工程で記憶された旧データと新データとを読み込んで、
旧データポインタの示す位置とコピーサイズとを示し、旧データポインタの示す位置にあるデータを新データポインタの示す位置からコピーサイズ分コピーし、新データポインタの示す位置からコピーサイズ分移動した位置を示す値を新データポインタに設定することを示す第1Move命令コードを差分データに含めるかの判定と、
追加データと追加データサイズとを示し、新データポインタの示す位置から追加データを追加し、新データポインタの示す位置から追加データサイズ分移動した位置を示す値を新データポインタに設定することを示すAdd命令コードを差分データに含めるかの判定と、
旧データポインタの示す位置とコピーサイズとを示し、旧データポインタの示す位置にあるデータを新データポインタの示す位置からコピーサイズ分コピーし、新データポインタの値を更新しないことを示す第2Move命令コードを差分データに含めるかの判定と、
ポインタ更新サイズを示し、新データポインタの示す位置からポインタ更新サイズ分移動した位置を示す値を新データポインタに設定することを示すSkip命令コードを差分データに含めるかの判定と
を行い記憶部に記憶し、判定結果に基づいて差分データを生成して記憶部に記憶する差分データ生成工程と
を実行することを特徴とする差分データ生成方法。
In order to move from old data to new data, includes information for controlling the old data pointer indicating the data position of the old data and the new data pointer indicating the data position of the new data, and an instruction code relating to the information of the data to be transferred In the difference data generation method of the difference data generation device that generates the difference data,
A data storage step of storing old data and new data in the storage unit;
Read the old data and new data stored in the data storage process,
Indicates the position indicated by the old data pointer and the copy size, copies the data at the position indicated by the old data pointer by the copy size from the position indicated by the new data pointer, and moves the position moved by the copy size from the position indicated by the new data pointer. Determining whether to include in the difference data a first Move instruction code indicating setting a value to be indicated in the new data pointer;
Indicates additional data and additional data size, indicates that additional data is added from the position indicated by the new data pointer, and a value indicating the position moved by the additional data size from the position indicated by the new data pointer is set in the new data pointer Determining whether to include the Add instruction code in the difference data;
A second Move instruction indicating the position indicated by the old data pointer and the copy size, copying the data at the position indicated by the old data pointer by the copy size from the position indicated by the new data pointer, and not updating the value of the new data pointer Whether to include the code in the difference data;
Indicates the pointer update size, and determines whether or not to include in the difference data a Skip instruction code indicating that a value indicating the position moved by the pointer update size from the position indicated by the new data pointer is set in the new data pointer. A difference data generation method comprising: storing and executing a difference data generation step of generating difference data based on a determination result and storing the difference data in a storage unit.
請求項9記載の差分データ生成方法をコンピュータに実行させる差分データ生成プログラム。   A difference data generation program for causing a computer to execute the difference data generation method according to claim 9.
JP2004264948A 2004-09-13 2004-09-13 DIFFERENTIAL DATA GENERATION DEVICE, DIFFERENTIAL DATA GENERATION METHOD, AND DIFFERENTIAL DATA GENERATION PROGRAM Expired - Fee Related JP4036852B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004264948A JP4036852B2 (en) 2004-09-13 2004-09-13 DIFFERENTIAL DATA GENERATION DEVICE, DIFFERENTIAL DATA GENERATION METHOD, AND DIFFERENTIAL DATA GENERATION PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004264948A JP4036852B2 (en) 2004-09-13 2004-09-13 DIFFERENTIAL DATA GENERATION DEVICE, DIFFERENTIAL DATA GENERATION METHOD, AND DIFFERENTIAL DATA GENERATION PROGRAM

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2007249287A Division JP4249793B2 (en) 2007-09-26 2007-09-26 DIFFERENTIAL DATA GENERATION DEVICE, DIFFERENTIAL DATA GENERATION METHOD FOR DIFFERENTIAL DATA GENERATION DEVICE, AND DIFFERENTIAL DATA GENERATION PROGRAM

Publications (2)

Publication Number Publication Date
JP2006079492A true JP2006079492A (en) 2006-03-23
JP4036852B2 JP4036852B2 (en) 2008-01-23

Family

ID=36158867

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004264948A Expired - Fee Related JP4036852B2 (en) 2004-09-13 2004-09-13 DIFFERENTIAL DATA GENERATION DEVICE, DIFFERENTIAL DATA GENERATION METHOD, AND DIFFERENTIAL DATA GENERATION PROGRAM

Country Status (1)

Country Link
JP (1) JP4036852B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008204287A (en) * 2007-02-21 2008-09-04 Access Co Ltd Data generation method, data restoration method, data generation device and data restoration device
JP2012069131A (en) * 2006-06-19 2012-04-05 Samsung Electronics Co Ltd Program upgrading method and system for portable device capable of ota (over-the-air)
WO2016016923A1 (en) * 2014-07-28 2016-02-04 三菱電機株式会社 Differential data creating system, data updating system, and differential data creating method
JP2017199183A (en) * 2016-04-27 2017-11-02 日立オートモティブシステムズ株式会社 Vehicle-purpose electronic control unit, program update method and server device
CN111580849A (en) * 2020-05-09 2020-08-25 东软睿驰汽车技术(沈阳)有限公司 File difference updating optimization method and related device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012069131A (en) * 2006-06-19 2012-04-05 Samsung Electronics Co Ltd Program upgrading method and system for portable device capable of ota (over-the-air)
JP2008204287A (en) * 2007-02-21 2008-09-04 Access Co Ltd Data generation method, data restoration method, data generation device and data restoration device
WO2016016923A1 (en) * 2014-07-28 2016-02-04 三菱電機株式会社 Differential data creating system, data updating system, and differential data creating method
US9900026B2 (en) 2014-07-28 2018-02-20 Mitsubishi Electric Corporation Differential data creating apparatus, data updating apparatus, and differential data creating method
JP2017199183A (en) * 2016-04-27 2017-11-02 日立オートモティブシステムズ株式会社 Vehicle-purpose electronic control unit, program update method and server device
WO2017188096A1 (en) * 2016-04-27 2017-11-02 日立オートモティブシステムズ株式会社 Vehicular electronic control device, program update method and server device
US10725772B2 (en) 2016-04-27 2020-07-28 Hitachi Automotive Systems, Ltd. Electric control device for vehicles, program updating method, and server apparatus
CN111580849A (en) * 2020-05-09 2020-08-25 东软睿驰汽车技术(沈阳)有限公司 File difference updating optimization method and related device
CN111580849B (en) * 2020-05-09 2023-07-04 东软睿驰汽车技术(沈阳)有限公司 File difference updating and optimizing method and related device

Also Published As

Publication number Publication date
JP4036852B2 (en) 2008-01-23

Similar Documents

Publication Publication Date Title
EP3021218B1 (en) Upgrade packet generation method, server, software upgrade method, and mobile terminal
JP5019578B2 (en) Method and system for updating a version of content stored in a storage device
JP5267337B2 (en) Program, storage medium, information processing apparatus, printer apparatus, and system
KR100717064B1 (en) Method and apparatus for performing software update
JP2004152136A (en) Data update system, difference data generation device and program for data update system, and post-update file restoration device and program
KR20120063455A (en) Apparatus and method for updating firmware
US6351741B1 (en) Method of locating a file linked to a document in a relocated document directory structure
JP4036852B2 (en) DIFFERENTIAL DATA GENERATION DEVICE, DIFFERENTIAL DATA GENERATION METHOD, AND DIFFERENTIAL DATA GENERATION PROGRAM
JP4249793B2 (en) DIFFERENTIAL DATA GENERATION DEVICE, DIFFERENTIAL DATA GENERATION METHOD FOR DIFFERENTIAL DATA GENERATION DEVICE, AND DIFFERENTIAL DATA GENERATION PROGRAM
JP2008226010A (en) Compile method and compile device
CN115309409A (en) Compression of firmware updates
JP2004227520A (en) Device, method and program for generating old and new program rewriting information, and computer readable recording medium recording the program
JP4791205B2 (en) Difference generation device, difference application device, difference generation program, and difference application program
US20070245336A1 (en) Method of generating patch file and computer readable recording medium storing programs for executing the method
US10310871B2 (en) Non-transitory computer-readable recording medium storing control program, control device and control method
JP4865449B2 (en) Difference generation device, difference application device, difference generation program, difference application program, difference generation application system, and difference generation application method
JP3733135B1 (en) Software difference extraction application system, difference extraction device, difference application device, and program
JP4942519B2 (en) Information processing apparatus, program, and information processing method
JP4477947B2 (en) Differential application embedded device system and stored data changing method
JP5673730B2 (en) Information processing device
WO2017145357A1 (en) Information processing device, information processing method, and information processing program
JP2009206606A (en) Information processor
CN106528183B (en) Method and device for creating control and computer program
US20180004490A1 (en) Non-transitory computer-readable storage medium, editing support method, and editing support device
CN117272942A (en) File code value conversion method, device, equipment and medium

Legal Events

Date Code Title Description
A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20070502

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20070523

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070529

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070627

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070731

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070926

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20071012

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20071030

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071030

R150 Certificate of patent or registration of utility model

Ref document number: 4036852

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101109

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111109

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121109

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121109

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20131109

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees