JP2001236352A - Method and device for semistructured document retrieval and storage medium stored with semistructured document retrieval program - Google Patents

Method and device for semistructured document retrieval and storage medium stored with semistructured document retrieval program

Info

Publication number
JP2001236352A
JP2001236352A JP2000043427A JP2000043427A JP2001236352A JP 2001236352 A JP2001236352 A JP 2001236352A JP 2000043427 A JP2000043427 A JP 2000043427A JP 2000043427 A JP2000043427 A JP 2000043427A JP 2001236352 A JP2001236352 A JP 2001236352A
Authority
JP
Japan
Prior art keywords
semi
search
document
structured document
structured
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
JP2000043427A
Other languages
Japanese (ja)
Other versions
JP3630062B2 (en
Inventor
Takashi Hayashi
孝志 林
Yuichi Iizuka
裕一 飯塚
Shiro Kasuga
史朗 春日
Gengo Suzuki
源吾 鈴木
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2000043427A priority Critical patent/JP3630062B2/en
Publication of JP2001236352A publication Critical patent/JP2001236352A/en
Application granted granted Critical
Publication of JP3630062B2 publication Critical patent/JP3630062B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a method and a device for semistructured document retrieval which can retrieve document-in-XML information by an SQL enabling retrieval by obtaining a value from an XML document for an item specified by a conventional SQL in use at a retrieval request, dynamically generating a table, and performing conditional processing and a storage medium stored with a semistructured document retrieval program. SOLUTION: This invention has a retrieval language analyzing means which analyzes a retrieval language for retrieval from a database including a relational database represented in an input table form, a semistructured document analyzing means which analyzes document elements and the syntax of a semistructured document represented in the hierarchical structure of the document elements, a full retrieving means which obtain the values of document elements of the semistructured document meeting retrieval conditions analyzed by the retrieval language analyzing means, and a relational algebra operation means which outputs a retrieval result in table form by using the relation between the document elements according to the values of the document elements.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、半構造化文書検索
方法及び装置及び半構造化文書検索プログラムを格納し
た記憶媒体に係り、特に、表形式で表現されるリレーシ
ョナルデータベース等を扱う検索言語を用いて文書要素
及びその階層構造で表現される半構造化文書内の情報を
検索するための半構造化文書検索方法及び装置及び半構
造化文書検索プログラムを格納した記憶媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for retrieving a semi-structured document and a storage medium storing a program for retrieving a semi-structured document. The present invention relates to a semi-structured document search method and apparatus for searching for a document element and information in a semi-structured document expressed by a hierarchical structure thereof, and a storage medium storing a semi-structured document search program.

【0002】詳しくは、文書における要素間の関係を保
持することで、検索要求時に検索式で指定された項目に
対して、文書から値を取得し、動的に表を作成し、条件
処理を行うことで検索を実行し得る検索言語による半構
造化文書検索方法及び装置及び半構造化文書検索プログ
ラムを格納した記憶媒体に関する。
More specifically, by maintaining the relationship between elements in a document, a value is obtained from a document for an item specified by a search formula at the time of a search request, a table is dynamically created, and condition processing is performed. The present invention relates to a semi-structured document search method and apparatus using a search language that can execute a search by performing the search, and a storage medium storing a semi-structured document search program.

【0003】[0003]

【従来の技術】近年、XML(eXtensible Markup Lang
uage: 拡張可能なマーク付言語) が、情報流通フォーマ
ットとして注目を集めており、電子商取引への応用が期
待されている。そこで、XML文書を効率良く検索する
技術が必要となってきている。XML文書は、文書要素
及びその階層構造により表現される。XML文書に対す
る検索言語は、XQLや、XML−QLなどが提案され
ているが、標準化されていない。一方、情報を管理・検
索する既存のシステムの中ではデータベースが重要な役
割を果しており、特に、リレーショナルデータベースが
普及している。
2. Description of the Related Art In recent years, XML (eXtensible Markup Lang
uage: an extensible marked language) is attracting attention as an information distribution format, and is expected to be applied to e-commerce. Therefore, a technique for efficiently searching an XML document is required. An XML document is represented by a document element and its hierarchical structure. As search languages for XML documents, XQL and XML-QL have been proposed, but are not standardized. On the other hand, a database plays an important role in an existing system for managing and retrieving information, and in particular, a relational database is widely used.

【0004】リレーショナルデータベースを扱う言語の
基準規格としてSQLが広く世の中で使われている。
[0004] SQL is widely used in the world as a standard for languages dealing with relational databases.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、情報源
としてXML文書とリレーショナルデータベースとが共
に存在することは以下のような問題を生じている。
However, the presence of both an XML document and a relational database as information sources causes the following problems.

【0006】(1) 検索インタフェースの不統一性 表形式のリレーショナルデータベースが普及しており、
検索言語としてSQLを用いるアプリケーションが多く
存在している。このようなアプリケーションから階層構
造により表現されるXML文書内の情報検索が行えな
い。
(1) Inconsistency of search interface Relational databases in tabular form have become widespread.
There are many applications that use SQL as a search language. Such applications cannot search for information in an XML document represented by a hierarchical structure.

【0007】(2) 検索効率の悪化 所望の情報がリレーショナルデータベースとXML文書
に分散している場合、各々の情報源から検索する必要が
あり、効率が非常に悪い。
(2) Deterioration of search efficiency When desired information is distributed in a relational database and an XML document, it is necessary to search from each information source, and the efficiency is very low.

【0008】(3) 検索結果の不統一性 各々の情報源からの検索結果の形式が不統一なため、検
索結果の比較が困難である。
(3) Inconsistency of search results Since the format of search results from each information source is inconsistent, it is difficult to compare search results.

【0009】本発明は、上記の点に鑑みなされたもの
で、従来のSQLを用いて、検索要求時にSQLで指定
された項目に対して、XML文書から値を取得し、動的
に表を作成し、条件処理を行うことで検索を実行し得る
SQLによるXML文書内情報を検索することが可能な
半構造化文書検索方法及び装置及び半構造化文書検索プ
ログラムを格納した記憶媒体を提供することを目的とす
る。
The present invention has been made in view of the above points, and obtains a value from an XML document for an item designated by SQL at the time of a search request using a conventional SQL, and dynamically creates a table. Provided are a semi-structured document search method and apparatus capable of searching for information in an XML document by SQL, which can be created and executed by performing conditional processing, and a storage medium storing a semi-structured document search program. The purpose is to:

【0010】[0010]

【課題を解決するための手段】図1は、本発明の原理を
説明するための図である。
FIG. 1 is a diagram for explaining the principle of the present invention.

【0011】本発明(請求項1)は、文書要素及び該文
書要素の階層構造で表現される半構造化文書内情報を検
索するための、半構造化文書検索方法において、文書要
素及び該文書要素の階層構造で表現される半構造化文書
の要素間の関係を保持しておき(ステップ1)、表形式
で表現されるリレーショナルデータベースを含むデータ
ベースの検索を行うための検索言語の検索式と、項目の
指定のための半構造化文書の要素名とを用いて、半構造
化文書の要素の値を取得し(ステップ2)、条件処理を
必要とする場合には(ステップ3)、所定の条件処理を
行い(ステップ4)、半構造化文書内の任意の情報を一
つの表形式で返却する(ステップ5)。
The present invention (claim 1) provides a semi-structured document search method for searching for a document element and information in a semi-structured document represented by a hierarchical structure of the document element. A relation between elements of a semi-structured document expressed by a hierarchical structure of elements is held (step 1), and a search expression of a search language for searching a database including a relational database expressed in a table format is provided. The value of the element of the semi-structured document is obtained using the element name of the semi-structured document for designating the item (step 2). Is performed (step 4), and arbitrary information in the semi-structured document is returned in one tabular form (step 5).

【0012】本発明(請求項2)は、文書要素及び該文
書要素の階層構造で表現される半構造化文書内情報を検
索するための、半構造化文書検索方法において、入力さ
れた表形式で表現されるリレーショナルデータベースを
含むデータベースの検索を行うための検索言語を解析
し、文書要素及び該文書要素の階層構造で表現される半
構造化文書の構文を解析し、検索項目に対応する半構造
化文書の解析結果にグルーピング番号を付与し、解析さ
れた半構造化文書の結果に基づいて、検索言語で指定さ
れた項目に対応する要素の半構造化文書階層構造上の位
置を取得し、グルーピング番号が付与された全項目に共
通する親要素名を検出し、グループ間で直積を取り、結
果リストを生成し、結果リストに対して関係代数演算を
行い、該結果リストに対して条件の比較を行い、条件を
満たした結果のみを検索結果として返却する。
According to a second aspect of the present invention, there is provided a semi-structured document search method for searching for a document element and information in a semi-structured document expressed by a hierarchical structure of the document element. Analyzes a search language for searching a database including a relational database represented by, analyzes a document element and a syntax of a semi-structured document represented by a hierarchical structure of the document element, and analyzes a half-structured document corresponding to the search item. A grouping number is assigned to the analysis result of the structured document, and the position of the element corresponding to the item specified in the search language on the semi-structured document hierarchical structure is obtained based on the result of the analyzed semi-structured document. , Detecting a parent element name common to all items with grouping numbers, taking a direct product between groups, generating a result list, performing a relational algebra operation on the result list, It performs a comparison of the conditions for, and returns only the results that meet the condition as a search result.

【0013】本発明(請求項3)は、検索言語の検索式
に半構造化文書のJOINを指定し、複数の半構造化文
書における半構造化文書内情報をJOINし、ひとつの
表形式で返却する。
According to the present invention (claim 3), JOIN of a semi-structured document is specified in a search expression of a search language, and information in the semi-structured document in a plurality of semi-structured documents is JOINed into a single table format. return.

【0014】本発明(請求項4)は、検索言語の検索式
に半構造化文書のUNIONを指定し、複数の半構造化
文書における半構造化文書内情報をUNIONし、ひと
つの表形式で返却する。
According to the present invention (claim 4), a UNION of a semi-structured document is specified in a search expression of a search language, information in the semi-structured document in a plurality of semi-structured documents is unioned, and a single table format is used. return.

【0015】図2は、本発明の原理構成図である。FIG. 2 is a block diagram showing the principle of the present invention.

【0016】本発明(請求項5)は、文書要素及び該文
書要素の階層構造で表現される半構造化文書内情報を検
索するための、半構造化文書検索装置であって、入力さ
れた表形式で表現されるリレーショナルデータベースを
含むデータベースの検索を行うための検索言語を解析す
る検索言語解析手段110と、文書要素及び該文書要素
の階層構造で表現される半構造化文書の構文を解析する
半構造化文書解析手段120と、検索言語解析手段11
0で解析された検索条件に合致した半構造化文書の文書
要素の値を取得する全検索手段140と、文書要素の値
に基づいて文書要素間の関係を用いて検索結果を表形式
で出力する関係代数演算手段150とを有する。
The present invention (claim 5) is a semi-structured document search apparatus for searching for a document element and information in a semi-structured document expressed by a hierarchical structure of the document element. A search language analyzing means 110 for analyzing a search language for searching a database including a relational database expressed in a table format, and analyzing a syntax of a document element and a semi-structured document expressed by a hierarchical structure of the document element. Semi-structured document analysis means 120 and search language analysis means 11
All search means 140 that obtains the value of the document element of the semi-structured document that matches the search condition analyzed by 0, and outputs the search result in the form of a table using the relationship between the document elements based on the value of the document element And a relational algebraic calculation means 150.

【0017】本発明(請求項6)は、検索言語解析手段
110により解析された検索項目に対応する半構造化文
書の解析結果にグルーピング番号を付与するグルーピン
グ手段を更に有し、全検索手段140において、半構造
化文書解析手段120で解析された半構造化文書の結果
に基づいて、検索言語で指定された項目に対応する要素
の半構造化文書階層構造上の位置を取得し、グルーピン
グ番号が付与された全項目に共通する親要素名を検出
し、グループ間で直積を取り、結果リストを生成する手
段を有し、関係代数演算手段150において、結果リス
トに対して関係代数演算を行い、該結果リストに対して
条件の比較を行い、条件を満たした結果のみを検索結果
として返却する手段を有する。
The present invention (claim 6) further comprises a grouping means for assigning a grouping number to the analysis result of the semi-structured document corresponding to the search item analyzed by the search language analyzing means 110, The position of the element corresponding to the item specified by the search language on the semi-structured document hierarchical structure is acquired based on the result of the semi-structured document analyzed by the semi-structured document analysis means 120, and the grouping number Has a means for detecting a parent element name common to all items given with, taking a direct product between groups and generating a result list, and performing a relation algebra operation on the result list in the relation algebra operation means 150. And means for comparing conditions with the result list and returning only results that satisfy the conditions as search results.

【0018】本発明(請求項7)は、全検索手段140
において、検索言語の検索式に半構造化文書のJOIN
を指定し、複数の半構造化文書における半構造化文書内
情報をJOINする手段を含む。
According to the present invention (claim 7), the total search means 140
In the search expression of the search language, JOIN of the semi-structured document
And JOIN of information in the semi-structured document in a plurality of semi-structured documents.

【0019】本発明(請求項8)は、全検索手段140
において、検索言語の検索式に半構造化文書のUNIO
Nを指定し、複数の半構造化文書における半構造化文書
内情報をUNIONする手段を含む。
According to the present invention (claim 8), the total search means 140
In the search formula of the search language, UNIO of the semi-structured document
Means for designating N and unioning information in the semi-structured document in a plurality of semi-structured documents.

【0020】本発明(請求項9)は、文書要素及び該文
書要素の階層構造で表現される半構造化文書内情報を検
索するための、半構造化文書検索プログラムを格納した
記憶媒体であって、入力された表形式で表現されるリレ
ーショナルデータベースを含むデータベースの検索を行
うための検索言語を解析する検索言語解析プロセスと、
文書要素及び該文書要素の階層構造で表現される半構造
化文書の構文を解析する半構造化文書解析プロセスと、
検索言語解析プロセスで解析された検索条件に合致した
半構造化文書の文書要素の値を取得する全検索プロセス
と、文書要素の値に基づいて文書要素間の関係を用いて
検索結果を表形式で出力する関係代数演算プロセスとを
有する。
The present invention (claim 9) is a storage medium storing a semi-structured document search program for searching for a document element and information in a semi-structured document expressed by a hierarchical structure of the document element. A search language analysis process for analyzing a search language for searching a database including a relational database expressed in an input table format;
A semi-structured document analysis process for analyzing the syntax of a semi-structured document represented by a document element and a hierarchical structure of the document element;
A search process that obtains the values of the document elements of semi-structured documents that match the search conditions analyzed by the search language analysis process, and the search results are tabulated using the relationships between the document elements based on the values of the document elements And a relational algebra operation process that outputs

【0021】本発明(請求項10)は、検索言語解析プ
ロセスにより解析された検索項目に対応する半構造化文
書の解析結果にグルーピング番号を付与するグルーピン
グプロセスを更に有し、全検索プロセスにおいて、半構
造化文書解析プロセスで解析された半構造化文書の結果
に基づいて、検索言語で指定された項目に対応する要素
の半構造化文書階層構造上の位置を取得し、グルーピン
グ番号が付与された全項目に共通する親要素名を検出
し、グループ間で直積を取り、結果リストを生成するプ
ロセスを有し、関係代数演算プロセスにおいて、結果リ
ストに対して関係代数演算を行い、該結果リストに対し
て条件の比較を行い、条件を満たした結果のみを検索結
果として返却するプロセスを有する。本発明(請求項1
1)は、全検索プロセスにおいて、検索言語の検索式に
半構造化文書のJOINを指定し、複数の半構造化文書
における半構造化文書内情報をJOINするプロセスを
含む。
The present invention (Claim 10) further comprises a grouping process for assigning a grouping number to the analysis result of the semi-structured document corresponding to the search item analyzed by the search language analysis process. Based on the result of the semi-structured document analyzed in the semi-structured document analysis process, the position in the semi-structured document hierarchical structure of the element corresponding to the item specified in the search language is acquired, and a grouping number is assigned. Detecting a parent element name common to all the items, taking a direct product between the groups, and generating a result list, performing a relational algebra operation on the result list in a relational algebra operation process, Has a process of comparing conditions with and returning only results that satisfy the conditions as search results. The present invention (Claim 1
1) includes a process in which, in the entire search process, JOIN of a semi-structured document is specified in a search expression of a search language, and information in the semi-structured document in a plurality of semi-structured documents is JOIN.

【0022】本発明(請求項12)は、全検索プロセス
において、検索言語の検索式に半構造化文書のUNIO
Nを指定し、複数の半構造化文書における半構造化文書
内情報をUNIONするプロセスを含む。
According to the present invention (claim 12), in the entire search process, a UNIO of a semi-structured document is used in a search expression of a search language.
N, and a process of unifying the information in the semi-structured documents in the plurality of semi-structured documents.

【0023】上記のように、本発明では、XML文書に
おける要素間の関係を保持しておき、SQL文で指定さ
れた項目は、XML文書の要素に対応し、検索要求時に
SQLで指定された項目に対して、XML文書から値を
取得し、動的に表を作成し、取得した表において条件処
理を必要とする場合には、条件処理を施し、統一フォー
マットの検索結果を出力するため、XML文書内の情報
を一つの表形式で返却する、XML文書情報の検索を行
うことが可能となる。
As described above, in the present invention, the relationship between elements in the XML document is held, and the items specified in the SQL statement correspond to the elements in the XML document, and are specified in the SQL at the time of the search request. For the items, values are obtained from the XML document, a table is dynamically created, and if the obtained tables require conditional processing, conditional processing is performed and search results in a unified format are output. It is possible to search for XML document information that returns information in the XML document in one table format.

【0024】また、本発明では、SQL文で指定された
複数のXML文書に対して、XML文書の要素間の関係
を保持し、それぞれ前述の処理を行い、条件処理を必要
とする場合には、条件処理を施し、動的に作成された複
数の表の間でJOINし、複数のXML文書内の情報を
一つの表形式で返却する、複数XML文書情報の検索を
行うことが可能となる。
Further, according to the present invention, for a plurality of XML documents specified by an SQL statement, the relationship between elements of the XML document is held, and the above-described processing is performed. It is possible to perform a condition process, perform a JOIN between a plurality of dynamically created tables, and return information in a plurality of XML documents in a single table format, and search for a plurality of XML document information. .

【0025】また、本発明では、SQL文で指定された
複数のXML文書に対して、XML文書の要素間の関係
を保持し、それぞれ前述の手段を行い、条件処理を必要
とする場合には、条件処理を施し、動的に作成された表
の間でUNIONし、複数のXML文書内の情報を一つ
の表形式で返却する、複数XML文書情報の検索を行う
ことが可能となる。
Further, according to the present invention, for a plurality of XML documents specified by an SQL statement, the relationship between the elements of the XML document is held, and the above-described means are performed. , Performing conditional processing, performing UNION between dynamically created tables, and returning information in a plurality of XML documents in a single table format, to search for a plurality of XML document information.

【0026】[0026]

【発明の実施の形態】まず、以下の説明において使用さ
れる用語について説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First, terms used in the following description will be explained.

【0027】SQL文:リレーショナルデータベースを
扱うための言語であり、同様の文法でXML文書を扱
う。
SQL sentence: A language for handling relational databases, and handles XML documents with a similar grammar.

【0028】要素:<要素名>要素の内容</要素名>
で表されるXML文書の内容の単位 項目:SQL文の句で指定される。以下の説明でのSQ
L文ではXML文書の要素名を指定する。複数のXML
文書に同一の要素名が存在しても、予めファイル名で区
別しておき、一意に指定可能。
Element: <element name> Content of element </ element name>
The unit of the content of the XML document represented by: Item: Specified by the phrase of the SQL statement. SQ in the following description
The L sentence specifies the element name of the XML document. Multiple XML
Even if the same element name exists in a document, it can be uniquely specified by distinguishing it in advance by the file name.

【0029】属性:XML文において要素に付けられた
付属情報。
Attribute: additional information attached to an element in an XML sentence.

【0030】1対1関係:XML文書の同一階層におい
て、ある要素が存在するときに、必ず対応する要素が存
在する関係。
One-to-one relationship: A relationship in which when a certain element exists in the same hierarchy of an XML document, a corresponding element always exists.

【0031】グルーピング番号:検索項目に対する関係
を表すグループを識別するために付与された番号、検索
項目のグルーピング番号が同一である場合、その関係は
1対1関係となる。
Grouping number: A number assigned to identify a group representing a relationship to a search item. When the grouping numbers of search items are the same, the relationship is a one-to-one relationship.

【0032】本発明では、既存のリレーショナルデータ
ベースで管理されている情報と同様に、XML文書を扱
い、複数のXML文書内の情報をSQLにより効率的に
検索するシステムを構築するために以下の点について解
決する。
The present invention handles the XML document in the same manner as the information managed in the existing relational database, and constructs a system for efficiently retrieving information in a plurality of XML documents by SQL in the following points. To solve.

【0033】(1) 検索インタフェースの統一:検索
言語としてSQLを用いることで、従来のアプリケーシ
ョンからXML文書内情報の検索を行えるようにする。
(1) Unification of search interface: By using SQL as a search language, it is possible to search information in an XML document from a conventional application.

【0034】(2) 複数のXML文書からの検索:複
数のXML文書におけるXML文書内情報をJOINや
UNIONし、一つの表形式で返却する検索方法を用い
る。
(2) Search from a plurality of XML documents: A search method is used in which information in XML documents in a plurality of XML documents is JOIN or UNION and returned in one table format.

【0035】(3) 検索結果の統一:XML文書から
の検索結果を表形式とすることで、既存のリレーショナ
ルデータベースから検索結果を統一する。
(3) Unification of search results: The search results from the XML document are tabulated to unify the search results from the existing relational database.

【0036】上記の内容を行うために、階層構造モデル
をリレーショナルモデルに写像する必要がある。このた
めには、検索する前に一括してXML文書を階層構造に
従い分割し、リレーショナルデータベースに格納する方
式が考えられる。しかし、XML文書を一括してリレー
ショナルモデルに変換する方式では、検索が高速に行え
るといった性能的なメリットがある反面、文書の論理構
造のわずかな変化がデータベーススキーマに影響を及ぼ
すために、構造の変更が多い文書の管理には不向きであ
る。そこで、内容・構造が変更される可能性が高いXM
L文書内の情報をSQLにより検索するシステムを構築
するためには、以下の点を解決する必要がある。
In order to perform the above, it is necessary to map the hierarchical structure model to a relational model. For this purpose, a method is considered in which an XML document is collectively divided according to a hierarchical structure before retrieval and stored in a relational database. However, the method of converting an XML document into a relational model collectively has a performance merit such as high-speed search, but a slight change in the logical structure of the document affects the database schema. It is not suitable for managing frequently changed documents. Therefore, there is a high possibility that the content and structure will be changed.
In order to construct a system for searching information in an L document by SQL, the following points need to be solved.

【0037】(4) 動的なリレーショナルモデルへの
写像:検索要求時にSQLで指定された項目に対して、
XML文書から要素の値を取得し、動的にリレーショナ
ルモデルに写像していく。
(4) Mapping to a dynamic relational model: For items specified in SQL at the time of a search request,
The value of the element is obtained from the XML document and dynamically mapped to a relational model.

【0038】図3は、本発明のデータベース検索言語に
よる半構造化文書内情報の検索装置の構成を示す。
FIG. 3 shows the configuration of a device for retrieving information in a semi-structured document using a database retrieval language according to the present invention.

【0039】ユーザは、検索装置100にアプリケーシ
ョンプログラム300を介して、SQL検索文を入力
し、検索装置100は、XML文書200内からSQL
検索文に指定された情報を検索し、検索装置100は、
XML文書200内からSQL検索文に指定された情報
を検索し、検索装置100は、アプリケーションプログ
ラム300に検索結果を表形式で返却するものである。
The user inputs an SQL search sentence to the search device 100 via the application program 300, and the search device 100
The search device 100 searches for the information specified in the search sentence,
The search device 100 searches the XML document 200 for information specified in the SQL search sentence, and returns the search results to the application program 300 in a table format.

【0040】同図に示す検索装置100は、SQL文解
析モジュール110、XMLパーサ120、グルーピン
グモジュール130、全検索モジュール140、関係代
数演算処理モジュール150から構成される。
The search apparatus 100 shown in FIG. 1 includes an SQL sentence analysis module 110, an XML parser 120, a grouping module 130, an all search module 140, and a relational algebra operation processing module 150.

【0041】SQL文解析モジュール110は、アプリ
ケーションプログラム300から入力されるSQL文を
解析し、検索結果項目、検索条件項目や関係代数演算項
目、検索対象情報源を抽出する。
The SQL sentence analysis module 110 analyzes the SQL sentence input from the application program 300 and extracts a search result item, a search condition item, a relational algebra operation item, and a search target information source.

【0042】XMLパーサ120は、検索対象情報源に
指定されたXML文書を読み込み、XML文書の構文解
析を行い、要素を階層構造に展開する。
The XML parser 120 reads the XML document specified as the information source to be searched, parses the XML document, and expands the elements into a hierarchical structure.

【0043】グルーピングモジュール130は、グルー
ピング番号を付与する。
The grouping module 130 gives a grouping number.

【0044】全検索処理モジュール140は、検索条件
項目に指定された項目に対応するXML文書の要素の値
を抽出する。
The all search processing module 140 extracts the value of the element of the XML document corresponding to the item specified as the search condition item.

【0045】関係代数演算処理モジュール150は、検
索条件項目や関係代数演算項目に基づいて、抽出された
XML文書の値に対して処理を行い、検索結果を得る。
The relational algebra operation processing module 150 performs processing on the extracted XML document values based on the search condition items and the relation algebra operation items, and obtains a search result.

【0046】上記SQLによるXML文書内情報の検索
装置100は、 (1)SQL文解析処理; (2)XML文書解析処理 (3)グルーピング処理 (4)全検索処理 (5)関係代数演算処理;の5段階の処理を実施する。
The above-described information retrieval apparatus 100 for XML document information in SQL includes: (1) SQL sentence analysis processing; (2) XML document analysis processing; (3) grouping processing; (4) full search processing; and (5) relational algebra calculation processing; The following five steps are performed.

【0047】[0047]

【実施例】以下、図面と共に本発明の実施例を説明す
る。
Embodiments of the present invention will be described below with reference to the drawings.

【0048】検索装置100の前述の(1)から(5)
の処理を図4に示すXML文書と図5に示すSQL文を
用いて説明する。
The above-described (1) to (5) of the search device 100
Will be described using an XML document shown in FIG. 4 and an SQL sentence shown in FIG.

【0049】図6は、本発明の検索処理のフローチャー
トである。
FIG. 6 is a flowchart of the search process according to the present invention.

【0050】ステップ100) SQL文解析処理:上
記SQL文解析モジュール110にアプリケーションプ
ログラムを介して、図5に示すSQL文が入力される。
SQL文が解析され、検索結果項目を示すSELECT
項目、検索条件項目を示すWHERE項目、検索対象情
報源を示すFROM項目を抽出する。図5のSQL文
は、図4のXML文書の“reciple-book”要素以下の含
まれる情報を検索対象となる表として指定し、ing 要素
が“バター”という検索条件で要素「name」、要素「in
g 」、要素「amount」を結果として並べた表形式で返却
する問い合わせを示す。
Step 100) SQL sentence analysis processing: The SQL sentence shown in FIG. 5 is input to the SQL sentence analysis module 110 via an application program.
SQL statement is analyzed and SELECT indicating the search result item
Items, WHERE items indicating search condition items, and FROM items indicating search target information sources are extracted. The SQL sentence shown in FIG. 5 specifies information included under the “reciple-book” element of the XML document shown in FIG. 4 as a table to be searched, and the ing element has the element “name” and the element “name” under the search condition of “butter”. "In
g "and an element" amount "as a result.

【0051】ステップ200) XML文書解析処理:
上記のXMLパーサ120によってSQL文のFROM
項目で指定されたXML文書を読み込み、その構文を解
析する。図4のXML文書の要素を階層構造に展開した
様子を図7に示す。
Step 200) XML document analysis processing:
FROM of SQL statement by the XML parser 120
The XML document specified in the item is read and its syntax is analyzed. FIG. 7 shows a state in which the elements of the XML document of FIG. 4 are expanded into a hierarchical structure.

【0052】ステップ300) グルーピング処理:上
記グルーピングモジュール130によって検索項目に対
してグルーピング番号を付与する。1対1関係はXML
文書の文書型定義で参照される。図5のSQL文の場
合、 文書型定義:<!ELEMENT in-list(ing,amout)+> となっており、検索項目の要素ing と要素amountが1対
1関係である。従って、同一のグルーピング番号が付与
される。
Step 300) Grouping process: The grouping module 130 assigns a grouping number to a search item. The one-to-one relationship is XML
Referenced in the document type definition of the document. In the case of the SQL sentence of FIG. 5, the document type definition is <! ELEMENT in-list (ing, amout) +>, and the element ing and the element amount of the search item have a one-to-one relationship. Therefore, the same grouping number is assigned.

【0053】文書型定義がない場合はXMLパーサ40
0によって解析されたXML文書の階層構造の親子関係
から1対1関係を推定する。これは、図7の階層構造に
おいて同一階層の検索項目の要素ing と要素amountとが
必ず1対1で存在することがわかる。図5のSQL文の
検索項目に対してグルーピング番号を付与した例を表1
に示す。
If there is no document type definition, the XML parser 40
The one-to-one relationship is estimated from the parent-child relationship of the hierarchical structure of the XML document analyzed by 0. This means that in the hierarchical structure of FIG. 7, the element ing and the element "amount" of the search item of the same hierarchy always exist one-to-one. Table 1 shows an example in which a grouping number is assigned to the search item of the SQL sentence in FIG.
Shown in

【0054】[0054]

【表1】 図8のXML文書に示すように文書型定義がない場合
は、XMLパーサ120によって解析されたXML文書
の階層構造の親子関係を利用して、検索項目に対してグ
ルーピング番号を付与する。
[Table 1] If there is no document type definition as shown in the XML document of FIG. 8, a grouping number is assigned to the search item using the parent-child relationship of the hierarchical structure of the XML document analyzed by the XML parser 120.

【0055】以下にその具体的な手順を示す。 ・ SQL文で指定された検索項目に対応するXML文
書の要素に対して、XML文書内での出現順に番号を付
与する。図8のXML文書では、name要素に0、ing 要
素に1、amount要素に2が付与される。 ・ XML文書をXMLパーサ120により解析する。
これは、図8のXML文書では図7のように解析され
る。同一階層の場合、XML文書の要素は、順に左側か
ら並べられる。 ・ 1対1の関係があれば、同じ番号にして、これをグ
ルーピング番号とするing 要素とamount要素は、図7の
階層構造において同一階層上の繰り返しの関係にあり、
必ず1対1で存在することがわかるので、amount要素の
番号を1にしてグルーピング番号とする(表1に示す文
書型定義がある場合のグルーピング番号と同一にな
る)。
The specific procedure will be described below. A number is assigned to the element of the XML document corresponding to the search item specified by the SQL sentence in the order of appearance in the XML document. In the XML document of FIG. 8, 0 is added to the name element, 1 is added to the ing element, and 2 is added to the amount element. The XML document is parsed by the XML parser 120.
This is analyzed as shown in FIG. 7 in the XML document of FIG. In the case of the same hierarchy, the elements of the XML document are arranged in order from the left. If there is a one-to-one relationship, the numbers are set to the same number, and the ing element and the amount element that use this as the grouping number are in a repeated relationship on the same layer in the hierarchical structure of FIG.
Since it is known that there is always a one-to-one correspondence, the number of the amount element is set to 1 and used as a grouping number (the same as the grouping number when there is a document type definition shown in Table 1).

【0056】ステップ400) 全検索処理:前述の全
検索処理モジュール140で行われる処理である。図9
は、本発明の一実施例の全検索処理のフローチャートで
ある。
Step 400) Full search processing: This processing is performed by the above-described full search processing module 140. FIG.
9 is a flowchart of a full search process according to an embodiment of the present invention.

【0057】前述のXMLパーサ120で解析された結
果を元に、SQL文で指定されたSELECT項目とW
HERE項目に対応する要素のXML文書階層構造上の
位置を取得する(ステップ401)。図4のXML文書
の場合、表2に示すようになる。
Based on the result analyzed by the XML parser 120, the SELECT item specified by the SQL statement and the W
The position of the element corresponding to the HERE item on the XML document hierarchical structure is obtained (step 401). In the case of the XML document of FIG.

【0058】[0058]

【表2】 以上の取得結果より、全項目に共有する親要素名を検出
する(ステップ402)。表2の場合、/recipe とな
る。次に、グループ中で共通の親を取得する(ステップ
403)。グループ0にとっては、/recipe 、グループ
0 にとっては、/ing-list となる。
[Table 2] From the above acquisition results, a parent element name shared by all items is detected (step 402). In the case of Table 2, it is / recipe. Next, a common parent in the group is acquired (step 403). For group 0, it is / recipe, and for group 0, it is / ing-list.

【0059】グループ内の共通の親からたどって、SQ
L文で指定された項目に対応するXML文書の要素の値
を取得する処理をグループ内の項目数分繰り返す。この
とき、属性がある場合には、属性を要素と1対1で取得
する。グループの数分、上記処理を繰り返し(ステップ
404)、グループ間で直積をとる(ステップ40
5)。上記処理を共通の親の数分繰り返す。図4のXM
L文書に対して図5のSQL分で値を取得し、直積をと
った結果を表3、表4に示す。
Tracing from a common parent in the group, SQ
The process of acquiring the value of the element of the XML document corresponding to the item specified by the L statement is repeated by the number of items in the group. At this time, if there is an attribute, the attribute is acquired one-to-one with the element. The above process is repeated for the number of groups (step 404), and a direct product is obtained between the groups (step 40).
5). The above process is repeated for the number of common parents. XM in FIG.
Tables 3 and 4 show the results obtained by acquiring the values for the L document for the SQL in FIG. 5 and taking the direct product.

【0060】[0060]

【表3】 [Table 3]

【0061】[0061]

【表4】 直積をとって作られた全レコードから結果リストを生成
する。結果リストの例を表5に示す。
[Table 4] Generate a result list from all records created by taking the direct product. Table 5 shows an example of the result list.

【0062】[0062]

【表5】 ステップ500) 関係代数演算処理:前述の関係代数
演算処理モジュール150を用いて、全検索処理(ステ
ップ400)で得られた結果リスト(表5)に対して関
係代数演算を行う。図5のSQL分の場合、SQL分解
析処理(ステップ100)で検索条件項目を示すWHE
RE項目が抽出されているので、全検索処理(ステップ
400)で得られた結果リスト(表5)に対して条件の
比較を行う。条件が「偽」の場合は削除を行い、条件を
満たした結果のみを残す。表6に最終的な結果を示す。
[Table 5] Step 500) Relational Algebra Calculation Processing: The relation algebra calculation is performed on the result list (Table 5) obtained in the full search processing (step 400) using the above-described relation algebra calculation processing module 150. In the case of SQL in FIG. 5, WHE indicating a search condition item in the SQL analysis processing (step 100).
Since the RE items have been extracted, the conditions are compared with the result list (Table 5) obtained in the full search process (step 400). If the condition is "false", it is deleted and only the result that satisfies the condition is left. Table 6 shows the final results.

【0063】[0063]

【表6】 次に、SQL文で指定された複数のXML文書に対して
検索を行い、一つの表形式で返却する具体例について説
明する。
[Table 6] Next, a specific example will be described in which a search is performed on a plurality of XML documents specified by an SQL sentence and the search is returned in one table format.

【0064】(1) JOINの場合:アプリケーショ
ンプログラム300を介して、入力されたSQL文をS
QL文解析モジュール110が解析する。図10にJO
INを含んだSQL文を示す。検索対象情報源を示すF
ROM項目に複数のXML文書名あるいは、別名を付与
された同一のXML文書が指定されている。
(1) In the case of JOIN: The SQL statement input through the application program 300 is
The QL sentence analysis module 110 analyzes. Figure 10 shows JO
This shows an SQL statement containing IN. F indicating the information source to be searched
A plurality of XML document names or the same XML document given an alias is specified in the ROM item.

【0065】SQL文解析モジュール110は、入力さ
れたSQL文をFROM項目に指定されているXML文
書の数に分解する。図10のSQL文を分解して得られ
た複数のSQL文を図11、図12に示す。
The SQL sentence analysis module 110 decomposes the input SQL sentence into the number of XML documents specified in the FROM item. FIGS. 11 and 12 show a plurality of SQL sentences obtained by decomposing the SQL sentence of FIG.

【0066】図11のSQL文は、図4のXML文書の
recipe-book 要素以下に含まれる情報を検索対象となる
表として指定する。
The SQL sentence of FIG. 11 is the XML sentence of FIG.
Specify the information contained under the recipe-book element as a table to be searched.

【0067】図12のSQL文は、図13のXML文書
の要素以下に含まれる情報を検索対象となる表として指
定する。
The SQL sentence in FIG. 12 specifies information contained below the element of the XML document in FIG. 13 as a table to be searched.

【0068】そして、上記の実施例で述べたSQLによ
るXML文書内情報の検索をそれぞれのXML文書につ
いて行い、動的に表を作成する。
Then, the information in the XML document is searched by SQL for each XML document as described in the above embodiment, and a table is dynamically created.

【0069】上記の関係代数演算処理モジュール150
によって、作成された複数の表の間でJOINし、複数
のXML文書内の情報を一つの表形式で返却する。表7
に最終的な結果を示す。
The above-described relational algebra operation processing module 150
Thus, JOIN is performed between a plurality of created tables, and information in a plurality of XML documents is returned in one table format. Table 7
Shows the final result.

【0070】[0070]

【表7】 (2) UNIONの場合:アプリケーションプログラ
ム300を介して入力されたSQL文をSQL文解析モ
ジュール110が解析する。図14にUNIONを含ん
だSQL文を示す。SQL文解析モジュール110は、
UNIONで結ばれた複数のSQL文を分解する。図1
4のSQL文を分解して得られた複数のSQL文を図1
5、図16に示す。
[Table 7] (2) In the case of UNION: The SQL sentence analysis module 110 analyzes an SQL sentence input via the application program 300. FIG. 14 shows an SQL sentence including UNION. The SQL sentence analysis module 110
Decompose a plurality of SQL statements connected by UNION. FIG.
FIG. 1 shows a plurality of SQL statements obtained by decomposing the SQL statements of FIG.
5, shown in FIG.

【0071】そして、上記の実施例で述べたSQLによ
るXML文書内情報の検索をそれぞれのSQL文につい
て行い、動的に表を作成する。
Then, the information in the XML document is searched by SQL for each SQL sentence described in the above embodiment, and a table is dynamically created.

【0072】上記、関係代数演算処理モジュール150
によって、作成された複数の表の間でUNIONし、複
数のXML文書内の情報を一つの表形式で返却する。表
8に最終的な結果を示す。
The above-described relational algebra operation processing module 150
, A union is made between the created plurality of tables, and information in the plurality of XML documents is returned in one table format. Table 8 shows the final results.

【0073】[0073]

【表8】 また、上記の実施例では、図3に示す検索装置の構成に
基づいて説明したが、同図に示す、SQL文解析モジュ
ール110、XMLパーサ120、グルーピングモジュ
ール130、全検索処理モジュール140、関係代数演
算処理モジュール150をプログラムとして構築し、検
索装置として利用されるコンピュータに接続されるディ
スク装置や、フロッピーディスク、CD−ROM等の可
搬記憶媒体に格納しておき、本発明を実施する際にイン
ストールすることにより、容易に本発明を実現できる。
[Table 8] In the above embodiment, the description has been given based on the configuration of the search apparatus shown in FIG. 3. However, the SQL sentence analysis module 110, the XML parser 120, the grouping module 130, the full search processing module 140, the relational algebra shown in FIG. The processing module 150 is constructed as a program and stored in a disk device connected to a computer used as a search device, a floppy disk, a portable storage medium such as a CD-ROM, and the like. By installing, the present invention can be easily realized.

【0074】なお、本発明は、上記の実施例に限定され
ることなく、特許請求の範囲内において、種々変更・応
用が可能である。
The present invention is not limited to the above embodiments, but can be variously modified and applied within the scope of the claims.

【0075】[0075]

【発明の効果】上述のように、本発明によれば、検索言
語としてSQLを用いることで、従来のアプリケーショ
ンからXML文書内情報の検索が可能となる。複数のX
ML文書におけるXML文書内情報をJOINやUNI
ONし、一つの表形式で返却する検索が可能となる。ま
た、XML文書からの検索結果を表形式とするとで、既
存のリレーショナルデータベースからの検索結果と統一
することができる。
As described above, according to the present invention, by using SQL as a search language, it is possible to search for information in an XML document from a conventional application. Multiple X
The information in the XML document in the ML document is stored in JOIN or UNI
Turns ON, and it is possible to perform a search for returning in one table format. Further, since the search result from the XML document is in the form of a table, it can be unified with the search result from the existing relational database.

【0076】また、検索要求時にSQL文で指定された
項目に対応するXML文書要素の値を取得し、動的に表
を作成し、条件処理を行うことで、内容・構造が変更さ
れる可能性が高いXML文書内の情報検索が可能とな
る。
The contents and structure can be changed by acquiring the value of the XML document element corresponding to the item specified by the SQL statement at the time of the search request, dynamically creating a table, and performing conditional processing. It is possible to search for information in an XML document with high reliability.

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

【図1】本発明の原理を説明するための図である。FIG. 1 is a diagram for explaining the principle of the present invention.

【図2】本発明の原理構成図である。FIG. 2 is a principle configuration diagram of the present invention.

【図3】本発明のデータベース検索言語による半構造化
文書内情報の検索装置の構成図である。
FIG. 3 is a configuration diagram of an apparatus for searching for information in a semi-structured document using a database search language according to the present invention.

【図4】本発明の一実施例のXML文書の例(その1)
である。
FIG. 4 is an example of an XML document according to an embodiment of the present invention (part 1);
It is.

【図5】本発明の一実施例のSQL文の例である。FIG. 5 is an example of an SQL statement according to an embodiment of the present invention.

【図6】本発明の一実施例の検索処理のフローチャート
である。
FIG. 6 is a flowchart of a search process according to an embodiment of the present invention.

【図7】本発明の一実施例のXML文書の要素を階層構
造に展開した例である。
FIG. 7 is an example in which elements of an XML document according to an embodiment of the present invention are developed in a hierarchical structure.

【図8】本発明の一実施例の文書型定義がないXML文
書の例である。
FIG. 8 is an example of an XML document without a document type definition according to an embodiment of the present invention.

【図9】本発明の一実施例の全検索処理のフローチャー
トである。
FIG. 9 is a flowchart of a full search process according to an embodiment of the present invention.

【図10】本発明の一実施例のJOINを含んだSQL
文の例である。
FIG. 10 illustrates an SQL statement including a JOIN according to an embodiment of the present invention.
It is an example of a statement.

【図11】本発明の一実施例の図10のSQL文を分解
して得られたSQL文の例(その1)である。
11 is an example (No. 1) of an SQL sentence obtained by decomposing the SQL sentence of FIG. 10 according to one embodiment of the present invention.

【図12】本発明の一実施例の図10のSQL文を分解
して得られたSQL文の例(その2)である。
FIG. 12 is an example (part 2) of an SQL sentence obtained by decomposing the SQL sentence of FIG. 10 according to an embodiment of the present invention.

【図13】本発明の一実施例のXML文書の例(その
2)である。
FIG. 13 is an example (part 2) of an XML document according to an embodiment of the present invention.

【図14】本発明の一実施例のUNIONを含んだSQ
L文の例である。
FIG. 14 is an SQ including a UNION according to an embodiment of the present invention;
This is an example of an L sentence.

【図15】本発明の一実施例の図14のSQL文を分解
して得られたSQL文の例(その1)である。
FIG. 15 is an example (part 1) of an SQL sentence obtained by decomposing the SQL sentence of FIG. 14 according to an embodiment of the present invention.

【図16】本発明の一実施例の図14のSQL文を分解
して得られたSQL文の例(その2)である。
FIG. 16 is an example (part 2) of an SQL sentence obtained by decomposing the SQL sentence of FIG. 14 according to an embodiment of the present invention.

【符号の説明】[Explanation of symbols]

100 検索装置 110 検索言語解析手段、SQL文解析モジュール 120 半構造化文書解析手段、XMLパーサ 130 グルーピング手段、グルーピングモジュール 140 全検索手段、全検索処理モジュール 150 関係代数演算手段、関係代数演算処理モジュー
ル 200 XML文書 300 アプリケーションプログラム
REFERENCE SIGNS LIST 100 search device 110 search language analysis means, SQL sentence analysis module 120 semi-structured document analysis means, XML parser 130 grouping means, grouping module 140 full search means, full search processing module 150 relation algebra calculation means, relation algebra calculation processing module 200 XML document 300 application program

───────────────────────────────────────────────────── フロントページの続き (72)発明者 春日 史朗 東京都千代田区大手町二丁目3番1号 日 本電信電話株式会社内 (72)発明者 鈴木 源吾 東京都千代田区大手町二丁目3番1号 日 本電信電話株式会社内 Fターム(参考) 5B075 ND03 ND35 PP23 PQ02 PQ60 QS20 QT06 UU06  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Shiro Kasuga 2-3-1 Otemachi, Chiyoda-ku, Tokyo Within Nippon Telegraph and Telephone Corporation (72) Inventor Gengo Suzuki 2-3-1 Otemachi, Chiyoda-ku, Tokyo No. 1 F-term in Nippon Telegraph and Telephone Corporation (reference) 5B075 ND03 ND35 PP23 PQ02 PQ60 QS20 QT06 UU06

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 文書要素及び該文書要素の階層構造で表
現される半構造化文書内情報を検索するための、半構造
化文書検索方法において、 文書要素及び該文書要素の階層構造で表現される半構造
化文書の要素間の関係を保持しておき、 表形式で表現されるリレーショナルデータベースを含む
データベースの検索を行うための検索言語の検索式と、
項目の指定のための前記半構造化文書の要素名とを用い
て、半構造化文書の要素の値を取得し、 条件処理を必要とする場合には、所定の条件処理を行
い、 前記半構造化文書内の任意の情報を一つの表形式で返却
することを特徴とする半構造化文書検索方法。
1. A semi-structured document search method for searching for a document element and information in a semi-structured document expressed by a hierarchical structure of the document element, wherein the document element is expressed by a hierarchical structure of the document element and the document element. A search expression of a search language for searching a database including a relational database expressed in a tabular form by maintaining relationships between elements of a semi-structured document,
Using the element name of the semi-structured document for specifying the item, the value of the element of the semi-structured document is obtained, and if conditional processing is required, predetermined condition processing is performed. A semi-structured document search method characterized by returning arbitrary information in a structured document in one table format.
【請求項2】 文書要素及び該文書要素の階層構造で表
現される半構造化文書内情報を検索するための、半構造
化文書検索方法において、 入力された表形式で表現されるリレーショナルデータベ
ースを含むデータベースの検索を行うための検索言語を
解析し、 文書要素及び該文書要素の階層構造で表現される半構造
化文書の構文を解析し、 検索項目に対応する前記半構造化文書の解析結果にグル
ーピング番号を付与し、 解析された半構造化文書の結果に基づいて、前記検索言
語で指定された項目に対応する要素の半構造化文書階層
構造上の位置を取得し、前記グルーピング番号が付与さ
れた全項目に共通する親要素名を検出し、グループ間で
直積を取り、結果リストを生成し、 前記結果リストに対して関係代数演算を行い、該結果リ
ストに対して条件の比較を行い、条件を満たした結果の
みを検索結果として返却することを特徴とする半構造化
文書検索方法。
2. A semi-structured document search method for searching for a document element and information in a semi-structured document expressed by a hierarchical structure of the document element. Analyzing a search language for searching a database including the document, analyzing a syntax of a document element and a semi-structured document expressed by a hierarchical structure of the document element, and analyzing the semi-structured document corresponding to a search item A grouping number, and based on the result of the analyzed semi-structured document, obtain the position on the semi-structured document hierarchical structure of the element corresponding to the item specified in the search language, Detect a parent element name common to all the assigned items, take a direct product between groups, generate a result list, perform a relational algebra operation on the result list, And compares the condition, semi-structured document search method characterized by returning only the results that meet the condition as the search result.
【請求項3】 前記検索言語の検索式に半構造化文書の
JOINを指定し、 複数の半構造化文書における半構造化文書内情報をJO
INし、ひとつの表形式で返却する請求項2記載の半構
造化文書検索方法。
3. A semi-structured document JOIN is specified in a search expression of the search language, and information in the semi-structured document in a plurality of semi-structured documents is JOIN.
3. The semi-structured document search method according to claim 2, wherein the search is performed in a single table format.
【請求項4】 前記検索言語の検索式に半構造化文書の
UNIONを指定し、 複数の半構造化文書における半構造化文書内情報をUN
IONし、ひとつの表形式で返却する請求項2記載の半
構造化文書検索方法。
4. Specifying a union of a semi-structured document in the search expression of the search language, and converting information in the semi-structured document in a plurality of semi-structured documents to UN
3. The semi-structured document search method according to claim 2, wherein ION is performed and returned in one table format.
【請求項5】 文書要素及び該文書要素の階層構造で表
現される半構造化文書内情報を検索するための、半構造
化文書検索装置であって、 入力された表形式で表現されるリレーショナルデータベ
ースを含むデータベースの検索を行うための検索言語を
解析する検索言語解析手段と、 文書要素及び該文書要素の階層構造で表現される半構造
化文書の構文を解析する半構造化文書解析手段と、 前記検索言語解析手段で解析された検索条件に合致した
半構造化文書の文書要素の値を取得する全検索手段と、 前記文書要素の値に基づいて文書要素間の関係を用いて
検索結果を表形式で出力する関係代数演算手段とを有す
ることを特徴とする半構造化文書検索装置。
5. A semi-structured document search device for searching for a document element and information in a semi-structured document expressed by a hierarchical structure of the document element, the relational expression being expressed in an input table format. Search language analyzing means for analyzing a search language for searching a database including a database, semi-structured document analyzing means for analyzing the syntax of a document element and a semi-structured document represented by a hierarchical structure of the document element, A search unit that obtains a value of a document element of a semi-structured document that matches a search condition analyzed by the search language analysis unit; and a search result using a relationship between the document elements based on the value of the document element. And a relational algebra operation means for outputting a table in a table format.
【請求項6】 前記検索言語解析手段により解析された
検索項目に対応する前記半構造化文書の解析結果にグル
ーピング番号を付与するグルーピング手段を更に有し、 前記全検索手段は、 前記半構造化文書解析手段で解析された半構造化文書の
結果に基づいて、前記検索言語で指定された項目に対応
する要素の半構造化文書階層構造上の位置を取得し、前
記グルーピング番号が付与された全項目に共通する親要
素名を検出し、グループ間で直積を取り、結果リストを
生成する手段を有し、 前記関係代数演算手段は、 前記結果リストに対して関係代数演算を行い、該結果リ
ストに対して条件の比較を行い、条件を満たした結果の
みを検索結果として返却する手段を有する請求項5記載
の半構造化文書検索装置。
6. A grouping unit for assigning a grouping number to an analysis result of the semi-structured document corresponding to the search item analyzed by the search language analyzing unit, wherein the full search unit includes the semi-structured unit. Based on the result of the semi-structured document analyzed by the document analysis means, the position on the semi-structured document hierarchical structure of the element corresponding to the item specified in the search language is obtained, and the grouping number is assigned. Means for detecting a parent element name common to all items, taking a direct product between groups, and generating a result list, wherein the relational algebra operation means performs a relational algebra operation on the result list, and 6. The semi-structured document search device according to claim 5, further comprising means for comparing a list with a condition and returning only a result satisfying the condition as a search result.
【請求項7】 前記全検索手段は、 前記検索言語の検索式に半構造化文書のJOINを指定
し、複数の半構造化文書における半構造化文書内情報を
JOINする手段を含む請求項5記載の半構造化文書検
索装置。
7. The whole search means includes means for designating a JOIN of a semi-structured document in a search expression of the search language and JOINing information in the semi-structured document in a plurality of semi-structured documents. A semi-structured document search device as described.
【請求項8】 前記全検索手段は、 前記検索言語の検索式に半構造化文書のUNIONを指
定し、複数の半構造化文書における半構造化文書内情報
をUNIONする手段を含む請求項5記載の半構造化文
書検索装置。
8. The semi-structured document according to claim 5, wherein said all-search means designates a UNION of a semi-structured document in a search expression of said search language, and UNIONs information in the semi-structured document in a plurality of semi-structured documents. A semi-structured document search device as described.
【請求項9】 文書要素及び該文書要素の階層構造で表
現される半構造化文書内情報を検索するための、半構造
化文書検索プログラムを格納した記憶媒体であって、 入力された表形式で表現されるリレーショナルデータベ
ースを含むデータベースの検索を行うための検索言語を
解析する検索言語解析プロセスと、 文書要素及び該文書要素の階層構造で表現される半構造
化文書の構文を解析する半構造化文書解析プロセスと、 前記検索言語解析プロセスで解析された検索条件に合致
した半構造化文書の文書要素の値を取得する全検索プロ
セスと、 前記文書要素の値に基づいて文書要素間の関係を用いて
検索結果を表形式で出力する関係代数演算プロセスとを
有することを特徴とする半構造化文書検索プログラムを
格納した記憶媒体。
9. A storage medium storing a semi-structured document search program for retrieving a document element and information in a semi-structured document expressed by a hierarchical structure of the document element, the storage medium comprising: A search language analysis process for analyzing a search language for searching a database including a relational database represented by: and a semi-structure for analyzing the syntax of a document element and a semi-structured document represented by a hierarchical structure of the document element A structured document analysis process, a full search process for acquiring a value of a document element of a semi-structured document that matches a search condition analyzed in the search language analysis process, and a relationship between the document elements based on the value of the document element. And a relational algebra operation process for outputting a search result in a tabular format by using a storage medium storing a semi-structured document search program.
【請求項10】 前記検索言語解析プロセスにより解析
された検索項目に対応する前記半構造化文書の解析結果
にグルーピング番号を付与するグルーピングプロセスを
更に有し、 前記全検索プロセスは、 前記半構造化文書解析プロセスで解析された半構造化文
書の結果に基づいて、前記検索言語で指定された項目に
対応する要素の半構造化文書階層構造上の位置を取得
し、前記グルーピング番号が付与された全項目に共通す
る親要素名を検出し、グループ間で直積を取り、結果リ
ストを生成するプロセスを有し、 前記関係代数演算プロセスは、 前記結果リストに対して関係代数演算を行い、該結果リ
ストに対して条件の比較を行い、条件を満たした結果の
みを検索結果として返却するプロセスを有する請求項9
記載の半構造化文書検索プログラムを格納した記憶媒
体。
10. A grouping process for assigning a grouping number to an analysis result of the semi-structured document corresponding to a search item analyzed by the search language analysis process, wherein the full search process includes the semi-structured process. Based on the result of the semi-structured document analyzed in the document analysis process, the position on the semi-structured document hierarchical structure of the element corresponding to the item specified in the search language is obtained, and the grouping number is assigned. A process of detecting a parent element name common to all items, taking a direct product between groups, and generating a result list, wherein the relational algebra operation process performs a relational algebra operation on the result list, and 10. A process for comparing a list with a condition and returning only a result satisfying the condition as a search result.
A storage medium storing the described semi-structured document search program.
【請求項11】 前記全検索プロセスは、 前記検索言語の検索式に半構造化文書のJOINを指定
し、複数の半構造化文書における半構造化文書内情報を
JOINするプロセスを含む請求項10記載の半構造化
文書検索プログラムを格納した記憶媒体。
11. The all search process includes a process of designating a JOIN of a semi-structured document in a search expression of the search language and JOINing information in the semi-structured document in a plurality of semi-structured documents. A storage medium storing the described semi-structured document search program.
【請求項12】 前記全検索プロセスは、 前記検索言語の検索式に半構造化文書のUNIONを指
定し、複数の半構造化文書における半構造化文書内情報
をUNIONするプロセスを含む請求項10記載の半構
造化文書検索プログラムを格納した記憶媒体。
12. The whole search process includes a process of designating a UNION of a semi-structured document in a search expression of the search language and performing a UNION on information in the semi-structured document in a plurality of semi-structured documents. A storage medium storing the described semi-structured document search program.
JP2000043427A 2000-02-21 2000-02-21 Semi-structured document search method and apparatus, and storage medium storing semi-structured document search program Expired - Fee Related JP3630062B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000043427A JP3630062B2 (en) 2000-02-21 2000-02-21 Semi-structured document search method and apparatus, and storage medium storing semi-structured document search program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000043427A JP3630062B2 (en) 2000-02-21 2000-02-21 Semi-structured document search method and apparatus, and storage medium storing semi-structured document search program

Publications (2)

Publication Number Publication Date
JP2001236352A true JP2001236352A (en) 2001-08-31
JP3630062B2 JP3630062B2 (en) 2005-03-16

Family

ID=18566348

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000043427A Expired - Fee Related JP3630062B2 (en) 2000-02-21 2000-02-21 Semi-structured document search method and apparatus, and storage medium storing semi-structured document search program

Country Status (1)

Country Link
JP (1) JP3630062B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003271668A (en) * 2002-03-15 2003-09-26 Toshiba Corp Structured data management program, method and device
JP2003316783A (en) * 2002-04-24 2003-11-07 Nippon Telegr & Teleph Corp <Ntt> Heterogeneous semi-structured information integration/ retrieval device, method and program, and recording medium with program recorded thereon
KR100456027B1 (en) * 2002-12-10 2004-11-08 한국전자통신연구원 Apparatus and method for transforming ebXML filter query by using G-FQL
JP2004348479A (en) * 2003-05-22 2004-12-09 Nippon Telegr & Teleph Corp <Ntt> Retrieval apparatus, retrieval method, retrieval program, and retrieval program recording medium
KR100487738B1 (en) * 2001-12-26 2005-05-06 한국전자통신연구원 Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language
JP2009537906A (en) * 2006-05-15 2009-10-29 イクスプラダ コーポレイション System and method for storing and retrieving data
JP2010525477A (en) * 2007-04-26 2010-07-22 エヌエイチエヌ コーポレーション Data storage and query method for time series analysis of weblog and system for executing the method
JP2014056282A (en) * 2012-09-11 2014-03-27 Konica Minolta Inc Data search program and data search device
CN111078947A (en) * 2019-11-19 2020-04-28 太极计算机股份有限公司 XML-based domain element extraction configuration language system
CN111597205A (en) * 2020-05-26 2020-08-28 北京金堤科技有限公司 Template configuration method, information extraction method, device, electronic equipment and medium

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100487738B1 (en) * 2001-12-26 2005-05-06 한국전자통신연구원 Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language
JP2003271668A (en) * 2002-03-15 2003-09-26 Toshiba Corp Structured data management program, method and device
JP2003316783A (en) * 2002-04-24 2003-11-07 Nippon Telegr & Teleph Corp <Ntt> Heterogeneous semi-structured information integration/ retrieval device, method and program, and recording medium with program recorded thereon
KR100456027B1 (en) * 2002-12-10 2004-11-08 한국전자통신연구원 Apparatus and method for transforming ebXML filter query by using G-FQL
JP2004348479A (en) * 2003-05-22 2004-12-09 Nippon Telegr & Teleph Corp <Ntt> Retrieval apparatus, retrieval method, retrieval program, and retrieval program recording medium
JP2009537906A (en) * 2006-05-15 2009-10-29 イクスプラダ コーポレイション System and method for storing and retrieving data
JP2010525477A (en) * 2007-04-26 2010-07-22 エヌエイチエヌ コーポレーション Data storage and query method for time series analysis of weblog and system for executing the method
JP2014056282A (en) * 2012-09-11 2014-03-27 Konica Minolta Inc Data search program and data search device
CN111078947A (en) * 2019-11-19 2020-04-28 太极计算机股份有限公司 XML-based domain element extraction configuration language system
CN111078947B (en) * 2019-11-19 2023-06-02 太极计算机股份有限公司 XML-based domain element extraction configuration language system
CN111597205A (en) * 2020-05-26 2020-08-28 北京金堤科技有限公司 Template configuration method, information extraction method, device, electronic equipment and medium
CN111597205B (en) * 2020-05-26 2024-02-13 北京金堤科技有限公司 Template configuration method, information extraction device, electronic equipment and medium

Also Published As

Publication number Publication date
JP3630062B2 (en) 2005-03-16

Similar Documents

Publication Publication Date Title
US11481439B2 (en) Evaluating XML full text search
US8103705B2 (en) System and method for storing text annotations with associated type information in a structured data store
Schmidt et al. Efficient relational storage and retrieval of XML documents
Yoshikawa et al. XRel: a path-based approach to storage and retrieval of XML documents using relational databases
US8862636B2 (en) Scalable algorithms for mapping-based XML transformation
Jensen et al. Converting XML DTDs to UML diagrams for conceptual data integration
US20050021548A1 (en) Method and apparatus for composing XSL transformations with XML publishing views
US8145641B2 (en) Managing feature data based on spatial collections
Mani et al. XML to relational conversion using theory of regular tree grammars
JP2001147933A (en) Structured document retrieval method, device and system
KR101654717B1 (en) Method for producing structured query based on knowledge database and apparatus for the same
JP2001236352A (en) Method and device for semistructured document retrieval and storage medium stored with semistructured document retrieval program
KR101221306B1 (en) Method and system for navigation of a data structure
CN111475534B (en) Data query method and related equipment
US20070150458A1 (en) System for extending data query using ontology, and method therefor
US20060074862A1 (en) Data plotting extension for structured query language
Li et al. GML storage: a spatial database approach
CN114003231B (en) SQL syntax parse tree optimization method and system
Fletcher et al. A methodology for coupling fragments of XPath with structural indexes for XML documents
Nassiri et al. Integrating xml and relational data
JP2002063165A (en) Method and system and program for information retrieval, and recording medium having the same program recorded thereon
Droop et al. Bringing the XML and semantic web worlds closer: transforming XML into RDF and embedding XPath into SPARQL
Davis et al. An XML/XPath query language and XMark performance study
JP5374456B2 (en) Method of operating document search apparatus and computer program for causing computer to execute the same
Krishnamurthy et al. XML views as integrity constraints and their use in query translation

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040817

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041015

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041207

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20071224

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20081224

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20091224

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20101224

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20101224

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20111224

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20111224

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20121224

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees