JP2007233554A - Search method of high-speed pattern matching device - Google Patents

Search method of high-speed pattern matching device Download PDF

Info

Publication number
JP2007233554A
JP2007233554A JP2006052500A JP2006052500A JP2007233554A JP 2007233554 A JP2007233554 A JP 2007233554A JP 2006052500 A JP2006052500 A JP 2006052500A JP 2006052500 A JP2006052500 A JP 2006052500A JP 2007233554 A JP2007233554 A JP 2007233554A
Authority
JP
Japan
Prior art keywords
search
area
key
partial
search area
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
JP2006052500A
Other languages
Japanese (ja)
Other versions
JP5309354B2 (en
Inventor
Kenji Toda
賢二 戸田
Toshihiro Katashita
敏宏 片下
Kazumi Sakamaki
佳壽美 坂巻
Takeshi Inui
剛 乾
Tadamasa Takayama
匡正 高山
Yasunori Terajima
康典 寺島
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.)
National Institute of Advanced Industrial Science and Technology AIST
BITS Co Ltd
Tokyo Metropolitan Industrial Technology Research Instititute (TIRI)
Original Assignee
National Institute of Advanced Industrial Science and Technology AIST
BITS Co Ltd
Tokyo Metropolitan Industrial Technology Research Instititute (TIRI)
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 National Institute of Advanced Industrial Science and Technology AIST, BITS Co Ltd, Tokyo Metropolitan Industrial Technology Research Instititute (TIRI) filed Critical National Institute of Advanced Industrial Science and Technology AIST
Priority to JP2006052500A priority Critical patent/JP5309354B2/en
Publication of JP2007233554A publication Critical patent/JP2007233554A/en
Application granted granted Critical
Publication of JP5309354B2 publication Critical patent/JP5309354B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To realize a device to perform pattern matching of binary data at high speed. <P>SOLUTION: A search method of a search device comprising a storage means (B) storing a search area (B); a search means (B) searching a search area (B) by means of a search key; a storage means (A) storing a search area (A); and a search means (A) searching a partial search area (C) selected from the area (A) by means of the search key when the area (A) is divided into a plurality of partial search areas, and sets a group of each representative point of the partial search area as the area (B) in searching the area (A) by means of an inputted search key, comprises a step of selecting one of the plurality of partial search areas on the basis of the search result of the area (B) by means of the search key; a step of searching the selected partial search area with respect to the search key by using the means A; and a step of outputting the search result. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

この発明は、バイナリデータのパターンマッチングを高速に行う高速パターンマッチング装置の探索方法に関している。   The present invention relates to a search method for a high-speed pattern matching device that performs pattern matching of binary data at high speed.

本発明は、従来のものに比べて高速で動作するパターンマッチング装置に関するものであるが、従来の速度で動作するものは、種々の装置に組み込まれて用いられている。例えば、コンピュ−タ上でデータの照合を行って目的とするデータを検索するデータベ−スには、種々のパターンマッチング技術が使われている。ここで用いられるパターンマッチングには、逐次探索(順探索あるいはリニアサーチとも呼ばれる)、ハッシュ法、2分木探索(2分探索あるいはバイナリサーチとも呼ばれる)などがある。   The present invention relates to a pattern matching apparatus that operates at a higher speed than conventional ones, but those that operate at conventional speeds are incorporated and used in various apparatuses. For example, various pattern matching techniques are used in a database for searching for target data by collating data on a computer. The pattern matching used here includes sequential search (also called forward search or linear search), hash method, binary tree search (also called binary search or binary search), and the like.

逐次探索は、探索領域のデータとサーチキーとの照合を順次進めるものであり、探索時間のサーチキー依存が激しく、また平均探索時間が長い、という特徴がある。   Sequential search is a method of sequentially collating data in a search area with a search key, and is characterized in that the search time depends heavily on the search key and the average search time is long.

また、ハッシュ法は、探索領域のそれぞれのデータのハッシュ値を求めてハッシュテ−ブルを作成し、ハッシュ値にそれぞれのデータを連想するように対応させておくものであり、サーチキーのハッシュ値を入力して探索データを出力するように関数を作成しておく。このため短時間での探索が可能であるという利点があるが、探索領域(ア−カイブ)を変化させるためには、ハッシュ法に用いるハッシュテ−ブルを作り直す必要があり、大規模の探索領域を頻繁に変えるための処理に多大の時間が必要である、という特徴がある。   In addition, the hash method is to obtain a hash value of each data in the search area and create a hash table, and associate the hash value of the search key with the hash value in association with each data. Create a function to input and output search data. For this reason, there is an advantage that the search can be performed in a short time. However, in order to change the search area (archive), it is necessary to re-create the hash table used in the hash method. It is characterized in that it takes a lot of time for the processing to change frequently.

また、2分木探索は、探索領域をソートしておき、サーチキーと探索領域の代表点のデータ(多くの場合は、中央のデータ)との大小一致比較で新たな探索領域に絞り込み、その新たな探索領域でも、新たな代表点を選択して、その代表点とサーチキーとの大小一致比較によって、さらに新たな探索領域に絞り込む、という作業を繰り返して、探索するものである。この方法による探索時間は上記の2つの探索方法の中間的なものであり、大規模の探索領域を行なう場合でも、逐次探索の場合と同様な準備で探索を開始できる、という特徴がある。   In the binary tree search, the search area is sorted, and a new search area is narrowed down by comparing the search key with the representative point data of the search area (in many cases, the center data). Even in a new search area, a search is performed by selecting a new representative point and further narrowing down to a new search area by comparing the size of the representative point with the search key. The search time according to this method is intermediate between the above two search methods, and is characterized in that even when a large-scale search region is performed, the search can be started with the same preparation as in the case of sequential search.

高速探索が必要な大規模探索領域としては、例えば、情報通信ネットワークにおいて、有害情報の除去などのためのフィルタリングや顧客情報の検索などの際の探索領域である。ネットワークは、ますます高速化複雑化するため、これに対応できる強力なパターンマッチング装置の開発が求められている。   The large-scale search area that requires high-speed search is, for example, a search area for filtering for removing harmful information or searching for customer information in an information communication network. As networks become faster and more complex, there is a need to develop powerful pattern matching devices that can handle this.

本発明は、主に上記の2分木探索に関しており、同等の回路を用いる場合に、従来よりも高速の探索を可能ならしめるものである。   The present invention mainly relates to the binary tree search described above. When an equivalent circuit is used, the search can be performed at a higher speed than the conventional one.

[従来例1]
図5(a)に示す様に、d1からd15まで昇順にソートされた探索領域について、2分木探索を行なう場合を図5(b)に沿って示す。探索領域のデータ数が極端に少ないのは、説明を容易にして誤解を避けるためであって、実際に適用する探索領域は、さらに多数のデータを含む領域である。サーチキーの入力があると、これと中央にあるd8とを比較する。この比較で、サーチキーとの一致あるいは大小関係を出力する。一致する場合は、d8と一致する旨出力する。ここでは、d8より大きいという結果であったとすると、あらたにd9からd15までを新たな探索領域とすることになるので、その中央にあるd12とサーチキーとを比較することになる。また、ここでは、d12より小さいという結果であったとすると、あらたにd9からd11までを新たな探索領域とすることになるので、その中央にあるd10とサーチキーとを比較することになる。さらに、ここでは、d10より小さいという結果であったとすると、最後にd9だけが残ることになるので、d9とサーチキーとが一致するかどうかを確かめることになる。この操作によって、探索領域にサーチキーがあるかどうかを知ることが出来る。このようにデータ数が15の探索領域であっても、3回の大小一致比較で最終的な候補に絞ることができる。この操作はひとつの比較手段をプログラムに従って動作させて2分木探索を行なっている。
[Conventional example 1]
As shown in FIG. 5A, a case where a binary tree search is performed on the search area sorted in ascending order from d1 to d15 is shown along FIG. The reason why the number of data in the search area is extremely small is to facilitate explanation and avoid misunderstanding, and the search area to be actually applied is an area including a larger number of data. When a search key is input, it is compared with d8 at the center. In this comparison, a match with the search key or a magnitude relationship is output. If they match, it outputs that they match d8. Here, if the result is larger than d8, d9 to d15 are newly set as a new search area, so d12 at the center is compared with the search key. Here, if the result is smaller than d12, a new search area is newly set from d9 to d11, so the d10 at the center is compared with the search key. Further, here, if the result is smaller than d10, only d9 remains at the end, so it is confirmed whether or not d9 matches the search key. By this operation, it is possible to know whether or not there is a search key in the search area. In this way, even in a search region with 15 data, it is possible to narrow down to final candidates by performing three magnitude comparisons. In this operation, a binary tree search is performed by operating one comparison means according to a program.

しかし、比較的大きな探索領域に従来の2分木探索を適用する場合には、その探索領域を構成する記憶装置が大容量のものとなり、一般に大容量の記憶装置でのデータアクセス時間や読み出し時間は比較的大きいので、高速動作には適しておらず、充分に高速にパターンマッチングを進めることができないという問題があった。   However, when the conventional binary tree search is applied to a relatively large search area, the storage device constituting the search area has a large capacity, and generally the data access time and read time in the large capacity storage device Is relatively large and is not suitable for high-speed operation, and there is a problem that pattern matching cannot be performed at a sufficiently high speed.

本発明は、高速な2分木探索を実現するものである。   The present invention realizes a high-speed binary tree search.

この発明によって、大規模な探索領域に対しても、同等の速度の電子回路を用いる場合に、従来よりも高速の探索が可能になる。   According to the present invention, even when a large-scale search region is used, when an electronic circuit having an equivalent speed is used, a search can be performed at a higher speed than in the past.

本発明は、大略では、探索領域とサーチキーが与えられたときに、探索領域の個々の要素を記憶装置に記憶させ、この要素を比較手段である比較回路に読み出してサーチキーとの照合を行なって探索を進める際に、従来の様にひとつの記憶装置を用いて探索を行なうのではなく、大まかな探索を高速な探索手段を用いて行い、徐々に大容量の記憶装置でのより詳しい探索へと進むものである。より詳しくは、以下に示す。   In general, when a search area and a search key are given, the present invention stores each element of the search area in a storage device, reads the element into a comparison circuit as a comparison means, and compares it with the search key. When performing a search by performing a search, instead of searching using a single storage device as in the past, a rough search is performed using high-speed search means, and gradually more detailed information on a large-capacity storage device Proceed to search. More details are shown below.

まず本発明は、予め決められた探索領域Aを入力されたサーチキーについて探索する場合に、前記の探索領域Aを複数の部分探索領域に分割し、前記の部分探索領域のそれぞれの代表点の集合をあらたな探索領域Bとするとき、
前記のあらたな探索領域Bを記憶する記憶手段Bと、前記のあらたな探索領域Bを上記のサーチキーについて探索する探索手段Bと、
前記の予め決められた探索領域Aを記憶する記憶手段Aと、前記の予め決められた探索領域Aから選択された部分探索領域Cを上記のサーチキーについて探索する探索手段Aと、を備えるパターンマッチング装置の探索方法であって、
前記のあらたな探索領域Bを上記のサーチキーについて探索した結果をもとに、上記の複数の部分探索領域から1つを選択してこれを部分探索領域Cとするとき、
選択された部分探索領域Cについて上記の探索手段Aを用いて上記のサーチキーについて探索するステップと、
探索結果を出力するステップと、
を備えることを特徴としている。
First, the present invention divides the search area A into a plurality of partial search areas when a predetermined search area A is searched for the input search key, and each representative point of the partial search area is divided into a plurality of partial search areas. When the set is a new search area B,
Storage means B for storing the new search area B; search means B for searching the new search area B for the search key;
A pattern comprising: storage means A for storing the predetermined search area A; and search means A for searching the partial search area C selected from the predetermined search area A for the search key. A search method for a matching device,
When selecting one of the plurality of partial search areas based on the search result of the new search area B for the search key and setting it as the partial search area C,
Searching for the search key using the search means A for the selected partial search region C;
Outputting search results; and
It is characterized by having.

上記の探索領域Aは、探索領域Aを含む探索領域から、何らかの選択方法により予め選択された探索領域であってもよい。   The search area A may be a search area selected in advance from a search area including the search area A by some selection method.

また、探索手段Aと探索手段Bとは、同じ周期で探索をおこない、
探索手段Bは、上記のサーチキーについての探索を探索領域Bで行い、引き続き新たなサーチキーについての探索を探索領域Bで行うものであり、
探索手段Aは、探索手段Bが上記のサーチキーにつての探索を終了した後、上記のサーチキーにつての探索を部分探索領域Cで行い、引き続き上記の新たなサーチキーについての探索を部分探索領域Cで行うようにして、次々に新しいサーチキーで探索を行なうことが出来る。
Search means A and search means B perform a search at the same cycle,
The search means B performs a search for the search key in the search area B, and continues to search for a new search key in the search area B.
After the search means B ends the search for the search key, the search means A performs a search for the search key in the partial search area C, and continues to search for the new search key in a partial manner. As in the search area C, it is possible to search with new search keys one after another.

探索手段A、Bは2分探索を用いた探索手段であり、探索領域Bにおいてサーチキーとの比較を1度行なう探索時間あるいはその平均を探索時間Bとし、部分探索領域Cにおいてサーチキーとの比較を1度行なう探索時間あるいはその平均を探索時間Aとし、サーチキーとの比較を1度行なう毎に加算する探索回数をそれぞれ探索回数A、Bとするとき、
探索時間の大きい方の探索回数を小さく設定することによって、一連の探索に要する時間を短縮することが出来る。
Search means A and B are search means using a binary search. The search time for comparing with the search key once in search area B or the average thereof is set as search time B. When the search time for performing the comparison once or the average thereof is set as search time A, and the number of searches to be added every time the comparison with the search key is performed is set as the search times A and B, respectively.
The time required for a series of searches can be shortened by setting a smaller number of searches for the longer search time.

前記の場合に、探索回数Aと探索回数Bとの和をKとするとき、探索領域Aを2分探索する場合には、探索回数A、Bの割り振り方にはKの値は依存しない。このとき、探索回数Bは、K×探索時間Aを、探索時間Aと探索時間Bとの和で除した数に最も近い整数とすると、探索手段A、Bの一方のみに負担がかかることを回避できる。   In the above case, when the sum of the number of searches A and the number of searches B is K, when the search area A is searched in a binary manner, the value of K does not depend on how the search times A and B are allocated. At this time, if the number of searches B is an integer closest to K × search time A divided by the sum of search time A and search time B, only one of search means A and B is burdened. Can be avoided.

また、上記の探索方法は、3層以上の多層構成とすることも可能であり、
第1の記憶装置に記憶され予め決められた第1の探索領域を入力されたサーチキーについて探索する場合に、
前記の第1の探索領域を複数の部分探索領域に分割し、前記の部分探索領域のそれぞれの代表点の集合を第2の記憶装置に記憶して第2の探索領域2とし、
以下順次に、3からNまでのnについて、
第(n−1)の記憶装置に記憶した前記の第(n−1)の探索領域を複数の部分探索領域に分割し、前記の部分探索領域のそれぞれの代表点の集合を第nの記憶装置に記憶して第nの探索領域とし、
第Nの探索領域を入力されたサーチキーについて第Nの探索手段を用いて2分木探索を行い、その探索結果をもとに、探索領域(N−1)の部分探索領域を選択し、
以下、順に、N−1から2までのnについて、
探索領域nを入力されたサーチキーについて第nの探索手段を用いて探索し、その探索結果をもとに、探索領域(n−1)の部分探索領域を選択し、
探索領域1の選択された部分探索領域についての探索を第1の探索手段で行なって探索結果を出力するものである。
In addition, the above search method can have a multi-layer structure of three or more layers.
When searching for the input search key in the first search area stored in the first storage device and determined in advance,
The first search area is divided into a plurality of partial search areas, a set of representative points of each of the partial search areas is stored in a second storage device as the second search area 2,
In the following, for n from 3 to N,
The (n-1) th search area stored in the (n-1) th storage device is divided into a plurality of partial search areas, and a set of representative points of each of the partial search areas is stored in the nth memory. Memorize it in the device as the nth search area,
A binary tree search is performed using the Nth search means for the search key input with the Nth search area, and a partial search area of the search area (N-1) is selected based on the search result,
In the following, in order from n-1 to n-2,
Search the search key n for the input search key using the n-th search means, and select a partial search region of the search region (n−1) based on the search result,
The search for the selected partial search area in the search area 1 is performed by the first search means, and the search result is output.

上記の探索方法が特に有効なのは、次の構成にそれを適用する場合であって、
2からNまでのnについて、
前記の探索領域(n−1)を複数の部分探索領域に分割し、前記の部分探索領域のそれぞれの代表点の集合をあらたな探索領域nとし、
1からNまでのnについて、
それぞれの探索領域nのすべての要素を記憶する記憶手段nと、前記探索領域nを探索する探索手段nとについて、
記憶手段nの記憶容量をc(n)とし、探索領域nの探索のスループットをb(n)とし、
サーチキーの入力レートは、一定であり、その入力レートのビットレートをb(input)とし、
探索領域のビットサイズをMとし、
探索手段nの行なう探索領域nに属する要素とサーチキーとの比較回数をp(n)と、
するとき、
c(1)>c(2)>・・・>c(N)、
b(1)<b(2)<・・・<b(N)、
b(n) / p(n) ≧ b(input)、かつ、
b(n) ≦ log2c(n)、
なる条件を満たし、
1からNまでのp(n)の和について、底を2としたMの対数、log2M、を切り上げた整数と等しくなるように、
1からNまでのnについて、
b(n)、c(n)、p(n)を定めた探索装置に、上記の探索方法を適用することが望ましい。
The above search method is particularly effective when it is applied to the following configuration:
For n from 2 to N,
The search area (n-1) is divided into a plurality of partial search areas, and a set of representative points of each of the partial search areas is defined as a new search area n.
For n from 1 to N,
About the storage means n which memorize | stores all the elements of each search area n, and the search means n which searches the said search area n,
The storage capacity of the storage means n is c (n), the search throughput of the search area n is b (n),
The search key input rate is constant, and the bit rate of the input rate is b (input)
The search area bit size is M,
P (n) represents the number of comparisons between the element belonging to the search area n performed by the search means n and the search key;
and when,
c (1)> c (2)>...> c (N),
b (1) <b (2) <... <b (N),
b (n) / p (n) ≧ b (input), and
b (n) ≦ log 2 c (n),
Meets the conditions
The sum of p (n) from 1 to N is equal to the logarithm of M with base 2 , log 2 M, rounded up.
For n from 1 to N,
It is desirable to apply the search method described above to a search device that defines b (n), c (n), and p (n).

以下にこの発明の実施の形態を詳細に説明するが、以下の説明においては、決められた探索領域についてサーチキーと比較するデータを代表点と呼ぶことにする。   Hereinafter, embodiments of the present invention will be described in detail. In the following description, data to be compared with a search key for a determined search area will be referred to as a representative point.

図1に示す例は、簡単のために図5と同じ探索領域についての探索を行なう場合を示している。図1の探索ブロック1では、2分木探索回路に3データ分のメモリが接続されている。第1次の2分木探索として、サーチキーの入力があると、これと中央にあるd8とを比較する。この比較で、サーチキーとの一致あるいは大小関係を出力する。一致する場合は、d8と一致する旨出力する。ここでは、d8より大きいという結果であったとすると、第2次の2分木探索として、あらたにd9からd15までを新たな探索領域とすることになるので、その中央にあるd12とサーチキーとを比較することになる。また、ここでは、d12より小さいという結果であったとすると、第3次の2分木探索として、あらたにd9からd11までを新たな探索領域とすることになるので、新たな探索領域は、d9からd11までの領域であることを探索ブロック2に伝える。   The example shown in FIG. 1 shows a case where a search is performed on the same search area as in FIG. 5 for simplicity. In the search block 1 of FIG. 1, a memory for three data is connected to the binary tree search circuit. When a search key is input as a first-order binary tree search, this is compared with d8 at the center. In this comparison, a match with the search key or a magnitude relationship is output. If they match, it outputs that they match d8. Here, if the result is larger than d8, since a new search area is newly set from d9 to d15 as the secondary binary tree search, d12 and the search key at the center of the search are newly set. Will be compared. Here, if the result is smaller than d12, a new search region is newly set from d9 to d11 as the third-order binary tree search. To the search block 2 that the region is from to d11.

探索ブロック2では、全ての探索領域のデータを備えているが、探索ブロック1で用いるデータを除いたものであってもよい。その中央にあるd10とサーチキーとを比較することになる。さらに、ここでは、d10より小さいという結果であったとすると、最後にd9だけが残ることになるので、d9を探索結果として出力してからd9とサーチキーとが一致するかどうかを確かめることになる。この操作によって、探索領域にサーチキーがあるかどうかを知ることが出来る。   The search block 2 includes data for all search areas, but may be data excluding data used in the search block 1. The d10 at the center is compared with the search key. Furthermore, here, if the result is smaller than d10, only d9 remains at the end. Therefore, after d9 is output as a search result, it is confirmed whether d9 and the search key match. . By this operation, it is possible to know whether or not there is a search key in the search area.

このような構成にすることによって、探索ブロック1では、探索回数を2回にすることができ、この2回の探索の後には、あらたにサーチキーを受け付けることが出来るようになり、スループットが向上する。また、ブロック1で用いるメモリ数は少数で良いので、消費電流が大きくても高速動作のメモリを用いても全体の消費電力の増加を僅かなものに抑えることが出来る。   By adopting such a configuration, the search block 1 can search twice, and after these two searches, a search key can be newly received and throughput is improved. To do. In addition, since the number of memories used in the block 1 may be small, an increase in the overall power consumption can be suppressed to a small amount even if a memory with high current consumption or a high-speed operation is used.

また、探索ブロック2では、探索回数は1回となるので、低速のメモリを用いてもよいことは明らかである。一般に高集積度のメモリや低消費電流のメモリは低速動作であるので、図5に示す従来例に低速メモリを用いた場合と比較して、低消費電流あるいは高速に、また、条件次第で低消費電流であって高速に探索を行なうことができる。   In search block 2, the number of searches is one, so it is obvious that a low-speed memory may be used. In general, a highly integrated memory or a low current consumption memory operates at a low speed. Therefore, compared with the case where a low speed memory is used in the conventional example shown in FIG. The current consumption can be searched at high speed.

探索領域を変えるには、よく知られた2分木探索で用いる代表点の決定方法に従って、探索ブロック1に蓄えるべきデータを用意することは容易である。つまり、従来の最初の代表点1つと第2の代表点の2つを選択する。このような選択は、図1に示す制御回路3が行なう。   In order to change the search area, it is easy to prepare data to be stored in the search block 1 in accordance with a well-known method for determining representative points used in binary tree search. In other words, the conventional first representative point and the second representative point are selected. Such selection is performed by the control circuit 3 shown in FIG.

より一般的には、図2に示す様にする。入力したサーチキーが探索領域にあるかどうかを見るために、探索ブロック4の探索結果をもとに探索領域を絞り込み、こうして絞り込まれた探索領域について探索ブロック5で探索を行なう。これと同様に、探索ブロック5の探索結果をもとに探索領域を絞り込み、こうして絞り込まれた探索領域について探索ブロック6で探索を行なう。探索領域−3は、探索すべきデータを全て保存しておく。探索ブロック4の探索領域−1には、探索領域−3のデータについて従来の2分木探索で探索する場合の最初の代表点から、予め決めた第K次の探索の2(K-1)個の代表点までの(2K−1)個のデータを保存する。また、探索ブロック5の探索領域には、第(K+1)次の探索の代表点から予め決めた第M次の探索の代表点までのデータを保存する。探索ブロック1の結果で探索ブロック5で探索すべき領域(探索領域−2)を決定する。また、探索ブロック5の結果で探索ブロック6で探索すべき領域(探索領域−3)を決定する。 More generally, as shown in FIG. In order to see whether or not the input search key is in the search area, the search area is narrowed down based on the search result of the search block 4, and the search block 5 is searched for the search area thus narrowed down. Similarly, the search area is narrowed down based on the search result of the search block 5, and the search block 6 searches for the search area thus narrowed down. The search area-3 stores all data to be searched. In the search area-1 of the search block 4, 2 (K-1) of the Kth- order search determined in advance from the first representative point when the data of the search area-3 is searched by the conventional binary tree search. Store (2 K -1) pieces of data up to the representative points. In the search area of the search block 5, data from the representative point of the (K + 1) -th search to the representative point of the M-th search determined in advance is stored. An area (search area-2) to be searched by the search block 5 is determined based on the result of the search block 1. Further, an area (search area-3) to be searched by the search block 6 is determined based on the result of the search block 5.

一般に第K次の探索に於いては、2K個の代表点が属するので、より後方の探索ブロックでより多くのデータを保存するためのメモリ数が必要である。このため、より前方の探索ブロックでより高速動作のメモリや探索回路を用いることが望ましい。しかし、サーチキーを順次送り込むには、それぞれの探索ブロックのスループットが等しいことが望ましく、またそのスループットが等しくなるように、それぞれの探索ブロックで行なう探索回数や探索回路の動作速度、あるいは探索領域用のメモリの動作速度を設定することが望ましい。 In general, in the K-th search, since 2 K representative points belong, the number of memories for storing more data in a later search block is required. For this reason, it is desirable to use a memory or a search circuit that operates at a higher speed in a forward search block. However, in order to send search keys sequentially, it is desirable that the throughput of each search block is equal, and the number of searches performed in each search block, the operation speed of the search circuit, or the search area It is desirable to set the operating speed of the memory.

上記の例では、複数回の2分木探索を行う探索ブロックを含んでいたが、それぞれの探索ブロックでの探索を1回に制限すると、さらに高速の2分木探索を実現することができる。このような探索は、動作速度の低い記憶装置を用いて、高速な探索を行なう場合に有効である。例えば、大容量の半導体集積回路で、低速な記憶回路のみを用いて高速な探索を行なう場合には、探索のスループットを改善する場合には多層階層の探索を行なうことになるが、多層化によってサーチキーが探索回路にある滞在時間は長くなる傾向にある。この実施例では、滞在時間を短くすることができるので、入力から出力までの時間を改善することができる。また、探索回路全体を本実施例のように、探索を1回に制限した回路のみで作る必要はなく、回路規模の増大を避けるために、探索初めの数段のブロックを本実施例の回路で作り、後段のブロックで大記憶容量の必要な部分では、上記の様な各ブロックごとに複数回の2分木探索を行なうようにしてもよい。   In the above example, a search block that performs a plurality of binary tree searches is included. However, if the search in each search block is limited to one time, a faster binary tree search can be realized. Such a search is effective when a high-speed search is performed using a storage device having a low operation speed. For example, in a large-capacity semiconductor integrated circuit, when a high-speed search is performed using only a low-speed memory circuit, a search for a multi-layer hierarchy is performed to improve the search throughput. The stay time in which the search key is in the search circuit tends to be long. In this embodiment, the dwell time can be shortened, so the time from input to output can be improved. Further, it is not necessary to make the entire search circuit only by a circuit in which the search is limited to one time as in this embodiment, and in order to avoid an increase in circuit scale, several blocks at the beginning of the search are arranged in the circuit of this embodiment. The binary tree search may be performed a plurality of times for each block as described above in the subsequent block where a large storage capacity is required.

図3にそれぞれの探索ブロックで2分木探索を1度のみ行なう場合の例を示す。この場合に想定する探索領域は、図5の場合と同様にd1からd15までの昇順にソートされた集合である。第1の探索ブロックでは、第1次の探索を行う。この場合の探索領域はS1である。まず、入力されたサーチキーとd8を大小一致の比較を行なう。ここでd8は、探索領域の中央にあるために2分木探索に用いているが、探索の能率が僅かに低下してよい場合は、必ずしも探索領域の中央に位置するデータを用いる必要はなく、それから少しはずれていてもよい。この事情は、通常の2分木探索と同様である。第1次の探索では、用いるデータは1つであるので、メモリも1つ用意する。この探索によって、d8と一致するか、あるいはd8に対する相対位置かが明らかになる。ここでは、d8に比べて大きいとすると、探索領域は、S2となる。   FIG. 3 shows an example in which a binary tree search is performed only once in each search block. The search area assumed in this case is a set sorted in ascending order from d1 to d15 as in the case of FIG. In the first search block, a first search is performed. The search area in this case is S1. First, the inputted search key and d8 are compared in magnitude. Here, d8 is used in the binary tree search because it is in the center of the search area. However, if the search efficiency may be slightly reduced, it is not always necessary to use data located in the center of the search area. , It may be slightly off. This situation is the same as in a normal binary tree search. In the first search, since one data is used, one memory is prepared. This search reveals whether it matches d8 or is relative to d8. Here, if it is larger than d8, the search area is S2.

つぎに、このS2について、第2次の探索を行なうが、そのためにサーチキーとd12との比較を行なう。この比較によって、探索領域が例えばS3に絞り込まれる。   Next, for this S2, a second search is performed. For this purpose, the search key is compared with d12. By this comparison, the search area is narrowed down to S3, for example.

さらに、このS3について、第3次の探索を行なうが、そのためにサーチキーとd10との比較を行なう。この比較によって、探索領域が例えばd9に絞り込まれる。最後にd9は入力されたサーチキーと比較され、一致しているかどうか確かめられる。   Further, for this S3, a third search is performed. For this purpose, the search key is compared with d10. By this comparison, the search area is narrowed down to d9, for example. Finally, d9 is compared with the input search key to check whether or not they match.

このような2分木探索の全体像を図4に示す。この図4は、例えば第1次の探索で、サーチキーとd8とを比較してサーチキーの方が大きければ、サーチキーとd12とを比較するル−トに進み、サーチキーの方が小さければサーチキーとd4とを比較するル−トに進む。また、サーチキーとd8とが一致する場合は、遅延器を通過して一致信号として出力する。ここで遅延器を通過させるのは、最後に絞り込まれたデータが出力される時期と一致させるためである。d4あるいはd12との比較以下では、これと同様にしてル−トを選択するものである。   An overview of such a binary tree search is shown in FIG. In FIG. 4, for example, in the first search, if the search key and d8 are compared and the search key is larger, the process proceeds to the route for comparing the search key and d12, and the search key is smaller. Then, the process proceeds to the route for comparing the search key with d4. If the search key matches d8, it passes through the delay device and is output as a match signal. The reason why the delay device is allowed to pass is to make it coincide with the time when the finally narrowed-down data is output. In comparison with d4 or d12, the route is selected in the same manner.

上記の実施例1あるいは2においては、大小一致を判定する比較回路としてプログラム制御の比較回路を用いることも可能であるが、実施例3の場合には、論理回路で構成された比較回路であることがその高速性の観点から望ましい。例えば図6(a)の論理回路は、図6(b)の論理式に相当する論理回路が組まれているものである。入力A、Bに1ビットの2進数が入力されると、Aが大きければ出力X=1となり、一致すればY=1となり、Bが大きければZ=1となる。   In the first or second embodiment, it is possible to use a program-controlled comparison circuit as a comparison circuit for determining a magnitude match, but in the case of the third embodiment, the comparison circuit is configured by a logic circuit. It is desirable from the viewpoint of high speed. For example, the logic circuit in FIG. 6A is a combination of logic circuits corresponding to the logic expression in FIG. When a 1-bit binary number is input to the inputs A and B, the output X = 1 if A is large, Y = 1 if they match, and Z = 1 if B is large.

次に、入力A、Bに図6(c)に示す多桁の2進数が入力される場合には、例えば図6(d)の回路で、Y1、X1あるいはZ1を調べることによって、A、B間の大あるいは小と一致とを判定することができる。図4のそれぞれの比較判定には、このような回路をそれぞれに配置する。このため、回路規模は大型になるが、探索速度は高速である。また、この実施例3の回路を、上記の実施例1あるいは2の第1次あるいは第2次の探索にのみ適用して、初段部で探索速度を高速化して、全体としては、回路規模の大型化を抑制することも可能である。   Next, when the multi-digit binary numbers shown in FIG. 6C are input to the inputs A and B, for example, by checking Y1, X1 or Z1 with the circuit of FIG. It is possible to determine whether the size of B is large or small and match. Such a circuit is arranged for each comparison determination in FIG. For this reason, the circuit scale becomes large, but the search speed is high. Further, the circuit of the third embodiment is applied only to the primary or second order search of the first or second embodiment, the search speed is increased at the first stage, and the circuit scale as a whole is increased. It is also possible to suppress an increase in size.

図7に示す様に、2分探索で探索領域Aを2層の2分探索で探索する場合を考える。よく知られているように、探索領域が決まると、探索回数Kが決まる。この際、探索領域Aを複数の部分探索領域に分割し、前記の部分探索領域のそれぞれの代表点の集合をあらたな探索領域Bとする。探索領域Bでは、入力されたサーチキーにもっとも近い代表点を探索して、探索領域Aのひとつの部分探索領域Cを指定する。つまり、K回の2分探索からm回を探索領域Bでの探索にあて、残りのK−m回を部分探索領域Cでの探索とする。また、探索領域Bに引き続いて探索領域Cの探索を行なう一方、同時に、探索領域Bでは、あらたなサーチキーを入力してあらたな探索を開始する。   As shown in FIG. 7, a case is considered in which search area A is searched by a binary search of two layers by a binary search. As is well known, when the search area is determined, the search count K is determined. At this time, the search area A is divided into a plurality of partial search areas, and a set of representative points of each of the partial search areas is defined as a new search area B. In the search area B, a representative point closest to the input search key is searched, and one partial search area C of the search area A is designated. That is, m searches from the K binary searches are performed in the search region B, and the remaining Km searches are performed in the partial search region C. The search area C is searched following the search area B. At the same time, in the search area B, a new search key is input to start a new search.

一般に、それぞれの探索領域は、記憶装置に設けられた特定の領域であり、2分探索手段は、論理回路やマイクロプログラムをもった論理回路である。また、探索領域Aは、探索領域Bよりも大容量である必要がある。ところが大容量の記憶装置は、一般に動作が遅いために、探索領域Cでの探索割合を大きくすると探索完了する時間が大きくなり、また、探索領域Bであらたな探索を始めるまでの待ち時間が大きくなることは容易に理解できる。   In general, each search area is a specific area provided in the storage device, and the binary search means is a logic circuit having a logic circuit or a microprogram. The search area A needs to have a larger capacity than the search area B. However, since a large-capacity storage device generally operates slowly, increasing the search rate in the search area C increases the time for completing the search, and increases the waiting time until a new search is started in the search area B. It can be easily understood.

このような場合に探索のスループットの最適条件を求める事が出来る。基礎となる条件として、図7に示す様に、探索領域B、Cでのそれぞれの探索回数をm、K−mとし、また、それぞれの探索時間をtB、tCとする。
このとき、ひとつのサーチキーについては、
経過時間=m×tB +(K−m)×tC
で探索が終了する。また、探索領域Bでの探索から探索領域Cでの探索に移るまでの時間として、m×tB以上必要である。また、探索領域Cについての探索を終了するためには、(K−m)×tC以上必要である。これは、あらたなサーチキーについて、探索領域Bでの探索から探索領域Cでの探索に移るまでに、満足しておく必要のある条件でもある。従って、探索領域B、Cを同じ周期で行なうには、その周期を、(m×tB、(K−m)×tC)のうちの大きいほうに設定する必要がある。
In such a case, the optimum search throughput condition can be obtained. As basic conditions, as shown in FIG. 7, the number of searches in search areas B and C is m and Km, and the search times are t B and t C , respectively.
At this time, for one search key,
Elapsed time = m × t B + (K−m) × t C ,
The search ends. In addition, the time from the search in the search area B to the search in the search area C needs to be m × t B or more. Further, in order to end the search for the search region C, (K−m) × t C or more is required. This is also a condition that must be satisfied for a new search key from the search in the search area B to the search in the search area C. Therefore, in order to perform the search areas B and C in the same cycle, it is necessary to set the cycle to the larger of (m × t B , (K−m) × t C ).

このように設定される周期を小さくすることで、探索のスループットを最適化できることは明らかである。図8は、これを説明する図であって、探索領域Bの探索回数を横軸に、また探索時間を縦軸にして、探索が終了するまでの滞在時間と、探索領域C、Bでのそれぞれの探索時間とを示す。上記の様に、探索領域A、Bを同じ周期で行なうには、周期は(m×tB、(K−m)×tC)の大きいほうで決まるので、図8の太実線Tでの最小点(S)の値を求めればよいことが分かる。これから求まるmは、
m=KtC/(tC+tB)、
であるが、mは整数である必要があることから、この値に最も近い整数を用いればよい事は明らかである。例えば、tCとtBとが等しいときには、それぞれ半分ずつで割り振ればよい。また、tC>>tBの場合には、殆どの探索を探索領域Bで処理するとよい。特に、tCがtBの(K−1)場合を超える場合には、探索領域Aでの探索は1度あるいはゼロにするのが望ましいことが分かる。
It is clear that the search throughput can be optimized by reducing the period set in this way. FIG. 8 is a diagram for explaining this, where the number of searches in the search area B is plotted on the horizontal axis and the search time is plotted on the vertical axis, the stay time until the search is completed, and the search areas C and B. Each search time is shown. As described above, in order to perform the search areas A and B in the same cycle, the cycle is determined by the larger of (m × t B , (K−m) × t C ), so It can be seen that the value of the minimum point (S) may be obtained. M to be obtained from now is
m = Kt C / (t C + t B ),
However, since m needs to be an integer, it is clear that an integer closest to this value may be used. For example, when t C and t B are equal, they may be allocated in half. In the case of t C >> t B, it is preferable to handle most of the search in the search area B. In particular, when t C exceeds the (K−1) case of t B , it can be seen that the search in the search region A is desirably set once or zero.

また、上記の説明では、tCあるいはtBは一定であるとしたが、一般には、記憶装置の特性から探索ごとに僅かに変動することが多い。このような場合には、tCあるいはtBとしては、それぞれの平均値を用いればよい。 In the above description, t C or t B is assumed to be constant. In general, however, the search often varies slightly from search to search due to the characteristics of the storage device. In such a case, the respective average values may be used as t C or t B.

また、上記では、2分探索を2層に分けて行なう場合を説明したが、さらに多層にすることによって、それぞれの層での探索回数をすくなくすることができるので、探索のスループットを改善することができる。この場合に探索回数の配分を変えてスループットを最適化するためには、多層に分けた引き続く2層に注目して、上記の取り扱いと同様にして最適化をはかることができる。   In the above description, the case where the binary search is divided into two layers has been described. However, by further increasing the number of layers, the number of searches in each layer can be reduced, thereby improving the search throughput. Can do. In this case, in order to optimize the throughput by changing the distribution of the number of searches, it is possible to focus on the subsequent two layers divided into multiple layers and perform the optimization in the same manner as the above handling.

また、多層の探索でスループットを改善するための最適化については、次のように進めることができる。まず、2からNまでのnについて、前記の探索領域(n−1)を複数の部分探索領域に分割し、前記の部分探索領域のそれぞれの代表点の集合をあらたな探索領域nとする。また、1からNまでのnについて、それぞれの探索領域nのすべての要素を記憶する記憶手段nと、前記探索領域nを探索する探索手段nとについて、記憶手段nの記憶容量をc(n)とし、探索領域nの探索のスループットをb(n)とする。さらに、サーチキーの入力レートは、一定であり、その入力レートのビットレートをb(input)とする。
探索領域のビットサイズをMとし、探索手段nの行なう探索領域nに属する要素とサーチキーとの比較回数をp(n)と、するとき、
c(1)>c(2)>・・・>c(N)、
b(1)<b(2)<・・・<b(N)、
b(n) / p(n) ≧ b(input)、
b(n) ≦ log2c(n)、
なる条件を満たし、
1からNまでのp(n)の和について、底を2としたMの対数を切り上げた整数と等しくなるように、1からNまでのnについて、b(n)、c(n)、p(n)を定める。このような多変数を用いた関数の最適化には、市販されたコンピュ−タプログラムがありそれを用いることができる。
Moreover, the optimization for improving the throughput in the multi-layer search can proceed as follows. First, for n from 2 to N, the search area (n-1) is divided into a plurality of partial search areas, and a set of representative points of the partial search areas is set as a new search area n. For n from 1 to N, the storage capacity of the storage means n for the storage means n for storing all the elements of each search area n and the search means n for searching the search area n is c (n ) And the search throughput of the search area n is b (n). Further, the input rate of the search key is constant, and the bit rate of the input rate is b (input).
When the bit size of the search area is M and the number of comparisons between the elements belonging to the search area n performed by the search means n and the search key is p (n),
c (1)> c (2)>...> c (N),
b (1) <b (2) <... <b (N),
b (n) / p (n) ≧ b (input),
b (n) ≦ log 2 c (n),
Meets the conditions
B (n), c (n), p for n from 1 to N so that the sum of p (n) from 1 to N is equal to an integer obtained by rounding up the logarithm of M with base 2 (N) is defined. There is a commercially available computer program for optimizing a function using such multivariables.

また、上記の実施例では、2分木探索を用いる方法について説明したが、大規模な探索領域を小規模な探索領域の処理の集合に変換することによって、ハッシュ法を用いることが困難でなくなる。特に上記の実施例の場合の初段の探索にハッシュ法を適用して初段部分を高速化することで、全体のスループットを改善することは容易である。   In the above-described embodiment, the method using the binary tree search has been described. However, it is not difficult to use the hash method by converting a large-scale search region into a set of small search region processes. . In particular, it is easy to improve the overall throughput by applying the hash method to the first-stage search in the above embodiment to speed up the first-stage portion.

本発明の探索方法を用いた高速パターンマッチング装置をインタ−ネット通信に適用することによって、パソコンや携帯電話などを含むあらゆるインタ−ネット通信機器からの有害URLへのアクセスを検出してそれをリアルタイムで防止することが低コストで可能になる。   By applying the high-speed pattern matching device using the search method of the present invention to Internet communication, it detects real-time access to harmful URLs from any Internet communication device including personal computers and mobile phones. Can be prevented at low cost.

第1の実施例を示すブロック図である。It is a block diagram which shows a 1st Example. 第2の実施例を示すブロック図である。It is a block diagram which shows a 2nd Example. 第3の実施例を示す模式図である。It is a schematic diagram which shows a 3rd Example. それぞれの探索ブロックでの探索を1回にして高速の2文探索を実現する例を示すブロック図である。It is a block diagram which shows the example which implement | achieves a high-speed 2 sentence search by making the search in each search block once. 従来の2分木探索法を示す模式図である。It is a schematic diagram which shows the conventional binary tree search method. 論理回路で構成された比較回路例を示すブロック図である。It is a block diagram which shows the example of a comparison circuit comprised by the logic circuit. 2分探索で探索領域Aを2層の2分探索で探索する場合を示すブロック図である。It is a block diagram which shows the case where search area A is searched by the binary search of 2 layers by a binary search. 探索回数を横軸、探索時間を縦軸にして、探索が終了するまでの時間と、それぞれの探索領域での探索時間とを示す図である。It is a figure which shows the time until a search is complete | finished and the search time in each search area | region by making a search frequency into a horizontal axis and a search time as a vertical axis | shaft.

符号の説明Explanation of symbols

1、2 探索ブロック
3 制御回路
4、5、6 探索ブロック
1, 2 Search block 3 Control circuit 4, 5, 6 Search block

Claims (7)

予め決められた探索領域Aを入力されたサーチキーについて探索する場合に、前記の探索領域Aを複数の部分探索領域に分割し、前記の部分探索領域のそれぞれの代表点の集合をあらたな探索領域Bとするとき、
前記のあらたな探索領域Bを記憶する記憶手段Bと、前記のあらたな探索領域Bを上記のサーチキーについて探索する探索手段Bと、
前記の予め決められた探索領域Aを記憶する記憶手段Aと、前記の予め決められた探索領域Aから選択された部分探索領域Cを上記のサーチキーについて探索する探索手段Aと、を備えるパターンマッチング装置の探索方法であって、
前記のあらたな探索領域Bを上記のサーチキーについて探索した結果をもとに、上記の複数の部分探索領域から1つを選択してこれを部分探索領域Cとするとき、
選択された部分探索領域Cについて上記の探索手段Aを用いて上記のサーチキーについて探索するステップと、
探索結果を出力するステップと、
を備えることを特徴とする探索方法。
When searching for a predetermined search area A for the input search key, the search area A is divided into a plurality of partial search areas, and a set of representative points for each of the partial search areas is newly searched. When region B is assumed,
Storage means B for storing the new search area B; search means B for searching the new search area B for the search key;
A pattern comprising: storage means A for storing the predetermined search area A; and search means A for searching the partial search area C selected from the predetermined search area A for the search key. A search method for a matching device,
When selecting one of the plurality of partial search areas based on the search result of the new search area B for the search key and setting it as the partial search area C,
Searching for the search key using the search means A for the selected partial search region C;
Outputting search results; and
A search method comprising:
探索領域Aは、探索領域Aを含む探索領域から、何らかの選択方法により予め選択された探索領域であることを特徴とする請求項1に記載の探索方法。   The search method according to claim 1, wherein the search region A is a search region previously selected from a search region including the search region A by some selection method. 探索手段Aと探索手段Bとは、同じ周期で探索をおこない、
探索手段Bは、上記のサーチキーについての探索を探索領域Bで行い、引き続き新たなサーチキーについての探索を探索領域Bで行うものであり、
探索手段Aは、探索手段Bが上記のサーチキーにつての探索を終了した後、上記のサーチキーにつての探索を部分探索領域Cで行い、引き続き上記の新たなサーチキーについての探索を部分探索領域Cで行うことを特徴とする請求項1に記載の探索方法。
Search means A and search means B search in the same cycle,
The search means B performs a search for the search key in the search area B, and continues to search for a new search key in the search area B.
After the search means B ends the search for the search key, the search means A performs a search for the search key in the partial search area C, and continues to search for the new search key in a partial manner. The search method according to claim 1, wherein the search method is performed in the search area C.
探索手段A、Bは2分探索を用いた探索手段であり、探索領域Bにおいてサーチキーとの比較を1度行なう探索時間あるいはその平均を探索時間Bとし、部分探索領域Cにおいてサーチキーとの比較を1度行なう探索時間あるいはその平均を探索時間Aとし、サーチキーとの比較を1度行なう毎に加算する探索回数をそれぞれ探索回数B、Aとするとき、
探索時間の大きい方の探索回数を小さく設定することを特徴とする請求項1、2あるいは3に記載の探索方法。
Search means A and B are search means using a binary search. The search time for comparing with the search key once in search area B or the average thereof is set as search time B. When the search time for performing the comparison once or the average thereof is set as search time A, and the number of searches to be added every time the comparison with the search key is performed is set as the search times B and A, respectively.
4. The search method according to claim 1, wherein the number of searches with a longer search time is set smaller.
探索回数Aと探索回数Bとの和をKとするとき、
探索回数Bは、Kと探索時間Aとの積を、探索時間Aと探索時間Bとの和で除した数に最も近い整数とすることを特徴とする請求項4に記載の探索方法。
When the sum of the number of searches A and the number of searches B is K,
5. The search method according to claim 4, wherein the search count B is an integer closest to a number obtained by dividing the product of K and the search time A by the sum of the search time A and the search time B.
第1の記憶装置に記憶され予め決められた第1の探索領域を入力されたサーチキーについて探索する場合に、
前記の第1の探索領域を複数の部分探索領域に分割し、前記の部分探索領域のそれぞれの代表点の集合を第2の記憶装置に記憶して第2の探索領域2とし、
以下順次に、3からNまでのnについて、
第(n−1)の記憶装置に記憶した前記の第(n−1)の探索領域を複数の部分探索領域に分割し、前記の部分探索領域のそれぞれの代表点の集合を第nの記憶装置に記憶して第nの探索領域とし、
第Nの探索領域を入力されたサーチキーについて第Nの探索手段を用いて2分木探索を行い、その探索結果をもとに、探索領域(N−1)の部分探索領域を選択し、
以下、順に、N−1から2までのnについて、
探索領域nを入力されたサーチキーについて第nの探索手段を用いて探索し、その探索結果をもとに、探索領域(n−1)の部分探索領域を選択し、
探索領域1の選択された部分探索領域についての探索を第1の探索手段で行なって探索結果を出力することを特徴とする探索方法。
When searching for the input search key in the first search area stored in the first storage device and determined in advance,
The first search area is divided into a plurality of partial search areas, a set of representative points of each of the partial search areas is stored in a second storage device as the second search area 2,
In the following, for n from 3 to N,
The (n-1) th search area stored in the (n-1) th storage device is divided into a plurality of partial search areas, and a set of representative points of each of the partial search areas is stored in the nth memory. Memorize it in the device as the nth search area,
A binary tree search is performed using the Nth search means for the search key input with the Nth search area, and a partial search area of the search area (N-1) is selected based on the search result,
In the following, in order from n-1 to n-2,
Search the search key n for the input search key using the n-th search means, and select a partial search region of the search region (n−1) based on the search result,
A search method, characterized in that a search for a selected partial search region of the search region 1 is performed by a first search means and a search result is output.
請求項6に記載の探索方法であって、
2からNまでのnについて、
前記の探索領域(n−1)を複数の部分探索領域に分割し、前記の部分探索領域のそれぞれの代表点の集合をあらたな探索領域nとし、
1からNまでのnについて、
それぞれの探索領域nのすべての要素を記憶する記憶手段nと、前記探索領域nを探索する探索手段nとについて、
記憶手段nの記憶容量をc(n)とし、探索領域nの探索のスループットをb(n)とし、
サーチキーの入力レートは一定であり、その入力レートのビットレートをb(input)とし、
探索領域のビットサイズをMとし、
探索手段nの行なう探索領域nに属する要素とサーチキーとの比較回数をp(n)と、するとき、
c(1)>c(2)>・・・>c(N)、
b(1)<b(2)<・・・<b(N)、
b(n) / p(n) ≧ b(input)、
b(n) ≦ log2c(n)、
なる条件を満たし、
1からNまでのp(n)の和について、底を2としたMの対数を切り上げた整数と等しくなるように、
1からNまでのnについて定めた
b(n)、c(n)、p(n)を用いることを特徴とする探索方法。
The search method according to claim 6, comprising:
For n from 2 to N,
The search area (n-1) is divided into a plurality of partial search areas, and a set of representative points of each of the partial search areas is defined as a new search area n.
For n from 1 to N,
About the storage means n which memorize | stores all the elements of each search area n, and the search means n which searches the said search area n,
The storage capacity of the storage means n is c (n), the search throughput of the search area n is b (n),
The search key input rate is constant, the bit rate of the input rate is b (input),
The search area bit size is M,
When the number of comparisons between the elements belonging to the search area n performed by the search means n and the search key is p (n),
c (1)> c (2)>...> c (N),
b (1) <b (2) <... <b (N),
b (n) / p (n) ≧ b (input),
b (n) ≦ log 2 c (n),
Meets the conditions
The sum of p (n) from 1 to N is equal to an integer obtained by rounding up the logarithm of M with a base of 2.
A search method characterized by using b (n), c (n), and p (n) defined for n from 1 to N.
JP2006052500A 2006-02-28 2006-02-28 Search method for high-speed pattern matching device Expired - Fee Related JP5309354B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006052500A JP5309354B2 (en) 2006-02-28 2006-02-28 Search method for high-speed pattern matching device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006052500A JP5309354B2 (en) 2006-02-28 2006-02-28 Search method for high-speed pattern matching device

Publications (2)

Publication Number Publication Date
JP2007233554A true JP2007233554A (en) 2007-09-13
JP5309354B2 JP5309354B2 (en) 2013-10-09

Family

ID=38554109

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006052500A Expired - Fee Related JP5309354B2 (en) 2006-02-28 2006-02-28 Search method for high-speed pattern matching device

Country Status (1)

Country Link
JP (1) JP5309354B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009066342A1 (en) * 2007-11-19 2009-05-28 Duaxes Corporation Binary search circuit and method for binary search
JP2009284384A (en) * 2008-05-26 2009-12-03 Fujitsu Ltd Search circuit
JP2010078965A (en) * 2008-09-26 2010-04-08 Sony Corp Computation apparatus and method, quantization device and method, and program
US20110123064A1 (en) * 2008-08-22 2011-05-26 Zte Corporation Method for monitoring a picture or multimedia video pictures in a communication system
US8601039B2 (en) 2008-09-26 2013-12-03 Sony Corporation Computation apparatus and method, quantization apparatus and method, and program
US8825494B2 (en) 2008-09-05 2014-09-02 Sony Corporation Computation apparatus and method, quantization apparatus and method, audio encoding apparatus and method, and program

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03266147A (en) * 1990-03-16 1991-11-27 Nec Commun Syst Ltd Mass storage file management system
JPH06187304A (en) * 1992-12-16 1994-07-08 Toyo Ink Mfg Co Ltd Parallel operation board
JPH0793129A (en) * 1992-05-11 1995-04-07 Nec Corp Sort system
JPH0816362A (en) * 1994-06-30 1996-01-19 Sony Corp Signal processor by binary search method
JPH08185321A (en) * 1994-12-27 1996-07-16 Sharp Corp Pipeline processor
JP2002157151A (en) * 2000-11-17 2002-05-31 Matsushita Electric Ind Co Ltd Data management device
JP2002189587A (en) * 2000-12-19 2002-07-05 Nec Soft Ltd Sorting system and method, and storage medium
WO2004038436A1 (en) * 2002-10-24 2004-05-06 Advantest Corporation Target value search circuit, target value search method, and semiconductor test device using the same
JP2004287689A (en) * 2003-03-20 2004-10-14 Fujitsu Ltd Database retrieval method and retrieval program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03266147A (en) * 1990-03-16 1991-11-27 Nec Commun Syst Ltd Mass storage file management system
JPH0793129A (en) * 1992-05-11 1995-04-07 Nec Corp Sort system
JPH06187304A (en) * 1992-12-16 1994-07-08 Toyo Ink Mfg Co Ltd Parallel operation board
JPH0816362A (en) * 1994-06-30 1996-01-19 Sony Corp Signal processor by binary search method
JPH08185321A (en) * 1994-12-27 1996-07-16 Sharp Corp Pipeline processor
JP2002157151A (en) * 2000-11-17 2002-05-31 Matsushita Electric Ind Co Ltd Data management device
JP2002189587A (en) * 2000-12-19 2002-07-05 Nec Soft Ltd Sorting system and method, and storage medium
WO2004038436A1 (en) * 2002-10-24 2004-05-06 Advantest Corporation Target value search circuit, target value search method, and semiconductor test device using the same
JP2004287689A (en) * 2003-03-20 2004-10-14 Fujitsu Ltd Database retrieval method and retrieval program

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009066342A1 (en) * 2007-11-19 2009-05-28 Duaxes Corporation Binary search circuit and method for binary search
JP2009284384A (en) * 2008-05-26 2009-12-03 Fujitsu Ltd Search circuit
US20110123064A1 (en) * 2008-08-22 2011-05-26 Zte Corporation Method for monitoring a picture or multimedia video pictures in a communication system
JP2011529213A (en) * 2008-08-22 2011-12-01 ゼットティーイー コーポレイション Surveillance method used for communication system images or multimedia video images
US8532331B2 (en) 2008-08-22 2013-09-10 Zte Corporation Method for monitoring a picture or multimedia video pictures in a communication system
US8825494B2 (en) 2008-09-05 2014-09-02 Sony Corporation Computation apparatus and method, quantization apparatus and method, audio encoding apparatus and method, and program
JP2010078965A (en) * 2008-09-26 2010-04-08 Sony Corp Computation apparatus and method, quantization device and method, and program
US8593321B2 (en) 2008-09-26 2013-11-26 Sony Corporation Computation apparatus and method, quantization apparatus and method, and program
US8601039B2 (en) 2008-09-26 2013-12-03 Sony Corporation Computation apparatus and method, quantization apparatus and method, and program

Also Published As

Publication number Publication date
JP5309354B2 (en) 2013-10-09

Similar Documents

Publication Publication Date Title
CN109325032B (en) Index data storage and retrieval method, device and storage medium
JP5309354B2 (en) Search method for high-speed pattern matching device
CN112085644B (en) Multi-column data ordering method and device, readable storage medium and electronic equipment
CN108415912B (en) Data processing method and device based on MapReduce model
JP2003256265A (en) Search memory, controller for memory search, and memory search method
US20100057809A1 (en) Information storing/retrieving method and device for state transition table, and program
JPWO2005098612A1 (en) Important component priority calculation method and device
US20100017377A1 (en) Finite-state machine augmented for multiple evaluations of text
Rifai et al. Multi-operator hybrid genetic algorithm-simulated annealing for reentrant permutation flow-shop scheduling
CN109815475B (en) Text matching method and device, computing equipment and system
JP4347087B2 (en) Pattern matching apparatus and method, and program
CN114969023A (en) Database learning type index construction method and system
CN114036371A (en) Search term recommendation method, device, equipment and computer-readable storage medium
CN106649836A (en) Hardware lookup table pattern character searching method
CN107808214B (en) Heuristic binary decision diagram variable order optimization representation method of workshop manufacturing system
CN111884659A (en) Compression method and device of FST data
CN111444180A (en) Double-layer structure index and query method thereof
CN112612762B (en) Data processing method and related equipment
US6411958B1 (en) Data processing system and method for generating a structured listing of symbols
WO2011021347A1 (en) Bit-string data sorting device, sorting method and program
JPH08221254A (en) Method and device for merging sort
JPH10254905A (en) Information retrieval device
CN112269806B (en) Data query method, device, equipment and computer storage medium
CN116340692A (en) TOP-K estimation method
CN107451125B (en) Method for performing rapid close semantic matching aiming at sequence-independent item groups

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080225

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20090106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20090217

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20090217

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090217

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20090217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110215

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110418

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110607

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110808

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20110826

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20110826

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20110826

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120221

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120521

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

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20120528

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

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20120706

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130611

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5309354

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees