JP4137493B2 - Data management apparatus, program, and recording medium - Google Patents

Data management apparatus, program, and recording medium Download PDF

Info

Publication number
JP4137493B2
JP4137493B2 JP2002109979A JP2002109979A JP4137493B2 JP 4137493 B2 JP4137493 B2 JP 4137493B2 JP 2002109979 A JP2002109979 A JP 2002109979A JP 2002109979 A JP2002109979 A JP 2002109979A JP 4137493 B2 JP4137493 B2 JP 4137493B2
Authority
JP
Japan
Prior art keywords
node
data
descendant
identification information
descendent
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
JP2002109979A
Other languages
Japanese (ja)
Other versions
JP2003303122A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2002109979A priority Critical patent/JP4137493B2/en
Publication of JP2003303122A publication Critical patent/JP2003303122A/en
Application granted granted Critical
Publication of JP4137493B2 publication Critical patent/JP4137493B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
この発明は、階層構造を持つノードによって構成され、各ノードが固有の識別情報とその親ノードの識別情報とを有する形式のデータを管理するデータ管理装置、コンピュータをこのようなデータ管理装置として機能させるためのプログラム及び、このようなプログラムを記録した記録媒体に関する。
【0002】
【従来の技術】
従来から、ファイル管理装置や文書管理装置等のデータ管理装置(あるいはシステム)において、データに階層構造を持たせて管理することが行われている。そして、このような階層構造は、各階層にデータの配置単位としてノードを設け、各ノードに固有のID番号等の識別情報とその親ノードの識別情報とを持たせることにより、ノード自身のデータ量をさほど増加させることなく表現できる。なお、あるノードの親ノードとは、そのノードの直上位に位置するノードのことである。逆に、あるノードの直下位に位置するノードをそのノードの子ノード、子ノードの直下位に位置するノードを孫ノード等と呼ぶ。そして、あるノードより下位にあり、かつそのノードから上位ノードを経由することなく辿れるノードを、そのノードの子孫ノードと呼ぶ。
【0003】
このような階層構造のデータを管理する場合、各ノードについてあらかじめそのノードの子孫ノードを調べ、親ノードとその子孫ノードとの対応データを階層情報として記憶しておくことが考えられる。このようにすることにより、ある特定のノードの子孫ノードすべてを取得する、といったような操作の高速化を図ることができる。
【0004】
ところで、このような方式を採用した場合、通常は実際の階層構造とこの階層情報との間に不整合が生じることはないが、予期しないトラブル等によって不整合が生じてしまうことも考えられる。そして、不整合が生じてしまうとその部分についてはデータへのアクセスが正常に行えなくなる場合があるので、この不整合が生じていないかどうかを必要に応じて検査し、生じていた場合にはその修復を行わなければならない。
このような不整合の検出や修復に関連する技術としては、例えば特開平11−120058号公報に開示されているファイル管理装置や、特開2000−284995号公報に開示されているデータ処理装置が挙げられる。ただし、これらの装置は、ファイルシステムの復旧に関するものであり、階層構造と階層情報との不整合を高速に検出するものではない。
【0005】
【発明が解決しようとする課題】
階層構造と階層情報との不整合を検出する方式としては、例えば、実際の階層構造を辿って検出を行うノードの子孫ノードの情報を取得すると共に、記憶してある階層情報からも同じノードの子孫ノードの情報を取得し、取得したこれらの子孫ノードの情報をそれぞれ配列して、その配列間に差があるか否かを調べる方式が考えられる。
しかし、この方式において、配列間の差の有無を調べる処理、さらには配列の一方にあって一方にない要素を特定する処理は、単純に配列の要素をスキャンしたのでは時間がかかるという問題があった。
この発明は、このような問題を解決し、階層構造を持つノードによって構成され、各ノードが固有の識別情報とその親ノードの識別情報とを有する形式のデータを管理する場合において、実際の階層構造と記憶してある階層情報との整合性を高速に検査できるようにすることを目的とする。
【0006】
【課題を解決するための手段】
上記の目的を達成するため、この発明は、階層構造を持つノードによって構成される形式のデータを管理するデータ管理装置において、各ノードについて固有の整数値からなる識別情報と、そのノードの直上位の親ノードの上記識別情報とをノード情報として記憶する手段と、上記各ノードについて、そのノードよりも下位であり且つそのノードの上位ノードを経由せずに辿れるノードである子孫ノードの各々の上記識別情報を、そのノードの上記識別情報と1対1で対応づけてノード階層情報として記憶する手段と、上記ノード情報をもとに、任意のノードの子孫ノードの上記識別情報を全て収集した第1の子孫ノードデータを作成する第1の子孫ノードデータ作成手段と、上記ノード階層情報をもとに、上記任意のノードの子孫ノードの上記識別情報を全て収集した第2の子孫ノードデータを作成する第2の子孫ノードデータ作成手段と、上記第1の子孫ノードデータ作成手段によって作成された第1の子孫ノードデータを、その第1の子孫ノードデータに含まれる子孫ノードの上記識別情報に従い、その識別情報の値に対応する位置のビットを立てたビットマップ形式のデータに変換する第1の変換手段と、上記第2の子孫ノードデータ作成手段によって作成された第2の子孫ノードデータを、その第2の子孫ノードデータに含まれる子孫ノードの上記識別情報に従い、その識別情報の値に対応する位置のビットを立てたビットマップ形式のデータに変換する第2の変換手段と、上記第1の変換手段によって変換されたビットマップ形式の第1の子孫ノードデータと上記第2の変換手段によって変換されたビットマップ形式の第2の子孫ノードデータとの排他的論理和を求めることにより、上記第1の子孫ノードデータと上記第2の子孫ノードデータとを比較する比較手段とを有することを特徴とする。
【0007】
このようなデータ管理装置において、上記比較手段による比較が不一致だった場合に、その比較結果に基づいて上記ノード階層情報を修正する修正手段をさらに設けるとよい。
【0008】
また、この発明のプログラムは、コンピュータを、階層構造を持つノードによって構成される形式のデータを管理するデータ管理手段と、各ノードについて固有の整数値からなる識別情報と、そのノードの直上位の親ノードの上記識別情報とをノード情報として記憶する手段と、上記各ノードについて、そのノードよりも下位であり且つそのノードの上位ノードを経由せずに辿れるノードである子孫ノードの各々の上記識別情報を、そのノードの上記識別情報と1対1で対応づけてノード階層情報として記憶する手段と、上記ノード情報をもとに、任意のノードの子孫ノードの上記識別情報を全て収集した第1の子孫ノードデータを作成する第1の子孫ノードデータ作成手段と、上記ノード階層情報をもとに、上記任意のノードの子孫ノードの上記識別情報を全て収集した第2の子孫ノードデータを作成する第2の子孫ノードデータ作成手段と、上記第1の子孫ノードデータ作成手段によって作成された第1の子孫ノードデータを、その第1の子孫ノードデータに含まれる子孫ノードの上記識別情報に従い、その識別情報の値に対応する位置のビットを立てたビットマップ形式のデータに変換する第1の変換手段と、上記第2の子孫ノードデータ作成手段によって作成された第2の子孫ノードデータを、その第2の子孫ノードデータに含まれる子孫ノードの上記識別情報に従い、その識別情報の値に対応する位置のビットを立てたビットマップ形式のデータに変換する第2の変換手段と、上記第1の変換手段によって変換されたビットマップ形式の第1の子孫ノードデータと上記第2の変換手段によって変換されたビットマップ形式の第2の子孫ノードデータとの排他的論理和を求めることにより、上記第1の子孫ノードデータと上記第2の子孫ノードデータとを比較する比較手段として機能させるためのものである。
このようなプログラムにおいて、コンピュータを、上記比較手段による比較が不一致だった場合に、その比較結果に基づいて上記ノード階層情報を修正する修正手段として機能させるためのプログラムをさらに含むようにするとよい。
この発明の記録媒体は、上記の各プログラムを記録したコンピュータ読み取り可能な記録媒体である。
【0009】
【発明の実施の形態】
以下、この発明の好ましい実施の形態を図面を参照して説明する。
〔第1の実施形態:図1乃至図10〕
初めに、この発明のデータ管理装置の第1の実施形態である文書管理サーバについて説明する。まず、その概略構成について、図1乃至図6を用いて説明する。図1はその文書管理サーバにおけるこの発明の特徴部分の機能構成を示す機能ブロック図、図2はその文書管理サーバの概略構成を示すブロック図、図3はその文書管理サーバにおけるデータの管理方式について説明するための図、図4は同じく子孫ノードデータの作成について説明するための図、図5は同じく子孫ノードデータの比較について説明するための図、図6は同じく子孫ノードデータのビットマップ形式への変換について説明するための図である。
【0010】
この文書管理サーバ10は、ハードウェア構成としては公知のサーバ装置を用いて構成することができる。すなわち、文書管理サーバ10は、図2に示すように、CPU11,ROM12,RAM13,ハードディスクドライブ(HDD)14,ネットワークインタフェース(I/F)15,データ蓄積手段16を備え、これらがシステムバス17によって接続されている。
CPU11は、この文書管理サーバ10全体を制御する制御部であり、ROM12やHDD14に格納された各種制御プログラムやアプリケーションプログラムを実行して装置の制御、クライアント装置20によるデータへのアクセスの制御、データの管理等の動作を行う。
【0011】
ROM12は、主に装置の制御プログラムを記憶する記憶手段である。そして、RAM13はCPU11のワークメモリや一時的なデータの記憶に用いる記憶手段である。
HDD14は、各種アプリケーションプログラムやデータを記憶する記憶手段である。
ネットワークI/F15は、文書管理サーバ10をインターネットやローカルエリアネットワーク(LAN)等のネットワークに接続するためのインタフェースであり、文書管理サーバ10はこのネットワークI/F15を介してパーソナルコンピュータ(PC)等のクライアント装置20とのデータの授受を行う。
【0012】
データ蓄積手段16は、文書データ等の大量のデータを蓄積・記憶することのできる不揮発性記憶手段であるが、データ蓄積手段16については、HDD14がこの役割を兼ねるようにしてもよい。
なお、図2には操作部や表示部を示していないが、キーボードやマウス等による操作部や、液晶やブラウン管(CRT)による表示部を設け、ユーザからの入力の受付や動作結果の表示を行うことができるようにしてもよい。
【0013】
このような文書管理サーバ10は、データ蓄積手段16に蓄積した文書データの管理を行い、クライアント装置20からの要求に応じて管理下の文書データを送信する装置である。そして、この文書管理サーバ10においては、管理対象である文書データは、図3(a)に示すように階層構造を持つノードの集合として、データ蓄積手段に記憶されている。ここで、ノードとは、データにアクセスする際の所定の単位であり、一般的なファイルシステムにおいてはファイルやフォルダに相当する単位であるが、これより細かい単位をノードとして扱うようにしてもよい。また、この管理動作は、ROM12やHDD14に記憶された所要のデータ管理プログラムを実行してデータ管理手段として機能するCPU11が行う。
【0014】
データ蓄積手段16には、これらのノードの階層構造を管理するためのデータとして、ノードデータとノード階層データとがそれぞれテーブルの形で記憶されている。
ノードデータはノードデータであり、図3(b)に示すように、ノード毎に、固有の整数値からなる識別情報であるノードIDと、ノードの名称と、そのノードの直上位に位置する親ノードのノードIDとで構成されている。この文書管理サーバ10は、このノードデータを参照することによって各ノードの配置を把握することができ、このノードデータはノードの階層構造を定義するための基本的なデータである。
【0015】
一方、ノード階層データは、ノード階層情報であり、図3(c)に示すように、ノードの親子関係に整数値のデータIDを付して記憶させたものである。そして、ノードの親子関係は、親ノードのノードIDと子ノードのノードIDの組み合わせとして記憶される。また、親ノードの直下位の子ノードだけでなく、さらに下位の孫ノード、ひ孫ノード等、親ノードより下位にあり、かつそのノードから上位ノードを経由することなく辿れる子孫ノードは、全てその親ノードの子ノードであるとして親子関係を記憶させている。
このようなノード階層データは、ノードの親子関係及び子孫関係の情報を、ノードデータに含まれる各ノードの親ノードの識別情報を参照して収集することによって作成できる。そして、このようなデータを予め作成して記憶しておくことにより、あるノードの下位に位置する全てのノードを抽出する処理を高速に行うことができるようになり、範囲を限定したノードの検索や、ノード階層構造の組換え等の処理を高速に行うことができる。
【0016】
これらのノードデータとノード階層データは、通常は整合性が保たれるように管理されているが、予期しないトラブル等によって不整合が生じてしまうことがある。このような場合にはノードの階層構造が正しく認識できなくなり、文書管理動作に支障を来すことになるので、この不整合が生じていないかどうかを必要に応じて検査しなければならない。この検査を高速に行うことができるようにした点がこの発明の特徴である。
【0017】
この高速な検査の処理は、CPU11にROM12あるいはHDD14等に記憶している所要のプログラムを実行させ、図1に示した各部の機能を果たさせることによって実現している。ここで、その機能について説明する。
まず、整合性検査要求受付部101は、所定の時間毎、所定のイベントが生じる毎、あるいはユーザの指示等により整合性検査処理が要求された場合、その要求を受け付ける。そして、ノード抽出部102にその旨を伝達する機能を有する。
【0018】
ノード抽出部102は、整合性検査要求受付部101から検査処理要求が伝達された場合、ノードデータテーブル111からノードIDを順次抽出し、検査対象ノードとして階層情報再作成部103及び階層情報抽出部104に伝達する機能を有する。
階層情報再作成部103は、検査対象ノードの子孫ノードのノードIDをノードデータテーブル111を参照して全て収集し、図4(a)に示すように配列の形式にまとめて検査対象ノードの子孫ノードを示す第1の子孫ノードデータを作成する機能を有する。この収集は例えば、まず対象ノードを親ノードとするノードを全て抽出し、次に抽出したノードを親ノードとするノードを全て抽出し・・・、という工程を、抽出できるノードがなくなるまで行うことによって実現できる。
【0019】
階層情報抽出部104は、検査対象ノードの子孫ノードのノードIDを、ノード階層データテーブル112を参照して全て収集し、図4(b)に示すように配列の形式にまとめて検査対象ノードの子孫ノードを示す第2の子孫ノードデータを作成する機能を有する。この収集は例えば、ノード階層データテーブル112において対象ノードを親ノードとする親子関係(子孫関係)を全て抽出することによって実現できる。
ビットマップ化処理部105は、階層情報再作成部103の作成した第1の子孫ノードデータおよび階層情報抽出部104の作成した第2の子孫ノードデータを、それぞれ配列形式のデータからビットマップ形式のデータに変換する機能を有する。ここで、ビットマップ形式のデータとは、所定の個数の0又は1の値を持つデータ(ビット)によって構成されるデータのことである。そして、ビットマップ形式への変換は、例えば図6に示すように、ノードIDの最大値の数だけ0のビットを持つビットマップを用意し、配列に含まれるノードID番目(図の例では2番目,3番目,4番目)のビットに1をセットすることによって行うことができる。なお、ここでは、図で左側のビットから順に、1番目,2番目,・・・としている。
【0020】
ビットマップ比較部106は、ビットマップ化処理部105によって変換されたビットマップ形式の第1の子孫ノードデータとビットマップ形式の第2の子孫ノードデータとを比較する機能を有する。この比較は、2つのビットマップについての排他的論理和を求めることによって行うことができる。
排他的論理和は、対応するビットが同じであれば0、異なれば1になるので、図4及び図6に示したようにノードデータとノード階層データに不整合がない場合には、両者から得た子孫ノードデータは一致し、表1(a)に示すように排他的論理和は全てのビットで0となる。一方、不整合が起きている場合には、両者から得た子孫ノードデータには異なる部分があるので、表1(b)及び(c)に示すように、その部分のビットで排他的論理和が1となる。
【0021】
【表1】

Figure 0004137493
【0022】
結果表示・記憶部107は、ビットマップ比較部106による比較結果を表示手段に表示させたり記憶手段に記憶させたりする機能を有する。すなわち、例えば不整合があった場合にその旨や箇所を知らせるメッセージを表示させたり、ログにその旨を記録したりする。不整合がなかった場合でも、その旨のメッセージを表示させるようにしてもよい。
以上の各部により、ノード抽出部102が抽出した全てのノードについて第1の子孫ノードデータと第2の子孫ノードデータとを比較することにより、ノード階層構造全体について、ノードデータとノード階層データとの間で不整合が生じていないか否かを検査することができる。
【0023】
ここで、この検査処理を高速で行うために、第1の子孫ノードデータと第2の子孫ノードデータとの比較処理を高速で行うことが重要となる。
単純にこれらを配列形式のデータのままで比較することを考えてみると、例えば図5に示すように、第1の子孫ノードデータの配列に含まれる要素の1つ1つについて、第2の子孫ノードデータの配列の要素と順次比較(スキャン)し、同じ要素がある(ヒットする)か否かを確認しなければならない。その処理に必要な時間は、最悪の場合、(第1の子孫ノードデータの配列の要素数)×(第2の子孫ノードデータの配列全体のスキャンにかかる時間)に比例する。
【0024】
また、第2の子孫ノードデータの配列に第1の子孫ノードデータに含まれない余計なデータがあるか否かを確認するためには、両者の立場を入れ替えて再度スキャンを行うか、第2の子孫ノードデータの配列をスキャンした時にヒットした要素を何らかの手段で記憶しておき、あとで全ての要素がヒットしているか否かを確認する必要がある。
このように、配列形式のデータのままで比較処理を行うと、比較に多くの処理が必要になる。
【0025】
これに対しこの発明では、図6に示すように、配列形式の子孫ノードデータを一旦ビットマップ形式のデータに変換してから比較を行うようにしている。ビットマップ形式への変換は、配列の各要素を一度ずつ参照するだけで行うことができる。そして、ビットマップ同士の比較はコンピュータシステムの基礎となっているビット演算によって排他的論理和を求めることによって行うことができるので、ハードウェアでの高速動作が実現可能である。従って、配列形式のデータのままで比較を行う場合に比べて処理量をおよそ配列の要素数分の1に低減できるので、高速に比較を実行でき、ひいては整合性の検査も高速に行うことができる。
【0026】
次に、図7乃至図10のフローチャートも用いて、この文書管理サーバにおけるノードデータとノード階層データとの整合性検査の処理について、さらに詳しく説明する。図7乃至図10は、この整合性検査の処理を示すフローチャートである。
整合性検査処理の要求があると、CPU11はその要求を受け付ける。この処理要求の受け付けは、CPU11がROM12あるいはHDD14等に記憶しているデータ管理プログラムの一部を実行することによって常に行っている。
そして、この要求を受けると、CPU11は、データ管理プログラムの他の部分も実行し、図7のフローチャートに示す処理を開始する。すなわちCPU11は、データ管理プログラムに含まれる適当なプログラムを実行することにより、以下に説明する各手段として機能する。
【0027】
まず、ステップS1でノードデータを参照して初めのノードのノードIDを取得し、そのノードを検査対象とする。ここで、どのノードを初めとしてもよいが、例えば、ノードIDの最も小さいものとすればよい。
次のステップS2では、ノードがあったか否か判断するが、通常初めはノードがあるので、次のステップS3に進み、検査対象のノードについての第1の子孫ノードデータ作成処理を行う。この処理は、図8に示すものであるが、詳細については後述する。ここでは、CPU11が第1の子孫ノードデータ作成手段として機能する。
【0028】
次に、ステップS4で、検査対象のノードについての第2の子孫ノードデータ作成処理を行う。この処理は、図9に示すものであるが、詳細については後述する。ここでは、CPU11が第2の子孫ノードデータ作成手段として機能する。これらのステップS3とステップS4で作成された第1及び第2の子孫ノードデータは、配列形式のデータであるが、次のステップS5では、これらのデータをそれぞれビットマップ形式のデータに変換する。この変換処理は、図10に示すものであるが、詳細については後述する。ここでは、CPU11が第1及び第2の変換手段として機能する。
【0029】
次に、ステップS6に進み、変換後の第1の子孫ノードデータと変換後の第2の子孫ノードデータとを比較する。この比較は、既に述べたように2つのデータの排他的論理和を求めることによって行うことができる。ここでは、CPU11が比較手段として機能する。
そして、ステップS7に進んで相違があるか否か判断し、相違があればステップS8に進んでその相違を表示手段に表示させたり記憶手段に記憶させたりする。すなわち、例えば不整合があった場合にその旨や箇所を知らせるメッセージを表示させたり、ログにその旨を記録したりする。不整合がなかった場合でも、その旨のメッセージを表示させるようにしてもよい。
【0030】
その後、ステップS9に進む。ステップS7で相違がなければ、そのままステップS9に進む。
ステップS9では、ノードデータを参照して次のノードのノードIDを取得し、そのノードを検査対象とする。ここで、次に取得すべきノードは、任意の基準で定めればよい。
そして、ステップS2に戻り、取得するノードがあったか否か判断する。あれば、ステップS3以降の処理を繰り返し、なければ、全てのノードについて整合性の検査が終了したものと判断して処理を終了する。
【0031】
次に、図7のステップS3における第1の子孫ノードデータ作成処理について、図3に示した構成のノードにおいてノードAが検査対象のノード(対象ノード)である場合の処理例も交えて説明する。
第1の子孫ノードデータ作成処理は、図8のフローチャートに示す処理であり、まずステップS11で、ノードデータを検索して対象ノードを親ノードとするノードのノードIDを抽出する。この抽出は、ノードデータがSQL(Structured Query Language)に対応したデータベーステーブルに記憶されている場合には、例えば表2に示したスキーマ定義と検索文とを用いて行うことができる。そして、図3に示した例でノードAが対象であると、ノードBとノードCのノードIDとして「2」と「3」が抽出される。
【0032】
【表2】
Figure 0004137493
【0033】
次に、ステップS12でノードIDが抽出できたか否か判断する。そして、できていれば、ステップS13に進んで抽出結果から初めのノードIDを選択する。ここでも、初めにどのノードIDを選択してもよいが、例えば、ノードIDの最も小さいものを選択すればよい。ここでは「2」となる。
次に、ステップS14でノードIDが選択できたか否か判断する。そして、できていれば、ステップS15で第1の子孫ノードデータの配列に選択したノードIDをセット(追加)する。そして、ステップS16に進み、選択したノードIDのノードを対象ノードとして第1の子孫ノードデータ作成処理、すなわちこの図8のフローチャートの処理を再帰的に実行する。
【0034】
この再帰実行は再びステップS11から開始するが、ここでは対象ノードはノードB(ID「2」)であるので、ノードDのノードIDとして「4」が抽出される。そして、ステップS12,S13と進んでこの「4」が選択され、ステップS15でこの値が第1の子孫ノードデータの配列にセットされる。なお、第1の子孫ノードデータの配列は1つであり、初めの実行時も再帰実行時も、同一の配列に対してセットが行われる。ただし、新たに図7のステップS3の処理を開始する場合にリセットすることは、もちろんである。
そしてステップS16では、今度は対象ノードをノードD(ID「4」)として第1の子孫ノードデータ作成処理を再度再帰実行する。
【0035】
この再帰実行は再びステップS11から開始するが、ここでは対象ノードはノードD(ID「4」)であるので、これを親ノードとするノードはなく、ステップS11ではノードIDが抽出されない。
従って、ステップS12の判断はNOになるので、元の処理に戻る。すなわち、1段階前のノードBを対象ノードとする第1の子孫ノードデータ作成処理のステップS16に戻り、ステップS17に進む。
【0036】
このステップS17では、ステップS11での抽出結果から次のノードIDを選択する。ここで、次に抽出すべきノードは任意の基準で定めればよいが、ノードBを対象ノードとする処理においては、ステップS11で抽出したノードIDは「4」のみである。従って、選択対象がないことになる。
そこで、そのままステップS14に戻るが、ここでの判断はNOになり、再度元の処理に戻る。すなわち、1段階前のノードAを対象ノードとする第1の子孫ノードデータ作成処理のステップS16に戻り、ステップS17に進む。
【0037】
このステップS17では、ステップS11での抽出結果から次のノードIDを選択するが、ノードAを対象ノードとする処理においてはステップS11で抽出したノードIDは「2」と「3」であるので、まだ選択していない「3」を選択することになる。
そして、ステップS14に戻り、ここでの判断はYESとなるのでステップS15に進んで選択した「3」を第1の子孫ノードデータの配列にセットする。
ステップS16では、今度は対象ノードをノードC(ID「3」)として第1の子孫ノードデータ作成処理を再帰実行するが、この処理で抽出されるノードIDはないので、説明を省略する。
【0038】
そしてステップS17に進むが、もう選択すべきノードIDはないのでそのままステップS14に戻り、ここでの判断がNOになるので、元の処理に戻る。すなわち、第1の子孫ノードデータ作成処理を終了して図7の処理に戻る。
説明に用いた例の場合、処理の終了時に第1の子孫ノードデータの配列には「2」,「3」,「4」がセットされており、これがこの処理によって作成された第1の子孫ノードデータである。なお、このデータは最終的にはビットマップ形式に変換して用いるので、この時点でのノードIDの配列順は、どのような順番であっても構わない。
【0039】
次に、図7のステップS4における第2の子孫ノードデータ作成処理について、図3に示した構成のノードにおいてノードAが対象ノードである場合の処理例も交えて説明する。
第2の子孫ノードデータ作成処理は、図9のフローチャートに示す処理であり、まずステップS21で、ノード階層データを検索して対象のノードを親ノードとする組み合わせの子ノードIDを抽出する。この抽出は、ノード階層データがSQL(Structured Query Language)に対応したデータベーステーブルに記憶されている場合には、例えば表3に示したスキーマ定義と検索文とを用いて行うことができる。そして、図3に示した例でノードAが対象であると、ノードID「1」を親ノードとする子ノードのIDとして「2」,「3」,「4」が抽出される。
【0040】
【表3】
Figure 0004137493
【0041】
そして、ステップS22で第2の子孫ノードデータの配列に抽出したノードIDをセット(追加)する。以上で第2の子孫ノードデータ作成処理は終了し、元の処理すなわち図7の処理に戻る。ノード階層データには、直接の親子関係だけでなく、子孫関係のデータも含まれているので、ノードデータを参照する場合の用に再帰的な検索を行う必要がなく、このような簡単な処理で子孫ノードデータを作成できるのである。
説明に用いた例の場合、処理の終了時に第2の子孫ノードデータの配列には「2」,「3」,「4」がセットされており、これがこの処理によって作成された第2の子孫ノードデータである。なお、このデータについても、最終的にはビットマップ形式に変換して用いるので、この時点でのノードIDの配列順は、どのような順番であっても構わない。
【0042】
次に、図7のステップS5における変換処理について、図6に示した子孫ノードデータを変換する場合の処理例も交えて説明する。
変換処理は、図10のフローチャートに示す処理であり、まずステップS31で、変換対象の子孫ノードデータの配列から初めの要素(ノードID)を取得する。
そして、ステップS32に進んで取得できたか否か判断する。あれば、ステップS33に進み、ビットマップの取得したノードID番目のビットに「1」をセットする。例えば取得したノードIDが「2」であれば2番目、「3」であれば3番目のビットに「1」をセットする。なお、ビットマップの初期値としては、第1及び第2の子孫ノードデータの配列に含まれる最大のノードIDの数だけ「0」のビットを並べたデータを用意しておくものとする。例えば、図6に示す例の場合には、最大のノードIDは「4」であるので、4個の「0」を並べたデータを用意しておく。
【0043】
次に、ステップS34に進み、配列の次の要素を取得してステップS32に戻る。ステップS34で要素を取得できた場合には、ステップS32の判断がYESとなるのでステップS33以降の処理を繰り返すが、次の要素がなくて取得できなかった場合には、NOとなるので、全ての要素についての処理が終了したものとして変換処理を終了し、もとの処理に戻る。
ここで、図7のステップS5では、第1の子孫ノードデータと第2の子孫ノードデータのそれぞれについて、図10の変換処理を実行するものとする。
また、この変換処理においては、配列の要素をどのような順で取得しても、最終的には各要素に対応したビットに「1」をセットしたデータを生成することができる。従って、配列形式の状態で各要素がどのような順で並んでいても、同じ要素によって構成されていれば、生成されるビットマップは同一になる。
【0044】
この文書管理サーバ10は、以上のような処理を行い、配列形式の子孫ノードデータを一旦ビットマップ形式のデータに変換してから比較を行うようにしたことにより、上述のように、配列形式のデータのままで比較を行う場合に比べて処理量をおよそ配列の要素数分の1に低減できるので、高速に比較を実行でき、ひいてはノードデータとノード階層データとの整合性すなわち実際の階層構造と記憶してある階層情報と整合性の検査も高速に行うことができる。
なお、図7のフローチャートの処理において、ステップS3乃至ステップS5の処理は必ずしもこの順で行う必要はない。例えば、第2の子孫ノードデータを先に作成するようにしてもよいし、作成した子孫ノードデータをただちに変換処理に供するようにしてもよい。
【0045】
〔第2の実施形態:図11乃至図15〕
次に、この発明のデータ管理装置の第2の実施形態である文書管理サーバについて説明する。図11はその文書管理サーバにおけるこの発明の特徴部分の機能構成を示す機能ブロック図、図12及び図13はその文書管理サーバにおける誤りのあるノード階層データの例を示す図、図14及び図15はこの文書管理サーバにおけるノードデータとノード階層データとの整合性検査の処理を示すフローチャートである。
この実施形態の文書管理サーバは、機能構成としてはノード階層データ修正部108を設けた点が異なるのみであり、CPU11による処理もこの点に伴って変更が加えられたのみであり、他の点は第1の実施形態の文書管理サーバ10と同様であるので、相違点以外の説明は簡単にするか省略する。また、第1の実施形態の文書管理サーバ10と対応する構成には同一の符号を用いる。
【0046】
この実施形態の文書管理サーバにおけるノード階層データ修正部108は、ビットマップ比較部106における比較結果とビットマップ形式の第1の子孫ノードデータとに基づいてノード階層データの修正を行う機能を有する。
具体例を挙げると、例えば図3に示したノード階層構成において、ノード階層データが図12に示すものであった場合、データIDが「4」のデータは、実際の階層構成と対応しておらず、誤ったデータである。このような状態で整合性検査を行うと、ノードIDが「1」のノードAを対象としたとき、表4に示すように、ノードデータを参照して作成する第1の子孫ノードデータは「01110」に、ノード階層データを参照して作成する第2の子孫ノードデータは「01111」になるので、比較結果の排他的論理和に1のビットが出現し、不整合が検出される。
【0047】
【表4】
Figure 0004137493
【0048】
ここで、1のビットは5番目であることから、ノードIDが「5」のノードについての子孫関係に不整合があることがわかる。一方、第1の子孫ノードデータの5番目のビットは「0」であるので、必然的に第2の子孫ノードデータの5番目のビットは「1」であり、実際にはノードIDが「5」のノードはノードAの子孫ノードではなく、ノード階層データに余分なデータが含まれているのだということがわかる。従って、ノード階層データ修正部108は、親ノードIDが「1」,子ノードIDが「5」であるノード階層データを削除する修正を行うことにより、不整合を解消することができる。この修正は、例えばノード階層データが、SQLに対応し、表3に示したスキーマ定義を用いたデータベーステーブルに記憶されている場合には、
delete NodeHierarchyData where ParentID = 1 and ChildID = 5
のようなコマンドによって実行できる。
【0049】
別の例として、例えば図3に示したノード階層構成において、ノード階層データが図13に示すものであった場合、親ノードIDが「1」,子ノードIDが「4」であるデータが不足している。このような状態で整合性検査を行うと、ノードIDが「1」のノードAを対象としたとき、表5に示すように、ノードデータを参照して作成する第1の子孫ノードデータは「0111」に、ノード階層データを参照して作成する第2の子孫ノードデータは「0110」になるので、やはり比較結果の排他的論理和に1のビットが出現し、不整合が検出される。
【0050】
【表5】
Figure 0004137493
【0051】
ここで、1のビットは4番目であることから、ノードIDが「4」のノードについての子孫関係に不整合があることがわかる。一方、第1の子孫ノードデータの4番目のビットは「1」であるので、必然的に第2の子孫ノードデータの4番目のビットは「0」であり、実際にはノードIDが「4」のノードはノードAの子孫ノードであるのに、ノード階層データに対応するデータが含まれていないことがわかる。従って、ノード階層データ修正部108は、親ノードIDが「1」,子ノードIDが「4」であるノード階層データを追加する修正を行うことにより、不整合を解消することができる。この修正は、例えばノード階層データが、SQLに対応し、表3に示したスキーマ定義を用いたデータベーステーブルに記憶されている場合には、
insert into NodeHierarchyData (ID, ParentID, ChildID) values (4, 1, 4)のようなコマンドによって実行できる。
【0052】
このように、ノード階層データ修正部108は、比較結果の排他的論理和で「1」が立っているビットの位置によって不整合に係る子孫ノードのIDを取得し、第1の子孫ノードデータの対応するビットを参照することによってノード階層データに追加が必要か削除が必要かを判断して、適切な修正を行うことができる。
なお、ノードデータを修正しないのは、このデータがノードの階層構造を定義するための基本的なデータであり、このデータを変更すると、階層構造そのものを変更することになってしまうためである。一方、ノード階層データは、ノードデータを参照して作成されたものであり、階層構造を効率よく把握するためのデータであるので、こちらを変更しても階層構造を変更することにはならない。
【0053】
次に、この文書管理サーバにおけるノードデータとノード階層データの整合性検査の処理について、フローチャートも用いてさらに詳しく説明する。
整合性検査処理の要求があると、CPU11はその要求を受け付ける。この処理要求の受け付けは、CPU11がROM12あるいはHDD14等に記憶しているデータ管理プログラムの一部を実行することによって常に行っている。
そして、この要求を受けると、CPU11は、データ管理プログラムの他の部分も実行し、図14のフローチャートに示す処理を開始する。すなわちCPU11は、データ管理プログラムに含まれる適当なプログラムを実行することにより、以下に説明する各手段として機能する。
【0054】
図14のフローチャートに示す処理は、ステップS7で相違があった場合にステップS8の処理の次にステップS41のノード階層データ修正処理を行う点を除き、第1の実施形態で図7乃至図10のフローチャートを用いて説明した処理と同様であるので、このノード階層データ修正処理についてのみ説明する。この処理においては、CPU11が修正手段として機能する。
【0055】
ノード階層データ修正処理は、図15のフローチャートに示す処理である。
ここでは、まずステップS51で、比較結果の排他的論理和のビットマップから初めのビットを取得する。
そして、ステップS52で最後のビットを越えたか否か判断する。超えていなければ、ステップS53に進み、取得したビットが1であるか否か判断する。1であれば、そのビットに対応するノードについて不整合があったと判断してステップS54に進み、第1の子孫ノードデータのビットマップの対応ビットを参照する。
【0056】
次に、ステップS55でそのビットが0であるか判断する。0であれば、ノード階層データに余分なデータが含まれていたものと判断し、ステップS56に進む。そして、ノード階層データから、その時点での検査対象ノードを親ノードとし、ステップS54で参照したビットに対応するノード(例えばその時点で参照しているビットが4番目のビットであれば、ノードIDが「4」のノード)を子孫ノードとするデータを削除する。そして、ステップS58に進んで比較結果の排他的論理和のビットマップから次のビットを取得してステップS52に戻り、処理を繰り返す。
【0057】
ステップS55で0でなければ、ノード階層データに必要なデータが不足していたものと判断し、ステップS57に進む。そして、ノード階層データに、その時点での検査対象ノードを親ノードとし、ステップS54で参照したビットに対応するノードを子孫ノードとするデータを追加する。そして、ステップS58に進んで比較結果の排他的論理和のビットマップから次のビットを取得してステップS52に戻り、処理を繰り返す。
ステップS53で1でなかった場合には、そのままステップS58に進んで比較結果の排他的論理和のビットマップから次のビットを取得し、ステップS52に戻って処理を繰り返す。
ステップS52で最後のビットを越えていれば、現在の検査対象ノードについて必要な修正は全て完了したと判断し、元の図14の処理に戻る。
【0058】
この実施形態の文書管理サーバは、以上のような処理を行い、比較結果のビットマップを参照してノード階層データの不整合箇所を特定して修正を行うようにしたので、実際の階層構造と記憶してある階層情報との整合性の検査のみならず、不整合箇所の修正も高速に行うことができる。
【0059】
なお、以上説明した各実施形態において、データ蓄積手段16に蓄積した文書データの管理を行う文書管理サーバ10を例として説明したが、HDD14等に格納したデータも一括して管理するようにしてもよいことはもちろんであり、外部の装置のものも含め、複数の記憶手段に記憶しているデータを一括して管理するようにしてもよい。これ以外にも、この発明のデータ管理装置は文書管理サーバに限られるものではもちろんなく、階層構造を持つノードによって構成される何らかのデータを管理する装置であればどのようなものにでも適用できることは、もちろんである。
【0060】
また、上述した文書管理サーバ10のCPU11を上述した各手段として機能させるためのプログラムは、予め文書管理サーバ10のHDD14等に記憶させておくほか、記録媒体であるCD−ROMあるいは光磁気(MO)ディスク,ミニディスク(MD),DVD(Digital Versatile Disk),フレキシブルディスク,磁気テープ,HDD等の不揮発性記録媒体(メモリ)にプログラムソースや実行形式のバイナリデータとして記録して提供することもできる。そのメモリに記録されたプログラムを文書管理サーバ10にインストールしてCPU11に実行させるか、CPU11にそのメモリからこのプログラムを読み出して実行させることにより、上述した各手段として機能させることができる。
さらに、このプログラムを記録した記録媒体を備える外部機器あるいはこのプログラムを記憶手段に記憶した外部機器からダウンロードして実行させることも可能である。
【0061】
【発明の効果】
以上説明してきたように、この発明のデータ管理装置によれば、ノードの階層構造と記憶してある階層情報との整合性の検査を簡単な処理で行うことができるので、高速に検査を行うことができる。
また、この発明のプログラムによれば、コンピュータを上記のようなデータ管理装置として機能させることができる。
また、この発明の記録媒体によれば、上記のプログラムを記憶していないコンピュータにそのプログラムを記憶させ、その実行によって上記のようなデータ管理装置として機能させることができる。
【図面の簡単な説明】
【図1】この発明のデータ管理装置の第1の実施形態である文書管理サーバにおけるこの発明の特徴部分の機能構成を示す機能ブロック図である。
【図2】その文書管理サーバの概略構成を示すブロック図である。
【図3】その文書管理サーバにおけるデータの管理方式について説明するための図である。
【図4】同じく子孫ノードデータの作成について説明するための図である。
【図5】同じく子孫ノードデータの比較について説明するための図である。
【図6】同じく子孫ノードデータのビットマップ形式への変換について説明するための図である。
【図7】この発明のデータ管理装置の第1の実施形態である文書管理サーバにおける整合性検査の処理を示すフローチャートである。
【図8】図7のフローチャートに示した第1の子孫ノードデータ作成処理の内容を示すフローチャートである。
【図9】図7のフローチャートに示した第2の子孫ノードデータ作成処理の内容を示すフローチャートである。
【図10】図7のフローチャートに示した変換処理であるビットマップ化処理の内容を示すフローチャートである。
【図11】この発明のデータ管理装置の第2の実施形態である文書管理サーバにおけるこの発明の特徴部分の機能構成を示す機能ブロック図である。
【図12】その文書管理サーバにおける誤りのあるノード階層データの例を示す図である。
【図13】その別の例を示す図である。
【図14】この発明のデータ管理装置の第2の実施形態である文書管理サーバにおける整合性検査の処理を示すフローチャートである。
【図15】図14のフローチャートに示したノード階層データ修正処理の内容を示すフローチャートである。
【符号の説明】
10:文書管理サーバ 11:CPU
12:ROM 13:RAM
14:HDD 15:ネットワークI/F
16:データ蓄積手段 17:システムバス
101:整合性検査要求受付部 102:ノード抽出部
103:階層情報再作成部 104:階層情報抽出部
105:ビットマップ化処理部
106:ビットマップ比較部
107:結果表示・記憶部
108:ノード階層データ修正部
111:ノードデータテーブル
112:ノード階層データテーブル[0001]
BACKGROUND OF THE INVENTION
The present invention is a data management device configured by nodes having a hierarchical structure, each of which manages data in a format having unique identification information and identification information of its parent node, and a computer functions as such a data management device And a recording medium on which such a program is recorded.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, data management devices (or systems) such as file management devices and document management devices have managed data with a hierarchical structure. In such a hierarchical structure, a node is provided as a data arrangement unit in each hierarchy, and each node has identification information such as a unique ID number and identification information of its parent node. It can be expressed without increasing the amount. A parent node of a certain node is a node located immediately above that node. Conversely, a node located immediately below a certain node is called a child node of the node, and a node located immediately below the child node is called a grandchild node or the like. A node that is lower than a certain node and that can be traced from that node without going through an upper node is called a descendant node of that node.
[0003]
When managing data having such a hierarchical structure, it is conceivable that for each node, the descendant node of the node is examined in advance, and the correspondence data between the parent node and the descendant node is stored as hierarchical information. By doing so, it is possible to speed up operations such as obtaining all descendant nodes of a specific node.
[0004]
By the way, when such a method is adopted, inconsistency does not usually occur between the actual hierarchical structure and this hierarchical information, but inconsistency may occur due to an unexpected trouble or the like. And if inconsistency occurs, it may not be possible to access the data normally for that part, so check if this inconsistency has occurred and if it occurs, The repair must be done.
As a technique related to such inconsistency detection and repair, for example, there are a file management device disclosed in Japanese Patent Laid-Open No. 11-120058 and a data processing device disclosed in Japanese Patent Laid-Open No. 2000-28495. Can be mentioned. However, these apparatuses are related to the restoration of the file system, and do not detect inconsistencies between the hierarchical structure and the hierarchical information at high speed.
[0005]
[Problems to be solved by the invention]
As a method for detecting inconsistency between the hierarchical structure and the hierarchical information, for example, the information of the descendant nodes of the node to be detected by tracing the actual hierarchical structure is acquired, and the same node is also obtained from the stored hierarchical information. A method is conceivable in which information on descendant nodes is acquired, information on these acquired descendant nodes is arranged, and whether there is a difference between the arrangements is determined.
However, in this method, the process of checking for the presence or absence of differences between arrays, and the process of identifying elements that are not in one of the arrays, take a long time simply by scanning the elements of the array. there were.
The present invention solves such a problem, and is configured by nodes having a hierarchical structure, and each node manages data in a format having unique identification information and identification information of its parent node. It is an object of the present invention to enable high-speed inspection of the consistency between the structure and stored hierarchical information.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, the present invention provides a data management apparatus for managing data in a format composed of nodes having a hierarchical structure. An integer value With identification information , Directly above that node Parent node the above Means for storing identification information as node information; For each of the above nodes, the identification information of each descendant node that is a node lower than that node and that can be traced without going through the upper node of the node is associated with the identification information of the node in a one-to-one correspondence. The Descending node of any node based on the means to store as node hierarchy information and the above node information Collected all the above identification information First descendant node data creating means for creating first descendant node data, and a descendant node of the arbitrary node based on the node hierarchy information Collected all the above identification information Second descendant node data creating means for creating second descendant node data; the above First descendant node data created by the first descendant node data creating means In accordance with the identification information of the descendant node included in the first descendant node data, the bit at the position corresponding to the value of the identification information is set First conversion means for converting into bitmap format data; the above Second descendant node data created by the second descendant node data creation means In accordance with the above-mentioned identification information of the descendant node included in the second descendant node data, the bit at the position corresponding to the value of the identification information is set A second conversion means for converting the data into the bitmap format; a first descendant node data in the bitmap format converted by the first conversion means; and a bitmap format converted by the second conversion means. Second descendant node data and By calculating the exclusive OR of the first descendant node data and the second descendant node data, And a comparison means for comparing.
[0007]
like this In the data management apparatus, when the comparison by the comparison means does not match, it is preferable to further provide a correction means for correcting the node hierarchy information based on the comparison result.
[0008]
Further, the program of the present invention includes a data management means for managing data in a format composed of nodes having a hierarchical structure, and a program specific to each node. An integer value With identification information , Directly above that node Parent node the above Means for storing identification information as node information; For each of the above nodes, the identification information of each descendant node that is a node lower than that node and that can be traced without going through the upper node of the node is associated with the identification information of the node in a one-to-one correspondence. The Descending node of any node based on the means to store as node hierarchy information and the above node information Collected all the above identification information First descendant node data creating means for creating first descendant node data, and a descendant node of the arbitrary node based on the node hierarchy information Collected all the above identification information Second descendant node data creating means for creating second descendant node data; the above First descendant node data created by the first descendant node data creating means In accordance with the identification information of the descendant node included in the first descendant node data, the bit at the position corresponding to the value of the identification information is set First conversion means for converting into bitmap format data; the above Second descendant node data created by the second descendant node data creation means In accordance with the above-mentioned identification information of the descendant node included in the second descendant node data, the bit at the position corresponding to the value of the identification information is set A second conversion means for converting the data into the bitmap format; a first descendant node data in the bitmap format converted by the first conversion means; and a bitmap format converted by the second conversion means. Second descendant node data and By calculating the exclusive OR of the first descendant node data and the second descendant node data, It is for functioning as a comparison means for comparing.
In such a program, it is preferable that the computer further includes a program for causing the computer to function as a correction unit that corrects the node hierarchy information based on the comparison result when the comparison by the comparison unit does not match.
The recording medium of the present invention is a computer-readable recording medium on which the above programs are recorded.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
Preferred embodiments of the present invention will be described below with reference to the drawings.
[First Embodiment: FIGS. 1 to 10]
First, a document management server which is a first embodiment of the data management apparatus of the present invention will be described. First, the schematic configuration will be described with reference to FIGS. FIG. 1 is a functional block diagram showing a functional configuration of a characteristic part of the present invention in the document management server, FIG. 2 is a block diagram showing a schematic configuration of the document management server, and FIG. 3 is a data management method in the document management server. FIG. 4 is a diagram for explaining generation of descendant node data, FIG. 5 is a diagram for explaining comparison of descendant node data, and FIG. 6 is also a bitmap format of descendant node data. It is a figure for demonstrating conversion of these.
[0010]
The document management server 10 can be configured using a known server device as a hardware configuration. That is, the document management server 10 includes a CPU 11, a ROM 12, a RAM 13, a hard disk drive (HDD) 14, a network interface (I / F) 15, and data storage means 16 as shown in FIG. It is connected.
The CPU 11 is a control unit that controls the entire document management server 10, executes various control programs and application programs stored in the ROM 12 and the HDD 14, controls the apparatus, controls access to data by the client apparatus 20, and data Operations such as management are performed.
[0011]
The ROM 12 is a storage unit that mainly stores a control program for the apparatus. The RAM 13 is a storage means used for the work memory of the CPU 11 and temporary data storage.
The HDD 14 is a storage unit that stores various application programs and data.
The network I / F 15 is an interface for connecting the document management server 10 to a network such as the Internet or a local area network (LAN). The document management server 10 is connected to the personal computer (PC) or the like via the network I / F 15. Data exchange with the client device 20 is performed.
[0012]
The data storage unit 16 is a non-volatile storage unit that can store and store a large amount of data such as document data. However, the HDD 14 may also serve as the data storage unit 16.
2 does not show an operation unit or a display unit, but an operation unit such as a keyboard or a mouse or a display unit such as a liquid crystal or a cathode ray tube (CRT) is provided to accept an input from a user and display an operation result. You may be able to do that.
[0013]
Such a document management server 10 is a device that manages document data stored in the data storage unit 16 and transmits document data under management in response to a request from the client device 20. In the document management server 10, the document data to be managed is stored in the data storage means as a set of nodes having a hierarchical structure as shown in FIG. Here, the node is a predetermined unit for accessing data, and is a unit corresponding to a file or folder in a general file system, but a smaller unit may be handled as a node. . This management operation is performed by the CPU 11 that functions as a data management unit by executing a required data management program stored in the ROM 12 or the HDD 14.
[0014]
In the data storage unit 16, node data and node hierarchy data are stored in the form of tables as data for managing the hierarchical structure of these nodes.
The node data is node data. As shown in FIG. 3B, for each node, the node ID, which is identification information consisting of a unique integer value, the name of the node, and the parent located immediately above the node. It consists of the node ID of the node. The document management server 10 can grasp the arrangement of each node by referring to the node data, and this node data is basic data for defining the hierarchical structure of the nodes.
[0015]
On the other hand, the node hierarchy data is node hierarchy information, and is stored by adding an integer data ID to the parent-child relationship of the nodes as shown in FIG. The parent-child relationship of the nodes is stored as a combination of the node ID of the parent node and the node ID of the child node. Also, not only the child nodes immediately below the parent node, but also all descendant nodes that are lower than the parent node, such as lower grandchild nodes, great-grandchild nodes, and the like that can be traced without going through the upper node from the parent node. The parent-child relationship is stored as a child node of the node.
Such node hierarchy data can be created by collecting information on parent-child relationships and descendant relationships of nodes with reference to identification information of the parent node of each node included in the node data. And by creating and storing such data in advance, the process of extracting all the nodes located below a certain node can be performed at high speed, and the search for nodes with a limited range is performed. In addition, processing such as recombination of the node hierarchical structure can be performed at high speed.
[0016]
These node data and node hierarchy data are normally managed so as to maintain consistency, but inconsistencies may occur due to unexpected troubles. In such a case, the hierarchical structure of the nodes cannot be recognized correctly, and the document management operation will be hindered. Therefore, it is necessary to check whether or not this inconsistency has occurred. A feature of the present invention is that this inspection can be performed at high speed.
[0017]
This high-speed inspection process is realized by causing the CPU 11 to execute a required program stored in the ROM 12 or the HDD 14 and to perform the functions of the respective units shown in FIG. Here, the function will be described.
First, the consistency inspection request accepting unit 101 accepts a request for consistency inspection processing every predetermined time, every time a predetermined event occurs, or when consistency inspection processing is requested by a user instruction or the like. The node extraction unit 102 has a function of transmitting the fact.
[0018]
When the inspection processing request is transmitted from the consistency inspection request receiving unit 101, the node extracting unit 102 sequentially extracts the node IDs from the node data table 111, and the hierarchical information re-creating unit 103 and the hierarchical information extracting unit as inspection target nodes 104 has a function to transmit to 104.
The hierarchy information re-creating unit 103 collects all the node IDs of the descendant nodes of the inspection target node with reference to the node data table 111, and collects all the node IDs in the array format as shown in FIG. It has a function of creating first descendant node data indicating a node. This collection is performed, for example, by first extracting all nodes having the target node as a parent node, and then extracting all nodes having the extracted node as a parent node until there are no nodes that can be extracted. Can be realized.
[0019]
The hierarchy information extraction unit 104 collects all the node IDs of the descendant nodes of the inspection target node with reference to the node hierarchy data table 112 and collects all the node IDs of the inspection target nodes in an array format as shown in FIG. A function of creating second descendant node data indicating the descendant node; This collection can be realized, for example, by extracting all parent-child relationships (descendant relationships) having the target node as a parent node in the node hierarchy data table 112.
The bitmap processing unit 105 converts the first descendant node data created by the hierarchy information re-creation unit 103 and the second descendant node data created by the hierarchy information extraction unit 104 from the data in the array format into the bitmap format. Has the function of converting to data. Here, the bitmap format data is data composed of a predetermined number of data (bits) having a value of 0 or 1. For the conversion to the bitmap format, for example, as shown in FIG. 6, a bitmap having 0 bits as many as the maximum value of the node ID is prepared, and the node ID number (2 in the example in the figure) is included. This can be done by setting 1 to the (th, third, fourth) bits. Here, the first, second,... Are shown in order from the left bit in the figure.
[0020]
The bitmap comparison unit 106 has a function of comparing the first descendant node data in the bitmap format converted by the bitmap processing unit 105 with the second descendant node data in the bitmap format. This comparison can be done by finding the exclusive OR of the two bitmaps.
The exclusive OR is 0 if the corresponding bits are the same, and is 1 if the corresponding bits are different, so if there is no mismatch between the node data and the node hierarchy data as shown in FIGS. The obtained descendant node data matches, and the exclusive OR becomes 0 for all bits as shown in Table 1 (a). On the other hand, when there is a mismatch, there is a different part in the descendant node data obtained from both, so as shown in Tables 1 (b) and (c), the exclusive OR is performed with the bits of that part. Becomes 1.
[0021]
[Table 1]
Figure 0004137493
[0022]
The result display / storage unit 107 has a function of displaying the comparison result by the bitmap comparison unit 106 on the display unit or storing the result in the storage unit. That is, for example, when there is a mismatch, a message notifying the fact or location is displayed, or the fact is recorded in the log. Even if there is no inconsistency, a message to that effect may be displayed.
By comparing the first descendant node data and the second descendant node data for all the nodes extracted by the node extraction unit 102 by the above-described units, the node data and the node hierarchy data are compared for the entire node hierarchy structure. It is possible to check whether or not there is a mismatch between the two.
[0023]
Here, in order to perform this inspection processing at high speed, it is important to perform comparison processing between the first descendant node data and the second descendant node data at high speed.
Considering that these are simply compared in the form of array data, for example, as shown in FIG. 5, for each element included in the array of the first descendant node data, the second It is necessary to compare (scan) sequentially with the elements of the array of descendant node data to check whether or not there is the same element (hits). In the worst case, the time required for the processing is proportional to (number of elements in the array of the first descendant node data) × (time required to scan the entire array of the second descendant node data).
[0024]
In order to check whether there is extra data that is not included in the first descendant node data in the array of the second descendant node data, the second position is switched, or a second scan is performed. It is necessary to store the elements that were hit when the descendant node data array was scanned by some means and to check whether all the elements were hit later.
Thus, if the comparison process is performed with the array format data as it is, a large amount of processing is required for the comparison.
[0025]
On the other hand, in the present invention, as shown in FIG. 6, the descendant node data in the array format is once converted into the data in the bitmap format and then compared. Conversion to the bitmap format can be performed by referring to each element of the array once. Since the comparison between the bitmaps can be performed by obtaining an exclusive OR by a bit operation that is the basis of the computer system, a high-speed operation in hardware can be realized. Accordingly, since the processing amount can be reduced to about one-hundred of the number of elements of the array as compared with the case where the comparison is performed with the array format data as it is, the comparison can be executed at a high speed, and the consistency check can also be performed at a high speed. it can.
[0026]
Next, the consistency check process between the node data and the node hierarchy data in the document management server will be described in more detail with reference to the flowcharts of FIGS. 7 to 10 are flowcharts showing the consistency check process.
When there is a request for consistency check processing, the CPU 11 receives the request. This processing request is always accepted by the CPU 11 executing a part of the data management program stored in the ROM 12 or the HDD 14 or the like.
Upon receiving this request, the CPU 11 also executes other portions of the data management program and starts the processing shown in the flowchart of FIG. That is, the CPU 11 functions as each unit described below by executing an appropriate program included in the data management program.
[0027]
First, in step S1, the node data is referred to obtain the node ID of the first node, and that node is set as the inspection target. Here, any node may be the first, but for example, the node having the smallest node ID may be used.
In the next step S2, it is determined whether or not there is a node. Usually, since there is a node at first, the process proceeds to the next step S3, and first descendant node data creation processing is performed for the node to be inspected. This process is shown in FIG. 8, and details will be described later. Here, the CPU 11 functions as first descendant node data creation means.
[0028]
Next, in step S4, a second descendant node data creation process for the node to be inspected is performed. This process is shown in FIG. 9, and details will be described later. Here, the CPU 11 functions as second descendant node data creation means. The first and second descendant node data created in step S3 and step S4 are array format data. In the next step S5, these data are converted into bitmap format data, respectively. This conversion process is shown in FIG. 10, and details will be described later. Here, the CPU 11 functions as first and second conversion means.
[0029]
In step S6, the converted first descendant node data is compared with the converted second descendant node data. This comparison can be performed by obtaining an exclusive OR of two data as already described. Here, the CPU 11 functions as a comparison unit.
Then, the process proceeds to step S7 to determine whether or not there is a difference. If there is a difference, the process proceeds to step S8 and the difference is displayed on the display means or stored in the storage means. That is, for example, when there is a mismatch, a message notifying the fact or location is displayed, or the fact is recorded in the log. Even if there is no inconsistency, a message to that effect may be displayed.
[0030]
Thereafter, the process proceeds to step S9. If there is no difference in step S7, the process directly proceeds to step S9.
In step S9, the node ID of the next node is obtained by referring to the node data, and that node is set as the inspection target. Here, the node to be acquired next may be determined based on an arbitrary standard.
And it returns to step S2 and it is judged whether there existed the node to acquire. If there is, the process from step S3 is repeated, and if not, it is determined that the consistency check has been completed for all the nodes, and the process is terminated.
[0031]
Next, the first descendant node data creation processing in step S3 in FIG. 7 will be described with a processing example in the case where node A is a node to be examined (target node) in the node having the configuration shown in FIG. .
The first descendant node data creation process is the process shown in the flowchart of FIG. 8. First, in step S11, the node data is searched to extract the node ID of the node having the target node as the parent node. When the node data is stored in a database table corresponding to SQL (Structured Query Language), this extraction can be performed using, for example, the schema definition and the search sentence shown in Table 2. If the node A is the target in the example shown in FIG. 3, “2” and “3” are extracted as the node IDs of the nodes B and C.
[0032]
[Table 2]
Figure 0004137493
[0033]
Next, it is determined whether or not the node ID has been extracted in step S12. If it is completed, the process proceeds to step S13, and the first node ID is selected from the extraction result. Again, any node ID may be selected first, but for example, the node ID having the smallest node ID may be selected. Here, it is “2”.
Next, it is determined whether or not the node ID has been selected in step S14. If it is completed, the selected node ID is set (added) to the first descendant node data array in step S15. In step S16, the first descendant node data creation process, that is, the process of the flowchart of FIG. 8 is recursively executed with the node having the selected node ID as the target node.
[0034]
This recursive execution starts again from step S11. Here, since the target node is the node B (ID “2”), “4” is extracted as the node ID of the node D. Then, the process proceeds to steps S12 and S13, and this “4” is selected. In step S15, this value is set in the array of the first descendant node data. Note that there is one array of first descendant node data, and the same array is set during the initial execution and during the recursive execution. However, it is a matter of course that resetting is performed when the process of step S3 in FIG. 7 is newly started.
In step S16, the first descendant node data creation process is recursively executed again with the target node as the node D (ID “4”).
[0035]
This recursive execution starts again from step S11. Here, since the target node is the node D (ID “4”), there is no node having this as a parent node, and the node ID is not extracted in step S11.
Accordingly, the determination in step S12 is NO, and the process returns to the original process. That is, the process returns to step S16 of the first descendant node data creation process in which the node B one stage before is the target node, and proceeds to step S17.
[0036]
In step S17, the next node ID is selected from the extraction result in step S11. Here, the node to be extracted next may be determined based on an arbitrary criterion. However, in the process in which node B is the target node, the node ID extracted in step S11 is only “4”. Therefore, there is no selection target.
Therefore, the process directly returns to step S14, but the determination here is NO, and the process returns to the original process again. That is, the process returns to step S16 of the first descendant node data creation process with the node A one stage before as the target node, and proceeds to step S17.
[0037]
In this step S17, the next node ID is selected from the extraction result in step S11. In the process where node A is the target node, the node IDs extracted in step S11 are “2” and “3”. “3” that has not yet been selected is selected.
Then, the process returns to step S14, and the determination here is YES, so the process proceeds to step S15, and the selected “3” is set in the array of the first descendant node data.
In step S16, the first descendant node data creation process is recursively executed this time with the target node as node C (ID "3"), but the description is omitted because there is no node ID extracted in this process.
[0038]
Then, the process proceeds to step S17. Since there is no node ID to be selected, the process returns to step S14 as it is, and the determination here is NO, and the process returns to the original process. That is, the first descendant node data creation process is terminated and the process returns to the process of FIG.
In the case of the example used for the description, “2”, “3”, and “4” are set in the array of the first descendant node data at the end of the process, and this is the first descendant created by this process. Node data. Since this data is finally converted into a bitmap format and used, the order of arrangement of the node IDs at this time may be any order.
[0039]
Next, the second descendant node data creation processing in step S4 in FIG. 7 will be described with reference to a processing example in the case where node A is the target node in the node having the configuration shown in FIG.
The second descendant node data creation process is the process shown in the flowchart of FIG. 9. First, in step S21, the node hierarchy data is searched to extract a child node ID of a combination having the target node as a parent node. When the node hierarchy data is stored in a database table corresponding to SQL (Structured Query Language), this extraction can be performed using, for example, the schema definition and the search sentence shown in Table 3. Then, if node A is the target in the example shown in FIG. 3, “2”, “3”, and “4” are extracted as the IDs of the child nodes having the node ID “1” as the parent node.
[0040]
[Table 3]
Figure 0004137493
[0041]
In step S22, the extracted node ID is set (added) to the second descendant node data array. Thus, the second descendant node data creation process ends, and the process returns to the original process, that is, the process of FIG. Since the node hierarchy data includes not only the direct parent-child relationship but also the descendant relationship data, there is no need to perform a recursive search for referencing node data, and this simple processing Descendant node data can be created with.
In the case of the example used for the explanation, “2”, “3”, “4” are set in the array of the second descendant node data at the end of the process, and this is the second descendant created by this process. Node data. Since this data is also finally converted into a bitmap format and used, the order in which node IDs are arranged at this time may be any order.
[0042]
Next, the conversion process in step S5 of FIG. 7 will be described with a process example in the case of converting the descendant node data shown in FIG.
The conversion process is the process shown in the flowchart of FIG. 10, and first, in step S31, the first element (node ID) is acquired from the array of descendant node data to be converted.
And it progresses to step S32 and it is judged whether it was able to acquire. If there is, the process proceeds to step S33, and “1” is set to the node ID-th bit acquired in the bitmap. For example, if the acquired node ID is “2”, the second bit is set, and if it is “3”, the third bit is set to “1”. As an initial value of the bit map, data in which “0” bits are arranged as many as the maximum number of node IDs included in the first and second descendant node data arrays is prepared. For example, in the example shown in FIG. 6, since the maximum node ID is “4”, data in which four “0” s are arranged is prepared.
[0043]
Next, it progresses to step S34, acquires the next element of an array, and returns to step S32. If the element can be acquired in step S34, the determination in step S32 is YES, so the processing from step S33 is repeated, but if there is no next element and cannot be acquired, the result is NO. The conversion process is terminated assuming that the process for the element is completed, and the process returns to the original process.
Here, in step S5 of FIG. 7, the conversion process of FIG. 10 is executed for each of the first descendant node data and the second descendant node data.
Further, in this conversion process, even if the elements of the array are acquired in any order, finally, data in which “1” is set to the bit corresponding to each element can be generated. Therefore, regardless of the order in which the elements are arranged in an array format, the generated bitmaps are the same as long as they are composed of the same elements.
[0044]
As described above, the document management server 10 performs the above-described processing, converts the descendant node data in the array format into data in the bitmap format, and then performs the comparison. Compared to the comparison with the data as it is, the processing amount can be reduced to about 1 / number of elements of the array, so that the comparison can be executed at a high speed, and the consistency between the node data and the node hierarchy data, that is, the actual hierarchy It is also possible to check the hierarchy information stored and the consistency at a high speed.
In the process of the flowchart of FIG. 7, the processes in steps S3 to S5 are not necessarily performed in this order. For example, the second descendant node data may be created first, or the created descendant node data may be immediately used for the conversion process.
[0045]
[Second Embodiment: FIGS. 11 to 15]
Next, a document management server according to a second embodiment of the data management apparatus of the present invention will be described. FIG. 11 is a functional block diagram showing the functional configuration of the characterizing portion of the present invention in the document management server. FIGS. 12 and 13 show examples of erroneous node hierarchy data in the document management server. FIG. 9 is a flowchart showing processing for checking consistency between node data and node hierarchy data in the document management server.
The document management server of this embodiment is different only in that the node hierarchy data correction unit 108 is provided as a functional configuration, and the processing by the CPU 11 is only changed in accordance with this point. Is the same as that of the document management server 10 of the first embodiment, and the description other than the differences will be simplified or omitted. Also, the same reference numerals are used for the components corresponding to the document management server 10 of the first embodiment.
[0046]
The node hierarchy data correction unit 108 in the document management server of this embodiment has a function of correcting node hierarchy data based on the comparison result in the bitmap comparison unit 106 and the first descendant node data in the bitmap format.
Specifically, for example, in the node hierarchy configuration shown in FIG. 3, if the node hierarchy data is as shown in FIG. 12, the data with the data ID “4” does not correspond to the actual hierarchy configuration. Incorrect data. When the consistency check is performed in such a state, when the node A having the node ID “1” is targeted, as shown in Table 4, the first descendant node data created by referring to the node data is “ Since the second descendant node data created by referring to the node hierarchy data becomes “01111” at “01110”, a bit of 1 appears in the exclusive OR of the comparison result, and an inconsistency is detected.
[0047]
[Table 4]
Figure 0004137493
[0048]
Here, since the 1 bit is the fifth, it can be seen that there is an inconsistency in the descendant relationship for the node with the node ID “5”. On the other hand, since the fifth bit of the first descendant node data is “0”, the fifth bit of the second descendant node data is necessarily “1”, and the node ID is actually “5”. "Is not a descendant node of node A, but it is understood that extra data is included in the node hierarchy data. Therefore, the node hierarchy data correction unit 108 can eliminate the inconsistency by performing the correction to delete the node hierarchy data having the parent node ID “1” and the child node ID “5”. For example, when the node hierarchy data corresponds to SQL and is stored in the database table using the schema definition shown in Table 3,
delete NodeHierarchyData where ParentID = 1 and ChildID = 5
Can be executed by a command such as
[0049]
As another example, in the node hierarchy configuration shown in FIG. 3, for example, when the node hierarchy data is as shown in FIG. 13, the data with the parent node ID “1” and the child node ID “4” is insufficient. is doing. When the consistency check is performed in such a state, when the node A whose node ID is “1” is targeted, as shown in Table 5, the first descendant node data created by referring to the node data is “ Since the second descendant node data created by referring to the node hierarchy data at “0111” is “0110”, a bit of 1 appears in the exclusive OR of the comparison result, and inconsistency is detected.
[0050]
[Table 5]
Figure 0004137493
[0051]
Here, since the bit of 1 is the fourth, it can be seen that there is an inconsistency in the descendant relationship for the node with the node ID “4”. On the other hand, since the fourth bit of the first descendant node data is “1”, the fourth bit of the second descendant node data is necessarily “0”, and the node ID is actually “4”. The node “” is a descendant node of the node A, but no data corresponding to the node hierarchy data is included. Therefore, the node hierarchy data correction unit 108 can eliminate the inconsistency by performing the correction to add the node hierarchy data having the parent node ID “1” and the child node ID “4”. For example, when the node hierarchy data corresponds to SQL and is stored in the database table using the schema definition shown in Table 3,
It can be executed by a command like insert into NodeHierarchyData (ID, ParentID, ChildID) values (4, 1, 4).
[0052]
In this way, the node hierarchy data correction unit 108 acquires the ID of the descendant node related to the mismatch according to the bit position where “1” is set in the exclusive OR of the comparison result, and the first descendant node data By referring to the corresponding bit, it can be determined whether the node hierarchy data needs to be added or deleted, and appropriate correction can be made.
The reason why the node data is not modified is that this data is basic data for defining the hierarchical structure of the node, and if this data is changed, the hierarchical structure itself is changed. On the other hand, the node hierarchy data is created by referring to the node data and is data for efficiently grasping the hierarchy structure. Therefore, even if this is changed, the hierarchy structure is not changed.
[0053]
Next, processing for checking consistency between node data and node hierarchy data in the document management server will be described in more detail with reference to a flowchart.
When there is a request for consistency check processing, the CPU 11 receives the request. This processing request is always accepted by the CPU 11 executing a part of the data management program stored in the ROM 12 or the HDD 14 or the like.
Upon receiving this request, the CPU 11 also executes other parts of the data management program and starts the processing shown in the flowchart of FIG. That is, the CPU 11 functions as each unit described below by executing an appropriate program included in the data management program.
[0054]
The process shown in the flowchart of FIG. 14 is the same as that of the first embodiment except that the node hierarchy data correction process of step S41 is performed after the process of step S8 when there is a difference in step S7. Therefore, only the node hierarchy data correction process will be described. In this process, the CPU 11 functions as a correction unit.
[0055]
The node hierarchy data correction process is a process shown in the flowchart of FIG.
Here, first, in step S51, the first bit is acquired from the exclusive OR bit map of the comparison result.
In step S52, it is determined whether or not the last bit has been exceeded. If not, the process proceeds to step S53 to determine whether or not the acquired bit is 1. If it is 1, it is determined that there is a mismatch with respect to the node corresponding to the bit, and the process proceeds to step S54 to refer to the corresponding bit in the bitmap of the first descendant node data.
[0056]
Next, it is determined whether or not the bit is 0 in step S55. If 0, it is determined that extra data is included in the node hierarchy data, and the process proceeds to step S56. Then, from the node hierarchy data, the node to be inspected at that time is set as the parent node, and the node corresponding to the bit referenced in step S54 (for example, if the bit referenced at that time is the fourth bit, the node ID Delete the data having the node “4” as a descendant node. Then, the process proceeds to step S58, the next bit is acquired from the exclusive OR bit map of the comparison result, the process returns to step S52, and the process is repeated.
[0057]
If it is not 0 in step S55, it is determined that the data necessary for the node hierarchy data is insufficient, and the process proceeds to step S57. Then, the node hierarchy data is added with data in which the node to be inspected at that time is the parent node and the node corresponding to the bit referenced in step S54 is a descendant node. Then, the process proceeds to step S58, the next bit is acquired from the exclusive OR bit map of the comparison result, the process returns to step S52, and the process is repeated.
If it is not 1 in step S53, the process directly proceeds to step S58 to acquire the next bit from the exclusive OR bit map of the comparison result, and returns to step S52 to repeat the processing.
If the last bit is exceeded in step S52, it is determined that all necessary corrections for the current node to be inspected have been completed, and the processing returns to the original processing in FIG.
[0058]
Since the document management server of this embodiment performs the above-described processing and refers to the comparison result bitmap to identify and correct the inconsistent portion of the node hierarchical data, the actual hierarchical structure and In addition to checking consistency with the stored hierarchical information, it is possible to correct inconsistent portions at high speed.
[0059]
In each of the embodiments described above, the document management server 10 that manages the document data stored in the data storage unit 16 has been described as an example. However, the data stored in the HDD 14 or the like may be managed collectively. Needless to say, the data stored in a plurality of storage means may be collectively managed, including those of external devices. In addition to this, the data management device of the present invention is not limited to the document management server, but can be applied to any device that manages some data composed of nodes having a hierarchical structure. Of course.
[0060]
A program for causing the CPU 11 of the document management server 10 to function as each of the above-described means is stored in advance in the HDD 14 or the like of the document management server 10, or a CD-ROM or magneto-optical (MO) as a recording medium. ) It can also be provided as a program source or binary data recorded in an executable format on a non-volatile recording medium (memory) such as a disk, mini disk (MD), DVD (Digital Versatile Disk), flexible disk, magnetic tape, or HDD. . The program recorded in the memory can be installed in the document management server 10 and executed by the CPU 11, or the CPU 11 can read out and execute the program from the memory to function as each unit described above.
Furthermore, it is also possible to download the program from an external device provided with a recording medium that records the program, or from an external device that stores the program in a storage unit.
[0061]
【The invention's effect】
As described above, according to the data management apparatus of the present invention, the consistency check between the hierarchical structure of the nodes and the stored hierarchical information can be performed with a simple process, so the inspection is performed at high speed. be able to.
Moreover, according to the program of this invention, a computer can be functioned as a data management apparatus as described above.
Further, according to the recording medium of the present invention, the program can be stored in a computer that does not store the program, and can be caused to function as the data management apparatus as described above by executing the program.
[Brief description of the drawings]
FIG. 1 is a functional block diagram showing a functional configuration of a characteristic part of the present invention in a document management server which is a first embodiment of a data management apparatus of the present invention.
FIG. 2 is a block diagram showing a schematic configuration of the document management server.
FIG. 3 is a diagram for explaining a data management method in the document management server;
FIG. 4 is a diagram for explaining generation of descendant node data in the same manner.
FIG. 5 is a diagram for explaining comparison of descendant node data.
FIG. 6 is a diagram for explaining conversion of descendant node data into a bitmap format.
FIG. 7 is a flowchart showing a consistency check process in the document management server according to the first embodiment of the data management apparatus of the present invention;
FIG. 8 is a flowchart showing the contents of the first descendant node data creation process shown in the flowchart of FIG. 7;
FIG. 9 is a flowchart showing the contents of second descendant node data creation processing shown in the flowchart of FIG. 7;
FIG. 10 is a flowchart showing the contents of a bitmap process that is the conversion process shown in the flowchart of FIG. 7;
FIG. 11 is a functional block diagram showing a functional configuration of a characteristic part of the present invention in a document management server which is a second embodiment of the data management apparatus of the present invention;
FIG. 12 is a diagram showing an example of erroneous node hierarchy data in the document management server.
FIG. 13 is a diagram showing another example.
FIG. 14 is a flowchart showing a consistency check process in a document management server according to a second embodiment of the data management apparatus of the present invention;
FIG. 15 is a flowchart showing the contents of the node hierarchy data correction process shown in the flowchart of FIG. 14;
[Explanation of symbols]
10: Document management server 11: CPU
12: ROM 13: RAM
14: HDD 15: Network I / F
16: Data storage means 17: System bus
101: Consistency check request reception unit 102: Node extraction unit
103: Hierarchy information re-creation unit 104: Hierarchy information extraction unit
105: Bitmap processing unit
106: Bitmap comparison unit
107: Result display / storage unit
108: Node hierarchy data correction unit
111: Node data table
112: Node hierarchy data table

Claims (5)

階層構造を持つノードによって構成される形式のデータを管理するデータ管理装置であって、
各ノードについて固有の整数値からなる識別情報と、当該ノードの直上位の親ノードの前記識別情報とをノード情報として記憶する手段と、
前記各ノードについて、当該ノードよりも下位であり且つ当該ノードの上位ノードを経由せずに辿れるノードである子孫ノードの各々の前記識別情報を、当該ノードの前記識別情報と1対1で対応づけてノード階層情報として記憶する手段と、
前記ノード情報をもとに、任意のノードの子孫ノードの前記識別情報を全て収集した第1の子孫ノードデータを作成する第1の子孫ノードデータ作成手段と、
前記ノード階層情報をもとに、前記任意のノードの子孫ノードの前記識別情報を全て収集した第2の子孫ノードデータを作成する第2の子孫ノードデータ作成手段と、
前記第1の子孫ノードデータ作成手段によって作成された第1の子孫ノードデータを、該第1の子孫ノードデータに含まれる子孫ノードの前記識別情報に従い、該識別情報の値に対応する位置のビットを立てたビットマップ形式のデータに変換する第1の変換手段と、
前記第2の子孫ノードデータ作成手段によって作成された第2の子孫ノードデータを、該第2の子孫ノードデータに含まれる子孫ノードの前記識別情報に従い、該識別情報の値に対応する位置のビットを立てたビットマップ形式のデータに変換する第2の変換手段と、
前記第1の変換手段によって変換されたビットマップ形式の第1の子孫ノードデータと前記第2の変換手段によって変換されたビットマップ形式の第2の子孫ノードデータとの排他的論理和を求めることにより、前記第1の子孫ノードデータと前記第2の子孫ノードデータとを比較する比較手段とを有することを特徴とするデータ管理装置。
A data management device that manages data in a format composed of nodes having a hierarchical structure,
Means for storing, as node information , identification information consisting of a unique integer value for each node and the identification information of the parent node immediately above the node;
For each of the nodes, the identification information of each descendant node that is a node lower than the node and traceable without going through the upper node of the node is associated with the identification information of the node on a one-to-one basis. It means for storing as a node hierarchy information Te,
First descendant node data creating means for creating first descendant node data that collects all the identification information of descendant nodes of any node based on the node information;
Second descendant node data creating means for creating second descendant node data that collects all the identification information of descendant nodes of the arbitrary node based on the node hierarchy information;
Wherein the first descendent node data created by the first descendent node data creating means, in accordance with the identification information of the descendent nodes included in the first descendent node data, the bit position corresponding to the value of the identification information first conversion means for converting the bitmap format of the data set a,
Wherein the second descendent node data created by the second descendent node data creating means, in accordance with the identification information of the descendent nodes included in the second descendent node data, the bit position corresponding to the value of the identification information second conversion means for converting the bitmap format of the data set a,
Obtaining an exclusive OR between the first descendant node data in the bitmap format converted by the first converting means and the second descendant node data in the bitmap format converted by the second converting means. Thus, the data management device further comprises a comparing means for comparing the first descendant node data with the second descendant node data .
請求項1記載のデータ管理装置であって、
前記比較手段による比較が不一致だった場合に、その比較結果に基づいて前記ノード階層情報を修正する修正手段を有することを特徴とするデータ管理装置。
The data management device according to claim 1,
A data management apparatus comprising: a correction unit that corrects the node hierarchy information based on a comparison result when the comparison by the comparison unit is inconsistent.
コンピュータを、階層構造を持つノードによって構成される形式のデータを管理するデータ管理手段と、
各ノードについて固有の整数値からなる識別情報と、当該ノードの直上位の親ノードの前記識別情報とをノード情報として記憶する手段と、
前記各ノードについて、当該ノードよりも下位であり且つ当該ノードの上位ノードを経由せずに辿れるノードである子孫ノードの各々の前記識別情報を、当該ノードの前記識別情報と1対1で対応づけてノード階層情報として記憶する手段と、
前記ノード情報をもとに、任意のノードの子孫ノードの前記識別情報を全て収集した第1の子孫ノードデータを作成する第1の子孫ノードデータ作成手段と、
前記ノード階層情報をもとに、前記任意のノードの子孫ノードの前記識別情報を全て収集した第2の子孫ノードデータを作成する第2の子孫ノードデータ作成手段と、
前記第1の子孫ノードデータ作成手段によって作成された第1の子孫ノードデータを、該第1の子孫ノードデータに含まれる子孫ノードの前記識別情報に従い、該識別情報の値に対応する位置のビットを立てたビットマップ形式のデータに変換する第1の変換手段と、
前記第2の子孫ノードデータ作成手段によって作成された第2の子孫ノードデータを、該第2の子孫ノードデータに含まれる子孫ノードの前記識別情報に従い、該識別情報の値に対応する位置のビットを立てたビットマップ形式のデータに変換する第2の変換手段と、
前記第1の変換手段によって変換されたビットマップ形式の第1の子孫ノードデータと前記第2の変換手段によって変換されたビットマップ形式の第2の子孫ノードデータとの排他的論理和を求めることにより、前記第1の子孫ノードデータと前記第2の子孫ノードデータとを比較する比較手段として機能させるためのプログラム。
Data management means for managing data in a format comprising a computer having nodes having a hierarchical structure;
Means for storing, as node information , identification information consisting of a unique integer value for each node and the identification information of the parent node immediately above the node;
For each of the nodes, the identification information of each descendant node that is a node lower than the node and traceable without going through the upper node of the node is associated with the identification information of the node on a one-to-one basis. It means for storing as a node hierarchy information Te,
First descendant node data creating means for creating first descendant node data that collects all the identification information of descendant nodes of any node based on the node information;
Second descendant node data creating means for creating second descendant node data that collects all the identification information of descendant nodes of the arbitrary node based on the node hierarchy information;
Wherein the first descendent node data created by the first descendent node data creating means, in accordance with the identification information of the descendent nodes included in the first descendent node data, the bit position corresponding to the value of the identification information first conversion means for converting the bitmap format of the data set a,
Wherein the second descendent node data created by the second descendent node data creating means, in accordance with the identification information of the descendent nodes included in the second descendent node data, the bit position corresponding to the value of the identification information second conversion means for converting the bitmap format of the data set a,
Obtaining an exclusive OR between the first descendant node data in the bitmap format converted by the first converting means and the second descendant node data in the bitmap format converted by the second converting means. The program for causing the first descendant node data and the second descendant node data to function as comparing means for comparing.
請求項3記載のプログラムであって、
コンピュータを、前記比較手段による比較が不一致だった場合に、その比較結果に基づいて前記ノード階層情報を修正する修正手段として機能させるためのプログラムをさらに含むプログラム。
A program according to claim 3, wherein
A program further comprising: a program for causing a computer to function as a correction unit that corrects the node hierarchy information based on a comparison result when the comparison by the comparison unit is inconsistent.
請求項3又は4記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。  A computer-readable recording medium on which the program according to claim 3 or 4 is recorded.
JP2002109979A 2002-04-12 2002-04-12 Data management apparatus, program, and recording medium Expired - Fee Related JP4137493B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002109979A JP4137493B2 (en) 2002-04-12 2002-04-12 Data management apparatus, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002109979A JP4137493B2 (en) 2002-04-12 2002-04-12 Data management apparatus, program, and recording medium

Publications (2)

Publication Number Publication Date
JP2003303122A JP2003303122A (en) 2003-10-24
JP4137493B2 true JP4137493B2 (en) 2008-08-20

Family

ID=29393251

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002109979A Expired - Fee Related JP4137493B2 (en) 2002-04-12 2002-04-12 Data management apparatus, program, and recording medium

Country Status (1)

Country Link
JP (1) JP4137493B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4696721B2 (en) 2005-06-27 2011-06-08 富士ゼロックス株式会社 Document management server, document management system
JP4876734B2 (en) 2006-06-22 2012-02-15 富士ゼロックス株式会社 Document use management system and method, document management server and program thereof
JP5003131B2 (en) 2006-12-04 2012-08-15 富士ゼロックス株式会社 Document providing system and information providing program
JP4305510B2 (en) * 2006-12-28 2009-07-29 富士ゼロックス株式会社 Information processing system, information processing apparatus, and program
JP5023715B2 (en) 2007-01-25 2012-09-12 富士ゼロックス株式会社 Information processing system, information processing apparatus, and program
JP5119840B2 (en) 2007-10-02 2013-01-16 富士ゼロックス株式会社 Information processing apparatus, information processing system, and program
JP6214366B2 (en) * 2013-12-05 2017-10-18 三菱電機株式会社 Arithmetic element management apparatus and arithmetic element management program

Also Published As

Publication number Publication date
JP2003303122A (en) 2003-10-24

Similar Documents

Publication Publication Date Title
US6185569B1 (en) Linked data structure integrity verification system which verifies actual node information with expected node information stored in a table
US8229932B2 (en) Storing XML documents efficiently in an RDBMS
US8429526B2 (en) Efficient evaluation for diff of XML documents
US8140565B2 (en) Autonomic information management system (IMS) mainframe database pointer error diagnostic data extraction
US9223815B2 (en) Method, apparatus, and program for supporting creation and management of metadata for correcting problem in dynamic web application
US7333992B2 (en) System and method for identifying and storing changes made to a table
US8694510B2 (en) Indexing XML documents efficiently
US20080098020A1 (en) Incremental maintenance of an XML index on binary XML data
US9864793B2 (en) Language tag management on international data storage
US20100175055A1 (en) Method and system to identify gui objects for non-markup-language-presented applications
US20050210007A1 (en) Document search methods and systems
US20070016605A1 (en) Mechanism for computing structural summaries of XML document collections in a database system
US7860899B2 (en) Automatically determining a database representation for an abstract datatype
JP4137493B2 (en) Data management apparatus, program, and recording medium
CN110781091A (en) Application program testing method and device, electronic equipment and storage medium
WO2020119143A1 (en) Database deleted record recovery method and system
JP4350001B2 (en) Page information collection program, page information collection method, and page information collection apparatus
US20090204889A1 (en) Adaptive sampling of web pages for extraction
US8676786B2 (en) Computer product, data conversion apparatus, and conversion method
US7233957B1 (en) Method and apparatus for identifying and processing changes to management information
CN114356404A (en) Interface document generating method, system and computer readable storage medium
US11176022B2 (en) Health diagnostics and analytics for object repositories
CN113805964A (en) Firmware configuration item directory generation optimization method, device, equipment and medium
JP6955162B2 (en) Analytical equipment, analysis method and analysis program
WO2021056798A1 (en) Metadata repairing method, apparatus and device, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080226

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080425

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

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

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

Free format text: PAYMENT UNTIL: 20110613

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110613

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120613

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130613

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees