JP2013175053A - Xml document retrieval device and program - Google Patents

Xml document retrieval device and program Download PDF

Info

Publication number
JP2013175053A
JP2013175053A JP2012039242A JP2012039242A JP2013175053A JP 2013175053 A JP2013175053 A JP 2013175053A JP 2012039242 A JP2012039242 A JP 2012039242A JP 2012039242 A JP2012039242 A JP 2012039242A JP 2013175053 A JP2013175053 A JP 2013175053A
Authority
JP
Japan
Prior art keywords
xml document
sequence
path
search
select
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012039242A
Other languages
Japanese (ja)
Other versions
JP5695586B2 (en
Inventor
Tomohiro Yasuda
知弘 安田
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2012039242A priority Critical patent/JP5695586B2/en
Publication of JP2013175053A publication Critical patent/JP2013175053A/en
Application granted granted Critical
Publication of JP5695586B2 publication Critical patent/JP5695586B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To efficiently retrieve a portion conforming to a complicated retrieval condition in XPath.SOLUTION: An XML document retrieval device analyzes an XML document set to be retrieved, and generates both a sequence S for storing a shape of DOM tree based on structure information for the XML document and a sequence group T consisting of one or more sequences that store a type of structure path corresponding to each node of the DOM tree. Then, the device calculates a portion conforming to the structure path that is a retrieval query, by scanning the sequence S and the sequence group T.

Description

本発明は、複数のXML(Extensible Markup Language)文書から、ユーザが指定した検索条件に合致する箇所を探索する装置及びプログラムに関する。   The present invention relates to an apparatus and a program for searching a location that matches a search condition specified by a user from a plurality of XML (Extensible Markup Language) documents.

データ交換及び蓄積に用いるデータの記述方法として、XMLが広く普及している。XMLを用いることにより、多様なデータを高い自由度で、機械的に処理しやすいテキストフォーマットで記述できる。図1に、XML文書の例を示す。この文書の内容は「<」と「>」で囲まれたタグにより複数の部分に区切られている。タグには、「<タグ名>」の形式で書かれている開始タグ101と、「</タグ名>」の形式で書かれた終了タグ102がある。同じタグ名の開始タグと終了タグで区切られた領域を、要素又はXML要素と呼ぶ。   XML is widely used as a method for describing data used for data exchange and storage. By using XML, various data can be described with a high degree of freedom in a text format that is easy to process mechanically. FIG. 1 shows an example of an XML document. The content of this document is divided into a plurality of parts by tags surrounded by “<” and “>”. The tag includes a start tag 101 written in the format “<tag name>” and an end tag 102 written in the format “</ tag name>”. An area delimited by a start tag and an end tag having the same tag name is called an element or an XML element.

なお、開始タグおよび終了タグに挟まれるタグやテキスト領域がない場合、XMLでは、開始タグおよび終了タグの代わりに「<タグ名/>」という形式のタグを使用できる。本明細書では、このようなタグは、「<タグ名></タグ名>」と記述した場合と同様に扱う。また、開始タグでは、「<タグ名 属性1=属性の値1 属性2=属性の値2 ...>」の形式で、タグに属性値を与えることができる。本明細書では、このようなタグが与えられると、「<タグ名> <@属性1>属性の値1<@属性1> <@属性2>属性の値2</@属性2>」と書かれた場合と同様に扱う。また、本明細書では、テキスト領域は、タグ名が「#」である要素であるとみなす。また、親をもたない要素をルート要素と呼ぶ。各XML文書は、ただ1つのルート要素を持つ。   If there is no tag or text region sandwiched between the start tag and the end tag, XML can use a tag of the form “<tag name />” instead of the start tag and the end tag. In this specification, such a tag is handled in the same manner as when “<tag name> </ tag name>” is described. In the start tag, an attribute value can be given to the tag in the format of “<tag name attribute 1 = attribute value 1 attribute 2 = attribute value 2...>”. In this specification, when such a tag is given, “<tag name> <@attribute 1> attribute value 1 <@attribute 1> <@ attribute 2> attribute value 2 </ @ attribute 2>” Treat as if written. Further, in this specification, the text area is regarded as an element whose tag name is “#”. An element having no parent is called a root element. Each XML document has only one root element.

XMLでは、複数の要素を入れ子にすることで、複雑なデータ構造を記述することができる。終了タグのタグ名は、XML文章を先頭から末尾へ読み進めたとき、まだ対応する終了タグが出現していない開始タグのうち最も直前に現れた開始タグのタグ名と、同一でなければならない。従って、任意の2つの要素は、一方が他方を完全に包含するか、全く重なりがないかのいずれかに限られる。ある要素Aが「要素Bを包含し」、かつ、「要素Aに包含され、かつ、要素Bを包含する別の要素Cが存在しない」とき、要素Bは要素Aの子であるといい、要素Aは要素Bの親であるという。親を順次辿って到達可能な要素は先祖と呼ばれ、子を順次辿って到達可能な要素は子孫と呼ばれる。また、同じ親の子である要素を、兄弟と呼ぶ。   In XML, a complicated data structure can be described by nesting a plurality of elements. The tag name of the end tag must be the same as the tag name of the start tag that appears immediately before the start tag for which the corresponding end tag does not yet appear when the XML text is read from the beginning to the end. . Thus, any two elements are limited to either one completely containing the other or no overlap at all. An element A is said to be a child of element A when "element B contains" and "no other element C is contained in element A and contains element B" Element A is said to be the parent of element B. Elements that are reachable by traversing the parent sequentially are called ancestors, and elements that are reachable by traversing the children sequentially are called descendants. An element that is a child of the same parent is called a sibling.

この要素間の関係は、一般に、木構造により表される。図2に、木構造の一例を示す。図2に示す木構造は、各要素に対応するノード201を用意し、親要素に対応するノードから子要素に対応するノードへ有向エッジ202を張ることで得られる。この木構造は、DOM木(document object model tree)と呼ばれる。DOM木の根から、各ノードへ至る経路上にある要素のタグ名を「/」を挟んで連結し、さらに先頭に「/」を付与して得られる文字列を、本明細書では構造パスと呼ぶ。例えば図2の場合、もっとも右側の「c」の構造パスは、「/a/c」である。構造パスに含まれるタグの数を、その要素の深さと定義する。   This relationship between elements is generally represented by a tree structure. FIG. 2 shows an example of a tree structure. The tree structure shown in FIG. 2 is obtained by preparing a node 201 corresponding to each element and extending a directed edge 202 from a node corresponding to the parent element to a node corresponding to the child element. This tree structure is called a DOM tree (document object model tree). A character string obtained by concatenating tag names of elements on the route from the root of the DOM tree to each node with “/” interposed therebetween and adding “/” at the head is referred to as a structure path in this specification. . For example, in the case of FIG. 2, the rightmost “c” structure path is “/ a / c”. The number of tags included in the structure path is defined as the depth of the element.

特開2006−228155号公報JP 2006-228155 A

清水敏之、鬼塚真、江田毅晴、吉川正俊、XMLデータの管理とストリーム処理に関する技術、電子情報通信学会論文誌D J90-D(2):159-184, 2007.Toshiyuki Shimizu, Makoto Onizuka, Masaharu Eda, Masatoshi Yoshikawa, XML data management and stream processing technology, IEICE Transactions J90-D (2): 159-184, 2007. R. Kaushik, R. Krishnamurthy, J.F. Naughton, R. Ramakrishnan, On the integration of structure indexes and inverted lists, Proc. ACM SIGMOD, pp 779-790, 2004.R. Kaushik, R. Krishnamurthy, J.F.Naughton, R. Ramakrishnan, On the integration of structure indexes and inverted lists, Proc.ACM SIGMOD, pp 779-790, 2004. 江田毅晴、鬼塚真、山室雅司、XML データの要約情報を用いた高速な XPath 処理方法、電子情報通信学会論文誌D、J89-D(2): 139-150, 2006.Eda Yasuharu, Onizuka Makoto, Yamamuro Masashi, High-speed XPath processing method using summary information of XML data, IEICE Transactions D, J89-D (2): 139-150, 2006. 萩尾一仁、御手洗秀一、石野明、竹田正幸、漸増的なパストライ構築に基づく高速・軽量XML文書フィルタリング、DBSJ Letters 6(2):1-4, 2007.Kazuhito Washio, Shuichi Mitarai, Akira Ishino, Masayuki Takeda, Fast and Lightweight XML Document Filtering Based on Incremental Path Trial Construction, DBSJ Letters 6 (2): 1-4, 2007. Navarro, G. and Makinen, V., Compressed full-text indexes, ACM Computing Surveys 39(1): Article 2, 2007.Navarro, G. and Makinen, V., Compressed full-text indexes, ACM Computing Surveys 39 (1): Article 2, 2007. Managing Gigabytes,I.Witten,A.Moffat,and T.Bell,Morgan KaufmannManaging Gigabytes, I. Witten, A. Moffat, and T. Bell, Morgan Kaufmann

XML文書を検索対象とする検索クエリの記述方法として、XPathと呼ばれる規格が普及している(非特許文献1)。例えばXPathは、「要素aの子である要素b」を指定する検索クエリを「a/b」と書く。XPathでは、このような検索クエリの記述方法が規格化されている。また、XPathで記述した検索クエリでは、親、子、先祖、子孫、兄弟等の関係にある複数の要素の組み合わせも指示することができる。   As a description method of a search query for searching an XML document, a standard called XPath is widely used (Non-patent Document 1). For example, XPath writes “a / b” as a search query that specifies “element b which is a child of element a”. In XPath, such a search query description method is standardized. In addition, in a search query described in XPath, a combination of a plurality of elements having a relationship such as a parent, a child, an ancestor, a descendant, and a sibling can be specified.

XPathにより記述された検索クエリによる検索処理においては、その検索処理を効率化する方法として、(1) 検索対象とするXMLデータに現れる構造と、(2) 各構造の出現位置とを記録したインデックスとを事前に構築し、それらを参照して検索クエリに合致する箇所を探す方法が広く用いられる(特許文献1、非特許文献2、3を参照)。この他、XPathにより記述された検索クエリによる検索処理においては、前述した事前処理は実行せず、検索実行時に検索対象とするXML文書に現れる構造をリアルタイムで分析する方法も用いられる(非特許文献4を参照)。ただし、こちらの方法は、検索インデックスを事前に計算する方法に比べ、検索速度の点で不利となる。   In a search process using a search query described in XPath, as a method for improving the search process, (1) an index that records the structure that appears in the XML data to be searched and (2) the appearance position of each structure Are used in advance, and a method for searching for a location matching the search query by referring to them is widely used (see Patent Document 1, Non-Patent Documents 2 and 3). In addition, in the search process using the search query described in XPath, a method of analyzing the structure appearing in the XML document to be searched at the time of search execution in real time is not executed (Non-patent Document). 4). However, this method is disadvantageous in terms of search speed compared to the method of calculating the search index in advance.

XPathにより記述された検索クエリによる検索を効率よく実行するためには、XML文書に現れる構造情報を分析して各構造パスに該当する箇所がどこにあるかを記録すると共に、親、子、先祖、子孫、兄弟といった要素間の関係を効率よく計算できるデータ構造が必要となる。さらに、大規模なXML文書を扱う場合には、このようなデータを極力小さいデータサイズで表現できることと、高速に読み取れることが必要となる。   In order to efficiently execute a search by a search query described in XPath, the structure information appearing in the XML document is analyzed and the location corresponding to each structure path is recorded, and the parent, child, ancestor, A data structure that can efficiently calculate the relationship between elements such as descendants and siblings is required. Furthermore, when handling a large-scale XML document, it is necessary that such data can be expressed with a data size as small as possible and can be read at high speed.

そこで、本発明は、XML文書の検索処理で使用する検索用データのデータサイズを極力小さくし、検索クエリで指定された条件を満たす箇所の検索を高速に計算可能にする。このために、本発明は、XML文書分析部において、(1) 要素の出現順に、当該要素の深さを表す数値の列を部分列として含む第一の数列Sと、(2) DOM木の各ノードに対応する構造パスの種類を記録する1つ以上の数列からなる数列群Tとで与えられるXML文書のDOM木の形状を記録する検索用データを作成する。そして、数列Sと数列群Tを走査し、検索クエリとして与えられた構造パスに合致する箇所を計算する。   Therefore, the present invention reduces the data size of the search data used in the XML document search process as much as possible, and makes it possible to calculate at high speed a search for a location that satisfies the conditions specified by the search query. To this end, the present invention provides an XML document analysis unit in which (1) a first numerical sequence S including a numerical sequence representing the depth of an element as a partial sequence in the order of appearance of the element, and (2) a DOM tree Search data for recording the shape of a DOM tree of an XML document given by a sequence group T composed of one or more sequences that record the type of structure path corresponding to each node is created. Then, the number sequence S and the number sequence group T are scanned, and a portion that matches the structure path given as a search query is calculated.

本発明によれば、XPathにより記述された検索クエリによる検索処理を高速化することができる。上記した以外の課題、構成及び効果は、以下の実施形態の説明により明らかにされる。   According to the present invention, it is possible to speed up a search process using a search query described in XPath. Problems, configurations, and effects other than those described above will be clarified by the following description of embodiments.

XMLデータの一例を示す図。The figure which shows an example of XML data. DOM木の一例を示す図。The figure which shows an example of a DOM tree. XML要素に割り当てる要素番号を説明する図。The figure explaining the element number allocated to an XML element. 第1の形態例に係るXML文書検索装置のブロック構成例を示す図。The figure which shows the block structural example of the XML document search apparatus which concerns on a 1st form example. 第1の形態例に係る前処理実行時の各構成間の連携を説明する図。The figure explaining the cooperation between each structure at the time of the pre-processing execution which concerns on a 1st form example. 第1の形態例に係る前処理動作の流れを説明するフローチャート。The flowchart explaining the flow of the pre-processing operation | movement which concerns on a 1st form example. 第1の形態例に係る前処理動作の概念を示す図。The figure which shows the concept of the pre-processing operation | movement which concerns on a 1st example. 第1の形態例に係るXML文書分析部で実行される処理動作(分析動作)の流れを説明するフローチャート。The flowchart explaining the flow of the processing operation (analysis operation) performed by the XML document analysis part which concerns on a 1st form example. 第1の形態例に係る検索実行時の各構成間の連携を説明する図。The figure explaining the cooperation between each structure at the time of the search execution which concerns on a 1st form example. 第1の形態例に係るXML文書検索装置による検索処理の流れを説明するフローチャート。The flowchart explaining the flow of the search process by the XML document search apparatus which concerns on a 1st form example. 第1の形態例に係る検索処理の処理例を説明する図。The figure explaining the process example of the search process which concerns on a 1st form example. rank演算及びselect演算を説明する図。The figure explaining a rank operation and a select operation. 第1の形態例に係る構造パス分析部の動作の流れを説明するフローチャート。The flowchart explaining the flow of operation | movement of the structure path | pass analysis part which concerns on a 1st form example. 第1の形態例に係る要素探索部の動作の流れを説明するフローチャート。The flowchart explaining the flow of operation | movement of the element search part which concerns on a 1st form example. ビットベクトルを説明する図。The figure explaining a bit vector. Wavelet木を説明する図。The figure explaining a Wavelet tree. 第2の形態例に係るXML文書検索装置のブロック構成例を示す図。The figure which shows the block structural example of the XML document search apparatus which concerns on a 2nd form example. 第2の形態例に係る前処理実行時の各構成間の連携を説明する図。The figure explaining the cooperation between each structure at the time of the pre-processing execution which concerns on a 2nd form example. 第2の形態例に係る前処理の流れを説明するフローチャート。The flowchart explaining the flow of the pre-process which concerns on a 2nd form example. 第3の形態例において親要素を計算する動作の流れを説明するフローチャート。The flowchart explaining the flow of the operation | movement which calculates a parent element in the 3rd form example. 第3の形態例において1つ前の兄弟要素を計算する動作の流れを説明するフローチャート。The flowchart explaining the flow of the operation | movement which calculates the previous sibling element in a 3rd form example. 第3の形態例において1つ後の兄弟要素を計算する動作の流れを説明するフローチャートで。It is a flowchart explaining the flow of the operation | movement which calculates the next sibling element in a 3rd form example.

以下、図面に基づいて、本発明の実施の形態を説明する。なお、本発明は、後述する形態例に限定されるものではなく、その技術思想の範囲において、種々の変形が可能である。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In addition, this invention is not limited to the form example mentioned later, A various deformation | transformation is possible in the range of the technical thought.

[第1の形態例]
本形態例に係るXML文書検索装置は、XML文書集合を前処理して作成した検索用データと検索クエリとを照合し、検索クエリが指定する構造パスに合致する要素を探索結果として出力する。探索結果の出力は、XML文書に出現する全ての要素(XML要素)について割り当てられている要素番号により行う。
[First embodiment]
The XML document search apparatus according to this embodiment collates search data created by preprocessing an XML document set with a search query, and outputs an element that matches a structure path specified by the search query as a search result. The search result is output based on element numbers assigned to all elements (XML elements) appearing in the XML document.

[要素番号]
図3に、XML文書を構成する各要素(XML要素)に対する要素番号の割り当て例を示す。図3では、要素番号301に対応する数字を四角形の枠内に表している。要素番号301は、検索処理の前処理において、全てのXML要素に割り当てられる、各要素を一意に識別する番号である。要素番号は、XML文書を先頭からスキャンしたとき、それまでに出会った要素数と文書数の合計値とする。i番目のXML文書のj番目の要素の要素番号は、i−1番目のXML文書の要素番号の最大値をE(i−1)とするとき、E(i−1)+1+jとなる。なお、E(0)=0とする。
[Element number]
FIG. 3 shows an example of element number assignment for each element (XML element) constituting the XML document. In FIG. 3, the numbers corresponding to the element numbers 301 are shown in a rectangular frame. The element number 301 is a number uniquely identifying each element that is assigned to all XML elements in the pre-processing of the search process. The element number is a total value of the number of elements and documents that have been met so far when the XML document is scanned from the top. The element number of the j-th element of the i-th XML document is E (i-1) + 1 + j, where E (i-1) is the maximum element number of the i-1th XML document. Note that E (0) = 0.

[装置構成]
図4に、本形態例に係るXML文書検索装置400のブロック構成を示す。XML文書検索装置400は、CPU(Central Processing Unit)401、主記憶装置402、補助記憶装置403、リムーバブルドライブ404、ユーザインタフェース406及びネットワークインタフェース407を備える。各構成部は、内部バス等によって互いに接続される。
[Device configuration]
FIG. 4 shows a block configuration of an XML document search apparatus 400 according to this embodiment. The XML document search device 400 includes a CPU (Central Processing Unit) 401, a main storage device 402, an auxiliary storage device 403, a removable drive 404, a user interface 406, and a network interface 407. Each component is connected to each other by an internal bus or the like.

また、XML文書検索装置400は、LAN(Local Area Network)等のネットワーク440を介して外部記憶装置430と接続される。本形態例は、ネットワーク440の種別に限定されない。ネットワーク440は、有線接続でも、無線接続でも構わない。   The XML document search apparatus 400 is connected to an external storage device 430 via a network 440 such as a LAN (Local Area Network). The present embodiment is not limited to the type of the network 440. The network 440 may be a wired connection or a wireless connection.

CPU401は、主記憶装置402に格納されたプログラムを実行する演算装置である。CPU401による主記憶装置402に格納されるプログラムの実行により、XML文書検索装置400が有する機能が実現される。以下の説明においてプログラムを主語として説明する処理動作は、CPU401上での該当プログラムの実行を通じて実現される。   The CPU 401 is an arithmetic device that executes a program stored in the main storage device 402. By executing the program stored in the main storage device 402 by the CPU 401, the functions of the XML document search device 400 are realized. In the following description, the processing operation described with the program as the subject is realized through execution of the corresponding program on the CPU 401.

主記憶装置402は、CPU401によって実行されるプログラム及び当該プログラムの実行に必要な情報を格納する。主記憶装置402は、例えばRAM(Random Access Memory)等のメモリを想定する。   The main storage device 402 stores a program executed by the CPU 401 and information necessary for executing the program. The main storage device 402 is assumed to be a memory such as a RAM (Random Access Memory).

主記憶装置402には、プログラムとして、XML文書分析部410、構造パス分析部412及び要素探索部413を格納し、データとして、XML文書集合420、パストライ421、数列化されたDOM木422及びテキストデータ424を格納する。   The main storage device 402 stores an XML document analysis unit 410, a structure path analysis unit 412 and an element search unit 413 as programs, and as data, an XML document set 420, a path trie 421, a DOM tree 422 converted into a sequence, and a text Data 424 is stored.

XML文書分析部410は、XML文書集合420に含まれる各XML文書をパース(parse)し、タグを認識するとともにテキストデータ424を抽出する。そして、分析結果に基づき、XML文書分析部410は、パストライ421及び数列化されたDOM木422を生成する。   The XML document analysis unit 410 parses each XML document included in the XML document set 420, recognizes a tag, and extracts text data 424. Then, based on the analysis result, the XML document analysis unit 410 generates a path trie 421 and a sequenced DOM tree 422.

構造パス分析部412は、検索クエリである構造パスの深さ及びパス種別を、パストライ421を用いて計算する。なお、パス種別とは、各構造パスを識別するために割り当てる識別番号である。その詳細については後述する。   The structural path analysis unit 412 calculates the depth and path type of the structural path that is the search query using the path trie 421. The path type is an identification number assigned to identify each structural path. Details thereof will be described later.

要素探索部413は、構造パス分析部412が計算した深さ及びパス種別に基づき、検索クエリに合致する箇所をXML文書集合420から全て列挙し、検索結果とする。   Based on the depth and path type calculated by the structural path analysis unit 412, the element search unit 413 enumerates all locations that match the search query from the XML document set 420 and sets them as search results.

XML文書集合420は、検索対象となる1つ又は複数のXML文書のデータである。パストライ421は、XML文書集合420に含まれる構造情報の要約である。その詳細については後述する。数列化されたDOM木422は、XML文書集合420に含まれる構造情報を検索しやすい形式で抽出したものであり、これの詳細も後述する。テキストデータ424は、XML文書集合420においてタグに挟まれたテキストの情報を抽出したものである。   The XML document set 420 is data of one or more XML documents to be searched. The path trie 421 is a summary of the structure information included in the XML document set 420. Details thereof will be described later. The digitized DOM tree 422 is obtained by extracting the structure information included in the XML document set 420 in an easily searchable format, and details thereof will be described later. The text data 424 is obtained by extracting text information sandwiched between tags in the XML document set 420.

なお、XML文書集合420は、主記憶装置402に格納される必要はなく、例えば補助記憶装置403、リムーバブルメディア又は外部記憶装置430に格納されていてもよい。この場合、CPU401が、補助記憶装置403、リムーバブルメディア又は外部記憶装置430からXML文書集合420を読み出し、主記憶装置402に格納する。   Note that the XML document set 420 need not be stored in the main storage device 402, and may be stored in the auxiliary storage device 403, a removable medium, or the external storage device 430, for example. In this case, the CPU 401 reads the XML document set 420 from the auxiliary storage device 403, the removable medium or the external storage device 430 and stores it in the main storage device 402.

同様に、パストライ421、数列化されたDOM木422、テキストデータ424も、主記憶装置402に格納される必要はなく、例えば補助記憶装置403及びリムーバブルメディアに格納されてもよい。この場合、CPU401は、必要に応じ、これらのデータを、補助記憶装置403及びリムーバブルメディア404から読み出す。   Similarly, the path trie 421, the digitized DOM tree 422, and the text data 424 need not be stored in the main storage device 402, and may be stored in the auxiliary storage device 403 and a removable medium, for example. In this case, the CPU 401 reads these data from the auxiliary storage device 403 and the removable medium 404 as necessary.

本形態例においては、XML文書分析部410、構造パス分析部412、要素探索部413をいずれもプログラムにより実現しているが、本発明はこれに限定されない。例えばこれらの機能を専用のハードウェアとして実現してもよい。すなわち、XML文書検索装置400が、XML文書分析装置、構造パス分析装置、要素探索装置を備える構成でもよい。   In this embodiment, the XML document analysis unit 410, the structure path analysis unit 412, and the element search unit 413 are all realized by a program, but the present invention is not limited to this. For example, these functions may be realized as dedicated hardware. That is, the XML document search device 400 may include an XML document analysis device, a structure path analysis device, and an element search device.

補助記憶装置403は、情報を永続的に保持することが可能な装置であり、例えばHDD(Hard Disk Drive)等が考えられる。リムーバブルドライブ404は、リムーバブルメディアへのデータの書込処理及び読出処理を実行する装置である。リムーバブルメディアには、CD−ROM、DVDなどの光学ディスク、フロッピー(登録商標)ディスクなどの磁気ディスクが含まれる。   The auxiliary storage device 403 is a device capable of permanently storing information, and may be an HDD (Hard Disk Drive), for example. The removable drive 404 is a device that executes data write processing and data read processing on a removable medium. The removable media includes optical disks such as CD-ROM and DVD, and magnetic disks such as floppy (registered trademark) disks.

ユーザインタフェース406は、XML文書検索装置400の利用者が、データの入力と処理結果の出力に使用するインタフェースである。ユーザインタフェース406は、ディスプレイ装置、キーボード及びマウスなどが含まれる。ネットワークインタフェース407は、ネットワーク440を介して外部装置と接続するためのインタフェースである。   The user interface 406 is an interface used by the user of the XML document search apparatus 400 for inputting data and outputting processing results. The user interface 406 includes a display device, a keyboard, a mouse, and the like. The network interface 407 is an interface for connecting to an external device via the network 440.

次に、XML文書検索装置400の具体的な処理内容を説明する。ただし、以下の説明では、XML文書集合420は、補助記憶装置403に格納されているものとする。   Next, specific processing contents of the XML document search apparatus 400 will be described. However, in the following description, it is assumed that the XML document set 420 is stored in the auxiliary storage device 403.

[前処理時の構成間連携]
図5に、本形態例に係るXML文書検索装置100がXML文書を前処理する際の各構成間の連携動作を示す。
[Inter-configuration linkage during pre-processing]
FIG. 5 shows a cooperative operation between components when the XML document search apparatus 100 according to the present embodiment preprocesses an XML document.

まず、XML文書検索装置400の利用者が、ユーザインタフェース406を用いて、処理の開始を指示する(ステップS101)。   First, the user of the XML document search apparatus 400 instructs the start of processing using the user interface 406 (step S101).

処理の開始指示を受け付けたCPU401は、補助記憶装置403からXML文書集合420を読み出す(ステップS102)。読み出されたXML文書集合420は、主記憶装置402に格納される。   Receiving the process start instruction, the CPU 401 reads the XML document set 420 from the auxiliary storage device 403 (step S102). The read XML document set 420 is stored in the main storage device 402.

次に、XML文書分析部410(CPU401)は、XML文書集合420に含まれる各XML文書を分析し、パストライ421、数列化されたDOM木422、テキストデータ424を生成する(ステップS103)。この後、CPU401は、パストライ421、数列化されたDOM木422、テキストデータ424を補助記憶装置403に出力する(ステップS104)。   Next, the XML document analysis unit 410 (CPU 401) analyzes each XML document included in the XML document set 420, and generates a path trie 421, a digitized DOM tree 422, and text data 424 (step S103). Thereafter, the CPU 401 outputs the path trie 421, the numbered DOM tree 422, and the text data 424 to the auxiliary storage device 403 (step S104).

なお、ステップS101では、利用者が、XML文書集合420を直接入力してもよい。この場合には、ステップS102の省略が可能である。XML文書集合420は、外部記憶装置430から読み出してもよい。   In step S101, the user may directly input the XML document set 420. In this case, step S102 can be omitted. The XML document set 420 may be read from the external storage device 430.

[前処理の概要]
図6に、本形態例に係るXML文書検索装置400が検索前に実行する前処理の流れを説明するフローチャートを示す。
[Overview of preprocessing]
FIG. 6 is a flowchart for explaining the flow of preprocessing executed by the XML document search apparatus 400 according to this embodiment before search.

CPU401は、XML文書集合420が入力されると、XML文書分析部410による分析処理を実行する(ステップS201)。XML文書分析部410は、XML文書集合420に含まれる各XML文書を分析し、パストライ421、数列化されたDOM木422、テキストデータ424を生成する。XML文書分析部410が実行する前処理の詳細については後述する。処理が終了すると、CPU401は、パストライ421、数列化されたDOM木422、テキストデータ424を、補助記憶装置403に出力する(ステップS202)。   When the XML document set 420 is input, the CPU 401 executes analysis processing by the XML document analysis unit 410 (step S201). The XML document analysis unit 410 analyzes each XML document included in the XML document set 420, and generates a path trie 421, a DOM tree 422 converted into a sequence, and text data 424. Details of the preprocessing executed by the XML document analysis unit 410 will be described later. When the processing is completed, the CPU 401 outputs the path trie 421, the digitized DOM tree 422, and the text data 424 to the auxiliary storage device 403 (step S202).

[数列化されたDOM木]
図7を参照し、XML文書分析部410が生成する、数列化されたDOM木422の例を説明する。なお、図7には、パストライ421の例も表している。DOM木に出現する各ノードの接続関係(すなわち、DOM木の形状)は、数列Sに記録される。数列Sには、次のルールに従って数値が格納される。
・各文書に対応する情報(部分数列)は、数値0で開始される。
・各文書に対応する情報(部分数列)を構成する数値は、XML文書を先頭から順に読み出す場合に発見される開始タグに対応する要素の深さ位置を表す。なお、テキストについては、前述した通り、タグ名が「#」である開始タグ・終了タグに囲まれている場合と同様の処理を行なう。
[Sequenced DOM tree]
With reference to FIG. 7, an example of the DOM tree 422 converted into a number sequence generated by the XML document analysis unit 410 will be described. FIG. 7 also shows an example of a path trie 421. The connection relationship (that is, the shape of the DOM tree) of each node appearing in the DOM tree is recorded in the sequence S. Numeric values are stored in the sequence S according to the following rules.
The information (partial number sequence) corresponding to each document starts with a numerical value 0.
The numerical value constituting the information (partial number sequence) corresponding to each document represents the depth position of the element corresponding to the start tag that is found when the XML document is read sequentially from the top. As described above, the text is processed in the same way as when it is surrounded by the start tag / end tag whose tag name is “#”.

図7に示す例の場合、第1のXML文書(上段左側)を先頭から読むと、<a>、「テキスト1」、<b>、「テキスト2」、</b>、<c>、「テキスト3」、</c>、</a>の順にタグやテキストが出現する。終了タグ以外の要素の深さは、1,2,2,3,2,3である。従って、数列Sには、XML文書の先頭を表す0を考慮すると、0,1,2,2,3,2,3が追加される。同様に、第2のXML文書(上段右側)については、0,1,2,3,2,2,3が追加される。   In the example shown in FIG. 7, when the first XML document (upper left side) is read from the top, <a>, “text 1”, <b>, “text 2”, </ b>, <c>, Tags and text appear in the order of “text 3”, </ c>, </a>. The depth of elements other than the end tag is 1,2,2,3,2,3. Therefore, in consideration of 0 representing the head of the XML document, 0, 1, 2, 2, 3, 2, 3 are added to the sequence S. Similarly, 0, 1, 2, 3, 2, 2, 3 are added to the second XML document (upper right side).

このように、数列Sは、DOM木の形状を記録することができる。ただし、検索用データとして使用するには、タグの種類で特定される情報(パス種別)も必要である。そこで、任意の構造パスに割り当てた番号で識別されるパス種別を、深さ別のDOM木構造に対応する数列T[d]に記録する。パス種別を与える数値は、同じ深さを有する構造パスに対して一意に割り当てられた番号である。   In this way, the sequence S can record the shape of the DOM tree. However, in order to use it as search data, information (path type) specified by the tag type is also required. Therefore, the path type identified by the number assigned to an arbitrary structure path is recorded in the numerical sequence T [d] corresponding to the DOM tree structure by depth. The numerical value giving the path type is a number uniquely assigned to the structure path having the same depth.

パス種別の番号は、パストライ421に基づいて記録される。パストライ421とは、XML文書集合420を構成する全てのXML文書について出現する構造パスの全てを含むように構築された木構造のデータである。パストライ421は、公知の方法(例えば非特許文献4)により構築することができる。本形態例の場合、パストライ421の構築時に新規ノードを追加する必要が生じた場合、その新規ノードに新たなパス種別の番号を割り当てる処理機能を、公知の構築機能に追加する。番号の割り当て方法については後述する。図7の場合、括弧で囲まれた数値703が、パス種別の番号に相当する。   The path type number is recorded based on the path trie 421. The path trie 421 is tree-structured data constructed so as to include all of the structural paths that appear for all the XML documents constituting the XML document set 420. The past trie 421 can be constructed by a known method (for example, Non-Patent Document 4). In the case of this embodiment, when it becomes necessary to add a new node during the construction of the path trie 421, a processing function for assigning a new path type number to the new node is added to a known construction function. A method for assigning numbers will be described later. In the case of FIG. 7, a numerical value 703 enclosed in parentheses corresponds to a path type number.

[数列SとTの生成]
図8に、本形態例に係るXML文書分析部410において実行される分析動作の詳細を示す。この分析動作において、数列Sと数列T[d]が作成される。
[Generation of sequences S and T]
FIG. 8 shows details of the analysis operation executed in the XML document analysis unit 410 according to this embodiment. In this analysis operation, a number sequence S and a number sequence T [d] are created.

まず、XML文書分析部410は、数列S,T[1],…,T[D]を空の数列に初期化する(ステップS300)。ここでの[D]は、XML文書集合420で最も深い位置の要素の深さを表している。また、XML文書分析部410は、配列Rの要素R[1],…,R[D]を全て「1」に初期化する(ステップS300)。また、XML文書分析部410は、パストライ421を、ルートノード701(図7)のみを持つように初期化する。   First, the XML document analysis unit 410 initializes the sequence S, T [1],..., T [D] to an empty sequence (step S300). Here, [D] represents the depth of the element at the deepest position in the XML document set 420. Also, the XML document analysis unit 410 initializes all the elements R [1],..., R [D] of the array R to “1” (step S300). Further, the XML document analysis unit 410 initializes the path trie 421 so as to have only the root node 701 (FIG. 7).

次に、XML文書分析部410は、XML文書集合420に含まれる全ての文書の処理が完了したか否かを判定する(ステップS301)。肯定結果が得られるまで、後述するステップS302〜S309の処理が繰り返し実行される。   Next, the XML document analysis unit 410 determines whether or not processing of all the documents included in the XML document set 420 has been completed (step S301). Until a positive result is obtained, steps S302 to S309 described later are repeatedly executed.

ステップS301で否定結果が得られた場合、XML文書分析部410は、未処理の文書を読み込む(ステップS302)。以下、この文書をXとする。ステップS302において、XML文書分析部410は、数列Sに文書の先頭を表す「0」を追加する。また、XML文書分析部410は、変数dを用意し、初期値として「0」をセットする。さらに、XML文書分析部410は、変数vを用意し、パストライのルートノード701を指すように初期化する。   If a negative result is obtained in step S301, the XML document analysis unit 410 reads an unprocessed document (step S302). Hereinafter, this document is referred to as X. In step S302, the XML document analysis unit 410 adds “0” representing the beginning of the document to the sequence S. Also, the XML document analysis unit 410 prepares a variable d and sets “0” as an initial value. Further, the XML document analysis unit 410 prepares a variable v and initializes it to point to the root node 701 of the path trie.

次に、XML文書分析部410は、文書Xを最後まで読んだか否か判定する(ステップ303)。肯定結果が得られるまで、後述するステップS304〜S309が繰り返し実行される。   Next, the XML document analysis unit 410 determines whether or not the document X has been read to the end (step 303). Until a positive result is obtained, steps S304 to S309 described later are repeatedly executed.

ステップS303で否定結果が得られると、XML文書分析部410は、現在の読み位置にあるタグが「終了タグ」か否か判定する(ステップS304)。肯定結果が得られた場合、XML文書分析部410は、変数vをパストライ421上で親ノードを指すように変更し、変数dから1を減じる(ステップS304−1)。そして、XML文書分析部410は、読み位置を終了タグの直後まで進め、ステップS304に戻る。   If a negative result is obtained in step S303, the XML document analysis unit 410 determines whether or not the tag at the current reading position is an “end tag” (step S304). If a positive result is obtained, the XML document analysis unit 410 changes the variable v to point to the parent node on the path trie 421, and subtracts 1 from the variable d (step S304-1). Then, the XML document analysis unit 410 advances the reading position to immediately after the end tag, and returns to step S304.

ステップS304で否定結果が得られた場合、XML文書分析部410は、文書Xにおいて、現在の読み位置が「タグ」でなく「テキスト」であるか否かを判定する(ステップS305)。肯定結果が得られた場合、XML文書分析部410は、そのテキストを読み込み、その内容をテキストデータ424に追加する(ステップS305−1)。さらに、XML文書分析部410は、変数tに「#」をセットし、ステップS307に進む(ステップS305−1)。   If a negative result is obtained in step S304, the XML document analysis unit 410 determines whether or not the current reading position in the document X is “text” instead of “tag” (step S305). If a positive result is obtained, the XML document analysis unit 410 reads the text and adds the content to the text data 424 (step S305-1). Further, the XML document analysis unit 410 sets “#” in the variable t, and proceeds to step S307 (step S305-1).

ステップS305で否定結果が得られた場合、XML文書分析部410は、開始タグを読み、その直後まで読み位置を進める。また、XML文書分析部410は、この開始タグのタグ名を、変数tにセットする(ステップS306)。   If a negative result is obtained in step S305, the XML document analysis unit 410 reads the start tag and advances the reading position to just after that. Also, the XML document analysis unit 410 sets the tag name of this start tag in the variable t (step S306).

ステップS305−1の後又はステップS306の後、XML文書分析部410は、パストライ421上のノードvに、タグ名が変数tの値に一致する子ノードv’が存在するか否か判定する(ステップS307)。否定結果が得られた場合、XML文書分析部410は、新規に子ノード(以下「v’」という)を作成し、v’のパス種別をR[d]の値とした後、R[d]に1を加える(ステップS307−1)。   After step S305-1 or after step S306, the XML document analysis unit 410 determines whether or not a child node v ′ whose tag name matches the value of the variable t exists in the node v on the path trie 421 ( Step S307). If a negative result is obtained, the XML document analysis unit 410 newly creates a child node (hereinafter referred to as “v ′”), sets the path type of v ′ as the value of R [d], and then selects R [d ] Is added to [] (step S307-1).

ステップS307で肯定結果が得られた場合、XML文書分析部410は、vの子ノードv’を指すように変数vを更新し、変数dに1を加える(ステップS308)。   If a positive result is obtained in step S307, the XML document analysis unit 410 updates the variable v to point to the child node v 'of v, and adds 1 to the variable d (step S308).

ステップS307−1の後又はステップS308の後、XML文書分析部410は、数列Sに変数dの値を追加し、さらに数列T[d]に更新された変数vのパス種別を追加し、ステップS303に戻る(ステップS309)。   After step S307-1, or after step S308, the XML document analysis unit 410 adds the value of the variable d to the sequence S, and further adds the updated path type of the variable v to the sequence T [d]. The process returns to S303 (step S309).

[検索動作時の構成間連携]
図9に、本形態例に係るXML文書検索装置400がXML文書を検索する際の各構成間の連携動作を示す。
[Inter-configuration linkage during search operations]
FIG. 9 shows a cooperative operation between components when the XML document search apparatus 400 according to this embodiment searches for an XML document.

まず、XML文書検索装置400は、検索に使用するパストライ421と数列化されたDOM木422を、補助記憶装置403から主記憶装置402に予め読み出す(ステップS401)。これらのデータは、前述した前処理により事前に作成されたデータである。   First, the XML document search apparatus 400 reads in advance the path trie 421 and the numbered DOM tree 422 used for the search from the auxiliary storage device 403 to the main storage device 402 (step S401). These data are data created in advance by the preprocessing described above.

XML文書検索装置400の利用者が、ユーザインタフェース406を通じ、検索クエリとしての構造パスを投入する(ステップS402)。検索クエリを受け取ったCPU401は、パストライ421を使用し、XML文書集合420において、検索クエリに含まれる構造パスに該当する要素の深さdとパス種別tを計算する(ステップS403)。   A user of the XML document search apparatus 400 inputs a structure path as a search query through the user interface 406 (step S402). Receiving the search query, the CPU 401 uses the path trie 421 to calculate the depth d and the path type t of the element corresponding to the structural path included in the search query in the XML document set 420 (step S403).

次に、要素探索部413(CPU401)は、数列化されたDOM木422を使用し、検索クエリに含まれる構造パスに合致する要素番号をすべて列挙する(ステップS404)。その後、CPU401は、得られた要素番号をユーザへ送信する(ステップS405)。   Next, the element search unit 413 (CPU 401) uses the numbered DOM tree 422 to enumerate all element numbers that match the structure path included in the search query (step S404). Thereafter, the CPU 401 transmits the obtained element number to the user (step S405).

[検索動作の詳細]
図10に、本形態例に係るXML文書検索装置400がXML文書を検索する際の処理の流れを示す。なお、CPU401は、検索に用いるパストライ421、数列化されたDOM木422、テキストデータ424を、補助記憶装置403から主記憶装置402に事前に読み出しているものとする。
[Details of search operation]
FIG. 10 shows the flow of processing when the XML document search apparatus 400 according to this embodiment searches for an XML document. It is assumed that the CPU 401 has previously read the path trie 421, the numbered DOM tree 422, and the text data 424 used for the search from the auxiliary storage device 403 to the main storage device 402.

まず、ユーザがユーザインタフェース406を通じ、検索クエリとしての構造パスをXML文書検索装置400に投入する。この後、構造パス分析部412は、XML文書集合420について作成されたパストライ421にアクセスし、検索クエリとして指定された構造パスに該当する要素の深さdとパス種別tを計算する(ステップS501)。   First, the user inputs a structure path as a search query to the XML document search apparatus 400 through the user interface 406. Thereafter, the structural path analysis unit 412 accesses the path trie 421 created for the XML document set 420, and calculates the depth d and the path type t of the element corresponding to the structural path specified as the search query (step S501). ).

次に、要素探索部413は、数列化されたDOM木422にアクセスし、当該構造パスに該当する要素の番号を列挙する(ステップS502)。   Next, the element search unit 413 accesses the numbered DOM tree 422 and lists the numbers of elements corresponding to the structure path (step S502).

図11に、前述した検索処理の概要を示す。図11は、検索クエリとして、「/a/b」で表される構造パスが与えられた場合について、この構造パスが出現する要素の番号を計算する概念を表している。   FIG. 11 shows an outline of the above-described search process. FIG. 11 shows the concept of calculating the number of an element in which a structural path appears when a structural path represented by “/ a / b” is given as a search query.

この構造パスは、「/a/b」でbが2番目のタグ名なので、深さが「2」である。さらに、パストライ421において、ルートノード701から「a」、「b」と辿っていくと、「b(2)」と書かれたノードに到達する。「(2)」は、このノードのパス種別が「2」であることを表している。従って、「/a/b」の出現位置を全て知るためには、深さ「2」にあるパス種別が「2」の要素の全てについて、要素番号を計算すればよい。そのために、後述するrank演算及びselect演算を実行する。
(1)rank(A,c,i)=数列Aのi番目までの要素にあるcの数
(2)select(A,c,j)=数列Aにj番目に出現するcの位置
Since this structure path is “/ a / b” and b is the second tag name, the depth is “2”. Further, in the path trie 421, when “a” and “b” are traced from the root node 701, the node written as “b (2)” is reached. “(2)” indicates that the path type of this node is “2”. Therefore, in order to know all the appearance positions of “/ a / b”, it is only necessary to calculate the element numbers for all the elements having the path type “2” at the depth “2”. For this purpose, a rank operation and a select operation described later are executed.
(1) rank (A, c, i) = number of c in the i-th element of the sequence A (2) select (A, c, j) = position of c appearing j in the sequence A

図12に、rank演算およびselect演算の例を示す。図12の例の場合、数列Xの10番目までの要素にある「3」の数を与えるrank(X,3,10)は「2」である。また、数列Xについて「3」が2番目に出現する位置を与えるselect(X,3,2)は「7」である。   FIG. 12 shows an example of rank operation and select operation. In the example of FIG. 12, rank (X, 3, 10) that gives the number of “3” in the elements up to the tenth in the sequence X is “2”. Further, select (X, 3, 2) which gives the position where “3” appears second in the sequence X is “7”.

図11の説明に戻る。前述の「/a/b」を検索する処理動作は、深さが「2」でパス種別が「2」の要素を抽出する処理である。   Returning to the description of FIG. The processing operation for searching for “/ a / b” described above is processing for extracting an element having a depth of “2” and a path type of “2”.

まず、深さが「2」でパス種別が「2」の要素の総数nは、n=rank(T[2],2,|T[2]|)により計算することができる。ただし、|T[d]|は、数列T[d]の要素数である。   First, the total number n of elements having a depth of “2” and a path type of “2” can be calculated by n = rank (T [2], 2, | T [2] |). However, | T [d] | is the number of elements of the sequence T [d].

次に、1≦k≦nである全ての整数kについて、k’=select(T[2],2,k)を計算する。この計算で得られる値k’の集合は、深さが「2」の要素に限定した場合、パス種別が「2」の要素が何番目に出現するかを表している。図11の例では、2番目と6番目である。   Next, k ′ = select (T [2], 2, k) is calculated for all integers k where 1 ≦ k ≦ n. The set of values k ′ obtained by this calculation represents the order in which the element of the path type “2” appears when the depth is limited to the element of “2”. In the example of FIG. 11, they are the second and sixth.

さらに、k”=select(S,2,k’)を計算すれば、検索対象であるXML文書集合420のDOM木の形状を現す数列Sにおいて、深さが「2」の要素の中でk’番目に出現する要素が全体の何番目に位置するかを計算することができる。図11の例では、4番目と13番目である。この「4」と「13」が、要素探索部413の検索結果となる。   Further, if k ″ = select (S, 2, k ′) is calculated, in the sequence S representing the shape of the DOM tree of the XML document set 420 to be searched, k among the elements having a depth of “2”. It is possible to calculate the position of the element where the 'th occurrence appears. In the example of FIG. 11, they are the fourth and thirteenth. These “4” and “13” are the search results of the element search unit 413.

[構造パスの分析動作]
図13に、構造パス分析部412が実行する構造パスの分析動作を示す。ここでは、構造パスに含まれる左からd番目のタグ名をP[d],タグの総数を|P|とする。
[Structural path analysis]
FIG. 13 shows a structure path analysis operation performed by the structure path analysis unit 412. Here, the d-th tag name from the left included in the structure path is P [d], and the total number of tags is | P |.

まず、構造パス分析部412は、変数vをパストライ421のルート701にセットし、変数dを「0」にセットする(ステップS601)。   First, the structural path analysis unit 412 sets the variable v to the route 701 of the path trie 421, and sets the variable d to “0” (step S601).

次に、構造パス分析部412は、d≧|P|か否かを判定する(ステップS602)。ステップS602で肯定結果が得られるまで、構造パス分析部412は、ステップS603〜S605の処理を繰り返す。因みに、肯定結果が得られた場合(d≧|P|の場合)、構造パス分析部412は、深さを与える情報として「d」を出力し、パス種別703を与える情報として変数vが指すノードのパス種別を出力し、分析処理を終了する(ステップS606)。   Next, the structural path analysis unit 412 determines whether or not d ≧ | P | (step S602). The structural path analysis unit 412 repeats the processes of steps S603 to S605 until a positive result is obtained in step S602. Incidentally, when an affirmative result is obtained (when d ≧ | P |), the structure path analysis unit 412 outputs “d” as the information that gives the depth, and the variable v points to the information that gives the path type 703. The node path type is output, and the analysis process ends (step S606).

これに対し、ステップS602で否定結果が得られた場合、構造パス分析部412は、変数dに「1」を加える(ステップS603)。   On the other hand, when a negative result is obtained in step S602, the structural path analysis unit 412 adds “1” to the variable d (step S603).

続いて、構造パス分析部412は、変数vの指すノードの子にタグ名がP[d]のものがあるか否か判定する(ステップS604)。否定結果が得られた場合(子が存在しない場合)、構造パス分析部412は、「当該構造無し」と出力し、検索処理自体を終了する(ステップS607)。   Subsequently, the structural path analysis unit 412 determines whether or not there is a tag name P [d] as a child of the node indicated by the variable v (step S604). When a negative result is obtained (when there are no children), the structure path analysis unit 412 outputs “no such structure” and ends the search process itself (step S607).

一方、ステップS604において肯定結果が得られた場合(子が存在する場合)、構造パス分析部412は、変数vをタグ名がP[i]である子に変更する(ステップS605)。   On the other hand, when a positive result is obtained in step S604 (when a child exists), the structure path analysis unit 412 changes the variable v to a child whose tag name is P [i] (step S605).

[要素探索動作]
図14に、要素探索部413において実行される検索動作の詳細を示す。
[Element search operation]
FIG. 14 shows details of the search operation executed in the element search unit 413.

要素探索部413はまず変数nに、深さがdであり、かつ、パス種別がtである要素の「総数」をセットする。この総数は、rank(T[d],t,|T[d]|)の計算値として与えられる。さらに、要素探索部413は、変数kを初期値「0」にセットする。   The element search unit 413 first sets the “total number” of elements having a depth of d and a path type of t as a variable n. This total number is given as a calculated value of rank (T [d], t, | T [d] |). Furthermore, the element search unit 413 sets the variable k to the initial value “0”.

次に、要素探索部413は、k>nか否かを判定する(ステップS702)。肯定結果が得られるまで、要素探索部413は、後述するステップS703〜S706の処理を繰り返し実行する。   Next, the element search unit 413 determines whether k> n is satisfied (step S702). Until a positive result is obtained, the element search unit 413 repeatedly executes the processes of steps S703 to S706 described later.

要素探索部413は、検索クエリに合致する次の要素が、深さdの要素の中で何番目に位置するかを、select(T[d],t,k)により計算し、計算結果を変数k’にセットする(ステップS703)。   The element search unit 413 calculates, by select (T [d], t, k), the position where the next element that matches the search query is located in the element of depth d, and the calculation result is calculated. A variable k ′ is set (step S703).

次に、要素探索部413は、検索クエリに合致する次の要素(ステップS703と同じ要素)が、XML文書全体に対応する数列Sの何番目の要素に位置するかを、select(S,d,k’)により計算し、計算結果を変数k”にセットする(ステップS704)。   Next, the element search unit 413 selects select (S, d) as to which element in the sequence S corresponding to the entire XML document the next element that matches the search query (the same element as in step S703) is located. , K ′), and the calculation result is set to a variable k ″ (step S704).

要素探索部413は、変数k”の値を出力する(ステップS705)。
この後、要素探索部413は、変数kに「1」を加え、ステップS702に戻る(ステップS706)。
The element search unit 413 outputs the value of the variable k ″ (step S705).
Thereafter, the element search unit 413 adds “1” to the variable k and returns to step S702 (step S706).

[計算処理の高速化]
前述の処理により構造パスに合致するXML要素の計算を高速化するには、rank演算とselect演算を高速に処理する必要がある。
[Acceleration of calculation processing]
In order to speed up the calculation of the XML element that matches the structure path by the above-described processing, it is necessary to process the rank operation and the select operation at high speed.

まず、本形態例の場合、rank演算は、ステップS701において、T[d]に値tが幾つあるかを数えるためにしか使用しない。処理の高速化のため、本実施例では、数列化されたDOM木422を補助記憶装置403から読み出す際に、予め深さ別に各要素が何回出現したかを数え、パス種別(値t)の順に当該構造パスの出現回数を並べた2次元配列N 702(図7)を作成する。Nのうち、特定の深さdに対応する配列N[d]の内容は、(T[d]における値1の数、値2の数、…、値tの数、…)で与えられる。例えば図7の場合、深さが「2」のパス種別の構造を表す数列T[2]には、値1が2回、値2が2回、値3が1回、値4が1回出現する。このため、2次元配列Nのd=2の部分はN[2]=(2,2,1,1)のように作成される。   First, in the present embodiment, the rank operation is used only for counting how many values t exist in T [d] in step S701. In order to speed up the processing, in this embodiment, when reading the DOM tree 422 that has been converted into a sequence from the auxiliary storage device 403, the number of times each element has appeared in advance is counted to determine the path type (value t). A two-dimensional array N 702 (FIG. 7) in which the number of appearances of the structure path is arranged in this order is created. Among N, the contents of the array N [d] corresponding to a specific depth d are given by (number of values 1 in T [d], number of values 2,..., Number of values t,...). For example, in the case of FIG. 7, in the sequence T [2] representing the path type structure with the depth “2”, the value 1 is 2 times, the value 2 is 2 times, the value 3 is 1 time, and the value 4 is 1 time. Appear. Therefore, the d = 2 portion of the two-dimensional array N is created as N [2] = (2, 2, 1, 1).

続く、ステップS703のselect演算では、kの値が1、2、3、…と順に変化し、T[d]において値がtとなる箇所を順に計算する。この処理は、単純に数列T[d]を先頭から順に読み、値tが出現する箇所を計算することで実現できる。数列T[d]に値tが頻出すれば、この処理の計算効率は十分に良い。ただし、数列T[d]に値tが頻出しない場合は、数列を走査する処理時間が性能劣化を招く可能性がある。従って、数列T[d]に値tが頻出しないことが予測される場合には、後述する第2の形態例で説明する手法を用いることが好ましい。なお、繰り返し回数nは上述の方法で計算してステップS702で用いても良いが、k>nかを判定する代わりに、数列T[d]の要素をすべて読み終わった時点で要素探索部413を終了する手法を採用してもよい。   In the subsequent select operation in step S703, the k values change in order 1, 2, 3,..., And the points where the value is t in T [d] are calculated in order. This processing can be realized by simply reading the sequence T [d] in order from the top and calculating the location where the value t appears. If the value t appears frequently in the sequence T [d], the calculation efficiency of this process is sufficiently good. However, if the value t does not appear frequently in the sequence T [d], the processing time for scanning the sequence may cause performance degradation. Therefore, when it is predicted that the value t does not appear frequently in the sequence T [d], it is preferable to use the method described in the second embodiment described later. Note that the number of repetitions n may be calculated by the above method and used in step S702. Instead of determining whether k> n, the element search unit 413 is read when all the elements of the sequence T [d] have been read. You may employ | adopt the method of complete | finishing.

ステップS704のselect演算についても、やはり数列を先頭から順番に読み、値dがk’(=select(T[d],t,k))回目に出現する位置を求めることで計算できる。   The select operation in step S704 can also be calculated by reading the sequence in order from the top and obtaining the position where the value d appears k '(= select (T [d], t, k)).

ここで、1<k≦nならば、k’=select(T[d],t,k)の値が、kについて単調に増加する。このため、次の不等式が成立する。   Here, if 1 <k ≦ n, the value of k ′ = select (T [d], t, k) increases monotonously for k. For this reason, the following inequality holds.

select(T[d],t,k−1)<select(T[d],t,k)
同様に、select(S,d,k’)の値も、k’について単調に増加する。このため、次の不等式が成立する。
select (T [d], t, k-1) <select (T [d], t, k)
Similarly, the value of select (S, d, k ′) also increases monotonously for k ′. For this reason, the following inequality holds.

select(S,d,select(T[d],t,k−1))
< select(S,d,select(T[d],t,k))
select (S, d, select (T [d], t, k-1))
<Select (S, d, select (T [d], t, k))

このため、ステップS704では、前回出力した値であるselect(S,d,select(T[d],t,k−1))を保存しておき、その位置から数列Sを走査してselect(S,d,select(T[d],t,k))を計算すれば、計算時間を短縮することができる。   For this reason, in step S704, select (S, d, select (T [d], t, k-1)), which is the last output value, is stored, and the sequence S is scanned from that position to select ( If S, d, select (T [d], t, k)) is calculated, the calculation time can be shortened.

[変形例]
本実施形態で例示した種々のソフトウェアは、電磁的、電子的及び光学式等の種々の記録媒体に格納可能であり、インターネット等の通信網を通じて、コンピュータにダウンロード可能である。
[Modification]
The various software exemplified in this embodiment can be stored in various recording media such as electromagnetic, electronic, and optical, and can be downloaded to a computer through a communication network such as the Internet.

以上の説明では、数列化されたDOM木422の全体を主記憶装置402に読み込んで処理する方法を説明した。しかし、実際の運用では、主記憶装置402に入りきらない膨大なデータを処理可能とするため、データを補助記憶装置403に配置し、処理に必要な箇所をその都度、主記憶装置402へ読み込むことが好ましい。   In the above description, the method of reading the entire DOM tree 422 converted into a sequence into the main storage device 402 and processing it has been described. However, in actual operation, in order to be able to process a huge amount of data that cannot fit in the main storage device 402, the data is arranged in the auxiliary storage device 403, and a part necessary for processing is read into the main storage device 402 each time. It is preferable.

[第1の形態例の効果]
本形態例に係るXML文書検索装置400を用いれば、XPathにより記述された検索クエリによるXML文書の検索処理を高速化することができる。
[Effect of the first embodiment]
If the XML document search apparatus 400 according to this embodiment is used, it is possible to speed up the XML document search process using a search query described in XPath.

[第2の形態例]
[Wavelet木]
数列をコンパクトに圧縮し、さらにデータを圧縮したままでrank演算及びselect演算を効率よく計算できるデータ構造として、Wavelet木が知られている(例えば、Navarro, G. and Makinen, V., Compressed full-text indexes, ACM Computing Surveys 39(1): Article 2, 2007.)。
[Second Embodiment]
[Wavelet tree]
A Wavelet tree is known as a data structure that can efficiently calculate a rank operation and a select operation while compressing a number sequence in a compact manner (for example, Navarro, G. and Makinen, V., Compressed full). -text indexes, ACM Computing Surveys 39 (1): Article 2, 2007.).

Wavelet木は、0と1の任意の並びであるビットベクトルと呼ばれるデータ構造を用いて構築される。ビットベクトルの例を、図15に示す。ビットベクトルを数列と見たときに効率よくrank演算及びselect演算を行うために、一定間隔でrank演算及びselect演算の結果をサンプリングし格納するとともに、サンプリングされていない箇所の値は、短いビットベクトルのrank演算及びselect演算の結果を事前計算して格納した1501のような表を併用し、高速に計算する手法が知られている(例えば非特許文献5を参照)。   The Wavelet tree is constructed using a data structure called a bit vector that is an arbitrary sequence of 0s and 1s. An example of the bit vector is shown in FIG. In order to efficiently perform the rank operation and the select operation when the bit vector is viewed as a sequence, the results of the rank operation and the select operation are sampled and stored at regular intervals, and the value of the unsampled portion is a short bit vector. There is known a technique for calculating at high speed by using a table such as 1501 in which the results of the rank operation and the select operation are pre-calculated and stored (see Non-Patent Document 5, for example).

図16に、数列S「012223230123223」に対するWavelet木の構造例を示す。Wavelet木は、木のノードにビットベクトルを格納し、全体として数列と同等の情報を記録できるデータ構造である。   FIG. 16 shows a structural example of a Wavelet tree for the sequence S “012223230123223”. A Wavelet tree is a data structure in which a bit vector is stored in a node of the tree and information equivalent to a numerical sequence can be recorded as a whole.

ルートノード1601には、数列に格納された値を2つのグループに分割するとき、各値がどちらのグループに属すかを記録したビットベクトルB1が格納される。図16の例では、値が「2」であるか、「2」でないかでグループ分けを行っている。ルートノード1601の下にあるノード1602では、ルートノードでグループ分けされた「2」以外の値を、さらにグループ分けし、「3」であるか、「3」でないかでグループ分けしたビットベクトルB2が格納されている。同様に、その下のノード1603は、残った「0」と「1」を区別している。   The root node 1601 stores a bit vector B1 that records which group each value belongs to when the values stored in the numerical sequence are divided into two groups. In the example of FIG. 16, grouping is performed depending on whether the value is “2” or not “2”. In a node 1602 below the root node 1601, the values other than “2” grouped by the root node are further grouped, and the bit vector B2 is grouped by “3” or not “3”. Is stored. Similarly, the lower node 1603 distinguishes the remaining “0” and “1”.

Wevelet木に対するrank演算は、ルートノード1601から木を辿ることによって行う。例えばrank(S,3,7)を計算する場合を説明すると以下のようになる。   The rank operation on the WEB tree is performed by tracing the tree from the root node 1601. For example, the case of calculating rank (S, 3, 7) will be described as follows.

まず、「3」はルートノード1601では、「1」にグループ分けされている。このため、rank(B1,1,7)を計算し、「4」を得る。この結果は、数列Sの7番目までに0,1,3が計4個あることを意味する。   First, “3” is grouped into “1” in the root node 1601. Therefore, rank (B1, 1, 7) is calculated to obtain “4”. This result means that there are a total of four, 0, 1, 3 by the seventh in the sequence S.

次のビットベクトルB2では、「3」が「1」にグループ分けされている。このため、rank(B2,1,4)を計算し、「2」を得る。この結果は、数列Sの7番目までに出現する4個の0,1,3のうち、「3」が計2個であることを表す。このように、rank(S,3,7)の結果として、正しく「2」が計算できたことが分かる。   In the next bit vector B2, “3” is grouped into “1”. Therefore, rank (B2, 1, 4) is calculated to obtain “2”. This result indicates that among the four 0, 1, 3 appearing up to the seventh in the sequence S, “3” is a total of two. Thus, it can be seen that “2” was correctly calculated as the result of rank (S, 3, 7).

これに対し、select演算は、リーフからルートノードに木を辿ることによって計算する。例えばselect(S,3,2)を計算する場合を説明すると以下のようになる。   On the other hand, the select operation is calculated by tracing the tree from the leaf to the root node. For example, the case of calculating select (S, 3, 2) will be described as follows.

まず、「3」を表すリーフの親ノードであるノード1602において、2番目の「3」に該当する位置を計算する。「3」は、ノード1602において、「1」にグループ分けされている。このため、select(B2,1,2)を計算すると、「4」が得られる。この結果は、2番目の「3」が、0,1,3だけを取り出した部分数列では4番目の値であることを意味する。   First, in the node 1602 that is the parent node of the leaf representing “3”, the position corresponding to the second “3” is calculated. “3” is grouped into “1” in the node 1602. Therefore, “4” is obtained by calculating select (B2, 1, 2). This result means that the second “3” is the fourth value in the partial sequence from which only 0, 1, 3 are extracted.

さらに、この値が数列Sの中で何番目に位置するかを求めるには、select(B1,1,4)を計算すれば良い。この場合、「7」が得られる。この結果は、0、1又は3が4番目に現れる位置が全体では7番目の値であることを表す。すなわち、この「7」がselect(S,3,2)の計算結果となる。   Further, in order to determine what position this value is in the sequence S, select (B1, 1, 4) may be calculated. In this case, “7” is obtained. This result represents that the position where 0, 1, or 3 appears fourth is the seventh value as a whole. That is, “7” is the calculation result of select (S, 3, 2).

このように、Wavelet木を用いると、ビットベクトルに対するrank演算やselect演算を、最大でも木の高さに等しい回数分の処理の繰り返しにより実現できる。すなわち、最大でも木の高さに等しい計算処理の回数の実行により、数列に対するrank演算及びselect演算の解を得ることができる。   As described above, when a Wavelet tree is used, a rank operation or a select operation on a bit vector can be realized by repeating the processing for the number of times equal to the height of the tree at most. That is, by executing the number of calculation processes equal to the height of the tree at the maximum, it is possible to obtain a solution of rank operation and select operation for the sequence.

Wavelet木の高さは、数列の長さよりも遥かに小さな値であり、特に数列の長さが非常に長く、rank演算又はselect演算の第二引数の値の出現頻度が小さいとき、数列を直接走査する場合に比して効率がよい。また、Wavelet木は、格納される数列において各値の出現頻度に偏りがあると、圧縮が可能であることが知られている。   The height of the wavelet tree is much smaller than the length of the sequence, especially when the sequence is very long and the frequency of the second argument of the rank operation or select operation is small. It is more efficient than scanning. Further, it is known that the Wavelet tree can be compressed if the appearance frequency of each value is biased in the stored numerical sequence.

[装置構成]
本形態例では、第1の形態例において、rank演算及びselect演算を実行していた箇所に、Wavelet木を適用する手段を提供する。
[Device configuration]
In this embodiment, a means for applying a Wavelet tree to a place where a rank operation and a select operation are executed in the first embodiment is provided.

図17に、本形態例に係るXML文書検索装置1700のブロック構成を示す。図17には、図4との対応部分に同一符号を付して示している。XML文書検索装置1700は、Wavelet木構築部411と、Wavelet木群423を有する点で、第1の形態例と異なる。   FIG. 17 shows a block configuration of an XML document search apparatus 1700 according to this embodiment. In FIG. 17, parts corresponding to those in FIG. The XML document search apparatus 1700 is different from the first embodiment in that it has a Wavelet tree construction unit 411 and a Wavelet tree group 423.

図18に、本形態例に係るXML文書検索装置1700がXML文書を前処理する際の各構成間の連携動作を示す。   FIG. 18 shows a cooperative operation between components when the XML document search apparatus 1700 according to this embodiment pre-processes an XML document.

まず、XML文書検索装置400の利用者が、ユーザインタフェース406を用いて、処理の開始を指示する(ステップS801)。   First, the user of the XML document search apparatus 400 instructs the start of processing using the user interface 406 (step S801).

処理の開始指示を受け付けたCPU401は、補助記憶装置403からXML文書集合420を読み出す(ステップS802)。読み出されたXML文書集合420は、主記憶装置402に格納される。   Receiving the processing start instruction, the CPU 401 reads the XML document set 420 from the auxiliary storage device 403 (step S802). The read XML document set 420 is stored in the main storage device 402.

次に、XML文書分析部410(CPU401)は、XML文書集合420に含まれる各XML文書を分析し、パストライ421、数列化されたDOM木422、テキストデータ424を生成する(ステップS803)。ここまでは、第1の形態例と同じである。   Next, the XML document analysis unit 410 (CPU 401) analyzes each XML document included in the XML document set 420, and generates a path trie 421, a digitized DOM tree 422, and text data 424 (step S803). The steps so far are the same as those in the first embodiment.

Wavelet木構築部411は、XML文書分析部410が生成した数列化されたDOM木422に含まれる各数列を、Wavelet木群423に変換する(ステップS804)。Wavelet木構築部411は、公知の方法(例えば非特許文献5を参照)を使用し、数列化されたDOM木422をWavelet木群423に変換する。そして、数列化されたDOM木422に代わり、Wavelet木群423を補助記憶装置に出力し、同様にパストライ421、テキストデータ424も出力する(ステップS805)。数列化されたDOM木422は、Wavelet木群423を構築した後に消去してもよい。   The Wavelet tree construction unit 411 converts each number sequence included in the numbered DOM tree 422 generated by the XML document analysis unit 410 into the Wavelet tree group 423 (step S804). The Wavelet tree construction unit 411 converts the DOM tree 422 converted into a sequence into a Wavelet tree group 423 using a known method (see, for example, Non-Patent Document 5). Then, the Wavelet tree group 423 is output to the auxiliary storage device instead of the DOM tree 422 converted into a sequence, and the path trie 421 and the text data 424 are also output (step S805). The sequenced DOM tree 422 may be deleted after the Wavelet tree group 423 is constructed.

[前処理の概要]
図19に、本形態例に係るXML文書検索装置400が検索前に実行する前処理の流れを説明するフローチャートを示す。
[Overview of preprocessing]
FIG. 19 is a flowchart for explaining the flow of preprocessing executed by the XML document search apparatus 400 according to this embodiment before search.

CPU401は、XML文書集合420が入力されると、XML文書分析部410による分析処理を実行する(ステップS901)。XML文書分析部410は、XML文書集合420に含まれる各XML文書を分析し、パストライ421、数列化されたDOM木422、テキストデータ424を生成する。   When the XML document set 420 is input, the CPU 401 executes analysis processing by the XML document analysis unit 410 (step S901). The XML document analysis unit 410 analyzes each XML document included in the XML document set 420, and generates a path trie 421, a DOM tree 422 converted into a sequence, and text data 424.

この処理が終了すると、CPU401は、前述したようにWavelet木群423を構築する(ステップS902)。   When this process ends, the CPU 401 constructs the Wavelet tree group 423 as described above (step S902).

この後、CPU401は、パストライ421、Wavelet木群123、テキストデータ424を補助記憶装置403に出力する(ステップS903)。   Thereafter, the CPU 401 outputs the path trie 421, the wavelet tree group 123, and the text data 424 to the auxiliary storage device 403 (step S903).

[検索処理]
本形態例に係るXML文書検索装置1700は、検索の際、まず、パストライ421およびWavelet木群423を補助記憶装置403から読み出す。前述の通り、数列化されたDOM木422は不要である。
[Search processing]
The XML document search apparatus 1700 according to the present embodiment first reads out the path trie 421 and the Wavelet tree group 423 from the auxiliary storage device 403 during the search. As described above, the DOM tree 422 converted into a number sequence is not necessary.

検索動作は、第1の形態例と同様、図14に従って実行される。第1の形態例との違いは、検索クエリである構造パスが与えられた後に実行されるステップS701(図14)のrank演算と、ステップS703(図14)及びS704(図14)のselect演算にWavelet木を用いる点と、2次元配列N702(図7)が不要な点である。ただし、rank演算よりも配列参照の処理の方が速いため、本形態例の場合にも、2次元配列N702を使用してもよい。   The search operation is executed according to FIG. 14 as in the first embodiment. The difference from the first embodiment is that a rank operation in step S701 (FIG. 14) executed after a structural path as a search query is given, and a select operation in steps S703 (FIG. 14) and S704 (FIG. 14). A point where a Wavelet tree is used for the two-dimensional array N702 (FIG. 7) is unnecessary. However, since the array reference processing is faster than the rank operation, the two-dimensional array N702 may be used also in this embodiment.

[第2の形態例の効果]
本形態例に係るXML文書検索装置1700を用いれば、数列T[d]に値tが頻出しない場合にも、XPathにより記述された検索クエリによるXML文書の検索処理を高速に実行することができる。
[Effect of the second embodiment]
If the XML document search apparatus 1700 according to this embodiment is used, even when the value t does not appear frequently in the sequence T [d], the XML document search process using the search query described in XPath can be executed at high speed. .

[第3の形態例]
XPathによる検索では、親要素、子要素、兄弟要素等に関する制約条件が検索クエリに盛り込まれる場合がある。そこで、本形態例では、親要素、子要素、兄弟要素等を探索する機能と、任意の2つの要素i、jが、指定された関係にあるか否かを検査するための機能について説明する。以下の説明では、要素i、jの深さをdi、djとし、パス種別をそれぞれti、tjとする。
[Third embodiment]
In a search using XPath, there are cases where a constraint condition related to a parent element, a child element, a sibling element, or the like is included in a search query. Therefore, in this embodiment, a function for searching for a parent element, a child element, a sibling element, and the like and a function for checking whether or not any two elements i and j are in a specified relationship will be described. . In the following description, the depths of the elements i and j are di and dj, and the path types are ti and tj, respectively.

(1)要素iの親要素の計算
深さdi≦1の場合、要素iの親要素は存在しない。それ以外の場合、親要素は深さがdi−1で与えられる、i未満でiに最も近い要素番号の要素である。従って、親要素の要素番号は、select(S,di−1,rank(S,di−1,i))を計算することにより取得することができる。
(1) Calculation of parent element of element i When the depth di ≦ 1, there is no parent element of element i. Otherwise, the parent element is the element whose element number is less than i and closest to i, given depth di-1. Therefore, the element number of the parent element can be obtained by calculating select (S, di-1, rank (S, di-1, i)).

(2)要素iの最初の子要素の計算
子要素が存在すれば、要素番号はi+1で与えられる。ただし、子要素が存在しない場合があり、その場合、要素番号i+1の要素の深さはdi+1以外である。第1の形態例で述べたように数列化されたDOM木422を使用している場合はS[i+1]=di+1か否かを判定すればよいが、第2の形態例で述べたようにWavelet木群423しか使用できない場合は、rank(S,di+1,i+1)=rank(S,di+1,i)+1か否かを判定すればよい。後者の場合CPU401は、図20に示す処理手順により、子要素の存在を判定し(ステップS1001)、存在する場合にはその要素番号i+1を出力し(ステップS1002)、存在しない場合には「子要素無し」と出力する(ステップS1003)。
(2) Calculation of the first child element of element i If there is a child element, the element number is given by i + 1. However, a child element may not exist, and in this case, the depth of the element with element number i + 1 is other than di + 1. As described in the first embodiment, when the DOM tree 422 converted into a sequence is used, it may be determined whether S [i + 1] = di + 1, but as described in the second embodiment. If only the Wavelet tree group 423 can be used, it may be determined whether rank (S, di + 1, i + 1) = rank (S, di + 1, i) +1. In the latter case, the CPU 401 determines the presence of a child element according to the processing procedure shown in FIG. 20 (step S1001), and outputs the element number i + 1 if it exists (step S1002). “No element” is output (step S1003).

(3)要素iの兄弟要素の計算
要素iよりも前に兄弟要素が存在する場合、1つ前の兄弟要素は、要素iと同じ深さdiであり、i未満でiに最も近い要素番号の要素となる。従って、その要素番号jは、j=select(S,di,rank(S,di,i−1))として与えることができる。
(3) Calculation of sibling element of element i When there is a sibling element before element i, the previous sibling element has the same depth di as element i, and is the element number closest to i less than i It becomes the element of. Therefore, the element number j can be given as j = select (S, di, rank (S, di, i-1)).

これに対し、要素iよりも後に兄弟要素が存在する場合、1つ後の兄弟要素は、要素iと同じ深さdiであり、iより大きくiに最も近い要素番号の要素となる。従って、その要素番号jは、j=select(S,di,rank(S,di,i)+1)として与えることができる。   On the other hand, when there is a sibling element after the element i, the next sibling element has the same depth di as the element i, and is an element having an element number greater than i and closest to i. Therefore, the element number j can be given as j = select (S, di, rank (S, di, i) +1).

一方、そのような兄弟要素が存在しない場合、いずれの場合にも、要素iと要素jの間には、i及びjのいずれか一方だけの親要素が存在する。よって、rank(S,di−1,i)=rank(S,di−1,j)ならばjは兄弟要素であり、それ以外の場合は当該兄弟要素が存在しないことになる。   On the other hand, when such a sibling element does not exist, in any case, only the parent element of either i or j exists between the element i and the element j. Therefore, if rank (S, di-1, i) = rank (S, di-1, j), j is a sibling element, otherwise the sibling element does not exist.

この判定処理をフローチャートで表すと図21及び図22となる。図21は、1つ前の兄弟要素を探すためのフローチャートであり、図22は、1つ後の兄弟要素を探すためのフローチャートである。   This determination process is represented by flowcharts in FIGS. 21 and 22. FIG. 21 is a flowchart for searching for the previous sibling element, and FIG. 22 is a flowchart for searching for the next sibling element.

まず、図21に示すフローチャートについて説明する。前述したように、1つ前の兄弟要素jは、要素iと同じ深さdiであり、i未満でiに最も近い要素番号の要素となる。従って、ステップS1101では、j=select(S,di,rank(S,di,i−1))を計算する。次に、要素iの深さdiよりも1つ浅い深さについてi番目までの数(=rank(S,di−1,i)と、j番目までの数(=rank(S,di−1,i)を比較する(ステップS1102)。2つの値が同じであれば、同じ親要素の子なのでステップS1101で計算されたjを出力する(ステップS1103)。2つの値が異なれば、兄弟要素無しと出力する(ステップS1104)。   First, the flowchart shown in FIG. 21 will be described. As described above, the previous sibling element j has the same depth di as the element i, and is an element having an element number closest to i but less than i. Accordingly, in step S1101, j = select (S, di, rank (S, di, i-1)) is calculated. Next, the number up to the i-th (= rank (S, di-1, i) and the number up to the j-th (= rank (S, di-1), which is one depth less than the depth di of the element i. , I) are compared (step S1102) If the two values are the same, a child of the same parent element is output, and j calculated in step S1101 is output (step S1103). “None” is output (step S1104).

次に、図22に示すフローチャートについて説明する。前述したように、1つ後の兄弟要素jは、要素iと同じ深さdiであり、iより大きくiに最も近い要素番号の要素となる。従って、ステップS1201では、j=select(S,di,rank(S,di,i)+1)を計算する。次に、要素iより1つ浅い深さについてi番目までの数(=rank(S,di−1,i)と、j番目までの数(=rank(S,di−1,j)を比較する(ステップS1202)。2つの値が同じであれば、同じ親要素の子なのでステップS1201で計算されたjを出力する(ステップS1203)。2つの値が異なれば、兄弟要素無しと出力する(ステップS1204)。   Next, the flowchart shown in FIG. 22 will be described. As described above, the next sibling element j has the same depth di as the element i, and is an element having an element number greater than i and closest to i. Accordingly, in step S1201, j = select (S, di, rank (S, di, i) +1) is calculated. Next, the number up to the i-th (= rank (S, di-1, i)) and the number up to the j-th (= rank (S, di-1, j)) are compared with the depth one shallower than the element i. (Step S1202) If the two values are the same, since it is a child of the same parent element, output j calculated in Step S1201 (Step S1203) If the two values are different, output that there is no sibling element (Step S1202). Step S1204).

(4)要素iが要素jの親か否かの判定
上記(1)の方法で要素jの親要素を計算し、計算された親要素の値が要素iに一致するか否かで判定する。
(4) Determination of whether element i is the parent of element j Calculate the parent element of element j by the method of (1) above, and determine whether the calculated value of the parent element matches element i .

(5)要素iがjの先祖であるか否かの判定
以下の条件を同時に満たせば先祖であり、そうでなければ先祖でないと判定する。
(5−1) i<j
この条件を満たせば、要素iの開始タグは、要素jの開始タグよりも先に出現する。
(5−2) rank(S,i,di)=rank(S,j,di)
この条件を満たせば、要素iと要素jの間には、深さがdi以下である要素i以外の要素はない。
(5) Determination of whether element i is an ancestor of j If the following conditions are satisfied simultaneously, it is determined that the element i is an ancestor.
(5-1) i <j
If this condition is satisfied, the start tag for element i appears before the start tag for element j.
(5-2) rank (S, i, di) = rank (S, j, di)
If this condition is satisfied, there is no element other than element i having a depth of di or less between element i and element j.

(6)要素i、jが兄弟要素であるか否かの判定
要素iと要素jの親要素を計算し、一致するか否かを判定する。
(6) Determining whether or not the elements i and j are sibling elements The parent elements of the elements i and j are calculated, and it is determined whether or not they match.

rank(S,i,di−1)=rank(S,j,dj−1)であれば、兄弟要素であると判定してもよい。   If rank (S, i, di-1) = rank (S, j, dj-1), it may be determined that the element is a sibling element.

[第4の形態例]
XPathに規定されている検索クエリは、複数の構造パスに合致する場合がある。例えば、「/a//text()」という検索クエリは、タグ名が「a」であるルート要素の子孫であるテキストノードの全てに合致する。このような検索クエリが与えられた場合、パストライ上でクエリに合致する構造パスを全て計算し、それらの検索結果の和集合を取ればよい。
[Fourth embodiment]
A search query defined in XPath may match a plurality of structure paths. For example, the search query “/ a // text ()” matches all text nodes that are descendants of the root element whose tag name is “a”. When such a search query is given, all the structural paths that match the query are calculated on the path trie, and the union of those search results may be taken.

[第5の形態例]
XPathに規定されている検索クエリは、テキストに関する条件を含む場合がある。例えば「”/a//text()[contains(.,”abc")]」という検索クエリは、タグ名が「a」であるルート要素の子孫であるテキストで"abc"を含むものに合致する。このような検索クエリが与えられた場合、前述したXML要素に関する検索結果と、テキストデータ424に対するテキスト検索の結果を照合し、両方の条件に合致する箇所を検索結果とすればよい。
[Fifth Embodiment]
A search query defined in XPath may include a condition related to text. For example, the search query ""/a//text()[contains(.,"abc")]" matches text that is a descendant of the root element with the tag name "a" and contains "abc". To do. When such a search query is given, the search result relating to the XML element described above and the text search result for the text data 424 may be collated, and a location that satisfies both conditions may be used as the search result.

テキスト検索の処理には、公知の任意の手法が使用できる(例えば非特許文献6を参照)。   Any known technique can be used for the text search process (see, for example, Non-Patent Document 6).

[他の形態例]
前述の形態例は、本発明の適用例を例示したものであり、本発明の技術的範囲を前述した各形態例の具体的構成に限定する趣旨ではない。本発明の要旨を逸脱しない範囲において種々の変更可能である。例えば本発明は、前述した各形態例の全ての構成要素を備える必要はない。また、ホン発明は、ある形態例の一部を他の形態例の構成に置き換えることもでき、ある形態例の構成に他の形態例の構成を加えることもできる。
[Other examples]
The above-described embodiments are examples of application of the present invention, and are not intended to limit the technical scope of the present invention to the specific configurations of the embodiments described above. Various modifications can be made without departing from the scope of the present invention. For example, the present invention does not have to include all the constituent elements of the respective embodiments described above. In the phone invention, a part of one embodiment can be replaced with the structure of another embodiment, and the structure of another embodiment can be added to the structure of one embodiment.

また、上述した各構成、機能、処理部、処理手段等は、それらの一部又は全部を、例えば集積回路その他のハードウェアとして実現しても良い。また、各処理機能を実現するプログラム、テーブル、ファイル等の情報は、メモリやハードディスク、SSD(Solid State Drive)等の記憶装置、ICカード、SDカード、DVD等の記憶媒体に格納することができる。   Moreover, you may implement | achieve some or all of each structure, a function, a process part, a process means, etc. which were mentioned above as an integrated circuit or other hardware, for example. In addition, information such as programs, tables, and files that realize each processing function can be stored in a storage device such as a memory, a hard disk, or a solid state drive (SSD), or a storage medium such as an IC card, an SD card, or a DVD. .

400 XML文書検索装置
401 CPU
402 主記憶装置
403 補助記憶装置
404 リムーバブルドライブ
406 ユーザインタフェース
407 ネットワークインタフェース
410 XML文書分析部
411 Wavelet木構築部
412 構造パス分析部
413 ノード探索部
420 XML文書集合
421 パストライ
422 数列化されたDOM木
423 Wavelet木
424 テキストデータ
430 外部記憶装置
440 ネットワーク
1700 XML文書検索装置
400 XML document search device 401 CPU
402 Main storage device 403 Auxiliary storage device 404 Removable drive 406 User interface 407 Network interface 410 XML document analysis unit 411 Wavelet tree construction unit 412 Structure path analysis unit 413 Node search unit 420 XML document set 421 Path trie 422 Numbered DOM tree 423 Wavelet tree 424 Text data 430 External storage device 440 Network 1700 XML document retrieval device

Claims (8)

プロセッサと、主記憶装置と、XML文書を入出力する入出力装置とを有し、検索クエリとして、XML文書の要素及びその要素の祖先要素をルート要素から順にすべて列挙したものである構造パスが与えられたとき、その構造パスに合致する箇所を探索するXML文書検索装置において、
前記入出力装置は、検索対象のXML文書集合の入力を受け付け、
前記XML文書検索装置は、
前記XML文書を分析し、タグの種類および包含関係を認識し数列群に変換するとともにパストライを構築するXML文書分析部と、
前記パストライを用いて、検索クエリである構造パスの深さおよびパス種別を計算する構造パス分析部と、
前記構造パスの深さ及びパス種別に基づき、検索クエリである構造パスに合致する要素が出現する箇所を計算する要素探索部とを有し、
前記XML文書分析部は、
XML文書のDOM木の形状を記録するために、XML文書の出現する要素の出現順に、当該要素の深さを表す数値の列を部分列として含む第一の数列Sと、
前記DOM木の各ノードに対応する構造パスの種類を記録する1つ以上の数列からなる数列群Tとを作成し、数列群Tに含まれる数列T[d]が深さdである構造パスの種類を記録したものであるとき、
前記要素探索部は、
前記数列Sと、前記数列群Tを走査することにより、検索クエリである構造パスに合致する箇所を計算する
ことを特徴とするXML文書検索装置。
A structure path having a processor, a main storage device, and an input / output device for inputting / outputting an XML document, and as a search query, lists all elements of the XML document and ancestor elements of the elements in order from the root element. Given an XML document search device that searches for a location that matches the structure path,
The input / output device receives an input of an XML document set to be searched,
The XML document search device
An XML document analysis unit that analyzes the XML document, recognizes a tag type and an inclusion relationship, converts the tag document into a sequence of numbers, and constructs a path trie;
Using the path trie, a structure path analysis unit that calculates the depth and path type of the structure path that is a search query;
An element search unit that calculates a location where an element that matches the structure path that is a search query appears based on the depth and path type of the structure path;
The XML document analysis unit
In order to record the shape of the DOM tree of the XML document, a first number sequence S including a numerical sequence representing the depth of the element as a partial sequence in the order of appearance of the element in the XML document;
A sequence group T composed of one or more sequences that record the type of the structure path corresponding to each node of the DOM tree, and a sequence path T [d] included in the sequence group T has a depth d When recording the type of
The element search unit includes:
An XML document search apparatus characterized in that by scanning the number sequence S and the number sequence group T, a location that matches a structure path as a search query is calculated.
請求項1に記載のXML文書検索装置において、
前記要素探索部は、
数列Aにおいてj番目に値cが出現する位置をselect(A,c,j)と表記し、この値を計算する処理をselect演算と呼び、前記検索クエリの構造パスの深さをd、パス種別をtとし、当該構造パスの出現総数をnとするとき、1≦k≦nである整数kに対し、式(1)を適用して得られるk”の値を計算することにより、前記検索クエリに合致する箇所を前記XML文書集合から探索する
ことを特徴とするXML文書検索装置。
[数1]
k”=select(S,d,select(T[d],t,k)) …式(1)
The XML document search device according to claim 1,
The element search unit includes:
The position at which the value c appears in the sequence A is denoted as select (A, c, j), and the process for calculating this value is referred to as a select operation. The depth of the structure path of the search query is d, the path When the type is t and the total number of occurrences of the structure path is n, the value of k ″ obtained by applying the formula (1) is calculated for the integer k where 1 ≦ k ≦ n. An XML document search apparatus, wherein a part that matches a search query is searched from the XML document set.
[Equation 1]
k ″ = select (S, d, select (T [d], t, k)) (1)
請求項2に記載のXML文書検索装置において、
前記XML文書分析部の処理に引き続き、前記数列S及び前記数列群Tに含まれる各数列をWavelet木に変換するWavelet木構築部を有し、
前記select演算に、前記Wavelet木を用いる
ことを特徴とするXML文書検索装置。
The XML document search device according to claim 2,
Subsequent to the processing of the XML document analysis unit, a Wavelet tree construction unit that converts each number sequence included in the number sequence S and the number sequence group T into a Wavelet tree,
The XML document search apparatus, wherein the Wavelet tree is used for the select operation.
請求項1に記載のXML文書検索装置において、
XML文書のDOM木の形状を記録するために、XML文書の出現する要素の出現順に、当該要素の深さを表す数値の列を部分列として含む数列を構築する手段を有し、
前記数列Sにおいてi番目までにある値cの数をrank(S,c,i)と表記し、この値を計算する処理をrank演算と呼び、
数列Sにおいてj番目に値cが出現する位置をselect(S,c,j)と表記し、この値を計算する処理をselect演算と呼び、
前記数列においてi番目の値に対応するXML文書の要素に対し、その要素の構造パスの深さをdとするとき、
前記要素の親である要素の番号を式(2)によって計算し、
前記要素の最初の子である要素の番号を式(3)によって計算し、
前記要素に最も近い先行する兄弟要素の番号を式(4)によって計算し、
前記要素に最も近い後続の兄弟要素の番号を式(5)によって計算する
ことを特徴とするXML文書検索装置。
[数2]
select(S,d−1,rank(S,d−1,i)) …式(2)
[数3]
i+1 …式(3)
[数4]
select(S,d,rank(S,d,i−1)) …式(4)
[数5]
select(S,d,rank(S,d,i)+1) …式(5)
The XML document search device according to claim 1,
In order to record the shape of the DOM tree of the XML document, means for constructing a numerical sequence including a numerical sequence representing the depth of the element as a partial sequence in the order of appearance of the element in the XML document,
The number of values c up to the i-th in the sequence S is expressed as rank (S, c, i), and the process of calculating this value is called a rank operation.
The position where the value c appears in the sequence S in the sequence S is expressed as select (S, c, j), and the process of calculating this value is called a select operation.
For the element of the XML document corresponding to the i-th value in the sequence, when the depth of the structure path of the element is d,
The number of the element that is the parent of the element is calculated by equation (2),
Calculate the number of the element that is the first child of the element by equation (3),
Calculate the number of the preceding sibling element closest to the element by equation (4);
An XML document search apparatus characterized in that the number of a subsequent sibling element closest to the element is calculated according to formula (5).
[Equation 2]
select (S, d-1, rank (S, d-1, i)) (2)
[Equation 3]
i + 1 Formula (3)
[Equation 4]
select (S, d, rank (S, d, i-1)) (4)
[Equation 5]
select (S, d, rank (S, d, i) +1) (5)
請求項4に記載のXML文書検索装置において、
前記XML文書分析部の処理に引き続き、前記数列Sおよび前記数列群Tに含まれる各数列をWavelet木に変換するWavelet木構築部を有し、
前記rank演算及び前記select演算に、前記Wavelet木を用いる
ことを特徴とするXML文書検索装置。
The XML document search device according to claim 4,
Subsequent to the processing of the XML document analysis unit, a Wavelet tree construction unit that converts each number sequence included in the number sequence S and the number sequence group T into a Wavelet tree,
The XML document search apparatus, wherein the Wavelet tree is used for the rank operation and the select operation.
検索クエリとして、XML文書の要素及びその要素の祖先要素をルート要素から順にすべて列挙したものである構造パスが与えられたときに、その構造パスに合致する箇所を探索する処理をコンピュータに実行させるプログラムにおいて、
前記プログラムは、
前記XML文書を分析し、タグの種類および包含関係を認識し数列群に変換しパストライを構築する第1の処理と、
前記パストライを用いて、検索クエリである構造パスの深さおよびパス種別を計算する第2の処理と、
前記構造パスの深さ及びパス種別に基づき、検索クエリである構造パスに合致する要素が出現する箇所を計算する第3の処理とを前記コンピュータに実行させ、
前記第1の処理は、
XML文書のDOM木の形状を記録するために、XML文書の出現する要素の出現順に、当該要素の深さを表す数値の列を部分列として含む第一の数列Sと、DOM木における各ノードに対応する構造パスの種類を記録する1つ以上の数列からなる数列群Tとを作成し、数列群Tに含まれる数列T[d]が深さdである構造パスの種類を記録したものであるとき、
前記第3の処理は、
前記数列Sと、前記数列群Tを走査することにより、検索クエリである構造パスに合致する箇所を計算する
ことを特徴とするプログラム。
When a search path is provided with a structure path that lists all elements of an XML document and ancestor elements of the element in order from the root element, the computer is caused to execute a process of searching for a location that matches the structure path. In the program
The program is
A first process of analyzing the XML document, recognizing a tag type and an inclusion relation, converting the XML document into a sequence of numbers, and constructing a path trie;
A second process of calculating the depth and path type of the structural path that is the search query using the path trie;
Based on the depth of the structural path and the path type, the computer is caused to execute a third process for calculating a location where an element that matches the structural path that is the search query appears,
The first process includes
In order to record the shape of the DOM tree of the XML document, each node in the DOM tree includes a first numerical sequence S including a numerical sequence representing the depth of the element as a partial sequence in the order of appearance of the element in the XML document. And a sequence group T composed of one or more sequences that record the type of the structure path corresponding to, and records the types of structure paths in which the sequence T [d] included in the sequence group T has a depth d When
The third process includes
A program that scans the sequence S and the sequence group T to calculate a location that matches a structural path that is a search query.
請求項6に記載のプログラムにおいて、
前記第3の処理は、
数列Aにおいてj番目に値cが出現する位置をselect(A,c,j)と表記し、この値を計算する処理をselect演算と呼び、前記検索クエリの構造パスの深さをd、パス種別をtとし、当該構造パスの出現総数をnとするとき、1≦k≦nである整数kに対し、式(6)を適用して得られるk”の値を計算することにより、前記検索クエリに合致する箇所を前記XML文書集合から探索する
ことを特徴とするプログラム。
[数6]
k”=select(S,d,select(T[d],t,k)) …式(6)
The program according to claim 6,
The third process includes
The position at which the value c appears in the sequence A is denoted as select (A, c, j), and the process for calculating this value is referred to as a select operation. The depth of the structure path of the search query is d, the path By calculating the value of k ″ obtained by applying Equation (6) for an integer k where 1 ≦ k ≦ n, where t is the type and n is the total number of occurrences of the structure path, A program that searches the XML document set for a location that matches a search query.
[Equation 6]
k ″ = select (S, d, select (T [d], t, k)) (6)
請求項7に記載のプログラムにおいて、
前記第1の処理に引き続き、前記数列S及び前記数列群Tに含まれる各数列をWavelet木に変換する第4の処理を有し、
前記select演算に、前記Wavelet木を用いる
ことを特徴とするプログラム。
The program according to claim 7,
Subsequent to the first process, there is a fourth process for converting each number sequence included in the number sequence S and the number sequence group T into a Wavelet tree,
The program using the Wavelet tree for the select operation.
JP2012039242A 2012-02-24 2012-02-24 XML document search apparatus and program Expired - Fee Related JP5695586B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012039242A JP5695586B2 (en) 2012-02-24 2012-02-24 XML document search apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012039242A JP5695586B2 (en) 2012-02-24 2012-02-24 XML document search apparatus and program

Publications (2)

Publication Number Publication Date
JP2013175053A true JP2013175053A (en) 2013-09-05
JP5695586B2 JP5695586B2 (en) 2015-04-08

Family

ID=49267899

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012039242A Expired - Fee Related JP5695586B2 (en) 2012-02-24 2012-02-24 XML document search apparatus and program

Country Status (1)

Country Link
JP (1) JP5695586B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650250A (en) * 2018-04-27 2018-10-12 北京奇安信科技有限公司 Illegal page detection method, system, computer system and readable storage medium storing program for executing
US11527325B2 (en) 2018-01-18 2022-12-13 Hitachi, Ltd. Analysis apparatus and analysis method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001034618A (en) * 1999-07-16 2001-02-09 Fujitsu Ltd Method and system for retrieval processing of xml data
JP2006228155A (en) * 2005-02-21 2006-08-31 Nippon Telegr & Teleph Corp <Ntt> Xml data processing apparatus, xml data processing method, xml data processing program, and storage medium having xml data processing program recorded therein
JP2007034827A (en) * 2005-07-28 2007-02-08 Toshiba Corp Structured document storage apparatus, structured document retrieval apparatus, structured document system, method, and program
JP2007193642A (en) * 2006-01-20 2007-08-02 Nippon Telegr & Teleph Corp <Ntt> Xpath processor, xpath processing method, xpath processing program and storage medium
US20110307511A1 (en) * 2009-03-19 2011-12-15 Fujitsu Limited Computer readable storage medium recording database search program, database search device, and database search method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001034618A (en) * 1999-07-16 2001-02-09 Fujitsu Ltd Method and system for retrieval processing of xml data
JP2006228155A (en) * 2005-02-21 2006-08-31 Nippon Telegr & Teleph Corp <Ntt> Xml data processing apparatus, xml data processing method, xml data processing program, and storage medium having xml data processing program recorded therein
JP2007034827A (en) * 2005-07-28 2007-02-08 Toshiba Corp Structured document storage apparatus, structured document retrieval apparatus, structured document system, method, and program
JP2007193642A (en) * 2006-01-20 2007-08-02 Nippon Telegr & Teleph Corp <Ntt> Xpath processor, xpath processing method, xpath processing program and storage medium
US20110307511A1 (en) * 2009-03-19 2011-12-15 Fujitsu Limited Computer readable storage medium recording database search program, database search device, and database search method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CSNG200701197002; 萩尾 一仁 他: '漸増的なパストライ構築に基づく高速・軽量XML文書フィルタリング' 日本データベース学会Letters Vol.6,No.2, 20070928, pp.5-8., 日本データベース学会 *
CSNG200701297005; 畑中 洋介 他: 'データの傾向を考慮したストリームデータの相関の計算方法の提案' 日本データベース学会Letters Vol.2,No.3, 20031218, pp.21-24., 日本データベース学会 *
JPN6015002062; 萩尾 一仁 他: '漸増的なパストライ構築に基づく高速・軽量XML文書フィルタリング' 日本データベース学会Letters Vol.6,No.2, 20070928, pp.5-8., 日本データベース学会 *
JPN6015002063; 畑中 洋介 他: 'データの傾向を考慮したストリームデータの相関の計算方法の提案' 日本データベース学会Letters Vol.2,No.3, 20031218, pp.21-24., 日本データベース学会 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11527325B2 (en) 2018-01-18 2022-12-13 Hitachi, Ltd. Analysis apparatus and analysis method
CN108650250A (en) * 2018-04-27 2018-10-12 北京奇安信科技有限公司 Illegal page detection method, system, computer system and readable storage medium storing program for executing

Also Published As

Publication number Publication date
JP5695586B2 (en) 2015-04-08

Similar Documents

Publication Publication Date Title
JP5121146B2 (en) Structured document management apparatus, structured document management program, and structured document management method
JP5423676B2 (en) Data classification system, data classification method, and data classification program
KR101083563B1 (en) Method and System for Managing Database
JP2009110513A (en) Automatic generation of ontologies using word affinities
CN106528648B (en) In conjunction with the distributed RDF keyword proximity search method of Redis memory database
US8190632B2 (en) Computer product, information retrieving apparatus, and information retrieving method
JP4398988B2 (en) Apparatus, method and program for managing structured document
JP4839195B2 (en) Method for calculating conformity of XML document, program thereof, and information processing apparatus
JP5500070B2 (en) Data classification system, data classification method, and data classification program
JP2013246522A (en) Structured document retrieval device and program
Sunuwar et al. Comparative Analysis of Relational and Graph Databases for Data Provenance: Performance, Queries, and Security Considerations
JP5695586B2 (en) XML document search apparatus and program
JP5869948B2 (en) Passage dividing method, apparatus, and program
KR20120115005A (en) Method and apparatus for processing query efficiently
KR101476225B1 (en) Method for Indexing Natural Language And Mathematical Formula, Apparatus And Computer-Readable Recording Medium with Program Therefor
JP4649339B2 (en) XPath processing apparatus, XPath processing method, XPath processing program, and storage medium
JP5954742B2 (en) Apparatus and method for retrieving documents
JP4562130B2 (en) XML data processing apparatus, XML data processing method, XML data processing program, and storage medium storing XML data processing program
KR101679011B1 (en) Method and Apparatus for moving data in DBMS
US20130246479A1 (en) Computer-readable recording medium, data model conversion method, and data model conversion apparatus
JP2010267081A (en) Information search method, device and program
US11681700B1 (en) Methods and apparatuses for clustered storage of information
JP5764448B2 (en) Method and apparatus for dynamic update of document ranking scores
KR20150057497A (en) Method and System of Topic Detection for On-line Text Documents: A Topic Tree-based Approach
JP2019003501A (en) Information processor, information processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140604

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141126

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150206

R151 Written notification of patent or utility model registration

Ref document number: 5695586

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees