JP2012230493A - Retrieval device, retrieval method, and program - Google Patents

Retrieval device, retrieval method, and program Download PDF

Info

Publication number
JP2012230493A
JP2012230493A JP2011097366A JP2011097366A JP2012230493A JP 2012230493 A JP2012230493 A JP 2012230493A JP 2011097366 A JP2011097366 A JP 2011097366A JP 2011097366 A JP2011097366 A JP 2011097366A JP 2012230493 A JP2012230493 A JP 2012230493A
Authority
JP
Japan
Prior art keywords
data
data string
hash value
information
search
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
JP2011097366A
Other languages
Japanese (ja)
Other versions
JP5462215B2 (en
Inventor
Kentaro Kamado
健太郎 釜洞
Masakazu Hattori
雅一 服部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Solutions Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp, Toshiba Solutions Corp filed Critical Toshiba Corp
Priority to JP2011097366A priority Critical patent/JP5462215B2/en
Publication of JP2012230493A publication Critical patent/JP2012230493A/en
Application granted granted Critical
Publication of JP5462215B2 publication Critical patent/JP5462215B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a retrieval device, a retrieval method, and a program which can reduce a data amount held by an index storage unit.SOLUTION: A retrieval device comprises a database, an index storage unit, a reception unit, a calculation unit, a first determination unit, a second determination unit, and an acquisition unit. The database stores a plurality of pieces of data information of which each has a plurality of fields. The index storage unit stores index information associating a partial data string which is a part of a data string registered with a specific field, a hush value of the data string, and position information indicating a position of data information of which the specific field registers the data string. When the first determination unit determines that the partial data string which matches a part of a retrieval data string exists in the index storage unit, and also the second determination unit determines that the hash value corresponding to the partial data string matches a hush value of the retrieval data string, the acquisition unit acquires positional information corresponding to the partial data string.

Description

本発明は、検索装置、検索方法およびプログラムに関する。   The present invention relates to a search device, a search method, and a program.

従来、例えばB木などのデータ構造からなる索引(インデックス)が格納された索引記憶部を備え、索引記憶部から読み出した索引を用いて、所望のデータをデータベースから検索する検索装置が知られている。索引記憶部が保持するデータ量が少ないほど、検索時の読み出し量が少なくなるので、検索速度を高速化することが可能になる。このため、索引記憶部が保持するデータ量は少ないことが望まれる。   2. Description of the Related Art Conventionally, there has been known a search apparatus that includes an index storage unit that stores an index (index) having a data structure such as a B-tree, and uses the index read from the index storage unit to search desired data from a database Yes. The smaller the amount of data held in the index storage unit, the smaller the amount of reading at the time of retrieval, so that the retrieval speed can be increased. For this reason, it is desirable that the amount of data held by the index storage unit is small.

例えば、データベースに格納されたテーブルの特定のフィールドの各行に登録されたデータ(キー)と、当該キーの登録場所を示す情報(バリュー)とが格納されるB木のリーフノードにおけるキーの格納領域を減らす技術が知られている。この技術では、リーフノードは2層化され、第1層目のデータ構造体には、キーと、当該キーに対応する第2層目のデータ構造体の位置を示す情報(ポインタ)とが格納される。そして、第2層目のデータ構造体には、当該キーに対応する全てのバリューが格納される。例えば、テーブルの特定のフィールドの第2行目および第5行目の各々に当該キーが登録されている場合は、第2行目を示すバリューと第5行目を示すバリューとが、当該キーに対応する第2層目の構造体に格納される。一方、第1層目のデータ構造体に格納される当該キーの数は1つで済むので、結果として、リーフノードにおけるキーの格納領域が低減されるという具合である。   For example, a key storage area in a leaf node of a B tree in which data (key) registered in each row of a specific field of a table stored in the database and information (value) indicating the registration location of the key are stored Techniques to reduce this are known. In this technology, leaf nodes are divided into two layers, and a key and information (pointer) indicating the position of the second layer data structure corresponding to the key are stored in the first layer data structure. Is done. In the second layer data structure, all values corresponding to the key are stored. For example, when the key is registered in each of the second and fifth rows of a specific field of the table, the value indicating the second row and the value indicating the fifth row are the key. Are stored in the second-layer structure corresponding to. On the other hand, since only one key is stored in the first layer data structure, the key storage area in the leaf node is reduced as a result.

特開2010−72823号公報JP 2010-72823 A

しかしながら、上述した技術では、同値のキーが殆ど存在しない場合には、索引記憶部は全てのキーを保持する必要があるので、索引記憶部が保持するデータ量を低減することはできないという問題がある。本発明が解決しようとする課題は、索引記憶部が保持するデータ量を低減可能な検索装置、検索方法およびプログラムを提供することである。   However, in the above-described technique, when there is almost no key with the same value, the index storage unit needs to hold all the keys. Therefore, there is a problem in that the amount of data held by the index storage unit cannot be reduced. is there. The problem to be solved by the present invention is to provide a search device, a search method, and a program capable of reducing the amount of data held by an index storage unit.

実施形態の検索装置は、データベースと、索引記憶部と、受付部と、算出部と、第1判定部と、第2判定部と、取得部とを備える。データベースは、それぞれがデータ列を含む複数のフィールドをそれぞれが有する複数のデータ情報を記憶する。索引記憶部は、複数のフィールドのうちの特定のフィールドに登録されたデータ列の一部である部分データ列と、データ列のハッシュ値と、当該データ列が特定のフィールドに登録されたデータ情報のデータベースにおける位置を示す位置情報とが対応付けられた索引情報を記憶する。受付部は、検索データ列を受け付ける。算出部は、検索データ列のハッシュ値を算出する。第1判定部により、検察データ列の一部と一致する部分データ列が索引記憶部に存在すると判定され、第2判定部により、当該部分データ列に対応するハッシュ値と、検索データ列のハッシュ値とが一致すると判定された場合は、取得部は、当該部分データ列に対応する位置情報を取得する。   The search device according to the embodiment includes a database, an index storage unit, a reception unit, a calculation unit, a first determination unit, a second determination unit, and an acquisition unit. The database stores a plurality of data information each having a plurality of fields each including a data string. The index storage unit includes a partial data string that is a part of a data string registered in a specific field of the plurality of fields, a hash value of the data string, and data information in which the data string is registered in the specific field. The index information associated with the position information indicating the position in the database is stored. The reception unit receives a search data string. The calculation unit calculates a hash value of the search data string. The first determination unit determines that a partial data string that matches a part of the prosecution data string exists in the index storage unit, and the second determination unit determines a hash value corresponding to the partial data string and a hash of the search data string When it is determined that the values match, the acquisition unit acquires position information corresponding to the partial data string.

また、実施形態の検索方法は、検索に用いられるデータ列を示す検索データ列を受け付ける第1ステップと、前記検索データ列のハッシュ値を算出する第2ステップと、それぞれがデータ列を含む複数のフィールドをそれぞれが有する複数のデータ情報を記憶するデータベースに存在する複数の前記データ情報のうちの何れかの前記データ情報の特定のフィールドに登録された前記データ列の一部である部分データ列と、当該データ列のハッシュ値と、当該データ情報の前記データベースにおける位置を示す位置情報とが対応付けられた索引情報を記憶する索引記憶部に、前記検察データ列の一部と一致する前記部分データ列が存在するか否かを判定する第3ステップと、前記第3ステップで、前記検察データ列の一部と一致する前記部分データ列が前記索引記憶部に存在すると判定した場合は、当該部分データ列に対応する前記ハッシュ値と、前記検索データ列の前記ハッシュ値とが一致するか否かを判定する第4ステップと、前記第4ステップで、前記部分データ列に対応する前記ハッシュ値と、前記検索データ列の前記ハッシュ値とが一致すると判定した場合は、当該部分データ列に対応する前記位置情報を取得する第5ステップと、を備えることを特徴とする。   The search method of the embodiment includes a first step of receiving a search data string indicating a data string used for the search, a second step of calculating a hash value of the search data string, and a plurality of data each including a data string A partial data sequence that is a part of the data sequence registered in a specific field of any one of the plurality of data information existing in a database storing a plurality of data information each having a field; The partial data that coincides with a part of the prosecution data string in an index storage unit that stores index information in which a hash value of the data string and position information indicating a position of the data information in the database are associated with each other A third step of determining whether or not a column exists, and the partial data that matches a part of the prosecution data sequence in the third step. A fourth step of determining whether or not the hash value corresponding to the partial data string matches the hash value of the search data string; If it is determined in the fourth step that the hash value corresponding to the partial data string matches the hash value of the search data string, the position information corresponding to the partial data string is acquired. And a step.

さらに、実施形態のプログラムは、検索に用いられるデータ列を示す検索データ列を受け付ける第1ステップと、前記検索データ列のハッシュ値を算出する第2ステップと、それぞれがデータ列を含む複数のフィールドをそれぞれが有する複数のデータ情報を記憶するデータベースに存在する複数の前記データ情報のうちの何れかの前記データ情報の特定のフィールドに登録された前記データ列の一部である部分データ列と、当該データ列のハッシュ値と、当該データ情報の前記データベースにおける位置を示す位置情報とが対応付けられた索引情報を記憶する索引記憶部に、前記検察データ列の一部と一致する前記部分データ列が存在するか否かを判定する第3ステップと、前記第3ステップで、前記検察データ列の一部と一致する前記部分データ列が前記索引記憶部に存在すると判定した場合は、当該部分データ列に対応する前記ハッシュ値と、前記検索データ列の前記ハッシュ値とが一致するか否かを判定する第4ステップと、前記第4ステップで、前記部分データ列に対応する前記ハッシュ値と、前記検索データ列の前記ハッシュ値とが一致すると判定した場合は、当該部分データ列に対応する前記位置情報を取得する第5ステップと、をコンピュータに実行させるためのプログラムである。   Furthermore, the program according to the embodiment includes a first step of receiving a search data string indicating a data string used for search, a second step of calculating a hash value of the search data string, and a plurality of fields each including a data string A partial data sequence that is a part of the data sequence registered in a specific field of any one of the plurality of data information existing in a database that stores a plurality of data information each having The partial data string that matches a part of the prosecution data string in an index storage unit that stores index information in which a hash value of the data string is associated with position information indicating a position of the data information in the database A third step for determining whether or not there exists, and the portion that matches a part of the prosecution data string in the third step If it is determined that a data string exists in the index storage unit, a fourth step of determining whether the hash value corresponding to the partial data string matches the hash value of the search data string; If it is determined in the fourth step that the hash value corresponding to the partial data string matches the hash value of the search data string, the position information corresponding to the partial data string is acquired. Is a program for causing a computer to execute steps.

第1実施形態の検索装置の一例を示すブロック図。The block diagram which shows an example of the search device of 1st Embodiment. データベース部の一例を示す図。The figure which shows an example of a database part. データ情報の一例を示す図。The figure which shows an example of data information. 索引記憶部の一例を示す図。The figure which shows an example of an index memory | storage part. 検索処理の一例を示すフローチャートFlow chart showing an example of search processing 登録処理の一例を示すフローチャート。The flowchart which shows an example of a registration process. 削除処理の一例を示すフローチャート。10 is a flowchart illustrating an example of a deletion process. 第2実施形態の索引記憶部の一例を示す図。The figure which shows an example of the index memory | storage part of 2nd Embodiment. 第2実施形態の検索装置の一例を示すブロック図。The block diagram which shows an example of the search device of 2nd Embodiment. 登録処理の一例を示す図。The figure which shows an example of a registration process. 変形例を説明するための図。The figure for demonstrating a modification.

(第1実施形態)
図1は、第1実施形態の検索装置100の概略構成の一例を示すブロック図である。図1に示すように、検索装置100は、操作表示部10と、記憶部20と、制御部30とを備える。操作表示部10は、各種画面や検索装置100に関する情報(例えば検索結果等)を表示するとともに、ユーザーが各種の操作入力を行うための手段である。詳細な図示は省略するが、操作表示部10は、各種画面や検索装置100に関する情報を表示するとともにユーザーからのタッチ入力を受け付ける表示パネルと、例えば各種ボタンやマウスなどの操作デバイスとを備える。
(First embodiment)
FIG. 1 is a block diagram illustrating an example of a schematic configuration of a search device 100 according to the first embodiment. As illustrated in FIG. 1, the search device 100 includes an operation display unit 10, a storage unit 20, and a control unit 30. The operation display unit 10 is a means for displaying various screens and information (for example, search results) regarding the search device 100 and allowing the user to input various operations. Although not shown in detail, the operation display unit 10 includes a display panel that displays various screens and information related to the search device 100 and receives a touch input from a user, and operation devices such as various buttons and a mouse.

記憶部20は、データベース部22と索引記憶部24とを含む。データベース部22は、複数のフィールドを各々が有する複数のデータ情報を記憶する。図2に示すように、データベース部22は、複数のデータ情報DQを記憶する。ここでは、データ情報DQは文書を示す情報であり、一例として、XML(Extensible Markup Language)で記述された半構造化データがデータ情報DQとして採用されている。   The storage unit 20 includes a database unit 22 and an index storage unit 24. The database unit 22 stores a plurality of data information each having a plurality of fields. As shown in FIG. 2, the database unit 22 stores a plurality of data information DQ. Here, the data information DQ is information indicating a document, and as an example, semi-structured data described in XML (Extensible Markup Language) is adopted as the data information DQ.

図3は、データ情報DQの一例を示す図である。図3に示すように、データ情報DQは、それぞれにデータ列が登録される複数のフィールドFを有している。本実施形態では、各データ情報DQが有する複数のフィールドFのうちの特定のフィールドFxに対してのみ索引が作成される。詳細な内容については後述する。ここでは、各データ情報DQの特定のフィールドFxは、アプリケーション名(application-title)を構成する文字列(データ列)が登録されるフィールドである。   FIG. 3 is a diagram illustrating an example of the data information DQ. As shown in FIG. 3, the data information DQ has a plurality of fields F in which data strings are registered. In the present embodiment, an index is created only for a specific field Fx among a plurality of fields F included in each data information DQ. Detailed contents will be described later. Here, the specific field Fx of each data information DQ is a field in which a character string (data string) constituting an application name (application-title) is registered.

図1に戻って説明を続ける。索引記憶部24は、索引(インデックス)を記憶する。索引は、例えばB木などのデータ構造である。本実施形態では、索引としてB木が用いられるが、これに限らず、索引の種類は任意である。例えばビットマップインデックスや関数インデックスなどを採用することもできる。図4に示すように、索引記憶部24は、最上位層のルートノード25と、中間層のブランチノード26と、最下層のリーフノード27とを含む。リーフノード27は、アプリケーション名を構成する文字列の一部である部分文字列と、当該アプリケーション名を構成する文字列のハッシュ値と、当該アプリケーション名が特定のフィールドFxに登録されたデータ情報DQのデータベース部22における位置を示すID(位置情報)とが対応付けられた索引情報を行ごとに記憶する。本実施形態のID(位置情報)は、データベース部22におけるデータ情報DQの位置だけでなく、当該データ情報DQにおける特定のフィールドFxの位置も特定する情報である。また、本実施形態では、部分文字列のデータ長は固定長である。ここでは、一例として10文字分のデータ長に設定されるが、これに限定されるものではない。   Returning to FIG. 1, the description will be continued. The index storage unit 24 stores an index (index). The index is a data structure such as a B-tree, for example. In the present embodiment, a B-tree is used as an index, but this is not a limitation, and the type of index is arbitrary. For example, a bitmap index or a function index can be employed. As shown in FIG. 4, the index storage unit 24 includes a root node 25 in the highest layer, a branch node 26 in the intermediate layer, and a leaf node 27 in the lowest layer. The leaf node 27 includes a partial character string that is a part of a character string that constitutes the application name, a hash value of the character string that constitutes the application name, and data information DQ in which the application name is registered in a specific field Fx. The index information associated with the ID (position information) indicating the position in the database unit 22 is stored for each row. The ID (position information) of the present embodiment is information that specifies not only the position of the data information DQ in the database unit 22 but also the position of a specific field Fx in the data information DQ. In the present embodiment, the data length of the partial character string is a fixed length. Here, as an example, the data length is set to 10 characters, but the present invention is not limited to this.

図1に示す制御部30は、検索装置100の各部を制御する手段であり、CPU(Central Processing Unit)、ROM(Read Only Memory)、および、RAM(Random Access Memory)などを含む制御装置で構成される。制御部30が有する機能としては、
受付部31、リーフノード特定部32、算出部33、第1判定部34、第2判定部35、取得部36、特定部37、第3判定部38、第4判定部39、登録部40、決定部41、削除対象特定部42、削除部43がある。以上の機能(31、32、33、34、35、36、37、38、39、40、41、42、43)は、CPUが、ROMに格納された制御プログラムをRAM上に読み出して実行することにより実現される。なお、これに限らず、以上の機能(31、32、33、34、35、36、37、38、39、40、41、42、43)のうちの少なくとも一部がハードウェア回路で実現されてもよい。
A control unit 30 shown in FIG. 1 is a unit that controls each unit of the search device 100, and includes a control device including a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. Is done. As a function which control part 30 has,
Receiving unit 31, leaf node specifying unit 32, calculating unit 33, first determining unit 34, second determining unit 35, acquiring unit 36, specifying unit 37, third determining unit 38, fourth determining unit 39, registration unit 40, There are a determination unit 41, a deletion target specifying unit 42, and a deletion unit 43. The above functions (31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43) are executed by the CPU by reading the control program stored in the ROM onto the RAM. Is realized. Not limited to this, at least a part of the above functions (31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43) is realized by a hardware circuit. May be.

受付部31は、操作表示部10からの各種入力を受け付ける。例えば、受付部31は、検索に用いられるアプリケーション名を構成する文字列(検索文字列と呼ぶ)の入力を受け付けることもできるし、索引情報の登録を行うデータ情報DQの入力を受け付けることもできる。また、削除を行うデータ情報DQの入力を受け付けることもできる。リーフノード特定部32は、入力された文字列に対応するリーフノード27を特定する。算出部33は、入力された文字列のハッシュ値を算出する。   The accepting unit 31 accepts various inputs from the operation display unit 10. For example, the accepting unit 31 can accept an input of a character string (referred to as a search character string) that constitutes an application name used for a search, or can accept an input of data information DQ for registering index information. . It is also possible to accept input of data information DQ to be deleted. The leaf node specifying unit 32 specifies the leaf node 27 corresponding to the input character string. The calculation unit 33 calculates a hash value of the input character string.

第1判定部34は、検索文字列の一部と一致する部分文字列が索引記憶部24(リーフノード27)に存在するか否かを判定する。第2判定部35は、第1判定部34により、検索文字列の一部と一致する部分文字列が索引記憶部24に存在すると判定された場合は、当該部分文字列に対応するハッシュ値と、検索文字列のハッシュ値とが一致するか否かを判定する。取得部36は、第2判定部35により、部分文字列に対応するハッシュ値と、検索文字列のハッシュ値とが一致すると判定された場合は、当該部分文字列に対応するIDを索引記憶部24(リーフノード27)から取得する。また、取得部36は、当該IDで特定されるデータ情報DQをデータベース部22から取得することもできる。   The first determination unit 34 determines whether or not a partial character string that matches a part of the search character string exists in the index storage unit 24 (leaf node 27). When the first determination unit 34 determines that a partial character string that matches a part of the search character string exists in the index storage unit 24, the second determination unit 35 calculates the hash value corresponding to the partial character string and Then, it is determined whether or not the hash value of the search character string matches. When the second determination unit 35 determines that the hash value corresponding to the partial character string matches the hash value of the search character string, the acquisition unit 36 uses the ID corresponding to the partial character string as the index storage unit. 24 (leaf node 27). The acquisition unit 36 can also acquire the data information DQ specified by the ID from the database unit 22.

上述の受付部31、リーフノード特定部32、算出部33、第1判定部34、第2判定部35、取得部36は、後述の検索処理を実行する検索処理部であると捉えることもできる。検索処理の詳細な内容については後述する。   The reception unit 31, the leaf node identification unit 32, the calculation unit 33, the first determination unit 34, the second determination unit 35, and the acquisition unit 36 described above can be regarded as a search processing unit that executes a search process described later. . Details of the search process will be described later.

特定部37は、索引情報の登録を行うデータ情報DQの入力を受付部31で受け付けた場合、当該データ情報DQの特定のフィールドFxに登録されたアプリケーション名を構成する文字列(登録文字列と呼ぶ)と、当該データ情報DQのID(位置情報)とを特定する。第3判定部38は、登録文字列の一部と一致する部分文字列が索引記憶部24(リーフノード27)に存在するか否かを判定する。第4判定部39は、第3判定部38により、登録文字列の一部と一致する部分文字列が索引記憶部24に存在すると判定された場合は、当該部分文字列に対応するハッシュ値と、登録文字列のハッシュ値とが一致するか否かを判定する。   When the receiving unit 31 receives the input of the data information DQ for registering the index information, the specifying unit 37 includes a character string (a registered character string and a registered character string) that is registered in the specific field Fx of the data information DQ. And the ID (position information) of the data information DQ. The third determination unit 38 determines whether or not a partial character string that matches a part of the registered character string exists in the index storage unit 24 (leaf node 27). If the third determination unit 38 determines that a partial character string that matches a part of the registered character string exists in the index storage unit 24, the fourth determination unit 39 uses the hash value corresponding to the partial character string and Then, it is determined whether or not the hash value of the registered character string matches.

登録部40は、登録文字列の部分文字列と、当該登録文字列のハッシュ値と、特定部37で特定されたIDとを対応付けた索引情報を、索引記憶部24(リーフノード27)に登録する。   The registration unit 40 stores index information in which the partial character string of the registered character string, the hash value of the registered character string, and the ID specified by the specifying unit 37 are associated with each other in the index storage unit 24 (leaf node 27). sign up.

決定部41は、第3判定部38により登録文字列の一部と一致する部分文字列が索引記憶部24に存在しないと判定された場合、または、第4判定部39により部分文字列に対応するハッシュ値と、登録文字列のハッシュ値とが一致しないと判定された場合は、所定の規則に従って、索引情報の登録場所を決定する。   The determination unit 41 corresponds to the partial character string when the third determination unit 38 determines that the partial character string that matches a part of the registered character string does not exist in the index storage unit 24, or the fourth determination unit 39 When it is determined that the hash value to be registered does not match the hash value of the registered character string, the registration location of the index information is determined according to a predetermined rule.

上述の受付部31、リーフノード特定部32、算出部33、取得部36、特定部37、第3判定部38、第4判定部39、登録部40、決定部41は、後述の登録処理を実行する登録処理部であると捉えることもできる。登録処理の詳細な内容については後述する。   The accepting unit 31, the leaf node specifying unit 32, the calculating unit 33, the acquiring unit 36, the specifying unit 37, the third determining unit 38, the fourth determining unit 39, the registering unit 40, and the determining unit 41 perform registration processing described later. It can also be regarded as a registration processing unit to be executed. Details of the registration process will be described later.

削除対象特定部42は、索引記憶部24に記憶された索引情報のうち、削除対象の索引情報を特定する。削除部43は、削除対象特定部42で特定された索引情報を索引記憶部24から削除する。   The deletion target specifying unit 42 specifies the index information to be deleted among the index information stored in the index storage unit 24. The deletion unit 43 deletes the index information specified by the deletion target specifying unit 42 from the index storage unit 24.

上述の受付部31、リーフノード特定部32、算出部33、削除対象特定部42、削除部43は、後述の削除処理を実行する削除処理部であると捉えることもできる。削除処理の詳細な内容については後述する。   The reception unit 31, the leaf node specification unit 32, the calculation unit 33, the deletion target specification unit 42, and the deletion unit 43 described above can be regarded as a deletion processing unit that executes a deletion process described later. Details of the deletion process will be described later.

次に、制御部30が実行する検索処理について説明する。図5は、検索処理の一例を示すフローチャートである。図5に示すように、まず、検索文字列の入力を受付部31で受け付けると(ステップS511)、リーフノード特定部32は、検索文字列に対応するリーフノード27を特定する(ステップS512)。本実施形態では、リーフノード特定部32は、B木をたどって、対応するリーフノード27を特定する。より具体的には以下のとおりである。いま、図4に示すように、「データベース管理システム」という文字列を検索文字列として受け付けた場合を想定する。まずルートノード25では、「データベース管理システム」に対応するブランチノード26が特定される。ここでは、50音の各行(あ行、か行、・・・、わ行)ごとに、ブランチノード26が割り当てられており、検索文字列の先頭の文字が、50音の各行のうちの何れに属するかに応じて、対応するブランチノード26が特定される。「データベース管理システム」は、先頭の文字が「デ」であり、「た行」に属するとみなされるので、「データベース管理システム」に対応するブランチノード26として、「た行」に対応するブランチノード26が特定される。   Next, search processing executed by the control unit 30 will be described. FIG. 5 is a flowchart illustrating an example of the search process. As shown in FIG. 5, first, when the input of the search character string is received by the receiving unit 31 (step S511), the leaf node specifying unit 32 specifies the leaf node 27 corresponding to the search character string (step S512). In the present embodiment, the leaf node identification unit 32 traces the B tree and identifies the corresponding leaf node 27. More specifically, it is as follows. Assume that a character string “database management system” is received as a search character string as shown in FIG. First, in the root node 25, the branch node 26 corresponding to the “database management system” is specified. Here, a branch node 26 is assigned to each line of 50 sounds (A line, Ka line,..., W line), and the first character of the search character string is any of the 50 sound lines. Corresponding branch node 26 is specified depending on whether it belongs to. The “database management system” has a leading character “de” and is considered to belong to “ta line”, and therefore, as a branch node 26 corresponding to “database management system”, a branch node corresponding to “ta line” 26 is identified.

図4に示すように、ブランチノード26には、当該ブランチノード26に割り当てられた複数の文字列(ここでは一例として2文字分の文字列)ごとに、当該文字列に対応するリーフノード27の位置を示すポインタが格納される。「データベース管理システム」の先頭から数えて2文字分の文字列は「デー」であるので、「デー」に対応するポインタ「eee」で示されるリーフノード27が、「データベース管理システム」に対応するリーフノード27となる。以上のようにして、「データベース管理システム」に対応するリーフノード27が特定される。なお、上述の例に限らず、検索文字列に対応するリーフノード27の特定方法は任意である。   As shown in FIG. 4, each branch node 26 has a plurality of character strings assigned to the branch node 26 (here, two character strings as an example) of the leaf node 27 corresponding to the character string. A pointer indicating the position is stored. Since the character string of two characters counted from the head of “database management system” is “day”, the leaf node 27 indicated by the pointer “eeee” corresponding to “day” corresponds to “database management system”. It becomes a leaf node 27. As described above, the leaf node 27 corresponding to the “database management system” is specified. The method for specifying the leaf node 27 corresponding to the search character string is not limited to the above example.

次に、第1判定部34は、検索文字列の一部と一致する部分文字列がリーフノード27に存在するか否かを判定する(ステップS513)。例えば、検索文字列が「データベース管理システム」の場合、図4のリーフノード27の第6行目の索引情報および第7行目の索引情報の各々の部分文字列(「データベース管理シス」)が、「データベース管理システム」の一部と一致するので、ステップS513の結果は肯定となる。検索文字列の一部と一致する部分文字列がリーフノード27に存在すると判定された場合、算出部33は、検索文字列のハッシュ値を算出する(ステップS514)。一方、検索文字列の一部と一致する部分文字列がリーフノード27に存在しないと判定された場合、検索処理は終了する。   Next, the first determination unit 34 determines whether or not a partial character string that matches a part of the search character string exists in the leaf node 27 (step S513). For example, when the search character string is “database management system”, the partial character strings (“database management system”) of the sixth row index information and the seventh row index information of the leaf node 27 in FIG. Therefore, the result of step S513 is affirmative. When it is determined that a partial character string that matches a part of the search character string exists in the leaf node 27, the calculation unit 33 calculates a hash value of the search character string (step S514). On the other hand, if it is determined that a partial character string that matches a part of the search character string does not exist in the leaf node 27, the search process ends.

上述のステップS514の後、第2判定部35は、検索文字列のハッシュ値と、検索文字列の一部と一致する部分文字列に対応するハッシュ値とを比較し、検索文字列のハッシュ値と一致するハッシュ値を含む索引情報があるか否かを判定する(ステップS515)。例えば検索文字列が「データベース管理システム」の場合、図4のリーフノード27の第6行目の索引情報のハッシュ値(H(データベース管理システム))は、検索文字列(「データベース管理システム」)のハッシュ値と一致する一方、第7行目の索引情報のハッシュ値(H(データベース管理システムの実行情報を取得する手段を有する記憶装置))は、検索文字列(「データベース管理システム」)のハッシュ値と一致しない。   After the above-described step S514, the second determination unit 35 compares the hash value of the search character string with the hash value corresponding to the partial character string that matches a part of the search character string, and the hash value of the search character string It is determined whether there is index information including a hash value that matches (step S515). For example, when the search character string is “database management system”, the hash value (H (database management system)) of the index information in the sixth row of the leaf node 27 in FIG. 4 is the search character string (“database management system”). On the other hand, the hash value of index information (H (storage device having means for acquiring execution information of the database management system)) in the seventh row is the search string (“database management system”). Does not match the hash value.

上述のステップS515において、検索文字列のハッシュ値と一致するハッシュ値を含む索引情報があると判定された場合、取得部36は、当該索引情報のIDを取得する(ステップS516)。次に、取得部36は、データベース部22から、その取得したIDで特定されるデータ情報DQを取得して操作表示部10に表示する(ステップS517)。一方、上述のステップS515において、検索文字列のハッシュ値と一致する索引情報は存在しないと判定された場合、検索処理は終了する。   When it is determined in step S515 described above that there is index information including a hash value that matches the hash value of the search character string, the acquisition unit 36 acquires the ID of the index information (step S516). Next, the acquisition unit 36 acquires the data information DQ specified by the acquired ID from the database unit 22 and displays it on the operation display unit 10 (step S517). On the other hand, if it is determined in step S515 described above that there is no index information that matches the hash value of the search character string, the search process ends.

次に、制御部30が実行する登録処理について説明する。図6は、登録処理の一例を示すフローチャートである。図6に示すように、まず、索引情報の登録を行うデータ情報DQの入力を受付部31で受け付けると(ステップS611)、特定部37は、その受け付けたデータ情報DQの特定のフィールドFxに登録されたアプリケーション名を構成する文字列(登録文字列と呼ぶ)と、当該データ情報DQのID(位置情報)を特定する(ステップS612)。次に、リーフノード特定部32は、登録文字列に対応するリーフノード27を特定する(ステップS613)。この特定方法は、検索文字列に対応するリーフノード27の特定方法と同様であるので、詳細な説明は省略する。   Next, a registration process executed by the control unit 30 will be described. FIG. 6 is a flowchart illustrating an example of the registration process. As shown in FIG. 6, first, when the input of the data information DQ for registering index information is received by the receiving unit 31 (step S611), the specifying unit 37 registers in the specific field Fx of the received data information DQ. A character string (referred to as a registered character string) constituting the application name and an ID (position information) of the data information DQ are specified (step S612). Next, the leaf node specifying unit 32 specifies the leaf node 27 corresponding to the registered character string (step S613). Since this specifying method is the same as the specifying method of the leaf node 27 corresponding to the search character string, detailed description is omitted.

次に、第3判定部38は、登録文字列の一部と一致する部分文字列がリーフノード27に存在するか否かを判定する(ステップS614)。ステップS614において、登録文字列の一部と一致する部分文字列がリーフノード27に存在しないと判定された場合、決定部41は、所定の規則に従って、登録文字列の索引情報の挿入場所を決定し(ステップS615)、処理は後述のステップS620に移行する。いま、登録文字列が「データ抽出装置、抽出方法およびプログラム」であって、登録文字列の50音順に挿入場所が決定される場合を想定する。図4の例では、登録文字列「データ抽出装置、抽出方法およびプログラム」は、第3行目の索引情報と第4行目の索引情報との間に挿入されることが決定される。なお、これに限らず、所定の規則は任意に設定可能である。   Next, the third determination unit 38 determines whether or not a partial character string that matches a part of the registered character string exists in the leaf node 27 (step S614). If it is determined in step S614 that the partial character string that matches a part of the registered character string does not exist in the leaf node 27, the determination unit 41 determines the insertion location of the index information of the registered character string according to a predetermined rule. (Step S615), and the process proceeds to Step S620 described later. Assume that the registered character string is “data extraction apparatus, extraction method and program”, and the insertion location is determined in the order of the 50 characters of the registered character string. In the example of FIG. 4, it is determined that the registered character string “data extraction device, extraction method, and program” is inserted between the index information on the third row and the index information on the fourth row. However, the present invention is not limited to this, and the predetermined rule can be set arbitrarily.

一方、上述のステップS614において、登録文字列の一部と一致する部分文字列がリーフノード27に存在すると判定された場合、算出部33は、登録文字列のハッシュ値を算出する(ステップS616)。次に、第4判定部39は、登録文字列のハッシュ値と、登録文字列の一部と一致する部分文字列に対応するハッシュ値とを比較し、登録文字列のハッシュ値と一致するハッシュ値を含む索引情報があるか否かを判定する(ステップS617)。   On the other hand, when it is determined in step S614 described above that a partial character string that matches a part of the registered character string exists in the leaf node 27, the calculation unit 33 calculates a hash value of the registered character string (step S616). . Next, the fourth determination unit 39 compares the hash value of the registered character string with the hash value corresponding to the partial character string that matches a part of the registered character string, and the hash value that matches the hash value of the registered character string. It is determined whether there is index information including a value (step S617).

上述のステップS617において、登録文字列のハッシュ値と一致するハッシュ値を含む索引情報が存在しないと判定された場合、取得部36は、登録文字列の一部と一致する部分文字列に対応するIDで特定されるデータ情報DQをデータベース部22から取得し、当該データ情報DQの特定のフィールドFxに登録されたアプリケーション名を構成する文字列を取得する(ステップS618)。例えば、図4の例において、登録文字列が「データベース管理システムおよびプログラム」の場合を想定する。この場合、第6行目の索引情報および第7行目の索引情報の各々の部分文字列(「データベース管理シス」)が、登録文字列の一部と一致するものの、ハッシュ値は一致しない。したがって、取得部36は、第6行目の索引情報および第7行目の索引情報に含まれるIDで特定されるデータ情報DQをそれぞれ取得するとともに、当該各データ情報DQにおける特定のフィールドFxに登録されたアプリケーション名を構成する文字列を取得する。   If it is determined in step S617 described above that there is no index information including a hash value that matches the hash value of the registered character string, the acquisition unit 36 corresponds to the partial character string that matches a part of the registered character string. The data information DQ specified by the ID is acquired from the database unit 22, and the character string constituting the application name registered in the specific field Fx of the data information DQ is acquired (step S618). For example, in the example of FIG. 4, it is assumed that the registered character string is “database management system and program”. In this case, the partial character strings (“database management system”) of the index information on the sixth line and the index information on the seventh line match a part of the registered character string, but the hash values do not match. Therefore, the acquisition unit 36 acquires the data information DQ specified by the ID included in the index information of the sixth row and the index information of the seventh row, and stores the specific field Fx in the data information DQ. Get the character string that composes the registered application name.

次に、決定部41は、所定の規則に従って、登録文字列の索引情報の挿入場所を決定し(ステップS619)、処理は後述のステップS620に移行する。いま、登録文字列が「データベース管理システムおよびプログラム」であって、登録文字列の50音順に挿入場所が決定される場合を想定する。図4の例では、登録文字列「データベース管理システムおよびプログラム」は、第6行目の索引情報と第7行目の索引情報との間に挿入されることが決定される。なお、これに限らず、所定の規則は任意に設定可能である。   Next, the determination unit 41 determines the insertion position of the index information of the registered character string according to a predetermined rule (step S619), and the process proceeds to step S620 described later. Assume that the registered character string is “database management system and program”, and the insertion location is determined in the order of the 50 characters of the registered character string. In the example of FIG. 4, it is determined that the registered character string “database management system and program” is inserted between the index information on the sixth line and the index information on the seventh line. However, the present invention is not limited to this, and the predetermined rule can be set arbitrarily.

ステップS620では、登録部40は、決定部41により決定された挿入場所に、登録文字列の部分文字列と、当該登録文字列のハッシュ値と、特定部37で特定されたIDとを対応付けた索引情報を登録する。例えば登録文字列が「データベース管理システムおよびプログラム」である場合、先頭から10文字分のデータ長の「データベース管理シス」と、「データベース管理システムおよびプログラム」のハッシュ値と、「データベース管理システムおよびプログラム」が特定のフィールドFxに登録されたデータ情報DQのID(特定部37で特定されたID)とが対応付けられた索引情報が、決定部41により決定された挿入場所に登録される。   In step S620, the registration unit 40 associates the partial character string of the registered character string, the hash value of the registered character string, and the ID specified by the specifying unit 37 with the insertion location determined by the determining unit 41. Register index information. For example, when the registered character string is “database management system and program”, “database management system” having a data length of 10 characters from the beginning, a hash value of “database management system and program”, and “database management system and program” "Is associated with the ID of the data information DQ registered in the specific field Fx (the ID specified by the specifying unit 37), and the index information is registered at the insertion location determined by the determining unit 41.

一方、上述のステップS617において、登録文字列のハッシュ値と一致するハッシュ値を含む索引情報が存在すると判定された場合、登録部40は、リーフノード27(索引記憶部24)のうち、当該索引情報が記憶される行の直後の行または直前の行に、登録文字列の部分文字列と、登録文字列のハッシュ値と、特定部37で特定されたIDとを対応付けた索引情報を登録する(ステップS620)。   On the other hand, in step S617 described above, when it is determined that there is index information including a hash value that matches the hash value of the registered character string, the registration unit 40 selects the index of the leaf node 27 (index storage unit 24). The index information in which the partial character string of the registered character string, the hash value of the registered character string, and the ID specified by the specifying unit 37 are registered in the line immediately after the line in which the information is stored or in the immediately preceding line. (Step S620).

次に、制御部30が実行する削除処理について説明する。図7は、削除処理の一例を示すフローチャートである。図7に示すように、まず、削除を行うデータ情報DQの入力を受付部31で受け付けると(ステップS711)、特定部37は、その受け付けたデータ情報DQの特定のフィールドFxに登録されたアプリケーション名を構成する文字列(削除文字列と呼ぶ)と、当該データ情報DQのID(位置情報)を特定する(ステップS712)。次に、リーフノード特定部32は、削除文字列に対応するリーフノード27を特定する(ステップS713)。   Next, the deletion process executed by the control unit 30 will be described. FIG. 7 is a flowchart illustrating an example of the deletion process. As shown in FIG. 7, first, when the input of the data information DQ to be deleted is received by the receiving unit 31 (step S711), the specifying unit 37 reads the application registered in the specific field Fx of the received data information DQ. A character string constituting the name (referred to as a deleted character string) and an ID (position information) of the data information DQ are specified (step S712). Next, the leaf node specifying unit 32 specifies the leaf node 27 corresponding to the deleted character string (step S713).

次に、削除対象特定部42は、リーフノード27に記憶された索引情報のうち削除対象となる索引情報を特定する(ステップS714)。より具体的には、削除対象特定部42は、削除文字列のハッシュ値と一致するハッシュ値を含む索引情報を、削除対象の索引情報として特定する。次に、削除部43は、削除対象特定部42で特定された索引情報をリーフノード27から削除する(ステップS715)。   Next, the deletion target specifying unit 42 specifies index information to be deleted among the index information stored in the leaf node 27 (step S714). More specifically, the deletion target specifying unit 42 specifies index information including a hash value that matches the hash value of the deletion character string as index information to be deleted. Next, the deletion unit 43 deletes the index information specified by the deletion target specifying unit 42 from the leaf node 27 (step S715).

以上に説明したように、本実施形態では、データ情報DQの特定のフィールドFxに登録されたアプリケーション名を構成する文字列(データ列)を、そのまま索引記憶部24に登録することはせずに、アプリケーション名を構成する文字列の一部の部分文字列と、当該文字列のハッシュ値と、ID(位置情報)とを対応付けて索引記憶部24に記憶するので、索引記憶部24が保持するデータ量を低減できる。したがって、本実施形態によれば、検索時の読み出し量が少なくなるので、検索速度を高速化することが可能になるという有利な効果を奏する。   As described above, in the present embodiment, the character string (data string) constituting the application name registered in the specific field Fx of the data information DQ is not registered in the index storage unit 24 as it is. Since the partial character string of the character string constituting the application name, the hash value of the character string, and the ID (position information) are stored in association with each other in the index storage unit 24, the index storage unit 24 holds Data amount to be reduced. Therefore, according to the present embodiment, since the amount of reading at the time of search is reduced, there is an advantageous effect that the search speed can be increased.

(第2実施形態)
次に第2実施形態について説明する。第2実施形態では、図8に示すように、索引記憶部24(リーフノード27)に記憶される部分文字列のデータ長は可変に設定される点で上述の第1実施形態と相違する。その他は、第1実施形態と同じであるので、重複する部分については説明を省略する。
(Second Embodiment)
Next, a second embodiment will be described. As shown in FIG. 8, the second embodiment differs from the first embodiment in that the data length of the partial character string stored in the index storage unit 24 (leaf node 27) is variably set. The other parts are the same as those in the first embodiment, and thus the description of the overlapping parts is omitted.

図9は、第2実施形態の検索装置100の概略構成の一例を示すブロック図である。図9に示すように、制御部30が有する機能の中に設定部44が含まれる点で第1実施形態と相違する。設定部44は、索引記憶部24(リーフノード27)に登録する部分文字列のデータ長を可変に設定するとともに、登録する部分文字列を設定する。   FIG. 9 is a block diagram illustrating an example of a schematic configuration of the search device 100 according to the second embodiment. As shown in FIG. 9, the control unit 30 is different from the first embodiment in that the setting unit 44 is included in the functions of the control unit 30. The setting unit 44 variably sets the data length of the partial character string to be registered in the index storage unit 24 (leaf node 27) and sets the partial character string to be registered.

図10は、第2実施形態における登録処理の一例を示すフローチャートである。なお、検索処理および削除処理は、上述の第1実施形態と同じであるので、ここでは説明を省略する。図10のステップS911〜ステップS914の内容は、図6のステップS611〜ステップS614の内容と同じであるので、詳細な説明は省略する。   FIG. 10 is a flowchart illustrating an example of a registration process according to the second embodiment. Note that search processing and deletion processing are the same as those in the first embodiment described above, and thus description thereof is omitted here. The contents of steps S911 to S914 in FIG. 10 are the same as the contents of steps S611 to S614 in FIG.

図10のステップS914において、登録文字列の一部と一致する部分文字列がリーフノード27に存在しないと判定された場合、決定部41は、所定の規則に従って、登録文字列の索引情報の挿入場所を決定する(ステップS915)。ステップS915の内容は図6のステップS615の内容と同じであるので、詳細な説明は省略する。ステップS915の後、設定部44は、登録文字列のデータ長を1文字分のデータ長に設定する。そして、登録文字列の先頭の文字を部分文字列として設定する(ステップS916)。例えば登録文字列が「データ抽出装置、抽出方法およびプログラム」の場合、先頭の文字である「デ」が部分文字列として設定される。なお、これに限らず、部分文字列の設定方法は任意であり、例えば先頭の文字から2文字分のデータ列を部分文字列として設定することもできる。ステップS916の後、処理はステップS922に移行する。ステップS922の内容は、図6のステップS620の内容と同じであるので、詳細な説明は省略する。   When it is determined in step S914 in FIG. 10 that a partial character string that matches a part of the registered character string does not exist in the leaf node 27, the determination unit 41 inserts index information of the registered character string according to a predetermined rule. A place is determined (step S915). Since the content of step S915 is the same as the content of step S615 of FIG. 6, detailed description is abbreviate | omitted. After step S915, the setting unit 44 sets the data length of the registered character string to the data length for one character. Then, the first character of the registered character string is set as a partial character string (step S916). For example, when the registered character string is “data extraction device, extraction method, and program”, the first character “de” is set as the partial character string. The method for setting the partial character string is not limited to this, and for example, a data string for two characters from the first character can be set as the partial character string. After step S916, the process proceeds to step S922. Since the content of step S922 is the same as the content of step S620 of FIG. 6, detailed description thereof is omitted.

上述のステップS914において、登録文字列の一部と一致する部分文字列がリーフノード27に存在すると判定された場合、算出部33は、登録文字列のハッシュ値を算出する(ステップS917)。次に、第4判定部39は、登録文字列のハッシュ値と、登録文字列の一部と一致する部分文字列に対応するハッシュ値とを比較し、登録文字列のハッシュ値と一致するハッシュ値を含む索引情報があるか否かを判定する(ステップS918)。   If it is determined in step S914 described above that a partial character string that matches a part of the registered character string exists in the leaf node 27, the calculation unit 33 calculates a hash value of the registered character string (step S917). Next, the fourth determination unit 39 compares the hash value of the registered character string with the hash value corresponding to the partial character string that matches a part of the registered character string, and the hash value that matches the hash value of the registered character string. It is determined whether there is index information including a value (step S918).

上述のステップS918において、登録文字列のハッシュ値と一致するハッシュ値を含む索引情報が存在しないと判定された場合、設定部44は、データ長を拡張して、登録する部分文字列を設定する(ステップS919)。より具体的には、設定部44は、登録する部分文字列のデータ長を、登録文字列の一部と一致する部分文字列のデータ長よりも大きい値に設定する。   When it is determined in step S918 described above that there is no index information including a hash value that matches the hash value of the registered character string, the setting unit 44 extends the data length and sets the partial character string to be registered. (Step S919). More specifically, the setting unit 44 sets the data length of the partial character string to be registered to a value larger than the data length of the partial character string that matches a part of the registered character string.

例えば、図8の例において、登録文字列が「データベース管理システムおよびプログラム」の場合を想定する。この場合、第3行目、第5行目、第6行目および第7行目の各々の索引情報の部分文字列(「データ」、「デ」、「データベ」、「デー」)が、登録文字列の一部と一致するものの、ハッシュ値は一致しない。したがって、設定部44は、登録する文字列のデータ長を、登録文字列の一部と一致する部分文字列のうちデータ長が最大のものよりも1文字分だけ長い値に設定する。この場合、登録する部分文字列のデータ長は5文字分の長さとなり、設定部44は、先頭の文字から数えて5文字分のデータ長の「データベー」を、登録する部分文字列として設定する。なお、これは一例であり、登録する部分文字列の設定方法は任意である。要するに、登録する部分文字列として、登録文字列の一部と一致する部分文字列のデータ長よりも長いデータ長の文字列を設定するものであればよい。   For example, in the example of FIG. 8, it is assumed that the registered character string is “database management system and program”. In this case, partial character strings (“data”, “de”, “data database”, “data”) of the index information of the third line, the fifth line, the sixth line, and the seventh line are Although it matches a part of the registered character string, the hash value does not match. Therefore, the setting unit 44 sets the data length of the character string to be registered to a value that is longer by one character than the longest data length among the partial character strings that match a part of the registered character string. In this case, the data length of the partial character string to be registered is 5 characters long, and the setting unit 44 sets “data base” having a data length of 5 characters counted from the first character as the partial character string to be registered. Set. This is merely an example, and the method for setting the partial character string to be registered is arbitrary. In short, any character string having a data length longer than the data length of the partial character string that matches a part of the registered character string may be set as the partial character string to be registered.

ステップS919の後、処理はステップS920に移行する。ステップS920〜ステップS922の内容は、図6のステップS618〜ステップS620の内容と同じであるので、詳細な説明は省略する。   After step S919, the process proceeds to step S920. The contents of steps S920 to S922 are the same as the contents of steps S618 to S620 of FIG.

また、上述のステップS918において、登録文字列のハッシュ値と一致するハッシュ値を含む索引情報が存在しないと判定された場合、処理はステップS922に移行する。図9のステップS922の内容は、図6のステップS620の内容と同じであるので、詳細な説明は省略する。   If it is determined in step S918 described above that there is no index information including a hash value that matches the hash value of the registered character string, the process proceeds to step S922. Since the content of step S922 of FIG. 9 is the same as the content of step S620 of FIG. 6, detailed description is omitted.

以上に説明したように、本実施形態では、登録文字列の一部と一致する部分文字列がリーフノード27に存在するものの、当該登録文字列のハッシュ値と一致するハッシュ値を含む索引情報がリーフノード27に存在しないと判定された場合は、登録する部分文字列のデータ長は拡張される一方、登録文字列の一部と一致する部分文字列がリーフノード27に存在しないと判定された場合は、登録する部分文字列のデータ長は抑制される(一例として、本実施形態では1文字分のデータ長に抑制される)。すなわち、必要な部分は登録する部分文字列のデータ長を伸ばしつつ、必要の無い部分で登録する部分文字列のデータ長を抑えることにより、索引記憶部24(リーフノード27)の容量を削減できるという利点がある。   As described above, in this embodiment, although a partial character string that matches a part of the registered character string exists in the leaf node 27, the index information including the hash value that matches the hash value of the registered character string is included. When it is determined that the leaf node 27 does not exist, the data length of the partial character string to be registered is expanded, but it is determined that the partial character string that matches a part of the registered character string does not exist in the leaf node 27. In this case, the data length of the partial character string to be registered is suppressed (as an example, the data length is suppressed to one character in this embodiment). That is, the capacity of the index storage unit 24 (leaf node 27) can be reduced by reducing the data length of the partial character string to be registered in the unnecessary part while increasing the data length of the partial character string to be registered in the necessary part. There is an advantage.

(変形例)
以上、本発明の実施形態を説明したが、上述の各実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。
(Modification)
As mentioned above, although embodiment of this invention was described, each above-mentioned embodiment was shown as an example and is not intending limiting the range of invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

例えば上述の各実施形態では、データベース部22に記憶されるデータ情報の一例として、文書を示す情報(ドキュメント情報)を挙げて説明したが、これに限らず、データ情報の種類は任意である。例えば図11に示すように、データ情報は、テーブルデータ200の各ラインを構成するデータ群Gであってもよい。各データ群G(データ情報)は、それぞれにデータ列が登録される複数のフィールドFを有する。そして、複数のフィールドFのうち、特定のフィールドFxに対して、上述したような索引を作成することができる。   For example, in each of the above-described embodiments, information (document information) indicating a document has been described as an example of data information stored in the database unit 22, but the present invention is not limited to this, and the type of data information is arbitrary. For example, as shown in FIG. 11, the data information may be a data group G constituting each line of the table data 200. Each data group G (data information) has a plurality of fields F in which data strings are registered. Then, an index as described above can be created for a specific field Fx among the plurality of fields F.

また、上述の各実施形態では、データ情報DQが有する複数のフィールドFのうちの特定のフィールドFxに対してのみ索引が作成されているが、これに限らず、他のフィールドに対しても、上述の各実施形態と同様の索引を作成することもできる。   Further, in each of the above-described embodiments, an index is created only for a specific field Fx of the plurality of fields F included in the data information DQ. An index similar to that in each of the embodiments described above can also be created.

10 操作表示部
20 記憶部
22 データベース部
24 索引記憶部
25 ルートノード
26 ブランチノード
27 リーフノード
30 制御部
31 受付部
32 リーフノード特定部
33 算出部
34 第1判定部
35 第2判定部
36 取得部
37 特定部
38 第3判定部
39 第4判定部
40 登録部
41 決定部
42 削除対象特定部
43 削除部
44 設定部
100 検索装置
200 テーブルデータ
DESCRIPTION OF SYMBOLS 10 Operation display part 20 Storage part 22 Database part 24 Index storage part 25 Root node 26 Branch node 27 Leaf node 30 Control part 31 Reception part 32 Leaf node specific | specification part 33 Calculation part 34 1st determination part 35 2nd determination part 36 Acquisition part 37 identification unit 38 third determination unit 39 fourth determination unit 40 registration unit 41 determination unit 42 deletion target identification unit 43 deletion unit 44 setting unit 100 search device 200 table data

Claims (8)

それぞれがデータ列を含む複数のフィールドをそれぞれが有する複数のデータ情報を記憶するデータベースと、
前記複数のフィールドのうちの特定のフィールドに登録された前記データ列の一部である部分データ列と、当該データ列のハッシュ値と、当該データ列が前記特定のフィールドに登録された前記データ情報の前記データベースにおける位置を示す位置情報とが対応付けられた索引情報を記憶する索引記憶部と、
検索に用いられる前記データ列を示す検索データ列を受け付ける受付部と、
前記検索データ列のハッシュ値を算出する算出部と、
前記検察データ列の一部と一致する前記部分データ列が前記索引記憶部に存在するか否かを判定する第1判定部と、
前記第1判定部により、前記検察データ列の一部と一致する前記部分データ列が前記索引記憶部に存在すると判定された場合は、当該部分データ列に対応する前記ハッシュ値と、前記検索データ列の前記ハッシュ値とが一致するか否かを判定する第2判定部と、
前記第2判定部により、前記部分データ列に対応する前記ハッシュ値と、前記検索データ列の前記ハッシュ値とが一致すると判定された場合は、当該部分データ列に対応する前記位置情報を取得する取得部と、を備える、
ことを特徴とする検索装置。
A database storing a plurality of data information each having a plurality of fields each including a data string;
The partial data string that is a part of the data string registered in the specific field of the plurality of fields, the hash value of the data string, and the data information in which the data string is registered in the specific field An index storage unit for storing index information associated with position information indicating a position in the database;
A receiving unit that receives a search data string indicating the data string used for the search;
A calculation unit for calculating a hash value of the search data sequence;
A first determination unit that determines whether or not the partial data sequence that matches a part of the prosecution data sequence exists in the index storage unit;
When the first determination unit determines that the partial data string that matches a part of the prosecution data string exists in the index storage unit, the hash value corresponding to the partial data string and the search data A second determination unit that determines whether or not the hash value of the column matches;
When the second determination unit determines that the hash value corresponding to the partial data string matches the hash value of the search data string, the position information corresponding to the partial data string is acquired. An acquisition unit;
A search device characterized by that.
前記受付部は、前記索引情報の登録を行う前記データ情報を受け付け、
前記受付部が、前記データ情報を受け付けた場合、当該データ情報の前記特定のフィールドに登録された前記データ列を示す登録データ列と、当該データ情報の前記位置情報を特定する特定部と、
前記登録データ列の一部と一致する前記部分データ列が前記索引記憶部に存在するか否かを判定する第3判定部と、
前記第3判定部により、前記登録データ列の一部と一致する前記部分データ列が前記索引記憶部に存在すると判定された場合は、当該部分データ列に対応する前記ハッシュ値と、前記登録データ列の前記ハッシュ値とが一致するか否かを判定する第4判定部と、
前記第3判定部により前記登録データ列の一部と一致する前記部分データ列が前記索引記憶部に存在しないと判定された場合、または、前記第4判定部により前記部分データ列に対応する前記ハッシュ値と、前記登録データ列の前記ハッシュ値とが一致しないと判定された場合は、所定の規則に従って、前記索引情報の登録場所を決定する決定部と、
前記決定部により決定された登録場所に前記索引情報を登録する登録部と、を備える、
ことを特徴とする請求項1に記載の検索装置。
The receiving unit receives the data information for registering the index information;
When the reception unit receives the data information, a registration data sequence indicating the data sequence registered in the specific field of the data information, a specification unit for specifying the position information of the data information,
A third determination unit that determines whether or not the partial data string that matches a part of the registered data string exists in the index storage unit;
When the third determination unit determines that the partial data sequence that matches a part of the registration data sequence exists in the index storage unit, the hash value corresponding to the partial data sequence and the registration data A fourth determination unit that determines whether or not the hash value of the column matches;
When the third determination unit determines that the partial data sequence that matches a part of the registered data sequence does not exist in the index storage unit, or the fourth determination unit corresponds to the partial data sequence When it is determined that the hash value and the hash value of the registration data string do not match, a determination unit that determines a registration location of the index information according to a predetermined rule;
A registration unit that registers the index information at the registration location determined by the determination unit,
The search device according to claim 1.
前記第4判定部により前記部分データ列に対応する前記ハッシュ値と、前記登録データ列の前記ハッシュ値とが一致しないと判定された場合は、前記登録データ列の前記部分データ列のデータ長を、前記登録データ列の一部と一致する前記部分データ列のデータ長よりも大きい値に設定する設定部をさらに備える、
ことを特徴とする請求項2に記載の検索装置。
When the fourth determination unit determines that the hash value corresponding to the partial data string and the hash value of the registered data string do not match, the data length of the partial data string of the registered data string is set. , Further comprising a setting unit that sets a value larger than the data length of the partial data string that matches a part of the registered data string;
The search device according to claim 2.
前記複数のデータ情報の各々は、文書を示す情報である、
ことを特徴とする請求項1に記載の検索装置。
Each of the plurality of data information is information indicating a document.
The search device according to claim 1.
前記データベースは、前記複数のデータ情報が並列に配置されるテーブルデータを記憶する、
ことを特徴とする請求項1に記載の検索装置。
The database stores table data in which the plurality of data information is arranged in parallel.
The search device according to claim 1.
前記位置情報は、前記データ情報における前記特定フィールドの位置も特定する、
ことを特徴とする請求項1に記載の検索装置。
The position information also specifies the position of the specific field in the data information.
The search device according to claim 1.
検索に用いられるデータ列を示す検索データ列を受け付ける第1ステップと、
前記検索データ列のハッシュ値を算出する第2ステップと、
それぞれがデータ列を含む複数のフィールドをそれぞれが有する複数のデータ情報を記憶するデータベースに存在する複数の前記データ情報のうちの何れかの前記データ情報の特定のフィールドに登録された前記データ列の一部である部分データ列と、当該データ列のハッシュ値と、当該データ情報の前記データベースにおける位置を示す位置情報とが対応付けられた索引情報を記憶する索引記憶部に、前記検察データ列の一部と一致する前記部分データ列が存在するか否かを判定する第3ステップと、
前記第3ステップで、前記検察データ列の一部と一致する前記部分データ列が前記索引記憶部に存在すると判定した場合は、当該部分データ列に対応する前記ハッシュ値と、前記検索データ列の前記ハッシュ値とが一致するか否かを判定する第4ステップと、
前記第4ステップで、前記部分データ列に対応する前記ハッシュ値と、前記検索データ列の前記ハッシュ値とが一致すると判定した場合は、当該部分データ列に対応する前記位置情報を取得する第5ステップと、を備える、
ことを特徴とする検索方法。
A first step of accepting a search data string indicating a data string used for the search;
A second step of calculating a hash value of the search data string;
Each of the data strings registered in a specific field of the data information of any of the plurality of data information existing in a database storing a plurality of data information each having a plurality of fields each including a data string In the index storage unit that stores the partial data string that is a part, the hash value of the data string, and the position information that indicates the position of the data information in the database, the index storage unit stores the index data of the prosecution data string A third step of determining whether or not the partial data string that matches a part exists;
If it is determined in the third step that the partial data string that matches a part of the prosecution data string exists in the index storage unit, the hash value corresponding to the partial data string and the search data string A fourth step of determining whether or not the hash value matches;
If it is determined in the fourth step that the hash value corresponding to the partial data string matches the hash value of the search data string, the position information corresponding to the partial data string is acquired. And comprising steps
A search method characterized by that.
検索に用いられるデータ列を示す検索データ列を受け付ける第1ステップと、
前記検索データ列のハッシュ値を算出する第2ステップと、
それぞれがデータ列を含む複数のフィールドをそれぞれが有する複数のデータ情報を記憶するデータベースに存在する複数の前記データ情報のうちの何れかの前記データ情報の特定のフィールドに登録された前記データ列の一部である部分データ列と、当該データ列のハッシュ値と、当該データ情報の前記データベースにおける位置を示す位置情報とが対応付けられた索引情報を記憶する索引記憶部に、前記検察データ列の一部と一致する前記部分データ列が存在するか否かを判定する第3ステップと、
前記第3ステップで、前記検察データ列の一部と一致する前記部分データ列が前記索引記憶部に存在すると判定した場合は、当該部分データ列に対応する前記ハッシュ値と、前記検索データ列の前記ハッシュ値とが一致するか否かを判定する第4ステップと、
前記第4ステップで、前記部分データ列に対応する前記ハッシュ値と、前記検索データ列の前記ハッシュ値とが一致すると判定した場合は、当該部分データ列に対応する前記位置情報を取得する第5ステップと、をコンピュータに実行させるためのプログラム。
A first step of accepting a search data string indicating a data string used for the search;
A second step of calculating a hash value of the search data string;
Each of the data strings registered in a specific field of the data information of any of the plurality of data information existing in a database storing a plurality of data information each having a plurality of fields each including a data string In the index storage unit that stores the partial data string that is a part, the hash value of the data string, and the position information that indicates the position of the data information in the database, the index storage unit stores the index data of the prosecution data string A third step of determining whether or not the partial data string that matches a part exists;
If it is determined in the third step that the partial data string that matches a part of the prosecution data string exists in the index storage unit, the hash value corresponding to the partial data string and the search data string A fourth step of determining whether or not the hash value matches;
If it is determined in the fourth step that the hash value corresponding to the partial data string matches the hash value of the search data string, the position information corresponding to the partial data string is acquired. A program for causing a computer to execute steps.
JP2011097366A 2011-04-25 2011-04-25 SEARCH DEVICE, SEARCH METHOD, AND PROGRAM Expired - Fee Related JP5462215B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011097366A JP5462215B2 (en) 2011-04-25 2011-04-25 SEARCH DEVICE, SEARCH METHOD, AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011097366A JP5462215B2 (en) 2011-04-25 2011-04-25 SEARCH DEVICE, SEARCH METHOD, AND PROGRAM

Publications (2)

Publication Number Publication Date
JP2012230493A true JP2012230493A (en) 2012-11-22
JP5462215B2 JP5462215B2 (en) 2014-04-02

Family

ID=47432001

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011097366A Expired - Fee Related JP5462215B2 (en) 2011-04-25 2011-04-25 SEARCH DEVICE, SEARCH METHOD, AND PROGRAM

Country Status (1)

Country Link
JP (1) JP5462215B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061680A (en) * 2018-10-15 2020-04-24 北京京东尚科信息技术有限公司 Data retrieval method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02190970A (en) * 1989-01-19 1990-07-26 Hitachi Ltd Index structure and search processing method using the structure
JPH02227735A (en) * 1989-02-28 1990-09-10 Nec Corp Name table retrieving device
JPH06139280A (en) * 1992-10-29 1994-05-20 Toshiba Corp File management system
JPH08235040A (en) * 1995-02-27 1996-09-13 Hitachi Ltd Data file management system
JPH10312395A (en) * 1997-03-10 1998-11-24 Toshiba Corp System and method for full-text retrieval and record medium where full-text retrieving program is recorded
JP2009512099A (en) * 2005-10-18 2009-03-19 ライトオーダー インコーポレイテッド Method and apparatus for restartable hashing in a try

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02190970A (en) * 1989-01-19 1990-07-26 Hitachi Ltd Index structure and search processing method using the structure
JPH02227735A (en) * 1989-02-28 1990-09-10 Nec Corp Name table retrieving device
JPH06139280A (en) * 1992-10-29 1994-05-20 Toshiba Corp File management system
JPH08235040A (en) * 1995-02-27 1996-09-13 Hitachi Ltd Data file management system
JPH10312395A (en) * 1997-03-10 1998-11-24 Toshiba Corp System and method for full-text retrieval and record medium where full-text retrieving program is recorded
JP2009512099A (en) * 2005-10-18 2009-03-19 ライトオーダー インコーポレイテッド Method and apparatus for restartable hashing in a try

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061680A (en) * 2018-10-15 2020-04-24 北京京东尚科信息技术有限公司 Data retrieval method and device

Also Published As

Publication number Publication date
JP5462215B2 (en) 2014-04-02

Similar Documents

Publication Publication Date Title
US9645787B1 (en) Tag-based electronic media playlist processing
JP5267670B2 (en) Information search system, information management apparatus, information search method, information management method, and recording medium
US8655921B2 (en) True/false decision method for deciding whether search query containing logical expression is true or false
JP2008090500A (en) Data structure conversion system, program, and data structure
CN106255962B (en) System and method for improved data structure storage
US8775457B2 (en) Efficient string matching state machine
KR20140053888A (en) Method and device for acquiring structured information in layout file
US11222067B2 (en) Multi-index method and apparatus, cloud system and computer-readable storage medium
CN102200968A (en) Method and device for removing duplications of EXCEL form data
JP5194818B2 (en) Data classification method and data processing apparatus
JP4491480B2 (en) Index construction method, document retrieval apparatus, and index construction program
JP5462215B2 (en) SEARCH DEVICE, SEARCH METHOD, AND PROGRAM
CN110795920A (en) Document generation method and device
US11537658B2 (en) Methods, systems, and media for determining and presenting information related to embedded sound recordings
JP5903843B2 (en) Circuit component migration apparatus, circuit component migration program, and circuit component migration method
JP6753190B2 (en) Document retrieval device and program
CN107408104A (en) The statement cascade rearrangement of pattern
JP2019125025A (en) System, method for managing document data, and program
JP6417686B2 (en) Audio output sequence control program, audio output sequence control method, and audio output sequence control device
CN108089900A (en) A kind of character string processing method and device
JP2010108206A (en) Method of recording inter-document tracking information and support device
CN105204658B (en) Electronic equipment and its input control method
JP2014228894A (en) Data extraction program, data extraction method, and data extraction device
CN118096171A (en) Data gray level verification method, device, computer equipment, medium and product
JP2016134754A (en) Conversion processing program, information processor, and conversion processing method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130521

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130719

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140116

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees