JP2014238863A - Retrieval apparatus, retrieval method, and retrieval program - Google Patents

Retrieval apparatus, retrieval method, and retrieval program Download PDF

Info

Publication number
JP2014238863A
JP2014238863A JP2014155577A JP2014155577A JP2014238863A JP 2014238863 A JP2014238863 A JP 2014238863A JP 2014155577 A JP2014155577 A JP 2014155577A JP 2014155577 A JP2014155577 A JP 2014155577A JP 2014238863 A JP2014238863 A JP 2014238863A
Authority
JP
Japan
Prior art keywords
data
state
character
processing unit
machine construction
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
JP2014155577A
Other languages
Japanese (ja)
Other versions
JP6055441B2 (en
Inventor
達哉 浅井
Tatsuya Asai
達哉 浅井
多湖 真一郎
Shinichiro Tako
真一郎 多湖
岡本 青史
Seishi Okamoto
青史 岡本
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 JP2014155577A priority Critical patent/JP6055441B2/en
Publication of JP2014238863A publication Critical patent/JP2014238863A/en
Application granted granted Critical
Publication of JP6055441B2 publication Critical patent/JP6055441B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To accurately extract data corresponding to a retrieval condition from compressed data while keeping the compressed data.SOLUTION: When compressing document data, a compression processing part 10a compresses the document data, by converting character strings included in the document data and break characters included in the document data into codes, separately. Since the compressed document data are compressed separately for the character strings and the segmentation characters, a retrieval processing part 10c can obtain proper retrieval result even if the compressed data is extracted as it is, on the basis of a retrieval expression.

Description

本発明は、検索装置等に関する。   The present invention relates to a search device and the like.

近年、圧縮されたデータから、検索対象のレコードや項目を、圧縮されたままの状態で抽出する技術が考案されている。このように、圧縮されたままの状態でレコードや項目を抽出する技術を圧縮データ抽出と表記する。また、圧縮されたデータを圧縮データ、圧縮される前のデータを元データと表記する。   In recent years, a technique has been devised for extracting records and items to be searched from compressed data in a compressed state. Thus, a technique for extracting records and items in a compressed state is referred to as compressed data extraction. Further, the compressed data is referred to as compressed data, and the data before being compressed is referred to as original data.

圧縮データ抽出を利用すれば、圧縮データを解凍する必要がないので、データ領域を節約できる。また、特定の圧縮方式を用いることで、ACマシン(Aho-Corasick machines)等のスキャン系のアルゴリズムは、元データを検索するよりも圧縮データを検索するほうが高速に検索を行うことができる。   If the compressed data extraction is used, it is not necessary to decompress the compressed data, so that the data area can be saved. In addition, by using a specific compression method, a scan-type algorithm such as an AC machine (Aho-Corasick machines) can search at a higher speed when searching for compressed data than when searching for original data.

図49は、従来の圧縮データ抽出の基本アイデアを説明するための図である。前提条件として、図49の元データ10aは、BPE(Byte Pair Encoding)圧縮技術により、圧縮データ10bに圧縮されているものとする。従来の圧縮データ抽出では、抽出条件が指定された場合に、抽出条件に対応するキーワードの出現位置を特定する。そして、圧縮データ抽出では、キーワードの出現位置に含まれるレコード・項目・要素等を、圧縮データからそのまま切出して出力する。   FIG. 49 is a diagram for explaining the basic idea of conventional compressed data extraction. As a precondition, it is assumed that the original data 10a in FIG. 49 is compressed into compressed data 10b by BPE (Byte Pair Encoding) compression technology. In conventional compressed data extraction, when an extraction condition is specified, the appearance position of a keyword corresponding to the extraction condition is specified. In the compressed data extraction, records, items, elements, and the like included in the keyword appearance positions are extracted from the compressed data as they are and output.

例えば、抽出条件「ENTRY/DDB/update-data[./=19990205]」が指定されたとする。かかる抽出条件の意味は、「19990205」を含むupdate-data要素を抽出せよという意味である。従来の圧縮データ抽出では、既存の圧縮検索技術を用いて、抽出条件に対応するキーワードの出現位置を特定すると、キーワードの出現位置は、圧縮データ10bの「<up・宛・0205益p・飲」となる。そして、従来の圧縮データ検出では、検索結果として、「<up・宛・0205益p・飲」をそのまま出力する。なお、検索処理の過程において、元データ10aに対するアクセスは一切発生しない。   For example, assume that the extraction condition “ENTRY / DDB / update-data [./= 19990205]” is designated. The meaning of the extraction condition is to extract the update-data element including “19990205”. In the conventional compressed data extraction, when the keyword appearance position corresponding to the extraction condition is specified using the existing compression search technique, the keyword appearance position is “<up · address · 0205 profit p · drinking” of the compressed data 10b. " In the conventional compressed data detection, “<up · address · 0205 profit p · drink” is output as it is as a search result. In the search process, no access to the original data 10a occurs.

ところで、データを圧縮する技術として、テキストデータを圧縮する途中で任意の位置に区切り記号を挿入する技術が公開されている。任意の位置に区切り記号を挿入することで、解凍時に、文字列全体を解凍することなく、区切り記号で挟まれた部分文字列のみを解凍することで、処理負荷を軽減することが出来る。   By the way, as a technique for compressing data, a technique for inserting a delimiter at an arbitrary position in the middle of compressing text data has been disclosed. By inserting a delimiter at an arbitrary position, the processing load can be reduced by decompressing only the partial character string sandwiched between delimiters without decompressing the entire character string.

また、画像圧縮法に関する技術ではあるが、画像を所定の領域毎に分割し、分割した画像の領域部分と、分割した画像の境界部分を独立して圧縮する技術も知られている。領域部分と境界部分を独立して圧縮することで、画像を全て解凍することなく、所望する領域の画像データを抽出することが可能となる。   In addition, as a technique related to an image compression method, a technique is also known in which an image is divided into predetermined areas, and an area portion of the divided image and a boundary portion of the divided image are independently compressed. By compressing the region portion and the boundary portion independently, it is possible to extract image data of a desired region without decompressing all the images.

特開2000−22552号公報JP 2000-22552 A 特開2008−113267号公報JP 2008-113267 A

T.Kida,T.Matsumoto,M.Takeda,A.Shinohara,and S.Arikawa.Multiple pattern matching algorithms on collage system,In Proc.12th Annual Symposium on Combinatorial Pattern Matching(CPM2001)T.Kida, T.Matsumoto, M.Takeda, A.Shinohara, and S.Arikawa.Multiple pattern matching algorithms on collage system, In Proc.12th Annual Symposium on Combinatorial Pattern Matching (CPM2001) M.Takeda,S.Miyamoto,T.Kida,A.Shinohara,S.Fukamachi,T.Shinohara,and S.Arikawa.Processing Text Files as Is:Pattern Matching over Compressed Texts,Multi-Byte Character Texts,and Semi-Structured Texts.In Proc.9th International Symposium on String Processing and Information Retrieval(SPIRE2002)M.Takeda, S.Miyamoto, T.Kida, A.Shinohara, S.Fukamachi, T.Shinohara, and S.Arikawa.Processing Text Files as Is: Pattern Matching over Compressed Texts, Multi-Byte Character Texts, and Semi- Structured Texts. In Proc. 9th International Symposium on String Processing and Information Retrieval (SPIRE2002)

元データをそのまま圧縮データに圧縮すると、レコード・項目・要素とXML(Extensible Markup Language)タグなどの区切り文字をまとめて別の符号に置き換えてしまう場合がある。このようにデータの区切り文字を意識しないで圧縮した場合には、抽出条件に対応したデータを圧縮データのまま抽出することができないという問題があった。   If the original data is directly compressed into compressed data, delimiters such as records, items, elements, and XML (Extensible Markup Language) tags may be collectively replaced with another code. As described above, when compression is performed without considering the data delimiter, there is a problem that data corresponding to the extraction condition cannot be extracted as compressed data.

例えば、図49の圧縮データ10bにおいて、「飲」に対応する圧縮前のデータを「><」とすると、抽出条件「ENTRY/DDB/update-data[./=19990205]」が指定された場合に、検索結果「<up・宛・0205益p・飲」が検索結果として出力される。かかる検索結果を解凍すると、「<update-date>19990202</update-date><」となり、正しい検索結果にはならない。   For example, in the compressed data 10b of FIG. 49, when the pre-compression data corresponding to “drink” is “> <”, the extraction condition “ENTRY / DDB / update-data [./= 19990205]” is specified. In addition, the search result “<up / address / 0205 profit / drink” is output as the search result. When the search result is decompressed, “<update-date> 19990202 </ update-date> <” is obtained, and the search result is not correct.

抽出条件「ENTRY/DDB/update-data[./=19990205]」が指定された場合の、解凍後の正しい検索結果は、「<update-date>19990202</update-date>」である。正しくない検索結果を、XMLデータ処理系に入力するとエラーになってしまう。   When the extraction condition “ENTRY / DDB / update-data [./= 19990205]” is specified, the correct search result after decompression is “<update-date> 19990202 </ update-date>”. If an incorrect search result is input to the XML data processing system, an error occurs.

検索結果「<up・宛・0205益p・飲」を解凍し、正しい検索結果「<update-date>19990202</update-date>」となるように、検索結果を修正すれば、正しい検索結果を得ることが出来るが、余計な計算コストが必要になってしまう。   Decompress the search result "<up / address / 0205 profit p / drink" and correct the search result so that the correct search result is <update-date> 19990202 </ update-date>. Can be obtained, but an extra calculation cost is required.

ここで、従来技術を利用して、データを圧縮する場合に、区切り記号を挿入すれば、レコード・項目・要素と区切り文字を区別できるので、抽出条件に対応したデータを圧縮データのまま抽出することが可能となる。しかし、その一方で、区切り文字毎に区切り記号を挿入すると、圧縮データのデータ量が増大してしまうため、実用的ではない。   Here, when data is compressed using conventional technology, if a delimiter is inserted, the record / item / element can be distinguished from the delimiter, so the data corresponding to the extraction condition is extracted as compressed data. It becomes possible. However, if a delimiter is inserted for each delimiter, the amount of compressed data increases, which is not practical.

また、データを圧縮する場合に、境界部分を独立して圧縮すれば、レコード・項目・要素と区切り文字を区別できるので、データ量を増大させることなく、抽出条件に対応したデータを圧縮データのまま抽出することが可能となる。しかし、境界部分を独立して圧縮する技術は、境界部分とその他の領域が固定されている場合にのみ適応可能であるため、レコード・項目・要素と区切り文字が無作為に含まれている元データに対してかかる圧縮技術を適用することは難しい。   In addition, when compressing data, if the boundary part is compressed independently, the record / item / element can be distinguished from the delimiter, so the data corresponding to the extraction condition can be transferred to the compressed data without increasing the amount of data. It is possible to extract as it is. However, the technology that compresses the boundary part independently is applicable only when the boundary part and other areas are fixed, so the source that contains records, items, elements, and delimiters at random. It is difficult to apply such compression techniques to data.

圧縮データから検索条件に対応したデータを、圧縮したままで正確に抽出することができる検索装置、検索方法および検索プログラムを提供することを目的とする。   It is an object of the present invention to provide a search device, a search method, and a search program that can accurately extract data corresponding to a search condition from compressed data while being compressed.

第1の案では、第1のデータと、前記第1のデータの属性を示す第2のデータと、を含むデータのうち、少なくとも第2のデータを、第2のデータよりも小さいサイズの符号化データに置換した置換データから、指定のデータを検索する検索装置であって、指定のデータの属性を示すデータを含む検索条件を受け付けた場合、第2のデータの置換前後の関係を記憶する記憶部を参照し、指定のデータの属性を示すデータを符号化データに置換する置換処理部と、指定のデータの属性を示す前記データが符号化データに置換された検索条件を用いて、置換データから検索条件により特定される置換データ上の領域に含まれるデータを取得する検索処理部とを有することを特徴とする。   In the first proposal, among the data including the first data and the second data indicating the attribute of the first data, at least the second data is encoded with a code smaller in size than the second data. When a search condition including data indicating the attribute of the specified data is received from the replacement data replaced with the digitized data, the search device stores the relationship before and after the replacement of the second data. Replace with reference to the storage unit, a replacement processing unit that replaces the data indicating the attribute of the specified data with the encoded data, and a search condition in which the data indicating the attribute of the specified data is replaced with the encoded data And a search processing unit that acquires data included in an area on replacement data specified by a search condition from the data.

本発明によれば、圧縮データから検索条件に対応したデータを、圧縮したままで正確に抽出することができる。   According to the present invention, data corresponding to a search condition can be accurately extracted from compressed data while being compressed.

図1は、本実施例1にかかる検索システムの構成を示す図である。FIG. 1 is a diagram illustrating the configuration of the search system according to the first embodiment. 図2は、本実施例2にかかる検索装置の構成を示す図である。FIG. 2 is a diagram illustrating the configuration of the search device according to the second embodiment. 図3は、XMLデータのデータ構造の一例を示す図である。FIG. 3 is a diagram illustrating an example of the data structure of XML data. 図4は、符号化データのデータ構造の一例を示す図である。FIG. 4 is a diagram illustrating an example of a data structure of encoded data. 図5は、対応表のデータ構造の一例を示す図である。FIG. 5 is a diagram illustrating an example of the data structure of the correspondence table. 図6は、ACマシンのデータ構造の一例を示す図である。FIG. 6 is a diagram illustrating an example of the data structure of the AC machine. 図7は、状態構造体のデータ構造の一例を示す図である。FIG. 7 is a diagram illustrating an example of the data structure of the state structure. 図8は、圧縮辞書データのデータ構造の一例を示す図である。FIG. 8 is a diagram illustrating an example of a data structure of compression dictionary data. 図9は、圧縮データ用ACマシンのデータ構造の一例を示す図である。FIG. 9 is a diagram illustrating an example of a data structure of the compressed data AC machine. 図10は、文字列圧縮の動作例を示す図である。FIG. 10 is a diagram illustrating an operation example of character string compression. 図11は、文字列圧縮済みデータのデータ構造の一例を示す図である。FIG. 11 is a diagram illustrating an example of a data structure of character string compressed data. 図12は、トライT構築処理を説明するための図(1)である。FIG. 12 is a diagram (1) for explaining the tri-T construction process. 図13は、トライT構築処理を説明するための図(2)である。FIG. 13 is a diagram (2) for explaining the tri-T construction process. 図14は、トライT構築処理を説明するための図(3)である。FIG. 14 is a diagram (3) for explaining the tri-T construction process. 図15は、フェイラ遷移追加処理を説明するための図(1)である。FIG. 15 is a diagram (1) for explaining the failer transition addition process. 図16は、フェイラ遷移追加処理を説明するための図(2)である。FIG. 16 is a diagram (2) for explaining the failer transition addition process. 図17は、フェイラ遷移追加処理を説明するための図(3)である。FIG. 17 is a diagram (3) for explaining the failer transition addition process. 図18は、フェイラ遷移追加処理を説明するための図(4)である。FIG. 18 is a diagram (4) for explaining the failer transition addition process. 図19は、フェイラ遷移追加処理を説明するための図(5)である。FIG. 19 is a diagram (5) for explaining the failer transition addition process. 図20は、フェイラ遷移追加処理を説明するための図(6)である。FIG. 20 is a diagram (6) for explaining the failer transition addition process. 図21は、フェイラ遷移追加処理を説明するための図(7)である。FIG. 21 is a diagram (7) for explaining the failer transition addition process. 図22は、フェイラ遷移追加処理を説明するための図(8)である。FIG. 22 is a diagram (8) for explaining the failer transition addition process. 図23は、フェイラ遷移追加処理を説明するための図(9)である。FIG. 23 is a diagram (9) for explaining the failer transition addition process. 図24は、圧縮データ用ACマシン構築処理を説明するための図(1)である。FIG. 24 is a diagram (1) for explaining the compressed data AC machine construction processing. 図25は、圧縮データ用ACマシン構築処理を説明するための図(2)である。FIG. 25 is a diagram (2) for explaining the compressed data AC machine construction processing. 図26は、圧縮データ用ACマシン構築処理を説明するための図(3)である。FIG. 26 is a diagram (3) for explaining the compressed data AC machine construction processing. 図27は、照合処理を説明するための図(1)である。FIG. 27 is a diagram (1) for explaining the collation processing. 図28は、照合処理を説明するための図(2)である。FIG. 28 is a diagram (2) for explaining the collation processing. 図29は、照合処理を説明するための図(3)である。FIG. 29 is a diagram (3) for explaining the collation processing. 図30は、照合処理を説明するための図(4)である。FIG. 30 is a diagram (4) for explaining the collation processing. 図31は、照合処理を説明するための図(5)である。FIG. 31 is a diagram (5) for explaining the collation processing. 図32は、照合処理を説明するための図(6)である。FIG. 32 is a diagram (6) for explaining the collation processing. 図33は、圧縮処理の処理手順を示すフローチャートである。FIG. 33 is a flowchart illustrating a processing procedure of compression processing. 図34は、文字列計数処理の処理手順を示すフローチャートである。FIG. 34 is a flowchart showing the procedure of the character string counting process. 図35は、辞書構築・文字列置換処理の処理手順を示すフローチャートである。FIG. 35 is a flowchart showing a processing procedure of dictionary construction / character string replacement processing. 図36は、タグ名置換処理の処理手順を示すフローチャートである。FIG. 36 is a flowchart illustrating a processing procedure of tag name replacement processing. 図37は、構築処理の処理手順を示すフローチャートである。FIG. 37 is a flowchart illustrating the processing procedure of the construction processing. 図38は、抽出条件受け付け処理の処理手順を示すフローチャートである。FIG. 38 is a flowchart illustrating the processing procedure of the extraction condition reception processing. 図39は、ACマシン構築処理の処理手順を示すフローチャートである。FIG. 39 is a flowchart showing the processing procedure of the AC machine construction processing. 図40は、ΠのトライTを構築する処理の処理手順を示すフローチャートである。FIG. 40 is a flowchart illustrating a processing procedure of processing for constructing a cocoon tri-T. 図41は、パターン登録処理の処理手順を示すフローチャートである。FIG. 41 is a flowchart showing a processing procedure of pattern registration processing. 図42は、トライ(Π)にフェイラ遷移を追加する処理の処理手順を示すフローチャート(1)である。FIG. 42 is a flowchart (1) illustrating a processing procedure of processing for adding a failer transition to a trie (Π). 図43は、トライ(Π)にフェイラ遷移を追加する処理の処理手順を示すフローチャート(2)である。FIG. 43 is a flowchart (2) illustrating a processing procedure of a process of adding a failer transition to a trie (Π). 図44は、ACマシンAC(Π)にスキップ遷移を追加する処理の処理手順を示すフローチャートである。FIG. 44 is a flowchart of a process procedure for adding a skip transition to the AC machine AC (Π). 図45は、第1のスキップ遷移作成処理の処理手順を示すフローチャートである。FIG. 45 is a flowchart of a process procedure of the first skip transition creation process. 図46は、第2のスキップ遷移作成処理の処理手順を示すフローチャートである。FIG. 46 is a flowchart showing the processing procedure of the second skip transition creation processing. 図47は、切出し位置計算処理の処理手順を示すフローチャートである。FIG. 47 is a flowchart showing the processing procedure of the extraction position calculation process. 図48は、実施例にかかる検索装置を構成するコンピュータのハードウェア構成を示す図である。FIG. 48 is a diagram illustrating a hardware configuration of a computer constituting the search device according to the embodiment. 図49は、従来の圧縮データ抽出の基本アイデアを説明するための図である。FIG. 49 is a diagram for explaining the basic idea of conventional compressed data extraction.

以下に、本願の開示する検索装置、検索方法および検索プログラムの実施例を図面に基づいて詳細に説明する。なお、この実施例によりこの発明が限定されるものではない。   Embodiments of a search device, a search method, and a search program disclosed in the present application will be described below in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.

図1は、本実施例1にかかる検索システムの構成を示す図である。図1に示すように、この検索装置10は、圧縮処理部10a、置換処理部10b、検索処理部10cを有する。このうち、圧縮処理部10aは、データの属性を示す区切情報により各データが区切られたデータ集合を取得し、当該データ集合に含まれるデータに基づき符号化データに置換し、さらに、該データの属性を示す区切情報のみに基づき符号化データに置換することでデータ集合を圧縮する処理部である。   FIG. 1 is a diagram illustrating the configuration of the search system according to the first embodiment. As shown in FIG. 1, the search device 10 includes a compression processing unit 10a, a replacement processing unit 10b, and a search processing unit 10c. Among these, the compression processing unit 10a acquires a data set in which each data is divided by the division information indicating the attribute of the data, replaces the data set with encoded data based on the data included in the data set, and further, It is a processing unit that compresses a data set by replacing with encoded data based only on delimiter information indicating attributes.

置換処理部10bは、圧縮処理部10aにより圧縮されたデータ集合を対象に、検索すべき属性およびデータを有する検索条件を取得した場合に、圧縮されたデータ集合の区切情報と置換前の区切情報の関係に基づいて、検索条件の属性を符号化データに置換する処理部である。   When the replacement processing unit 10b obtains a search condition having attributes and data to be searched for the data set compressed by the compression processing unit 10a, the replacement processing unit 10b and the partition information before replacement The processing unit replaces the attribute of the search condition with the encoded data based on the relationship.

検索処理部10cは、検索条件の属性を符号化データに置換された検索条件と圧縮されたデータ集合を基にして、検索条件に指定される前記圧縮されたデータ集合上の領域を特定し、特定した領域に含まれるデータを出力する。   The search processing unit 10c specifies an area on the compressed data set specified in the search condition based on the search condition in which the attribute of the search condition is replaced with the encoded data and the compressed data set, Output data contained in the specified area.

上述した検索システム10によれば、圧縮処理部10aが、データ集合を圧縮する場合に、データ集合に含まれる区切情報に基づきデータ集合を圧縮する。圧縮されたデータ集合は、区切情報に基づき圧縮されているので、検索処理部10cは、検索条件に基づいて、圧縮データをそのまま切出しても、正確な検索結果を得ることが出来る。   According to the search system 10 described above, when the compression processing unit 10a compresses the data set, the data set is compressed based on the delimiter information included in the data set. Since the compressed data set is compressed based on the delimiter information, the search processing unit 10c can obtain an accurate search result even if the compressed data is extracted as it is based on the search condition.

図2は、本実施例2にかかる検索装置の構成を示す図である。図2に示すように、この検索装置100は、入力部110、出力部120、通信制御IF部130、入出力制御IF部140、記憶部150、制御部160を有する。なお、検索装置100は、ネットワークを介して端末装置(図示略)に接続する。   FIG. 2 is a diagram illustrating the configuration of the search device according to the second embodiment. As illustrated in FIG. 2, the search device 100 includes an input unit 110, an output unit 120, a communication control IF unit 130, an input / output control IF unit 140, a storage unit 150, and a control unit 160. The search device 100 is connected to a terminal device (not shown) via a network.

入力部110は、各種の情報を入力する入力部であり、キーボードやマウス、マイクなどを含む。また、後述するモニタ(出力部120)も、マウスと協働してポインティングデバイス機能を実現する。   The input unit 110 is an input unit that inputs various types of information, and includes a keyboard, a mouse, a microphone, and the like. In addition, a monitor (output unit 120), which will be described later, also realizes a pointing device function in cooperation with the mouse.

出力部120は、各種の情報を出力する出力部であり、モニタ(若しくはディスプレイ、タッチパネル)やスピーカ等を含む。通信制御IF部130は、端末装置(図示略)との間における通信を制御する処理部である。入出力制御IF部140は、入力部110、出力部120、通信制御IF部130、記憶部150、制御部160によるデータの入出力を制御する手段である。   The output unit 120 is an output unit that outputs various types of information, and includes a monitor (or display, touch panel), a speaker, and the like. The communication control IF unit 130 is a processing unit that controls communication with a terminal device (not shown). The input / output control IF unit 140 is a unit that controls input / output of data by the input unit 110, the output unit 120, the communication control IF unit 130, the storage unit 150, and the control unit 160.

記憶部150は、制御部160による各種処理に必要なデータおよびプログラムを記憶する記憶部である。この記憶部150は、XMLデータ150a、符号化データ150b、対応表150c、ACマシン150d、圧縮辞書150e、圧縮データ用ACマシン150f、抽出条件150g、変換後抽出条件150hを有する。   The storage unit 150 is a storage unit that stores data and programs necessary for various processes performed by the control unit 160. The storage unit 150 includes XML data 150a, encoded data 150b, correspondence table 150c, AC machine 150d, compression dictionary 150e, compressed data AC machine 150f, extraction condition 150g, and post-conversion extraction condition 150h.

XMLデータ150aは、要素識別子「<」、「</」等により要素が区切られた階層構造を有する文書データである。図3は、XMLデータのデータ構造の一例を示す図である。符号化データ150bは、圧縮されたXMLデータである。図4は、符号化データ150bのデータ構造の一例を示す図である。   The XML data 150a is document data having a hierarchical structure in which elements are separated by element identifiers “<”, “</”, and the like. FIG. 3 is a diagram illustrating an example of the data structure of XML data. The encoded data 150b is compressed XML data. FIG. 4 is a diagram illustrating an example of the data structure of the encoded data 150b.

対応表150cは、XMLデータ150aのタグ名と、このタグ名に対応する符号を対応付けたテーブルである。図5は、対応表150cのデータ構造の一例を示す図である。   The correspondence table 150c is a table in which the tag name of the XML data 150a is associated with the code corresponding to the tag name. FIG. 5 is a diagram illustrating an example of the data structure of the correspondence table 150c.

ACマシン150dは、有限個の状態と遷移の組合せを含むデータである。かかるACマシン150dに、テキストデータ(文字列)を入力することで、テキストデータに特定のキーワードが含まれているか否かを照合することが出来る。図6は、ACマシン150dのデータ構造の一例を示す図である。このACマシン150dは、テキストデータに、キーワードAC、BA、BB、BAA、BACDが含まれているか否かを照合するACマシンを示している。   The AC machine 150d is data including a combination of a finite number of states and transitions. By inputting text data (character string) to the AC machine 150d, it is possible to collate whether or not a specific keyword is included in the text data. FIG. 6 is a diagram illustrating an example of the data structure of the AC machine 150d. The AC machine 150d is an AC machine that collates whether or not the keywords AC, BA, BB, BAA, and BACD are included in the text data.

図6に示すように、ACマシン150dは状態0〜8を有している。各状態は、初期状態、通常状態、照合状態に分類される。初期状態は、初めにテキストデータと照合される状態である。通常状態は、2番目以降にテキストデータと照合される状態である。照合状態は、テキストデータが特定のキーワードにヒットした場合に遷移する状態である。図6に示す例では、初期状態を状態1とし、通常状態を状態1,3とし、照合状態を状態2,4〜8とする。   As shown in FIG. 6, AC machine 150d has states 0-8. Each state is classified into an initial state, a normal state, and a collation state. The initial state is a state in which text data is first collated. The normal state is a state that is collated with text data after the second. The collation state is a state that transitions when the text data hits a specific keyword. In the example shown in FIG. 6, the initial state is state 1, the normal state is states 1 and 3, and the collation state is states 2 and 4-8.

ACマシンは、テキストデータの文字を初期状態0から順次照合し、通常遷移とフェイラ(Failure)遷移を繰り返すことで、テキストデータに含まれるキーワードを判定する。ここで、通常遷移は、照合対象となる状態において、テキストデータの比較対象となる文字による遷移先が存在する場合の遷移を示す。例えば、状態1において、テキストデータの比較対象となる文字がCの場合には、通常遷移となる。テキストデータの文字がCの場合には、状態1から状態2に通常遷移する。   The AC machine sequentially checks the characters of the text data from the initial state 0, and repeats the normal transition and the failure transition to determine the keyword included in the text data. Here, the normal transition indicates a transition when there is a transition destination by a character to be compared with text data in a state to be collated. For example, in state 1, when the character to be compared with text data is C, a normal transition is made. When the character of the text data is C, a normal transition is made from state 1 to state 2.

一方、通常遷移の条件に該当しない場合には、フェイラ遷移となる。例えば、状態1において、テキストデータの比較対象となる文字がC以外の場合には、フェイラ遷移となる。状態1においてフェイラ遷移した場合には、状態0となる。ACマシンには、各状態に1本ずつ存在する。図6で省略されているフェイラ遷移は、全て初期状態0に向かっているものとする。   On the other hand, if the conditions for the normal transition are not met, a failer transition occurs. For example, in the state 1, when the character to be compared with the text data is other than C, a failer transition is made. When a failer transition occurs in state 1, state 0 is entered. There is one AC machine in each state. It is assumed that the failer transitions omitted in FIG. 6 are all directed to the initial state 0.

ここで、図6に示したACマシンが有する状態(状態構造体)のデータ構造について説明する。図7は、状態構造体のデータ構造の一例を示す図である。図7に示すように、この状態構造体は、各状態を識別する状態IDと、パターンリストと、通常遷移先へのポインタと、通常遷移先へのポインタと、フェイラ遷移先へのポインタを有する。   Here, a data structure of a state (state structure) included in the AC machine shown in FIG. 6 will be described. FIG. 7 is a diagram illustrating an example of the data structure of the state structure. As shown in FIG. 7, this state structure has a state ID for identifying each state, a pattern list, a pointer to a normal transition destination, a pointer to a normal transition destination, and a pointer to a failer transition destination. .

このうち、パターンリストは、初期状態0から遷移先の状態までの文字列を格納する。そして、パターンリストは、該当する通常遷移先へのポインタに対応付けられている。例えば、状態1の状態構造体において、状態1から状態2に遷移する通常遷移先のポインタがg[1]に格納されている場合には、plist[1]に初期状態0から状態2までの文字列「AC」が格納される。   Among these, the pattern list stores character strings from the initial state 0 to the transition destination state. The pattern list is associated with a pointer to the corresponding normal transition destination. For example, in the state structure of state 1, if the pointer of the normal transition destination that transitions from state 1 to state 2 is stored in g [1], plist [1] contains the initial state 0 to state 2 The character string “AC” is stored.

圧縮辞書データ150eは、文字の組と、この文字の組に対応付けられた符号を対応付けたテーブルである。図8は、圧縮辞書データ150eのデータ構造の一例を示す図である。例えば、図8に示すように、文字B,Aのペアは、符号Xに対応する。かかる圧縮辞書データ150eは、ACマシン150dから圧縮データ用ACマシン150fを生成する場合に利用する。   The compression dictionary data 150e is a table in which character sets are associated with codes associated with the character sets. FIG. 8 is a diagram illustrating an example of the data structure of the compressed dictionary data 150e. For example, as shown in FIG. 8, a pair of characters B and A corresponds to the code X. The compressed dictionary data 150e is used when generating the compressed data AC machine 150f from the AC machine 150d.

圧縮データ用ACマシン150fは、圧縮されたデータに特定のキーワードが含まれるか否かを照合するべく、ACマシン150dにスキップ遷移を加えたACマシンである。図9は、圧縮データ用ACマシン150fのデータ構造の一例を示す図である。   The compressed data AC machine 150f is an AC machine in which a skip transition is added to the AC machine 150d in order to check whether or not a specific keyword is included in the compressed data. FIG. 9 is a diagram illustrating an example of a data structure of the compressed data AC machine 150f.

ここで、スキップ遷移は、状態をスキップする通常遷移である。例えば、照合対象となる状態を状態0とし、圧縮データの比較対象となる文字がXの場合には、状態3をスキップして、状態4に遷移する。   Here, the skip transition is a normal transition that skips the state. For example, if the state to be collated is state 0, and the character to be compared in the compressed data is X, state 3 is skipped and the state transitions to state 4.

抽出条件150gは、XMLデータ150aから抽出するデータの条件である。例えば、抽出条件150gは、「/AAA/BBB="BACD"」となる。ここで、「/AAA/BBB」は、検索位置を指定する項目名である。検索条件「/AAA/BBB="BACD"」は、区切文字「AAA」の下位の階層に存在する区切文字「BBB」に挟まれた文字列のうち、文字列「BACD」を含む文字列を検索する検索条件である。   The extraction condition 150g is a condition for data extracted from the XML data 150a. For example, the extraction condition 150g is “/ AAA / BBB =“ BACD ””. Here, “/ AAA / BBB” is an item name that specifies a search position. The search condition "/ AAA / BBB =" BACD "" is a character string that includes the character string "BACD" among the character strings sandwiched between the delimiter characters "BBB" that exist in the lower hierarchy of the delimiter character "AAA". Search conditions for searching.

変換後抽出条件150hは、対応表150cに基づいて、タグ名を変換された抽出条件である。例えば、変換後抽出条件150hは、「/1/2="BACD"」となる。かかる変換後抽出条件150hに含まれるキーワードに基づいて、ACマシン150dが生成される。   The post-conversion extraction condition 150h is an extraction condition in which a tag name is converted based on the correspondence table 150c. For example, the post-conversion extraction condition 150h is “/ 1/2 =“ BACD ””. The AC machine 150d is generated based on the keyword included in the post-conversion extraction condition 150h.

制御部160は、各種の処理手順を規定したプログラムや制御データを格納するための内部メモリを有し、これらによって種々の処理を実行する制御部である。図2に示すように、制御部160は、データ管理部160a、データ圧縮処理部160b、ACマシン構築部160c、照合処理部160d、切出処理部160eを有する。   The control unit 160 has an internal memory for storing programs defining various processing procedures and control data, and executes various processes using these. As shown in FIG. 2, the control unit 160 includes a data management unit 160a, a data compression processing unit 160b, an AC machine construction unit 160c, a collation processing unit 160d, and a cut-out processing unit 160e.

データ管理部160aは、入力部110、通信制御IF部130からXMLデータ、抽出条件を取得した場合に、取得したXMLデータ、抽出条件を記憶部150に格納する処理部である。   The data management unit 160 a is a processing unit that stores the acquired XML data and extraction conditions in the storage unit 150 when the XML data and extraction conditions are acquired from the input unit 110 and the communication control IF unit 130.

データ圧縮処理部160bは、XMLデータ150aを圧縮して符号化データ150bを生成する処理、および、抽出条件150gを変換して変換後抽出条件150hを生成する処理を実行する処理部である。   The data compression processing unit 160b is a processing unit that executes processing for compressing the XML data 150a to generate encoded data 150b, and processing for converting the extraction condition 150g to generate a post-conversion extraction condition 150h.

まず、XMLデータ150aを圧縮して、符号化データ150bを生成する処理について説明する。この符号化データ150bを生成する処理は、XMLデータ150aのタグに挟まれた文字列を圧縮する処理と、タグ名を置換する処理を有する。   First, processing for compressing the XML data 150a and generating encoded data 150b will be described. The process of generating the encoded data 150b includes a process of compressing a character string sandwiched between tags of the XML data 150a and a process of replacing a tag name.

文字列を圧縮する処理において、データ圧縮処理部160bは文字列を参照し、隣接する長さ2の文字列を特定する。以下の説明において、隣接する長さ2の文字列を文字ペアと表記する。データ圧縮処理部160bは、文字列に含まれる文字ペアの出現数を計数し、出現数が最大となる文字ペアを、未使用文字(符号)に割当てることで、文字列を圧縮する。データ圧縮処理部160bは、文字列に含まれる文字ペアの出現数が計数閾値未満となるまで、上記処理を繰り返し実行する。   In the process of compressing the character string, the data compression processing unit 160b refers to the character string and identifies the adjacent character string of length 2. In the following description, adjacent character strings of length 2 are referred to as character pairs. The data compression processing unit 160b compresses the character string by counting the number of appearances of the character pairs included in the character string and assigning the character pair having the maximum appearance number to unused characters (codes). The data compression processing unit 160b repeatedly executes the above processing until the number of appearances of character pairs included in the character string is less than the count threshold.

図10は、文字列圧縮の動作例を示す図である。図10の説明において、圧縮対象となる文字列を「ABABACBACD」とする。また、計数閾値αを2とし、文字セットを「A,B,C,D,X,Y,Z」とする。データ圧縮処理部160bは、文字列「ABABACBACD」を参照し、文字ペアを特定する。文字列「ABABACBACD」に含まれる文字ペアは、「A,B」、「B,A」、「A,C」、「C,B」、「C,D」となる。   FIG. 10 is a diagram illustrating an operation example of character string compression. In the description of FIG. 10, the character string to be compressed is “ABABACBACD”. Further, the count threshold α is 2, and the character set is “A, B, C, D, X, Y, Z”. The data compression processing unit 160b refers to the character string “ABABACBACD” and identifies a character pair. Character pairs included in the character string “ABABACBACD” are “A, B”, “B, A”, “A, C”, “C, B”, “C, D”.

データ圧縮処理部160bは、文字列と各文字ペアを比較して、各文字ペアの出現数を計数し、計数表に登録する。計数表は、データ圧縮処理部160bが保持しているものとする。文字ペア「A,B」の出現数は2、文字ペア「B,A」の出現数は3、文字ペア「A,C」の出現数は2、文字ペア「C,B」の出現数は1、文字ペア「C,D」の出現数は1となる。ステップS1参照。   The data compression processing unit 160b compares the character string with each character pair, counts the number of appearances of each character pair, and registers it in the counting table. It is assumed that the count table is held by the data compression processing unit 160b. The number of appearances of the character pair “A, B” is 2, the number of appearances of the character pair “B, A” is 3, the number of appearances of the character pair “A, C” is 2, and the number of appearances of the character pair “C, B” is 1. The number of appearances of the character pair “C, D” is 1. See step S1.

続いて、データ圧縮処理部160bは、計数表に登録した各文字ペアのうち、出現数が最大となる文字ペアを特定し、特定した文字ペアに未使用文字を割当てる。文字ペアと未使用文字の関係は、圧縮辞書データ150eに登録する。   Subsequently, the data compression processing unit 160b specifies a character pair having the maximum number of appearances among the character pairs registered in the counting table, and assigns an unused character to the specified character pair. The relationship between the character pair and the unused character is registered in the compressed dictionary data 150e.

ステップS1で作成した計数表を参照すると、文字ペア「B,A」の出現数が最大となるので、データ圧縮処理部160bは、文字ペア「B,A」に未使用文字「X」を割当てる。文字ペア「B,A」に未使用文字「X」を割当てることで、文字列「ABABACBACD」は、文字列「AXXCXCD」となる。データ圧縮処理部160bは、文字ペア「B,A」と未使用文字(符号)「X」の関係を圧縮辞書データ150eに登録する。   Referring to the counting table created in step S1, the number of appearances of the character pair “B, A” is maximized, so the data compression processing unit 160b assigns an unused character “X” to the character pair “B, A”. . By assigning the unused character “X” to the character pair “B, A”, the character string “ABABACBACD” becomes the character string “AXXCXCD”. The data compression processing unit 160b registers the relationship between the character pair “B, A” and the unused character (symbol) “X” in the compression dictionary data 150e.

データ圧縮処理部160bは、文字列「AXXCXCD」を参照し、文字ペアを特定する。文字列「AXXCXCD」に含まれる文字ペアは、「A,X」、「X,X」、「X,C」、「C,X」、「C,D」となる。   The data compression processing unit 160b refers to the character string “AXXCXCD” and identifies a character pair. Character pairs included in the character string “AXXCXCD” are “A, X”, “X, X”, “X, C”, “C, X”, and “C, D”.

データ圧縮処理部160bは、文字列と各文字ペアを比較して、各文字ペアの出現数を計数し、計数表に登録する。文字ペア「A,X」の出現数は1、文字ペア「X,X」の出現数は1、文字ペア「X,C」の出現数は2、文字ペア「C,X」の出現数は1、文字ペア「C,D」の出現数は1となる。ステップS2参照。   The data compression processing unit 160b compares the character string with each character pair, counts the number of appearances of each character pair, and registers it in the counting table. The number of appearances of the character pair “A, X” is 1, the number of appearances of the character pair “X, X” is 1, the number of appearances of the character pair “X, C” is 2, and the number of appearances of the character pair “C, X” is 1. The number of appearances of the character pair “C, D” is 1. See step S2.

ステップS2で作成した計数表を参照すると、文字ペア「X,C」の出現数が最大となるので、データ圧縮処理部160bは、文字ペア「X,C」に未使用文字「Y」を割当てる。文字ペア「X,C」に未使用文字を割当てることで、文字列「AXXCXCD」は、文字列「AXYYD」となる。データ圧縮処理部160bは、文字ペア「X,C」と未使用文字(符号)「Y」の関係を圧縮辞書データ150eに登録する。   Referring to the counting table created in step S2, the number of appearances of the character pair “X, C” is maximized, so the data compression processing unit 160b assigns an unused character “Y” to the character pair “X, C”. . By assigning unused characters to the character pair “X, C”, the character string “AXXCXCD” becomes the character string “AXYYD”. The data compression processing unit 160b registers the relationship between the character pair “X, C” and the unused character (symbol) “Y” in the compression dictionary data 150e.

データ圧縮処理部160bは、文字列「AXYYD」を参照し、文字ペアを特定する。文字列「AXYYD」に含まれる文字ペアは、「A,X」、「X,Y」、「Y,Y」、「Y,D」となる。   The data compression processing unit 160b refers to the character string “AXYYD” and identifies a character pair. Character pairs included in the character string “AXYYD” are “A, X”, “X, Y”, “Y, Y”, and “Y, D”.

データ圧縮処理部160bは、文字列と各文字ペアを比較して、各文字ペアの出現数を計数し、計数表に登録する。文字ペア「A,X」の出現数は1、「X,Y」の出現数は1、「Y,Y」の出現数は1、「Y,D」の出現数は1となる。ステップS3参照。   The data compression processing unit 160b compares the character string with each character pair, counts the number of appearances of each character pair, and registers it in the counting table. The number of appearances of the character pair “A, X” is 1, the number of appearances of “X, Y” is 1, the number of appearances of “Y, Y” is 1, and the number of appearances of “Y, D” is 1. See step S3.

データ圧縮処理部160bは、各文字ペアの出現数が計数閾値α未満となった場合、あるいは、文字セットに未使用文字が存在しない場合に、文字列の圧縮を終了する。データ圧縮処理部160bは、文字列の圧縮が終了した場合に、圧縮後の文字列と圧縮辞書データ150eを出力する。ステップS4参照。   The data compression processing unit 160b ends the compression of the character string when the number of appearances of each character pair is less than the count threshold α or when there are no unused characters in the character set. The data compression processing unit 160b outputs the compressed character string and the compressed dictionary data 150e when the compression of the character string is completed. See step S4.

データ圧縮処理部160bは、XMLデータ150aに含まれる全ての文字列に対して、上述した圧縮処理を実行する。以下の説明において、文字列を圧縮したXMLデータを文字列圧縮済みデータと表記する。図11は、文字列圧縮済みデータのデータ構造の一例を示す図である。図3のXMLデータ150aと、図11の文字列圧縮済みデータを比較すると、文字列「ABABACBACD」が文字列「AXYYD」に圧縮されている。   The data compression processing unit 160b performs the above-described compression processing on all character strings included in the XML data 150a. In the following description, XML data obtained by compressing a character string is referred to as character string compressed data. FIG. 11 is a diagram illustrating an example of a data structure of character string compressed data. Comparing the XML data 150a in FIG. 3 with the character string compressed data in FIG. 11, the character string “ABABACBACD” is compressed into the character string “AXYYD”.

続いて、タグ名を置換する処理について説明する。データ圧縮処理部160bは、文字列圧縮済みデータをスキャンし、文字列圧縮済みデータに出現する全てのタグ名を対応表150cに登録する。データ圧縮処理部160bは、対応表150cに登録されたタグ名に対して、それぞれ固有の符号を割当てる。そして、データ圧縮処理部160bは、文字列圧縮済みデータと対応表150cとを比較して、文字列圧縮済みデータのタグ名を、該当する符号に置換することで、符号化データ150bを生成する。   Next, processing for replacing a tag name will be described. The data compression processing unit 160b scans the character string compressed data and registers all tag names appearing in the character string compressed data in the correspondence table 150c. The data compression processing unit 160b assigns a unique code to each tag name registered in the correspondence table 150c. Then, the data compression processing unit 160b generates the encoded data 150b by comparing the character string compressed data with the correspondence table 150c and replacing the tag name of the character string compressed data with the corresponding code. .

例えば、文字列圧縮済みデータを、図11に示す文字列圧縮済みデータとし、対応表150cを、図5に示す対応表とする。この場合、データ圧縮処理部160bは、文字列圧縮済みデータ中のタグ名「AAA」、「BBB」、「CCC」はそれぞれ符号「1」、「2」、「3」に置換し、図4に示す符号化データを生成する。   For example, the character string compressed data is the character string compressed data shown in FIG. 11, and the correspondence table 150c is the correspondence table shown in FIG. In this case, the data compression processing unit 160b replaces the tag names “AAA”, “BBB”, and “CCC” in the character string compressed data with the codes “1”, “2”, and “3”, respectively. The encoded data shown in FIG.

続いて、抽出条件150gを変換して変換後抽出条件150hを生成する処理について説明する。データ圧縮処理部160bは、抽出条件150gと対応表150cを比較して、抽出条件150gに含まれるタグ名を、符号に置換することで、変換後抽出条件150hを生成する。   Next, a process for converting the extraction condition 150g to generate the post-conversion extraction condition 150h will be described. The data compression processing unit 160b compares the extraction condition 150g with the correspondence table 150c, and replaces the tag name included in the extraction condition 150g with a code to generate a post-conversion extraction condition 150h.

例えば、対応表150cを、図5に示す対応表とし、抽出条件150cを「/AAA/BBB="BACD"」とする。この場合、データ圧縮処理部160bは、抽出条件150cのタグ名「AAA」、「BBB」をそれぞれ「1」、「2」に置換し、変換後抽出条件150h「/1/2="BACD"」を生成する。   For example, the correspondence table 150c is the correspondence table shown in FIG. 5, and the extraction condition 150c is “/ AAA / BBB =“ BACD ””. In this case, the data compression processing unit 160b replaces the tag names “AAA” and “BBB” of the extraction condition 150c with “1” and “2”, respectively, and the post-conversion extraction condition 150h “/ 1/2 =“ BACD ” Is generated.

次に、図2に示したACマシン構築部160cについて説明する。ACマシン構築部160cは、変換後抽出条件150hに含まれるキーワードに基づいて、当該キーワードを照合するACマシン150dを生成する。そして、ACマシン構築部160cは、圧縮辞書データ150eに基づいて、ACマシン150dにスキップ遷移を追加することで、圧縮データ用ACマシン150fを生成する。   Next, the AC machine construction unit 160c shown in FIG. 2 will be described. Based on the keyword included in the post-conversion extraction condition 150h, the AC machine construction unit 160c generates an AC machine 150d that matches the keyword. Then, the AC machine construction unit 160c generates a compressed data AC machine 150f by adding a skip transition to the AC machine 150d based on the compressed dictionary data 150e.

以下において、ACマシン構築部160cについて具体的に説明する。ACマシン構築部160cがACマシン150dを生成する処理について説明した後に、圧縮データ用ACマシン150fを生成する処理について説明する。また、変換後抽出条件150hに含まれるキーワードの集合をパターン集合Πとし、説明の便宜上、パターン集合Π={AC、BA、BB、BAA、BACD}とする。   The AC machine construction unit 160c will be specifically described below. After describing the process of generating the AC machine 150d by the AC machine construction unit 160c, the process of generating the AC machine 150f for compressed data will be described. Further, a set of keywords included in the post-conversion extraction condition 150h is a pattern set Π, and for convenience of explanation, a pattern set Π = {AC, BA, BB, BAA, BACD}.

ACマシン150dを生成する処理には、トライを構築する処理と、フェイラ遷移をトライに追加する処理が含まれる。図12〜図14は、トライT構築処理を説明するための図である。   The process of generating the AC machine 150d includes a process of building a trie and a process of adding a failer transition to the trie. 12 to 14 are diagrams for explaining the tri-T construction process.

図12において、ACマシン構築部160cは、初期状態0を作成し、初期状態の状態構造体における通常遷移先をすべて初期状態に設定する(図12、ステップS10)。そして、ACマシン構築部160cは、パターン集合Πからパターン「AC」を取り出す。ACマシン構築部160cは、文字「A」を選択し、文字Aによる初期状態0の通常遷移先を通常状態1に設定する。   In FIG. 12, the AC machine construction unit 160c creates the initial state 0, and sets all the normal transition destinations in the state structure in the initial state to the initial state (FIG. 12, step S10). Then, the AC machine construction unit 160c extracts the pattern “AC” from the pattern set Π. The AC machine construction unit 160 c selects the character “A” and sets the normal transition destination of the initial state 0 by the character A to the normal state 1.

ACマシン構築部160cは、文字「C」を選択し、文字Cによる通常状態1の通常遷移先を照合状態2に設定する。また、ACマシン構築部160cは、通常状態1の状態構造体において、照合状態2へのポインタg[C]に対応するパターンリストをPlist[C]=ACに設定する(図12、ステップS11)。   The AC machine construction unit 160c selects the character “C” and sets the normal transition destination of the normal state 1 by the character C to the collation state 2. Also, the AC machine construction unit 160c sets Plist [C] = AC in the pattern structure corresponding to the pointer g [C] to the collation state 2 in the state structure in the normal state 1 (FIG. 12, step S11). .

ACマシン構築部160cは、初期状態0に戻り、パターン集合Πからパターン「BA」を取り出す。ACマシン構築部160cは、文字「B」を選択し、文字Bによる初期状態0の通常遷移先を通常状態3に設定する。   The AC machine construction unit 160c returns to the initial state 0, and extracts the pattern “BA” from the pattern set Π. The AC machine construction unit 160 c selects the character “B” and sets the normal transition destination of the initial state 0 by the character B to the normal state 3.

ACマシン構築部160cは、文字「A」を選択し、文字Aによる通常状態3の通常遷移先を照合状態4に設定する。また、ACマシン構築部160cは、通常状態3の状態構造体において、照合状態4へのポインタg[A]に対応するパターンリストをPlist[A]=BAに設定する(図12、ステップS12)。   The AC machine construction unit 160 c selects the character “A” and sets the normal transition destination of the normal state 3 by the character A to the collation state 4. Also, the AC machine construction unit 160c sets Plist [A] = BA in the pattern structure corresponding to the pointer g [A] to the matching state 4 in the state structure in the normal state 3 (FIG. 12, step S12). .

図13において、ACマシン構築部160cは、初期状態0に戻り、パターン集合Πからパターン「BB」を取り出し、文字「B」を選択する。ここで、文字Bによる初期状態0の通常遷移先は通常状態3であり、既に作成済みであるため、現在の状態を通常状態3に遷移する。   In FIG. 13, the AC machine construction unit 160 c returns to the initial state 0, extracts the pattern “BB” from the pattern set Π, and selects the character “B”. Here, the normal transition destination of the initial state 0 by the letter B is the normal state 3, and since it has already been created, the current state is transitioned to the normal state 3.

ACマシン構築部160cは、文字「B」を選択し、文字Bによる通常状態3の通常遷移先を照合状態5に設定する。また、ACマシン構築部160cは、状態3の状態構造体において、照合状態5へのポインタg[B]に対応するパターンリストをPlist[B]=BBに設定する(図13、ステップS13)。   The AC machine construction unit 160 c selects the character “B” and sets the normal transition destination of the normal state 3 by the character B to the collation state 5. Also, the AC machine construction unit 160c sets Plist [B] = BB in the state structure of state 3 corresponding to the pointer g [B] to the collation state 5 (FIG. 13, step S13).

ACマシン構築部160cは、初期状態0に戻り、パターン集合Πからパターン「BAA」を取り出し、文字「B」を選択する。ここで、文字Bによる初期状態0の通常遷移先は通常状態3であり、既に作成済みであるため、現在の状態を通常状態3に遷移する。   The AC machine construction unit 160c returns to the initial state 0, extracts the pattern “BAA” from the pattern set Π, and selects the character “B”. Here, the normal transition destination of the initial state 0 by the letter B is the normal state 3, and since it has already been created, the current state is transitioned to the normal state 3.

ACマシン構築部160cは、文字「A」を選択する。ここで、文字Aによる通常状態3の通常遷移先は照合状態4であり、既に作成済みであるため、現在の状態を照合状態4に遷移する。   The AC machine construction unit 160c selects the letter “A”. Here, since the normal transition destination of the normal state 3 by the character A is the collation state 4 and has already been created, the current state is transited to the collation state 4.

ACマシン構築部160cは、文字「A」を選択する。ACマシン構築部160cは文字「A」による照合状態4の通常遷移先を照合状態6に設定する。また、ACマシン構築部160cは、状態4の状態構造体において、照合状態6へのポインタg[a]に対応するパターンリストをPlist[A]=BAAに設定する(図13、ステップS14)。   The AC machine construction unit 160c selects the letter “A”. The AC machine construction unit 160 c sets the normal transition destination of the collation state 4 with the character “A” to the collation state 6. Further, the AC machine construction unit 160c sets Plist [A] = BAA in the state structure of state 4 corresponding to the pointer g [a] to the collation state 6 (FIG. 13, step S14).

図14において、ACマシン構築部160cは、初期状態0に戻り、パターン集合Πからパターン「BACD」を取り出し、文字「B」を選択する。ここで、文字Bによる初期状態0の通常遷移先は通常状態3であり、既に作成済みであるため、現在の状態を通常状態3に遷移する。   In FIG. 14, the AC machine construction unit 160 c returns to the initial state 0, extracts the pattern “BACD” from the pattern set Π, and selects the character “B”. Here, the normal transition destination of the initial state 0 by the letter B is the normal state 3, and since it has already been created, the current state is transitioned to the normal state 3.

ACマシン構築部160cは、文字「A」を選択する。ここで、文字Aによる通常状態3の通常遷移先は状態4であり、既に作成済みであるため、現在の状態を照合状態4に遷移する。   The AC machine construction unit 160c selects the letter “A”. Here, since the normal transition destination of the normal state 3 by the character A is the state 4 and has already been created, the current state is transitioned to the collation state 4.

ACマシン構築部160cは、文字「C」を選択する。ACマシン構築部160cは、文字Cによる照合状態4の通常遷移先を通常状態7に設定する。ACマシン構築部160cは、文字「D」を選択する。ACマシン構築部160cは、文字Dによる通常状態7の通常遷移先を照合状態8に設定する(図14、ステップS15)。ステップS15が終了した段階で、パターン集合Πに含まれる全てのパターンの登録が終了し、トライTの構築処理が終了する。   The AC machine construction unit 160c selects the character “C”. The AC machine construction unit 160c sets the normal transition destination of the collation state 4 with the character C to the normal state 7. The AC machine construction unit 160c selects the character “D”. The AC machine construction unit 160c sets the normal transition destination of the normal state 7 by the character D to the collation state 8 (FIG. 14, step S15). At the stage where step S15 is completed, registration of all patterns included in the pattern set 終了 ends, and the construction process of the trie T ends.

次に、ACマシン構築部160cがフェイラ遷移をトライに追加する処理について説明する。図15〜図23は、フェイラ遷移追加処理を説明するための図である。ACマシン構築部160cは、初期状態0から通常遷移先となる状態を判定し、判定した状態をキュー(Queue)に登録する。ACマシン構築部160cは、キューに登録された状態のフェイラ遷移先を初期状態0に設定する。ここで、初期状態0の通常遷移先は、通常状態1,3となるので、キューに1,3を登録する。また、通常状態1,3のフェイラ遷移先を初期状態0に設定する。図15参照。   Next, a process in which the AC machine construction unit 160c adds a failer transition to a trie will be described. 15 to 23 are diagrams for describing the failer transition addition process. The AC machine construction unit 160c determines a state that is a normal transition destination from the initial state 0, and registers the determined state in a queue. The AC machine construction unit 160c sets the failer transition destination registered in the queue to the initial state 0. Here, since the normal transition destination of the initial state 0 is the normal states 1 and 3, 1 and 3 are registered in the queue. In addition, the failer transition destination in the normal states 1 and 3 is set to the initial state 0. See FIG.

ACマシン構築部160cは、キューの先頭の状態1を取り出し、取り出した状態1を状態sに設定する。ACマシン構築部160cは、状態sにおいて、g[code(a)]≠Nullとなる全ての文字aを抽出し、集合Xに格納する。この場合、ACマシン構築部160cは、文字Cを抽出し、集合Xに文字Cを格納する。   The AC machine construction unit 160c extracts the first state 1 of the queue, and sets the extracted state 1 to the state s. The AC machine construction unit 160c extracts all the characters a that satisfy g [code (a)] ≠ Null in the state s, and stores them in the set X. In this case, the AC machine construction unit 160c extracts the character C and stores the character C in the set X.

ACマシン構築部160cは、集合Xから文字Cを取り出し、状態sの通常遷移先となる状態2をキューの最後尾に追加する。ACマシン構築部160cは、状態1からフェイラ遷移した初期状態0に移行し、文字Cに対する通常遷移先を判定することで、状態nextのフェイラ遷移先を判定すると、初期状態0となる。ACマシン構築部160cは、状態s(通常状態1)から文字Cにより遷移する状態nextを判定し、判定した状態(照合状態2)のフェイラ遷移先を初期状態0に設定する。図16参照。   The AC machine construction unit 160c extracts the character C from the set X, and adds the state 2 that is the normal transition destination of the state s to the end of the queue. When the AC machine construction unit 160c transitions from the state 1 to the initial state 0 that has undergone a failer transition, and determines the normal transition destination for the character C, it determines the initial state 0 when determining the failer transition destination of the state next. The AC machine construction unit 160c determines the state next to be transitioned by the character C from the state s (normal state 1), and sets the failer transition destination of the determined state (collation state 2) to the initial state 0. See FIG.

ACマシン構築部160cは、キューの先頭の状態3を取り出し、取り出した状態3を状態sに設定する。ACマシン構築部160cは、状態sにおいて、g[code(a)]≠Nullとなる全ての文字aを抽出し、集合Xに格納する。この場合は、ACマシン構築部160cは、文字A、Bを抽出し、集合Xに文字A、Bを格納する。   The AC machine construction unit 160c extracts the state 3 at the head of the queue, and sets the extracted state 3 to the state s. The AC machine construction unit 160c extracts all the characters a that satisfy g [code (a)] ≠ Null in the state s, and stores them in the set X. In this case, the AC machine construction unit 160c extracts the characters A and B and stores the characters A and B in the set X.

ACマシン構築部160cは、集合Xから文字Aを取り出し、状態sの文字Aの通常遷移先となる状態4をキューの最後尾に追加する。ACマシン構築部160cは、状態sからフェイラ遷移した初期状態0に移行し、文字Aに対する通常遷移先を判定することで、状態nextのフェイラ遷移先を判定すると、状態1となる。ACマシン構築部160cは、状態s(通常状態3)から文字Aにより遷移する状態nextを判定し、判定した状態(照合状態4)のフェイラ遷移先を状態1に設定する。図17の状態4参照。   The AC machine construction unit 160c extracts the character A from the set X, and adds the state 4 that is the normal transition destination of the character A in the state s to the tail of the queue. When the AC machine construction unit 160c transitions from the state s to the initial state 0 in which the failure transition is performed and determines the normal transition destination for the character A, the state transitions to the state 1 when the failure transition destination of the state next is determined. The AC machine construction unit 160c determines the state next to be transitioned by the letter A from the state s (normal state 3), and sets the failer transition destination of the determined state (collation state 4) to state 1. See state 4 in FIG.

ACマシン構築部160cは、集合Xから文字Bを取り出し、状態s(通常状態3)の文字Bの通常遷移先となる状態5をキューの最後尾に追加する。ACマシン構築部160cは、状態sからフェイラ遷移した初期状態0に移行し、文字Bに対する通常遷移先を判定することで、状態nextのフェイラ遷移先を判定すると、状態3となる。ACマシン構築部160cは、状態sから文字Bにより遷移する状態nextを判定し、判定した状態(照合状態5)のフェイラ遷移先を状態3に設定する。図17の状態5参照。   The AC machine construction unit 160c extracts the character B from the set X and adds the state 5 that is the normal transition destination of the character B in the state s (normal state 3) to the tail of the queue. When the AC machine construction unit 160c transitions from the state s to the initial state 0 in which the failure transition is performed and determines the normal transition destination for the character B, the state transitions to the state 3 when the failure transition destination of the state next is determined. The AC machine construction unit 160c determines the state next to be transitioned from the state s by the letter B, and sets the failer transition destination of the determined state (collation state 5) to the state 3. See state 5 in FIG.

ACマシン構築部160cは、キューの先頭の状態2を取り出し、取り出した状態2を状態sに設定する。ACマシン構築部160cは、状態sにおいて、g[code(a)]≠Nullとなる全ての文字aを抽出し、集合Xに格納する。状態sに通常遷移先は存在しないので、次のステップに移行する。図18参照。   The AC machine construction unit 160c extracts the state 2 at the head of the queue, and sets the extracted state 2 to the state s. The AC machine construction unit 160c extracts all the characters a that satisfy g [code (a)] ≠ Null in the state s, and stores them in the set X. Since there is no normal transition destination in the state s, the process proceeds to the next step. See FIG.

ACマシン構築部160cは、キューの先頭の状態4を取り出し、取り出した状態4を状態sに設定する。ACマシン構築部160cは、状態sにおいて、g[code(a)]≠Nullとなる全ての文字aを抽出し、集合Xに格納する。この場合は、ACマシン構築部160cは、文字A、Cを抽出し、集合Xに文字A、Cを格納する。   The AC machine construction unit 160c extracts the state 4 at the head of the queue, and sets the extracted state 4 to the state s. The AC machine construction unit 160c extracts all the characters a that satisfy g [code (a)] ≠ Null in the state s, and stores them in the set X. In this case, the AC machine construction unit 160c extracts the characters A and C and stores the characters A and C in the set X.

ACマシン構築部160cは、集合Xから文字Aを取り出し、状態s(照合状態4)の文字Aの通常遷移先となる状態6をキューの最後尾に追加する。ACマシン構築部160cは、状態sからフェイラ遷移した状態1に移行する。状態1において、文字Aに対する通常遷移先はNullであるため、再度フェイラ遷移し、初期状態0に移行する。   The AC machine construction unit 160c extracts the character A from the set X, and adds the state 6 that is the normal transition destination of the character A in the state s (collation state 4) to the tail of the queue. The AC machine construction unit 160c transitions from the state s to the state 1 in which a failer transition is made. In state 1, the normal transition destination for character A is Null, so a failer transition is made again, and an initial state 0 is entered.

そして、初期状態0において、文字Aに対する通常遷移先を判定することで、状態nextのフェイラ遷移先を判定すると、状態1となる。ACマシン構築部160cは、状態s(通常状態4)から文字Aにより遷移する状態nextを判定し、判定した状態(照合状態6)のフェイラ遷移先を状態1に設定する。図19の状態6参照。   Then, in the initial state 0, when the normal transition destination for the character A is determined, and the failer transition destination of the state next is determined, the state 1 is obtained. The AC machine construction unit 160c determines the state next to be transitioned by the letter A from the state s (normal state 4), and sets the failure transition destination of the determined state (collation state 6) to state 1. See state 6 in FIG.

ACマシン構築部160cは、集合Xから文字Cを取り出し、状態s(照合状態4)の文字Cの通常遷移先となる状態7をキューの最後尾に追加する。ACマシン構築部160cは、状態sからフェイラ遷移した状態1に移行し、文字Cに対する通常遷移先を判定することで、状態nextのフェイラ遷移先を判定すると、状態2となる。ACマシン構築部160cは、状態sから文字Cによる遷移する状態nextを判定し、判定した状態(通常状態7)のフェイラ遷移先を状態2に設定する。   The AC machine construction unit 160c extracts the character C from the set X, and adds the state 7 that is the normal transition destination of the character C in the state s (collation state 4) to the tail of the queue. When the AC machine construction unit 160c transitions from the state s to the state 1 in which the failure transition is performed and determines the normal transition destination for the character C, the state transitions to the state 2 when the failure transition destination of the state next is determined. The AC machine construction unit 160c determines the state next to be transitioned by the character C from the state s, and sets the failer transition destination of the determined state (normal state 7) to the state 2.

また、ACマシン構築部160cは、状態7のフェイラ遷移先が照合状態2となる。この場合、ACマシン構築部160cは、状態4の状態構造体において、状態7へのポインタg[C]に対応するパターンリストをPlist[C]=ACに設定し、状態7を通常状態から照合状態に変更する。図19参照の状態4、7参照。   Further, the AC machine construction unit 160c sets the failure transition destination of the state 7 to the collation state 2. In this case, the AC machine construction unit 160c sets the pattern list corresponding to the pointer g [C] to the state 7 to Plist [C] = AC in the state structure of the state 4, and checks the state 7 from the normal state. Change to state. See states 4 and 7 in FIG.

ACマシン構築部160cは、キューの先頭の状態5を取り出し、取り出した状態5を状態sに設定する。ACマシン構築部160cは、状態sにおいてg[code(a)]≠Nullとなる全ての文字aを抽出し、集合Xに格納する。状態sに通常遷移先は存在しないので、次のステップに移行する。図20参照。   The AC machine construction unit 160c takes out the first state 5 of the queue and sets the taken-out state 5 to the state s. The AC machine construction unit 160c extracts all the characters a that satisfy g [code (a)] ≠ Null in the state s, and stores them in the set X. Since there is no normal transition destination in the state s, the process proceeds to the next step. See FIG.

ACマシン構築部160cは、キューの先頭の状態6を取り出し、取り出した状態6を状態sに設定する。ACマシン構築部160cは、状態sにおいて、g[code(a)]≠Nullとなる全ての文字aを抽出し、集合Xに格納する。状態sに通常遷移先は存在しないので、次のステップに移行する。図21参照。   The AC machine construction unit 160c extracts the state 6 at the head of the queue, and sets the extracted state 6 to the state s. The AC machine construction unit 160c extracts all the characters a that satisfy g [code (a)] ≠ Null in the state s, and stores them in the set X. Since there is no normal transition destination in the state s, the process proceeds to the next step. See FIG.

ACマシン構築部160cは、キューの先頭の状態7を取り出し、取り出した状態7を状態sに設定する。ACマシン構築部160cは、状態sにおいて、g[code(a)]≠Nullとなる全ての文字aを抽出し、集合Xに格納する。この場合は、ACマシン構築部160cは、文字Dを抽出し、集合Xに文字Dを格納する。   The AC machine construction unit 160c takes out the head state 7 of the queue and sets the taken state 7 to state s. The AC machine construction unit 160c extracts all the characters a that satisfy g [code (a)] ≠ Null in the state s, and stores them in the set X. In this case, the AC machine construction unit 160c extracts the character D and stores the character D in the set X.

ACマシン構築部160cは、集合Xから文字Dを取り出し、状態s(照合状態7)の文字Dの通常遷移先となる状態8をキューの最後尾に追加する。ACマシン構築部160cは、状態sからフェイラ遷移した状態2に移行する。状態2において、文字Dに対する通常遷移先はNullであるため、再度フェイラ遷移し、初期状態0に移行する。   The AC machine construction unit 160c extracts the character D from the set X, and adds the state 8 that is the normal transition destination of the character D in the state s (collation state 7) to the tail of the queue. The AC machine construction unit 160c transitions from the state s to the state 2 in which a failer transition is made. In state 2, the normal transition destination for character D is Null, so a failer transition occurs again, and the state transitions to initial state 0.

ACマシン構築部160cは、初期状態0において、文字Dに対する通常遷移先を判定することで、状態nextのフェイラ遷移先を判定すると、初期状態0となる。ACマシン構築部160cは、状態s(照合状態7)から文字Dにより遷移する状態nextを判定し、判定した状態(照合状態8)のフェイラ遷移先を初期状態0に設定する。図22の状態8参照。   When the AC machine construction unit 160c determines the failure transition destination of the state next by determining the normal transition destination for the character D in the initial state 0, the state becomes the initial state 0. The AC machine construction unit 160c determines the state next to be transitioned by the character D from the state s (collation state 7), and sets the failer transition destination of the determined state (collation state 8) to the initial state 0. See state 8 in FIG.

ACマシン構築部160cは、キューの先頭の状態8を取り出し、取り出した状態8を状態sに設定する。ACマシン構築部160cは、状態sにおいて、g[code(a)]≠Nullとなる全ての文字aを抽出し、集合Xに格納する。状態sに通常遷移先は存在しないので、次のステップに移行する。そして、キューに状態が存在しなくなった場合に、パターン集合ΠのACマシンが完了する。図23参照。   The AC machine construction unit 160c takes out the head state 8 of the queue and sets the taken state 8 to state s. The AC machine construction unit 160c extracts all the characters a that satisfy g [code (a)] ≠ Null in the state s, and stores them in the set X. Since there is no normal transition destination in the state s, the process proceeds to the next step. Then, when the state no longer exists in the queue, the AC machine of the pattern set IV is completed. See FIG.

次に、ACマシン構築部160cが、ACマシン150dにスキップ遷移を追加して、圧縮データ用ACマシン150fを生成する処理について説明する。圧縮辞書データ150eの文字ペアをa,bとした場合、ACマシン構築部160cは、ACマシン150dのパスをスキャンし、文字aの遷移と文字bの遷移が連続する箇所を判定する。そして、ACマシン構築部160cは、ACマシン150dの該当箇所にスキップ遷移を追加する。   Next, a process in which the AC machine construction unit 160c generates a compressed data AC machine 150f by adding a skip transition to the AC machine 150d will be described. When the character pair of the compressed dictionary data 150e is a and b, the AC machine construction unit 160c scans the path of the AC machine 150d and determines a place where the transition of the character a and the transition of the character b are continuous. Then, the AC machine construction unit 160c adds a skip transition to the corresponding part of the AC machine 150d.

また、ACマシン構築部160cは、ACマシン150dのパスをスキャンし文字aの遷移と、文字bの遷移がフェイラ遷移を挟む箇所を判定する。そして、ACマシン構築部160cは、ACマシン150dの該当箇所にスキップ遷移を追加する。   Further, the AC machine construction unit 160c scans the path of the AC machine 150d, and determines a location where the transition of the character a and the transition of the character b sandwich the failer transition. Then, the AC machine construction unit 160c adds a skip transition to the corresponding part of the AC machine 150d.

図24〜図26は、圧縮データ用ACマシン構築処理を説明するための図である。ACマシン構築部160cは、圧縮辞書データ150eに登録された文字ペアに対応するスキップ遷移をACマシン150dに追加する。   24 to 26 are diagrams for explaining the compressed data AC machine construction processing. The AC machine construction unit 160c adds a skip transition corresponding to the character pair registered in the compressed dictionary data 150e to the AC machine 150d.

まず、ACマシン構築部160cは、圧縮辞書データ150eの1段目に登録された文字ペア「B,A」に対応するスキップ遷移をACマシン150dに追加する。ACマシン構築部160cは、ACマシン150dに含まれる全パスをスキャンし、文字Bの遷移と文字Aの遷移が連続する箇所を判定する。   First, the AC machine construction unit 160c adds a skip transition corresponding to the character pair “B, A” registered in the first row of the compressed dictionary data 150e to the AC machine 150d. The AC machine construction unit 160c scans all paths included in the AC machine 150d, and determines a place where the transition of the letter B and the transition of the letter A are continuous.

ACマシン構築部160cは、ACマシン150dのパス上の状態sと状態tに対して、状態sの文字Bによる通常遷移先が状態tとなり(s.g[code(B)]=t)、かつ、状態tの、文字Aによる通常遷移先が状態uとなる場合(s.g[code(A)]=u)に、状態sにスキップ遷移Xを作成する(s.g[code(X)]=u)。このとき、状態sのスキップ遷移Xのパターンリスト(s.Plist[code(X)])は、s.Plist[code(X)]=s.Plist[code(B)]∪t.Plist[code(A)]とする。   The AC machine construction unit 160c sets the normal transition destination by the letter B of the state s to the state t (sg [code (B)] = t) for the state s and t on the path of the AC machine 150d, and When the normal transition destination of the character A in the state t is the state u (sg [code (A)] = u), a skip transition X is created in the state s (sg [code (X)] = u). At this time, the pattern list (s.Plist [code (X)]) of the skip transition X of the state s is s.Plist [code (X)] = s.Plist [code (B)] ∪t.Plist [code (A)].

ACマシン150dの全パスの中で、(s.g[code(B)]=t)かつ(t.g[code(A)]=u)の条件を満たす状態s、状態t、状態uの組は、初期状態0、通常状態3、照合状態4となる。従って、ACマシン構築部160cは、初期状態0の文字Xによる通常遷移先のポインタ(g[code(X)])に、照合状態4を設定し、該当するパターンリスト(Plist[X])に「BA」を登録する。図24の初期状態0参照。   Among all paths of the AC machine 150d, the set of the state s, the state t, and the state u that satisfy the conditions (sg [code (B)] = t) and (tg [code (A)] = u) State 0, normal state 3, and verification state 4 are entered. Accordingly, the AC machine construction unit 160c sets the matching state 4 to the normal transition destination pointer (g [code (X)]) with the character X in the initial state 0, and sets the matching pattern list (Plist [X]). Register “BA”. See initial state 0 in FIG.

続いて、ACマシン構築部160cは、ACマシン150dのパスをスキャンし文字Bの遷移と、文字Aの遷移がフェイラ遷移を挟む箇所を判定する。ACマシン構築部160cは、ACマシン150dのパス上の状態sと状態tに対して、状態sの文字Bによる通常遷移先が状態tとなり(s.g[code(B)]=t)、かつ、状態tの、文字Aによる通常遷移先がNullとなる(t.g[code(A)]=Null)状態tを全て集合Fに格納する。   Subsequently, the AC machine construction unit 160c scans the path of the AC machine 150d and determines a location where the transition of the character B and the transition of the character A sandwich the failer transition. The AC machine construction unit 160c sets the normal transition destination by the letter B of the state s to the state t (sg [code (B)] = t) for the state s and t on the path of the AC machine 150d, and All the states t in which the normal transition destination by the character A in the state t is Null (tg [code (A)] = Null) are stored in the set F.

ACマシン150dの全パスの中で、(s.g[code(B)]=t)かつ(t.g[code(A)]=Null)の条件を満たす状態tは、照合状態5となるため、ACマシン構築部160cは、照合状態5を集合Fに格納する。ACマシン構築部160cは、集合Fのうち、状態tからフェイラ遷移し、フェイラ遷移先の状態の文字Aによる通常遷移先がNull(t.fail.g[code(A)]=Null)となる状態tを削除する。照合状態5は、(t.fail.g[code(A)]=Null)の条件を満たさないので、集合Fに残る。   Since the state t satisfying the condition (sg [code (B)] = t) and (tg [code (A)] = Null) in all paths of the AC machine 150d is the collation state 5, the AC machine The construction unit 160c stores the collation state 5 in the set F. In the set F, the AC machine construction unit 160c performs a failer transition from the state t, and the normal transition destination by the character A in the state of the failer transition destination is Null (t.fail.g [code (A)] = Null). Delete state t. Since the collation state 5 does not satisfy the condition (t.fail.g [code (A)] = Null), it remains in the set F.

ACマシン構築部160cは、集合Fの任意の状態tに対して、状態tからフェイラ遷移し、フェイラ遷移先の状態の文字Aによる通常遷移先を状態u(t.fail.g[code(A)]=u)とする。また、ACマシン構築部160cは、(s.g[code(B)]=t)の条件を満たす状態を状態sとする。このとき、状態sのスキップ遷移Xのパターンリスト(s.Plis[code(X)])を、s.Plist[code(X)]=s.Plist[code(B)]∪t.fail.Plist[code(A)]とする。   The AC machine construction unit 160c makes a failer transition from the state t to an arbitrary state t of the set F, and sets the normal transition destination by the character A of the state of the failer transition destination to the state u (t.fail.g [code (A )] = u). Further, the AC machine construction unit 160c sets the state s as the state satisfying the condition (s.g [code (B)] = t). At this time, the pattern list (s.Plis [code (X)]) of the skip transition X of the state s is expressed as s.Plist [code (X)] = s.Plist [code (B)] ∪t.fail.Plist [code (A)]

(t.fail.g[code(A)]=u)、(s.g[code(B)]=t)を満たす状態sは、通常状態3となる。ACマシン構築部160cは、通常状態3の文字Xによる通常遷移先のポインタ(g[code(X)])に、照合状態4を設定し、該当するパターンリスト(Plist[X])に「BB,BA」を登録する。図25の通常状態3参照。   The state s that satisfies (t.fail.g [code (A)] = u) and (s.g [code (B)] = t) is the normal state 3. The AC machine construction unit 160c sets the matching state 4 to the normal transition destination pointer (g [code (X)]) with the character X in the normal state 3 and sets “BB” in the corresponding pattern list (Plist [X]). , BA ". See normal state 3 in FIG.

続いて、ACマシン構築部160cは、圧縮辞書データ150eの2段目に登録された文字ペア「X,C」に対応するスキップ遷移をACマシン150dに追加する。ACマシン構築部160cは、ACマシン150dの該当箇所にスキップ遷移を追加する。   Subsequently, the AC machine construction unit 160c adds a skip transition corresponding to the character pair “X, C” registered in the second stage of the compressed dictionary data 150e to the AC machine 150d. The AC machine construction unit 160c adds a skip transition to the corresponding part of the AC machine 150d.

ACマシン構築部160cは、ACマシン150dのパス上の状態sと状態tに対して、状態sの文字Xによる通常遷移先が状態tとなり(s.g[code(X)]=t)、かつ、状態tの文字Cによる通常遷移先が状態uとなる場合(s.g[code(C)]=u)に、状態sにスキップ遷移Yを作成する(s.g[code(Y)]=u)。このとき、状態sのスキップ遷移Yのパターンリスト(s.Plist[code(Y)])は、s.Plist[code(Y)]=s.Plist[code(X)]∪t.Plist[code(C)]とする。   The AC machine construction unit 160c sets the normal transition destination by the character X of the state s to the state t (sg [code (X)] = t) with respect to the state s and the state t on the path of the AC machine 150d, and When the normal transition destination of the character C in the state t is the state u (sg [code (C)] = u), a skip transition Y is created in the state s (sg [code (Y)] = u). At this time, the pattern list (s.Plist [code (Y)]) of the skip transition Y of the state s is s.Plist [code (Y)] = s.Plist [code (X)] ∪t.Plist [code (C)].

ACマシン150dの全パスの中で、(s.g[code(X)]=t)かつ(s.g[code(C)]=u)の条件を満たす状態s、状態t、状態uの組は、初期状態0、照合状態4、照合状態7の組と、通常状態3、照合状態4、照合状態7の組となる。   Among all paths of the AC machine 150d, the set of the state s, the state t, and the state u that satisfy the condition (sg [code (X)] = t) and (sg [code (C)] = u) A set of state 0, collation state 4 and collation state 7 and a pair of normal state 3, collation state 4 and collation state 7 are set.

ACマシン構築部160cは、初期状態0の文字Yによる通常遷移先のポインタ(g[code(Y)])に、照合状態7を設定し、該当するパターンリスト(Plist[Y])に「BA、AC」を登録する。図26の初期状態0参照。   The AC machine construction unit 160c sets the matching state 7 to the normal transition destination pointer (g [code (Y)]) with the letter Y in the initial state 0, and sets “BA” to the corresponding pattern list (Plist [Y]). , AC ". See initial state 0 in FIG.

また、ACマシン構築部160cは、通常状態3の文字Yによる通常遷移先のポインタ(g[code(Y)])に、照合状態7を設定し、該当するパターンリスト(Plist[Y])に「BB、BA、AC」を登録する。図26の通常状態3参照。   Also, the AC machine construction unit 160c sets the matching state 7 to the normal transition destination pointer (g [code (Y)]) with the letter Y in the normal state 3, and sets the matching pattern list (Plist [Y]). Register “BB, BA, AC”. See normal state 3 in FIG.

続いて、ACマシン構築部160cは、ACマシン150dのパスをスキャンし文字Xの遷移と、文字Cの遷移がフェイラ遷移を挟む箇所を判定する。図26に示すACマシン150dにおいて、文字Xの遷移と、文字Cの遷移がフェイラ遷移を挟む箇所は存在しないので、図26に示したACマシンが、圧縮データ用ACマシン150fとなる。   Subsequently, the AC machine construction unit 160c scans the path of the AC machine 150d and determines a location where the transition of the character X and the transition of the character C sandwich the failer transition. In the AC machine 150d shown in FIG. 26, there is no place where the transition of the character X and the transition of the character C sandwich the failer transition, so the AC machine shown in FIG. 26 is the compressed data AC machine 150f.

次に、図2に示した照合処理部160dについて説明する。照合処理部160dは、照合対象となるテキストが与えられた場合に、与えられたテキストと圧縮データ用ACマシン150fとを比較して、テキストに特定のキーワードが含まれているか否かを判定する処理部である。   Next, the verification processing unit 160d shown in FIG. 2 will be described. When the text to be collated is given, the matching processing unit 160d compares the given text with the compressed data AC machine 150f to determine whether or not the text contains a specific keyword. It is a processing unit.

図27〜図32は、照合処理を説明するための図である。ここでは一例として、照合対象となるテキストを「AXYYD」とする。照合処理部160dは、現在の状態sを圧縮データ用ACマシン150fの初期状態0に設定する。図27参照。   27 to 32 are diagrams for explaining the collation processing. Here, as an example, the text to be collated is “AXYYD”. The verification processing unit 160d sets the current state s to the initial state 0 of the compressed data AC machine 150f. See FIG.

照合処理部160dは、テキストの1文字目「A」を読み出し、文字Aによる初期状態0の通常遷移先を判定する。文字Aによる初期状態0の遷移先は、通常状態1であるため、現在の状態sを通常状態1に設定する。図28参照。   The matching processing unit 160d reads the first character “A” of the text and determines the normal transition destination of the initial state 0 by the character A. Since the transition destination of the initial state 0 by the letter A is the normal state 1, the current state s is set to the normal state 1. See FIG.

照合処理部160dは、テキストの2文字目「X」を読み出し、文字Xによる通常状態3の遷移先を判定する。文字Xによる通常状態3の通常遷移先は存在しないので、通常状態3からフェイラ遷移し、状態sを初期状態0に設定する。   The matching processing unit 160d reads the second character “X” of the text and determines the transition destination of the normal state 3 by the character X. Since there is no normal transition destination of the normal state 3 by the letter X, a failer transition is made from the normal state 3 and the state s is set to the initial state 0.

照合処理部160dは、文字Xによる初期状態0の通常遷移先を判定する。文字Xによる初期状態0の通常遷移先は照合状態4であるため、現在の状態sを照合状態4に設定する。また、照合状態4にヒットしたため、照合処理部160dは、初期状態0のg[code(X)]に対応付けられたパターンリストPlist[X]={BA}を、集合Rに登録する。図29参照。   The verification processing unit 160d determines the normal transition destination of the initial state 0 by the character X. Since the normal transition destination of the initial state 0 by the character X is the collation state 4, the current state s is set to the collation state 4. Since the matching state 4 is hit, the matching processing unit 160d registers the pattern list Plist [X] = {BA} associated with g [code (X)] in the initial state 0 in the set R. See FIG.

照合処理部160dは、テキストの3文字目「Y」を読み出し、文字Yによる照合状態4の通常遷移先を判定する。文字Yによる照合状態4の通常遷移先は存在しないので、照合状態4からフェイラ遷移し、状態sを通常状態1に設定する。   The matching processing unit 160d reads the third character “Y” of the text and determines the normal transition destination of the matching state 4 by the letter Y. Since there is no normal transition destination of the collation state 4 by the letter Y, a failer transition is made from the collation state 4 and the state s is set to the normal state 1.

照合処理部160dは、文字Yによる通常状態1の通常遷移先を判定する。文字Yによる通常状態1の通常遷移先は存在しないので、通常状態1からフェイラ遷移し、状態sを初期状態0に設定する。   The verification processing unit 160d determines the normal transition destination of the normal state 1 by the character Y. Since there is no normal transition destination of the normal state 1 due to the letter Y, a failure transition is made from the normal state 1 and the state s is set to the initial state 0.

照合処理部160dは、文字Yによる初期状態0の通常遷移先を判定する。文字Yによる初期状態0の通常遷移先は照合状態7であるため、現在の状態sを照合状態7に設定する。また、照合状態7にヒットしたため、照合処理部160dは、初期状態0のg[code(Y)]に対応付けられたパターンリストPlist[X]={BA,AC}を、集合Rに登録する。なお、照合処理部160dは、BAが既に集合Rに登録されているので、ACを集合Rに登録する。図30参照。   The verification processing unit 160d determines the normal transition destination of the initial state 0 by the letter Y. Since the normal transition destination of the initial state 0 by the letter Y is the collation state 7, the current state s is set to the collation state 7. Since the matching state 7 is hit, the matching processing unit 160d registers the pattern list Plist [X] = {BA, AC} associated with g [code (Y)] in the initial state 0 in the set R. . Since the BA is already registered in the set R, the matching processing unit 160d registers AC in the set R. See FIG.

照合処理部160dは、テキストの4文字目「Y」を読み出し、文字Yによる照合状態7の通常遷移先を判定する。文字Yによる照合状態7の通常遷移先は存在しないので、照合状態7からフェイラ遷移し、状態sを照合状態2に設定する。   The matching processing unit 160d reads the fourth character “Y” of the text and determines the normal transition destination of the matching state 7 by the character Y. Since there is no normal transition destination of the collation state 7 by the letter Y, the failer transitions from the collation state 7 and the state s is set to the collation state 2.

照合処理部160dは、文字Yによる照合状態2の通常遷移先を判定する。文字Yによる照合状態2の通常遷移先は存在しないので、照合状態2からフェイラ遷移し、状態sを初期状態0に設定する。   The matching processing unit 160d determines the normal transition destination of the matching state 2 by the letter Y. Since there is no normal transition destination of the collation state 2 by the letter Y, a failer transition is made from the collation state 2 and the state s is set to the initial state 0.

照合処理部160dは、文字Yによる初期状態0の通常遷移先を判定する。文字Yによる初期状態0の通常遷移先は照合状態7であるため、現在の状態sを照合状態7に設定する。また、照合状態7にヒットしたため、照合処理部160dは、初期状態0のg[code(Y)]に対応付けられたパターンリストPlist[X]={BA,AC}を、集合Rに登録する。なお、照合処理部160dは、BA、ACが既に集合Rに登録されているので、集合Rには何も登録しない。図31参照。   The verification processing unit 160d determines the normal transition destination of the initial state 0 by the letter Y. Since the normal transition destination of the initial state 0 by the letter Y is the collation state 7, the current state s is set to the collation state 7. Since the matching state 7 is hit, the matching processing unit 160d registers the pattern list Plist [X] = {BA, AC} associated with g [code (Y)] in the initial state 0 in the set R. . Note that the collation processing unit 160d does not register anything in the set R because BA and AC are already registered in the set R. See FIG.

照合処理部160dは、テキストの5文字目「D」を読み出し、文字Dによる照合状態7の通常遷移先を判定する。文字Dによる照合状態7の通常遷移先は照合状態8であるため、現在の状態sを照合状態8に設定する。また、照合状態8にヒットしたため、照合所理部160dは、照合状態7のg[code(D)]に対応付けられたパターンリストPlist[D]={BACD}を、集合Rに登録する。図32参照。   The matching processing unit 160d reads the fifth character “D” of the text and determines the normal transition destination of the matching state 7 by the character D. Since the normal transition destination of the collation state 7 by the letter D is the collation state 8, the current state s is set to the collation state 8. Since the matching state 8 is hit, the matching reasoning unit 160d registers the pattern list Plist [D] = {BACD} associated with g [code (D)] in the matching state 7 in the set R. See FIG.

図27〜図32に示したように、照合処理部160dは、テキストを1文字ずつ読み出して、圧縮データ用ACマシン150fの各状態を遷移し、照合処理を実行することで、例えば、テキスト「AXYYD」が特定のキーワード「BA、AC、BADC」を含んでいることを判定する。なお、照合処理部160dは、テキスト「AXYYD」をまとめて取得する代わりに、1文字ずつテキストを取得した場合でも、図27〜図32と同様にして、照合処理を実行する。   As illustrated in FIGS. 27 to 32, the collation processing unit 160 d reads out the text character by character, transitions between the states of the compressed data AC machine 150 f, and executes the collation processing. It is determined that “AXYYD” includes a specific keyword “BA, AC, BADC”. It should be noted that the collation processing unit 160d executes the collation process in the same manner as in FIGS. 27 to 32 even when the text “AXYYD” is acquired collectively instead of acquiring the text one character at a time.

次に、図2に示した切出処理部160eについて説明する。切出し処理部160eは、照合処理部160dと協働し、変換後抽出条件150hに対応する符号化データ150bの位置を算出する処理部である。以下の説明において、変換後抽出条件150hに対応する符号化データ150bの位置を切出し位置リストと表記する。   Next, the cutting processing unit 160e shown in FIG. 2 will be described. The cutout processing unit 160e is a processing unit that cooperates with the matching processing unit 160d to calculate the position of the encoded data 150b corresponding to the post-conversion extraction condition 150h. In the following description, the position of the encoded data 150b corresponding to the post-conversion extraction condition 150h is referred to as a cutout position list.

切出し処理部160eは、切出し位置リストに対応する位置の情報を符号化データ150bから切出し、切出した情報を、検索条件の回答として出力部120または通信制御IF部130に出力する。   The cut-out processing unit 160e cuts out the position information corresponding to the cut-out position list from the encoded data 150b, and outputs the cut-out information to the output unit 120 or the communication control IF unit 130 as a search condition answer.

以下において、切出処理部160eの処理を具体的に説明する。切出処理部160eは、符号化データ150bを1文字ずつスキャンし、文字の種類に応じた各種の処理を実行する。ここでは、スキャンした文字が、文字列部の場合、開始タグ「<>」の場合、終了タグの場合「</>」に分けて説明する。   Hereinafter, the processing of the cutout processing unit 160e will be specifically described. The cutout processing unit 160e scans the encoded data 150b character by character and executes various processes according to the character type. Here, a case where the scanned character is a character string portion, a start tag “<>”, and an end tag “</>” will be described separately.

スキャンした文字が文字列部の場合について説明する。切出処理部160eは、スキャンした文字が文字列部の場合に、スキャンした文字を照合処理部160dに出力し、圧縮データ用ACマシン150fの照合状態に遷移したか否かの情報を照合処理部160dから取得する。   A case where the scanned character is a character string portion will be described. When the scanned character is a character string portion, the cutout processing unit 160e outputs the scanned character to the collation processing unit 160d, and performs collation processing on information indicating whether or not the compressed data AC machine 150f has transitioned to the collation state. From the unit 160d.

上述した照合処理部160dは、上述した処理に加え、切出処理部160eから文字を取得した場合には、現在の状態sを遷移させ、照合状態に遷移したか否かを情報を切出処理部160eに通知するものとする。切出処理部160eは、照合状態に遷移した旨の情報を取得した場合には、キーワードフラグkの値を1に設定する。   In addition to the above-described processing, the collation processing unit 160d described above transitions the current state s when a character is acquired from the cut-out processing unit 160e, and extracts information indicating whether or not the state has transitioned to the collation state. It is assumed to notify the unit 160e. The cut-out processing unit 160e sets the value of the keyword flag k to 1 when acquiring information indicating the transition to the collation state.

続いて、スキャンした文字が開始タグの場合について説明する。切出処理部160eは、スキャンした文字が開始タグの場合に、タグ符号と現在の位置(符号化データ150bの先頭文字から数えた、該当タグ符号の「<」までの数;start)をスタックSに登録する。   Next, a case where the scanned character is a start tag will be described. When the scanned character is a start tag, the extraction processing unit 160e stacks the tag code and the current position (the number up to “<” of the corresponding tag code counted from the first character of the encoded data 150b; start). Register with S.

また、切出処理部160eは、スタックSに登録したタグ符号が、変換後抽出条件150hの項目部と一致しているか否かを判定し、一致している場合には項目フラグfを1に設定する。   Further, the cutout processing unit 160e determines whether or not the tag code registered in the stack S matches the item part of the post-conversion extraction condition 150h. If they match, the item flag f is set to 1. Set.

続いて、スキャンした文字が終了タグの場合について説明する。切出処理部160eは、スキャンした文字が終了タグの場合に、キーワードフラグkと項目フラグfが1であるか否かを判定する。キーワードフラグkと項目フラグfが1の場合に、切出処理部160eは、現在の位置(符号化データ150bの先頭文字から数えた、該当タグ符号の「>」までの数)をendに登録し、スタックSの最終要素のstartを取得する。そして、切出処理部160eは、取得したstartとendの組合せ(start、end)を切出し位置リストに登録する。切出処理部160eは、スタックSからタグ符号を取り出し、キーワードフラグkを0に設定する。   Next, a case where the scanned character is an end tag will be described. The cutout processing unit 160e determines whether the keyword flag k and the item flag f are 1 when the scanned character is an end tag. When the keyword flag k and the item flag f are 1, the cutout processing unit 160e registers the current position (the number up to “>” of the corresponding tag code counted from the first character of the encoded data 150b) in end. Then, the start of the last element of the stack S is acquired. The cutout processing unit 160e registers the acquired combination of start and end (start, end) in the cutout position list. The cut-out processing unit 160e extracts the tag code from the stack S and sets the keyword flag k to 0.

ここで、符号化データ150bを図4に示す符号化データとし、変換後抽出条件「/1/2="BACD"」として、切出処理部160eの処理を説明する。切出処理部160eの初期設定として、キーワードフラグkと項目フラグfを0、スタックSを空スタック、切出し位置リストRを空リストとする。   Here, assuming that the encoded data 150b is the encoded data shown in FIG. 4 and the post-conversion extraction condition “/ 1/2 =“ BACD ””, the process of the cutout processing unit 160e will be described. As an initial setting of the extraction processing unit 160e, the keyword flag k and the item flag f are set to 0, the stack S is an empty stack, and the extraction position list R is an empty list.

切出処理部160eは、符号化データ150bの文字「<1>」をスキャンする。文字「<1>」は、開始タグである。切出処理部160eは、スタックSにタグ符号「<1>」と現在位置「1」をスタックSに登録する。スタックS={(<1>、1)}。切出処理部160eは、スタックSのタグ符号「<1>」が、変換後抽出条件の項目部「/1/2」と一致しないので、項目フラグfを0のままにする。   The cut-out processing unit 160e scans the character “<1>” of the encoded data 150b. The character “<1>” is a start tag. The cutout processing unit 160 e registers the tag code “<1>” and the current position “1” in the stack S in the stack S. Stack S = {(<1>, 1)}. Since the tag code “<1>” of the stack S does not match the item part “/ 1/2” of the post-conversion extraction condition, the cutout processing unit 160e keeps the item flag f at 0.

切出処理部160eは、符号化データ150bの文字「<2>」をスキャンする。文字「<2>」は、開始タグである。切出処理部160eは、スタックSにタグ符号「<2>」と現在位置「4」をスタックSに登録する。スタックS={(<1>、1)、(<2>)、4}。切出処理部160eは、スタックSのタグ符号「<1>」、「<2>」が、変換後抽出条件の項目部「/1/2」と一致するので、項目フラグfを1に設定する。   The cut-out processing unit 160e scans the character “<2>” of the encoded data 150b. The character “<2>” is a start tag. The cutout processing unit 160 e registers the tag code “<2>” and the current position “4” in the stack S in the stack S. Stack S = {(<1>, 1), (<2>), 4}. The cutout processing unit 160e sets the item flag f to 1 because the tag codes “<1>” and “<2>” of the stack S match the item part “/ 1/2” of the post-conversion extraction condition. To do.

切出処理部160eは、符号化データ150bの文字列「AXYYD」をスキャンする。切出処理部160eは、文字列「AXYYD」を照合処理部160dに出力し、照合結果を取得する。照合状態に遷移した旨が照合結果に含まれる場合、切出処理部160eは、キーワードフラグkを1に設定する。   The cut-out processing unit 160e scans the character string “AXYYD” of the encoded data 150b. The cutout processing unit 160e outputs the character string “AXYYD” to the collation processing unit 160d, and acquires the collation result. When the verification result includes the fact that the verification state has been changed, the extraction processing unit 160e sets the keyword flag k to 1.

切出処理部160eは、符号化データ150bの文字「<2/>」をスキャンする。文字「<2/>」は終了タグであり、項目フラグfとキーワードフラグkが1である。この場合、切出処理部160eは、end=15と、スタックSの最終要素のstart値(=4)の組を、切出し位置リストRに登録する。R={(4,15)}。切出処理部160eは、スタックSから(<2>、4)を取り出す(ホップする)。スタックS={(<1>、1)}。切出処理部160eは、キーワードフラグkを0に設定する。   The cut-out processing unit 160e scans the character “<2 />” of the encoded data 150b. The character “<2 />” is an end tag, and the item flag f and the keyword flag k are 1. In this case, the extraction processing unit 160e registers a set of end = 15 and the start value (= 4) of the last element of the stack S in the extraction position list R. R = {(4,15)}. The extraction processing unit 160e extracts (hops) (<2>, 4) from the stack S. Stack S = {(<1>, 1)}. The cutout processing unit 160e sets the keyword flag k to 0.

切出処理部160eは、符号化データ150bの文字「<3>」をスキャンする。文字「<3>」は、開始タグである。切出処理部160eは、スタックSにタグ符号「<3>」と現在位置「16」をスタックSに登録する。スタックS={(<1>、1)、(<3>)、16}。切出処理部160eは、スタックSのタグ符号「<1>」、「<3>」が、変換後抽出条件の項目部「/1/2」と一致しないので、項目フラグfを0に設定する。   The cut-out processing unit 160e scans the character “<3>” of the encoded data 150b. The character “<3>” is a start tag. The cut-out processing unit 160e registers the tag code “<3>” and the current position “16” in the stack S in the stack S. Stack S = {(<1>, 1), (<3>), 16}. The cutout processing unit 160e sets the item flag f to 0 because the tag codes “<1>” and “<3>” of the stack S do not match the item part “/ 1/2” of the post-conversion extraction condition. To do.

切出処理部160eは、符号化データ150bの文字列「AXYYD」をスキャンする。切出処理部160eは、文字列「AXYYD」を照合処理部160dに出力し、照合結果を取得する。照合状態に遷移した旨が照合結果に含まれる場合、切出処理部160eは、キーワードフラグkを1に設定する。   The cut-out processing unit 160e scans the character string “AXYYD” of the encoded data 150b. The cutout processing unit 160e outputs the character string “AXYYD” to the collation processing unit 160d, and acquires the collation result. When the verification result includes the fact that the verification state has been changed, the extraction processing unit 160e sets the keyword flag k to 1.

切出処理部160eは、符号化データ150bの文字「</3>」をスキャンする。文字「</3>」は終了タグである。キーワードフラグkは1であるが、項目フラグfは0であるため、切出処理部160eは、切出し位置リストRに対する登録を行わない。切出処理部160eは、スタックSから(<3>、16)を取り出す(ポップする)。スタックS={(<1>、1)}。切出処理部160eは、キーワードフラグkを0に設定する。   The cut-out processing unit 160e scans the character “</ 3>” of the encoded data 150b. The character “</ 3>” is an end tag. Since the keyword flag k is 1 but the item flag f is 0, the cutout processing unit 160e does not register the cutout position list R. The cutout processing unit 160e takes out (pops) (<3>, 16) from the stack S. Stack S = {(<1>, 1)}. The cutout processing unit 160e sets the keyword flag k to 0.

切出処理部160eは、符号化データ150bの文字「</1>」をスキャンする。文字「</1>」は終了タグである。キーワードフラグkと項目フラグfが0であるため、切出処理部160eは、切出し位置リストRに対する登録を行わない。切出処理部160eは、スタックSから(<1>、1)を取り出す。スタックS=空スタック。切出処理部160eは、キーワードフラグkを0に設定する。   The cut-out processing unit 160e scans the characters “</ 1>” of the encoded data 150b. The character “</ 1>” is an end tag. Since the keyword flag k and the item flag f are 0, the cutout processing unit 160e does not register the cutout position list R. The cutout processing unit 160e extracts (<1>, 1) from the stack S. Stack S = empty stack. The cutout processing unit 160e sets the keyword flag k to 0.

切出処理部160eは、符号化データ150bを最後までスキャンしたので、切出し位置リストR={(4,15)}に基づいて、情報を符号化データ150bから切り出す。この場合、切出し処理部160eは、符号化データ150bの先頭文字から4文字目と16文字目の間に位置する文字「<2>AXYYD</2>」を切り出す。   Since the extraction processing unit 160e has scanned the encoded data 150b to the end, the extraction processing unit 160e extracts information from the encoded data 150b based on the extraction position list R = {(4,15)}. In this case, the cutout processing unit 160e cuts out the character “<2> AXYYD </ 2>” positioned between the fourth and sixteenth characters from the first character of the encoded data 150b.

次に、本実施例2にかかる検索装置100の処置手順について説明する。まず、データ圧縮処理部160bが実行する圧縮処理について説明する。図33は、圧縮処理の処理手順を示すフローチャートである。   Next, a procedure of the search apparatus 100 according to the second embodiment will be described. First, compression processing executed by the data compression processing unit 160b will be described. FIG. 33 is a flowchart illustrating a processing procedure of compression processing.

図33に示すように、データ圧縮処理部160bは、文字列計数処理を実行し(ステップS101)、辞書構築・文字列置換処理を実行する(ステップS102)。そして、データ圧縮処理部160bは、タグ名置換処理を実行する(ステップS103)。   As shown in FIG. 33, the data compression processing unit 160b executes a character string counting process (step S101), and executes a dictionary construction / character string replacement process (step S102). Then, the data compression processing unit 160b executes tag name replacement processing (step S103).

ここで、図33のステップS101に示した文字列計数処理の処理手順について説明する。図34は、文字列計数処理の処理手順を示すフローチャートである。図34に示すように、データ圧縮処理部160bは、一つ前の文字c0=εに設定し、現在の文字c1にXMLデータD(XMLデータ150a)の先頭文字を代入する(ステップS111)。   Here, the procedure of the character string counting process shown in step S101 of FIG. 33 will be described. FIG. 34 is a flowchart showing the procedure of the character string counting process. As shown in FIG. 34, the data compression processing unit 160b sets the previous character c0 = ε, and substitutes the first character of the XML data D (XML data 150a) for the current character c1 (step S111).

データ圧縮処理部160bは、計数表Tを初期化し、タグ内フラグf=0に設定する(ステップS112)。データ圧縮処理部160bは、XMLデータDに次の文字が存在するか否かを判定する(ステップS113)。データ圧縮処理部160bは、XMLデータDに次の文字が存在しない場合に(ステップS114,No)、計数表Tを出力する(ステップS115)。   The data compression processing unit 160b initializes the counting table T and sets the in-tag flag f = 0 (step S112). The data compression processing unit 160b determines whether or not the next character exists in the XML data D (step S113). When the next character does not exist in the XML data D (step S114, No), the data compression processing unit 160b outputs the counting table T (step S115).

一方、データ圧縮処理部160bは、XMLデータDに次の文字が存在する場合に(ステップS114,Yes)、c0=c1とし、c1に次の文字を代入する(ステップS116)。データ圧縮処理部160bは、c1がタグ開始記号(<)またはタグ終了記号(>)であるかを判定する(ステップS117)。   On the other hand, when the next character exists in the XML data D (Yes at Step S114), the data compression processing unit 160b sets c0 = c1, and substitutes the next character for c1 (Step S116). The data compression processing unit 160b determines whether c1 is a tag start symbol (<) or a tag end symbol (>) (step S117).

データ圧縮処理部160bは、c1がタグ開始記号ではなく、かつ、タグ終了記号ではない場合に(ステップS118,No)、ステップS121に移行する。一方、データ圧縮処理部160bは、c1がタグ開始記号またはタグ終了記号の場合に(ステップS118,Yes)、c1がタグ開始記号ならf=1とし、c1がタグ終了記号ならf=0に設定する(ステップS119)。   If c1 is not a tag start symbol and not a tag end symbol (step S118, No), the data compression processing unit 160b proceeds to step S121. On the other hand, when c1 is a tag start symbol or a tag end symbol (Yes in step S118), the data compression processing unit 160b sets f = 1 if c1 is a tag start symbol, and sets f = 0 if c1 is a tag end symbol. (Step S119).

f=1の場合には(ステップS120,No)、ステップS113に移行する。f=0の場合に(ステップS120,Yes)、データ圧縮処理部160bは、c0とc1を繋げた長さ2の文字列を計数表Tに登録する。該文字列が登録時未の場合、データ圧縮処理部160bは、該文字列の出現数を1増やし(ステップS121)、ステップS113に移行する。   If f = 1 (No at Step S120), the process proceeds to Step S113. When f = 0 (step S120, Yes), the data compression processing unit 160b registers a character string of length 2 connecting c0 and c1 in the counting table T. If the character string is not registered, the data compression processing unit 160b increases the number of appearances of the character string by 1 (step S121), and proceeds to step S113.

次に、図33のステップS102に示した辞書構築・文字列置換処理の処理手順について説明する。図35は、辞書構築・文字列置換処理の処理手順を示すフローチャートである。図35に示すように、データ圧縮処理部160bは、未使用文字集合Uに文字が存在するか否かを判定する(ステップS131)。   Next, the processing procedure of the dictionary construction / character string replacement processing shown in step S102 of FIG. 33 will be described. FIG. 35 is a flowchart showing a processing procedure of dictionary construction / character string replacement processing. As shown in FIG. 35, the data compression processing unit 160b determines whether or not there is a character in the unused character set U (step S131).

データ圧縮処理部160bは、未使用文字集合Uに文字が存在しない場合には(ステップS132,No)、XMLデータDを、文字列圧縮済みデータCとして出力し、圧縮辞書データDic(圧縮辞書データ150e)を出力する(ステップS133)。   If there is no character in the unused character set U (No in step S132), the data compression processing unit 160b outputs the XML data D as the character string compressed data C, and the compression dictionary data Dic (compression dictionary data) 150e) is output (step S133).

一方、データ圧縮処理部160bは、未使用文字集合Uに文字が存在する場合に(ステップS132,Yes)、圧縮辞書データ150eに未登録な文字列のうちで、もっとも頻度の高い(出現数が最も大きい)文字列sを計数表Tから検索する(ステップS134)。   On the other hand, when there is a character in the unused character set U (Yes in step S132), the data compression processing unit 160b has the highest frequency (number of appearances) among character strings not registered in the compression dictionary data 150e. The largest character string s is searched from the counting table T (step S134).

データ圧縮処理部160bは、文字列sの出現数が計数閾値α以上であるか否かを判定する(ステップS135)。データ圧縮処理部160bは、文字列sの出現数が計数閾値α未満の場合に(ステップS136,No)、ステップS133に移行する。   The data compression processing unit 160b determines whether or not the number of appearances of the character string s is equal to or greater than the count threshold α (step S135). When the number of appearances of the character string s is less than the count threshold α (No at Step S136), the data compression processing unit 160b proceeds to Step S133.

データ圧縮処理部160bは、文字列sの出現数が計数閾値α以上の場合に(ステップS136,Yes)、未使用文字集合Uの文字aに対して、(s、a)の組を圧縮辞書データDicに加え、Uから文字aを削除する(ステップS137)。   When the number of occurrences of the character string s is equal to or greater than the count threshold α (step S136, Yes), the data compression processing unit 160b compresses the set (s, a) for the character a in the unused character set U. In addition to the data Dic, the character a is deleted from U (step S137).

データ圧縮処理部160bは、XMLデータD中の全ての文字列sを文字aに置換し(ステップS138)、文字列計数処理を実行し(ステップS139)、ステップS131に移行する。図35のステップS139に示す文字列計数処理は、図34に示した文字列計数処理と同じである。   The data compression processing unit 160b replaces all the character strings s in the XML data D with the characters a (step S138), executes character string counting processing (step S139), and proceeds to step S131. The character string counting process shown in step S139 of FIG. 35 is the same as the character string counting process shown in FIG.

次に、図33のステップS103に示したタグ名置換処理の処理手順について説明する。図36は、タグ名置換処理の処理手順を示すフローチャートである。図36に示すように、データ圧縮処理部160bは、XMLデータDをスキャンし、Dに出現する全てのタグ名を対応表T(対応表150c)に登録する(ステップS141)。   Next, the processing procedure of the tag name replacement process shown in step S103 of FIG. 33 will be described. FIG. 36 is a flowchart illustrating a processing procedure of tag name replacement processing. As shown in FIG. 36, the data compression processing unit 160b scans the XML data D and registers all tag names appearing in D in the correspondence table T (correspondence table 150c) (step S141).

データ圧縮処理部160bは、対応表Tに登録された全てのタグ名に対して、符号を割り当てる(ステップS142)。データ圧縮処理部160bは、XMLデータDの全てのタグ名を、対応表Tに割当てられた符号に変換し(ステップS143)、符号化データB(符号化データ150b)を出力する(ステップS144)。   The data compression processing unit 160b assigns codes to all tag names registered in the correspondence table T (Step S142). The data compression processing unit 160b converts all tag names of the XML data D into codes assigned to the correspondence table T (step S143), and outputs encoded data B (encoded data 150b) (step S144). .

次に、ACマシン構築部160c、照合処理部160d、切出処理部160eが実行する構築処理について説明する。図37は、構築処理の処理手順を示すフローチャートである。図37に示すように、ACマシン構築部160cは、抽出条件受け付け処理を実行する(ステップS201)。   Next, the construction process executed by the AC machine construction unit 160c, the collation processing unit 160d, and the cutout processing unit 160e will be described. FIG. 37 is a flowchart illustrating the processing procedure of the construction processing. As shown in FIG. 37, the AC machine construction unit 160c executes an extraction condition reception process (step S201).

そして、ACマシン構築部160cは、ACマシン構築処理を実行し(ステップS202)、照合処理部160d、切出処理部160eは、切出し位置計算処理を実行する(ステップS203)。   Then, the AC machine construction unit 160c executes an AC machine construction process (Step S202), and the collation processing unit 160d and the cut-out processing unit 160e execute a cut-out position calculation process (Step S203).

ここで、図37のステップS201に示した抽出条件受け付け処理の処理手順について説明する。図38は、抽出条件受け付け処理の処理手順を示すフローチャートである。図38に示すように、ACマシン構築部160cは、抽出条件Q(抽出条件150g)を受け付ける(ステップS211)。   Here, the processing procedure of the extraction condition reception processing shown in step S201 of FIG. 37 will be described. FIG. 38 is a flowchart illustrating the processing procedure of the extraction condition reception processing. As shown in FIG. 38, the AC machine construction unit 160c receives the extraction condition Q (extraction condition 150g) (step S211).

ACマシン構築部160cは、対応表150cを用いて抽出条件Qにおける項目名を書き換え(ステップS212)、書き換えた抽出条件Qを抽出条件Q’とする(ステップS213)。   The AC machine construction unit 160c rewrites the item name in the extraction condition Q using the correspondence table 150c (step S212), and sets the rewritten extraction condition Q as the extraction condition Q '(step S213).

続いて、図37のステップS202に示したACマシン構築処理の処理手順について説明する。図39は、ACマシン構築処理の処理手順を示すフローチャートである。図39に示すように、ACマシン構築部160cは、ΠのトライTを構築し(ステップS221)、トライ(Π)にフェイラ遷移を追加する(ステップS222)。   Subsequently, the processing procedure of the AC machine construction processing shown in step S202 of FIG. 37 will be described. FIG. 39 is a flowchart showing the processing procedure of the AC machine construction processing. As shown in FIG. 39, the AC machine construction unit 160c constructs a trie T (step S221), and adds a failer transition to the trie (step S222).

ACマシン構築部160cは、ACマシンAC(Π)にスキップ遷移を追加し(ステップS223)、圧縮データ用ACマシンAC_b(Π、dic)を出力する(ステップS224)。   The AC machine construction unit 160c adds a skip transition to the AC machine AC (Π) (step S223) and outputs the compressed data AC machine AC_b (Π, dic) (step S224).

ここで、図39のステップS221に示したΠのトライTを構築する処理について説明する。図40は、ΠのトライTを構築する処理の処理手順を示すフローチャートである。図40に示すように、ACマシン構築部160cは、初期状態(id=0)を作成し、トライ(Π)を初期状態のみで構成されるトライに設定する(ステップS231)。   Here, the process for constructing the cocoon trie T shown in step S221 of FIG. 39 will be described. FIG. 40 is a flowchart illustrating a processing procedure of processing for constructing a cocoon tri-T. As illustrated in FIG. 40, the AC machine construction unit 160c creates an initial state (id = 0) and sets a trie (Π) to a trie that includes only the initial state (step S231).

ACマシン構築部160cは、初期状態の全ての通常遷移先を初期状態に設定し(ステップS232)、Πにパターンが存在するか否かを判定する(ステップS233)。ACマシン構築部160cは、Πにパターンが存在しない場合に(ステップS234,No)、ΠのトライT(Π)を出力する(ステップS235)。   The AC machine construction unit 160c sets all normal transition destinations in the initial state to the initial state (step S232), and determines whether there is a pattern in the bag (step S233). When the pattern does not exist in the bag (step S234, No), the AC machine construction unit 160c outputs the bag trie T (Π) (step S235).

ACマシン構築部160cは、Πにパターンが存在しない場合に(ステップS234,Yes)、Πから1つパターンを取り出し、取り出したパターンをpに設定する(ステップS236)。ACマシン構築部160cは、パターン登録処理を実行し(ステップS237)、ステップS233に移行する。   When the pattern does not exist in the bag (step S234, Yes), the AC machine construction unit 160c extracts one pattern from the bag and sets the extracted pattern to p (step S236). The AC machine construction unit 160c executes pattern registration processing (step S237), and proceeds to step S233.

続いて、図40のステップS237に示したパターン登録処理の処理手順について説明する。図41は、パターン登録処理の処理手順を示すフローチャートである。図41に示すように、ACマシン構築部160cは、現在の状態sをトライTの初期状態に設定し、sの前の状態rを空の状態に設定する(ステップS241)。   Next, the process procedure of the pattern registration process shown in step S237 of FIG. 40 will be described. FIG. 41 is a flowchart showing a processing procedure of pattern registration processing. As shown in FIG. 41, the AC machine construction unit 160c sets the current state s to the initial state of the trie T, and sets the state r before s to an empty state (step S241).

ACマシン構築部160cは、パターンpに次の文字が存在するか否かを判定する(ステップS242)。ACマシン構築部160cは、パターンpに次の文字が存在しない場合に(ステップS243,No)、パターンpの最後の文字(a)と状態rに対して、rのパターンリストPlist[code(a)]に、pを代入し(ステップS244)、トライTを出力する(ステップS245)。   The AC machine construction unit 160c determines whether or not the next character exists in the pattern p (step S242). When the next character does not exist in the pattern p (No in step S243), the AC machine construction unit 160c performs the pattern list Plist [code (a of r for the last character (a) and the state r of the pattern p. ]] Is substituted for p (step S244), and a trie T is output (step S245).

一方、ACマシン構築部160cは、パターンpに次の文字が存在する場合に(ステップS243,Yes)、次の文字をaとし、aのasciiコードをcode(a)に設定する(ステップS246)。ACマシン構築部160cは、sの通常遷移g[code(a)]=Nullであるか否かを判定する(ステップS247)。   On the other hand, when the next character exists in the pattern p (Yes in step S243), the AC machine construction unit 160c sets the next character as a and sets the ascii code of a to code (a) (step S246). . The AC machine construction unit 160c determines whether or not the normal transition g [code (a)] = Null of s (step S247).

ACマシン構築部160cは、通常遷移g[code(a)]=Nullの場合に(ステップS248,Yes)、ステップS250に移行する。一方、ACマシン構築部160cは、g[code(a)]=Nullではない場合に(ステップS248,No)、状態nを新規作成し、g[code(a)]=nに設定する(ステップS249)。ACマシン構築部160cは、状態rに状態sを代入し、状態sにg[code(a)]を代入し(ステップS250)、ステップS242に移行する。   If the normal transition g [code (a)] = Null (step S248, Yes), the AC machine construction unit 160c proceeds to step S250. On the other hand, if g [code (a)] = Null is not satisfied (No at Step S248), the AC machine construction unit 160c creates a new state n and sets g [code (a)] = n (Step S248). S249). The AC machine construction unit 160c substitutes the state s for the state r, substitutes g [code (a)] for the state s (step S250), and proceeds to step S242.

次に、図39のステップS222に示したトライ(Π)にフェイラ遷移を追加する処理について説明する。図42、図43は、トライ(Π)にフェイラ遷移を追加する処理の処理手順を示すフローチャートである。   Next, processing for adding a failer transition to the trie (Π) shown in step S222 of FIG. 39 will be described. FIG. 42 and FIG. 43 are flowcharts showing a processing procedure of processing for adding a failer transition to a trie.

図42に示すように、ACマシン構築部160cは、初期状態から通常遷移できる全ての状態sに対して、それらのフェイラ遷移先に初期状態を代入し、現在の状態sをqueueに登録する(ステップS251)。   As shown in FIG. 42, the AC machine construction unit 160c substitutes the initial state for all of the states s that can be normally shifted from the initial state, and registers the current state s in the queue ( Step S251).

ACマシン構築部160cは、状態リストqueueに状態が存在するか否かを判定する(ステップS252)。ACマシン構築部160cは、状態リストqueueに状態が存在しない場合に(ステップS253,No)、現在のトライTをACマシンαとして出力する(ステップS254)。   The AC machine construction unit 160c determines whether or not a state exists in the state list queue (step S252). When no state exists in the state list queue (step S253, No), the AC machine construction unit 160c outputs the current trie T as the AC machine α (step S254).

ACマシン構築部160cは、状態リストqueueに状態が存在する場合に(ステップS253,Yes)、状態リストqueueの先頭の状態をsとし、状態リストqueueからsを除去する(ステップS255)。   When there is a state in the state list queue (Yes in step S253), the AC machine construction unit 160c sets s as the head state of the state list queue and removes s from the state list queue (step S255).

ACマシン構築部160cは、状態sの通常遷移が全てNullであるか否かを判定する(ステップS256)。ACマシン構築部160cは、状態sの通常遷移が全てNullの場合に(ステップS257,Yes)、ステップS252に移行する。   The AC machine construction unit 160c determines whether all the normal transitions of the state s are Null (step S256). When all the normal transitions of the state s are Null (step S257, Yes), the AC machine construction unit 160c proceeds to step S252.

一方、ACマシン構築部160cは、状態sの通常遷移が全てNullではない場合に(ステップS257,No)、状態sにおいて、g[code(a)]≠Nullとなる全ての文字aの集合をAに設定する(ステップS258)。   On the other hand, when all the normal transitions of the state s are not Null (step S257, No), the AC machine construction unit 160c determines a set of all the characters a that satisfy g [code (a)] ≠ Null in the state s. A is set to A (step S258).

ACマシン構築部160cは、集合Aに文字が存在するか否かを判定する(ステップS259)。ACマシン構築部160cは、集合Aに文字が存在しない場合に(ステップS260,No)、ステップS252に移行する。   The AC machine construction unit 160c determines whether or not a character exists in the set A (step S259). The AC machine construction unit 160c proceeds to step S252 when no character exists in the set A (step S260, No).

一方、ACマシン構築部160cは、集合Aに文字が存在する場合に(ステップS260,Yes)、図43に移行し、集合Aから文字を1つ取り出し、取り出した文字をaに設定する(ステップS261)。   On the other hand, if there is a character in set A (Yes in step S260), AC machine construction unit 160c moves to FIG. 43, extracts one character from set A, and sets the extracted character to a (step). S261).

ACマシン構築部160cは、状態sの通称遷移先next=g[code(a)]を、状態リストqueueの最後尾に追加し(ステップS262)、状態sからフェイラ遷移を繰り返し、文字aに対する通常遷移先がNullにならない最初の状態をfに設定する(ステップS263)。   The AC machine construction unit 160c adds the common transition destination next = g [code (a)] of the state s to the tail of the state list queue (step S262), repeats the failer transition from the state s, and normally The initial state in which the transition destination is not Null is set to f (step S263).

ACマシン構築部160cは、状態fに対する文字aの通常遷移先へのポインタfnext=g[code(a)]を判定し(ステップS264)、状態nextのフェイラ遷移先をfnext=g[code(a)]に設定する(ステップS265)。ACマシン構築部160cは、状態nextを与える遷移のパターンリストに、状態fnextを与える遷移のパターンリストを足し合わせ(ステップS266)、図42のステップS259に移行する。   The AC machine construction unit 160c determines the pointer fnext = g [code (a)] to the normal transition destination of the character a for the state f (step S264), and sets the next transition destination of the state next to fnext = g [code (a )] (Step S265). The AC machine construction unit 160c adds the transition pattern list that gives the state fnext to the transition pattern list that gives the state next (step S266), and proceeds to step S259 in FIG.

次に、図39のステップS223に示したACマシンAC(Π)にスキップ遷移を追加する処理の処理手順について説明する。図44は、ACマシンAC(Π)にスキップ遷移を追加する処理の処理手順を示すフローチャートである。図44に示すように、ACマシン構築部160cは、n=1に設定し(ステップS271)、圧縮辞書データdicにn行目が存在するか否かを判定する(ステップS272)。   Next, a processing procedure for adding a skip transition to the AC machine AC (AC) shown in step S223 of FIG. 39 will be described. FIG. 44 is a flowchart of a process procedure for adding a skip transition to the AC machine AC (Π). As shown in FIG. 44, the AC machine construction unit 160c sets n = 1 (step S271), and determines whether or not the nth row exists in the compressed dictionary data dic (step S272).

ACマシン構築部160cは、圧縮辞書データdicにn行目が存在しない場合に(ステップS273,No)、現在のACマシンAC(Π)を圧縮データ用ACマシンAC_b(Π、dic)として出力する(ステップS274)。   The AC machine construction unit 160c outputs the current AC machine AC (Π) as the compressed data AC machine AC_b (Π, dic) when the nth row does not exist in the compressed dictionary data dic (No in step S273). (Step S274).

一方、ACマシン構築部160cは、圧縮辞書データdicにn行目が存在する場合に(ステップS273,Yes)、圧縮辞書データdicのn行目において、ペア文字列を(a,b)とおき、置換される文字列をXに設定する(ステップS275)。   On the other hand, when the nth line exists in the compression dictionary data dic (Yes in step S273), the AC machine construction unit 160c sets the pair character string as (a, b) in the nth line of the compression dictionary data dic. The character string to be replaced is set to X (step S275).

ACマシン構築部160cは、第1のスキップ遷移作成処理を実行し(ステップS276)、第2のスキップ遷移作成処理を実行する(ステップS277)。ACマシン構築部160cは、n=n+1に設定し(ステップS278)、ステップS272に移行する。   The AC machine construction unit 160c executes a first skip transition creation process (step S276), and executes a second skip transition creation process (step S277). The AC machine construction unit 160c sets n = n + 1 (step S278), and proceeds to step S272.

続いて、図44のステップS276に示した第1のスキップ遷移作成処理の処理手順について説明する。図45は、第1のスキップ遷移作成処理の処理手順を示すフローチャートである。図45に示すように、ACマシン構築部160cは、ACマシンAC(Π)の全パスの集合をPとおき(ステップS281)、Pにパスが存在するか否かを判定する(ステップS282)。   Subsequently, the processing procedure of the first skip transition creation processing shown in step S276 of FIG. 44 will be described. FIG. 45 is a flowchart of a process procedure of the first skip transition creation process. As shown in FIG. 45, the AC machine construction unit 160c sets a set of all paths of the AC machine AC (Π) as P (step S281), and determines whether there is a path in P (step S282). .

ACマシン構築部160cは、Pにパスが存在しない場合に(ステップS283,No)、現在のACマシンAC(Π)を出力する(ステップS284)。一方、ACマシン構築部160cは、Pにパスが存在する場合に(ステップS283,Yes)、Pから任意のパスを取り出す(ステップS285)。   The AC machine construction unit 160c outputs the current AC machine AC (Π) when there is no path in P (step S283, No) (step S284). On the other hand, when a path exists in P (step S283, Yes), AC machine construction unit 160c extracts an arbitrary path from P (step S285).

ACマシン構築部160cは、パスを初期状態から葉に向かって走査する。そして、パス上の状態sとtに対してs.g[code(a)]=t、かつt.g[code(a)]=uが成り立つ場合に、スキップ遷移s.g[code(X)]=uを作成する(ステップS286)。ACマシン構築部160cは、Pからパスを消去し(ステップS287)、ステップS282に移行する。   The AC machine construction unit 160c scans the path from the initial state toward the leaf. And if sg [code (a)] = t and tg [code (a)] = u hold for states s and t on the path, create a skip transition sg [code (X)] = u (Step S286). The AC machine construction unit 160c deletes the path from P (step S287), and proceeds to step S282.

続いて、図44のステップS277に示した第2のスキップ遷移作成処理の処理手順について説明する。図46は、第2のスキップ遷移作成処理の処理手順を示すフローチャートである。   Subsequently, the processing procedure of the second skip transition creation processing shown in step S277 of FIG. 44 will be described. FIG. 46 is a flowchart showing the processing procedure of the second skip transition creation processing.

ACマシン構築部160cは、ACマシンAC(Π)の全状態を探索し(ステップS291)、ある状態sに対して、s.g[code(a)]=tかつt.g[code(b)]=NULLが成り立つものを、集合Fから除去する(ステップS292)。   The AC machine construction unit 160c searches all states of the AC machine AC (Π) (step S291), and for a certain state s, sg [code (a)] = t and tg [code (b)] = NULL Are removed from the set F (step S292).

ACマシン構築部160cは、集合Fに状態tが存在するか否かを判定する(ステップS294)。ACマシン構築部160cは、集合Fに状態tが存在しない場合に(ステップS293,No)、第2のスキップ遷移作成処理を終了する。   The AC machine construction unit 160c determines whether or not the state t exists in the set F (step S294). When the state t does not exist in the set F (step S293, No), the AC machine construction unit 160c ends the second skip transition creation process.

一方、ACマシン構築部160cは、集合Fに状態tが存在する場合に(ステップS294,Yes)、集合Fから任意の状態tを選択する(ステップS295)。ACマシン構築部160cは、t.fail.g[code(X)]=uとし、s.g[code(a)]=tとなる状態をsとする場合、スキップ遷移s.g[code(X)]=uを作成する(ステップS296)。ACマシン構築部160cは、選択済みの状態tを消去し(ステップS297)、ステップS293に移行する。   On the other hand, when the state t exists in the set F (step S294, Yes), the AC machine construction unit 160c selects an arbitrary state t from the set F (step S295). If the AC machine construction unit 160c sets t.fail.g [code (X)] = u and sg [code (a)] = t to be s, the skip transition sg [code (X)] = u is created (step S296). The AC machine construction unit 160c deletes the selected state t (step S297), and proceeds to step S293.

次に、図37のステップS203に示した切出し位置計算処理の処理手順について説明する。かかる切出し位置計算処理を実行することで、切出処理部160eは、抽出条件150gに対応する符号化データ150bの位置を計算し、計算した位置の情報を圧縮データのまま抽出する。図47は、切出し位置計算処理の処理手順を示すフローチャートである。図47に示すように、切出処理部160eは、符号化データBの先頭文字をスキャンし(ステップS301)、スキャンした文字が文字列部であるか否かを判定する(ステップS302)。   Next, the processing procedure of the cutout position calculation process shown in step S203 of FIG. 37 will be described. By executing the cut-out position calculation process, the cut-out processing unit 160e calculates the position of the encoded data 150b corresponding to the extraction condition 150g, and extracts the calculated position information as compressed data. FIG. 47 is a flowchart showing the processing procedure of the extraction position calculation process. As shown in FIG. 47, the cutout processing unit 160e scans the first character of the encoded data B (step S301), and determines whether the scanned character is a character string portion (step S302).

切出処理部160eは、スキャンした文字が文字列部である場合に(ステップS303,Yes)、文字にあわせて、圧縮データ用ACマシン150fを1文字遷移させ、照合を検知した場合にk=1に設定し(ステップS304)、ステップS311に移行する。   When the scanned character is a character string portion (Yes in step S303), the cutout processing unit 160e causes the compressed data AC machine 150f to transition by one character in accordance with the character, and k = 1 is set (step S304), and the process proceeds to step S311.

一方、切出処理部160eは、スキャンした文字が文字列部でない場合に(ステップS303,No)、スキャンした文字が開始タグであるか終了タグであるかを判定する(ステップS305)。   On the other hand, when the scanned character is not a character string portion (No at Step S303), the cutout processing unit 160e determines whether the scanned character is a start tag or an end tag (Step S305).

切出処理部160eは、スキャンした文字が終了タグの場合に(ステップS306,No)、f=1かつk=1の場合に、現在位置をendに登録し、スタックSの最終要素のstartを取得し、(start、end)をRに登録する(ステップS307)。ここで、endに登録する現在位置は、符号化データ150bの先頭文字から数えた、終了タグ符号の「>」までの数に対応する。切出処理部160eは、タグ符号をスタックSからポップし(取り出し)、k=0に設定し(ステップS308)、ステップS310に移行する。   When the scanned character is an end tag (No in step S306), the cutout processing unit 160e registers the current position in end and sets the start of the last element of the stack S when f = 1 and k = 1. And (start, end) is registered in R (step S307). Here, the current position to be registered in end corresponds to the number up to “>” of the end tag code counted from the first character of the encoded data 150b. The clipping processing unit 160e pops (takes out) the tag code from the stack S, sets k = 0 (step S308), and proceeds to step S310.

一方、切出処理部160eは、スキャンした文字が開始タグの場合に(ステップS306,Yes)、タグ符号と現在位置startをスタックSにプッシュする(格納する)(ステップS309)。ここで、現在位置startは、符号化データ150bの先頭文字から数えた、開始タグ符号の「<」までの数に対応する。   On the other hand, when the scanned character is a start tag (step S306, Yes), the cutout processing unit 160e pushes (stores) the tag code and the current position start on the stack S (step S309). Here, the current position start corresponds to the number up to “<” of the start tag code counted from the first character of the encoded data 150b.

切出処理部160eは、スタックSの値が、変換後抽出条件Q’の項目部と一致する場合にf=1とし、一致しない場合にf=0とし(ステップS310)、全ての文字をスキャンしたか否かを判定する(ステップS311)。   The cutout processing unit 160e sets f = 1 when the value of the stack S matches the item part of the post-conversion extraction condition Q ′, sets f = 0 when the value does not match (step S310), and scans all characters. It is determined whether or not (step S311).

切出処理部160eは、全ての文字をスキャンしていない場合に(ステップS312,No)、次の文字をスキャンし(ステップS313)、ステップS302に移行する。一方、切出処理部160eは、全ての文字をスキャンした場合に(ステップS312,Yes)、Rを出力する(ステップS314)。   If all the characters have not been scanned (No at Step S312), the cutout processing unit 160e scans the next character (Step S313), and proceeds to Step S302. On the other hand, when all the characters have been scanned (step S312, Yes), the cutout processing unit 160e outputs R (step S314).

上述してきたように、本実施例1にかかる検索装置100は、データ圧縮処理部160bが、XMLデータ150aを圧縮する場合に、XMLデータ150aに含まれる文字列と、XMLデータ150aに含まれる区切り文字とを区別して符号化した符号化データ150bを生成する。符号化データ150bは、文字列と区切文字を区別して符号化しているので、切出処理部160eが抽出条件に基づいて、符号化データ150bから圧縮データをそのまま切出しても、正確な検索結果を得ることが出来る。   As described above, in the search device 100 according to the first embodiment, when the data compression processing unit 160b compresses the XML data 150a, the character string included in the XML data 150a and the delimiter included in the XML data 150a. Encoded data 150b encoded by distinguishing characters is generated. Since the encoded data 150b is encoded by distinguishing the character string and the delimiter, even if the extraction processing unit 160e extracts the compressed data from the encoded data 150b as it is based on the extraction condition, an accurate search result is obtained. Can be obtained.

ところで、本実施例において説明した各処理のうち、自動的におこなわれるものとして説明した処理の全部または一部を手動的におこなうこともでき、あるいは、手動的におこなわれるものとして説明した処理の全部または一部を公知の方法で自動的におこなうこともできる。この他、上記文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。   By the way, among the processes described in the present embodiment, all or part of the processes described as being automatically performed can be manually performed, or the processes described as being manually performed can be performed. All or a part can be automatically performed by a known method. In addition, the processing procedure, control procedure, specific name, and information including various data and parameters shown in the above-described document and drawings can be arbitrarily changed unless otherwise specified.

また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。さらに、各装置にて行なわれる各処理機能は、その全部または任意の一部が、CPUおよび当該CPUにて解析実行されるプログラムにて実現され、あるいは、ワイヤードロジックによるハードウェアとして実現され得る。   Further, each component of each illustrated apparatus is functionally conceptual, and does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution / integration of each device is not limited to that shown in the figure, and all or a part thereof may be functionally or physically distributed or arbitrarily distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. Further, all or any part of each processing function performed in each device may be realized by a CPU and a program analyzed and executed by the CPU, or may be realized as hardware by wired logic.

図48は、実施例にかかる検索装置100を構成するコンピュータのハードウェア構成を示す図である。図48に示すように、このコンピュータ(検索装置)200は、入力装置201、モニタ202、RAM(Random Access Memory)203、ROM(Read Only Memory)204、他の装置(例えば、端末装置)との間でデータの送受信を行う通信装置205、記憶媒体からデータを読み取る媒体読取装置206、CPU(Central Processing Unit)207、HDD(Hard Disk Drive)208をバス209で接続して構成される。   FIG. 48 is a diagram illustrating a hardware configuration of a computer configuring the search device 100 according to the embodiment. As shown in FIG. 48, the computer (search device) 200 includes an input device 201, a monitor 202, a RAM (Random Access Memory) 203, a ROM (Read Only Memory) 204, and other devices (for example, a terminal device). A communication device 205 that transmits and receives data between them, a medium reading device 206 that reads data from a storage medium, a CPU (Central Processing Unit) 207, and an HDD (Hard Disk Drive) 208 are connected by a bus 209.

そして、HDD208には、上記した検索装置100の機能と同様の機能を発揮する検索プログラム208bが記憶されている。CPU207が、検索プログラム208bを読み出して実行することにより、検索プロセス207aが起動される。ここで、検索プロセス207aは、図2に示したデータ管理部160a、データ圧縮処理部160b、ACマシン構築部160c、照合処理部160d、切出処理部160eに対応する。   The HDD 208 stores a search program 208b that exhibits the same function as that of the search device 100 described above. The search process 207a is activated when the CPU 207 reads and executes the search program 208b. Here, the search process 207a corresponds to the data management unit 160a, the data compression processing unit 160b, the AC machine construction unit 160c, the collation processing unit 160d, and the extraction processing unit 160e shown in FIG.

また、HDD208は、記憶部150に格納されたデータに対応する各種データ208aを記憶する。CPU207は、HDD208に格納された各種データ208aを読み出して、RAM203に格納し、RAM203に格納された各種データ203aを利用して、XMLデータを圧縮し、抽出条件に対応するデータを圧縮データのまま抽出する。   In addition, the HDD 208 stores various data 208 a corresponding to the data stored in the storage unit 150. The CPU 207 reads various data 208a stored in the HDD 208, stores it in the RAM 203, compresses the XML data using the various data 203a stored in the RAM 203, and maintains the data corresponding to the extraction condition as compressed data. Extract.

ところで、図48に示した検索プログラム208bは、必ずしも最初からHDD208に記憶させておく必要はない。たとえば、コンピュータに挿入されるフレキシブルディスク(FD)、CD−ROM、DVDディスク、光磁気ディスク、ICカードなどの「可搬用の物理媒体」、または、コンピュータの内外に備えられるハードディスクドライブ(HDD)などの「固定用の物理媒体」、さらには、公衆回線、インターネット、LAN、WANなどを介してコンピュータに接続される「他のコンピュータ(またはサーバ)」などに検索プログラム208bを記憶しておき、コンピュータがこれらから検索プログラム208bを読み出して実行するようにしてもよい。   Incidentally, the search program 208b shown in FIG. 48 is not necessarily stored in the HDD 208 from the beginning. For example, a “portable physical medium” such as a flexible disk (FD), a CD-ROM, a DVD disk, a magneto-optical disk, or an IC card inserted into a computer, or a hard disk drive (HDD) provided inside or outside the computer. The search program 208b is stored in the “fixed physical medium”, and “another computer (or server)” connected to the computer via a public line, the Internet, a LAN, a WAN, or the like. However, the search program 208b may be read from these and executed.

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

(付記1)圧縮されたデータの集合を対象に検索処理を実行する検索システムであって、
データの属性を示す区切情報により各データが区切られたデータ集合を取得し、当該データ集合に含まれるデータに基づき符号化データに置換し、さらに、該データの属性を示す区切情報のみに基づき符号化データに置換することで前記データ集合を圧縮する圧縮処理部
を有することを特徴とする検索システム。
(Supplementary Note 1) A search system that executes a search process on a set of compressed data,
A data set in which each data is divided by the delimiter information indicating the attribute of the data is acquired, replaced with encoded data based on the data included in the data set, and further encoded based only on the delimiter information indicating the attribute of the data A search system comprising: a compression processing unit that compresses the data set by substituting with data.

(付記2)付記1記載の検索システムであって、
前記圧縮処理部により圧縮されたデータ集合を対象に、検索すべき属性およびデータを有する検索条件を取得した場合に、前記圧縮されたデータ集合の区切情報と置換前の区切情報の関係に基づいて、前記検索条件の属性を符号化データに置換する置換処理部と、
前記検索条件の属性を符号化データに置換された検索条件と前記圧縮されたデータ集合を基にして、前記検索条件に指定される前記圧縮されたデータ集合上の領域を特定し、特定した領域に含まれるデータを出力する検索処理部と
を有することを特徴とする検索システム。
(Supplementary note 2) The search system according to supplementary note 1,
Based on the relationship between the compressed data set delimiter information and the delimiter information before replacement when the search condition having the attribute and data to be searched is acquired for the data set compressed by the compression processing unit A replacement processing unit for replacing the attribute of the search condition with encoded data;
Based on the search condition in which the attribute of the search condition is replaced with encoded data and the compressed data set, the area on the compressed data set specified in the search condition is specified, and the specified area A search processing unit for outputting data included in the search system.

(付記3)付記2記載の検索システムであって、
前記検索処理部は、前記圧縮されたデータ集合を先頭から読み出して、前記検索条件の属性に対応する位置の区切情報に囲まれたデータに対応する符号化データを抽出し、抽出した符号化データに対応するデータが前記検索条件のデータを有するか否かを判定し、判定結果に基づいて、前記検索条件に指定される前記圧縮されたデータ集合上の領域を特定することを特徴とする検索システム。
(Supplementary note 3) The search system according to supplementary note 2,
The search processing unit reads the compressed data set from the beginning, extracts encoded data corresponding to data surrounded by position delimiter information corresponding to the attribute of the search condition, and extracts the extracted encoded data And determining whether or not the data corresponding to the data of the search condition has the data of the search condition, and specifying a region on the compressed data set specified by the search condition based on the determination result system.

(付記4)コンピュータに、
データの属性を示す区切情報により各データが区切られた階層構造を有するデータ集合を取得し、当該データ集合に含まれるデータに基づき符号化データに置換し、さらに、該データの属性を示す区切情報のみに基づき符号化データに置換することで前記データ集合を圧縮する圧縮処理機能
を実現させるためのプログラムを記録した記憶媒体。
(Appendix 4)
A data set having a hierarchical structure in which each data is delimited by delimiter information indicating data attributes is obtained, replaced with encoded data based on the data included in the data set, and delimiter information indicating the data attributes A storage medium storing a program for realizing a compression processing function of compressing the data set by replacing with encoded data based on the above.

(付記5)付記4記載の記憶媒体であって、
前記圧縮処理機能により圧縮されたデータ集合を対象に、検索すべき属性およびデータを有する検索条件を取得した場合に、前記圧縮されたデータ集合の区切情報と置換前の区切情報の関係に基づいて、前記検索条件の属性を符号化データに置換する置換処理機能と、
前記検索条件の属性を符号化データに置換された検索条件と前記圧縮されたデータ集合を基にして、前記検索条件に指定される前記圧縮されたデータ集合上の領域を特定し、特定した領域に含まれるデータを出力する検索処理機能と
を実現させるためのプログラムを記録した記憶媒体。
(Supplementary note 5) The storage medium according to supplementary note 4,
Based on the relationship between the delimiter information of the compressed data set and the delimiter information before replacement when the search condition having the attribute and data to be searched is acquired for the data set compressed by the compression processing function A replacement processing function for replacing the attribute of the search condition with encoded data;
Based on the search condition in which the attribute of the search condition is replaced with encoded data and the compressed data set, the area on the compressed data set specified in the search condition is specified, and the specified area A storage medium storing a program for realizing a search processing function for outputting data included in the.

(付記6)付記5記載の記憶媒体であって、
前記検索処理機能は、前記圧縮されたデータ集合を先頭から読み出して、前記検索条件の属性に対応する位置の区切情報に囲まれたデータに対応する符号化データを抽出し、抽出した符号化データに対応するデータが前記検索条件のデータを有するか否かを判定し、判定結果に基づいて、前記検索条件に指定される前記圧縮されたデータ集合上の領域を特定することを特徴とする記憶媒体。
(Supplementary note 6) The storage medium according to supplementary note 5,
The search processing function reads the compressed data set from the beginning, extracts encoded data corresponding to data surrounded by position delimiter information corresponding to the attribute of the search condition, and extracts the extracted encoded data And determining whether or not the data corresponding to the data of the search condition has data of the search condition, and specifying an area on the compressed data set specified by the search condition based on the determination result Medium.

(付記7)圧縮装置が、
データの属性を示す区切情報により各データが区切られた階層構造を有するデータ集合を取得するステップと、
前記データ集合に含まれるデータに基づき符号化データに置換し、さらに、該データの属性を示す区切情報のみに基づき符号化データに置換することで前記データ集合を圧縮するステップと
を実行することを特徴とする圧縮方法。
(Appendix 7) The compression device is
Obtaining a data set having a hierarchical structure in which each piece of data is divided by division information indicating data attributes;
Replacing the encoded data based on the data included in the data set, and further compressing the data set by replacing the encoded data based only on the delimiter information indicating the attribute of the data. Characteristic compression method.

(付記8)検索装置が、
付記7に記載の圧縮装置により圧縮されたデータ集合を対象に、検索すべき属性およびデータを有する検索条件を取得した場合に、前記圧縮されたデータ集合の区切情報と置換前の区切情報の関係に基づいて、前記検索条件の属性を符号化データに置換するステップと、
前記検索条件の属性を符号化データに置換された検索条件と前記圧縮されたデータ集合を基にして、前記検索条件に指定される前記圧縮されたデータ集合上の領域を特定し、特定した領域に含まれるデータを出力するステップと
を実行することを特徴とする検索方法。
(Appendix 8) The search device is
The relationship between the compressed data set delimiter information and the delimiter information before replacement when the search condition having the attribute and data to be searched is acquired for the data set compressed by the compression device according to appendix 7 Replacing the attribute of the search condition with encoded data based on:
Based on the search condition in which the attribute of the search condition is replaced with encoded data and the compressed data set, the area on the compressed data set specified in the search condition is specified, and the specified area And a step of outputting data included in the search method.

(付記9)前記データを出力するステップにおいて、前記圧縮されたデータ集合を先頭から読み出して、前記検索条件の属性に対応する位置の区切情報に囲まれたデータに対応する符号化データを抽出し、抽出した符号化データに対応するデータが前記検索条件のデータを有するか否かを判定し、判定結果に基づいて、前記検索条件に指定される前記圧縮されたデータ集合上の領域を特定すること特徴とする付記8に記載の検索方法。 (Supplementary Note 9) In the step of outputting the data, the compressed data set is read from the head, and encoded data corresponding to the data surrounded by the delimiter information of the position corresponding to the attribute of the search condition is extracted. Determining whether or not the data corresponding to the extracted encoded data has the data of the search condition, and specifying an area on the compressed data set specified by the search condition based on the determination result The search method according to appendix 8, which is characterized by that.

110 入力部
120 出力部
130 通信制御IF部
140 入出力制御IF部
150 記憶部
150a XMLデータ
150b 符号化データ
150c 対応表
150d ACマシン
150e 圧縮辞書データ
150f 圧縮データ用ACマシン
150g 抽出条件
150h 変換後抽出条件
160 制御部
160a データ管理部
160b データ圧縮処理部
160c ACマシン構築部
160d 照合処理部
160e 切出処理部
200 コンピュータ(検索装置)
201 入力装置
202 モニタ
203 RAM
203a,208a 各種データ
204 ROM
205 通信制御装置
206 媒体読取装置
207 CPU
207a 検索プロセス
208 HDD
208b 検索プログラム
209 バス
110 Input unit 120 Output unit 130 Communication control IF unit 140 Input / output control IF unit 150 Storage unit 150a XML data 150b Encoded data 150c Correspondence table 150d AC machine 150e Compression dictionary data 150f Compression data AC machine 150g Extraction condition 150h Extraction after conversion Condition 160 Control unit 160a Data management unit 160b Data compression processing unit 160c AC machine construction unit 160d Collation processing unit 160e Extraction processing unit 200 Computer (search device)
201 Input device 202 Monitor 203 RAM
203a, 208a Various data 204 ROM
205 Communication Control Device 206 Medium Reading Device 207 CPU
207a Search process 208 HDD
208b Search program 209 Bus

Claims (3)

第1のデータと、前記第1のデータの属性を示す第2のデータと、を含むデータのうち、少なくとも前記第2のデータを、前記第2のデータよりも小さいサイズの符号化データに置換した置換データから、指定のデータを検索する検索装置であって、
前記指定のデータの属性を示すデータを含む検索条件を受け付けた場合、前記第2のデータの置換前後の関係を記憶する記憶部を参照し、前記指定のデータの属性を示す前記データを前記符号化データに置換する置換処理部と、
前記指定のデータの属性を示す前記データが前記符号化データに置換された前記検索条件を用いて、前記置換データから前記検索条件により特定される前記置換データ上の領域に含まれるデータを取得する検索処理部と
を有することを特徴とする検索装置。
Of the data including the first data and the second data indicating the attribute of the first data, at least the second data is replaced with encoded data having a size smaller than the second data. A search device for searching specified data from the replacement data,
When a search condition including data indicating the attribute of the designated data is received, the storage unit storing a relationship before and after the replacement of the second data is referred to, and the data indicating the attribute of the designated data is the code A replacement processing unit for replacing the data with
Using the search condition in which the data indicating the attribute of the designated data is replaced with the encoded data, data included in an area on the replacement data specified by the search condition is acquired from the replacement data And a search processing unit.
第1のデータと、前記第1のデータの属性を示す第2のデータと、を含むデータのうち、少なくとも前記第2のデータを、前記第2のデータよりも小さいサイズの符号化データに置換した置換データから、指定のデータを検索する検索装置の検索方法であって、
前記指定のデータの属性を示すデータを含む検索条件を受け付けた場合、前記第2のデータの置換前後の関係を記憶する記憶部を参照し、前記指定のデータの属性を示す前記データを前記符号化データに置換し、
前記指定のデータの属性を示す前記データが前記符号化データに置換された前記検索条件を用いて、前記置換データから前記検索条件により特定される前記置換データ上の領域に含まれるデータを取得する
処理を実行することを特徴とする検索方法。
Of the data including the first data and the second data indicating the attribute of the first data, at least the second data is replaced with encoded data having a size smaller than the second data. A search method of a search device for searching for specified data from the replacement data,
When a search condition including data indicating the attribute of the designated data is received, the storage unit storing a relationship before and after the replacement of the second data is referred to, and the data indicating the attribute of the designated data is the code Replaced with data
Using the search condition in which the data indicating the attribute of the designated data is replaced with the encoded data, data included in an area on the replacement data specified by the search condition is acquired from the replacement data A search method characterized by executing processing.
第1のデータと、前記第1のデータの属性を示す第2のデータと、を含むデータのうち、少なくとも前記第2のデータを、前記第2のデータよりも小さいサイズの符号化データに置換した置換データから、指定のデータを検索する検索装置に、
前記指定のデータの属性を示すデータを含む検索条件を受け付けた場合、前記第2のデータの置換前後の関係を記憶する記憶部を参照し、前記指定のデータの属性を示す前記データを前記符号化データに置換し、
前記指定のデータの属性を示す前記データが前記符号化データに置換された前記検索条件を用いて、前記置換データから前記検索条件により特定される前記置換データ上の領域に含まれるデータを取得する
処理を実行させることを特徴とする検索プログラム。
Of the data including the first data and the second data indicating the attribute of the first data, at least the second data is replaced with encoded data having a size smaller than the second data. To the search device that searches the specified data from the replacement data
When a search condition including data indicating the attribute of the designated data is received, the storage unit storing a relationship before and after the replacement of the second data is referred to, and the data indicating the attribute of the designated data is encoded Replaced with data
Using the search condition in which the data indicating the attribute of the designated data is replaced with the encoded data, data included in an area on the replacement data specified by the search condition is acquired from the replacement data A search program characterized by causing processing to be executed.
JP2014155577A 2014-07-30 2014-07-30 SEARCH DEVICE, SEARCH METHOD, AND SEARCH PROGRAM Active JP6055441B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014155577A JP6055441B2 (en) 2014-07-30 2014-07-30 SEARCH DEVICE, SEARCH METHOD, AND SEARCH PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014155577A JP6055441B2 (en) 2014-07-30 2014-07-30 SEARCH DEVICE, SEARCH METHOD, AND SEARCH PROGRAM

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2009140372A Division JP2010287052A (en) 2009-06-11 2009-06-11 Retrieval system and storage medium

Publications (2)

Publication Number Publication Date
JP2014238863A true JP2014238863A (en) 2014-12-18
JP6055441B2 JP6055441B2 (en) 2016-12-27

Family

ID=52135906

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014155577A Active JP6055441B2 (en) 2014-07-30 2014-07-30 SEARCH DEVICE, SEARCH METHOD, AND SEARCH PROGRAM

Country Status (1)

Country Link
JP (1) JP6055441B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018007236A (en) * 2016-06-22 2018-01-11 富士通株式会社 Compression program, restoration program, compression method, restoration method, and information processing device
US10685179B2 (en) 2016-10-12 2020-06-16 Fujitsu Limited XML verification apparatus, verification method, encoding apparatus, encoding method, and computer-readable recording medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008084341A (en) * 1999-06-21 2008-04-10 Fujitsu Ltd Structured document compressing method, compressing device, and computer-readable recording medium recording structured document compressing program
WO2008142800A1 (en) * 2007-05-24 2008-11-27 Fujitsu Limited Information search program, recording medium having the program recorded thereon, information search device, and information search method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008084341A (en) * 1999-06-21 2008-04-10 Fujitsu Ltd Structured document compressing method, compressing device, and computer-readable recording medium recording structured document compressing program
WO2008142800A1 (en) * 2007-05-24 2008-11-27 Fujitsu Limited Information search program, recording medium having the program recorded thereon, information search device, and information search method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018007236A (en) * 2016-06-22 2018-01-11 富士通株式会社 Compression program, restoration program, compression method, restoration method, and information processing device
US10685179B2 (en) 2016-10-12 2020-06-16 Fujitsu Limited XML verification apparatus, verification method, encoding apparatus, encoding method, and computer-readable recording medium

Also Published As

Publication number Publication date
JP6055441B2 (en) 2016-12-27

Similar Documents

Publication Publication Date Title
JP6629678B2 (en) Machine learning device
US8370808B2 (en) Apparatus and a method for generating a test case
JP2010287052A (en) Retrieval system and storage medium
JP4980148B2 (en) Document search method
US7200584B2 (en) Time series pattern extraction apparatus and method
US8655921B2 (en) True/false decision method for deciding whether search query containing logical expression is true or false
US20100011032A1 (en) Document management apparatus, document management system, and document management method
JP2007521528A (en) Creating a volume image
CN111831785A (en) Sensitive word detection method and device, computer equipment and storage medium
JP6055441B2 (en) SEARCH DEVICE, SEARCH METHOD, AND SEARCH PROGRAM
JP5194818B2 (en) Data classification method and data processing apparatus
KR101374239B1 (en) Forensic analysis method and system for document files
KR101827965B1 (en) Apparatus and method for analyzing interface control document
US20180107469A1 (en) Identifying Unmatched Registry Entries
JP5665821B2 (en) Document processing apparatus and program
JP5718166B2 (en) Design verification method and program
US10942934B2 (en) Non-transitory computer-readable recording medium, encoded data searching method, and encoded data searching apparatus
JP5396843B2 (en) Search method and search device
WO2022191982A1 (en) Ticket troubleshooting support system
JP2007140707A (en) Graph retrieval device
JP2004213091A (en) Device for searching document image, and method therefor, system for searching document image, and program
US7523031B1 (en) Information processing apparatus and method capable of processing plurality type of input information
CN114118078A (en) Production support device, production support method, and recording medium
CN113032518A (en) Information processing apparatus, storage medium, and information processing method
JP7490670B2 (en) Search Device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150430

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150512

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150713

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150804

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151104

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20151111

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20151211

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161007

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161202

R150 Certificate of patent or registration of utility model

Ref document number: 6055441

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150