JP4399017B2 - Structured document data update method and information providing server - Google Patents

Structured document data update method and information providing server Download PDF

Info

Publication number
JP4399017B2
JP4399017B2 JP2008149332A JP2008149332A JP4399017B2 JP 4399017 B2 JP4399017 B2 JP 4399017B2 JP 2008149332 A JP2008149332 A JP 2008149332A JP 2008149332 A JP2008149332 A JP 2008149332A JP 4399017 B2 JP4399017 B2 JP 4399017B2
Authority
JP
Japan
Prior art keywords
update
node
data
difference
structured document
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008149332A
Other languages
Japanese (ja)
Other versions
JP2008293506A (en
Inventor
英俊 上野
剛志 加藤
偉元 鈴木
憲洋 石川
宏光 角野
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.)
NTT Docomo Inc
Original Assignee
NTT Docomo Inc
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 NTT Docomo Inc filed Critical NTT Docomo Inc
Priority to JP2008149332A priority Critical patent/JP4399017B2/en
Publication of JP2008293506A publication Critical patent/JP2008293506A/en
Application granted granted Critical
Publication of JP4399017B2 publication Critical patent/JP4399017B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

本発明は、サーバからクライアントへ提供される、1又は複数の要素を構造化して構成される構造化文書データを更新する構造化文書データ更新方法に関する。   The present invention relates to a structured document data update method for updating structured document data configured by structuring one or more elements provided from a server to a client.

従来より、1又は複数の要素を構造化して構成される構造化文書であるXML(extensible markup language)や、HTML(hyper text markup language)を初めとする様々な形式のデータをサーバからクライアントへ提供するシステムが利用されている。このようなシステムでは、サーバは、データの一部のみが修正された場合であっても、その修正をクライアント側のデータに反映させるために、データの全体をクライアントへ送信していた。   Conventionally, various types of data such as XML (extensible markup language) and HTML (hyper text markup language), which are structured documents composed of one or more elements, are provided from the server to the client. System is used. In such a system, even if only a part of the data is corrected, the server transmits the entire data to the client in order to reflect the correction in the data on the client side.

しかしながら、上述したように、サーバがデータの全体をクライアントへ送信すると、データ量が大きい場合には、通信ネットワークの混雑を引き起こす可能性がある。また、データの転送時間が長くなることにより、クライアント側でデータの更新が終了するまでに、サーバとクライアントとの間でデータの不一致期間が長くなるという問題がある。   However, as described above, if the server transmits the entire data to the client, the communication network may be congested if the amount of data is large. Further, since the data transfer time becomes long, there is a problem that the data mismatch period between the server and the client becomes long before the data update is completed on the client side.

このため、できるだけ少ないデータ量でクライアント側のデータの更新が可能になるようなデータ更新方法が要求されている。特に、情報の共有を容易にするデータ形式であるXML形式のデータの更新について、更新前のデータと更新後のデータとの間に関連性がない場合(例えばファイル名が異なる場合)には、サーバは、データの全体をクライアントへ送信せざるを得なかったため、かかる要求が高まっている。   For this reason, there is a demand for a data update method that allows the client side data to be updated with as little data as possible. In particular, when updating data in XML format, which is a data format that facilitates sharing of information, when there is no relationship between the data before update and the data after update (for example, when the file names are different), This demand is increasing because the server has to send the entire data to the client.

本発明は、このような問題点を解決するものであり、その目的は、できるだけ少ないデータ量でクライアント側の構造化文書データの更新を可能とした構造化文書データ更新方法を提供することにある。   The present invention solves such problems, and an object of the present invention is to provide a structured document data update method that enables updating of structured document data on the client side with as little data as possible. .

本発明の一形態では、サーバからクライアントへ提供される、1又は複数の要素を構造化して構成される構造化文書データを更新する構造化文書データ更新方法が使用される。本方法は、
更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを、更新前後の構造化文書データの階層構造を表す階層情報に基づいて前記サーバにより生成するステップと、
前記生成した差分データを前記クライアントへ送信するステップと、
を有する。
In one aspect of the present invention, a structured document data update method is used that updates structured document data that is structured from one or more elements provided from a server to a client. This method
Generating difference data representing a difference between structured document data before update and structured document data after update by the server based on hierarchical information representing a hierarchical structure of the structured document data before and after the update;
Transmitting the generated difference data to the client;
Have

前記クライアントにおいて、該差分データに基づいて、保有する構造化文書データが更新され、
前記差分データを生成する際、
前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素と該要素の直下の要素とを特定する第1の部品を生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素と該要素の直下の要素とを特定する第2の部品を生成し、
前記第1及び第2の部品の対応付けを行い、
前記対応付けの結果に基づいて、前記差分データを生成し、
差分データが更新後の構造化文書データより小さい場合に、差分データがクライアントに送信される。
In the client, based on the difference data, the structured document data held is updated,
When generating the difference data,
Based on the hierarchical information of the structured document data before the update, a first part that identifies the element constituting the structured document data before the update and the element immediately below the element is generated, and after the update Based on the hierarchical information of the structured document data, a second component that identifies the element constituting the updated structured document data and the element immediately below the element is generated,
Associating the first and second parts;
Based on the result of the association, the difference data is generated,
When the difference data is smaller than the updated structured document data, the difference data is transmitted to the client.

本発明の一形態によれば、少ないデータ量でクライアント側の構造化文書データを更新することができる。   According to one aspect of the present invention, structured document data on the client side can be updated with a small amount of data.

上記の目的を達成するため、本発明の一形態によれば、サーバからクライアントへ提供される、1又は複数の要素を構造化して構成される構造化文書データを更新する構造化文書データ更新方法において、前記サーバは、更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを生成し、前記生成した差分データを前記クライアントへ送信し、前記クライアントは、前記サーバから送信される差分データに基づいて、保有する構造化文書データを更新するようにした。   In order to achieve the above object, according to one aspect of the present invention, a structured document data updating method for updating structured document data configured by structuring one or more elements provided from a server to a client. The server generates difference data representing a difference between the structured document data before update and the structured document data after update, and transmits the generated difference data to the client. The structured document data held is updated based on the difference data transmitted from.

このような構造化文書データ更新方法では、サーバは、クライアントに対して、更新後の構造化文書データの全体を送信するのではなく、更新前の構造化文書データと更新後の構造化文書データとの差分のデータを生成して送信するだけで良い。このため、できるだけ少ないデータ量でクライアント側の構造化文書データを更新することができ、通信ネットワークの混雑を防止するとともに、サーバとクライアントとの間での構造化文書データの不一致期間を短縮することが可能となる。   In such a structured document data update method, the server does not send the entire structured document data after update to the client, but the structured document data before update and the structured document data after update. It is only necessary to generate and transmit the difference data. For this reason, structured document data on the client side can be updated with as little data as possible, preventing congestion of the communication network and shortening the inconsistency period of structured document data between the server and the client. Is possible.

また、上記の目的を達成するため、本発明の一形態によれば、サーバからクライアントへ提供される、1又は複数の要素を構造化して構成される構造化文書データを更新する構造化文書データ更新方法において、前記サーバは、更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを生成し、前記生成した差分データを前記クライアントへ送信し、前記クライアントにおいて、該差分データに基づいて、保有する構造化文書データが更新されるようにした。   In order to achieve the above object, according to one aspect of the present invention, structured document data for updating structured document data configured by structuring one or more elements provided from a server to a client is provided. In the update method, the server generates difference data representing a difference between the structured document data before update and the structured document data after update, and transmits the generated difference data to the client. Based on the difference data, the held structured document data is updated.

このような構造化文書データ更新方法では、上記の一形態に係る発明と同様、サーバは、クライアントに対して、更新後の構造化文書データの全体を送信するのではなく、更新前の構造化文書データと更新後の構造化文書データとの差分のデータを生成して送信するだけで良い。このため、できるだけ少ないデータ量でクライアント側の構造化文書データを更新することができ、通信ネットワークの混雑を防止するとともに、サーバとクライアントとの間での構造化文書データの不一致期間を短縮することが可能となる。   In such a structured document data update method, the server does not transmit the entire structured document data after update to the client, but the structured document before update, as in the invention according to the above aspect. It is only necessary to generate and transmit difference data between the document data and the updated structured document data. For this reason, structured document data on the client side can be updated with as little data as possible, preventing congestion of the communication network and shortening the inconsistency period of structured document data between the server and the client. Is possible.

また、本発明の一形態によれば、前記構造化文書データ更新方法において、更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを生成する際に、前記更新前及び更新後の構造化文書データの階層構造を表す階層情報に基づいて生成するようにした。   Further, according to one aspect of the present invention, in the structured document data update method, when the difference data representing the difference between the structured document data before the update and the structured document data after the update is generated, the update It was made to generate based on hierarchical information representing the hierarchical structure of structured document data before and after update.

この場合には、更新前及び更新後の構造化文書データの階層構造を表す階層情報に基づいて差分データを生成することにより、更新前の構造化文書データと更新後の構造化文書データとの差分を容易に表すことが可能となる。   In this case, by generating difference data based on the hierarchical information representing the hierarchical structure of the structured document data before and after the update, the structured document data before the update and the structured document data after the update are generated. The difference can be expressed easily.

また、本発明の一形態によれば、前記構造化文書データ更新方法において、前記更新前の構造化文書データの階層情報と、前記更新後の構造化文書データの階層情報とに基づいて、前記更新前及び更新後の構造化文書データを構成する最上位の要素から配下の要素に向けて探索し、異なる要素が存在した場合に、該異なる要素とその配下の要素とを差分とした差分データを生成するようにした。   Further, according to one aspect of the present invention, in the structured document data update method, based on the hierarchical information of the structured document data before the update and the hierarchical information of the structured document data after the update, Search from the highest element constituting the structured document data before and after the update toward the subordinate elements, and when there are different elements, the difference data that makes the difference between the different elements and the subordinate elements Was generated.

この場合には、更新前の構造化文書データと更新後の構造化文書データとの間に異なる要素が存在した場合に、その異なる要素とその配下の要素とを差分とみなして差分データを生成するため、探索に要する時間を短縮し、迅速に差分データを生成することができる。   In this case, if there are different elements between the structured document data before the update and the structured document data after the update, the difference data is generated as a difference between the different elements and the subordinate elements. Therefore, the time required for the search can be shortened and the difference data can be generated quickly.

また、本発明の一形態によれば、前記構造化文書データ更新方法において、前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素を第1の2次元配列に展開するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素を第2の2次元配列に展開し、前記第1の2次元配列の各列と前記第2の2次元配列の各列との一致の度合を検出し、前記一致の度合に基づいて、前記差分データを生成するようにした。   Further, according to one aspect of the present invention, in the structured document data updating method, the elements constituting the structured document data before the update are first set based on the hierarchical information of the structured document data before the update. And the elements constituting the updated structured document data are expanded to a second two-dimensional array based on the hierarchical information of the updated structured document data. The degree of matching between each column of the two-dimensional array and each column of the second two-dimensional array is detected, and the difference data is generated based on the degree of matching.

この場合には、更新前の構造化文書データの階層情報に基づく第1の2次元配列と、更新後の構造化文書データの階層情報に基づく第2の2次元配列との一致の度合に基づいて、差分データを生成することにより、挿入、追加、削除、変更等の対象となる要素の情報のみを差分データに含ませることができ、差分データ内の情報を必要最小限とすることができる。   In this case, based on the degree of coincidence between the first two-dimensional array based on the hierarchical information of the structured document data before update and the second two-dimensional array based on the hierarchical information of the structured document data after update. Thus, by generating the difference data, only the information of the element to be inserted, added, deleted, changed, etc. can be included in the difference data, and the information in the difference data can be minimized. .

また、本発明の一形態によれば、前記構造化文書データ更新方法において、前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素と該要素の直下の要素とを特定する第1の部品を生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素と該要素の直下の要素とを特定する第2の部品を生成し、前記第1及び第2の部品の対応付けを行い、前記対応付けの結果に基づいて、前記差分データを生成するようにした。   Further, according to one aspect of the present invention, in the structured document data update method, the elements constituting the structured document data before the update and the elements based on the hierarchical information of the structured document data before the update Generating a first part that identifies an element immediately below the element, and, based on the hierarchical information of the updated structured document data, the elements constituting the updated structured document data and the elements immediately below the element A second part that identifies an element is generated, the first and second parts are associated, and the difference data is generated based on the result of the association.

この場合には、更新前の構造化文書データの階層情報に基づく部品と、更新後の構造化文書データの階層情報に基づく部品との対応付けの結果に基づいて、差分データを生成することにより、上記一形態に係る発明と同様、挿入、追加、削除、変更等の対象となる要素の情報のみを差分データに含ませることができ、差分データ内の情報を必要最小限とすることができる。   In this case, by generating difference data based on the result of the correspondence between the parts based on the hierarchical information of the structured document data before update and the parts based on the hierarchical information of the structured document data after update As in the invention according to the above aspect, only the information on the elements to be inserted, added, deleted, changed, etc. can be included in the difference data, and the information in the difference data can be minimized. .

また、本発明の一形態によれば、前記構造化文書データ更新方法において、前記更新前の構造化文書データの階層情報に基づいて、更新前の要素の構成パターンを要素がない場合を含め、最上位の要素を除外してて生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、更新後の要素の構成パターンを要素がない場合を含め、最上位の要素を除外して生成し、前記生成した更新前の要素の構成パターンの全てと更新後の要素の構成パターンの全てとを組み合わせ、前記各組み合わせにおいて、更新前の構造化文書を構成するノードから該組み合わせに対応する更新前の要素の構成パターンを削除するとともに、更新後の構造化文書を構成するノードから該組み合わせに対応する更新後の要素の構成パターンを削除し、前記削除後の更新前の構造化文書を構成するノードと更新後の構造化文書を構成するノードとにおいて、一致する要素が最も多い前記組み合わせに基づいて、前記差分データを生成するようにした。   Further, according to one aspect of the present invention, in the structured document data update method, based on the hierarchical information of the structured document data before update, including the case where there is no element in the configuration pattern of the element before update, It is generated by excluding the highest level element, and the highest level element is excluded based on the hierarchical information of the updated structured document data, including the case where there is no element in the configuration pattern of the updated element. All of the generated configuration patterns of the elements before update and all of the configuration patterns of the elements after update are combined, and each combination corresponds to the combination from the nodes constituting the structured document before update. Delete the configuration pattern of the element before updating, delete the configuration pattern of the updated element corresponding to the combination from the nodes constituting the updated structured document, and In the nodes constituting the structured document after updating the nodes constituting the structured document before updating after removal, based on the most frequently the combination matching elements, and to generate the differential data.

この場合には、更新前と更新後で一致しない要素の組み合わせを容易に特定することができ、この組み合わせに基づいて、差分データを生成することにより、上記一形態に係る発明と同様、挿入、追加、削除、変更等の対象となる要素の情報のみを差分データに含ませることができ、差分データ内の情報を必要最小限とすることができる。   In this case, it is possible to easily identify a combination of elements that do not match before and after the update, and by generating difference data based on this combination, as in the invention according to the above aspect, Only the information on the elements to be added, deleted, changed, etc. can be included in the difference data, and the information in the difference data can be minimized.

なお、要素の構成パターンとは、構造化文書データを構成する要素に要素なしを含め、最上位の要素を除外したものを1個乃至最大個数選択することによって得られる全ての組み合わせを指す。   The element configuration pattern refers to all combinations obtained by selecting one to the maximum number of elements constituting the structured document data including no element and excluding the highest element.

また、本発明の一形態によれば、前記構造化文書データ更新方法において、前記構造化文書はXMLデータであり、前記差分データはXSLT(extensible stylesheets language transformations)データであり、前記階層情報はDOM(document object model )ツリーであるようにした。   According to another aspect of the present invention, in the structured document data update method, the structured document is XML data, the difference data is XSLT (extensible stylesheets language transformations) data, and the hierarchical information is DOM. (Document object model) tree.

構造化文書データがXMLデータの場合、更新前のXMLデータと更新後のXMLデータの差分は、XSLTデータにより表すことができる。また、DOMツリーは、XMLデータの階層構造を表す情報として標準的に用いられている。従って、このDOMツリーを利用して差分データであるXSLTデータを生成することにより、新たにXMLデータの階層構造を表す階層情報を定める必要がなく、本発明の汎用的な利用が可能となる。   When the structured document data is XML data, the difference between the XML data before update and the XML data after update can be expressed by XSLT data. The DOM tree is standardly used as information representing the hierarchical structure of XML data. Therefore, by generating XSLT data as differential data using this DOM tree, it is not necessary to newly define hierarchical information representing the hierarchical structure of the XML data, and the general use of the present invention becomes possible.

また、上記の目的を達成するため、本発明の一形態によれば、クライアントへ1又は複数の要素を構造化して構成される構造化文書データを提供する情報提供サーバにおいて、更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを生成する差分データ生成手段と、前記生成された差分データを前記クライアントへ送信する差分データ送信手段とを備える。   In order to achieve the above object, according to an aspect of the present invention, in an information providing server that provides structured document data configured by structuring one or more elements to a client, the structured before update Difference data generating means for generating difference data representing the difference between the document data and the updated structured document data, and difference data transmitting means for transmitting the generated difference data to the client.

このような情報提供サーバは、クライアントに対して、更新後の構造化文書データの全体を送信するのではなく、更新前の構造化文書データと更新後の構造化文書データとの差分のデータを生成して送信するだけで良い。このため、できるだけ少ないデータ量でクライアント側の構造化文書データを更新することができ、通信ネットワークの混雑を防止するとともに、サーバとクライアントとの間での構造化文書データの不一致期間を短縮することが可能となる。   Such an information providing server does not send the entire structured document data after update to the client, but instead stores the difference data between the structured document data before the update and the structured document data after the update. Just generate and send. For this reason, structured document data on the client side can be updated with as little data as possible, preventing congestion of the communication network and shortening the inconsistency period of structured document data between the server and the client. Is possible.

また、本発明の一形態によれば、前記情報提供サーバにおいて、前記差分データ生成手段は、前記更新前及び更新後の構造化文書データの階層構造を表す階層情報に基づいて前記差分データを生成するようにした。   In the information providing server, the difference data generation unit generates the difference data based on hierarchical information representing a hierarchical structure of the structured document data before and after the update. I tried to do it.

この場合には、更新前及び更新後の構造化文書データの階層構造を表す階層情報に基づいて差分データを生成することにより、更新前の構造化文書データと更新後の構造化文書データとの差分を容易に表すことが可能となる。   In this case, by generating difference data based on the hierarchical information representing the hierarchical structure of the structured document data before and after the update, the structured document data before the update and the structured document data after the update are generated. The difference can be expressed easily.

また、本発明の一形態によれば、前記情報提供サーバにおいて、前記差分データ生成手段は、前記更新前の構造化文書データの階層情報と、前記更新後の構造化文書データの階層情報とに基づいて、前記更新前及び更新後の構造化文書データを構成する最上位の要素から配下の要素に向けて探索し、異なる要素が存在した場合に、該異なる要素とその配下の要素とを差分とした差分データを生成するようにした。   Further, according to one aspect of the present invention, in the information providing server, the difference data generation means includes hierarchical information of the structured document data before the update and hierarchical information of the structured document data after the update. Based on the search from the highest element constituting the structured document data before and after the update toward the subordinate element, and when there is a different element, the difference between the different element and the subordinate element is determined. The difference data is now generated.

この場合には、更新前の構造化文書データと更新後の構造化文書データとの間に異なる要素が存在した場合に、その異なる要素とその配下の要素とを差分とみなして差分データを生成するため、探索に要する時間を短縮し、迅速に差分データを生成することができる。   In this case, if there are different elements between the structured document data before the update and the structured document data after the update, the difference data is generated as a difference between the different elements and the subordinate elements. Therefore, the time required for the search can be shortened and the difference data can be generated quickly.

また、本発明の一形態によれば、前記情報提供サーバにおいて、前記差分データ生成手段は、前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素を第1の2次元配列に展開するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素を第2の2次元配列に展開し、前記第1の2次元配列の各列と前記第2の2次元配列の各列との一致の度合を検出し、前記一致の度合に基づいて、前記差分データを生成するようにした。   Also, according to one aspect of the present invention, in the information providing server, the difference data generating means configures the structured document data before update based on the hierarchical information of the structured document data before update. The elements are expanded into the first two-dimensional array, and the elements constituting the updated structured document data are expanded into the second two-dimensional array based on the hierarchical information of the updated structured document data. The degree of matching between each column of the first two-dimensional array and each column of the second two-dimensional array is detected, and the difference data is generated based on the degree of matching.

この場合には、更新前の構造化文書データの階層情報に基づく第1の2次元配列と、更新後の構造化文書データの階層情報に基づく第2の2次元配列との一致の度合に基づいて、差分データを生成することにより、挿入、追加、削除、変更等の対象となる要素の情報のみを差分データに含ませることができ、差分データ内の情報を必要最小限とすることができる。   In this case, based on the degree of coincidence between the first two-dimensional array based on the hierarchical information of the structured document data before update and the second two-dimensional array based on the hierarchical information of the structured document data after update. Thus, by generating the difference data, only the information of the element to be inserted, added, deleted, changed, etc. can be included in the difference data, and the information in the difference data can be minimized. .

また、本発明の一形態によれば、前記情報提供サーバにおいて、前記差分データ生成手段は、前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素と該要素の直下の要素とを特定する第1の部品を生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素と該要素の直下の要素とを特定する第2の部品を生成し、前記第1及び第2の部品の対応付けを行い、前記対応付けの結果に基づいて、前記差分データを生成するようにした。   Also, according to one aspect of the present invention, in the information providing server, the difference data generating means configures the structured document data before update based on the hierarchical information of the structured document data before update. Generating a first part that identifies an element and an element immediately below the element, and configuring the updated structured document data based on the hierarchical information of the updated structured document data; and A second part that identifies an element immediately below the element is generated, the first and second parts are associated, and the difference data is generated based on the result of the association.

この場合には、更新前の構造化文書データの階層情報に基づく部品と、更新後の構造化文書データの階層情報に基づく部品との対応付けの結果に基づいて、差分データを生成することにより、上記一形態に係る発明と同様、挿入、追加、削除、変更等の対象となる要素の情報のみを差分データに含ませることができ、差分データ内の情報を必要最小限とすることができる。   In this case, by generating difference data based on the result of the correspondence between the parts based on the hierarchical information of the structured document data before update and the parts based on the hierarchical information of the structured document data after update As in the invention according to the above aspect, only the information on the elements to be inserted, added, deleted, changed, etc. can be included in the difference data, and the information in the difference data can be minimized. .

また、本発明の一形態によれば、前記情報提供サーバにおいて、前記差分データ生成手段は、前記更新前の構造化文書データの階層情報に基づいて、更新前の要素の構成パターンを要素がない場合を含め、最上位の要素を除外してて生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、更新後の要素の構成パターンを要素がない場合を含め、最上位の要素を除外して生成し、前記生成した更新前の要素の構成パターンの全てと更新後の要素の構成パターンの全てとを組み合わせ、前記各組み合わせにおいて、更新前の構造化文書を構成するノードから該組み合わせに対応する更新前の要素の構成パターンを削除するとともに、更新後の構造化文書を構成するノードから該組み合わせに対応する更新後の要素の構成パターンを削除し、前記削除後の更新前の構造化文書を構成するノードと更新後の構造化文書を構成するノードとにおいて、一致する要素が最も多い前記組み合わせに基づいて、前記差分データを生成するようにした。   According to an aspect of the present invention, in the information providing server, the difference data generation unit has no element in a configuration pattern of elements before update based on hierarchical information of the structured document data before update. Including the case, the top-level element is excluded and generated, and the configuration pattern of the updated element based on the hierarchical information of the updated structured document data is included, including the case where there is no element. Generated by excluding elements, combining all of the generated element configuration patterns before update and all of the element configuration patterns after update, and in each combination from the nodes constituting the structured document before update The configuration pattern of the element after the update corresponding to the combination is deleted from the configuration pattern of the element before the update corresponding to the combination and the node constituting the structured document after the update. And the difference data is generated based on the combination having the most matching elements in the node constituting the structured document before update after the deletion and the node constituting the structured document after update. I did it.

この場合には、更新前と更新後で一致しない要素の組み合わせを容易に特定することができ、この組み合わせに基づいて、差分データを生成することにより、上記一形態に係る発明と同様、挿入、追加、削除、変更等の対象となる要素の情報のみを差分データに含ませることができ、差分データ内の情報を必要最小限とすることができる。   In this case, it is possible to easily identify a combination of elements that do not match before and after the update, and by generating difference data based on this combination, as in the invention according to the above aspect, Only the information on the elements to be added, deleted, changed, etc. can be included in the difference data, and the information in the difference data can be minimized.

また、本発明の一形態によれば、前記情報提供サーバにおいて、前記構造化文書はXMLデータであり、前記差分データはXSLTデータであり、前記階層情報はDOMツリーであるようにした。   In the information providing server, the structured document is XML data, the difference data is XSLT data, and the hierarchy information is a DOM tree.

構造化文書データがXMLデータの場合、更新前のXMLデータと更新後のXMLデータの差分は、XSLTデータにより表すことができる。また、DOMツリーは、XMLデータの階層構造を表す情報として標準的に用いられている。従って、このDOMツリーを利用して差分データであるXSLTデータを生成することにより、新たにXMLデータの階層構造を表す階層情報を定める必要がなく、本発明の汎用的な利用が可能となる。   When the structured document data is XML data, the difference between the XML data before update and the XML data after update can be expressed by XSLT data. The DOM tree is standardly used as information representing the hierarchical structure of XML data. Therefore, by generating XSLT data as differential data using this DOM tree, it is not necessary to newly define hierarchical information representing the hierarchical structure of the XML data, and the general use of the present invention becomes possible.

以下、本発明の実施の形態を図面に基づいて説明する。図1は、本発明が適用されるXMLデータ更新システムの構成例を示す図である。同図に示すXMLデータ更新システム1は、提供対象のコンテンツである、1又は複数の要素(ノード)によって構成される構造化文書としてのXMLデータの保持及び公開を行うとともに、XMLデータの更新の際に、更新前のXMLデータと更新後のXMLデータとの差分の検出と差分データとしてのXSLTデータの生成を行うオリジンサーバ10と、該オリジンサーバ10からXMLデータの提供を受けるクライアントとしての移動機30と、これらオリジンサーバ10と移動機30とを接続する通信ネットワークとしてのインターネット40により構成される。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a diagram showing a configuration example of an XML data update system to which the present invention is applied. The XML data update system 1 shown in FIG. 1 holds and releases XML data as a structured document composed of one or a plurality of elements (nodes), which is a content to be provided, and updates XML data. In this case, the origin server 10 that detects the difference between the XML data before the update and the XML data after the update, and generates the XSLT data as the difference data, and the movement as the client that receives the provision of the XML data from the origin server 10 And the Internet 40 as a communication network connecting the origin server 10 and the mobile device 30.

このXMLデータ更新システム1では、移動機30に提供されるXMLデータが更新される際、オリジンサーバ10は、更新前のXMLデータと更新後のXMLデータとの差分を表す差分データとしてのXSLTデータを生成し、移動機30へ送信する。移動機30は、このXSLTデータに基づいて、保持している更新前のXMLデータを更新し、更新後のXMLデータを保持する。   In the XML data update system 1, when the XML data provided to the mobile device 30 is updated, the origin server 10 causes the XSLT data as difference data representing the difference between the XML data before the update and the XML data after the update. Is generated and transmitted to the mobile device 30. Based on the XSLT data, the mobile device 30 updates the pre-update XML data and holds the updated XML data.

図2は、オリジンサーバ10の詳細な構成例である。同図に示すオリジンサーバ10は、コンテンツであるXMLデータの登録処理、クライアントである移動機30に対するXMLデータの配信処理、及びXMLデータが更新された場合に更新前のXMLデータと更新後のXMLデータとの差分を表すXSLTデータを生成し、移動機30へ提供する処理を行う。   FIG. 2 is a detailed configuration example of the origin server 10. The origin server 10 shown in the figure includes a process for registering XML data as content, a process for distributing XML data to the mobile device 30 as a client, and an XML data before update and an XML after update when the XML data is updated. XSLT data representing a difference from the data is generated and provided to the mobile device 30.

このオリジンサーバ10は、ネットワークインタフェース部11、プロトコル部12、コンテンツ登録サーバ部13、コンテンツ保存部14、Webサーバ部15、更新検出部16、差分生成部17及びプッシュメッセージ作成部18を備える。   The origin server 10 includes a network interface unit 11, a protocol unit 12, a content registration server unit 13, a content storage unit 14, a Web server unit 15, an update detection unit 16, a difference generation unit 17, and a push message creation unit 18.

図3は、移動機30の詳細な構成例である。同図に示す移動機30は、オリジンサーバ10からのXMLデータの取得処理と、オリジンサーバ10からのXSLTデータに基づくXMLデータの更新処理とを行う。   FIG. 3 is a detailed configuration example of the mobile device 30. The mobile device 30 shown in the figure performs processing for acquiring XML data from the origin server 10 and processing for updating XML data based on the XSLT data from the origin server 10.

この移動機30は、リクエスト作成部31、プロトコル部32、ネットワークインタフェース部33、コンテンツ制御部34及びコンテンツ保存部35を備える。   The mobile device 30 includes a request creation unit 31, a protocol unit 32, a network interface unit 33, a content control unit 34, and a content storage unit 35.

XMLデータの登録処理は、外部装置(図示せず)がオリジンサーバ10に対してXMLデータを送信することが契機となる。具体的には、外部装置は、例えばファイル転送プロトコルであるFTP(file transfer protocol)により、インターネット40、オリジンサーバ10内のネットワークインタフェース部11及びプロトコル部12を介してコンテンツ登録サーバ部13にアクセスする。   The registration process of XML data is triggered when an external device (not shown) transmits XML data to the origin server 10. Specifically, the external device accesses the content registration server unit 13 via the Internet 40, the network interface unit 11 and the protocol unit 12 in the origin server 10 by, for example, FTP (file transfer protocol) which is a file transfer protocol. .

プロトコル部12は、パケットを取得すると、XMLデータを復原してコンテンツ登録サーバ13へ出力する。コンテンツ登録サーバ部13は、XMLデータを登録するためのFTPサーバアプリケーションによってXMLデータを受信し、外部装置からXMLデータが送信される毎に、そのXMLデータをコンテンツ保存部14に登録する。   When acquiring the packet, the protocol unit 12 restores the XML data and outputs it to the content registration server 13. The content registration server unit 13 receives XML data by an FTP server application for registering XML data, and registers the XML data in the content storage unit 14 each time XML data is transmitted from an external device.

なお、コンテンツ保存部14にあるXMLデータが既に登録されている場合に、更に、外部装置がそのXMLデータを更新したXMLデータを送信した場合には、コンテンツ登録サーバ部13は、既に登録されているXMLデータを削除や上書きすることなく、更新したXMLデータを登録するようにする。また、XMLデータが複数回更新された場合には、コンテンツ登録サーバ部13は、最新のXMLデータを新たに登録する。更新された古いXMLデータの保存数は予め決められており、この数を超えた場合には、古いXMLデータから順に削除される。従って、コンテンツ保存部14には、更新前のXMLデータと、更新後のXMLデータの双方が登録されることになる。   If the XML data in the content storage unit 14 is already registered, and if the external device transmits XML data that updates the XML data, the content registration server unit 13 is already registered. The updated XML data is registered without deleting or overwriting the existing XML data. When the XML data is updated a plurality of times, the content registration server unit 13 newly registers the latest XML data. The number of saved updated old XML data is determined in advance, and when this number is exceeded, the old XML data is deleted in order. Therefore, both the pre-update XML data and the post-update XML data are registered in the content storage unit 14.

また、コンテンツ登録サーバ部13は、登録したXMLデータに対応する履歴ファイルを生成し、XMLデータに対応付けてコンテンツ保存部14に登録する。図4は、履歴ファイルの一例を示す図である。同図に示す履歴ファイルは、対応するXMLデータの登録日時、データ名及び対応するURL(uniform resource locator)により構成される。これらの情報のうち、登録日時は、更新したXMLデータが登録される毎に、書き換えられる。   Further, the content registration server unit 13 generates a history file corresponding to the registered XML data and registers it in the content storage unit 14 in association with the XML data. FIG. 4 is a diagram illustrating an example of a history file. The history file shown in the figure is composed of the registration date and time of the corresponding XML data, the data name, and the corresponding URL (uniform resource locator). Of these pieces of information, the registration date and time is rewritten every time the updated XML data is registered.

オリジンサーバ10によるXMLデータの配信処理及び移動機30によるXMLデータの取得処理は、移動機30がオリジンサーバ10に対してXMLデータを取得することができるプロトコルを用いてメッセージ取得のためのリクエストを送信することが契機となる。具体的には、移動機30内のリクエスト作成部31は、プロトコル部32、ネットワークインタフェース部33、インターネット40、オリジンサーバ10内のネットワークインタフェース部11及びプロトコル部12を介してWebサーバ部15にアクセスし、HTTPリクエストを作成して出力する。このHTTPリクエストは、プロトコル部32によって通信プロトコルに応じたパケットに分割され、ネットワークインタフェース33及びインターネット40を介してオリジンサーバ10へ送信される。   The XML data distribution process by the origin server 10 and the XML data acquisition process by the mobile device 30 are requests for message acquisition using a protocol that allows the mobile device 30 to acquire XML data from the origin server 10. Sending is an opportunity. Specifically, the request creation unit 31 in the mobile device 30 accesses the Web server unit 15 via the protocol unit 32, the network interface unit 33, the Internet 40, the network interface unit 11 and the protocol unit 12 in the origin server 10. Then, an HTTP request is created and output. The HTTP request is divided into packets according to the communication protocol by the protocol unit 32 and transmitted to the origin server 10 via the network interface 33 and the Internet 40.

オリジンサーバ10内のプロトコル部12は、ネットワークインタフェース部11を介して、このパケットを取得すると、HTTPリクエストを復原してWebサーバ部15へ出力する。   When the protocol unit 12 in the origin server 10 acquires this packet via the network interface unit 11, it restores the HTTP request and outputs it to the Web server unit 15.

Webサーバ部15は、HTTPリクエストを取得すると、XMLデータを配信するためのHTTPサーバアプリケーション等を起動して、HTTPリクエスト内のURLを抽出し、更に移動機30が差分データの転送要求を行っているか否かを判定する。次に、Webサーバ部15は、コンテンツ保存部14に登録されている履歴ファイルを検索する。もし、その履歴ファイルの登録日時が差分データの転送要求メッセージに含まれる、移動機キャッシュデータの登録日時よりも新しい日時であった場合には、XMLデータが更新されたということであるから、Webサーバ部15は、差分生成部17に対してXSLTデータの生成を要求する。   When acquiring the HTTP request, the Web server unit 15 activates an HTTP server application or the like for distributing XML data, extracts a URL in the HTTP request, and the mobile device 30 makes a transfer request for difference data. It is determined whether or not. Next, the Web server unit 15 searches for a history file registered in the content storage unit 14. If the registration date / time of the history file is newer than the registration date / time of the mobile device cache data included in the difference data transfer request message, it means that the XML data has been updated. The server unit 15 requests the difference generation unit 17 to generate XSLT data.

差分生成部17は、移動機キャッシュデータの登録日時に対応する古いXMLデータと更新後のXMLデータとの差分に応じたXSLTデータを生成する。次に、差分生成部17は、その生成したXSLTデータをWebサーバ部15へ送る。Webサーバ部15は、差分生成部17から受信したXSLTデータをHTTPリプライに包含して出力する。もし、差分生成部17がXSLTデータの生成を失敗した場合には、更新後のXMLデータをコンテンツ保存部14から読み出し、XSLTデータでなく、この更新後のXMLデータをHTTPリプライに包含して出力する。   The difference generation unit 17 generates XSLT data corresponding to the difference between the old XML data corresponding to the registration date and time of the mobile device cache data and the updated XML data. Next, the difference generation unit 17 sends the generated XSLT data to the Web server unit 15. The Web server unit 15 includes the XSLT data received from the difference generation unit 17 in an HTTP reply and outputs the data. If the difference generation unit 17 fails to generate the XSLT data, the updated XML data is read from the content storage unit 14 and the updated XML data is included in the HTTP reply instead of the XSLT data. To do.

なお、XSLTデータのサイズが更新後のXMLデータのサイズよりも大きくなる場合が稀にあり得る。このため、差分生成部17は、生成したXSLTデータのサイズと更新後のXMLデータのサイズとを比較し、XSLTデータのサイズのほうが大きい場合には、更新後のXMLデータをプッシュメッセージ作成部18へ出力する。   In some rare cases, the size of the XSLT data becomes larger than the size of the updated XML data. For this reason, the difference generation unit 17 compares the size of the generated XSLT data with the size of the updated XML data. If the size of the XSLT data is larger, the difference generation unit 17 uses the updated XML data as the push message creation unit 18. Output to.

プロトコル部12は、Webサーバ部15によって出力されたXMLデータを含むHTTPリプライを通信プロトコルに応じたパケットに分割し、ネットワークインタフェース部11及びインターネット40を介して移動機30へ送信する。   The protocol unit 12 divides the HTTP reply including the XML data output by the Web server unit 15 into packets according to the communication protocol, and transmits the packets to the mobile device 30 via the network interface unit 11 and the Internet 40.

移動機30内のプロトコル部32は、このパケットを受信すると、XMLデータを復原し、コンテンツ制御部34へ出力する。コンテンツ制御部34は、取得したXMLデータをコンテンツ保存部35に格納する。   Upon receiving this packet, the protocol unit 32 in the mobile device 30 restores the XML data and outputs it to the content control unit 34. The content control unit 34 stores the acquired XML data in the content storage unit 35.

また、オリジンサーバ10内の更新検出部16は、逐次、コンテンツ保存部14に登録されているXMLデータが更新されたか否かを判定する。具体的には、更新検出部16は、履歴ファイルの登録日時が更新されたか否かを判定し、更新された場合には、その履歴ファイルに対応するXMLデータが更新されたものと判断する。   Further, the update detection unit 16 in the origin server 10 sequentially determines whether or not the XML data registered in the content storage unit 14 has been updated. Specifically, the update detection unit 16 determines whether or not the registration date and time of the history file has been updated, and if updated, determines that the XML data corresponding to the history file has been updated.

XMLデータが更新されている場合には、更新検出部16は、更新前のXMLデータと更新後のXMLデータとをコンテンツ保存部14から読み出して差分生成部17へ出力する。   If the XML data has been updated, the update detection unit 16 reads the pre-update XML data and the post-update XML data from the content storage unit 14 and outputs them to the difference generation unit 17.

差分生成部17は、入力した更新前のXMLデータと更新後のXMLデータとの差分を表すXSLTデータを生成する。XSLTデータの詳細な生成方法は、後述する。差分生成部17は、生成したプッシュメッセージ作成部18へ出力する。   The difference generation unit 17 generates XSLT data representing the difference between the input pre-update XML data and the post-update XML data. A detailed method for generating the XSLT data will be described later. The difference generation unit 17 outputs the generated push message generation unit 18.

なお、XSLTデータのサイズが更新後のXMLデータのサイズよりも大きくなる場合が稀にあり得る。このため、差分生成部17は、生成したXSLTデータのサイズと更新後のXMLデータのサイズとを比較し、XSLTデータのサイズのほうが大きい場合には、更新後のXMLデータをプッシュメッセージ作成部18へ出力する。   In some rare cases, the size of the XSLT data becomes larger than the size of the updated XML data. For this reason, the difference generation unit 17 compares the size of the generated XSLT data with the size of the updated XML data. If the size of the XSLT data is larger, the difference generation unit 17 uses the updated XML data as the push message creation unit 18. Output to.

プッシュメッセージ作成部18は、入力したXSLTデータあるいは更新後のXMLデータを包含したプッシュメッセージを作成し、出力する。このプッシュメッセージは、プロトコル部12によって通信プロトコルに応じたパケットに分割され、ネットワークインタフェース11及びインターネット40を介して移動機30へ送信される。   The push message creation unit 18 creates and outputs a push message including the input XSLT data or the updated XML data. The push message is divided into packets corresponding to the communication protocol by the protocol unit 12 and transmitted to the mobile device 30 via the network interface 11 and the Internet 40.

移動機30内のプロトコル部32は、このパケットを受信すると、プッシュメッセージを復原し、コンテンツ更新部34へ出力する。コンテンツ更新部34は、取得したプッシュメッセージに基づいて、コンテンツ保存部35に格納されているXMLデータを更新する。   When the protocol unit 32 in the mobile device 30 receives this packet, it restores the push message and outputs it to the content update unit 34. The content update unit 34 updates the XML data stored in the content storage unit 35 based on the acquired push message.

次に、差分生成部17によるXSLTデータの詳細な生成方法を説明する。図5は、更新前のXMLデータのDOMツリー及び更新後のXMLデータのDOMツリーの一例を示す図である。同図に示すDOMツリー100は、更新前のXMLデータの階層構造を表す。同様に、DOMツリー200は、更新後のXMLデータの階層構造を表す。   Next, a detailed generation method of the XSLT data by the difference generation unit 17 will be described. FIG. 5 is a diagram illustrating an example of a DOM tree of XML data before update and a DOM tree of XML data after update. A DOM tree 100 shown in the figure represents a hierarchical structure of XML data before update. Similarly, the DOM tree 200 represents the hierarchical structure of the updated XML data.

更新前のXMLデータのDOMツリー(以下「更新前DOMツリー」と称する)100内の各ノード(ノードA〜ノードJ)と、更新後のXMLデータのDOMツリー(以下「更新後DOMツリー」と称する)200内の各ノード(ノードA、C、E、F、G、H、I、J、1〜5)は、ルートノードであるノードAからの経路(XPath)と、直上のノード(親ノード)の配下に存在する全てのノード(子ノード)内における順位により特定される。子ノード内における順位は、XMLデータにおける子ノード間の記述順を示す。   Each node (node A to node J) in the DOM tree (hereinafter referred to as “pre-update DOM tree”) 100 of the XML data before update and the DOM tree (hereinafter referred to as “post-update DOM tree”) of the XML data after update. Each node (node A, C, E, F, G, H, I, J, 1 to 5) in 200 is a route (XPath) from the root node, node A, and a node (parent) It is specified by the rank in all nodes (child nodes) existing under the node. The rank in the child node indicates the description order between the child nodes in the XML data.

例えば、更新前DOMツリー100のノードHは、XPath=A/C/F/Hと、ノードFを親ノードとする子ノード(ノードH、I)内における順位(1番目)により特定される。   For example, the node H of the pre-update DOM tree 100 is specified by XPath = A / C / F / H and the rank (first) in the child nodes (nodes H and I) having the node F as a parent node.

差分生成部17は、更新前DOMツリー100と更新後DOMツリー200とを比較したときに、各ノードについてXPath及び子ノード内の順位が異なっている場合には、XSLTデータにその旨の情報を含ませる必要がある。   When the difference generation unit 17 compares the pre-update DOM tree 100 with the post-update DOM tree 200 and the ranks in the XPath and child nodes are different for each node, the difference generation unit 17 adds information to that effect to the XSLT data. Must be included.

以下、第1実施例乃至第3実施例においては、図5に示す更新前DOMツリー100及び更新後DOMツリー200を例に説明する。
(第1実施例)
まず、更新前のXMLデータのDOMツリーと更新後のXMLデータのDOMツリーとを、ルートノードから配下のノードに向けて探索し、異なるノードが存在した場合に、当該異なるノードとその配下のサブツリー(部分木)とを差分としたXSLTデータを生成する方法(第1のXSLTデータ生成方法)について説明する。
Hereinafter, in the first to third embodiments, the pre-update DOM tree 100 and the post-update DOM tree 200 illustrated in FIG. 5 will be described as examples.
(First embodiment)
First, the DOM tree of the XML data before update and the DOM tree of the XML data after update are searched from the root node toward the subordinate nodes, and when different nodes exist, the different nodes and subtrees under the subordinate nodes are searched. A method (first XSLT data generation method) for generating XSLT data using (partial tree) as a difference will be described.

第1のXSLTデータ生成方法では、差分生成部17は、更新前DOMツリーのルートノードから配下のノードに向けて探索するとともに、更新後DOMツリーのルートノードから配下のノードに向けて探索し、差異のあるノードを認識する。   In the first XSLT data generation method, the difference generation unit 17 searches from the root node of the pre-update DOM tree toward the subordinate node, and searches from the root node of the post-update DOM tree toward the subordinate node, Recognize different nodes.

ここでは、差分生成部17は、変更前DOMツリー100を基準として探索すると、ノードBとその配下のサブツリーが削除されたことを認識する。また、差分生成部17は、ノードDとその配下のサブツリーが削除され、ノードFとその配下のサブツリーが削除されたことを認識する。   Here, when the difference generation unit 17 searches based on the pre-change DOM tree 100, the difference generation unit 17 recognizes that the node B and its subtree are deleted. Also, the difference generation unit 17 recognizes that the node D and its subtree are deleted, and the node F and its subtree are deleted.

一方、差分生成部17は、変更後DOMツリー200を基準として探索すると、ノード1とその配下のサブツリーが追加され、当該ノード1の追加位置がノードAの第1子ノードであることを認識する。また、差分生成部17は、ノード2とその配下のサブツリーが追加され、当該ノード2の追加位置がノードAの第2子ノードであること、及び、ノード5とその配下のサブツリーが追加され、当該ノード5の追加位置がノードCの第1子ノードであることを認識する。   On the other hand, when searching for the changed DOM tree 200 as a reference, the difference generation unit 17 recognizes that the node 1 and its subtree are added, and the added position of the node 1 is the first child node of the node A. . Further, the difference generation unit 17 adds the node 2 and its subtree, the node 2 is added at the second child node of the node A, and the node 5 and its subtree are added. It recognizes that the additional position of the node 5 is the first child node of the node C.

次に、差分生成部17は、上述した削除されたノード及び追加されたノードの情報を用いて、差分情報としてのXSLTデータを生成する。   Next, the difference generation unit 17 generates XSLT data as difference information using the information of the deleted node and the added node described above.

具体的には、差分生成部17は、更新前DOMツリー100のノードBのXPathがA/Bであり、当該ノードBとその配下のサブツリーが削除されたことを示すXSLTデータを生成する。同様に、差分生成部17は、更新前DOMツリー100のノードDのXPathがA/Dであり、当該ノードDが削除されたこと、及び、更新前DOMツリー100のノードFのXPathがA/C/Fであり、当該ノードFが削除されたことを示すXSLTデータを生成する。   Specifically, the difference generation unit 17 generates XSLT data indicating that the XPath of the node B of the pre-update DOM tree 100 is A / B, and that the node B and its subtree are deleted. Similarly, the difference generation unit 17 determines that the XPath of the node D in the pre-update DOM tree 100 is A / D, the node D is deleted, and the XPath of the node F in the pre-update DOM tree 100 is A / D. XSLT data indicating that the node F has been deleted is generated.

また、差分生成部17は、更新後DOMツリー200のノード1のXPathがA/1であり、当該ノード1とその配下のサブツリーが追加されたことを示すXSLTデータを生成する。同様に、差分生成部17は、更新後DOMツリー200のノード2のXPathがA/2であり、当該ノード2が追加されたこと、及び、更新後DOMツリー200のノード5のXPathがA/C/5であり、当該ノード5が追加されたことを示すXSLTデータを生成する。   Further, the difference generation unit 17 generates XSLT data indicating that the XPath of the node 1 of the updated DOM tree 200 is A / 1 and that the node 1 and its subtree are added. Similarly, the difference generation unit 17 indicates that the XPath of the node 2 of the updated DOM tree 200 is A / 2, the node 2 is added, and the XPath of the node 5 of the updated DOM tree 200 is A / XSLT data indicating that the node 5 has been added is generated.

上述した第1のXSLTデータ生成方法を採用する場合には、更新前のXMLデータのDOMツリーと更新後のXMLデータのDOMツリーとの間に異なるノードが存在した場合に、その異なるノードとその配下の全てのノードとを差分とみなしてXSLTデータが生成されるため、探索に要する時間を短縮し、迅速にXSLTデータを生成することができる。
(第2実施例)
次に、更新前のXMLデータのDOMツリーを第1の2次元配列に展開するとともに、更新後のXMLデータのDOMツリーを第2の2次元配列に展開し、これら第1及び第2の2次元配列の各列の一致の度合に基づいて、XSLTデータを生成する方法(第2のXSLTデータ生成方法)について説明する。
When the above-described first XSLT data generation method is adopted, when different nodes exist between the DOM tree of the XML data before update and the DOM tree of the XML data after update, the different nodes and Since the XSLT data is generated by regarding all the subordinate nodes as differences, the time required for the search can be reduced and the XSLT data can be generated quickly.
(Second embodiment)
Next, the DOM tree of the XML data before update is expanded into a first two-dimensional array, and the DOM tree of the XML data after update is expanded into a second two-dimensional array, and the first and second 2 A method of generating XSLT data (second XSLT data generation method) based on the degree of matching of each column of the dimension array will be described.

第2のXSLTデータ生成方法では、差分生成部17は、更新前DOMツリー100を2次元配列(以下「更新前2次元配列」と称する)に展開するとともに、更新後DOMツリー200を2次元配列(以下「更新後2次元配列」と称する)に展開する。   In the second XSLT data generation method, the difference generation unit 17 expands the pre-update DOM tree 100 into a two-dimensional array (hereinafter referred to as “two-dimensional array before update”) and also displays the post-update DOM tree 200 in a two-dimensional array. (Hereinafter referred to as “updated two-dimensional array”).

図6は、DOMツリーの展開により得られる2次元配列の一例を示す図である。同図に示す更新前2次元配列101と更新後2次元配列201の各列は、ルートノードAから配下の全てのノードに至る経路を示し、左側の方が同一階層における順位の高いノードを含むようになっている。   FIG. 6 is a diagram illustrating an example of a two-dimensional array obtained by expanding a DOM tree. Each column of the two-dimensional array 101 before update and the two-dimensional array 201 after update shown in the same figure indicates a route from the root node A to all the subordinate nodes, and the left side includes nodes with higher ranks in the same hierarchy. It is like that.

次に、差分生成部17は、更新前2次元配列101の各列と送信後2次元配列201の各列との一致の度合を検出する。具体的には、差分生成部17は、更新前2次元配列101の各列と送信後2次元配列201の各列の順列を導出する。例えば、更新前2次元配列101の最も左側の列(第1列)は、ノードA、B、Eの順で構成されている。このため、更新前2次元配列101の第1列については、ノードA、B、Eからなる組、ノードA、Bからなる組、ノードA、Eからなる組、ノードAからなる組、ノードB、Eからなる組、ノードBからなる組及びノードEからなる組の7つの順列が導出される。   Next, the difference generation unit 17 detects the degree of matching between each column of the two-dimensional array 101 before update and each column of the two-dimensional array 201 after transmission. Specifically, the difference generation unit 17 derives a permutation of each column of the two-dimensional array 101 before update and each column of the two-dimensional array 201 after transmission. For example, the leftmost column (first column) of the two-dimensional array 101 before update is configured in the order of nodes A, B, and E. For this reason, for the first column of the two-dimensional array 101 before update, a group consisting of nodes A, B, and E, a group consisting of nodes A and B, a group consisting of nodes A and E, a group consisting of nodes A, and a node B , E, seven permutations of the group consisting of node B and the group consisting of node E are derived.

次に、差分生成部17は、導出した順列を比較することにより、更新前2次元配列の各列と送信後2次元配列の各列とについて、一致の度合が高い列同士を対応させる。   Next, the difference generation unit 17 compares the derived permutations, and associates the columns having a high degree of coincidence with each column of the two-dimensional array before update and each column of the two-dimensional array after transmission.

ここでは、差分生成部17は、更新前2次元配列101の第1列と更新後2次元配列201の第1列とがともにノードA、Eからなる順列を有しているので、これらの列を対応させる。また、差分生成部17は、更新前2次元配列101の第2列と更新後2次元配列201の第5列とがともにノードA、Cからなる順列とノードF、Hからなる順列を有しているので、これらの列を対応させる。同様に、差分生成部17は、更新前2次元配列101の第3列と更新後2次元配列201の第6列とがともにノードA、Cからなる順列とノードF、Iからなる順列を有しているので、これらの列を対応させる。更に、差分生成部17は、更新前2次元配列101の第4列と更新後2次元配列201の第7列とがともにノードA、C、G、Iからなる順列を有しているので、これらの列を対応させる。   Here, since the difference generation unit 17 has both the first column of the two-dimensional array 101 before update and the first column of the two-dimensional array 201 after update have permutations including nodes A and E, these columns. To correspond. Further, the difference generation unit 17 has a permutation composed of nodes A and C and a permutation composed of nodes F and H, both of the second column of the two-dimensional array 101 before update and the fifth column of the two-dimensional array 201 after update. So let's make these columns correspond. Similarly, the difference generation unit 17 has both the third column of the two-dimensional array 101 before update and the sixth column of the two-dimensional array 201 after update have a permutation composed of nodes A and C and a permutation composed of nodes F and I. Therefore, these columns are made to correspond. Furthermore, since the difference generation unit 17 has a permutation composed of nodes A, C, G, and I, both the fourth column of the two-dimensional array 101 before update and the seventh column of the two-dimensional array 201 after update, Match these columns.

このように、更新前2次元配列の各列と送信後2次元配列の各列とを対応させた後、差分生成部17は、更新前2次元配列において完全一致しているために対応付けされた列を2つずつ選択し、これら選択した2つの列の位置が更新後に入れ替わっているか否かを判定する。例えば、更新前2次元配列の第1列と更新後2次元配列の第3列とが完全一致して対応付けられるとともに、更新前2次元配列の第3列と更新後2次元配列の第1列とが完全一致して対応付けられる場合を考える。この場合、更新前2次元配列の第1列が更新後2次元配列では第3列に移動し、更新前2次元配列の第3列が更新後2次元配列の第1列に移動したと考えることができ、列の入れ替えが生じていると判定される。   As described above, after associating each column of the two-dimensional array before update with each column of the two-dimensional array after transmission, the difference generation unit 17 is associated with each other because the two-dimensional array before update is completely matched. The selected columns are selected two by two, and it is determined whether or not the positions of the two selected columns are switched after the update. For example, the first column of the two-dimensional array before update and the third column of the two-dimensional array after update are associated with each other in perfect correspondence, and the third column of the two-dimensional array before update and the first column of the two-dimensional array after update. Consider a case where a column is matched with a complete match. In this case, the first column of the two-dimensional array before update is moved to the third column in the two-dimensional array after update, and the third column of the two-dimensional array before update is moved to the first column of the two-dimensional array after update. It is possible to determine that a column replacement has occurred.

列の入れ替えが生じている場合、差分生成部17は、その旨を示す差分情報としてのXSLTデータを生成する。   When the replacement of columns occurs, the difference generation unit 17 generates XSLT data as difference information indicating the fact.

次に、差分生成部17は、対応させた2つの列が完全一致していないものについて差異を検出し、その差異に基づいて、ノードの変更、挿入を認識するとともに、その挿入位置を弟ノードや兄ノードにより認識する。   Next, the difference generation unit 17 detects a difference between the two corresponding columns that do not completely match, recognizes the change or insertion of the node based on the difference, and sets the insertion position to the brother node. Recognized by brother nodes.

ここでは、上述した対応付けにより得られた、更新前2次元配列101の第1列と更新後2次元配列201の第1列による対応、更新前2次元配列101の第2列と更新後2次元配列201の第5列による対応、更新前2次元配列101の第3列と更新後2次元配列201の第6列による対応及び更新前2次元配列101の第4列と更新後2次元配列201の第7列による対応のうち、更新前2次元配列101の第4列と更新後2次元配列201の第7列による対応以外は、2つの列が完全一致していない。   Here, the correspondence between the first column of the two-dimensional array 101 before update and the first column of the two-dimensional array 201 after update obtained by the above-described association, the second column of the two-dimensional array 101 before update and the two after update. Correspondence by the fifth column of the three-dimensional array 201, correspondence by the third column of the two-dimensional array 101 before update and the sixth column of the two-dimensional array 201 after update, and fourth column of the two-dimensional array 101 before update and the two-dimensional array after update Of the correspondence by the seventh column of 201, the two columns do not completely match except for the correspondence by the fourth column of the two-dimensional array 101 before update and the seventh column of the two-dimensional array 201 after update.

このため、差分生成部17は、まず更新前2次元配列101の第1列と更新後2次元配列201の第1列の差異を検討し、更新前2次元配列101の第1列のノードBが更新後2次元配列201の第1列ではノード1に変更されていることを認識する。また、差分生成部17は、更新前2次元配列101の第2列と更新後2次元配列201の第5列の差異を検討し、更新後2次元配列201の第5列にはノードCとノードFとの間にノード5が挿入されており、ノード5の弟ノードのXPathがA/C/Gであることを認識する。同様に、差分生成部17は、更新前2次元配列101の第3列と更新後2次元配列201の第6列の差異を検討し、更新後2次元配列201の第6列にはノードCとノードFとの間にノード5が挿入されており、ノード5の弟ノードのXPathがA/C/Gであることを認識する。   For this reason, the difference generation unit 17 first examines the difference between the first column of the two-dimensional array 101 before update and the first column of the two-dimensional array 201 after update, and node B in the first column of the two-dimensional array 101 before update. Recognizes that it has been changed to node 1 in the first column of the updated two-dimensional array 201. In addition, the difference generation unit 17 examines the difference between the second column of the two-dimensional array 101 before update and the fifth column of the two-dimensional array 201 after update. It is recognized that the node 5 is inserted between the node F and the XPath of the brother node of the node 5 is A / C / G. Similarly, the difference generation unit 17 examines a difference between the third column of the two-dimensional array 101 before update and the sixth column of the two-dimensional array 201 after update, and the node C is included in the sixth column of the two-dimensional array 201 after update. Node 5 is inserted between the node F and the node F, and the XPath of the brother node of the node 5 is recognized as A / C / G.

次に、差分生成部17は、更新前2次元配列の各列のうち、対応付けされていないもののノードの削除を認識する。ここでは、差分生成部17は、更新前2次元配列101において、対応付けされていない第5列のノードA、Dのうち、ルートノードAを除くノードDが削除されることを認識する。   Next, the difference generation unit 17 recognizes deletion of a node that is not associated among the columns of the two-dimensional array before update. Here, the difference generation unit 17 recognizes that the node D excluding the root node A is deleted from the nodes A and D in the fifth column that are not associated with each other in the two-dimensional array 101 before update.

次に、差分生成部17は、送信後2次元配列の各列のうち、対応付けされていないもののノードの追加を認識するとともに、その追加位置を弟ノードや兄ノードにより認識する。ここでは、差分生成部17は、更新後2次元配列201において、対応付けされていない第2列のノードA、2、3のうち、ルートノードAを除くノード2、3が追加され、ノード2の兄ノードのXPathがA/1であることを認識するとともに、対応付けされていない第3列のノードA、2、4のうち、ルートノードAを除くノード2、4が追加され、ノード2の兄ノードのXPathがA/1であることを認識する。更に、差分生成部17は、更新後2次元配列201において、対応付けされていない第5列のノードA、C、5、6のうち、ルートノードA、ノードCを除くノード5、6が追加され、ノード6の弟ノードのXPathがA/C/5/Fであることを認識する。   Next, the difference generation unit 17 recognizes the addition of a node that is not associated among the columns of the post-transmission two-dimensional array, and recognizes the addition position by the brother node or the brother node. Here, the difference generation unit 17 adds the nodes 2 and 3 excluding the root node A among the nodes A, 2 and 3 in the second column that are not associated with each other in the updated two-dimensional array 201. Node 2 and 4 except for the root node A among the nodes A, 2 and 4 in the third column that are not associated with each other are added. It is recognized that the XPath of the older brother node is A / 1. Further, the difference generation unit 17 adds the nodes 5 and 6 excluding the root node A and the node C among the nodes A, C, 5 and 6 in the fifth column that are not associated with each other in the updated two-dimensional array 201. Then, it is recognized that the XPath of the brother node of the node 6 is A / C / 5 / F.

このようにして、ノードの変更、挿入、挿入位置、削除、追加及び追加位置を認識した後、差分生成部17は、これらの情報を集約し、差分情報としてのXSLTデータを生成する。   After recognizing node changes, insertions, insertion positions, deletions, additions, and addition positions in this way, the difference generation unit 17 aggregates these pieces of information and generates XSLT data as difference information.

ここでは、差分生成部17は、ノードBからノード1への変更を示す情報を含んだXSLTデータを生成する。また、差分生成部17は、更新後2次元配列201の第2列のノード2、3が追加され、ノード2の兄ノードのXPathがA/1であること、及び、第3列のノード2、4が追加され、ノード2の兄ノードのXPathがA/1であることに基づいて、ノード1の弟ノードとしてのノード2を追加と、当該ノード2の直下における兄ノード3及び弟ノード4の追加を示す情報を上記生成したXSLTデータに追加する。   Here, the difference generation unit 17 generates XSLT data including information indicating a change from the node B to the node 1. In addition, the difference generation unit 17 adds the nodes 2 and 3 in the second column of the updated two-dimensional array 201, the XPath of the brother node of the node 2 is A / 1, and the node 2 in the third column 4 is added, and the node 2 as the brother node of the node 1 is added based on the fact that the XPath of the brother node of the node 2 is A / 1, and the brother node 3 and the brother node 4 immediately below the node 2 are added. Is added to the generated XSLT data.

また、差分生成部17は、更新後2次元配列201の第5列においてノードCとノードFとの間にノード5が挿入されており、ノード5の弟ノードのXPathがA/C/Gであること、及び、更新後2次元配列201の第6列においてノードCとノードFとの間にノード5が挿入されており、ノード5の弟ノードのXPathがA/C/Gであることに基づいて、ノードCとノードFの間へのノード5の挿入と、当該ノード5がノードGの兄ノードであることを示す情報を上記生成したXSLTデータに追加する。   Further, the difference generation unit 17 inserts the node 5 between the node C and the node F in the fifth column of the updated two-dimensional array 201, and the XPath of the brother node of the node 5 is A / C / G. The node 5 is inserted between the node C and the node F in the sixth column of the updated two-dimensional array 201, and the XPath of the brother node of the node 5 is A / C / G Based on this, insertion of the node 5 between the node C and the node F and information indicating that the node 5 is an elder node of the node G are added to the generated XSLT data.

また、差分生成部17は、更新後2次元配列201の第5列のノード5、6が追加されており、ノード6の弟ノードのXPathがA/C/5/Fであることに基づいて、ノード5の直下におけるノードFの兄ノードとしてのノード6の追加を示す情報を上記生成したXSLTデータに追加する。更に、差分生成部17は、ノードDの削除を示す情報を上記生成したXSLTデータに追加する。   In addition, the difference generation unit 17 is based on the fact that the nodes 5 and 6 in the fifth column of the updated two-dimensional array 201 are added, and the XPath of the brother node of the node 6 is A / C / 5 / F. , Information indicating the addition of the node 6 as the brother node of the node F immediately below the node 5 is added to the generated XSLT data. Further, the difference generation unit 17 adds information indicating deletion of the node D to the generated XSLT data.

上述した第2のXSLTデータ生成方法を採用する場合には、更新前のXMLデータのDOMツリーに対応する第1の2次元配列と、更新後のXMLデータのDOMツリーに対応する第2の2次元配列との一致の度合に基づいて、XSLTデータを生成するため、挿入、追加、削除、変更等の対象となるノードの情報のみをXSLTデータに含ませることができ、XSLTデータ内の情報を必要最小限とすることができる。
(第3実施例)
次に、更新前のXMLデータのDOMツリーに基づいて1のノード(親ノード)と該1のノードの直下のノード(子ノード)とを特定する第1の部品を生成するとともに、更新後のXMLデータのDOMツリーに基づいて、1のノード(親ノード)と該1のノードの直下のノード(子ノード)とを特定する第2の部品を生成し、これら第1及び第2の部品の対応付けの結果に基づいて、XSLTデータを生成する方法(第3のXSLTデータ生成方法)について説明する。
When the second XSLT data generation method described above is adopted, the first two-dimensional array corresponding to the DOM tree of the XML data before update and the second 2 corresponding to the DOM tree of the XML data after update. Since the XSLT data is generated based on the degree of coincidence with the dimensional array, only the information of the nodes to be inserted, added, deleted, changed, etc. can be included in the XSLT data, and the information in the XSLT data can be included. It can be minimized.
(Third embodiment)
Next, a first part that identifies one node (parent node) and a node (child node) immediately below the one node based on the DOM tree of the XML data before the update is generated, and after the update Based on the DOM tree of the XML data, a second part that identifies one node (parent node) and a node (child node) immediately below the one node is generated, and the first and second parts A method (third XSLT data generation method) for generating XSLT data based on the result of association will be described.

第3のXSLTデータ生成方法では、差分生成部17は、更新前DOMツリー100を構成する全てのノードを1の親ノードと子ノードからなる部品に分割し、各部品の情報を含んだ部品データ表(以下「更新前部品データ表」)を生成する。同様に、差分生成部17は、更新後DOMツリー200を構成する全てのノードを1親ノードと子ノードからなる部品に分割し、各部品の情報を含んだ部品データ表(以下「更新後部品データ表」)を生成する。差分生成部17は、DOMツリーを構成する全てのノードを部品に分割する際、ルートノード及び直下に子ノードを有していないノード以外のノードが必ず1の部品の親ノードと他の部品の子ノードを経験するように、DOMツリーを部品に分割する。   In the third XSLT data generation method, the difference generation unit 17 divides all the nodes constituting the pre-update DOM tree 100 into parts including one parent node and child nodes, and includes part data including information on each part. A table (hereinafter referred to as “pre-update parts data table”) is generated. Similarly, the difference generation unit 17 divides all the nodes constituting the updated DOM tree 200 into parts including one parent node and a child node, and a parts data table (hereinafter “updated parts”) including information on each part. Data table "). When the difference generation unit 17 divides all the nodes constituting the DOM tree into parts, the nodes other than the root node and the node having no child node immediately below are always the parent node of one part and the other parts. Divide the DOM tree into parts to experience child nodes.

図7は、部品の生成を説明するための図である。同図に示すように、更新前DOMツリー100は、親ノードA、子ノードB、C、Dからなる部品111、親ノードB、子ノードEからなる部品112、親ノードC、子ノードF、Gからなる部品113、親ノードF、子ノードH、Iからなる部品114、親ノードG、子ノードJからなる部品115に分割される。   FIG. 7 is a diagram for explaining the generation of components. As shown in the figure, the pre-update DOM tree 100 includes a part 111 composed of a parent node A, child nodes B, C, and D, a part 112 composed of a parent node B and a child node E, a parent node C, a child node F, It is divided into a part 113 consisting of G, a part 114 consisting of parent node F, child nodes H and I, and a part 115 consisting of parent node G and child node J.

一方、更新後DOMツリー200は、親ノードA、子ノード1、2、Cからなる部品211、親ノード1、子ノードEからなる部品212、親ノード2、子ノード3、4からなる部品213、親ノードC、子ノード5、Gからなる部品214、親ノード5、子ノード6、Fからなる部品215、親ノードG、子ノードJからなる部品216、親ノードF、子ノードH、Iからなる部品217に分割される。   On the other hand, the updated DOM tree 200 includes a component 211 composed of a parent node A, child nodes 1, 2, and C, a component 212 composed of a parent node 1 and a child node E, a component 213 composed of a parent node 2, and child nodes 3 and 4. , Parent node C, child node 5, component 214, parent node 5, child node 6, F component 215, parent node G, child node J 216, parent node F, child node H, I It is divided into parts 217 consisting of

図8は、部品データ表の一例を示す図である。同図に示す更新前部品データ表102及び更新後部品データ表202は、親ノードと子ノードからなる部品と、当該親ノードのXPathとが対応付けられている。なお、1の親ノードに対する子ノードが複数存在する場合、それらの子ノードは、順位が上のものが先に記述される。   FIG. 8 is a diagram illustrating an example of the component data table. In the pre-update part data table 102 and the post-update part data table 202 shown in the figure, a part composed of a parent node and a child node is associated with the XPath of the parent node. When there are a plurality of child nodes for one parent node, those child nodes having the highest rank are described first.

図8において、例えば、部品データ表102の第3行には、親ノードCと子ノードF、Gからなる部品と、親ノードCのXPathであるA/Cとが対応付けられている。   In FIG. 8, for example, in the third row of the part data table 102, a part composed of a parent node C and child nodes F and G and an A / C that is an XPath of the parent node C are associated with each other.

このように部品データ表を生成した後、差分生成部17は、更新前部品データ表の部品と、更新後部品データ表の部品とを比較し、ノードが完全一致する部品を対応付けするとともに、その部品に対応するXPathを比較し、一致しているか否かを認識する。   After generating the parts data table in this way, the difference generation unit 17 compares the parts in the parts data table before update with the parts in the parts data table after update, and associates the parts whose nodes completely match, The XPath corresponding to the part is compared to recognize whether or not they match.

ここでは、差分生成部17は、更新前部品データ表102内の第4行の部品114と、部品データ表202内の第7行の部品217がともに親ノードF、子ノードH、Iからなる部品であるため、これらの部品114、217を対応付ける。更に、差分生成部17は、部品114に対応するXPathであるA/C/Fと、部品217に対応するXPathであるA/C/5/Fとを比較し、これらが一致していないことを認識する。   Here, the difference generation unit 17 includes a parent node F and child nodes H and I, both of the parts 114 in the fourth row in the parts data table 102 before update and the parts 217 in the seventh row in the parts data table 202. Since these are parts, these parts 114 and 217 are associated with each other. Furthermore, the difference generation unit 17 compares the A / C / F that is the XPath corresponding to the component 114 with the A / C / 5 / F that is the XPath corresponding to the component 217, and these are not consistent. Recognize

また、差分生成部17は、更新前部品データ表102内の第5行の部品115と、部品データ表202内の第6行の部品216がともに親ノードG、子ノードJからなる部品であるため、これらの部品115、216を対応付ける。更に、差分生成部17は、部品115に対応するXPathであるA/C/Gと、部品216に対応するXPathA/C/Gとを比較し、これらが一致していることを認識する。   Further, in the difference generation unit 17, the part 115 in the fifth row in the part data table 102 before update and the part 216 in the sixth line in the part data table 202 are both parts composed of a parent node G and a child node J. Therefore, these components 115 and 216 are associated with each other. Further, the difference generation unit 17 compares A / C / G, which is an XPath corresponding to the component 115, with XPath A / C / G corresponding to the component 216, and recognizes that they match.

次に、差分生成部17は、部品は完全一致するが、その部品に対応するXPathが異なる対応付けに基づいて、ノードの移動を示す情報を生成する。ここでは、部品114と部品217は完全一致するが、これら部品に対応するXPathはA/C/FとA/C/5/Fであり、異なっている。このため、差分生成部17は、親ノードFがノードCの直下からノード5の直下であってノード6の弟ノードとしての位置に移動し、子ノードH、Iもそれに伴って移動することを示す情報を生成する。   Next, the difference generation unit 17 generates information indicating the movement of the node based on the association in which the parts completely match but the XPaths corresponding to the parts are different. Here, the part 114 and the part 217 completely match, but the XPaths corresponding to these parts are A / C / F and A / C / 5 / F, which are different. Therefore, the difference generation unit 17 determines that the parent node F moves from the position immediately below the node C to the position immediately below the node 5 and the node 6 as the younger brother node, and the child nodes H and I move accordingly. Generate information to show.

次に、差分生成部17は、差分生成部17は、更新前部品データ表の部品と、更新後部品データ表の部品とを比較し、ノードが部分一致する部品を対応付けする。   Next, the difference generation unit 17 compares the parts in the pre-update part data table with the parts in the post-update part data table, and associates parts whose nodes partially match.

ここでは、差分生成部17は、更新前部品データ表102内の第1行の部品111と、部品データ表202内の第1行の部品211がともにノードAを親ノードとしており、対応するXPathがともにAであるため、これらの部品111、211を対応付ける。また、差分生成部17は、更新前部品データ表102内の第2行の部品112と、部品データ表202内の第2行の部品212がともに1つのノードBを子ノードとしており、対応するXPathがA/B、A/1であって部分一致するため、これらの部品112、212を対応付ける。更に、差分生成部17は、更新前部品データ表102内の第3行の部品113と、部品データ表202内の第4行の部品214がともにノードCを親ノードとし、2つの子ノードのうちの1つがノードGであり、対応するXPathがともにA/Cであって部分一致するため、これらの部品113、214を対応付ける。   Here, the difference generation unit 17 uses the node A as a parent node for both the component 111 in the first row in the pre-update component data table 102 and the component 211 in the first row in the component data table 202, and the corresponding XPath. Since both are A, these components 111 and 211 are associated with each other. In addition, the difference generation unit 17 corresponds to the part 112 in the second row in the pre-update part data table 102 and the part 212 in the second row in the part data table 202, each having one node B as a child node. Since XPath is A / B and A / 1, which partially match, these parts 112 and 212 are associated with each other. Further, the difference generation unit 17 uses the node C as a parent node for both the component 113 in the third row in the component data table 102 before update and the component 214 in the fourth row in the component data table 202. Since one of them is the node G and the corresponding XPaths are both A / C and partially match, these components 113 and 214 are associated with each other.

次に、差分生成部17は、上記の部分一致する部品の対応付けと、その部品に対応するXPathとに基づいて、ノードの変更、追加、削除を示す情報を生成する。   Next, the difference generation unit 17 generates information indicating the change, addition, and deletion of the node based on the association of the partially matching parts and the XPath corresponding to the parts.

ここでは、差分生成部17は、部品111(親ノードA、子ノードB、C、D)と部品211(親ノードA、子ノード1、2、C)の対応付けと、これらの部品に対応するXPath(ともにA)とに基づいて、ノードBのノード1への変更を示す情報、ノードAの直下であってノード1とノードCの間へのノード2の追加を示す情報、及び、ノードDの削除を示す情報を生成する。また、差分生成部17は、部品112(親ノードB、子ノードE)と部品212(親ノード1、子ノードE)の対応付けと、これらの部品に対応するXPath(A/BとA/1)とに基づいて、ノードBのノード1への変更を示す情報を生成する。更に、差分生成部17は、部品113(親ノードC、子ノードF、G)と部品214(親ノードC、子ノード5、G)の対応付けと、これらの部品に対応するXPath(ともにA/C)とに基づいて、ノードFのノード5への変更を示す情報を生成する。   Here, the difference generation unit 17 associates the component 111 (parent node A, child nodes B, C, and D) with the component 211 (parent node A, child nodes 1, 2, and C) and corresponds to these components. Information indicating the change of node B to node 1 based on XPath (both A), information indicating addition of node 2 immediately below node A and between node 1 and node C, and node Information indicating deletion of D is generated. Further, the difference generation unit 17 associates the component 112 (parent node B, child node E) with the component 212 (parent node 1, child node E), and XPath (A / B and A /) corresponding to these components. 1), information indicating the change of node B to node 1 is generated. Further, the difference generation unit 17 associates the part 113 (parent node C, child node F, G) with the part 214 (parent node C, child node 5, G), and the XPath corresponding to these parts (both A / C), information indicating the change of the node F to the node 5 is generated.

次に、差分生成部17は、更新前部品データ表のうち対応付けされていない部品の追加を示す情報と、更新後部品データ表のうち対応付けされていない部品の削除を示す情報を生成する。   Next, the difference generation unit 17 generates information indicating addition of an uncorrelated component in the pre-update component data table and information indicating deletion of an uncorrelated component in the post-update component data table. .

ここでは、更新前部品データ表102のうち対応付けされていない部品は存在しない。一方、更新後部品データ表202のうち対応付けされていない部品は、部品213、215である。   Here, there are no uncorrelated components in the pre-update component data table 102. On the other hand, the parts that are not associated in the updated part data table 202 are the parts 213 and 215.

このため、差分生成部17は、部品213(親ノード2、子ノード3、4)、対応するXPath(A/2)及び前後の部品212、214に対応するXPath(A/1、A/C)に基づいて、ノードAの直下であってノード1とノードCの間へのノード2の追加と、該ノード2の直下における兄ノード3及び弟ノード4の追加を示す情報を生成する。また、差分生成部17は、部品215(親ノード5、子ノード6、F)、対応するXPath(A/C/5)及び後の部品216に対応するXPath(A/C/G)に基づいて、ノードCの直下においてノードGの兄ノードとしてのノード5の追加と、該ノード5の直下におけるノードFの兄ノードとしてのノード6の追加を示す情報を示す情報を生成する。   For this reason, the difference generation unit 17 uses the component 213 (parent node 2, child nodes 3, 4), the corresponding XPath (A / 2), and the XPath (A / 1, A / C) corresponding to the preceding and subsequent components 212, 214. ), Information indicating the addition of node 2 immediately below node A and between node 1 and node C, and the addition of brother node 3 and brother node 4 immediately below node 2 is generated. Further, the difference generation unit 17 is based on the component 215 (parent node 5, child node 6, F), the corresponding XPath (A / C / 5), and the XPath (A / C / G) corresponding to the subsequent component 216. Thus, information indicating information indicating the addition of the node 5 as the brother node of the node G immediately below the node C and the addition of the node 6 as the brother node of the node F immediately below the node 5 is generated.

次に、差分生成部17は、後述した手順により生成したノードの移動、変更、追加、削除を示す情報を集約する。ここでは、差分生成部17は、ノードBのノード1への変更を示す情報が2つ存在するため、これらを1つに集約する。また、差分生成部17は、ノードAの直下であってノード1とノードCの間へのノード2の追加と、該ノード2の直下における兄ノード3及び弟ノード4の追加を示す情報と、ノードAの直下であってノード1とノードCの間へのノード2の追加を示す情報とを集約し、ノードAの直下であってノード1とノードCの間へのノード2の追加と、該ノード2の直下における兄ノード3及び弟ノード4の追加を示す情報を生成する。更に、差分生成部17は、親ノードFがノードCの直下からノード5の直下であってノード6の弟ノードとしての位置に移動し、子ノードH、Iもそれに伴って移動することを示す情報、ノードFのノード5への変更を示す情報、及び、ノードCの直下においてノードGの兄ノードとしてのノード5の追加を示す情報とを集約して、ノードCとノードFの間へのノード5の挿入と、当該ノード5がノードGの兄ノードであることを示す情報を生成する。   Next, the difference generation unit 17 collects information indicating the movement, change, addition, and deletion of the nodes generated by the procedure described later. Here, since there are two pieces of information indicating the change of the node B to the node 1, the difference generation unit 17 consolidates them into one. Further, the difference generation unit 17 includes information indicating the addition of the node 2 immediately below the node A and between the node 1 and the node C, and the addition of the brother node 3 and the brother node 4 immediately below the node 2; Information indicating addition of node 2 immediately below node A and between node 1 and node C, and addition of node 2 immediately below node A and between node 1 and node C; Information indicating the addition of the brother node 3 and the brother node 4 immediately below the node 2 is generated. Further, the difference generation unit 17 indicates that the parent node F moves from the position immediately below the node C to the position immediately below the node 5 and the node 6 as a younger brother node, and the child nodes H and I move accordingly. Information, information indicating the change of the node F to the node 5, and information indicating the addition of the node 5 as an elder node of the node G immediately below the node C are aggregated between the node C and the node F. Information indicating that the node 5 is inserted and that the node 5 is an elder node of the node G is generated.

このような集約の結果、ノードの移動、変更、追加、挿入、削除を示す情報は、ノードBからノード1への変更を示す情報、ノードDの削除を示す情報、ノードAの直下であってノード1とノードCの間へのノード2の追加と、該ノード2の直下における兄ノード3及び弟ノード4の追加を示す情報、ノードCとノードFの間へのノード5の挿入と、当該ノード5がノードGの兄ノードであることを示す情報、及び、ノード5の直下におけるノードFの兄ノードとしてのノード6の追加を示す情報となる。差分生成部12は、これらの情報を含んだXSLTデータを生成する。   As a result of such aggregation, the information indicating the movement, change, addition, insertion, and deletion of the node is the information indicating the change from the node B to the node 1, the information indicating the deletion of the node D, and immediately below the node A. The addition of node 2 between node 1 and node C, information indicating the addition of brother node 3 and brother node 4 immediately below node 2, insertion of node 5 between node C and node F, Information indicating that the node 5 is the brother node of the node G, and information indicating addition of the node 6 as the brother node of the node F immediately below the node 5 are provided. The difference generation unit 12 generates XSLT data including these pieces of information.

上述した第3のXSLTデータ生成方法を採用する場合には、更新前のXMLデータのDOMツリーに対応する部品と、更新後のXMLデータのDOMツリーに対応する部品との対応付けの結果に基づいて、XSLTデータを生成するため、挿入、追加、削除、変更等の対象となるノードの情報のみをXSLTデータに含ませることができ、XSLTデータ内の情報を必要最小限とすることができる。
(第4実施例)
次に、第4のXSLTデータ生成方法を説明する。この第4のXSLTデータ生成方法では、更新前のXMLデータのDOMツリーに基づいて、更新前のノードの構成パターンをノードがない場合を含め、ルートノードを除外して生成するとともに、更新後のXMLデータのDOMツリーに基づいて、更新後のノードの構成パターンをノードがない場合を含め、ルートノードを除外して生成し、これら生成した更新前のノードの構成パターンの全てと更新後のノードの構成パターンの全てとを組み合わせ、各組み合わせにおいて、更新前の全てのノードの構成パターンから該組み合わせに対応する更新前のノードの構成パターンを削除するとともに、更新後の全てのノードの構成パターンから該組み合わせに対応する更新後のノードの構成パターンを削除し、削除後の更新前のノードの構成パターンと更新後のノードの構成パターンとにおいて、一致するノードが最も多い組み合わせに基づいて、XSLTデータを生成する。
In the case where the third XSLT data generation method described above is employed, based on the result of the association between the part corresponding to the DOM tree of the XML data before update and the part corresponding to the DOM tree of the XML data after update. Thus, since the XSLT data is generated, only the information of the node to be inserted, added, deleted, changed or the like can be included in the XSLT data, and the information in the XSLT data can be minimized.
(Fourth embodiment)
Next, a fourth XSLT data generation method will be described. In the fourth XSLT data generation method, based on the DOM tree of the XML data before the update, the configuration pattern of the node before the update is generated by excluding the root node, including the case where there is no node, and after the update. Based on the XML data DOM tree, the updated node configuration pattern is generated by excluding the root node, including the case where there is no node, and all the generated configuration patterns of the pre-update node and the updated node are included. In each combination, in each combination, the configuration pattern of the node before update corresponding to the combination is deleted from the configuration pattern of all nodes before update, and from the configuration pattern of all nodes after update Delete the updated node configuration pattern corresponding to the combination, and delete the updated node configuration pattern. In the arrangement pattern over ting the updated node, based on the most frequently combined matching nodes, it generates the XSLT data.

本実施例においては、図9に示すように、更新前のXMLデータの階層構造がルードノードA、ルードノードAの子ノードとしてのノードB及びノードC、ノードCの子ノードとしてのノードDによって構成される更新前DOMツリー300であり、更新後のXMLデータの階層構造がルードノードA、ルードノードAの子ノードとしてのノード1及びノード2、ノード2の子ノードとしてのノード3及ノードDによって構成される更新後DOMツリー400である場合を例に説明する。   In the present embodiment, as shown in FIG. 9, the hierarchical structure of the XML data before update is composed of a node A as a child node of the node A, a node B and a node C as the child nodes of the node A, the node A, and the node A. The pre-update DOM tree 300, and the hierarchical structure of the XML data after update is composed of a node A, nodes 1 and 2 as child nodes of the node A, nodes 3 and D as child nodes of the node 2 A case where the post-update DOM tree 400 is used will be described as an example.

差分生成部17は、まず、更新前DOMツリーと更新後DOMツリーとに基づいて、ルートノードに変更がないか否かを判定する。ここでは、図9に示すようにルートノードは、更新前後で変更がなく、ともにノードAである。   The difference generation unit 17 first determines whether or not there is a change in the root node based on the pre-update DOM tree and the post-update DOM tree. Here, as shown in FIG. 9, the root node is not changed before and after the update, and is both the node A.

差分生成部17は、ルートノードが更新前後で変更がないと判断すると、次に更新前DOMツリーに基づいて、更新前のノードの構成パターンをノードがない場合を含め、ルートノードを除外して生成する。   When the difference generation unit 17 determines that the root node has not changed before and after the update, the difference generation unit 17 excludes the root node from the pre-update DOM tree including the case where there is no node based on the pre-update DOM tree. Generate.

ここでは、更新前のXMLデータは、ノードA、B、C、Dからなる。このため、更新前のノードの構成パターンは、「ノードなし」、「ノードB」、「ノードC」、「ノードD」、「ノードB・C」、「ノードB・D」、「ノードC・D」、「ノードB・C・D」の8個になる。   Here, the XML data before update consists of nodes A, B, C, and D. For this reason, the configuration pattern of the node before update is “no node”, “node B”, “node C”, “node D”, “node B / C”, “node B / D”, “node C • D ”and“ Node B / C / D ”.

同様に、差分生成部17は、更新後DOMツリーに基づいて、更新後のノードの構成パターンをノードがない場合を含め、ルートノードを除外して生成する。   Similarly, the difference generation unit 17 generates the updated node configuration pattern excluding the root node, including the case where there is no node, based on the updated DOM tree.

ここでは、更新後のXMLデータは、ノードA、B、D、1、2、3からなる。このため、更新後のノードの構成パターンは、「ノードなし」、「ノードB」、「ノードD」、「ノード1」、「ノード2」、「ノード3」、「ノードB・D」、「ノードB・1」、「ノードB・2」、「ノードB・3」、「ノードD・1」、「ノードD・2」、「ノードD・3」、「ノード1・2」、「ノード1・3」、「ノード2・3」、「ノードB・D・1」、「ノードB・D・2」、「ノードB・D・3」、「ノードB・1・2」、「ノードB・1・3」、「ノードB・2・3」、「ノードD・1・2」、「ノードD・1・3」、「ノードD・2・3」、「ノード1・2・3」、「ノードB・D・1・2」、「ノードB・D・1・3」、「ノードB・D・2・3」、「ノードB・1・2・3」、「ノードD・1・2・3」、「ノードB・D・1・2・3」の32個になる。   Here, the updated XML data consists of nodes A, B, D, 1, 2, and 3. For this reason, the configuration pattern of the updated nodes is “no node”, “node B”, “node D”, “node 1”, “node 2”, “node 3”, “node B / D”, “ “Node B · 1”, “Node B · 2”, “Node B · 3”, “Node D · 1”, “Node D · 2”, “Node D · 3”, “Node 1 · 2”, “Node” “1, 3”, “Node 2 • 3”, “Node B • D • 1”, “Node B • D • 2”, “Node B • D • 3”, “Node B • 1 • 2”, “Node” B.1,3 "," Node B.2,3 "," Node D.1,2. "," Node D..1,3 "," Node D.2..3 "," Node 1..2. ”,“ Node B · D · 1 · 2 ”,“ Node B · D · 1 · 3 ”,“ Node B · D · 2 · 3 ”,“ Node B · 1 · 2 · 3 ”,“ Node D · "1, 2, 3", "node · D · 1 · 2 · 3 "made to 32.

次に、差分生成部17は、生成した更新前のノードの構成パターンのそれぞれと、更新後のノードの構成パターンのそれぞれとを組み合わせる。ここでは、更新前のノードの構成パターンは8個であり、更新後のノードの構成パターンは32個であるので、これらの組み合わせは図10に示すように256通りとなる。   Next, the difference generation unit 17 combines each of the generated node configuration patterns before update and each of the updated node configuration patterns. Here, since there are eight configuration patterns of nodes before update and 32 configuration patterns of nodes after update, there are 256 combinations of these as shown in FIG.

なお、更新前のノード数をp、更新後のノード数をqとすると、更新前のルートノードと更新後のルートノードを除いたp+q−2個のノードからノードなしも含めた組み合わせを求めるため、その数は次式で表わされる。   If the number of nodes before update is p and the number of nodes after update is q, a combination including no nodes is obtained from p + q−2 nodes excluding the root node before update and the root node after update. The number is expressed by the following equation.

Figure 0004399017
図9の例では、p=4、q=6であるので、上記式によれば、256通りの組み合わせが得られる。
Figure 0004399017
In the example of FIG. 9, since p = 4 and q = 6, according to the above formula, 256 combinations are obtained.

その後、差分生成部17は、図11のフローチャートに従った処理を行う。即ち、差分生成部17は、まず更新前のノードの構成パターンのそれぞれと、更新後のノードの構成パターンのそれぞれとの組み合わせから1組を選択する(ステップ101)。   Thereafter, the difference generation unit 17 performs processing according to the flowchart of FIG. That is, the difference generation unit 17 first selects one set from a combination of each of the configuration patterns of the node before update and each of the configuration patterns of the node after update (step 101).

次に、差分生成部17は、更新前のXMLデータを構成するノードから選択した組み合わせに含まれる更新前のノードの構成パターンを削除するとともに、更新後のXMLデータを構成するノードから選択した組み合わせに含まれる更新後のノードの構成パターンを削除する(ステップ102)。   Next, the difference generation unit 17 deletes the configuration pattern of the pre-update node included in the combination selected from the nodes constituting the pre-update XML data, and the combination selected from the nodes constituting the post-update XML data The configuration pattern of the updated node included in is deleted (step 102).

上述したノードの削除後、差分生成部17は、削除後の更新前のXMLデータのノードと更新後のXMLデータのノードとが一致するか否かを判定する(ステップ103)。   After deleting the node, the difference generation unit 17 determines whether or not the node of the XML data before update after the deletion matches the node of the XML data after update (step 103).

削除後の更新前後のXMLデータのノードが一致する場合、差分生成部17は、一致するノード(削除後の更新前後のXMLデータのノードであり、以下「一致ノード」と称する)と、一致しないノード(選択した組み合わせに含まれるノードであり、以下、当該組み合わせに含まれる更新前のノードの構成パターンとしてのノードを「更新前差分ノード」と称し、当該組み合わせに含まれる更新後のノードの構成パターンとしてのノードを「更新後差分ノード」と称する)とを認識し(ステップ104)、一致ノードの数がこれまでで最大であるか否かを判定する(ステップ105)。   When the nodes of the XML data before and after the update after the deletion match, the difference generation unit 17 does not match with the matching node (the node of the XML data before and after the update after the deletion, hereinafter referred to as “matching node”). Node (a node included in the selected combination; hereinafter, a node as a configuration pattern of the node before update included in the combination is referred to as a “pre-update difference node”, and the configuration of the node after update included in the combination The node as the pattern is referred to as “updated difference node”) (step 104), and it is determined whether the number of matching nodes is the maximum so far (step 105).

一致ノードの数がこれまでで最大である場合には、差分生成部17は、選択した組み合わせを最適な組み合わせであると判断する(ステップ106)。次に、差分生成部17は、全ての組み合わせについて、上述したステップ102乃至106の調査を行ったか否かを判定する(ステップ107)。また、ステップ103において、削除後の更新前のXMLデータのノードと更新後のXMLデータのノードとが一致しないと判定した場合と、ステップ105において、一致するノードの数がこれまでで最大でないと判断した場合も、同様に、差分生成部17は、全ての組み合わせについて、上述したステップ102乃至106の調査を行ったか否かを判定する(ステップ107)。   If the number of matching nodes is the maximum so far, the difference generation unit 17 determines that the selected combination is the optimal combination (step 106). Next, the difference generation unit 17 determines whether or not the above-described investigations of Steps 102 to 106 have been performed for all combinations (Step 107). Further, when it is determined in step 103 that the node of the XML data before update after deletion and the node of the XML data after update do not match, in step 105, the number of matching nodes is not the maximum so far. Similarly, the difference generation unit 17 determines whether or not the above-described investigations in steps 102 to 106 have been performed for all combinations (step 107).

全ての組み合わせについて、上述したステップ102乃至106の調査が終了している場合には、差分生成部17は、一連の処理を終了する。一方、未調査の組み合わせがある場合には、差分生成部17は、その未調査の組み合わせから1組を選択し(ステップ101)、ステップ102以降の処理を繰り返す。   When the above-described investigations in steps 102 to 106 have been completed for all combinations, the difference generation unit 17 ends the series of processes. On the other hand, if there is an uninvestigated combination, the difference generation unit 17 selects one set from the uninvestigated combinations (step 101), and repeats the processing after step 102.

ここでは、図10に示す項番1乃至256の各組み合わせについて、図11のフローチャートに従った処理を行うと、項番90の組み合わせ(更新前のノードの構成パターンが「ノードC」、更新後のノードの構成パターンが「ノード1・2・3」の組み合わせ)が、ステップ102の処理による削除後の更新前後のXMLデータを構成するノードが何れもノードB、Dで一致し、且つ、一致するノードの数が2個で最大となる。従って、項番90の組み合わせが最適な組み合わせとして決定される。   Here, for each combination of item numbers 1 to 256 shown in FIG. 10, when the processing according to the flowchart of FIG. 11 is performed, the combination of item number 90 (the configuration pattern of the node before update is “node C”, The node configuration pattern is a combination of “Node 1, 2, 3”), and the nodes constituting the XML data before and after the update after the deletion in Step 102 are the same in Nodes B and D, and they match. The maximum number is 2 nodes. Therefore, the combination of the item number 90 is determined as the optimal combination.

最適な組み合わせが決定されると、次に、差分生成部17は、認識した差分ノードに基づいて、差分情報を生成する。   When the optimal combination is determined, the difference generation unit 17 generates difference information based on the recognized difference node.

具体的には、差分生成部17は、更新前DOMツリーから最適な組み合わせに含まれる更新前のノードの構成パターンとしての差分ノードを削除した新たな更新前DOMツリーを生成するとともに、更新後DOMツリーから最適な組み合わせに含まれる更新後のノードの構成パターンとしての差分ノードを削除した新たな更新後DOMツリーを生成する。これら新たに生成される2つのDOMツリー(以下「削除後DOMツリー」は一致ノードのみによって構成されるので、同一のDOMツリーとなる。   Specifically, the difference generation unit 17 generates a new pre-update DOM tree in which the difference node as the configuration pattern of the pre-update node included in the optimal combination is deleted from the pre-update DOM tree and the post-update DOM. A new updated DOM tree is generated by deleting the difference node as the configuration pattern of the updated node included in the optimal combination from the tree. These two newly generated DOM trees (hereinafter “post-deletion DOM tree”) are configured by only matching nodes, and thus are the same DOM tree.

次に、差分生成部17は、削除後DOMツリーにおいて、同一の親ノードと子ノードからなる組み合わせ(以下「親子ノード」称する)に着目し、この着目した親子ノードの間に削除前に差分ノードが存在していたか否かを判定する。削除後DOMツリーにおいて着目した親子ノードの間に削除前は更新前差分ノードが存在しており、且つ、更新後差分ノードが存在していたと判定された場合には、これら2つの差分ノードは異なる値となる。このため、差分生成部17は、更新前差分ノードから更新後差分ノードへの変更であると認識する。   Next, the difference generation unit 17 pays attention to the combination of the same parent node and child node (hereinafter referred to as “parent-child node”) in the post-deletion DOM tree, and before the deletion between the focused parent-child nodes, the difference node It is determined whether or not exists. If it is determined that there is a pre-update difference node between the parent and child nodes of interest in the post-deletion DOM tree, and the post-update difference node exists, these two difference nodes are different. Value. For this reason, the difference generation unit 17 recognizes the change from the pre-update difference node to the post-update difference node.

一方、差分生成部17は、削除後DOMツリーにおいて着目した親子ノードの間に削除前は更新前差分ノードが存在しており、且つ、更新後差分ノードが存在していなかったと判定した場合には、更新前差分ノードの削除であると認識する。また、差分生成部17は、削除後DOMツリーにおいて着目した親子ノードの間に削除前は更新前差分ノードが存在しておらず、且つ、更新後差分ノードが存在していたと判定した場合には、更新後差分ノードの挿入であると認識する。このような手順により、一致ノードに挟まれている差分ノードについて、削除、変更、挿入が決定される。   On the other hand, when the difference generation unit 17 determines that the pre-update difference node exists between the parent and child nodes focused on in the post-deletion DOM tree, and that the post-update difference node does not exist. It is recognized that the difference node before update is deleted. When the difference generation unit 17 determines that there is no pre-update difference node before the deletion between the parent and child nodes focused on in the post-deletion DOM tree, and that there is an post-update difference node. This is recognized as the insertion of the updated difference node. By such a procedure, deletion, change, and insertion are determined for a difference node sandwiched between matching nodes.

次に、差分生成部17は、一致ノードで挟まれていない更新前差分ノードについて、当該更新前ノードの削除であると認識するとともに、一致ノードで挟まれていない更新後差分ノードについて、当該更新後差分ノードの追加であると認識する。   Next, the difference generation unit 17 recognizes that the difference node before update not sandwiched between the matching nodes is the deletion of the node before update and updates the difference node after update not sandwiched between the matching nodes. Recognize that a post-difference node is added.

このようにして、ノードの削除、変更、挿入、追加を認識すると、次に、差分生成部17は、上述した認識結果に基づいて、差分情報を生成する。図12は、差分情報の項目を示す図である。同図に示すように、差分情報は、差分種別、基準ノード、相対位置、ノード情報により構成される。   When the node deletion, change, insertion, and addition are recognized in this way, the difference generation unit 17 generates difference information based on the recognition result described above. FIG. 12 is a diagram illustrating items of difference information. As shown in the figure, the difference information includes a difference type, a reference node, a relative position, and node information.

差分種別は、ノードに対する処理が削除、変更、挿入、追加の何れかに該当するかを示す情報である。基準ノードは、差分種別が削除の場合には、その削除されるノードのXPath、差分種別が変更の場合には、その変更前のノードのXPath、差分種別が挿入の場合には、挿入されるノードの親ノードのXPathあるいは挿入されるノードの親ノード及び子ノードのXPath、差分種別が追加の場合には、追加されるノードの親ノードのXPathあるいは兄弟ノードのXPathである。また、相対位置は、差分種別が削除、変更の場合には、基準ノードと同一であり、差分種別が挿入、追加の場合には、基準ノードからの相対位置を示す情報である。また、ノード情報は、差分種別が削除の場合には不要であり、差分種別が変更の場合には変更後のノードの情報であり、差分種別が挿入、追加の場合には、その挿入、追加されるノードの情報である。   The difference type is information indicating whether the process for the node corresponds to deletion, change, insertion, or addition. The reference node is inserted when the difference type is deleted, the XPath of the node to be deleted, when the difference type is changed, the XPath of the node before the change, and when the difference type is inserted The XPath of the parent node of the node, or the XPath of the parent node and child node of the node to be inserted, or the XPath of the sibling node of the node added when the difference type is added. The relative position is the same as the reference node when the difference type is deleted or changed, and is information indicating the relative position from the reference node when the difference type is inserted or added. The node information is unnecessary when the difference type is deleted, and is the node information after the change when the difference type is changed. When the difference type is inserted or added, the node information is inserted or added. Node information.

ここでは、図10に示す項番90の組み合わせが最適な組み合わせとして決定されているため、更新前差分ノードはノードCであり、更新後差分ノードはノード1、2、3である。このため、差分生成部17は、図9の更新前DOMツリー300からノードCを削除し、更新後DOMツリー400からノード1、2、3を削除することにより、削除後DOMツリーを生成する。図13は、削除後DOMツリーを示す図である。同図に示すように、削除後DOMツリー500は、ルートノードAと、当該ルードノードAの子ノードとしてのノードB及びノードDにより構成される。   Here, since the combination of the item number 90 shown in FIG. 10 is determined as the optimum combination, the pre-update difference node is the node C, and the post-update difference nodes are the nodes 1, 2, and 3. Therefore, the difference generation unit 17 deletes the node C from the pre-update DOM tree 300 in FIG. 9 and deletes the nodes 1, 2, and 3 from the post-update DOM tree 400, thereby generating the post-deletion DOM tree. FIG. 13 is a diagram showing a post-deletion DOM tree. As shown in the figure, the post-deletion DOM tree 500 includes a root node A, and nodes B and D as child nodes of the node A.

次に、差分生成部17は、削除後DOMツリー500のノードAとノードBからなる親子ノードに着目し、当該親子ノードに削除前は更新後差分ノードとしてのノード1が存在していたため、ノードAとノードBの間にノード1が挿入されることを認識する。また、差分生成部17は、削除後DOMツリー500のノードAとノードDからなる親子ノードに着目し、当該親子ノードに削除前は更新前差分ノードとしてのノードCと更新後差分ノードとしてのノード2が存在していたため、ノードCがノード2に変更されることを認識する。更に、差分生成部17は、一致ノードで挟まれていない更新後差分ノードであるノード3について、ノードCの第1子ノードとして追加されることを認識する。   Next, the difference generation unit 17 pays attention to the parent-child node composed of the node A and the node B of the post-deletion DOM tree 500, and the node 1 as the post-update difference node exists before the deletion in the parent-child node. It recognizes that node 1 is inserted between A and node B. Further, the difference generation unit 17 pays attention to the parent-child node composed of the node A and the node D of the post-deletion DOM tree 500, and before the deletion, the node C as the pre-update difference node and the node as the post-update difference node. Since node 2 exists, node C is recognized as being changed to node 2. Further, the difference generation unit 17 recognizes that the node 3 that is the updated difference node that is not sandwiched between the matching nodes is added as the first child node of the node C.

次に、差分生成部17は、図14に示すように、ノードAとノードBの間にノード1が挿入されることに対応して、基準ノード及び相対位置がノード1の親ノードであるノードAのXPathであり、ノード情報が挿入されるノード1のタイプと名前を示す情報である差分情報を生成する。また、差分生成部17は、ノードCがノード2に変更されることに対応して、基準ノード及び相対位置が変更前のノードであるノードCのXPathであり、ノード情報が変更後のノードであるノード2のタイプと名前を示す情報である差分情報を生成する。更に、差分生成部17は、ノードCの第1子ノードとしてのノード3が追加されることに対応して、基準ノードがノード3の親ノードであるノードCのXPathであり、相対位置が基準ノードであるノードCの第1子ノードであることを示す情報であり、ノード情報が追加されるノード3のタイプと名前を示す情報である差分情報を生成する。   Next, as illustrated in FIG. 14, the difference generation unit 17 corresponds to the insertion of the node 1 between the node A and the node B, and the node whose relative position is the parent node of the node 1 Difference information which is an XPath of A and which indicates the type and name of the node 1 into which the node information is inserted is generated. Further, the difference generation unit 17 corresponds to the change of the node C to the node 2, and the reference node and the relative position are the XPath of the node C that is the node before the change, and the node information is the node after the change. Difference information that is information indicating the type and name of a certain node 2 is generated. Further, the difference generation unit 17 corresponds to the addition of the node 3 as the first child node of the node C, and the reference node is the XPath of the node C that is the parent node of the node 3, and the relative position is the reference Difference information that is information indicating the first child node of the node C, which is a node, and indicating the type and name of the node 3 to which the node information is added is generated.

差分情報の生成後、差分生成部17は、生成した差分情報の基準ノードに着目し、同一の基準ノードを有する差分情報を1つの差分情報にまとめる(差分情報のマージ)。ここでは、図14に示す差分情報が生成されているため、差分生成部17は、基準ノードがノードCのXPathである2つの差分情報を、図15に示すように1つの差分情報にまとめる。   After generating the difference information, the difference generation unit 17 pays attention to the reference node of the generated difference information, and combines the difference information having the same reference node into one difference information (merging difference information). Here, since the difference information shown in FIG. 14 is generated, the difference generation unit 17 combines two pieces of difference information whose reference node is the XPath of the node C into one piece of difference information as shown in FIG.

このようにして差分情報を生成すると、次に、差分生成部17は、これら生成した差分情報に基づいて、XSLTデータを生成する。図16は、図14のノードAとノードBの間にノード1が挿入されることに対応した差分情報と、図15のマージ後の差分情報に基づいて生成されるXSLTデータを示す。   Once the difference information is generated in this way, the difference generation unit 17 generates XSLT data based on the generated difference information. 16 shows XSLT data generated based on difference information corresponding to insertion of node 1 between node A and node B in FIG. 14 and difference information after merging in FIG.

上述した第4のXSLTデータ生成方法によれば、更新前と更新後で一致しないノードの組み合わせを容易に特定することができ、その組み合わせに基づいて、差分データを生成することにより、挿入、追加、削除、変更等の対象となるノードの情報のみをXSLTデータに含ませることができ、XSLTデータ内の情報を必要最小限とすることができる。   According to the fourth XSLT data generation method described above, a combination of nodes that do not match before and after the update can be easily identified, and insertion and addition are performed by generating difference data based on the combination. Only the information of the nodes to be deleted, changed, etc. can be included in the XSLT data, and the information in the XSLT data can be minimized.

このように、本実施形態のXMLデータ更新システム1では、移動機30に提供されるXMLデータが更新される際、オリジンサーバ10は、更新前のXMLデータと更新後のXMLデータとの差分を表すXSLTデータを生成し、移動機30へ送信し、当該移動機30は、このXSLTデータに基づいて、保持している更新前のXMLデータを更新し、更新後のXMLデータを保持する。   As described above, in the XML data update system 1 of the present embodiment, when the XML data provided to the mobile device 30 is updated, the origin server 10 calculates the difference between the XML data before the update and the XML data after the update. XSLT data to be expressed is generated and transmitted to the mobile device 30. The mobile device 30 updates the pre-update XML data and holds the post-update XML data based on the XSLT data.

即ち、オリジンサーバ10は、移動機30に対して、更新後のXMLデータの全体を送信するのではなく、更新前のXMLデータと更新後のXMLデータとの差分のデータをXSLT形式で生成して送信するだけで良い。このため、できるだけ少ないデータ量で移動機30側のXMLデータを更新することができ、通信ネットワークの混雑を防止するとともに、オリジンサーバ10と移動機30との間でのXMLデータの不一致期間を短縮することが可能となる。   That is, the origin server 10 does not transmit the entire updated XML data to the mobile device 30, but generates difference data between the XML data before the update and the XML data after the update in the XSLT format. Just send it. For this reason, the XML data on the mobile device 30 side can be updated with as little data as possible, preventing congestion of the communication network and shortening the inconsistency period of the XML data between the origin server 10 and the mobile device 30. It becomes possible to do.

また、XMLデータは階層構造を有しているため、オリジンサーバ10は、更新前及び更新後のXMLデータの階層構造を表す情報として標準的に用いられているDOMツリーに基づいてXSLTデータを生成することにより、更新前のXMLデータと更新後のXMLデータとの差分を容易に表すことが可能となるとともに、新たにXMLデータの階層構造を表す情報を定める必要がなく、汎用的な利用が可能となる。   In addition, since the XML data has a hierarchical structure, the origin server 10 generates XSLT data based on a DOM tree that is used as standard information representing the hierarchical structure of the XML data before and after the update. By doing so, it becomes possible to easily express the difference between the pre-update XML data and the post-update XML data, and it is not necessary to newly define information representing the hierarchical structure of the XML data, so that it can be used for general purposes. It becomes possible.

上記実施形態において、差分生成部17がXSLTデータ生成手段に対応し、ネットワークインタフェース部11、プロトコル部12及びプッシュメッセージ作成部18がXSLTデータ送信手段に対応する。   In the above embodiment, the difference generation unit 17 corresponds to the XSLT data generation unit, and the network interface unit 11, the protocol unit 12, and the push message generation unit 18 correspond to the XSLT data transmission unit.

上述の如く、本願実施例によれば、サーバは、クライアントに対して、更新後の構造化文書データの全体を送信するのではなく、更新前の構造化文書データと更新後の構造化文書データとの差分のデータを生成して送信するだけで良い。このため、できるだけ少ないデータ量でクライアント側の構造化文書データを更新することができ、通信ネットワークの混雑を防止するとともに、サーバとクライアントとの間での構造化文書データの不一致期間を短縮することが可能となる。   As described above, according to the embodiment of the present invention, the server does not transmit the entire structured document data after the update to the client, but the structured document data before the update and the structured document data after the update. It is only necessary to generate and transmit the difference data. For this reason, structured document data on the client side can be updated with as little data as possible, preventing congestion of the communication network and shortening the inconsistency period of structured document data between the server and the client. Is possible.

また、本願実施例によれば、更新前及び更新後の構造化文書データの階層構造を表す階層情報に基づいて差分データを生成することにより、更新前の構造化文書データと更新後の構造化文書データとの差分を容易に表すことが可能となる。   In addition, according to the embodiment of the present application, by generating difference data based on hierarchical information representing the hierarchical structure of the structured document data before and after the update, the structured document data before the update and the structured data after the update are generated. Differences from document data can be easily expressed.

また、本願実施例によれば、更新前の構造化文書データと更新後の構造化文書データとの間に異なる要素が存在した場合に、その異なる要素とその配下の要素とを差分とみなして差分データを生成するため、探索に要する時間を短縮し、迅速に差分データを生成することができる。   Further, according to the embodiment of the present invention, when different elements exist between the structured document data before update and the structured document data after update, the different elements and the subordinate elements are regarded as differences. Since the difference data is generated, the time required for the search can be shortened and the difference data can be generated quickly.

また、本願実施例によれば、更新前の構造化文書データの階層情報に基づく第1の2次元配列と、更新後の構造化文書データの階層情報に基づく第2の2次元配列との一致の度合に基づいて、差分データを生成することにより、挿入、追加、削除、変更等の対象となる要素の情報のみを差分データに含ませることができ、差分データ内の情報を必要最小限とすることができる。   Further, according to the embodiment of the present application, the first two-dimensional array based on the hierarchical information of the structured document data before the update matches the second two-dimensional array based on the hierarchical information of the structured document data after the update. By generating the difference data based on the degree of, only the information of the elements that are the target of insertion, addition, deletion, change, etc. can be included in the difference data, and the information in the difference data is kept to the minimum necessary can do.

また、本願実施例によれば、更新前の構造化文書データの階層情報に基づく部品と、更新後の構造化文書データの階層情報に基づく部品との対応付けの結果に基づいて、差分データを生成することにより、上記実施例と同様、挿入、追加、削除、変更等の対象となる要素の情報のみを差分データに含ませることができ、差分データ内の情報を必要最小限とすることができる。   Further, according to the embodiment of the present application, based on the result of the correspondence between the parts based on the hierarchical information of the structured document data before the update and the parts based on the hierarchical information of the structured document data after the update, the difference data is obtained. By generating the same as in the above embodiment, only the information of the element to be inserted, added, deleted, changed, etc. can be included in the difference data, and the information in the difference data can be minimized. it can.

また、本願実施例によれば、更新前と更新後で一致しない要素の組み合わせを容易に特定することができ、この組み合わせに基づいて、差分データを生成することにより、上記実施例と同様、挿入、追加、削除、変更等の対象となる要素の情報のみを差分データに含ませることができ、差分データ内の情報を必要最小限とすることができる。   Further, according to the embodiment of the present application, it is possible to easily identify a combination of elements that do not match before and after the update, and by generating difference data based on this combination, the insertion is performed as in the above-described embodiment. Only the information on the elements to be added, deleted, changed, etc. can be included in the difference data, and the information in the difference data can be minimized.

また、本願実施例によれば、構造化文書データがXMLデータの場合、更新前のXMLデータと更新後のXMLデータの差分は、XSLTデータにより表すことができ、DOMツリーは、XMLデータの階層構造を表す情報として標準的に用いられているため、DOMツリーを利用して差分データであるXSLTデータを生成することにより、新たにXMLデータの階層構造を表す階層情報を定める必要がなく、本発明の汎用的な利用が可能となる。   Further, according to the embodiment of the present invention, when the structured document data is XML data, the difference between the XML data before the update and the XML data after the update can be expressed by the XSLT data, and the DOM tree is a hierarchy of the XML data. Since it is used as standard information representing the structure, it is not necessary to newly define hierarchical information representing the hierarchical structure of XML data by generating XSLT data that is differential data using a DOM tree. The invention can be used for general purposes.

以下、本発明により教示される手段を例示的に列挙する。   Hereinafter, the means taught by the present invention will be listed as an example.

(1) サーバからクライアントへ提供される、1又は複数の要素を構造化して構成される構造化文書データを更新する構造化文書データ更新方法において、
前記サーバは、
更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを生成し、
前記生成した差分データを前記クライアントへ送信し、
前記クライアントは、
前記サーバから送信される差分データに基づいて、保有する構造化文書データを更新するようにした構造化文書データ更新方法。
(1) In a structured document data update method for updating structured document data configured by structuring one or more elements provided from a server to a client,
The server
Generate difference data that represents the difference between the structured document data before the update and the structured document data after the update,
Sending the generated difference data to the client;
The client
A structured document data updating method for updating structured document data held based on difference data transmitted from the server.

(2) サーバからクライアントへ提供される、1又は複数の要素を構造化して構成される構造化文書データを更新する構造化文書データ更新方法において、
前記サーバは、
更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを生成し、
前記生成した差分データを前記クライアントへ送信し、前記クライアントにおいて、該差分データに基づいて、保有する構造化文書データが更新されるようにした構造化文書データ更新方法。
(2) In a structured document data update method for updating structured document data configured by structuring one or more elements provided from a server to a client,
The server
Generate difference data that represents the difference between the structured document data before the update and the structured document data after the update,
A structured document data updating method in which the generated difference data is transmitted to the client, and the structured document data held by the client is updated based on the difference data.

(3) 上記(2)に記載の構造化文書データ更新方法において、
更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを生成する際に、前記更新前及び更新後の構造化文書データの階層構造を表す階層情報に基づいて生成するようにした構造化文書データ更新方法。
(3) In the structured document data update method described in (2) above,
When generating difference data representing the difference between structured document data before update and structured document data after update, generated based on hierarchical information representing the hierarchical structure of the structured document data before and after update Structured document data update method to be done.

(4) 上記(3)に記載の構造化文書データ更新方法において、
前記更新前の構造化文書データの階層情報と、前記更新後の構造化文書データの階層情報とに基づいて、前記更新前及び更新後の構造化文書データを構成する最上位の要素から配下の要素に向けて探索し、
異なる要素が存在した場合に、該異なる要素とその配下の要素とを差分とした差分データを生成するようにした構造化文書データ更新方法。
(4) In the structured document data update method described in (3) above,
Based on the hierarchical information of the structured document data before the update and the hierarchical information of the structured document data after the update, subordinate from the highest element constituting the structured document data before and after the update Explore towards the element,
A structured document data update method in which, when different elements exist, difference data is generated by making a difference between the different elements and the subordinate elements.

(5) 上記(3)に記載の構造化文書データ更新方法において、
前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素を第1の2次元配列に展開するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素を第2の2次元配列に展開し、
前記第1の2次元配列の各列と前記第2の2次元配列の各列との一致の度合を検出し、
前記一致の度合に基づいて、前記差分データを生成するようにした構造化文書データ更新方法。
(5) In the structured document data update method described in (3) above,
Based on the hierarchical information of the structured document data before update, the elements constituting the structured document data before update are expanded into a first two-dimensional array, and the hierarchical information of the structured document data after update To expand the elements constituting the updated structured document data into a second two-dimensional array,
Detecting the degree of matching between each column of the first two-dimensional array and each column of the second two-dimensional array;
A structured document data updating method for generating the difference data based on the degree of matching.

(6) 上記(3)に記載の構造化文書データ更新方法において、
前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素と該要素の直下の要素とを特定する第1の部品を生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素と該要素の直下の要素とを特定する第2の部品を生成し、
前記第1及び第2の部品の対応付けを行い、
前記対応付けの結果に基づいて、前記差分データを生成するようにした構造化文書データ更新方法。
(6) In the structured document data update method described in (3) above,
Based on the hierarchical information of the structured document data before the update, a first part that identifies the element constituting the structured document data before the update and the element immediately below the element is generated, and after the update Based on the hierarchical information of the structured document data, a second component that identifies the element constituting the updated structured document data and the element immediately below the element is generated,
Associating the first and second parts;
A structured document data update method for generating the difference data based on the result of the association.

(7) 上記(3)に記載の構造化文書データ更新方法において、
前記更新前の構造化文書データの階層情報に基づいて、更新前の要素の構成パターンを要素がない場合を含め、最上位の要素を除外して生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、更新後の要素の構成パターンを要素がない場合を含め、最上位の要素を除外して生成し、
前記生成した更新前の要素の構成パターンの全てと更新後の要素の構成パターンの全てとを組み合わせ、
前記各組み合わせにおいて、更新前の構造化文書を構成するノードから該組み合わせに対応する更新前の要素の構成パターンを削除するとともに、更新後の構造化文書を構成するノードから該組み合わせに対応する更新後の要素の構成パターンを削除し、
前記削除後の更新前の構造化文書を構成するノードと更新後の構造化文書を構成するノードとにおいて、一致する要素が最も多い前記組み合わせに基づいて、前記差分データを生成するようにした生成するようにした構造化文書データ更新方法。
(7) In the structured document data update method described in (3) above,
Based on the hierarchical information of the structured document data before the update, the configuration pattern of the element before the update is generated by excluding the highest element including the case where there is no element, and the structured document data after the update Based on the hierarchy information of, generate the updated element configuration pattern excluding the top element, including the case where there is no element,
Combining all of the generated element configuration patterns before update and all of the updated element configuration patterns,
In each of the combinations, the configuration pattern of the pre-update element corresponding to the combination is deleted from the node constituting the pre-update structured document, and the update corresponding to the combination from the node constituting the post-update structured document Delete the configuration pattern of the later elements,
Generation in which the difference data is generated based on the combination having the largest number of matching elements in the node constituting the structured document before update after deletion and the node constituting the structured document after update Structured document data update method to be done.

(8) 上記(3)乃至(7)の何れかに記載の構造化文書データ更新方法において、
前記構造化文書はXMLデータであり、前記差分データはXSLTデータであり、前記階層情報はDOMツリーである構造化文書データ更新方法。
(8) In the structured document data update method described in any of (3) to (7) above,
The structured document data update method, wherein the structured document is XML data, the difference data is XSLT data, and the hierarchy information is a DOM tree.

(9) クライアントへ1又は複数の要素を構造化して構成される構造化文書データを提供する情報提供サーバにおいて、
更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを生成する差分データ生成手段と、
前記生成された差分データを前記クライアントへ送信する差分データ送信手段と、
を備える情報提供サーバ。
(9) In an information providing server that provides structured document data configured by structuring one or more elements to a client,
Difference data generation means for generating difference data representing the difference between the structured document data before update and the structured document data after update;
Differential data transmission means for transmitting the generated differential data to the client;
An information providing server comprising:

(10) 上記(9)に記載の情報提供サーバにおいて、
前記差分データ生成手段は、前記更新前及び更新後の構造化文書データの階層構造を表す階層情報に基づいて、前記差分データを生成するようにした情報提供サーバ。
(10) In the information providing server described in (9) above,
The information providing server, wherein the difference data generating means generates the difference data based on hierarchical information representing a hierarchical structure of the structured document data before and after the update.

(11) 上記(10)に記載の情報提供サーバにおいて、
前記差分データ生成手段は、
前記更新前の構造化文書データの階層情報と、前記更新後の構造化文書データの階層情報とに基づいて、前記更新前及び更新後の構造化文書データを構成する最上位の要素から配下の要素に向けて探索し、
異なる要素が存在した場合に、該異なる要素とその配下の要素とを差分とした差分データを生成するようにした情報提供サーバ。
(11) In the information providing server described in (10) above,
The difference data generating means
Based on the hierarchical information of the structured document data before the update and the hierarchical information of the structured document data after the update, subordinate from the highest element constituting the structured document data before and after the update Explore towards the element,
An information providing server configured to generate difference data in which, when different elements exist, the difference between the different elements and their subordinate elements.

(12) 上記(10)に記載の情報提供サーバにおいて、
前記差分データ生成手段は、
前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素を第1の2次元配列に展開するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素を第2の2次元配列に展開し、
前記第1の2次元配列の各列と前記第2の2次元配列の各列との一致の度合を検出し、
前記一致の度合に基づいて、前記差分データを生成するようにした情報提供サーバ。
(12) In the information providing server described in (10) above,
The difference data generating means
Based on the hierarchical information of the structured document data before update, the elements constituting the structured document data before update are expanded into a first two-dimensional array, and the hierarchical information of the structured document data after update To expand the elements constituting the updated structured document data into a second two-dimensional array,
Detecting the degree of matching between each column of the first two-dimensional array and each column of the second two-dimensional array;
An information providing server configured to generate the difference data based on the degree of matching.

(13) 上記(10)に記載の情報提供サーバにおいて、
前記差分データ生成手段は、
前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素と該要素の直下の要素とを特定する第1の部品を生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素と該要素の直下の要素とを特定する第2の部品を生成し、
前記第1及び第2の部品の対応付けを行い、
前記対応付けの結果に基づいて、前記差分データを生成するようにした情報提供サーバ。
(13) In the information providing server described in (10) above,
The difference data generating means
Based on the hierarchical information of the structured document data before the update, a first part that identifies the element constituting the structured document data before the update and the element immediately below the element is generated, and after the update Based on the hierarchical information of the structured document data, a second component that identifies the element constituting the updated structured document data and the element immediately below the element is generated,
Associating the first and second parts;
An information providing server configured to generate the difference data based on the result of the association.

(14) 上記(10)に記載の情報提供サーバにおいて、
前記差分データ生成手段は、
前記更新前の構造化文書データの階層情報に基づいて、更新前の要素の構成パターンを要素がない場合を含め、最上位の要素を除外して生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、更新後の要素の構成パターンを要素がない場合を含め、最上位の要素を除外して生成し、
前記生成した更新前の要素の構成パターンの全てと更新後の要素の構成パターンの全てとを組み合わせ、
前記各組み合わせにおいて、更新前の構造化文書を構成するノードから該組み合わせに対応する更新前の要素の構成パターンを削除するとともに、更新後の構造化文書を構成するノードから該組み合わせに対応する更新後の要素の構成パターンを削除し、
前記削除後の更新前の構造化文書を構成するノードと更新後の構造化文書を構成するノードとにおいて、一致する要素が最も多い前記組み合わせに基づいて、前記差分データを生成するようにした生成するようにした情報提供サーバ。
(14) In the information providing server described in (10) above,
The difference data generating means
Based on the hierarchical information of the structured document data before the update, the configuration pattern of the element before the update is generated by excluding the highest element including the case where there is no element, and the structured document data after the update Based on the hierarchy information of, generate the updated element configuration pattern excluding the top element, including the case where there is no element,
Combining all of the generated element configuration patterns before update and all of the updated element configuration patterns,
In each of the combinations, the configuration pattern of the pre-update element corresponding to the combination is deleted from the node constituting the pre-update structured document, and the update corresponding to the combination from the node constituting the post-update structured document Delete the configuration pattern of the later elements,
Generation in which the difference data is generated based on the combination having the largest number of matching elements in the node constituting the structured document before update after deletion and the node constituting the structured document after update An information providing server designed to do this.

(15) 上記(10)乃至(14)の何れかに記載の情報提供サーバにおいて、
前記構造化文書はXMLデータであり、前記差分データはXSLTデータであり、前記階層情報はDOMツリーである情報提供サーバ。
(15) In the information providing server according to any one of (10) to (14),
The information providing server, wherein the structured document is XML data, the difference data is XSLT data, and the hierarchy information is a DOM tree.

XMLデータ更新システムの構成例を示す図である。It is a figure which shows the structural example of an XML data update system. オリジンサーバの詳細な構成例である。It is a detailed structural example of an origin server. 移動機の詳細な構成例である。3 is a detailed configuration example of a mobile device. 履歴ファイルの一例を示す図である。It is a figure which shows an example of a history file. 更新前のXMLデータのDOMツリー及び更新後のXMLデータのDOMツリーの一例を示す図である。It is a figure which shows an example of the DOM tree of the XML data before update, and the DOM tree of the XML data after update. DOMツリーの展開により得られる2次元配列の一例を示す図である。It is a figure which shows an example of the two-dimensional arrangement | sequence obtained by expansion | deployment of a DOM tree. 部品の生成を説明するための図である。It is a figure for demonstrating production | generation of components. 部品データ表の一例を示す図である。It is a figure which shows an example of a components data table. 更新前のXMLデータのDOMツリー及び更新後のXMLデータのDOMツリーの他の例を示す図である。It is a figure which shows the other example of the DOM tree of the XML data before an update, and the DOM tree of the XML data after an update. 更新前のノードの構成パターンと更新後のノードの構成パターンの組み合わせの一例を示す図である。It is a figure which shows an example of the combination of the configuration pattern of the node before update, and the configuration pattern of the node after update. 差分生成部の処理の一例を示すフローチャートである。It is a flowchart which shows an example of a process of a difference production | generation part. 差分情報の項目を示す図である。It is a figure which shows the item of difference information. 削除後DOMツリーの一例を示す図であるIt is a figure which shows an example of the DOM tree after deletion. 差分情報の一例を示す図である。It is a figure which shows an example of difference information. 差分情報の他の例を示す情報である。It is information which shows the other example of difference information. XSLTデータの一例を示す図である。It is a figure which shows an example of XSLT data.

符号の説明Explanation of symbols

1 XMLデータ更新システム
10 オリジンサーバ
11 ネットワークインタフェース部
12 プロトコル部
13 コンテンツ登録サーバ部
14 コンテンツ保存部
15 Webサーバ部
16 更新検出部
17 差分生成部
18 プッシュメッセージ作成部
30 移動機
31 リクエスト作成部
32 プロトコル部
33 ネットワークインタフェース部
34 コンテンツ更新部
35 コンテンツ保存部
40 インターネット
DESCRIPTION OF SYMBOLS 1 XML data update system 10 Origin server 11 Network interface part 12 Protocol part 13 Content registration server part 14 Content storage part 15 Web server part 16 Update detection part 17 Difference production | generation part 18 Push message creation part 30 Mobile device 31 Request creation part 32 Protocol Unit 33 Network interface unit 34 Content update unit 35 Content storage unit 40 Internet

Claims (4)

サーバからクライアントへ提供される、1又は複数の要素を構造化して構成される構造化文書データを更新する構造化文書データ更新方法において、
更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを、更新前後の構造化文書データの階層構造を表す階層情報に基づいて前記サーバにより生成するステップと、
前記生成した差分データを前記クライアントへ送信するステップと、
を有し、前記クライアントにおいて、該差分データに基づいて、保有する構造化文書データが更新され、
前記サーバで前記差分データを生成する際、
前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素と該要素の直下の要素とを特定する第1の部品を生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素と該要素の直下の要素とを特定する第2の部品を生成し、
前記第1の部品各々に含まれる要素及び前記第2の部品各々に含まれる要素の異同を確認し、
前記更新前の構造化文書データの階層構造における要素間の経路であって、ルートの要素から前記第1の部品中の上位の要素に至る第1の部品経路と、前記更新後の構造化文書データの階層構造における要素間の経路であって、ルートの要素から前記第2の部品中の上位の要素に至る第2の部品経路との異同を確認し、
前記第1の部品中の要素及び前記第2の部品中の要素が一致し、且つ前記第1の部品経路及び前記第2の部品経路が異なっていた場合、前記第1の部品は前記第2の部品の位置に移動したことを示す差分データを生成し、
差分データのサイズ及び更新後の構造化文書データのサイズを比較し、サイズの小さい方をクライアントに送信るようにした構造化文書データ更新方法。
In a structured document data update method for updating structured document data configured by structuring one or more elements provided from a server to a client,
Generating difference data representing a difference between structured document data before update and structured document data after update by the server based on hierarchical information representing a hierarchical structure of the structured document data before and after the update;
Transmitting the generated difference data to the client;
In the client, based on the difference data, the held structured document data is updated,
When generating the difference data on the server ,
Based on the hierarchical information of the structured document data before the update, a first part that identifies the element constituting the structured document data before the update and the element immediately below the element is generated, and after the update Based on the hierarchical information of the structured document data, a second component that identifies the element constituting the updated structured document data and the element immediately below the element is generated,
Confirm the difference between the elements included in each of the first parts and the elements included in each of the second parts,
A path between elements in the hierarchical structure of the structured document data before update, the first part path from the root element to an upper element in the first part, and the structured document after update A path between elements in the hierarchical structure of the data, and confirming the difference with the second part path from the root element to the higher order element in the second part,
If the element in the first part and the element in the second part match and the first part path and the second part path are different, the first part is the second part. Generate difference data indicating that it has moved to the position of the part,
Size and comparing the sizes of the structured document data after update, structured document data updating method in so that to send smaller size to a client of the differential data.
前記第1の部品及び前記第2の部品は全体的には異なるが、少なくとも1つの共通する要素を各々が含み、且つ前記第1の部品経路及び前記第2の部品経路が一部異なっていた場合、前記第1の部品中の要素が変更又は削除されたこと及び/又は前記第2の部品中の要素が追加されたことを示す差分データを生成し、The first part and the second part are totally different, but each includes at least one common element, and the first part path and the second part path are partially different A difference data indicating that an element in the first part has been changed or deleted and / or an element in the second part has been added,
前記第2の部品中の要素の内、前記第1の部品中の要素に該当しない要素についての差分データは、追加を示し、  The difference data for an element not corresponding to the element in the first part among the elements in the second part indicates addition,
前記第1の部品中の要素の内、前記第2の部品中の要素に該当しない要素についての差分データは、削除を示す、請求項1記載の更新方法。  The update method according to claim 1, wherein difference data for an element that does not correspond to an element in the second part among elements in the first part indicates deletion.
クライアントへ1又は複数の要素を構造化して構成される構造化文書データを提供する情報提供サーバにおいて、
更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを、更新前後の構造化文書データの階層構造を表す階層情報に基づいて生成する差分データ生成手段と、
前記生成された差分データを前記クライアントへ送信する差分データ送信手段と、
を備え、前記差分データ生成手段は、
前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素と該要素の直下の要素とを特定する第1の部品を生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素と該要素の直下の要素とを特定する第2の部品を生成し、
前記第1の部品各々に含まれる要素及び前記第2の部品各々に含まれる要素の異同を確認し、
前記更新前の構造化文書データの階層構造における要素間の経路であって、ルートの要素から前記第1の部品中の上位の要素に至る第1の部品経路と、前記更新後の構造化文書データの階層構造における要素間の経路であって、ルートの要素から前記第2の部品中の上位の要素に至る第2の部品経路との異同を確認し、
前記第1の部品中の要素及び前記第2の部品中の要素が一致し、且つ前記第1の部品経路及び前記第2の部品経路が異なっていた場合、前記第1の部品は前記第2の部品の位置に移動したことを示す差分データを生成し、
差分データのサイズ及び更新後の構造化文書データのサイズを比較し、サイズの小さい方をクライアントに送信るようにした情報提供サーバ。
In an information providing server for providing structured document data configured by structuring one or more elements to a client,
Difference data generation means for generating difference data representing a difference between structured document data before update and structured document data after update based on hierarchical information representing a hierarchical structure of structured document data before and after update;
Differential data transmission means for transmitting the generated differential data to the client;
The difference data generation means includes
Based on the hierarchical information of the structured document data before the update, a first part that identifies the element constituting the structured document data before the update and the element immediately below the element is generated, and after the update Based on the hierarchical information of the structured document data, a second component that identifies the element constituting the updated structured document data and the element immediately below the element is generated,
Confirm the difference between the elements included in each of the first parts and the elements included in each of the second parts,
A path between elements in the hierarchical structure of the structured document data before update, the first part path from the root element to an upper element in the first part, and the structured document after update A path between elements in the hierarchical structure of the data, and confirming the difference with the second part path from the root element to the higher order element in the second part,
If the element in the first part and the element in the second part match and the first part path and the second part path are different, the first part is the second part. Generate difference data indicating that it has moved to the position of the part,
Comparing the size of the size and structure of the updated document data of the differential data, the information providing server you so that to send smaller size to the client.
前記差分データ生成手段は、更に、
前記第1の部品及び前記第2の部品は全体的には異なるが、少なくとも1つの共通する要素を各々が含み、且つ前記第1の部品経路及び前記第2の部品経路が一部異なっていた場合、前記第1の部品中の要素が変更又は削除されたこと及び/又は前記第2の部品中の要素が追加されたことを示す差分データを生成し、
前記第2の部品中の要素の内、前記第1の部品中の要素に該当しない要素についての差分データは、追加を示し、
前記第1の部品中の要素の内、前記第2の部品中の要素に該当しない要素についての差分データは、削除を示す、請求項3記載の情報提供サーバ。
The difference data generation means further includes:
The first part and the second part are totally different, but each includes at least one common element, and the first part path and the second part path are partially different A difference data indicating that an element in the first part has been changed or deleted and / or an element in the second part has been added,
The difference data for an element not corresponding to the element in the first part among the elements in the second part indicates addition,
The information providing server according to claim 3, wherein difference data for an element that does not correspond to an element in the second part among elements in the first part indicates deletion.
JP2008149332A 2008-06-06 2008-06-06 Structured document data update method and information providing server Expired - Fee Related JP4399017B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008149332A JP4399017B2 (en) 2008-06-06 2008-06-06 Structured document data update method and information providing server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008149332A JP4399017B2 (en) 2008-06-06 2008-06-06 Structured document data update method and information providing server

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2002050441A Division JP4153219B2 (en) 2002-02-26 2002-02-26 Structured document data update method and information providing server

Publications (2)

Publication Number Publication Date
JP2008293506A JP2008293506A (en) 2008-12-04
JP4399017B2 true JP4399017B2 (en) 2010-01-13

Family

ID=40168103

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008149332A Expired - Fee Related JP4399017B2 (en) 2008-06-06 2008-06-06 Structured document data update method and information providing server

Country Status (1)

Country Link
JP (1) JP4399017B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011089683A1 (en) * 2010-01-19 2011-07-28 富士通株式会社 Analysis method, analysis device, and analysis program
JP6011790B2 (en) * 2012-10-18 2016-10-19 バーチャレクス・コンサルティング株式会社 File management apparatus and computer program
US20240012981A1 (en) * 2020-11-04 2024-01-11 Nippon Telegraph And Telephone Corporation Display control system, display control method, and display control program

Also Published As

Publication number Publication date
JP2008293506A (en) 2008-12-04

Similar Documents

Publication Publication Date Title
US8429526B2 (en) Efficient evaluation for diff of XML documents
US8201081B2 (en) Systems and methods for processing inoperative document links
CA2610208C (en) Learning facts from semi-structured text
JP4704750B2 (en) Link generation system
US20080082571A1 (en) System and Method for Transforming Tabular Form Date into Structured Document
US20070124318A1 (en) System and method for schemaless data mapping with nested tables
JP4489029B2 (en) Structured document search system and structured document search method
US20150006623A1 (en) Method and System for Transmitting Network File
US8082493B2 (en) Streaming XML patch
US20150067037A1 (en) Communication apparatus and communication method
US20090240675A1 (en) Query translation method and search device
WO2016201988A1 (en) Configuration data pushing method and apparatus
US8117186B2 (en) Database processing apparatus, information processing method, and computer program product
JP4399017B2 (en) Structured document data update method and information providing server
CN111984732B (en) Method, node and blockchain network for implementing decentralization search on blockchain
CN107295060B (en) Device, method, and computer-readable medium for Content Delivery Network (CDN)
JP4320004B2 (en) XPath processing method, XPath processing device, XPath processing program, and storage medium storing the program
CN104052774B (en) A kind of data transmission method and system
CN108614808A (en) The composition method and composing device of XML document
US20070101127A1 (en) Method of digitally signing data and a data repository storing digitally signed data
JP4153219B2 (en) Structured document data update method and information providing server
JP2006252384A (en) Retrieval system, retrieval server and network server
Park et al. A Study on the Link Server Development Using B-Tree Structure in the Big Data Environment
JP2012059212A (en) Extraction apparatus, extraction method and extraction program
US20110055279A1 (en) Application server, object management method, and object management program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090427

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: 20091020

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091023

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

Free format text: PAYMENT UNTIL: 20121030

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20131030

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees