JP2006040081A - Information retrieval device, database retrieval preprocessing circuit, and information retrieval method - Google Patents

Information retrieval device, database retrieval preprocessing circuit, and information retrieval method Download PDF

Info

Publication number
JP2006040081A
JP2006040081A JP2004221035A JP2004221035A JP2006040081A JP 2006040081 A JP2006040081 A JP 2006040081A JP 2004221035 A JP2004221035 A JP 2004221035A JP 2004221035 A JP2004221035 A JP 2004221035A JP 2006040081 A JP2006040081 A JP 2006040081A
Authority
JP
Japan
Prior art keywords
search
expression
search expression
evaluation
upper limit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004221035A
Other languages
Japanese (ja)
Other versions
JP4575064B2 (en
Inventor
Takaaki Nakamura
隆顕 中村
Mitsunori Kori
光則 郡
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2004221035A priority Critical patent/JP4575064B2/en
Publication of JP2006040081A publication Critical patent/JP2006040081A/en
Application granted granted Critical
Publication of JP4575064B2 publication Critical patent/JP4575064B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a device and a method, allowing execution of retrieval even when the retrieval execution becomes impossible in a conventional method because resource consumption exceeds an upper limit value usable in the device if based on a normal retrieval designation, in the retrieval of a composite database. <P>SOLUTION: This information retrieval device has: a retrieval expression division part 104 for reading a retrieval expression describing desired information retrieval, and dividing it into a prescribed simple format; a retrieval expression evaluation part 103 for evaluating whether a necessary resource in time of the retrieval by the divided simple-format retrieval expression is within the resource upper limit value of a system or not; and a retrieval processing part for performing the desired information retrieval according to a retrieval instruction list output by the retrieval expression division part. The retrieval expression division part performs the division into the simple format wherein the retrieval expression evaluation part evaluates that it is within the resource upper limit value, and the retrieval processing part 105 performs the information retrieval on the basis of the simple format. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

この発明は、マルチデータベース・システムにおけるデータ検索の容易化、特に複雑な検索条件により多量の資源を使用する検索の容易化に関するものである。   The present invention relates to facilitating data retrieval in a multi-database system, and more particularly to facilitating retrieval using a large amount of resources due to complicated retrieval conditions.

従来、マルチデータベース・システムにおけるデータ検索に関して、検索コスト、つまり検索時間や検索時のメモリ等の資源を少なくしたり、検索意図に添った適切対象に絞り込む、といった検索装置、方法が多数提案されている。
例えば特許文献1の「データベース照会最適化システム」によれば、マルチデータベースシステムのデータ照会に要するコストを、最適化する方式が提案されている。上記特許文献1の方式では、最適化の第1段階として、SQLのようなデータ照会言語から、先ずリソース全体の消費量の最適化を考えて、例えば左に深く分岐した、つまり検索処理回数が多い、照会ツリーを一旦生成する。その後に第2段階として、応答時間の短縮を考えて、左に深い照会ツリーを平衡の取れたツリーに変換する。このとき上記文献では、第2段階の平衡の取れたツリーへの変換方式として、ボトムアップ・アプローチや、トップダウン・アプローチという方式が示されている。
Conventionally, with regard to data search in a multi-database system, many search devices and methods have been proposed that reduce search costs, that is, search time, resources such as memory at the time of search, and narrow down to appropriate targets according to the search intention. Yes.
For example, according to “Database inquiry optimization system” of Patent Document 1, a method for optimizing the cost required for data inquiry of a multi-database system has been proposed. In the method of the above-mentioned patent document 1, as a first stage of optimization, from the data inquiry language such as SQL, first, considering the optimization of the consumption of the entire resource, for example, it is branched deeply to the left. Generate many query trees once. Then, as a second step, considering a reduction in response time, a deep query tree on the left is converted into a balanced tree. At this time, in the above document, a bottom-up approach or a top-down approach is shown as the second stage balanced tree conversion system.

ところで、昨今、流通するマルチメディアデータの増加に伴い、データベース(DB)に蓄積されるデータ規模の巨大化、検索対象の多様化が予測される。こうなると、必然的にこれらDB中に登録されたデータの増加、検索処理の負荷が高い検索方式の適用、検索式の複雑化などの要因で、検索時のリソースの消費量が増加する。その場合、従来の検索式の最適化を行う検索装置では、検索式の複雑化により装置で利用可能なリソースの上限値を超えることも起こり得る。
特開平8−328920号公報
By the way, in recent years, with the increase of multimedia data to be distributed, enlarging data scale stored in a database (DB) and diversification of search objects are predicted. In this case, the amount of resources consumed during the search increases inevitably due to factors such as an increase in data registered in these DBs, application of a search method with a high search processing load, and complicated search expressions. In that case, in a conventional search device that optimizes a search expression, the upper limit value of resources that can be used by the apparatus may be exceeded due to the complexity of the search expression.
JP-A-8-328920

従来のデータ検索装置、方法においては、SQLのような検索式を入力として、複数のデータベースで構成される複合データベースから所望の情報を得す場合に、上記特許文献1等のさまざまな検索式の最適化方法が考えられてきた。しかしそれらの検索式の最適化方法は、検索時間や、リソース使用量を最小化することである。従って、検索条件が複雑化してリソース使用量が利用可能な上限値を超えるような場合については言及されていず、従って複雑な検索式または多量のデータベースのために検索が実行不可能となる場合が生じるという課題がある。   In the conventional data search apparatus and method, when a desired information is obtained from a composite database composed of a plurality of databases using a search expression such as SQL as an input, various search expressions such as the above-mentioned Patent Document 1 are used. Optimization methods have been considered. However, the search method optimization method is to minimize search time and resource usage. Therefore, there is no mention of a case where the search condition becomes complicated and the resource usage exceeds the available upper limit, and therefore the search may not be performed due to a complicated search expression or a large amount of databases. There is a problem that arises.

この発明は上記の課題を解決するためになされたもので、複合データベースの検索において、通常の検索指定に基づけば、リソース消費量が装置で利用可能な上限値を超えて、従来方式では検索実行が不可能となる場合でも、検索の実行を可能とする装置、方法を得ることを目的とする。
また更に、そのままでは検索不可能な条件を検索可能とした上で、その可能な検索処理を高速化する装置、方法を得ることを目的とする。
The present invention has been made to solve the above-described problem. In the search of a composite database, the resource consumption exceeds the upper limit value that can be used in the apparatus based on the normal search specification. An object of the present invention is to obtain an apparatus and a method that enable execution of a search even when it becomes impossible.
It is another object of the present invention to obtain an apparatus and a method for speeding up the search processing that can be performed while making it possible to search conditions that cannot be searched as they are.

この発明に係る情報検索装置は、データベースから所望の情報を検索する情報検索装置において、
上記所望の情報検索を記述する検索式を読込み、この読込んだ検索式を所定の簡易形式に分割する検索式分割部と、
上記検索式分割部が分割した簡易形式検索式による検索時の必要リソースがシステムで持つリソース上限値内であるかを評価する検索式評価部と、
上記検索式分割部が出力する検索命令リストに従って上記所望の情報検索を行う検索処理部と、を備えて、
上記検索式分割部は、上記検索式評価部がリソース上限値内であると評価する簡易形式に分割して、上記検索処理部は、この簡易形式に基づいて情報検索を行うようにした。
An information retrieval apparatus according to the present invention is an information retrieval apparatus for retrieving desired information from a database.
A retrieval formula that reads the retrieval formula describing the desired information retrieval, and divides the retrieved retrieval formula into a predetermined simple format;
A search expression evaluation unit that evaluates whether the necessary resources at the time of search by the simple search expression divided by the search expression dividing unit are within the resource upper limit value of the system;
A search processing unit that performs the desired information search according to a search command list output by the search expression dividing unit,
The search expression dividing unit is divided into simple formats that the search expression evaluating unit evaluates to be within the resource upper limit value, and the search processing unit performs information search based on the simple format.

この発明によれば、検索式分割部と検索式評価部とを備えて、検索式分割部は検索式評価部がリソース上限値内であると評価する簡易形式に分割して、検索処理を行うので、検索不可能な条件でも検索可能にして検索処理ができる効果がある。   According to the present invention, the search expression dividing unit and the search expression evaluating unit are provided, and the search expression dividing unit divides the search expression evaluation unit into a simple format that evaluates that the value is within the resource upper limit value, and performs a search process. Therefore, there is an effect that the search processing can be performed by making the search possible even in a condition that cannot be searched.

実施の形態1.
従来方式では検索実行が不可能となる場合でも、検索の実行を可能とする装置、方法を図に基づいて説明する。
なお、本実施の形態における装置が検索の対象とするデータベースは、マルチメディアデータを蓄積した個別DBを複数照合する複合DBである。マルチメディアデータとは、文書データや、画像データ、音声データ、映像データ、その他バイナリデータなどの、電子化されたデータのことである。また複合DBは、個別DBと同じ装置上に構成されていてもよいし、ネットワークで接続された異なる個別DB装置を集合した形態であってもよい。
Embodiment 1 FIG.
An apparatus and method capable of executing a search even when the search cannot be executed by the conventional method will be described with reference to the drawings.
The database to be searched by the apparatus according to the present embodiment is a composite DB that collates a plurality of individual DBs that store multimedia data. The multimedia data refers to digitized data such as document data, image data, audio data, video data, and other binary data. Further, the composite DB may be configured on the same device as the individual DB, or may be a form in which different individual DB devices connected via a network are gathered.

図1は本実施の形態における情報検索装置の構成を示す図である。図において、情報検索装置は、以下の要素で構成される。即ち、検索を依頼するユーザから検索式101の入力を受け付ける検索式入力部102、本発明の重要な要素である、入力された検索式による検索時のリソース消費量を評価する検索式評価部103、同じく重要な要素である、検索式を分割して部分検索式と検索命令リストを出力する検索式分割部104、入力された検索式や、検索式分割部104より出力された検索命令リストに従って、実際の検索処理を実行する検索処理部105、検索結果112を検索依頼したユーザに出力する検索結果出力部106、である。
検索処理部105は、更に以下の要素で構成される。即ち、検索式や検索命令リストに従って検索処理を制御する検索制御部107と、複合DBに関連付けられている1種類以上の個別DB111に対して検索を実行する検索実行部109、検索実行部109で得られた検索結果を中間結果として管理する中間結果管理部110、中間結果間の集計(論理演算)処理を実行する中間結果集計部108、である。
なお、検索実行部109は、個別DBに対する検索機能を内包していてもよいし、別の装置上にある個別DBの検索機能を呼び出して検索結果を得るものであってもよい。
またこれらの検索式評価部等の各部は、その機能を実現するソフトウェアのプログラムで記述されており、図示はされていないが、プロセッサ(CPU)とメモリがあって、これら各部の記述されたプログラムを実行して、検索式評価等の各機能を得ている。
FIG. 1 is a diagram showing a configuration of an information search apparatus according to the present embodiment. In the figure, the information retrieval apparatus is composed of the following elements. That is, a search expression input unit 102 that receives an input of the search expression 101 from a user who requests a search, and a search expression evaluation section 103 that evaluates resource consumption at the time of search by the input search expression, which is an important element of the present invention. The search formula dividing unit 104 that divides the search formula and outputs a partial search formula and a search command list, which are also important elements, according to the input search formula and the search command list output from the search formula splitting unit 104 A search processing unit 105 that executes the actual search process, and a search result output unit 106 that outputs the search result 112 to the user who requested the search.
The search processing unit 105 further includes the following elements. That is, a search control unit 107 that controls search processing according to a search expression or a search command list, a search execution unit 109 that executes a search for one or more types of individual DBs 111 associated with a composite DB, and a search execution unit 109 An intermediate result management unit 110 that manages the obtained search results as intermediate results, and an intermediate result totaling unit 108 that executes a totaling (logical operation) process between the intermediate results.
Note that the search execution unit 109 may include a search function for an individual DB, or may call a search function of an individual DB on another device to obtain a search result.
In addition, each unit such as the search expression evaluation unit is described by a software program that realizes the function, and although not illustrated, there is a processor (CPU) and a memory, and a program in which each unit is described. To obtain each function such as search expression evaluation.

ここで言うリソースは、情報検索装置に搭載されている、検索処理部105や検索実行部109が、バッファとして使用する際の容量が問題となるメモリであってもよいし、一時的に使用する他のメモリでもよい。また、一時ファイルを格納するディスク装置でもよい。または他にも、CPU使用率の基となるCPUや、ネットワーク使用率の基となるチャネルでもよい。同様に、異なる装置上にある個別DB検索装置のメモリやディスク装置、CPU、チャネルでもよい。
その他に検索が出来なくなるファクターとして、情報検索装置で設定される検索式の長さが長過ぎる場合や、演算子の数が多過ぎるなど、情報検索装置の諸元も考えられる。また更に、個別DBが全文検索を実行する場合の、検索キーワード数や、ユニークな文字数が多過ぎる場合もある。
The resource mentioned here may be a memory having a problem in capacity when used as a buffer by the search processing unit 105 or the search execution unit 109 mounted on the information search apparatus, or temporarily used. Other memories may be used. Further, it may be a disk device for storing temporary files. Alternatively, it may be a CPU that is the basis of the CPU usage rate or a channel that is the basis of the network usage rate. Similarly, a memory, a disk device, a CPU, or a channel of an individual DB search device on a different device may be used.
Other factors that make the search impossible are the specifications of the information search device, such as when the length of the search expression set by the information search device is too long or the number of operators is too large. Furthermore, there are cases where the number of search keywords or the number of unique characters is too large when the individual DB performs a full text search.

検索時のリソース消費量の評価では、複合DBに関連づけられている個別のDBに対する検索処理や、結果の集計処理について、実行時のリソース情報を検索式評価部103が保持し、その情報を元に全体の検索実行時のリソース消費量を評価する。
具体的には例えば、個別のDBが文書検索用のDBであった場合は、検索時にディスク装置からメモリ上に読み込まれる索引のサイズを、検索キーワードの文字数から計算しても良い。多くの文書検索では、文書中に出現するキーワードや文字の出現位置の情報を、索引としてDBに保持している。キーワードの文書中での出現頻度によって、該当する出現位置情報のサイズは変化するが、検索式中の検索キーワードの出現位置情報の合計サイズを調べることで、それがメモリの容量を超えるか否かを評価することができる。そのために、出現位置情報のサイズの情報を、出現位置情報とは別に記録しておいてもよいし、直接出現位置情報の記録されたファイルのサイズを調べても良い。また、キーワードや文字の出現頻度と、検索式中の検索キーワード数やキーワードの文字数をパラメータにして、索引サイズ等の必要となるメモリサイズを計算する計算式を予め定義しておいても良い。例えば単純に、(比例定数K×キーワードの出現頻度)を1検索キーワードの出現位置情報のサイズとして、その総和をとる等の計算式が考えられる。いずれの場合も、キーワードの出現頻度や、出現位置情報のサイズは、文書をDBに登録する時点で取得することができる。
In the evaluation of resource consumption at the time of search, the search expression evaluation unit 103 holds resource information at the time of execution of search processing for individual DBs associated with the composite DB and totalization processing of the results. Evaluate the resource consumption during the entire search.
Specifically, for example, when the individual DB is a document search DB, the size of the index read from the disk device onto the memory at the time of the search may be calculated from the number of characters of the search keyword. In many document searches, information on the appearance positions of keywords and characters appearing in a document is stored in the DB as an index. Depending on the frequency of occurrence of the keyword in the document, the size of the corresponding occurrence position information changes, but by checking the total size of the appearance position information of the search keyword in the search formula, whether or not it exceeds the memory capacity Can be evaluated. Therefore, the size information of the appearance position information may be recorded separately from the appearance position information, or the size of the file in which the appearance position information is directly recorded may be checked. Further, a calculation formula for calculating a required memory size such as an index size may be defined in advance using the appearance frequency of the keyword or character, the number of search keywords in the search formula or the number of characters of the keyword as parameters. For example, a calculation formula such as simply taking (the proportionality constant K × appearance frequency of the keyword) as the size of the appearance position information of one search keyword and taking the sum thereof can be considered. In any case, the appearance frequency of the keyword and the size of the appearance position information can be acquired when the document is registered in the DB.

所定のパーセンテージ、例えば最初の10パーセントを検索してみて、検索に該当する出現頻度を抽出して、それを10倍してオーバフローするかどうかを調べてもよい。または、過去に入力された検索式とその消費リソース量の記録を一定回数分保存しておき、検索時にはそれら検索式によるリソース消費量の統計的情報を利用しても良い。例えば統計情報の中には、検索式毎の検索ヒット件数や、検索実行中のメモリやCPUのリソースの消費量の推移などを含んでも良い。中間結果集計処理の場合では、予想される検索のヒット件数から見積もるようにしてもよい。
また、検索時にリソースを大量に消費する個別のDB111と、そうでない個別のDBが共存している場合は、DB毎の重みを設定してもよい。
また、リソースが検索実行部の諸元であった場合、例えば受理できる検索式の長さの上限が設定されている場合は、文字数やバイト数をカウントするだけでよい。すなわち個別のDBの検索実行部109が1回に受理できる検索式の長さの上限がNバイトと定められている場合、strlen()のような文字列の長さを取得する関数で、検索式101の長さを取得することで、上限Nバイトを超えているか否かを容易に判定することができる。
このように、評価するための上限情報と方式を検索式評価部103が保持しており、その情報を元にリソース消費量を評価する。
It is possible to search a predetermined percentage, for example, the first 10 percent, extract the appearance frequency corresponding to the search, and multiply it by 10 to see if it overflows. Alternatively, it is also possible to store a record of a search formula and its consumed resource amount that have been input in the past for a certain number of times, and use statistical information of the resource consumption based on these search formulas during the search. For example, the statistical information may include the number of search hits for each search expression, the transition of the consumption of memory and CPU resources during search execution, and the like. In the case of the intermediate result totaling process, it may be estimated from the expected number of search hits.
In addition, when an individual DB 111 that consumes a large amount of resources at the time of search and an individual DB that does not exist coexist, a weight for each DB may be set.
Further, when the resource is the specification of the search execution unit, for example, when the upper limit of the length of the search expression that can be accepted is set, it is only necessary to count the number of characters and the number of bytes. That is, when the upper limit of the length of a search expression that can be accepted at one time by the individual DB search execution unit 109 is determined to be N bytes, a function that acquires the length of a character string such as strlen () By acquiring the length of Expression 101, it can be easily determined whether or not the upper limit of N bytes is exceeded.
In this way, the search expression evaluation unit 103 holds the upper limit information and method for evaluation, and the resource consumption is evaluated based on the information.

図2は、本実施の形態における情報検索装置の、検索式分割部104と検索式評価部103による、検索処理の流れを示した動作フロー図である。
この図により本実施の形態における情報検索装置の動作を説明する。情報検索装置は、ステップS201(以後ステップの記述を省略する)で検索式入力部102により入力された所望の情報検索を記述した所定検索式を読み込むと、S202でこれをその所定形式での最簡易形式に分解して、S203で検索式評価部103により、この簡易形式による検索式で検索した時に情報検索装置が使用するリソースの消費量を評価する。この検索式の評価により、検索時のリソース消費量が、情報検索装置で利用可能なリソースの上限値(以降、リソース上限値と呼ぶ)の範囲であった場合(No)は、S204に進む。そして検索式分割部104は簡易形式を合成して、上位の簡易形式とする。そしてS203の評価をして、以後この評価がリソース上限値を超えるまでS204のループを繰返す。
ところがS202の検索式による評価で、検索時のリソース消費量が情報検索装置で利用可能なリソースの上限値を超えていた場合(Yes)は、S205で検索式分割部104により、先のS203でリソース上限値を超える直前の検索式について、検索時のリソース消費量がリソース上限値の範囲内に収まるよう、複数の部分検索式に分割する等、検索式を再構成する。S203’においてこの部分検索式でよいことを確認すると、S206でこの部分検索式を検索命令リストとして出力する。そして検索処理部105により、この検索命令リストに従った検索処理が実行される。最後にこの検索処理によって得られた検索結果を、検索結果出力部106からユーザに対して出力して終了する。
FIG. 2 is an operation flowchart showing the flow of search processing performed by the search formula dividing unit 104 and the search formula evaluation unit 103 of the information search apparatus according to the present embodiment.
The operation of the information search apparatus in this embodiment will be described with reference to this figure. When the information retrieval apparatus reads a predetermined retrieval expression describing a desired information retrieval input by the retrieval expression input unit 102 in step S201 (hereinafter, description of the step is omitted), in step S202, the information retrieval apparatus converts the predetermined retrieval expression in the predetermined format. The information is decomposed into a simple format, and the search expression evaluation unit 103 evaluates the consumption amount of the resources used by the information search apparatus when searching with the search expression in the simple format in S203. If the resource consumption during the search is within the range of the upper limit value of resources that can be used by the information search apparatus (hereinafter referred to as the resource upper limit value) (No), the process proceeds to S204. Then, the search expression dividing unit 104 synthesizes the simple formats into an upper simple format. Then, the evaluation of S203 is performed, and thereafter the loop of S204 is repeated until this evaluation exceeds the resource upper limit value.
However, in the evaluation based on the search formula in S202, if the resource consumption at the time of search exceeds the upper limit value of the resources that can be used in the information search apparatus (Yes), the search formula dividing unit 104 in S205 performs the previous S203. For the search expression immediately before exceeding the resource upper limit value, the search expression is reconfigured, for example, divided into a plurality of partial search expressions so that the resource consumption at the time of the search is within the range of the resource upper limit value. If it is confirmed in S203 ′ that this partial search expression is acceptable, this partial search expression is output as a search instruction list in S206. The search processing unit 105 executes search processing according to the search command list. Finally, the search result obtained by this search process is output from the search result output unit 106 to the user, and the process ends.

検索命令リストとは、ユーザから入力された検索式と等価になるよう、部分検索式による検索の実行や、中間結果の集計処理の実行順を指定するリストである。例を図4に検索式と検索命令リストの一例を示す。いま、検索式401が入力され、検索式の評価の結果、検索時のリソース消費量がリソース上限値を超えていたとする。この検索式401を検索式分割部104で分割した結果として、検索命令リスト402が出力される。図4の例では、検索命令リスト402は、最初に検索実行部で部分検索式(A AND B)を実行し、次に検索実行部で部分検索式(C AND D)を実行し、最後に直前の2回の検索で得られた中間結果の集計処理ORを実施することを指定している。検索命令リスト402のように処理することで、検索式401と同じ検索結果を得ることができる。
単純に行うにはこのように、分割は論理演算の各論理毎に分割すればよい。
また検索結果や中間結果とは、検索式で与えられた検索条件に適合したレコード情報の集合である。レコード情報には、DB中のレコードの識別子や、検索条件に適合したレコードを評価したスコア、DBのカラムに格納されているデータなどを含んでよい。
The search instruction list is a list that specifies the execution order of the partial search expression execution and the intermediate result aggregation process so as to be equivalent to the search expression input by the user. FIG. 4 shows an example of a search expression and a search command list. Now, it is assumed that the search formula 401 is input and the resource consumption during the search exceeds the resource upper limit value as a result of the evaluation of the search formula. As a result of dividing the search formula 401 by the search formula dividing unit 104, a search command list 402 is output. In the example of FIG. 4, the search instruction list 402 first executes a partial search expression (A AND B) in the search execution unit, then executes a partial search expression (C AND D) in the search execution unit, and finally It specifies that the aggregation process OR of the intermediate results obtained by the previous two searches is performed. By processing like the search command list 402, the same search result as the search formula 401 can be obtained.
In order to perform simply, as described above, the division may be performed for each logic of the logical operation.
A search result or intermediate result is a set of record information that conforms to a search condition given by a search expression. The record information may include an identifier of a record in the DB, a score obtained by evaluating a record that matches the search condition, data stored in a DB column, and the like.

図3は、本実施の形態における情報検索装置の検索処理部105による検索処理の流れを示した動作フロー図である。検索処理部105は、ユーザから入力された検索式や、部分検索式と検索命令リストに従って、検索を処理する。
例えば部分検索式を含む検索命令リストが入力されると、検索制御部107はS301で、検索命令リストから検索の実行命令を1つ、例えば検索(A AND B)を取得する。続いてS302で、取得した命令が部分検索式を実行する内容であれば(検索)に移り、検索実行部109に対して部分検索式による検索の実行命令を発行する。検索実行部109はS303で、後の実施の形態で述べるように、必要に応じて部分検索式から検索を実行するための検索プランを生成する。S304では、複合DBに関連づけられている個別のDB111に対して検索を実行し、検索結果を取得する。取得した検索結果はS305で、検索の中間結果として中間結果管理部110に格納する。
S302で、取得した命令が中間結果の集計の実行であった場合は(集計)に移り、S306で中間結果管理部110から複数の中間結果を取得する。S307で中間結果の集計処理を行い、S308で次の部分検索式に移り、S304またはS306の処理を繰り返す。こうして得られた中間結果を、S309で、最終検索式に基づいて中間結果を集計する。中間結果の集計は、S306で逐次実行してもよい。そして、検索結果出力部106に対して出力する。
FIG. 3 is an operation flowchart showing the flow of search processing by the search processing unit 105 of the information search apparatus in the present embodiment. The search processing unit 105 processes a search according to a search expression input from a user, a partial search expression, and a search command list.
For example, when a search command list including a partial search expression is input, the search control unit 107 acquires one search execution command, for example, search (A AND B) from the search command list in S301. In step S <b> 302, if the acquired instruction is a content for executing a partial search expression, the process proceeds to (search), and a search execution instruction based on the partial search expression is issued to the search execution unit 109. In step S303, the search execution unit 109 generates a search plan for executing a search from a partial search formula as necessary, as described in a later embodiment. In S304, a search is performed on the individual DB 111 associated with the composite DB, and the search result is acquired. The acquired search result is stored in the intermediate result management unit 110 as an intermediate result of the search in S305.
If the acquired instruction is execution of totaling of intermediate results in S302, the process proceeds to (totaling), and a plurality of intermediate results are acquired from the intermediate result management unit 110 in S306. In step S307, the intermediate result is summed up. In step S308, the process proceeds to the next partial search expression, and the processing in step S304 or S306 is repeated. The intermediate results obtained in this way are summed up in S309 based on the final search formula. The aggregation of intermediate results may be performed sequentially in S306. Then, it is output to the search result output unit 106.

検索処理部105への入力が、ユーザから入力された検索式であった場合は、S301や、S302をスキップして、直接検索実行部109でS304以降、またはS306を実行してもよい。また、中間結果管理部110を介さずに、直接ステップS309で検索結果出力部106に検索結果を出力してもよい。
また検索実行部109では、S303の検索プラン生成処理ステップで、部分検索式による検索時間や、検索時のメモリ使用量が最小になるよう、部分検索式の最適化を行ってもよい。
検索実行や、中間結果集計の処理では、それ以前の処理の結果によっては、実行する必要がないものもある。そのような場合、実行する必要がない検索命令をスキップしてもよい。例えば、次の検索式が与えられ、それ以降の(01),(02),(04)の3つの部分木に分割されたとする。
「((A AND B) OR (C AND D)) AND (E OR F)」
(01)検索(A AND B)
(02)検索(C AND D)
(03)集計OR(検索1、2の中間結果を集計)
(04)検索(E OR F)
(05)集計AND(検索4、集計3の中間結果を集計)
このとき、例えば、集計(03)の実行結果が偽であった(中間結果が何も無い)場合、検索(04)を実行しなくてよい。
When the input to the search processing unit 105 is a search expression input from the user, S301 and S302 may be skipped, and the direct search execution unit 109 may execute S304 and subsequent steps, or S306. Further, the search result may be directly output to the search result output unit 106 in step S309 without using the intermediate result management unit 110.
The search execution unit 109 may optimize the partial search expression so that the search time by the partial search expression and the memory usage during the search are minimized in the search plan generation processing step of S303.
In search execution and intermediate result aggregation processing, depending on the results of the previous processing, there are cases where it is not necessary to execute it. In such a case, a search command that does not need to be executed may be skipped. For example, suppose that the following search expression is given, and it is divided into the following three subtrees (01), (02), and (04).
"(((A AND B) OR (C AND D)) AND (E OR F)"
(01) Search (A AND B)
(02) Search (C AND D)
(03) Aggregation OR (aggregate intermediate results of searches 1 and 2)
(04) Search (E OR F)
(05) Aggregation AND (Aggregate intermediate results of Search 4 and Aggregation 3)
At this time, for example, if the execution result of the totalization (03) is false (there is no intermediate result), the search (04) does not have to be executed.

図1の検索式入力部102ないし中間結果管理部110の各処理部は、1つのプロセッサで実行されるプログラムであってもよいし、それぞれ専用のプロセッサで実行されるように構成してもよい。
またユーザが入力する検索式は、ユーザが直接キーボードなどの入力装置で入力してもよいし、検索式を記述したファイルを入力し、これを検索式入力部102が読取るようにしてもよい。
入力された検索式101や、検索式入力部102から検索処理部105に伝達する検索式、部分検索式、検索命令リストは、メモリ上の情報としてプロセッサが図示しないバスを通じて伝達してよいし、一時ファイルを介して一括伝達してもよい。また、グラフィカルユーザインターフェースを通してユーザが入力した検索条件を、情報検索装置の入力の形式に変換する処理を含んでもよい。
中間結果管理部110では、メモリ上で中間結果を管理してもよいし、中間結果をディスク装置など外部記憶装置上に一時ファイルとして記憶し、後で利用してもよい。検索実行部109や検索処理部105が出力する検索結果も、メモリ上の情報として伝達してもよいし、ファイルを介して伝達してもよい。
検索結果出力部106は、結果を画面などの出力装置に出力してもよいし、ファイルに出力してもよい。また、検索結果を編集・加工・利用する別の装置にメモリ上の情報として出力してもよい。
Each processing unit of the search expression input unit 102 to the intermediate result management unit 110 in FIG. 1 may be a program executed by one processor, or may be configured to be executed by a dedicated processor. .
The search formula input by the user may be input directly by the user using an input device such as a keyboard, or a file describing the search formula may be input and read by the search formula input unit 102.
The search formula 101 inputted, the search formula transmitted from the search formula input unit 102 to the search processing unit 105, the partial search formula, and the search command list may be transmitted as information on the memory through a bus (not shown), You may transmit collectively via a temporary file. Further, it may include processing for converting a search condition input by the user through the graphical user interface into an input format of the information search apparatus.
The intermediate result management unit 110 may manage the intermediate result on the memory, or store the intermediate result as a temporary file on an external storage device such as a disk device and use it later. Search results output by the search execution unit 109 and the search processing unit 105 may also be transmitted as information on a memory or may be transmitted via a file.
The search result output unit 106 may output the result to an output device such as a screen or may output it to a file. Further, the search result may be output as information on a memory to another device that edits, processes, and uses the search result.

本実施の形態における情報検索装置は、上記のように、ユーザが入力した検索式の検索時のリソース消費量を評価し、リソース上限値を超えていた場合は検索式を分割して検索を実行するように構成されている。このため従来の方式で、ユーザから入力された検索式により検索時のリソース消費量がリソース上限値を超えるため検索の実行が不可能であった場合でも、検索の実行が可能である。 As described above, the information search apparatus according to the present embodiment evaluates the resource consumption during the search of the search expression input by the user, and executes the search by dividing the search expression when the resource upper limit is exceeded. Is configured to do. Therefore, in the conventional method, even when the search cannot be executed because the resource consumption during the search exceeds the resource upper limit value according to the search expression input from the user, the search can be executed.

実施の形態2.
先の実施の形態における情報検索装置では、検索式を分割して、検索の処理を分割する装置を説明した。こうすると、検索式の分割数が多いと、検索の初期化処理や中間結果管理部へのデータの入出力処理等により、検索時間が増大することが予想される。言い換えれば、検索式の分割数が少ないほど、全体の検索処理の効率は良くなる。ここでは情報検索装置が、検索式分割部により検索処理を向上する分割を行う方式を説明する。
一般に論理式は、木構造の論理に展開可能である。そこで本実施の形態における検索式の分割方式は、検索式を木構造の論理式とみなして、2分木と呼ばれる木構造に展開する。2分木とは、リーフを除く全てのノードにおける子の数が2以下である木構造である。検索式を2分木に展開したとき、その木のリーフは、1つの検索実行部の検索処理に対応し、内部ノードは中間結果集計部の集計処理に対応する。この2分木の高さをDとする。
Embodiment 2. FIG.
In the information search apparatus in the previous embodiment, the apparatus that divides the search expression and divides the search processing has been described. In this way, if the number of search expression divisions is large, the search time is expected to increase due to search initialization processing, data input / output processing to the intermediate result management unit, and the like. In other words, the smaller the number of search expression divisions, the better the overall search processing efficiency. Here, a description will be given of a method in which the information search apparatus performs division for improving the search processing by the search expression dividing unit.
In general, a logical expression can be expanded into a tree-structured logic. Therefore, in the search expression dividing method according to the present embodiment, the search expression is regarded as a logical expression of a tree structure, and is expanded into a tree structure called a binary tree. A binary tree is a tree structure in which the number of children in all nodes except leaves is 2 or less. When the search expression is expanded into a binary tree, the leaf of the tree corresponds to the search process of one search execution unit, and the internal node corresponds to the total process of the intermediate result totaling unit. Let D be the height of this binary tree.

図5は、本実施の形態における情報検索装置の検索式分割部による検索式分割処理を示す動作フロー図である。
図において、検索式分割部104bは、検索式が入力されると、ステップS501で検索式を2分木に展開する。S502では高さiが1の部分木を構築する。次にS503で、前のステップで構築した部分木に対して、検索式評価部103により検索時のリソース消費量を評価する。S503で部分木による検索時リソース消費量がリソース上限を超えていない場合(No)は、次のS504で高さi+1の部分木を構築する。そしてS503で上限値になるまで木を高くして行く。
そしてS503で部分木による検索時リソース消費量がリソース上限を超える場合(Yes)はS505で、S503で調べてYesになる直前の最も高さが高い部分木による部分検索式を分割して新しい部分検索式を持つ部分木によってもリソースの上限値を超えないかをS503’で確認して、S506で部分検索式と、中間結果集計処理(ルート)を検索命令リストとして出力する。即ちS503とS504の処理を、高さi=1(すなわちリーフのみの部分木)から、最大Dまで繰り返す。そしてS501で展開した2分木の分割が完了したら、S506で検索命令リストを出力して終了する。
FIG. 5 is an operation flowchart showing the search expression dividing process by the search expression dividing unit of the information search apparatus in the present embodiment.
In the figure, when a search expression is input, the search expression dividing unit 104b expands the search expression into a binary tree in step S501. In S502, a subtree having a height i of 1 is constructed. In step S503, the search expression evaluation unit 103 evaluates the resource consumption during the search for the subtree constructed in the previous step. If the resource consumption during the search by the subtree does not exceed the resource upper limit in S503 (No), a subtree having a height i + 1 is constructed in the next S504. In step S503, the tree is raised until the upper limit is reached.
If the resource consumption at the time of searching by the subtree exceeds the resource upper limit in S503 (Yes), in S505, the partial search expression by the subtree having the highest height immediately before becoming Yes is checked in S503 and a new part is obtained. Whether or not the upper limit value of the resource is exceeded by the subtree having the search expression is checked in S503 ′, and the partial search expression and the intermediate result totaling process (root) are output as a search instruction list in S506. That is, the processing of S503 and S504 is repeated from the height i = 1 (that is, the leaf-only subtree) to the maximum D. When the division of the binary tree developed in S501 is completed, the search command list is output in S506 and the process is terminated.

このようにS501で検索式を2分木に展開したが、検索式を2分木に展開する方法は複数ある。例えば図13の検索式1101は、木1102のようにも、木1103のようにも展開可能である。しかし木1102のように、左(または右)に深い木の場合は、検索式の分割数が多くなる可能性がある。例えば、部分木1104がひとつの部分検索式として分割された場合、リーフC、リーフDは、単独で部分検索式となり、分割効率がよくない。一方で、木1103のように平衡の取れた木(高さが最小の木)の場合、木1102のような問題がない。従って検索式を2分木に展開する場合は、木1103のような、平衡の取れた木に展開する。   In this way, the search expression is expanded into a binary tree in S501, but there are a plurality of methods for expanding the search expression into a binary tree. For example, the search expression 1101 in FIG. 13 can be expanded as a tree 1102 or a tree 1103. However, in the case of a tree deep on the left (or right) like the tree 1102, there is a possibility that the number of divisions of the search expression increases. For example, when the partial tree 1104 is divided as one partial search expression, the leaves C and D are single partial search expressions, and the division efficiency is not good. On the other hand, in the case of a balanced tree (a tree having a minimum height) such as the tree 1103, there is no problem like the tree 1102. Therefore, when expanding the search expression to a binary tree, it expands to a balanced tree such as the tree 1103.

本実施の形態における検索式分割処理の動作を図6により説明する。その場合の例として図4の検索式401を用いる。
1)検索式601が入力されると、S501で検索式601は2分木602に展開される。ここで、AないしDはリーフで、複合DBに関連づけられた個別のDBに対する検索条件でもある。内部ノードEないしGは、中間結果の集計処理である。この例では中間結果の集計は、ANDまたはORの論理演算としている。ところで例としてリソース上限値を100、AないしD単体の検索時のリソース消費量を30とする。説明を判りやすくするため、中間結果の集計処理はリソースを消費しないものとする。また部分木による検索時のリソース消費量は、リーフ単体での検索時のリソース消費量の和とする。なお、木602の高さは3である。
2)S502で、高さ1の部分木、即ち木A、木B、木C、木Dを構築する。
The operation of the search expression dividing process in the present embodiment will be described with reference to FIG. As an example in that case, the search formula 401 in FIG. 4 is used.
1) When a search expression 601 is input, the search expression 601 is expanded into a binary tree 602 in S501. Here, A to D are leaves, which are search conditions for individual DBs associated with the composite DB. Internal nodes E to G are intermediate result totaling processes. In this example, the aggregation of intermediate results is an AND or OR logical operation. As an example, assume that the resource upper limit value is 100, and the resource consumption amount when searching for A to D alone is 30. In order to make the explanation easy to understand, it is assumed that the aggregation processing of intermediate results does not consume resources. In addition, the resource consumption during the search using the subtree is the sum of the resource consumption during the search for the leaf alone. The height of the tree 602 is 3.
2) In S502, a partial tree having a height of 1, that is, tree A, tree B, tree C, and tree D is constructed.

3)S503で、S502で構築した部分木の、検索時のリソース消費量を評価する。評価の結果、いずれも30であり、リソース上限(100)の範囲内である。
4)S504で、高さ2の部分木を構築する。即ち木ABE,木CDEを構築する。
5)S503で、S502で構築した部分木の、検索時のリソース消費量を評価する。評価の結果はいずれも60であり、リソース上限の範囲内である。
6)S504で、高さ3の部分木を構築する。即ち木ABCDEFGを構築する。
7)S503で、S502で構築した部分木の、検索時のリソース消費量を評価する。評価の結果は120であり、リソース上限(100)を超えている。
8)S505で、木ABCDEFG中の、2つの高さ2の部分木に対応した検索式を構築する。これは明らかに評価が60であり、リソース範囲内である。S506でこの高さ2の部分木に対応した検索式の情報と、リーフGの情報を、検索命令リストとして出力する。すなわち、部分検索式(A AND B)、部分検索式(C AND D)、中間結果集計処理ORを、検索命令リスト(図4の検索命令リスト402)とする。
3) In S503, the resource consumption during search of the subtree constructed in S502 is evaluated. As a result of the evaluation, both are 30 and are within the range of the resource upper limit (100).
4) In S504, a subtree having a height of 2 is constructed. That is, a tree ABE and a tree CDE are constructed.
5) In S503, the resource consumption during the search of the subtree constructed in S502 is evaluated. The evaluation results are all 60 and are within the range of the resource upper limit.
6) In S504, a subtree of height 3 is constructed. That is, the tree ABCDEFG is constructed.
7) In S503, the resource consumption during the search of the subtree constructed in S502 is evaluated. The result of the evaluation is 120, which exceeds the resource upper limit (100).
8) In S505, a search expression corresponding to two height-2 subtrees in the tree ABCDEFG is constructed. This clearly has a rating of 60 and is within the resource range. In step S506, the search expression information corresponding to the height 2 subtree and the leaf G information are output as a search instruction list. That is, the partial search expression (A AND B), the partial search expression (C AND D), and the intermediate result totaling process OR are set as a search instruction list (search instruction list 402 in FIG. 4).

本実施の形態における情報検索装置は、上記のように検索式を2分木に展開後、リーフからボトムアップに部分木を長く構築して、リソース消費量がリソース上限値を超えたところで、その直前の最長部分木で分割するように構成しているので、検索式の分割処理において、部分検索式による検索時のリソース消費量がリソース上限の範囲内で最大にできる。その結果、検索式の分割数を少なくできる。   The information retrieval apparatus according to the present embodiment constructs a long partial tree from the leaf to the bottom up after expanding the retrieval formula into a binary tree as described above, and when the resource consumption exceeds the resource upper limit value, Since the configuration is such that the previous longest subtree is divided, the resource consumption during the search by the partial search expression can be maximized within the range of the resource upper limit in the search expression dividing process. As a result, the number of search expression divisions can be reduced.

実施の形態3.
先の実施の形態と同様目的で、他の動作を行う情報検索装置を説明する。
本実施の形態における情報検索装置の動作を図7のフロー図により説明する。図において、情報検索装置の検索式分割部104cは、検索式が入力されるとステップS701で、検索式を2分木に展開し、さらに2分木の内部ノードを走査して、同じラベルを持つ親子関係にあるノードを結合する。S701の処理により、2分木では内部ノードの子の数が必ず2以下であったものが、内部ノードが2以上の子を持つことになる。この木の高さをDとする。S702以降では、実施の形態2に示した処理の流れと同様に、ボトムアップに部分木を構築する。S702で、高さ1の部分木を構築する。次にS703で、S702で構築した部分木に対して検索式評価部103により検索時のリソース消費量を評価する。S703で部分木による検索時リソース消費量がリソース上限を超えていない場合(No)は、S704で高さi+1の部分木を構築する。このS703とS704を最大Dの高さまで繰返す。
そしてS703で部分木による検索時リソース消費量がリソース上限を超える場合(Yes)は、S705でその直前の部分木による分割を再検討して、各々の部分木による分割が検索時のリソース消費量がリソース上限の範囲で最大となり、つまり分割数が最小となる部分木を構築する。これをS706で、集計処理論理と、分割された高さiの部分木に対応する部分検索式の情報として検索命令リストを出力し、分割を終了する。
Embodiment 3 FIG.
For the same purpose as in the previous embodiment, an information search apparatus that performs other operations will be described.
The operation of the information search apparatus in this embodiment will be described with reference to the flowchart of FIG. In the figure, when a search expression is input, the search expression dividing unit 104c of the information search apparatus expands the search expression into a binary tree in step S701, and further scans internal nodes of the binary tree to obtain the same label. Join nodes that have a parent-child relationship. By the processing of S701, in the binary tree, the number of children of the internal node is always 2 or less, but the internal node has 2 or more children. Let D be the height of this tree. After S702, a subtree is constructed in a bottom-up manner, similar to the processing flow described in the second embodiment. In S702, a subtree having a height of 1 is constructed. In step S <b> 703, the search expression evaluation unit 103 evaluates the resource consumption during the search for the subtree constructed in step S <b> 702. If the resource consumption during the search by the subtree does not exceed the resource upper limit in S703 (No), a subtree having a height i + 1 is constructed in S704. The steps S703 and S704 are repeated until the maximum height D is reached.
If the resource consumption at the time of retrieval by the subtree exceeds the resource upper limit at S703 (Yes), the division by the subtree immediately before it is reconsidered at S705, and the division by each subtree is the resource consumption at the time of retrieval. Is the maximum in the range of the resource upper limit, that is, the subtree having the minimum number of divisions is constructed. In step S706, a search instruction list is output as information on the total processing logic and the partial search expression corresponding to the divided subtree of height i, and the division ends.

先の実施の形態2における図5のS504の処理では、高さiの木は、一意に2つの高さi−1の部分木に分割できた。しかし本実施の形態における図7のS705の処理で、高さiの木を高さi−1の木に分割する方法は、何通りも存在する。S704における部分木の分割処理のような、部分木の検索時のリソース消費量をリソース上限の範囲内で最大とする、ノードの組合せ最適化問題は、近似解を多項式時間で得るアルゴリズムが考案されており、高速に処理することが可能である。   In the process of S504 of FIG. 5 in the previous second embodiment, the tree of height i can be uniquely divided into two subtrees of height i-1. However, there are many methods for dividing the tree of height i into the tree of height i−1 in the processing of S705 of FIG. 7 in the present embodiment. An algorithm for obtaining an approximate solution in polynomial time has been devised for the node combination optimization problem that maximizes the resource consumption during subtree search within the range of the resource upper limit, such as the subtree division processing in S704. And can be processed at high speed.

図8は、本実施の形態における、検索式分割処理の例を示す図である。
いま、検索式801が入力されたとする。このとき、先の実施の形態2に示した、検索式を2分木802に展開してから分割する方式では、2分木802は、部分木ABG、部分木CDH、部分木EFIの3つの部分木に分割される。検索命令リストは以下の5つの処理からなる。
(1)検索(A OR B)(Gをルートとする部分木の処理)
(2)検索(C OR D)(Hをルートとする部分木の処理)
(3)中間結果集計OR (内部ノードJの処理)
(4)検索(E OR F)(Iをルートとする部分木の処理)
(5)中間結果集計OR(内部ノードKの処理)
FIG. 8 is a diagram illustrating an example of search expression division processing according to the present embodiment.
Assume that a search expression 801 is input. At this time, in the method of dividing the search expression into the binary tree 802 shown in the second embodiment, the binary tree 802 includes three subtrees ABG, subtree CDH, and subtree EFI. Divided into subtrees. The search command list consists of the following five processes.
(1) Search (A OR B) (Processing of subtree with G as root)
(2) Retrieval (C ORD) (Processing of subtree rooted in H)
(3) Intermediate result total OR (internal node J processing)
(4) Search (E OR F) (Processing of subtree rooted at I)
(5) Intermediate result total OR (internal node K processing)

本実施の形態における検索式分割処理の流れは以下の通りである。
11)検索式801が入力されると、S701で検索式801を2分木802に展開する。ここで、AないしEはリーフで、複合DBに関連づけられた個別のDBに対する検索条件である。内部ノードGないしKは、中間結果の集計処理である。実施の形態2と同様に、この例では中間結果の集計は、ANDまたはORの論理演算としている。リソース上限値を100とし、AないしEの検索処理のリソース消費量は、図8に示す通りであるとする。更に、木802で同じラベルを持ち、親子関係にある内部ノードGないしKを結合して、木803が得られる。
12)S702で、高さ1の部分木を構築する。すなわち木A〜木Fである。
13)S703で、S702で構築した部分木の、検索時のリソース消費量を評価する。評価の結果、リソース消費量は30または40で、いずれもリソース上限(100)の範囲内である。
The flow of search expression division processing in this embodiment is as follows.
11) When the search expression 801 is input, the search expression 801 is expanded into the binary tree 802 in S701. Here, A through E are leaves, which are search conditions for individual DBs associated with the composite DB. The internal nodes G to K are the intermediate result aggregation process. Similar to the second embodiment, in this example, the aggregation of intermediate results is an AND or OR logical operation. Assume that the resource upper limit value is 100, and the resource consumption of the search processing from A to E is as shown in FIG. Furthermore, a tree 803 is obtained by combining internal nodes G to K having the same label in the tree 802 and having a parent-child relationship.
12) In S702, a subtree having a height of 1 is constructed. That is, tree A to tree F.
13) In S703, the resource consumption during search of the subtree constructed in S702 is evaluated. As a result of the evaluation, the resource consumption is 30 or 40, both of which are within the range of the resource upper limit (100).

14)S704で、高さ2の部分木を構築する。すなわち木ABCDEFKである。
15)S703で、S704で構築した部分木の、検索時のリソース消費量を評価する。評価の結果は200であり、リソース上限を超えている。
16)S705で、この場合に木ABCDEFGは高さ2であり、高さ1にすることは意味がないので、木ABCDEFGを2つ以上の各種の部分木に分割する。ここで例えば、木803のリーフを左から順に選んで部分木に分割した場合、リーフABを含む部分木、リーフCDEを含む部分木、リーフKを含む3つの部分木803に分割できる。または木804のようにリーフの組合せを変えると、最終的に木805のように、部分木ACDGと部分木BEFHの2の部分木と、ルートに分割できる。
17)木803の分割が完了したので、S706で検索命令リストを出力して終了する。
このときの、検索命令リストは以下の3つの処理からなる。
(11)検索(A OR C OR D)(Gをルートとする部分木の処理)
(12)検索(B OR E OR F)(Hをルートとする部分木の処理)
(13)中間結果集計OR(内部ノードKの処理)
14) In S704, build a subtree of height 2. That is, tree ABCDEFK.
15) In S703, the resource consumption during search of the subtree constructed in S704 is evaluated. The result of the evaluation is 200, which exceeds the resource upper limit.
16) In step S705, the tree ABCDEFG has a height of 2 in this case, and since there is no point in setting the height to 1, the tree ABCDEFG is divided into two or more various subtrees. Here, for example, when the leaves of the tree 803 are selected in order from the left and divided into partial trees, the tree can be divided into a partial tree including the leaf AB, a partial tree including the leaf CDE, and three partial trees 803 including the leaf K. Alternatively, when the combination of leaves is changed as in the tree 804, the tree can be finally divided into two subtrees, a subtree ACDG and a subtree BEFH, as in the tree 805.
17) Since the division of the tree 803 is completed, the search command list is output in S706 and the process is terminated.
At this time, the search instruction list includes the following three processes.
(11) Search (A OR C OR D) (Processing of subtree rooted in G)
(12) Retrieval (B OR E OR F) (Processing of subtree with H as root)
(13) Intermediate result totaling OR (processing of internal node K)

本実施の形態における情報検索装置は、上記のように、検索式を2分木に展開後、更に同じラベルを持つ親子関係にあるノードを結合し、リーフからボトムアップに部分木を構築し、リソース消費量がリソース上限値を超えたところで、部分木を分割するように構成しているので、検索式の分割処理において、先の実施の形態における方式と比べ、更に分割数を少なくできる。   As described above, the information search device in the present embodiment expands the search expression into a binary tree, further joins nodes in the parent-child relationship having the same label, and constructs a subtree from the leaf to the bottom up, Since the subtree is divided when the resource consumption exceeds the resource upper limit value, the number of divisions can be further reduced in the search expression division processing compared to the method in the previous embodiment.

実施の形態4.
特別な形式の検索式について説明する。本実施の形態においては、情報検索装置の検索式分割部104dは、検索式をDNF(Disjunctive Normal Form)形式の木構造に変形する。DNFは、積和標準形とも呼ばれる論理式の形式の一つで、論理変数を論理演算子ANDで結合した項を、論理演算子ORで結合した形の論理式であり、高さ3の木として表現できる。なお任意の論理式をDNF形式に変形可能である。
Embodiment 4 FIG.
A special form of search expression is described. In the present embodiment, the search formula dividing unit 104d of the information search apparatus transforms the search formula into a tree structure of DNF (Disjunctive Normal Form) format. DNF is a form of logical expression, also called product-sum standard form, which is a logical expression in which logical variables are combined with a logical operator AND and logical terms are combined with a logical operator OR. Can be expressed as An arbitrary logical expression can be transformed into the DNF format.

図9は、本実施の形態における情報検索装置の、検索式分割部104dによる検索式分割処理の動作を示すフロー図である。検索式分割部104dは、検索式が入力されるとS901で、検索式をDNF形式の木に変形する。S902以降は、実施の形態3に示した処理の流れと同様に、ボトムアップに部分木を構築する。即ちS902で、高さiの部分木を構築する。次にS903で、S902で構築した部分木に対して検索式評価部103により検索時のリソース消費量を評価する。S903で部分木による検索時リソース消費量がリソース上限を超えていない場合(No)は、S904で高さi+1の部分木を構築する。こうしてS903とS904で高さを順次高くした木を構築して行く。
S903で部分木による検索時リソース消費量がリソース上限を超える場合(Yes)は、S905で高さiの部分木を、各々の部分木を検索時にリソース消費量がリソース上限の範囲で最大となるよう、すなわち分割数が最小となるよう、2つ以上の高さiの部分木に分割する。こうしてS503ないしS505を高さi=1からこの場合は最大3まで繰返して、ルート(中間結果集計処理)の情報と、分割された高さiの部分木に対応する、部分検索式の情報を、S906で検索命令リストとして作成し、出力する。
このように、図7,図9に示す検索式の論理木の変換を行うことで、最適解が見つけやすくなる。
FIG. 9 is a flowchart showing the operation of the search expression dividing process by the search expression dividing unit 104d of the information search apparatus in the present embodiment. When a search expression is input, the search expression dividing unit 104d transforms the search expression into a DNF tree in S901. Subsequent to S902, a subtree is constructed bottom-up in the same manner as the processing flow described in the third embodiment. That is, in S902, a subtree having a height i is constructed. In step S903, the search expression evaluation unit 103 evaluates the resource consumption during the search for the subtree constructed in step S902. If the resource consumption during the search by the subtree does not exceed the resource upper limit in S903 (No), a subtree having a height i + 1 is constructed in S904. In this way, a tree is constructed in which the height is sequentially increased in S903 and S904.
If the resource consumption during the search by the subtree exceeds the resource upper limit in S903 (Yes), the resource consumption is maximized in the range of the resource upper limit when searching for the subtree of height i in S905. That is, it is divided into two or more height i subtrees so that the number of divisions is minimized. In this way, S503 to S505 are repeated from the height i = 1 to a maximum of 3 in this case, and information on the route (intermediate result totaling process) and information on the partial search expression corresponding to the divided subtree of height i are obtained. In step S906, a search command list is created and output.
As described above, the optimal solution can be easily found by converting the logical trees of the search formulas shown in FIGS.

図10を用いて本実施の形態における検索式分割処理の動作を説明する。
いま、検索式1001が入力されたとする。このとき、先の実施の形態に示した方式では、検索式を2分木に展開後、更に同じラベルを持つ親子関係にあるノードを結合した木1002に変形する。ここで、AないしEはリーフである。内部ノードJないしNは、中間結果の集計処理である。実施の形態2と同様に、この例では中間結果の集計はANDまたはORの論理演算としている。リソース上限値を100、AないしHの検索処理のリソース消費量は、図8の通りであるとする。またこの例での、中間結果集計処理のリソース消費量を以下のように定める。
AND処理・・・子のリソース消費量の最も大きいものと等しい
OR処理・・・子のリソース消費量の総和と等しい
先の実施の形態における方式では、木1002は、部分木ABCDL、部分木EFJ、部分木GIK、部分木Hの4つの部分木に分割される。このときの検索命令リストは以下の7つの処理からなる。
(21)検索(A AND B AND C AND D)
(22)検索(E OR F)
(23)検索(G OR I)
(24)検索(H)
(25)中間結果集計OR(内部ノードKの処理)
(26)中間結果集計AND(内部ノードMの処理)
(27)中間結果集計OR(内部ノードNの処理)
The operation of the search expression dividing process in this embodiment will be described with reference to FIG.
Assume that a search expression 1001 is input. At this time, in the method shown in the previous embodiment, after the search expression is expanded into a binary tree, it is further transformed into a tree 1002 in which nodes in the parent-child relationship having the same label are combined. Here, A to E are leaves. The internal nodes J to N are intermediate result totaling processes. Similar to Embodiment 2, in this example, the aggregation of intermediate results is an AND or OR logical operation. Assume that the resource consumption of the search processing with the resource upper limit value being 100 and A to H is as shown in FIG. In this example, the resource consumption of the intermediate result totaling process is determined as follows.
AND processing: equal to the largest resource consumption of the child OR processing: equal to the sum of the resource consumption of the children In the method in the previous embodiment, the tree 1002 is a subtree ABCDL, subtree EFJ , Subtree GIK, and subtree H are divided into four subtrees. The search command list at this time is composed of the following seven processes.
(21) Search (A AND B AND C AND D)
(22) Search (E OR F)
(23) Search (G OR I)
(24) Search (H)
(25) Intermediate result totaling OR (processing of internal node K)
(26) Intermediate result totaling AND (processing of internal node M)
(27) Intermediate result totaling OR (processing of internal node N)

本実施の形態における検索式分割処理の動作は以下の通りとなる。
21)検索式1001が入力されると、S901で検索式1001をDNF形式の木1003に変形する。
22)S902で、高さ1の部分木を構築する。すなわち木Aないし木Hである。
23)S903で、S902で構築した部分木の、検索時のリソース消費量を評価する。評価の結果、いずれもリソース上限(100)の範囲内である。
24)S904で、高さ2の部分木を構築する。すなわち木ABCDL、木EIL、木EGL、木EHL、木FGL、木FHL、木FILである。
25)S903で、S904で構築した部分木の、検索時のリソース消費量を評価する。評価の結果は、木ABCDL、木EIL、木FILが50、木EGL、木FGLが40、木EHL、木FHLが20であり、いずれもリソース上限の範囲内である。
26)再びS904で、高さ3の木を構築する。すなわち、木AないしNである。
27)再びS903で、S904で構築した高さ3の木の、検索時のリソース消費量を評価する。評価の結果、リソース消費量は270であり、リソース上限値を超えている。
28)S905で、木AないしNを2つ以上の部分木に分割する。木1004に示したように、部分木1005、部分木1006、部分木1007の、3つの部分木に分割できる。
29)S903’で、これらの個別の部分木を評価すると、部分木1005と部分木1006でも100となり、リソース上限内である。従って木1003の分割が完了したので、S906で検索命令リストを出力して終了する。
The operation of the search expression dividing process in the present embodiment is as follows.
21) When the retrieval formula 1001 is input, the retrieval formula 1001 is transformed into a tree 1003 in the DNF format in S901.
22) In S902, a subtree having a height of 1 is constructed. That is, tree A or tree H.
23) In step S903, the resource consumption during search of the subtree constructed in step S902 is evaluated. As a result of the evaluation, both are within the range of the resource upper limit (100).
24) In S904, a subtree having a height of 2 is constructed. That is, they are tree ABCDL, tree EIL, tree EGL, tree EHL, tree FGL, tree FHL, and tree FIL.
25) In S903, the resource consumption during the search of the subtree constructed in S904 is evaluated. The evaluation results are: tree ABCDL, tree EIL, tree FIL are 50, tree EGL, tree FGL are 40, tree EHL, and tree FHL are all within the range of the resource upper limit.
26) In step S904, a tree having a height of 3 is constructed. That is, trees A to N.
27) Again in S903, the resource consumption during search of the tree of height 3 constructed in S904 is evaluated. As a result of the evaluation, the resource consumption is 270, which exceeds the resource upper limit value.
28) In S905, the trees A to N are divided into two or more subtrees. As shown in the tree 1004, it can be divided into three subtrees: a subtree 1005, a subtree 1006, and a subtree 1007.
29) In S903 ′, when these individual subtrees are evaluated, both the subtree 1005 and the subtree 1006 become 100, which is within the resource upper limit. Therefore, since the division of the tree 1003 has been completed, the search command list is output in S906 and the process ends.

このときの、検索命令リストは以下の4つの処理からなる。
(31)検索((A AND B AND C AND D)OR(E AND I))
(32)検索((E AND G)OR(E AND H)OR(F AND G))
(33)検索((F AND H)OR(F AND I))
(34)中間結果集計OR(ルートノードの処理)
こうして実施の形態3と同様に、S905における部分木の分割処理のような、部分木の検索時のリソース消費量をリソース上限の範囲内で最大とするノードの組合せ最適化問題は、近似解を多項式時間で得るアルゴリズムが考案されており、高速に処理することが可能である。
At this time, the search command list includes the following four processes.
(31) Search ((A AND B AND C AND D) OR (E AND I))
(32) Search ((E AND G) OR (E AND H) OR (F AND G))
(33) Search ((F AND H) OR (F AND I))
(34) Intermediate result total OR (root node processing)
Thus, as in Embodiment 3, the node combination optimization problem that maximizes the resource consumption during subtree search within the upper limit of the resource, such as the subtree division processing in S905, is an approximate solution. An algorithm obtained in polynomial time has been devised and can be processed at high speed.

本実施の形態における情報検索装置は、上記したように検索式をDNF形式の木に変形後、リーフからボトムアップに部分木を構築し、リソース消費量がリソース上限値を超えたところで、部分木を分割するように構成しているので、検索式の分割処理において、部分検索式による検索時のリソース消費量がリソース上限の範囲内で最大とすることができる。その結果、検索式の分割数を少なくすることができる。   The information retrieval apparatus according to the present embodiment constructs a partial tree from the leaf to the bottom up after transforming the retrieval formula into a DNF-format tree as described above, and when the resource consumption exceeds the resource upper limit value, In the search expression dividing process, the resource consumption during the search by the partial search expression can be maximized within the range of the resource upper limit. As a result, the number of search expression divisions can be reduced.

本実施の形態の変形として、他の検索式分割部104eによる検索式の分割方式を説明する。即ち検索式をCNF(Conjunctive Normal Form)形式の木構造に変形する。CNFは、和積標準形とも呼ばれる論理式の形式の一つで、論理変数を論理演算子ORで結合した節を、論理演算子ANDで結合した形の論理式であり、この場合は高さ3の木として表現できる。また任意の論理式は、CNFに変形可能である。   As a modification of the present embodiment, a search expression dividing method by another search expression dividing unit 104e will be described. That is, the search formula is transformed into a tree structure of CNF (Conjunctive Normal Form) format. CNF is one of the forms of logical expressions, also called the sum-of-products standard form, and is a logical expression in the form of connecting clauses that combine logical variables with the logical operator OR with the logical operator AND. It can be expressed as three trees. Arbitrary logical expressions can be transformed into CNFs.

この検索式分割部104eによる検索式分割処理の動作は、図9のS901の処理を「検索式をCNFに変形する」ものと同等である。
この検索式分割部104eによる情報検索は、検索式をCNF形式の木に変形後、リーフからボトムアップに部分木を構築し、リソース消費量がリソース上限値を超えたところで、部分木を分割するように構成する。
従って検索式の分割処理において、部分検索式による検索時のリソース消費量を上限値内で最大にでき、検索式の分割数を少なくできる。
The operation of the search expression dividing process by the search expression dividing unit 104e is equivalent to the process of S901 in FIG. 9 that “transforms the search expression into CNF”.
In the information retrieval by the retrieval formula dividing unit 104e, after the retrieval formula is transformed into a CNF format tree, a partial tree is constructed from the leaf to the bottom up, and the partial tree is divided when the resource consumption exceeds the resource upper limit value. Configure as follows.
Therefore, in the search expression dividing process, the resource consumption during the search by the partial search expression can be maximized within the upper limit value, and the number of search expression divisions can be reduced.

実施の形態5.
先の各実施の形態では、情報検索装置は内部的に部分木を構築し、リソース上限値内で最大リソース消費となる検索式を生成して、検索を実行した。本実施の形態では、情報検索装置が分割した検索式を画面やログファイルに出力する構成とした。
図12は、本実施の形態における情報検索装置の構成例を示す図である。この構成は、先の各実施の形態における情報検索装置に、検索式分割部から出力された部分検索式を画面などの出力装置やログファイル1208などに出力する検索式出力部1205を追加した構成になっている。その他の検索式入力部1202、検索式評価部1203、検索式分割部1204、検索処理部1206、検索結果出力部1207は、先の実施の形態のそれらと同じ要素である。
なお、検索式出力部1205が画面などの出力装置やログファイル1208に出力する情報は、検索式分割部1204から出力された部分検索式や検索命令リスト、検索式を分割したか否かのフラグ情報、検索式の分割方法が複数ある場合はその分割方法などの情報でもよい。また、検索式入力部1202に入力された検索式をそのまま出力してもよい。
Embodiment 5. FIG.
In each of the previous embodiments, the information search apparatus internally constructs a subtree, generates a search expression that consumes the maximum resource within the resource upper limit value, and executes the search. In this embodiment, the search formula divided by the information search apparatus is output to a screen or a log file.
FIG. 12 is a diagram illustrating a configuration example of the information search apparatus according to the present embodiment. In this configuration, a search expression output unit 1205 that outputs a partial search expression output from the search expression dividing unit to an output device such as a screen or a log file 1208 is added to the information search apparatus in each of the previous embodiments. It has become. The other search expression input unit 1202, search expression evaluation unit 1203, search expression dividing unit 1204, search processing unit 1206, and search result output unit 1207 are the same elements as those in the previous embodiment.
The information output by the search expression output unit 1205 to an output device such as a screen or the log file 1208 includes a partial search expression output from the search expression dividing unit 1204, a search command list, and a flag indicating whether the search expression has been divided. When there are a plurality of information and search expression division methods, information such as the division method may be used. Further, the search formula input to the search formula input unit 1202 may be output as it is.

図11は、本実施の形態における情報検索装置による、検索処理の動作を示した図である。
図に基づいて動作を説明する。S1301において検索式入力部1202で検索式の入力を受け付けると、S1302において検索式評価部1203で入力された検索式による検索時のリソースの消費量を評価する。検索式の評価により、検索時のリソース消費量がリソース上限値内であった場合(No)は、図示では詳細を示していないが、先の各実施の形態で説明したように、部分木の高さを順次高くして部分検索式を作成して、リソース上限内の最高高さの部分木でS1304に進む。即ちS1302の検索式の評価で、検索時のリソース消費量が利用可能な上限値を超える場合(Yes)に、S1303で検索式分割部1204によりリソース消費量が上限値内となるように複数の部分検索式に分割する。
そしてS1304では、検索式を分割した部分検索式や検索命令リストを、画面やログファイル等1208に出力する。S1205では、入力された検索式や、S1303で分割された部分検索式と検索命令リストに従って、検索処理部1206により検索処理が実行される。最後にS1306で、S1305の検索処理によって得られた検索結果を検索結果出力部1207からユーザに対して出力して終了する。
なおS1304の部分検索式の出力処理は、S1303後に実行される動作とすれば、どの段階で実行するようにしてもかまわない。
FIG. 11 is a diagram showing an operation of search processing by the information search apparatus in the present embodiment.
The operation will be described with reference to the drawings. When the search expression input unit 1202 receives the input of the search expression in S1301, the consumption amount of the resource at the time of the search by the search expression input in the search expression evaluation unit 1203 is evaluated in S1302. If the resource consumption at the time of search is within the resource upper limit value due to the evaluation of the search expression (No), the details are not shown in the figure, but as described in the previous embodiments, the subtree A partial search expression is created by sequentially increasing the height, and the process proceeds to S1304 with the subtree having the highest height within the resource upper limit. That is, in the evaluation of the search expression in S1302, when the resource consumption amount at the time of search exceeds the upper limit value that can be used (Yes), in S1303, the search expression dividing unit 1204 sets a plurality of resource consumption amounts within the upper limit value. Divide into partial search expressions.
In step S1304, the partial search expression obtained by dividing the search expression and the search command list are output to the screen, the log file, etc. 1208. In S1205, the search processing unit 1206 executes search processing according to the input search formula or the partial search formula and search command list divided in S1303. Finally, in step S1306, the search result obtained by the search processing in step S1305 is output to the user from the search result output unit 1207, and the process ends.
Note that the partial search expression output process of S1304 may be executed at any stage as long as the operation is executed after S1303.

このように本実施の形態の情報検索装置は、検索式分割部で分割された検索式に関する情報を画面表示等で出力するので、ユーザが必要に応じて、検索式の分割状況を参照することができる。   As described above, the information search apparatus according to the present embodiment outputs information related to the search expression divided by the search expression dividing unit on a screen display or the like, so that the user refers to the search expression division status as necessary. Can do.

なお、上記各実施の形態では、検索式分割部、検索式評価部等の各要素は、専用の機能を持つとして説明した。しかし汎用の計算機を用いて各実施の形態で説明した図2、3、5、7、9等の各図で示される機能を持たせたプログラムにより、同等の動作をさせる方法としてもよい。
このようにしても情報検索方法として同じ優れた効果が得られる。
In the above embodiments, each element such as the search expression dividing unit and the search expression evaluating unit has been described as having a dedicated function. However, it is also possible to use a general-purpose computer to perform an equivalent operation using a program having the functions shown in each drawing such as FIGS. 2, 3, 5, 7, 9 described in each embodiment.
Even if it does in this way, the same outstanding effect as an information search method is acquired.

実施の形態6.
以下、図14を元に一般的な検索式分割処理の流れを示す。検索式を論理木に展開後の処理の流れは、図7のS702と同等である。
31)検索式1401が入力されると、検索式1401を論理木1402に展開する。この例では中間結果の集計は、ANDまたはORの論理演算としている。リソース上限値を100とし、AないしNの検索処理のリソース消費量は、図14に示す通りであるとする。また、部分木のリソース消費量は、単純のため、その部分木の根のリソース消費量の総和とする。
32)高さ1の部分木を構築する。すなわち、部分木A〜Nである。この部分木の検索時のリソース消費量を評価すると、全て100未満であり、リソース上限の範囲内である。
33)高さ2の部分木を構築する。すなわち部分木1406,1407,1408である。これらの部分木の検索時のリソース消費量を評価すると、全て100未満であるので、リソース上限の範囲内である。
34)高さ3の部分木を構築する。すなわち部分木1409,1410である。
これらの部分木の検索時リソース消費量を評価すると、部分木1409のリソース消費量は30であり、リソース上限の範囲内である。一方、部分木1410のリソース消費量は170であり、リソース上限を超えて得いる。
35)部分木1410の検索時のリソース消費量が、リソース上限を超えているため、部分木を分割する。最適な分割の例として部分木1412と1413のように分割される。分割後は、分割された部分木の検索式と、高さ3の部分木の根のラベルの情報が、検索命令リストに出力される。このとき検索命令リストは以下のようになる。
(41)検索(部分木1412)
(42)検索(部分木1413)
(43)中間結果集計AND(部分木1412,1413の実行結果の集計)
36)高さ4の部分木を構築する。すなわち部分木1411である。部分木1411の検索時のリソース消費量を評価すると60であり、リソース上限の範囲内である。
37)高さ5の部分木を構築する。すなわちノードTを根とする木1405であるが、既にノードSを根とする部分木は分割済みであり、木1405の検索時のリソース消費量が、リソース上限を超えることは明らかである。このような場合は、単に部分木1411の検索命令、ノードSを根とする部分木の検索命令、根Tのラベルの情報を検索命令リストに出力する。すなわち、検索命令リストは以下のようになる。
(51)検索(部分木1411)
(52)検索(部分木1412)
(53)検索(部分木1413)
(54)中間結果集計AND(部分木1412,1413の実行結果の集計)
(55)中間結果集計OR(1の検索および4の集計の実行結果の集計)
Embodiment 6 FIG.
Hereinafter, a flow of a general search expression dividing process will be described with reference to FIG. The flow of processing after expanding the search expression into a logical tree is equivalent to S702 in FIG.
31) When a search expression 1401 is input, the search expression 1401 is expanded into a logical tree 1402. In this example, the aggregation of intermediate results is an AND or OR logical operation. Assume that the resource upper limit value is 100, and the resource consumption of the A to N search processing is as shown in FIG. Also, since the resource consumption of the subtree is simple, it is the sum of the resource consumption of the root of the subtree.
32) Build a subtree of height 1. That is, the subtrees A to N. When the resource consumption during the search of the subtree is evaluated, all are less than 100 and are within the range of the resource upper limit.
33) Build a subtree of height 2 That is, there are subtrees 1406, 1407, and 1408. When the resource consumption at the time of searching these subtrees is evaluated, all of them are less than 100, and therefore are within the range of the resource upper limit.
34) Build a height-3 subtree. That is, the subtrees 1409 and 1410.
When the resource consumption during retrieval of these subtrees is evaluated, the resource consumption of the subtree 1409 is 30, which is within the range of the resource upper limit. On the other hand, the resource consumption of the subtree 1410 is 170, which exceeds the resource upper limit.
35) Since the resource consumption at the time of searching the subtree 1410 exceeds the resource upper limit, the subtree is divided. As an example of optimal division, the subtrees 1412 and 1413 are divided. After the division, the divided subtree search formula and the root label information of the height 3 subtree are output to the search instruction list. At this time, the search command list is as follows.
(41) Search (subtree 1412)
(42) Search (partial tree 1413)
(43) Intermediate result aggregation AND (aggregation of execution results of subtrees 1412 and 1413)
36) Build a height-4 subtree. That is, it is a subtree 1411. When the resource consumption during the search of the subtree 1411 is evaluated, it is 60, which is within the range of the resource upper limit.
37) Build a subtree of height 5. That is, although the tree 1405 is rooted at the node T, the partial tree rooted at the node S has already been divided, and it is clear that the resource consumption when searching the tree 1405 exceeds the resource upper limit. In such a case, a search command for the subtree 1411, a search command for the subtree rooted at the node S, and information on the label of the root T are output to the search command list. That is, the search command list is as follows.
(51) Search (subtree 1411)
(52) Search (subtree 1412)
(53) Search (subtree 1413)
(54) Intermediate result aggregation AND (aggregation of execution results of subtrees 1412 and 1413)
(55) Intermediate result aggregation OR (aggregation of execution results of retrieval of 1 and aggregation of 4)

この発明の実施の形態1における情報検索装置の構成を示す図である。It is a figure which shows the structure of the information search device in Embodiment 1 of this invention. 実施の形態1における情報検索装置による検索処理の動作フロー図である。FIG. 6 is an operation flowchart of search processing by the information search apparatus in the first embodiment. 実施の形態1における検索処理部による検索処理の動作フロー図である。FIG. 7 is an operation flowchart of search processing by a search processing unit in the first embodiment. この発明の実施の形態1及び2における情報検索装置が取扱う検索式の例を示す図である。It is a figure which shows the example of the search type which the information search device in Embodiment 1 and 2 of this invention handles. 実施の形態2における情報検索装置が行う検索式構築及び分割処理の動作フロー図である。FIG. 10 is an operation flowchart of search expression construction and division processing performed by the information search apparatus in the second embodiment. 実施の形態2における検索式構築及び分割処理の動作を説明する図である。FIG. 10 is a diagram for explaining operations of search expression construction and division processing in the second embodiment. この発明の実施の形態3における情報検索装置が行う検索式構築及び分割処理の動作フロー図である。It is an operation | movement flowchart of the search formula construction | assembly and division | segmentation process which the information search device in Embodiment 3 of this invention performs. 実施の形態3における検索式構築及び分割処理の動作を説明する図である。FIG. 10 is a diagram for explaining operations of search expression construction and division processing in the third embodiment. この発明の実施の形態4における情報検索装置が行う検索式構築及び分割処理の動作フロー図である。It is an operation | movement flowchart of the search formula construction | assembly and division | segmentation process which the information search device in Embodiment 4 of this invention performs. 実施の形態4における検索式構築及び分割処理の動作を説明する図である。FIG. 20 is a diagram for explaining operations of search expression construction and division processing in the fourth embodiment. この発明の実施の形態5における情報検索装置が行う検索式構築及び分割処理の動作フロー図である。It is an operation | movement flowchart of the search formula construction | assembly and division | segmentation process which the information search device in Embodiment 5 of this invention performs. 実施の形態5における情報検索装置の構成を示す図である。FIG. 10 is a diagram showing a configuration of an information search device in a fifth embodiment. 実施の形態2で比較対象とした検索式の分割を示す図である。FIG. 10 is a diagram illustrating division of a search expression that is a comparison target in the second embodiment. 実施の形態6における一般的な検索式分割処理の流れを示す図である。FIG. 25 is a diagram showing a flow of general search expression dividing processing in the sixth embodiment.

符号の説明Explanation of symbols

102 検索式入力部、103 検索式評価部、104,104b,104c,104d,104e 検索式分割部、105 検索処理部、106 検索結果出力部、107 検索制御部、108 中間結果集計部、109 検索実行部、110 中間結果管理部、111 データベース(DB)、1205 検索式出力部、S201 所望の情報検索を記述した検索式読込みステップ、S202 所定形式の最簡易形式への分解ステップ、S203 分解(合成)後の簡易形式による検索時にリソースが上限値を超えるかを評価するステップ、S204 簡易形式の合成ステップ、S205 直前の簡易形式による検索式の再構成ステップ、S206 部分検索式と中間集計処理からなる検索命令リスト出力ステップ、S501 検索式を2分木展開ステップ、S502 高さi=1の部分木構築ステップ、S503 部分木記述による検索時にリソースが上限値を超えるかを評価するステップ、S504 i+1の部分木構築ステップ、S505 直前の部分木を分割した検索式を持つ部分木構築ステップ、S701 検索式を2分木展開して同じラベルを持つ親子ノード結合ステップ、S702 高さi=1の部分木構築ステップ、S703 部分木記述による検索時にリソースが上限値を超えるかを評価するステップ、S704 i+1の部分木構築ステップ、S705 直前の部分木を分割した検索式を持つ部分木構築ステップ、S901 検索式をDNFに変形するステップ、S902 高さi=1の部分木構築ステップ、S903 部分木記述による検索時にリソースが上限値を超えるかを評価するステップ、S904 i+1の部分木構築ステップ、S905 直前の部分木を分割した検索式を持つ部分木構築ステップ。   102 Search Formula Input Unit, 103 Search Formula Evaluation Unit, 104, 104b, 104c, 104d, 104e Search Formula Dividing Unit, 105 Search Processing Unit, 106 Search Result Output Unit, 107 Search Control Unit, 108 Intermediate Result Counting Unit, 109 Search Execution unit, 110 intermediate result management unit, 111 database (DB), 1205 search expression output unit, S201 search expression reading step describing desired information search, S202 decomposition step into predetermined simplest format, S203 decomposition (synthesis) ) Evaluating whether the resource exceeds the upper limit at the time of searching in the simple format, S204 Simple format compositing step, S205 Reconstructing the search formula in the simple format immediately before, S206 Partial search formula and intermediate tabulation processing Retrieval command list output step, S501 Retrieval expression into binary tree expansion S502, subtree construction step of height i = 1, S503 step of evaluating whether the resource exceeds the upper limit at the time of retrieval by subtree description, subtree construction step of S504 i + 1, S505 the subtree just before is divided Subtree construction step with search formula, S701 Binary tree expansion of search formula and parent-child node join step with the same label, S702 subtree construction step with height i = 1, S703 Resource limit when searching by subtree description A step of evaluating whether the value is exceeded, a subtree construction step of S704 i + 1, a subtree construction step having a search expression obtained by dividing the immediately preceding subtree, S901, a step of transforming the search expression into DNF, S902 height i = 1 Subtree construction step, S903 Does the resource exceed the upper limit when searching by subtree description? Evaluating step, S904 i + 1 partial tree construction step, the partial tree construction step with S905 immediately before search expression subtree was split.

Claims (9)

データベースから所望の情報を検索する情報検索装置において、
上記所望の情報検索を記述する検索式を読込み、該読込んだ検索式を所定の簡易形式に分割する検索式分割部と、
上記検索式分割部が分割した簡易形式検索式による検索時の必要リソースがシステムで持つリソース上限値内であるかを評価する検索式評価部と、
上記検索式分割部が出力する検索命令リストに従って上記所望の情報検索を行う検索処理部と、を備えて、
上記検索式分割部は、上記検索式評価部がリソース上限値内であると評価する評価内簡易形式に分割して、上記検索処理部は、該評価内簡易形式に基づいて情報検索を行うようにしたことを特徴とする情報検索装置。
In an information retrieval apparatus for retrieving desired information from a database,
A search expression dividing unit that reads the search expression describing the desired information search and divides the read search expression into a predetermined simple format;
A search expression evaluation unit that evaluates whether the necessary resources at the time of search by the simple search expression divided by the search expression dividing unit are within the resource upper limit value of the system;
A search processing unit that performs the desired information search according to a search command list output by the search expression dividing unit,
The search expression dividing unit divides the search expression evaluation unit into a simple form within evaluation that is evaluated as being within the resource upper limit value, and the search processing unit performs information search based on the simple form within evaluation. An information retrieval apparatus characterized by that.
検索式分割部は、所定の簡易形式として2分木に展開して、該2分木による検索時に検索式評価部がリソース上限内であると評価する場合は、上記2分木の高さを高くして、該高くした2分木による検索時の上記検索式評価部による上記評価を繰返して、上記リソース上限に近い評価が得られる、高くした2分木を検索命令リストとして出力することを特徴とする請求項1記載の情報検索装置。   The search expression dividing unit expands to a binary tree as a predetermined simple format, and when the search expression evaluation unit evaluates that the resource tree is within the upper limit of the resource when searching by the binary tree, the height of the binary tree is set. The above-mentioned evaluation by the search expression evaluation unit at the time of searching with the raised binary tree is repeated, and the raised binary tree that can obtain an evaluation close to the resource upper limit is output as a search instruction list. The information search apparatus according to claim 1, wherein 検索式分割部は、2分木に展開する際に、先ず高さ1の部分木を作成するようにしたことを特徴とする請求項2記載の情報検索装置。   3. The information retrieval apparatus according to claim 2, wherein the retrieval formula dividing unit first creates a partial tree having a height of 1 when expanding into a binary tree. 検索式分割部は、2分木に展開する際に、同じラベルを持つ親子ノードを結合して部分木を作成するようにしたことを特徴とする請求項2記載の情報検索装置。   3. The information search apparatus according to claim 2, wherein the search expression dividing unit creates a partial tree by combining parent and child nodes having the same label when expanding into a binary tree. 検索式分割部は、所定の簡易形式として積和形または和積形の論理式で記述して、該論理式で検索時に検索式評価部がリソース上限内であると評価する場合は、上記論理式の結合高さを高くして、該高くした論理式による検索時の上記検索式評価部による上記評価を繰返して、上記リソース上限に近い評価が得られる、高くした論理式を検索命令リストとして出力することを特徴とする請求項1記載の情報検索装置。   The search expression dividing unit is described by a product-sum type or a sum-product type logical expression as a predetermined simple form, and when the search expression evaluation unit evaluates that it is within the resource upper limit at the time of the search using the logical expression, By increasing the combined height of the expressions and repeating the evaluation by the search expression evaluation unit at the time of searching with the increased logical expressions, an evaluation close to the resource upper limit is obtained, and the increased logical expressions are used as a search instruction list. The information retrieval apparatus according to claim 1, wherein the information retrieval apparatus outputs the information. 情報検索装置は、検索式分割部が出力する検索命令リストを表示出力する検索式出力部を備えて、上記検索命令リストを表示出力することを特徴とする請求項1記載の情報検索装置。   2. The information search apparatus according to claim 1, further comprising a search expression output unit that displays and outputs the search instruction list output by the search expression dividing unit, and displays and outputs the search instruction list. データベースから所望の情報を検索するために、
上記所望の情報検索を記述する検索式を読込み、該読込んだ検索式を所定の簡易形式に分割する検索式分割部と、
上記検索式分割部が分割した簡易形式検索式による検索時の必要リソースがシステムで持つリソース上限値内であるかを評価する検索式評価部と、を備えて、
上記検索式分割部は、上記検索式評価部がリソース上限値内であると評価する評価内簡易形式に分割して、データベース検索のための検索式として出力することを特徴とするデータベース検索前処理回路。
In order to retrieve the desired information from the database,
A search expression dividing unit that reads the search expression describing the desired information search and divides the read search expression into a predetermined simple format;
A search expression evaluation section that evaluates whether the necessary resources at the time of search by the simple search expression divided by the search expression dividing section are within the resource upper limit value of the system,
The search expression dividing unit divides the search expression evaluation unit into a simple form within evaluation that is evaluated as being within the resource upper limit value, and outputs the result as a search expression for database search. circuit.
データベースから所望の情報を検索する情報検索方法において、
上記所望の情報検索を記述する検索式を読込み、該読込んだ検索式を所定の簡易形式に分割する検索式分割ステップと、
上記検索式分割ステップにより分割した簡易形式検索式による検索時の必要リソースがシステムで持つリソース上限値内であるかを評価する検索式評価ステップと、
上記検索式分割ステップは、上記検索式評価ステップでリソース上限値内であると評価する最長の長さの簡易形式検索式である最評価内簡易形式になるまで合成を繰返して、
上記検索式分割ステップで得られる上記最評価内簡易形式で記述される検索命令リストに従って上記所望の情報検索を行う検索処理ステップと、を備えたことを特徴とする情報検索方法。
In an information retrieval method for retrieving desired information from a database,
A search expression dividing step of reading a search expression describing the desired information search and dividing the read search expression into a predetermined simple format;
A search expression evaluation step for evaluating whether the necessary resources at the time of search by the simple form search expression divided by the search expression dividing step are within the resource upper limit value of the system;
The search expression dividing step repeats the synthesis until it becomes a simple form within the maximum evaluation which is a simple form search expression of the longest length evaluated as being within the resource upper limit value in the search expression evaluation step,
An information search method comprising: a search processing step for performing the desired information search according to a search command list described in the simplified form within the maximum evaluation obtained in the search formula dividing step.
検索式分割ステップは、所定の簡易形式として2分木に展開して、該2分木による検索時に検索式評価ステップでリソース上限内であると評価された場合は、上記2分木の高さを高くして、該高くした2分木記述による検索時の上記検索式評価ステップによる上記評価を繰返して、上記リソース上限に近い評価が得られる、高くした2分木記述を検索命令リストとして出力することを特徴とする請求項8記載の情報検索方法。   The search formula dividing step is expanded into a binary tree as a predetermined simple format, and if the search formula evaluation step evaluates that it is within the resource upper limit at the time of search by the binary tree, the height of the above binary tree And increase the binary tree description to obtain the evaluation close to the upper limit of the resource as a search instruction list by repeating the evaluation in the search expression evaluation step at the time of searching with the increased binary tree description. The information retrieval method according to claim 8, wherein:
JP2004221035A 2004-07-29 2004-07-29 Information retrieval device Active JP4575064B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004221035A JP4575064B2 (en) 2004-07-29 2004-07-29 Information retrieval device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004221035A JP4575064B2 (en) 2004-07-29 2004-07-29 Information retrieval device

Publications (2)

Publication Number Publication Date
JP2006040081A true JP2006040081A (en) 2006-02-09
JP4575064B2 JP4575064B2 (en) 2010-11-04

Family

ID=35904989

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004221035A Active JP4575064B2 (en) 2004-07-29 2004-07-29 Information retrieval device

Country Status (1)

Country Link
JP (1) JP4575064B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009211312A (en) * 2008-03-03 2009-09-17 Fujitsu Ltd Evaluation method and retrieval apparatus
JP2012059215A (en) * 2010-09-13 2012-03-22 Nomura Research Institute Ltd Data retrieval system and program
WO2013099328A1 (en) * 2011-12-28 2013-07-04 楽天株式会社 Search device, search method, search program, and recording medium
JP2013152512A (en) * 2012-01-24 2013-08-08 Mitsubishi Electric Corp Information processing device, information processing method and program
JP2016126646A (en) * 2015-01-07 2016-07-11 Kddi株式会社 Data processing device, data processing method, and large scale data processing program
JPWO2014092105A1 (en) * 2012-12-12 2017-01-12 日本電気株式会社 Database search apparatus, database search method and program
EP3340081A1 (en) 2016-12-22 2018-06-27 NEC Corporation Data search method, data search device, and data search program
JP2023013646A (en) * 2021-07-16 2023-01-26 ヤフー株式会社 Information processing system and information processing method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08272806A (en) * 1995-04-03 1996-10-18 Nippon Steel Corp Data base retrieval system
WO2004063928A1 (en) * 2003-01-14 2004-07-29 Accelia, Inc. Database load reducing system and load reducing program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08272806A (en) * 1995-04-03 1996-10-18 Nippon Steel Corp Data base retrieval system
WO2004063928A1 (en) * 2003-01-14 2004-07-29 Accelia, Inc. Database load reducing system and load reducing program

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009211312A (en) * 2008-03-03 2009-09-17 Fujitsu Ltd Evaluation method and retrieval apparatus
JP2012059215A (en) * 2010-09-13 2012-03-22 Nomura Research Institute Ltd Data retrieval system and program
AU2012359698B2 (en) * 2011-12-28 2015-03-19 Rakuten Group, Inc. Search device, search method, search program, and recording medium
JP2013137683A (en) * 2011-12-28 2013-07-11 Rakuten Inc Retrieval device, retrieval method, retrieval program, and recording medium
KR101478495B1 (en) 2011-12-28 2014-12-31 라쿠텐 인코포레이티드 Search device and search method
WO2013099328A1 (en) * 2011-12-28 2013-07-04 楽天株式会社 Search device, search method, search program, and recording medium
JP2013152512A (en) * 2012-01-24 2013-08-08 Mitsubishi Electric Corp Information processing device, information processing method and program
JPWO2014092105A1 (en) * 2012-12-12 2017-01-12 日本電気株式会社 Database search apparatus, database search method and program
US10339140B2 (en) 2012-12-12 2019-07-02 Nec Corporation Database search device, database search method, and program
JP2016126646A (en) * 2015-01-07 2016-07-11 Kddi株式会社 Data processing device, data processing method, and large scale data processing program
EP3340081A1 (en) 2016-12-22 2018-06-27 NEC Corporation Data search method, data search device, and data search program
US10877965B2 (en) 2016-12-22 2020-12-29 Nec Corporation Data search method, data search device, and data search program
JP2023013646A (en) * 2021-07-16 2023-01-26 ヤフー株式会社 Information processing system and information processing method
JP7326387B2 (en) 2021-07-16 2023-08-15 ヤフー株式会社 Information processing system and information processing method

Also Published As

Publication number Publication date
JP4575064B2 (en) 2010-11-04

Similar Documents

Publication Publication Date Title
JP5939588B2 (en) Method for Searching Related Nodes, Computer, and Computer Program
JP2017500664A (en) Query construction for execution against multidimensional data structures
JP5594145B2 (en) SEARCH DEVICE, SEARCH METHOD, AND PROGRAM
US20120109963A1 (en) Classification hierarchy regeneration system, classification hierarchy regeneration method, and classification hierarchy regeneration program
JP7358003B2 (en) Facet-based query refinement based on multiple query interpretations
US20150205860A1 (en) Information retrieval device, information retrieval method, and information retrieval program
CN109783638B (en) User comment clustering method based on semi-supervised learning
CN110222194A (en) Data drawing list generation method and relevant apparatus based on natural language processing
JP2019082931A (en) Retrieval device, similarity calculation method, and program
JP4575064B2 (en) Information retrieval device
CN103324641B (en) Information record recommendation method and device
JP5844824B2 (en) SPARQL query optimization method
JP3178421B2 (en) Text search device and computer-readable recording medium storing text search program
CN108027816B (en) Data management system, data management method, and recording medium
JP2012123675A (en) Method and system for extracting system component
WO2023103914A1 (en) Text sentiment analysis method and device, and computer-readable storage medium
KR101897760B1 (en) A system of converting and storing triple for linked open data cloud information service and a method thereof
JP2000090093A (en) Method and system for full-text retrieval and record medium recording full-text retrieval program
JP2007183927A (en) Information processing apparatus, method and program
JP5954742B2 (en) Apparatus and method for retrieving documents
Truica et al. Building an inverted index at the dbms layer for fast full text search
JP5867208B2 (en) Data model conversion program, data model conversion method, and data model conversion apparatus
JP2009140113A (en) Dictionary editing device, dictionary editing method, and computer program
CN111368055A (en) Retrieval method and device for patent database combined enterprise information platform
JPWO2016013209A1 (en) Sentence set extraction system, method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070411

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100105

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100305

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100330

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100512

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100622

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100712

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4575064

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130827

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250