[go: up one dir, main page]

JP3910901B2 - Document structure search method, document structure search apparatus, and document structure search program - Google Patents

Document structure search method, document structure search apparatus, and document structure search program Download PDF

Info

Publication number
JP3910901B2
JP3910901B2 JP2002285543A JP2002285543A JP3910901B2 JP 3910901 B2 JP3910901 B2 JP 3910901B2 JP 2002285543 A JP2002285543 A JP 2002285543A JP 2002285543 A JP2002285543 A JP 2002285543A JP 3910901 B2 JP3910901 B2 JP 3910901B2
Authority
JP
Japan
Prior art keywords
document
document structure
search
component
schema
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002285543A
Other languages
Japanese (ja)
Other versions
JP2004126640A (en
Inventor
拓也 金輪
優 鈴木
庄三 磯部
光生 布目
顕司 小野
雅一 服部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2002285543A priority Critical patent/JP3910901B2/en
Publication of JP2004126640A publication Critical patent/JP2004126640A/en
Application granted granted Critical
Publication of JP3910901B2 publication Critical patent/JP3910901B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明属する技術分野】
本発明は、階層構造を有するデータベースに記憶されている複数の構造化文書の異なる文書構造の中から所望の文書構造を検索するための文書構造検索方法および構造化文書検索装置に関する。
【0002】
【従来の技術】
XML(Extesible Markup Language)で記述された文書のような構造化文書を格納するデータベースとして、階層構造を有し、文書構造の異なる複数の構造化文書のそれぞれを1つの大きなツリー構造上の一部分文書として格納して管理するものがある。
【0003】
XMLで記述された文書(以下、XML文書、XMLデータなどとも呼ぶ)などの構造化文書の文書構造のことをスキーマと呼ぶ。スキーマはデータ作成者が、明示的にスキーマ言語(XML−SCHEMAやRelax NGなど)を用いて規定することも可能である(スキーマ言語によりスキーマを記述したものをスキーマ文書とよび、これも構造化文書である)が、一般的にスキーマ言語によりスキーマを記述するのは手間がかかる。更に、XMLはSGMLと異なり、データに対してスキーマ言語によってスキーマを規定する必要はなく、あくまで、オプションの位置付けである。
【0004】
なお、上記のような階層構造をもつXMLデータベースとは異なり、フォルダ単位に各XML文書を格納するフラットな(階層化されていない)データ構造をもつXMLデータベースも存在するが、この場合は、明らかにスキーマはフォルダ単位で格納されており、階層化されて管理されていない。
【0005】
階層構造をもち、1つの大きなツリー構造にてXML文書を管理するXMLデータベース(以下、階層化XMLデータベースと呼ぶ)の場合、各構造化文書の文書構造は、階層構造の一部として管理されることになる。
【0006】
スキーマは必ずしも予め定めておく必要はないが、階層化XMLデータベースに格納されている全てのXML文書がそれぞれ異なる文書構造をもつとなれば、管理しずらくなることは否めない。格納文書を効率よく管理する上からも、内容的に類似する(同じカテゴリに属する)XML文書は、全く異なる文書構造であるよりも、同じ文書構造である方が望ましい。
【0007】
XML文書作成者が各自ばらばらの文書構造によりXML文書を作成した場合、文書構造が氾濫し、階層かXMLデータベースは単なる検索エンジン以上の利用方法が行えなくなり、XMLのメリットが失われる恐れがある。
【0008】
すなわち、階層化XMLデータベースにおいては、スキーマの氾濫を極力抑えることが望ましい。このためにXML文書を作成する前に階層化XMLデータベース中の内容的に類似するXML文書のもつスキーマを検索し、そのスキーマを利用してデータを作成する、ということが考えられる。
【0009】
しかしながら、従来の階層化XMLデータベースでは、以下の2つの問題点が存在する。
【0010】
第1の問題点としては、階層XMLデータベースにおいて、所望の文書構造のみを検索する有効な手段がないということである。全ての格納文書に対してスキーマ言語によりスキーマを規定しておけば、これらをデータベースで管理することで、スキーマ検索は容易になるのだが、スキーマ言語の規定はあくまでオプションであるので、この場合だと、登録されたスキーマ言語しか検索されないことになる。
【0011】
これとは別の方法で、曖昧な構造を指定してデータをXQueryなどで検索した結果のXMLデータを吟味して構造をユーザの目で抽出する方法も考えられるが、この場合のコストも大きい。欲しいのはスキーマであって、データではないからである。
【0012】
例えば、任意の要素名を検索条件に指定し、検索結果として文書とともにその文書が従うDTD(Document Type Definition)情報も返すというものある(例えば、特許文献1参照)。しかしながら、この手法によれば、DTDに従わない文書に対してはその情報を得ることはできず、また、その粒度も文書単位であり、DTDの構成要素のみを返す(部分文書のスキーマのみを返す)といったことはできない。
【0013】
また、種文書から類似する文書を検索して表示させるというものもある(例えば、特許文献2参照)。ここに開示されている手法は、取得した文書がどのスキーマに従うか、などは目視に頼らざるを得ず、また、検索結果としてはやはり文書単位であるので、部分文書に含まれるスキーマなどの抽出においては類似度が低くなるなどの問題点が残る。
【0014】
さらに、新規に登録される要素名、属性名をテーブルで管理するといものもある(例えば、特許文献3参照)。しかし、この手法は、XML文書をフラット管理するデータベースのみで有効な手法で、文書構造が階層的に管理されている階層化XMLデータベースについては全く考慮にいれていない。
【0015】
第2の問題点としては、ユーザが文書構造を検索しようとする際に、どのように検索を行えばよいか、どのような結果があればよいか、など、検索対象が曖昧で漠然としている場合がほとんであるから、このような場合に対処可能なように、曖昧性を含んだ文書構造の検索条件の指定方法が存在しなかった。
【0016】
どのような検索を行うか、に関して言えば、例えば、「本」情報のスキーマを検索したい場合は、一般的には、本という要素を定義したスキーマ要素を検索する。しかしながら、正確に「本」と定義されておらず、「書物」とか「Book」などを定義したスキーマで検索して欲しい場合もある。
【0017】
更に漠然とキーワードだけから、まとめあげるようなスキーマを検索したいという要求もある。この場合は、このキーワードが意味するものが要素であるか、属性であるか、値であるかなどの判別がまるでなく、漠然としたデータを格納するスキーマをなんでもよいから検索せよ、という意図が込められている。
【0018】
このように、ユーザはスキーマを検索する時点においては、漠然としたもので、確定したものではなく、これを吸収できる仕組みにするべきである。
【0019】
従来ある検索手法では(例えば、特許文献2参照)、タグ名に完全一致しない限りは検索として出力されなかった。予めDTDを指定すれば、それに従った構造を示してくれるが、スキーマを検索するという本発明の主眼からは外れる。
【0020】
また、どのような結果、に対しても、単なる、スキーマ言語を返すのではなく、ユーザが利用したい情報も付加するべきである。
【0021】
スキーマ言語によりスキーマは規定しなくても、データをXML文書として管理しようと考える際には、ユーザは暗黙的にスキーマを想定し、それに従って文書を作成する場合が多い。更に、似たスキーマを持つデータは階層化されたデータベース中の同一のパスに並べて管理する傾向が強い。これらは暗黙のスキーマ定義であると見なせ、スキーマ言語による明示的スキーマ定義と同様に管理する方法が必要である。
【0022】
また、ユーザの意図に応じてスキーマ検索(文書構造の検索)の用途が異なるが、主に2通りに分かれる。
【0023】
1つ目は、ある程度検索したいスキーマを予測できる場合である。例えば、「特許関連のスキーマ」を検索する場合は、抽出すべきスキーマは「特許」情報のXML文書を規定したスキーマに類似するようなスキーマが検索される。
【0024】
2つ目は、データは存在しているがどういう構造にして、どういう風にまとめあげるか、という視点すらまだ決まっていないが、近いスキーマを検索して欲しい、というものである。この場合、格納したいデータから、その関連でいかに有益なスキーマをユーザに提示してやるかが主眼となる。
【0025】
検索結果にしても、階層化データベースであり、スキーマも階層的に配置されることが前提となる。
【0026】
【特許文献1】
特開2000−200286号公報
【0027】
【特許文献2】
特開2001−14326号公報
【0028】
【特許文献3】
特開2002−7439号公報
【0029】
【発明が解決しようとする課題】
このように、従来は、階層構造を有するXMLデータベースから文書構造のみを検索条件の曖昧性を加味しながら効率よく検索する手法が存在しなかった。
【0030】
そこで、本発明は、階層構造を有するXMLデータベースから漠然とした検索条件を基に文書構造を効率よく検索することのできる文書構造検索方法、文書構造検索装置およびプログラムを提供することを目的とする。
【0031】
【課題を解決するための手段】
本発明は、階層構造を有するデータベースに記憶されている複数の構造化文書の異なる文書構造の中から所望の文書構造を検索するためのものであって、前記階層構造は、前記異なる文書構造のそれぞれを構成する各構成要素で構成されており、前記文書構造を検索するための検索条件として、少なくとも1つのキーワードが入力されると、当該キーワードの類似語を求めて、前記階層構造から前記キーワードと前記類似語のうちのいずれかを要素名あるいは要素値に含む構成要素を検索し、この検索された構成要素を含む文書構造を検索結果として出力することを特徴とする。
【0032】
本発明によれば、少なくとも1つのキーワードを入力するだけで、当該キーワードとその類似範囲にある語のうちのいずれかを要素名や要素値にもつ構成要素を含む文書構造を効率よく求めることができる。
【0033】
また、本発明は、階層構造を有するデータベースに記憶されている複数の構造化文書の異なる文書構造の中から所望の文書構造を検索するためのものであって、前記階層構造は、前記異なる文書構造のそれぞれを構成する各構成要素で構成されており、前記文書構造を検索するための検索条件として、少なくとも1つの第1のキーワードと、少なくとも1つの第2のキーワードが入力されると、前記第1のキーワードの類似語を求めて、前記階層構造から前記第1のキーワードとその類似語のうちのいずれかを要素名あるいは要素値に含む第1の構成要素を検索するとともに、前記第2のキーワードの類似語を求めて、前記階層構造から前記第2のキーワードとその類似語のうちのいずれかを要素名に含む第2の構成要素を検索し、少なくとも、前記第2の構成要素を先頭とする文書構造のうち、前記第1の構成要素を含む文書構造を検索結果として出力することを特徴とする。
【0034】
本発明によれば、少なくとも1つの第1のキーワードと少なくとも1つの第2のキーワードを入力するだけで、当該第1のキーワードとその類似範囲にある語のうちのいずれかを要素名や要素値にもつ構成要素を含む文書構造であって、当該第2のキーワードとその類似範囲にある語のうちのいずれかを要素名にもつ構成要素を先頭とする文書構造を効率よく求めることができる。
【0035】
【発明の実施の形態】
まず、本発明の実施形態について説明する前に、構造化文書管理システムの基本的な構成および処理動作について説明する。
【0036】
(構造化文書管理システムの説明)
構造化文書として、XMLやSGMLなどで記述した文書が挙げられる。SGML(Standard Generalized Markup Language)とは、ISO(国際標準化機構)で定められた規格である。XML(eXtensible Markup Language)とは、W3C(World Wide Web Consortium)にて定められた規格である。これらは、文書を構造化することを可能とする構造化文書の規格である。
【0037】
以下、構造化文書として、XMLにて記述された文書を例に説明を進める。構造化文書の文書構造を定義したデータ(文書構造定義データ)をスキーマと呼ぶ。XMLではスキーマを定義するためにXML−SchemaやXDR(XMLData Reduced)などのスキーマ言語が提案されている。ここでは、例えば、XDRでスキーマを記述する場合を例にとり説明する。
【0038】
スキーマも、構造化文書管理システムの管理対象の構造化文書であり、ここでは、スキーマ文書と呼ぶことがある。スキーマ文書以外の構造化文書であって、特許明細書やメール、週報、広告などの種々雑多な内容を有する文書を、ここでは、コンテンツ文書と呼ぶこともある。
【0039】
構造化文書管理システムでは、上記スキーマ文書、上記コンテンツ文書、さらに、後述するようなユーザからの検索要求を記述したクエリ、すなわち、クエリ文書も管理対象とし、これらを総称して「文書」と呼ぶ。
【0040】
以下、特にことわりがない場合、「文書」と呼ぶときは、コンテンツ文書、スキーマ文書、クエリ文書を全て指すものとする。
【0041】
まず、実施形態の説明の前に、XMLについて簡単に説明する。
【0042】
図3は、XMLで記述された構造化文書の一例として、「特許」情報の例を示したものである。XMLやSGMLは、文書の構造の表現にタグが用いられる。タグには、開始タグと終了タグがある。文書構造の各構成要素は、開始タグと終了タグで囲まれている。開始タグとは構成要素の要素名を「>」で閉じたものであり、終了タグとは要素名を記号「</」と「>」で閉じたものである。タグに続く構成要素の内容が、テキスト(文字列)または子供の構成要素の繰り返しである。また開始タグには「<要素名 属性=“属性値”>」などのように属性情報を設定することができる。「<特許DB></特許DB>」のようにテキストを含まない構成要素は、簡易記法として「<特許DB/>」のように表わすこともできる。
【0043】
図3に示した文書は、「特許」タグから始まる要素をルートとし、その子要素として「タイトル」、「出願日」、「出願者」、「要約」タグから始まる要素が存在する。また、例えば、「タイトル」タグから始まる要素には「XMLデータベース」といった、1つのテキスト(文字列)が要素値として存在する。
【0044】
XMLなどの構造化文書は、任意の構成要素を繰り返し含んでいたり、さらには文書構造があらかじめ決まっていないのが普通である。
【0045】
図3に示したような構造化文書を論理的に表現するために、図4に示すようなツリー表現が用いられる。ツリーは、ノード(番号が付され、円形で示されたもの)とアーク(ノードを表す円形間をつなぐデータ付き線)と四角形で囲まれたテキストから構成されている。
【0046】
1つのノードは1つの構成要素、すなわち、1つの文書オブジェクトに対応する。ノードからタグ名や属性名に相当するラベルが付与された複数のアークが出てきている。そのアークの先は、ノード値または要素値としての文字列(テキスト)である。ノードの中に記載されている英数字(例えば「#0」、「#49」)などは、各文書オブジェクトを識別するためのオブジェクトIDである。
【0047】
図4に示したツリー構造を図3に示した構造化文書の文書オブジェクトツリーと呼ぶ。
【0048】
図1は、本実施形態に係る構造化文書管理システムの構成例を示したものである。図1において、構造化文書管理システムは、大きく分けて、要求制御部1、アクセス要求処理部2、検索要求処理部3、データアクセス部4、文書記憶部5、インデックス記憶部6から構成されている。文書記憶部5、インデックス記憶部6は例えば、外部記憶装置で構成される。
【0049】
図1のシステム構成は、ソフトウエアを用いて実現可能である。
【0050】
要求制御部1は、要求受付部11と結果処理部12から構成されている。要求受付部11は、文書の格納、文書の取得、文書の検索などのユーザからの要求を受け付けて、アクセス要求処理部2を呼び出す。結果処理部12は、アクセス要求処理部2が処理した結果を要求元のユーザに返す処理を行う。
【0051】
アクセス要求処理部2は、文書の格納、文書の取得、文書の削除などのユーザからの各種要求に対応した複数の処理部から構成されている。つまり、文書格納部21、文書取得部22、文書削除部23から構成されている。
【0052】
文書格納部21は、文書記憶部5中の指定された論理的なエリアに文書を格納する処理を行う。
【0053】
文書取得部22は、文書記憶部5中の論理的なエリアが指定されたときに、その指定エリアに存在する文書を取得する処理を行う。
【0054】
文書削除部23は、文書記憶部5中の指定された論理的なエリアに存在する文書を削除する処理を行う。
【0055】
文書記憶部5は、構造化文書データベースであり、例えば、図8に示すように、文書をUNIXのディレクトリ構造のように階層的にツリー構造状に格納している。
【0056】
図8に示すように、構造化文書データベースは、図4に示したような1つの構造化文書のツリー構造と同様に表現できる。すなわち、任意のノード以下の部分的な階層木(部分ツリー)は、構造化文書データベースから切り出された構造化文書であり、ここでは、これを文書オブジェクトツリーと呼ぶ。各ノードにはオブジェクトIDが割り当てられている。オブジェクトIDは、構造化文書データベース内ではユニークな数値である。
【0057】
階層木のルートとなるノードには、それがルートノードであることを特定するためのオブジェクトID「#0」が割り当てられるものとする。
【0058】
ルートノード、すなわち、「#0」のノードからは「root」タグを先頭に持つオブジェクトID「#1」のノードへリンクが張られている。「#1」のノードからは、「特許DB」タグを先頭にもつオブジェクトID「#2」のノードへのリンクが張られている。「#2」ノードからは、「特許」タグを先頭に持つ、オブジェクトID「#42」のノード、「#52」のノード、「#62」のノードへのリンクがそれぞれ張られている。
【0059】
図3に示した「特許」情報は、図8の「#42」ノード以下の部分ツリーに対応している。このノードからは「タイトル」タグ、「出願者」タグ、「要約」タグなどを先頭にもつノードへリンクが張られ、末端のノードからは、「XMLデータベース」、「T社」、「XMLを統一的に管理するデータベースを提供する…」などの文字列(要素値)へのリンクが張られている。
【0060】
図8において、オブジェクトID「#52」のノード以下の部分ツリー、オブジェクトID「#62」のノード以下の部分ノードも1つの「特許」情報に対応する文書オブジェクトツリーである。
【0061】
ところで、例えば、「#43」ノードにリンクされた「XMLデータベース」という要素値は、「#43」ノードと「#value」という特殊なタグ名で接続されている。このタグ名は、「#」で始まるためXMLの規格においては標準的なタグ名として利用することはできない。
【0062】
このような構造化文書データベースの特定ノードを指定するために構造化文書パスを用いる。構造化文書パスは「uix://root」から始まる文字列である。uix(Universal Identifier for XML)は構造化文書パスであることを示す文字列である。
【0063】
例えば、構造化文書パスとして「uix://root/特許DB」と表すと、この構造化文書パスの示す文書記憶部5中の論理的なエリアは、図8において、「#1」ノードから「特許DB」が付与されたアークが指し示すノード、つまり「#2」ノードである。
【0064】
同様にして、構造化文書パス「uix://root/特許DB/特許」は、図8における「#42」ノードを指し示し、構造化文書パス「uix://root/特許DB/出願日/年」は、図8における「#45」ノードを指し示す。
【0065】
例えば、図8において、「#2」ノード以下に、すなわち、「特許DB」という構成要素に、複数の「特許」情報を格納する場合には、各「特許」情報を識別するために、要素名(例えば、この場合「特許」)にインデックスを追加してもよい。
【0066】
「特許DB」の最初の「特許」情報であれば、「uix://root/特許DB/特許[0]」となるが、これは「uix://root/特許DB/特許」と同じとみなす。「特許DB」の2番目の「特許」情報であれば、「uix://root/特許DB/特許[1]」、「特許DB」の5番目の「特許」情報であれば、「uix://root/特許DB/特許[4]」となる。
【0067】
インデックス記憶部6には,検索時に用いる、要素名称生起インデックスとデータ生起インデックスが記憶されている。
【0068】
要素名生起インデックスとは構造化文書データベースに格納されている要素名と、その要素名の構成要素が先頭にある構造化文書(文書オブジェクトツリー)の位置とを関連付けたインデックスファイルである。例えば、図8の構造化文書データベースでは、(「特許」情報に対応する)「特許」という要素名が「#42」ノード以下の構造化文書、「#52」ノード以下の構造化文書、「#62」ノード以下の構造化文書に存在する場合、要素名生起インデックスには、図9に示すように、「#42」ノード、「#52」ノード、「#62」ノードの親ノード、すなわち、「#2」ノードが、要素名「特許」にリンクされて格納される。
【0069】
このように、親ノードでインデックス化すると、インデックスファイルを圧縮することができる。すなわち、親ノードでインデックス化すれば、子ノードが増大しようとも、親ノードで代用しているので、要素名にリンクすべきノードは増大しない。
【0070】
データ生起インデックスとは、構造化文書データベースに格納されている文字列データと、その文字列データが存在する構造化文書(文書オブジェクトツリー)の位置とを関連付けたインデックスファイルである。例えば、図8の構造化文書データベースでは、「XML」という文字列が「#43」ノード以下の構造化文書、「#49」ノード以下の構造化文書に存在する。この場合、データ生起インデックスには、図10に示すように、「#43」ノード、「#49」ノードが、「XML」という文字列にリンクされて格納される。
【0071】
文書記憶部5中の指定された論理的なエリアとは、構造化文書パスを用いてユーザにより指定された文書の格納場所である。構造化文書パスは、ユーザにとって認識可能な表現である。
【0072】
図1の説明に戻る。
【0073】
データアクセス部4は、文書記憶部5をアクセスするための各種処理を行うものである。データアクセス部4は、文書オブジェクトツリー格納部41、文書オブジェクトツリー削除部42、文書オブジェクトツリー取得部43、文書文字列取得部44、文書パーサ部46、合成文書作成部47、インデックス更新部48から構成される。
【0074】
文書オブジェクトツリー格納部41は、文書記憶部5中の指定された物理的なエリアに文書オブジェクトツリーを格納するための処理を行う。
【0075】
文書オブジェクトツリー削除部42は、文書記憶部5中の指定された物理的なエリアに存在する文書オブジェクトツリーを削除するための処理を行う。
【0076】
文書オブジェクトツリー取得部43は、文書記憶部5中の(構造化文書パスなどにより)指定された物理的なエリアに存在する文書オブジェクトツリーを取得するための処理を行う。
【0077】
文書文字列取得部44は、文書オブジェクトツリーを構造化文書(XML文書)に変換するための処理を行う。
【0078】
文書パーサ部46は、ユーザにより入力された構造化文書を読み込んで、その文書構造の検査を行う。さらに文書構造の定義データであるスキーマが存在すれば、入力された構造化文書の文書構造がスキーマにしたがっているかどうかの検証を行う。出力結果は文書オブジェクトツリーとなる。文書パーサは、通常、lex(lexical analyzer generator)といったレキシカルアナライザ(字句解析を行い,トークンに分解する)とyacc(yetanother compiler compiler)といったパーサジェネレータを組み合わせて構築することができる。
【0079】
合成文書作成部47は、文書の格納や文書の削除などをする際に、スキーマに合致しているかどうか検査しなければならないが、この検査時に必要となるデータを作成する。
【0080】
インデックス更新部48は、文書の格納や文書の削除などにより、構造化文書データベースの格納内容が更新されるたびに、図9、図10に示した要素名称生起インデックスとデータ生起インデックスを更新する。
【0081】
文書記憶部5中の物理的なエリアとは、ファイルオフセットやオブジェクトIDなどの構造化文書データベース内ではユニークな文書データの存在場所を指し示す内部データである。ユーザにとっては認識不可能なデータである。
【0082】
検索要求処理部3は、データアクセス部4に備わっている各処理機能部を用いて、文書記憶部5中に格納された文書を検索する処理を行う。要求制御部1の要求受付部11でユーザからの文書検索の要求が受け付けられると、検索要求処理部3には、要求受付部11からクエリ言語で記述されたクエリ文書が入力する。そしてデータアクセス部4を通してインデックス記憶部6,文書記憶部5にアクセスし、検索要求に合致する文書の集合を取得して、その結果を結果処理部12を介して出力する。
【0083】
図2は、図1に示した構造化文書管理システムの一利用形態を示したもので、図2では、WWW(World Wide Web)のバックエンドで、図1に示した構成の構造化文書管理システム100が動作している場合を示している。
【0084】
複数(ここでは、例えば3つ)のクライアント端末(例えばパーソナルコンピュータ、携帯通信端末など)102のそれぞれでWWWブラウザ103が動作している。ユーザは、各クライアント端末からWWWサーバ101にアクセスすることにより、構造化文書管理システム100にアクセスすることができる。WWWブラウザ103とWWWサーバ101とは、HTTP(Hyper TextTransfer Protocol)で通信している。また、WWWサーバ101と構造化文書管理システム100とは、CGI(Common Gateway Interface)またはCOM(Component Object Model)などで通信している。
【0085】
文書の格納、文書の取得、文書の検索などのユーザからの要求は、WWWブラウザ103から送信されて、WWWサーバ101を通して構造化文書管理システム100にて受け付けられる。構造化文書管理システム100にて処理された結果は、WWWサーバ101を通して要求元のWWWブラウザ103へ返信される。
【0086】
以下、図1の構造化文書管理システムの(1)格納機能、(2)検索機能について詳細に説明する。
【0087】
(格納機能)
図1の構造化文書管理システムにおける格納系のコマンドには以下のものがある。
【0088】
insertXML(パス、N番目、XML):文書格納
appendXML(パス、XML) :文書格納
getXML(パス) :文書取得
removeXML(パス) :文書削除
setSchema(パス、スキーマ) :スキーマ格納
getSchema(パス) :スキーマ取得
「insertXML」は、( )内に指定した構造化文書パス以下のN番目に文書を挿入するコマンド(以下、簡単に挿入コマンドと呼ぶ)である。
【0089】
「appendXML」は、( )内に指定した構造化文書パス以下の最後に文書を挿入するコマンド(以下、簡単に追加コマンドと呼ぶ)である。
【0090】
「getXML」は、( )内に指定した構造化文書パス以下の文書を取り出すコマンド(以下、簡単に取得コマンドと呼ぶ)である。
【0091】
「removeXML」は、( )内に指定した構造化文書パス以下の文書(スキーマ文書以外の文書で、主に、コンテンツ文書)を削除するコマンド(以下、簡単に削除コマンドと呼ぶ)である。
【0092】
「setSchema」は、( )内に指定した構造化文書パスにスキーマを設定するコマンド(以下、簡単にスキーマ格納コマンドと呼ぶ)である。
【0093】
「getSchema」は、( )内に指定した構造化文書パスに設定されているスキーマを取り出すコマンド(以下、簡単にスキーマ取得コマンドと呼ぶ)である。
【0094】
上記コマンドのうち、挿入コマンド、追加コマンド、スキーマ格納コマンドについての処理はアクセス要求処理部2の文書格納部21で実行され、取得コマンド、スキーマ取得コマンドについての処理は文書取得部22で実行され、削除コマンドについての処理は文書削除部23で実行される。
【0095】
図5を参照して、構造化文書データベースの初期状態(図5(a)参照)において、追加コマンドを実行する場合について説明する。
【0096】
図5(a)に示すように、「#0」ノードと「#1」ノードが「root」アークで接続されている初期状態に対して、
「appendXML(“uix://root”,“<特許DB/>”)」を実行した結果、図5(b)に示すように、「#2」ノードと「特許DB」アークが作成される。
【0097】
図5(b)に示した状態の構造化文書データベースに対して、取得コマンドを実行する場合について説明する。
【0098】
例えば、「getXML(“uix://root”)」を実行すると、図5(b)の「root」アークが示す「#0」ノード以下の文書オブジェクトツリーが取り出され、それをXML文書に変換する。その結果、「<root><特許DB/></root>」なる文字列が取り出されて、図6に示すようなXML文書に変換される。取得コマンドの処理は、アクセス要求処理部2の文書取得部22にて実行される。
【0099】
次に、図5(b)に示した状態の構造化文書データベースに対して、図3に示すようなコンテンツ文書(XML文書)としての「特許」情報を格納するための追加コマンドを実行する場合について説明する。すなわち、この場合、「appendXML(“uix://root/特許DB”,“<特許>…</特許>”)」を実行する。このコマンド中「“<特許>…</特許>”」が、図3に示した「特許」情報のXML文書に対応する。
【0100】
上記追加コマンドの処理が実行されると、図7に示すように、「#2」ノード以下に「#42」ノードをトップとする文書オブジェクトツリー(図4に対応)が追加される。
【0101】
図5(b)に示した状態の構造化文書データベースに対して、次に示すような追加コマンドを3回繰り返して実行したとする。
【0102】
「appendXML(“uix://root/特許DB”,“<特許>…</特許>”)」
上記コマンド中、「<特許>…</特許>」は、図3に示したXML文書と同じ文書構造のコンテンツ文書に対応する。
【0103】
すると、図8に示すように、「#2」ノード以下に「#42」ノード、「#52」ノード、「#62」ノードをトップとする文書オブジェクトツリーが追加される。
【0104】
次に、図8に示した状態の構造化文書データベースに対して、3つの「特許」情報を取り出すための取得コマンドを実行した場合について説明する。この場合、「getXML(“uix://root/特許DB”)」を実行する。すると、「特許DB」アークが示す「#2」ノード以下の文書オブジェクトツリーが取り出される。その結果、図11に示すように、「<特許DB><特許>…</特許><特許>…</特許><特許>…</特許></特許DB>」なるXML文書が取得できる。
【0105】
構造化文書データベースでは、上記の「特許」情報などのコンテンツ文書(XML文書)の文書構造を定義したデータ、すなわち、スキーマも管理対象とする。
【0106】
図12は、XML文書の文書構造を定義するスキーマの一例を示したものである。ここでは、XMLの文書構造定義言語の一つであるXDR(XML−Data Reduced)を取り上げる。もちろん、XML−Schemaなど他の文書構造定義言語を用いてもかまわない。
【0107】
図12に示したスキーマは、図3に示した「特許」情報の文書構造をXDRで定義したものである。図12からも容易に分かるとおり、スキーマもXML形式の構造化文書である。「Schema」タグから始まる構成要素から始まり、その子要素として、「ElementType」タグから始まる要素集合が存在する。
【0108】
図8に示した状態の構造化文書データベースに対して、図12に示したスキーマ文書を格納するためのスキーマ格納コマンドを実行する場合について説明する。この場合、「setSchema(“uix://root/特許DB”,“<Schema>…</Schema>”)」を実行する。このコマンド中、「“<Schema>…</Schema>”」」が図12に示したスキーマ文書に対応する。
【0109】
上記コマンドの実行により、図13に示すように、「#2」ノード以下に「#schema」アークが追加され、その先には、「#3」ノードをトップノードとする文書オブジェクトツリーが追加される。スキーマ自身がXML文書表現になっているため、前述した「特許」情報のようなコンテンツ文書格納のケースと同様に、図13に示したように、ツリー展開される。
【0110】
図13において、「@name」のように、「@」で始まるアークは属性に対応する。タグ名「#schema」も「#」、「@」で始まるためXML規格においては標準的なタグ名として利用することはできない。
【0111】
「#2」ノード以下に図12に示したスキーマ文書が格納されたことにより、以後、「#2」ノード以下に格納される文書の文書構造は、図12に示したスキーマ文書により定義された文書構造に適合することを要求してもよい。すなわち、この場合、「#2」ノード以下に図12に示したスキーマが設定されることになる。
【0112】
「#2」ノード以下に図12に示したスキーマが設定されると、例えば、図14に示すように、「#2」ノード以下の文書オブジェクトツリーの各ノード(のファイル)には、スキーマが存在する旨の属性値がセットされる。
【0113】
「#2」ノード以下に図12に示したスキーマが設定された後に、このスキーマで定義された文書構造に一致する図3に示したような「特許」情報の文書を、図14に示したように、文書オブジェクトツリーとして構造化文書データベースに格納したとき、この文書の文書構造には図12に示したスキーマが存在する旨の属性値が、当該文書オブジェクトツリーを構成する各文書オブジェクトにセットされる。例えば、当該文書オブジェクトツリーを構成する各文書オブジェクトのファイルに対して、スキーマが存在している旨の属性値(例えば、「スキーマ適合有無」)に「1」がセットされる。図14では、スキーマに適合している各文書オブジェクト(ノード)は2重丸で示している。2重丸で示した各文書オブジェクトには、その文書オブジェクトに対応した文書構造定義が存在することになる。
【0114】
図15は、各文書オブジェクトのファイルの内容を概念的に示したもので、例えば、オブジェクトIDが「#42」の文書オブジェクトのファイルには、その文書オブジェクトにリンクされている他の文書オブジェクトに関する情報(例えば、アークや、リンク先の文書オブジェクトへのポインタ値など)とともに、上記属性値が記述されている。なお、当該文書オブジェクトに適用するスキーマが存在しないときは、「スキーマ適合有無」の値は「0」となる。
【0115】
図16、図17は、図1の構造化文書管理システムで、必要に応じて検索条件として用いるキーワードなどとして使用される語をその意味内容から階層的に分類した結果である概念階層を構造化文書で表現した例を示す。図16、図17に示す「概念」情報はXMLで記述したコンテンツ文書である。
【0116】
図16に示した「概念」情報の例は、いわゆる特許調査における特許文書の内容を分類するための1つの分類軸として用いる「情報モデル」を概念階層で表現している。「概念」タグで囲まれた「概念」情報は、入れ子構造を持った文書構造をもっている。つまり、図16の例では、概念「情報モデル」の子供概念として、概念「ドキュメント」、概念「リレーション」、概念「オブジェクト」が存在している。また、概念「ドキュメント」の子供概念として、概念「構造化ドキュメント」、概念「非構造化ドキュメント」が存在する。さらに、概念「構造化ドキュメント」の子供概念として、概念「XML」、概念「SGML」が存在している。
【0117】
図17に示す「概念」情報の記述例は、図16とは異なる分類軸「情報操作」を概念階層で表現している。図17の例では、概念「情報操作」の子供概念として、概念「検索」、概念「格納」、概念「加工」、概念「流通」が存在している。
【0118】
図16,図17に示したような「概念」情報も、前述の「特許」情報と同様にして、構造化文書データベース内に格納することができる。すなわち、例えば、まず、図8に示した状態の構造化文書データベースに対して、「appendXML(“uix://root”,“<概念DB/>”)」を実行して、図18に示すように、「#201」ノードと「概念DB」アークが作成される。この状態において、図16に示した「概念」情報を格納する場合には、「appendXML(“uix://root/概念DB”,“<概念名前>…</概念>”)」を実行する。このコマンド中「“<概念名前>…</概念>”」が、図16に示した「概念」情報に対応する。
【0119】
上記追加コマンドの処理が実行されると、図19に示すように、「#201」ノード以下に「#202」ノードをトップとする文書オブジェクトツリーが追加される。
【0120】
以上説明したように、図1の構造化文書管理システムでは、構造化文書データベース上に登録される文書構造が異なる膨大な数のXML文書群(コンテンツ文書、スキーマ文書、クエリ文書など)を、図18,図19に示すように、「root」タグを先頭に持つツリー状の1つの巨大なXML文書として取り扱う。そのため、部分的なXML文書をアクセスするには巨大なXML文書に対するパスという、文書構造に依存しない統一的なアクセス手段を用いることにより、幅広くXML文書を検索したり加工したりすることが可能になる。
【0121】
また、構造化文書データベース上の一部にスキーマを設定することで、格納しようとする文書の文書構造がそのスキーマにより定義されている文書構造に一致するか否かの妥当性のチェックを自動的に行うようにしてもよい。
【0122】
(検索機能)
図1の構造化文書管理システムにおける検索系のコマンドには以下のものがある。
【0123】
query(ql)
「query」は、パラメータとして( )内のクエリqlを実行し、その結果のXML文書を取得するコマンド(以下、検索コマンドと呼ぶ)である。
【0124】
クエリは、例えば、図20に示すように、SQL(Structured Query Language)に似た形式の言語により、検索位置、検索条件、情報抽出部分などを記述した、文書構造をもつXML文書である。クエリ文書も構造化文書管理システムの管理対象である。
【0125】
「kf:from」タグから始まる要素には、検索位置の指定と文書要素の値に変数を対応付ける記述があり、「kf:where」タグのから始める要素には、変数に関する条件づけの記述があり、「kf:select」タグから始まる要素には、検索結果の出力形式が記述される。
【0126】
検索には、単純検索と概念検索とがある。単純検索とは、クエリ中に指定された検索条件を満たす情報を検索・抽出するものであり、概念検索とは、クエリ中に指定された概念情報を利用して、クエリ中に指定された検索条件を満たす情報を検索・抽出するものである。
【0127】
図21は、単純検索のクエリの例を示したものである。図21のクエリは、例えば、図14に示したような状態の構造化文書データベースに対し、「特許DB」アークが示すノード以下に格納されている「特許」情報の文書群において、「1999年でかつ、「PC」のような内容の「要約」という要素をもつ文書(「特許」情報)の「タイトル」を列挙せよ」という検索要求の記述例を示している。
【0128】
「kf:from」タグから始まる要素の記述により、変数「$t」、「$y」、「$s」に、それぞれ「特許」情報の「タイトル」、「年」、「要約」という文書要素の値が代入される。
【0129】
「kf:where」タグから始める要素の記述により、変数「$y」=「1999」という比較がなされる。また、コンポーネント「MyLike」は変数「$s」と「PC」を引数として、「PC」と類似する値の変数「$s」を検知するための関数である。
【0130】
「kf:from」タグから始まる要素の記述により、変数「$t」が出力値として利用される。
【0131】
なお、「kf:star」タグは構造の曖昧表現であり、例えば「<特許><kf:star><年>」は「タグ名が「特許」である要素の子孫の要素としていずれかに存在し、タグ名が「年」である要素」を意味する。
【0132】
図22に図21の単純検索のクエリを用いた検索結果を示す。この検索結果もXML文書である。
【0133】
図23は、概念検索のクエリの例を示したものである。図23のクエリは、例えば図18,図19に示すような状態の構造化文書データベースに対し、「特許DB」アークが示すノード以下に格納されている「特許」情報の文書群に対し、「概念DB」アークが示すノード以下に格納されている「概念」情報を利用して検索するための検索要求の記述例を示している。ここで、概念「周辺装置」の値をもつタグの子要素の値には、概念「SCSI」、「メモリ」、「HDD」などがあるものとする。また、図18には示していないが、各「特許」情報の構成要素には、「キーワード」タグから始める要素も存在するものとする。
【0134】
すなわち、図23のクエリは、「概念「周辺装置」以下の概念のいずれかを「キーワード」という構成要素の要素値としてもつ「特許」情報の「タイトル」を列挙せよ」という検索要求の記述例を示している。
【0135】
「kf:from」タグから始まる要素の記述により、変数「$t」、変数「$k」に、それぞれ、「特許」情報の「タイトル」、「キーワード」という要素の値が代入される。また、変数「$x」は「概念」情報として「周辺装置」の値をもつタグの子要素の値(「SCSI」、「メモリ」、「HDD」など)が代入される。
【0136】
「kf:where」タグから始める要素の記述により、「$k」=「周辺装置」もしくは「$k」=「$x」という比較がなされる。
【0137】
次に、図1の構造化文書管理システムの文書検索処理動作について、図24に示すフローチャートを参照して説明する。
【0138】
クライアント端末の所定の表示装置には、構造化文書管理システム100(の例えば、要求制御部1)から提供された、例えば、図25に示すようなユーザインターフェイスとしての画面が表示されている。
【0139】
図25に示した画面上で、ユーザが「XML検索Win」をマウス等のポインティングデバイスなどを用いて選択すると、図26に示すような文書検索を行うためのユーザインタフェースとしての画面が表示される。
【0140】
図26の検索画面において、領域W1には、構造化文書データベースの現在のツリー構造の構成要素の要素名(タグ名)がユーザが理解可能なように簡略的に表示されている。なお、図26では、上位階層の要素名のみを表示しているが、末端の要素名まで表示可能である。
【0141】
領域W11は、検索対象の範囲(ツリー構造上の検索範囲)や、検索条件などを入力するための領域である。領域W12には、検索結果が表示される。
【0142】
例えば、「「uix://root」以下の「特許」を先頭タグに持つ文書の中から、「タイトル」タグをもつ構成要素の要素値に「文書」という文字列を含み、「1998」年以降に作成された文書を検索せよ」という検索要求の場合には、領域W1から「root」をマウス等で選択して検索対象の範囲として、構造化文書パスを入力する。そして、領域W11には、まず、トップノードとして、「特許」を入力する(この場合、領域W1から「特許」をマウス等で選択することにより入力してもよい)。また、検索条件としての、「「タイトル」という構成要素の要素値に「文書」という文字列を含む」「「年」という構成要素の要素値が「1998」以上である」という内容は、予め設けられたデータ入力領域に入力すればよい。
【0143】
その後、「検索」ボタンB21を選択することにより、例えば、図27に示すようなクエリが、当該クエリを構造化文書データベース上に格納するための追加コマンドとともに構造化文書管理システムへ送信される。なお、クエリの格納場所は、予め定められており、システム側が自動的に、この追加コマンドのパラメータを設定することとなる。例えば、構造化文書データベースが図18に示した状態のとき、当該クエリの格納場所を表すパラメータとしての構造化文書パスは、「uix://root/クエリDB」となる。また、追加コマンドのもう一方のパラメータは、当該クエリ文書である。
【0144】
要求受付部11は、上記クエリを受け付けると(ステップS100)、当該クエリを検索要求処理部3へ渡す。そして、当該クエリ文書を格納するための追加コマンドのパラメータを文書格納部21へ渡す。文書格納部21では、追加コマンドの処理を行って、当該クエリは、文書記憶部5に格納される(ステップS101)。
【0145】
一方、検索要求処理部3では、受け取ったクエリを基に、データアクセス部4を通してインデックス記憶部6,文書記憶部5にアクセスし、検索要求に合致する文書集合などを取得して、クエリの中で要求された情報を抽出して結果処理部12を介して出力する。
【0146】
例えば、上記クエリの場合、まず、「「タイトル」タグをもつ構成要素の要素値に「文書」という文字列を含む」という条件に合致するものを検索することが検索対象を絞り込む上で効率がよい。そこで、図10に示したようなデータ生起インデックスを用いて、「文書」という文字列にリンクされているノード(文書オブジェクト)のオブジェクトIDを得る。そして、そのそれぞれについて、文書オブジェクトツリーを上流側に1つ遡り、「タイトル」というタグ名にたどり着いたときは、更に上流に辿っていき、「特許」というタグ名にたどり着いたときは、そのノード以下の文書オブジェクトツリーOt11を抽出する。
【0147】
次に、この抽出された複数の文書オブジェクトツリーOt11の中から、さらに、「年」という構成要素の要素値が「1998」年以上の文書オブジェクトツリーOt12を抽出する。
【0148】
この文書オブジェクトツリーOt12が上記クエリの内容に適合する文書となる。さらに上記クエリの要求内容に従えば、各文書オブジェクトツリーOt12のトップノードへの構造化文書パスを求める(ステップS102)。
【0149】
なお、上記検索処理は、上記した方法に限るものではなく、インデックス情報を用いた様々な効率のよい検索方法が可能である。
【0150】
検索要求処理部3は、ステップS102で得られた結果を統合して、検索結果としてのXML文書を作成する(ステップS103)。
【0151】
例えば、検索結果のXML文書は、
<out>
<result>
uix://root/特許DB/特許[0]
</result>
<result>
uix://root/特許DB/特許[2]
</result>
</out>
となる。
【0152】
検索要求処理部3は、検索結果処理部12を介して、上記XML文書をスタイルシートとともに、要求元のクライアント端末に返す(ステップS104)。
【0153】
クライアント端末では、図11に示したXML文書を、スタイルシートを用いてHTMLデータに変換して、例えば、図26に示すように、領域W12に表示する。ここでは、例えば検索結果として得られた構造化文書の数が多いために、検索された構造化文書の構造化文書パスが検索結果として表示されている。この場合、例えば、図26の領域W12に表示された検索結果の構造化文書パスのうち、所望の1つがユーザにより選択されたとする。例えば、図26の領域W12に表示された構造化文書パスのうち、最初のものが選択されたとする。この場合、クライアント端末から構造化文書管理システムに対し、当該選択された構造化文書パスにより特定される構造化文書を取得するために文書取得要求として、取得コマンドを送信するようにしてもよい。
【0154】
取得コマンドが構造化文書管理システムの要求受付部11にて受け付けられたときの、図1の構造化文書管理システムの文書取得処理動作について、図28に示すフローチャートを参照して説明する。
【0155】
例えば、「getXML(“uix://root/特許DB/特許[0]”)」なる取得コマンドが構造化文書管理システムへ送信される。
【0156】
ここでは、例えば、構造化文書データベースが、図8に示した状態のときに、「getXML(“uix://root/特許DB/特許[0]”)」なる取得コマンドを受け付けた場合を例にとり説明する。
【0157】
要求受付部11は、上記取得コマンドを受け付けると、上記取得コマンド中のパラメータである構造化文書パス「uix://root/特許DB/特許[0]」を文書取得部22へ渡す(ステップS31)。
【0158】
文書取得部22は、文書オブジェクトツリー取得部43へ構造化文書パスを渡す。文書オブジェクトツリー取得部43は、構造化文書パスから文書記憶部5中の物理的なエリアを特定することにより、そのエリアに存在する構造化文書パスにて表されたノード(文書オブジェクトOx5)を取り出す(ステップS32)。構造化文書パスの指定が正しければ、文書オブジェクトOx5のオブジェクトIDを取得することができるので(ステップS33)、その場合は、ステップS35へ進む。
【0159】
例えば、上記取得コマンドの場合、「#42」ノードが文書オブジェクトOx5となるので、そのオブジェクトIDとして、「#42」を取得するとともに、この「#42」ノード以下の文書オブジェクトツリーOt5(「#42」ノード〜「#49」ノード)を取得する(ステップS35)。
【0160】
ステップS32において、指定された構造化文書パスからそれに対応する文書オブジェクトOx5が見つからなければ、エラーとなり(ステップS33)、文書取得部22,結果処理部12を介して、クライアント端末に「文書取得失敗」の旨のメッセージを返す(ステップS34)。
【0161】
ステップS35で取得した文書オブジェクトツリーOt5は、文書文字列取得部44でXML文書に変換される。例えば、上記取得コマンドの場合、取得したXML文書は、図3に示すような「特許」情報のXML文書となる。
【0162】
文書取得部22は、結果処理部12を介して、図3に示したようなXML文書を(例えば、XSL(eXtensible Style Language)といった所定のスタイルシートとともに)、クライアント端末へ返す(ステップS37)。
【0163】
クライアント端末では、図3に示したXML文書を、スタイルシートを用いてHTMLデータに変換して、例えば、図29に示すように、領域W13に表示する。
【0164】
XSLを利用すると、XML文書を様々な形に変換することが出来る。違う構文書造のXML文書に変換することも出来るし、XML文書からHTMLページを生成することも出来る。
【0165】
同様にして、スキーマの検索も行える。
【0166】
例えば、「「uix://root」以下の「schema」を先頭タグに持つ文書の中から、「特許」と「要約」というタグ名を持つスキーマを検索せよ」という検索要求の場合には、図30に示すように、領域W1から「root」をマウス等で選択して検索対象の範囲として、構造化文書パスを入力する。そして、トップノードとして、「#schema」を入力する。また、検索条件として、「構成要素の属性名に「特許」という文字列を含む」「構成要素の属性名に「要約」という文字列を含む」という内容を予め設けられたデータ入力領域に入力すればよい。
【0167】
その後、「検索」ボタンB21を選択することにより、上記検索要求を記述した、例えば、図31に示したようなクエリが、当該クエリを構造化文書データベース上に格納するための追加コマンドとともに構造化文書管理システムへ送信される。
【0168】
さて、上記クエリの場合、例えば、「「#schema」を先頭タグに持つ」という条件に合致するものを検索する。そこで、図9に示したような要素名称生起インデックスを用いて、「#schema」という要素にリンクされているノードの(文書オブジェクト)のオブジェクトIDを得る。そして、そのそれぞれについて、文書オブジェクトツリーを下流側にアークを辿っていき、属性名が「特許」と「要約」いう要素にたどり着いたときは、当該「#schema」を先頭タグにもつ文書オブジェクトツリーOt21を抽出する。この文書オブジェクトツリーOt21が上記クエリの内容に適合する文書となる。さらに、図31に示したクエリの要求内容に従えば、各文書オブジェクトツリーOt21のトップノードへの構造化文書パスを求める。
【0169】
検索要求処理部3は、文書オブジェクトツリーOt21が複数あれば、それぞれのトップノードへの構造化文書パスをまとめて、検索結果としてのXML文書を作成し、検索結果処理部12を介して、上記XML文書をスタイルシートとともに、要求元のクライアント端末に返す。
【0170】
クライアント端末では、検索結果として受け取ったXML文書を、スタイルシートを用いてHTMLデータに変換して、例えば、図26に示すように、領域W12に表示する。
【0171】
クライアント端末では、検索結果の中の1つのスキーマを選択して、表示させると、例えば、図32に示すような文書の格納/削除を行うための画面とともに、その領域W3に、「特許」情報のデータ入力領域が各要素毎に設定されて表示される。
【0172】
ユーザは、このデータ入力領域にデータを入力することで、スキーマにより定義された文書構造の格納文書が容易に作成することができる。
【0173】
例えば、図32の領域W3に入力した「特許」情報の格納先として、領域W1で「特許DB」をマウス等を用いて選択すると、領域W2に構造化文書パスとして、「uix://root/特許DB」が表示される。その後、「登録」ボタンB1を選択すると、「appendXML(“uix://root/特許DB”,“<特許>…</特許>”)」なる追加コマンドが構造化文書管理システムへ送信される。
【0174】
以上説明したように、図1の構造化文書管理システムでは、構造化文書データベース上に登録される文書構造が異なる膨大な数のXML文書群(コンテンツ文書、スキーマ文書、クエリ文書など)を、図18,図19に示すように、「root」タグを先頭に持つツリー状の1つの巨大なXML文書として取り扱う。従って、文書構造が異なる、様々なスキーマを持つ膨大な数の文書の中から検索条件に合致する文書を容易に検索できる。
【0175】
また、検索に用いるクエリも構造化文書であるので、構造化文書データベースにログとして格納することにより、過去のクエリを再利用するようなアプリケーションも容易に構築することができる。
【0176】
(文書構造検索)
以下、前述の構造化文書管理システムの基本的な構成および処理動作の説明にさらに追加するかたちで、本発明の実施形態に係る、文書構造(スキーマ)検索のための構成と処理動作について説明する。
【0177】
図1に示すように、構造化文書管理システム100は、スキーマ検索を行うために、スキーマ検索処理部303と、データアクセス部4の中にテンプレート処理部306を具備し、さらに、テンプレート記憶部404と意味ネットワーク記憶部405とを具備している。
【0178】
テンプレート処理部306では、構造化文書データベース(以下、XMLデータベースとも呼ぶ)の階層化された論理構造を管理するために、当該論理構造を表現したテンプレートツリーを作成する。このテンプレートツリーは、新たなXML文書を格納する度に更新される。
【0179】
ここで作成されるテンプレートツリーは、テンプレート記憶部404に格納されている。
【0180】
クライアント端末102はスキーマ検索要求文(クエリ)を構造化文書管理システム100へ送信する。このスキーマ検索要求文は、構造化文書管理システム100の要求受付部11で受け取られ、ここから当該スキーマ検索要求文はスキーマ検索処理部303へ渡される。
【0181】
スキーマ検索処理部303は、スキーマ検索要求文を基に、意味ネットワーク記憶部405に記憶されている意味ネットワークやテンプレート記憶部404に記憶されているテンプレートを参照しながらスキーマ検索するためのものである。
【0182】
(1)テンプレートツリーの更新
まず、テンプレート処理部306における、文書格納時におけるテンプレートツリーの更新処理動作について説明する。
【0183】
前述したように、文書格納部21は、追加コマンドを実行して、登録対象のXML文書を文書記憶部5に登録する際、テンプレート処理部306に、登録対象のXML文書の格納先のデータベース上の構造化文書パスと、当該登録対象のXML文書の文書構造の情報を通知する。
【0184】
図33は、テンプレート処理部306の構成例を示したものである。
【0185】
テンプレート処理部306は、まず、当該登録対象のXML文書の文書構造の情報から、構造抽出部306aにおいて、構成要素の要素名や属性名などの当該XML文書の構造情報を抽出する。それと構造化文書パスとを基に、テンプレートツリー処理部306bは、テンプレート記憶部404に記憶されている、XMLデータベース中の論理構造を表したテンプレートツリーを更新する。
【0186】
テンプレートツリーは、XMLデータベースに格納されているXML文書の文書構造を抽出して、XMLデータベースの階層構造に従ってツリー化したもので、各ノード(各構成要素)にはテンプレートIDが割り当てられて記憶される。前述したように、文書格納部21には、登録対象のXML文書が、その各構成要素に対して、これらオブジェクトIDが付加されて格納されているが、さらに、テンプレートIDも付加されて格納されている。登録対象のXML文書の文書構造を構成する全ての構成要素の要素名や、属性名などは、このテンプレートIDが割り当てられて、テンプレートツリー上に記憶される。
【0187】
例えば、更新前には、図34に示すようなテンプレートツリーがテンプレート記憶部404に記憶されている場合を考える。この場合、XMLデータベースの状態も図34と同様である。このとき、XMLデータベースに、図35(a)に示すようなXML文書601を、「/文献DB/特許DB」以下に登録し、図35(b)に示すようなXML文書602を「/人事DB/従業員DB」以下に登録する場合を考える。ここで、「/文献DB/特許DB」という表現は、XMLデータベース中の構成要素の位置を表現する際に用いた構造化文書パスと同様であり、ここでは、テンプレートツリー上の構成要素の位置を表現するためにも用いられる。
【0188】
テンプレートツリーは、少なくとも、XMLデータベースに格納されているXML文書のそれぞれの文書構造とXMLデータベースの階層構造上の格納位置とを含む論理構造を記憶するものである。
【0189】
なお、ここで、各構成要素の要素名や属性名に与えられるテンプレートIDは、図34〜図35における各構成要素の要素名(タグ名)や属性名に対し振られている符号TID1〜TID13と同一であるとする。
【0190】
この場合、全ての要素がテンプレートツリー上のノードとして新規要素であるので、図36に示すように、テンプレートツリーが更新される。
【0191】
また、文書構造が全く同一、あるいは文書構造の一部が同一の複数のXML文書が、同じ構造化文書パスで表される格納位置に格納される場合、テンプレートツリー(論理構造)上では、2つ以上のXML文書で共通する構成要素は1つに集約して、1つの構成要素として表す。この場合、テンプレートツリー上の構成要素のテンプレートIDと、XMLデータベース上の各構成要素のオブジェクトIDとの対応関係を管理する必要がある。そのために、例えば、テンプレートツリー上で、各構成要素のテンプレートIDと、XML文書中の当該構成要素のオブジェクトIDとを記録するようにしてもよいし、テンプレートIDとオブジェクトIDとの対応関係を記録するテーブルを別途設けてもよい。
【0192】
なお、実際には、テンプレートツリーは、図37に示すようなXML文書としてテンプレート記憶部404に記憶されている。これをここでは、テンプレートツリー文書と呼ぶ。
【0193】
テンプレートツリー文書は、図37に示すように、例えば、先頭に「xsp:Node」を要素名とする構成要素で階層化されたXML文書である。このテンプレートツリー文書にも記述されているように、XMLデータベースにXML文書を登録する際には、当該登録対象のXML文書のルートノード(先頭の構成要素の要素名)に対しては「document」、それ以外の各要素の要素名に対しては「element」、属性を表す構成要素に対しては「attribute」を、「xsp:Node」のtype属性の属性値として付加されている。
【0194】
また、フォルダ作成の場合は、「folder」,XMLデータベースのルートとしては「rootElement」をtype属性として付加する。更に、登録対象のXML文書中の構成要素のうち、毎回登録されている構成要素は、その文書構造上必須である可能性が高いので、「required」という属性で必須であることを記録しておく(必須である場合には当該属性の属性値を「yes」とする)。また、同一文書上に1つ以上の要素が出現するのは、回数制限がない(maxOccurs=「*」)という、簡単なスキーマ抽出を行っておく。また、型推定ステップを行い、候補の値(「dataType」)を書いておくことも可能である。これは、候補外の値がこの要素に来た場合はスルーさせる。
【0195】
また、テンプレートツリー上の1つの構成要素に集約された実際の構成要素の数(オブジェクトIDの数)をcount属性として記述してもよい。なお、図37には、count,typeの属性のみを表している。
【0196】
文書格納部21で追加コマンドを実行して、登録対象のXML文書を登録する際には、前述したように、当該XML文書に対応するインデックスが作成される。
【0197】
(2)スキーマ検索処理の概略
クライアント端末102はスキーマ検索要求文を構造化文書管理システム100へ送信する。このスキーマ検索要求文は、構造化文書管理システム100の要求受付部11で受け取られ、ここから当該スキーマ検索要求文(スキーマクエリ)はスキーマ検索処理部303へ渡される。
【0198】
図38は、スキーマ検索処理部303の構成例を示したものである。
【0199】
スキーマ検索処理部303は、スキーマクエリ解析部321、スキーマクエリ条件処理部322、スキーマクエリ出力処理部333から構成される。
【0200】
スキーマクエリ解析部321は、スキーマを検索するための検索条件などの記述された検索要求文、すなわちスキーマクエリを解析する。クエリの記述言語としては、例えば、XQueryなどがある。図39は、スキーマクエリの一具体例を示したものである。なお、スキーマ検索は、スキーマを推定したデータを擬似的に作成し、検索を行う必要があるので、スキーマクエリは、通常のXQueryなどでは表現はできない。
【0201】
スキーマクエリは、「xsp:query」タグをもつ構成要素で始まり、その中に、主に、「xsp:retrun」というタグをもつ構成要素で記述される部分(以下、簡単にreturn節とも呼ぶ)と「xsp:where」というタグの構成要素で記述される部分(以下、簡単にwhere節とも呼ぶ)が含まれている。
【0202】
先頭にある「xsp:query」タグが存在することで、要求受付部11は、当該クエリがスキーマクエリであることが判断できる。
【0203】
「xsp:return」タグをもつ構成要素には、抽出すべき文書構造の先頭の構成要素の要素名もしくは属性名などに対応する文字列(キーワード)が記述されている。この「xsp:return」節中の要素は全て、「xsp:elem」である。ここには複数の候補を記述しても良く、例えば、関連が近いと想定される、要素名、属性名をname属性で記述する。図39に示したスキーマクエリにおいては、「特許」と「文献」がそれぞれ記述されている。
【0204】
この場合、完全一致以外の曖昧な揺らぎも考慮される。「特許」のスキーマとして記述されていなくて、例えば、「Patent」で定義されるようなスキーマも同様に検索するためである。
【0205】
この揺らぎを吸収するものとして、意味ネットワーク記憶部405には図41に示すような意味ネットワークを記憶している。意味ネットワークとは、図41に示すように、語彙の間の関係をグラフで表現したものであり、語彙間のウエイト(類似度)をアーク上に付加させている。例えば、「構造化文書」や「XML」の類似度は「0.8」となっている。類似度を表す数値は「0」から「1」までの値を取る。
【0206】
類似度計算のアルゴリズムを図42に示す。
【0207】
ここでは、図42に示すフローチャートを参照して、「XML」に類似する語彙を類似度を計算しながら求める場合を例にとり説明する。
【0208】
ここで、文字列「XML」という語彙に類似すると判断できる類似度の閾値を例えば「0.6」とする。まず、「XML」の意味ネットワーク上の位置を検索する(ステップS201)。検索位置のウェイト(類似度)を「1.0」に設定する(ステップS202)。その後、まず、現キーワードを探索候補リスト及び確定候補リストに追加する(ステップS203)。
【0209】
図41に示した意味ネットワークから、「XML」に類似する語彙「構造化文書」、「マークアップ言語」が取り出され、それぞれ類似度は「0.8」である。この場合、展開元の語彙「XML」のウエイト「1.0」と、取り出された各語彙のウエイトを乗じて、それぞれ「0.8」が得られる。探索候補リストから、展開元の語彙「XML」を削除して、この2つの語彙を追加する(ステップS205)。
【0210】
この2つの語彙の類似度は、「0.8」であるので、確定候補リストにも追加する(ステップS206〜ステップS207)。
【0211】
次に、探索候補リスト上の「構造化文書」を展開元として、図41に示した意味ネットワークを1段展開すると、「構造文書」の類似度は、展開元との間の類似度「0.5」と展開元のウエイト「0.8」を乗じて「0.4」が得られる。今、閾値を「0.6」に設定しているのでこれ以後の展開は行わない。以上の作業を繰り返すことにより、結果として、「XML」(1.0)、「マークアップ言語」(0.8)、「SGML」(0.64)、「HTML」(0.64)、「半構造化文書」(0.64)が確定候補リスト上に残ることになる。
【0212】
図39に示したスキーマクエリでは、上記類似度の閾値を表すために、当該閾値を、「xsp:elem」の属性として記述している。すなわち、ここでは、「sim」という属性名を用いて、このsim属性の属性値として記述している。この属性値により閾値を設定しておくと、ここで定めた閾値以下の類似度を持った語彙を求めるための意味ネットワーク上の展開を抑制することができる。なお、この閾値は、ユーザが例えば検索条件を入力する際に設定するようにしてもよいが、この場合に限らず、スキーマクエリ上に予め書き込まれたデフォルト値を用いてもよい。また、スキーマクエリに記述されていなくとも、スキーマ検索処理部303で予め定められた値を用いてもよい。
【0213】
スキーマを検索する際は、抽出部分すら分からない場合がある。この場合は、スキーマクエリ中に「<xsp:return type=“all”/>」を記述しておけば、自動的にスキーマ検索処理部303が文書のルートノードを判別し(すなわち、前述したように、テンプレートツリー上では、1つのXML文書の先頭の構成要素には「document」という属性値が記述されているので、これをチェックすることによりルートノードを判別することができる)、テンプレートツリーから、当該ルートノードを先頭とする文書構造を取り出して(擬似的なスキーマを作成し)、返すことが可能となる。
【0214】
図39のスキーマクエリの説明にもどり、「xsp:where」タグをもつ構成要素には、検索条件として、構成要素の要素名や属性名に含まれる文字列(キーワード)が記述されている。この節においても曖昧な状態を残したまま、検索条件が記述されている。
【0215】
例えば、要素名か属性名かどちらか分からない場合は、「<xsp:elemtype=“element”/>」、要素値が属性値か分からない場合は、「<xsp:elem type=“word”/>」で表現する。要素名か、属性名か、要素値か、属性値か全くわからない場合もあり、その場合は、「<xsp:elem type=“all”/>」を記述しておく。
【0216】
すなわち、ユーザにより、ある文字列が指定された場合、それを要素名(あるいは属性値でもよい)にもつスキーマを検索するための検索条件とするときには、「<xsp:elem type=“element”/>」と記述し、当該文字列を要素値(あるいは属性値)にもつスキーマを検索するための検索条件とするときには、「<xsp:elem type=“word”/>」と記述し、当該文字列を要素名(あるいは属性名)と要素値(あるいは属性値)のうちのいずれか一方にもつスキーマを検索するための検索条件とするときには、「<xsp:elem type=”all”/>」を記述する。
【0217】
スキーマを表す名前はname属性で記述される。ここには、図40に示したスキーマクエリでは、dataType属性などで「int」と、整数型という、型指定を明記した検索も行える。同様に、展開する近さに関してはsimで記述する。
【0218】
次に、図43に示すフローチャートを参照して、スキーマ検索処理部303におけるスキーマ検索の概略的な処理の流れを説明する。
【0219】
スキーマ検索処理部303にスキーマクエリは、まず、where節の処理を行い(ステップS301)、次に、return節の処理を行った後(ステップS302)、それらの処理結果をマージし(ステップS303)、その結果に対してスキーマ推定処理を行い、すなわち、スキーマを抽出し(ステップS304)、それら抽出された各スキーマのスコアリング処理に基づくソート処理を行い(ステップS305)、最後に出力形式を整形して(ステップS306)、その結果を返す。
【0220】
次に、具体例を挙げて、スキーマ検索について、より詳細に説明する。
【0221】
(3)具体例
クライアント端末102には、図44に示すようなスキーマ検索のための検索条件の入力画面が表示される。この入力画面上で、ユーザは、検索したいスキーマとして、例えば、「XML関連の特許で著者が記述されているようなスキーマ」という内容の自然文を入力したとする。
【0222】
この入力された内容は、クライアント端末102では、例えば、自然文解析により、図45に示すようなスキーマクエリに変換されて、構造化文書管理システム100へ送信される。
【0223】
なお、ここでは、ユーザは、スキーマ検索のために自然文を入力するとしたが、この場合に限らず、例えば、(条件1)どのような文字列を要素名(あるいは属性値)、要素値(あるいは属性値)として含むのか、(条件2)どのような種類の文書の文書構造を抽出したいのか、といった内容が含まれていれば、自然文で入力する必要はない。また、上記条件1、条件2を入力するための別個の入力領域が設けられていてもよい。また、条件1のみを入力する場合であってもよい。条件1を入力する場合、少なくとも1つの文字列が入力されていればよく、複数の文字列をカンマなどで区切りながら入力してもよい。
【0224】
また、条件1として指定される文字列は、構成要素の要素名である場合と、属性名である場合と、要素値である場合と、属性値である場合とがあるが、これらを別個の入力領域から入力するようにしてもよいし、1つの入力領域のみを設けて、そこに入力された文字列はこれらのうちのいずれか1つであると予め定めておいて、スキーマクエリを作成してもよい。また、条件2として入力される文字列も構成要素の要素名である場合と、属性名である場合とがあるが、これらを別個の入力領域から入力するようにしてもよいし、1つの入力領域のみを設けて、そこに入力された文字列はこれらのうちのいずれか1つであると予め定めておいて、スキーマクエリを作成してもよい。
【0225】
また、条件1のみであってもよいし、条件2のみであってもよい。
【0226】
クライアント端末102では、上記条件1、条件2に対応する文字列を代入すれば完成するようなスキーマクエリの雛形を複数種類(例えば、条件1と条件2が指定された場合のスキーマクエリ、条件2のみが指定された場合のスキーマクエリ、条件2に複数の文字列が指定された場合のスキーマクエリなど)記憶しておき、入力(指定)された条件に応じてこれらのうちの1つを選択し、空欄部分に条件1や条件2に対応する文字列を代入することで、スキーマクエリを作成するようにしてもよい。
【0227】
また、クライアント端末102では、ユーザにより入力された、上記条件1や条件2に対応する文字列や自然文をそのまま構造化文書管理システムへ検索要求として送信するようにしてもよい。そして、この場合には、このような検索要求を受信した構造化文書管理システムの要求受付部11において、上記スキーマクエリを作成するようにしてもよい。要求受付部11にてスキーマクエリを作成する場合も、前述同様である。
【0228】
図44に示した入力内容の場合、条件1に対応する文字列は、「XML」と「著書」であり、前者は、例えば要素値に含まれる文字列であり、後者は例えば要素名あるいは属性名に含まれる文字列である。また、条件2に対応する文字列は、「特許」であり、例えば要素名に含まれる文字列であると判断され、その結果、図45に示すようなスキーマクエリが作成される。
【0229】
当該スキーマクエリは、構造化文書管理システム100の要求受付部11を経由して、スキーマ検索処理部303に渡される。あるいは、要求受付部11にて作成されて、スキーマ検索処理部303に渡される。
【0230】
まず、スキーマクエリ解析部321において、スキーマクエリのwhere節の解析を行う(図43のステップS301)。この処理動作について、図54に示すフローチャートを参照して説明する。
【0231】
このwhere節では、上記条件1に対応する文字列が、1つずつ「xsp:elem」という要素名(タグ名)の構成要素の記述されている。構成要素の要素名(あるいは要素名と属性名のうちのいずれか一方)に含まれる文字列(例えば、ここでは、「著書」)を表すときは、当該文字列に対し、「type=“element”」と指定されている。また、構成要素の要素値(あるいは要素値と属性値のうちのいずれか一方)に含まれる文字列(例えば、ここでは、「XML」)を表すときは、当該文字列に対し、「type=“word”」と指定されている。また、構成要素の要素名(あるいは要素名と属性名のうちのいずれか一方)と、構成要素の要素値(あるいは要素値と属性値のうちのいずれか一方)のうちのいずれかに含まれる文字列を表すときは、当該文字列に対し、「type=“all”」と指定されている。
【0232】
まず、where節内の構成要素を1つづつ取り出して(ステップS401)、各要素が、上記のいずれかであるかをチェックする(ステップS402〜ステップS404)。
【0233】
図45に示したスキーマクエリの場合、1つ目の要素では、「著者」という文字列に対して「type=“element”」と記述されているので(ステップS402)、ステップS405へ進み、例えば、ここでは、「著書」という文字列とこれに類似する語彙の文字列を要素名として持つ(要素名に一致あるいは含む)構成要素を検索する処理を行う(構造推定処理)。
【0234】
また、2つ目の要素では、「XML」という文字列に対して、「type=“word”」と記述されているので(ステップS403)、ステップS406へ進み、例えば、ここでは、「XML」という文字列とこれに類似する語彙の文字列を要素値として持つ(要素値に一致あるいは要素値に含む)構成要素を検索する処理を行う(語彙推定処理)。
【0235】
また、where節内の構成要素として、「type=“all”」と記述された文字列が存在する場合には(ステップS404)、ステップS405とステップS406と同様にして、当該文字列とこれに類似する文字列を要素名や要素値として持つ構成要素を検索する処理を行う(ステップS407,ステップS408)。
【0236】
以上ステップS401〜ステップS408の処理をwhere節内の全ての構成要素について繰り返す。
【0237】
ここで、処理対象の文字列を「著者」とした場合を例にとり、ステップS405、ステップS407の構造推定処理について、図55に示すフローチャートを参照して説明する。
【0238】
まず、意味ネットワークを利用して「著書」の類義語を抽出する(ステップS411)。なお、ここでは、類似度の閾値が指定されていない(sim属性が記述されていない)ので、予め決められた閾値以下(ここでは「0.6」に設定)になるまで、ネットワークを展開する。図41に示したの意味ネットワークの場合、「著者」(類似度は「1.0」)、「author」(類似度は「0.8」×「0.8」)、「名前」(類似度は「0.7」)という語彙が得られる。
【0239】
次に、前述した文書の検索の場合と同様にして、インデックス記憶部6に記憶されている要素名称生起インデックスを検索して、処理対象の文字列と上記抽出された類似語のそれぞれを要素名としてもつ構成要素のオブジェクトIDを取得し、さらに、例えば、前述したようなテーブルあるいはテンプレートツリー上の記述を基に、この取得した各オブジェクトIDのそれぞれに対応するテンプレートIDを取得する(ステップS412)。
【0240】
そして、各テンプレートIDに対して評価値(第1の評価値)を求める(ステップS413)。この第1の評価値は、取得したテンプレートIDに対応する構成要素が、検索条件として指定された文字列(語彙)にどれだけ類似するかを評価するものであれば、何でもよい。
【0241】
例えば、現在のXMLデータベースが図46に示すような状態であるとき、ステップS412において取得されるテンプレートIDは、「TID7」、「TID15」、「TID57」の3通りであり、これらの評価値は、例えば、その要素名に含まれていた語彙の類似度をそのまま用いて、例えば、「TID7」の評価値は「1.0」、「TID15」の評価値は「0.7」、「TID57」の評価値は「0.64」とする。各テンプレートIDとその評価値をリストL1に記録しておく。このとき、この取得したテンプレートIDのそれぞれについて、当該テンプレートIDに対応するオブジェクトIDと、その数もリストL1に記録する。
【0242】
次に、処理対象の文字列を「XML」とした場合を例にとり、ステップS406,ステップS408の語彙推定処理について、図56に示すフローチャートを参照して説明する。
【0243】
まず、意味ネットワークを用いて、「XML」の類似語を抽出する(ステップS421)。この場合、「XML」(類似度「1.0」)、「SGML」(類似度「0.72」)、「構造化文書」(類似度「0.81」)が得られる(ステップS421)。
【0244】
次に、前述した文書の検索の場合と同様にして、インデックス記憶部6に記憶されているデータ生起インデックスを検索して、処理対象の文字列と上記抽出された類似語の各語彙のそれぞれを要素値に持つ構成要素のオブジェクトIDを取得し、さらに、例えば、前述したようなテーブルあるいはテンプレートツリー上の記述を基に、この取得した各オブジェクトIDのそれぞれに対応するテンプレートIDを取得する(ステップS422)。
【0245】
そして、各テンプレートIDに対して評価値(第2の評価値)を求める(ステップS423)。この第2の評価値は、取得したテンプレートIDに対応する構成要素が、検索条件として指定された文字列(語彙)にどれだけ類似するか、また、検索条件として指定された文字列(語彙)とその類似語とのうちのいずれかをどれだけ多く含む構成要素であるかなどを評価するものであれば、何でもよい。
【0246】
取得されたテンプレートIDのそれぞれに対応する構成要素が、上記複数の語彙のうちの一部あるいは全ての複数の語彙を要素値としてもつ場合もある。また、この取得したテンプレートIDに対応する構成要素のオブジェクトIDがデータ生起インデックスから複数個取得されている場合もある。
【0247】
ここでは、例えば、取得された各テンプレートIDについて、当該テンプレートIDに対応する構成要素が要素値に上記複数の語彙のうちのどの語彙を含むのかを基に上記評価値を与える。なお、各テンプレートIDに対応する(データ生起インデックスから取得された)オブジェクトIDの数と語彙の類似度を掛け合わせて求めてもよい。
【0248】
例えば、現在のXMLデータベースが図46に示すような状態であるとき、ステップS422では、「タイトル」という要素名を持つ構成要素(テンプレートID「TID6」)と、その他に「TID17」、「TID58」というテンプレートIDが得られたものとする。
【0249】
テンプレートID「TID6」の「タイトル」という構成要素は、「XML」という語彙(類似度は「1.0」)と「SGML」という語彙(類似度は「0.72」)とから検索されているので、例えば、これら語彙の類似度を加算して、1+0.72=1.72を評価値として与える。例えば、「XML」という語彙で検索されたオブジェクトIDの数が100件で、「SGML」という語彙で検索されたオブジェクトIDの数が50件であれば、1×100+0.72×50=136を評価値としてもよい。以下の説明では、評価値の算出は、説明の簡単のため、前者の例をとることにする。
【0250】
テンプレートID「TID17」の構成要素は、「XML」という語彙のみから検索されているので、この語彙の類似度「1.0」を評価値として与える。
【0251】
テンプレートID「TID58」の構成要素は、「XML」という語彙のみから検索されているので、この語彙の類似度「1.0」を評価値として与える。
【0252】
各テンプレートIDとその評価値(第2の評価値)をリストL2に記録しておく。このとき、この取得したテンプレートIDのそれぞれについて、当該テンプレートIDに対応するオブジェクトIDと、その数もリストL2に記録する。
【0253】
以上のwhere節の処理から、以下のようなテンプレートIDが得られたことになる。なお、括弧内には、「D」から始まる数字で第2の評価値を示し、「S」から始まる数字で第1の評価値を示している。
【0254】
{TID6(D1.72)、TID7(S1.0)、TID15(S1.0)、TID17(D1.0)、TID57(S0.64)、TID58(D1.0)}
次に、スキーマクエリ解析部321において、スキーマクエリのreturn節の解析を行う(図43のステップS302)。この処理動作について、図57に示すフローチャートを参照して説明する。
【0255】
return節には、抽出すべき文書構造の先頭の構成要素の要素名や属性名が、1つずつ「xsp:elem」という要素名(タグ名)の構成要素に記述されている。図45に示したスキーマクエリでは、要素名に含まれる文字列として、「特許」が指定されている。
【0256】
まず、return節から要素(「xsp:elem」という要素名の構成要素)を1つずつ取出し(ステップS431)、当該要素に記述されている文字列、例えば、ここでは「特許」を処理対象の文字列として、図55に示したように、構造推定処理を行う(ステップS432)。上記ステップS431〜ステップS432をreturn節内に記述された全ての要素について行う(ステップS433)。
【0257】
構造推定処理では、前述同様にして、まず、処理対象の文字列の類似語を意味ネットワークを用いて抽出する。
【0258】
この場合、「特許」(類似度「1.0」)、「Patent」(類似度「0.8」)が抽出される。
【0259】
例えば、現在のXMLデータベースが図46に示すような状態であるとき、上記2つの語彙のいずれかを要素名にもつ構成要素を要素名称生起インデックスから求めると、以下のような3つのテンプレートIDが得られる。
【0260】
{TID4(S1.0)、TID55(S0.8)、TID72(S1.0)}なお、図46では、上記3つのテンプレートIDに対応する構成要素(ノード)を丸印で囲み示している。
【0261】
次に、図43のステップS303の処理を行う。すなわち、where節を処理した結果得られた構成要素と、return節を処理した結果得られた構成要素とから、テンプレートツリーから1つのXML文書の文書構造の先頭となる構成要素を抽出する。具体的には、return節の処理により抽出された構成要素と、where節の処理により抽出された構成要素とのテンプレートツリー上の親子関係をチェックする。
【0262】
where節の処理により抽出される構成要素は、文書構造の下流にある構成要素であり、return節の処理により抽出される構成要素は、文書構造の先頭の構成要素である。
【0263】
例えば、return節の処理により抽出された構成要素に対応するノード以下に、where節の処理により抽出された構成要素が存在する場合には、return節の処理により抽出された当該構成要素を、抽出すべき文書構造の先頭の構成要素の候補として、出力候補リストに登録する。
【0264】
以下、XMLデータベースが図46に示したような状態である場合を例にとり説明するが、この場合のテンプレートツリーの構造も、図46と同様である。但し、図46に示すように、「XML」や「SGML」などの語彙は、テンプレートツリーには含まれていない。また、図46には、構成要素の属性は、2重の四角形で囲み、示している。
【0265】
まず、テンプレートツリーを下流側にある構成要素から上流へ向かって探索して、上記親子関係をチェックする。
【0266】
例えば、テンプレートID「TID6」の構成要素の親要素(1段上の階層にある構成要素であって、テンプレートID「TID6」の構成要素を包含する構成要素)は、テンプレートID「TID4」の構成要素である。このテンプレートID「TID4」の構成要素は、return節の処理により抽出された構成要素であるので、この時点で、テンプレートID「TID4」は出力候補リストに追加する。
【0267】
続いて、テンプレートID「TID7」の構成要素に対してであるが、これも上記同様に、テンプレートID「TID4」が親要素である。テンプレートID「TID4」は、既に出力候補リストに登録されているので、次に進む。
【0268】
テンプレートID「TID15」の親要素は、テンプレートID「TID14」の構成要素であるが、これは、return節の処理により抽出された構成要素ではないので、更に上流に遡る。「TID14」の1段上の階層には「TID13」があり、さらに、その1段上の階層には「TID12」があり、さらに、その1段上の階層には「TID1」がある。これらはどれもreturn節の処理により抽出された構成要素ではないので、テンプレートID「TID15」はスキーマ検索から除外する。
【0269】
同様にして、テンプレートID「TID17」も除外される。
【0270】
テンプレートID「TID57」、テンプレートID「TID58」は、それぞれ上流にテンプレートID「TID55」を持ち、これはreturn節の処理により抽出された構成要素であるから、当該テンプレートID「TID55」を出力候補リストに登録する。
【0271】
この時点での、出力候補リストには、「TID4」と「TID55」が登録されている。
【0272】
次に、テンプレートツリーを上流から下流に探索して、上記親子関係をチェックする。
【0273】
return節の処理に抽出されたテンプレートIDは、「TID4」と「TID55」と「TID72」であったが、このうち、「TID4」と「TID55」は、既に、出力候補リストに登録されている。従って、例えばここでは、残りの「TID72」も出力候補リストに追加登録する。もちろん、この場合、「TID72」は出力候補リストに登録しなくともよい。
【0274】
この時点で出力候補リストには、「TID4」、「TID55」、「TID72」が登録されている。
【0275】
次に、図43のステップS304のスキーマ推定処理により、先に抽出された構成要素を先頭とする文書構造から、抽出すべき構成要素群を抽出する。
【0276】
図46に示したように、「TID4」を先頭する文書構造を構成する構成要素群は、{TID4(S1.0)、TID5、TID6(D1.72)、TID7(S1.0)、TID8、TID9、TID10、TID11}である(図47参照)。
【0277】
まず、図37に示したようなテンプレートツリーに記述されている情報(例えば、「required」という属性の値)を基に、これら各構成要素の中から、「TID4」を先頭する文書構造を構成するために必ず必要となる構成要素を選択する。
【0278】
上記構成要素のうち、テンプレートツリー上に、「TID4」を先頭する文書構造を構成するために必須と指定されているもの(すなわち、「required」という属性の値が「yes」となっている構成要素)は、「TID5」、「TID6」、「TID7」、「TID8」であるので、これら構成要素からなる文書構造(スキーマ)が検索結果の1つして求めることができる。
【0279】
なお、図48に、上記文書構造をXMLSCHEMAで記述した場合のスキーマ文書(XML文書)を示す。この文書には、<xsd:sequence>が付加されることになる。
【0280】
同様に、「TID55」を先頭する文書構造を構成する構成要素群は、{TID55、TID56、TID57、TID58}である(図49参照)。これら全ての構成要素は、テンプレートツリー上に、「TID55」を先頭する文書構造を構成するために必須と指定されているので、上記構成要素群からなる文書構造(スキーマ)が検索結果の他の1つして求めることができる。
【0281】
なお、図50に、上記文書構造をXMLSCHEMAで記述した場合のスキーマ文書(XML文書)を示す。
【0282】
同様に、「TID72」を先頭する文書構造を構成する構成要素群は、{TID72、TID73、TID74、TID75}である(図51参照)。これら全ての構成要素は、テンプレートツリー上に、「TID72」を先頭する文書構造を構成するために必須と指定されているので、上記構成要素群からなる文書構造(スキーマ)が検索結果のさらに他の1つして求めることができる。図37に示したようなテンプレートツリーには、「TID75」の構成要素については、数値型を定める情報、すなわち、「dataType」が記述されているので、この「年」という構成要素に対しては数値型のスキーマが設定される。
【0283】
このように、図43のステップS303で、文書構造の先頭の構成要素を求めたら、ステップS304では、テンプレートツリーから当該構成要素を先頭とする文書構造を構成する構成要素群を抽出する。その際、上記のように、テンプレートツリーに記述されている各構成要素についての記述を基に、抽出すべき構成要素を選択するようにしてもよいし、選択せずに、当該文書構造を構成する全ての構成要素を抽出してもよい。
【0284】
また、抽出した文書構造をXML文書、すなわち、図48や図50に示したようなスキーマ文書に変換する。このスキーマ文書に変換する際、テンプレートツリー上の当該構成要素に対し記述されている情報を基に、各構成要素の属性(例えば、数値型など)などを記述する。
【0285】
このように、テンプレートツリーには、図37に示したようなXML文書として、スキーマを検索し、スキーマ文書を作成する際に用いる情報が全て記述されている。
【0286】
次に、図43のステップS305に進み、検索結果として得られた各スキーマに対し、評価点(スコア)を算出する。
【0287】
例えば、検索結果として得られた、テンプレートID「TID4」の構成要素を先頭とするスキーマを構成する構成要素群はその第1の評価値(S)や第2の評価値(D)とともに示すと、{TID4(S1.0)、TID5、TID6(D1.72)、TID7(S1.0)、TID8、TID9、TID10、TID11}であった。このスキーマの評価点は、各構成要素に与えられた第1の評価値と第2の評価値の総和であり、S1.0+S1.0+D1.72=3.72となる。
【0288】
ここで、総和を求める際には、第1の評価値や第2の評価値にそれぞれ重みを設定してもよい。上記例の場合、第1の評価値や第2の評価値のそれぞれについて重みを「1」として計算している。
【0289】
また、検索結果として得られた、テンプレートID「TID55」の構成要素を先頭とするスキーマを構成する構成要素群はその第1の評価値(S)や第2の評価値(D)とともに示すと、例えば、{TID55(S0.8)、TID56、TID57(S1.0)、TID58}であったとする。このスキーマの評価点は、上記同様にして求めると、S0.8+S1.0=1.8 となる。
【0290】
さらに、検索結果として得られた、テンプレートID「TID72」の構成要素を先頭とするスキーマを構成する構成要素群はその第1の評価値(S)や第2の評価値(D)とともに示すと、{TID72(S1.0)、TID73、TID74、TID75}であったとする。このスキーマの評価点は、上記同様にして求めると、「1.0」となる。
【0291】
次に、図43のステップS306に進み、出力データを作成する。
【0292】
ここでは、例えば、ステップS304において、検索結果として抽出された各スキーマのスキーマ文書に、上記ステップS305で求めた評価点を書き込み、このスキーマ文書を1つのXML文書としてまとめて、例えば、図52に示したような出力データを作成する。図52に示したXML文書は、評価点の高い物から順にスキーマ文書を並べて表示するためのものである。
【0293】
スキーマ検索処理部303で作成された、図52に示したような出力データ(検索結果文書)は(必要に応じて、当該検索結果文書を表示するためのスタイルシートとともに)、結果処理部12から、クライアント端末102へ送信される。
【0294】
クライアント端末102では、図52に示した検索結果文書を受け取ると、当該検索結果文書とともに送られてきた(あるいは、予め定められた)スタイルシートを用いて、当該検索結果文書を表示するとともに、例えば、その中からユーザにより選択されたスキーマを、当該検索結果文書とともに送られてきた(あるいは、予め定められた)スタイルシートを用いて表示する。図53は、検索結果として得られたスキーマの表示例を示したものであり、図52に示した検索結果文書中の最初のスキーマ(テンプレートID「TID4」の構成要素を先頭とする文書構造)の表示例を示している。
【0295】
図53に示す表示例では、そのまま入力フォームとなるように、入力領域が設けられている。
【0296】
なお、検索結果として得られたスキーマをもつXML文書のXMLデータベースの階層構造上の格納位置(構造化文書パス)は、テンプレートツリー上の当該スキーマの位置と同じであるから、例えば、図53に示した入力フォームからデータを入力することにより作成された新規なXML文書をXMLデータベースに格納する場合、当該構造化文書パスを挿入コマンドや追加コマンドのパスの指定に用いればよい。よって、ユーザは、新規に作成したXML文書の格納位置をどこにすればよいかと迷うことなく、当該新規なXML文書をXMLデータベース上の適切な格納位置に格納することができる。
【0297】
このようにして、上記文書構造の検索結果を用いて新規にXML文書を作成した場合、内容的に類似する(同じカテゴリに属する)XML文書は、ほぼ同じ文書構造のものとなり(スキーマの氾濫を極力抑えることができ)、また、XMLデータベース上の格納位置もユーザがわざわざ指定することもないので、内容的に類似する(同じカテゴリに属する)XML文書は、XMLデータベース上で管理し易い格納位置にまとめられて記憶することができる(例えば、図46において、先頭が「特許」という要素名の構成要素の文書であれば、それらは全て「特許DB」ノード以下に格納される)。
【0298】
次に、スキーマ検索のための検索条件の入力画面上に、ユーザは、検索したいスキーマとして、例えば、「XML関連のスキーマ」という、上記(条件1)、すなわち、要素名あるいは要素値あるいは属性値に含まれる文字列のみを指定した、検索条件を入力したとする。この場合は、キーワードレベルの漠然とした要求しかない場合である。
【0299】
この様な検索条件が入力された場合、クライアント端末102、あるは構造化文書管理システムの要求受付部11では、例えば、「XML」という文字列を要素値に含む文書構造を検索する検索要求文(スキーマクエリ)が作成されたとする。
【0300】
このスキーマクエリが、前述同様にして、図46に示すようなXMLデータベースをもつ構造化文書管理システムのスキーマ検索処理部303にて処理される。where節の処理では、「XML」とこれに類似する語彙を表す文字列(例えば、「SGML」など)のいずれかを要素値にもつ構成要素のテンプレートIDとして、「TID6」、「TID17」「TID58」が語彙推定処理により抽出される。なお、「XML」の類似度は「1.0」、「SGML」の類似度は「0.64」であるので、これら抽出された各構成要素をその評価値とともに示すと、{TID6(D1.67)、TID17(D1.0)、TID58(D1.0)}となる。
【0301】
次に、return節の処理であるが、この場合は、return節に記述するようなユーザにより指定された条件そのものが存在しない。この場合、スキーマクエリのreturn節には、例えば、「<xsp:return type=”all”/>」と記述されているので、スキーマ検索処理部303では、テンプレートツリー上の文書のルートノードを判別し(すなわち、前述したように、テンプレートツリー上では、1つのXML文書の先頭の構成要素には「document」という属性値が記述されているので、これをチェックすることによりルートノードを判別することができる)、テンプレートツリーから、ルートノードを先頭とする文書構造であって、where節を処理することにより抽出された構成要素(「TID6」、「TID17」、「TID58」)のいずれかを含む文書構造を取り出すこととなる。
【0302】
すなわち、この場合、図43のステップS303へ進む。まず、テンプレートID「TID6」の構成要素について、その上流に遡ると、「TID4」に至るが(図46参照)、この構成要素について、図37に示したようなテンプレートツリーの記述をチェックする。すると、この構成要素には、「<xsp:Node type=“document”>」と記述されているので、この「TID4」を先頭とする文書構造を抽出候補とする。すなわち、「TID4」を出力候補リストに登録する。
【0303】
同様にして、「TID14」、「TID5」8も出力候補リストに追加されることになる。
【0304】
つまり、この時点で、抽出すべき文書構造として、
▲1▼{TID4、TID5、TID6、TID7、TID8、TID9、TID10、TID11}
▲2▼{TID14、TID15、TID16、TID17}
▲3▼{TID55、TID56、TID57、TID58}
という3つの文書構造が挙がる。
【0305】
以上3つの文書構造を構成する各構成要素のうち、テンプレートツリーの記述を基に、必須な構成要素のみを選択するなどして、抽出すべき構成要素群(スキーマ)を抽出する(図43のステップS304)。
【0306】
さらに、この検索結果として得られた各スキーマに対し、評価点を求めて(図43のステップS305)、出力データを作成する。
【0307】
なお、以上のようにして、検索されたスキーマについて、予めスキーマが設定されている場合(予め定められたスキーマに従って記述された文書のスキーマである場合)には、当該スキーマを記述したスキーマ文書をXMLデータベースから検索して、それを検索結果のスキーマとして用いてもよい。
【0308】
また、XQueryなどによって検索した結果に対して、データとともに付加的にスキーマ情報をクライアントに通知するようにしてもよい。XQueryで検索した結果はデータだけになり、それらの構造が見えにくい部分があるが、それを補完することが可能となる。また、その結果情報として、テンプレート要素に対して、累積カウントを記述することで、それらをブラウジングすることで、データベース中のパスと、その頻度を一目で把握することも容易となる。
【0309】
また、アクセス権限をテンプレートツリー上の各構成要素に設定されていてもよい。例えば、部署Aと部署Bがあり、それぞれの管轄範囲のXML文書が、XMLデータベース上の予め定められた領域に格納されているとする。この場合、部署Aの管轄文書に対して、部署Bはアクセスできないが、文書Bにはスキーマのみであれば公開するといったアクセス権限が設定されていてもよい。スキーマを公開することで、例えば、後に部署A,部署B内のアプリケーション連携を行う際に、それらスキーマの違いを吸収することなく、コスト削減が行える。
【0310】
また、各種文書をXMLデータベース内に格納しようとした場合、このデータはどこに格納するのが適しているか、などが分からなくなり、一時的に適当な位置に格納しておくだけ、といった場合が多く、その場合、その情報は埋もれています場合が多い。XMLデータベース管理下においては、それらがサーバ側で管理されており、1つのXMLツリーとして表されているために、格納対象の文書をどこに格納すれば良いかの指針も示してくれる。さらにいえば、格納場所はフォルダである必要もなく、部分文書であってもよい。よって、スキーマの氾濫を極力減らすことも可能である。
【0311】
以上のように、上記実施形態によれば、階層構造をもつXMLデータベースから、構造、語彙が確定していない曖昧な条件から所望のスキーマおよび、そのスキーマを抽出したXMLデータベース中の位置を、スキーマの明示的な定義の有無を問わず検索することが容易に可能となる。
【0312】
【発明の効果】
以上説明したように、本発明によれば、階層構造を有するXMLデータベースから漠然とした検索条件を基に文書構造を効率よく検索することができる。
【図面の簡単な説明】
【図1】本発明の実施形態に係る構造化文書管理システムの構成例を示した図。
【図2】図1に示した構造化文書管理システムの一利用形態を示したもので、WWWのバックエンドで、構造化文書管理システムが動作している場合を示した図。
【図3】XMLで記述された構造化文書の一例を示した図。
【図4】図3の構造化文書の文書構造を模式的に示した図。
【図5】追加コマンドの機能を説明するための図で、構造化文書データベースの初期状態に追加コマンドを実行した場合について示している。
【図6】図5(b)に示した状態の構造化文書データベースに対し、取得コマンドを実行した場合の処理結果を示した図。
【図7】図5(b)に示した状態の構造化文書データベースに対し、追加コマンドを実行して1つの「特許」情報の文書オブジェクトツリーを追加した場合を示している。
【図8】図5(b)に示した状態の構造化文書データベースに対し、追加コマンドを実行して3つの「特許」情報の文書オブジェクトツリーを追加した場合を示している。
【図9】要素名生起インデックスの格納例を示した図。
【図10】データ生起インデックスの格納例を示した図。
【図11】図8に示した状態の構造化文書データベースに対して、3つの「特許」情報を取り出すための取得コマンドを実行した場合の実行結果を示した図。
【図12】XML文書の文書構造を定義するスキーマの一例を示した図。
【図13】図8に示した状態の構造化文書データベースに、スキーマ格納コマンドを実行して、図12に示したスキーマを追加格納(設定)した場合を示した図。
【図14】スキーマが設定されて、スキーマが存在している旨の属性値のセットされた文書オブジェクトツリーを示した図。
【図15】各オブジェクトファイルに、スキーマが存在している旨の属性値が格納されている様子を概念的に示した図。
【図16】必要に応じて検索で使用される概念階層を構造化文書で表現した例を示した図。
【図17】必要に応じて検索で使用される概念階層を構造化文書で表現した例を示した図。
【図18】図8に示した状態の構造化文書データベースに対し、追加コマンドを実行して、図16,図17に示した「概念」情報の文書オブジェクトツリーを追加した場合を示した図。
【図19】図8に示した状態の構造化文書データベースに対し、追加コマンドを実行して、図16,図17に示した「概念」情報の文書オブジェクトツリーを追加した場合を示した図。
【図20】クエリ(XML文書)の一例を示した図。
【図21】単純検索のクエリ(XML文書)の一例を示した図。
【図22】図21の単純検索のクエリを用いた検索結果(XML文書)を示した図。
【図23】概念検索のクエリ(XML文書)の一例を示した図。
【図24】図1の構造化文書管理システムの文書検索処理動作について説明するためのフローチャート。
【図25】ユーザインタフェースとしての画面の表示例を示した図。
【図26】文書検索を行うためのユーザインタフェースとしての画面の表示例を示した図。
【図27】図26に示した画面上から入力された情報に基づき作成されるクエリを示した図。
【図28】図1の構造化文書管理システムの文書取得処理動作について説明するためのフローチャート。
【図29】文書取得コマンドを実行した結果得られた構造化文書の表示例を示した図。
【図30】文書検索を行うためのユーザインタフェースとしての画面の表示例であって、スキーマの検索処理動作を説明するための図。
【図31】スキーマ検索のクエリの一例を示した図。
【図32】スキーマの取得するためのユーザインタフェースとしての画面の表示例を示したもので、取得されたスキーマの表示例を示している。
【図33】テンプレート処理部の構成例を示した図。
【図34】テンプレートツリーの一例を示した図。
【図35】XML文書の具体例を示した図。
【図36】図34に示したテンプレートツリーの更新後を示した図。
【図37】テンプレートツリーの記憶例を示した図。
【図38】スキーマ検索処理部303の構成例を示した図。
【図39】スキーマクエリの一例を示した図。
【図40】スキーマクエリの他の例を示した図。
【図41】意味ネットワークの具体例を示した図。
【図42】意味ネットワークを用いて検索条件として指定されたキーワードの類似語を求める処理を説明するためのフローチャート。
【図43】スキーマ検索処理部の処理動作を説明するためのフローチャート。
【図44】スキーマ検索のための検索条件の入力画面の表示例を示した図。
【図45】図44に示した入力画面から入力された検索条件に基づき作成されたスキーマクエリの一例を示した図。
【図46】テンプレートツリーの具体例を示した図。
【図47】検索した結果得られた文書構造を示した図。
【図48】図47に示した文書構造を記述したXML文書の一例を示した図。
【図49】検索した結果得られた他の文書構造を示した図。
【図50】図49に示した文書構造を記述したXML文書の一例を示した図。
【図51】検索した結果得られたさらに他の文書構造を示した図。
【図52】出力データの一例を示した図。
【図53】検索結果として得られたスキーマの表示例を示した図。
【図54】スキーマクエリ中のwhere節の処理手順を説明するためのフローチャート。
【図55】構造推定処理を説明するためのフローチャート。
【図56】語彙推定処理を説明するためのフローチャート。
【図57】スキーマクエリ中のreturn節の処理手順を説明するためのフローチャート。
【符号の説明】
100…構造化文書管理システム
303…スキーマ検索処理部
306…テンプレート処理部
306a…構造抽出部
306b…テンプレートツリー処理部
321…スキーマクエリ解析部
322…スキーマクエリ条件処理部
323…スキーマクエリ出力処理部
404…テンプレート記憶部
405…意味ネットワーク記憶部
[0001]
[Technical Field]
The present invention relates to a document structure search method and a structured document search apparatus for searching for a desired document structure from different document structures of a plurality of structured documents stored in a database having a hierarchical structure.
[0002]
[Prior art]
As a database for storing structured documents such as documents described in XML (Extensible Markup Language), each of a plurality of structured documents having a hierarchical structure and different document structures is a partial document on one large tree structure. Some are stored and managed as
[0003]
A document structure of a structured document such as a document described in XML (hereinafter also referred to as XML document, XML data, etc.) is called a schema. Schemas can also be specified by data creators explicitly using a schema language (XML-SCHEMA, Relax NG, etc.) (a schema document that describes a schema is called a schema document, which is also structured) However, it is generally troublesome to describe a schema in a schema language. Furthermore, unlike SGML, XML does not require a schema to be defined for data by a schema language, and is merely an optional position.
[0004]
Unlike the XML database having the hierarchical structure as described above, there is also an XML database having a flat (non-hierarchical) data structure for storing each XML document in folder units. The schema is stored in folder units and is not managed in a hierarchical manner.
[0005]
In the case of an XML database having a hierarchical structure and managing XML documents in one large tree structure (hereinafter referred to as a hierarchical XML database), the document structure of each structured document is managed as a part of the hierarchical structure. It will be.
[0006]
Although it is not always necessary to determine the schema in advance, if all the XML documents stored in the hierarchical XML database have different document structures, it cannot be denied that they are difficult to manage. From the viewpoint of efficiently managing stored documents, it is desirable that XML documents that are similar in content (belonging to the same category) have the same document structure rather than completely different document structures.
[0007]
When an XML document creator creates an XML document with a disjoint document structure, the document structure overflows, and the hierarchy or the XML database cannot be used more than a simple search engine, and the merits of XML may be lost.
[0008]
In other words, in the hierarchical XML database, it is desirable to suppress the flooding of the schema as much as possible. For this reason, it is conceivable that before creating an XML document, a schema of XML documents having similar contents in the hierarchical XML database is searched, and data is created using the schema.
[0009]
However, the conventional hierarchical XML database has the following two problems.
[0010]
The first problem is that there is no effective means for searching only the desired document structure in the hierarchical XML database. If schemas are defined for all stored documents in the schema language, the schema search can be facilitated by managing them in the database, but this is the case because the schema language is optional. Only the registered schema language is searched.
[0011]
Another method is to specify an ambiguous structure and examine the XML data as a result of searching the data with XQuery, etc., and extract the structure with the eyes of the user, but the cost in this case is also high . I want a schema, not data.
[0012]
For example, an arbitrary element name is designated as a search condition, and DTD (Document Type Definition) information that the document conforms to is returned as a search result (see, for example, Patent Document 1). However, according to this method, information cannot be obtained for a document that does not comply with DTD, and the granularity is also a document unit, and only the components of the DTD are returned (only the partial document schema is returned). (Return) is not possible.
[0013]
Also, there is a technique for searching similar documents from seed documents and displaying them (for example, see Patent Document 2). In the method disclosed here, it is necessary to visually determine which schema the acquired document follows, and since the search result is also a document unit, the schema included in the partial document is extracted. However, there remain problems such as low similarity.
[0014]
Furthermore, there is a technique for managing newly registered element names and attribute names in a table (see, for example, Patent Document 3). However, this method is effective only with a database that manages XML documents in a flat manner, and does not consider a hierarchical XML database in which the document structure is managed hierarchically.
[0015]
The second problem is that the search target is ambiguous and vague, such as how the search should be performed and what results should be obtained when the user tries to search the document structure. Since there are many cases, there is no method for specifying a search condition for a document structure including ambiguity so as to cope with such a case.
[0016]
In terms of what kind of search is performed, for example, when a schema of “book” information is to be searched, a schema element that defines an element called a book is generally searched. However, there is a case where it is not precisely defined as “book” and a search is made with a schema defining “book” or “book”.
[0017]
In addition, there is a request to search a schema that can be summarized only from keywords, vaguely. In this case, it is not only possible to determine whether what this keyword means is an element, an attribute, or a value, but the intention is to search for any schema that stores vague data. It has been.
[0018]
In this way, the user is vague at the time of searching the schema, is not fixed, and should be structured so that it can be absorbed.
[0019]
In a conventional search method (see, for example, Patent Document 2), a search is not output unless the tag name completely matches. If DTD is specified in advance, the structure according to the DTD is shown, but it is out of the main point of the present invention to search the schema.
[0020]
For any result, information that the user wants to use should be added instead of simply returning the schema language.
[0021]
Even if the schema is not defined by the schema language, when the user wants to manage data as an XML document, the user implicitly assumes the schema and creates a document accordingly. Furthermore, there is a strong tendency for data having similar schemas to be managed in the same path in a hierarchical database. These can be regarded as implicit schema definitions, and a management method is required in the same way as explicit schema definitions in the schema language.
[0022]
In addition, there are mainly two types of use of schema search (document structure search) depending on the user's intention.
[0023]
The first is a case where a schema to be searched to some extent can be predicted. For example, when searching for “patent-related schema”, the schema to be extracted is searched for a schema similar to the schema that defines the XML document of “patent” information.
[0024]
The second is that even though the data exists but the structure and how it is put together is not yet determined, we want to search for a similar schema. In this case, the main point is how to present a useful schema to the user from the data to be stored.
[0025]
Even in the search result, it is assumed that the database is a hierarchical database and the schemas are also arranged hierarchically.
[0026]
[Patent Document 1]
JP 2000-200266 A
[0027]
[Patent Document 2]
JP 2001-14326 A
[0028]
[Patent Document 3]
JP 2002-7439 A
[0029]
[Problems to be solved by the invention]
Thus, conventionally, there has been no method for efficiently searching only the document structure from the XML database having a hierarchical structure while taking into account the ambiguity of the search condition.
[0030]
Accordingly, an object of the present invention is to provide a document structure search method, a document structure search apparatus, and a program that can efficiently search a document structure from an XML database having a hierarchical structure based on a vague search condition.
[0031]
[Means for Solving the Problems]
The present invention is for retrieving a desired document structure from among different document structures of a plurality of structured documents stored in a database having a hierarchical structure, and the hierarchical structure includes the different document structures. When at least one keyword is input as a search condition for searching the document structure, each keyword is searched for a similar word of the keyword, and the keyword is searched from the hierarchical structure. And a similar element are included in the element name or element value, and a document structure including the searched element is output as a search result.
[0032]
According to the present invention, by simply inputting at least one keyword, it is possible to efficiently obtain a document structure including a component having an element name or an element value that is one of the keywords and a word in the similar range. it can.
[0033]
The present invention is also for retrieving a desired document structure from among different document structures of a plurality of structured documents stored in a database having a hierarchical structure, wherein the hierarchical structure includes the different documents. Each of the components constituting each of the structures. When at least one first keyword and at least one second keyword are input as a search condition for searching the document structure, A similar word of the first keyword is obtained, a first component including either the first keyword or the similar word in an element name or an element value is searched from the hierarchical structure, and the second And search for a second component that includes any one of the second keyword and the similar word in the element name from the hierarchical structure, and at least Among the document structure to the top of the second component, and outputs the document structure comprising the first component as a search result.
[0034]
According to the present invention, by simply inputting at least one first keyword and at least one second keyword, any one of the first keyword and a word in the similar range is selected as an element name or element value. It is possible to efficiently obtain a document structure including a constituent element having a constituent element having the element name of any one of the words in the similar range to the second keyword.
[0035]
DETAILED DESCRIPTION OF THE INVENTION
First, before describing an embodiment of the present invention, a basic configuration and processing operation of a structured document management system will be described.
[0036]
(Description of structured document management system)
Examples of structured documents include documents described in XML, SGML, and the like. SGML (Standard Generalized Markup Language) is a standard defined by ISO (International Organization for Standardization). XML (extensible Markup Language) is a standard defined by W3C (World Wide Web Consortium). These are structured document standards that allow documents to be structured.
[0037]
Hereinafter, description will be given by taking a document described in XML as a structured document. Data defining the document structure of a structured document (document structure definition data) is called a schema. In XML, schema languages such as XML-Schema and XDR (XMLData Reduced) have been proposed to define a schema. Here, for example, a case where a schema is described in XDR will be described as an example.
[0038]
The schema is also a structured document to be managed by the structured document management system, and may be referred to as a schema document here. A structured document other than a schema document, which has various miscellaneous contents such as patent specifications, mails, weekly reports, and advertisements, may be referred to herein as a content document.
[0039]
In the structured document management system, the schema document, the content document, and a query describing a search request from a user as will be described later, that is, a query document is also managed, and these are collectively referred to as “document”. .
[0040]
Hereinafter, when there is no special notice, when referring to “document”, it means all content documents, schema documents, and query documents.
[0041]
First, XML will be briefly described before describing the embodiment.
[0042]
FIG. 3 shows an example of “patent” information as an example of a structured document described in XML. In XML and SGML, tags are used to express the structure of a document. Tags include a start tag and an end tag. Each component of the document structure is surrounded by a start tag and an end tag. The start tag is the element name of the constituent element closed with “>”, and the end tag is the element name closed with the symbols “</” and “>”. The content of the component following the tag is a text (character string) or a repetition of a child component. Also, attribute information such as “<element name attribute =“ attribute value ”>” can be set in the start tag. A component that does not include text, such as “<patent DB></ patent DB>”, can also be expressed as “<patent DB />” as a simple notation.
[0043]
The document shown in FIG. 3 has an element starting from a “patent” tag as a root and elements starting from “title”, “application date”, “applicant”, and “summary” tags as its child elements. For example, one text (character string) such as “XML database” exists as an element value for an element starting from a “title” tag.
[0044]
In general, a structured document such as XML repeatedly includes arbitrary constituent elements, and further, the document structure is not predetermined.
[0045]
In order to logically express the structured document as shown in FIG. 3, a tree expression as shown in FIG. 4 is used. The tree is composed of nodes (numbered and indicated by circles), arcs (line with data connecting the circles representing the nodes), and text surrounded by a rectangle.
[0046]
One node corresponds to one component, that is, one document object. A plurality of arcs with labels corresponding to tag names and attribute names appear from the nodes. The destination of the arc is a character string (text) as a node value or element value. Alphanumeric characters (for example, “# 0”, “# 49”) described in the node are object IDs for identifying each document object.
[0047]
The tree structure shown in FIG. 4 is called the document object tree of the structured document shown in FIG.
[0048]
FIG. 1 shows an example of the structure of a structured document management system according to this embodiment. In FIG. 1, the structured document management system is roughly composed of a request control unit 1, an access request processing unit 2, a search request processing unit 3, a data access unit 4, a document storage unit 5, and an index storage unit 6. Yes. The document storage unit 5 and the index storage unit 6 are composed of, for example, an external storage device.
[0049]
The system configuration of FIG. 1 can be realized using software.
[0050]
The request control unit 1 includes a request reception unit 11 and a result processing unit 12. The request reception unit 11 receives a request from the user such as document storage, document acquisition, and document search, and calls the access request processing unit 2. The result processing unit 12 performs processing for returning the result processed by the access request processing unit 2 to the requesting user.
[0051]
The access request processing unit 2 includes a plurality of processing units corresponding to various requests from the user such as document storage, document acquisition, and document deletion. That is, the document storage unit 21, the document acquisition unit 22, and the document deletion unit 23 are configured.
[0052]
The document storage unit 21 performs processing for storing a document in a specified logical area in the document storage unit 5.
[0053]
When a logical area in the document storage unit 5 is specified, the document acquisition unit 22 performs processing for acquiring a document existing in the specified area.
[0054]
The document deletion unit 23 performs a process of deleting a document existing in a designated logical area in the document storage unit 5.
[0055]
The document storage unit 5 is a structured document database. For example, as shown in FIG. 8, documents are hierarchically stored in a tree structure like a UNIX directory structure.
[0056]
As shown in FIG. 8, the structured document database can be expressed in the same manner as the tree structure of one structured document as shown in FIG. That is, a partial hierarchical tree (partial tree) below an arbitrary node is a structured document cut out from the structured document database, and here, this is called a document object tree. Each node is assigned an object ID. The object ID is a unique numerical value in the structured document database.
[0057]
It is assumed that an object ID “# 0” for specifying that the node is the root node is assigned to the node serving as the root of the hierarchical tree.
[0058]
A link is made from the root node, that is, the node of “# 0” to the node of the object ID “# 1” having the “root” tag at the head. A link from an “# 1” node to a node with an object ID “# 2” having a “patent DB” tag at the head is provided. From the “# 2” node, links to a node with an object ID “# 42”, a node with “# 52”, and a node with “# 62” having a “patent” tag at the head are provided.
[0059]
The “patent” information shown in FIG. 3 corresponds to the partial tree below the “# 42” node in FIG. From this node, a link is made to a node having “title” tag, “applicant” tag, “summary” tag, etc. at the head, and from the end node, “XML database”, “T company”, “XML” A link to a character string (element value) such as “Provide a unified database” is provided.
[0060]
In FIG. 8, the partial tree below the node with the object ID “# 52” and the partial node below the node with the object ID “# 62” are also document object trees corresponding to one “patent” information.
[0061]
By the way, for example, the element value “XML database” linked to the “# 43” node is connected to the “# 43” node by a special tag name “#value”. Since this tag name starts with “#”, it cannot be used as a standard tag name in the XML standard.
[0062]
A structured document path is used to designate a specific node of such a structured document database. The structured document path is a character string that starts with “ux: /// root”. uix (Universal Identifier for XML) is a character string indicating a structured document path.
[0063]
For example, when “uix: // root / patent DB” is expressed as a structured document path, a logical area in the document storage unit 5 indicated by the structured document path is from a “# 1” node in FIG. The node indicated by the arc to which “patent DB” is assigned, that is, the “# 2” node.
[0064]
Similarly, the structured document path “uix: // root / patent DB / patent” points to the “# 42” node in FIG. 8, and the structured document path “uix: // root / patent DB / application date / “Year” indicates the “# 45” node in FIG.
[0065]
For example, in FIG. 8, in the case where a plurality of “patent” information is stored below the “# 2” node, that is, in the component “patent DB”, in order to identify each “patent” information, An index may be added to the name (eg, “patent” in this case).
[0066]
If it is the first “patent” information of “patent DB”, it will be “uix: // root / patent DB / patent [0]”, which is the same as “uix: // root / patent DB / patent” It is considered. If it is the second “patent” information of the “patent DB”, it is “uix: // root / patent DB / patent [1]”, and if it is the fifth “patent” information of the “patent DB”, it is “uxix”. // root / patent DB / patent [4] ”.
[0067]
The index storage unit 6 stores an element name occurrence index and a data occurrence index used at the time of retrieval.
[0068]
The element name occurrence index is an index file that associates the element name stored in the structured document database with the position of the structured document (document object tree) having the element name component at the head. For example, in the structured document database of FIG. 8, a structured document whose element name “patent” (corresponding to “patent” information) is a node below “# 42” node, a structured document below a node “# 52”, “ As shown in FIG. 9, the element name occurrence index includes the “# 42” node, the “# 52” node, and the parent node of the “# 62” node, as shown in FIG. , “# 2” node is stored linked to the element name “patent”.
[0069]
Thus, when indexing is performed at the parent node, the index file can be compressed. In other words, if indexing is performed at the parent node, the number of nodes to be linked to the element name does not increase because the parent node substitutes even if the number of child nodes increases.
[0070]
A data occurrence index is an index file that associates character string data stored in a structured document database with the position of a structured document (document object tree) in which the character string data exists. For example, in the structured document database of FIG. 8, the character string “XML” exists in the structured document under the “# 43” node and the structured document under the “# 49” node. In this case, in the data occurrence index, as shown in FIG. 10, the “# 43” node and the “# 49” node are linked to the character string “XML” and stored.
[0071]
The designated logical area in the document storage unit 5 is a storage location of the document designated by the user using the structured document path. The structured document path is an expression that can be recognized by the user.
[0072]
Returning to the description of FIG.
[0073]
The data access unit 4 performs various processes for accessing the document storage unit 5. The data access unit 4 includes a document object tree storage unit 41, a document object tree deletion unit 42, a document object tree acquisition unit 43, a document character string acquisition unit 44, a document parser unit 46, a composite document creation unit 47, and an index update unit 48. Composed.
[0074]
The document object tree storage unit 41 performs processing for storing a document object tree in a designated physical area in the document storage unit 5.
[0075]
The document object tree deletion unit 42 performs processing for deleting the document object tree existing in the designated physical area in the document storage unit 5.
[0076]
The document object tree acquisition unit 43 performs a process for acquiring a document object tree existing in a designated physical area (by a structured document path or the like) in the document storage unit 5.
[0077]
The document character string acquisition unit 44 performs processing for converting the document object tree into a structured document (XML document).
[0078]
The document parser unit 46 reads a structured document input by a user and inspects the document structure. Further, if there is a schema that is definition data of the document structure, it is verified whether or not the document structure of the input structured document conforms to the schema. The output result is a document object tree. A document parser can usually be constructed by combining a lexical analyzer (lexical analyzer generator) such as lex (performing lexical analysis and decomposing it into tokens) and a parser generator such as yacc (heteroother compiler).
[0079]
The composite document creation unit 47 must check whether it conforms to the schema when storing a document or deleting a document, but creates data necessary for this check.
[0080]
The index updating unit 48 updates the element name occurrence index and the data occurrence index shown in FIGS. 9 and 10 every time the stored contents of the structured document database are updated due to document storage or document deletion.
[0081]
The physical area in the document storage unit 5 is internal data indicating the location of unique document data in the structured document database such as file offset and object ID. The data cannot be recognized by the user.
[0082]
The search request processing unit 3 performs processing for searching for a document stored in the document storage unit 5 using each processing function unit provided in the data access unit 4. When the request receiving unit 11 of the request control unit 1 receives a document search request from the user, the search request processing unit 3 receives a query document described in the query language from the request receiving unit 11. Then, the index storage unit 6 and the document storage unit 5 are accessed through the data access unit 4, a set of documents that match the search request is acquired, and the result is output via the result processing unit 12.
[0083]
FIG. 2 shows one use form of the structured document management system shown in FIG. 1. In FIG. 2, the structured document management of the configuration shown in FIG. 1 is performed on the back end of the WWW (World Wide Web). The case where the system 100 is operating is shown.
[0084]
The WWW browser 103 is operating in each of a plurality (for example, three) of client terminals (for example, personal computers, portable communication terminals, etc.) 102. The user can access the structured document management system 100 by accessing the WWW server 101 from each client terminal. The WWW browser 103 and the WWW server 101 communicate with each other using HTTP (Hyper Text Transfer Protocol). Further, the WWW server 101 and the structured document management system 100 communicate with each other via CGI (Common Gateway Interface) or COM (Component Object Model).
[0085]
Requests from users, such as document storage, document acquisition, and document search, are transmitted from the WWW browser 103 and accepted by the structured document management system 100 through the WWW server 101. The result processed by the structured document management system 100 is returned to the requesting WWW browser 103 through the WWW server 101.
[0086]
The (1) storage function and (2) search function of the structured document management system in FIG. 1 will be described in detail below.
[0087]
(Storage function)
The storage system commands in the structured document management system of FIG.
[0088]
insertXML (path, Nth, XML): document storage
appendXML (path, XML): document storage
getXML (path): Document acquisition
removeXML (path): Delete document
setSchema (path, schema): Schema storage
getSchema (path): Schema acquisition
“InsertXML” is a command (hereinafter simply referred to as an insert command) that inserts a document at the Nth position below the structured document path specified in ().
[0089]
“AppendXML” is a command for inserting a document at the end of the structured document path specified in () (hereinafter simply referred to as an add command).
[0090]
“GetXML” is a command for retrieving a document below the structured document path specified in () (hereinafter simply referred to as an acquisition command).
[0091]
“RemoveXML” is a command (hereinafter simply referred to as a delete command) for deleting a document below the structured document path specified in () (a document other than a schema document, mainly a content document).
[0092]
“SetSchema” is a command (hereinafter simply referred to as a schema storage command) for setting a schema in the structured document path specified in ().
[0093]
“GetSchema” is a command for retrieving the schema set in the structured document path specified in () (hereinafter simply referred to as a schema acquisition command).
[0094]
Among the above commands, processing for the insert command, addition command, and schema storage command is executed by the document storage unit 21 of the access request processing unit 2, and processing for the acquisition command and schema acquisition command is executed by the document acquisition unit 22. Processing regarding the delete command is executed by the document deletion unit 23.
[0095]
With reference to FIG. 5, the case where an additional command is executed in the initial state of the structured document database (see FIG. 5A) will be described.
[0096]
As shown in FIG. 5A, with respect to the initial state in which the “# 0” node and the “# 1” node are connected by the “root” arc,
As a result of executing “appendXML (“ uix: // root ”,“ <patent DB /> ”)”, a “# 2” node and a “patent DB” arc are created as shown in FIG. .
[0097]
A case where an acquisition command is executed on the structured document database in the state shown in FIG.
[0098]
For example, when “getXML (“ uix: // root ”)” is executed, the document object tree below the “# 0” node indicated by the “root” arc in FIG. 5B is extracted and converted to an XML document. To do. As a result, a character string “<root><patent DB /></root>” is extracted and converted into an XML document as shown in FIG. The processing of the acquisition command is executed by the document acquisition unit 22 of the access request processing unit 2.
[0099]
Next, when an additional command for storing “patent” information as a content document (XML document) as shown in FIG. 3 is executed for the structured document database in the state shown in FIG. Will be described. That is, in this case, “appendXML (“ uix: // root / patent DB ”,“ <patent>... </ Patent> ”)” is executed. In this command, ““ <patent>... </ Patent> ”” corresponds to the “patent” information XML document shown in FIG.
[0100]
When the processing of the additional command is executed, as shown in FIG. 7, a document object tree (corresponding to FIG. 4) with the “# 42” node at the top is added below the “# 2” node.
[0101]
Assume that the following additional command is repeatedly executed three times for the structured document database in the state shown in FIG.
[0102]
"AppendXML (" uix: // root / patent DB ","<patent> ... </ patent>")"
In the above command, “<patent>... </ Patent>” corresponds to a content document having the same document structure as the XML document shown in FIG.
[0103]
Then, as shown in FIG. 8, a document object tree with “# 42” node, “# 52” node, and “# 62” node at the top is added below the “# 2” node.
[0104]
Next, a case where an acquisition command for extracting three pieces of “patent” information is executed on the structured document database in the state shown in FIG. 8 will be described. In this case, “getXML (“ uix: // root / patent DB ”)” is executed. Then, the document object tree below the “# 2” node indicated by the “patent DB” arc is extracted. As a result, as shown in FIG. 11, an XML document “<patent DB><patent> ... </ patent><patent> ... </ patent><patent> ... </ patent></ patent DB>” is acquired. it can.
[0105]
In the structured document database, data defining the document structure of the content document (XML document) such as the “patent” information, that is, the schema, is also managed.
[0106]
FIG. 12 shows an example of a schema that defines the document structure of an XML document. Here, XDR (XML-Data Reduced), which is one of XML document structure definition languages, will be taken up. Of course, other document structure definition languages such as XML-Schema may be used.
[0107]
The schema shown in FIG. 12 defines the document structure of the “patent” information shown in FIG. 3 in XDR. As can be easily seen from FIG. 12, the schema is also a structured document in the XML format. There is an element set that starts with a component starting with a “Schema” tag and starts with an “ElementType” tag as its child elements.
[0108]
A case where a schema storage command for storing the schema document shown in FIG. 12 is executed on the structured document database in the state shown in FIG. 8 will be described. In this case, “set Schema (“ uix: // root / patent DB ”,“ <Schema>... </ Schema> ”)” is executed. In this command, ““ <Schema>... </ Schema> ”” corresponds to the schema document shown in FIG.
[0109]
By executing the above command, as shown in FIG. 13, a “#schema” arc is added below the “# 2” node, and a document object tree having the “# 3” node as a top node is added to the “# 3” node. The Since the schema itself is expressed as an XML document, the tree is expanded as shown in FIG.
[0110]
In FIG. 13, arcs that start with “@” like “@name” correspond to attributes. Since the tag name “#schema” also begins with “#” and “@”, it cannot be used as a standard tag name in the XML standard.
[0111]
Since the schema document shown in FIG. 12 is stored below the “# 2” node, the document structure of the document stored below the “# 2” node is defined by the schema document shown in FIG. It may be required to conform to the document structure. That is, in this case, the schema shown in FIG. 12 is set below the “# 2” node.
[0112]
When the schema shown in FIG. 12 is set below the “# 2” node, for example, as shown in FIG. 14, each node (file) of the document object tree below the “# 2” node has the schema. An attribute value indicating that it exists is set.
[0113]
After the schema shown in FIG. 12 is set below the “# 2” node, the “patent” information document shown in FIG. 3 that matches the document structure defined in this schema is shown in FIG. As described above, when the document object tree is stored in the structured document database, an attribute value indicating that the schema shown in FIG. 12 exists in the document structure of this document is set in each document object constituting the document object tree. Is done. For example, “1” is set to an attribute value (for example, “schema conformity presence / absence”) indicating that a schema exists for each document object file constituting the document object tree. In FIG. 14, each document object (node) conforming to the schema is indicated by a double circle. Each document object indicated by a double circle has a document structure definition corresponding to the document object.
[0114]
FIG. 15 conceptually shows the contents of a file of each document object. For example, a file of a document object whose object ID is “# 42” relates to another document object linked to the document object. The attribute value is described together with information (for example, an arc or a pointer value to a linked document object). Note that when there is no schema to be applied to the document object, the value of “existence of schema conformance” is “0”.
[0115]
FIG. 16 and FIG. 17 show the structure of the concept hierarchy, which is the result of hierarchically classifying words used as keywords used as search conditions as needed from the semantic content in the structured document management system of FIG. An example expressed in a document is shown. The “concept” information shown in FIGS. 16 and 17 is a content document described in XML.
[0116]
The example of “concept” information shown in FIG. 16 represents an “information model” used as one classification axis for classifying the contents of a patent document in a so-called patent search in a concept hierarchy. “Concept” information surrounded by “concept” tags has a document structure with a nested structure. That is, in the example of FIG. 16, there are a concept “document”, a concept “relation”, and a concept “object” as child concepts of the concept “information model”. Further, as a child concept of the concept “document”, there are a concept “structured document” and a concept “unstructured document”. Furthermore, as a child concept of the concept “structured document”, there are a concept “XML” and a concept “SGML”.
[0117]
The description example of the “concept” information illustrated in FIG. 17 represents a classification axis “information operation” different from that in FIG. In the example of FIG. 17, there are a concept “search”, a concept “store”, a concept “processing”, and a concept “distribution” as child concepts of the concept “information operation”.
[0118]
The “concept” information as shown in FIGS. 16 and 17 can also be stored in the structured document database in the same manner as the “patent” information described above. That is, for example, first, “appendXML (“ uix: // root ”,“ <concept DB /> ”)” is executed on the structured document database in the state shown in FIG. Thus, a “# 201” node and a “concept DB” arc are created. In this state, when “concept” information shown in FIG. 16 is stored, “appendXML (“ uix: // root / concept DB ”,“ <concept name>... </ Concept> ”)” is executed. . In this command, ““ <concept name>... </ Concept> ”” corresponds to the “concept” information shown in FIG.
[0119]
When the processing of the addition command is executed, as shown in FIG. 19, a document object tree with the “# 202” node at the top is added below the “# 201” node.
[0120]
As described above, in the structured document management system in FIG. 1, a large number of XML document groups (content documents, schema documents, query documents, etc.) having different document structures registered in the structured document database are displayed. 18. As shown in FIG. 19, it is handled as one large XML document in the form of a tree having a “root” tag at the head. Therefore, to access a partial XML document, it is possible to search and process a wide range of XML documents by using a unified access means that does not depend on the document structure, which is a path to a large XML document. Become.
[0121]
In addition, by setting a schema in a part of the structured document database, the validity of whether or not the document structure of the document to be stored matches the document structure defined by the schema is automatically checked. You may make it carry out.
[0122]
(Search function)
The search commands in the structured document management system of FIG.
[0123]
query (ql)
“Query” is a command (hereinafter referred to as a search command) that executes the query ql in () as a parameter and acquires the resulting XML document.
[0124]
For example, as shown in FIG. 20, the query is an XML document having a document structure in which a search position, a search condition, an information extraction part, and the like are described in a language similar to SQL (Structured Query Language). The query document is also a management target of the structured document management system.
[0125]
The element starting from the “kf: from” tag has a description for associating a variable with the specification of the search position and the value of the document element, and the element starting from the “kf: where” tag has a description of conditioning regarding the variable , The output format of the search result is described in the element starting from the “kf: select” tag.
[0126]
Search includes simple search and concept search. Simple search searches and extracts information that satisfies the search conditions specified in the query, and concept search uses the concept information specified in the query to search specified in the query. It searches and extracts information that satisfies the conditions.
[0127]
FIG. 21 shows an example of a simple search query. The query shown in FIG. 21 corresponds to, for example, “1999” in the “patent” information document group stored below the node indicated by the “patent DB” arc for the structured document database shown in FIG. In addition, a description example of a search request “enumerate“ titles ”of a document (“ patent ”information) having an element“ summary ”having a content such as“ PC ”) is shown.
[0128]
Document elements of “Title”, “Year”, and “Summary” of “Patent” information are respectively added to the variables “$ t”, “$ y”, and “$ s” by the description of the element that starts with the “kf: from” tag. The value of is assigned.
[0129]
The variable “$ y” = “1999” is compared based on the description of the element starting from the “kf: where” tag. The component “MyLike” is a function for detecting the variable “$ s” having a value similar to “PC” with the variables “$ s” and “PC” as arguments.
[0130]
The variable “$ t” is used as the output value by the description of the element starting from the “kf: from” tag.
[0131]
The “kf: star” tag is an ambiguous expression of the structure. For example, “<patent><kf:star><year>” exists as a descendant element of an element whose tag name is “patent”. And an element whose tag name is “year”.
[0132]
FIG. 22 shows a search result using the simple search query of FIG. This search result is also an XML document.
[0133]
FIG. 23 shows an example of a query for concept search. For example, the query in FIG. 23 is performed on the “patent” information document group stored below the node indicated by the “patent DB” arc with respect to the structured document database in the state illustrated in FIGS. 18 and 19. A description example of a search request for searching using “concept” information stored below the node indicated by the “concept DB” arc is shown. Here, the values of the child elements of the tag having the value of the concept “peripheral device” include the concepts “SCSI”, “memory”, “HDD”, and the like. Further, although not shown in FIG. 18, it is assumed that elements of each “patent” information include elements starting from “keyword” tags.
[0134]
That is, the query of FIG. 23 is a description example of a search request “list enumeration of“ titles ”of“ patent ”information having any one of the concepts below the concept“ peripheral device ”as an element value of a component“ keyword ”. Is shown.
[0135]
By the description of the element starting from the “kf: from” tag, the values of the elements “title” and “keyword” of the “patent” information are substituted into the variable “$ t” and the variable “$ k”, respectively. The variable “$ x” is substituted with the values of tag child elements (“SCSI”, “memory”, “HDD”, etc.) having the value of “peripheral device” as “concept” information.
[0136]
A comparison of “$ k” = “peripheral device” or “$ k” = “$ x” is made based on the description of the element starting from the “kf: where” tag.
[0137]
Next, the document search processing operation of the structured document management system of FIG. 1 will be described with reference to the flowchart shown in FIG.
[0138]
On a predetermined display device of the client terminal, a screen as a user interface as shown in FIG. 25 provided by the structured document management system 100 (for example, the request control unit 1) is displayed.
[0139]
When the user selects “XML search Win” using a pointing device such as a mouse on the screen shown in FIG. 25, a screen as a user interface for performing a document search shown in FIG. 26 is displayed. .
[0140]
In the search screen of FIG. 26, in the area W1, element names (tag names) of the components of the current tree structure of the structured document database are displayed in a simplified manner so that the user can understand them. In FIG. 26, only the element names of the upper hierarchy are displayed, but it is possible to display up to the end element names.
[0141]
The area W11 is an area for inputting a search target range (a search range on the tree structure), a search condition, and the like. In the area W12, the search result is displayed.
[0142]
For example, among the documents having “patent” under “uix: // root” as the first tag, the element value of the component having the “title” tag includes the character string “document”, and “1998” In the case of a search request “search for a document created thereafter”, “root” is selected from the area W1 with a mouse or the like, and a structured document path is input as a search target range. In the area W11, first, “patent” is input as the top node (in this case, “patent” may be input from the area W1 by selecting with a mouse or the like). Further, the contents of “the element value of the component“ title ”includes the character string“ document ”” and “the element value of the component“ year ”is“ 1998 ”or more” as the search condition are stored in advance. What is necessary is just to input into the provided data input area.
[0143]
Thereafter, by selecting the “search” button B21, for example, a query as shown in FIG. 27 is transmitted to the structured document management system together with an additional command for storing the query on the structured document database. The storage location of the query is predetermined, and the system side automatically sets the parameter of this additional command. For example, when the structured document database is in the state shown in FIG. 18, the structured document path as a parameter indicating the storage location of the query is “uix: // root / query DB”. The other parameter of the additional command is the query document.
[0144]
When receiving the query (step S100), the request receiving unit 11 passes the query to the search request processing unit 3. Then, the parameter of the additional command for storing the query document is passed to the document storage unit 21. The document storage unit 21 performs an additional command process, and the query is stored in the document storage unit 5 (step S101).
[0145]
On the other hand, the search request processing unit 3 accesses the index storage unit 6 and the document storage unit 5 through the data access unit 4 based on the received query, acquires a document set that matches the search request, etc. The requested information is extracted and output via the result processing unit 12.
[0146]
For example, in the case of the above query, first, it is efficient to narrow down the search target by searching for items that match the condition that the element value of the component having the “title” tag includes the character string “document”. Good. Therefore, the object ID of the node (document object) linked to the character string “document” is obtained using the data occurrence index as shown in FIG. Then, for each of them, the document object tree is moved up one upstream, and when the tag name “title” is reached, further upstream is reached. When the tag name “patent” is reached, the node The following document object tree Ot11 is extracted.
[0147]
Next, a document object tree Ot12 whose component value “year” is “1998” or more is further extracted from the extracted document object trees Ot11.
[0148]
This document object tree Ot12 is a document that matches the contents of the query. Further, according to the request contents of the query, a structured document path to the top node of each document object tree Ot12 is obtained (step S102).
[0149]
The search process is not limited to the above-described method, and various efficient search methods using index information are possible.
[0150]
The search request processing unit 3 integrates the results obtained in step S102 and creates an XML document as a search result (step S103).
[0151]
For example, the XML document of the search result is
<Out>
<Result>
ux: // root / patent DB / patent [0]
</ Result>
<Result>
ux: // root / patent DB / patent [2]
</ Result>
</ Out>
It becomes.
[0152]
The search request processing unit 3 returns the XML document together with the style sheet to the requesting client terminal via the search result processing unit 12 (step S104).
[0153]
In the client terminal, the XML document shown in FIG. 11 is converted into HTML data using a style sheet, and displayed in the area W12, for example, as shown in FIG. Here, for example, since the number of structured documents obtained as a search result is large, the structured document path of the searched structured document is displayed as the search result. In this case, for example, it is assumed that a desired one of the search result structured document paths displayed in the region W12 of FIG. 26 is selected by the user. For example, it is assumed that the first one of the structured document paths displayed in the area W12 in FIG. 26 is selected. In this case, an acquisition command may be transmitted as a document acquisition request from the client terminal to the structured document management system in order to acquire a structured document specified by the selected structured document path.
[0154]
The document acquisition processing operation of the structured document management system of FIG. 1 when the acquisition command is received by the request reception unit 11 of the structured document management system will be described with reference to the flowchart shown in FIG.
[0155]
For example, an acquisition command “getXML (“ uix: // root / patent DB / patent [0] ”)” is transmitted to the structured document management system.
[0156]
Here, for example, when the structured document database is in the state shown in FIG. 8, an acquisition command “getXML (“ uix: // root / patent DB / patent [0] ”)” is received as an example I will explain to you.
[0157]
When receiving the acquisition command, the request reception unit 11 passes the structured document path “uix: // root / patent DB / patent [0]”, which is a parameter in the acquisition command, to the document acquisition unit 22 (step S31). ).
[0158]
The document acquisition unit 22 passes the structured document path to the document object tree acquisition unit 43. The document object tree acquisition unit 43 specifies a physical area in the document storage unit 5 from the structured document path, and thereby displays a node (document object Ox5) represented by the structured document path existing in the area. Take out (step S32). If the structured document path is specified correctly, the object ID of the document object Ox5 can be acquired (step S33). In this case, the process proceeds to step S35.
[0159]
For example, in the case of the above acquisition command, since the “# 42” node becomes the document object Ox5, “# 42” is acquired as the object ID, and the document object tree Ot5 (“##” below this “# 42” node is acquired. 42 "node to"# 49 "node) are acquired (step S35).
[0160]
In step S32, if the corresponding document object Ox5 is not found from the designated structured document path, an error occurs (step S33), and the document acquisition unit 22 and the result processing unit 12 notify the client terminal that “document acquisition failed. Is returned (step S34).
[0161]
The document object tree Ot5 acquired in step S35 is converted into an XML document by the document character string acquisition unit 44. For example, in the case of the above acquisition command, the acquired XML document is an XML document of “patent” information as shown in FIG.
[0162]
The document acquisition unit 22 returns the XML document as shown in FIG. 3 (for example, with a predetermined style sheet such as XSL (extensible Style Language)) to the client terminal via the result processing unit 12 (step S37).
[0163]
The client terminal converts the XML document shown in FIG. 3 into HTML data using a style sheet, and displays it in the area W13 as shown in FIG. 29, for example.
[0164]
Using XSL, XML documents can be converted into various forms. It can be converted into an XML document with a different syntax, and an HTML page can be generated from the XML document.
[0165]
Similarly, a schema can be searched.
[0166]
For example, in the case of a search request “search for a schema having tag names“ patent ”and“ summary ”from documents having“ schema ”below“ uix: /// root ”as the first tag, As shown in FIG. 30, “root” is selected from a region W1 with a mouse or the like, and a structured document path is input as a search target range. Then, “#schema” is input as the top node. In addition, as a search condition, the contents of “include the character string“ patent ”in the attribute name of the component” and “include the character string“ summary ”in the attribute name of the component” are input in the data input area provided in advance. do it.
[0167]
Thereafter, by selecting a “search” button B21, a query describing the search request, for example, as shown in FIG. 31 is structured with an additional command for storing the query on the structured document database. Sent to the document management system.
[0168]
In the case of the above query, for example, a search is made that matches the condition of “having“ #schema ”as the first tag”. Therefore, using the element name occurrence index as shown in FIG. 9, the object ID of the (document object) of the node linked to the element “#schema” is obtained. Then, for each of them, the arc is traced downstream in the document object tree, and when the attribute name reaches an element of “patent” and “summary”, the document object tree having “#schema” as the first tag Extract Ot21. This document object tree Ot21 is a document that matches the contents of the query. Further, according to the request content of the query shown in FIG. 31, a structured document path to the top node of each document object tree Ot21 is obtained.
[0169]
If there are a plurality of document object trees Ot21, the search request processing unit 3 collects structured document paths to the respective top nodes, creates an XML document as a search result, and passes the search result processing unit 12 through the search result processing unit 12. The XML document is returned to the requesting client terminal together with the style sheet.
[0170]
In the client terminal, the XML document received as the search result is converted into HTML data using a style sheet, and displayed in the area W12 as shown in FIG. 26, for example.
[0171]
In the client terminal, when one schema in the search result is selected and displayed, for example, the “patent” information is displayed in the area W3 together with a screen for storing / deleting a document as shown in FIG. The data input area is set and displayed for each element.
[0172]
The user can easily create a stored document having a document structure defined by the schema by inputting data in the data input area.
[0173]
For example, when “patent DB” is selected in the area W1 using a mouse or the like as the storage destination of the “patent” information input in the area W3 in FIG. 32, the structured document path in the area W2 is “uix: /// root”. / Patent DB ”is displayed. Thereafter, when the “Register” button B1 is selected, an additional command “appendXML (“ uix: // root / patent DB ”,“ <patent>... </ Patent> ”)” is transmitted to the structured document management system. .
[0174]
As described above, in the structured document management system in FIG. 1, a large number of XML document groups (content documents, schema documents, query documents, etc.) having different document structures registered in the structured document database are displayed. 18. As shown in FIG. 19, it is handled as one large XML document in the form of a tree having a “root” tag at the head. Accordingly, it is possible to easily search for a document that matches the search condition from among a large number of documents having different schemas and different schemas.
[0175]
Further, since the query used for the search is also a structured document, an application that reuses a past query can be easily constructed by storing the query in the structured document database as a log.
[0176]
(Document structure search)
The configuration and processing operation for document structure (schema) search according to the embodiment of the present invention will be described below in addition to the basic configuration and processing operation of the structured document management system described above. .
[0177]
As illustrated in FIG. 1, the structured document management system 100 includes a schema search processing unit 303 and a template processing unit 306 in the data access unit 4 for performing a schema search, and further includes a template storage unit 404. And a semantic network storage unit 405.
[0178]
The template processing unit 306 creates a template tree representing the logical structure in order to manage the hierarchical logical structure of the structured document database (hereinafter also referred to as an XML database). This template tree is updated each time a new XML document is stored.
[0179]
The template tree created here is stored in the template storage unit 404.
[0180]
The client terminal 102 transmits a schema search request statement (query) to the structured document management system 100. This schema search request statement is received by the request receiving unit 11 of the structured document management system 100, and the schema search request statement is transferred to the schema search processing unit 303 from here.
[0181]
The schema search processing unit 303 is for searching a schema based on a schema search request sentence while referring to a semantic network stored in the semantic network storage unit 405 and a template stored in the template storage unit 404. .
[0182]
(1) Updating the template tree
First, a template tree update processing operation at the time of document storage in the template processing unit 306 will be described.
[0183]
As described above, when the document storage unit 21 executes the add command and registers the registration target XML document in the document storage unit 5, the document storage unit 21 stores the registration target XML document on the database where the registration target XML document is stored. And the information on the document structure of the XML document to be registered.
[0184]
FIG. 33 shows a configuration example of the template processing unit 306.
[0185]
The template processing unit 306 first extracts the structure information of the XML document such as the element name and attribute name of the component from the document structure information of the XML document to be registered in the structure extraction unit 306a. Based on this and the structured document path, the template tree processing unit 306b updates the template tree representing the logical structure in the XML database stored in the template storage unit 404.
[0186]
The template tree is obtained by extracting the document structure of the XML document stored in the XML database and forming a tree according to the hierarchical structure of the XML database. Each node (each component) is assigned with a template ID and stored. The As described above, the XML document to be registered is stored in the document storage unit 21 with these object IDs added to the respective constituent elements, but the template ID is also added and stored. ing. The element IDs and attribute names of all the constituent elements constituting the document structure of the XML document to be registered are assigned with this template ID and stored on the template tree.
[0187]
For example, consider a case where a template tree as shown in FIG. 34 is stored in the template storage unit 404 before the update. In this case, the state of the XML database is the same as in FIG. At this time, the XML document 601 as shown in FIG. 35A is registered in the XML database under “/ document DB / patent DB”, and the XML document 602 as shown in FIG. Consider the case of registering under “DB / employee DB”. Here, the expression “/ document DB / patent DB” is the same as the structured document path used when expressing the position of the component in the XML database, and here, the position of the component on the template tree. It is also used to express
[0188]
The template tree stores at least a logical structure including a document structure of each XML document stored in the XML database and a storage position on the hierarchical structure of the XML database.
[0189]
Here, the template ID given to the element name and attribute name of each component is the codes TID1 to TID13 assigned to the element name (tag name) and attribute name of each component in FIGS. Are the same.
[0190]
In this case, since all elements are new elements as nodes on the template tree, the template tree is updated as shown in FIG.
[0191]
Further, when a plurality of XML documents having the same document structure or part of the same document structure are stored in storage positions represented by the same structured document path, 2 in the template tree (logical structure). Constituent elements common to two or more XML documents are aggregated into one and expressed as one constituent element. In this case, it is necessary to manage the correspondence between the template ID of the component on the template tree and the object ID of each component on the XML database. For this purpose, for example, the template ID of each component and the object ID of the component in the XML document may be recorded on the template tree, or the correspondence between the template ID and the object ID is recorded. A separate table may be provided.
[0192]
In practice, the template tree is stored in the template storage unit 404 as an XML document as shown in FIG. This is referred to herein as a template tree document.
[0193]
As shown in FIG. 37, the template tree document is, for example, an XML document hierarchized with components having “xsp: Node” as the element name at the top. As described in the template tree document, when an XML document is registered in the XML database, “document” is used for the root node (element name of the first component) of the XML document to be registered. “Element” is added to the element name of each element other than that, and “attribute” is added to the element representing the attribute as the attribute value of the type attribute of “xsp: Node”.
[0194]
In the case of creating a folder, “folder” and “rootElement” are added as type attributes as the root of the XML database. Further, among the constituent elements in the XML document to be registered, the constituent elements that are registered each time are highly likely to be essential in the document structure, so record that they are essential with the attribute “required”. (If it is essential, the attribute value of the attribute is “yes”). In addition, simple schema extraction is performed in which one or more elements appear on the same document with no limit on the number of times (maxOccurs = “*”). It is also possible to write a candidate value (“dataType”) by performing a type estimation step. This is passed if a non-candidate value comes to this element.
[0195]
Further, the actual number of components (number of object IDs) aggregated into one component on the template tree may be described as a count attribute. Note that FIG. 37 shows only the attributes of count and type.
[0196]
When an add command is executed in the document storage unit 21 to register an XML document to be registered, an index corresponding to the XML document is created as described above.
[0197]
(2) Outline of schema search processing
The client terminal 102 transmits a schema search request statement to the structured document management system 100. This schema search request statement is received by the request receiving unit 11 of the structured document management system 100, and the schema search request statement (schema query) is passed from here to the schema search processing unit 303.
[0198]
FIG. 38 shows a configuration example of the schema search processing unit 303.
[0199]
The schema search processing unit 303 includes a schema query analysis unit 321, a schema query condition processing unit 322, and a schema query output processing unit 333.
[0200]
The schema query analysis unit 321 analyzes a search request statement in which a search condition for searching a schema is described, that is, a schema query. Examples of the query description language include XQuery. FIG. 39 shows a specific example of the schema query. In addition, since the schema search needs to create data by estimating the schema and perform the search, the schema query cannot be expressed by ordinary XQuery or the like.
[0201]
The schema query starts with a component having an “xsp: query” tag, and is mainly described in a component having a tag of “xsp: rerun” (hereinafter also simply referred to as a “return clause”). And a portion (hereinafter also simply referred to as a where clause) described by the components of the tag “xsp: where”.
[0202]
Since the “xsp: query” tag at the head is present, the request reception unit 11 can determine that the query is a schema query.
[0203]
In the component having the “xsp: return” tag, a character string (keyword) corresponding to the element name or attribute name of the first component of the document structure to be extracted is described. All elements in the “xsp: return” clause are “xsp: elem”. A plurality of candidates may be described here. For example, an element name and an attribute name that are assumed to be closely related are described with a name attribute. In the schema query shown in FIG. 39, “patent” and “document” are described.
[0204]
In this case, ambiguous fluctuations other than perfect matching are also considered. This is because a schema which is not described as a “patent” schema but is defined by “Patent”, for example, is similarly searched.
[0205]
As a means for absorbing this fluctuation, the semantic network storage unit 405 stores a semantic network as shown in FIG. As shown in FIG. 41, the semantic network is a graph representing the relationship between vocabularies, and weights (similarities) between vocabularies are added on the arc. For example, the similarity of “structured document” and “XML” is “0.8”. The numerical value representing the similarity takes a value from “0” to “1”.
[0206]
FIG. 42 shows an algorithm for calculating the similarity.
[0207]
Here, a case where a vocabulary similar to “XML” is obtained while calculating the similarity will be described with reference to the flowchart shown in FIG.
[0208]
Here, a threshold value of similarity that can be determined to be similar to the vocabulary character string “XML” is, for example, “0.6”. First, the position on the semantic network of “XML” is searched (step S201). The search position weight (similarity) is set to “1.0” (step S202). Thereafter, first, the current keyword is added to the search candidate list and the fixed candidate list (step S203).
[0209]
The vocabulary “structured document” and “markup language” similar to “XML” are extracted from the semantic network shown in FIG. 41, and the similarity is “0.8”. In this case, “0.8” is obtained by multiplying the weight “1.0” of the expanded vocabulary “XML” by the weight of each extracted vocabulary. The expansion source vocabulary “XML” is deleted from the search candidate list, and these two vocabularies are added (step S205).
[0210]
Since the similarity between the two vocabularies is “0.8”, it is also added to the fixed candidate list (steps S206 to S207).
[0211]
Next, when the “structured document” on the search candidate list is used as the expansion source and the semantic network shown in FIG. 41 is expanded by one stage, the similarity of the “structure document” is similar to “0” from the expansion source. .5 ”and the expansion source weight“ 0.8 ”are multiplied to obtain“ 0.4 ”. Since the threshold is set to “0.6” now, no further development is performed. By repeating the above operations, as a result, “XML” (1.0), “Markup Language” (0.8), “SGML” (0.64), “HTML” (0.64), “ The “semi-structured document” (0.64) will remain on the confirmed candidate list.
[0212]
In the schema query shown in FIG. 39, the threshold value is described as an attribute of “xsp: elem” in order to represent the threshold value of the similarity. That is, here, the attribute name “sim” is used to describe the attribute value of the sim attribute. If a threshold value is set by this attribute value, development on the semantic network for obtaining a vocabulary having a similarity degree equal to or less than the threshold value defined here can be suppressed. The threshold may be set when the user inputs a search condition, for example. However, the threshold is not limited to this, and a default value written in advance on the schema query may be used. Further, even if not described in the schema query, a value predetermined by the schema search processing unit 303 may be used.
[0213]
When searching the schema, you may not even know the extracted part. In this case, if “<xsp: return type =“ all ”/>” is described in the schema query, the schema search processing unit 303 automatically determines the root node of the document (that is, as described above). On the template tree, since the attribute value “document” is described in the first component of one XML document, the root node can be determined by checking this) The document structure starting from the root node can be taken out (pseudo schema is created) and returned.
[0214]
Returning to the description of the schema query in FIG. 39, a component having an “xsp: where” tag describes a character string (keyword) included in the element name or attribute name of the component as a search condition. In this section, the search conditions are described while leaving the ambiguous state.
[0215]
For example, “<xsp: elementtype =“ element ”/>” when the element name or attribute name is not known, and “<xsp: element type =“ word ”/> when the element value is unknown as an attribute value. > ”. In some cases, the element name, the attribute name, the element value, or the attribute value may not be known at all. In this case, “<xsp: elem type =“ all ”/>” is described.
[0216]
That is, when a certain character string is specified by the user, if it is used as a search condition for searching a schema having the element name (or may be an attribute value), “<xsp: element type =“ element ”/ > ”And when the search condition is used to search for a schema having the character string as an element value (or attribute value),“ <xsp: elem type = “word” /> ” When a search condition for searching a schema having a column in either one of element name (or attribute name) and element value (or attribute value) is used, “<xsp: elem type =“ all ”/>” Is described.
[0217]
The name representing the schema is described by the name attribute. Here, in the schema query shown in FIG. 40, it is possible to perform a search specifying “int” and an integer type in the dataType attribute or the like. Similarly, the closeness of expansion is described by sim.
[0218]
Next, a schematic processing flow of schema search in the schema search processing unit 303 will be described with reference to a flowchart shown in FIG.
[0219]
The schema query in the schema search processing unit 303 first performs a where clause process (step S301), then performs a return clause process (step S302), and then merges the processing results (step S303). Then, a schema estimation process is performed on the result, that is, a schema is extracted (step S304), a sort process based on the scoring process of each extracted schema is performed (step S305), and finally the output format is formatted. (Step S306), and returns the result.
[0220]
Next, the schema search will be described in more detail with a specific example.
[0221]
(3) Specific examples
The client terminal 102 displays a search condition input screen for schema search as shown in FIG. On this input screen, it is assumed that the user has input, for example, a natural sentence having the content “a schema in which an author is described in an XML-related patent” as a schema to be searched.
[0222]
In the client terminal 102, the input content is converted into a schema query as shown in FIG. 45 by natural sentence analysis, for example, and transmitted to the structured document management system 100.
[0223]
In this example, the user inputs a natural sentence for schema search. However, the present invention is not limited to this. For example, (Condition 1) What character string is an element name (or attribute value), element value ( Alternatively, it is not necessary to input a natural sentence as long as the contents include whether it is included as (attribute value) or (condition 2) what kind of document structure is desired to be extracted. In addition, separate input areas for inputting the conditions 1 and 2 may be provided. Alternatively, only condition 1 may be input. When the condition 1 is input, it is sufficient that at least one character string is input, and a plurality of character strings may be input while being separated by a comma or the like.
[0224]
The character string specified as condition 1 may be an element name of an element, an attribute name, an element value, or an attribute value. You may make it input from an input area, or provide only one input area and create a schema query by predetermining that the character string input there is any one of them. May be. Also, the character string input as condition 2 may be an element name of an element or an attribute name. These may be input from separate input areas, or one input Only a region may be provided, and a character string input therein may be determined in advance as being one of these, and a schema query may be created.
[0225]
Moreover, only condition 1 may be sufficient, and only condition 2 may be sufficient.
[0226]
In the client terminal 102, a plurality of types of schema query templates that can be completed by substituting the character strings corresponding to the conditions 1 and 2 (for example, the schema query and the condition 2 when the conditions 1 and 2 are specified) Schema query when only one is specified, schema query when multiple character strings are specified in condition 2, etc.), and select one of them according to the input (specified) condition Then, a schema query may be created by substituting a character string corresponding to condition 1 or condition 2 into the blank part.
[0227]
Further, the client terminal 102 may transmit the character string or natural sentence input by the user corresponding to the above condition 1 or 2 as a search request to the structured document management system as it is. In this case, the schema query may be generated in the request receiving unit 11 of the structured document management system that has received such a search request. The same applies to the case where the request reception unit 11 creates a schema query.
[0228]
In the case of the input content shown in FIG. 44, the character strings corresponding to condition 1 are “XML” and “book”, the former is a character string included in the element value, for example, and the latter is, for example, an element name or attribute It is a character string included in the name. Further, the character string corresponding to the condition 2 is “patent”, and for example, it is determined that the character string is included in the element name, and as a result, a schema query as shown in FIG. 45 is created.
[0229]
The schema query is passed to the schema search processing unit 303 via the request reception unit 11 of the structured document management system 100. Alternatively, it is created by the request receiving unit 11 and passed to the schema search processing unit 303.
[0230]
First, the schema query analysis unit 321 analyzes the where section of the schema query (step S301 in FIG. 43). This processing operation will be described with reference to the flowchart shown in FIG.
[0231]
In the “where” section, a character string corresponding to the condition 1 describes a component of an element name (tag name) “xsp: elem” one by one. When representing a character string (for example, “book” in this case) included in the element name of the component (or one of the element name and attribute name), “type =“ element ” "" Is specified. When a character string (for example, “XML” in this case) included in the element value (or any one of the element value and the attribute value) of the constituent element is represented, “type = “Word” is designated. Also, it is included in either the element name of the component (or one of the element name and attribute name) and the element value of the component (or one of element value and attribute value) When representing a character string, “type =“ all ”” is designated for the character string.
[0232]
First, components in the where clause are taken out one by one (step S401), and it is checked whether each element is one of the above (steps S402 to S404).
[0233]
In the case of the schema query shown in FIG. 45, since the first element describes “type =“ element ”” for the character string “author” (step S402), the process proceeds to step S405. Here, a process of searching for a component having a character string of “book” and a character string of a vocabulary similar to this as an element name (matching or including the element name) is performed (structure estimation process).
[0234]
In the second element, since “type =“ word ”” is described for the character string “XML” (step S403), the process proceeds to step S406. For example, here, “XML” is used. And a component having a character string of a vocabulary similar to this as an element value (matching the element value or included in the element value) is searched (vocabulary estimation processing).
[0235]
If there is a character string described as “type =“ all ”” as a component in the where clause (step S404), the character string and the character string are added to the character string in the same manner as in steps S405 and S406. Processing for searching for a component having a similar character string as an element name or element value is performed (steps S407 and S408).
[0236]
The processes in steps S401 to S408 are repeated for all the components in the where clause.
[0237]
Here, taking the case where the character string to be processed is “author” as an example, the structure estimation processing in steps S405 and S407 will be described with reference to the flowchart shown in FIG.
[0238]
First, a synonym of “book” is extracted using a semantic network (step S411). Here, since the similarity threshold value is not specified (the sim attribute is not described), the network is expanded until it becomes equal to or less than a predetermined threshold value (here, set to “0.6”). . In the case of the semantic network shown in FIG. 41, “author” (similarity is “1.0”), “author” (similarity is “0.8” × “0.8”), “name” (similarity) The degree is “0.7”).
[0239]
Next, the element name occurrence index stored in the index storage unit 6 is searched in the same manner as in the document search described above, and each of the character string to be processed and the extracted similar word is changed to the element name. Is acquired, and further, for example, based on the description on the table or template tree as described above, the template ID corresponding to each of the acquired object IDs is acquired (step S412). .
[0240]
Then, an evaluation value (first evaluation value) is obtained for each template ID (step S413). The first evaluation value may be anything as long as it evaluates how much the component corresponding to the acquired template ID is similar to the character string (vocabulary) specified as the search condition.
[0241]
For example, when the current XML database is in a state as shown in FIG. 46, the template IDs acquired in step S412 are “TID7”, “TID15”, and “TID57”, and these evaluation values are For example, by using the vocabulary similarity included in the element name as it is, for example, the evaluation value of “TID7” is “1.0”, the evaluation value of “TID15” is “0.7”, and “TID57 The evaluation value is “0.64”. Each template ID and its evaluation value are recorded in the list L1. At this time, for each of the acquired template IDs, the object ID corresponding to the template ID and the number thereof are also recorded in the list L1.
[0242]
Next, taking the case where the character string to be processed is “XML” as an example, the vocabulary estimation processing in steps S406 and S408 will be described with reference to the flowchart shown in FIG.
[0243]
First, a similar word “XML” is extracted using a semantic network (step S421). In this case, “XML” (similarity “1.0”), “SGML” (similarity “0.72”), and “structured document” (similarity “0.81”) are obtained (step S421). .
[0244]
Next, in the same manner as in the above-described document search, the data occurrence index stored in the index storage unit 6 is searched, and each character string to be processed and each vocabulary of the extracted similar words are searched. The object ID of the constituent element included in the element value is acquired, and further, for example, based on the description on the table or template tree as described above, the template ID corresponding to each of the acquired object IDs is acquired (step S422).
[0245]
Then, an evaluation value (second evaluation value) is obtained for each template ID (step S423). This second evaluation value indicates how similar the component corresponding to the acquired template ID is to the character string (vocabulary) specified as the search condition, and the character string (vocabulary) specified as the search condition. As long as it is a component that evaluates how many of the above and similar words are included, it may be anything.
[0246]
The component corresponding to each acquired template ID may have some or all of the plurality of vocabularies as element values. In addition, a plurality of object IDs of components corresponding to the acquired template ID may be acquired from the data occurrence index.
[0247]
Here, for example, for each acquired template ID, the evaluation value is given based on which vocabulary of the plurality of vocabularies includes the element value corresponding to the component ID of the template ID. Alternatively, the number of object IDs (obtained from the data occurrence index) corresponding to each template ID may be obtained by multiplying the lexical similarity.
[0248]
For example, when the current XML database is in a state as shown in FIG. 46, in step S422, a component (template ID “TID6”) having an element name “title”, and “TID17” and “TID58” are also added. Template ID is obtained.
[0249]
The component “title” of the template ID “TID6” is searched from the vocabulary “XML” (similarity is “1.0”) and the vocabulary “SGML” (similarity is “0.72”). Therefore, for example, the similarity of these vocabularies is added to give 1 + 0.72 = 1.72 as the evaluation value. For example, if the number of object IDs searched with the vocabulary “XML” is 100 and the number of object IDs searched with the vocabulary “SGML” is 50, 1 × 100 + 0.72 × 50 = 136 It may be an evaluation value. In the following description, the calculation of the evaluation value is assumed to be the former example for simplicity of description.
[0250]
Since the component of the template ID “TID17” is searched only from the vocabulary “XML”, the similarity “1.0” of this vocabulary is given as an evaluation value.
[0251]
Since the component of the template ID “TID58” is searched only from the vocabulary “XML”, the similarity “1.0” of this vocabulary is given as an evaluation value.
[0252]
Each template ID and its evaluation value (second evaluation value) are recorded in the list L2. At this time, for each of the acquired template IDs, the object ID corresponding to the template ID and the number thereof are also recorded in the list L2.
[0253]
The following template ID is obtained from the processing of the where clause. In the parentheses, the second evaluation value is indicated by a number starting from “D”, and the first evaluation value is indicated by a number starting from “S”.
[0254]
{TID6 (D1.72), TID7 (S1.0), TID15 (S1.0), TID17 (D1.0), TID57 (S0.64), TID58 (D1.0)}
Next, the schema query analysis unit 321 analyzes the return clause of the schema query (step S302 in FIG. 43). This processing operation will be described with reference to the flowchart shown in FIG.
[0255]
In the return section, the element name and attribute name of the first component of the document structure to be extracted are described one by one in the component of the element name (tag name) “xsp: elem”. In the schema query shown in FIG. 45, “patent” is designated as the character string included in the element name.
[0256]
First, elements (components having an element name “xsp: elem”) are extracted one by one from the return clause (step S431), and a character string described in the element, for example, “patent” in this case, is processed. As a character string, structure estimation processing is performed as shown in FIG. 55 (step S432). The above steps S431 to S432 are performed for all elements described in the return clause (step S433).
[0257]
In the structure estimation process, similar words to those described above are first extracted using the semantic network.
[0258]
In this case, “patent” (similarity “1.0”) and “patent” (similarity “0.8”) are extracted.
[0259]
For example, when the current XML database is in a state as shown in FIG. 46, when a component having one of the two vocabularies as an element name is obtained from the element name occurrence index, the following three template IDs are obtained. can get.
[0260]
{TID4 (S1.0), TID55 (S0.8), TID72 (S1.0)} In FIG. 46, components (nodes) corresponding to the three template IDs are circled.
[0261]
Next, the process of step S303 in FIG. 43 is performed. That is, the component that is the head of the document structure of one XML document is extracted from the template tree from the component obtained as a result of processing the where clause and the component obtained as a result of processing the return clause. Specifically, the parent-child relationship on the template tree between the component extracted by the process of the return clause and the component extracted by the process of the where clause is checked.
[0262]
The component extracted by the process of the where clause is a component downstream of the document structure, and the component extracted by the process of the return clause is the first component of the document structure.
[0263]
For example, if the component extracted by the process of the where clause exists below the node corresponding to the component extracted by the process of the return clause, the component extracted by the process of the return clause is extracted. The candidate is registered in the output candidate list as a candidate for the first component of the document structure to be processed.
[0264]
Hereinafter, a case where the XML database is in a state as shown in FIG. 46 will be described as an example. In this case, the structure of the template tree is the same as that in FIG. However, as shown in FIG. 46, vocabularies such as “XML” and “SGML” are not included in the template tree. Also, in FIG. 46, the attributes of the constituent elements are shown surrounded by double rectangles.
[0265]
First, the template tree is searched upstream from the components on the downstream side to check the parent-child relationship.
[0266]
For example, the parent element of the constituent element of the template ID “TID6” (the constituent element in the hierarchy one level above and including the constituent element of the template ID “TID6”) is the configuration of the template ID “TID4”. Is an element. Since the constituent element of the template ID “TID4” is the constituent element extracted by the process of the return clause, the template ID “TID4” is added to the output candidate list at this time.
[0267]
Subsequently, with respect to the constituent element of the template ID “TID7”, the template ID “TID4” is also the parent element as described above. Since the template ID “TID4” has already been registered in the output candidate list, the process proceeds to the next.
[0268]
The parent element of the template ID “TID15” is a constituent element of the template ID “TID14”, but this is not a constituent element extracted by the process of the return clause, and therefore goes back further upstream. There is “TID13” in the hierarchy one level above “TID14”, “TID12” in the hierarchy one level above, and “TID1” in the hierarchy one level above. Since none of these is a component extracted by the processing of the return clause, the template ID “TID15” is excluded from the schema search.
[0269]
Similarly, the template ID “TID17” is also excluded.
[0270]
Each of the template ID “TID57” and the template ID “TID58” has a template ID “TID55” on the upstream side, and this is a component extracted by the process of the return clause, so that the template ID “TID55” is output to the output candidate list. Register with.
[0271]
At this time, “TID4” and “TID55” are registered in the output candidate list.
[0272]
Next, the template tree is searched from upstream to downstream to check the parent-child relationship.
[0273]
The template IDs extracted for the processing of the return clause were “TID4”, “TID55”, and “TID72”. Of these, “TID4” and “TID55” were already registered in the output candidate list. . Therefore, for example, the remaining “TID 72” is additionally registered in the output candidate list. Of course, in this case, “TID 72” may not be registered in the output candidate list.
[0274]
At this time, “TID4”, “TID55”, and “TID72” are registered in the output candidate list.
[0275]
Next, a component group to be extracted is extracted from the document structure starting with the previously extracted component by the schema estimation process in step S304 of FIG.
[0276]
As shown in FIG. 46, the constituent elements constituting the document structure starting with “TID4” are {TID4 (S1.0), TID5, TID6 (D1.72), TID7 (S1.0), TID8, TID9, TID10, TID11} (see FIG. 47).
[0277]
First, based on the information described in the template tree as shown in FIG. 37 (for example, the value of the attribute “required”), the document structure starting with “TID4” is constructed from these components. Select the components that are absolutely necessary to do this.
[0278]
Among the above components, those designated as essential for constructing the document structure starting with “TID4” on the template tree (that is, a configuration in which the attribute value “required” is “yes”) Elements) are “TID5”, “TID6”, “TID7”, and “TID8”, so that a document structure (schema) including these components can be obtained as one of the search results.
[0279]
FIG. 48 shows a schema document (XML document) when the document structure is described in XMLSCHEMA. <Xsd: sequence> is added to this document.
[0280]
Similarly, the constituent elements constituting the document structure starting with “TID55” are {TID55, TID56, TID57, TID58} (see FIG. 49). All of these components are designated as essential for constructing the document structure starting with “TID55” on the template tree, so that the document structure (schema) consisting of the above component group is the other search result. One can be obtained.
[0281]
FIG. 50 shows a schema document (XML document) when the document structure is described in XMLSCHEMA.
[0282]
Similarly, a group of components constituting the document structure starting with “TID72” is {TID72, TID73, TID74, TID75} (see FIG. 51). Since all these components are designated as essential for constructing the document structure starting with “TID72” on the template tree, the document structure (schema) consisting of the above-described component group is the other search result. It can be obtained as one of the following. In the template tree as shown in FIG. 37, for the constituent element of “TID75”, information defining the numerical type, that is, “dataType” is described. Numeric type schema is set.
[0283]
In this manner, when the top component of the document structure is obtained in step S303 of FIG. 43, in step S304, a group of components constituting the document structure starting with the component is extracted from the template tree. At this time, as described above, the component to be extracted may be selected based on the description of each component described in the template tree, or the document structure may be configured without selection. You may extract all the components to do.
[0284]
Further, the extracted document structure is converted into an XML document, that is, a schema document as shown in FIGS. When converting to this schema document, the attribute (for example, numeric type) of each component is described based on the information described for the component on the template tree.
[0285]
As described above, the template tree describes all the information used when searching the schema and creating the schema document as an XML document as shown in FIG.
[0286]
Next, the process proceeds to step S305 in FIG. 43, and an evaluation score (score) is calculated for each schema obtained as a search result.
[0287]
For example, when the constituent element group constituting the schema starting from the constituent element of the template ID “TID4” obtained as a search result is shown together with the first evaluation value (S) and the second evaluation value (D). , {TID4 (S1.0), TID5, TID6 (D1.72), TID7 (S1.0), TID8, TID9, TID10, TID11}. The evaluation point of this schema is the sum of the first evaluation value and the second evaluation value given to each component, and is S1.0 + S1.0 + D1.72 = 3.72.
[0288]
Here, when calculating the sum, weights may be set for the first evaluation value and the second evaluation value, respectively. In the case of the above example, the weight is calculated as “1” for each of the first evaluation value and the second evaluation value.
[0289]
Moreover, when the component group which comprises the schema which begins with the component of template ID "TID55" obtained as a search result is shown with the 1st evaluation value (S) and the 2nd evaluation value (D), For example, it is assumed that {TID55 (S0.8), TID56, TID57 (S1.0), TID58}. The evaluation score of this schema is S0.8 + S1.0 = 1.8 when calculated in the same manner as described above.
[0290]
Furthermore, when the constituent element group constituting the schema starting from the constituent element of the template ID “TID72” obtained as a search result is shown together with the first evaluation value (S) and the second evaluation value (D). , {TID72 (S1.0), TID73, TID74, TID75}. The evaluation score of this schema is “1.0” when calculated in the same manner as described above.
[0291]
Next, the process proceeds to step S306 in FIG. 43 to generate output data.
[0292]
Here, for example, in step S304, the evaluation score obtained in step S305 is written in the schema document of each schema extracted as a search result, and the schema document is collected as one XML document, for example, in FIG. Create the output data as shown. The XML document shown in FIG. 52 is for arranging and displaying schema documents in descending order of evaluation score.
[0293]
The output data (search result document) as shown in FIG. 52 created by the schema search processing unit 303 (along with a style sheet for displaying the search result document as necessary) is output from the result processing unit 12. Are transmitted to the client terminal 102.
[0294]
When the client terminal 102 receives the search result document shown in FIG. 52, the client terminal 102 displays the search result document using the style sheet sent (or predetermined) together with the search result document. The schema selected by the user is displayed using a style sheet sent together with the search result document (or predetermined). FIG. 53 shows a display example of the schema obtained as a search result. The first schema in the search result document shown in FIG. 52 (document structure starting with the component of template ID “TID4”). A display example is shown.
[0295]
In the display example shown in FIG. 53, an input area is provided so as to be an input form as it is.
[0296]
Note that the storage position (structured document path) of the XML database having the schema obtained as a search result on the hierarchical structure of the XML database is the same as the position of the schema on the template tree. When a new XML document created by inputting data from the input form shown is stored in the XML database, the structured document path may be used to specify a path for an insert command or an additional command. Therefore, the user can store the new XML document in an appropriate storage position on the XML database without wondering where to store the newly created XML document.
[0297]
In this way, when a new XML document is created using the search result of the document structure, XML documents that are similar in content (belonging to the same category) have almost the same document structure (to prevent schema overflow). In addition, since the user does not bother to specify the storage location on the XML database, XML documents that are similar in content (belonging to the same category) can be easily managed on the XML database. (For example, in FIG. 46, if a document starts with a component having the element name “patent” in FIG. 46, all of them are stored under the “patent DB” node).
[0298]
Next, on the search condition input screen for schema search, the user selects the above-mentioned (condition 1), for example, “XML-related schema”, that is, the element name, element value, or attribute value as the schema to be searched. Suppose that you enter a search condition that specifies only the character string included in. In this case, there is only a vague request at the keyword level.
[0299]
When such a search condition is input, the client terminal 102 or the request reception unit 11 of the structured document management system searches, for example, a search request statement for searching a document structure including the character string “XML” in the element value. Assume that (schema query) is created.
[0300]
This schema query is processed in the same manner as described above by the schema search processing unit 303 of the structured document management system having the XML database as shown in FIG. In the processing of the where clause, “TID6”, “TID17”, “TID6” are used as template IDs of components having element values of “XML” and a character string (for example, “SGML”) representing a vocabulary similar thereto. TID58 "is extracted by the vocabulary estimation process. Since the similarity of “XML” is “1.0” and the similarity of “SGML” is “0.64”, when these extracted components are shown together with their evaluation values, {TID6 (D1 .67), TID17 (D1.0), TID58 (D1.0)}.
[0301]
Next, the process of the return clause is performed. In this case, there is no condition specified by the user as described in the return clause. In this case, in the return clause of the schema query, for example, “<xsp: return type =“ all ”/>” is described, so the schema search processing unit 303 determines the root node of the document on the template tree. (In other words, as described above, since the attribute value “document” is described in the top component of one XML document on the template tree, the root node can be determined by checking this attribute value. The document structure starting from the root node from the template tree and including any of the components (“TID6”, “TID17”, “TID58”) extracted by processing the where clause The document structure will be extracted.
[0302]
That is, in this case, the process proceeds to step S303 in FIG. First, the component of the template ID “TID6” is traced back to the upstream to reach “TID4” (see FIG. 46). For this component, the description of the template tree as shown in FIG. 37 is checked. Then, since “<xsp: Node type =“ document ”>” is described in this component, the document structure starting with “TID4” is set as an extraction candidate. That is, “TID4” is registered in the output candidate list.
[0303]
Similarly, “TID14” and “TID5” 8 are also added to the output candidate list.
[0304]
In other words, at this point, the document structure to be extracted is
(1) {TID4, TID5, TID6, TID7, TID8, TID9, TID10, TID11}
(2) {TID14, TID15, TID16, TID17}
(3) {TID55, TID56, TID57, TID58}
There are three document structures.
[0305]
Of the components constituting the above three document structures, only the essential components are selected based on the description of the template tree, and the component group (schema) to be extracted is extracted (FIG. 43). Step S304).
[0306]
Further, an evaluation score is obtained for each schema obtained as a search result (step S305 in FIG. 43), and output data is created.
[0307]
As described above, when a schema is set in advance for the retrieved schema (when it is a schema of a document described according to a predetermined schema), a schema document describing the schema is changed. You may search from an XML database and use it as a schema for search results.
[0308]
Further, schema information may be additionally notified to the client together with the data for the search result by XQuery or the like. The result of searching with XQuery is only data, and there is a part where the structure is difficult to see, but it is possible to complement it. In addition, by describing the cumulative counts for the template elements as the result information, browsing them makes it easy to grasp the paths in the database and their frequencies at a glance.
[0309]
Further, the access authority may be set for each component on the template tree. For example, it is assumed that there are a department A and a department B, and XML documents in the respective jurisdiction ranges are stored in a predetermined area on the XML database. In this case, the department B cannot access the jurisdiction document of the department A, but the document B may be set with an access authority such as publishing if only the schema is available. By publishing the schema, for example, when application linkage in department A and department B is performed later, cost reduction can be achieved without absorbing the difference between the schemas.
[0310]
Also, when trying to store various documents in the XML database, it is often difficult to know where this data is suitable for storage, and it is often only temporarily stored in an appropriate location. In that case, the information is often buried. Under the management of the XML database, they are managed on the server side and are represented as one XML tree. Therefore, a guideline indicating where to store the document to be stored is also provided. Furthermore, the storage location does not have to be a folder and may be a partial document. Therefore, it is possible to reduce schema flooding as much as possible.
[0311]
As described above, according to the above-described embodiment, a desired schema and a position in the XML database from which the schema is extracted from an ambiguous condition whose structure and vocabulary are not determined are determined from the XML database having a hierarchical structure. It is possible to easily search with or without an explicit definition of.
[0312]
【The invention's effect】
As described above, according to the present invention, a document structure can be efficiently searched based on a vague search condition from an XML database having a hierarchical structure.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration example of a structured document management system according to an embodiment of the present invention.
FIG. 2 is a diagram showing a usage form of the structured document management system shown in FIG. 1, and shows a case where the structured document management system is operating on the back end of the WWW.
FIG. 3 is a diagram showing an example of a structured document described in XML.
4 is a diagram schematically showing the document structure of the structured document in FIG. 3;
FIG. 5 is a diagram for explaining the function of an additional command, and shows a case where the additional command is executed in the initial state of the structured document database.
6 is a view showing a processing result when an acquisition command is executed on the structured document database in the state shown in FIG.
FIG. 7 shows a case where a document object tree of one “patent” information is added to the structured document database in the state shown in FIG. 5B by executing an add command.
FIG. 8 shows a case where a document object tree of three “patent” information is added to the structured document database in the state shown in FIG. 5B by executing an add command.
FIG. 9 is a diagram showing a storage example of an element name occurrence index.
FIG. 10 is a diagram showing a storage example of a data occurrence index.
11 is a diagram showing an execution result when an acquisition command for extracting three pieces of “patent” information is executed on the structured document database in the state shown in FIG. 8. FIG.
FIG. 12 is a diagram showing an example of a schema that defines the document structure of an XML document.
13 is a diagram showing a case where a schema storage command is executed in the structured document database in the state shown in FIG. 8 and the schema shown in FIG. 12 is additionally stored (set).
FIG. 14 is a diagram showing a document object tree in which a schema is set and an attribute value indicating that the schema exists is set.
FIG. 15 is a diagram conceptually illustrating a state in which attribute values indicating that a schema exists are stored in each object file.
FIG. 16 is a diagram showing an example in which a conceptual hierarchy used in a search is expressed as a structured document as necessary.
FIG. 17 is a diagram showing an example in which a conceptual hierarchy used in a search is expressed as a structured document as necessary.
18 is a diagram showing a case where a document object tree of “concept” information shown in FIGS. 16 and 17 is added to the structured document database in the state shown in FIG. 8 by executing an add command.
19 is a diagram showing a case where a document object tree of “concept” information shown in FIGS. 16 and 17 is added to the structured document database in the state shown in FIG. 8 by executing an add command.
FIG. 20 is a diagram showing an example of a query (XML document).
FIG. 21 is a diagram showing an example of a simple search query (XML document).
FIG. 22 is a diagram showing search results (XML document) using the simple search query of FIG. 21;
FIG. 23 is a diagram showing an example of a concept search query (XML document).
24 is a flowchart for explaining the document search processing operation of the structured document management system in FIG. 1. FIG.
FIG. 25 is a diagram showing a display example of a screen as a user interface.
FIG. 26 is a diagram showing a display example of a screen as a user interface for performing a document search.
FIG. 27 is a diagram showing a query created based on information input from the screen shown in FIG.
FIG. 28 is a flowchart for explaining the document acquisition processing operation of the structured document management system of FIG. 1;
FIG. 29 is a diagram showing a display example of a structured document obtained as a result of executing a document acquisition command.
FIG. 30 is a display example of a screen as a user interface for performing a document search, for explaining a schema search processing operation;
FIG. 31 is a diagram showing an example of a schema search query.
FIG. 32 shows a display example of a screen as a user interface for acquiring a schema, and shows a display example of the acquired schema.
FIG. 33 is a diagram illustrating a configuration example of a template processing unit.
FIG. 34 is a diagram showing an example of a template tree.
FIG. 35 is a diagram showing a specific example of an XML document.
36 is a diagram showing the template tree shown in FIG. 34 after being updated.
FIG. 37 is a diagram showing a storage example of a template tree.
FIG. 38 is a diagram showing a configuration example of a schema search processing unit 303.
FIG. 39 is a diagram showing an example of a schema query.
FIG. 40 is a diagram showing another example of a schema query.
FIG. 41 is a diagram showing a specific example of a semantic network.
FIG. 42 is a flowchart for explaining processing for obtaining a similar word of a keyword specified as a search condition using a semantic network.
FIG. 43 is a flowchart for explaining the processing operation of the schema search processing unit.
FIG. 44 is a diagram showing a display example of a search condition input screen for schema search.
45 is a diagram showing an example of a schema query created based on a search condition input from the input screen shown in FIG. 44.
FIG. 46 is a diagram showing a specific example of a template tree.
FIG. 47 is a diagram showing a document structure obtained as a result of search.
48 shows an example of an XML document describing the document structure shown in FIG. 47. FIG.
FIG. 49 shows another document structure obtained as a result of the search.
50 is a diagram showing an example of an XML document describing the document structure shown in FIG. 49. FIG.
FIG. 51 is a diagram showing still another document structure obtained as a result of the search.
FIG. 52 is a diagram showing an example of output data.
FIG. 53 is a diagram showing a display example of a schema obtained as a search result.
FIG. 54 is a flowchart for explaining a processing procedure of a where clause in a schema query.
FIG. 55 is a flowchart for explaining structure estimation processing;
FIG. 56 is a flowchart for explaining vocabulary estimation processing;
FIG. 57 is a flowchart for explaining the processing procedure of a return clause in a schema query.
[Explanation of symbols]
100 ... structured document management system
303 ... Schema search processing unit
306 ... Template processing unit
306a ... Structure extraction unit
306b ... Template tree processing unit
321 ... Schema query analysis unit
322 ... Schema query condition processing unit
323 ... Schema query output processing unit
404 ... Template storage unit
405 ... Meaning network storage unit

Claims (15)

階層構造を有するデータベースに記憶されている複数の構造化文書のそれぞれの文書構造と前記階層構造上の格納位置とを含む論理構造上に、前記階層構造上の同じ格納位置に格納される、文書構造が同一あるいは一部が同一の複数の構造化文書で共通する構成要素を1つに集約して1つの構成要素として表したテンプレートツリーを記憶する記憶手段と、
前記データベースに記憶されている複数の構造化文書の異なる文書構造の中から所望の文書構造を検索するための処理を行う処理手段と、
を備えた文書構造検索装置における文書構造検索方法であって、
前記処理手段が、前記文書構造を検索するための検索条件として入力されたキーワードの類似語を求めるステップと、
前記処理手段が、前記異なる文書構造のそれぞれを構成する各構成要素で構成された前記階層構造から前記キーワードと前記類似語のうちのいずれかを要素名あるいは要素値に含む構成要素を検索するステップと、
前記処理手段が、検索された構成要素を基点として、前記テンプレートツリーを上流に辿っていくことで、該検索された構成要素を含む文書構造の先頭の構成要素を検出し、前記テンプレートツリーから、該検出された構成要素を先頭とする該文書構造を抽出する抽出ステップと、
前記処理手段が、抽出された文書構造を検索結果として出力する出力ステップと、
を含む文書構造検索方法。
Documents stored in the same storage location on the hierarchical structure on a logical structure including each document structure of a plurality of structured documents stored in a database having a hierarchical structure and a storage location on the hierarchical structure Storage means for storing a template tree in which constituent elements common to a plurality of structured documents having the same structure or a part of the same are aggregated into one and expressed as one constituent element;
Processing means for performing processing for retrieving a desired document structure from different document structures of a plurality of structured documents stored in the database;
A document structure search method in a document structure search apparatus comprising:
A step of obtaining a similar word of a keyword input as a search condition for the processing means to search the document structure;
The processing means for searching for a constituent element including any one of the keyword and the similar word in an element name or an element value from the hierarchical structure composed of the constituent elements constituting the different document structures; When,
The processing means detects the first component of the document structure including the searched component by tracing the template tree upstream from the searched component, and from the template tree, An extraction step of extracting the document structure starting from the detected component ;
An output step in which the processing means outputs the extracted document structure as a search result;
Document structure search method including
前記テンプレートツリーには、前記複数の構造化文書のそれぞれに対応する文書構造の先頭の構成要素に対し、当該構成要素が先頭の構成要素であることを表す第1の属性情報が付加されており、
前記抽出ステップは、前記第1の属性情報に基づき、前記テンプレートツリーから前記検索結果としての文書構造を抽出することを特徴とする請求項記載の文書構造検索方法。
In the template tree , first attribute information indicating that the constituent element is the first constituent element is added to the first constituent element of the document structure corresponding to each of the plurality of structured documents. ,
The extraction step is based on it said first attribute information, document structure search method according to claim 1, wherein the extracting the document structure as the search result from the template tree.
前記テンプレートツリーには、前記複数の構造化文書のそれぞれに対応する文書構造を構成する構成要素のうち当該文書構造に必須の構成要素に対し、当該構成要素が必須の構成要素であることを表す第2の属性情報が付加されており、
前記抽出ステップは、前記第2の属性情報に基づき、前記テンプレートツリーから前記必須の構成要素からなる文書構造を抽出することを特徴とする請求項記載の文書構造検索方法。
The template tree indicates that the constituent element is an essential constituent element with respect to the constituent elements essential to the document structure among the constituent elements constituting the document structure corresponding to each of the plurality of structured documents. Second attribute information is added,
The extraction step is based on said second attribute information, document structure search method according to claim 1, wherein the extracting the document structure comprising the essential components from the template tree.
前記処理手段が、前記検索された構成要素の要素名あるいは要素値と前記キーワードとの類似度に基づき、前記抽出ステップで抽出された文書構造の評価値を求めるステップをさらに含み、
前記出力ステップは、前記評価値とともに、前記抽出された文書構造を前記検索結果として出力することを特徴とする請求項1記載の文書構造検索方法。
The processing means further includes a step of obtaining an evaluation value of the document structure extracted in the extraction step based on the similarity between the keyword and the element name or element value of the searched component ,
2. The document structure search method according to claim 1 , wherein the output step outputs the extracted document structure as the search result together with the evaluation value.
階層構造を有するデータベースに記憶されている複数の構造化文書のそれぞれの文書構造と前記階層構造上の格納位置とを含む論理構造上に、前記階層構造上の同じ格納位置に格納される、文書構造が同一あるいは一部が同一の複数の構造化文書で共通する構成要素を1つに集約して1つの構成要素として表したテンプレートツリーを記憶する記憶手段と、
前記データベースに記憶されている複数の構造化文書の異なる文書構造の中から所望の文書構造を検索するための処理を行う処理手段と、
を備えた文書構造検索装置における文書構造検索方法であって、
前記処理手段が、前記文書構造を検索するための検索条件として入力された第1のキーワード及び第2のキーワードの類似語を求めるステップと、
前記処理手段が、前記異なる文書構造のそれぞれを構成する各構成要素で構成された前記階層構造から前記第1のキーワードとその類似語のうちのいずれかを要素名あるいは要素値に含む第1の構成要素を検索する第1の検索ステップと、
前記処理手段が、前記階層構造から前記第2のキーワードとその類似語のうちのいずれかを要素名に含む第2の構成要素を検索する第2の検索ステップと、
前記処理手段が、前記第1の構成要素を基点として、前記テンプレートツリーを上流に辿っていくことで前記第2の構成要素に至るとき、前記テンプレートツリーから当該第2の構成要素を先頭とする文書構造を抽出する抽出ステップと、
前記処理手段が、抽出された文書構造を検索結果として出力する出力ステップと、
を含む文書構造検索方法。
Documents stored in the same storage location on the hierarchical structure on a logical structure including each document structure of a plurality of structured documents stored in a database having a hierarchical structure and a storage location on the hierarchical structure Storage means for storing a template tree in which constituent elements common to a plurality of structured documents having the same structure or a part of the same are aggregated into one and expressed as one constituent element;
Processing means for performing processing for retrieving a desired document structure from different document structures of a plurality of structured documents stored in the database;
A document structure search method in a document structure search apparatus comprising:
The processing means obtaining a similar word of the first keyword and the second keyword input as a search condition for searching the document structure;
The processing means includes a first name including one of the first keyword and its similar word in an element name or an element value from the hierarchical structure configured by each component configuring each of the different document structures . A first search step for searching for a component ;
A second search step in which the processing means searches for a second component that includes any one of the second keyword and its similar words in the element name from the hierarchical structure ;
When the processing means reaches the second component element by tracing the template tree upstream from the first component element, the second component element starts from the template tree. An extraction step for extracting the document structure ;
An output step in which the processing means outputs the extracted document structure as a search result;
Document structure search method including
前記テンプレートツリーには、前記複数の構造化文書のそれぞれに対応する文書構造の先頭の構成要素に対し、当該構成要素が先頭の構成要素であることを表す第1の属性情報が付加されており、
前記抽出ステップは、前記第1の属性情報に基づき、前記テンプレートツリーから前記検索結果としての文書構造を抽出することを特徴とする請求項記載の文書構造検索方法。
In the template tree , first attribute information indicating that the constituent element is the first constituent element is added to the first constituent element of the document structure corresponding to each of the plurality of structured documents. ,
6. The document structure search method according to claim 5 , wherein the extraction step extracts a document structure as the search result from the template tree based on the first attribute information.
前記テンプレートツリーには、前記複数の構造化文書のそれぞれに対応する文書構造を構成する構成要素のうち当該文書構造に必須の構成要素に対し、当該構成要素が必須の構成要素であることを表す第2の属性情報が付加されており、
前記抽出ステップは、前記第2の属性情報に基づき、前記テンプレートツリーから前記必須の構成要素からなる文書構造を抽出することを特徴とする請求項記載の文書構造検索方法。
The template tree indicates that the constituent element is an essential constituent element with respect to the constituent elements essential to the document structure among the constituent elements constituting the document structure corresponding to each of the plurality of structured documents. Second attribute information is added,
6. The document structure search method according to claim 5 , wherein the extracting step extracts a document structure including the essential components from the template tree based on the second attribute information.
前記処理手段が、前記第1の構成要素の要素名あるいは要素値と前記第1のキーワードとの第1の類似度と、前記第2の構成要素の要素名と前記第2のキーワードとの第2の類似度とに基づき、前記抽出ステップで抽出された文書構造の評価値を求めるステップをさらに含み、
前記出力ステップは、前記評価値とともに、前記抽出された文書構造を前記検索結果として出力することを特徴とする請求項記載の文書構造検索方法。
The processing means includes a first similarity between the element name or element value of the first component and the first keyword, and a first similarity between the element name of the second component and the second keyword. Further comprising the step of obtaining an evaluation value of the document structure extracted in the extraction step based on the similarity of 2 ;
6. The document structure search method according to claim 5 , wherein the output step outputs the extracted document structure as the search result together with the evaluation value.
階層構造を有するデータベースに記憶されている複数の構造化文書の異なる文書構造の中から所望の文書構造を検索するための文書構造検索装置であって、
前記データベースに格納されている前記複数の構造化文書のそれぞれの文書構造と前記階層構造上の格納位置とを含む論理構造上に、前記階層構造上の同じ格納位置に格納される、文書構造が同一あるいは一部が同一の複数の構造化文書で共通する構成要素を1つに集約して1つの構成要素として表したテンプレートツリーを記憶する記憶手段と、
前記文書構造を検索するための検索条件として、少なくとも1つのキーワードを入力する入力手段と、
この入力手段で入力されたキーワードの類似語を求める手段と、
前記異なる文書構造のそれぞれを構成する各構成要素で構成された前記階層構造から、前記キーワードと前記類似語のうちのいずれかを要素名あるいは要素値に含む構成要素を検索する検索手段と、
この検索手段で検索された構成要素を基点として、前記テンプレートツリーを上流に辿っていくことで、該検索された構成要素を含む文書構造の先頭の構成要素を検出し、前記テンプレートツリーから、該検出された構成要素を先頭とする該文書構造を抽出する抽出手段と、
この抽出手段で抽出された文書構造を検索結果として出力する手段と、
を具備したことを特徴とする文書構造検索装置。
A document structure search device for searching a desired document structure from different document structures of a plurality of structured documents stored in a database having a hierarchical structure,
A document structure stored in the same storage position on the hierarchical structure on a logical structure including the document structure of each of the plurality of structured documents stored in the database and the storage position on the hierarchical structure. Storage means for storing a template tree in which constituent elements common to a plurality of structured documents that are the same or partially the same are aggregated into one constituent element;
Input means for inputting at least one keyword as a search condition for searching the document structure;
Means for obtaining a similar word of the keyword input by the input means;
Search means for searching for a constituent element including any one of the keyword and the similar word in an element name or an element value from the hierarchical structure constituted by each constituent element constituting each of the different document structures;
By tracing the template tree upstream from the component searched by the search means, the first component of the document structure including the searched component is detected, and the template tree Extraction means for extracting the document structure starting from the detected component ;
Means for outputting the document structure extracted by the extraction means as a search result;
A document structure retrieval apparatus comprising:
前記テンプレートツリーには、前記複数の構造化文書のそれぞれに対応する文書構造の先頭の構成要素に対し、当該構成要素が先頭の構成要素であることを表す第1の属性情報が付加されており、
前記抽出手段は、前記第1の属性情報に基づき、前記テンプレートツリーから前記検索結果としての文書構造を抽出することを特徴とする請求項記載の文書構造検索装置。
In the template tree , first attribute information indicating that the constituent element is the first constituent element is added to the first constituent element of the document structure corresponding to each of the plurality of structured documents. ,
10. The document structure search apparatus according to claim 9 , wherein the extraction unit extracts a document structure as the search result from the template tree based on the first attribute information.
前記テンプレートツリーには、前記複数の構造化文書のそれぞれに対応する文書構造を構成する構成要素のうち当該文書構造に必須の構成要素に対し、当該構成要素が必須の構成要素であることを表す第2の属性情報が付加されており、  The template tree indicates that the constituent element is an essential constituent element with respect to the constituent elements essential to the document structure among the constituent elements constituting the document structure corresponding to each of the plurality of structured documents. Second attribute information is added,
この第2の属性情報に基づき、前記テンプレートツリーから前記必須の構成要素からなる文書構造を抽出することを特徴とする請求項9記載の文書構造検索装置。  10. The document structure search apparatus according to claim 9, wherein a document structure composed of the essential components is extracted from the template tree based on the second attribute information.
階層構造を有するデータベースに記憶されている複数の構造化文書の異なる文書構造の中から所望の文書構造を検索するための文書構造検索装置であって、
前記データベースに格納されている前記複数の構造化文書のそれぞれの文書構造と前記階層構造上の格納位置とを含む論理構造上に、前記階層構造上の同じ格納位置に格納される、文書構造が同一あるいは一部が同一の複数の構造化文書で共通する構成要素を1つに集約して1つの構成要素として表したテンプレートツリーを記憶する記憶手段と、
前記文書構造を検索するための検索条件として、少なくとも1つの第1のキーワードと、少なくとも1つの第2のキーワードを入力する入力手段と、
前記入力手段で入力された前記第1のキーワードの類似語と、前記第2のキーワードの類似語を求める手段と、
前記異なる文書構造のそれぞれを構成する各構成要素で構成された前記階層構造から、前記第1のキーワードとその類似語のうちのいずれかを要素名あるいは要素値に含む第1の構成要素を検索する第1の検索手段と、
前記階層構造から、前記第2のキーワードとその類似語のうちのいずれかを要素名に含む第2の構成要素を検索する第2の検索手段と、
前記第1の構成要素を基点として、前記テンプレートツリーを上流に辿っていくことで前記第2の構成要素に至るとき、前記テンプレートツリーから当該第2の構成要素を先頭とする文書構造を抽出する抽出手段と、
この抽出手段で抽出された文書構造を検索結果として出力する出力手段と、
を具備したことを特徴とする文書構造検索装置。
A document structure search device for searching a desired document structure from different document structures of a plurality of structured documents stored in a database having a hierarchical structure,
A document structure stored in the same storage position on the hierarchical structure on a logical structure including the document structure of each of the plurality of structured documents stored in the database and the storage position on the hierarchical structure. Storage means for storing a template tree in which constituent elements common to a plurality of structured documents that are the same or partially the same are aggregated into one constituent element;
An input means for inputting at least one first keyword and at least one second keyword as a search condition for searching the document structure;
Means for obtaining a similar word of the first keyword input by the input means and a similar word of the second keyword;
A first component that includes either the first keyword or its similar word in an element name or an element value is searched from the hierarchical structure configured by the components that constitute each of the different document structures. A first search means for
Second search means for searching for a second component that includes any one of the second keyword and its similar word in an element name from the hierarchical structure;
When the second component is reached by tracing the template tree upstream from the first component, a document structure starting from the second component is extracted from the template tree. Extraction means;
Output means for outputting the document structure extracted by the extraction means as a search result;
A document structure retrieval apparatus comprising:
前記テンプレートツリーには、前記複数の構造化文書のそれぞれに対応する文書構造の先頭の構成要素に対し、当該構成要素が先頭の構成要素であることを表す第1の属性情報が付加されており、
前記抽出手段は、前記第1の属性情報に基づき、前記テンプレートツリーから前記検索結果としての文書構造を抽出することを特徴とする請求項12記載の文書構造検索装置。
In the template tree , first attribute information indicating that the constituent element is the first constituent element is added to the first constituent element of the document structure corresponding to each of the plurality of structured documents. ,
13. The document structure search apparatus according to claim 12 , wherein the extraction unit extracts a document structure as the search result from the template tree based on the first attribute information.
階層構造を有するデータベースに記憶されている複数の構造化文書の異なる文書構造の中から所望の文書構造を検索するための文書構造検索プログラムであって、
コンピュータを、
前記データベースに格納されている前記複数の構造化文書のそれぞれの文書構造と前記階層構造上の格納位置とを含む論理構造上に、前記階層構造上の同じ格納位置に格納される、文書構造が同一あるいは一部が同一の複数の構造化文書で共通する構成要素を1つに集約して1つの構成要素として表したテンプレートツリーを記憶する記憶手段、
前記文書構造を検索するための検索条件として、少なくとも1つのキーワードを入力す る入力手段、
この入力手段で入力されたキーワードの類似語を求める手段、
前記異なる文書構造のそれぞれを構成する各構成要素で構成された前記階層構造から、前記キーワードと前記類似語のうちのいずれかを要素名あるいは要素値に含む構成要素を検索する検索手段、
この検索手段で検索された構成要素を基点として、前記テンプレートツリーを上流に辿っていくことで、該検索された構成要素を含む文書構造の先頭の構成要素を検出し、前記テンプレートツリーから、該検出された構成要素を先頭とする該文書構造を抽出する抽出手段、
この抽出手段で抽出された文書構造を検索結果として出力する手段、
として機能させるためのプログラム。
A document structure search program for searching a desired document structure from different document structures of a plurality of structured documents stored in a database having a hierarchical structure,
The computer,
A document structure stored in the same storage position on the hierarchical structure on a logical structure including the document structure of each of the plurality of structured documents stored in the database and the storage position on the hierarchical structure. Storage means for storing a template tree in which constituent elements that are common to a plurality of structured documents that are the same or partially the same are aggregated into a single constituent element;
As a search condition for searching the document structure, the input means to enter at least one keyword,
Means for obtaining a similar word of the keyword input by the input means;
Search means for searching for a constituent element including any one of the keyword and the similar word in an element name or an element value from the hierarchical structure composed of the constituent elements constituting each of the different document structures;
By tracing the template tree upstream from the component searched by the search means, the first component of the document structure including the searched component is detected, and the template tree Extraction means for extracting the document structure starting from the detected component;
Means for outputting the document structure extracted by the extraction means as a search result;
Program to function as.
階層構造を有するデータベースに記憶されている複数の構造化文書の異なる文書構造の中から所望の文書構造を検索するための文書構造検索プログラムであって、
コンピュータを、
前記データベースに格納されている前記複数の構造化文書のそれぞれの文書構造と前記階層構造上の格納位置とを含む論理構造上に、前記階層構造上の同じ格納位置に格納される、文書構造が同一あるいは一部が同一の複数の構造化文書で共通する構成要素を1つに集約して1つの構成要素として表したテンプレートツリーを記憶する記憶手段、
前記文書構造を検索するための検索条件として、少なくとも1つの第1のキーワードと、少なくとも1つの第2のキーワードを入力する入力手段、
前記入力手段で入力された前記第1のキーワードの類似語と、前記第2のキーワードの類似語を求める手段、
前記異なる文書構造のそれぞれを構成する各構成要素で構成された前記階層構造から、前記第1のキーワードとその類似語のうちのいずれかを要素名あるいは要素値に含む第1の構成要素を検索する第1の検索手段、
前記階層構造から、前記第2のキーワードとその類似語のうちのいずれかを要素名に含む第2の構成要素を検索する第2の検索手段、
前記第1の構成要素を基点として、前記テンプレートツリーを上流に辿っていくことで前記第2の構成要素に至るとき、前記テンプレートツリーから当該第2の構成要素を先頭とする文書構造を抽出する抽出手段、
この抽出手段で抽出された文書構造を検索結果として出力する出力手段、
として機能させるためのプログラム。
A document structure search program for searching a desired document structure from different document structures of a plurality of structured documents stored in a database having a hierarchical structure,
The computer,
A document structure stored in the same storage position on the hierarchical structure on a logical structure including the document structure of each of the plurality of structured documents stored in the database and the storage position on the hierarchical structure. Storage means for storing a template tree in which constituent elements that are common to a plurality of structured documents that are the same or partially the same are aggregated into a single constituent element;
Input means for inputting at least one first keyword and at least one second keyword as a search condition for searching the document structure;
Means for obtaining a similar word of the first keyword input by the input means and a similar word of the second keyword;
A first component that includes either the first keyword or its similar word in an element name or an element value is searched from the hierarchical structure configured by the components that constitute each of the different document structures. A first search means for
A second search means for searching for a second component including, in the element name, any one of the second keyword and similar words from the hierarchical structure;
When the second component is reached by tracing the template tree upstream from the first component, a document structure starting from the second component is extracted from the template tree. Extraction means,
Output means for outputting the document structure extracted by the extraction means as a search result;
Program to function as .
JP2002285543A 2002-09-30 2002-09-30 Document structure search method, document structure search apparatus, and document structure search program Expired - Fee Related JP3910901B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002285543A JP3910901B2 (en) 2002-09-30 2002-09-30 Document structure search method, document structure search apparatus, and document structure search program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002285543A JP3910901B2 (en) 2002-09-30 2002-09-30 Document structure search method, document structure search apparatus, and document structure search program

Publications (2)

Publication Number Publication Date
JP2004126640A JP2004126640A (en) 2004-04-22
JP3910901B2 true JP3910901B2 (en) 2007-04-25

Family

ID=32278818

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002285543A Expired - Fee Related JP3910901B2 (en) 2002-09-30 2002-09-30 Document structure search method, document structure search apparatus, and document structure search program

Country Status (1)

Country Link
JP (1) JP3910901B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1794682A4 (en) * 2004-08-02 2007-11-14 Clairvoyance Corp PROCESSING AND DOCUMENT MANAGEMENT APPROACH FOR DOCUMENT EDITING IN A MARKING LANGUAGE ENVIRONMENT THAT USES CANCELING ORDERS
JP2012063868A (en) 2010-09-14 2012-03-29 Internatl Business Mach Corp <Ibm> Method to generate combined parser by combining language processing parsers, and its computer and computer program
JP7756526B2 (en) * 2021-09-21 2025-10-20 株式会社日立製作所 Information processing device and information processing method
CN114817135B (en) * 2022-04-30 2025-05-13 广州列丰信息科技有限公司 Method and system for migrating electronic documents between Internet platforms

Also Published As

Publication number Publication date
JP2004126640A (en) 2004-04-22

Similar Documents

Publication Publication Date Title
JP3842577B2 (en) Structured document search method, structured document search apparatus and program
JP3842573B2 (en) Structured document search method, structured document management apparatus and program
JP3754253B2 (en) Structured document search method, structured document search apparatus, and structured document search system
US7370061B2 (en) Method for querying XML documents using a weighted navigational index
US6618727B1 (en) System and method for performing similarity searching
He et al. Automatic integration of web search interfaces with wise-integrator
US7174327B2 (en) Generating one or more XML documents from a relational database using XPath data model
EP2901318B1 (en) Evaluating xml full text search
US20070078889A1 (en) Method and system for automated knowledge extraction and organization
US8196033B2 (en) Converting between data sources and XML
JP3914081B2 (en) Access authority setting method and structured document management system
Liu et al. An XML-enabled data extraction toolkit for web sources
JP3910901B2 (en) Document structure search method, document structure search apparatus, and document structure search program
JP3842572B2 (en) Structured document management method, structured document management apparatus and program
KR19990055219A (en) HTML (TM) document storage and retrieval system
JP3842576B2 (en) Structured document editing method and structured document editing system
Yu et al. Metadata management system: design and implementation
JP3842574B2 (en) Information extraction method, structured document management apparatus and program
CN1326078C (en) Forming method for package device
JP3842575B2 (en) Structured document search method, structured document management apparatus and program
JP2004118543A (en) Structured document search method, search support method, search support device, and search support program
KR100487738B1 (en) Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language
Hong et al. Extracting web query interfaces based on form structures and semantic similarity
Marin-Castro et al. VR-Tree: A novel tree-based approach for modeling Web Query Interfaces
Gançarski Using attribute grammars to uniformly represent structured documents-application to information retrieval

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061013

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061024

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061225

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070125

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

Free format text: PAYMENT UNTIL: 20100202

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110202

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120202

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130202

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140202

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees