JP4034591B2 - Structured document storage method and retrieval method thereof - Google Patents

Structured document storage method and retrieval method thereof Download PDF

Info

Publication number
JP4034591B2
JP4034591B2 JP2002133065A JP2002133065A JP4034591B2 JP 4034591 B2 JP4034591 B2 JP 4034591B2 JP 2002133065 A JP2002133065 A JP 2002133065A JP 2002133065 A JP2002133065 A JP 2002133065A JP 4034591 B2 JP4034591 B2 JP 4034591B2
Authority
JP
Japan
Prior art keywords
column
identification information
document
search
information
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 - Lifetime
Application number
JP2002133065A
Other languages
Japanese (ja)
Other versions
JP2003330938A (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 JP2002133065A priority Critical patent/JP4034591B2/en
Publication of JP2003330938A publication Critical patent/JP2003330938A/en
Application granted granted Critical
Publication of JP4034591B2 publication Critical patent/JP4034591B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、構造化文書を格納、検索する方法に関し、特に一意の文書識別情報が定義でき、参照による継承関係が定義された構造化文書を格納し、効率良く検索する方法に関するものである。
【0002】
【従来の技術】
継承関係が定義された構造化文書の管理方法に関しては、電子的な権利情報、価値情報を記述、管理する方法として特開2002−41700が提案されている。この公知例では、構造化文書等で実現される権利定義を単なる構造化文書としてではなく、権利内容を構成する各種の属性を定義するためのデータ構造として捉え、さらにオブジェクト指向の考え方である継承の概念を取り入れることで、上位概念を定義した構造化文書を継承してより具体化した権利内容を定義することを可能にし、類似の権利定義を多量に作成・管理することを容易にしている。
【0003】
しかし、この公知例では多量の権利定義を効率良く蓄積、取得する方法について記載されていない。
【0004】
一方、SGML文書やXML文書を含む構造化文書を格納・検索するシステムとしては、これまで多くの提案がなされており、例えば特開2000−90091、特開2001−34618、特開2001−134596等が知られている。
【0005】
しかし、これらの構造化文書の格納・検索方法は、ある構造化文書や、そこからハイパーリンクで連結された複数の構造化文書の集合を、構造化文書としての構文を予め解析し、論理構造を内部データ化して格納するものであり、継承関係の定義された構造化文書の格納・検索に適用するには以下のような問題点があった。
【0006】
即ち、新規に構造化文書を格納する際、該構造化文書全体の構文解析を行う必要があるため、処理コストが高くなったり、論理構造化してしまうと失われる個々の構造化文書の継承関係や個別の記述内容を用いた検索が困難になったりするという問題である。
【0007】
【発明が解決しようとする課題】
前記の様に、従来の構造化文書の格納・検索方法では、継承関係が定義された構造化文書を効率良く格納し、検索することができなかった。
【0008】
本発明はこの点に鑑みてなされたもので、その目的は、継承付き構造化文書において、テーブル構成と格納方法、検索方法を工夫することで、格納時に毎回全ての継承構造化文書について内容を辿って論理構造を生成しなくても、継承関係が定義された構造化文書の効率の良い格納・検索を可能にすることである。
【0009】
【課題を解決するための手段】
前記目的を達成するため、本発明では、継承親となる構造化文書に対応する文書識別情報を格納する親情報カラムと、継承子となる構造化文書に対応する文書識別情報を格納する子情報カラムとからなるレコードを少なくとも1つ含む継承関係テーブルを用いることで、構造化文書の内容を解釈したり、論理構造化したりすることなく、継承関係を辿ることが可能となる。
【0010】
また、本発明では、継承関係テーブルの各レコードに、親情報カラムの文書識別情報に対応する構造化文書と子情報カラムの文書識別情報に対応する構造化文書との相対的な継承段数を格納する相対段数カラムを設けることで、ある構造化文書が継承する複数の構造化文書について構造化文書の内容を解析したり、継承関係テーブルへの複数回の参照をせずに論理的な継承関係を取得でき、構造化文書の論理構成を容易に再構成できる。
【0011】
また、本発明では、前記継承関係テーブルとともに、文書識別情報を格納する識別情報カラムと、予め指定された内容情報の一部分である検索対象領域についてその領域に記述された値を格納する少なくとも1つの検索対象領域カラムとからなるレコードを少なくとも1つ含む検索インデックステーブルを用いることで、論理構造を生成することなく、構造化文書内の値による部分一致検索が可能となる。
【0012】
また、本発明では、検索インデックステーブルの各レコードに、各検索対象領域カラム毎に該カラム内の値が当該構造化文書の内容部で初めて記述されている場合は真値を取り、それ以外の場合は偽値を取る出現フラグを格納する出現フラグカラムを設けることで、論理構造の再構成後には分からなくなってしまう、当該検索対象領域を有する構造化文書の物理的実体の特定を可能とする。
【0013】
【発明の実施の形態】
以下、図面に従って本発明の実施の形態について説明する。
【0014】
図1は本発明で格納・検索対象とする構造化文書の基本構成を示すもので、当該構造化文書10は参照先(親)の構造化文書を指定する情報として個々の構造化文書に対応する一意の文書識別情報を零(参照先無し)または一つのみ含む参照情報部11と、当該構造化文書10の内容情報を含む内容部12とからなっている。
【0015】
ここで、参照元の構造化文書と該参照元の構造化文書の参照情報部に文書識別情報で指定された参照先の構造化文書との間に定義される継承関係とは、参照元の構造化文書の論理構造が参照先の構造化文書の論理構造を包含し、参照先の構造化文書の論理構造の任意の一部分への参照処理で得られる結果と、参照元の構造化文書の論理構造に参照処理をして得られる結果とが一致するという意味で「参照元の構造化文書 is a 参照先の構造化文書」と解釈される関係(is−a関係)である。
【0016】
なお、構造化文書の論理構造とは、該構造化文書を出発点として、参照情報部に参照先の構造化文書の文書識別情報が記述されていない構造化文書まで遡っていった場合の全ての構造化文書の内容情報をつなげたものである。
【0017】
図2は構造化文書の継承関係の一例を示すもので、ここでは6個の構造化文書10a,10b,10c,10d,10e,10fにおいて、構造化文書10b,10cの参照情報部に構造化文書10aの文書識別情報が記述され、構造化文書10dの参照情報部に構造化文書10bの文書識別情報が記述され、構造化文書10e,10fの参照情報部に構造化文書10cの文書識別情報が記述されている例(構造化文書10aの参照情報部には記述無し)を示す。
【0018】
図3は本発明で格納・検索対象とする構造化文書の具体例を示すもので、ここでは特開2002−41700に記載された権利定義を想定した例、詳細には以下の5つのタグセットと1つの属性値を有するXML文書の集合である権利定義20の例を示す。
【0019】
Ticketタグ:権利定義のトップエレメントであり、Parent属性を有することができる。
【0020】
Typeタグ:チケットの種別を記述するエレメント。本実施の形態では値「コンサート」を有する権利定義の集合を例に採る。
【0021】
Nameタグ:チケットの名称を記述するエレメント。本実施の形態では値「クリスマスコンサート」を有する権利定義の集合を例に採る。
【0022】
Placeタグ:場所を記述するエレメント。本実施の形態では値「東京」「名古屋」「大阪」を有する権利定義の集合を例に採る。
【0023】
Gateタグ:チケットの改札場所を記述するエレメント。本実施の形態では値「Gate1」「Gate2」「Gate3」を有する権利定義の集合を例に採る。
【0024】
Parent属性:トップエレメントで指定され、継承する権利定義(親権利定義)の文書識別情報である権利定義IDを指定する。
【0025】
ここで、Ticketタグ内のParent属性が前述した参照情報部に該当し、それ以外が前述した内容部に該当する。
【0026】
図4は前述した権利定義の具体例、ここでは9個の権利定義20A,20B,20C,20D,20E,20F,20G,20H,20Iを、また、図5は図4に示した権利定義20A〜20Iの継承関係を表すツリーを示すものである。
【0027】
なお、権利定義の文書識別情報である権利定義IDは当該権利定義のハッシュ値をとることとし、本実施の形態ではA,B,C,D,E,F,G,H,I等のアルファベットでその値を表すこととする。
【0028】
ここで、ハッシュ値とは、y=H(x)であるようなxをyから求めることが極めて困難な一方向関数であり、かつ異なる入力から得られる結果が一致する確率が極めて低いという性質を有するハッシュ関数により入力のデータから得られる値である。この様なハッシュ関数としてはMD5やSHA−1などが広く知られている。
【0029】
本実施の形態では、権利定義の参照情報部をトップエレメントの属性として表したが、例えばタグの一つとして記述することも可能である。また、文書識別情報として親権利定義のハッシュ値である権利定義IDとしたが、権利定義をファイルとして管理する場合にはそのURLを指定することも可能である。
【0030】
図6は本発明方法を実現する装置構成の一例を示すもので、リレーショナルデーベース(RDBS)内に格納された3つのテーブル、即ちメインテーブル30、継承関係テーブル(親子テーブル)40及び検索インデックステーブル50と、文書格納処理部60と、文書検索処理部70とから構成される。
【0031】
メインテーブル30は、図7に示すように、構造化文書を格納する文書カラム(権利定義カラム)31と、該構造化文書に対応する文書識別情報を格納する文書識別情報カラム(権利定義IDカラム)32とからなるレコードを少なくとも1つ含む。
【0032】
継承関係テーブル40は、図8に示すように、継承親となる構造化文書に対応する文書識別情報を格納する親情報カラム(親権利定義IDカラム)41と、継承子となる構造化文書に対応する文書識別情報を格納する子情報カラム(子権利定義IDカラム)42と、親情報カラムの文書識別情報に対応する構造化文書と子情報カラムの文書識別情報に対応する構造化文書との相対的な継承段数を格納する相対段数カラム43とからなるレコードを少なくとも1つ含む。
【0033】
検索インデックステーブル50は、図9に示すように、文書識別情報を格納する識別情報カラム(権利定義IDカラム)51と、予め指定された内容情報の一部分である検索対象領域についてその領域に記述された値を格納する少なくとも1つの検索対象領域カラム(Typeカラム、Nameカラム、Placeカラム、Gateカラム)52と、各検索対象領域カラム毎に該カラム内の値が当該構造化文書の内容部に記述されている場合は真値(TRUE)を取り、それ以外の場合は偽値(FALSE)を取る出現フラグを格納する出現フラグカラム(Typeフラグカラム、Nameフラグカラム、Placeフラグカラム、Gateフラグカラム)53とからなるレコードを少なくとも1つ含む。
【0034】
文書格納処理部60及び文書検索処理部70は、前記RDBSにアクセス可能なコンピュータとその上で実行される文書格納プログラム及び文書検索プログラムによって実現される。
【0035】
図10乃至図19は文書格納プログラム及び文書検索プログラムに対応する処理の流れ図である。詳細には、図10は請求項1の文書格納方法、図11は請求項2の文書格納方法、図12は請求項4の文書格納方法、図13は請求項6の文書格納方法にそれぞれ対応する文書格納プログラムの流れ図である。また、図14は請求項3の文書検索方法、図15は請求項5の文書検索方法、図16,図17,図18,図19は請求項7の文書検索方法にそれぞれ対応する文書検索プログラムの流れ図である。
【0036】
なお、図15において「検索対象領域のうちのいくつかとその検索対象領域に記述された値との組によるAND条件」は「AND条件」と、「検索対象領域のうちのいくつかとその検索対象領域に記述された値との組と文書識別情報とによるAND条件」は「文書識別情報を含むAND条件」と略記した。また、図16において「検索対象領域のうちのいくつかとその検索対象領域に記述された値との組によるAND条件並びに子排除フラグ」は「AND条件と子排除フラグ」と、「検索対象領域のうちのいくつかとその検索対象領域に記述された値との組と文書識別情報とによるAND条件並びに子排除フラグ」は「文書識別情報を含むAND条件と子排除フラグ」とそれぞれ略記した。また、図16中の「別紙フローα」、「別紙フローβ」、「別紙フローγ」はそれぞれ図17、図18、図19を示す。
【0037】
以下、権利定義20A,20B,20Cが格納されている状態から、権利定義20Dを新たに格納する場合の処理手順を図20を用いて説明する。
【0038】
(1)権利定義20Dのハッシュ値として、権利定義ID=Dを作成(s1)。
【0039】
(2)メインテーブル30に権利定義IDと権利定義を格納(s2)。
【0040】
(3)権利定義20DからParent属性の値Cを取得(s7)。
【0041】
(4)継承関係テーブル40から、子カラムにCを有するレコードを取得(s4)。
【0042】
集合1:{親,子,段数}={A,C,2},{B,C,1},{C,C,0}が取得される。
【0043】
(5)集合1の3つのレコードの親カラムの値A,B,Cを親カラムに有し、Dを子カラムに有し、相対段数にそれぞれ1を加えた値3,2,1を相対段数カラムに有するレコードと、親カラム、子カラムともDを有し、相対段数カラムに0を有するレコードを継承関係テーブル40に追加(s5’,s6’)。
【0044】
レコード{親,子,段数}={A,D,3},{B,D,2},{C,D,1},{D,D,0}が追加される。
【0045】
(6)検索インデックステーブル50から、権利定義IDカラムにCを有するレコードを取得(s8)。
【0046】
(7)検索インデックステーブル50に、権利定義IDカラムに値Dを有し、Cのレコードの各検索対象領域カラムの値を当該カラムに有し、対応するフラグカラムにはFALSEを有し、Cのレコードに記載された以外の検索対象領域であるGateの値Gate1を取得してDのレコードのGateカラムに格納し、Gateフラグに値TRUEを格納するレコードを追加(s9’)。
【0047】
また、以下に、いくつかの検索条件と、検索処理の概要、取得される権利定義IDを例示する。
【0048】
検索例1:「権利定義ID=F」を条件とする検索
継承関係テーブル40から、「親権利定義ID=F」のレコードの子権利定義ID{F,I}を取得し、これを検索結果とする(s11〜s13)。
【0049】
子排除フラグにTRUEが指定されていた場合、「親権利定義ID=子権利定義ID=F」のレコードの存在を確認し、存在するので{F}を検索結果とする(s14,s21〜s24)。
【0050】
検索例2:「<Gate>=Gate1」を条件とする検索
検索インデックステーブル50から、「<Gate>=Gate1」のレコードの権利定義ID{D,I}を取得し、これを検索結果とする(s11,s15,16)。
【0051】
子排除フラグにTRUEが指定されていた場合、この結果のうちGateフラグがTRUEである{D,I}を検索結果とする(s14,s31〜s33)。
【0052】
検索例3:「<Name>=クリスマスコンサート AND <Place>=東京」を条件とする検索
検索インデックステーブル50から、「<Name>=クリスマスコンサート」かつ「<Place>=東京」のレコードの権利定義ID{C,D,G,H}を取得し、これを検索結果とする(s11,s14〜16)。
【0053】
子排除フラグにTRUEが指定されていた場合、この結果のうち、NameフラグまたはPlaceフラグがTRUEである{C}を検索結果とする(s31〜s33)。
【0054】
検索例4:「<Name>=クリスマスコンサート AND ID=C」を条件とする検索
継承関係テーブル40から、「親権利定義ID=C」の子権利定義ID{C,D,G,H}を取得し(s11,s14,s17)、検索インデックステーブル50から、これらを権利定義IDに有するレコードの集合を取得する(s18)。該レコードの集合から、「<Name>=クリスマスコンサート」のレコードの権利定義ID{C,D,G,H}を取得し(*)、これを検索結果とする(s19)。
【0055】
子排除フラグにTRUEが指定されていた場合、この結果のうち、NameフラグがTRUEなものを検索するが、該当がないため、{C}を検索結果とする(s41〜s47)(*の段階で既に「親権利定義ID=子権利定義ID=C」の存在が確認されているため)。
【0056】
また、前記検索例で得られた結果である権利定義IDの各々について、その論理構造を継承段数を用いて再構成する処理手順を説明する。
【0057】
例えば、権利定義ID=Hの論理構造を取得するためには、
(1)継承関係テーブル40から、「子権利定義ID=H」のレコードを取得し、その親権利定義IDを継承段数の降順に並べて継承関係を再構成する。
【0058】
この場合、{親権利定義ID,継承段数}={A,3}{B,2}{C,1}{H,0}なので、継承親から順に、A−B−C−Hという継承関係が得られる。
【0059】
(2)それぞれの権利定義IDについて、メインテーブル30から権利定義を取得し、その内容部を先頭から順に連結することで論理構造を得る。
【0060】
即ち、権利定義ID=Hの権利定義は、論理構造として以下の内容情報と同一視される。
【0061】
<Type>コンサート</Type>
<Name>クリスマスコンサート</Name>
<Place>東京</Place>
<Gate>Gate3</Gate>
【0062】
【発明の効果】
以上説明したように、請求項1及び3の発明によれば、継承関係テーブルを用いることで、構造化文書の参照情報部から参照先を取得して逐次に継承関係を辿ることなく、ある構造化文書が継承する構造化文書の集合を特定することができる。また、予め継承関係をツリー構造化して記憶しておかなくても、単純なテーブル参照によりある構造化文書を継承している全ての子構造化文書を特定することができる。
【0063】
また、請求項2及び3の発明によれば、継承段数を管理することで、ある構造化文書が継承する複数の構造化文書について、参照情報部を逐次に解析したり、継承関係テーブルへの参照を逐次に行ったりせずに、ある文書識別情報を有する構造化文書の継承関係が定義された全ての構造化文書の継承階層構造を取得でき、当該構造化文書の論理構造、即ち自らを含む継承関係が定義された全ての構造化文書の内容部を継承階層順に連結した文書を容易に再構成することができる。
【0064】
また、請求項4及び5の発明によれば、構造化文書内の特定の検索対象領域に対するインデックスを張った検索インデックステーブルを用いることで、全ての構造化文書の論理構造を予め取得しなくても、論理構造に対する部分一致検索を行うことができる。
【0065】
また、請求項6及び7の発明によれば、検索インデックステーブルに、検索対象領域の出現フラグを設けることで、論理構造の再構成後には情報が失われてしまう当該検索対象領域を有する構造化文書の物理的実体の特定が可能となる。
【図面の簡単な説明】
【図1】本発明で対象とする構造化文書の基本構成を示す模式図
【図2】構造化文書の継承関係の一例を示す模式図
【図3】本発明で対象とする構造化文書の具体例を示す模式図
【図4】権利定義の具体例を示す模式図
【図5】図4に示した権利定義の継承ツリーの模式図
【図6】本発明方法を実現する装置構成の一例を示すブロック図
【図7】図6中のメインテーブルの一例を示す模式図
【図8】図6中の継承関係テーブルの一例を示す模式図
【図9】図6中の検索インデックステーブルの一例を示す模式図
【図10】請求項1の文書格納方法に対応する文書格納プログラムの流れ図
【図11】請求項2の文書格納方法に対応する文書格納プログラムの流れ図
【図12】請求項4の文書格納方法に対応する文書格納プログラムの流れ図
【図13】請求項6の文書格納方法に対応する文書格納プログラムの流れ図
【図14】請求項3の文書検索方法に対応する文書格納プログラムの流れ図
【図15】請求項5の文書検索方法に対応する文書格納プログラムの流れ図
【図16】請求項7の文書検索方法に対応する文書格納プログラムの流れ図
【図17】請求項7の文書検索方法に対応する文書格納プログラムの流れ図
【図18】請求項7の文書検索方法に対応する文書格納プログラムの流れ図
【図19】請求項7の文書検索方法に対応する文書格納プログラムの流れ図
【図20】文書格納処理の一例を示す説明図
【符号の説明】
30:メインテーブル、31:文書カラム(権利定義カラム)、32:文書識別情報カラム(権利定義IDカラム)、40:継承関係テーブル、41:親情報カラム(親権利定義IDカラム)、42:子情報カラム(子権利定義IDカラム)、43:相対段数カラム、50:検索インデックステーブル、51:識別情報カラム(権利定義IDカラム)、52:検索対象領域カラム(Typeカラム、Nameカラム、Placeカラム、Gateカラム)、53:出現フラグカラム(Typeフラグカラム、Nameフラグカラム、Placeフラグカラム、Gateフラグカラム)、60:文書格納処理部、70:文書検索処理部。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method for storing and retrieving structured documents, and more particularly to a method for storing and retrieving structured documents in which unique document identification information can be defined and inheritance relationships by reference are defined.
[0002]
[Prior art]
As a method for managing structured documents in which inheritance relationships are defined, Japanese Patent Laid-Open No. 2002-41700 has been proposed as a method for describing and managing electronic rights information and value information. In this well-known example, the rights definition realized in a structured document etc. is not just a structured document, but as a data structure for defining various attributes constituting the content of rights, and inheritance is an object-oriented concept. By adopting the concept, it is possible to define more specific rights contents by inheriting the structured document that defines the superordinate concept, making it easy to create and manage a large number of similar rights definitions .
[0003]
However, this known example does not describe a method for efficiently accumulating and acquiring a large amount of right definitions.
[0004]
On the other hand, as a system for storing / retrieving structured documents including SGML documents and XML documents, many proposals have been made so far. For example, JP 2000-90091, JP 2001-34618, JP 2001-134596, etc. It has been known.
[0005]
However, these structured document storage / retrieval methods analyze the syntax of a structured document or a set of structured documents linked by hyperlinks from the structured document in advance as a logical structure. Are stored as internal data, and there are the following problems when applied to storage / retrieval of structured documents in which inheritance relationships are defined.
[0006]
That is, when a new structured document is stored, it is necessary to parse the entire structured document, so that the inheritance relationship of individual structured documents that is lost when the processing cost increases or logically structured Or the search using individual description contents becomes difficult.
[0007]
[Problems to be solved by the invention]
As described above, the conventional structured document storage / retrieval method cannot efficiently store and retrieve structured documents in which inheritance relationships are defined.
[0008]
The present invention has been made in view of this point, and its purpose is to devise the table configuration, storage method, and search method in a structured document with inheritance, so that the contents of all inherited structured documents are stored every time when stored. Even without tracing and generating a logical structure, it is possible to efficiently store and search a structured document in which an inheritance relationship is defined.
[0009]
[Means for Solving the Problems]
In order to achieve the above object, in the present invention, a parent information column that stores document identification information corresponding to a structured document that becomes an inheritance parent, and child information that stores document identification information corresponding to a structured document that becomes an inheritance child By using an inheritance relationship table including at least one record consisting of columns, it is possible to trace the inheritance relationship without interpreting the contents of the structured document or logically structuring it.
[0010]
In the present invention, the relative number of inheritance stages between the structured document corresponding to the document identification information in the parent information column and the structured document corresponding to the document identification information in the child information column is stored in each record of the inheritance relationship table. By providing a relative column number column, the contents of a structured document can be analyzed for multiple structured documents inherited by a structured document, and the logical inheritance relationship can be obtained without multiple references to the inheritance relationship table. And the logical structure of the structured document can be easily reconfigured.
[0011]
In the present invention, together with the inheritance relation table, an identification information column for storing document identification information, and at least one value for storing a value described in the area for a search target area that is a part of content information designated in advance. By using a search index table including at least one record including a search target area column, partial match search using values in the structured document can be performed without generating a logical structure.
[0012]
In the present invention, each record in the search index table takes a true value when the value in the column is described for the first time in the content part of the structured document for each search target area column. In this case, by providing an appearance flag column for storing an appearance flag that takes a false value, it becomes possible to identify the physical entity of the structured document having the search target area, which will be unknown after the logical structure is reconstructed. .
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0014]
FIG. 1 shows a basic structure of a structured document to be stored / retrieved in the present invention. The structured document 10 corresponds to each structured document as information for designating a reference destination (parent) structured document. The reference information part 11 includes zero or no unique document identification information to be performed, and the content part 12 includes the content information of the structured document 10.
[0015]
Here, the inheritance relationship defined between the reference source structured document and the reference destination structured document specified by the document identification information in the reference information section of the reference source structured document is the reference source The logical structure of the structured document includes the logical structure of the referenced structured document. The result obtained by referring to any part of the logical structure of the referenced structured document and the structure of the referenced structured document It is a relationship (is-a relationship) that is interpreted as “referenced structured document is a referenced destination structured document” in the sense that the result obtained by performing the reference processing on the logical structure matches.
[0016]
Note that the logical structure of a structured document refers to all cases where the structured document is traced back to a structured document in which the document identification information of the referenced structured document is not described in the reference information section. The content information of the structured documents of the above is connected.
[0017]
FIG. 2 shows an example of inheritance relationships of structured documents. Here, six structured documents 10a, 10b, 10c, 10d, 10e, and 10f are structured in the reference information section of the structured documents 10b and 10c. Document identification information of the document 10a is described, document identification information of the structured document 10b is described in the reference information portion of the structured document 10d, and document identification information of the structured document 10c is described in the reference information portions of the structured documents 10e and 10f. Is described (no description in the reference information part of the structured document 10a).
[0018]
FIG. 3 shows a specific example of a structured document to be stored / retrieved in the present invention. Here, an example assuming a rights definition described in Japanese Patent Laid-Open No. 2002-41700, specifically, the following five tag sets: And an example of a right definition 20 that is a set of XML documents having one attribute value.
[0019]
Ticket tag: A top element of a right definition, and can have a Parent attribute.
[0020]
Type tag: An element describing the type of ticket. In this embodiment, a set of right definitions having the value “concert” is taken as an example.
[0021]
Name tag: An element describing the name of a ticket. In the present embodiment, a set of right definitions having the value “Christmas concert” is taken as an example.
[0022]
Place tag: An element describing a place. In the present embodiment, a set of right definitions having values “Tokyo”, “Nagoya”, and “Osaka” is taken as an example.
[0023]
Gate tag: An element describing the ticket gate location. In the present embodiment, a set of right definitions having values “Gate 1”, “Gate 2”, and “Gate 3” is taken as an example.
[0024]
Parent attribute: Designates a right definition ID, which is specified in the top element and is document identification information of the inherited right definition (parent right definition).
[0025]
Here, the Parent attribute in the Ticket tag corresponds to the reference information part described above, and the other corresponds to the content part described above.
[0026]
FIG. 4 shows a specific example of the right definition described above, here, nine right definitions 20A, 20B, 20C, 20D, 20E, 20F, 20G, 20H and 20I, and FIG. 5 shows the right definition 20A shown in FIG. It shows a tree representing the inheritance relationship of ~ 20I.
[0027]
The right definition ID, which is the document identification information of the right definition, takes a hash value of the right definition. In this embodiment, alphabets such as A, B, C, D, E, F, G, H, and I are used. The value is represented by.
[0028]
Here, the hash value is a one-way function in which it is extremely difficult to obtain x from y such that y = H (x), and the probability that the results obtained from different inputs match is extremely low. A value obtained from input data by a hash function having As such a hash function, MD5, SHA-1, and the like are widely known.
[0029]
In the present embodiment, the reference information part of the right definition is represented as the attribute of the top element, but it can also be described as one of the tags, for example. Further, although the right definition ID, which is the hash value of the parent right definition, is used as the document identification information, when managing the right definition as a file, it is also possible to specify the URL.
[0030]
FIG. 6 shows an example of an apparatus configuration for realizing the method of the present invention. Three tables stored in a relational database (RDBS), that is, a main table 30, an inheritance relationship table (parent-child table) 40, and a search index table. 50, a document storage processing unit 60, and a document search processing unit 70.
[0031]
As shown in FIG. 7, the main table 30 includes a document column (right definition column) 31 that stores a structured document, and a document identification information column (right definition ID column) that stores document identification information corresponding to the structured document. ) 32 at least one record.
[0032]
As shown in FIG. 8, the inheritance relationship table 40 includes a parent information column (parent right definition ID column) 41 that stores document identification information corresponding to a structured document that is an inheritance parent, and a structured document that is an inheritance child. A child information column (child right definition ID column) 42 for storing corresponding document identification information, a structured document corresponding to the document identification information in the parent information column, and a structured document corresponding to the document identification information in the child information column It includes at least one record including a relative column number column 43 that stores a relative inherited column number.
[0033]
In the search index table 50, as shown in FIG. 9, an identification information column (right definition ID column) 51 for storing document identification information and a search target area which is a part of content information designated in advance are described in that area. At least one search target region column (Type column, Name column, Place column, Gate column) 52 for storing the value and the value in the column for each search target region column is described in the content part of the structured document. Appears flag columns (true flag column, name flag column, place flag column, and gate flag column) that store an appearance flag that takes a true value (TRUE) if it has been set and takes a false value (FALSE) otherwise 53 is included.
[0034]
The document storage processing unit 60 and the document search processing unit 70 are realized by a computer that can access the RDBS and a document storage program and a document search program that are executed on the computer.
[0035]
10 to 19 are flowcharts of processes corresponding to the document storage program and the document search program. Specifically, FIG. 10 corresponds to the document storage method of claim 1, FIG. 11 corresponds to the document storage method of claim 2, FIG. 12 corresponds to the document storage method of claim 4, and FIG. 13 corresponds to the document storage method of claim 6. 3 is a flowchart of a document storage program to be executed. 14 is a document search method according to claim 3, FIG. 15 is a document search method according to claim 5, and FIGS. 16, 17, 18, and 19 are document search programs corresponding to the document search method according to claim 7, respectively. It is a flowchart.
[0036]
In FIG. 15, “AND conditions based on combinations of some of the search target areas and values described in the search target areas” are “AND conditions” and “some of the search target areas and their search target areas. "AND condition based on a set of values described in the above and document identification information" is abbreviated as "AND condition including document identification information". Further, in FIG. 16, “AND condition and child exclusion flag based on a combination of some of the search target areas and values described in the search target area” are “AND condition and child exclusion flag” and “search target area “AND conditions and child exclusion flags based on a set of some of them and values described in the search target area and document identification information and child exclusion flags” are abbreviated as “AND conditions including document identification information and child exclusion flags”, respectively. Further, “attached sheet flow α”, “attached sheet flow β”, and “attached sheet flow γ” in FIG. 16 indicate FIGS. 17, 18, and 19, respectively.
[0037]
Hereinafter, a processing procedure when a right definition 20D is newly stored from a state in which the right definitions 20A, 20B, and 20C are stored will be described with reference to FIG.
[0038]
(1) Create a right definition ID = D as a hash value of the right definition 20D (s1).
[0039]
(2) The right definition ID and right definition are stored in the main table 30 (s2).
[0040]
(3) The value C of the Parent attribute is acquired from the right definition 20D (s7).
[0041]
(4) A record having C in the child column is acquired from the inheritance relationship table 40 (s4).
[0042]
Set 1: {parent, child, number of stages} = {A, C, 2}, {B, C, 1}, {C, C, 0} are acquired.
[0043]
(5) The parent column values A, B, and C of the three records in set 1 are included in the parent column, D is the child column, and the relative values are 3, 3, and 1, each of which is obtained by adding 1 to the relative number of stages. A record having a column number column, a parent column and a child column having D, and a record having a relative column number column of 0 are added to the inheritance relationship table 40 (s5 ′, s6 ′).
[0044]
Records {parent, child, number of steps} = {A, D, 3}, {B, D, 2}, {C, D, 1}, {D, D, 0} are added.
[0045]
(6) A record having C in the right definition ID column is acquired from the search index table 50 (s8).
[0046]
(7) The search index table 50 has the value D in the right definition ID column, the value of each search target area column of the record of C in the column, the corresponding flag column has FALSE, and C A Gate value Gate1 which is a search target area other than those described in the record of No. is acquired and stored in the Gate column of the record of D, and a record storing the value TRUE is added to the Gate flag (s9 ′).
[0047]
Also, some search conditions, an outline of the search process, and the acquired right definition ID will be exemplified below.
[0048]
Search example 1: The child right definition ID {F, I} of the record of “parent right definition ID = F” is acquired from the search inheritance relationship table 40 with “right definition ID = F” as a condition, and this is used as a search result. (S11 to s13).
[0049]
If TRUE is specified for the child exclusion flag, the existence of the record of “parent right definition ID = child right definition ID = F” is confirmed, and since it exists, {F} is taken as the search result (s14, s21 to s24) ).
[0050]
Search example 2: The right definition ID {D, I} of the record of “<Gate> = Gate1” is acquired from the search search index table 50 with “<Gate> = Gate1” as a condition, and this is used as the search result. (S11, s15, 16).
[0051]
If TRUE is specified for the child exclusion flag, {D, I} of which the Gate flag is TRUE is taken as the search result (s14, s31 to s33).
[0052]
Search example 3: “<Name> = Christmas concert AND <Place> = Tokyo” is used as a condition for the search definition index table 50 to define the rights of the records “<Name> = Christmas concert” and “<Place> = Tokyo”. ID {C, D, G, H} is acquired and used as a search result (s11, s14-16).
[0053]
If TRUE is specified as the child exclusion flag, {C} of which the Name flag or the Place flag is TRUE is set as the search result (s31 to s33).
[0054]
Search example 4: From the search inheritance relationship table 40 on the condition that “<Name> = Christmas concert AND ID = C”, the child right definition ID {C, D, G, H} of “parent right definition ID = C” Acquire (s11, s14, s17), and obtain a set of records having these in the right definition ID from the search index table 50 (s18). The right definition ID {C, D, G, H} of the record “<Name> = Christmas concert” is acquired from the set of records (*), and this is used as the search result (s19).
[0055]
If TRUE is specified for the child exclusion flag, a search is made for those whose Name flag is TRUE among these results, but since there is no match, {C} is used as the search result (s41 to s47) (* stage (Because the existence of “parent right definition ID = child right definition ID = C” has already been confirmed).
[0056]
A processing procedure for reconfiguring the logical structure of each right definition ID, which is the result obtained in the search example, using the number of inherited stages will be described.
[0057]
For example, in order to acquire the logical structure of right definition ID = H,
(1) A record of “child right definition ID = H” is acquired from the inheritance relationship table 40, and the inheritance relationship is reconfigured by arranging the parent right definition IDs in descending order of the number of inheritance steps.
[0058]
In this case, since {parent right definition ID, number of inheritance stages} = {A, 3} {B, 2} {C, 1} {H, 0}, the inheritance relationship of A-B-C-H in order from the inheritance parent. Is obtained.
[0059]
(2) For each right definition ID, a right structure is obtained from the main table 30 and its contents are connected in order from the top to obtain a logical structure.
[0060]
That is, the right definition with right definition ID = H is identified as the following content information as a logical structure.
[0061]
<Type> Concert </ Type>
<Name> Christmas Concert </ Name>
<Place> Tokyo </ Place>
<Gate> Gate3 </ Gate>
[0062]
【The invention's effect】
As described above, according to the inventions of claims 1 and 3, by using the inheritance relationship table, a reference destination is acquired from the reference information part of the structured document, and the inheritance relationship is not sequentially traced. A set of structured documents inherited by a structured document can be specified. Further, even if the inheritance relationship is not stored in a tree structure in advance, all child structured documents inheriting a certain structured document can be specified by simple table reference.
[0063]
Further, according to the inventions of claims 2 and 3, by managing the number of inheritance stages, the reference information part is sequentially analyzed for a plurality of structured documents inherited by a certain structured document, Without sequentially referencing, it is possible to obtain the inheritance hierarchical structure of all structured documents in which the inheritance relationship of a structured document having a certain document identification information is defined. It is possible to easily reconstruct a document in which the content parts of all structured documents in which inheritance relations are included are connected in the order of inheritance hierarchy.
[0064]
Further, according to the inventions of claims 4 and 5, by using a search index table in which an index for a specific search target area in a structured document is used, the logical structures of all structured documents can be acquired in advance. Also, a partial match search can be performed on the logical structure.
[0065]
Further, according to the inventions of claims 6 and 7, the search index table is provided with a search target area appearance flag, so that the structure having the search target area whose information is lost after the logical structure is reconfigured. The physical entity of the document can be specified.
[Brief description of the drawings]
FIG. 1 is a schematic diagram showing a basic structure of a structured document targeted by the present invention. FIG. 2 is a schematic diagram showing an example of inheritance relationships of structured documents. FIG. Fig. 4 is a schematic diagram showing a specific example of a right definition. Fig. 5 is a schematic diagram of a right definition inheritance tree shown in Fig. 4. Fig. 6 is an example of a device configuration for realizing the method of the present invention. FIG. 7 is a schematic diagram illustrating an example of a main table in FIG. 6. FIG. 8 is a schematic diagram illustrating an example of an inheritance relationship table in FIG. 6. FIG. 9 is an example of a search index table in FIG. FIG. 10 is a flowchart of a document storage program corresponding to the document storage method of claim 1. FIG. 11 is a flowchart of a document storage program corresponding to the document storage method of claim 2. Flow chart of document storage program corresponding to the document storage method [Figure] 3. Flow chart of document storage program corresponding to document storage method of claim 6. [FIG. 14] Flow chart of document storage program corresponding to document search method of claim 3. [FIG. 15] Corresponding to document search method of claim 5. FIG. 16 is a flowchart of a document storage program corresponding to the document search method of claim 7. FIG. 17 is a flowchart of a document storage program corresponding to the document search method of FIG. FIG. 19 is a flowchart of a document storage program corresponding to the document search method of FIG. 7. FIG. 20 is an explanatory diagram illustrating an example of document storage processing.
30: Main table, 31: Document column (right definition column), 32: Document identification information column (right definition ID column), 40: Inheritance relationship table, 41: Parent information column (parent right definition ID column), 42: Child Information column (child rights definition ID column), 43: relative stage number column, 50: search index table, 51: identification information column (right definition ID column), 52: search target area column (Type column, Name column, Place column, Gate column), 53: Appearance flag column (Type flag column, Name flag column, Place flag column, Gate flag column), 60: Document storage processing unit, and 70: Document search processing unit.

Claims (7)

ータベースに、当該データベースにアクセス可能なコンピュータを用いて新規の構造化文書を追加格納する方法であって、
前記構造化文書は、参照情報部及び内容部からなり、参照情報部は継承親となる参照先の構造化文書を指定する情報として個々の構造化文書に対応する一意の文書識別情報を零または1つのみ含み、内容部は当該構造化文書の内容情報を含み、
前記データベースは、前記構造化文書を格納する文書カラムと、該構造化文書に対応する文書識別情報を格納する文書識別情報カラムとからなるレコードを少なくとも1つ含むメインテーブルと、継承親となる構造化文書に対応する文書識別情報を格納する親情報カラムと、継承子となる構造化文書に対応する文書識別情報を格納する子情報カラムとからなるレコードを少なくとも1つ含む継承関係テーブルとを格納しており、
前記コンピュータが、
前記追加対象の構造化文書に対応する文書識別情報を作成するステップと、
前記データベースのメインテーブルに、文書カラムに追加対象の構造化文書を有し、文書識別情報カラムに該追加対象の構造化文書の文書識別情報を有するレコードを追加するステップと、
追加対象の構造化文書の参照情報部に参照先文書識別情報が含まれるか否かを判断するステップと、
参照情報部に参照先文書識別情報が含まれない場合には、
前記データベースの継承関係テーブルに、親情報カラムと子情報カラムの双方に追加対象の構造化文書の文書識別情報を有するレコードを追加するステップと、
参照情報部に参照先文書識別情報が含まれる場合には、
前記データベースの継承関係テーブルから、子情報カラムに該参照先の文書識別情報を有するレコードの集合を検索して取得するステップと、
前記データベースの継承関係テーブルに、取得した集合のレコード毎に、親情報カラムに前記レコードの親情報カラムに含まれる文書識別情報を有し、子情報カラムに追加対象の構造化文書の文書識別情報を有するレコードを追加するステップと、
前記データベースの継承関係テーブルに、親情報カラムと子情報カラムの双方に追加対象の構造化文書の文書識別情報を有するレコードを追加するステップとを実行する
ことを特徴とする構造化文書格納方法。
In the database, a method of adding storing a new structured document using computers accessible to the database,
The structured document includes a reference information part and a content part, and the reference information part has zero or no unique document identification information corresponding to each structured document as information for designating a reference destination structured document as an inheritance parent. Contains only one, the content part contains the content information of the structured document,
The database includes a main table including at least one record including a document column storing the structured document and a document identification information column storing document identification information corresponding to the structured document, and a structure serving as an inheritance parent An inheritance relationship table that includes at least one record including a parent information column that stores document identification information corresponding to a structured document and a child information column that stores document identification information corresponding to a structured document serving as an inheritor. And
The computer is
Creating document identification information corresponding to the structured document to be added;
Adding a record having a structured document to be added to the document column to the main table of the database and having document identification information of the structured document to be added to the document identification information column;
Determining whether the reference document identification information is included in the reference information part of the structured document to be added;
If the reference document identification information is not included in the reference information part,
Adding a record having document identification information of a structured document to be added to both the parent information column and the child information column in the inheritance relationship table of the database;
When the reference document identification information is included in the reference information part,
Searching and acquiring a set of records having the document identification information of the reference destination in a child information column from the inheritance relationship table of the database;
In the inheritance relationship table of the database, for each record of the acquired set, the parent information column has the document identification information included in the parent information column of the record, and the child information column has the document identification information of the structured document to be added. Adding a record having
Adding a record having the document identification information of the structured document to be added to both the parent information column and the child information column to the inheritance relationship table of the database.
請求項1記載の構造化文書格納方法において、
継承関係テーブルの各レコードは、前記に加え、親情報カラムの文書識別情報に対応する構造化文書と子情報カラムの文書識別情報に対応する構造化文書との相対的な継承段数を格納する相対段数カラムを有し、
請求項1記載のステップに代えて、
前記コンピュータが、
参照情報部に参照先文書識別情報が含まれない場合には、
前記データベースの継承関係テーブルに、親情報カラムと子情報カラムの双方に追加対象の構造化文書の文書識別情報を有し、相対段数カラムに値0を有するレコードを追加するステップと、
参照情報部に参照先文書識別情報が含まれる場合には、
前記データベースの継承関係テーブルから、子情報カラムに該参照先の文書識別情報を有するレコードの集合を検索して取得するステップと、
前記データベースの継承関係テーブルに、取得した集合のレコード毎に、親情報カラムに前記レコードの親情報カラムに含まれる文書識別情報を有し、子情報カラムに追加対象の構造化文書の文書識別情報を有し、相対段数カラムに前記レコードの相対段数カラムに含まれる値に1を加算した値を有するレコードを追加するステップと、
前記データベースの継承関係テーブルに、親情報カラムと子情報カラムの双方に追加対象の構造化文書の文書識別情報を有し、相対段数カラムに値0を有するレコードを追加するステップとを実行する
ことを特徴とする構造化文書格納方法。
The structured document storage method according to claim 1,
In addition to the above, each record of the inheritance relationship table stores a relative number of inheritance stages between the structured document corresponding to the document identification information in the parent information column and the structured document corresponding to the document identification information in the child information column. Has a column of number of stages,
Instead of the steps of claim 1,
The computer is
If the reference document identification information is not included in the reference information part,
Adding a record having document identification information of a structured document to be added to both the parent information column and the child information column and having a value of 0 in the relative column number column in the inheritance relationship table of the database ;
When the reference document identification information is included in the reference information part,
Searching and acquiring a set of records having the document identification information of the reference destination in a child information column from the inheritance relationship table of the database ;
In the inheritance relationship table of the database, for each record of the acquired set, the parent information column has the document identification information included in the parent information column of the record, and the child information column has the document identification information of the structured document to be added. And adding a record having a value obtained by adding 1 to the value included in the relative column number column of the record to the relative column number column;
Executing a step of adding a record having document identification information of a structured document to be added to both the parent information column and the child information column and having a value of 0 in the relative column number column to the inheritance relation table of the database. A structured document storage method characterized by:
ータベースから、当該データベースにアクセス可能なコンピュータを用いて検索条件に対応する構造化文書を検索する構造化文書検索方法であって、
前記構造化文書は、参照情報部及び内容部からなり、参照情報部は継承親となる参照先の構造化文書を指定する情報として個々の構造化文書に対応する一意の文書識別情報を零または1つのみ含み、内容部は当該構造化文書の内容情報を含み、
前記データベースは、前記構造化文書を格納する文書カラムと、該構造化文書に対応する文書識別情報を格納する文書識別情報カラムとからなるレコードを少なくとも1つ含むメインテーブルと、継承親となる構造化文書に対応する文書識別情報を格納する親情報カラムと、継承子となる構造化文書に対応する文書識別情報を格納する子情報カラムとからなるレコードを少なくとも1つ含む継承関係テーブルとを格納しており、
前記コンピュータが、
前記検索条件として文書識別情報を指定するステップと、
前記データベースの継承関係テーブルから、親情報カラムに前記指定された文書識別情報を有するレコードの集合を検索して取得するステップと、
該集合に含まれるレコードの子情報カラムに記述された文書識別情報を検索結果とするステップとを実行する
ことを特徴とする構造化文書検索方法。
From the database, a structured document search method for searching a structured document corresponding to the search conditions using computers accessible to the database,
The structured document includes a reference information part and a content part, and the reference information part has zero or no unique document identification information corresponding to each structured document as information for designating a reference destination structured document as an inheritance parent. Contains only one, the content part contains the content information of the structured document,
The database includes a main table including at least one record including a document column storing the structured document and a document identification information column storing document identification information corresponding to the structured document, and a structure serving as an inheritance parent An inheritance relationship table that includes at least one record including a parent information column that stores document identification information corresponding to a structured document and a child information column that stores document identification information corresponding to a structured document serving as an inheritor. And
The computer is
Designating document identification information as the search condition;
Searching and acquiring a set of records having the specified document identification information in a parent information column from the inheritance relationship table of the database;
A structured document search method comprising: performing a search result of document identification information described in a child information column of a record included in the set.
請求項1又は2記載の構造化文書格納方法において、
前記データベースは、文書識別情報を格納する識別情報カラムと、予め指定された内容情報の一部分である検索対象領域についてその領域に記述された値を格納する少なくとも1つの検索対象領域カラムとからなるレコードを少なくとも1つ含む検索インデックステーブルを併せて格納し
請求項1または2に記載のステップの外に、
前記コンピュータが、
追加対象の構造化文書から検索対象領域に記述された値を取得するステップと、
参照情報部に参照先文書識別情報が含まれない場合には、
前記データベースの検索インデックステーブルに、識別情報カラムに追加対象の構造化文書の文書識別情報を有し、各検索対象領域カラムに前記取得した各検索対象領域の値をそれぞれ有するレコードを追加するステップと、
参照情報部に参照先文書識別情報が含まれる場合には、
前記データベースの検索インデックステーブルから、該参照先の文書識別情報を識別情報カラムに有するレコードを検索して取得するステップと、
前記データベースの検索インデックステーブルに、識別情報カラムに追加対象の構造化文書の文書識別情報を有し、各検索対象領域カラムのうち、前記レコードに値が格納されているカラムについてはその値を有し、前記レコードに値が格納されていないカラムについては前記取得した検索対象領域の値を有するレコードを追加するステップとを含む
ことを特徴とする構造化文書格納方法。
The structured document storage method according to claim 1 or 2,
The database includes a record including an identification information column that stores document identification information and at least one search target area column that stores a value described in the search target area that is a part of content information designated in advance. the stored together search index table containing at least one,
In addition to the steps according to claim 1 or 2,
The computer is
Obtaining a value described in the search target area from the structured document to be added;
If the reference document identification information is not included in the reference information part,
Adding a record having document identification information of a structured document to be added to an identification information column and having a value of each acquired search target area in each search target area column in the search index table of the database ; ,
When the reference document identification information is included in the reference information part,
Searching and obtaining a record having the document identification information of the reference destination in the identification information column from the search index table of the database ;
In the search index table of the database , the identification information column has the document identification information of the structured document to be added, and among each search target area column, the value is stored in the record. And adding a record having the value of the acquired search target area for a column in which no value is stored in the record.
ータベースから、当該データベースにアクセス可能なコンピュータを用いて検索条件に対応する構造化文書を検索する構造化文書検索方法であって、
前記構造化文書は、参照情報部及び内容部からなり、参照情報部は継承親となる参照先の構造化文書を指定する情報として個々の構造化文書に対応する一意の文書識別情報を零または1つのみ含み、内容部は当該構造化文書の内容情報を含み、
前記データベースは、前記構造化文書を格納する文書カラムと、該構造化文書に対応する文書識別情報を格納する文書識別情報カラムとからなるレコードを少なくとも1つ含むメインテーブルと、継承親となる構造化文書に対応する文書識別情報を格納する親情報カラムと、継承子となる構造化文書に対応する文書識別情報を格納する子情報カラムとからなるレコードを少なくとも1つ含む継承関係テーブルと、文書識別情報を格納する識別情報カラムと、予め指定された内容情報の一部分である検索対象領域についてその領域に記述された値を格納する少なくとも1つの検索対象領域カラムとからなるレコードを少なくとも1つ含む検索インデックステーブルとを格納しており、
前記コンピュータが、
前記検索条件として文書識別情報、または検索対象領域のうちのいくつかとその検索対象領域に記述された値との組によるAND条件、もしくは検索対象領域のうちのいくつかとその検索対象領域に記述された値との組と文書識別情報とによるAND条件を指定するステップと、
前記検索条件に文書識別情報のみ指定された場合には、
前記データベースの継承関係テーブルから、親情報カラムに前記指定された文書識別情報を有するレコードの集合を検索して取得するステップと、
該集合に含まれるレコードの子情報カラムに記述された文書識別情報を検索結果とするステップと、
前記検索条件に検索対象領域のうちのいくつかとその検索対象領域に記述された値との組によるAND条件のみを指定された場合には、
前記データベースの検索インデックステーブルから、前記指定された検索対象領域カラムに前記指定された値を有するレコードの集合を検索して取得するステップと、
該集合に含まれるレコードの識別情報カラムに記述された文書識別情報を検索結果とするステップと、
前記検索条件に検索対象領域のうちのいくつかとその検索対象領域に記述された値との組と文書識別情報とによるAND条件を指定された場合には、
前記データベースの継承関係テーブルから、親情報カラムに前記指定された文書識別情報を有するレコードの集合を検索して取得するステップと、
前記データベースの検索インデックステーブルから、識別情報カラムに前記集合に含まれるレコードの子情報に記述された文書識別情報を有し、前記指定された検索対象領域カラムに前記指定された値を有するレコードの集合を検索して取得するステップと、
該集合に含まれるレコードの識別情報カラムに記述された文書識別情報を検索結果とするステップとを含む
ことを特徴とする構造化文書検索方法。
From the database, a structured document search method for searching a structured document corresponding to the search conditions using computers accessible to the database,
The structured document includes a reference information part and a content part, and the reference information part has zero or no unique document identification information corresponding to each structured document as information for designating a reference destination structured document as an inheritance parent. Contains only one, the content part contains the content information of the structured document,
The database includes a main table including at least one record including a document column storing the structured document and a document identification information column storing document identification information corresponding to the structured document, and a structure serving as an inheritance parent An inheritance relationship table including at least one record including a parent information column storing document identification information corresponding to a structured document and a child information column storing document identification information corresponding to a structured document serving as an inheritor; and a document It includes at least one record including an identification information column for storing identification information and at least one search target area column for storing a value described in the search target area that is a part of content information designated in advance. And a search index table
The computer is
As the search condition, document identification information, an AND condition based on a combination of some of the search target areas and a value described in the search target area, or some of the search target areas and the search target area are described. Specifying an AND condition based on a set of values and document identification information;
If only document identification information is specified in the search condition,
Searching and acquiring a set of records having the specified document identification information in a parent information column from the inheritance relationship table of the database;
Making the document identification information described in the child information column of the records included in the set a search result;
When only the AND condition based on a combination of some of the search target areas and the value described in the search target area is specified in the search condition,
Searching and acquiring a set of records having the specified value in the specified search target area column from the search index table of the database;
Making the document identification information described in the identification information column of the records included in the set a search result;
When an AND condition based on a set of some of the search target areas and a value described in the search target area and document identification information is specified in the search condition,
Searching and acquiring a set of records having the specified document identification information in a parent information column from the inheritance relationship table of the database;
From the search index table of the database, the identification information column has document identification information described in the child information of the records included in the set, and the specified search target area column has the specified value. Retrieving and retrieving a set;
A structured document retrieval method comprising: retrieving document identification information described in an identification information column of a record included in the set as a retrieval result.
請求項1又は2記載の構造化文書格納方法において、
前記データベースは、文書識別情報を格納する識別情報カラムと、予め指定された内容情報の一部分である検索対象領域についてその領域に記述された値を格納する少なくとも1つの検索対象領域カラムと、各検索対象領域カラム毎に該カラム内の値が当該構造化文書の内容部で初めて記述されている場合は真値を取り、それ以外の場合は偽値を取る出現フラグを格納する出現フラグカラムとからなるレコードを少なくとも1つ含む検索インデックステーブルを併せて格納し
請求項1または2に記載のステップの外に、
前記コンピュータが、
追加対象の構造化文書から検索対象領域に記述された値を取得するステップと、
参照情報部に参照先文書識別情報が含まれない場合には、
前記データベースの検索インデックステーブルに、識別情報カラムに追加対象の構造化文書の文書識別情報を有し、各検索対象領域カラムに前記取得した各検索対象領域の値をそれぞれ有し、各出現フラグカラムのうち、前記取得した検索対象領域の値を有する検索対象領域に対応するカラムについては真値を有するレコードを追加するステップと、
参照情報部に参照先文書識別情報が含まれる場合には、
前記データベースの検索インデックステーブルから、該参照先の文書識別情報を識別情報カラムに有するレコードを検索して取得するステップと、
前記データベースの検索インデックステーブルに、識別情報カラムに追加対象の構造化文書の文書識別情報を有し、各検索対象領域カラムのうち、前記レコードに値が格納されているカラムについてはその値を有し、前記レコードに値が格納されていないカラムについては前記取得した検索対象領域の値を有し、各出現フラグカラムのうち、前記レコードの値を有する検索対象領域カラムに対応するカラムについては偽値を有し、前記取得した検索対象領域の値を有する検索対象領域カラムに対応するカラムについては真値を有するレコードを追加するステップとを含む
ことを特徴とする構造化文書格納方法。
The structured document storage method according to claim 1 or 2 ,
The database includes an identification information column for storing document identification information, at least one search target area column for storing a value described in a search target area that is a part of content information designated in advance, and each search If the value in the column for each target region column is first written in the contents of the structured document takes a true value, from otherwise the indication flag column for storing the indication flag taking the false value Together with a search index table that contains at least one record
In addition to the steps according to claim 1 or 2,
The computer is
Obtaining a value described in the search target area from the structured document to be added;
If the reference document identification information is not included in the reference information part,
The search index table of the database has document identification information of the structured document to be added in the identification information column, each search target area column has the value of each acquired search target area, and each appearance flag column Adding a record having a true value for a column corresponding to the search target area having the value of the acquired search target area,
When the reference document identification information is included in the reference information part,
Searching and obtaining a record having the document identification information of the reference destination in the identification information column from the search index table of the database ;
In the search index table of the database , the identification information column has the document identification information of the structured document to be added, and among each search target area column, the value is stored in the record. However, the column in which no value is stored in the record has the value of the acquired search target area, and among the appearance flag columns, the column corresponding to the search target area column having the value of the record is false. Adding a record having a true value to a column corresponding to the search target area column having a value and having the value of the acquired search target area.
ータベースから、当該データベースにアクセス可能なコンピュータを用いて検索条件に対応する構造化文書を検索する構造化文書検索方法であって、
前記構造化文書は、参照情報部及び内容部からなり、参照情報部は継承親となる参照先の構造化文書を指定する情報として個々の構造化文書に対応する一意の文書識別情報を零または1つのみ含み、内容部は当該構造化文書の内容情報を含み、
前記データベースは、前記構造化文書を格納する文書カラムと、該構造化文書に対応する文書識別情報を格納する文書識別情報カラムとからなるレコードを少なくとも1つ含むメインテーブルと、継承親となる構造化文書に対応する文書識別情報を格納する親情報カラムと、継承子となる構造化文書に対応する文書識別情報を格納する子情報カラムとからなるレコードを少なくとも1つ含む継承関係テーブルと、文書識別情報を格納する識別情報カラムと、予め指定された内容情報の一部分である検索対象領域についてその領域に記述された値を格納する少なくとも1つの検索対象領域カラムと、各検索対象領域カラム毎に該カラム内の値が当該構造化文書の内容部で初めて記述されている場合は真値を取り、それ以外の場合は偽値を取る出現フラグを格納する出現フラグカラムとからなるレコードを少なくとも1つ含む検索インデックステーブルとを格納しており、
前記コンピュータが、
前記検索条件として文書識別情報、または検索対象領域のうちのいくつかとその検索対象領域に記述された値との組によるAND条件、もしくは検索対象領域のうちのいくつかとその検索対象領域に記述された値との組と文書識別情報とによるAND条件、並びに検索対象として前記条件に合致するもののうち継承関係の頂点にあるもののみ取得する際に真値を指定し、それ以外の場合には偽値を指定するかまたは省略される子排除フラグを指定するステップと、
前記検索条件に文書識別情報と子排除フラグのみ指定された場合でかつ子排除フラグに偽値を指定されたまたは省略された場合には、
前記データベースの継承関係テーブルから、親情報カラムに前記指定された文書識別情報を有するレコードの集合を検索して取得するステップと、
該集合に含まれるレコードの子情報カラムに記述された文書識別情報を検索結果とするステップと、
前記検索条件に文書識別情報と子排除フラグのみ指定された場合でかつ子排除フラグに真値を指定された場合には、
前記データベースの継承関係テーブルに、親情報カラムと子情報カラムの双方に前記指定された文書識別情報を有するレコードが存在するか検索するステップと、
レコードが存在する場合のみ該文書識別情報を検索結果とするステップと、
前記検索条件に検索対象領域のうちのいくつかとその検索対象領域に記述された値との組によるAND条件並びに子排除フラグのみを指定された場合でかつ子排除フラグに偽値を指定されたまたは省略された場合には、
前記データベースの検索インデックステーブルから、前記指定された検索対象領域カラムに前記指定された値を有するレコードの集合を検索して取得するステップと、
該集合に含まれるレコードの識別情報カラムに記述された文書識別情報を検索結果とするステップと、
前記検索条件に検索対象領域のうちのいくつかとその検索対象領域に記述された値との組によるAND条件並びに子排除フラグのみを指定された場合でかつ子排除フラグに真値を指定された場合には、
前記データベースの検索インデックステーブルから、前記指定された検索対象領域カラムに前記指定された値を有するレコードの集合を検索して取得するステップと、
該集合に含まれるレコードのうち、前記指定された検索対象領域カラムに対応する出現フラグカラムのうち一つでも真値が格納されているカラムを有するレコードの識別情報カラムに記述された文書識別情報を検索結果とするステップと、
前記検索条件に検索対象領域のうちのいくつかとその検索対象領域に記述された値との組と文書識別情報とによるAND条件並びに子排除フラグを指定された場合でかつ子排除フラグに偽値を指定されたまたは省略された場合には、
前記データベースの継承関係テーブルから、親情報カラムに前記指定された文書識別情報を有するレコードの集合を検索して取得するステップと、
前記データベースの検索インデックステーブルから、識別情報カラムに前記集合に含まれるレコードの子情報カラムに記述された文書識別情報を有し、前記指定された検索対象領域カラムに前記指定された値を有するレコードの第2の集合を検索して取得するステップと、
該第2の集合に含まれるレコードの識別情報カラムに記述された文書識別情報を検索結果とするステップと、
前記検索条件に検索対象領域のうちのいくつかとその検索対象領域に記述された値との組と文書識別情報とによるAND条件並びに子排除フラグを指定された場合でかつ子排除フラグに真値を指定された場合には、
前記データベースの継承関係テーブルから、親情報カラムに前記指定された文書識別情報を有するレコードの集合を検索して取得するステップと、
前記データベースの検索インデックステーブルから、識別情報カラムに前記集合に含まれるレコードの子情報カラムに記述された文書識別情報を有し、前記指定された検索対象領域カラムに前記指定された値を有し、前記指定された検索対象領域カラムに対応する出現フラグカラムのうち一つでも真値が格納されているカラムを有するレコードの第2の集合を検索して取得するステップと、
該第2の集合に要素が存在する場合、そのレコードの識別情報カラムに記述された文書識別情報を検索結果とするステップと、
該第2の集合に要素が存在しない場合、前記データベースの継承関係テーブルに、親情報カラムと子情報カラムの双方に前記指定された文書識別情報を有するレコードが存在するか検索するステップと、
レコードが存在する場合のみ該文書識別情報を検索結果とするステップとを含む
ことを特徴とする構造化文書検索方法。
From the database, a structured document search method for searching a structured document corresponding to the search conditions using computers accessible to the database,
The structured document includes a reference information part and a content part, and the reference information part has zero or no unique document identification information corresponding to each structured document as information for designating a reference destination structured document as an inheritance parent. Contains only one, the content part contains the content information of the structured document,
The database includes a main table including at least one record including a document column storing the structured document and a document identification information column storing document identification information corresponding to the structured document, and a structure serving as an inheritance parent An inheritance relationship table including at least one record including a parent information column storing document identification information corresponding to a structured document and a child information column storing document identification information corresponding to a structured document serving as an inheritor; and a document An identification information column for storing identification information, at least one search target region column for storing a value described in the search target region that is a part of the content information designated in advance, and each search target region column Takes a true value if the value in the column is described for the first time in the content part of the structured document, and takes a false value otherwise. The record consisting of the indication flag column for storing the flag and stores the search index table containing at least one,
The computer is
As the search condition, document identification information, an AND condition based on a combination of some of the search target areas and a value described in the search target area, or some of the search target areas and the search target area are described. Specify the true value when acquiring only the AND condition based on the set of values and the document identification information, and only those at the top of the inheritance relationship that match the above conditions as search targets, otherwise false values Specifying a child exclusion flag that is specified or omitted;
When only document identification information and a child exclusion flag are specified in the search condition and a false value is specified or omitted in the child exclusion flag,
Searching and acquiring a set of records having the specified document identification information in a parent information column from the inheritance relationship table of the database;
Making the document identification information described in the child information column of the records included in the set a search result;
When only document identification information and a child exclusion flag are specified in the search condition and a true value is specified for the child exclusion flag,
Searching for a record having the specified document identification information in both the parent information column and the child information column in the inheritance relationship table of the database; and
Making the document identification information a search result only when a record exists;
When the AND condition and only the child exclusion flag specified by a combination of some of the search target areas and the value described in the search target area are specified in the search condition, and a false value is specified in the child exclusion flag or omitted If
Searching and acquiring a set of records having the specified value in the specified search target area column from the search index table of the database;
Making the document identification information described in the identification information column of the records included in the set a search result;
When the AND condition and only the child exclusion flag specified by a combination of some of the search target areas and the values described in the search target area are specified in the search condition and the true value is specified for the child exclusion flag Is
Searching and acquiring a set of records having the specified value in the specified search target area column from the search index table of the database;
Document identification information described in the identification information column of a record having a column in which at least one of the appearance flag columns corresponding to the specified search target area column is stored among the records included in the set. A search result as a step,
When the AND condition and the child exclusion flag based on the document identification information and a set of some of the search target areas and the values described in the search target area are specified in the search condition, and a false value is specified in the child exclusion flag If omitted or omitted,
Searching and acquiring a set of records having the specified document identification information in a parent information column from the inheritance relationship table of the database;
A record having the document identification information described in the child information column of the record included in the set in the identification information column and the specified value in the specified search target area column from the search index table of the database Retrieving and obtaining a second set of:
Using the document identification information described in the identification information column of the records included in the second set as a search result;
When the AND condition and the child exclusion flag based on the document identification information and a set of some of the search target areas and the values described in the search target area are specified in the search condition, and the true value is specified in the child exclusion flag If
Searching and acquiring a set of records having the specified document identification information in a parent information column from the inheritance relationship table of the database;
From the search index table of the database, the identification information column has document identification information described in the child information column of the record included in the set, and the specified search target area column has the specified value. Searching and acquiring a second set of records having columns in which at least one of the appearance flag columns corresponding to the designated search target area column is stored;
If there is an element in the second set, the document identification information described in the identification information column of the record is taken as a search result;
If there is no element in the second set, searching for a record having the specified document identification information in both the parent information column and the child information column in the inheritance relationship table of the database;
A structured document search method comprising: a step of using the document identification information as a search result only when a record exists.
JP2002133065A 2002-05-08 2002-05-08 Structured document storage method and retrieval method thereof Expired - Lifetime JP4034591B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002133065A JP4034591B2 (en) 2002-05-08 2002-05-08 Structured document storage method and retrieval method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002133065A JP4034591B2 (en) 2002-05-08 2002-05-08 Structured document storage method and retrieval method thereof

Publications (2)

Publication Number Publication Date
JP2003330938A JP2003330938A (en) 2003-11-21
JP4034591B2 true JP4034591B2 (en) 2008-01-16

Family

ID=29696262

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002133065A Expired - Lifetime JP4034591B2 (en) 2002-05-08 2002-05-08 Structured document storage method and retrieval method thereof

Country Status (1)

Country Link
JP (1) JP4034591B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4806209B2 (en) * 2005-05-06 2011-11-02 メキキ・クリエイツ株式会社 Intellectual property protection support system and method, and program

Also Published As

Publication number Publication date
JP2003330938A (en) 2003-11-21

Similar Documents

Publication Publication Date Title
US6915304B2 (en) System and method for converting an XML data structure into a relational database
KR101119290B1 (en) Information processing apparatus, database system, information processing method, and program
US10296657B2 (en) Accessing objects in a service registry and repository
US7765236B2 (en) Extracting data content items using template matching
US8892599B2 (en) Apparatus and method for securing preliminary information about database fragments for utilization in mapreduce processing
Rudolf et al. The graph story of the SAP HANA database
US8229932B2 (en) Storing XML documents efficiently in an RDBMS
EP2041672B1 (en) Methods and apparatus for reusing data access and presentation elements
US7725482B2 (en) Accessing objects in a service registry and repository using subclass inference
US20040098384A1 (en) Method of processing query about XML data using APEX
US8145641B2 (en) Managing feature data based on spatial collections
US20040015486A1 (en) System and method for storing and retrieving data
US7725469B2 (en) System and program products for pruning objects in a service registry and repository
US8275888B2 (en) Indexing heterogeneous resources
WO2018121153A1 (en) Written judgment retrieval method and device
US20090043733A1 (en) Systems and methods for efficiently storing, retrieving and querying data structures in a relational database system
US8380493B2 (en) Association of semantic meaning with data elements using data definition tags
Netz et al. Integration of data mining and relational databases
US11144580B1 (en) Columnar storage and processing of unstructured data
CN110929120A (en) Method and apparatus for managing technical metadata
JP4034591B2 (en) Structured document storage method and retrieval method thereof
CN110879799B (en) Method and device for labeling technical metadata
KR100904890B1 (en) MPEG-7 meta-data storage method suitable for the embedded multimedia device
Wang et al. XStorM: A Scalable Storage Mapping Scheme for XML Data
Yokoyama et al. An access control method based on the prefix labeling scheme for XML repositories

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040316

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070320

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070515

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070703

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070828

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070912

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071025

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

Free format text: PAYMENT UNTIL: 20101102

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4034591

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101102

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111102

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111102

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121102

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121102

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20131102

Year of fee payment: 6

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term