JPS6244829A - Method for extracting pattern - Google Patents
Method for extracting patternInfo
- Publication number
- JPS6244829A JPS6244829A JP60184821A JP18482185A JPS6244829A JP S6244829 A JPS6244829 A JP S6244829A JP 60184821 A JP60184821 A JP 60184821A JP 18482185 A JP18482185 A JP 18482185A JP S6244829 A JPS6244829 A JP S6244829A
- Authority
- JP
- Japan
- Prior art keywords
- pattern
- register
- signal
- basic configuration
- comparator
- 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.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【発明の詳細な説明】
2 ベ一/
産業上の利用分野
本発明はデータ処理装置におけるパターン抽出方法、特
に抽出したいパターンをデータベースから迅速に取出す
ことの可能なパターン抽出方法に関するものである。DETAILED DESCRIPTION OF THE INVENTION 2. Field of Industrial Application The present invention relates to a pattern extraction method in a data processing device, and particularly to a pattern extraction method that allows a pattern to be extracted to be quickly retrieved from a database.
従来の技術
従来、データベースから特定のパターンを抽出するため
のデータ処理は、ソフトウェアによって行なわれていた
。この方法によれば、一つのパターンを抽出するには、
パターン長に従ってネスティングレベルが増加する形に
なり、比較的長い時間をかけて処理することになる。ま
た、複数個のパターンを抽出するために、処理も並列的
に行ない、抽出しなければならない。BACKGROUND OF THE INVENTION Conventionally, data processing for extracting specific patterns from a database has been performed by software. According to this method, to extract one pattern,
The nesting level increases as the pattern length increases, and processing takes a relatively long time. Furthermore, in order to extract a plurality of patterns, processing must also be performed in parallel.
発明が解決しようとする問題点
しかしながら、このような従来のパターン抽出方法にあ
っては、ソフトウェアに依存したCPU操作によって行
なっていたためにパターン抽出を行うのに非常に時間が
かかっていた。また、複数のパターンの抽出を行なうに
は、複数回データベ3 、
−スをアクセスするか、又はパターンを毎回アクセスす
るしか方法はなく、上記複数のパターンの抽出操作を同
時に行なうことはできない。しかも、上記の様な従来の
パターン抽出方法にあっては、パターン抽出の際のパタ
ーン数に合わせてパターン数分のネスティングをしなけ
ればならず、パターン数が多ければ多いほど(或はパタ
ーン自体が長ければ長いほど)処理に時間がかかるとい
う問題があった。Problems to be Solved by the Invention However, in such conventional pattern extraction methods, it takes a very long time to extract patterns because the extraction is performed by CPU operations that depend on software. Further, in order to extract a plurality of patterns, the only way is to access the database 3, - source multiple times or to access the pattern each time, and it is not possible to perform the extraction operation of the plurality of patterns at the same time. Moreover, in the conventional pattern extraction method as described above, nesting must be performed for the number of patterns in accordance with the number of patterns at the time of pattern extraction. The problem is that the longer the process, the longer it takes to process.
本発明は、このような問題点に着目してなされたもので
、その目的は、ハードウェアに予め抽出パターンを記憶
させておき、ダイレクトメモリアクセスによってデータ
ベースをアクセスし、このアクセスされたデータと上記
予めセットされた抽出パターンを比較することにより高
速でパターン抽出を行ない得るパターン抽出方法を提供
することである。The present invention has been made with attention to such problems, and its purpose is to store extraction patterns in advance in hardware, access the database by direct memory access, and combine this accessed data with the above-mentioned data. It is an object of the present invention to provide a pattern extraction method capable of performing pattern extraction at high speed by comparing preset extraction patterns.
問題点を解決するための手段
本発明は、上記目的を達成するため、パターン抽出用の
データベースを保有するメモリと、抽出パターン保持用
のレジスタ及び比較器を有する複数のパターン検出部と
を設け、抽出パターンの各要素を処理装置によりレジス
タに保持すると共に、データベース中の各要素をダイレ
クトメモリアクセスによって読出し、抽出パターンの1
要素とデータベース中の1要素とを遂次比較して一致結
果をカスケードに接続し、全要素一致によってパターン
抽出を折々うようにしたことを要旨とするものである。Means for Solving the Problems In order to achieve the above object, the present invention includes a memory holding a database for pattern extraction, and a plurality of pattern detection units each having a register and a comparator for holding extracted patterns, Each element of the extraction pattern is held in a register by the processing device, and each element in the database is read out by direct memory access.
The gist of this method is to sequentially compare an element with one element in a database, connect the matching results in a cascade, and extract patterns from time to time based on all element matches.
作用
抽出パターンのうちの最初の1要素の比較を行なうため
に、データベースの最初の要素がダイレクトメモリアク
セス(DMA)によって読出される。読出されたデータ
ベースの要素は、複数のパターン検出手段に並行して入
力され、それぞれのパターン検出手段中で抽出パターン
の一要素とデータベースからの1要素との比較を行なう
。両要素間でパターンの一致が取れればレジスタの該当
ビット位置に一致信号+t I I+が書込まれ、一致
しなければ書込まれないで、次のDMAによって再5・
\−。To compare the first element of the effect extraction pattern, the first element of the database is read by direct memory access (DMA). The read elements of the database are input in parallel to a plurality of pattern detection means, and each pattern detection means compares one element of the extracted pattern with one element from the database. If the patterns match between both elements, a match signal +t I I+ is written to the corresponding bit position of the register, and if they do not match, it is not written and is re-written by the next DMA.
\-.
度抽出パターンの最初の1要素の比較を行なう。The first element of the frequency extraction pattern is compared.
この操作をデータベース要素に対して順次行ないパター
ンを抽出する。パターン検出手段は互いにカスケード接
続でき、抽出パターンの長さに自由に対応することがで
きる。This operation is performed sequentially on database elements to extract patterns. The pattern detection means can be cascaded with each other and can freely correspond to the length of the extraction pattern.
実施例
第1図は、本発明によるパターン抽出方法を実行するた
めのシステム例を示す図である。この図において、符号
1乃至3は、パターン抽出装置のパターン検出手段の基
本構成を示し、4はパターン抽出のためのデータ処理を
行う処理装置即ちマイクロプロセッサ、5はDMA制御
装置、6はメモリをそれぞれ示す。各基本構成1,2,
3.マイクロプロセツサ4.DMA制御装置5.メモリ
6はそれぞれデータバス8及びアドレスバス9に接続さ
れて各種データの受入れ、送出を行なうようになってお
り、また上記各作動部はインタラブド信号線41.制御
線42を介して送られる信号によって作動制御される。Embodiment FIG. 1 is a diagram showing an example of a system for implementing the pattern extraction method according to the present invention. In this figure, numerals 1 to 3 indicate the basic configuration of the pattern detection means of the pattern extraction device, 4 is a processing device that performs data processing for pattern extraction, that is, a microprocessor, 5 is a DMA control device, and 6 is a memory. Each is shown below. Each basic configuration 1, 2,
3. Microprocessor4. DMA control device5. The memory 6 is connected to a data bus 8 and an address bus 9, respectively, to accept and send out various data, and each of the operating sections is connected to an interconnected signal line 41. The operation is controlled by a signal sent via a control line 42.
さらに、各基本構成1゜2.3はそれぞれが単独に作動
し得る様、信号線6 べ−1・
62を通してDMA制御装置5に並列接続される一方で
、その中の二つの基本構成(例えば1と2)がカスケー
ド接続によって互いに関連性をもちながら作動し得る様
に構成することもできる。図中71は基本構成3から発
せられるDMA要求信号線、72は基本構成2から発せ
られるDMA要求信号線、7は基本構成2及び3(或は
基本構成1を含む)から発せられたDMA要求信号の間
での論理積をとり、最終的なりMA要求信号線61へ出
力するアンドゲートである。Further, each basic configuration 1.2.3 is connected in parallel to the DMA control device 5 through the signal line 6 (base 1.62) so that each of the basic configurations (e.g. 1 and 2) may be configured so that they can operate in relation to each other by cascade connection. In the figure, 71 is a DMA request signal line issued from basic configuration 3, 72 is a DMA request signal line issued from basic configuration 2, and 7 is a DMA request signal line issued from basic configurations 2 and 3 (or including basic configuration 1). This is an AND gate that performs a logical product between the signals and finally outputs the result to the MA request signal line 61.
パターン抽出基本構成1(基本構成2.3についても同
様である)は、例えば第2図に示すような構成を有する
。この図から明らか々ように、基本構成1は、比較器及
びレジスタアレイ1oと、比較器及びレジスタアレイ1
0を制御するコントロール・ステータスレジスタ11.
!:、J−にフリップフロップ12と、アンドゲート1
3,16゜18と、インバータ14.15と、オアゲー
ト17とを有する。比較器及びレジスタアレイ10は、
それぞれビット幅nの比較器をレジスタとを組合わせた
複数のセル101,102・−・・・・10mと、CP
Uバスからレジスタに読出し書込みを制御するためのデ
コーダ111を、基本構成1からCPUにパターン抽出
のタイミングを知らせる信号を選択するセレクタ112
と、基本構成1,2゜3の間を任意にカスケード接続す
るための信号を選択するセレクタ113とを有する。The pattern extraction basic configuration 1 (the same applies to the basic configuration 2.3) has a configuration as shown in FIG. 2, for example. As is clear from this figure, the basic configuration 1 includes a comparator and register array 1o, a comparator and register array 1o, and a comparator and register array 1o.
control/status register 11.
! :, flip-flop 12 in J-, and gate 1
3,16°18, an inverter 14,15, and an OR gate 17. Comparator and register array 10 includes:
A plurality of cells 101, 102, .
A selector 112 selects a decoder 111 for controlling reading and writing from the U bus to the register and a signal from basic configuration 1 that informs the CPU of the pattern extraction timing.
and a selector 113 for selecting a signal for arbitrary cascade connection between the basic configurations 1, 2 and 3.
第4図は、第3図中の比較器及びレジスタセル101・
・・・・・10mの内部構造の一例を示すもので、図中
、符号1001はビット幅nのレジスタ、1002はビ
ット幅nのバスドライバ、10o3はビット幅nのデー
タの比較器、1o04はこのセルにおける比較結果の保
持を行々うフリップフロップ、1006はこのセル内の
比較結果と前段のセルの比較結果を組合わせるゲートで
ある。FIG. 4 shows the comparator and register cell 101 in FIG.
...10m shows an example of the internal structure. In the figure, 1001 is a register with a bit width of n, 1002 is a bus driver with a bit width of n, 10o3 is a data comparator with a bit width of n, and 1o04 is a data comparator with a bit width of n. A flip-flop 1006 that holds the comparison result in this cell is a gate that combines the comparison result in this cell with the comparison result of the previous cell.
かかる構成を有するシステムにおいて、パターン抽出を
行なう場合の動作について説明する。The operation when extracting a pattern in a system having such a configuration will be explained.
先ず、第4図の比較器及びレジスタセルにおいて、レジ
スタ1001にバスを介してDO〜nの値を信号REG
Wによって書込む。また、このレジスタの内容をCPU
が読み出す場合には、信号REGRによりDo〜nにデ
ータを出力する。そして、レジスタ1o01の内容とD
oNnの内容とを比較器1oO3により常時比較を行な
い、一致又は不一致の信号を出力する。この信号と、C
MPo(前段の比較器とレジスタセルからの一致信号)
との論理積をゲート1006によってとり、この結果を
D−フリップフロップにCTのタイミングで保持する。First, in the comparator and register cell of FIG.
Write by W. Also, the contents of this register can be
When reading data, data is output to Don through signal REGR. Then, the contents of register 1o01 and D
A comparator 1oO3 constantly compares the contents of oNn and outputs a signal indicating a match or a mismatch. This signal and C
MPo (match signal from the previous stage comparator and register cell)
The gate 1006 performs an AND operation with the D-flip-flop, and holds this result in the D-flip-flop at the timing of CT.
この(ljTのタイミングは、データアレイ中の比較さ
れるデータが有効であることを示すためのものである。The timing of this (ljT) is to indicate that the compared data in the data array is valid.
また、上記D−フリップフロップは、信号R1!:SE
Tによって初期化される。こうして、この比較器及びレ
ジスタセルは、前段の比較器及びレジスタセルからの比
較結果信号CMPOを入れ、この段までの抽出パターン
要素の一致、不一致を判定、保持し、次段の比較器及び
レジスタセルに対して比較結果信号CMP1を出力する
。Further, the D-flip-flop has a signal R1! :SE
Initialized by T. In this way, this comparator and register cell receives the comparison result signal CMPO from the previous stage comparator and register cell, determines and holds the match or mismatch of the extraction pattern elements up to this stage, and stores the comparison result signal CMPO from the previous stage comparator and register cell. A comparison result signal CMP1 is output to the cell.
比較器及びレジスタアレイ10は上記比較器及びレジス
タセル101〜10mがカスケード接続9 ヘー。The comparator and register array 10 has the comparator and register cells 101 to 10m connected in cascade 9.
されて成り、各レジスタにはデコーダ111により、ア
ドレスデータを通すムーバス、バスイネーブル信号KN
、基本構成ブロックのチップセレクト信号CS 、 I
J−ド・ライト制御信号R/Wをデコードし、レジスタ
リード、レジスタライトの信号を発生する。この信号に
より、D−バスの内容を該当するレジスタに書込み、読
出しすることでCPUとインタフェースする。該比較器
とレジスタアレイを初期化するために、RKST信号を
制御する。CMPK信号は、予めレジスタ群に書込まれ
た内容とD−バスの内容を比較するタイミングを与え、
ムWONT信号はm個の比較器とレジスタ群のうち、何
個までを有効とするかを制御するバイナリデータである
。Fix信号は、該ブロックをカスケード接続してm個
以上のデータを比較するための入力信号(前段の該ブロ
ックのFixO信号)で、FixO信号は該ブロック中
でのデータの一致を示し、次段のブロックとカスケード
接続するための信号である。IEQN信号は、そのブロ
ックにおいて一致した事を示す信号でCMPK信10
、、−;;
号のタイミングでストローブされている。Each register is provided with a bus enable signal KN by a decoder 111 for passing address data.
, basic configuration block chip select signals CS, I
It decodes the J-write control signal R/W and generates register read and register write signals. Using this signal, the contents of the D-bus are written to and read from the corresponding register, thereby interfacing with the CPU. Control the RKST signal to initialize the comparator and register array. The CMPK signal provides timing for comparing the contents written in advance to the register group and the contents of the D-bus,
The mWONT signal is binary data that controls how many of the m comparators and register groups are to be enabled. The Fix signal is an input signal (FixO signal of the block in the previous stage) for cascading the blocks and comparing m or more pieces of data. This is a signal for cascading with the block. The IEQN signal is a signal indicating that there is a match in that block, and the CMPK signal 10
,,-;; It is strobed at the timing of the issue.
このよう々比較器及びレジスタアレイをCPUの周辺に
使用できる様にするため、基本構成1゜2.3内にはコ
ントロール・ステータスレジスタが組込まれてDMAタ
イミング、インタラブドリクエスト等を制御している。In order to use the comparator and register array in the periphery of the CPU, a control/status register is built into the basic configuration 1゜2.3 to control DMA timing, interleaved requests, etc. .
この基本構成1,2゜3は、CPUから送られたムーバ
ス、D−バスの各データと、R/W信号、O8信号、E
N信号。This basic configuration 1, 2, and 3 is based on the Mu bus and D bus data sent from the CPU, the R/W signal, the O8 signal, and the E bus.
N signal.
RIC8ET(例えば、POWICRON R1!:8
KT)信号によってコントロール・ステータスレジスタ
に制御データがセットされ、ステータスを読出しながら
当該基本構成が制御される。また、比較器及びレジスタ
アレイ1oにも上記信号を使ってリードライトを行ない
、希望の抽出パターンをセットする。こうして、セット
されたパターンを抽出するに当り、Fixi信号により
起動をかける様にする0DRI!:Q信号は、DM人要
求信号で、この信号がアクティブの時にDACK信号(
DMA応答信号)がアクティブになり、DMA処理が行
なわれる。このDMA処理のタイミングをHAi信号で
117、−7
ストロープした信号29を比較器及びレジスタアレイの
比較タイミング信号として使う。このタイミングに合わ
せて上記比較器及びレジスタアレイ10から一致信号2
7が出力され、この一致信号はICN信号のタイミング
に合わせてJ−にフリップフロップ12にセットされる
。そして、とのJ−にフリップフロップ12からは一致
フラグ信号26が出力され、この信号25が1のときに
インタラブドイネーブル信号21が1ならばアンドゲー
ト16によりiNT信号が0となり、インタラブド要求
が出力される。また、コントロール・ステータスレジス
タ11にも上記一致フラグ信号26が入力され、CPU
からインタラブド要因のポーリングが行なえる様になる
。該一致フラグ信号は、DMA要求を中断するためにも
使用される。基本構成ブロックがカスケード接続の最終
段もしくは単独使用の時には、データの一致が検出され
た時にCPUにて処理が行なえる様にするため、DMA
処理を中断しなければならない。信号23は、カスケー
ドの前段の場合には0となっており、いつもDREQ信
号が出力出来るようにするためのものであり、信号24
はDMA処理を行なう信号である。RIC8ET (for example, POWICRON R1!:8
Control data is set in the control/status register by the KT) signal, and the basic configuration is controlled while reading the status. Further, the comparator and register array 1o are also read/written using the above signals to set a desired extraction pattern. In this way, when extracting the set pattern, 0DRI is activated by the Fixi signal! :The Q signal is a DM person request signal, and when this signal is active, the DACK signal (
DMA response signal) becomes active and DMA processing is performed. A signal 29 obtained by stropping the timing of this DMA processing by 117, -7 with the HAi signal is used as a comparison timing signal for the comparator and register array. Match signal 2 is sent from the comparator and register array 10 at this timing.
7 is output, and this coincidence signal is set to J- in the flip-flop 12 in accordance with the timing of the ICN signal. Then, the coincidence flag signal 26 is output from the flip-flop 12 at J- of , and if the interwoven enable signal 21 is 1 when this signal 25 is 1, the iNT signal is set to 0 by the AND gate 16, and the interwoven request is Output. Further, the coincidence flag signal 26 is also input to the control/status register 11, and the CPU
From this point on, polling of interacted factors can be performed. The match flag signal is also used to abort DMA requests. When the basic configuration block is the final stage of a cascade connection or used alone, the DMA is used so that the CPU can perform processing when a data match is detected.
Processing must be interrupted. The signal 23 is 0 in the case of the previous stage of the cascade, and is used to always output the DREQ signal.
is a signal for performing DMA processing.
このシステムを用いてデータベースから特定の文字列を
抽出する場合のアルゴリズムの一例を第6図に示す。An example of an algorithm for extracting a specific character string from a database using this system is shown in FIG.
この例では、RAMeに、
“ABCABICDEABOABCABCDABCDK
”なる文字列のデータベースがあり、この中から、”A
BCABCABCDAB ”という文字列(これを第1
の文字列とする)と°’BCDE”という文字列(これ
を第2の文字列とする)とを抽出する場合を表わしてい
る。また基本構成のレジスタアレイは、8ビット×8本
の構成を持つ。よって、上記第1の文字列を抽出するた
めには12本のレジスタが必要となるから、基本構成を
二つカスケード接続して使用している(第1図1及び2
)。また、同時に°’BCDE”を抽出するために、基
本構成を並列に接続して使用している(第1図1及び2
と3)。かかるシステム構成において、先ず、第113
6−ゾ
図中基本構成1内の比較器及びレジスタアレイ10に上
記第1の文字列のうちの“ムBCABCAB”基本構成
2内の比較器及びレジスタアレイ1oに第1の文字列の
うちの”CDAB”を書き、それぞれのデータ長を8,
4と夫々のコントロール・ステータスレジスタ11に書
く。また、基本構成3内の比較器及びレジスタアレイ1
0に上記第2の文字列である“BODE”を書き、その
データ長を4とコントロール・ステータスレジスタ11
に書込む。In this example, RAMe contains “ABCABICDEABOABCABCDABCDK
``There is a database of character strings, from which ``A
BCABCABCDAB” character string (this is the first
) and the character string °'BCDE'' (this is the second character string).The basic configuration of the register array consists of 8 bits x 8 registers. Therefore, in order to extract the first character string mentioned above, 12 registers are required, so two basic configurations are connected in cascade (see Figure 1, 1 and 2).
). In addition, in order to simultaneously extract °'BCDE', the basic configuration is connected in parallel and used (Figures 1 and 2).
and 3). In such a system configuration, first, the 113th
In the 6-zo diagram, the comparator and register array 10 in the basic configuration 1 is filled with one of the first character strings. Write “CDAB” and set each data length to 8,
4 to each control/status register 11. In addition, the comparator and register array 1 in the basic configuration 3
Write the second character string “BODE” to 0, set the data length to 4, and write the control/status register 11.
write to.
また、DMACsにRAM6中のデータベースの先頭ア
ドレスと長さをセットして初期設定を行なう。Further, initialization is performed by setting the start address and length of the database in the RAM 6 in DMACs.
初期設定の後、基本構成1乃至3とDMAC5に起動を
かけ、パターン抽出処理を行なう。このとき、第1図中
、基本構成2及び3からDMム要求信号72.71がア
クティブとなって出力され、アンドゲート7で論理積が
とられることによりDMAC5に向けてDMム要求信号
61を出力する。なお、この例では、基本構成1と基本
構成214、、。After the initial settings, the basic configurations 1 to 3 and the DMAC 5 are activated to perform pattern extraction processing. At this time, in FIG. 1, the DM request signals 72 and 71 become active and are output from the basic configurations 2 and 3, and the AND gate 7 performs a logical product to send the DM request signal 61 to the DMAC 5. Output. Note that in this example, basic configuration 1 and basic configuration 214, .
とはカスケード接続されて連繋動作をするため、基本構
成1からは独自のDMA要求信号は出力されない。DM
AC5は、上記DMA要求信号61を受けると、ムーバ
スにRAMeのアドレスを出し、各基本構成1,2と3
にDMA許可信号を出して処理を行なわせる。are connected in cascade and operate in conjunction, so basic configuration 1 does not output its own DMA request signal. DM
When the AC5 receives the DMA request signal 61, it sends the address of RAMe to the Mubus and sends the address of each basic configuration 1, 2, and 3.
A DMA permission signal is issued to the terminal to cause the processing to be performed.
第6図のアルゴリズムにおいて、第1段目の処理ではデ
ータベースが°9人”であるため、基本構成1の最初の
パターンと一致する。これにより、比較器及びレジスタ
アレイ1oからはFixO信号及びEQN信号が発せら
れ、第6図に示すように最初のビット位置に9°1”が
セットされる。In the algorithm shown in FIG. 6, since the database in the first stage of processing is 9 people, it matches the first pattern of basic configuration 1. As a result, the FixO signal and EQN A signal is issued and the first bit position is set to 9°1'' as shown in FIG.
第2段目の処理ではデータベースがJIB”であるため
、基本構成102番目のパターンが一致し、基本構成3
の一番目のパターンも一致する。レジスタは前段の文字
列が一致していて、現段階の文字が一致したことにより
セット状態となり、それ以外ではリセットとなるみした
がって、この第2段目の処理においては、基本構成1の
レジスタでは第2番目のビット位置にT+1”がセット
される157、。In the second stage of processing, since the database is "JIB", the 102nd pattern of basic configuration matches, and basic configuration 3
The first pattern also matches. The register enters the set state because the character strings in the previous stage match and the characters at the current stage match, and is reset otherwise.Therefore, in this second stage of processing, the register in basic configuration 1 will be in the set state. T+1'' is set in the second bit position 157.
一方、基本構成3のレジスタでは最初のビット位置に1
”がセットされる。以下同様の手順で処理されるが、第
4段目の処理では基本構成1の1番目のパターンと4番
目のパターンが一致するが、基本構成3の3番目のパタ
ーンは不一致となる。On the other hand, in the register with basic configuration 3, 1 is placed in the first bit position.
" is set. The same procedure is followed, but in the fourth stage, the first pattern of basic configuration 1 matches the fourth pattern, but the third pattern of basic configuration 3 matches. There will be a mismatch.
よって基本構成3ではレジスタがリセットされる。Therefore, in basic configuration 3, the registers are reset.
第6段目から第8段目にかけて、基本構成3ではパター
ンの一致がとられ、そのレジスタには最初のビットから
最後のビットまで順次IJ11がセットされる。最後の
ビットに°“1”がセットされると必要とする文字列が
抽出されたことを示し、上記基本構成3において”BO
DE′′のパターンが抽出される。From the sixth stage to the eighth stage, pattern matching is performed in basic configuration 3, and IJ11 is sequentially set in the register from the first bit to the last bit. When the last bit is set to "1", it indicates that the required character string has been extracted, and in the basic configuration 3 above, "BO" is set.
A pattern of DE'' is extracted.
この時、第1図において、DMA要求信号71がインア
クティブとなり、DMAを中断する一方、第1図中のイ
ンタラブド要求信号41がアクティブとなってMP[T
4に処理要求する。MPHの処理が完了し、基本構成3
に再起動をかけるとDMA要求信号が再びアクティブと
なり、処理を再開する。At this time, in FIG. 1, the DMA request signal 71 becomes inactive and DMA is interrupted, while the interwoven request signal 41 in FIG. 1 becomes active and the MP[T
Request processing to 4. MPH processing is completed and basic configuration 3
When restarted, the DMA request signal becomes active again and processing resumes.
第16段目の処理では、基本構成1のレジスタの全ビッ
トについて一致結果が得られ
1ムBCABCAB”まで抽出できたことになるが、基
本構成1と基本構成2とがカスケード接続されているか
らDMA要求信号71はインアクティブとはならず、引
続き次の第17段目の処理に入る。In the 16th stage of processing, a match result was obtained for all bits of the register of basic configuration 1, and up to 1 block BCABCAB could be extracted, but this is because basic configuration 1 and basic configuration 2 are cascade-connected. The DMA request signal 71 does not become inactive, and the process continues to the next 17th stage.
そして、この第17段目の処理では基本構成1の一致結
果と基本構成2の最初のパターンの一致で”ABCAB
CABC’lまで抽出できたことになる。Then, in the 17th stage of processing, the matching result of basic configuration 1 and the first pattern of basic configuration 2 are matched, and "ABCAB"
This means that up to CABC'l was extracted.
このような処理が引続き行なわれ、第20段目の処理で
は、基本構成2の最終パターンまで一致し、初めに目的
としていた“ムBCABCABCDAB”のパターンが
抽出される。Such processing is continued, and in the 20th stage processing, the final pattern of basic configuration 2 is matched, and the initially targeted pattern "BCABCABCDAB" is extracted.
この時、上の基本構成3において全文字が一致したのと
同様、DMA要求信号72がインアクティブとなり、D
MAを中断し、インタラブド要求信号がアクティブとな
ってMPUaに処理を要求する。とれによってMPU4
が処理を行ない、基本構成2に再起動をかけるとDMA
要求信号が再びアクティブとなり処理を再開する。以上
の様に174、−ッ
して複数の基本構成に同時に起動をかけることにより複
数の文字列パターンを同時に並行して抽出する。At this time, the DMA request signal 72 becomes inactive and the D
MA is interrupted, the interwoven request signal becomes active, and processing is requested from MPUa. MPU4
performs the processing, and when you restart basic configuration 2, the DMA
The request signal becomes active again and processing resumes. As described above, a plurality of character string patterns are simultaneously extracted in parallel by activating a plurality of basic configurations at the same time in step 174.
第6図は、上記実施例とは別の3種類の文字列”ABO
ABCムB”、 ′tCDAB”及び”BCDE”をデ
ータベースから抽出する場合のアルゴリズムの一例を示
すものである。この場合は各基本構成1乃至3によって
文字列パターンを抽出するから複数の基本構成をカスケ
ード接続する必要はない。FIG. 6 shows three types of character strings “ABO” and “ABO” that are different from those in the above embodiment.
This is an example of an algorithm for extracting "ABCMB", 'tCDAB' and "BCDE" from the database. In this case, since character string patterns are extracted using each of basic configurations 1 to 3, there is no need to cascade connect a plurality of basic configurations.
したがって、第1図に示すシステム構成例においては、
基本構成1からアンドゲート7へ向けてDMA要求信号
73を送出するよう信号線が接続される。Therefore, in the system configuration example shown in FIG.
A signal line is connected to send a DMA request signal 73 from the basic configuration 1 to the AND gate 7 .
発明の詳細
な説明したように、本発明によれば、複数個のパターン
に対し、データベースを−通り1回アクセスするのみで
パターンの抽出を行なうことができ、パターン抽出のた
めの処理速度を改善することができる。また、一つの基
本構成をつくり、これを並列にn個使うことで1〜n個
のパターン184−ジ
を同時に処理することができる。更に、一つの基本構成
をつくり、これをカスケードに接続することで、基本構
成を越えたパターン長の処理が行なえる。更にまた、上
記のような使用法でいろいろな事象(長い文字列であっ
たり、短い文字列であったり)に対処できるため、基本
構成を固定することが出来、LSI化し易い。As described in detail, according to the present invention, it is possible to extract a plurality of patterns by accessing the database only once, thereby improving the processing speed for pattern extraction. can do. Further, by creating one basic configuration and using n pieces of it in parallel, it is possible to process 1 to n patterns 184-ji at the same time. Furthermore, by creating one basic configuration and connecting it in cascade, it is possible to process pattern lengths that exceed the basic configuration. Furthermore, since various phenomena (long character strings, short character strings, etc.) can be dealt with using the method described above, the basic configuration can be fixed and it is easy to implement into an LSI.
第1図は本発明のパターン抽出方法を適用した装置のブ
ロック図、第2図はその基本構成のブロック図、第3図
は第2図中の比較器及びレジスタアレイのブロック図、
第4図は第3図中の比較器及びレジスタセルのブロック
図、第6図は第1図に示されたシステムにおける動作ア
ルゴリズムを示す図、第6図は第6図とは異なる動作ア
ルゴリズムを示す図である。
1.2.3・・・・・・基本構成(パターン検出手段)
、4・・・・・・MPtT(処理装置)、5・・・・・
・DMA0,6・・・・・・RAM(メモリ)、7・・
・・・・アンドゲート、10・・・・・・比較器及びレ
ジスタアレイ、11・・・・・・コ196−ツ
ントロール命ステータスレジスタ、1o1・・・・・・
比較器及びレジスタセル。
代理人の氏名 弁理士 中 尾 敏 男 ほか1名第1
図 42−FJIす抑線第4図
第5図FIG. 1 is a block diagram of a device to which the pattern extraction method of the present invention is applied, FIG. 2 is a block diagram of its basic configuration, and FIG. 3 is a block diagram of the comparator and register array in FIG.
FIG. 4 is a block diagram of the comparator and register cell in FIG. 3, FIG. 6 is a diagram showing an operating algorithm in the system shown in FIG. 1, and FIG. FIG. 1.2.3 Basic configuration (pattern detection means)
, 4...MPtT (processing device), 5...
・DMA0, 6...RAM (memory), 7...
...AND gate, 10...Comparator and register array, 11...K196-Tuntrol life status register, 1o1...
Comparator and register cells. Name of agent: Patent attorney Toshio Nakao and 1 other person No. 1
Figure 42 - FJI indentation line Figure 4 Figure 5
Claims (2)
中のレジスタに保持すると共に、メモリに保有されたデ
ータベース中の各要素をダイレクトメモリアクセスによ
って読出し、抽出パターンの1要素とデータベース中の
1要素とを比較し、この比較結果を保持する一方、前記
レジスタに保持された次の要素とデータベース中の次の
要素とを遂次比較及び結果保持し、これらの比較結果を
カスケードに接続して抽出パターンの全要素とデータベ
ース中の特定パターンの全要素との一致を検出すること
を特徴とするパターン抽出方法。(1) Each element of the extraction pattern is held in a register in the detection means by the processing device, and each element in the database held in memory is read out by direct memory access, one element of the extraction pattern and one element in the database. The next element held in the register and the next element in the database are successively compared and the results are held, and these comparison results are connected in cascade and extracted. A pattern extraction method characterized by detecting matches between all elements of a pattern and all elements of a specific pattern in a database.
が可能であることを特徴とする特許請求の範囲第1項記
載のパターン抽出方法。(2) The pattern extraction method according to claim 1, wherein the plurality of pattern detection means can be connected in cascade to each other.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP60184821A JPS6244829A (en) | 1985-08-22 | 1985-08-22 | Method for extracting pattern |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP60184821A JPS6244829A (en) | 1985-08-22 | 1985-08-22 | Method for extracting pattern |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS6244829A true JPS6244829A (en) | 1987-02-26 |
Family
ID=16159877
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP60184821A Pending JPS6244829A (en) | 1985-08-22 | 1985-08-22 | Method for extracting pattern |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6244829A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0652225A (en) * | 1992-06-04 | 1994-02-25 | Internatl Business Mach Corp <Ibm> | Method and system for retrieving file |
JP2005537592A (en) * | 2002-08-28 | 2005-12-08 | ヴィハナ・インコーポレーテッド | Programmable rule processor for performing fast context search and characterization of patterns in data |
-
1985
- 1985-08-22 JP JP60184821A patent/JPS6244829A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0652225A (en) * | 1992-06-04 | 1994-02-25 | Internatl Business Mach Corp <Ibm> | Method and system for retrieving file |
JP2005537592A (en) * | 2002-08-28 | 2005-12-08 | ヴィハナ・インコーポレーテッド | Programmable rule processor for performing fast context search and characterization of patterns in data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI479342B (en) | Multi-level hierarchical routing matrices for pattern-recognition processors | |
JPS62113261A (en) | Arbitrator for computer system | |
US6760821B2 (en) | Memory engine for the inspection and manipulation of data | |
JPS5823375A (en) | Selective cash clearing method of and apparatus for data processing system | |
JP2002140892A (en) | Cam, device for address parallel processing of ram, and method | |
JPH1091572A (en) | Data transfer method and data transfer device using the method | |
US11003606B2 (en) | DMA-scatter and gather operations for non-contiguous memory | |
JPH03256183A (en) | Execution of memory protective operation in paralell processor system | |
JPS6244829A (en) | Method for extracting pattern | |
JP2001313686A (en) | Method and device for data analysis | |
TW200521847A (en) | Programmable chip select | |
JPH06103225A (en) | Chain type DMA system and DMA controller therefor | |
US20230214178A1 (en) | Device and method for selecting top values from a set of raw values | |
JPS6152762A (en) | Bus control gate array | |
JPH0567035A (en) | Data alignment method in DMA transfer | |
JPS63155346A (en) | Ram check system | |
JPS63113646A (en) | Memory control system | |
JPS62186328A (en) | Sort processing system | |
JPS62219399A (en) | Read system for read-only memory | |
JPH0271327A (en) | Sorting processor | |
JPH0476643A (en) | Main storage initialization control system | |
JPH01197860A (en) | Memory fault detecting circuit | |
JPH10207825A (en) | Data transfer device | |
JPH0324651A (en) | Storage access controller | |
JPS60122443A (en) | Information processing unit |