JP2012190379A - Search device, program and method - Google Patents

Search device, program and method Download PDF

Info

Publication number
JP2012190379A
JP2012190379A JP2011055019A JP2011055019A JP2012190379A JP 2012190379 A JP2012190379 A JP 2012190379A JP 2011055019 A JP2011055019 A JP 2011055019A JP 2011055019 A JP2011055019 A JP 2011055019A JP 2012190379 A JP2012190379 A JP 2012190379A
Authority
JP
Japan
Prior art keywords
search
character string
characters
integer
data
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
JP2011055019A
Other languages
Japanese (ja)
Other versions
JP5614338B2 (en
Inventor
Nobuhiro Yugami
伸弘 湯上
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2011055019A priority Critical patent/JP5614338B2/en
Publication of JP2012190379A publication Critical patent/JP2012190379A/en
Application granted granted Critical
Publication of JP5614338B2 publication Critical patent/JP5614338B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Machine Translation (AREA)
  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform search for a similar letter string at high speed.SOLUTION: The device includes: first search data on search target letter strings; a data storage part to store second search data on reversed letter strings each of which is each search target letter string with a letter order of its Nth and subsequent letters reversed as to each integer number N, N being equal to and larger than 1 and equal to and smaller than a first predetermined letter number; a first search part to perform forward match search for a search letter string in the first search data, and to detect a search target letter string having a second predetermined letter number or more of forward-matching letters; a second search part to perform forward match search for a search key which is a search letter string with a letter order of its Mth and subsequent letters reversed, M being an integer number, in the second search data corresponding to the integer M, to detect a reversed letter string having the second predetermined letter number or more of forward-matching letters, and to determine whether a reversed letter string having M-2 matching letters, M being an integer number, exists or not; a control part to output a search instruction to the second search part as to a number from the second predetermined letter number to the integer M, except immediately after the second search part has determined that a reversed letter string having M-2 matching letters, M being an integer number, does not exist.

Description

本技術は、文字列の検索技術に関する。   The present technology relates to a character string search technology.

名寄せとは、名称や住所、電話番号等の複数の属性で表現されるレコードについて、同一実体を表すレコードを収集する処理である。属性毎に、例えば文字列の類似性を評価して、同一実体か否かを判断することになる。同一実体を表すレコードの属性の値は、本来であれば同一の値となるべきであるが、様々な理由で類似した値となる場合がある。例えば、「渡辺商店」とすべきところ「渡邊商店」と異字体が入力される場合や、「AA研究所」とすべきところ「AA研」といったような省略がなされる場合、「AA研究所」とすべきところ「Aっつ研究所」といったように入力ミスがある場合などが想定される。   Name identification is a process of collecting records representing the same entity among records represented by a plurality of attributes such as names, addresses, and telephone numbers. For each attribute, for example, the similarity of character strings is evaluated to determine whether or not they are the same entity. The attribute values of the records representing the same entity should be the same value originally, but may be similar values for various reasons. For example, when “Watanabe Shoten” should be entered and “Watanabe Shoten” is entered as a variant, or “AA Laboratories” should be omitted, such as “AA Lab.” ”Where there is an input error such as“ Atsu Institute ”.

名寄せでは、このような同一の値ではなく類似する値となっている場合でもレコードを抽出して、他の要素と共に評価して同一実体であると推定されるレコード群を特定する。   In name identification, records are extracted even if they are not the same value but similar values, and are evaluated together with other elements to identify a record group that is presumed to be the same entity.

なお、入力URL(Uniform Resource Locator)で、有害Web(ウェブ)サイトのURLを格納しているデータベースを検索する場合、URLの特性を用いて文字列検索を行う技術が存在している。具体的には、URLのホスト+ドメイン部分については右から左方向に詳細になっており、URLのホスト+ドメイン部分のうちホスト部分を簡単に変更できること、ドメイン部分についてもサブドメインの定義が可能であるという特性がある。そこで、ホスト+ドメイン部分については右からの一致を優先すべく、例えばホスト+ドメイン部分がwww.abc.def.co.jpであれば、pj.oc.fed.cba.wwwといったホスト+ドメイン名の区切りで文字の順番を反転させた形でデータベースに登録しておき、検索する際も入力URLのホスト+ドメイン部分をドット毎の区切りで文字の順番を反転させて文字列の前方一致検索を行うものである。しかしながら、この技術は、URLの特性に基づき、ホスト+ドメイン名の区切りで文字の順番を入れ替えているだけで、名寄せにそのまま適用できるようなものではない。すなわち、一般的には文字列間の異なり位置は不確定であり、スラッシュのように確定した区切り位置は存在していない。   When searching a database storing URLs of harmful Web sites using an input URL (Uniform Resource Locator), there is a technique for performing a character string search using the characteristics of the URL. Specifically, the URL host + domain part is detailed from right to left, the host part of the URL host + domain part can be easily changed, and subdomains can also be defined for the domain part. There is a characteristic that it is. Therefore, for the host + domain part, in order to give priority to matching from the right, for example, the host + domain part is www. abc. def. co. jp, pj. oc. fed. cba. It is registered in the database with the order of characters reversed by the host + domain name delimiter such as www, and when searching, the host + domain part of the input URL is reversed by the dot order and the character order is reversed. A forward match search is performed for the column. However, this technique cannot be applied to name identification as it is simply by changing the order of characters at the host + domain name separator based on the characteristics of the URL. That is, generally, different positions between character strings are indeterminate, and there is no delimited position such as a slash.

一般的な検索文字列と一般的な検索対象文字列とを比較する際に、それらの間で相違が発生する文字位置は様々である。大量の検索対象文字列から、検索文字列に前方からだけではなく後方からも類似する検索対象文字列を抽出するには、相違する文字位置のバリエーションを考慮すると、相当の処理時間が掛ってしまう。   When comparing a general search character string and a general search target character string, there are various character positions where a difference occurs between them. In order to extract a search target character string that is similar to the search character string not only from the front but also from the back from a large number of search target character strings, it takes a considerable amount of processing time considering variations of different character positions. .

特開2006−221294号公報JP 2006-221294 A

従って、本技術の目的は、一側面において、高速に類似する文字列の検索を行うための技術を提供することである。   Accordingly, an object of the present technology is, in one aspect, to provide a technology for searching for a similar character string at high speed.

本検索装置は、(A)検索対象文字列の第1の検索用データと、1以上第1の所定文字数以下の整数Nの各々について各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列についての第2の検索用データとを格納する第1のデータ格納部と、(B)第1のデータ格納部に格納されている第1の検索用データに対して検索文字列の前方一致検索を行って、第2の所定文字数以上前方一致する検索対象文字列を検出し、検出された検索対象文字列の識別子を第2のデータ格納部に格納する第1の検索部と、(C)検索文字列における整数M文字以降の文字の順番を入れ替えた検索キーの前方一致検索を、データ格納部に格納されている整数Mについての第2の検索用データに対して行って、第2の所定文字数以上前方一致する反転文字列を検出し、検出された反転文字列に対応する検索対象文字列の識別子を第2のデータ格納部に格納し、整数M−2文字一致した反転文字列が存在するか否かを判断する第2の検索部と、(D)第2の検索部に対して、第2の所定文字数から1まで当該第2の所定文字数から1までのうち整数Mについての検索指示を、第2の検索部により整数M−2文字一致した反転文字列が存在しないと判断された直後を除き出力する制御部とを有する。   The search apparatus determines (A) the order of the characters after the N characters in each search target character string for each of the first search data of the search target character string and an integer N between 1 and the first predetermined number of characters. A first data storage unit for storing second search data for the reversed inverted character string; and (B) a search character for the first search data stored in the first data storage unit. A first search unit that performs a forward match search of the columns, detects a search target character string that matches the second predetermined number of characters or more, and stores an identifier of the detected search target character string in the second data storage unit And (C) a forward matching search of the search key with the order of the characters after the integer M characters in the search character string being changed is performed on the second search data for the integer M stored in the data storage unit. Forward one more than the second predetermined number of characters. Whether or not there is an inverted character string that matches the integer M-2 characters, and stores the identifier of the search target character string corresponding to the detected inverted character string in the second data storage unit. And (D) the second search unit from the second predetermined number of characters to 1, and a search instruction for the integer M out of the second predetermined number of characters to 1, And a control unit for outputting except immediately after it is determined by the search unit of 2 that there is no inverted character string that matches the integer M-2 characters.

高速に類似する文字列の検索を行うことができるようになる。   It becomes possible to search for a similar character string at high speed.

図1は、文字列間の比較を説明するための図である。FIG. 1 is a diagram for explaining comparison between character strings. 図2は、本実施の形態における処理の具体的な例を示す図である。FIG. 2 is a diagram showing a specific example of processing in the present embodiment. 図3Aは、本実施の形態の概要を説明するための図である。FIG. 3A is a diagram for explaining the outline of the present embodiment. 図3Bは、本実施の形態の概要を説明するための図である。FIG. 3B is a diagram for explaining the outline of the present embodiment. 図3Cは、本実施の形態の概要を説明するための図である。FIG. 3C is a diagram for explaining the outline of the present embodiment. 図3Dは、本実施の形態の概要を説明するための図である。FIG. 3D is a diagram for describing an outline of the present embodiment. 図4は、本実施の形態に係る検索装置の機能ブロック図である。FIG. 4 is a functional block diagram of the search device according to the present embodiment. 図5は、検索用データ生成部の機能ブロック図である。FIG. 5 is a functional block diagram of the search data generation unit. 図6は、検索処理部の機能ブロック図である。FIG. 6 is a functional block diagram of the search processing unit. 図7は、検索用データ生成処理の処理フローを示す図である。FIG. 7 is a diagram illustrating a processing flow of search data generation processing. 図8は、検索対象文字列の一例を示す図である。FIG. 8 is a diagram illustrating an example of a search target character string. 図9は、ソート後の検索対象文字列の一例を示す図である。FIG. 9 is a diagram illustrating an example of a search target character string after sorting. 図10Aは、第1のグループの例を示す図である。FIG. 10A is a diagram illustrating an example of the first group. 図10Bは、第2のグループの例を示す図である。FIG. 10B is a diagram illustrating an example of the second group. 図11は、検索用データ生成処理の一例を示す図である。FIG. 11 is a diagram illustrating an example of search data generation processing. 図12は、グループについての処理の一例を示す図である。FIG. 12 is a diagram illustrating an example of processing for a group. 図13は、末尾文字「e」の検索用データの一例を示す図である。FIG. 13 is a diagram illustrating an example of search data for the end character “e”. 図14は、末尾文字「g」の検索用データの一例を示す図である。FIG. 14 is a diagram illustrating an example of search data for the end character “g”. 図15は、検索処理の処理フローを示す図である。FIG. 15 is a diagram illustrating a processing flow of search processing. 図16は、検索処理を説明するための具体例を示す図である。FIG. 16 is a diagram illustrating a specific example for explaining the search processing. 図17は、検索処理の処理フローを示す図である。FIG. 17 is a diagram illustrating a processing flow of search processing. 図18は、検索処理を説明するための具体例を示す図である。FIG. 18 is a diagram illustrating a specific example for explaining the search processing. 図19は、検索処理を説明するための具体例を示す図である。FIG. 19 is a diagram illustrating a specific example for explaining the search processing. 図20は、コンピュータの機能ブロック図である。FIG. 20 is a functional block diagram of a computer.

名寄せの目的となるデータベースへのデータ入力において、入力ミス等が同一レコードの同一属性で複数回起きる可能性は小さいので、属性毎の文字列において相違箇所は高々1カ所で、且つ相違箇所の長さは文字列全体と比べて小さいという仮定を導入しても、大きな問題はないと考えられる。   When entering data into the database for name identification, it is unlikely that an input error will occur multiple times for the same attribute of the same record, so there is at most one difference in the character string for each attribute, and the length of the difference Even if the assumption that the size is smaller than the whole character string is introduced, it is considered that there is no big problem.

相違箇所が1カ所であるなら、相違箇所は、先頭から比較したとき最初に異なる文字が現れる位置から、末尾から比較したときに最初に異なる文字が現れる位置までの区間である。従って、単純な検索方法では、前方一致検索と後方一致検索とを組み合わせることになる。例えば、図1に示すように、文字列Sと文字列Tとを比較する場合には、前方から後方に向けて「a」「b」が一致しており、後方から前方に向けて「g」「f」が一致しているということで、図1の例では、2文字ずつ一致しているでの合計4文字一致していると判断する。   If there is a single difference, the difference is a section from a position where a different character appears first when compared from the beginning to a position where a different character appears first when compared from the end. Therefore, with a simple search method, a forward match search and a backward match search are combined. For example, as shown in FIG. 1, when comparing a character string S and a character string T, “a” and “b” match from the front to the rear, and “g” from the rear to the front. In the example of FIG. 1, it is determined that a total of 4 characters match each other in the example of FIG.

本実施の形態では、条件「先頭からの文字の一致数+末端からの文字の一致数≧最低一致文字数」を満たすような文字列を高速に抽出するために、以下のような処理を実施する。   In the present embodiment, the following processing is performed in order to quickly extract a character string that satisfies the condition “number of matching characters from the beginning + number of matching characters from the end ≧ minimum number of matching characters”. .

具体的には、図2に示すように、(a)に示すような検索対象文字列に対して、(g)に示すような検索文字列「abcde」が入力されて、4文字以上一致する文字列を抽出する場合の処理について説明する。   Specifically, as shown in FIG. 2, a search character string “abcde” as shown in (g) is input to the search target character string as shown in (a), and four or more characters match. Processing for extracting a character string will be described.

本実施の形態では、(a)をそのまま辞書順でソートした結果(b)と、検索対象文字列の4文字目以降の文字の順番を反転させた反転文字列について辞書順にソートした結果(c)と、検索対象文字列の3文字目以降の文字の順番を反転させた反転文字列について辞書順にソートした結果(d)と、検索対象文字列の2文字目以降の文字の順番を反転させた反転文字列について辞書順にソートした結果(e)と、検索対象文字列の1文字目以降の文字の順番を反転させた反転文字列について辞書順にソートした結果(f)とを用意する。   In this embodiment, the result (b) obtained by sorting (a) as it is in the dictionary order and the result obtained by sorting the inverted character string obtained by inverting the order of the fourth and subsequent characters of the search target character string (c) ), The result of sorting the reversed character strings obtained by reversing the order of the third and subsequent characters of the search target character string in dictionary order, and the order of the second and subsequent characters of the search target character string are reversed. A result (e) of sorting the inverted character string in dictionary order and a result (f) of sorting the inverted character string obtained by inverting the order of the first and subsequent characters of the search target character string in dictionary order are prepared.

そして、検索文字列の先頭4文字「abcd」で(b)を検索して、4文字以上前方一致する検索対象文字列を抽出する。この例ではID「5」の「abcdg」が特定される。   Then, (b) is searched with the first four characters “abcd” of the search character string, and a search target character string that matches the front of four characters or more is extracted. In this example, “abcdg” with ID “5” is specified.

さらに、検索文字列の4文字目以降の文字の順番を反転させた反転文字列(i)「abced」の先頭4文字「abce」で(c)を検索して、4文字以上前方一致する反転文字列を検出する。この例ではID「4」の「abceg」が特定される。なお、本実施の形態では、反転位置(切断点とも呼ぶ)「4」−2=2文字一致している反転文字列が存在するかを判断する。(c)には存在しないことが分かる。存在しない場合には、以下で述べる理由で反転位置「3」についての検索処理をスキップする。一方、存在する場合には、反転位置「3」についての検索処理を実施する。   Further, an inverted character string obtained by reversing the order of the fourth and subsequent characters of the search character string (i) Searching for (c) with the first four characters “abce” of “abced”, and performing an inversion that matches four or more characters in front Detect a string. In this example, “abceg” with ID “4” is specified. In the present embodiment, it is determined whether there is an inverted character string that matches the inversion position (also referred to as a cutting point) “4” −2 = 2 characters. It can be seen that (c) does not exist. If it does not exist, the search process for the inversion position “3” is skipped for the reason described below. On the other hand, if it exists, search processing for the inversion position “3” is performed.

このように途中で検索処理をスキップする理由を図3A乃至図3Dを用いて説明する。   The reason for skipping the search process in the middle will be described with reference to FIGS. 3A to 3D.

例えば図3Aの左側に示すように、切断点(反転位置)が4文字目であり、先頭5文字一致である場合、図3Aの右側に示すように、切断点(反転位置)が3文字目になると、先頭4文字一致になってしまう。すなわち、一致数≧切断点−1の時には、切断点を先頭方向に1ずらすと一致数は必ず1減少してしまう。   For example, as shown on the left side of FIG. 3A, when the cutting point (reverse position) is the fourth character and the first five characters match, the cutting point (reverse position) is the third character as shown on the right side of FIG. 3A. Then, the first 4 characters are matched. That is, when the number of coincidence ≧ cutting point-1, the number of coincidence is always reduced by 1 if the cut point is shifted by 1 in the head direction.

また、図3Bの左側に示すように、切断点(反転位置)が4文字目であり、先頭1文字一致である場合、図3Bの右側に示すように、切断点(反転位置)が3文字目になると、先頭1文字一致は変わらない。すなわち、一致数<切断点−2の時には、切断点を先頭方向に1ずらしても、一致数は変化しない。   Also, as shown on the left side of FIG. 3B, when the cutting point (reverse position) is the fourth character and the first one character matches, the cutting point (reverse position) is 3 characters as shown on the right side of FIG. 3B. When it comes to eyes, the first character match does not change. That is, when the number of matches <cutting point-2, the number of matches does not change even if the cut point is shifted by 1 in the head direction.

さらに、図3Cの左側に示すように、切断点(反転位置)が4文字目であり、先頭2文字が一致する場合、図3Cの右側に示すように、切断点(反転位置)が3の時には、先頭2文字一致は変わらない。なお、上段の元々の文字列は「abcdefg」であり、下段の元々の文字列は「abhefk」であり、末尾文字は不一致である。すなわち、一致数=切断点−2の時であって、末尾文字が不一致である場合には、切断点を先頭方向に1ずらしても、一致数は変化しない。   Furthermore, as shown on the left side of FIG. 3C, when the cutting point (reverse position) is the fourth character and the first two characters match, the cutting point (reverse position) is 3 as shown on the right side of FIG. Sometimes the first two characters match does not change. Note that the original character string in the upper row is “abcdefg”, the original character string in the lower row is “abhefk”, and the end characters do not match. That is, when the number of matches = the cut point-2 and the end characters are not matched, the number of matches does not change even if the cut point is shifted by 1 in the head direction.

一方、図3Dでは、上段の元々の文字列は「abcdefg」であり、下段の元々の文字列は「abhefg」であり、末尾文字が一致している。このような場合、図3Dの左側に示すように、切断点(反転位置)が4文字目であり、先頭2文字が一致する場合、図3Dの右側に示すように、切断点(反転位置)が3の時には、先頭5文字一致になる。   On the other hand, in FIG. 3D, the original character string in the upper row is “abcdefg”, the original character string in the lower row is “abhefg”, and the end characters match. In such a case, as shown on the left side of FIG. 3D, when the cutting point (inversion position) is the fourth character and the first two characters match, the cutting point (inversion position) is shown on the right side of FIG. 3D. When is 3, the first five characters match.

このように、一致数=切断点−2の時、元々の文字列の末尾文字が一致していれば、切断点を左にシフトした場合に一致数が増加し、末尾文字が一致していなければ、切断点を左にシフトした場合に一致数は変化しない、という特性があることが分かる。従って、末尾文字が一致しているか否かに拘わらず、末尾文字が一致している検索対象文字列に対して前方一致検索を行って、一致文字数が切断点−2となる検索対象文字列が存在していれば、切断点を左にシフトした場合において前方一致検索を実施すれば目的の検索対象文字列が得られる可能性がある。   Thus, when the number of matches = cutting point -2, if the end character of the original character string matches, the number of matches increases when the cutting point is shifted to the left, and the end character must match. For example, it can be seen that the number of matches does not change when the cut point is shifted to the left. Therefore, regardless of whether or not the end characters are matched, a forward match search is performed on the search target character strings that match the end characters, and the search target character string whose number of matching characters is the cut-point-2 is obtained. If it exists, the target search target character string may be obtained if a forward matching search is performed when the cut point is shifted to the left.

なお、末尾文字が一致している検索対象文字列に対してのみ前方一致検索を行うことができるのであれば、より効率的に目的の検索対象文字列が得られるということになる。   Note that if a forward matching search can be performed only on a search target character string that matches the end character, a target search target character string can be obtained more efficiently.

図2の説明に戻って、上でも述べたように、(c)には切断点「4」−2=2文字一致の反転文字列は存在していないので、切断点「3」(=現在の切断点「4」−1)についての前方一致検索はスキップできる。   Returning to the description of FIG. 2, as described above, since there is no inversion character string of the cut point “4” −2 = 2 character match in (c), the cut point “3” (= current The forward matching search for the cut point “4” -1) can be skipped.

次に、検索文字列の2文字目以降の文字の順番を反転させた反転文字列(k)「aedcb」の先頭4文字「aedc」で(e)を検索して、4文字以上前方一致する反転文字列を検出する。ここでは該当する反転文字列は存在しない。また、切断点「2」−2=0文字一致の反転文字列が存在するか判断する。図2の(e)の反転文字列の中には「bebdc」が該当するので、切断点「1」の前方一致検索については実行することになる。   Next, an inverted character string (k) obtained by inverting the order of the second and subsequent characters in the search character string (k) Search for (e) with the first four characters “aedc” of “aedcb”. Detects reverse character string. Here, there is no corresponding reverse character string. Further, it is determined whether there is an inverted character string in which the cut point “2” −2 = 0 matches. Since “bebdc” corresponds to the inverted character string in FIG. 2E, the forward matching search for the cut point “1” is executed.

そして、検索文字列の1文字目以降の文字の順番を反転させた反転文字列(l)「edcba」の先頭4文字「edcb」で(f)を検索して、4文字以上前方一致する反転文字列を検出する。ここでは該当する反転文字列は存在しない。   Then, the reverse character string obtained by reversing the order of the first and subsequent characters of the search character string (l) Search for (f) with the first four characters “edcb” of “edcba”, and inversion that matches four or more characters in front Detect a string. Here, there is no corresponding reverse character string.

このようにして、最終的な検索結果としては、ID「4」及び「5」の検索対象文字列が得られることになる。   In this way, the search target character strings with IDs “4” and “5” are obtained as the final search results.

このような処理を実施すれば実施すべき前方一致検索が間引かれて、処理負荷が削減され、検索処理が高速化される。   If such processing is performed, the forward matching search to be performed is thinned out, the processing load is reduced, and the search processing is speeded up.

なお、前方一致で最低一致文字数を満足する場合を除き、図1に示すように、文字列の中間部分で文字列の不一致が発生している場合に、最低一致文字数を満足するのは、検索対象文字列の末尾文字と検索文字列の末尾文字とが一致している場合のみである。図3A乃至3Dの観点からも末尾文字が一致しているか否かが分かれば、処理負荷をさらに削減することができる。従って、予め検索対象文字列を、末尾文字の種類毎にグループ化しておけば、前方一致検索を行うべき検索対象文字列の数をさらに削減できる。   Except when the minimum number of matching characters is satisfied by forward matching, as shown in FIG. 1, when the character string mismatch occurs in the middle part of the character string, This is only when the last character of the target character string matches the last character of the search character string. If it is determined from the viewpoints of FIGS. 3A to 3D whether the end characters match, the processing load can be further reduced. Therefore, if the search target character strings are grouped in advance for each type of the end character, the number of search target character strings to be subjected to the forward matching search can be further reduced.

以上のような観点から、図4乃至図19に示すような検索装置を導入するものとする。   From the above viewpoint, a search device as shown in FIGS. 4 to 19 is introduced.

図4に示すように、本実施の形態に係る検索装置1000は、検索対象文字列格納部3000に格納されている検索対象文字列から検索用データを生成する検索用データ生成部1100と、検索用データ生成部1100によって生成された検索用データを格納する検索用データ格納部1200と、検索条件入力を受け付け且つ検索用データ格納部1200に対して以下で述べる検索処理を実施する検索処理部1300と、検索処理部1300の検索結果を格納する検索結果格納部1400と、検索結果格納部1400に格納されている検索結果を検索用データ格納部1200に基づき出力する出力部1500とを有する。   As shown in FIG. 4, the search device 1000 according to the present embodiment includes a search data generation unit 1100 that generates search data from a search target character string stored in a search target character string storage unit 3000, and a search A search data storage unit 1200 for storing the search data generated by the search data generation unit 1100, and a search processing unit 1300 that receives a search condition input and performs a search process described below on the search data storage unit 1200. A search result storage unit 1400 for storing the search results of the search processing unit 1300, and an output unit 1500 for outputting the search results stored in the search result storage unit 1400 based on the search data storage unit 1200.

図5に示すように、検索用データ生成部1100は、データ読込部1110と、データ分割部1120と、文字列グループ格納部1130と、文字反転部1140と、反転文字列格納部1150と、ソート処理部1160とを有する。データ読込部1110は、検索対象文字列格納部3000から検索対象文字列を読み出してデータ分割部1120とソート処理部1160に出力する。データ分割部1120は、データ読込部1110から得られた検索対象文字列をグループ化する処理を実施し、処理結果を文字列グループ格納部1130に格納する。文字列反転部1140は、文字列グループ格納部1130に格納されているデータに基づき、文字列グループ毎に、所属する検索対象文字列に対して以下で説明する文字反転処理を実施し、処理結果を反転文字列格納部1150に格納する。ソート処理部1160は、反転文字列格納部1150に格納されている反転文字列をグループ毎にソートして検索インデックスのデータを生成し、検索用データ格納部1200に格納する。   As shown in FIG. 5, the search data generation unit 1100 includes a data reading unit 1110, a data division unit 1120, a character string group storage unit 1130, a character reversal unit 1140, a reverse character string storage unit 1150, and a sort And a processing unit 1160. The data reading unit 1110 reads the search target character string from the search target character string storage unit 3000 and outputs it to the data dividing unit 1120 and the sort processing unit 1160. The data dividing unit 1120 performs processing for grouping search target character strings obtained from the data reading unit 1110 and stores the processing results in the character string group storage unit 1130. Based on the data stored in the character string group storage unit 1130, the character string reversing unit 1140 performs character reversal processing described below on the search target character string to which each character string group belongs, and the processing result Is stored in the inverted character string storage unit 1150. The sort processing unit 1160 sorts the inverted character strings stored in the inverted character string storage unit 1150 for each group, generates search index data, and stores the search index data in the search data storage unit 1200.

また、図6に示すように、検索処理部1300は、検索条件取得部1310と、検索部1320と、制御部1340とを有する。検索条件取得部1310は、検索条件入力を受け付け、検索部1320と制御部1340とに出力する。検索部1320は、第1検索部1321と、第2検索部1322とを有する。第1検索部1321は、検索文字列について、検索用データ格納部1200に格納されている検索用データに対して前方一致検索を行い、検索結果を検索結果格納部1400に格納する。第2検索部1322は、制御部1340からの指示に従って、検索用データ格納部1200に格納されている検索用データに対して前方一致検索を行って、検索結果を検索結果格納部1400に格納する。なお、検索結果のうち一部のデータについては制御部1340に出力する。   As illustrated in FIG. 6, the search processing unit 1300 includes a search condition acquisition unit 1310, a search unit 1320, and a control unit 1340. The search condition acquisition unit 1310 receives the search condition input and outputs it to the search unit 1320 and the control unit 1340. The search unit 1320 includes a first search unit 1321 and a second search unit 1322. The first search unit 1321 performs a forward matching search on the search data stored in the search data storage unit 1200 for the search character string, and stores the search result in the search result storage unit 1400. The second search unit 1322 performs a forward match search on the search data stored in the search data storage unit 1200 according to an instruction from the control unit 1340 and stores the search result in the search result storage unit 1400. . Note that some data in the search result is output to the control unit 1340.

制御部1340は、検索キー生成部1341と、条件判定部1342とを有している。検索キー生成部1341は、検索文字列の一部の文字を反転させて検索キーを生成する。また、条件判定部1342は、検索キーの出力前に、以下で詳細に説明する条件を満たしているか否かを判断する。なお、第2検索部1322に前方一致検索を実施させるか否かを判断するための検索フラグについては、制御部1340及び第2検索部1322が参照可能なメモリの領域に用意されているものとする。   The control unit 1340 includes a search key generation unit 1341 and a condition determination unit 1342. The search key generation unit 1341 generates a search key by inverting some characters of the search character string. In addition, the condition determination unit 1342 determines whether or not a condition described in detail below is satisfied before outputting the search key. Note that the search flag for determining whether or not the second search unit 1322 performs the forward match search is prepared in a memory area that can be referred to by the control unit 1340 and the second search unit 1322. To do.

以下、検索装置1000の処理内容を図7乃至図19を用いて説明する。まず、検索用データ生成部1100の処理を図7乃至図14を用いて説明する。データ読込部1110は、検索対象文字列格納部3000から、検索対象文字列を読み込み、データ分割部1120及びソート処理部1160に出力する(図7:ステップS1)。例えば、図8に示すような検索対象文字列が読み込まれたものとする。   Hereinafter, processing contents of the search apparatus 1000 will be described with reference to FIGS. First, the processing of the search data generation unit 1100 will be described with reference to FIGS. The data reading unit 1110 reads the search target character string from the search target character string storage unit 3000 and outputs it to the data dividing unit 1120 and the sort processing unit 1160 (FIG. 7: step S1). For example, assume that a search target character string as shown in FIG. 8 is read.

そして、ソート処理部1160は、検索対象文字列をデータ読込部1110から取得し、当該検索対象文字列を辞書順でソートして、切断なしの前方一致検索用のインデックスデータを生成し、検索用データ格納部1200に格納する(ステップS3)。図8のような検索対象文字列の場合には、図9に示すような形で通常の辞書順にソートされる。このようなソート後のデータからインデックスデータを生成する。   Then, the sort processing unit 1160 acquires the search target character string from the data reading unit 1110, sorts the search target character string in dictionary order, generates index data for forward matching search without cutting, and performs search The data is stored in the data storage unit 1200 (step S3). In the case of search target character strings as shown in FIG. 8, they are sorted in the normal dictionary order as shown in FIG. Index data is generated from such sorted data.

また、データ分割部1120は、検索対象文字列をデータ読込部1110から取得し、当該検索対象文字列を、その末尾の文字でグループ化する(ステップS5)。図8の例であれば、末尾文字が「g」のグループ(図10A)と、「e」のグループ(図10B)とがあるので、2つのグループに分けられる。グループ分けについては、様々なバリエーションが可能である。例えば、異なる文字毎にグループを生成しても良いし、複数の種類の文字を纏めてグループ化するようにしてもよい。グループ化の結果については、グループ毎に検索対象文字列を文字列グループ格納部1130に格納する。   In addition, the data dividing unit 1120 acquires the search target character string from the data reading unit 1110, and groups the search target character string by the last character (step S5). In the example of FIG. 8, there are a group (FIG. 10A) whose last character is “g” and a group (FIG. 10B) whose name is “e”. Various variations are possible for grouping. For example, a group may be generated for each different character, or a plurality of types of characters may be grouped together. For the grouping result, the search target character string is stored in the character string group storage unit 1130 for each group.

次に、文字反転部1140は、未処理のグループを1つ特定する(ステップS7)。そして、文字反転部1140は、特定されたグループ内の(最長文字列長−1)をNに設定する(ステップS9)。端子Aを介して図11の処理に移行する。   Next, the character reversing unit 1140 identifies one unprocessed group (step S7). Then, the character reversing unit 1140 sets (longest character string length-1) in the specified group to N (step S9). The processing shifts to the processing in FIG.

図11の処理の説明に移行して、文字反転部1140は、カウンタiを1に初期化する(ステップS11)。そして、文字反転部1140は、特定されたグループ内の各検索対象文字列について、i文字目以降を反転させた反転文字列を生成し、反転文字列格納部1150に格納する(ステップS13)。   Shifting to the description of the processing in FIG. 11, the character reversing unit 1140 initializes the counter i to 1 (step S11). Then, the character reversing unit 1140 generates an inverted character string obtained by inverting the i-th and subsequent characters for each search target character string in the specified group, and stores the inverted character string in the inverted character string storage unit 1150 (step S13).

例えば、末尾文字が「e」であるグループを処理する場合、図12の(a)に示すような検索文字列が処理の対象となる。そして、i=3であれば、3文字目以降の文字の順番を入れ替えて、(b)に示すような反転文字列が生成される。   For example, when a group whose end character is “e” is processed, a search character string as shown in FIG. If i = 3, the order of the third and subsequent characters is changed, and an inverted character string as shown in (b) is generated.

さらに、ソート処理部1160は、反転文字列格納部1150に格納されており且つ生成した反転文字列を辞書順でソートし、前方一致検索用のインデックスデータを生成して、検索用データ格納部1200に格納する(ステップS15)。図12の例では、ソート結果が図12(c)のようになる。   Further, the sort processing unit 1160 sorts the generated inverted character strings stored in the inverted character string storage unit 1150 in the dictionary order, generates index data for forward matching search, and searches the data storage unit 1200. (Step S15). In the example of FIG. 12, the sorting result is as shown in FIG.

以上まとめると、例えば、末尾文字が「e」であるグループを処理する場合、図13に示すように、i=1であれば(a)のようなデータが生成され、i=2であれば(b)のようなデータが生成され、i=3であれば(c)のようなデータが生成され、i=4であれば(d)のようなデータが生成される。   In summary, for example, when processing a group whose end character is “e”, as shown in FIG. 13, if i = 1, data like (a) is generated, and if i = 2, Data such as (b) is generated. If i = 3, data such as (c) is generated, and if i = 4, data such as (d) is generated.

また、末尾文字が「g」であるグループを処理する場合、図14に示すように、i=1であれば(a)のようなデータが生成され、i=2であれば(b)のようなデータが生成され、i=3であれば(c)のようなデータが生成され、i=4であれば(d)のようなデータが生成される。   Further, when processing a group whose end character is “g”, as shown in FIG. 14, if i = 1, data such as (a) is generated, and if i = 2, data in (b) is generated. Data such as (c) is generated if i = 3, and data such as (d) is generated if i = 4.

そして、文字反転部1140は、iがN以上となったか判断する(ステップS17)。iがN未満であれば、文字反転部1140は、iを1インクリメントしてステップS13に戻る(ステップS20)。一方、iがN以上である場合、文字反転部1140は、未処理のグループが文字列グループ格納部1130にあるか判断する(ステップS19)。未処理のグループが存在する場合には端子Bを介して図7のステップS7に戻る。一方、未処理のグループが存在しない場合には、処理を終了する。   Then, the character reversing unit 1140 determines whether i is N or more (step S17). If i is less than N, the character reversing unit 1140 increments i by 1 and returns to step S13 (step S20). On the other hand, if i is greater than or equal to N, the character reversing unit 1140 determines whether there is an unprocessed group in the character string group storage unit 1130 (step S19). If there is an unprocessed group, the process returns to step S7 in FIG. On the other hand, if there is no unprocessed group, the process ends.

以上のような処理を実施すれば、検索用データ格納部1200には、図9と図13及び図14のような検索用データが格納されることになる。   If the processing as described above is performed, the search data storage unit 1200 stores the search data as shown in FIGS. 9, 13, and 14.

なお、グループ化しない処理の場合には、全検索対象文字列を1つのグループとして設定して、上で述べた処理を実施すればよい。このような場合には、図2上段(b)乃至(f)のデータが、図13及び図14のデータの代わりに生成される。   In the case of processing that is not grouped, all the search target character strings may be set as one group and the above-described processing may be performed. In such a case, the data in the upper sections (b) to (f) in FIG. 2 are generated instead of the data in FIGS. 13 and 14.

次に、図15乃至図19を用いて、検索時の処理について説明する。まず、検索処理部1300の検索条件取得部1310は、検索者からの検索条件(検索文字列及び最低一致文字数L)の入力を受け付ける(図15:ステップS21)。なお、検索装置1000が、ネットワークに接続されており、当該ネットワークに接続されている他の端末から受信するような場合もある。検索条件取得部1310は、取得した検索条件のデータを、制御部1340と検索部1320に出力する。例えば、最小一致文字数L=4で、検索文字列「abcde」が入力されたものとする。   Next, processing at the time of search will be described with reference to FIGS. First, the search condition acquisition unit 1310 of the search processing unit 1300 receives an input of a search condition (search character string and minimum matching character number L) from a searcher (FIG. 15: Step S21). In some cases, the search apparatus 1000 is connected to a network and receives from another terminal connected to the network. The search condition acquisition unit 1310 outputs the acquired search condition data to the control unit 1340 and the search unit 1320. For example, it is assumed that the search character string “abcde” is input with the minimum number of matching characters L = 4.

そして、検索部1320の第1検索部1321は、検索用データ格納部1200における、切断なしの検索用インデックスに対して、検索文字列についての前方一致検索を実施し、L文字以上一致する文字列の識別子を抽出して、検索結果格納部1400に格納する(ステップS23)。   Then, the first search unit 1321 of the search unit 1320 performs a forward match search for the search character string with respect to the search index without cutting in the search data storage unit 1200, and a character string that matches L characters or more. Are extracted and stored in the search result storage unit 1400 (step S23).

例えば図16において、(a)に示すような切断なしの検索用データに対して、検索文字列(f)「abcde」について前方一致検索を実施する。より具体的には先頭L文字「abcd」で前方一致検索を実施する。この場合、ID「5」が得られる。   For example, in FIG. 16, a forward matching search is performed on the search character string (f) “abcde” with respect to search data without cutting as shown in FIG. More specifically, a forward matching search is performed using the first L character “abcd”. In this case, ID “5” is obtained.

一方、制御部1340の条件判定部1342は、切断点Nに対して最小一致文字数Lを設定する(ステップS25)。また、制御部1340は、初期的に、次回の前方一致検索を行うべきことを表す検索フラグをセットする(ステップS27)。そして端子Cを介して図17の処理に移行する。   On the other hand, the condition determination unit 1342 of the control unit 1340 sets the minimum matching character count L for the cutting point N (step S25). In addition, the control unit 1340 initially sets a search flag indicating that the next forward match search should be performed (step S27). Then, the processing shifts to the processing in FIG.

そして、制御部1340の条件判定部1342は、N=0であるか判断する(ステップS29)。N=0ではない場合には、条件判定部1342は、検索フラグがセットされているか判断する(ステップS31)。初回は必ず検索フラグがセットされており、ステップS33に移行する。   Then, the condition determination unit 1342 of the control unit 1340 determines whether N = 0 (step S29). If N = 0 is not satisfied, the condition determination unit 1342 determines whether a search flag is set (step S31). The first time, the search flag is always set, and the process proceeds to step S33.

検索フラグがセットされている場合には、条件判定部1342は、検索フラグをオフにセットする(ステップS32)。   If the search flag is set, the condition determination unit 1342 sets the search flag to off (step S32).

その後、条件判定部1342は、検索キー生成部1341に対して指示を出力し、この指示に応じて検索キー生成部1341は、検索文字列におけるN文字目以降の文字の順番を反転させた検索キーを生成し、切断点N及び検索文字列の末尾文字と共に検索キーを第2検索部1322に出力する(ステップS33)。そして、第2検索部1322は、切断点及び検索文字列の末尾文字と共に検索キーを制御部1340から受け取ると、検索用データ格納部1200における、検索文字列の末尾文字についてのグループにおける切断点Nのインデックスに対して、検索キーについての前方一致検索を実施し、最低一致文字数L文字以上一致する反転文字列の識別子(本実施の形態では元の検索対象文字列と同じ)を抽出して、検索結果格納部1400に格納する(ステップS35)。末尾文字に応じたグループ分けを行っていない場合には、1つのグループのみが存在するものとして処理すればよい。   Thereafter, the condition determination unit 1342 outputs an instruction to the search key generation unit 1341, and in response to this instruction, the search key generation unit 1341 performs a search in which the order of characters after the Nth character in the search character string is reversed. A key is generated, and the search key is output to the second search unit 1322 together with the cutting point N and the end character of the search character string (step S33). When the second search unit 1322 receives the search key from the control unit 1340 together with the cut point and the end character of the search character string, the second search unit 1322 in the search data storage unit 1200 includes a cut point N in the group for the end character of the search character string. A forward match search for the search key is performed on the index, and an identifier of the inverted character string that matches the minimum matching character number L or more (same as the original search target character string in this embodiment) is extracted, The result is stored in the search result storage unit 1400 (step S35). If the grouping according to the last character is not performed, the processing may be performed assuming that only one group exists.

「abcde」が検索文字列であるから末尾が「e」のグループにおいて、N=4であれば、図16(b)に示す検索用データに対して前方一致検索を行う。この際4文字目以降の文字が反転されるので、図16(g)に示すように検索キーは「abced」となる。従って、図18に示すように、ID「2」の反転文字列についての一致数は「1」であり、ID「4」の反転文字列についての一致数は「4」であり、ID「3」の反転文字列についての一致数は「0」となる。従って、ID「4」が抽出されて、検索結果格納部1400に格納する。   Since “abcde” is a search character string, in a group whose end is “e”, if N = 4, a forward match search is performed on the search data shown in FIG. At this time, since the fourth and subsequent characters are reversed, the search key is “abced” as shown in FIG. Therefore, as shown in FIG. 18, the number of matches for the inverted character string of ID “2” is “1”, the number of matches for the inverted character string of ID “4” is “4”, and the ID “3” The number of matches for the inverted character string “” is “0”. Accordingly, the ID “4” is extracted and stored in the search result storage unit 1400.

また、第2検索部1322は、一致数が(N−2)の反転文字列が存在しているか判断し、一致数が(N−2)の反転文字列が存在している場合には検索フラグをセットする(ステップS37)。上でも述べたように、最低一致文字数Lの反転文字列が抽出できる可能性がある場合には検索フラグをセットし、そうでない場合には検索フラグをオフにしたままにする。   The second search unit 1322 determines whether there is an inverted character string with the number of matches (N−2), and if there is an inverted character string with the number of matches (N−2), the search is performed. A flag is set (step S37). As described above, the search flag is set when there is a possibility that an inverted character string having the minimum number L of matching characters can be extracted, and otherwise the search flag is left off.

なお、図18の例では、N=4から2を引いた一致数2の反転文字列が存在していないので、検索フラグはオフのままになる。そして、ステップS41に移行する。   In the example of FIG. 18, the search flag remains off because there is no inverted character string with a match number of 2 obtained by subtracting 2 from N = 4. Then, the process proceeds to step S41.

ステップS41では、条件判定部1342は、Nを1デクリメントする。その後処理はステップS29に戻る。   In step S41, the condition determination unit 1342 decrements N by 1. Thereafter, the process returns to step S29.

上で述べている具体例ではN=3については第2検索部1322が前方一致検索を行わないように検索フラグがオフにセットされている。従って、ステップS31では、検索フラグはセットされていないと判断されて、条件判定部1342は、検索フラグをセットする(ステップS39)。一度検索フラグがオフにセットされたからといって以降の前方一致検索を全てスキップできるわけではない。従って、ここで次のNについては前方一致検索を実施すべく、検索フラグをセットする。そしてステップS41に移行する。   In the specific example described above, for N = 3, the search flag is set off so that the second search unit 1322 does not perform the forward match search. Therefore, in step S31, it is determined that the search flag is not set, and the condition determination unit 1342 sets the search flag (step S39). Once the search flag is set off, not all forward matching searches can be skipped. Therefore, for the next N, a search flag is set in order to perform a forward match search. Then, control goes to a step S41.

図16の例でもN=3についての検索キー(h)については生成されることなく、検索用データ(c)に対する前方一致検索も行われない。   In the example of FIG. 16, the search key (h) for N = 3 is not generated, and the forward matching search for the search data (c) is not performed.

N=2になると、検索フラグがオンになっているので、図16の(i)で示すような2文字目以降の文字の順番が反転された検索キーが生成される。そして、N=2のための検索用データ(d)に対して検索キーについての前方一致検索を実施する。4文字以上一致する反転文字列は存在しない。なお、この場合、図19に示すように、N=2から2を引いた「0」文字一致した反転文字列が存在している。従って、検索フラグがセットされる。   When N = 2, since the search flag is on, a search key in which the order of the second and subsequent characters is reversed as shown in FIG. 16 (i) is generated. Then, a forward matching search for the search key is performed on the search data (d) for N = 2. There is no reverse character string that matches four or more characters. In this case, as shown in FIG. 19, there is an inverted character string in which “0” characters are matched by subtracting 2 from N = 2. Accordingly, the search flag is set.

そうすると、N=1になって、検索フラグがオンになっているので、図16(j)で示すような1文字目以降の文字の順番が反転された検索キーが生成される。そして、N=1のための検索用データ(e)に対して検索キーについての前方一致検索を実施する。4文字以上一致する反転文字列は存在しない。N=1の場合には、ステップS37の処理についてはスキップしても良い。   Then, N = 1 and the search flag is turned on, so that a search key in which the order of the first and subsequent characters is reversed as shown in FIG. Then, a forward matching search for the search key is performed on the search data (e) for N = 1. There is no reverse character string that matches four or more characters. When N = 1, the process of step S37 may be skipped.

以上のような処理を実施すれば、検索結果格納部1400には検索対象文字列の識別子{4,5}が格納されることになる。   If the processing as described above is performed, the search result storage unit 1400 stores the identifier {4, 5} of the search target character string.

ステップS29で、N=0と判断された場合には、出力部1500は、検索用データ格納部1200から、検索結果格納部1400に格納されている検索対象文字列の識別子に対応する検索対象文字列を抽出して、出力する(ステップS43)。   When it is determined in step S29 that N = 0, the output unit 1500 searches the search target character string corresponding to the identifier of the search target character string stored in the search result storage unit 1400 from the search data storage unit 1200. A column is extracted and output (step S43).

以上のような処理を実施すれば、文字列中高々1カ所しか不一致がないという前提において、前方からの一致文字数と後方からの一致文字数との和が一定以上、という条件を満足する類似文字列を高速に検索することができる。また、前方一致と後方一致の両方を併用することなく、処理も簡略化されている。   If the above processing is performed, a similar character string that satisfies the condition that the sum of the number of matching characters from the front and the number of matching characters from the back is greater than or equal to a certain number on the premise that there is only one mismatch in the character string. Can be searched at high speed. In addition, the processing is simplified without using both forward coincidence and backward coincidence.

以上本技術の一実施の形態を説明したが、本技術はこれに限定されるものではない。   Although one embodiment of the present technology has been described above, the present technology is not limited to this.

例えば図4乃至図6の機能ブロック図は一例であって、必ずしも実際のプログラムモジュールと一致しない場合もある。また、処理フローについても、同様の処理結果が得られる限り、ステップの順番を入れ替えたり、並列処理を行っても良い。例えば、第1検索部1321と第2検索部1322についての検索処理については、並列実施するようにしても良い。   For example, the functional block diagrams of FIGS. 4 to 6 are examples, and may not necessarily match actual program modules. As for the processing flow, as long as a similar processing result is obtained, the order of steps may be changed or parallel processing may be performed. For example, the search processing for the first search unit 1321 and the second search unit 1322 may be performed in parallel.

同様に、1つの検索装置1000に検索用データ生成部1100と検索処理部1300とを実施する場合を示しているが、異なる装置によって実施するようにしても良い。さらに、検索用データ生成部1100の処理についても複数の装置によって実施するようにしても良いし、検索処理部1300の処理についても複数の装置で処理するようにしても良い。   Similarly, although the case where the search data generation unit 1100 and the search processing unit 1300 are implemented in one search device 1000 is shown, the search data generation unit 1100 and search processing unit 1300 may be implemented by different devices. Furthermore, the processing of the search data generation unit 1100 may be performed by a plurality of devices, and the processing of the search processing unit 1300 may be performed by a plurality of devices.

なお、上で述べた検索装置1000は、コンピュータ装置であって、図20に示すように、メモリ2501とCPU(Central Processing Unit)2503とハードディスク・ドライブ(HDD:Hard Disk Drive)2505と表示装置2509に接続される表示制御部2507とリムーバブル・ディスク2511用のドライブ装置2513と入力装置2515とネットワークに接続するための通信制御部2517とがバス2519で接続されている。オペレーティング・システム(OS:Operating System)及び本実施例における処理を実施するためのアプリケーション・プログラムは、HDD2505に格納されており、CPU2503により実行される際にはHDD2505からメモリ2501に読み出される。CPU2503は、アプリケーション・プログラムの処理内容に応じて表示制御部2507、通信制御部2517、ドライブ装置2513を制御して、所定の動作を行わせる。また、処理途中のデータについては、主としてメモリ2501に格納されるが、HDD2505に格納されるようにしてもよい。本技術の実施例では、上で述べた処理を実施するためのアプリケーション・プログラムはコンピュータ読み取り可能なリムーバブル・ディスク2511に格納されて頒布され、ドライブ装置2513からHDD2505にインストールされる。インターネットなどのネットワーク及び通信制御部2517を経由して、HDD2505にインストールされる場合もある。このようなコンピュータ装置は、上で述べたCPU2503、メモリ2501などのハードウエアとOS及びアプリケーション・プログラムなどのプログラムとが有機的に協働することにより、上で述べたような各種機能を実現する。     The search device 1000 described above is a computer device, and as shown in FIG. 20, a memory 2501, a CPU (Central Processing Unit) 2503, a hard disk drive (HDD: Hard Disk Drive) 2505, and a display device 2509. A display control unit 2507 connected to the computer, a drive device 2513 for a removable disk 2511, an input device 2515, and a communication control unit 2517 for connecting to a network are connected by a bus 2519. An operating system (OS) and an application program for executing the processing in this embodiment are stored in the HDD 2505, and are read from the HDD 2505 to the memory 2501 when executed by the CPU 2503. The CPU 2503 controls the display control unit 2507, the communication control unit 2517, and the drive device 2513 according to the processing content of the application program, and performs a predetermined operation. Further, data in the middle of processing is mainly stored in the memory 2501, but may be stored in the HDD 2505. In an embodiment of the present technology, an application program for performing the above-described processing is stored in a computer-readable removable disk 2511 and distributed, and installed from the drive device 2513 to the HDD 2505. In some cases, the HDD 2505 may be installed via a network such as the Internet and the communication control unit 2517. Such a computer apparatus realizes various functions as described above by organically cooperating hardware such as the CPU 2503 and the memory 2501 described above and programs such as the OS and application programs. .

以上述べた本実施の形態をまとめると以下のようになる。   The above-described embodiment can be summarized as follows.

本実施の形態に係る検索装置は、(A)検索対象文字列の第1の検索用データと、1以上第1の所定文字数以下の整数Nの各々について各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列についての第2の検索用データとを格納する第1のデータ格納部と、(B)第1のデータ格納部に格納されている第1の検索用データに対して検索文字列(例えば検索文字列のうち先頭の第2の所定数部分)の前方一致検索を行って、第2の所定文字数以上前方一致する検索対象文字列を検出し、検出された検索対象文字列の識別子を第2のデータ格納部に格納する第1の検索部と、(C)検索文字列における整数M文字以降の文字の順番を入れ替えた検索キー(例えば検索キーのうち先頭の第2の所定数部分)の前方一致検索を、データ格納部に格納されている整数Mについての第2の検索用データに対して行って、第2の所定文字数以上前方一致する反転文字列を検出し、検出された反転文字列に対応する検索対象文字列の識別子を第2のデータ格納部に格納し、整数M−2文字一致した反転文字列が存在するか否かを判断する第2の検索部と、(D)第2の検索部に対して、第2の所定文字数から1まで第2の所定文字数から1までのうち整数Mについての検索指示を、第2の検索部により整数M−2文字一致した反転文字列が存在しないと判断された直後を除き出力する制御部とを有する。   The search device according to the present embodiment includes (A) the first search data of a search target character string and N or more characters in each search target character string for each of an integer N that is greater than or equal to a first predetermined number of characters. A first data storage unit for storing second search data for an inverted character string in which the order of the characters is changed, and (B) first search data stored in the first data storage unit The search character string (for example, the second predetermined number portion at the beginning of the search character string) is subjected to a forward matching search, and a search target character string that matches the second predetermined number of characters or more is detected. A first search unit that stores the identifier of the search target character string in the second data storage unit, and (C) a search key in which the order of characters after the integer M characters in the search character string is switched (for example, the first of the search keys) The second predetermined number of parts) Is performed on the second search data for the integer M stored in the data storage unit to detect an inverted character string that matches the second predetermined number of characters or more and matches the detected inverted character string. A second search unit that stores an identifier of the search target character string to be stored in the second data storage unit and determines whether or not there is an inverted character string that matches the integer M-2 characters; and (D) a second There is an inverted character string in which a search instruction for the integer M out of the second predetermined number of characters to 1 is matched with the second searching unit from the second predetermined number of characters to 1 by the second searching unit. And a control unit for outputting except immediately after it is determined not to.

このようにすれば第2の検索部による前方一致検索の回数を削減することができるため、検索処理が高速化される。   In this way, the number of forward matching searches by the second search unit can be reduced, so that the search process is speeded up.

また、上で述べた第2の検索用データが検索対象文字列の末尾文字の種類毎にグループ化されている場合もある。その場合、第2の検索部が、検索文字列の末尾文字と一致する末尾文字の種類のグループに属する第2の検索用データに対して前方一致検索を実施するようにしてもよい。このようにすれば、さらに検索対象文字列を絞り込むことができ、検索処理を高速化することができるようになる。   In addition, the second search data described above may be grouped for each type of end character of the search target character string. In this case, the second search unit may perform a forward match search for the second search data belonging to the group of the last character type that matches the last character of the search character string. In this way, the search target character string can be further narrowed down, and the search process can be speeded up.

なお、上で述べた制御部が、第2の検索部に対して、第2の所定文字数を整数Mとして検索指示を出力し、第2の検索部により整数M−2文字一致した反転文字列が存在すると判断された場合には、整数M−1を新たな整数Mとして検索指示を第2の検索部に出力し、第2の検索部により整数M−2文字一致した反転文字列が存在しないと判断された場合には、整数M−2を新たな整数Mとして検索指示を第2の検索部に出力するようにしてもよい。   The control unit described above outputs a search instruction with the second predetermined number of characters as an integer M to the second search unit, and an inverted character string in which the integer M-2 characters are matched by the second search unit. If it is determined that there is an integer M-1 as a new integer M, a search instruction is output to the second search unit, and there is an inverted character string that matches the integer M-2 characters by the second search unit. If it is determined not to do so, the search instruction may be output to the second search unit with the integer M-2 as the new integer M.

さらに、上で述べた検索装置が、1以上第1の所定文字数以下の整数Nの各々について各検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列を生成し、当該反転文字列をソートして第2の検索用データを生成する検索用データ生成部をさらに有するようにしてもよい。これによって、自動的に第2の検索用データが生成されるようになる。   Furthermore, the search device described above generates an inverted character string in which the order of the characters after the N characters in each search target character string is changed for each of the integers N that are greater than or equal to the first predetermined number of characters, and the inverted characters You may make it further have a search data generation part which sorts a column and produces | generates the 2nd search data. As a result, the second search data is automatically generated.

また、検索装置が、検索対象文字列の末尾文字の種類毎に検索対象文字列をグループ化し、当該グループの各々について、1以上第1の所定文字数以下の整数Nの各々について当該グループに属する各検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列を生成し、当該反転文字列をソートして第2の検索用データを生成する検索用データ生成部をさらに有するようにしても良い。末尾文字でグループ化する場合においても第2の検索用データが自動的に生成されるようになる。   Further, the search device groups the search target character strings for each type of the last character of the search target character string, and for each of the groups, each of the integers N that is 1 or more and the first predetermined number of characters or less belongs to the group. It further includes a search data generation unit that generates an inverted character string in which the order of characters after the N characters in the search target character string is changed, and sorts the inverted character string to generate second search data. Also good. Even when grouping by the last character, the second search data is automatically generated.

なお、上記処理をコンピュータに行わせるためのプログラムを作成することができ、当該プログラムは、例えばフレキシブルディスク、CD−ROM、光磁気ディスク、半導体メモリ、ハードディスク等のコンピュータ読み取り可能な記憶媒体又は記憶装置に格納される。尚、中間的な処理結果はメインメモリ等の記憶装置に一時保管される。   A program for causing a computer to perform the above-described processing can be created. The program is, for example, a computer-readable storage medium or storage device such as a flexible disk, a CD-ROM, a magneto-optical disk, a semiconductor memory, or a hard disk. Stored in The intermediate processing result is temporarily stored in a storage device such as a main memory.

以上の実施例を含む実施形態に関し、さらに以下の付記を開示する。   The following supplementary notes are further disclosed with respect to the embodiments including the above examples.

(付記1)
検索対象文字列の第1の検索用データと、1以上第1の所定文字数以下の整数Nの各々について各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列についての第2の検索用データとを格納する第1のデータ格納部と、
前記第1のデータ格納部に格納されている前記第1の検索用データに対して検索文字列の前方一致検索を行って、第2の所定文字数以上前方一致する検索対象文字列を検出し、検出された前記検索対象文字列の識別子を第2のデータ格納部に格納する第1の検索部と、
前記検索文字列における整数M文字以降の文字の順番を入れ替えた検索キーの前方一致検索を、前記第1のデータ格納部に格納されている前記整数Mについての前記第2の検索用データに対して行って、前記第2の所定文字数以上前方一致する反転文字列を検出し、検出された前記反転文字列に対応する前記検索対象文字列の識別子を前記第2のデータ格納部に格納し、前記整数M−2文字一致した反転文字列が存在するか否かを判断する第2の検索部と、
前記第2の検索部に対して、前記第2の所定文字数から1まで前記第2の所定文字数から1までのうち整数Mについての検索指示を、前記第2の検索部により前記整数M−2文字一致した反転文字列が存在しないと判断された直後を除き出力する制御部と、
を有する検索装置。
(Appendix 1)
For the first character string for the search target character string and the inverted character string in which the order of the characters after the N characters in each search target character string is changed for each of the integer N that is greater than or equal to the first predetermined number of characters. A first data storage unit for storing two search data;
Performing a search character string forward match search for the first search data stored in the first data storage unit to detect a search target character string that matches the second predetermined number of characters in advance, A first search unit that stores an identifier of the detected character string to be searched in a second data storage unit;
A forward match search of a search key in which the order of characters after the integer M characters in the search character string is changed is performed on the second search data for the integer M stored in the first data storage unit. And detecting an inverted character string that matches the second predetermined number of characters or more forward, and storing the identifier of the search target character string corresponding to the detected inverted character string in the second data storage unit, A second search unit for determining whether there is an inverted character string that matches the integer M-2 characters;
A search instruction for the integer M out of the second predetermined number of characters to 1 is sent from the second predetermined number of characters to 1 to the second search unit by the second search unit. A control unit that outputs except immediately after it is determined that a character-matched inverted character string does not exist;
A search device having:

(付記2)
前記第2の検索用データが前記検索対象文字列の末尾文字の種類毎にグループ化されており、
前記第2の検索部が、前記検索文字列の末尾文字と一致する末尾文字の種類のグループに属する前記第2の検索用データに対して前方一致検索を実施する
付記1記載の検索装置。
(Appendix 2)
The second search data is grouped for each type of end character of the search target character string,
The search device according to claim 1, wherein the second search unit performs a forward match search for the second search data belonging to a group of end character types that match the end character of the search character string.

(付記3)
前記制御部が、
前記第2の検索部に対して、前記第2の所定文字数を前記整数Mとして検索指示を出力し、
前記第2の検索部により前記整数M−2文字一致した反転文字列が存在すると判断された場合には、前記整数M−1を新たな整数Mとして検索指示を前記第2の検索部に出力し、
前記第2の検索部により前記整数M−2文字一致した反転文字列が存在しないと判断された場合には、前記整数M−2を新たな整数Mとして検索指示を前記第2の検索部に出力する
付記1又は2記載の検索装置。
(Appendix 3)
The control unit is
To the second search unit, a search instruction is output with the second predetermined number of characters as the integer M,
If the second search unit determines that there is an inverted character string that matches the integer M-2 characters, the search instruction is output to the second search unit with the integer M-1 as a new integer M. And
If the second search unit determines that there is no inverted character string that matches the integer M-2 characters, the search instruction is sent to the second search unit with the integer M-2 as a new integer M. Output the search device according to appendix 1 or 2.

(付記4)
1以上第1の所定文字数以下の整数Nの各々について各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列を生成し、当該反転文字列をソートして前記第2の検索用データを生成する検索用データ生成部
をさらに有する付記1乃至3のいずれか1つ記載の検索装置。
(Appendix 4)
For each of the integers N that is greater than or equal to 1 and less than or equal to the first predetermined number of characters, an inverted character string in which the order of the characters after the N characters in each search target character string is replaced is generated, and the inverted character string is sorted and the second character string is sorted. The search device according to any one of supplementary notes 1 to 3, further comprising: a search data generation unit that generates search data.

(付記5)
前記検索対象文字列の末尾文字の種類毎に前記検索対象文字列をグループ化し、当該グループの各々について、1以上第1の所定文字数以下の整数Nの各々について当該グループに属する各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列を生成し、当該反転文字列をソートして前記第2の検索用データを生成する検索用データ生成部
をさらに有する付記2記載の検索装置。
(Appendix 5)
The search target character strings are grouped for each type of the last character of the search target character string, and for each of the groups, each of the search target characters belonging to the group for each of the integers N that is greater than or equal to the first predetermined number of characters. The search according to supplementary note 2, further comprising: a search data generation unit that generates an inverted character string in which the order of characters after the N characters in the sequence is changed, and sorts the inverted character string to generate the second search data. apparatus.

(付記6)
検索対象文字列の第1の検索用データと、1以上第1の所定文字数以下の整数Nの各々について各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列についての第2の検索用データとを格納する第1のデータ格納部に格納されている前記第1の検索用データに対して検索文字列の前方一致検索を行って、第2の所定文字数以上前方一致する検索対象文字列を検出し、検出された前記検索対象文字列の識別子を第2のデータ格納部に格納するステップと、
前記第2の所定文字数から1まで前記第2の所定文字数から1までのうち整数Mについての検索処理を、当該検索処理において前記整数M−2文字一致した反転文字列が存在しないと判断された直後を除き実施するステップと、
を含み、
前記検索処理が、
前記検索文字列における整数M文字以降の文字の順番を入れ替えた検索キーの前方一致検索を、前記第1のデータ格納部に格納されている前記整数Mについての前記第2の検索用データに対して行って、前記第2の所定文字数以上前方一致する反転文字列を検出し、検出された前記反転文字列に対応する前記検索対象文字列の識別子を前記第2のデータ格納部に格納し、前記整数M−2文字一致した反転文字列が存在するか否かを判断する処理
であり、コンピュータにより実行される検索処理方法。
(Appendix 6)
For the first character string for the search target character string and the inverted character string in which the order of the characters after the N characters in each search target character string is changed for each of the integer N that is greater than or equal to the first predetermined number of characters. The first search data stored in the first data storage unit storing the second search data is subjected to a forward match search of the search character string, and the front matches by a predetermined number of characters or more. Detecting a search target character string and storing the detected identifier of the search target character string in a second data storage unit;
From the second predetermined number of characters to 1, the search processing for the integer M out of the second predetermined number of characters to 1 is determined that there is no inverted character string that matches the integer M-2 characters in the search processing. The steps to perform except immediately after,
Including
The search process
A forward match search of a search key in which the order of characters after the integer M characters in the search character string is changed is performed on the second search data for the integer M stored in the first data storage unit. And detecting an inverted character string that matches the second predetermined number of characters or more forward, and storing the identifier of the search target character string corresponding to the detected inverted character string in the second data storage unit, A search processing method executed by a computer for determining whether or not there is an inverted character string that matches the integer M-2 characters.

(付記7)
検索対象文字列の第1の検索用データと、1以上第1の所定文字数以下の整数Nの各々について各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列についての第2の検索用データとを格納する第1のデータ格納部に格納されている前記第1の検索用データに対して検索文字列の前方一致検索を行って、第2の所定文字数以上前方一致する検索対象文字列を検出し、検出された前記検索対象文字列の識別子を第2のデータ格納部に格納するステップと、
前記第2の所定文字数から1まで前記第2の所定文字数から1までのうち整数Mについての検索処理を、当該検索処理において前記整数M−2文字一致した反転文字列が存在しないと判断された直後を除き実施するステップと、
をコンピュータに実行させ、
前記検索処理が、
前記検索文字列における整数M文字以降の文字の順番を入れ替えた検索キーの前方一致検索を、前記第1のデータ格納部に格納されている前記整数Mについての前記第2の検索用データに対して行って、前記第2の所定文字数以上前方一致する反転文字列を検出し、検出された前記反転文字列に対応する前記検索対象文字列の識別子を前記第2のデータ格納部に格納し、前記整数M−2文字一致した反転文字列が存在するか否かを判断する処理
である検索処理プログラム。
(Appendix 7)
For the first character string for the search target character string and the inverted character string in which the order of the characters after the N characters in each search target character string is changed for each of the integer N that is greater than or equal to the first predetermined number of characters. The first search data stored in the first data storage unit storing the second search data is subjected to a forward match search of the search character string, and the front matches by a predetermined number of characters or more. Detecting a search target character string and storing the detected identifier of the search target character string in a second data storage unit;
From the second predetermined number of characters to 1, the search processing for the integer M out of the second predetermined number of characters to 1 is determined that there is no inverted character string that matches the integer M-2 characters in the search processing. The steps to perform except immediately after,
To the computer,
The search process
A forward match search of a search key in which the order of characters after the integer M characters in the search character string is changed is performed on the second search data for the integer M stored in the first data storage unit. And detecting an inverted character string that matches the second predetermined number of characters or more forward, and storing the identifier of the search target character string corresponding to the detected inverted character string in the second data storage unit, A search processing program for determining whether or not there is an inverted character string that matches the integer M-2 characters.

1000 検索装置
3000 検索対象文字列格納部
1100 検索用データ生成部
1200 検索用データ格納部
1300 検索処理部
1400 検索結果格納部
1500 出力部
1000 Search Device 3000 Search Target Character String Storage Unit 1100 Search Data Generation Unit 1200 Search Data Storage Unit 1300 Search Processing Unit 1400 Search Result Storage Unit 1500 Output Unit

Claims (6)

検索対象文字列の第1の検索用データと、1以上第1の所定文字数以下の整数Nの各々について各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列についての第2の検索用データとを格納する第1のデータ格納部と、
前記第1のデータ格納部に格納されている前記第1の検索用データに対して検索文字列の前方一致検索を行って、第2の所定文字数以上前方一致する検索対象文字列を検出し、検出された前記検索対象文字列の識別子を第2のデータ格納部に格納する第1の検索部と、
前記検索文字列における整数M文字以降の文字の順番を入れ替えた検索キーの前方一致検索を、前記第1のデータ格納部に格納されている前記整数Mについての前記第2の検索用データに対して行って、前記第2の所定文字数以上前方一致する反転文字列を検出し、検出された前記反転文字列に対応する前記検索対象文字列の識別子を前記第2のデータ格納部に格納し、前記整数M−2文字一致した反転文字列が存在するか否かを判断する第2の検索部と、
前記第2の検索部に対して、前記第2の所定文字数から1まで前記第2の所定文字数から1までのうち整数Mについての検索指示を、前記第2の検索部により前記整数M−2文字一致した反転文字列が存在しないと判断された直後を除き出力する制御部と、
を有する検索装置。
For the first character string for the search target character string and the inverted character string in which the order of the characters after the N characters in each search target character string is changed for each of the integer N that is greater than or equal to the first predetermined number of characters. A first data storage unit for storing two search data;
Performing a search character string forward match search for the first search data stored in the first data storage unit to detect a search target character string that matches the second predetermined number of characters in advance, A first search unit that stores an identifier of the detected character string to be searched in a second data storage unit;
A forward match search of a search key in which the order of characters after the integer M characters in the search character string is changed is performed on the second search data for the integer M stored in the first data storage unit. And detecting an inverted character string that matches the second predetermined number of characters or more forward, and storing the identifier of the search target character string corresponding to the detected inverted character string in the second data storage unit, A second search unit for determining whether there is an inverted character string that matches the integer M-2 characters;
A search instruction for the integer M out of the second predetermined number of characters to 1 is sent from the second predetermined number of characters to 1 to the second search unit by the second search unit. A control unit that outputs except immediately after it is determined that a character-matched inverted character string does not exist;
A search device having:
前記第2の検索用データが前記検索対象文字列の末尾文字の種類毎にグループ化されており、
前記第2の検索部が、前記検索文字列の末尾文字と一致する末尾文字の種類のグループに属する前記第2の検索用データに対して前方一致検索を実施する
請求項1記載の検索装置。
The second search data is grouped for each type of end character of the search target character string,
2. The search device according to claim 1, wherein the second search unit performs a forward match search on the second search data belonging to a group of the last character type that matches the last character of the search character string.
1以上第1の所定文字数以下の整数Nの各々について各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列を生成し、当該反転文字列をソートして前記第2の検索用データを生成する検索用データ生成部
をさらに有する請求項1又は2記載の検索装置。
For each of the integers N that is greater than or equal to 1 and less than or equal to the first predetermined number of characters, an inverted character string in which the order of the characters after the N characters in each search target character string is replaced is generated, and the inverted character string is sorted and the second character string is sorted. The search device according to claim 1, further comprising a search data generation unit configured to generate search data.
前記検索対象文字列の末尾文字の種類毎に前記検索対象文字列をグループ化し、当該グループの各々について、1以上第1の所定文字数以下の整数Nの各々について当該グループに属する各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列を生成し、当該反転文字列をソートして前記第2の検索用データを生成する検索用データ生成部
をさらに有する請求項2記載の検索装置。
The search target character strings are grouped for each type of the last character of the search target character string, and for each of the groups, each of the search target characters belonging to the group for each of the integers N that is greater than or equal to the first predetermined number of characters. The search data generation unit according to claim 2, further comprising: an inverted character string in which the order of characters after the N characters in the sequence is switched, and generating the second search data by sorting the inverted character string. Search device.
検索対象文字列の第1の検索用データと、1以上第1の所定文字数以下の整数Nの各々について各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列についての第2の検索用データとを格納する第1のデータ格納部に格納されている前記第1の検索用データに対して検索文字列の前方一致検索を行って、第2の所定文字数以上前方一致する検索対象文字列を検出し、検出された前記検索対象文字列の識別子を第2のデータ格納部に格納するステップと、
前記第2の所定文字数から1まで前記第2の所定文字数から1までのうち整数Mについての検索処理を、当該検索処理において前記整数M−2文字一致した反転文字列が存在しないと判断された直後を除き実施するステップと、
を含み、
前記検索処理が、
前記検索文字列における整数M文字以降の文字の順番を入れ替えた検索キーの前方一致検索を、前記第1のデータ格納部に格納されている前記整数Mについての前記第2の検索用データに対して行って、前記第2の所定文字数以上前方一致する反転文字列を検出し、検出された前記反転文字列に対応する前記検索対象文字列の識別子を前記第2のデータ格納部に格納し、前記整数M−2文字一致した反転文字列が存在するか否かを判断する処理
であり、コンピュータにより実行される検索処理方法。
For the first character string for the search target character string and the inverted character string in which the order of the characters after the N characters in each search target character string is changed for each of the integer N that is greater than or equal to the first predetermined number of characters. The first search data stored in the first data storage unit storing the second search data is subjected to a forward match search of the search character string, and the front matches by a predetermined number of characters or more. Detecting a search target character string and storing the detected identifier of the search target character string in a second data storage unit;
From the second predetermined number of characters to 1, the search processing for the integer M out of the second predetermined number of characters to 1 is determined that there is no inverted character string that matches the integer M-2 characters in the search processing. The steps to perform except immediately after,
Including
The search process
A forward match search of a search key in which the order of characters after the integer M characters in the search character string is changed is performed on the second search data for the integer M stored in the first data storage unit. And detecting an inverted character string that matches the second predetermined number of characters or more forward, and storing the identifier of the search target character string corresponding to the detected inverted character string in the second data storage unit, A search processing method executed by a computer for determining whether or not there is an inverted character string that matches the integer M-2 characters.
検索対象文字列の第1の検索用データと、1以上第1の所定文字数以下の整数Nの各々について各前記検索対象文字列におけるN文字以降の文字の順番を入れ替えた反転文字列についての第2の検索用データとを格納する第1のデータ格納部に格納されている前記第1の検索用データに対して検索文字列の前方一致検索を行って、第2の所定文字数以上前方一致する検索対象文字列を検出し、検出された前記検索対象文字列の識別子を第2のデータ格納部に格納するステップと、
前記第2の所定文字数から1まで前記第2の所定文字数から1までのうち整数Mについての検索処理を、当該検索処理において前記整数M−2文字一致した反転文字列が存在しないと判断された直後を除き実施するステップと、
をコンピュータに実行させ、
前記検索処理が、
前記検索文字列における整数M文字以降の文字の順番を入れ替えた検索キーの前方一致検索を、前記第1のデータ格納部に格納されている前記整数Mについての前記第2の検索用データに対して行って、前記第2の所定文字数以上前方一致する反転文字列を検出し、検出された前記反転文字列に対応する前記検索対象文字列の識別子を前記第2のデータ格納部に格納し、前記整数M−2文字一致した反転文字列が存在するか否かを判断する処理
である検索処理プログラム。
For the first character string for the search target character string and the inverted character string in which the order of the characters after the N characters in each search target character string is changed for each of the integer N that is greater than or equal to the first predetermined number of characters. The first search data stored in the first data storage unit storing the second search data is subjected to a forward match search of the search character string, and the front matches by a predetermined number of characters or more. Detecting a search target character string and storing the detected identifier of the search target character string in a second data storage unit;
From the second predetermined number of characters to 1, the search processing for the integer M out of the second predetermined number of characters to 1 is determined that there is no inverted character string that matches the integer M-2 characters in the search processing. The steps to perform except immediately after,
To the computer,
The search process
A forward match search of a search key in which the order of characters after the integer M characters in the search character string is changed is performed on the second search data for the integer M stored in the first data storage unit. And detecting an inverted character string that matches the second predetermined number of characters or more forward, and storing the identifier of the search target character string corresponding to the detected inverted character string in the second data storage unit, A search processing program for determining whether or not there is an inverted character string that matches the integer M-2 characters.
JP2011055019A 2011-03-14 2011-03-14 SEARCH DEVICE, PROGRAM, AND METHOD Expired - Fee Related JP5614338B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011055019A JP5614338B2 (en) 2011-03-14 2011-03-14 SEARCH DEVICE, PROGRAM, AND METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011055019A JP5614338B2 (en) 2011-03-14 2011-03-14 SEARCH DEVICE, PROGRAM, AND METHOD

Publications (2)

Publication Number Publication Date
JP2012190379A true JP2012190379A (en) 2012-10-04
JP5614338B2 JP5614338B2 (en) 2014-10-29

Family

ID=47083430

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011055019A Expired - Fee Related JP5614338B2 (en) 2011-03-14 2011-03-14 SEARCH DEVICE, PROGRAM, AND METHOD

Country Status (1)

Country Link
JP (1) JP5614338B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06274545A (en) * 1993-03-23 1994-09-30 Nec Software Ltd Retrieval system
US5956705A (en) * 1996-10-30 1999-09-21 Oracle Corporation Reverse-byte indexing
JP2002007411A (en) * 2000-06-21 2002-01-11 Hitachi Ltd Information retrieving method, its executing device and recording medium in which its processing program is recorded
JP2005165598A (en) * 2003-12-02 2005-06-23 Nec Corp Device and method for searching variable-length character string, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06274545A (en) * 1993-03-23 1994-09-30 Nec Software Ltd Retrieval system
US5956705A (en) * 1996-10-30 1999-09-21 Oracle Corporation Reverse-byte indexing
JP2002007411A (en) * 2000-06-21 2002-01-11 Hitachi Ltd Information retrieving method, its executing device and recording medium in which its processing program is recorded
JP2005165598A (en) * 2003-12-02 2005-06-23 Nec Corp Device and method for searching variable-length character string, and program

Also Published As

Publication number Publication date
JP5614338B2 (en) 2014-10-29

Similar Documents

Publication Publication Date Title
CN110162750B (en) Text similarity detection method, electronic device and computer readable storage medium
CN101398820B (en) Large scale key word matching method
JP5746426B2 (en) Discovery of index documents
CN101950312B (en) Method for analyzing webpage content of internet
Zhang et al. Efficient partial-duplicate detection based on sequence matching
US20100313258A1 (en) Identifying synonyms of entities using a document collection
JP2009104591A (en) Web document clustering method and system
TW201027375A (en) Search system, search method and program
CN110750731B (en) Method and system for removing duplicate of news public opinion
CN112307366B (en) Information display method and device and computer storage medium
JP2007034777A (en) Data retrieval device and method, and computer program
CN111737966B (en) Document repetition detection method, device, equipment and readable storage medium
CN113986950A (en) SQL statement processing method, device, equipment and storage medium
CN105404677A (en) Tree structure based retrieval method
CN108388556B (en) Method and system for mining homogeneous entity
US8594239B2 (en) Estimating document similarity using bit-strings
JP2010182238A (en) Citation detection device, device and method for creating original document database, program and recording medium
CN116226681B (en) Text similarity judging method and device, computer equipment and storage medium
US9600565B2 (en) Data structure, index creation device, data search device, index creation method, data search method, and computer-readable recording medium
JP5179564B2 (en) Query segment position determination device
CN108776705B (en) Text full-text accurate query method, device, equipment and readable medium
JP5614338B2 (en) SEARCH DEVICE, PROGRAM, AND METHOD
CN105426490A (en) Tree structure based indexing method
CN113420219A (en) Method and device for correcting query information, electronic equipment and readable storage medium
JP5585489B2 (en) Search support apparatus, program and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131129

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140425

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140507

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140707

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140825

R150 Certificate of patent or registration of utility model

Ref document number: 5614338

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees