JP4242701B2 - Storage search device, storage search program, and storage search program recording medium - Google Patents

Storage search device, storage search program, and storage search program recording medium Download PDF

Info

Publication number
JP4242701B2
JP4242701B2 JP2003146784A JP2003146784A JP4242701B2 JP 4242701 B2 JP4242701 B2 JP 4242701B2 JP 2003146784 A JP2003146784 A JP 2003146784A JP 2003146784 A JP2003146784 A JP 2003146784A JP 4242701 B2 JP4242701 B2 JP 4242701B2
Authority
JP
Japan
Prior art keywords
structured document
meta information
path
storage
database
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
JP2003146784A
Other languages
Japanese (ja)
Other versions
JP2004348593A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2003146784A priority Critical patent/JP4242701B2/en
Publication of JP2004348593A publication Critical patent/JP2004348593A/en
Application granted granted Critical
Publication of JP4242701B2 publication Critical patent/JP4242701B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、構造化文書を格納し、検索するコンピュータシステムに用いられるミドルウェアに関し、特に、メタ情報を格納する機能を持たないオブジェクト指向データベースに対して構造化文書およびメタ情報を格納し、検索するミドルウェアに関する。
【0002】
【従来の技術】
近年、XML(eXtensible Markup Language)をはじめとする構造化文書が、インターネット上の様々な情報共有のためのデータフォーマットとして、利用されるようになっている。XMLは、1997年12月に、標準化団体W3C(World Wide Web Consorium)により標準化された構造化文書の規格の一種である。このXML規格に沿って書かれたデータをXML文書と呼ぶ。
【0003】
XML文書は、人が解読・編集可能な文書である。しかし、同時に、XML文書は、タグを用いて構造化されており、コンピュータプログラムが、容易に処理することが可能なデータでもある。XML文書のタグは、見かけは文書中に埋めこまれた「<」と「>」で囲まれた文字列である。タグには、開始タグと終了タグがあり、開始タグと終了タグで囲まれた領域を要素と呼ぶ。要素は、複数の子要素を持ち、それぞれの子要素が複数の孫要素を持つというように、入れ子状に記述できる。そのため、XML文書は、多段階の木構造を表現することができる。
【0004】
現在、XML文書によって表現される情報は、多岐に渡り、XML規格にタグの付け方の規則を規定することで、特定の用途への応用が行われている。例えば、企業間連携のためのRosettaNet(http://www.rosettanet.gr.jp/)やebXML(http://www.ebxml.org/)、リソース情報記述のためのRDF(
Resource Definition Framework,http://www.w3.org/RDF/)、マルチメデイア情報記述のためのSVG(Scalable Vector Graphics)やSMIL(Synchronized Multimedia Integration Language)などがある。上記の特定用途のXML文書を利用するシステムは、それぞれのシステムが処理すべきXML文書であることを確認するために、XML用のスキーマ言語(XML Schema, http://www.w3.org/XML/Schema)を用いて検証を行い、規定外のXML文書を排除することで、処理対象のXML文書のみに処理を注力することができる。
【0005】
XML文書をコンピュータプログラムが処理する際には、XML文書が表現する木構造をコンピュータメモリ上の木構造に変換した方が便利である。このように、XML文書をコンピュータメモリ上の木構造として表現したものを、DOM(Document Object Model)と呼ぶ。DOMは、同じくW3Cにより標準化されている。DOMは、ノードとリンクよりなるノード・リンクモデルでXML文書を表現する。XML文書の要素は、DOMのノードに相当する。
【0006】
コンピュータメモリ上のDOMデータを処理するシステムを作成する際に、DOMデータ中のノードを指し示す検索式が利用できれば便利である。そのために、同じくW3Cにより、XPath(XML Path Language)という表記方法が標準化されている。XPathのようなパス検索式を用いることで、DOMデータ中の条件に合うノードを指し示すことができる。
【0007】
上記のようなXMLに関する様々な技術の規格化が行われ、様々なコンピュータシステムがXMLをベースとして開発されるようになったため、近年、XML文書を格納するためのデータベースの必要性も増している。XMLを格納するデータベースには、大きく分けて、リレーショナルデータベース、オブジェクト指向データベース、文書データベースの3種類がある。
【0008】
リレーショナルデータベースにXML文書を格納するには、XML文書をリレーショナルデータベースの格納モデルである二次元の表に変換する必要がある。現在、リレーショナルモデルに基づくリレーショナルデータベース管理システム(RDBMS)は、データベース管理システム(DBMS)の主流として、顧客管理データベースや物品管理データベースなどに広く利用されている。従って、信頼性の高いリレーショナルデータベース管理システム(RDBMS)を利用することは容易であるが、XML文書を二次元の表形式に変換するには、元となるXML文書の形式や利用目的を分析し、最適な変換方法を検討し、リレーショナルスキーマを設計する必要がある。そのため、設計・構築コストが高く、大規模なシステム開発には向くが、中小規模のシステム開発には不向きである。
【0009】
オブジェクト指向データベースにXML文書を格納するには、XML文書をそのままデータベースに格納すればよい。これは、オブジェクト指向データベースは、XML文書の基本構造である木構造をオブジェクトの親子関係として、そのままの形で格納することができるからである。そのため、システム開発のコスト低減や、構築期間の短縮が重要な中小規模のシステム開発においては、複雑なスキーマ設計が必要ないという理由から、XML文書を木構造データとしてデータベースに格納し、パス検索式を用いて検索を行うことが可能なオブジェクト指向データベースが盛んに利用されている。なお、以後の説明において、構造化文書を格納するオブジェクト指向データベースをオブジェクト指向構造化文書データベースと呼ぶ。
【0010】
文書データベースにXML文書を格納する際には、構造化文書を文章として格納する。文書データベースは、構造化文書を文章として扱い、自然言語解析を施し、索引付けを行い、データベースに格納するので、文章の類似検索が可能なデータベースである。そのため、文書データベースは、XML文書のうち、文章データを格納する場合に特化して利用されるが、文章を扱うシステム開発以外には、用いられない。
【0011】
オブジェクト指向構造化文書データベースの構造化文書の格納は、図19に示す構造化文書を図20(a)のようなノードとリンクの木構造として表現し、ノードオブジェクトとその間のリンクという形式で保存することで実現されている。尚、図20(b)は図20(a)の表記方法を説明している凡例であるが、これによれば、木構造には、必ずルートノードがあり、構造化文書の要素は要素ノード、属性は属性ノード、文字列はテキストノードとして格納される。
【0012】
オブジェクト指向構造化文書データベースは、このノードとリンクの木構造に対して、木構造取得機能、木構造操作機能、およびパス検索機能の3つの機能を有する。
【0013】
木構造取得機能は、データベースに格納された構造化文書を木構造としてアクセスし、ノード情報を取得する機能である。これにより、データベースクライアントは、木構造を辿り、ノードの情報を取得することができる。また、木構造を辿ることで、元の構造化文書を再構成することができる。例えば、図20(a)に示すノードn002を基点と指定すると、図21に示す部分構造化文書を取り出すことができる。
【0014】
木構造操作機能は、データベースに格納された構造化文書を木構造としてアクセスし、ノード情報を操作する機能である。これにより、データベースクライアントは、基点となるノードを指定し、そのノードへ新しい子ノードの追加を行うことができる。本機能を用いると、構造化文書中に別の構造化文書を、部分構造化文書として埋め込むことができる。例えば、図22に示す部分構造化文書をノードn002の子ノードに追加すると、図23に示す木構造になる。この機能を部分構造化文書挿入と呼ぶ。尚、部分構造化文書挿入については、ルートノード(図23におけるn000)を基点として構造化文書自身の挿入を指定することで、構造化文書の全文書挿入を実現することができる。
【0015】
パス検索機能は、パス検索式により該当するノード群をノード集合として取得する機能である。パスは、複数の要素名や属性名を“/”で区切った文字列で、UNIX(登録商標)OSなどで用いられているディレクトリパスと似た概念であり、構造化文書の木構造を辿る順序を表している。また、パス検索式には、条件式を付加することができる。条件式は、木構造を辿る際に、ノードの絞込みを行うことを指示する。図24は、パス検索式の一例である。この例では、orderノードの子の、bookノードの子の、authorノードを返却することと、priceノードの値が200以上であるbookノードに限ることを表している。図24に示すパス検索式は、ルートノードを基点とし、図23に示すノード集合N={n005}が返却される。
【0016】
以上のように、XML文書のような構造化された文書を格納する必要がある中小規模のデータベースシステムには、オブジェクト指向データベースが適している。
【0017】
尚、この出願に関連する先行技術文献情報としては、次のものがある。
【0018】
【特許文献1】
特開2001−331479
【0019】
【発明が解決しようとする課題】
ところで、従来、オブジェクト指向データベースとアプリケーションプログラムを用いてコンピュータシステムを開発する際には、XML文書のような構造化文書に文書外追加情報(例えば、XML文書の作成者、日付、更新履歴など。以下、これをメタ情報と呼ぶ)を付加して、オブジェクト指向データベースに格納する場合が多い。このような場合には、元となるXML文書のスキーマに任意の構造を付加する機能があるため、XML文書のスキーマにメタ情報を追加するという方法で対応していた。
【0020】
しかしながら、上記の方法においては、オブジェクト指向データベースのスキーマ上では元のXML文書とメタ情報部分は区別されないため、
(1) XML文書をオブジェクト指向データベースに格納する際には、XML文書とメタ情報を結合してから格納する
(2) オブジェクト指向データベースからXML文書を検索する際には、元のXML文書にメタ情報部分が含まれたまま取り出される
という処理が行われることになる。特に(2)については、扱うXML文書がRDFやSMILなど規格化されたXML文書である場合には、メタ情報部分が不正スキーマとしてエラーになるため、規格に合わないXML文書をそのままRDFやSMILなどの処理に使えないという問題が発生する。
【0021】
そのため、通常、アプリケーションが不要な部分であるメタ情報部分を削除し、RDFやSMILの処理で扱えるようにする手段が必要となり、このことから、上記コンピュータシステムの開発においては以下の問題が発生していた。
【0022】
(1) メタ情報の付加および削除処理にアプリケーションが対応する必要があり、開発コストが余計にかかる。
【0023】
(2) メタ情報が増えるとその度にアプリケーションを修正する必要がある。
【0024】
本発明は、上記の事情を鑑みたものであり、オブジェクト指向構造化文書データベースがメタ情報を格納する機能を有しなくても、アプリケーションプログラムに依存せずに、メタ情報の追加・変更・削除に柔軟に対応できる格納検索装置、格納検索プログラム、および格納検索プログラム記録媒体を提供することを目的とする。
【0025】
【課題を解決するための手段】
上記目的を達成するため、請求項1記載の本発明は、アプリケーションプログラムからの指示に基づいてオブジェクト指向構造化文書データベースにアクセスし、情報処理を行う格納検索装置であって、構造化文書とともに前記オブジェクト指向構造化文書データベースに格納される前記構造化文書のメタ情報のパスに関する情報を記憶する設定情報記憶手段と、前記アプリケーションプログラムからの格納指示のもと受け取った前記構造化文書を前記オブジェクト指向構造化文書データベースに格納するとともに、前記アプリケーションプログラムから受け取ったメタ情報を、前記設定情報記憶手段に記憶されている前記メタ情報のパスに関する情報に従って、格納された前記構造化文書に挿入し、拡張構造化文書として格納する格納手段と、前記アプリケーションプログラムからの検索指示であるパス検索式と前記設定情報記憶手段に記憶された前記メタ情報のパスに関する情報との比較に基づいて、取得する文書が前記構造化文書か前記メタ情報かを判定し、当該判定結果に基づいて、前記オブジェクト指向構造化文書データベースに格納された前記拡張構造化文書から該当する前記構造化文書又は前記メタ情報を分離して取得する検索手段と、を有し、当該検索手段は、前記判定結果が構造化文書である場合には、前記拡張構造化文書から前記メタ情報を取り除くことを要旨とする。
【0026】
請求項2記載の本発明は、請求項1に記載の格納検索装置を構成する各手段としてコンピュータを機能させることを要旨とする。
【0027】
請求項3記載の本発明は、請求項2に記載された格納検索プログラムをコンピュータ読み取り可能な記録媒体に記録していることを要旨とする。
【0031】
【発明の実施の形態】
以下、図面を用いて本発明の実施の形態について説明する。
【0032】
図1は本発明の実施形態に係る格納・検索システム1の概略構成図である。図1に示す格納・検索システム1は、アプリケーション100、格納・検索装置200、オブジェクト指向構造化文書データベース(以下、データベースと呼ぶ)300を備えている。尚、格納・検索システム1は、構成としては、一つからなる装置、各構成要素が分散されて複数の装置がネットワーク接続されたシステムなどのいずれの構成であっても良い。
【0033】
アプリケーション100は、格納・検索装置200を利用するアプリケーションプログラムであり、その処理の中で構造化文書をデータベースに格納し、構造化文書を検索することを必要とするアプリケーションプログラムである。ここで、構造化文書を検索するために用いる検索式は上述したパス検索式である。
【0034】
格納・検索装置200は、アプリケーション100から渡された構造化文書およびメタ情報をデータベース300に格納する機能と、アプリケーション100から渡されたパス検索式をもってデータベース300に格納された構造化文書およびメタ情報の検索を行い、その検索結果をアプリケーション100に返却する機能と、を有するミドルウェアプログラムが記録され、実行される装置である。
【0035】
データベース300は、構造化文書を格納するオブジェクト指向構造化文書データベースであり、上述した木構造取得機能、木構造操作機能、およびパス検索機能の3つの機能を有する。
【0036】
さらに詳しくは、格納・検索装置200は、制御装置201、設定情報辞書202、格納装置203および、検索装置204を備えている。
【0037】
制御装置201は、アプリケーション100からパス検索式を受け取ると、他の装置202乃至204を制御し、アプリケーション100に検索結果を返却するようになっている。
【0038】
設定情報辞書202は、格納・検索装置200の動作を決定する設定情報を格納する辞書である。
【0039】
格納装置203は、制御装置201から構造化文書およびメタ情報を受け取り、データベース300に格納するようになっている。
【0040】
検索装置204は、制御装置201からパス検索式を受け取り、データベース300に対し検索を実行し、返却結果を制御装置201に返却するようになっている。
【0041】
尚、設定情報辞書202に格納される設定情報には、データベース300に格納する構造化文書に対して、どの位置にメタ情報を付加するかを示すメタ情報パスPが含まれている。
【0042】
次に、本実施の形態に係る格納・検索システム1の動作を図2乃至5を用いて説明する。ここで、図2は、格納・検索システム1の処理手順を示すフローチャート図である。図3乃至5は、図2の各ステップS100、S200、およびS300を詳細に説明するフローチャート図である。
【0043】
図2に示すように、格納・検索システム1は、まず、辞書の設定を行い、次に、アプリケーション100からの指示により、構造化文書の格納もしくは、構造化文書の検索を行う(ステップS100〜S400)。尚、複数の構造化文書を処理する場合においては、ステップS100をはじめに一度だけ行い、以降は個々の構造化文書について任意の順序でステップS200およびステップS300を繰り返し行う。
【0044】
ここで、上述の各ステップについて説明する。まず、図3を用いて辞書の設定ステップS100について説明する。
【0045】
ユーザは、上述したメタ情報パスPの一覧であるメタ情報パス集合P1-nを生成し(ステップS101)、生成したメタ情報パス集合P1-nを設定情報辞書202に対し設定入力する(ステップS102)。
【0046】
次に、図4を用いて構造化文書の格納ステップS200について説明する。
【0047】
アプリケーション100は、格納する構造化文書Dとメタ情報集合M1-nを生成し、制御装置201に入力し、構造化文書格納を指示する(ステップS201)。なお、メタ情報Miは、パスPiに対応するメタ情報である。
【0048】
制御装置201は、ステップS201で入力された構造化文書Dを、格納装置203に入力し、構造化文書の格納を指示する(ステップS202)。
【0049】
格納装置203は、ステップS202で入力された構造化文書Dをデータベース300に入力し、全文書挿入を指示する(ステップS203)。
【0050】
データベース300は、ステップS203で入力され指示された構造化文書Dを用いて、全文書挿入を実行する(ステップS204)。
【0051】
次に、制御装置201は、ステップS201で入力されたメタ情報集合M1-n、および設定情報辞書202より取り出したメタ情報パス集合P1-nを格納装置203に入力し、メタ情報格納を指示する(ステップS205)。
【0052】
格納装置203は、ステップS205で入力されたメタ情報Miをメタ情報パスPiに従ってデータベース300に入力し、部分構造化文書挿入を指示する(ステップS206)。
【0053】
データベース300は、ステップS206で入力され指示されたメタ情報Mi、およびメタ情報パスPiに基づいて部分構造化文書挿入を実行する(ステップS207)。この際、メタ情報パスPiの指し示す位置にメタ情報Miを挿入する。
【0054】
次に、図5を用いて構造化文書の検索ステップS300について説明する。
【0055】
アプリケーション100は、データベース300より構造化文書またはメタ情報を取得するためのパス検索式Qを生成する(ステップS301)。この際、パス検索式Qの条件に、構造化文書Dおよびメタ情報集合M1-nを指し示すパスを指定することができる。
【0056】
アプリケーション100は、ステップS301で生成したパス検索式Qを制御装置201に入力し、検索実行を指示する(ステップS302)。
【0057】
制御装置201は、ステップS302で入力されたパス検索式Qを検索装置204に入力し、検索実行を指示する(ステップS303)。
【0058】
検索装置204は、ステップS303で入力されたパス検索式Qをデータベース300に入力し、検索実行を指示すると、データベース300は、検索を実行し、検索装置204にノード集合N1-mを返却する(ステップS304)。
【0059】
検索装置204は、ステップS304で返却されたノード集合N1-mを、制御装置201に返却する(ステップS305)。
【0060】
制御装置201は、設定情報辞書202よりメタ情報パス集合P1-nを取得し、該メタ情報パス集合P1-nと、パス検索式Qから条件を除いたパスPQと、を比較する(ステップS306)。これは、具体的には、メタ情報パス集合P1-n中の全てのメタ情報パスPkについて、パスPQがメタ情報パスPk自身またはその子孫ノードを指し示すかどうかで判定するものである。パスPQがメタ情報パスPk自身またはその子孫ノードを指し示さない場合には、パス検索式Qは構造化文書Dの部分構造化文書集合を指し示すものとみなし、ステップS308を実行する。これに対して、パスPQがメタ情報パスPk自身またはその子孫ノードを指し示す場合には、パス検索式Qはメタ情報集合M1-nの部分構造化文書集合を指し示すものとみなし、ステップS309を実行する(ステップS307)。
【0061】
パスPQがメタ情報パスPk自身またはその子孫ノードを指し示さない場合には、制御装置201は、ステップS305で返却されたノード集合N1-mの個々のノードNjについて、部分構造化文書取得を実行する(ステップS308)。部分構造化文書取得は、ノードNj以下の子孫ノードを全て取得し、構造化文書に組み立てることで行う。ただし、この際、設定情報辞書202より、メタ情報パス集合P1-nを取得し、これらのパスに該当するノードに関しては取得しない。これにより生成されるノードNjを頂点とする部分構造化文書を部分構造化文書Ejとする。最終的に、ノード集合N1-mの全てのノードについて部分構造化文書を生成し、部分構造化文書集合E1-mを得る。
【0062】
これに対して、パスPQがメタ情報パスPk自身またはその子孫ノードを指し示す場合には、制御装置201は、ステップS305で返却されたノード集合N1-mの個々のノードNjについて、部分構造化文書取得を実行する(ステップS309)。部分構造化文書取得は、ノードNj以下の子孫ノードを全て取得し、構造化文書に組み立てることで行う。これにより生成されるノードNjを頂点とする部分構造化文書を部分構造化文書Ejとする。最終的に、ノード集合N1-mの全てのノードについて、部分構造化文書を生成し、部分構造化文書集合E1-mを得る。
【0063】
制御装置201は、ステップS308又はS309で生成した部分構造化文書集合E1-mをアプリケーション100に返却する(ステップS310)。
【0064】
次に、具体的に、構造化文書としてXML(eXtensible Markup Language)、データベース300は、パス検索式としてXPath(XML Path Language)をサポートするデータベース(以下、XML DBと呼ぶ)を用いた場合の格納・検索システム1について説明する。
【0065】
この格納・検索システム1は、上述した図2のフローチャートに示す動作を行う。ここで、実際に処理においては、アプリケーション100の利用目的とユーザの操作に応じて、任意の順序でステップS200およびS300を必要回数繰り返すが、説明上、ステップS100乃至S300を1度のみ行うものとする。
【0066】
まず、図3を用いて辞書の設定ステップS100について説明する。
【0067】
ユーザは、設定情報辞書202に対して、図6に示すメタ情報パスP1およびP2の一覧であるメタ情報パス集合P1-2を生成する(ステップS101)。
【0068】
そして、ユーザは、ステップS101で生成したメタ情報パス集合P1-2を、設定情報辞書202に対し設定する(ステップS102)。
【0069】
次に、図4を用いて構造化文書の格納ステップS200について説明する。
【0070】
アプリケーション100は、図7に示す構造化文書Dと、図8に示すメタ情報集合M1-2を生成し、制御装置201に入力し、構造化文書格納を指示する(ステップS201)。なお、メタ情報Mi(i=1,2)は、パスPi(i=1,2)に対応するメタ情報である。
【0071】
制御装置201は、ステップS201で入力された構造化文書Dを、格納装置203に入力し、構造化文書の格納を指示する(ステップS202)。
【0072】
格納装置203は、ステップS202で入力された構造化文書Dをデータベース300に入力し、全文書挿入を指示する(ステップS203)。
【0073】
データベース300は、ステップS203で入力され指示された構造化文書Dを用いて、全文書挿入を実行する(ステップS204)。格納された構造化文書Dのデータベース内での構造を図9に示す。
【0074】
制御装置201は、ステップS201で入力されたメタ情報集合M1-2、および設定情報辞書202より取り出されたメタ情報パス集合P1-2を格納装置203に入力し、メタ情報格納を指示する(ステップS205)。
【0075】
格納装置203は、ステップS205で入力されたメタ情報Miをメタ情報パスPiに従って、データベース300に入力し、部分構造化文書挿入を指示する(ステップS206)。
【0076】
データベース300は、ステップS206で入力され指示されたメタ情報Mi、およびメタ情報パスPiに基づいて部分構造化文書挿入を実行する(ステップS207)。この際、メタ情報パスPiの指し示す位置にメタ情報Miを挿入する。挿入された構造化文書Dとメタ情報集合M1-2のデータベース内での構造を図10に示す。図10においては、メタ情報パスP1の示すn006の位置にメタ情報M1が、メタ情報パスP2の示すn007の位置にメタ情報M2が挿入されている。
【0077】
次に、図5を用いて構造化文書の検索ステップS300について説明する。
【0078】
アプリケーション100は、データベース300より構造化文書を取得するための図11に示すパス検索式Qを生成する(ステップS301)。図11に示すパス検索式Qは、条件としてメタ情報を指定し(メタ情報であるfilename属性が‘homepage1.xml’であるもの)、構造化文書Dの部分構造化文書取得を表している(パス“/RDF”配下の部分構造化文書を取得)。
【0079】
アプリケーション100は、ステップS301で生成したパス検索式Qを制御装置201に入力し、検索実行を指示する(ステップS302)。
【0080】
制御装置201は、ステップS302で入力されたパス検索式Qを検索装置204に入力し、検索実行を指示する(ステップS303)。
【0081】
検索装置204は、ステップS303で入力されたパス検索式Qをデータベース300に入力し、検索実行を指示すると、データベース300は、検索を実行し、検索装置204にノード集合N1-mを返却する(ステップS304)。返却されるノード集合N1-m(m=1であり、N1)を図12に示す。
【0082】
検索装置204は、ステップS304で返却されたノード集合N1を、制御装置201に返却する(ステップS305)。
【0083】
制御装置201は、設定情報辞書202より、メタ情報パス集合P1-2を取得し、パス検索式Qから条件を除いたパスPQと比較する(ステップS306)。この例におけるパスPQを図13に示す。パスPQが指し示すパスはルートノードの子ノードの“RDF”ノードである。メタ情報パス集合P1-2中の全てのメタ情報パスPkについて、パスPQが指し示すノードが、メタ情報パスPk自身かその子孫ノードであるようなメタ情報パスPkが存在しないので、パス検索式Qは構造化文書Dの部分構造化文書集合を返却するものとみなしステップS308を実行する(ステップS307)。
【0084】
制御装置201は、ステップS305で返却されたノード集合N1のノードN1について、部分構造化文書取得を実行する(ステップS308)。部分構造化文書取得は、ノードN1以下の子孫ノードを全て取得し、構造化文書に組み立てることで行う。ただし、この際、設定情報辞書202より、図6に示すメタ情報パス集合P1-2を取得し、これらのパスに該当するノードは取得しない。これにより生成されるノードN1を頂点とする部分構造化文書を部分構造化文書E1とする。この具体例においては、ノード集合N1のノードはノードN1だけであるので、ノードNより部分構造化文書集合E1を得る。図14に生成される部分構造化文書集合E1を示す。この時、データベース300内の木構造に付加されていたメタ情報は、部分構造化文書集合E1には付加されず、元の構造化文書Dに含まれている要素だけが出力される。
【0085】
制御装置201は、ステップS308で生成した部分構造化文書集合E1をアプリケーション100に返却する(ステップS310)。
【0086】
次に、ステップS307において、パス検索式Qがメタ情報を取得する場合の処理を以下に示す。
【0087】
アプリケーション100は、データベース300より構造化文書を取得するための図15に示すパス検索式Q’を生成する(ステップS301)。パス検索式Q’は、条件として構造化文書を指定し(構造化文書の“/RDF/Description/dc:creator”要素が‘春日’であるもの)、メタ情報の部分構造化文書取得を表している(パス“/RDF/change_log/log”配下の部分構造化文書を取得)。
【0088】
アプリケーション100は、ステップS301で生成したパス検索式Q’を制御装置201に入力し、検索実行を指示する(ステップS302)。
【0089】
制御装置201は、ステップS302で入力されたパス検索式Q’を検索装置204に入力し、検索実行を指示する(ステップS303)。
【0090】
検索装置204は、ステップS303で入力されたパス検索式Q’をデータベース300に入力し、検索実行を指示する(ステップS304)。データベース300は、検索を実行し、検索装置204にノード集合N’1-mを返却する。返却されるノード集合N’1-m(m=1であり、N’1)を図16に示す。
【0091】
検索装置204は、ステップS304で返却されたノード集合N’1を制御装置201に返却する(ステップS305)。
【0092】
制御装置201は、設定情報辞書202よりメタ情報パス集合P1-2を取得し、パス検索式Qから条件を除いたパスPQ と比較する(ステップS306)。この例におけるパスPQ を図17に示す。パスPQが指し示すパスはメタ情報集合M2の子ノードの“log”ノードである。メタ情報パス集合P1-2中の全てのメタ情報パスPkについて、パスPQが指し示すノードが、メタ情報パスPk自身かその子孫ノードであるようなメタ情報パスPkが存在する(「メタ情報パスP2」が該当)ので、パス検索式Q’はメタ情報集合M1-2の部分構造化文書集合を返却するものとみなしステップS309を実行する(ステップS307)。
【0093】
制御装置201は、ステップS305で返却されたノード集合N’1のノードN’1について、部分構造化文書取得を実行する(ステップS309)。部分構造化文書取得は、ノードN’1以下の子孫ノードを全て取得し、構造化文書に組み立てることで行う。これにより生成されるノードN’1を頂点とする部分構造化文書を部分構造化文書E’1とする。この具体例においては、ノード集合N’1-のノードはノードN’1だけであるので、ノードN’より部分構造化文書集合E’1を得る。図18に生成される部分構造化文書集合E’1を示す。
【0094】
制御装置201は、ステップS309で生成した部分構造化文書集合E’1をアプリケーション100に返却する(ステップS310)。
【0095】
従って、本実施の形態の格納・検索システム1によれば、メタ情報を格納する機能のないデータベース300とアプリケーション100の間に、ミドルウェアとしての格納・検索装置200を用いることで、アプリケーション100に依存せずに、メタ情報の追加・変更・削除に柔軟に対応することができるので、システム設計・開発の利便性の向上を図ることができる。
【0096】
具体的には、オブジェクト指向構造化文書データベースに構造化文書を格納する際には、メタ情報を合わせて格納することができ、構造化文書を検索する際には、構造化文書とメタ情報を別々に取得することができる。また、構造化文書を取得する際には、メタ情報を条件として検索することが可能となり、メタ情報を取得する際には、構造化文書を条件として検索することが可能となる。
尚、上記実施の形態の格納・検索装置200に格納されたミドルウェアプログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD−ROMなどのコンピュータ読み取り可能な記録媒体に記録することも、通信ネットワークを介して配信することも可能である。
【0097】
【発明の効果】
以上説明したように、本発明によれば、オブジェクト指向構造化文書データベースがメタ情報を格納する機能を有しなくても、アプリケーションプログラムに依存せずに、メタ情報の追加・変更・削除に柔軟に対応できる格納検索装置、格納検索プログラム、および格納検索プログラム記録媒体を提供することができる。
【0098】
これにより、メタ情報を格納する機能を有しないオブジェクト指向構造化文書データベースを利用して、構造化文書およびメタ情報を格納・検索するコンピュータシステムのシステム開発コストを低減させることができる。
【図面の簡単な説明】
【図1】本発明の実施の形態に係る格納・検索システムの概略構成図である。
【図2】本発明の実施の形態に係る格納・検索システムの動作を示すフローチャートである
【図3】本発明の実施の形態に係る格納・検索システムの辞書の設定動作を示すフローチャートである。
【図4】本発明の実施の形態に係る格納・検索システムの構造化文書の格納動作を示すフローチャートである。
【図5】本発明の実施の形態に係る格納・検索システムの構造化文書の検索動作を示すフローチャートである。
【図6】メタ情報パスの一例である。
【図7】構造化文書の一例である。
【図8】メタ情報の一例である。
【図9】オブジェクト指向構造化文書データベースに格納された構造化文書の一例である。
【図10】オブジェクト指向構造化文書データベースに格納された構造化文書の一例である。
【図11】パス検索式の一例である。
【図12】ノード集合の一例である。
【図13】パスの一例である。
【図14】部分構造化文書の一例である。
【図15】パス検索式の一例である。
【図16】ノード集合の一例である。
【図17】パスの一例である。
【図18】部分構造化文書の一例である。
【図19】構造化文書の一例である。
【図20】オブジェクト指向構造化文書データベースに格納された構造化文書の一例である。
【図21】取り出された部分構造化文書の一例である。
【図22】挿入する部分構造化文書の一例である。
【図23】挿入後のオブジェクト指向構造化文書データベースに格納された構造化文書の一例である。
【図24】パス検索式の一例である。
【符号の説明】
1 格納・検索システム
100 アプリケーション
200 格納・検索装置
201 制御装置
202 設定情報辞書
203 格納装置
204 検索装置
300 オブジェクト指向構造化データベース
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to middleware used in a computer system that stores and retrieves structured documents, and particularly stores and retrieves structured documents and meta information in an object-oriented database that does not have a function of storing meta information. Regarding middleware.
[0002]
[Prior art]
In recent years, structured documents such as XML (eXtensible Markup Language) have been used as data formats for sharing various information on the Internet. XML is a type of structured document standard that was standardized in December 1997 by the standardization body W3C (World Wide Web Consorium). Data written in accordance with the XML standard is called an XML document.
[0003]
An XML document is a document that can be read and edited by a person. However, at the same time, the XML document is structured using tags, and is also data that can be easily processed by a computer program. The tag of the XML document is a character string surrounded by “<” and “>” that is embedded in the document. The tag includes a start tag and an end tag, and an area surrounded by the start tag and the end tag is called an element. Elements can be described in a nested manner, such as having multiple child elements, each child element having multiple grandchild elements. Therefore, the XML document can express a multi-level tree structure.
[0004]
Currently, there is a wide variety of information expressed by XML documents, and the rules for tagging are defined in the XML standard, and are applied to specific uses. For example, RosettaNet (http://www.rosettanet.gr.jp/) and ebXML (http://www.ebxml.org/) for inter-company collaboration, RDF (
Resource Definition Framework, http://www.w3.org/RDF/), SVG (Scalable Vector Graphics) for multimedia information description, SMIL (Synchronized Multimedia Integration Language), and the like. In order to confirm that each of the above-mentioned XML documents for specific use is an XML document to be processed, an XML schema language (XML Schema, http://www.w3.org/ By performing verification using XML / Schema) and excluding non-standard XML documents, it is possible to focus processing only on the XML document to be processed.
[0005]
When a computer program processes an XML document, it is more convenient to convert the tree structure represented by the XML document into a tree structure on a computer memory. A representation of an XML document as a tree structure on a computer memory is called a DOM (Document Object Model). DOM is also standardized by W3C. DOM expresses an XML document with a node / link model composed of nodes and links. The elements of the XML document correspond to DOM nodes.
[0006]
When creating a system for processing DOM data on a computer memory, it is convenient if a search expression indicating a node in the DOM data can be used. Therefore, the notation method called XPath (XML Path Language) is also standardized by W3C. By using a path search expression such as XPath, it is possible to indicate a node that meets the conditions in the DOM data.
[0007]
Since various technologies related to XML as described above have been standardized and various computer systems have been developed based on XML, the need for a database for storing XML documents has increased in recent years. . There are roughly three types of databases that store XML: relational databases, object-oriented databases, and document databases.
[0008]
In order to store an XML document in a relational database, it is necessary to convert the XML document into a two-dimensional table which is a relational database storage model. At present, a relational database management system (RDBMS) based on a relational model is widely used in a customer management database, an article management database, and the like as a mainstream database management system (DBMS). Therefore, it is easy to use a highly reliable relational database management system (RDBMS), but in order to convert an XML document into a two-dimensional table format, the format and purpose of use of the original XML document are analyzed. It is necessary to study the optimal conversion method and design a relational schema. Therefore, the design / construction cost is high and it is suitable for large-scale system development, but is not suitable for medium- and small-scale system development.
[0009]
In order to store the XML document in the object-oriented database, the XML document may be stored in the database as it is. This is because the object-oriented database can store the tree structure, which is the basic structure of the XML document, as the parent-child relationship of the object as it is. For this reason, in medium and small scale system development where it is important to reduce system development costs and shorten the construction period, XML documents are stored in the database as tree structure data for the reason that complicated schema design is not necessary, and path retrieval formulas are used. Object-oriented databases that can be searched using are widely used. In the following description, an object-oriented database that stores structured documents is referred to as an object-oriented structured document database.
[0010]
When an XML document is stored in the document database, the structured document is stored as a sentence. The document database is a database in which a structured document is handled as a sentence, subjected to natural language analysis, indexed, and stored in the database. For this reason, the document database is used exclusively for storing text data among XML documents, but is not used except for system development for handling text.
[0011]
The structured document stored in the object-oriented structured document database is expressed by expressing the structured document shown in FIG. 19 as a tree structure of nodes and links as shown in FIG. It is realized by doing. 20B is a legend explaining the notation method of FIG. 20A. According to this legend, the tree structure always has a root node, and the elements of the structured document are element nodes. , Attributes are stored as attribute nodes, and character strings are stored as text nodes.
[0012]
The object-oriented structured document database has three functions of a tree structure acquisition function, a tree structure operation function, and a path search function for the tree structure of nodes and links.
[0013]
The tree structure acquisition function is a function for accessing a structured document stored in a database as a tree structure and acquiring node information. As a result, the database client can follow the tree structure and acquire node information. Also, by tracing the tree structure, the original structured document can be reconstructed. For example, the node n shown in FIG.002Is designated as the base point, the partially structured document shown in FIG. 21 can be extracted.
[0014]
The tree structure operation function is a function for accessing a structured document stored in a database as a tree structure and operating node information. As a result, the database client can designate a node as a base point and add a new child node to the node. When this function is used, another structured document can be embedded in the structured document as a partially structured document. For example, the partially structured document shown in FIG.002Is added to the child node, the tree structure shown in FIG. 23 is obtained. This function is called partial structured document insertion. As for the partially structured document insertion, the root node (n in FIG.000) Is used as the base point to specify the insertion of the structured document itself, so that the entire document can be inserted into the structured document.
[0015]
The path search function is a function for acquiring a corresponding node group as a node set by a path search expression. The path is a character string in which a plurality of element names and attribute names are separated by “/”, and is a concept similar to a directory path used in the UNIX (registered trademark) OS and the like, and follows the tree structure of the structured document. Represents the order. A conditional expression can be added to the path search expression. The conditional expression instructs to narrow down the nodes when tracing the tree structure. FIG. 24 shows an example of a path search expression. In this example, it is shown that the author node of the child of the order node, the child node of the book node is returned, and the book node is limited to the book node whose value of the price node is 200 or more. The path search expression shown in FIG. 24 uses a root node as a base point, and a node set N = {n shown in FIG.005} Is returned.
[0016]
As described above, the object-oriented database is suitable for a medium-sized database system that needs to store a structured document such as an XML document.
[0017]
The prior art document information related to this application includes the following.
[0018]
[Patent Document 1]
JP 2001-331479 A
[0019]
[Problems to be solved by the invention]
Conventionally, when a computer system is developed using an object-oriented database and an application program, additional information outside the document (for example, the creator, date, update history, etc. of the XML document) is added to a structured document such as an XML document. In many cases, this is referred to as meta information) and stored in an object-oriented database. In such a case, since there is a function of adding an arbitrary structure to the schema of the original XML document, it has been dealt with by a method of adding meta information to the schema of the XML document.
[0020]
However, in the above method, since the original XML document and the meta information part are not distinguished on the schema of the object-oriented database,
(1) When storing an XML document in an object-oriented database, the XML document and the meta information are combined and stored.
(2) When retrieving an XML document from an object-oriented database, the original XML document is extracted with the meta information part included.
The process is performed. Particularly for (2), if the XML document to be handled is a standardized XML document such as RDF or SMIL, the meta-information part will be an error as an invalid schema, so an XML document that does not conform to the standard will be used as it is as RDF or SMIL. The problem that it cannot be used for such processing occurs.
[0021]
For this reason, it is usually necessary to have means for deleting the meta information part, which is an unnecessary part of the application, so that it can be handled by RDF or SMIL processing. This causes the following problems in the development of the computer system. It was.
[0022]
(1) The application needs to cope with the addition and deletion processing of meta information, and the development cost is excessive.
[0023]
(2) The application needs to be corrected each time meta information increases.
[0024]
  The present invention has been made in view of the above circumstances, and even if the object-oriented structured document database does not have a function of storing meta information, addition / change / deletion of meta information can be performed without depending on an application program. Can respond flexibly toStorage retrieval device, storage retrieval program,It is another object of the present invention to provide a storage retrieval program recording medium.
[0025]
[Means for Solving the Problems]
  In order to achieve the above object, the present invention according to claim 1 is a storage and retrieval apparatus that accesses an object-oriented structured document database based on an instruction from an application program and performs information processing. Setting information storage means for storing information on the path of meta information of the structured document stored in the object-oriented structured document database; and the structured document received under the storage instruction from the application program In addition to storing in the structured document database, the meta information received from the application program is inserted into the structured document stored in accordance with the information about the path of the meta information stored in the setting information storage means, and extended. Storage means for storing as structured documents ,Based on a comparison between a path search expression that is a search instruction from the application program and information on the path of the meta information stored in the setting information storage unit, it is determined whether the document to be acquired is the structured document or the meta information. Search means for determining and separating the corresponding structured document or the meta information from the extended structured document stored in the object-oriented structured document database based on the determination result; The search means removes the meta information from the extended structured document when the determination result is a structured document.This is the gist.
[0026]
  The present invention described in claim 2A computer is caused to function as each means constituting the storage / retrieval apparatus according to claim 1.The gist.
[0027]
  The present invention described in claim 3The storage retrieval program according to claim 2 is recorded on a computer-readable recording medium.The gist.
[0031]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0032]
FIG. 1 is a schematic configuration diagram of a storage / retrieval system 1 according to an embodiment of the present invention. A storage / retrieval system 1 shown in FIG. 1 includes an application 100, a storage / retrieval apparatus 200, and an object-oriented structured document database (hereinafter referred to as a database) 300. The storage / retrieval system 1 may have any configuration such as a single device or a system in which each component is distributed and a plurality of devices are connected to the network.
[0033]
The application 100 is an application program that uses the storage / retrieval apparatus 200, and is an application program that needs to store a structured document in a database and retrieve a structured document during the processing. Here, the search formula used for searching the structured document is the above-described path search formula.
[0034]
The storage / retrieval apparatus 200 has a function of storing the structured document and meta information passed from the application 100 in the database 300 and a structured document and meta information stored in the database 300 with a path search expression passed from the application 100. A middleware program having a function of performing the above-described search and returning the search result to the application 100 is recorded and executed.
[0035]
The database 300 is an object-oriented structured document database that stores structured documents, and has the three functions of the above-described tree structure acquisition function, tree structure operation function, and path search function.
[0036]
More specifically, the storage / retrieval device 200 includes a control device 201, a setting information dictionary 202, a storage device 203, and a retrieval device 204.
[0037]
When receiving a path search expression from the application 100, the control device 201 controls the other devices 202 to 204 and returns the search result to the application 100.
[0038]
The setting information dictionary 202 is a dictionary that stores setting information that determines the operation of the storage / retrieval apparatus 200.
[0039]
The storage device 203 receives structured documents and meta information from the control device 201 and stores them in the database 300.
[0040]
The search device 204 receives a path search formula from the control device 201, performs a search on the database 300, and returns a return result to the control device 201.
[0041]
Note that the setting information stored in the setting information dictionary 202 includes a meta information path P indicating where the meta information is added to the structured document stored in the database 300.
[0042]
Next, the operation of the storage / retrieval system 1 according to the present embodiment will be described with reference to FIGS. Here, FIG. 2 is a flowchart showing a processing procedure of the storage / retrieval system 1. 3 to 5 are flowcharts for explaining in detail each step S100, S200, and S300 of FIG.
[0043]
As shown in FIG. 2, the storage / retrieval system 1 first sets a dictionary, and then stores a structured document or searches for a structured document in accordance with an instruction from the application 100 (steps S100 to S100). S400). In the case of processing a plurality of structured documents, step S100 is performed only once at the beginning, and thereafter, steps S200 and S300 are repeated in an arbitrary order for each structured document.
[0044]
Here, each step described above will be described. First, the dictionary setting step S100 will be described with reference to FIG.
[0045]
The user selects a meta information path set P that is a list of the meta information paths P described above.1-nIs generated (step S101), and the generated meta information path set P is generated.1-nIs input to the setting information dictionary 202 (step S102).
[0046]
Next, the structured document storing step S200 will be described with reference to FIG.
[0047]
The application 100 stores the structured document D and the meta information set M to be stored.1-nIs input to the control device 201 and the structured document storage is instructed (step S201). Meta information MiIs the path PiMeta information corresponding to.
[0048]
The control device 201 inputs the structured document D input in step S201 to the storage device 203 and instructs storage of the structured document (step S202).
[0049]
The storage device 203 inputs the structured document D input in step S202 to the database 300, and instructs insertion of all documents (step S203).
[0050]
The database 300 performs all document insertion using the structured document D input and designated in step S203 (step S204).
[0051]
Next, the control device 201 controls the meta information set M input in step S201.1-n, And a meta information path set P extracted from the setting information dictionary 2021-nIs input to the storage device 203 to instruct storage of meta information (step S205).
[0052]
The storage device 203 uses the meta information M input in step S205.iMeta information path PiTo input the partially structured document (step S206).
[0053]
The database 300 stores the meta information M input and instructed in step S206.i, And meta information path PiThe partially structured document insertion is executed based on (Step S207). At this time, the meta information path PiMeta information M at the position indicated byiInsert.
[0054]
Next, the structured document search step S300 will be described with reference to FIG.
[0055]
The application 100 generates a path search formula Q for acquiring a structured document or meta information from the database 300 (step S301). At this time, the structured document D and the meta information set M are included in the conditions of the path search expression Q.1-nYou can specify a path that points to.
[0056]
The application 100 inputs the path search formula Q generated in step S301 to the control device 201 and instructs the search execution (step S302).
[0057]
The control device 201 inputs the path search formula Q input in step S302 to the search device 204 and instructs the search execution (step S303).
[0058]
When the search device 204 inputs the path search formula Q input in step S303 to the database 300 and instructs execution of the search, the database 300 executes the search and sends the node set N to the search device 204.1-mIs returned (step S304).
[0059]
The search device 204 uses the node set N returned in step S304.1-mIs returned to the control device 201 (step S305).
[0060]
The control device 201 reads the meta information path set P from the setting information dictionary 202.1-nAnd the meta information path set P1-nAnd path P excluding the condition from path search formula QQAre compared (step S306). Specifically, this is a meta information path set P1-nAll meta information paths P inkPass PQIs meta information path PkJudgment is made based on whether it points to itself or its descendant nodes. Path PQIs meta information path PkIf it does not point to itself or its descendant nodes, the path search expression Q is regarded as pointing to the partially structured document set of the structured document D, and step S308 is executed. On the other hand, the path PQIs meta information path PkWhen pointing to itself or its descendant nodes, the path search expression Q is the meta information set M1-nAnd the step S309 is executed (step S307).
[0061]
Path PQIs meta information path PkWhen the control device 201 does not point to itself or its descendant nodes, the control device 201 returns the node set N returned in step S305.1-mIndividual node NjA partially structured document is acquired for (Step S308). Partially structured document acquisition is performed by node NjAll of the following descendant nodes are obtained and assembled into a structured document. However, at this time, from the setting information dictionary 202, the meta information path set P1-nAre acquired for nodes corresponding to these paths. Node N generated by thisjA partially structured document with a vertex as a partially structured document EjAnd Finally, node set N1-mPartially structured documents are generated for all nodes of the partial structured document set E1-mGet.
[0062]
On the other hand, the path PQIs meta information path PkWhen indicating the node itself or its descendant nodes, the control device 201 determines that the node set N returned in step S305.1-mIndividual node NjA partially structured document is acquired for (Step S309). Partially structured document acquisition is performed by node NjAll of the following descendant nodes are obtained and assembled into a structured document. Node N generated by thisjA partially structured document with a vertex as a partially structured document EjAnd Finally, node set N1-mA partial structured document is generated for all nodes of the partial structured document set E.1-mGet.
[0063]
The control device 201 executes the partially structured document set E generated in step S308 or S309.1-mIs returned to the application 100 (step S310).
[0064]
Next, specifically, XML (eXtensible Markup Language) is used as a structured document, and the database 300 is stored using a database that supports XPath (XML Path Language) as a path search expression (hereinafter referred to as XML DB). -The search system 1 is demonstrated.
[0065]
The storage / retrieval system 1 performs the operation shown in the flowchart of FIG. Here, in actual processing, steps S200 and S300 are repeated as many times as necessary depending on the purpose of use of the application 100 and the user's operation. However, for the sake of explanation, steps S100 to S300 are performed only once. To do.
[0066]
First, the dictionary setting step S100 will be described with reference to FIG.
[0067]
The user makes the meta information path P shown in FIG.1And P2Meta information path set P that is a list of1-2Is generated (step S101).
[0068]
The user then sets the meta information path set P generated in step S101.1-2Is set in the setting information dictionary 202 (step S102).
[0069]
Next, the structured document storing step S200 will be described with reference to FIG.
[0070]
The application 100 includes a structured document D shown in FIG. 7 and a meta information set M shown in FIG.1-2Is input to the control device 201 and the structured document storage is instructed (step S201). Meta information Mi(I = 1, 2) is the path PiMeta information corresponding to (i = 1, 2).
[0071]
The control device 201 inputs the structured document D input in step S201 to the storage device 203 and instructs storage of the structured document (step S202).
[0072]
The storage device 203 inputs the structured document D input in step S202 to the database 300, and instructs insertion of all documents (step S203).
[0073]
The database 300 performs all document insertion using the structured document D input and designated in step S203 (step S204). The structure of the stored structured document D in the database is shown in FIG.
[0074]
The control device 201 reads the meta information set M input in step S201.1-2, And the meta information path set P extracted from the setting information dictionary 2021-2Is input to the storage device 203 to instruct storage of meta information (step S205).
[0075]
The storage device 203 uses the meta information M input in step S205.iMeta information path PiAccordingly, the data is input to the database 300 and a partial structured document insertion is instructed (step S206).
[0076]
The database 300 stores the meta information M input and instructed in step S206.i, And meta information path PiThe partially structured document insertion is executed based on (Step S207). At this time, the meta information path PiMeta information M at the position indicated byiInsert. Inserted structured document D and meta information set M1-2The structure in the database is shown in FIG. In FIG. 10, the meta information path P1N006Meta information M at the position of1Is the meta information path P2N007Meta information M at the position of2Has been inserted.
[0077]
Next, the structured document search step S300 will be described with reference to FIG.
[0078]
The application 100 generates a path search formula Q shown in FIG. 11 for acquiring a structured document from the database 300 (step S301). The path search formula Q shown in FIG. 11 specifies meta information as a condition (the filename attribute that is meta information is 'homepage1.xml'), and represents acquisition of a partially structured document of the structured document D ( Get a partially structured document under the path “/ RDF”).
[0079]
The application 100 inputs the path search formula Q generated in step S301 to the control device 201 and instructs the search execution (step S302).
[0080]
The control device 201 inputs the path search formula Q input in step S302 to the search device 204 and instructs the search execution (step S303).
[0081]
When the search device 204 inputs the path search formula Q input in step S303 to the database 300 and instructs execution of the search, the database 300 executes the search and sends the node set N to the search device 204.1-mIs returned (step S304). Node set N to be returned1-m(M = 1, N1) Is shown in FIG.
[0082]
The search device 204 uses the node set N returned in step S304.1Is returned to the control device 201 (step S305).
[0083]
The control device 201 reads the meta information path set P from the setting information dictionary 202.1-2And the path P obtained by removing the condition from the path search formula QQ(Step S306). Path P in this exampleQIs shown in FIG. Path PQThe path indicated by “RDF” is a child node of the root node. Meta information path set P1-2All meta information paths P inkPass PQThe node pointed to by the meta information path PkMeta information path P that is itself or its descendant nodekTherefore, the path search formula Q is regarded as returning a partially structured document set of the structured document D, and step S308 is executed (step S307).
[0084]
The control device 201 sets the node set N returned in step S305.1Node N of1A partially structured document is acquired for (Step S308). Partially structured document acquisition is performed by node N1All of the following descendant nodes are obtained and assembled into a structured document. At this time, however, the meta information path set P shown in FIG.1-2And nodes corresponding to these paths are not acquired. Node N generated by this1A partially structured document with a vertex as a partially structured document E1And In this example, the node set N1Node is node N1Only because node N1More partially structured document set E1Get. The partially structured document set E generated in FIG.1Indicates. At this time, the meta information added to the tree structure in the database 300 is stored in the partially structured document set E.1Only the elements included in the original structured document D are output.
[0085]
The control device 201 executes the partially structured document set E generated in step S308.1Is returned to the application 100 (step S310).
[0086]
Next, processing in the case where the path search formula Q acquires meta information in step S307 will be described below.
[0087]
The application 100 generates a path search formula Q ′ shown in FIG. 15 for acquiring a structured document from the database 300 (step S301). The path search expression Q 'specifies a structured document as a condition (the "/ RDF / Description / dc: creator" element of the structured document is' Kasuga'), and represents the acquisition of a partially structured document of meta information. (Acquires partially structured documents under the path “/ RDF / change_log / log”).
[0088]
The application 100 inputs the path search formula Q ′ generated in step S301 to the control device 201 and instructs execution of search (step S302).
[0089]
The control device 201 inputs the path search formula Q ′ input in step S302 to the search device 204 and instructs the search execution (step S303).
[0090]
The search device 204 inputs the path search formula Q ′ input in step S303 to the database 300 and instructs the search execution (step S304). The database 300 executes the search, and sends the node set N ′ to the search device 204.1-mTo return. Node set N 'to be returned1-m(M = 1, N ′1) Is shown in FIG.
[0091]
The search device 204 returns the node set N ′ returned in step S304.1Is returned to the control device 201 (step S305).
[0092]
The control device 201 reads the meta information path set P from the setting information dictionary 202.1-2And the path P obtained by removing the condition from the path search formula QQ '(Step S306). Path P in this exampleQ 'Is shown in FIG. Path PQThe path pointed to by the meta information set M2This is the “log” node of the child node. Meta information path set P1-2All meta information paths P inkPass PQThe node pointed to by the meta information path PkMeta information path P that is itself or its descendant nodek("Meta information path P2”), The path search expression Q ′ is the meta information set M1-2The step S309 is executed assuming that the partially structured document set is returned (step S307).
[0093]
The control device 201 determines that the node set N ′ returned in step S <b> 305.1Node N '1A partially structured document is acquired for (Step S309). Partially structured document acquisition is performed by the node N ′1All of the following descendant nodes are obtained and assembled into a structured document. Node N ′ generated thereby1A partially structured document having a vertex as a partially structured document E ′1And In this example, the node set N '1-Is the node N '1Only node N '1More partially structured document set E ′1Get. The partially structured document set E ′ generated in FIG.1Indicates.
[0094]
The control apparatus 201 executes the partially structured document set E ′ generated in step S309.1Is returned to the application 100 (step S310).
[0095]
Therefore, according to the storage / retrieval system 1 of the present embodiment, the storage / retrieval apparatus 200 as middleware is used between the database 300 having no function of storing meta-information and the application 100, so that it depends on the application 100. Therefore, it is possible to flexibly cope with addition / change / deletion of meta information, so that convenience of system design / development can be improved.
[0096]
Specifically, when storing a structured document in an object-oriented structured document database, meta information can be stored together. When searching for a structured document, the structured document and meta information are stored together. Can be acquired separately. Further, when acquiring a structured document, it is possible to search using meta information as a condition, and when acquiring meta information, it is possible to search using a structured document as a condition.
The middleware program stored in the storage / retrieval apparatus 200 of the above embodiment may be recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, or a DVD-ROM. It is also possible to distribute via
[0097]
【The invention's effect】
  As described above, according to the present invention, even if the object-oriented structured document database does not have a function of storing meta information, it is flexible to add / change / delete meta information without depending on the application program. Can respond toStorage retrieval device, storage retrieval program,In addition, a storage retrieval program recording medium can be provided.
[0098]
Accordingly, it is possible to reduce the system development cost of a computer system that stores and retrieves structured documents and meta information using an object-oriented structured document database that does not have a function of storing meta information.
[Brief description of the drawings]
FIG. 1 is a schematic configuration diagram of a storage / retrieval system according to an embodiment of the present invention.
FIG. 2 is a flowchart showing the operation of the storage / retrieval system according to the embodiment of the present invention.
FIG. 3 is a flowchart showing dictionary setting operation of the storage / retrieval system according to the embodiment of the present invention;
FIG. 4 is a flowchart showing the storage operation of the structured document of the storage / retrieval system according to the embodiment of the present invention.
FIG. 5 is a flowchart showing a structured document search operation of the storage / retrieval system according to the embodiment of the present invention;
FIG. 6 is an example of a meta information path.
FIG. 7 is an example of a structured document.
FIG. 8 is an example of meta information.
FIG. 9 is an example of a structured document stored in an object-oriented structured document database.
FIG. 10 is an example of a structured document stored in an object-oriented structured document database.
FIG. 11 is an example of a path search expression.
FIG. 12 is an example of a node set.
FIG. 13 is an example of a path.
FIG. 14 is an example of a partially structured document.
FIG. 15 is an example of a path search expression.
FIG. 16 is an example of a node set.
FIG. 17 is an example of a path.
FIG. 18 is an example of a partially structured document.
FIG. 19 is an example of a structured document.
FIG. 20 is an example of a structured document stored in an object-oriented structured document database.
FIG. 21 is an example of the extracted partially structured document.
FIG. 22 is an example of a partially structured document to be inserted.
FIG. 23 is an example of a structured document stored in an object-oriented structured document database after insertion.
FIG. 24 is an example of a path search expression.
[Explanation of symbols]
1 Storage / retrieval system
100 applications
200 Storage / retrieval device
201 Control device
202 Setting information dictionary
203 Storage device
204 Search device
300 Object-oriented structured database

Claims (3)

アプリケーションプログラムからの指示に基づいてオブジェクト指向構造化文書データベースにアクセスし、情報処理を行う格納検索装置であって、
構造化文書とともに前記オブジェクト指向構造化文書データベースに格納される前記構造化文書のメタ情報のパスに関する情報を記憶する設定情報記憶手段と、
前記アプリケーションプログラムからの格納指示のもと受け取った前記構造化文書を前記オブジェクト指向構造化文書データベースに格納するとともに、前記アプリケーションプログラムから受け取ったメタ情報を、前記設定情報記憶手段に記憶されている前記メタ情報のパスに関する情報に従って、格納された前記構造化文書に挿入し、拡張構造化文書として格納する格納手段と、
前記アプリケーションプログラムからの検索指示であるパス検索式と前記設定情報記憶手段に記憶された前記メタ情報のパスに関する情報との比較に基づいて、取得する文書が前記構造化文書か前記メタ情報かを判定し、当該判定結果に基づいて、前記オブジェクト指向構造化文書データベースに格納された前記拡張構造化文書から該当する前記構造化文書又は前記メタ情報を分離して取得する検索手段と、を有し、
当該検索手段は、前記判定結果が構造化文書である場合には、前記拡張構造化文書から前記メタ情報を取り除くことを特徴とする格納検索装置。
A storage and retrieval apparatus that accesses an object-oriented structured document database based on an instruction from an application program and performs information processing,
Setting information storage means for storing information on a path of meta information of the structured document stored in the object-oriented structured document database together with the structured document;
The structured document received under the storage instruction from the application program is stored in the object-oriented structured document database, and the meta information received from the application program is stored in the setting information storage means Storage means for inserting into the stored structured document and storing it as an extended structured document according to information about the path of the meta information;
Whether the document to be acquired is the structured document or the meta information based on a comparison between a path search expression that is a search instruction from the application program and information on the path of the meta information stored in the setting information storage unit. Search means for determining and separating the corresponding structured document or the meta information from the extended structured document stored in the object-oriented structured document database based on the determination result; ,
The retrieval unit is characterized in that, when the determination result is a structured document, the meta information is removed from the extended structured document .
請求項1に記載の格納検索装置を構成する各手段としてコンピュータを機能させることを特徴とする格納検索プログラム。A storage retrieval program for causing a computer to function as each means constituting the storage retrieval device according to claim 1. 請求項2に記載された格納検索プログラムをコンピュータ読み取り可能な記録媒体に記録していることを特徴とする格納検索プログラム記録媒体。A storage retrieval program recording medium, wherein the storage retrieval program according to claim 2 is recorded in a computer-readable recording medium.
JP2003146784A 2003-05-23 2003-05-23 Storage search device, storage search program, and storage search program recording medium Expired - Fee Related JP4242701B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003146784A JP4242701B2 (en) 2003-05-23 2003-05-23 Storage search device, storage search program, and storage search program recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003146784A JP4242701B2 (en) 2003-05-23 2003-05-23 Storage search device, storage search program, and storage search program recording medium

Publications (2)

Publication Number Publication Date
JP2004348593A JP2004348593A (en) 2004-12-09
JP4242701B2 true JP4242701B2 (en) 2009-03-25

Family

ID=33533538

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003146784A Expired - Fee Related JP4242701B2 (en) 2003-05-23 2003-05-23 Storage search device, storage search program, and storage search program recording medium

Country Status (1)

Country Link
JP (1) JP4242701B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201828104A (en) * 2017-01-26 2018-08-01 雲拓科技有限公司 Claim Text Generalizing Method
JP7319475B1 (en) * 2022-03-30 2023-08-01 株式会社Robon METADATA MANAGEMENT SYSTEM, METADATA MANAGEMENT METHOD, AND PROGRAM

Also Published As

Publication number Publication date
JP2004348593A (en) 2004-12-09

Similar Documents

Publication Publication Date Title
US7353222B2 (en) System and method for the storage, indexing and retrieval of XML documents using relational databases
US7072983B1 (en) Scheme for systemically registering meta-data with respect to various types of data
US6889223B2 (en) Apparatus, method, and program for retrieving structured documents
US20020116402A1 (en) Information component based data storage and management
JP2008516341A5 (en)
US20110282882A1 (en) Intelligent container index and search
US20070005624A1 (en) Scalable transformation and tree based query language node - set selection
US8200702B2 (en) Independently variably scoped content rule application in a content management system
US20070055679A1 (en) Data expansion method and data processing method for structured documents
WO2006036487A2 (en) System and method for management of data repositories
JPH07319917A (en) Document data base managing device and document data base system
JPH0830620A (en) Structure retrieving device
US20080091699A1 (en) Method of converting structured data
JP2005234837A (en) Structured document processing method, structured document processing system and its program
JP2005190163A (en) Method, apparatus and program for retrieving structured data
US20110252313A1 (en) Document information selection method and computer program product
JP2006127235A (en) Structured document management system, structured document management method and program
JP4242701B2 (en) Storage search device, storage search program, and storage search program recording medium
JP3842576B2 (en) Structured document editing method and structured document editing system
Alink XIRAF: An XML-IR Approach to Digital Forensics
JP4289022B2 (en) Structured document processing method and apparatus, structured document processing program, and storage medium storing structured document processing program
JP4410005B2 (en) Structured document structure conversion device and program
JP4786695B2 (en) Structure conversion device for structured documents
Myaeng et al. A Digital Library System for Easy Creation/Manipulation of New Documents from Existing Resources.
Coles Pro SQL Server 2008 XML

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050725

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081021

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081125

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081225

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130109

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees