JP4399017B2 - Structured document data update method and information providing server - Google Patents
Structured document data update method and information providing server Download PDFInfo
- 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
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
このXMLデータ更新システム1では、移動機30に提供されるXMLデータが更新される際、オリジンサーバ10は、更新前のXMLデータと更新後のXMLデータとの差分を表す差分データとしてのXSLTデータを生成し、移動機30へ送信する。移動機30は、このXSLTデータに基づいて、保持している更新前のXMLデータを更新し、更新後のXMLデータを保持する。
In the XML
図2は、オリジンサーバ10の詳細な構成例である。同図に示すオリジンサーバ10は、コンテンツであるXMLデータの登録処理、クライアントである移動機30に対するXMLデータの配信処理、及びXMLデータが更新された場合に更新前のXMLデータと更新後のXMLデータとの差分を表すXSLTデータを生成し、移動機30へ提供する処理を行う。
FIG. 2 is a detailed configuration example of the
このオリジンサーバ10は、ネットワークインタフェース部11、プロトコル部12、コンテンツ登録サーバ部13、コンテンツ保存部14、Webサーバ部15、更新検出部16、差分生成部17及びプッシュメッセージ作成部18を備える。
The
図3は、移動機30の詳細な構成例である。同図に示す移動機30は、オリジンサーバ10からのXMLデータの取得処理と、オリジンサーバ10からのXSLTデータに基づくXMLデータの更新処理とを行う。
FIG. 3 is a detailed configuration example of the
この移動機30は、リクエスト作成部31、プロトコル部32、ネットワークインタフェース部33、コンテンツ制御部34及びコンテンツ保存部35を備える。
The
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
プロトコル部12は、パケットを取得すると、XMLデータを復原してコンテンツ登録サーバ13へ出力する。コンテンツ登録サーバ部13は、XMLデータを登録するためのFTPサーバアプリケーションによってXMLデータを受信し、外部装置からXMLデータが送信される毎に、そのXMLデータをコンテンツ保存部14に登録する。
When acquiring the packet, the
なお、コンテンツ保存部14にあるXMLデータが既に登録されている場合に、更に、外部装置がそのXMLデータを更新したXMLデータを送信した場合には、コンテンツ登録サーバ部13は、既に登録されているXMLデータを削除や上書きすることなく、更新したXMLデータを登録するようにする。また、XMLデータが複数回更新された場合には、コンテンツ登録サーバ部13は、最新のXMLデータを新たに登録する。更新された古いXMLデータの保存数は予め決められており、この数を超えた場合には、古いXMLデータから順に削除される。従って、コンテンツ保存部14には、更新前のXMLデータと、更新後のXMLデータの双方が登録されることになる。
If the XML data in the
また、コンテンツ登録サーバ部13は、登録したXMLデータに対応する履歴ファイルを生成し、XMLデータに対応付けてコンテンツ保存部14に登録する。図4は、履歴ファイルの一例を示す図である。同図に示す履歴ファイルは、対応するXMLデータの登録日時、データ名及び対応するURL(uniform resource locator)により構成される。これらの情報のうち、登録日時は、更新したXMLデータが登録される毎に、書き換えられる。
Further, the content
オリジンサーバ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
オリジンサーバ10内のプロトコル部12は、ネットワークインタフェース部11を介して、このパケットを取得すると、HTTPリクエストを復原してWebサーバ部15へ出力する。
When the
Webサーバ部15は、HTTPリクエストを取得すると、XMLデータを配信するためのHTTPサーバアプリケーション等を起動して、HTTPリクエスト内のURLを抽出し、更に移動機30が差分データの転送要求を行っているか否かを判定する。次に、Webサーバ部15は、コンテンツ保存部14に登録されている履歴ファイルを検索する。もし、その履歴ファイルの登録日時が差分データの転送要求メッセージに含まれる、移動機キャッシュデータの登録日時よりも新しい日時であった場合には、XMLデータが更新されたということであるから、Webサーバ部15は、差分生成部17に対してXSLTデータの生成を要求する。
When acquiring the HTTP request, the
差分生成部17は、移動機キャッシュデータの登録日時に対応する古いXMLデータと更新後のXMLデータとの差分に応じたXSLTデータを生成する。次に、差分生成部17は、その生成したXSLTデータをWebサーバ部15へ送る。Webサーバ部15は、差分生成部17から受信したXSLTデータをHTTPリプライに包含して出力する。もし、差分生成部17がXSLTデータの生成を失敗した場合には、更新後のXMLデータをコンテンツ保存部14から読み出し、XSLTデータでなく、この更新後のXMLデータをHTTPリプライに包含して出力する。
The
なお、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
プロトコル部12は、Webサーバ部15によって出力されたXMLデータを含むHTTPリプライを通信プロトコルに応じたパケットに分割し、ネットワークインタフェース部11及びインターネット40を介して移動機30へ送信する。
The
移動機30内のプロトコル部32は、このパケットを受信すると、XMLデータを復原し、コンテンツ制御部34へ出力する。コンテンツ制御部34は、取得したXMLデータをコンテンツ保存部35に格納する。
Upon receiving this packet, the
また、オリジンサーバ10内の更新検出部16は、逐次、コンテンツ保存部14に登録されているXMLデータが更新されたか否かを判定する。具体的には、更新検出部16は、履歴ファイルの登録日時が更新されたか否かを判定し、更新された場合には、その履歴ファイルに対応するXMLデータが更新されたものと判断する。
Further, the
XMLデータが更新されている場合には、更新検出部16は、更新前のXMLデータと更新後のXMLデータとをコンテンツ保存部14から読み出して差分生成部17へ出力する。
If the XML data has been updated, the
差分生成部17は、入力した更新前のXMLデータと更新後のXMLデータとの差分を表すXSLTデータを生成する。XSLTデータの詳細な生成方法は、後述する。差分生成部17は、生成したプッシュメッセージ作成部18へ出力する。
The
なお、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
プッシュメッセージ作成部18は、入力したXSLTデータあるいは更新後のXMLデータを包含したプッシュメッセージを作成し、出力する。このプッシュメッセージは、プロトコル部12によって通信プロトコルに応じたパケットに分割され、ネットワークインタフェース11及びインターネット40を介して移動機30へ送信される。
The push
移動機30内のプロトコル部32は、このパケットを受信すると、プッシュメッセージを復原し、コンテンツ更新部34へ出力する。コンテンツ更新部34は、取得したプッシュメッセージに基づいて、コンテンツ保存部35に格納されているXMLデータを更新する。
When the
次に、差分生成部17によるXSLTデータの詳細な生成方法を説明する。図5は、更新前のXMLデータのDOMツリー及び更新後のXMLデータのDOMツリーの一例を示す図である。同図に示すDOMツリー100は、更新前のXMLデータの階層構造を表す。同様に、DOMツリー200は、更新後のXMLデータの階層構造を表す。
Next, a detailed generation method of the XSLT data by the
更新前の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
差分生成部17は、更新前DOMツリー100と更新後DOMツリー200とを比較したときに、各ノードについてXPath及び子ノード内の順位が異なっている場合には、XSLTデータにその旨の情報を含ませる必要がある。
When the
以下、第1実施例乃至第3実施例においては、図5に示す更新前DOMツリー100及び更新後DOMツリー200を例に説明する。
(第1実施例)
まず、更新前のXMLデータのDOMツリーと更新後のXMLデータのDOMツリーとを、ルートノードから配下のノードに向けて探索し、異なるノードが存在した場合に、当該異なるノードとその配下のサブツリー(部分木)とを差分としたXSLTデータを生成する方法(第1のXSLTデータ生成方法)について説明する。
Hereinafter, in the first to third embodiments, the
(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
ここでは、差分生成部17は、変更前DOMツリー100を基準として探索すると、ノードBとその配下のサブツリーが削除されたことを認識する。また、差分生成部17は、ノードDとその配下のサブツリーが削除され、ノードFとその配下のサブツリーが削除されたことを認識する。
Here, when the
一方、差分生成部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
次に、差分生成部17は、上述した削除されたノード及び追加されたノードの情報を用いて、差分情報としてのXSLTデータを生成する。
Next, the
具体的には、差分生成部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
また、差分生成部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
上述した第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
図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-
次に、差分生成部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
次に、差分生成部17は、導出した順列を比較することにより、更新前2次元配列の各列と送信後2次元配列の各列とについて、一致の度合が高い列同士を対応させる。
Next, the
ここでは、差分生成部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
このように、更新前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
列の入れ替えが生じている場合、差分生成部17は、その旨を示す差分情報としてのXSLTデータを生成する。
When the replacement of columns occurs, the
次に、差分生成部17は、対応させた2つの列が完全一致していないものについて差異を検出し、その差異に基づいて、ノードの変更、挿入を認識するとともに、その挿入位置を弟ノードや兄ノードにより認識する。
Next, the
ここでは、上述した対応付けにより得られた、更新前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-
このため、差分生成部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
次に、差分生成部17は、更新前2次元配列の各列のうち、対応付けされていないもののノードの削除を認識する。ここでは、差分生成部17は、更新前2次元配列101において、対応付けされていない第5列のノードA、Dのうち、ルートノードAを除くノードDが削除されることを認識する。
Next, the
次に、差分生成部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
このようにして、ノードの変更、挿入、挿入位置、削除、追加及び追加位置を認識した後、差分生成部17は、これらの情報を集約し、差分情報としてのXSLTデータを生成する。
After recognizing node changes, insertions, insertion positions, deletions, additions, and addition positions in this way, the
ここでは、差分生成部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
また、差分生成部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
また、差分生成部17は、更新後2次元配列201の第5列のノード5、6が追加されており、ノード6の弟ノードのXPathがA/C/5/Fであることに基づいて、ノード5の直下におけるノードFの兄ノードとしてのノード6の追加を示す情報を上記生成したXSLTデータに追加する。更に、差分生成部17は、ノードDの削除を示す情報を上記生成したXSLTデータに追加する。
In addition, the
上述した第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
図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
一方、更新後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
図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
ここでは、差分生成部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
また、差分生成部17は、更新前部品データ表102内の第5行の部品115と、部品データ表202内の第6行の部品216がともに親ノードG、子ノードJからなる部品であるため、これらの部品115、216を対応付ける。更に、差分生成部17は、部品115に対応するXPathであるA/C/Gと、部品216に対応するXPathA/C/Gとを比較し、これらが一致していることを認識する。
Further, in the
次に、差分生成部17は、部品は完全一致するが、その部品に対応するXPathが異なる対応付けに基づいて、ノードの移動を示す情報を生成する。ここでは、部品114と部品217は完全一致するが、これら部品に対応するXPathはA/C/FとA/C/5/Fであり、異なっている。このため、差分生成部17は、親ノードFがノードCの直下からノード5の直下であってノード6の弟ノードとしての位置に移動し、子ノードH、Iもそれに伴って移動することを示す情報を生成する。
Next, the
次に、差分生成部17は、差分生成部17は、更新前部品データ表の部品と、更新後部品データ表の部品とを比較し、ノードが部分一致する部品を対応付けする。
Next, the
ここでは、差分生成部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
次に、差分生成部17は、上記の部分一致する部品の対応付けと、その部品に対応するXPathとに基づいて、ノードの変更、追加、削除を示す情報を生成する。
Next, the
ここでは、差分生成部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
次に、差分生成部17は、更新前部品データ表のうち対応付けされていない部品の追加を示す情報と、更新後部品データ表のうち対応付けされていない部品の削除を示す情報を生成する。
Next, the
ここでは、更新前部品データ表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
このため、差分生成部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
次に、差分生成部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
このような集約の結果、ノードの移動、変更、追加、挿入、削除を示す情報は、ノード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
上述した第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
差分生成部17は、まず、更新前DOMツリーと更新後DOMツリーとに基づいて、ルートノードに変更がないか否かを判定する。ここでは、図9に示すようにルートノードは、更新前後で変更がなく、ともにノードAである。
The
差分生成部17は、ルートノードが更新前後で変更がないと判断すると、次に更新前DOMツリーに基づいて、更新前のノードの構成パターンをノードがない場合を含め、ルートノードを除外して生成する。
When the
ここでは、更新前の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
ここでは、更新後の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”, “
次に、差分生成部17は、生成した更新前のノードの構成パターンのそれぞれと、更新後のノードの構成パターンのそれぞれとを組み合わせる。ここでは、更新前のノードの構成パターンは8個であり、更新後のノードの構成パターンは32個であるので、これらの組み合わせは図10に示すように256通りとなる。
Next, the
なお、更新前のノード数を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.
その後、差分生成部17は、図11のフローチャートに従った処理を行う。即ち、差分生成部17は、まず更新前のノードの構成パターンのそれぞれと、更新後のノードの構成パターンのそれぞれとの組み合わせから1組を選択する(ステップ101)。
Thereafter, the
次に、差分生成部17は、更新前のXMLデータを構成するノードから選択した組み合わせに含まれる更新前のノードの構成パターンを削除するとともに、更新後のXMLデータを構成するノードから選択した組み合わせに含まれる更新後のノードの構成パターンを削除する(ステップ102)。
Next, the
上述したノードの削除後、差分生成部17は、削除後の更新前のXMLデータのノードと更新後のXMLデータのノードとが一致するか否かを判定する(ステップ103)。
After deleting the node, the
削除後の更新前後のXMLデータのノードが一致する場合、差分生成部17は、一致するノード(削除後の更新前後のXMLデータのノードであり、以下「一致ノード」と称する)と、一致しないノード(選択した組み合わせに含まれるノードであり、以下、当該組み合わせに含まれる更新前のノードの構成パターンとしてのノードを「更新前差分ノード」と称し、当該組み合わせに含まれる更新後のノードの構成パターンとしてのノードを「更新後差分ノード」と称する)とを認識し(ステップ104)、一致ノードの数がこれまでで最大であるか否かを判定する(ステップ105)。
When the nodes of the XML data before and after the update after the deletion match, the
一致ノードの数がこれまでで最大である場合には、差分生成部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
全ての組み合わせについて、上述したステップ102乃至106の調査が終了している場合には、差分生成部17は、一連の処理を終了する。一方、未調査の組み合わせがある場合には、差分生成部17は、その未調査の組み合わせから1組を選択し(ステップ101)、ステップ102以降の処理を繰り返す。
When the above-described investigations in
ここでは、図10に示す項番1乃至256の各組み合わせについて、図11のフローチャートに従った処理を行うと、項番90の組み合わせ(更新前のノードの構成パターンが「ノードC」、更新後のノードの構成パターンが「ノード1・2・3」の組み合わせ)が、ステップ102の処理による削除後の更新前後のXMLデータを構成するノードが何れもノードB、Dで一致し、且つ、一致するノードの数が2個で最大となる。従って、項番90の組み合わせが最適な組み合わせとして決定される。
Here, for each combination of
最適な組み合わせが決定されると、次に、差分生成部17は、認識した差分ノードに基づいて、差分情報を生成する。
When the optimal combination is determined, the
具体的には、差分生成部17は、更新前DOMツリーから最適な組み合わせに含まれる更新前のノードの構成パターンとしての差分ノードを削除した新たな更新前DOMツリーを生成するとともに、更新後DOMツリーから最適な組み合わせに含まれる更新後のノードの構成パターンとしての差分ノードを削除した新たな更新後DOMツリーを生成する。これら新たに生成される2つのDOMツリー(以下「削除後DOMツリー」は一致ノードのみによって構成されるので、同一のDOMツリーとなる。
Specifically, the
次に、差分生成部17は、削除後DOMツリーにおいて、同一の親ノードと子ノードからなる組み合わせ(以下「親子ノード」称する)に着目し、この着目した親子ノードの間に削除前に差分ノードが存在していたか否かを判定する。削除後DOMツリーにおいて着目した親子ノードの間に削除前は更新前差分ノードが存在しており、且つ、更新後差分ノードが存在していたと判定された場合には、これら2つの差分ノードは異なる値となる。このため、差分生成部17は、更新前差分ノードから更新後差分ノードへの変更であると認識する。
Next, the
一方、差分生成部17は、削除後DOMツリーにおいて着目した親子ノードの間に削除前は更新前差分ノードが存在しており、且つ、更新後差分ノードが存在していなかったと判定した場合には、更新前差分ノードの削除であると認識する。また、差分生成部17は、削除後DOMツリーにおいて着目した親子ノードの間に削除前は更新前差分ノードが存在しておらず、且つ、更新後差分ノードが存在していたと判定した場合には、更新後差分ノードの挿入であると認識する。このような手順により、一致ノードに挟まれている差分ノードについて、削除、変更、挿入が決定される。
On the other hand, when the
次に、差分生成部17は、一致ノードで挟まれていない更新前差分ノードについて、当該更新前ノードの削除であると認識するとともに、一致ノードで挟まれていない更新後差分ノードについて、当該更新後差分ノードの追加であると認識する。
Next, the
このようにして、ノードの削除、変更、挿入、追加を認識すると、次に、差分生成部17は、上述した認識結果に基づいて、差分情報を生成する。図12は、差分情報の項目を示す図である。同図に示すように、差分情報は、差分種別、基準ノード、相対位置、ノード情報により構成される。
When the node deletion, change, insertion, and addition are recognized in this way, the
差分種別は、ノードに対する処理が削除、変更、挿入、追加の何れかに該当するかを示す情報である。基準ノードは、差分種別が削除の場合には、その削除されるノードの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
次に、差分生成部17は、削除後DOMツリー500のノードAとノードBからなる親子ノードに着目し、当該親子ノードに削除前は更新後差分ノードとしてのノード1が存在していたため、ノードAとノードBの間にノード1が挿入されることを認識する。また、差分生成部17は、削除後DOMツリー500のノードAとノードDからなる親子ノードに着目し、当該親子ノードに削除前は更新前差分ノードとしてのノードCと更新後差分ノードとしてのノード2が存在していたため、ノードCがノード2に変更されることを認識する。更に、差分生成部17は、一致ノードで挟まれていない更新後差分ノードであるノード3について、ノードCの第1子ノードとして追加されることを認識する。
Next, the
次に、差分生成部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
差分情報の生成後、差分生成部17は、生成した差分情報の基準ノードに着目し、同一の基準ノードを有する差分情報を1つの差分情報にまとめる(差分情報のマージ)。ここでは、図14に示す差分情報が生成されているため、差分生成部17は、基準ノードがノードCのXPathである2つの差分情報を、図15に示すように1つの差分情報にまとめる。
After generating the difference information, the
このようにして差分情報を生成すると、次に、差分生成部17は、これら生成した差分情報に基づいて、XSLTデータを生成する。図16は、図14のノードAとノードBの間にノード1が挿入されることに対応した差分情報と、図15のマージ後の差分情報に基づいて生成されるXSLTデータを示す。
Once the difference information is generated in this way, the
上述した第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
即ち、オリジンサーバ10は、移動機30に対して、更新後のXMLデータの全体を送信するのではなく、更新前のXMLデータと更新後のXMLデータとの差分のデータをXSLT形式で生成して送信するだけで良い。このため、できるだけ少ないデータ量で移動機30側のXMLデータを更新することができ、通信ネットワークの混雑を防止するとともに、オリジンサーバ10と移動機30との間でのXMLデータの不一致期間を短縮することが可能となる。
That is, the
また、XMLデータは階層構造を有しているため、オリジンサーバ10は、更新前及び更新後のXMLデータの階層構造を表す情報として標準的に用いられているDOMツリーに基づいてXSLTデータを生成することにより、更新前のXMLデータと更新後のXMLデータとの差分を容易に表すことが可能となるとともに、新たにXMLデータの階層構造を表す情報を定める必要がなく、汎用的な利用が可能となる。
In addition, since the XML data has a hierarchical structure, the
上記実施形態において、差分生成部17がXSLTデータ生成手段に対応し、ネットワークインタフェース部11、プロトコル部12及びプッシュメッセージ作成部18がXSLTデータ送信手段に対応する。
In the above embodiment, the
上述の如く、本願実施例によれば、サーバは、クライアントに対して、更新後の構造化文書データの全体を送信するのではなく、更新前の構造化文書データと更新後の構造化文書データとの差分のデータを生成して送信するだけで良い。このため、できるだけ少ないデータ量でクライアント側の構造化文書データを更新することができ、通信ネットワークの混雑を防止するとともに、サーバとクライアントとの間での構造化文書データの不一致期間を短縮することが可能となる。 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.
1 XMLデータ更新システム
10 オリジンサーバ
11 ネットワークインタフェース部
12 プロトコル部
13 コンテンツ登録サーバ部
14 コンテンツ保存部
15 Webサーバ部
16 更新検出部
17 差分生成部
18 プッシュメッセージ作成部
30 移動機
31 リクエスト作成部
32 プロトコル部
33 ネットワークインタフェース部
34 コンテンツ更新部
35 コンテンツ保存部
40 インターネット
DESCRIPTION OF
Claims (4)
更新前の構造化文書データと更新後の構造化文書データとの差分を表す差分データを、更新前後の構造化文書データの階層構造を表す階層情報に基づいて前記サーバにより生成するステップと、
前記生成した差分データを前記クライアントへ送信するステップと、
を有し、前記クライアントにおいて、該差分データに基づいて、保有する構造化文書データが更新され、
前記サーバで前記差分データを生成する際、
前記更新前の構造化文書データの階層情報に基づいて、該更新前の構造化文書データを構成する要素と該要素の直下の要素とを特定する第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.
前記第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の部品を生成するとともに、前記更新後の構造化文書データの階層情報に基づいて、該更新後の構造化文書データを構成する要素と該要素の直下の要素とを特定する第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.
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)
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 |
-
2008
- 2008-06-06 JP JP2008149332A patent/JP4399017B2/en not_active Expired - Fee Related
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 |