WO2014174599A1 - 計算機、記録媒体及びデータ検索方法 - Google Patents

計算機、記録媒体及びデータ検索方法 Download PDF

Info

Publication number
WO2014174599A1
WO2014174599A1 PCT/JP2013/061965 JP2013061965W WO2014174599A1 WO 2014174599 A1 WO2014174599 A1 WO 2014174599A1 JP 2013061965 W JP2013061965 W JP 2013061965W WO 2014174599 A1 WO2014174599 A1 WO 2014174599A1
Authority
WO
WIPO (PCT)
Prior art keywords
search
index
data
range
target range
Prior art date
Application number
PCT/JP2013/061965
Other languages
English (en)
French (fr)
Inventor
菅谷 奈津子
岐勇 飯島
Original Assignee
株式会社日立製作所
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 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to JP2015513405A priority Critical patent/JP5978393B2/ja
Priority to PCT/JP2013/061965 priority patent/WO2014174599A1/ja
Priority to US14/423,746 priority patent/US20160154851A1/en
Publication of WO2014174599A1 publication Critical patent/WO2014174599A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures

Definitions

  • the present invention relates to a computer, a recording medium, and a data search method, and more particularly, to a computer that extracts desired data from a data group, a non-transitory recording medium that stores a program for executing the processing, and a data search method.
  • DB index capacity creates multiple indexes with different characteristics for the same data, or creates indexes in multiple ranges in order to appropriately and rapidly process a large amount of data to be analyzed. Made it possible.
  • character string search index is a format in which a partial character string serving as a key and an appearance position in the data of the partial character string are stored in association with each other.
  • the partial character string is extracted from the text in units of character string search such as a word, n-gram, or suffix array (suffix array).
  • a technique such as morphological analysis is used.
  • Patent Document 2 discloses a technique for mechanically extracting a character string of n consecutive characters.
  • Non-Patent Document 2 discloses a technique for extracting a suffix array from text.
  • B-tree index is, for example, an algorithm that speeds up a search by using a tree-structured index tree (index tree).
  • index tree tree-structured index tree
  • Non-Patent Document 1 discloses a technique of searching from the top root page of the upper page and acquiring appearance data information of the search target data from the lowermost leaf page.
  • FIG. 20 shows an example of RDBMS processing.
  • FIG. 20 shows an example of an employee table 400 that manages employee ID, name, date of employment, affiliation, and the like.
  • indexes 451, 452,... are created in column units such as an employee number column 401 and a name column 402, respectively.
  • an index in a range that matches the column specified as the search target range is used according to the search condition 500 included in the search request.
  • the search condition 500 included in the search request.
  • the actual data of that column is collated.
  • the search condition is employee data of “BBB section belonging to before March 31, 2000”
  • the index 453 in the entry date column 403 is used, and March 2000 Data on the date of entry prior to the 31st is retrieved.
  • the actual data in the affiliation column 404 is collated to identify the row that is the BBB section.
  • a method may be used in which the processing order is determined using the key selection rate and the verification cost as a guideline.
  • Patent Document 1 discloses an optimization technique “evaluating the read cost of a plurality of indexes related to a search condition formula according to a key selection rate, selecting an optimum one from those indexes, and selecting the selected index.
  • the optimal index for the database search processing method that reads records from the database and executes search processing using, the distribution of records managed by the index for which the key selection rate is calculated
  • the search is performed from the storage unit that stores the index definition including information indicating the index creation range of the search index created for the data group, the search target range included in the search request for the data group, and the index definition. Detecting an inclusion relationship of at least a part of either one of the target range and the index creation range, and performing an index search using the search index with respect to the search request by detecting the inclusion relationship;
  • a control unit that executes an actual data search in the search target range and outputs a search result for the search request Is a computer having
  • FIG. 1 One feature of the computer system 100 according to the present embodiment is that a search process is first executed from the index creation range, and the search process of the search target range is executed using the result. Further, as shown in FIGS. 1A and 1B, when the inclusion relationship between the index creation range and the search target range is different, one of the features is that the search processing procedure is different.
  • the ratio of the index creation range to which the search target range is included is the relevance ratio of the index to the search target range
  • the ratio of the index creation range to the index creation range is the index search target. It is defined as the recall for the range.
  • the solid rectangle is the entire data range held by the computer system 100
  • the inside of the ellipse indicated by the dotted line inside is the data search range requested by the search request from the client, etc.
  • the inside of the ellipse indicated by the solid line indicates the range where the index is pasted.
  • FIG. 1A is an example in a case where there is an inclusive relationship that the search target range of the search request is wider than the index creation range.
  • the processing procedure in this case is as follows.
  • the arrow in a figure shows the order of the range which searches.
  • the computer searches for data in the index creation range using the index (step A1). Document data that meets the conditions in this search is determined as a correct document.
  • the computer searches the search target range with the actual data for the document data that does not meet the conditions in step A1 (step A2). That is, the actual data search (document data search) is performed on the document data obtained by removing the index creation range from the search target range.
  • the computer merges the document data that matches the search conditions in the search processing of step A1 and step A2 to obtain a search result.
  • “first line” of text data consisting of a plurality of lines and “first paragraph” is designated as a search target.
  • “first line” is searched by index.
  • FIG. 1B is an example in the case where there is an inclusive relationship that the search target range of the search request is narrower than the index creation range.
  • the processing procedure in this case is as follows. First, the computer uses the index to search the index creation range (step B1). Search noise exists in the document data that meets the conditions by this search processing. Next, the computer searches the search target range with the actual data for the document data that meets the conditions in step B1 (step B2). That is, the document data search is executed in a range obtained by removing the search index creation range from the search target range. Then, the computer uses the document matched in step B2 as a search result.
  • an index is created in the “first paragraph” and “first line” is designated as a search target.
  • “first paragraph” is searched by index.
  • search noise there is search noise in this result.
  • “first one line” is searched with actual data for the matched document data.
  • the matched document data is used as a search result.
  • FIGS. 1A and 1B the inclusion relationship in FIGS. 1A and 1B is shown in FIG. 1A.
  • FIG. 1A all the document data matched in the index search becomes a correct answer document. It can be said that this is an index with a recall rate of 100% including the correct answer document. That is, an index with a matching rate of 100% is an index with no search noise with respect to the search target, and an index with a recall rate of 100% is an index with no search omission with respect to the search target.
  • the search target range and the index creation range partially overlap each other.
  • FIG. 1C shows an example in which both of them overlap.
  • the processing in this case is as follows.
  • the computer includes a range (search target range 1) included in the search handling range in the index creation range, and a range (search target range 2) excluding an overlapping portion with the index creation range in the search handling range.
  • the object is divided and processed (step C1).
  • the computer performs the above-described processing of FIG. 1B for the range satisfying the inclusion relationship (search target range 1 / inside the dotted line), and for other ranges (search target range 2), another index is used. And the process is recursively repeated (step C2).
  • the computer searches the actual data when a search target range that does not overlap with any index finally remains (step C3).
  • FIG. 2 schematically shows the configuration of the computer system 100 in the first embodiment.
  • one or more clients 70, the search server 10, and an external storage device are communicably connected via a communication line 80 (including a wired and / or wireless network).
  • a general-purpose server, PC, or communication terminal having a CPU 71, a main memory 72, an auxiliary memory 73, and an input / output unit 74 is applied.
  • an application program (AP) 75 having a search request function is realized in the main storage unit 75 so as to transmit a predetermined data search request to the search server 10 and receive the result. It has become.
  • a general-purpose server machine having a CPU 11, a main memory 12, an auxiliary memory 13, and various external communication devices (not shown) is applied to the search server 10.
  • the data search execution unit 15 is realized in the main storage unit 12 and the data search process from the client 70 is executed. Details will be described later.
  • the external storage device 50 a storage machine having a storage device such as HDD, SSD and / or magnetic tape is applied.
  • the external storage device 50 stores an index definition file 63, which is auxiliary information used for data retrieval, document data 62, which is actual data, and index data 61.
  • index definition file 63 which is auxiliary information used for data retrieval
  • document data 62 which is actual data
  • index data 61 index data 61.
  • a predetermined value is obtained. It comes to respond with data.
  • Each index 1, 2, 3,... In the index data 61 is associated with the definition information in the index definition file 63 on a one-to-one basis.
  • FIG. 3 schematically shows an example of definition information in the index definition file 63.
  • the definition information includes an index name 65 (“CREATE INDEX”) indicating the name of the index to be created, an index format 66 (“USING TYPE”), and an index creation range 67 (“ON”).
  • an example is shown in which “INDEX1” is defined as the index name 65, “NGRAM” is defined as the index format 66, and “first line” is defined as the index creation range 67.
  • B-tree and various character string search indexes can be specified.
  • the index creation range 67 includes, for example, attribute information given to registration data, a structure range such as “first line” or “first paragraph”, a character type range such as a numerical value or a string of alphabets, and a regular expression. Matching character strings etc.
  • FIG. 3 shows an example in which “first line” is defined.
  • the data search execution unit 15 of the search server 10 further implements a data search unit 20 and a data registration unit 30 and stores a search result 41, an index search result 42, a document data matching result 43, and a data search plan 44.
  • a storage area is secured.
  • the data registration unit 30 executes data registration and index generation processing when the processing request transmitted from the client 70 is a data registration request (update request). More specifically, an identifier corresponding to the registration data included in the registration request is generated, and the index creation unit 31 creates an index based on this identifier and the registration data. When the index creation process is completed, the data registration unit 30 transmits the registration data as document data 62 to the external storage device 50, and the corresponding identifier is transmitted to the AP 75 of the client.
  • the data search unit 20 executes a data search process according to the search plan determined by the search plan determination unit 22A.
  • the search process is executed by the index search unit 23 that executes a search using the index data 61 and the document data collation unit 24 that searches the actual data of the document data 62.
  • the search plan determination unit 22A determines a search plan that defines a search procedure to be executed by the data search unit 20 from the search request and index definition transmitted from the data search unit 20. Specifically, the search target range and the search condition are extracted by analyzing the search request, and the relevance ratio and the recall ratio of the index creation range to the search target range are calculated. For example, when the search request is “first paragraph ⁇ “ data mining ”AND“ analysis ” ⁇ ”, “first paragraph” is the search target range, and ““ data mining ”AND“ analysis ”” is the search condition. It is. From these and the definition information in the index definition file, the relevance ratio and recall ratio of each index creation range to the search target range are calculated. The precision and recall are calculated for all index definitions transmitted from the data search unit 20.
  • a “search plan” is created in accordance with the relationship between the calculated recall rate and relevance rate.
  • the “search plan” is information indicating a search procedure in the data search unit 20.
  • an RDBMS corresponds to an execution plan.
  • the created “search plan” is stored in the data search plan 44.
  • the means for confirming the execution plan varies depending on the implementation, many RDBMSs provide a command for confirming from the command line interface.
  • FIG. 4A to 4C show examples of respective search plans.
  • the search plan stores a search request and its processing procedure.
  • the processing procedure consists of a plurality of operations, and one operation includes an operation ID, an operation, a search target, and a used index name (blank when not used).
  • FIG. 4A is an example of a “noise removal type search plan”.
  • This plan is a search using the index with the highest relevance ratio for the index with the recall ratio of 100% (the state shown in FIG. 1B) based on the results of the recall ratio and the relevance ratio calculated by the search plan determination unit 22A.
  • This is a processing procedure.
  • search target range the search target range and the index creation range (A similar search plan is created for the “search target range 1” in FIG. 1C. More specifically, the index with the highest recall is selected, and the recall of that index is 100%. A search target range (“search target range 1” in FIG. 1C) is cut out, and search processing using the selected index is performed on the cut out range.
  • FIG. 4A shows an example in which index search is performed using INDEX_1 in operation 1, actual data is searched for a document that matches in operation 1 in operation 2, and the result of operation 2 is returned in operation 3. Yes.
  • FIG. 4B is an example of a “leakage supplement type search plan”. This plan is based on the recall rate and matching rate results calculated by the search plan determination unit 22A, and there is no index with a recall rate of 100% and the index with the matching rate of 100% (the state in FIG. 1A) This is a search processing procedure using an index having the highest recall rate.
  • an index search is performed using INDEX_2 in operation 1, actual data is searched for document data that did not match in operation 1 in operation 2, and the results of operations 1 and 2 are performed in operation 3. An example of returning is shown.
  • FIG. 4C is an example of a “document data collation type search plan”.
  • this plan from the results of the recall and precision calculated by the search plan determination unit 22A, there is no index of 100% and there is only an index with a recall of 0% for both the recall and precision.
  • the procedure of the search process in the case (when there is no overlapping range) is shown.
  • FIG. 4C shows an example in which actual data is searched in operation 1 and the result of operation 1 is returned in operation 2.
  • the search result 41 is a small area in which the search result searched by the data search unit 20 is stored, and the result stored in this area is a response to the search request from the client 70.
  • the index search result 42 is a storage area in which the search result by the index search unit 23 is temporarily stored. A part or all of the search results stored in this area are stored in the search results 41 as final search results by the data search unit 20 in accordance with various “search plans” described later. .
  • the document data collation result 43 is a storage area in which the retrieval result of the actual data retrieval process by the document data collation unit 24 is temporarily stored. A part or all of the search results stored in this area are stored in the search results 41 as final search results by the data search unit 20 in accordance with various “search plans” described later. .
  • FIG. 5 shows a processing flow of the data registration unit 30.
  • the data registration unit 30 receives a registration request from the client 70.
  • the data registration unit 30 acquires registration data from the registration request.
  • the registration data may be stored in the external storage device 50, and the storage location may be described in the registration request, or the registration data may be directly described in the registration request. Registration data may be registered one by one, or a plurality of registration data may be processed together.
  • the data registration unit 30 assigns an identifier to the acquired registration data.
  • the identifier is unique information for each data, and when the data identifier is designated, the corresponding data is uniquely determined.
  • the data registration unit 30 acquires the index definition file 63. Then, the following series of processing from S104 to S107 is repeated for the number of definitions described in the index definition file 63.
  • the data registration unit 30 transmits the registration data and the index definition to the index creation unit 31 and instructs the index creation. Detailed processing of the index creation unit will be described later with reference to FIG.
  • the data registration unit 30 receives a completion notification from the index creation unit 31 in S106.
  • the data registration unit 30 stores the registration data as document data 62 on the external storage device 50 in S108. Finally, in S109, the data registration unit 30 transmits the data identifier generated in S102 to the client 70, and ends this process.
  • FIG. 6 shows a processing flow of the index creation unit 31.
  • the index creation unit 31 receives the registration data and the index definition 63 from the data registration unit 30.
  • the index creation unit 31 extracts the index creation range and the index format from the index definition 63 (for example, the index creation range 67 and the index format 66 in FIG. 3).
  • the index creation unit 31 extracts a character string specified by the index creation range from the registered data.
  • an index is created in an index format designated for the extracted character string.
  • the created index is added to the corresponding index data on the external storage device 50.
  • a completion notification is transmitted to the data registration unit 30, and this process is terminated.
  • FIG. 7 shows a processing flow of the data search unit 20.
  • the data search unit 20 receives a search request from the client 70.
  • the data search unit 20 acquires the index definition file 63 from the external storage device 50.
  • the data search unit 20 transmits the search request and the definition information of the index definition file to the search plan determination unit 22A, and instructs the determination of the search plan. Details of the search plan determination process will be described later.
  • the data search unit 20 receives a completion notification from the search plan determination unit 22A in S303.
  • the data search unit 20 transmits a data search instruction to the search execution unit 21.
  • the data search unit 20 receives a set of data identifiers from the search execution unit 21 in S305. This set is a set of identifiers of document data that matches the search request.
  • the received set of data identifiers is transmitted to the client 70, and this process ends.
  • FIG. 8 shows a processing flow of the search plan determination unit 22A.
  • the search plan determination unit 22A receives the search request and the definition information of the index definition file 63 from the data search unit 20.
  • the search plan determination unit 22A analyzes the search request and extracts a search target range and a search condition. For example, if the search request is “first paragraph ⁇ “ data mining ”AND“ analysis ” ⁇ ”, the search target range is “first paragraph” and the search condition is ““ data mining ”AND“ analysis ””. It is.
  • the series of processing from S402 to S404 is repeated for the number of index definitions.
  • the search plan determination unit 22A calculates the relevance ratio and the recall ratio of the index creation range to the search target range.
  • the search plan determination unit 22A checks whether there is an index with a recall rate of 100%. When it is determined that there is an index with a recall rate of 100% (S405: Yes), the process proceeds to S407, and when it is determined that there is no index (S405: No), the process proceeds to S406.
  • the search plan determination unit 22A selects an index with the highest relevance rate from indexes with a recall rate of 100%. In S408, the search plan determination unit 22A creates a “noise removal type search plan” using the selected index. Thereafter, in S411, the search plan determination unit 22A adds the created search plan to the storage area of the data search plan 44, transmits a completion notification to the data search unit 21 in S412, and exits this flow.
  • the search plan determination unit 22A checks whether there is an index with a precision rate of 100%. When it is determined that there is an index with a matching rate of 100% (S406: Yes), the process proceeds to S409, and when it is determined that there is no index (S406: No), the process proceeds to S413. In S409, the search plan determination unit 22A selects an index having the highest recall rate among indexes having a precision rate of 100%. In S410, the search plan determination unit 22A creates a “leakage supplement type search plan” using the selected index. Thereafter, the process proceeds to S411 and S412. Exit this flow.
  • the search plan determination unit 22A checks whether the recall rate of all indexes is 0%. If the search plan determination unit 22A determines that the recall rate of all indexes is 0% (S413: Yes), the process proceeds to S414, and creates a “document data collation type search plan”. After that, the process proceeds to S411 and S412 to exit this flow.
  • the search plan determination unit 22A selects an index having a maximum recall rate that is greater than 0% of the recall rates checked in S413.
  • the index search target range is extracted so that the recall ratio of the selected index is 100%. For example, the search target range 1 shown in FIG. 1C is cut out.
  • the search plan determination unit 22A creates a “noise removal type search plan” using the selected index for the cut-out range (the search target range 1 in the upper right diagram in FIG. 1C), and then in S418. Then, the created search plan is stored in the storage area of the data search plan 44.
  • the search plan determination unit 22A sets the remaining search target range (search target range 2 in FIG. 1C) as a new search target range, and returns to the iterative process of S402.
  • FIG. 9 shows a processing flow of the search execution unit 21.
  • the search execution unit 21 first repeats a series of processes from S500 to S506 according to the operation ID for the number of operations stored in the data search plan 44.
  • S501 it is checked whether or not the operation of the data search plan 44 is an index search operation. If it is determined that the operation is an index search operation (S501: Yes), the process proceeds to S502, and the index search unit 23 is called.
  • the data search unit 22 proceeds to S503.
  • the search execution unit 21 checks whether the operation is a document data collation operation. When it is determined that the operation is a document data collation operation (S503: Yes), the process proceeds to S504, and the document data collation unit 24 is called. When determining that the operation is not a document data collation operation (S503: No), the data search unit 22 proceeds to S505, and adds the data identifier of the specified result to the storage area of the search result 41.
  • the search execution unit 21 transmits a set of data identifiers stored in the storage area of the search result 41, resets all the storage areas, and ends.
  • FIG. 10 shows a processing flow of the index search unit 23.
  • the index search unit 23 processes the search request using the index specified for the search plan operation.
  • it is checked whether or not “WITH” is specified for the operation. If the index search unit 23 determines in S601 that “WITH” is specified in the operation (S601: Yes), the index search unit 23 proceeds to S602, deletes the identifier of the document that does not match from the storage area of the index search result 42, The process ends.
  • FIG. 11 shows a flow of document data collation processing.
  • the document data matching unit 24 checks whether or not “WITH” is specified in the search plan operation. If it is determined that “WITH” is specified (S700: Yes), the process proceeds to S701. If it is determined that there is no specification (S700: No), the process proceeds to S702.
  • the document data collation unit 24 copies the data identifier stored in the storage area of the index search result 42 to the storage area of the document data collation result 43.
  • This step is a process for executing the “noise removal type search plan”.
  • step S ⁇ b> 702 the document data collation unit 24.
  • the data identifiers of all documents are stored in the storage area of the document data collation result 43.
  • step S ⁇ b> 703 the document data matching unit 24 checks whether “WITHOUT” is specified in the operation. If it is determined that “WITHOUT” is specified (S703: Yes), the process proceeds to S704. If it is determined that there is no specification (S703: No), the data identifier stored in the storage area of the index search result 44 is The same identifier is deleted from the document data collation result 44. This step is a process for executing the “leakage supplement type search plan”.
  • step S ⁇ b> 705 the document data matching unit 24 deletes the same identifier as the data identifier stored in the storage area of the search result 41 from the storage area of the document data matching result 44. This step is executed in order to omit processing relating to a document that has already been determined to be a correct document.
  • the document data matching unit 24 repeats a series of processes from S706 to S711 for the number of data identifiers stored in the storage area of the document data matching result 43.
  • step S ⁇ b> 707 the document data matching unit 24 extracts a character string in the search target range designated from the document data.
  • step S708 the document data collation unit 24 collates the extracted range with a search request, and in step S709, checks whether the search request matches. If it is determined that the search request is not met (S709: No), the process proceeds to S710. If it is determined that the search request is met (S709: Yes), the process proceeds to S711.
  • step S ⁇ b> 710 the document data matching unit 24 deletes the data identifier from the storage area of the document data matching result 43. When the repetitive processing from S706 to S711 ends, this flow is exited.
  • the search target range is different from the index creation range
  • the search is performed from the index creation range, and the search target range is determined using the result.
  • the search target range (the ellipse portion indicated by a dotted line in the figure) is divided into a plurality of index creation ranges X and Y (the half ellipse portion surrounded by a solid line and hatched in the figure). Assume a split configuration. Furthermore, the index creation range X is narrower than the index creation range Y.
  • One feature of the computer system 200 according to the second embodiment is that processing is prioritized over search processing using an index in which the index creation range is narrower.
  • the smaller the index creation range the smaller the number of key values and the shallower the tree hierarchy. For this reason, it can be said that there is a high possibility that search processing will be accelerated.
  • the position information stored in each index is smaller when the index is created in a narrow range. For this reason, it can be said that there is a high possibility that search processing will be accelerated.
  • FIG. 13 partially shows the configuration of the computer system 200 (search server 10). The main difference is that the search plan determination unit 22B of the search server 10 includes a search plan optimization unit 201.
  • the search plan determining unit 22 executes processing for rearranging the operation order of the “search plan” created in the same manner as in the first embodiment. Specifically, the “search plan” created by the search plan determination unit 22 is rearranged so as to be executed in preference to a search using a search index having a smaller index creation range in the index definition. It is like that.
  • FIG. 14 shows the flow of processing of the search plan determination unit 22B in the second embodiment.
  • processing steps are added between S411 and S412 in the process of the search plan determination unit 22A (FIG. 8) in the first embodiment, and other processes are the same as those in the first embodiment. is there.
  • the additional portion will be described (for convenience, FIG. 14 also describes the processing of S411 and S412 of FIG. 8).
  • the search plan determination unit 22B adds the created search plan to the storage area of the data search plan 44.
  • the search plan determination unit 22B transmits the definition information of the index definition file 43 to the search plan optimization unit 201, and instructs the search plan optimization.
  • an optimization process is executed by the search plan optimization unit 201.
  • the search plan determination unit 22B receives a process completion notification.
  • the search plan determination unit 22B transmits a process completion notification to the data search unit 20, and ends the process.
  • FIG. 15 shows the processing flow of the search plan optimization unit 201.
  • the search plan optimization unit 201 starts processing in response to a search plan optimization instruction from the search plan determination unit 22B. At this time, a plurality of search plans are stored in the storage area of the data search plan 44.
  • the search plan optimization unit 201 receives the index definition file 63 from the search plan determination unit 22B. Then, the search plan optimization unit 201 repeats a series of processes from S901 to S904 for the number of search plans stored in the storage area of the data search plan 44.
  • the search plan optimization unit 201 acquires the use index creation range (eg, the creation range 67 in FIG. 3) stored in the search plan from the definition information in the index definition file.
  • the use index creation range eg, the creation range 67 in FIG.
  • the search plan optimization unit 201 acquires the length of the index creation range.
  • “the length of the index creation range” indicates the text length of the portion designated as the index creation range on the document data.
  • they are obtained from document data as values such as byte length and number of characters.
  • the length may be obtained from sample data randomly selected from document data, or may be the average length of all document data.
  • step S905 the search plan optimization unit 201 sorts the search plans stored in the storage area of the data search plan 44 in ascending order according to the length of the index creation range. Finally, in S906, the search plan optimization unit 201 transmits a completion notification to the search plan determination unit 22B and ends.
  • the data search unit 20 calls the search execution unit 21 and processes the search plans in the order in which the search plan optimization unit 201 sorts. Then, the search execution unit 21 does not execute the process for the document determined as the correct document in the previously executed search plan in the subsequent search plans.
  • the search process is started from the index created in a narrower range, and the search is performed in the subsequent index using the result.
  • An index created in a narrower range is more likely to take a shorter search time, so checking from that index increases the possibility of the search being completed at high speed.
  • index characteristics There are the following types of index characteristics. “Character string search index” using n-gram, suffix array, etc. described above, specific key character strings (character strings with consecutive numerical values, character strings that match regular expressions, chemical formulas, English words, etc.) are extracted. “Key search index” such as B-tree registered in this way, “filtering index” that expresses the presence / absence of a character string by “1” and “0” of a bitmap like a character component table, etc. 3).
  • “Filtering index” can be searched at high speed with search noise. Therefore, noise is removed from the search result by the filtering index using a character string search index or actual data. As a result, the detailed search process can be concentrated only on the documents narrowed down by the filtering index, and a high-speed search can be realized.
  • the “key search index” can search the registered key with high accuracy, so if the search request includes a character string of the same type as the registered key character string, the key search index is searched for the character string part. Search for other character strings using the character string search index or actual data.
  • an n-gram index and a B-tree in which a character string with a continuous numerical value is registered are created, and when “10 cm” is designated as a search request, The “10” portion of the search request is searched by B-tree, the “cm” portion is searched by the n-gram index, and a document in which those partial character strings are consecutive is searched.
  • the configuration of the computer system 300 is basically the same as that of the first and second embodiments, but the search plan determination unit 22C is the main difference.
  • FIG. 16 schematically shows the configuration of the data search server 10.
  • the search plan determination unit 22C includes a multiple index planning unit 301.
  • a “search plan” is executed so as to preferentially execute a search using an index that enables more efficient processing based on the relationship between index characteristics and a search character string included in a search request. Are to be rearranged.
  • FIG. 17 shows an example of a data search plan created by the search plan determination unit 22C in the third embodiment.
  • the search plan stores a search request and its processing procedure.
  • the processing procedure is composed of a plurality of operations, and one operation includes an operation ID, an operation, a search target, a used index name (blank if not used), and an index type.
  • FIG. 17A shows an example of a search plan using “filtering index”.
  • search is performed using bitmap index INDEX1, which is a filtering index.
  • a search is performed using the suffix array INDEX2 which is a character string search index for the document that matches in step 1.
  • the result is returned. It is expressed to do.
  • FIG. 17B shows an example of a search plan using “key index”.
  • operation 1 “10” is searched using INDEX3 of the B-tree that is the key search index, and in operation 2, “INDEX2” of the suffix array that is the character string search index is searched for the document that matched in operation 1. It shows that searching for cm ′′ and returning the result where their appearance positions are adjacent.
  • the above is the configuration of the computer system 300.
  • FIG. 18 shows a processing flow of the search plan determination unit 22C.
  • the processing of the search plan determination unit 23 is based on the processing of the search plan determination unit 22A of the first embodiment (FIG. 8). Steps S1000 to S1002 and S1003 to S1005 are added to the different parts. Is a point.
  • the adding step when there are a plurality of selected indexes, the indexes to be used and their order are determined according to the requirements of the search request and the characteristics of the indexes. In particular, additional portions will be described, and detailed descriptions of overlapping portions will be omitted.
  • the search plan determination unit 22C checks whether there is an index with a recall rate of 100% from the relevance rate and the recall rate of the index creation range to the search target range calculated in the processing of S400 to S404. If there is an index with a recall rate of 100% (S405: Yes), the process proceeds to S407. If there is no index (S405: No), the process proceeds to S406.
  • the search plan determination unit 22C selects an index with the highest relevance ratio among indexes with a recall ratio of 100%.
  • the search plan determination unit 22C checks whether or not there are a plurality of indexes having the highest precision, and if there are a plurality (S1000: Yes), the process proceeds to S1001, and if there is one (S1000: No), the process proceeds to S408, and a “noise removal type” search plan is created.
  • the search plan determination unit 22C transmits the selected index definition and the search request to the multiple index planning unit 301, and then causes the multiple index planning unit 301 to execute search plan creation processing in S1002. Detailed processing of the multiple index planning unit 301 will be described later.
  • S405 when there is no index with a recall rate of 100% (S405: No), the search plan determination unit 22C checks whether there is an index with a match rate of 100% in S406. If there is no index with a matching rate of 100% (S406: No), the process proceeds to S413. If there is an index (S406: Yes), the process proceeds to S1003.
  • the search plan determination unit 22C checks whether or not there are a plurality of indexes having the highest precision, and if there are a plurality (S1003: Yes), the process proceeds to S1004 and if there is one (S1003: No), the process proceeds to S410, and a “leakage supplement type” search plan is created.
  • the search plan determination unit 22C transmits the selected index definition and the search request to the multiple index planning unit 301, and then causes the multiple index planning unit 301 to execute search plan creation processing in S1005. Detailed processing of the multiple index planning unit 301 will be described later.
  • FIG. 19 shows a process flow of the multiple index planning unit 301.
  • the multiple index planning unit 301 receives the index definitions and search requests for the multiple indexes from the search plan determination unit 22C.
  • the multiple index planning unit 301 checks whether a key search index exists in the received index definition. If it is determined that the key search index exists (S1101: Yes), the process proceeds to S1102, and if it is determined that there is no key search index (S1101: No), the process proceeds to S1108.
  • the multiple-index planning unit 301 checks whether or not the search request includes a character string (A) of the same type as the key character string registered in the “key search index”. If it is determined that it is not included (S1102: No), the process proceeds to S1108. If it is determined that it is included (S1102: Yes), the process proceeds to S1103. In step S ⁇ b> 1103, the multiple index planning unit 301 generates an operation for searching for the character string (A) using the “key search index”.
  • the multiple-index planning unit 301 checks whether a character string (B) other than the character string (A) is included in the search request. If it is determined that it is not included (S1104: No), the process proceeds to S1114. If it is determined that it is included (S1104: Yes), the process proceeds to S1105. In step S1105, the multiple-index planning unit 301 checks whether a “character string search index” exists. If it is determined that the “character string search index” exists (S1105: Yes), the process proceeds to S1106, and if it is determined that it does not exist (S1105: No), the process proceeds to S1107.
  • step S ⁇ b> 1106 the multiple-index planning unit 301 generates an operation for searching for the character string (B) using the “character string search index”.
  • step S1107 the multiple-index planning unit 301 generates an operation for searching for the entire character string using document data, and the process advances to step S1114. This operation is an operation for extracting a position where the character string (A) and the character string (B) are adjacent to each other.
  • the multiple index planning unit 301 checks whether or not a “filtering index” exists. When it is determined that the “filtering index” does not exist (S1108: No), the process proceeds to S1109, and when it is determined that it exists (S1108: Yes), the process proceeds to S1110. In step S ⁇ b> 1109, the multiple index planning unit 301 generates a search operation using the “character string search index” selected based on a predetermined criterion. As the predetermined standard, an index with a low processing cost may be selected, or may be selected at random. Then, it progresses to S1114.
  • a predetermined criterion As the predetermined standard, an index with a low processing cost may be selected, or may be selected at random.
  • the multiple-index planning unit 301 In S1110, the multiple-index planning unit 301 generates an operation for searching using the “filtering index”. In step S1111, the multiple index planning unit 301 checks whether a “character string search index” exists. If it is determined that “character string search index” exists (S1111: Yes), the process proceeds to S1112 to generate an operation for searching using “character string search index”. If it is determined in S1111 that the “character string search index” does not exist (S1111: No), the process proceeds to S1113, an operation for searching using document data is generated, and then the process proceeds to S1114.
  • the multiple index planning unit 301 transmits the search plan to the search plan determination unit 22C, and exits this flow.
  • the computer system 300 when a plurality of indexes having different characteristics are created in the same range, the index to be used and its order are determined according to the requirements of the search request and the characteristics of the index, and the search is performed. Do. As shown in the present embodiment, high-precision and high-speed search processing can be performed by optimizing to use a “key search index” that matches a specific key character string or a high-speed “filtering index” preferentially. It can be realized.
  • the above is the computer system 300 of the third embodiment.
  • each of the above-described configurations, functions, processing units, processes, and the like may be realized in hardware by designing a part or all of them with, for example, an integrated circuit, or by cooperation of software and CPU.
  • the function may be realized.
  • Information such as programs, tables, and files for realizing each function can be stored in a recording device such as a memory, a hard disk, an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.
  • control lines and information lines indicate what is considered necessary for the explanation, and not all the control lines and information lines on the product are necessarily shown. Actually, it may be considered that almost all the components are connected to each other.

Abstract

 データベース検索において、インデクス検索を効率的に利用し、実データ検索の処理量を削減する。計算機が、データ群に対して作成された検索インデクスのインデクス作成範囲を示す情報を含むインデクス定義を格納する記憶部と、制御部とを有し、制御部は、データ群に対する検索要求に含まれる検索対象範囲と、インデクス定義とから検索対象範囲と前記インデクス作成範囲の何れか一方の少なくとも一部の包含関係を検出するものである。包含関係を検出した場合、制御部は、検索要求に対して検索インデクスを用いたインデクス検索を先に実行し、その後インデクス検索で検索要求の成否が確定したデータを除く文書データについて、検索対象範囲に実データ検索を実行し、検索結果を出力するものである。

Description

計算機、記録媒体及びデータ検索方法
 本発明は、計算機、記録媒体及びデータ検索方法に係り、特に、データ群から所望のデータを抽出する計算機、該処理を実行させるプログラムを格納する非一時的な記録媒体及びデータ検索方法に関する。
 HDDを始めとする記憶デバイスの汎用化や大容量化は、今まで破棄してきた大量データの保持を可能とするようになってきた。近年では、保持した大量データを分析に用い、ビジネスに利用・活用することも行われている。例えば、構造化されたログデータの分析、ログデータ中の非構造部分の分析並びにショートメッセージのようなテキストデータの分析など多様な分析が試行錯誤されている。
 同様に、記憶デバイスの汎用化や大容量化は、DBインデクス容量の大幅な増加を許容する。DBインデクスの増加は、多種多様な分析の対象となる大量データを適切且つ高速に処理するために、同一データに特性が異なる複数のインデクスを作成したり、複数の範囲にインデクスを作成したりすることの実現を可能とした。
 インデクス形式として、「文字列検索インデクス」や「B-treeインデクス」を始めとして種々のインデクスが知られている。
  「文字列検索インデクス」は、キーとなる部分文字列と、その部分文字列のデータにおける出現位置とを対応付けて格納する形式である。部分文字列は、単語、n-gram、又はサフィクスアレイ(接尾辞配列)といった文字列検索用の単位で、テキストから抽出される。テキストから単語を抽出するには、形態素解析などの手法がとられる。また、テキストからn-gramを抽出する方法として、例えば、特許文献2には、機械的にn文字の連続する文字列を抽出する技術が開示されている。また、例えば非特許文献2には、テキストからサフィクスアレイを抽出する技術が開示されている。
 「B-treeインデクス」は、例えば、木構造のインデクスツリー(索引木)により検索を高速化するアルゴリズムである。例えば、非特許文献1には、上位ページの最上位のルートページから検索していき、最下位のリーフページで、検索対象データの出現データ情報を取得する技術が開示されている。
 このように、テキストデータを始め、データに複数のインデクスを作成するようになると、処理するインデクスや処理順序を選択する必要がある。即ち検索手順の最適化である。従来から、処理インデクスの選択技術としてRDBMSの最適化技術が知られている。図20に、RDBMSの処理例を示す。図20は、従業員のID、氏名、入社年月日及び所属等を管理する従業員テーブル400の例を示す。従業員テーブルに対し、社員番号カラム401、氏名カラム402といったカラム単位に夫々インデクス451、452・・・が作成される。検索時には、検索要求に含まれる検索条件500によって、検索対象範囲として指定されたカラムと一致する範囲のインデクスが使用される。ここで、検索対象範囲として指定されたカラムと一致する範囲のインデクスが存在しなければ、そのカラムの実データが照合されるようになっている。
 例えば、検索条件が「入社年月日が2000年3月31日より前のBBB課所属」の社員データであるとすると、まず入社年月日カラム403のインデクス453を用いて、2000年3月31日より前の入社年月日データが検索される。そしてヒットした行を対象として、所属カラム404の実データを照合し、BBB課である行を特定する。
  また、要求が複数条件の組合せによる検索である場合、キー選択率や照合コストを指針として処理順序が決定される等の方式が用いられることもある。
 特許文献1には、最適化技術として「検索条件式に係わる複数のインデクスの読込コストをキー選択率に従って評価することで、それらのインデクスの中から最適なものを選択して、その選択したインデクスを使ってデータベースからレコードを読み込んで検索処理を実行するデータベース検索処理方式に関し、最適なインデクスを選択できるようにすることを目的とし、キー選択率の算出対象となるインデクスの管理するレコードの散らばりを示す稠密度を検出する検出手段と、検出手段の検出する稠密度を使ってキー選択率を補正する補正手段と、を備え、補正手段の補正するキー選択率に従って、レコードの読み込みに使用するインデクスを決定する」ことが開示されている。
特開平7-311699号公報 特開平1-035627号公報。
特開平4-274557号公報
Transaction Processing: Concepts and Techniques(Jim Gray ,Andreas Reuter)(日本語著、トランザクション処理〈下〉―概念と技法 日経BP社(2001/10))15.4.1 B-trees:The Basic Idea Manber, U. and Myers, G.: Suffix arrays: A new method for on-line string searches, in 1st ACM-SIAM, Symposium on Discrete Algorithms, pp. 319-327(1990)
 ところで、テキストデータは明確なスキーマが無いため、様々な範囲をインデクス作成対象や検索対象として指定可能である。特に、大量データの分析では、分析手法は試行錯誤で行われることから、要求される処理をインデクス作成時に予測することは困難である。このため作成したインデクスが検索要求に対して最適なものにならない虞がある。従来の最適化方式では使用できるインデクスが無いケースも十分に有り、この場合には、実データの照合が必要となってしまう(所謂、全文検索。)。処理対象とするデータが増加すればするほど、実データを照合する処理の負荷は性能面に大きな影響を及ぼす。
 上記課題を解決するために、例えば、請求の範囲に記載の構成を採用する。即ちデータ群に対して作成された検索インデクスのインデクス作成範囲を示す情報を含むインデクス定義を格納する記憶部と、前記データ群に対する検索要求に含まれる検索対象範囲と、前記インデクス定義とから前記検索対象範囲と前記インデクス作成範囲の何れか一方の少なくとも一部の包含関係を検出し、前記包含関係の検により、前記検索要求に対して、前記検索インデクスを用いたインデクス検索を実行し、その後、前記検索要求に対して、前記インデクス検索で検索要求の成否が確定したデータを除く文書データについて、前記検索対象範囲に実データ検索を実行し、前記検索要求に対する検索結果を出力する制御部と、を有する計算機である。
 本発明の一側面によれば、文書データ検索によって処理する範囲が削減された効率的な検索処理を実現することができる
  上述した以外の課題、構成及び効果は、以下の実施形態の説明により明らかにされる。
本発明を適用した一例である第1実施形態における計算機システムの原理を説明する概念図である。 本発明を適用した一例である第1実施形態における計算機システムの原理を説明する概念図である。 本発明を適用した一例である第1実施形態における計算機システムの原理を説明する概念図である。 第1実施形態における計算機システムの構成を示す模式図である。 第1実施形態における計算機のインデクス定義ファイルの一例を示す模式図である。 第1実施形態における「漏れ補完型」の検索プランの一例を示す模式図である。 第1実施形態における「ノイズ除去型」の検索プランの一例を示す模式図である。 第1実施形態における「文書データ照合型」の検索プランの一例を示す模式図である。 第1実施形態におけるデータ登録部の処理の流れを示すフロー図である。 第1実施形態におけるインデクス作成部の処理の流れを示すフロー図である。 第1実施形態におけるデータ検索部の処理の流れを示すフロー図である。 第1実施形態における検索プラン決定部の処理の流れを示すフロー図である。 第1実施形態における検索部実行部の処理の流れを示すフロー図である。 第1実施形態におけるインデクス検索部の処理の流れを示すフロー図である。 第1実施形態における文書データ照合部の処理の流れを示すフロー図である。 本発明を適用した一例である第2実施形態における計算機システムの原理を説明する概念図である 第2実施形態における計算機システムの構成を示す模式図である。 第2実施形態における検索プラン決定部の処理の流れを示すフロー図である。 第1実施形態における検索プラン最適化部の処理の流れを示すフロー図である。 第3実施形態における計算機システムの構成を示す模式図である。 第3実施形態における「フィルタリングインデクス」を利用した検索プランの一例を示す模式図である。 第3実施形態における「キーインデクス」を利用した検索プランの一例を示す模式図である。 第3実施形態における検索プラン決定部の処理の流れを示すフロー図である。 第3実施形態における複数インデクスプランニング部の処理の流れを示すフロー図である。 従来のRDBMSの処理の概要を示す模式図である。
 以下、図面を用いて、本発明を実施するための形態について説明する。
  〔第1実施形態〕
  先ず、本実施形態の原理概要について、図1に示す模式図を用いて説明する。
  本実施形態の計算機システム100は、先ずインデクス作成範囲から検索処理を実行し、その結果を利用して検索対象範囲の検索処理を実行することを特徴の1つとする。また、図1A及び図1Bに示すように、インデクス作成範囲と検索対象範囲の包含関係が異なる場合に、検索処理の手順が異なる点が特徴の1つである。
 また、本実施形態において、インデクス作成範囲の中に検索対象範囲が含まれる割合をそのインデクスの検索対象範囲に対する適合率、検索対象範囲の中にインデクス作成範囲が含まれる割合をそのインデクスの検索対象範囲に対する再現率と定義するものとする。  なお、図1A及び図1Bにおいて、実線の矩形は計算機システム100が保持する全データ範囲、その内側の点線で示す楕円部分の内側は、クライアント等からの検索要求が要求するデータ検索範囲、更に内側の実線で示す楕円部分の内側はインデクスが貼られた範囲を示すものとする。
 図1Aは、検索要求の検索対象範囲がインデクス作成範囲よりも広いという包含関係にある場合の例である。この場合の処理手順は以下となる。なお、図中の矢印は、検索を行う範囲の順番を示す。
  先ず、計算機は、インデクスを利用してインデクス作成範囲のデータを検索する(ステップA1)。この検索で条件に合致した文書データは正解文書と決まる。
  次いで、計算機は、ステップA1で条件に合致しなかった文書データに対して、検索対象範囲を実データで検索する(ステップA2)。即ち検索対象範囲からインデクス作成範囲が除かれた文書データについて、実データ検索(文書データ検索)を行う。
  最後に、計算機は、ステップA1とステップA2の検索処理において、検索条件に合致した文書データをマージして検索結果とする。
 より具体的には、複数行からなるテキストデータの「先頭1行」にインデクスが作成されており、「先頭1段落」が検索対象として指定された場合が考えられる。まず「先頭1行」がインデクスで検索される。しかし、この結果には検索漏れが存在する場合もある。そのため条件に合致しなかった文書(インデクス検索で、条件に合致しなかった段落の文書データ)に対して、「先頭1段落」が実データで検索される。最後に、インデクス検索と実データ検索で合致した文書データがマージされ、検索結果となる。
 これに対し、図1Bは、検索要求の検索対象範囲がインデクス作成範囲よりも狭いという包含関係にある場合の例である。この場合の処理手順は以下となる。
  まず、計算機は、インデクスを利用して、インデクス作成範囲を検索する(ステップB1)。この検索処理によって条件に合致した文書データには、検索ノイズが存在することになる。
  次いで、計算機は、ステップB1で条件に合致した文書データに対し、検索対象範囲を実データで検索する(ステップB2)。即ち検索対象範囲から検索インデクスの作成範囲が除かれた範囲に文書データ検索を実行する。
  そして、計算機は、ステップB2で合致した文書を検索結果とする。
 より具体的には、「先頭1段落」にインデクスが作成されており、「先頭1行」が検索対象として指定された場合が考えられる。まず「先頭1段落」をインデクスで検索する。しかしこの結果には検索ノイズが存在する。そのため合致した文書データに対して、「先頭1行」を実データで検索する。ここで合致した文書データを検索結果とするようになっている。
 図1A及び図1Bの包含関係は、上述の定義に照らすと、図1Aは、インデクス検索で合致した文書データは全て正解文書となる適合率100%のインデクスとなり、図1Bは、インデクス検索で全ての正解文書を含んだ再現率100%のインデクスであると言える。即ち適合率100%のインデクスとは、検索対象に対して検索ノイズの無いインデクスであり、再現率100%のインデクスとは、検索対象に対して検索漏れの無いインデクスである。
 また、検索対象範囲とインデクス作成範囲が一部重なる関係となる場合もある。
  図1Cに、両者の一部が重なる場合の例を示す。この場合の処理は以下の手順となる。  先ず、計算機は、インデクス作成範囲のうち検索対処範囲に包含される範囲(検索対象範囲1)と、検索対処範囲のうち、インデクス作成範囲との重複部分を除いた範囲(検索対象範囲2)とに対象を分割し処理する(ステップC1)。
  計算機は、包含関係を満たす範囲(検索対象範囲1/点線の内側)に対しては、上述の図1Bの処理を行い、それ以外の範囲(検索対象範囲2)に対しては、別のインデクスとの関係を調べ、再帰的に処理を繰り返す(ステップC2)。
 計算機は、最終的にどのインデクスとも重ならない検索対象範囲が残った場合に、実データを検索する(ステップC3)。
 この方法によれば、作成されているインデクスを最大限に利用して、実データを検索する範囲を削減することができる。
  以上が、本実施形態の原理である。
 以下に、本実施形態の詳細な説明をする。
  図2に、第1実施形態における計算機システム100の構成を模式的に示す。計算機システム100は、1以上のクライアント70と、検索サーバ10と、外部記憶装置とが通信線80(有線及び/又は無線のネットワーク網等を含む。)を介して通信可能に接続されてなる。
 クライアント70には、CPU71、主記憶72、補助記憶73及び入出力部74を有する汎用のサーバ、PC又は通信端末を適用するものとする。CPU71とプログラムとの協働によって、主記憶部75に検索要求機能を有するアプリケーションプログラム(AP)75が実現され、検索サーバ10に対して所定のデータ検索要求を送信し、その結果を受信するようになっている。
 検索サーバ10には、CPU11、主記憶12、補助記憶13及び種々の外部通信装置(不図示)を有する汎用のサーバマシンを適用するものとする。CPU11とプログラムとの協働によって、主記憶部12にデータ検索実行部15が実現され、クライアント70からのデータ検索処理を実行する様になっている。詳細は後述する。
 外部記憶装置50には、HDD、SSD及び/又は磁気テープといった記憶デバイスを有するストレージマシンを適用するものとする。外部記憶装置50には、データ検索に使用する補助情報であるインデクス定義ファイル63、実データである文書データ62及びインデクスデータ61が格納されており、検索サーバ10からのデータ取得要求に従い、所定のデータを応答するようになっている。インデクスデータ61内の個々のインデクス1、2、3・・・は、インデクス定義ファイル63の定義情報と1対1で対応付けられている。
 図3に、インデクス定義ファイル63の定義情報の例を模式的に示す。定義情報には、作成するインデクスの名称を示すインデクス名称65(”CREATE INDEX”)、インデクス形式66(”USING TYPE”)及びインデクス作成範囲67(“ON”)が含まれる。本実施形態では、インデクス名称65として、「INDEX1」、インデクス形式66として「NGRAM」、インデクス作成範囲67として「先頭1行」が定義された例を示している。
  また、インデクス形式66としては、B-treeや各種文字列検索インデクスの指定も可能である。
 インデクス作成範囲67は、例えば、登録データに付与されている属性情報、「先頭1行」又は「先頭1段落」といった構造範囲や、数値やアルファベットの連続する文字列といった文字種範囲や、正規表現に適合する文字列等である。図3では、「先頭1行」が定義されている例を示す。
 図2に戻り、検索サーバ10について詳細に説明する。
  検索サーバ10のデータ検索実行部15には、更に,データ検索部20及びデータ登録部30が実現されると共に検索結果41、インデクス検索結果42、文書データ照合結果43及びデータ検索プラン44を格納する記憶領域が確保される。
 データ登録部30では、クライアント70から送信された処理要求がデータの登録要求(更新要求)である場合に、データ登録及びインデクス生成処理が実行されるようになっている。より具体的には、登録要求に含まれる登録データに対応する識別子が生成され、インデクス作成部31で、この識別子と登録データに基づいてインデクスが作成されるようになっている。インデクス作成の処理が完了すると、データ登録部30では、登録データが文書データ62にとして外部記憶装置50に送信され、対応する識別子がクライアントのAP75に送信されるようになっている。
 データ検索部20では、クライアント70からの検索要求に対し、検索プラン決定部22Aで決定された検索プランに応じてデータの検索処理が実行される。検索処理は、インデクスデータ61を用いた検索を実行するインデクス検索部23と、文書データ62の実データ検索を行う文書データ照合部24とによって実行される。
 検索プラン決定部22Aでは、データ検索部20から送信された検索要求とインデクス定義とから、データ検索部20が実行する検索手順を定めた検索プランが決定される。具体的には、検索要求の解析によって検索対象範囲と検索条件が抽出され、インデクス作成範囲の検索対象範囲に対する適合率と、再現率とが算出される。例えば、検索要求が、「先頭1段落{“データマイニング” AND “分析”}」である場合、「先頭1段落」が検索対象範囲であり、「“データマイニング” AND “分析”」が検索条件である。これらとインデクス定義ファイルの定義情報とから、各インデクス作成範囲の検索対象範囲に対する適合率と再現率が算出される。適合率と再現率は、データ検索部20から送信されたインデクス定義の全てについて算出される。
 その後、検索プラン決定部22Aでは、算出された再現率と適合率の関係に応じて、「検索プラン」が作成されるようになっている。「検索プラン」とは、データ検索部20における検索手順を示す情報である。例えば、RDBMSであれば実行計画に相当するものである。作成された「検索プラン」は、データ検索プラン44に格納される。「検索プラン」としては、『ノイズ除去型検索プラン』、『漏れ補完型検索プラン』及び『文書データ照合型検索プラン』がある。実行計画を確認する手段は実装によって異なるが、多くのRDBMSがコマンドラインのインタフェースから確認するためのコマンドを用意している。
 図4A~Cに、夫々の検索プランの例を示す。検索プランには、検索要求とその処理手順が格納されている。処理手順は複数の操作からなり、1つの操作は操作ID、操作、検索対象および使用インデクス名称(使用しない場合は空欄)を含む。
  図4Aは、『ノイズ除去型検索プラン』の例である。本プランは、検索プラン決定部22Aで算出された再現率と適合率の結果から、再現率が100%のインデクス(図1Bの状態)について、その中で最も適合率が高いインデクスを用いた検索処理の手順である。  また、再現率と適合率のいずれもで、100%のインデクスが存在しないが、再現率が0%より大きいインデクスが存在する場合(図1Cの状態)にも、検索対象範囲と、インデクス作成範囲の重複部分(図1Cの「検索対象範囲1」について、同様な検索プランが作成される。より具体的には、最も再現率が高いインデクスが選択され、そのインデクスの再現率が100%となる検索対象範囲(図1Cの「検索対象範囲1」)が切り出される。そして、切り出された範囲に対して、選択されたインデクスを用いた検索処理が行われる事になる。
 図4Aでは、操作1でINDEX_1を用いてインデクス検索を行い、操作2において操作1で合致した文書を対象に実データの検索を行い、操作3で操作2の結果を返却する例が示されている。
 図4Bは、『漏れ補完型検索プラン』の例である。本プランは、検索プラン決定部22Aで算出された再現率と適合率結果から、再現率100%のインデクスが存在せず、適合率が100%のインデクス(図1Aの状態)について、その内で最も再現率が高いインデクスを用いた検索処理の手順である。
  図4Bでは、操作1でINDEX_2を用いてインデクス検索を行い、操作2で、操作1で合致しなかった文書データを対象に実データの検索を行い、操作3で、操作1と操作2の結果を返却する例が示されている。
 図4Cは、『文書データ照合型検索プラン』の例である。本プランは、検索プラン決定部22Aで算出された再現率と適合率の結果から、再現率と適合率のいずれもで、100%のインデクスが存在せず且つ再現率が0%のインデクスしかない場合(重複範囲が無い場合)の検索処理の手順を示す。
  図4Cでは、操作1で実データの検索を行い、操作2で操作1の結果を返却する例が示されている。
 図2に戻り、検索結果41は、データ検索部20によって、検索処理された検索結果が格納される小域であり、本領域に格納された結果がクライアント70からの検索要求に対する応答となる。
 インデクス検索結果42は、インデクス検索部23による検索結果が一時的に格納される格納領域である。本領域に格納された検索結果は、後述する各種の「検索プラン」に応じて、データ検索部20によって、その一部又は全部が最終的な検索結果として検索結果41に格納されることとなる。
 文書データ照合結果43は、文書データ照合部24による実データ検索処理の検索結果が一時的に格納される格納領域である。本領域に格納された検索結果は、後述する各種の「検索プラン」に応じて、データ検索部20によって、その一部又は全部が最終的な検索結果として検索結果41に格納されることとなる。
 以上が、計算機システム100の構成である。
  次に、計算機システム100の各機能部の処理の流れについて、図5~図11に示すフロー図を用いて説明する。
  図5に、データ登録部30の処理の流れを示す。
  まず、S100で、データ登録部30は、クライアント70から登録要求を受信する。  S101で、データ登録部30は、登録要求から登録データを取得する。なお、登録データを外部記憶装置50に格納し、登録要求にその格納先を記載するようにしても、登録要求の中に登録データを直接記載するようにしてもかまわない。また登録データは1件ずつ登録しても、複数件まとめて処理するようにしてもよい。
 S102で、データ登録部30は、取得した登録データに識別子を付与する。識別子はデータ毎に固有の情報であり、データ識別子を指定すると対応するデータが一意に決まるものである。
  S103で、データ登録部30は、インデクス定義ファイル63を取得する。そしてインデクス定義ファイル63に記載されている定義数分、以下のS104からS107の一連の処理を繰り返す。
 繰り返し処理の中では、S105で、データ登録部30は、インデクス作成部31に登録データとインデクスの定義を送信し、インデクス作成を指示する。インデクス作成部の詳細な処理については、図6を用いて後述する。
  インデクス作成部31によるインデクス作成処理が終わると、S106で、データ登録部30は、インデクス作成部31から完了通知を受信する。
 S104からS107の繰り返し処理が終了すると、S108で、データ登録部30は、登録データを外部記憶装置50上に、文書データ62として格納する。
  最後に、S109で、データ登録部30は、クライアント70に、S102で生成したデータ識別子を送信し、本処理を終了する。
 図6に、インデクス作成部31の処理の流れを示す。
  S200で、インデクス作成部31は、データ登録部30から登録データとインデクス定義63を受信する。
  S201で、インデクス作成部31は、インデクス定義63からインデクス作成範囲とインデクス形式を抽出する(例えば、図3のインデクス作成範囲67とインデクス形式66)。
 S202で、インデクス作成部31は、登録データからインデクス作成範囲で指定される文字列を抽出する。
  S203で、抽出した文字列を対象に指定されたインデクス形式でインデクスを作成する。
  S204で、作成したインデクスを外部記憶装置50上の対応するインデクスデータに追加する。最後にS205で、データ登録部30に完了通知を送信して本処理を終了する。
 図7に、データ検索部20の処理の流れを示す。
  S300で、データ検索部20は、クライアント70から検索要求を受信する。
  S301で、データ検索部20は、外部記憶装置50からインデクス定義ファイル63を取得する。
  S302で、データ検索部20は、検索プラン決定部22Aに検索要求とインデクス定義ファイルの定義情報を送信し、検索プランの決定を指示する。検索プランの決定処理の詳細は後述する。
 検索プラン決定部22Aによる検索プラン決定処理が終わると、S303で、データ検索部20は、検索プラン決定部22Aから完了通知を受信する。
  S304で、データ検索部20は、検索実行部21にデータ検索指示を送信する。
  検索実行部21によるデータ検索処理が終わると、S305で、データ検索部20は、検索実行部21からデータ識別子の集合を受信する。この集合は検索要求に合致した文書データの識別子の集合である。
  最後に、S306で、受信したデータ識別子の集合をクライアント70に送信し、本処理を終了する。
 図8に、検索プラン決定部22Aの処理の流れを示す。
  S400で、検索プラン決定部22Aは、データ検索部20から検索要求とインデクス定義ファイル63の定義情報を受信する。
  S401で、検索プラン決定部22Aは、検索要求を解析し、検索対象範囲と検索条件を抽出する。例えば、検索要求が「先頭1段落{“データマイニング” AND “分析”}」であるとすると、検索対象範囲が「先頭1段落」であり、検索条件が「“データマイニング” AND “分析”」である。次にインデクス定義数分、S402~S404の一連の処理を繰り返す。
 繰り返し処理において、S403で、検索プラン決定部22Aは、インデクス作成範囲の検索対象範囲に対する適合率と再現率を算出する。
  S402~S404の繰り返し処理が終了すると、S405で、検索プラン決定部22Aは、再現率が100%のインデクスが存在するか否かをチェックする。再現率が100%のインデクスがあると判断した場合(S405:Yes)、S407に進み、無いと判断する場合(S405:No)、S406に進む。
 S407で、検索プラン決定部22Aは、再現率100%のインデクスの中から最も適合率が高いインデクスを選択する。
  S408で、検索プラン決定部22Aは、選択したインデクスを用いた「ノイズ除去型の検索プラン」を作成する。その後、S411で、検索プラン決定部22Aは、作成した検索プランをデータ検索プラン44の格納領域に追加し、S412でデータ検索部21に完了通知を送信して本フローを抜ける。
 他方、S406で、検索プラン決定部22Aは、適合率100%のインデクスがあるか否かをチェックする。適合率が100%のインデクスがあると判断した場合(S406:Yes)、S409に進み、無いと判断した場合(S406:No)、S413に進む。
  S409で、検索プラン決定部22Aは、適合率が100%のインデクスの中で、最も再現率が高いインデクスを選択する。
  S410で、検索プラン決定部22Aは、選択したインデクスを用いた「漏れ補完型の検索プラン」を作成する。その後、S411、S412の処理に進み。本フローを抜ける。
 他方、S413で、検索プラン決定部22Aは、全インデクスの再現率が0%であるか否かをチェックする。検索プラン決定部22Aは、全インデクスの再現率が0%であると判断する場合(S413:Yes)、S414に進み、「文書データ照合型の検索プラン」を作成する。その後、S411、S412の処理に進み、本フローを抜ける。
 S415で、検索プラン決定部22Aは、S413でチェックした再現率のうち0%より大きい再現率であって、最大の再現率を持つインデクスを選択する。
  S416で、選択したインデクスの再現率が100%となるように、インデクスの検索対象範囲を切り出す処理を行う。例えば、図1Cの検索対象範囲1の範囲になるように切り出す。
 S417で、検索プラン決定部22Aは、切り出した範囲(図1Cの右上側図の検索対象範囲1)に対して選択したインデクスを用いた「ノイズ除去型の検索プラン」を作成し、その後、S418で、作成した検索プランをデータ検索プラン44の格納領域に格納する。
 その後、S419で、検索プラン決定部22Aは、残った検索対象範囲(図1Cにおける検索対象範囲2)を新たな検索対象範囲に設定し、S402の繰り返し処理に戻る。
 次に、作成された検索プランに基づいて検索を実行する検索実行部21の処理の流れを説明する。
  図9に、検索実行部21の処理の流れを示す。検索実行部21は、まずデータ検索プラン44に格納されている操作数分、操作IDに従ってS500からS506の一連の処理を繰り返す。
  S501で、データ検索プラン44の操作がインデクス検索操作であるか否かをチェックする。ここでインデクス検索操作であると判断する場合(S501:Yes)、S502に進み、インデクス検索部23を呼び出す。データ検索部22は、インデクス操作でないと判断する場合(S501:No)、S503に進む。
 S503で、検索実行部21は、操作が文書データ照合操作であるか否かをチェックする。文書データ照合操作であると判断する場合(S503:Yes)、S504に進み、文書データ照合部24を呼び出す。データ検索部22は、文書データ照合操作でないと判断する場合(S503:No)、S505に進み、指定の結果のデータ識別子を検索結果41の格納領域に追加する。
 S507で、検索実行部21は、検索結果41の格納領域に格納されているデータ識別子の集合を送信し、全格納領域をリセットして終了する。
 図10に、インデクス検索部23の処理の流れを示す。
  S600で、インデクス検索部23は、検索プランの操作に指定されたインデクスを用いて検索要求を処理する。
  S601で、操作に“WITH”指定があるか否かをチェックする。インデクス検索部23は、S601で操作に“WITH”指定が有ると判断する場合(S601:Yes)、S602に進み、合致しなかった文書の識別子をインデクス検索結果42の格納領域から削除し、本処理を終了する。
 最後に、文書データ照合部24の処理を説明する。
  図11に、文書データ照合処理の流れを示す。
  S700で、文書データ照合部24は、検索プランの操作に“WITH”指定があるか否かをチェックする。ここで“WITH”指定があると判断する場合(S700:Yes)、S701に進み、指定が無いと判断する場合(S700:No)、S702に進む。
 S701で、文書データ照合部24は、インデクス検索結果42の格納領域に格納されているデータ識別子を、文書データ照合結果43の格納領域にコピーする。本ステップは「ノイズ除去型の検索プラン」を実行するための処理である。
 S702で、文書データ照合部24は。全文書のデータ識別子を文書データ照合結果43の格納領域に格納する。
  S703で、文書データ照合部24は、操作に“WITHOUT“指定があるか否かをチェックする。ここで”WITHOUT“指定があると判断する場合(S703:Yes)、S704に進み、指定が無いと判断する場合(S703:No)、インデクス検索結果44の格納領域に格納されているデータ識別子と同じ識別子を、文書データ照合結果44から削除する。本ステップは「漏れ補完型の検索プラン」を実行するための処理である。
 S705で、文書データ照合部24は、検索結果41の格納領域に格納されているデータ識別子と同じ識別子を、文書データ照合結果44の格納領域から削除する。本ステップは、既に正解文書であると決定した文書に関する処理を省くために実行する。
 次いで、文書データ照合部24は、文書データ照合結果43の格納領域に格納されているデータ識別子数分、S706からS711の一連の処理を繰り返す。
  S707で、文書データ照合部24は、当該文書データから指定された検索対象範囲の文字列を抽出する。
  S708で、文書データ照合部24は、抽出した範囲を対象として検索要求で照合し、S709で、検索要求に合致するか否かをチェックする。ここで検索要求に合致しないと判断した場合(S709:No)、S710に進み、検索要求に合致すると判断する場合(S709:Yes)、S711に進む。
  S710で、文書データ照合部24は、データ識別子を文書データ照合結果43の格納領域から削除する。S706からS711の繰り返し処理が終了すると、本フローを抜ける。
 以上説明したように、第1実施形態の計算機システム100によれば、検索対象範囲と、インデクス作成範囲とが異なる場合に、インデクス作成範囲から検索を行い、その結果を利用して検索対象範囲を検索することにより、大規模な文書データベースを対象とした場合でも、作成されているインデクスを最大限に利用して、高速な検索処理を実現するデータ検索装置を提供することが可能となる。
 〔第2実施例〕
  次に、本発明を適用した第2実施形態である計算機システム200について説明する。  図12を用いて、計算機システム200の原理について説明する。図に示すように、計算機システム200は、検索対象範囲(図中、点線で示す楕円部分)が、複数のインデクス作成範囲XとY(図中、実線で囲まれハッチングされた半楕円部分)に分割されている構成を前提とする。更に、インデクス作成範囲Xは、インデクス作成範囲Yよりもインデクスの作成範囲が狭い。第2実施計形態の計算機システム200では、インデクス作成範囲がより狭い範囲であるインデクスを用いた検索処理から優先して処理することを特徴の1つとする。即ちインデクス作成範囲が狭い方が処理に要する時間が短くなる可能性が高い為、狭い範囲のインデクスを用いた検索処理から開始する方が、結果として全体の検索処理が高速になる確率が高くなるといえる。
 例えば、B-treeインデクスの場合、インデクスを作成する範囲がより狭い方が、キー値の数が少なく又ツリー階層が浅くなる。このため検索処理が早くなる可能性が高くなると言える。n-gramインデクスの場合、狭い範囲に作成する方が個々のインデクスに格納されている位置情報が少なくなる。このため検索処理が早くなる可能性が高くなると言える。
 以下に、計算機システム200について詳細に説明する。なお、第1実施形態の計算機システム100(図2)と同様の構成を有する要素・機能部は同一の符号を用いて、その詳細な説明は省略する。
 図13に、計算機システム200における構成を部分的に示す(検索サーバ10)。検索サーバ10の検索プラン決定部22Bに、検索プラン最適化部201を有する点が主な相違点となる。
 検索プラン最適化部201では、検索プラン決定部22が、第1実施形態と同様に作成した「検索プラン」の操作順序を並び変える処理が実行されるようになっている。具体的には、検索プラン決定部22が作成した「検索プラン」を、インデクス定義中のインデクス作成範囲の長さがより小である検索インデクスを用いた検索から優先して実行するように並び変えるようになっている。
 図14に、第2実施形態における検索プラン決定部22Bの処理の流れを示す。なお、本処理は、第1実施形態における検索プラン決定部22Aの処理(図8)のS411とS412の間に処理ステップが追加されるものであり、他の処理は第1実施形態と同様である。追加部分について説明する(なお、便宜上、図14には図8のS411及びS412の処理も記載するものとする)。
 S411で、検索プラン決定部22Bは、作成した検索プランをデータ検索プラン44の格納領域に追加する。
 次いで、S800で、検索プラン決定部22Bは、検索プラン最適化部201にインデクス定義ファイル43の定義情報を送信し、検索プランの最適化を指示する。
  S801で、検索プラン最適化部201による最適化処理が実行され、処理完了後、S802で、検索プラン決定部22Bは、処理完了通知を受信する。
  その後、S912で、検索プラン決定部22Bは、データ検索部20に処理完了通知を送信して、処理を終了する。
 図15に、検索プラン最適化部201の処理の流れを示す。
  検索プラン最適化部201は、検索プラン決定部22Bからの検索プランの最適化指示を契機に処理を開始する。この時点ではデータ検索プラン44の格納領域に、複数の検索プランが格納されている。
  S900で、検索プラン最適化部201は、検索プラン決定部22Bからインデクス定義ファイル63を受信する。そして、検索プラン最適化部201は、データ検索プラン44の格納領域に格納されている検索プランの数分、S901からS904の一連の処理を繰り返す。
  S902で、検索プラン最適化部201は、インデクス定義ファイルの定義情報から当該検索プランに格納されている使用インデクスの作成範囲(例えば、図3の作成範囲67)を取得する。
  S903で、検索プラン最適化部201は、インデクス作成範囲の長さを取得する。ここで、「インデクス作成範囲の長さ」とは、文書データ上でインデクスを作成する範囲として指定された部分のテキスト長を示すものである。複数のインデクス作成範囲の広狭を比較するために、文書データからバイト長や文字数などの値で取得する。文書データからランダムに選択したサンプルデータから取得した長さでもよいし、全ての文書データにおける平均的な長さでもよい。
  検索プラン数分について処理が完了すると、S905に進む。
 S905で、検索プラン最適化部201は、データ検索プラン44の格納領域に格納されている検索プランを、インデクス作成範囲の長さに応じて昇順にソートする。
  最後に、S906で、検索プラン最適化部201は、検索プラン決定部22Bに完了通知を送信して終了する。
 検索プラン決定部22Bの処理終了後には、データ検索部20が検索実行部21を呼び出し、検索プラン最適化部201がソートした順に、検索プランを処理する。そして、検索実行部21は、先に実行した検索プランで正解文書であると決定した文書に対する処理について、それ以降の検索プランでは実行しないようになっている。
 以上説明したように、検索対象範囲が複数のインデクス作成範囲に分割できる場合、より狭い範囲に作成されたインデクスから検索処理を開始し、その結果を利用して以降のインデクスでの検索を行う。より狭い範囲に作成したインデクスの方が検索に掛かる時間が短い可能性が高いため、そのインデクスから確認をすることで、高速に検索が終了する可能性が高まることになる。
 〔第3の実施例〕
  次に、本発明を適用した第3実施形態である計算機システム300について説明する。本実施形態では、特性の異なる複数のインデクスが同じ範囲に作成されている場合、検索要求の要件やインデクスの特性に応じて使用するインデクスやその順序を決定することを特徴の1つとする。
 インデクスの特性には以下のような種類がある。先に述べたn-gram、サフィックスアレイなどを利用した「文字列検索インデクス」、特定のキー文字列(数値が連続する文字列や正規表現に合致する文字列、化学式・英単語など)を抽出して登録したB-treeなどの「キー検索インデクス」、文字成分表のようにビットマップの“1”“0”で文字列の有無を表現する「フィルタリングインデクス」等である(例えば、特許文献3)。
 「フィルタリングインデクス」は、検索ノイズはあるものの高速に検索ができる。そこで、フィルタリングインデクスで検索した結果に対して文字列検索インデクス又は実データでノイズを除去するようにする。これにより、フィルタリングインデクスで絞り込んだ文書に対してのみ詳細検索の処理を集中させることができ、高速な検索が実現できることとなる。
 「キー検索インデクス」は、登録したキーを高精度で検索できるため、登録したキー文字列と同種の文字列が検索要求に含まれる場合には、その文字列部分をキー検索インデクスで検索し、それ以外の文字列を文字列検索インデクス又は実データで検索するようにする。具体的には、計算機システム300には、n-gramインデクスと、数値が連続する文字列を登録したB-treeとが作成されており、検索要求として“10cm”が指定された場合には、検索要求の“10”の部分をB-treeで検索し、“cm”の部分をn-gramインデクスで検索し、それらの部分文字列が連続する文書を探し出す。n-gramインデクスだけで“10cm”を検索すると、“110cm”や“10010cm”なども正解文書となってしまうが、本実施形態を用いることにより、これらキーを内包する文書を除外し、高精度な検索結果を得ることが可能となる。またB-treeの特性を生かしてキー文字列部分の範囲検索も可能となる。
 計算機システム300の構成は、基本的に第1及び第2実施形態と同様の構成をとるが、検索プラン決定部22Cが主な相違点である。
  図16に、データ検索サーバ10の構成を模式的に示す。検索プラン決定部22Cは、複数インデクスプランニング部301を有する。
 複数インデクスプランニング部301では、インデクスの特性と、検索要求に含まれる検索文字列との関係からより効率的な処理を可能とするインデクスを用いた検索から優先して実行するように「検索プラン」を並び変える様になっている。
 第3実施形態において、検索プラン決定部22Cが作成するデータ検索プランの例を図17に示す。検索プランには、検索要求とその処理手順が格納されている。処理手順は複数の操作からなり、1つの操作は操作ID、操作、検索対象、使用インデクス名称(使用しない場合は空欄)およびインデクス種別を含む。
  図17Aは、「フィルタリングインデクス」を利用した検索プランの例を示す。操作1でフィルタリングインデクスであるビットマップのINDEX1を用いて検索し、操作2で、操作1で合致した文書を対象に文字列検索インデクスであるサフィックスアレイのINDEX2を用いて検索し、その結果を返却することが表されている。
 図17Bは、「キーインデクス」を利用した検索プランの例を示す。操作1でキー検索インデクスであるB-treeのINDEX3を用いて“10”を検索し、操作2で、操作1で合致した文書を対象に文字列検索インデクスであるサフィックスアレイのINDEX2を用いて“cm”を検索し、それらの出現位置が隣接する結果を返却することが表されている。
  以上が、計算機システム300の構成である。
 以下、検索プラン決定部22Cの処理の流れを示す。
  図18に、検索プラン決定部22Cの処理の流れを示す。検索プラン決定部23の処理は、第1実施形態の検索プラン決定部22Aの処理(図8)を基調とし、それと異なる部分は、S1000~S1002と、S1003~S1005とのステップが追加されている点である。追加ステップでは、選択されたインデクスが複数存在する時に、検索要求の要件やインデクスの特性に応じて使用するインデクスやその順序を決定するようになっている。特に、追加部分について説明し、重複部分は詳細な説明を省略する。
 S405において、検索プラン決定部22Cは、S400~S404の処理において算出した、インデクス作成範囲の検索対象範囲に対する適合率と再現率から、再現率が100%のインデクスがあるかをチェックする。再現率が100%のインデクスがある場合(S405:Yes)、S407に進み、無い場合(S405:No)、S406に進む。
 S407で、検索プラン決定部22Cは、再現率が100%のインデクスの内、適合率が最高のインデクスを選択する。
  S1000で、検索プラン決定部22Cは、適合率が最高の値であるインデクスが複数あるか否かをチェックし、複数ある場合(S1000:Yes)、S1001に進み、1つである場合(S1000:No)、S408に進み「ノイズ除去型」の検索プランを作成する。
 S1001で、検索プラン決定部22Cは、複数インデクスプランニング部301に、選択したインデクス定義と検索要求を送信し、その後、S1002で、複数インデクスプランニング部301に検索プラン作成処理を実行させる。複数インデクスプランニング部301の詳細な処理は、後述する。
 次いで、S1003~S1005の処理の流れについて説明する。
  S405で、検索プラン決定部22Cは、再現率が100%のインデクスが無い場合(S405:No)、S406で、適合率が100%のインデクスがあるか否かをチェックする。適合率が100%のインデクスが無い場合(S406:No)、S413に進み、有る場合(S406:Yes)、S1003に進む。
  S1003で、検索プラン決定部22Cは、適合率が最高の値であるインデクスが複数あるか否かをチェックし、複数ある場合(S1003:Yes)、S1004に進み、1つである場合(S1003:No)、S410に進み「漏れ補完型」の検索プランを作成する。
 S1004で、検索プラン決定部22Cは、複数インデクスプランニング部301に、選択したインデクス定義と検索要求を送信し、その後、S1005で、複数インデクスプランニング部301に検索プラン作成処理を実行させる。複数インデクスプランニング部301の詳細な処理は、後述する。
 図19に、複数インデクスプランニング部301の処理の流れを示す。
  S1100で、複数インデクスプランニング部301は、検索プラン決定部22Cから複数のインデクスのインデクス定義と検索要求を受信する。
  S1101で、複数インデクスプランニング部301は、受信したインデクス定義の中にキー検索インデクスが存在するか否かをチェックする。キー検索インデクスが存在すると判断する場合(S1101:Yes)、S1102に進み、無いと判断する場合(S1101:No)、S1108に進む。
 S1102で、複数インデクスプランニング部301は、「キー検索インデクス」に登録されているキー文字列と同種の文字列(A)が検索要求に含まれるか否かをチェックする。含まれていないと判断する場合(S1102:No)、S1108に進み、含まれていると判断する場合(S1102:Yes)、S1103に進む。
  S1103で、複数インデクスプランニング部301は、文字列(A)を、「キー検索インデクス」を用いて検索する操作を生成する。
 S1104で、複数インデクスプランニング部301は、文字列(A)以外の文字列(B)が検索要求に含まれるか否かをチェックする。含まれていないと判断する場合(S1104:No)、S1114に進み、含まれていると判断する場合(S1104:Yes)、S1105に進む。
  S1105で、複数インデクスプランニング部301は、「文字列検索インデクス」が存在するか否かをチェックする。「文字列検索インデクス」が存在すると判断する場合(S1105:Yes)、S1106に進み、存在しないと判断する場合(S1105:No)、S1107に進む。
 S1106で、複数インデクスプランニング部301は、文字列(B)を、「文字列検索インデクス」を用いて検索する操作を生成する。
  S1107で、複数インデクスプランニング部301は、文字列全体を、文書データを用いて検索する操作を生成し、S1114に進む。本操作は文字列(A)と文字列(B)が隣接する位置を抽出する操作となる。
 他方、S1108で、複数インデクスプランニング部301は、「フィルタリングインデクス」が存在するか否かをチェックする。「フィルタリングインデクス」が存在しないと判断する場合(S1108:No)、S1109に進み、存在すると判断する場合(S1108:Yes)、S1110に進む。
  S1109で、複数インデクスプランニング部301は、所定の基準で選択した「文字列検索インデクス」を用いて検索する操作を生成する。所定の基準としては、処理コストの少ないインデクスを選択するようにしてもよいし、ランダムに選択するようにしてもよい。その後、S1114に進む。
 S1110で、複数インデクスプランニング部301は、「フィルタリングインデクス」を用いて検索する操作を生成する。
  S1111で、複数インデクスプランニング部301は、「文字列検索インデクス」が存在するか否かをチェックする。「文字列検索インデクス」が存在すると判断する場合(S1111:Yes)、S1112に進み、「文字列検索インデクス」を用いて検索する操作を生成する。S1111で「文字列検索インデクス」が存在しないと判断する場合(S1111:No)、S1113に進み、文書データを用いて検索する操作を生成し、その後、S1114に進む。
 最後に、S1114で、複数インデクスプランニング部301は、検索プラン決定部22Cに検索プランを送信して、本フローを抜ける。
 このように、計算機システム300によれば、特性の異なる複数のインデクスが同じ範囲に作成されている場合、検索要求の要件やインデクスの特性に応じて使用するインデクスやその順序を決定し、検索を行う。本実施形態に示すように、特定のキー文字列に適合する「キー検索インデクス」や、高速な「フィルタリングインデクス」を優先的に用いるように最適化することにより、高精度で高速な検索処理を実現することが可能となる。
  以上が、第3実施形態の計算機システム300である。
 なお、本発明は上記した種々の実施形態に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施形態は、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、趣旨を逸脱しない範囲で、ある実施形態の構成の一部を他の実施形態の構成に置換・追加することも可能である。
 また、上記の各構成、機能、処理部及び処理等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよいし又ソフトウェアとCPUの協働によってそれぞれの機能を実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、ICカード、SDカード、DVD等の記録媒体に置くことができる。
 また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。実際には殆ど全ての構成が相互に接続されていると考えてもよい。
10・・・検索サーバ、15・・・データ検索実行部、22A・22B・22C・・・検索プラン決定部、23・・・インデクス検索部、24・・・文書データ照合部、30・・・データ登録部、41・・・検索結果、42・・・インデクス検索結果、43・・・文書データ照合結果、44・・・データ検索プラン、61・・・インデクスデータ、62・・・文書データ、63・・・インデクス定義ファイル、201・・・検索プラン最適化部、301・・・複数インデクスプランニング部

Claims (14)

  1.  データ群に対して作成された検索インデクスのインデクス作成範囲を示す情報を含むインデクス定義を格納する記憶部、
     前記データ群に対する検索要求に含まれる検索対象範囲と、前記インデクス定義とから前記検索対象範囲と前記インデクス作成範囲の何れか一方の少なくとも一部の包含関係を検出し、
     前記包含関係の検出により、前記検索要求に対して、前記検索インデクスを用いたインデクス検索を実行し、
     その後、前記検索要求に対して、前記インデクス検索で検索要求の成否が確定したデータを除く文書データについて、前記検索対象範囲に実データ検索を実行し、
     前記検索要求に対する検索結果を出力する制御部と、
    を有する計算機。
  2.  請求項1に記載の計算機であって、
     前記制御部が、
     前記検索対象範囲が前記インデクス作成範囲より大である包含関係の検出により、前記前記検索インデクスを用いたインデクス検索を実行し、
     その後、前記検索要求に対して、前記インデクス検索で検索要求の成立が確定したデータを除く文書データについて、前記インデクス作成範囲が除かれた前記検索対象範囲に実データ検索を実行する計算機。
  3.  請求項1に記載の計算機であって、
     前記制御部が、
     前記検索対象範囲が前記インデクス作成範囲より小である包含関係の検出により、前記前記検索インデクスを用いたインデクス検索を実行し、
     その後、前記検索要求に対して、前記インデクス検索で検索要求の不成立が確定したデータを除く文書データについて、前記検索対象範囲に実データ検索を実行する計算機。
  4.  請求項1に記載の計算機であって、
     前記制御部が、
     前記検索対象範囲が前記インデクス作成範囲に含まれる割合と、前記インデクス作成範囲が前記検索対象範囲に含まれる割合とを算出することで、前記包含関係を検出する計算機。
  5.  請求項4に記載の計算機であって、
     前記制御部が、
     前記検索対象範囲が前記インデクス作成範囲に含まれる割合が100%である検索インデクスのうちで、前記インデクス作成範囲が前記検索対象範囲に含まれる割合が、最も高い検索インデクスを用いて前記インデクス検索を実行する計算機。
  6.  請求項4に記載の計算機であって、
     前記制御部が、
     前記インデクス作成範囲が前記検索対象範囲に含まれる割合が100%である検索インデクスのうちで、前記検索対象範囲が前記インデクス作成範囲に含まれる割合が最も高い検索インデクスを用いて前記インデクス検索を実行する計算機。
  7.  請求項4に記載の計算機であって、
     前記制御部は、
     前記インデクス作成範囲が前記検索対象範囲に含まれる割合及び前記検索対象範囲が前記インデクス作成範囲に含まれる割合がいずれも100%でなく且つ前記検索対象範囲が前記インデクス作成範囲に含まれる割合が0%でないとき、前記検索対象範囲が前記インデクス作成範囲に含まれる割合が最も高い検索インデクスについて、該割合が100%になるように前記検索対象範囲に含まれないインデクス作成範囲の検索インデクスを生成し、前記インデクス検索を実行する計算機。
  8.  請求項1に記載の計算機であって、
     前記制御部が、前記包含関係を検出しないとき、前記検索要求に対して、前記検索対象範囲に実データ検索を実行する計算機。
  9.  請求項1に記載の計算機であって、
     前記制御部が、前記インデクス検索を実行する前に、該インデクス検索に用いる検索インデクスに対応するインデクス定義から、該検索インデクスのインデクス作成範囲の長さを取得し、よりインデクス作成範囲の長さが小である検索インデクスを用いたインデクス検索から順に実行する計算機。
  10.  請求項1に記載の計算機であって、
     前記インデクス定義は、更に、前記検索インデクスの形式を示す情報を含み、
     前記制御部が、前記インデクス検索を実行する前に、該インデクス検索に用いる検索インデクスに対応するインデクス定義から、該検索インデクスのインデクス形式を取得し、
     前記検索要求に含まれる検索文字列が、キー検索インデクスの登録文字列に含まれる場合、該キー検索インデクス形式を有する検索インデクスを用いた前記インデクス検索を優先実行し、
     前記キー検索インデクス形式の検索インデクスが無い或いは前記検索要求に含まれる検索文字列がキー検索インデクスの登録文字列に含まれないとき、フィルタリングインデクス形式の検索インデクスを用いた前記インデクス検索を優先実行し、
     前記キー検索インデクス形式を有する検索インデクスを用いた前記インデクス検索或いはフィルタリングインデクス形式の検索インデクスを用いた前記インデクス検索を実行した後、
     その後、文字列インデクス形式の検索インデクスを用いた前記インデクス検索を優先実行する計算機。
  11.  記憶装置から、データ群に対して作成された検索インデクスのインデクス作成範囲を示す情報を含むインデクス定義を読み出し、前記データ群に対する検索要求に含まれる検索対象範囲と、前記インデクス定義とから前記検索対象範囲と前記インデクス作成範囲の何れか一方の少なくとも一部の包含関係を検出する手順と、
     前記包含関係の検出により、前記検索要求に対して、前記検索インデクスを用いたインデクス検索を実行する手順と、
     その後、前記検索要求に対して、前記インデクス検索で検索要求の成否が確定したデータを除く文書データについて、前記検索対象範囲に実データ検索を実行する手順と、
     前記検索要求に対する検索結果を出力する手順と、
    をコンピュータに実行させるプログラムを格納するコンピュータ読み取り可能な非一時的な記録媒体。
  12.  請求項11に記載の記録媒体であって、
     前記プログラムが、
     前記検索対象範囲が前記インデクス作成範囲より大である包含関係の検出することにより、前記前記検索インデクスを用いたインデクス検索を実行する手順と、
     その後、前記検索要求に対して、前記インデクス検索で検索要求の成立が確定したデータを除く文書データについて、前記インデクス作成範囲が除かれた前記検索対象範囲に実データ検索を実行する手順と、を実行させるプログラムである記録媒体。
  13.  請求項11に記載の記録媒体であって、
     前記プログラムが、
     前記検索対象範囲が前記インデクス作成範囲より小である包含関係の検出することにより、前記前記検索インデクスを用いたインデクス検索を実行する手順と、
     その後、前記検索要求に対して、前記インデクス検索で検索要求の不成立が確定したデータを除く文書データについて、前記検索対象範囲に実データ検索を実行する手順と、を実行させるプログラムである記録媒体。
  14.  データ検索方法であって、
     計算機が、
     記憶装置から、データ群に対して作成された検索インデクスのインデクス作成範囲を示す情報を含むインデクス定義を読み出し、
     前記データ群に対する検索要求に含まれる検索対象範囲と、前記インデクス定義とから前記検索対象範囲と前記インデクス作成範囲の何れか一方の少なくとも一部の包含関係を検出し、
     前記包含関係の検出により、前記検索要求に対して、前記検索インデクスを用いたインデクス検索を実行し、
     その後、前記検索要求に対して、前記インデクス検索で検索要求の成否が確定したデータを除く文書データについて、前記検索対象範囲に実データ検索を実行し、
     前記検索要求に対する検索結果を出力するデータ検索方法。
PCT/JP2013/061965 2013-04-24 2013-04-24 計算機、記録媒体及びデータ検索方法 WO2014174599A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2015513405A JP5978393B2 (ja) 2013-04-24 2013-04-24 計算機、記録媒体及びデータ検索方法
PCT/JP2013/061965 WO2014174599A1 (ja) 2013-04-24 2013-04-24 計算機、記録媒体及びデータ検索方法
US14/423,746 US20160154851A1 (en) 2013-04-24 2013-04-24 Computing device, storage medium, and data search method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/061965 WO2014174599A1 (ja) 2013-04-24 2013-04-24 計算機、記録媒体及びデータ検索方法

Publications (1)

Publication Number Publication Date
WO2014174599A1 true WO2014174599A1 (ja) 2014-10-30

Family

ID=51791209

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/061965 WO2014174599A1 (ja) 2013-04-24 2013-04-24 計算機、記録媒体及びデータ検索方法

Country Status (3)

Country Link
US (1) US20160154851A1 (ja)
JP (1) JP5978393B2 (ja)
WO (1) WO2014174599A1 (ja)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015138497A2 (en) 2014-03-10 2015-09-17 Interana, Inc. Systems and methods for rapid data analysis
US10296507B2 (en) * 2015-02-12 2019-05-21 Interana, Inc. Methods for enhancing rapid data analysis
US11188594B2 (en) * 2018-02-07 2021-11-30 Oracle International Corporation Wildcard searches using numeric string hash
IL293198A (en) * 2019-05-22 2022-07-01 Myota Inc A method and system for storing degraded data with improved security, robustness and control
CN110489417B (zh) * 2019-07-25 2023-03-28 深圳壹账通智能科技有限公司 一种数据处理方法及相关设备
US20230394016A1 (en) * 2020-09-02 2023-12-07 Nec Corporation Coupling table specification system, coupling table search device, method, and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06223107A (ja) * 1992-03-25 1994-08-12 Ricoh Co Ltd 辞書検索装置
JPH08272806A (ja) * 1995-04-03 1996-10-18 Nippon Steel Corp データベース検索システム
JP2005202714A (ja) * 2004-01-16 2005-07-28 Giken Shoji International Co Ltd 文書検索システム

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050198008A1 (en) * 2004-03-02 2005-09-08 Adler David W. Index exploitation for spatial data
US20110295842A1 (en) * 2004-08-18 2011-12-01 Google Inc. Applying Scanned Information to Identify Content
US9852156B2 (en) * 2009-12-03 2017-12-26 Google Inc. Hybrid use of location sensor data and visual query to return local listings for visual query
US9703829B2 (en) * 2011-12-26 2017-07-11 Hitachi, Ltd. Database system and database management method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06223107A (ja) * 1992-03-25 1994-08-12 Ricoh Co Ltd 辞書検索装置
JPH08272806A (ja) * 1995-04-03 1996-10-18 Nippon Steel Corp データベース検索システム
JP2005202714A (ja) * 2004-01-16 2005-07-28 Giken Shoji International Co Ltd 文書検索システム

Also Published As

Publication number Publication date
JP5978393B2 (ja) 2016-08-24
JPWO2014174599A1 (ja) 2017-02-23
US20160154851A1 (en) 2016-06-02

Similar Documents

Publication Publication Date Title
US11907244B2 (en) Modifying field definitions to include post-processing instructions
JP5978393B2 (ja) 計算機、記録媒体及びデータ検索方法
JP5492187B2 (ja) 編集距離および文書情報を使用する検索結果順位付け
US8577155B2 (en) System and method for duplicate text recognition
US20100257440A1 (en) High precision web extraction using site knowledge
WO2017151194A1 (en) Atomic updating of graph database index structures
KR20060044563A (ko) 사본 탐지 및 삭제 방법
JP4237813B2 (ja) 構造化文書管理システム
CN114077680A (zh) 一种图数据的存储方法、系统及装置
CN105488471A (zh) 一种字形识别方法及装置
JP5790755B2 (ja) データベース管理装置及びデータベース管理方法
EP2787448A1 (en) Method and device for determining font
KR101615164B1 (ko) 엔-그램 기반의 질의 처리 장치 및 그 방법
CN108846039B (zh) 数据流向确定方法及装置
CN116226681A (zh) 一种文本相似性判定方法、装置、计算机设备和存储介质
JP2016018279A (ja) 文書ファイル検索プログラム、文書ファイル検索装置、文書ファイル検索方法、文書情報出力プログラム、文書情報出力装置及び文書情報出力方法
Wang et al. MapReduce based personalized locality sensitive hashing for similarity joins on large scale data
KR101679011B1 (ko) 데이터베이스에서 데이터 이동을 처리하는 방법 및 장치
JP4091586B2 (ja) 構造化文書管理システム、索引構築方法及びプログラム
KR101452638B1 (ko) 유사 문자열 검색 방법 및 장치
JP4304226B2 (ja) 構造化文書管理システム、構造化文書管理方法及びプログラム
JP4160627B2 (ja) 構造化文書管理システム及びプログラム
JP5903372B2 (ja) キーワード関連度スコア算出装置、キーワード関連度スコア算出方法、及びプログラム
JP2007172315A (ja) 同義語辞書生成システム、同義語辞書生成方法および同義語辞書生成プログラム
KR20170090128A (ko) 하둡 환경에서 맵리듀스 기반 데이터 처리 성능 향상을 위한 인덱스 구축 및 활용방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13882934

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2015513405

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 14423746

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13882934

Country of ref document: EP

Kind code of ref document: A1