+

JPH03131969A - Method and device for retrieving code string - Google Patents

Method and device for retrieving code string

Info

Publication number
JPH03131969A
JPH03131969A JP1268927A JP26892789A JPH03131969A JP H03131969 A JPH03131969 A JP H03131969A JP 1268927 A JP1268927 A JP 1268927A JP 26892789 A JP26892789 A JP 26892789A JP H03131969 A JPH03131969 A JP H03131969A
Authority
JP
Japan
Prior art keywords
symbol string
search
symbol
integrated circuit
matching
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
JP1268927A
Other languages
Japanese (ja)
Other versions
JP2880199B2 (en
Inventor
Mitsuru Akisawa
秋沢 充
Hisamitsu Kawaguchi
川口 久光
Kanji Kato
加藤 寛次
Atsushi Hatakeyama
敦 畠山
Yoshiki Noguchi
孝樹 野口
Hiromichi Fujisawa
藤沢 浩道
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.)
Hitachi Ltd
Maxell Ltd
Original Assignee
Hitachi Ltd
Hitachi Maxell 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 Hitachi Ltd, Hitachi Maxell Ltd filed Critical Hitachi Ltd
Priority to JP1268927A priority Critical patent/JP2880199B2/en
Publication of JPH03131969A publication Critical patent/JPH03131969A/en
Priority to US08/349,124 priority patent/US5452451A/en
Application granted granted Critical
Publication of JP2880199B2 publication Critical patent/JP2880199B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータベース、文書ファイリングシステム等の
非数値データ処理を含む情報処理システムにおいて、デ
ータの高速な検索処理、特に文字列検索による文書デー
タの全文検索に好適な記号列検索方法及びその方法を実
現する装置、更に該装置としての半導体集積回路に関す
る。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention is applicable to high-speed data retrieval processing, particularly document data search through character string retrieval, in information processing systems including non-numeric data processing such as databases and document filing systems. The present invention relates to a symbol string search method suitable for full text search, a device for implementing the method, and a semiconductor integrated circuit as the device.

〔従来の技術〕[Conventional technology]

情報処理システムの記憶容量が年々増大するに従い、文
書データに代表される非数値データを扱う処理の比率が
高くなっている。このような背景から、大容量のデータ
ベースから所望の文書やデータを高速に漏れなく検索す
る処理の重要性が高まりつつある。
As the storage capacity of information processing systems increases year by year, the proportion of processing that handles non-numeric data such as document data is increasing. Against this background, the importance of processing to quickly and thoroughly search for desired documents and data from large-capacity databases is increasing.

従来1文書データの検索においては、キーワードや分類
コード等の付加情報を用いる方法が多く取られてきた。
Conventionally, when searching for single document data, many methods have been used to use additional information such as keywords and classification codes.

しかし、キーワードや分類コードだけでは細かい検索の
条件を厳密に表現することは難しく、十分な絞り込みを
行いにくい。したがって、この方法では検索者が意図し
なかった文書も検索ノイズとして含まれてしまう。その
ため、最終的には検索者が直接本文を読んで文書データ
を選択しなければならず、検索処理の効率が上がらない
という問題があった。更に文書データの増大に伴い、キ
ーワードや分類コードを付加するインデキシングの作業
量が増大し、文書データの登録の遅れの原因になってい
る。また、キーワードや分類コードは時代と共にその意
味が変化して陳腐化する場合があり、データベースの最
新性維持の困難の原因となっている。
However, it is difficult to precisely express detailed search conditions using only keywords and classification codes, making it difficult to narrow down the search sufficiently. Therefore, with this method, documents that were not intended by the searcher are also included as search noise. Therefore, in the end, the searcher must directly read the text and select the document data, which poses a problem in that the efficiency of the search process cannot be improved. Furthermore, as the amount of document data increases, the amount of work required for indexing to add keywords and classification codes increases, causing delays in document data registration. Furthermore, the meanings of keywords and classification codes may change over time and become obsolete, making it difficult to keep databases up-to-date.

これらの問題を克服するために1文書の本文をスキャン
しつつ、その内容とユーザにより任意に設定されたキー
ワードとの比較照合を行う方法(以下、フルテキストサ
ーチと呼ぶ)が、提案されている。
To overcome these problems, a method (hereinafter referred to as full-text search) has been proposed in which the main text of a document is scanned and the content is compared with keywords arbitrarily set by the user. .

このフルテキストサーチを用いた文字列検索システムの
一例を第34図に示す。(アール、エル。
FIG. 34 shows an example of a character string search system using this full text search. (R, L.

ハスキン アンド エル、ニー、ホラー:“オペレーシ
ョナル キャラクタリスティックス オブア ハードウ
ェア ペースト パターン マツチャー、ニー シー 
エム トランザクションズオン データベース システ
ムズ、第8巻、第1号、1983年(R,L、 Has
kin and L、 A。
Haskin & El, Ni, Holler: “Operational Characteristics of Hardware Paste Patterns Matscher, Ni, C.
M Transactions on Database Systems, Volume 8, No. 1, 1983 (R,L, Has
kin and L, A.

)1o11aar : ”0perational C
haracteristics of aHardwa
re−Based  Pattern  Matche
r”、ACM  Trans。
)1o11aar: ”0perimental C
haracteristics of a Hardware
re-Based Pattern Match
r”, ACM Trans.

on Database Systems、Vol、8
.No、l、1983))文字列検索システム300は
ホストコンピュータに接続され、検索要求320と検索
結果324を通信によりやり取りする。ホストコンピュ
ータから検索要求320が送られると、検索制御手段3
10はこれを受け付け、解析し1文字列照合手段313
と複合条件判別手段314へ検索制御情報321を送る
。また、検索制御手段310は記憶装置制御手段311
を制御して、文字列記憶手段312に格納されている文
字列データ322を文字列照合手段313へ転送させる
on Database Systems, Vol. 8
.. No. 1, 1983)) The string search system 300 is connected to a host computer and exchanges search requests 320 and search results 324 through communication. When a search request 320 is sent from the host computer, the search control means 3
10 receives this, analyzes it, and 1 character string matching means 313
and sends the search control information 321 to the compound condition determination means 314. The search control means 310 also includes a storage device control means 311.
is controlled to transfer the character string data 322 stored in the character string storage means 312 to the character string collation means 313.

文字列照合手段313は入力された文字列データ322
と、予め検索制御情報321として設定された文字列と
の照合を行ない、該当する文字列を検出すると、検出情
報323を複合条件判別手段314へ出力する。複合条
件判別手段314は、予め検索制御情報321として設
定された、検索要求中の文字列間の位置関係等に関する
複合条件に、検出情報323が合致するかを調べる。合
致する場合には、該当する文書データの識別情報や文書
内容を、検索結果324として出力し、これがホストコ
ンピュータへ送られる。
The character string matching means 313 uses the input character string data 322
is compared with a character string set in advance as search control information 321, and when a corresponding character string is detected, the detected information 323 is output to the compound condition determining means 314. The compound condition determining means 314 checks whether the detection information 323 matches a compound condition regarding the positional relationship between character strings in the search request, etc., which is set in advance as the search control information 321. If there is a match, the identification information and document contents of the corresponding document data are output as a search result 324, which is sent to the host computer.

上記文字列照合手段313で行なうフルテキストサーチ
のひとつに有限オートマトンを用いた方法がある。この
方法ではキーワード数によらず1回の本文スキャンで検
索を行うことができる。
One of the full text searches performed by the character string matching means 313 is a method using a finite automaton. With this method, a search can be performed with one text scan regardless of the number of keywords.

(ニー、ブイ、二一ホ アンド エム、ジェイ。(Nee, Bui, 21 Ho and M, Jay.

コラツシツク:“エフイシエント ストリングマツチン
グ”、コミュニケーションズ ニー ジェム、第18巻
、第6号、1975年(A、V。
Kolatszczyk: “Efficient String Matching”, Communications Knee Gem, Volume 18, No. 6, 1975 (A, V.

Aho  and  M、J、Corasick:  
”Efficient  StringMatchin
g”、Comra、 ACM 、 Vol、 18.N
o、 5.1975) )この方法はdon’t ca
re文字を含む検索、誤り文字を含む検索など様々な曖
昧検索も実現することができ。
Aho and M, J, Corasick:
”Efficient String Matchin
g”, Comra, ACM, Vol. 18.N.
o, 5.1975)) This method doesn't ca
It is also possible to perform various ambiguous searches, such as searches that include re characters and searches that include incorrect characters.

フルテキストサーチに有効な手法である。この有限オー
トマトンを用いたフルテキストサーチを高速に処理する
アルゴリズムやその実現手段については、特開昭63−
311530号に記載されている。
This is an effective method for full-text searches. Regarding the algorithm and its implementation means for processing full text search at high speed using this finite automaton, please refer to
No. 311530.

ところで、特開昭63−311530号にも記載されて
いるように、従来の有限オートマトンを用いたフルテキ
ストサーチにおいては、各サイクルの状態遷移は常に状
態遷移テーブルを参照しつつ行なわれる。一般にこの状
態遷移テーブルの容量は大きくなるため、有限オートマ
トンの実行を制御する半導体集積回路とは別チップのメ
モリに格納されるのが通常である。このため各サイクル
毎にオートマトン実行制御手段から外部へのメモリアク
セスが必要となり、処理速度向上の妨げとなってしまう
By the way, as described in Japanese Patent Application Laid-Open No. 63-311530, in a full text search using a conventional finite automaton, state transitions in each cycle are always performed with reference to a state transition table. Since the capacity of this state transition table is generally large, it is usually stored in a memory on a separate chip from the semiconductor integrated circuit that controls the execution of the finite automaton. For this reason, external memory access from the automaton execution control means is required for each cycle, which impedes improvement in processing speed.

そこで、本願発明者らは、先に、検索文字列の照合処理
において実行頻度の高い部分を高速化することで1文字
列検索のトータルの処理速度を向上させる方式(高速先
頭照合方式)を提案して出願済である。(特願平1−1
50401 、平成1年6月15日出願)第35図に、
この方式のブロック図を示す。
Therefore, the inventors of the present invention first proposed a method (high-speed head matching method) that improves the total processing speed of a single string search by speeding up the frequently executed part of the search string matching process. The application has been filed. (Patent application Hei 1-1
50401, filed on June 15, 1999) In Figure 35,
A block diagram of this method is shown.

これは状態遷移テーブルの参照頻度の高い部分。This is the frequently referenced part of the state transition table.

すなわちテーブルを格納しているメモリのアクセス頻度
の高いデータを、有限オートマトン実行手段と同じチッ
プ上に置く方式である。言い換えれば状態遷移テーブル
を階層化して、有限オートマトン実行手段の内部と外部
に分割して置くものである。これはある意味では従来の
キャッシュメモリの概念のアナロジ−のようであるが、
照合処理中にデータを異なった記憶階層間で移動させる
ことがないという点で、キャッシュメモリとは本質的に
異なるものである。従って、照合処理は状態遷移テーブ
ルのアクセス頻度の高い内容を、これと等価になるよう
に並列比較器に設定することにより、検索処理時にはこ
の並列比較器に設定された部分文字列とテキストデータ
との比較だけで、その大部分の処理を行なうことができ
るようになる。つまり、メモリアクセスなしで大部分の
処理が行なえるようになるために処理速度が著しく向上
することになる。
In other words, this is a method in which frequently accessed data in the memory that stores tables is placed on the same chip as the finite automaton execution means. In other words, the state transition table is hierarchized and divided into internal and external parts of the finite automaton execution means. In a sense, this seems to be an analogy to the concept of conventional cache memory, but
It differs essentially from cache memory in that data is not moved between different storage hierarchies during the matching process. Therefore, in the matching process, by setting the frequently accessed content of the state transition table in the parallel comparator so that it is equivalent to this content, during the search process, the substring and text data set in the parallel comparator are Most of the processing can be done just by comparing. In other words, most of the processing can be performed without memory access, resulting in a significant improvement in processing speed.

ところで、先に我々が提案した方式においては。By the way, in the method we proposed earlier.

並列比較器に設定できるものとしては、部分文字列その
ものと、その部分文字列の任意位置にdon’t ca
reを設定したものだけであった。しかし実際の照合処
理においては、「特定の文字以外の全ての文字を対象と
する照合」 (否定条件)を行なう場合もある。この例
を次に示す。
The things that can be set in the parallel comparator are the substring itself and the don't ca
It was only the one that set re. However, in actual matching processing, "matching that targets all characters other than specific characters" (negative condition) may be performed. An example of this is shown below.

例えば、指定された検索文字列″大容凰′″に対して、
正常な検索文字列以外に1文字誤りを許容する検索を行
なう場合について説明する。すなわち、1文字入れ替わ
り、1文字挿入、及び1文字脱落を許容する場合である
For example, for the specified search string "大过凰′",
A case will be described in which a search is performed that allows one character error in addition to a normal search string. That is, this is a case where one character is allowed to be replaced, one character is inserted, and one character is omitted.

ここで、 「(大)以外の全ての文字」を i(大)。here, "All letters except (large)" are i (large).

「(容)以外の全ての文字」を −(容)、「(量)以
外の全ての文字」を 5(量)、「任意の1文字(do
n’t careの設定)」を?、で示すことにすると
、設定文字列′″大容量″に対して1文字誤り許容検索
を行なうためには、K工:大容量 に2:大官1(量) K3:大−(容)量 に番ニー(大)容量 に5:人容?量 に6:大?容量 に7:大官 にδ:大量 に9:容量 の9個の文字列を検索しなければならない。これらの文
字列をフルテキストサーチにより検索する有限オートマ
トンを(後述する第4図のように)生成すると、否定条
件を含む文字の入力が状態の遷移条件として現れる。(
これを排他遷移と呼ぶ。)従って並列比較器はこの様な
条件が検出できなければならない。このように、誤り文
字を許容するような曖昧検索を実現するためには、並列
比較器に否定条件の設定機能を持たせることが必要とな
る。
“All characters other than (quantity)” are − (yō), “all characters other than (quantity)” are 5 (quantity), and “any one character (do
"Don't care settings)"? , in order to perform a one-character error-tolerant search for the set character string ``large capacity'', K: large capacity, 2: large capacity, 1 (quantity), K3: large - (volume), Number 5 for quantity (large) 5 for capacity: capacity? 6 for quantity: large? You have to search for 9 character strings: 7 for capacity: δ for large quantity: 9 for large quantity: 9 character strings for capacity. When a finite automaton that searches these character strings by full text search is generated (as shown in FIG. 4, which will be described later), input of characters including negative conditions will appear as state transition conditions. (
This is called an exclusive transition. ) Therefore, the parallel comparator must be able to detect such conditions. In this way, in order to implement an ambiguous search that allows erroneous characters, it is necessary to provide the parallel comparator with a function of setting a negative condition.

また、否定条件の設定が可能となることによって不要な
検索結果、すなわち、いわゆる検索ノイズを抑制するこ
とができるようになる。
Furthermore, by making it possible to set a negative condition, it becomes possible to suppress unnecessary search results, that is, so-called search noise.

例えば“金属原子″′導体″、という文字を含むテキス
トをサーチする場合について考える。
For example, consider a search for text containing the words "metal atom" and "conductor."

部分文字列として先頭2文字を並列比較器へ設定すると
すれば、゛′金属″″導体”、が設定され、テキストと
の照合が行なわれる。しかし、この照合の際に゛′金属
″という部分文字列に対して″非金属”を含むテキスト
が、あるいは″導体”という部分文字列に対して″半導
体″を含むテキストが検出されてしまう、これら″非金
属”  ″半導体′″はそれぞれ設定部分文字列″金属
”′導体”を内部に含むにもかかわらず、それとは異な
った意味を持つ別の文字列である。検索の目的によって
は、これらはフルテキストサーチの際の不要な検索結果
、いわゆる検索ノイズとして現れてしまう。
If the first two characters are set as a partial string to the parallel comparator, "metal""conductor" will be set and matched against the text. However, during this matching, the part "metal" Text containing "nonmetal" is detected for a character string, or text containing "semiconductor" for a partial string "conductor" is detected.These "nonmetal" and "semiconductor" are respectively set parts. Even though it contains the string ``metal''``conductor'', it is a different string with a different meaning.Depending on the purpose of the search, these may be unnecessary search results during a full-text search. This appears as so-called search noise.

そこで、このような検索ノイズを取り除くためには、否
定条件を用いて次のような限定の強い部分文字列の設定
を行なえばよい。
Therefore, in order to remove such search noise, a negative condition may be used to set a strongly limited substring as described below.

″金属2  →  1(非)金属″ パ導体″  →  −(半)導体″ これにより″非金属I+、14半導体″が検索ノイズと
して現れることを防ぐことができる。このような例は他
にも等々、多く存在する。従って否定″数値処理″ →
 1(非)数値処理″゛′定義語″  → “−(未)
定義語″条件の設定が可能となることで、検索ノイズが
抑制できることになる。
``Metal 2 → 1 (non-)metal'' ``Pacific conductor'' → - (semiconductor)'' This can prevent ``non-metal I+, 14 semiconductor'' from appearing as search noise. There are many other examples like this. Therefore, negation “numerical processing” →
1 (Non) Numerical processing “゛′Defined word” → “− (Non)
By being able to set "definition word" conditions, search noise can be suppressed.

しかし、従来はこの否定条件の設定機能がないため、1
文字誤り許容検索や、ノイズ抑制のための限定検索がで
きないという問題があった。
However, in the past, there was no function to set this negative condition, so 1
There was a problem in that it was not possible to perform character error-tolerant searches or limited searches to suppress noise.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

オートマトンを用いたフルテキストサーチによる文書検
索において、状態遷移テーブルが格納されたメモリとオ
ートマトン実行手段とのデータの入出力頻度を従来より
も低減して処理の高速化を図る方法がある。この方法を
実行する際に、検索文字列中にdon’t care文
字を設定した検索や、検索文字列中に否定条件を設定し
た誤り許容検索等の、曖昧検索を可能とする半導体集積
回路を提供することを目的とする。
In document retrieval by full text search using an automaton, there is a method of speeding up the processing by reducing the frequency of data input/output between the memory in which the state transition table is stored and the automaton execution means compared to the conventional method. When executing this method, a semiconductor integrated circuit that enables ambiguous searches such as a search in which the don't care character is set in the search string or an error-tolerant search in which a negative condition is set in the search string is used. The purpose is to provide.

〔課題を解決するための手段〕[Means to solve the problem]

上記目的を達成するために5文書データ中から探し出す
べき複数の文字列(以後、検索文字列と呼ぶ)の一部分
を取り出した部分文字列と、文書データを先頭文字から
順に並べた文字列(以後、被検索文字列と呼ぶ)との照
合を並列に高速処理する並列比較器を、オートマトン実
行手段の前段に設けた半導体集積回路において、この並
列比較器に設定する部分文字列の任意位置にdon’t
 careの設定を可能とする手段と、否定条件の設定
を可能とする手段を設けることにより、高速かつ柔軟性
の高い曖昧検索を実現した。
In order to achieve the above purpose, a partial character string is obtained by extracting a part of multiple character strings (hereinafter referred to as search character strings) to be searched from among the 5 document data, and a character string in which document data is arranged in order from the first character (hereinafter referred to as search character string) In a semiconductor integrated circuit in which a parallel comparator that performs high-speed processing of matching with a string (called a string to be searched) in parallel is provided at the front stage of the automaton execution means, don 't
By providing a means for setting care and a means for setting a negative condition, a fast and highly flexible ambiguous search has been realized.

〔作用〕[Effect]

第1図に本発明の詳細な説明したブロック図と、ここで
実行する処理のオートマトンを示す、これらを用いて本
発明の詳細な説明する。
FIG. 1 shows a block diagram explaining the present invention in detail and an automaton of the processing executed here.The present invention will be explained in detail using these figures.

本発明は第1図(a)に示すように、入力バッファ10
2を介して取り込む被検索文字列101を、並列比較部
10と有限オートマトン実行部11とに同時に入力する
。そして、並列比較部10で、先頭照合オートマトン1
3に相当する先頭照合処理(分割した検索文字列の先頭
部分文字列の照合処理)を行い、後方照合オートマトン
14に相当する後方照合処理(分割した検索文字列の残
りの部分文字列の照合処理)を有限オートマトン実行部
11で行う。各々の処理を行なったのち、検索結果(該
当する検索文字列と、それが文書データ中のどこの場所
にあったかを示す位置情報)111を出力バッファ10
5を介して外部へ出力するものである。また、この処理
の際に実行されるオートマトンの概念図を第1図(b)
に示す。番号付けされた円は各状態を、内部の数字は状
態番号を表わし、円の大きさは各状態への状態遷移頻度
の割合を相対的に示している。矢印は状態遷移を表わし
、初期状態はOである。
The present invention has an input buffer 10 as shown in FIG. 1(a).
The searched character string 101 taken in via 2 is input to the parallel comparison section 10 and the finite automaton execution section 11 at the same time. Then, in the parallel comparison unit 10, the first matching automaton 1
Perform the head matching process corresponding to step 3 (matching process of the first substring of the divided search string), and perform the backward matching process corresponding to the backward matching automaton 14 (matching process of the remaining substrings of the split search string). ) is executed by the finite automaton execution unit 11. After each process is performed, the search results 111 (corresponding search string and position information indicating where it is located in the document data) are sent to the output buffer 10.
5 to the outside. In addition, the conceptual diagram of the automaton executed during this process is shown in Figure 1(b).
Shown below. The numbered circles represent each state, the numbers inside represent the state number, and the size of the circle relatively indicates the rate of state transition frequency to each state. Arrows represent state transitions, and the initial state is O.

本発明では、並列比較器106に設定する部分文字列の
任意位置にdon’t careの設定を可能とする手
段であるバリッドフラグレジスタ400と、否定条件の
設定を可能とする手段である否定条件フラグレジスタ4
10を、先頭照合処理を行なう並列比較部10に新たに
設けた。
In the present invention, a valid flag register 400, which is a means for making it possible to set "don't care" at any position of a partial string set in the parallel comparator 106, and a negative condition, which is a means for making it possible to set a negative condition, are provided. Flag register 4
10 was newly installed in the parallel comparison unit 10 that performs the head verification process.

並列比較器106での先頭照合処理の際には、これらを
参照して処理を行なう。これにより、先頭照合処理にお
ける柔軟性を高めることができるので、並列比較部1o
においても、有限オートマトン実行部11と同様な1文
字誤り検索や限定検索等、より高度な曖昧検索を実現す
ることが可能となる。また1部分文字列を消去、再書き
込みすることなく、don’t care設定手段や否
定条件設定手段のみの操作で検索文字列の破棄1回復を
行なうことや、部分文字列の語長を可変にすることも同
時に可能とな、る6 〔実施例〕 以下、本発明の実施例について説明する。
When the parallel comparator 106 performs head matching processing, these are referred to for processing. This increases the flexibility in the head matching process, so the parallel comparison unit 1o
Even in the finite automaton execution unit 11, it is possible to realize more advanced ambiguous searches such as single character error searches and limited searches. In addition, without erasing or rewriting a partial string, it is possible to discard or restore a search string by operating only the don't care setting means or negative condition setting means, and to make the word length of a partial string variable. [Examples] Examples of the present invention will be described below.

本発明の第1の実施例のブロック図を第2図に示す。A block diagram of the first embodiment of the present invention is shown in FIG.

本実施例は、 入力バッファ1o2.並列比較器106.バリッドフラ
グレジスタ400.否定条件フラグレジスタ410(以
降これらを総称して照合制御レジスタ40と呼ぶ)、コ
ード変換器107.状態コードキュー109.入力セレ
クタ108.オートマトン実行手段1042文字コード
バッファ103゜状態遷移テーブル110.出力バッフ
ァ105゜から構成される。
In this embodiment, input buffers 1o2. Parallel comparator 106. Valid flag register 400. Negative condition flag register 410 (hereinafter referred to collectively as collation control register 40), code converter 107. Status code queue 109. Input selector 108. Automaton execution means 1042 Character code buffer 103° State transition table 110. It consists of an output buffer 105°.

データベース内の文書データは被検索文字列101とし
て1文字単位、あるいは複数文字単位で入力バッファ1
02へ入力される。被検索文字列101は入力バッファ
102でデータ幅を変換され、並列比較器106、およ
び入力文字コードバッファ103へ同時に入力される。
The document data in the database is input to the input buffer 1 in single character or multiple character units as the searched character string 101.
02. The character string to be searched 101 has its data width converted by an input buffer 102, and is simultaneously input to a parallel comparator 106 and an input character code buffer 103.

入力文字コード130のデータ幅は被検索文字列のデー
タ幅とは必ずしも一致しない、並列比較器106には。
In the parallel comparator 106, the data width of the input character code 130 does not necessarily match the data width of the searched character string.

予め検索文字列の先頭部分が部分文字列として格納され
ており、入力バッファ102から1文字。
The first part of the search string is stored in advance as a partial string, one character from the input buffer 102.

あるいは複数文字送られるたびに、すべての検索文字列
の部分文字列との照合が同時に行われる。
Alternatively, each time multiple characters are sent, all substrings of the search string are matched at the same time.

この時バリッドフラグレジスタ400、否定条件フラグ
レジスタ410に設定した条件が、部分文字列の照合条
件として参照される。検索文字列の部分文字列との一致
が検出されると、一致信号131がアサートされる。こ
の一致信号はコード変換器107により、各部分文字列
が検出されたことを示す状態コード132に変換される
。コード変換器107から出力された状態コード132
は、セレクタ108により選択されて状態コードキュー
109に蓄えられる(以後、現状態と呼ぶ)。
At this time, the conditions set in the valid flag register 400 and the negative condition flag register 410 are referred to as matching conditions for the partial character string. When a match with a substring of the search string is detected, a match signal 131 is asserted. This match signal is converted by the code converter 107 into a status code 132 indicating that each partial character string has been detected. Status code 132 output from code converter 107
is selected by the selector 108 and stored in the status code queue 109 (hereinafter referred to as the current status).

一方、文字コードバッファ103内の文字コードデータ
に対して、上記の並列比較と同時に有限オートマトン実
行手段104による処理が行われる。文字コードバッフ
ァ103は、入力バッファ102の文字コード転送速度
と、有限オートマトン実行手段104の処理速度とのギ
ャップを解消するためのものである。有限オートマトン
実行手段104の入力は、文字コードバッファ103内
部の文字コードデータと状態コードキュー109に蓄え
られている現状態コード134である。有限オートマト
ン実行手段104は状態コードキュー109から現状態
コード134を取り出して、これと文字コードバッファ
103内の文字コードデータ135とから状態遷移テー
ブル110のアクセスアドレス137を生成する。該当
アドレスの内容が有限オートマトンの現状態の遷移先1
38(以後、次状態と呼ぶ)となり、これがセレクタ1
08を通して状態コードキュー109に蓄えられる。こ
の様に現状態コードが処理されると、次の文字コードデ
ータが文字コードバッファ103から取り込まれる。
On the other hand, the character code data in the character code buffer 103 is processed by the finite automaton execution means 104 at the same time as the parallel comparison described above. The character code buffer 103 is for eliminating the gap between the character code transfer speed of the input buffer 102 and the processing speed of the finite automaton execution means 104. Inputs to the finite automaton execution means 104 are the character code data inside the character code buffer 103 and the current state code 134 stored in the state code queue 109. The finite automaton execution means 104 takes out the current state code 134 from the state code queue 109 and generates the access address 137 of the state transition table 110 from this and the character code data 135 in the character code buffer 103. The content of the corresponding address is the transition destination 1 of the current state of the finite automaton.
38 (hereinafter referred to as the next state), which is selector 1.
08 and stored in the status code queue 109. When the current status code is processed in this manner, the next character code data is taken in from the character code buffer 103.

こうした一連の処理が繰り返される過程で、オートマト
ンの状態遷移の結果138が検索文字列の検出を示す状
態となった場合に、一致する文字列が検出されたことに
なる。そしてこれらに対応する検索結果111が出力バ
ッファ105へ書き出される。なお被検索文字列に特定
のコードを終了コードとして挿入すると、並列比較器が
終了コードを検出して、強制的に検索処理を終了させる
In the process of repeating such a series of processes, when the state transition result 138 of the automaton becomes a state indicating that a search character string has been detected, it means that a matching character string has been detected. Then, search results 111 corresponding to these are written to the output buffer 105. Note that when a specific code is inserted as an end code into the character string to be searched, the parallel comparator detects the end code and forcibly ends the search process.

この終了コードは任意のコードを並列比較器内に設定す
ることが可能である。
Any desired end code can be set in the parallel comparator.

以上の一連の処理は制御論理ブロックにより制御される
。したがって、各モジュール間のデータバス上のデータ
転送や終了コード検出による処理の強制終了は、制御論
理ブロックが制御する。
The above series of processing is controlled by a control logic block. Therefore, the control logic block controls data transfer on the data bus between modules and forced termination of processing by detection of an end code.

並列比較器106における部分文字列と被検索文字列1
01との照合の際に参照される照合制御レジスタ4oは
、次のような働きをする。
Partial string and searched string 1 in parallel comparator 106
The collation control register 4o, which is referred to when collating with 01, functions as follows.

バリッドフラグレジスタ400は、セットすると該当位
置の設定文字と入力文字との照合結果をそのまま有効と
し、リセットすると該当位置の設定文字と入力文字の照
合結果を、入力文字にかかわらず常に一致とするドント
ケア指定となる。
The valid flag register 400 is a don't-care function that, when set, makes the result of matching between the set character at the corresponding position and the input character valid, and when reset, the result of matching between the set character at the corresponding position and the input character always matches, regardless of the input character. As specified.

否定条件フラグレジスタ410は、セットすると該当位
置の設定文字と入力文字との照合の際に、両者が一致し
た場合にイネーブル出力を行ない、両者が不一致の場合
にディスイネーブル出力を行なう、また、リセットする
と照合結果の論理が反転し、両者が一致した場合にディ
スイネーブル出力を行ない、両者が不一致の場合にイネ
ーブル出力を行なう。
When set, the negative condition flag register 410 performs an enable output when the set character at the corresponding position and the input character match, and outputs a disable when the two do not match. Then, the logic of the comparison result is inverted, and when the two match, a disable output is performed, and when the two do not match, an enable output is performed.

先頭照合方式に加え、これらの照合制御レジスタ40を
備えることで、柔軟性の高い曖昧検索を可能とする高速
な照合処理を実現することができる。
By providing these collation control registers 40 in addition to the head collation method, it is possible to realize high-speed collation processing that enables highly flexible ambiguous search.

次に本発明において実現される曖昧検索について実施例
に基づいて説明する。
Next, a fuzzy search realized in the present invention will be explained based on an embodiment.

第3図は検索文字列に: abc  が与えられ、これ
について種々の1文字誤りを許容する曖昧検索を行なう
場合の、検索文字列の展開例を示している。ここで、否
定条件の設定はi″で、don’t careの設定は
1′?”で表現している。
FIG. 3 shows an example of the development of a search string in the case where the search string is given as: abc and an ambiguous search is performed for this string that allows various single-character errors. Here, the negative condition setting is expressed as i'', and the don't care setting is expressed as 1'?''.

展開された検索文字列は、に1が完全一致、K2〜に4
が1文字入れ替わり、に5〜に6が1文字挿入、K7〜
に9が1文字削除である。これらの全てを検索の対象と
する必要がある。
The expanded search string is 1 for exact match, K2 to 4 for K2 to 4.
replaces one character, inserts one character of 6 into 5~, K7~
9 is one character deleted. All of these need to be included in the search.

第4図は検索対称である第3図のに1〜に9を。Figure 4 is a search symmetry, 1 to 9 in Figure 3.

被検索文字列から検索するためのオートマトンの一例で
ある。
This is an example of an automaton for searching from a searched character string.

ここで、番号付けされた円は各状態を表し、内部の数字
は状態番号を示している。初期状態は状態Oであり、2
重円は検索文字列の検出を示す状態である。2重円の下
の記号は、検出される検索文字列に対応した検索文字列
識別子である。また、矢印は状態遷移を表しており、矢
印の上部に記された文字が入力された場合に状態が遷移
する。これ以外の文字が入力された場合、または一部を
除き2重円の状態のように、遷移先が記述されていない
場合には、すべて初期状態0へ遷移する。
Here, the numbered circles represent each state, and the numbers inside indicate the state number. The initial state is state O, and 2
A double circle indicates that a search string has been detected. The symbol below the double circle is a search string identifier corresponding to the search string to be detected. Further, arrows represent state transitions, and the state changes when the characters written above the arrows are input. When characters other than these are input, or when no transition destination is described, such as in a double circle state except for some, all transitions are made to the initial state 0.

(これをフェイルと呼ぶ、) 本発明においては、検索処理に先立ち検索文字列の部分
文字列を並列比較器106へ設定する。
(This is called a fail.) In the present invention, a partial string of the search string is set in the parallel comparator 106 prior to the search process.

また、検索文字列から展開されたオートマトンの状態遷
移を制御する制御情報を状態遷移テーブル110へも設
定する。
Further, control information for controlling the state transition of the automaton expanded from the search string is also set in the state transition table 110.

ここでは、検索文字列の部分文字列として、オートマト
ンの先頭部分2文字を設定する場合を例として説明する
Here, an example will be described in which the first two characters of an automaton are set as a partial string of a search string.

第4図において、オートマトンを2分している点線81
0は、先頭の2文字を並列比較器に設定する場合のオー
トマトンの分割位置を示している。
In Figure 4, the dotted line 81 divides the automaton into two.
0 indicates the division position of the automaton when the first two characters are set in the parallel comparator.

したがって、状態2,9,13.18へ至るまでの遷移
は並列比較器106によって実行され、それ以降の遷移
は有限オートマトン実行手段104と状態遷移テーブル
110とによって実行される。
Therefore, transitions up to states 2, 9, 13, and 18 are executed by the parallel comparator 106, and subsequent transitions are executed by the finite automaton execution means 104 and the state transition table 110.

分割された後半のオートマトンは、状態2,9゜13.
18をそれぞれ初期状態とする4つのオートマトンの集
合と見ることができる。並列比較器106には、状態0
から状態2,9,13.18の各々へ至る遷移条件を表
わす、すべて2文字に展開した部分文字列が設定される
。したがって。
The latter half of the divided automaton is in state 2,9°13.
It can be seen as a set of four automata, each with 18 as its initial state. Parallel comparator 106 has state 0
A partial character string expanded to two characters is set, representing the transition conditions from to each of states 2, 9, 13, and 18. therefore.

例えば“ab″が入力された場合の状態遷移はO→1→
2となる。また、パaC”が入力された場合の状態遷移
は0→1→9であり、1′a”による状態遷移0→1は
11 al、 ++が入力された場合と共通であるが 
11 C11による遷移により状態9へ分岐遷移するこ
とになる。この状態遷移O→1→9は、図中の点線で示
したように2文字の連続出現による0→11→9 の状
態遷移と見なすことができるため、”ab”とは独立し
て′ac″という部分文字列を並列比較器に設定すれば
よいことになる。
For example, when “ab” is input, the state transition is O → 1 →
It becomes 2. In addition, the state transition when "PaC" is input is 0 → 1 → 9, and the state transition 0 → 1 due to 1'a" is the same as when 11 al, ++ is input.
11 The transition by C11 causes a branch transition to state 9. This state transition O → 1 → 9 can be regarded as a state transition of 0 → 11 → 9 due to the consecutive appearance of two characters as shown by the dotted line in the figure, so it is independent of "ab". All you have to do is set the substring `` to the parallel comparator.

第5図は第4図のオートマトンを、並列比較器106と
後方照合用に生成されたオートマトンとにより構成した
概念図である。並列比較器106からの一致信号がオー
トマトンを初期状態から遷移させる。以後は状態遷移テ
ーブルに従って状態遷移し、次々と被検索文字列101
との比較照合処理を行なっていく、なお状態13の発火
は、11 a、 btt  14 a、 Cjlの両者
と被検索文字列との照合結果が一致(図中では&で表現
)した場合に限られる。
FIG. 5 is a conceptual diagram in which the automaton shown in FIG. 4 is constructed by a parallel comparator 106 and an automaton generated for backward comparison. A match signal from parallel comparator 106 transitions the automaton from its initial state. After that, the state transitions according to the state transition table, and the searched character string 101 is
Note that state 13 is fired only when the matching results of both 11 a, btt 14 a, and Cjl and the searched string match (represented by & in the figure). It will be done.

このように全体の処理では、第4図のオートマトンを実
行しているのと等価となる。
In this way, the entire process is equivalent to executing the automaton shown in FIG. 4.

第6図は第5図における並列比較器での、先頭照合を実
現するための部分文字列、及び照合制御レジスタ40の
設定の一実施例である。本実施例では並列比較器内10
6に設定する部分文字列と、バリッドフラグレジスタ4
0o、否定条件フラグレジスタ410へそれぞれ設定す
るデータを示している。
FIG. 6 shows an example of the setting of the partial character string and the collation control register 40 for realizing head collation in the parallel comparator shown in FIG. 5. In this embodiment, 10
Partial string to be set to 6 and valid flag register 4
0o indicates data to be set in the negative condition flag register 410, respectively.

部分文字列は第5図に示されている2文字を設定する。The two characters shown in FIG. 5 are set as the partial character string.

バリッドフラグレジスタ400へは、該2文字を設定し
た箇所に対応するように、各文字ごとに“1”をフラグ
へセットし、それ以外の使用しない箇所に対応するフラ
グはリセット(“O”をセット)する。否定条件フラグ
レジスタ410へは、否定条件が設定されていないこと
を示すIt I ++を初期値として設定し、部分文字
列として否定条件を伴って設定すべき文字に対してのみ
、該当するフラグをリセット(1(O11をセット)す
る。
In the valid flag register 400, set "1" to the flag for each character so that it corresponds to the location where the two characters are set, and reset the flag corresponding to the other unused locations (set "O"). set. In the negative condition flag register 410, It I ++ indicating that no negative condition is set is set as an initial value, and the corresponding flag is set only for characters that should be set with a negative condition as a partial character string. Reset (1 (set O11)).

したがって、第5図に示されている部分文字列11 a
l、 jj   # ac# a、b”a−Ic″11
1、 c#を並列比較器内に設定するためには、第6図
に示されているようにそれぞれの項目を設定すればよい
。第6図は設定の一例であり、例えば各項目は組合せさ
え同じであれば、設定するアドレスはどこでもよい。た
だし、複数の部分文字列が同時に検索された場合には、
後述する後段のプライオリティ−エンコーダにより処理
される順序が決定される。
Therefore, the substring 11a shown in FIG.
l, jj # ac# a, b"a-Ic"11
1. To set c# in the parallel comparator, each item may be set as shown in FIG. FIG. 6 shows an example of settings; for example, as long as each item has the same combination, any address can be set. However, if multiple substrings are searched at the same time,
The processing order is determined by a later-stage priority encoder, which will be described later.

第7図に連想機能を持つメモリ、すなわちCAM(Co
ntent Addressable Memory)
を用いた並列比較器の実施例を示す。
Figure 7 shows a memory with an associative function, namely CAM (Co
addressable memory)
An example of a parallel comparator using

本実施例では、1ワードを4バイトのCAMレジスタで
構成し、全体が16ワード(CAMRO−R15)の構
成としている。本実施例は設定モードと、比較モードを
もつ。設定モードでは、入力バッファ102に取り込ん
だ文字列を部分文字列として設定するために、これらを
選択的に任意のCAMレジスタへ転送する。比較モード
では、取り込んだ被検索文字列101を複数の部分文字
列と並列照合するために、同時に全てのCAMレジスタ
へ分配する。個々の部分文字列比較回路の構成は同じな
ので、添え字Oのものを例にして説明を行う。
In this embodiment, one word is made up of a 4-byte CAM register, and the entire word is made up of 16 words (CAMRO-R15). This embodiment has a setting mode and a comparison mode. In the setting mode, character strings taken into the input buffer 102 are selectively transferred to arbitrary CAM registers in order to be set as partial character strings. In the comparison mode, the retrieved character string 101 is simultaneously distributed to all CAM registers in order to compare it with a plurality of partial character strings in parallel. Since the configurations of the individual partial character string comparison circuits are the same, the description will be given using the subscript O as an example.

本実施例は、 並列比較器106へ設定される第1番目の部分文字列を
格納するCAMレジスタ(RO)201−0、 該CAMレジスタ(RO)201−0の設定データのバ
イトごとの有効性を示し、don’t care設定を
可能とするバリッドフラグレジスタ(VFO)400−
0、 否定条件の設定を可能とする否定条件フラグレジス9 
(EFO)410−0、 該否定条件フラグレジスタ(VFO)410−Oがセッ
ト(” 1 ” )されている場合には、該CAMレジ
スタ(RO)201−0でのバイトごとの比較照合結果
をそのまま有効として出力し、リセット(10”)され
ている場合にはCAMレジスタ(RO)201−0での
バイトごとの比較照合結果を論理反転して、設定された
否定条件に対する比較照合結果を出力する論理回路部4
11−〇と。
In this embodiment, the CAM register (RO) 201-0 stores the first partial character string set to the parallel comparator 106, and the validity of each byte of the setting data of the CAM register (RO) 201-0. Valid flag register (VFO) 400-
0, negative condition flag register 9 that allows setting of negative conditions
(EFO) 410-0, if the negative condition flag register (VFO) 410-O is set (“1”), the byte-by-byte comparison result in the CAM register (RO) 201-0 is It is output as valid as it is, and if it is reset (10”), the byte-by-byte comparison result in the CAM register (RO) 201-0 is logically inverted and the comparison result against the set negative condition is output. logic circuit section 4
11-0.

該バリッドフラグレジスタ(VFO)400−〇がセッ
ト(” l ” )されている場合には、該CAMレジ
スタ (RO)201−0でのバイトごとの否定条件設
定に対する比較照合結果を出力する論理回路部411−
0の出力を有効とし、リセット(’O”)されている場
合には該論理回路部411−0でのバイトごとの比較照
合結果を無効として常に1”を出力するとともにこれら
バイトごとの結果を統合する論理回路部203−0と、
部分文字列の全バイトをバリッドフラグレジスタ(VF
O)400−0で無効指定した場合にこれを検出する論
理回路部204−0と、上記論理回路部203−0.2
04−0の結果である214−0,215−0を統合し
て部分文字列の最終的な比較照合結果を得る論理回路部
205−0、及びその出力である一致信号線(ho)2
16−0゜ から構成され、この1ワ一ド分のハードウェア16組か
ら、並列比較器106の全体が構成されている。なお、
本実施例のCAMレジスタのバイト、ワード構成、およ
びバリッドフラグレジスタ、否定条件フラグレジスタの
構成は、それぞれ容易に拡張可能であり任意のものを取
りつる。
When the valid flag register (VFO) 400-0 is set (“l”), a logic circuit outputs a comparison result for the negation condition setting for each byte in the CAM register (RO) 201-0. Part 411-
The output of 0 is valid, and when it is reset ('O''), the byte-by-byte comparison result in the logic circuit section 411-0 is invalidated and 1'' is always output, and the byte-by-byte results are A logic circuit section 203-0 to be integrated,
All bytes of the substring are stored in the valid flag register (VF
O) A logic circuit unit 204-0 that detects when invalidation is specified in 400-0, and the logic circuit unit 203-0.2.
A logic circuit unit 205-0 that integrates the results 214-0 and 215-0 of 04-0 to obtain the final comparison result of the partial character string, and a match signal line (ho) 2 that is the output thereof.
16-0°, and the entire parallel comparator 106 is composed of 16 sets of hardware for one word. In addition,
The byte and word configurations of the CAM register and the configurations of the valid flag register and negative condition flag register of this embodiment can be easily extended and can be arbitrarily selected.

CAMレジスタ(RO−R15)201.バリッドフラ
グレジスタ(VFO〜VF15)400゜否定条件フラ
グレジスタ(EFO−EF15)410へは、入力バッ
ファ102を介して任意のものにアクセスすることがで
きる。また、個々の専用のデータバスを設ける構成も取
りつる。
CAM register (RO-R15) 201. Valid flag registers (VFO to VF15) 400° and negative condition flag registers (EFO to EF15) 410 can be accessed arbitrarily through the input buffer 102. In addition, a configuration in which individual dedicated data buses are provided is also available.

指定された文字列の検索に必要な部分文字列とバリッド
フラグレジスタ400、否定条件フラグレジスタ410
の内容を設定した後、部分文字列を全く設定していない
不要なCAMレジスタ201に対しては、付随するバリ
ッドフラグレジスタ400をリセットし、無効化する。
Partial strings and valid flag registers 400 and negative condition flag registers 410 necessary for searching specified strings
After setting the contents of , the associated valid flag register 400 is reset and invalidated for unnecessary CAM registers 201 for which no partial character string has been set.

これにより不要なCAMレジスタでの比較照合処理は論
理回路部204によって常に不一致となり、一致信号は
ディスイネーブル固定となる。
As a result, the unnecessary comparison and verification process in the CAM register always results in a mismatch by the logic circuit section 204, and the match signal is fixed to the disabled state.

以上の初期設定の後に、被検索文字列101が入力バッ
ファ102を介してすべてのCAMレジスタ201へ同
時に分配される0個々のCAMレジスタ201は比較モ
ードにしであるため、分配された入力文字コードとあら
かじめ設定されている部分文字列との照合を行う6両者
の照合はビット対応に行ない、その結果は1バイトごと
に論理積をとってまとめる。すなわち、8ビツトコード
であれば英数字1文字単位で完全一致を検出する。
After the above initial settings, the searched character string 101 is simultaneously distributed to all CAM registers 201 via the input buffer 102. Since each CAM register 201 is in the comparison mode, the distributed input character code and 6. Comparison with preset partial character strings 6. Comparison of both is performed bitwise, and the results are logically ANDed for each byte. That is, if it is an 8-bit code, a complete match is detected for each alphanumeric character.

これらの比較照合結果は、まず否定条件フラグレジスタ
410の内容を参照して一致、不一致の判定を行ない、
次にバリッドフラグレジスタ400の対応ビットと共に
バイト比較結果を統合する論理回路部203に入力され
る。バリッドフラグレジスタ400によって部分文字列
中にdon’t care文字の設定されたバイトにつ
いては、常に一致を示す値が出力される。そして、これ
らの出力についてまとめて論理積がとられる。すなわち
、部分文字列1語の比較結果215が得られることにな
る。
These comparison results are determined by first referring to the contents of the negative condition flag register 410 to determine whether they match or not.
Next, the byte comparison result is inputted to the logic circuit section 203 which integrates the result of the byte comparison with the corresponding bit of the valid flag register 400. For bytes in which a don't care character is set in a partial string by the valid flag register 400, a value indicating a match is always output. These outputs are then logically ANDed together. In other words, a comparison result 215 for one word of the partial character string is obtained.

一方、上述した論理回路だけでは4バイトすべてを無効
に指定すると、どの様な入力文字コードに対しても一致
を示してしまう、従って5同一ワード内のバリッドフラ
グレジスタ400がすべてリセットされている場合には
一致信号が常にディスイネーブルされる必要がある。こ
のための論理回路を構成するのが、第7図の204,2
05である。
On the other hand, if all 4 bytes are specified as invalid using only the logic circuit described above, a match will be indicated for any input character code. Therefore, if all valid flag registers 400 in the same word are reset The match signal must always be disabled. 204 and 2 in FIG. 7 constitute the logic circuit for this purpose.
It is 05.

以上のように本実施例によれば、複数の部分文字列に対
して並列に比較照合処理を高速に行うことができるだけ
でなく、部分文字列の任意の位置に否定条件文字とdo
n’t Car8文字を設定することができる。また、
並列比較器106の1ワード以下の語長であれば、不要
部分にdon’t care文字の設定、すなわち不要
部分のバリッドフラグ400をリセットすることにより
、バイト単位で任意の長さの部分文字列を設定すること
も可能となり、柔軟な並列比較照合処理が実現できると
いう効果が生じる。また、バリッドフラグレジスタ40
0の操作のみで、−度設定した部分文字列の破棄9回復
が高速に行えるという効果も生じる。
As described above, according to this embodiment, not only can comparison and matching processing be performed in parallel on multiple substrings at high speed, but also a negation condition character and a do
8 characters can be set. Also,
If the word length of the parallel comparator 106 is one word or less, by setting a don't care character in the unnecessary part, that is, by resetting the valid flag 400 of the unnecessary part, a partial string of any length can be created in bytes. It is also possible to set , which has the effect of realizing flexible parallel comparison and matching processing. In addition, the valid flag register 40
There is also an effect that the partial character string set to - degree can be discarded and recovered at high speed by only the 0 operation.

第8図にCAMレジスタとバリッドフラグレジスタへ部
分文字列を設定する際の従来例を示す。
FIG. 8 shows a conventional example of setting partial character strings to the CAM register and valid flag register.

検索文字列“m y ”を設定する場合、” m y 
”をバイト3とバイト2に設定し、バイト1、及びバイ
トOのブランクを無効とするために、バリッドフラグv
3.v2.vl、vOをそれぞれ“1n1111111
0” 110”に設定する。こうすることにより、検索
文字列が設定されていないバイト1とバイト0の照合結
果は、常に“1″となるため、バイト3及びバイト2の
“my”の照合結果だけで、一致信号線の出力が定まる
ことになる。
When setting the search string "my", "my
” to byte 3 and byte 2, and set the valid flag v to invalidate the blanks in byte 1 and byte O.
3. v2. vl and vO are each “1n1111111
Set to 0"110". By doing this, the matching result of byte 1 and byte 0, for which no search string is set, will always be "1", so the match signal line will be checked only by the matching result of "my" in byte 3 and byte 2. The output will be determined.

しかし本従来例では部分文字列と被検索文字列との一致
検出しかできないので、It a、 b”のような否定
条件を含む部分文字列の照合は不可能である。
However, in this conventional example, it is only possible to detect a match between a partial character string and a searched character string, and therefore it is impossible to match partial character strings that include negative conditions such as "It a, b".

第9図は、本発明において第8図と同様の部分文字列を
設定する場合の実施例である。検索文字列“m y I
tおよびバリッドフラグレジスタ設定データ” 110
0”をそれぞれ設定する。更にこの場合は否定条件の設
定がないので、否定条件設定フラグレジスタEFOへは
’1111”を設定し、CAMレジスタにおける照合結
果の論理反転は行なわないようにする。
FIG. 9 shows an example in which partial character strings similar to those in FIG. 8 are set in the present invention. Search string “m y I
t and valid flag register setting data” 110
Furthermore, since there is no negation condition setting in this case, '1111' is set in the negation condition setting flag register EFO, so that the logic of the collation result in the CAM register is not inverted.

第10図は1本発明における否定条件を含んだ部分文字
列の設定の実施例である。第5図において並列比較器内
に設定されている部分文字列11 a、b!1を、部分
文字列として実際に設定する場合を例として示す。
FIG. 10 is an example of setting a partial character string including a negative condition according to the present invention. In FIG. 5, a partial string 11 a, b! is set in the parallel comparator. 1 is actually set as a partial character string as an example.

まず、否定条件を取り除いた部分文字列# abItを
CAMレジスタのバイト3とバイト2に設定する。バイ
ト1.バイト0のブランクを無効とするために、バリッ
ドフラグレジスタへは“110o”を設定する。更に否
定条件をバイト2のIt b 11に付加させるために
、否定条件フラグレジスタへは” 1011 ”を設定
する0本発明において、これらを設定することで部分文
字列と被検索文字列との比較結果をバイト単位で任意に
論理反転することができるので、従来は実現できなかっ
た否定条件を含む部分文字列u a、bnの照合を実現
することが可能となる。
First, the substring #abIt from which the negative condition has been removed is set in bytes 3 and 2 of the CAM register. Part-time job 1. In order to invalidate the blank in byte 0, "110o" is set in the valid flag register. Furthermore, in order to add a negative condition to It b 11 of byte 2, set "1011" to the negative condition flag register.0 In the present invention, by setting these, the comparison between the partial string and the searched string Since the logic of the result can be arbitrarily inverted on a byte basis, it becomes possible to realize matching of partial character strings ua, bn that include negative conditions, which was not possible in the past.

第11図は、検索された部分文字列に否定条件の設定が
あることを検出する機能を追加した実施例である。
FIG. 11 shows an embodiment in which a function is added to detect that a negative condition is set in a searched partial character string.

本実施例では、部分文字列が検索され一致信号線216
−0がho=1となった場合に、否定条件設定フラグレ
ジスタの内容にLL OIIが少なくとも1つ存在すれ
ば、すなわち部分文字列のどこかに否定条件が設定され
ていれば、否定条件設定を含む部分文字列が検索された
ことを検出する論理回路部412−0の出力413−0
がイネーブルとなる。第11図は第9図と同様に検索文
字列” m y ”を設定する場合の実施例である。こ
の場合には否定条件の設定がないので、否定条件フラグ
レジスタへは” 1111”を設定し、CAMレジスタ
における照合結果の論理反転は行なわないようにする。
In this embodiment, a partial string is searched and the match signal line 216
-0 becomes ho=1, if at least one LL OII exists in the contents of the negative condition setting flag register, that is, if a negative condition is set somewhere in the substring, the negative condition is set. Output 413-0 of logic circuit unit 412-0 that detects that a partial character string containing
is enabled. FIG. 11 shows an example in which a search character string "m y " is set similarly to FIG. 9. In this case, since there is no negative condition set, "1111" is set in the negative condition flag register, and the logic of the collation result in the CAM register is not inverted.

従って、否定条件設定を含む部分文字列が検索されたこ
とを検出する論理回路部412−〇の出力413−0は
、常にディスイネーブルとなる。
Therefore, the output 413-0 of the logic circuit unit 412-0, which detects that a partial character string including a negative condition setting has been retrieved, is always disabled.

第12図は第11図の否定条件設定の検出機能を追加し
た実施例における、否定条件を含んだ部分文字列の設定
例である。第10図と同様に11 a、 bI+を部分
文字列として実際に設定する場合を例として示す。否定
条件フラグレジスタへ” 1011 ”が設定されてい
るので、部分文字列が検索されると否定条件設定を検出
する論理回路部412−0の出力413−0はイネーブ
ルとなる。
FIG. 12 is an example of setting a partial character string including a negative condition in the embodiment in which the function of detecting the negative condition setting of FIG. 11 is added. As in FIG. 10, a case where 11 a, bI+ are actually set as partial character strings will be shown as an example. Since "1011" is set in the negative condition flag register, when a partial character string is searched, the output 413-0 of the logic circuit unit 412-0 that detects the negative condition setting is enabled.

第13図はCAMを用いた並列比較器における。FIG. 13 shows a parallel comparator using CAM.

終了コード検出手段の実施例である。否定条件フラグレ
ジスタがない点を除けば、構成、終了コードの設定方法
、および動作は、並列比較器と同様である。ただし、並
列比較器における一致信号が。
This is an example of an end code detection means. Except for the lack of a negative condition flag register, the configuration, method of setting an exit code, and operation are similar to those of a parallel comparator. However, the coincidence signal in the parallel comparator.

終了コード検出手段においては終了信号(trζsig
、)216−16として制御論理ブロックへと伝達され
る。
The end code detection means detects the end signal (trζsig
, ) 216-16 to the control logic block.

第13図に示したのは、終了コードとして” F F 
E O”を設定した例である。この終了コードの有効文
字数を変更する場合、あるいは全く終了コードを使用し
ない場合には、バリッドフラグレジスタレジスタ400
−16の設定を変えることで対応できる。
The exit code shown in Figure 13 is "F F
This is an example in which "E O" is set. If you want to change the number of valid characters of this end code, or if you do not use the end code at all, use the valid flag register register 400.
This can be dealt with by changing the -16 settings.

第14図はCAMレジスタのかわりに、レジスタ207
と比較回路208とを用いた第2の実施例である。
In FIG. 14, register 207 is used instead of the CAM register.
This is a second embodiment using a comparator circuit 208 and a comparator circuit 208.

本実施例においては、入力バッファ102に取り込んだ
部分文字列を、設定モードにおいて一度レジスタ207
に蓄えた後に、比較モードに切り替えてレジスタ207
と入力バッファ102とから比較回路208へデータを
送り比較照合を行う。
In this embodiment, the partial character string taken into the input buffer 102 is once stored in the register 207 in the setting mode.
After storing data in register 207, switch to comparison mode and store in register 207.
Data is sent from the input buffer 102 to the comparison circuit 208 for comparison and verification.

各比較回路における比較動作は同時に行なわれ。Comparison operations in each comparison circuit are performed simultaneously.

その結果は212として照合結果を統合する論理回路部
203へ送られる。バリッドフラグレジスタ400、否
定条件フラグレジスタ410の操作、およびこれらを反
映した出力信号によるバイトごとの照合結果を統合する
論理回路部203、部分文字列の全バイト無効指定を検
出する論理回路部204、部分文字列の最終的な照合結
果を得る論理回路部205の動作は、第7図の実施例と
同様である。すなわち本実施例においても任意の長さの
部分文字列を設定することができ、また部分文字列とし
て否定条件を含む文字や、可変長のdon’t car
e文字を設定することも可能で、柔軟な並列比較照合処
理を実現できるという効果が得られる。
The result is sent as 212 to the logic circuit section 203 which integrates the verification results. a logic circuit unit 203 that integrates the results of byte-by-byte matching based on the operations of the valid flag register 400 and the negative condition flag register 410 and output signals reflecting these; a logic circuit unit 204 that detects invalid designation of all bytes of a partial character string; The operation of the logic circuit unit 205 that obtains the final comparison result of the partial character strings is the same as that in the embodiment shown in FIG. In other words, in this embodiment as well, a partial character string of arbitrary length can be set, and a character that includes a negative condition or a variable-length don't car character string can be set as a partial character string.
It is also possible to set the e character, which has the effect of realizing flexible parallel comparison and collation processing.

第15図にレジスタとバリッドフラグレジスタへ部分文
字列を設定する際の従来例を示す。第8図と同様に、検
索文字列” m y ”を設定する場合、m y ”を
バイト3とバイト2に設定し、バイト1、及びバイトO
のブランクを無効とするために、バリッドフラグv3.
v2.vl、v○をそれぞれ1” ′″11+ # O
IT 1101+に設定する。こうすることにより、検
索文字列が設定されていないバイト1とバイト0の照合
結果は、常にii 1 uとなるため、バイト3及びバ
イト2の” m y ”の照合結果だけで、一致信号線
hoの出力が定まることになる。
FIG. 15 shows a conventional example of setting partial character strings to registers and valid flag registers. Similarly to Fig. 8, when setting the search string "my", set "my" to byte 3 and byte 2, and set byte 1 and byte O.
In order to invalidate the blank of v3.
v2. vl and v○ are each 1"''11+# O
Set to IT 1101+. By doing this, the matching result of byte 1 and byte 0, for which no search string is set, will always be ii 1 u, so the match signal line will be determined only by the matching result of "m y" of byte 3 and byte 2. The output of ho will be determined.

第16図は、第14図の並列比較器の第2の実施例の、
CAMレジスタのかわりにレジスタと比較回路とを用い
た実施例を示したものである。これは第15図と同様の
部分文字列を設定する場合を示している。検索文字列”
 m y ”およびバリッドフラグレジスタ設定データ
“1100”をそれぞれ設定する。更にこの場合は否定
条件の設定がないので、否定条件設定フラグレジスタ(
EFO)410−0へは” 1111 ”を設定し、比
較回路における照合結果の論理反転は行なわないように
する。
FIG. 16 shows a second embodiment of the parallel comparator of FIG.
This shows an embodiment using a register and a comparator circuit instead of a CAM register. This shows a case where a partial character string similar to that shown in FIG. 15 is set. Search string”
m y ” and valid flag register setting data “1100”.Furthermore, since there is no negative condition setting in this case, the negative condition setting flag register (
EFO) 410-0 is set to "1111" so that the logic of the comparison result in the comparison circuit is not inverted.

第17図は、第14図の並列比較器の第2の実施例にお
ける、否定条件を含んだ部分文字列を設定した場合の説
明図である。第5図において並列比較器内に設定されて
いる部分文字列# a= l、 )1を1部分文字列と
して実際に設定する場合を例として示す。
FIG. 17 is an explanatory diagram when a partial character string including a negative condition is set in the second embodiment of the parallel comparator shown in FIG. 14. An example is shown in which the partial character string #a=l, )1 set in the parallel comparator in FIG. 5 is actually set as one partial character string.

まず、否定条件を取り除いた部分文字列II abI+
をレジスタのバイト3とバイト2に設定する。バイト1
、バイトOのブランクを無効とするために、バリつドフ
ラグレジスタ(VFO)400−0へは” 1100 
”を設定する。更に否定条件をバイト2の“bI+に付
加させるために、否定条件フラグレジスタ(EFO)4
10−Oへは“1011 ”を設定する0本発明におい
て、これらを設定することで、従来は実現できなかった
否定条件を含む部分文字列II a、 t、 r″の照
合を実現することが可能となる。
First, the substring II abI+ with the negative condition removed
are set in bytes 3 and 2 of the register. Part-time job 1
, to invalidate the blank in byte O, "1100" is sent to the valid flag register (VFO) 400-0.
”. Furthermore, in order to add a negative condition to “bI+” in byte 2, set the negative condition flag register (EFO) 4.
10-O is set to "1011" 0 In the present invention, by setting these, it is possible to realize matching of substrings II a, t, r'' including negative conditions, which could not be realized conventionally. It becomes possible.

第18図は、並列比較器の第2の実施例に、検索された
部分文字列に否定条件の設定があることを検出する機能
を追加した実施例である。
FIG. 18 is an embodiment in which a function for detecting that a negative condition is set in a searched partial string is added to the second embodiment of the parallel comparator.

本実施例では、部分文字列が検索され一致信号線216
−0がhO=1となった場合に、否定条件設定フラグレ
ジスタ(EFO)410−0の内容に“0”が少なくと
も1つ存在すれば、すなわち部分文字列のどこかに否定
条件が設定されていれば、否定条件設定を含む部分文字
列が検索されたことを検出する論理回路部412−0の
出力413−0がイネーブルとなる0本図は第16図と
同様に検索文字列” m y ”を設定する場合を示し
ている。この場合には否定条件の設定がないので、否定
条件フラグレジスタ(EFO)410−0へは” 11
11 ”を設定し、比較回路における照合結果の論理反
転は行なわないようにする。従って否定条件設定を含む
部分文字列が検索されたことを検出する論理回路部41
2−0の出力413−〇は、常にディスイネーブルとな
る。
In this embodiment, a partial string is searched and the match signal line 216
-0 becomes hO=1, if at least one “0” exists in the contents of the negative condition setting flag register (EFO) 410-0, that is, a negative condition is set somewhere in the substring. If it is, the output 413-0 of the logic circuit section 412-0, which detects that a substring containing a negative condition setting has been searched, is enabled. y'' is set. In this case, there is no negative condition setting, so the negative condition flag register (EFO) 410-0 is set as "11".
11'' so that the comparison circuit does not invert the logic of the matching result.Therefore, the logic circuit section 41 detects that a partial string including a negative condition setting has been retrieved.
The output 413-0 of 2-0 is always disabled.

第19図は、否定条件設定の検出機能を追加した第18
図の実施例における、否定条件を含んだ部分文字列の設
定例を示したものである。第17図と同様に118.b
llを部分文字列として実際に設定する場合を例として
示す。否定条件フラグレジスタへ“1011”が設定さ
れているので、部分文字列が検索されると否定条件設定
を検出する論理回路部412−0の出力413−0はイ
ネーブルとなる。
Figure 19 shows the 18th version with a negative condition setting detection function added.
This is an example of setting a partial character string including a negative condition in the illustrated embodiment. 118 as in FIG. 17. b
An example in which ll is actually set as a substring will be shown. Since "1011" is set in the negative condition flag register, when a partial character string is searched, the output 413-0 of the logic circuit section 412-0 that detects the negative condition setting is enabled.

第20図はレジスタと比較回路を用いた並列比較器にお
ける。終了コード検出手段の実施例である。否定条件フ
ラグレジスタがないことを除けば、構成、終了コードの
設定方法、および動作は、レジスタと比較回路を用いた
並列比較器と同様である。ただし、並列比較器における
一致信号が、終了コード検出手段においては終了信号(
trn+ sig、)216−16として制御論理ブロ
ックへと伝達される。
FIG. 20 shows a parallel comparator using registers and comparison circuits. This is an example of an end code detection means. Except for the absence of a negative condition flag register, the configuration, method of setting an exit code, and operation are similar to a parallel comparator using registers and comparison circuits. However, the match signal in the parallel comparator is the end signal (
trn+sig, ) 216-16 to the control logic block.

本図に示したのは、終了コードとして”FFEO″′を
設定した例である。この終了コードの有効文字数を変更
する場合、あるいは全く終了コードを使用しない場合に
は、バリッドフラグレジスタ400−16の設定を変え
ることで対応できる。
This figure shows an example in which "FFEO"' is set as the end code. When changing the number of valid characters of this end code, or when not using an end code at all, this can be done by changing the setting of the valid flag register 400-16.

第21図は部分文字列設定のための入力ポート。Figure 21 shows an input port for setting partial strings.

バリッドフラグレジスタ、否定条件フラグレジスタ設定
のための入力ポート、および被検索文字列の入力ポート
を共有する構成の第1の実施例である。
This is a first example of a configuration in which a valid flag register, an input port for setting a negative condition flag register, and an input port for a searched character string are shared.

アクセスモードは、CAMレジスタ201またはバリッ
ドフラグレジスタ400、否定条件フラグレジスタ41
0からのデータ読みだしくリードモード)、それらへの
データ書き込み(ライトモードまたは設定モード)、お
よび被検索文字列と部分文字列との照合(コンベアモー
ドまたは比較モード)の3種である。データボート15
0はリードモードではデータ出力ボートとして、ライト
モードおよびコンベアモードではデータ入力ポートとし
て機能する。またCAMレジスタ201−〇〜201−
15とバリッドフラグレジスタ400−0〜400−1
5、否定条件フラグレジスタ410−0〜410−15
はアドレス付けされており、リードモード、ライトモー
ドにおいてアドレスボート160からのアドレス入力で
、デコーダ161を介して任意のものを選択することが
できる。
The access mode is the CAM register 201, the valid flag register 400, or the negative condition flag register 41.
There are three types: reading data from 0 (read mode), writing data to them (write mode or setting mode), and matching the searched character string with a partial character string (conveyor mode or comparison mode). data boat 15
0 functions as a data output port in read mode and as a data input port in write mode and conveyor mode. Also, CAM register 201-〇~201-
15 and valid flag registers 400-0 to 400-1
5. Negative condition flag registers 410-0 to 410-15
are assigned an address, and any one can be selected via the decoder 161 with an address input from the address board 160 in read mode or write mode.

次に各モードでのデータの流れを説明する。Next, the data flow in each mode will be explained.

リードモードでは、任意のCAMレジスタ201−0〜
201−15またはバリッドフラグレジスタ400−0
〜400−15、否定条件フラグレジスタ410−0〜
410−15をアドレスで指定し、その内容を出力デー
タパス上へのせ、出力バッファ142のゲートを開けて
データ140を読みだす。
In read mode, any CAM register 201-0~
201-15 or valid flag register 400-0
~400-15, negative condition flag register 410-0~
410-15 is specified by the address, its contents are placed on the output data path, the gate of the output buffer 142 is opened, and the data 140 is read out.

ライトモードでは、入力バッファ102のゲートを開け
てデータを入力データバス上へのせ、任意のCAMレジ
スタ201−0〜201−15またはバリッドフラグレ
ジスタ400−0〜400−15、否定条件フラグレジ
スタ410−0〜410−15をアドレスで指定し、そ
の内部へ入力データバス上のデータ130をラッチする
In the write mode, the gate of the input buffer 102 is opened and data is placed on the input data bus, and any CAM register 201-0 to 201-15, valid flag register 400-0 to 400-15, or negative condition flag register 410- 0 to 410-15 are specified by the address, and data 130 on the input data bus is latched into the address.

コンベアモードでは、入力バッファ102のゲートを開
けてデータ130を入・カデータパス上へのせ、特定の
CAMレジスタ201−0〜201−15やバヘリッド
フラグレジスタ400−0〜400−15、否定条件フ
ラグレジスタ41o−O〜410−15が選択されるこ
とのないようにアドレスを設定して、すべてのCAMレ
ジスタ201−0〜201−15へバス上のデータを分
配し、ラッチされている部分文字列との照合を行なう。
In the conveyor mode, the gate of the input buffer 102 is opened to input the data 130, and the data 130 is placed on the data path. The addresses are set so that registers 41o-O to 410-15 are not selected, and the data on the bus is distributed to all CAM registers 201-0 to 201-15, and the latched partial character string is Verify with.

上記の各モードでポートを共有することにより、半導体
集積回路上のパッド数を減少させることができる。従っ
てチップ面積増大やピン数増加の対策として有効である
By sharing ports in each of the above modes, the number of pads on the semiconductor integrated circuit can be reduced. Therefore, it is effective as a countermeasure for increasing the chip area and increasing the number of pins.

第22図は第21図と同様に、部分文字列設定のための
入力ポート、バリッドフラグレジスタ、否定条件フラグ
レジスタ設定のための入力ポート、および被検索文字列
の入力ポートを共有する構成の第2の実施例である。こ
れは第21図のCAMレジスタのかわりに、レジスタと
比較回路とを用いて構成したもので、動作及び効果は第
21図の実施例と同様で、チップ面積増大やピン数増加
の対策として有効である。
Similar to FIG. 21, FIG. 22 shows a configuration in which an input port for setting a partial character string, a valid flag register, an input port for setting a negative condition flag register, and an input port for a searched character string are shared. This is Example 2. This is constructed using a register and a comparator circuit instead of the CAM register shown in Figure 21.The operation and effect are the same as the embodiment shown in Figure 21, and it is effective as a countermeasure for increasing the chip area and the number of pins. It is.

第235にコード変換器107の実施例を示す。An example of the code converter 107 is shown in the 235th example.

本実施例は、 並列比較器106からの一致信号(ho〜h15)23
0を入力信号とし、これを状態コード231に変換する
プライオリティ−エンコーダ220、やはり一致信号2
30を入力信号とし、一致信号のすべてがディスイネー
ブルであること、すなわち被検索文字列中に部分文字列
が全く見つからなかったことを検出する論理221、イ
ネーブルが少なくとも1つはあること、すなわち被検索
文字列中にいずれかの部分文字列が見つかったことを検
出する論理222゜ から構成される。
In this embodiment, the coincidence signal (ho to h15) 23 from the parallel comparator 106
A priority encoder 220 that takes 0 as an input signal and converts it into a status code 231, also a match signal 2.
30 as an input signal, a logic 221 detects that all of the matching signals are disabled, that is, that no substring is found in the searched string; It consists of a logic 222° that detects that any substring is found in the search string.

プライオリティ−エンコーダ220は一致信号(ho−
h15)230に優先度を付けてエンコードするエンコ
ーダで、複数の一致信号がイネーブルとなる場合に、優
先度の高いものから一つずつエンコードして状態コード
231に変換する。
The priority encoder 220 generates a coincidence signal (ho-
h15) An encoder that encodes 230 with priority, and when a plurality of coincidence signals are enabled, encodes one by one from the one with the highest priority and converts it to the status code 231.

状態コード231は一旦状態コードキュー109に蓄え
られ、有限オートマトン実行手段104へ送られる。こ
こで検索文字列の後半部分との比較照合処理が行われる
。また、並列比較器106での一致検出状況230を監
視する論理の出力232゜233は、状態コード231
をセレクタ108へ転送する条件の判断に用いられる。
The status code 231 is temporarily stored in the status code queue 109 and sent to the finite automaton execution means 104. Here, comparison processing with the latter half of the search string is performed. Further, the outputs 232 and 233 of the logic for monitoring the match detection status 230 in the parallel comparator 106 are the status code 231.
It is used to determine the conditions for transferring the data to the selector 108.

すなわち、少なくとも1つは部分文字列が見つかったこ
とを示すヒツト信号233が1″である場合に、状態コ
ード231はセレクタ108へ転送される。また、該ヒ
ツト信号233とその否定であるノンヒツト信号232
の論理和は毎サイクル゛11″となるので(毎サイクル
終了時にリセットされる)。
In other words, when the hit signal 233 indicating that at least one partial character string has been found is 1'', the status code 231 is transferred to the selector 108. 232
Since the logical sum of is ``11'' every cycle (it is reset at the end of every cycle).

これをタイミング信号としてデータ転送の同期制御を行
なう。
This is used as a timing signal to perform synchronous control of data transfer.

本発明の第2の実施例のブロック図を第24図に示す。A block diagram of a second embodiment of the present invention is shown in FIG.

本実施例は第1の実施例(第2図)から状態コードキュ
ー109を取り除いたものであり、被検索文字列101
を取り込む入カバソファ102、入力文字コード130
と予め設定された複数の部分文字列とを一括照合する並
列比較器106、並列比較器内のバリッドフラグレジス
タ400.否定条件フラグレジスタ410、並列比較器
での比較の結果、検索文字列の部分文字列との一致が検
出されたことを知らせる一致信号131を、状態コード
132に変換するコード変換器107、有限オートマト
ン実行手段104へ入力する状態コード134の選択を
する入力セレクタ108.オートマトン動作を実現する
オートマトン実行手段104、これに入力する文字コー
ド135を蓄える文字コードバッファ103.オートマ
トンの状態遷移の制御情報を格納した状態遷移テーブル
110、出力する検索結果111を保持する出力バッフ
ァ105 から構成される。
This embodiment removes the status code queue 109 from the first embodiment (FIG. 2), and the searched character string 101
Input cover sofa 102 to take in, input character code 130
A parallel comparator 106 that collectively compares a plurality of partial character strings set in advance, and a valid flag register 400 in the parallel comparator. Negative condition flag register 410, code converter 107 that converts a match signal 131 indicating that a match with a substring of a search string has been detected as a result of comparison in a parallel comparator into a status code 132, and a finite automaton. An input selector 108 for selecting a status code 134 to be input to the execution means 104. An automaton execution means 104 that realizes automaton operation, a character code buffer 103 that stores character codes 135 to be input to the automaton execution means 104. It consists of a state transition table 110 that stores control information for state transitions of the automaton, and an output buffer 105 that holds search results 111 to be output.

本実施例の動作は第1の実施例とほぼ同様である。した
がって、第1の実施例と同様に検索文字列の部分文字列
の一致が検出されるまで並列比較器のみで処理でき、文
字列検索処理の非常に多くの部分をテーブルアクセスな
しで比較処理のみで行うことができる。このため検索処
理全体の速度を向上させることが可能となる。さらに並
列比較器内の照合制御レジスタによって、先頭照合処理
においても柔軟な照合処理が可能である。
The operation of this embodiment is almost the same as that of the first embodiment. Therefore, as in the first embodiment, processing can be performed only by the parallel comparator until a match between substrings of the search string is detected, and a large portion of the string search processing can be performed only by comparison processing without table access. It can be done with Therefore, it is possible to improve the speed of the entire search process. Furthermore, the collation control register in the parallel comparator allows flexible collation processing even in head collation processing.

本実施例では、まず並列比較器106で検索文字列の部
分文字列との一致検出が行なわれる。−致が検出される
と一致信号131は状態コード132に変換されて、セ
レクタ108を経て、有限オートマトン実行手段104
へ転送される。そしてこれ以降入力された被検索文字列
に対しては。
In this embodiment, first, the parallel comparator 106 detects a match with a substring of a search string. - When a match is detected, the match signal 131 is converted into a status code 132, passed through the selector 108, and sent to the finite automaton execution means 104.
will be forwarded to. And for the searched strings entered after this point.

並列比較器106の比較結果は参照せず、有限オートマ
トン実行手段104と状態遷移テーブル110とで、オ
ートマトンの実行を行なう、セレクタ108は状態遷移
テーブル110からの次状態コード138を選択して、
有限オートマトン実行手段104へ転送する。以上の動
作が入力文字コードに対して次々と繰り返され、後方照
合が行なわれる。一方検索文字列が検索された場合や、
初期状態へ遷移するフェイルが発生した場合には、再び
並列比較器106で先頭照合処理が行なわれる。
The automaton is executed by the finite automaton execution means 104 and the state transition table 110 without referring to the comparison result of the parallel comparator 106.The selector 108 selects the next state code 138 from the state transition table 110,
It is transferred to the finite automaton execution means 104. The above operations are repeated one after another for input character codes, and backward verification is performed. On the other hand, if the search string is searched,
If a failure that causes a transition to the initial state occurs, the parallel comparator 106 performs the head verification process again.

これらの一連の処理の実行は、並列比較部10と有限オ
ートマトン実行部11の処理がシーケンシャルに実行さ
れるので、並列度に関しては第1の実施例よりも劣る。
The execution of these series of processes is inferior to the first embodiment in terms of parallelism, since the processes of the parallel comparison unit 10 and the finite automaton execution unit 11 are executed sequentially.

しかし、全体に占める先頭照合の処理の比率が高い場合
には、本実施例でも十分高速化の効果があり、さらに状
態コードキュー109とそれを制御するハードウェア量
の削減の効果や、制御方式の簡略化による処理速度向上
の効果がある。また制御方式が簡略であるため、並列比
較器106や状態遷移テーブル110、各種バッファを
独立チップとして切り出して、全体をマルチチップ構成
とし、より大規模なシステム構成とすることも容易とな
る。
However, if the processing ratio of head matching to the whole is high, this embodiment has the effect of sufficiently speeding up the process, and also has the effect of reducing the amount of the status code queue 109 and the hardware that controls it, and the control method. This simplification has the effect of improving processing speed. Furthermore, since the control method is simple, it is easy to cut out the parallel comparator 106, state transition table 110, and various buffers as independent chips to create a multi-chip configuration as a whole to create a larger system configuration.

本発明の第3の実施例のブロック図を第25図に示す。A block diagram of a third embodiment of the present invention is shown in FIG.

本実施例は、第1の実施例における有限オートマトン実
行手段104としてCPUを利用したものである。
This embodiment utilizes a CPU as the finite automaton execution means 104 in the first embodiment.

本実施例の構成は、入力バッファ1022文字コードバ
ッファ1o3.並列比較器106.コード変換器107
.入力セレクタ108.状態コードキュー109.バリ
ッドフラグレジスタ400゜否定条件フラグレジスタ4
10までは第1の実施例と同様である。しかし有限オー
トマトン実行手段としてCPU112を用いているため
、文字コードバッファ103と状態コードキュー109
はCPUI 12のメモリ空間にマツピングされている
。これらの出力は内部バス113に接続され、これを介
してCPU112のデータバスへ接続されている。CP
U112で実行するオートマトンの制御情報を格納する
状態遷移テーブル114へは、アドレスを指定してアク
セスする。この結果。
The configuration of this embodiment includes an input buffer 1022, a character code buffer 1o3. Parallel comparator 106. Code converter 107
.. Input selector 108. Status code queue 109. Valid flag register 400° Negative condition flag register 4
The steps up to 10 are the same as in the first embodiment. However, since the CPU 112 is used as the finite automaton execution means, the character code buffer 103 and status code queue 109
is mapped to the memory space of the CPU 12. These outputs are connected to an internal bus 113, and via this to a data bus of the CPU 112. C.P.
The state transition table 114 that stores control information for the automaton executed in U112 is accessed by specifying an address. As a result.

テーブルの内容である次状態は内部バス113へ返され
、セレクタ108を経て状態コードキュー109へ替え
られる。このとき、検索文字列との一致検出を示す状態
が得られれば、これに対応する検索結果111がCPU
112から内部バス113を介して出力バッファ105
へ書き出される。以上の処理において、システム全体の
制御、内部バス113の制御、また並列比較器106゜
状態遷移テーブル114へのデータ設定はCPU112
が行なう。
The next status, which is the contents of the table, is returned to the internal bus 113 and transferred to the status code queue 109 via the selector 108. At this time, if a state indicating a match with the search string is obtained, the corresponding search result 111 will be sent to the CPU.
112 to output buffer 105 via internal bus 113
is written to. In the above processing, the CPU 112 controls the entire system, controls the internal bus 113, and sets data to the parallel comparator 106 and state transition table 114.
will do it.

本実施例においても第1の実施例と同様、並列比較器1
06での部分文字列の比較処理がテーブルアクセスなし
で行なえるので、検索処理全体の速度が向上するという
効果が得られる。さらに並列比較器内の照合制御レジス
タによって、先頭照合処理においても柔軟な照合処理が
可能になるという効果も得られる。
In this embodiment, as in the first embodiment, the parallel comparator 1
Since the partial character string comparison process in step 06 can be performed without table access, the overall speed of the search process can be improved. Furthermore, the collation control register in the parallel comparator enables flexible collation processing even in head collation processing.

本発明の第4の実施例のブロック図を第26図に示す。A block diagram of a fourth embodiment of the present invention is shown in FIG.

本実施例は、第3の実施例における文字コードバッファ
103(第25図)と状態コードキュー109(第25
図)と状態遷移テーブル114(第25図)をCPU1
12の管理下にあるメモリ空間に割り付ける構成をとっ
たものである。
This embodiment is similar to the character code buffer 103 (Fig. 25) and status code queue 109 (Fig. 25) in the third embodiment.
) and the state transition table 114 (Fig. 25) on the CPU 1.
The configuration is such that the memory space is allocated to memory spaces under the control of 12 computers.

本実施例の構成は、入力バッファ102、並列比較器1
06.コード変換器107.バリッドフラグレジスタ4
00.否定条件フラグレジスタ410までは第3の実施
例と同様である。しかし第3の実施例における文字コー
ドバッファ103(第25図)を介した内部バス113
(第25図)への接続、入力セレクタ108(第25図
)と状態コードキュー109(第25図)を介した内部
バス113(第25図)への接続が、それぞれ直接、内
部バス113へ接続された形になっている。
The configuration of this embodiment includes an input buffer 102, a parallel comparator 1
06. Code converter 107. Valid flag register 4
00. The steps up to the negative condition flag register 410 are the same as in the third embodiment. However, the internal bus 113 via the character code buffer 103 (FIG. 25) in the third embodiment
(FIG. 25), connection to internal bus 113 (FIG. 25) via input selector 108 (FIG. 25) and status code queue 109 (FIG. 25), respectively, directly to internal bus 113. It is in a connected form.

そして文字コードバッファ116と状態コードキュー1
17は、状態遷移テーブル115を含むメモリ空間内の
一部として配置されている。これらは内部バス113を
介して、CPUI 12からアドレス指定によりアクセ
スすることができる。
and character code buffer 116 and status code queue 1
17 is located as part of the memory space that includes the state transition table 115. These can be accessed by addressing from the CPUI 12 via the internal bus 113.

被検索文字列101中からの検索文字列の一連の比較照
合処理は、第3の実施例と同様に行なわれる。その際の
内部バス113の制御は、CPU112が行なう。
A series of comparison and matching processes for the search string from the search string 101 are performed in the same manner as in the third embodiment. At this time, the internal bus 113 is controlled by the CPU 112.

本実施例においても第1.第2.第3の実施例と同様、
並列比較器106での部分文字列の比較処理がテーブル
アクセスなしで行なえるので、検索処理全体の速度が向
上するという効果が得られる。さらに並列比較器内の照
合制御レジスタによって、先頭照合処理においても柔軟
な照合処理が可能になるという効果も得られる。
In this embodiment as well, the first. Second. Similar to the third embodiment,
Since the parallel comparator 106 can perform the comparison process of partial strings without table access, the effect of improving the speed of the entire search process can be obtained. Furthermore, the collation control register in the parallel comparator enables flexible collation processing even in head collation processing.

本発明の第5の実施例のブロック図を第27図に示す0
本実施例は第4の実施例に検索結果参照テーブル118
を追加した構成となっている。
A block diagram of the fifth embodiment of the present invention is shown in FIG.
This embodiment uses the search result reference table 118 in the fourth embodiment.
It has a configuration with the addition of .

検索結果参照テーブル118は、状態遷移テーブル11
5、文字コードバッファ116.状態コードキュー11
7と同様にCPUI 12管理下のメモリ空間内に配置
され、CPUI l 2からアドレス指定によりアクセ
スすることができる。
The search result reference table 118 is the state transition table 11
5.Character code buffer 116. Status code queue 11
7, it is located in the memory space under the control of the CPUI 12, and can be accessed from the CPUI 12 by addressing.

本実施例においては、比較照合処理により被検索文字列
101と検索文字列との一致検出を示す状態が得られた
場合に、CPU112が検索結果参照テーブル118の
該当アドレスから検索結果111の一部として付加する
情報を得て、出力バッファ105へ書き出す、検索結果
参照テーブル118には、一連の検索処理の終了を知ら
せるターミネータや、次段に接続するハードウェアへ渡
すための5種々の制御情報も格納されており、これらも
必要に応じて出力バッファ105へ書き出される。
In this embodiment, when a state indicating that a match is detected between the searched character string 101 and the searched character string is obtained through the comparison and matching process, the CPU 112 retrieves part of the search result 111 from the corresponding address in the search result reference table 118. The search result reference table 118, which obtains information to be added as a search result and writes it to the output buffer 105, also contains a terminator that indicates the end of a series of search processes, and five types of control information to be passed to the hardware connected to the next stage. These data are also written to the output buffer 105 as necessary.

検索結果参照テーブル118の内容は書き換え可能とす
ることにより、ユーザプログラマブルにすることができ
る。このため異なった処理ごとに、あるいはチップごと
に、その内容を任意に設定することが可能である。
By making the contents of the search result reference table 118 rewritable, it can be made programmable by the user. Therefore, the contents can be arbitrarily set for each different process or for each chip.

従って本実施例においては、検索結果111のデータフ
ォーマットや内容を任意に設定することが可能であるの
で、様々なシステム構成やインターフェイスに柔軟に対
応することができるという効果が得られる。さらに、本
実施例においても第1、第2.第3.第4の実施例と同
様、並列比較器106での部分文字列の比較処理がテー
ブルアクセスなしで行なえるので、検索処理全体の速度
が向上するという効果が得られる。さらに並列比較器内
の照合制御レジスタによって、先頭照合処理においても
柔軟な照合処理が可能になるという効果も得られる。
Therefore, in this embodiment, since the data format and contents of the search results 111 can be arbitrarily set, it is possible to flexibly support various system configurations and interfaces. Furthermore, in this embodiment as well, the first, second, . Third. Similar to the fourth embodiment, since the parallel comparator 106 can perform the partial string comparison process without table access, the overall speed of the search process can be improved. Furthermore, the collation control register in the parallel comparator enables flexible collation processing even in head collation processing.

第28図は、照合フラグレジスタの設定をコマンドで行
なう実施例の構成を示す図である0本実施例は、 照合フラグレジスタ設定コマンド420を取り込むコマ
ンドレジスタ421と、照合フラグレジスタ設定コマン
ド420を解析するコマンドデコーダ422と、コマン
ドデコーダ422の出力から、照合フラグレジスタへ設
定するデータおよびデータ設定のための制御信号424
とを生成する制御回路423と から構成される。
FIG. 28 is a diagram showing the configuration of an embodiment in which the verification flag register is set by a command. This embodiment includes a command register 421 that takes in the verification flag register setting command 420, and an analysis of the verification flag register setting command 420. A command decoder 422 that outputs data to be set in the collation flag register and a control signal 424 for data setting from the output of the command decoder 422.
and a control circuit 423 that generates.

照合フラグレジスタ設定コマンド420は、外部からコ
マンドレジスタ421へ入力され、更にコマンドデコー
ダ422に送られて解析される。
A verification flag register setting command 420 is input from the outside to a command register 421, and further sent to a command decoder 422 for analysis.

解析結果に従って制御回路423で照合フラグレジスタ
に設定するデータと、設定の際に必要な制御信号を生成
する。制御信号は設定データを設定すべき照合フラグレ
ジスタに対して、データラッチのタイミング制御を行な
う。
According to the analysis result, the control circuit 423 generates data to be set in the collation flag register and control signals necessary for the setting. The control signal performs data latch timing control for the collation flag register to which setting data is to be set.

照合フラグレジスタへのデータ設定をコマンド方式とす
ることによって、複数のレジスタへ同時にデータを設定
することや、複数のレジスタを同時に無効にすることが
可能になるという効果が得られる。
By setting data to the collation flag register using a command method, it is possible to set data to a plurality of registers at the same time or to invalidate a plurality of registers at the same time.

第29図は、本発明の第1の実施例に、第28図のコマ
ンド方式での照合フラグレジスタ設定回路を加えた第6
の実施例のブロック図である0本実施例では、第1の実
施例の効果に加え、複数のレジスタへ同時にデータを設
定することや、複数のレジスタを同時に無効にすること
が可能になるという効果が得られる。
FIG. 29 shows a sixth embodiment in which a verification flag register setting circuit using the command method shown in FIG. 28 is added to the first embodiment of the present invention.
This is a block diagram of an embodiment of 0. In this embodiment, in addition to the effects of the first embodiment, it is possible to set data to multiple registers at the same time, and to disable multiple registers at the same time. Effects can be obtained.

以下、第30図〜第33図は、本発明の第2〜第5の実
施例に、それぞれ第28図のコマンド方式での照合フラ
グレジスタ設定回路を加えた第7〜第10の実施例のブ
ロック図である。これらの実施例では第2〜第5の実施
例の効果に加え、複数のレジスタへ同時にデータを設定
することや、複数のレジスタを同時に無効にすることが
可能になるという効果が得られる。
Hereinafter, FIGS. 30 to 33 show seventh to tenth embodiments in which a verification flag register setting circuit using the command method shown in FIG. 28 is added to the second to fifth embodiments of the present invention, respectively. It is a block diagram. In addition to the effects of the second to fifth embodiments, these embodiments have the advantage that it is possible to set data to a plurality of registers at the same time and to invalidate a plurality of registers at the same time.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、オートマトンを用いたフルテキストサ
ーチによる文書検索の際に、有限オートマトン実行手段
の前段に並列比較器を置き先頭照合処理を高速化するこ
とで、検索処理速度を向上させる検索方式において、並
列比較器内にバリッドフラグレジスタ以外に否定条件フ
ラグレジスタを設けることにより1語長の異なった部分
文字列や、don’t care文字、否定条件文字を
含む部分文字列の設定が可能となる。これによって、オ
ートマトンを用いた高速な検索における部分文字列設定
の自由度を向上させ、1文字誤り許容検索や限定検索等
の、より柔軟性の高い曖昧検索を実現できるという効果
が得られる。
According to the present invention, a search method improves the search processing speed by placing a parallel comparator in the front stage of the finite automaton execution means to speed up the head matching process when searching documents by full text search using an automaton. By providing a negative condition flag register in addition to the valid flag register in the parallel comparator, it is possible to set substrings with different lengths of one word, and partial strings that include don't care characters and negative condition characters. Become. This improves the degree of freedom in setting partial strings in high-speed searches using automata, and has the effect of realizing more flexible ambiguous searches such as single character error tolerance searches and limited searches.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図(a)、(b)は本発明における有限オートマト
ンを用いた文字列検索の原理の説明図、第2図は本発明
の第1の実施例の構成を示すブロック図、第3図は検索
文字列の1文字誤りを許容する展開例の説明図、第4図
は第3図の展開された検索文字列を検索するためのオー
トマトンの説明図、第5図は第3図の検索文字列を検索
するための並列比較器と後方照合オートマトンの説明図
、第6図は第5図の並列比較器での部分文字列検索を実
現するための照合フラグレジスタおよび部分文字列の設
定例の説明図、第7図はCAMを用いた並列比較器の実
施例の説明図、第8図は従来のCAMを用いた並列比較
器への検索部分文字列の設定の仕方の説明図、第9図は
本発明におけるCAMを用いた並列比較器への検索部分
文字列の設定の仕方の説明図、第10図は本発明におけ
るCAMを用いた並列比較器への否定条件を含む検索部
分文字列の設定の仕方の説明図、第11図は否定条件を
含む検索文字列の検出機能を持つCAMを用いた並列比
較器への検索部分文字列の設定の仕方の説明図、第12
図は否定条件を含む検索文字列の検出機能を持つCAM
を用いた並列比較器への否定条件を含む検索部分文字列
の設定の仕方の説明図、第13図はCAMを用いた並列
比較器への終了コードの設定の仕方の説明図、第14図
はレジスタと比較器を用いた並列比較器の実施例の説明
図、第15図は従来のレジスタと比較器を用いた並列比
較器への検索部分文字列の設定の仕方の説明図、第16
図は本発明におけるレジスタと比較器を用いた並列比較
器への検索部分文字列の設定の仕方の説明図、第17図
は本発明におけるレジスタと比較器を用いた並列比較器
への否定条件を含む検索部分文字列の設定の仕方の説明
図、第18図は否定条件を含む検索文字列の検出機能を
持つレジスタと比較器を用いた並列比較器への検索部分
文字列の設定の仕方の説明図、第19図は否定条件を含
む検索文字列の検出機能を持つレジスタと比較器を用い
た並列比較器への否定条件を含む検索部分文字列の設定
の仕方の説明図、第20図はレジスタと比較器を用いた
並列比較器への終了コードの設定の仕方の説明図、第2
1図はCAMを用いた並列比較器における部分文字列、
バリッドフラグレジスタ、否定条件フラグレジスタの設
定ポートと被検索文字列の入力ポートとを共有する実施
例の説明図、第22図はレジスタと比較器を用いた並列
比較器における部分文字列、バリッドフラグレジスタ、
否定条件フラグレジスタの設定ポートと被検索文字列の
入力ポートとを共有する実施例の説明図、第23図はコ
ード変換器の実施例の説明図、第24図は本発明の第2
の実施例の構成を示すブロック図、第25図は本発明の
第3の実施例の構成を示すブロック図、第26図は本発
明の第4の実施例の構成を示すブロック図、第27図は
本発明の第5の実施例の構成を示すブロック図、第28
図はコマンド方式での照合フラグレジスタ設定回路の説
明図、第29図は本発明の第6の実施例の構成を示すブ
ロック図、第30図は本発明の第7の実施例の構成を示
すブロック図、第31図は本発明の第8の実施例の構成
を示すブロック図、第32図は本発明の第9の実施例の
構成を示すブロック図、第33図は本発明の第10の実
施例の構成を示すブロック図、第34図は文字列検索シ
ステムの説明図、第35図(a)、(b)は本願発明者
らが先に提案した方式の原理の説明図である。 10・・・並列比較部、11・・・有限オートマトン実
行部、12・・・有限オートマトン、13・・・先頭照
合オートマトン、14・・・後方照合オートマトン、4
0・・・照合フラグレジスタ、101・・・被検索文字
列、102・・・入力バッファ、103,116・・・
文字コードバッファ、104・・・有限オートマトン実
行手段、105・・・出力バッファ、106・・・並列
比較器。 107・・・コード変換器、108・・・セレクタ、1
09゜117・・・状態コードキュー 110,114
゜115・・・状態遷移テーブル、111,136・・
・検索結果、112・・・CPU、113・・・内部バ
ス。 118・・・検索結果参照テーブル、130,135・
・・入力文字コード、131・・・一致信号、132゜
133.134・・・状態コード、137・・・状態遷
移テーブルアクセスアドレス、138・・・遷移先の状
態、140・・・照合フラグレジスタ格納データ、14
2・・・出力バッファ、150・・・デルタポート16
0・・・アドレスポート、161・・・アドレスデコー
ダ、162・・・照合フラグレジスタ書き込み制御信号
、400・・・バリッドフラグレジスタ、410・・・
否定条件フラグレジスタ、420・・・照合フラグレジ
スタ設定コマンド、421・・・コマンドレジスタ、4
22・・・コマンドデコーダ、423・・・照合フラグ
レジスタへのデータ設定の制御回路、424・・・照合
フラグレジスタへの設定データと設定制御信号、  10 ・・オートマトン分割線。 1に ¥ 図 ((L) 第 図 <b) 第 1j 図 第 z 図 #3−0 遁 15 図 byte3bfez bget bYf:et>不 16 図 Zρ4−ρ byte3 bytez bytel byte。 冨 1′7 図 byte3byta blta byt$■ 8 図 byte3bytex byter byteθ第 9 図 byte3byteZ bltel blka冨 Zρ 回 Z/i −76 ミー化に輻峠 第 B 図 nrv−S工 r′1〜−gL nN、’+:□ 口け・\! 第 35図(幻 5 図 (b〕 →寺せ 住所中央研究θ 分前H 作所中央研究月 →寺H 研究月 テ東恋ケ窪1丁目280番地 1内 テ東恋ケ窪1丁目280番地 1内 げ東恋ケ窪1丁目280番地 1内 株式会社日立製 株式会社日立製 株式会社日立製
FIGS. 1(a) and (b) are explanatory diagrams of the principle of character string search using a finite automaton in the present invention, FIG. 2 is a block diagram showing the configuration of the first embodiment of the present invention, and FIG. is an explanatory diagram of an expansion example that allows for a single-character error in the search string, Figure 4 is an explanatory diagram of an automaton for searching the expanded search string in Figure 3, and Figure 5 is an illustration of the search in Figure 3. An explanatory diagram of a parallel comparator and backward collation automaton for searching character strings. Figure 6 is an example of setting the collation flag register and partial string to realize partial string search with the parallel comparator shown in Figure 5. FIG. 7 is an explanatory diagram of an embodiment of a parallel comparator using CAM. FIG. 8 is an explanatory diagram of how to set a search partial string to a parallel comparator using conventional CAM. FIG. 9 is an explanatory diagram of how to set a search partial string to a parallel comparator using CAM in the present invention, and FIG. 10 is a search partial string including a negative condition to a parallel comparator using CAM in the present invention. Fig. 11 is an explanatory diagram of how to set columns, and Fig. 11 is an explanatory diagram of how to set a search partial string to a parallel comparator using a CAM that has a function of detecting a search string including a negative condition.
The figure shows a CAM with a function to detect search strings that include negative conditions.
Fig. 13 is an explanatory diagram of how to set a search partial string including a negative condition to a parallel comparator using CAM, Fig. 14 is an explanatory diagram of how to set an end code to a parallel comparator using CAM. 15 is an explanatory diagram of an embodiment of a parallel comparator using registers and comparators, FIG. 15 is an explanatory diagram of how to set a search partial string to a parallel comparator using conventional registers and comparators, and FIG.
The figure is an explanatory diagram of how to set a search partial string to a parallel comparator using registers and comparators in the present invention, and Figure 17 is a negative condition for a parallel comparator using registers and comparators in the present invention. Fig. 18 is an explanatory diagram of how to set a search substring containing a negative condition. Fig. 19 is an explanatory diagram of how to set a search partial string including a negation condition to a parallel comparator using a register and a comparator that have a function of detecting a search string including a negation condition. The figure is an explanatory diagram of how to set the end code to the parallel comparator using registers and comparators.
Figure 1 shows a partial string in a parallel comparator using CAM.
An explanatory diagram of an embodiment in which the setting port of the valid flag register and the negative condition flag register and the input port of the searched character string are shared. FIG. 22 shows the partial string and valid flag in a parallel comparator using registers and comparators. register,
An explanatory diagram of an embodiment in which the setting port of the negative condition flag register and the input port of the searched character string are shared, FIG. 23 is an explanatory diagram of the embodiment of the code converter, and FIG. 24 is the second embodiment of the present invention.
FIG. 25 is a block diagram showing the configuration of the third embodiment of the present invention. FIG. 26 is a block diagram showing the configuration of the fourth embodiment of the present invention. The figure is a block diagram showing the configuration of the fifth embodiment of the present invention.
FIG. 29 is a block diagram showing the configuration of a sixth embodiment of the present invention, and FIG. 30 is a diagram showing the configuration of a seventh embodiment of the present invention. 31 is a block diagram showing the configuration of the eighth embodiment of the present invention, FIG. 32 is a block diagram showing the configuration of the ninth embodiment of the present invention, and FIG. 33 is a block diagram showing the configuration of the ninth embodiment of the present invention. FIG. 34 is an explanatory diagram of the character string search system, and FIGS. 35(a) and (b) are explanatory diagrams of the principle of the system previously proposed by the inventors of the present application. . DESCRIPTION OF SYMBOLS 10... Parallel comparison part, 11... Finite automaton execution part, 12... Finite automaton, 13... Leading verification automaton, 14... Back matching automaton, 4
0...Verification flag register, 101...Character string to be searched, 102...Input buffer, 103, 116...
Character code buffer, 104... Finite automaton execution means, 105... Output buffer, 106... Parallel comparator. 107... Code converter, 108... Selector, 1
09°117...Status code queue 110,114
゜115...State transition table, 111,136...
・Search result, 112...CPU, 113...Internal bus. 118... Search result reference table, 130, 135.
... Input character code, 131 ... Match signal, 132゜133.134 ... State code, 137 ... State transition table access address, 138 ... Transition destination state, 140 ... Verification flag register Stored data, 14
2... Output buffer, 150... Delta port 16
0...Address port, 161...Address decoder, 162...Verification flag register write control signal, 400...Valid flag register, 410...
Negation condition flag register, 420...Verification flag register setting command, 421...Command register, 4
22... Command decoder, 423... Control circuit for setting data to the collation flag register, 424... Setting data and setting control signal to the collation flag register, 10... Automaton dividing line. 1 ¥ Figure ((L) Figure <b) 1j Figure z Figure #3-0 遁15 Figure byte3bfez bget bYf:et>F16 Figure Zρ4-ρ byte3 bytez bytel byte. Toge 1'7 Figure byte3byta blta byt$■ 8 Figure byte3bytex byter byteθ 9th Figure byte3byteZ bltel blka Toge Zρ Time Z/i -76 Convergence pass No. B Figure nrv-S engineering r'1~-g L nN,' +:□ Mouth・\! Fig. 35 (Illusion 5 Fig. (b)) →Terase Address Central Research θ Minutes ago 280-1 Hitachi Co., Ltd. Hitachi Co., Ltd. Hitachi Co., Ltd.

Claims (1)

【特許請求の範囲】 1、コード表現された記号で構成される被検索記号列中
に、複数の検索対象記号列が存在するか否かを一括して
判定するオートマトンを用いた記号列検索方法において
、 複数の検索記号列を被検索記号列中から一括して検索す
る際に、 該検索記号列を任意の位置で少なくとも2つの部分記号
列に分割し、分割したものの1つの部分記号列の照合す
なわち先頭照合処理を行なつた結果、該部分記号列に関
する検索条件を満足した検索記号列に対してのみ、残り
の部分記号列の照合すなわち後方照合処理を行い、ここ
で該残りの部分記号列に関する検索条件を満足した場合
に該検索記号列が検索されたと判定する記号列検索方法
であつて、 先頭照合処理での該部分文字列に関する検索条件として
、特定の記号以外の全ての記号という条件すなわち否定
条件を部分記号列の任意位置に設定可能として、先頭照
合処理を行なうことを特徴とする記号列検索方法。 2、請求項1記載の記号列検索方法を用いて、記号列検
索を行なう記号列検索装置であつて、少なくとも、 (a)前記被検索記号列を入力するための第1の外部情
報アクセス手段と、 (b)該第1の外部情報アクセス手段(a)により入力
した、前記被検索記号列と、検索記号列の部分記号列と
の先頭照合処理を行なう先頭照合処理手段と、 (c)該第1の外部情報アクセス手段(a)により入力
した、前記被検索記号列と、検索記号列の部分記号列と
の後方照合処理を行なう後方照合処理手段と、 (d)後方照合処理を行なう際に、後方照合処理を制御
するデータを格納する、データ格納手段と、 (e)後方照合処理制御データをデータ格納手段から入
力するための、第2の外部情報アクセス手段 を有することを特徴とする記号列検索装置。 3、請求項2記載の記号列検索装置の、構成要素(a)
〜(e)のうちの少なくとも2種を、同一チップ上に集
積したことを特徴とする半導体集積回路。 4、請求項2記載の記号列検索装置において、特許請求
範囲第2項記載の記号列検索装置の、構成要素(a)〜
(e)のうちの少なくとも(a)第1の外部情報アクセ
ス手段と、(e)第2の外部情報アクセス手段とを有し
、 該第1の外部情報アクセス手段(a)によるアクセスと
、該第2の外部情報アクセス手段(e)によるアクセス
とが、独立に行なえるように構成したことを特徴とする
記号列検索装置。 5、請求項3記載の半導体集積回路において、特許請求
範囲第2項記載の記号列検索装置の、構成要素(a)〜
(e)のうちの少なくとも(a)第1の外部情報アクセ
ス手段と、(e)第2の外部情報アクセス手段とを同一
集積回路上に集積し、 該第1の外部情報アクセス手段(a)によるアクセスと
、該第2の外部情報アクセス手段(e)によるアクセス
とが、独立に行なえるように構成したことを特徴とする
半導体集積回路。 6、請求項4記載の記号列検索装置において、前記第1
の外部情報アクセス手段(a)による外部情報アクセス
が、前記第2の外部情報アクセス手段(e)による外部
情報アクセスよりも、高い頻度で行なわれるように構成
したことを特徴とする記号列検索装置。 7、請求項5記載の半導体集積回路において、前記構成
要素(a)〜(e)のうちの少なくとも前記第1の外部
情報アクセス手段(a)と前記第2の外部情報アクセス
手段(e)とを同一集積回路上に集積し、かつ、前記第
1の外部情報アクセス手段(a)による外部情報アクセ
スが、前記第2の外部情報アクセス手段(e)による外
部情報アクセスよりも、高い頻度で行なわれるように構
成したことを特徴とする半導体集積回路。 8、請求項4記載の記号列検索装置において、前記第1
の外部情報アクセス手段(a)による外部情報アクセス
が、前記第2の外部情報アクセス手段(e)による外部
情報アクセスよりも、先立つて行なわれるように構成し
たことを特徴とする記号列検索装置。 9、請求項5記載の半導体集積回路において、前記構成
要素(a)〜(e)のうちの少なくとも前記第1の外部
情報アクセス手段(a)と前記第2の外部情報アクセス
手段(e)とを同一集積回路上に集積し、かつ、前記第
1の外部情報アクセス手段(a)による外部情報アクセ
スが、前記第2の外部情報アクセス手段(e)による外
部情報アクセスよりも、先立つて行なわれるように構成
したことを特徴とする半導体集積回路。 10、請求項3記載の半導体集積回路において、前記構
成要素(a)〜(e)のうちの先頭照合処理手段(b)
を含む少なくとも2種を、それぞれ1つ以上同一集積回
路上に集積し、かつ、複数の前記検索記号列、またはそ
れらの部分記号列を、該半導体集積回路内部に格納する
手段を有することを特徴とする半導体集積回路。 11、請求項2記載の記号列検索装置において、少なく
とも、 (f)入力した被検索記号列をバッファリングする入力
バッファリング手段、 (g)先頭照合処理を行なうため、予め設定された複数
の検索記号列と、該入力バッファリング手段(f)から
送られる被検索記号列との照合を並列に行う並列照合手
段、 (h)後方照合処理の際に参照する制御データを格納す
る、状態遷移テーブル、 (i)後方照合処理を行なうため、前記状態遷移テーブ
ル(h)と、前記入力バッファリング手段(f)から送
られる被検索記号列とに従つて、有限オートマトンを実
行する有限オートマトン実行手段、 (j)後方照合処理の際に、前記状態遷移テーブル(h
)を参照するための状態遷移テーブルアクセス手段、 (k)前記並列照合手段(g)による先頭照合結果を、
前記有限オートマトン実行手段(i)へ転送するコード
に変換するための、コード変換手段、 (l)前記コード変換手段(k)により生成されたコー
ドと、前記状態遷移テーブル(h)から得られた状態と
のいずれを、前記有限オートマトン実行手段(i)へ転
送するのかを選択するデータ選択手段、 (m)前記有限オートマトン実行手段(i)からの検索
結果を保持する、出力バッファリング手段、 を有し、 被検索記号列入力に対する、複数の検索記号列の検索処
理を行う際に、検索記号列を任意の位置で少なくとも2
つの部分記号列に分割し、分割したものの1つの部分記
号列の先頭照合処理を前記並列照合手段で行い、該部分
記号列に関する検索条件を満足した検索記号列に対して
のみ、前記有限オートマトン実行手段で残りの部分記号
列の後方照合処理を行い、ここで該残りの部分記号列に
関する検索条件を満足した場合に、該検索記号列が検索
されたとする記号列検索処理を行うことを特徴とする記
号列検索装置。 12、請求項3記載の半導体集積回路において、少なく
とも、 (f)入力した被検索記号列をバッファリングする入力
バッファリング手段、 (g)先頭照合処理を行なうため、予め設定された複数
の検索記号列と、前記入力バッファリング手段(f)か
ら送られる被検索記号列との照合を並列に行う並列照合
手段、 (h)後方照合処理の際に参照する制御データを格納す
る、状態遷移テーブル、 (i)後方照合処理を行なうため、前記状態遷移テーブ
ル(h)と、前記入力バッファリング手段(f)から送
られる被検索記号列とに従つて、有限オートマトンを実
行する有限オートマトン実行手段、 (j)後方照合処理の際に、前記状態遷移テーブル(h
)を参照するための状態遷移テーブルアクセス手段、 (k)前記並列照合手段(g)による先頭照合結果を、
前記有限オートマトン実行手段(i)へ転送するコード
に変換するための、コード変換手段。 (l)前記コード変換手段(k)により生成されたコー
ドと、前記状態遷移テーブル(h)から得られた状態と
のいずれを、前記有限オートマトン実行手段(i)へ転
送するのかを選択するデータ選択手段、 (m)前記有限オートマトン実行手段(i)からの検索
結果を保持する、出力バッファリング手段、 の各構成要素のうちの少なくとも2種以上の構成要素、
若しくは上記(h)を除いた各構成要素のうちの少なく
とも2種以上の構成要素を、同一集積回路上に集積した
ことを特徴とする半導体集積回路。 13、請求項11記載の記号列検索装置において、前記
記号列検索装置内部へ任意の終了コードを設定する終了
コード設定手段と、終了コードを検出する終了コード検
出手段とを有し、 前記被検索記号列中に該終了コードを検出することによ
り、記号列検索処理を終了するように構成したことを特
徴とする記号列検索装置。 14、請求項12記載の半導体集積回路において、前記
半導体集積回路内部へ任意の終了コードを設定する終了
コード設定手段と、終了コードを検出する終了コード検
出手段とを有し、 前記被検索記号列中に該終了コードを検出することによ
り、記号列検索処理を終了するように構成したことを特
徴とする半導体集積回路。 15、請求項13記載の記号列検索装置において、前記
終了コード設定手段に設定する複数の記号から構成され
る終了コードと、被検索記号列との照合の際に、終了コ
ードの有効、無効を少なくとも記号ごとに示すバリッド
フラグレジスタを設け、更に該バリッドフラグレジスタ
の任意の構成ビットをセットあるいはリセットする手段
を有し、 照合の際に該バリッドフラグレジスタを参照し、該バリ
ッドフラグレジスタの構成ビットが、セット状態である
部分に対応する終了コード中の記号を、被検索記号列と
の照合の際に有効とし、リセット状態である部分に対応
する終了コード中の記号を、被検索記号列との照合の際
に無効とすることにより、 該終了コードの任意位置にドントケア(don’tca
re)を設定することを可能としたことを特徴とする記
号列検索装置。 16、請求項14記載の半導体集積回路において、前記
終了コード設定手段に設定する複数の記号から構成され
る終了コードと、被検索記号列との照合の際に、終了コ
ードの有効、無効を少なくとも記号ごとに示すバリッド
フラグレジスタを設け、更に該バリッドフラグレジスタ
の任意の構成ビットをセットあるいはリセットする手段
を有し、 照合の際に該バリッドフラグレジスタを参照し、該バリ
ッドフラグレジスタの構成ビットが、セット状態である
部分に対応する終了コード中の記号を、被検索記号列と
の照合の際に有効とし、リセット状態である部分に対応
する終了コード中の記号を、被検索記号列との照合の際
に無効とすることにより、 該終了コードの任意位置にドントケアを設定することを
可能としたことを特徴とする半導体集積回路。 17、請求項11記載の記号列検索装置において、前記
並列照合手段と前記有限オートマトン実行手段とが、同
一の入力記号に対して並列動作し、処理を行うことを特
徴とする記号列検索装置。 18、請求項12記載の半導体集積回路において、前記
並列照合手段と前記有限オートマトン実行手段とが、同
一の入力記号に対して並列動作し、処理を行うことを特
徴とする半導体集積回路。 19、請求項11記載の記号列検索装置において、前記
有限オートマトン実行手段を、CPUを用いて構成した
ことを特徴とする記号列検索装置。 20、請求項12記載の半導体集積回路において、前記
有限オートマトン実行手段をCPUを用いて構成し、か
つ、該CPUを同一集積回路上に集積したことを特徴と
する半導体集積回路。 21、請求項11記載の記号列検索装置において、前記
並列照合手段を、連想メモリを用いて構成したことを特
徴とする記号列検索装置。 22、請求項12記載の半導体集積回路において、前記
並列照合手段を、連想メモリを用いて構成し、かつ、該
CPUを同一集積回路上に集積したことを特徴とする半
導体集積回路。 23、請求項11記載の記号列検索装置において、前記
並列照合手段を、レジスタと比較回路の組合せを複数組
用いて構成したことを特徴とする記号列検索装置。 24、請求項12記載の半導体集積回路において、前記
並列照合手段を、レジスタと比較回路の組合せを複数組
用いて構成し、かつ、それらを同一集積回路上に集積し
たことを特徴とする半導体集積回路。 25、請求項11記載の記号列検索装置において、前記
並列照合手段内に設定する各検索記号列の部分記号列に
、照合の際にその有効、無効を少なくとも記号ごとに示
すバリッドフラグレジスタを設け、更に該バリッドフラ
グレジスタの任意の構成ビットをセットあるいはリセッ
トする手段を有し、 照合の際に該バリッドフラグレジスタを参照し、該バリ
ッドフラグレジスタの構成ビットが、セット状態である
部分に対応する部分記号列中の記号を、被検索記号列と
の照合の際に有効とし、リセット状態である部分に対応
する部分記号列中の記号を、被検索記号列との照合の際
に無効とすることにより、 該部分記号列の任意位置にドントケアを設定することを
可能としたことを特徴とする記号列検索装置。 26、請求項12記載の半導体集積回路において、前記
並列照合手段内に設定する各検索記号列の部分記号列に
、照合の際にその有効、無効を少なくとも記号ごとに示
すバリッドフラグレジスタを設け、更に該バリッドフラ
グレジスタの任意の構成ビットをセットあるいはリセッ
トする手段を有し、 照合の際に該バリッドフラグレジスタを参照し、該バリ
ッドフラグレジスタの構成ビットが、セット状態である
部分に対応する部分記号列中の記号を、被検索記号列と
の照合の際に有効とし、リセット状態である部分に対応
する部分記号列中の記号を、被検索記号列との照合の際
に無効とすることにより、 該部分記号列の任意位置にドントケアを設定することを
可能としたことを特徴とする半導体集積回路。 27、請求項11記載の記号列検索装置において、前記
並列照合手段内に設定する各検索記号列の部分記号列に
、設定された記号列をそのまま有効とするのか、あるい
は設定された記号列以外の全ての記号列を有効とするの
かを、少なくとも記号ごとに示す否定条件フラグレジス
タを設け、更に該否定条件フラグレジスタの任意の構成
ビットをセットあるいはリセットする手段を有し、 照合の際に該否定条件フラグレジスタを参照し、該否定
条件フラグレジスタの構成ビットが、セット状態である
部分に対応する部分記号列中の記号は、被検索記号列と
の照合の際にそのまま有効とし、リセット状態である部
分に対応する部分記号列中の記号は、被検索記号列との
照合の際に該記号以外の全ての記号が有効であるとする
ことにより、 該部分記号列の任意位置に否定条件を設定することを可
能としたことを特徴とする記号列検索装置。 28、請求項12記載の半導体集積回路において、前記
並列照合手段内に設定する各検索記号列の部分記号列に
、設定された記号列をそのまま有効とするのか、あるい
は設定された記号列以外の全ての記号列を有効とするの
かを、少なくとも記号ごとに示す否定条件フラグレジス
タを設け、更に該否定条件フラグレジスタの任意の構成
ビットをセットあるいはリセットする手段を有し、 照合の際に該否定条件フラグレジスタを参照し、該否定
条件フラグレジスタの構成ビットが、セット状態である
部分に対応する部分記号列中の記号は、被検索記号列と
の照合の際にそのまま有効とし、リセット状態である部
分に対応する部分記号列中の記号は、被検索記号列との
照合の際に該記号以外の全ての記号が有効であるとする
ことにより、 該部分記号列の任意位置に否定条件を設定することを可
能としたことを特徴とする半導体集積回路。 29、請求項25または27記載の記号列検索装置にお
いて、 任意のバリッドフラグレジスタ、否定条件フラグレジス
タへのデータ設定を行なうための外部からのコマンドを
受け付ける手段、受け付けたコマンドを制御信号および
設定データに変換する手段を有し、 外部からのコマンド入力によつて並列比較器内のバリッ
ドフラグレジスタ、否定条件フラグレジスタを設定する
ことを可能としたことを特徴とする記号列検索装置。 30、請求項26または28記載の半導体集積回路にお
いて、 任意のバリッドフラグレジスタ、否定条件フラグレジス
タへのデータ設定を行なうための外部からのコマンドを
受け付ける手段、受け付けたコマンドを制御信号および
設定データに変換する手段を有し、 外部からのコマンド入力によつて並列比較器内のバリッ
ドフラグレジスタ、否定条件フラグレジスタを設定する
ことを可能としたことを特徴とする半導体集積回路。 31、請求項25または29記載の記号列検索装置にお
いて、 前記並列照合手段に検索記号列の部分記号列内のすべて
の記号をドントケアに設定した場合、すべての入力記号
に対して該並列照合手段が不一致の判定をする手段を設
けたことを特徴とする記号列検索装置。 32、請求項26または30記載の半導体集積回路にお
いて、 前記並列照合手段に検索記号列の部分記号列内のすべて
の記号をドントケアに設定した場合、すべての入力記号
に対して該並列照合手段が不一致の判定をする手段を同
一集積回路上に集積したことを特徴とする半導体集積回
路。 33、請求項11記載の記号列検索装置において、前記
並列照合手段に設定された複数の検索記号列と、被検索
記号列との照合の結果、設定された該検索記号列のすべ
てが検索条件を満足しない場合、これを検出する手段を
設けたことを特徴とする記号列検索装置。 34、請求項12記載の半導体集積回路において、前記
並列照合手段に設定された複数の検索記号列と、被検索
記号列との照合の結果、設定された該検索記号列のすべ
てが検索条件を満足しない場合、これを検出する手段を
同一集積回路上に集積したことを特徴とする半導体集積
回路。 35、請求項11記載の記号列検索装置において、前記
並列照合手段に設定された複数の検索記号列と、被検索
記号列との照合の結果、設定された該検索記号列の少な
くとも一つが検索条件を満足する場合、これを検出する
手段を設けたことを特徴とする記号列検索装置。 36、請求項12記載の半導体集積回路において、前記
並列照合手段に設定された複数の検索記号列と、被検索
記号列との照合の結果、設定された該検索記号列の少な
くとも一つが検索条件を満足する場合、これを検出する
手段を同一集積回路上に集積したことを特徴とする半導
体集積回路。 37、請求項27または29記載の記号列検索装置にお
いて、 前記並列照合手段に設定された複数の検索記号列と、被
検索記号列との照合の結果、設定された該検索記号列の
少なくとも一つが検索条件を満足し、かつ該検索条件に
は否定条件設定が含まれている場合、これを検出する手
段を設けたことを特徴とする記号列検索装置。 38、請求項28または30記載の半導体集積回路にお
いて、 前記並列照合手段に設定された複数の検索記号列と、被
検索記号列との照合の結果、設定された該検索記号列の
少なくとも一つが検索条件を満足し、かつ該検索条件に
は否定条件設定が含まれている場合、これを検出する手
段を同一集積回路上に集積したことを特徴とする半導体
集積回路。 39、請求項第11記載の記号列検索装置において、更
に、 (n)前記有限オートマトン実行手段(i)から検索結
果が出力される際に、その一部として該検索結果に付加
する情報を格納する付加情報格納手段、 (o)前記付加情報格納手段(n)の内容を設定する手
段、 を有し、 該検索結果を保持する前記出力バッファリング手段(m
)に出力される該検索結果に、予め任意に設定可能な情
報を、付加することができるように構成したことを特徴
とする記号列検索装置。 40、請求項12記載の半導体集積回路において、更に
、 (n)前記有限オートマトン実行手段(i)から検索結
果が出力される際に、その一部として該検索結果に付加
する情報を格納する付加情報格納手段、 (o)前記付加情報格納手段(n)の内容を設定する手
段、 を同一集積回路上に集積し、 該検索結果を保持する前記出力バッファリング手段(m
)に出力される該検索結果に、予め任意に設定可能な情
報を、付加することができるように構成したことを特徴
とする半導体集積回路。 41、請求項12記載の半導体集積回路において、集積
回路上に集積された前記並列照合手段は、部分記号列記
憶手段およびバリッドフラグレジスタ、否定条件フラグ
レジスタを有し、かつ、部分記号列設定のための入力ポ
ート、バリッドフラグレジスタ設定のための入力ポート
、否定条件フラグレジスタ設定のための入力ポートおよ
び被検索記号列の入力ポートのうちの少なくとも2つの
入力ポートを共有することを特徴とする半導体集積回路
[Claims] 1. A symbol string search method using an automaton that collectively determines whether or not a plurality of search target symbol strings exist in a search target symbol string composed of code-expressed symbols. When searching a plurality of search symbol strings at once from a searched symbol string, the search symbol string is divided into at least two partial symbol strings at an arbitrary position, and one partial symbol string of the divided symbol strings is divided into two partial symbol strings. As a result of the matching, that is, the head matching process, only for the search symbol string that satisfies the search conditions for the partial symbol string, the remaining partial symbol strings are matched, that is, the backward matching process is performed, and here the remaining partial symbol strings are A symbol string search method that determines that a search symbol string has been searched when a search condition for a string is satisfied, and the search condition for the substring in the head matching process is to include all symbols other than a specific symbol. A symbol string search method characterized in that a condition, that is, a negative condition can be set at an arbitrary position in a partial symbol string, and head matching processing is performed. 2. A symbol string search device for performing a symbol string search using the symbol string search method according to claim 1, comprising at least: (a) first external information access means for inputting the symbol string to be searched; (b) head matching processing means for performing a head collation process between the searched symbol string input by the first external information access means (a) and a partial symbol string of the search symbol string; (c) (d) performing a backward matching process between the searched symbol string input by the first external information access means (a) and a partial symbol string of the search symbol string; (e) a second external information access means for inputting backward verification processing control data from the data storage means; A symbol string search device. 3. Component (a) of the symbol string search device according to claim 2
A semiconductor integrated circuit, characterized in that at least two of (e) are integrated on the same chip. 4. In the symbol string search device according to claim 2, components (a) to
(e) at least (a) a first external information access means; and (e) a second external information access means; A symbol string search device characterized in that the symbol string search device is configured such that access by the second external information access means (e) can be performed independently. 5. In the semiconductor integrated circuit according to claim 3, the constituent elements (a) to
Of (e), at least (a) the first external information access means and (e) the second external information access means are integrated on the same integrated circuit, and the first external information access means (a) 1. A semiconductor integrated circuit characterized in that the semiconductor integrated circuit is configured such that access by and access by the second external information access means (e) can be performed independently. 6. The symbol string search device according to claim 4, wherein the first
A symbol string search device characterized in that the external information access by the external information access means (a) is performed more frequently than the external information access by the second external information access means (e). . 7. The semiconductor integrated circuit according to claim 5, wherein among the components (a) to (e), at least the first external information access means (a) and the second external information access means (e) are integrated on the same integrated circuit, and the external information access by the first external information access means (a) is performed more frequently than the external information access by the second external information access means (e). What is claimed is: 1. A semiconductor integrated circuit characterized in that the semiconductor integrated circuit is configured such that 8. The symbol string search device according to claim 4, wherein the first
A symbol string search device characterized in that the external information access by the external information access means (a) is performed before the external information access by the second external information access means (e). 9. The semiconductor integrated circuit according to claim 5, wherein at least the first external information access means (a) and the second external information access means (e) of the components (a) to (e) are integrated on the same integrated circuit, and the external information access by the first external information access means (a) is performed before the external information access by the second external information access means (e). A semiconductor integrated circuit characterized by being configured as follows. 10. In the semiconductor integrated circuit according to claim 3, a head verification processing means (b) among the components (a) to (e).
integrated on the same integrated circuit, and having means for storing a plurality of the search symbol strings or partial symbol strings thereof inside the semiconductor integrated circuit. Semiconductor integrated circuit. 11. The symbol string search device according to claim 2, at least: (f) an input buffering means for buffering the input symbol string to be searched; (g) a plurality of preset searches for performing head matching processing; (h) a state transition table that stores control data to be referenced during backward matching processing; , (i) finite automaton execution means for executing a finite automaton according to the state transition table (h) and the searched symbol string sent from the input buffering means (f) in order to perform backward matching processing; (j) During backward matching processing, the state transition table (h
) state transition table access means for referencing (k) the first collation result by the parallel collation means (g);
code conversion means for converting into a code to be transferred to the finite automaton execution means (i); (l) a code generated by the code conversion means (k) and a code obtained from the state transition table (h); (m) output buffering means for holding the search results from the finite automaton execution means (i); and when performing search processing for multiple search symbol strings for the input symbol string to be searched, at least two search symbol strings are searched at any position.
The parallel matching means performs head matching processing on one of the divided symbol strings, and executes the finite automaton only for the search symbol string that satisfies the search conditions for the partial symbol string. The means performs backward checking processing on the remaining partial symbol strings, and when the search condition regarding the remaining partial symbol strings is satisfied, a symbol string search processing is performed in which it is determined that the search symbol string has been retrieved. A symbol string search device. 12. The semiconductor integrated circuit according to claim 3, at least: (f) input buffering means for buffering the input symbol string to be searched; (g) a plurality of search symbols set in advance for performing header matching processing; parallel matching means for performing parallel matching between the string and the searched symbol string sent from the input buffering means (f); (h) a state transition table that stores control data to be referenced during backward matching processing; (i) Finite automaton execution means for executing the finite automaton according to the state transition table (h) and the searched symbol string sent from the input buffering means (f) in order to perform the backward matching process; ( j) During backward matching processing, the state transition table (h
) state transition table access means for referencing (k) the first collation result by the parallel collation means (g);
Code conversion means for converting into a code to be transferred to the finite automaton execution means (i). (l) Data for selecting which of the code generated by the code conversion means (k) and the state obtained from the state transition table (h) is to be transferred to the finite automaton execution means (i). selection means; (m) output buffering means for retaining the search results from the finite automaton execution means (i);
Alternatively, a semiconductor integrated circuit characterized in that at least two or more of the constituent elements other than the above (h) are integrated on the same integrated circuit. 13. The symbol string search device according to claim 11, further comprising: end code setting means for setting an arbitrary end code into the symbol string search device; and end code detecting means for detecting the end code; A symbol string search device characterized in that the symbol string search process is terminated by detecting the end code in the symbol string. 14. The semiconductor integrated circuit according to claim 12, further comprising: an end code setting means for setting an arbitrary end code into the semiconductor integrated circuit; and an end code detecting means for detecting the end code; A semiconductor integrated circuit characterized in that the symbol string search process is terminated by detecting the end code in the semiconductor integrated circuit. 15. In the symbol string search device according to claim 13, when the termination code composed of a plurality of symbols set in the termination code setting means is compared with the symbol string to be searched, validity or invalidation of the termination code is determined. At least a valid flag register is provided for each symbol, and means is provided for setting or resetting arbitrary constituent bits of the valid flag register, and the constituent bits of the valid flag register are referred to during verification. The symbol in the end code corresponding to the part in the set state is made valid when matching with the symbol string to be searched, and the symbol in the end code corresponding to the part in the reset state is used as the symbol string to be searched. By invalidating the end code when checking the
A symbol string search device characterized in that it is possible to set re). 16. In the semiconductor integrated circuit according to claim 14, when the termination code composed of a plurality of symbols set in the termination code setting means is compared with the symbol string to be searched, at least whether the termination code is valid or invalid is determined. A valid flag register is provided for each symbol, and means is provided to set or reset arbitrary constituent bits of the valid flag register, and the valid flag register is referred to during verification, and the constituent bits of the valid flag register are , the symbol in the end code corresponding to the part in the set state is made valid when matching with the symbol string to be searched, and the symbol in the end code corresponding to the part in the reset state is made valid when matching with the symbol string to be searched. A semiconductor integrated circuit characterized in that a don't care can be set at any position of the end code by invalidating it during verification. 17. The symbol string search device according to claim 11, wherein the parallel matching means and the finite automaton execution means operate and process the same input symbol in parallel. 18. The semiconductor integrated circuit according to claim 12, wherein the parallel verification means and the finite automaton execution means operate in parallel to process the same input symbol. 19. The symbol string search device according to claim 11, wherein the finite automaton execution means is configured using a CPU. 20. The semiconductor integrated circuit according to claim 12, wherein the finite automaton execution means is configured using a CPU, and the CPU is integrated on the same integrated circuit. 21. The symbol string search device according to claim 11, wherein the parallel matching means is constructed using an associative memory. 22. The semiconductor integrated circuit according to claim 12, wherein the parallel matching means is constructed using an associative memory, and the CPU is integrated on the same integrated circuit. 23. The symbol string search device according to claim 11, wherein the parallel matching means is constructed using a plurality of combinations of registers and comparison circuits. 24. The semiconductor integrated circuit according to claim 12, wherein the parallel comparison means is configured using a plurality of combinations of registers and comparison circuits, and these are integrated on the same integrated circuit. circuit. 25. The symbol string search device according to claim 11, wherein a partial symbol string of each search symbol string set in the parallel matching means is provided with a valid flag register that indicates whether it is valid or invalid at least for each symbol at the time of matching. , further comprising means for setting or resetting arbitrary configuration bits of the valid flag register, which refers to the valid flag register during verification, and corresponds to the portion where the configuration bits of the valid flag register are in the set state. Make the symbols in the subsymbol string valid when matching with the searched symbol string, and make the symbols in the subsymbol string corresponding to the part in the reset state invalid when matching with the searched symbol string. A symbol string search device characterized in that it is possible to set a don't care at any position of the partial symbol string. 26. The semiconductor integrated circuit according to claim 12, wherein a partial symbol string of each search symbol string set in the parallel matching means is provided with a valid flag register that indicates whether the symbol is valid or invalid at least for each symbol during matching; Furthermore, it has a means for setting or resetting arbitrary constituent bits of the valid flag register, and refers to the valid flag register during verification, and sets the constituent bits of the valid flag register to the part corresponding to the set state. Make the symbols in the symbol string valid when matching with the searched symbol string, and make the symbols in the partial symbol string corresponding to the part in the reset state invalid when matching with the searched symbol string. A semiconductor integrated circuit characterized in that it is possible to set a don't care at any position of the partial symbol string. 27. In the symbol string search device according to claim 11, in the partial symbol string of each search symbol string set in the parallel matching means, is the set symbol string valid as it is, or is a symbol string other than the set symbol string A negation condition flag register is provided to indicate at least for each symbol whether all symbol strings of The negative condition flag register is referred to, and the symbols in the partial symbol string corresponding to the part where the constituent bits of the negative condition flag register are in the set state are kept valid when matching with the searched symbol string, and are set in the reset state. By assuming that all symbols other than the symbol in the substring that corresponds to the part to be searched are valid when matching with the searched symbol string, a negation condition can be placed at any position in the substring. A symbol string search device characterized in that it is possible to set. 28. In the semiconductor integrated circuit according to claim 12, in the partial symbol string of each search symbol string set in the parallel matching means, is the set symbol string valid as it is, or is a symbol string other than the set symbol string valid? A negation condition flag register is provided that indicates whether all symbol strings are valid at least for each symbol, and further includes means for setting or resetting arbitrary constituent bits of the negation condition flag register, and the negation is performed at the time of verification. By referring to the condition flag register, the symbols in the partial symbol string corresponding to the part where the constituent bits of the negative condition flag register are in the set state are kept valid when matching with the searched symbol string, and are in the reset state. By assuming that all symbols in a subsymbol string corresponding to a certain part are valid when matching with the searched symbol string, a negation condition can be placed at any position in the subsymbol string. A semiconductor integrated circuit characterized by being able to be configured. 29. The symbol string search device according to claim 25 or 27, comprising means for receiving an external command for setting data in any valid flag register or negative condition flag register, and converting the received command into a control signal and setting data. What is claimed is: 1. A symbol string search device, characterized in that it has means for converting into a symbol string, and is capable of setting a valid flag register and a negative condition flag register in a parallel comparator by inputting a command from the outside. 30. The semiconductor integrated circuit according to claim 26 or 28, comprising means for receiving an external command for setting data in any valid flag register or negative condition flag register, and converting the received command into a control signal and setting data. 1. A semiconductor integrated circuit, comprising means for converting, and a valid flag register and a negative condition flag register in a parallel comparator can be set by inputting an external command. 31. The symbol string search device according to claim 25 or 29, wherein when the parallel matching means is set to be don't care for all the symbols in the partial symbol string of the search symbol string, the parallel matching means 1. A symbol string search device characterized in that a symbol string search device is provided with a means for determining whether or not the symbols do not match. 32. The semiconductor integrated circuit according to claim 26 or 30, wherein when the parallel matching means is set to be don't care for all the symbols in the partial symbol string of the search symbol string, the parallel matching means A semiconductor integrated circuit characterized in that means for determining a mismatch is integrated on the same integrated circuit. 33. In the symbol string search device according to claim 11, as a result of matching a plurality of search symbol strings set in the parallel matching means with the searched symbol string, all of the set search symbol strings meet the search condition. 1. A symbol string retrieval device characterized in that the symbol string search device is provided with a means for detecting this when the condition is not satisfied. 34. The semiconductor integrated circuit according to claim 12, as a result of matching the plurality of search symbol strings set in the parallel matching means with the searched symbol string, all of the set search symbol strings meet the search condition. A semiconductor integrated circuit characterized in that means for detecting the unsatisfied condition is integrated on the same integrated circuit. 35. In the symbol string search device according to claim 11, as a result of matching a plurality of search symbol strings set in the parallel matching means with the searched symbol string, at least one of the set search symbol strings is searched. 1. A symbol string search device characterized by comprising means for detecting when a condition is satisfied. 36. The semiconductor integrated circuit according to claim 12, as a result of matching a plurality of search symbol strings set in the parallel matching means with a searched symbol string, at least one of the set search symbol strings meets the search condition. 1. A semiconductor integrated circuit characterized in that a means for detecting this is integrated on the same integrated circuit. 37. The symbol string search device according to claim 27 or 29, wherein as a result of matching a plurality of search symbol strings set in the parallel matching means with a searched symbol string, at least one of the set search symbol strings is 1. A symbol string search device, comprising means for detecting when the search condition satisfies a search condition and the search condition includes a negative condition setting. 38. The semiconductor integrated circuit according to claim 28 or 30, wherein as a result of matching a plurality of search symbol strings set in the parallel matching means with a searched symbol string, at least one of the set search symbol strings is 1. A semiconductor integrated circuit characterized in that means for detecting when a search condition is satisfied and the search condition includes a negative condition setting is integrated on the same integrated circuit. 39. The symbol string search device according to claim 11, further comprising: (n) storing information to be added to the search result as part of the search result when the search result is output from the finite automaton execution means (i). (o) means for setting the contents of the additional information storage means (n); and the output buffering means (m) for holding the search results.
) A symbol string search device characterized in that it is configured to be able to add information that can be arbitrarily set in advance to the search results outputted to the search results. 40. The semiconductor integrated circuit according to claim 12, further comprising: (n) an addition for storing information to be added to the search result as part of the search result when the search result is output from the finite automaton execution means (i). information storage means (o) means for setting the contents of the additional information storage means (n), integrated on the same integrated circuit, and the output buffering means (m) for holding the search results;
) A semiconductor integrated circuit characterized in that the semiconductor integrated circuit is configured such that information that can be arbitrarily set in advance can be added to the search results outputted in the search results. 41. The semiconductor integrated circuit according to claim 12, wherein the parallel matching means integrated on the integrated circuit has a partial symbol string storage means, a valid flag register, and a negative condition flag register, and a partial symbol string setting A semiconductor characterized in that at least two of the following input ports are shared: an input port for setting a valid flag register, an input port for setting a negative condition flag register, and an input port for a symbol string to be searched. integrated circuit.
JP1268927A 1989-06-15 1989-10-18 Symbol string search method and search device Expired - Fee Related JP2880199B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP1268927A JP2880199B2 (en) 1989-10-18 1989-10-18 Symbol string search method and search device
US08/349,124 US5452451A (en) 1989-06-15 1994-12-01 System for plural-string search with a parallel collation of a first partition of each string followed by finite automata matching of second partitions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1268927A JP2880199B2 (en) 1989-10-18 1989-10-18 Symbol string search method and search device

Publications (2)

Publication Number Publication Date
JPH03131969A true JPH03131969A (en) 1991-06-05
JP2880199B2 JP2880199B2 (en) 1999-04-05

Family

ID=17465214

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1268927A Expired - Fee Related JP2880199B2 (en) 1989-06-15 1989-10-18 Symbol string search method and search device

Country Status (1)

Country Link
JP (1) JP2880199B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6338061B1 (en) 1998-01-14 2002-01-08 Nec Corporation Search method search apparatus, and recording medium recording program
JP2006519445A (en) * 2003-03-03 2006-08-24 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ String search method and equipment
US7133472B2 (en) 2000-05-12 2006-11-07 Nec Corporation High-speed turbo decoder
JP2007537626A (en) * 2004-04-19 2007-12-20 ザ・リージェンツ・オブ・ザ・ユニバーシティ・オブ・カリフォルニア Programmable hardware for deep packet filtering
WO2009093307A1 (en) * 2008-01-22 2009-07-30 Fujitsu Limited Retrieval device and retrieval method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6338061B1 (en) 1998-01-14 2002-01-08 Nec Corporation Search method search apparatus, and recording medium recording program
US7133472B2 (en) 2000-05-12 2006-11-07 Nec Corporation High-speed turbo decoder
JP2006519445A (en) * 2003-03-03 2006-08-24 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ String search method and equipment
JP2007537626A (en) * 2004-04-19 2007-12-20 ザ・リージェンツ・オブ・ザ・ユニバーシティ・オブ・カリフォルニア Programmable hardware for deep packet filtering
JP4755175B2 (en) * 2004-04-19 2011-08-24 ザ・リージェンツ・オブ・ザ・ユニバーシティ・オブ・カリフォルニア Programmable hardware for deep packet filtering
WO2009093307A1 (en) * 2008-01-22 2009-07-30 Fujitsu Limited Retrieval device and retrieval method
JP5071486B2 (en) * 2008-01-22 2012-11-14 富士通株式会社 Search device and search method

Also Published As

Publication number Publication date
JP2880199B2 (en) 1999-04-05

Similar Documents

Publication Publication Date Title
US5452451A (en) System for plural-string search with a parallel collation of a first partition of each string followed by finite automata matching of second partitions
CA2007168C (en) Variable length string matcher
CN107608750B (en) Device for pattern recognition
US5440753A (en) Variable length string matcher
US7805427B1 (en) Integrated search engine devices that support multi-way search trees having multi-column nodes
JPS63311530A (en) string search device
JP2011511366A (en) Data retrieval and indexing method and system for implementing the same
US11977902B2 (en) Methods and systems for event reporting
JP2986865B2 (en) Data search method and device
US6470334B1 (en) Document retrieval apparatus
JP3213244B2 (en) Data compression method and data processing system
JPH04293161A (en) Method and device for retrieving document
JPH03131969A (en) Method and device for retrieving code string
US5519860A (en) Central processor index sort followed by direct record sort and write by an intelligent control unit
JP2825009B2 (en) Symbol string search method and apparatus
JPH03129521A (en) Stabilizing sorting of sorting accelerator
JP3141428B2 (en) Numerical value search apparatus and method
JPH04308B2 (en)
JP2880192B2 (en) Character string search method and apparatus
US20210224240A1 (en) Augmentation to the succinct trie for multi-segment keys
US8219538B2 (en) Search device and search method
JP7475078B2 (en) Full-Text Search Processor
JPH04169973A (en) Symbol string search method and device
WO2023210643A1 (en) Full-text search processor
JPS63187334A (en) Character-string pattern matching device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载