KR101262337B1 - Method and apparatus for pattern matching for multi-character parallel data stream - Google Patents

Method and apparatus for pattern matching for multi-character parallel data stream Download PDF

Info

Publication number
KR101262337B1
KR101262337B1 KR1020090079440A KR20090079440A KR101262337B1 KR 101262337 B1 KR101262337 B1 KR 101262337B1 KR 1020090079440 A KR1020090079440 A KR 1020090079440A KR 20090079440 A KR20090079440 A KR 20090079440A KR 101262337 B1 KR101262337 B1 KR 101262337B1
Authority
KR
South Korea
Prior art keywords
string
pattern
input
index
output
Prior art date
Application number
KR1020090079440A
Other languages
Korean (ko)
Other versions
KR20100062896A (en
Inventor
김정학
최송인
안지환
Original Assignee
한국전자통신연구원
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 한국전자통신연구원 filed Critical 한국전자통신연구원
Publication of KR20100062896A publication Critical patent/KR20100062896A/en
Application granted granted Critical
Publication of KR101262337B1 publication Critical patent/KR101262337B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode

Abstract

본 발명은 다문자 병렬 데이터 스트림에 대한 패턴 매칭 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for pattern matching for multicharacter parallel data streams.

본 발명은 데이터가 1 클록에 n-바이트씩 고속으로 처리되는 높은 처리 용량의 통신 네트워크 장비 또는 시스템에서 메모리를 효율적으로 사용할 수 있는 패턴 매칭 방법 및 장치를 통해, 패턴 매칭 장치에 필요한 메모리를 보다 효율적으로 사용할 수 있으며, 문자열 매칭과 정규 패턴 매칭을 분리함으로써 필요한 경우 그 중 한 부분만 확장이 가능해질 수 있다.The present invention provides a more efficient way of using a pattern matching method and apparatus through a pattern matching method and apparatus that can efficiently use memory in high processing capacity communication network equipment or systems in which data is processed at a high speed of n-bytes per clock. By separating string matching and regular pattern matching, only one of them can be extended if necessary.

패턴 매칭, 문자열, 다문자, 병렬, CAM(Content Addressable Memory), 연쇄 회로 Pattern Matching, Strings, Multicharacters, Parallel, CAM (Content Addressable Memory), Chained Circuits

Description

다문자 병렬 데이터 스트림에 대한 패턴 매칭 방법 및 장치{Method and apparatus for pattern matching for multi-character parallel data stream}Method and apparatus for pattern matching for multi-character parallel data stream

본 발명은 패턴 매칭 방법 및 장치에 관한 것으로, 특히 다문자 병렬 데이터 스트림에 대한 고속 패턴 매칭 방법 및 장치에 관한 것이다.The present invention relates to a pattern matching method and apparatus, and more particularly, to a fast pattern matching method and apparatus for a multicharacter parallel data stream.

본 발명은 지식경제부의 IT성장동력기술개발사업의 일환으로 수행한 연구로부터 도출된 것이다[과제관리번호: 2008-S-001-01, 과제명: WiBro 네트워크 신뢰성 확보 및 위치 인지 기술 개발].The present invention is derived from a study conducted as part of the IT growth engine technology development project of the Ministry of Knowledge Economy [Task management number: 2008-S-001-01, Task name: WiBro network reliability and location awareness technology development].

본 발명은 높은 처리용량의 통신 네트워크 장비 또는 시스템에서 데이터 패킷을 처리하기 위한 기술이며, 특히 다문자 병렬로 처리되는 데이터 패킷에 대한 고속 패턴 매칭 방법 및 장치에 관한 것이다. BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is a technique for processing data packets in a high throughput communication network equipment or system, and more particularly, to a method and apparatus for fast pattern matching for data packets processed in multicharacter parallel.

통신 네트워크는 진화하고 수없이 많은 서비스들을 새로이 창출하고 있으며, 그에 따른 사용자의 요구도 다양해지고 있다. 이에 따라 통신 네트워크에는 수없이 많은 정보가 생성되고 소멸되며 저장되기도 한다. 이러한 정보 중에는 보안이 필요한 것들이 있으며, 이를 위한 기술 또한 발전되고 있다. Communication networks have evolved and are creating a myriad of new services, and users' needs are also diversified. As a result, a great deal of information is generated, destroyed, and stored in a communication network. Some of this information requires security, and technology for this is being developed.

최근 네트워크 상에는 정보 보안을 위협하는 요소들이 복합적이고 다양화된 방법으로 나타나고 있다. 또한, 네트워크에 접속해 있는 네트워크 장비 및 통신 단말에는 위협 요소를 감지하고 차단하기 위한 기능들이 다양한 형태로 제공되고 있다. 네트워크를 위협하는 요소들은 네트워크를 통해 전달되는 패킷의 모든 계층에 걸쳐 나타날 수 있다. 특히, 응용 계층에 나타나는 요소들을 감지하기 위해서는 그 데이터를 처음부터 끝까지 모두 분석해야만 한다.Recently, threats to information security on the network are appearing in a complex and diversified way. In addition, network devices and communication terminals connected to the network are provided with various types of functions for detecting and blocking threats. Threats to the network can appear at every layer of packets passing through the network. In particular, to detect elements that appear in the application layer, the data must be analyzed from beginning to end.

일반적으로 응용 계층의 데이터로부터 특정 정보를 찾기 위해 패턴 매칭 기술이 활용된다. 즉, 응용 계층의 데이터를 검색해서 찾고자 하는 특정 정보와 일치하는 패턴이 존재하는지 여부를 판단하는 것이다. 찾고자 하는 특정 정보의 위치가 정해져 있는 것이 아니므로 매우 빠른 시간 내에 검색이 끝날 수도 있고 경우에 따라서는 데이터를 끝까지 검색해야 할 수도 있다. In general, a pattern matching technique is used to find specific information from data of an application layer. In other words, the data of the application layer is searched to determine whether there is a pattern matching the specific information to be found. Since the specific information to be searched is not determined, the search may be completed very quickly, and in some cases, the data may need to be searched to the end.

패턴 매칭 기술은 크게 두 가지 형태로 분류할 수 있다. 첫 번째로는 다양한 형태의 중앙 처리 장치와 메모리를 활용하여 소프트웨어적으로 패턴을 찾는 기술이 있다. 이 기술은 알고리즘 설계가 용이하고, 그 알고리즘을 소프트웨어로 구현함에 있어서도 매우 편리하다. 그러나, 중앙 처리 장치와 메모리의 데이터 처리 속도에 의존적이며 데이터를 처리함에 있어서 병렬 처리가 용이하지 않아 데이터를 보다 고속으로 처리함에 있어서는 어느 정도 한계가 있다. Pattern matching techniques can be classified into two types. The first is to find patterns in software using various forms of central processing units and memory. This technique is easy to design algorithms and very convenient to implement the algorithm in software. However, there are some limitations in processing data at higher speed since it depends on the data processing speed of the central processing unit and the memory, and parallel processing is not easy in processing the data.

이러한 한계를 극복하기 위해, CAM(Content Addressable Memory)을 활용하여 하드웨어적으로 패턴을 찾는 기술이 있다. 이 기술은 CAM의 병렬 처리 기능을 활용한 것으로, CAM은 복수의 엔트리를 포함하고 있다. 각 엔트리는 찾고자 하는 데이터를 저장할 수 있는 메모리와 그 메모리에 저장되어 있는 데이터와 CAM에 입력되 는 데이터를 비교할 수 있는 비교기를 포함하고 있다. 또한, CAM에 입력되는 데이터는 CAM에 포함되는 모든 엔트리에 저장되어 있는 데이터와 동시에 비교된다. CAM의 이러한 기능을 활용하면, 응용 계층의 데이터로부터 특정 정보를 찾아냄에 있어서 보다 고속으로 그 데이터를 처리할 수가 있다In order to overcome this limitation, there is a technique of finding a pattern in hardware using CAM (Content Addressable Memory). This technology takes advantage of the parallel processing capabilities of the CAM, which includes multiple entries. Each entry contains a memory to store the data you are looking for, and a comparator to compare the data stored in that memory with the data entered into the CAM. In addition, the data input to the CAM is simultaneously compared with the data stored in all entries included in the CAM. By utilizing these features of CAM, it is possible to process the data faster in finding specific information from the data of the application layer.

응용 계층의 데이터는 ASCII 문자와 같은 형태의 문자들로 구성된다. 즉, 응용 계층의 데이터는 단순한 비트들의 조합이 아니라 보다 의미 있는 1-바이트(1-byte) 문자들의 조합이라고 볼 수 있다. 따라서 응용 계층의 데이터는 통신 네트워크 장비 또는 시스템에서 최소 1-바이트 문자 단위로 처리된다.Data in the application layer consists of characters in the form of ASCII characters. In other words, the data of the application layer is not a simple combination of bits but a more meaningful combination of 1-byte characters. Therefore, data in the application layer is processed in units of at least one byte character in communication network equipment or systems.

응용 계층의 데이터에서 찾고자 하는 패턴은 1-바이트 문자들의 조합이다. 일반적으로, 패턴은 보다 의미 있는 문자열들의 조합이라고 할 수 있다. 많은 패턴 매칭 장치들이 단순한 문자열만을 찾는 것에 그치지 않고, 문자열들의 조합으로 발생될 수 있는 패턴을 찾기 위한 기술들을 포함하고 있다. The pattern to look for in the application layer is a combination of one-byte characters. In general, a pattern is a combination of more meaningful strings. Many pattern matching devices do not just look for simple strings, but include techniques for finding patterns that can be generated from a combination of strings.

그 대표적인 것이 정규 표현 매칭(Regular Expression Matching) 기술이다. 정규 표현은 특정 문자의 집합 또는 문자열을 기호로 바꾸어 놓는 방법으로, 문자열의 집합을 정확하게 표현하기 위해 쓰이는 표현 규칙, 언어의 문법 정의나 검색해야 할 문자열의 지정에 쓰인다. 정규 표현 매칭 기술은 소프트웨어적인 기술에 가깝다. 그러나 최근 그 일부를 하드웨어적으로 처리하기 위한 노력들이 진행되고 있다. A typical example is Regular Expression Matching. Regular expressions are a way of converting a set of characters or a string into a symbol, which is used in the expression rules used to accurately represent a set of strings, the definition of a language's grammar, or the specification of a string to be searched. Regular expression matching techniques are more like software techniques. However, efforts have recently been made to process some of them in hardware.

정규 표현 매칭 기술은 결정적 유한 자동 기계 장치(Deterministic Finite Automaton) 기술과 비결정적 유한 자동 기계 장치(Nondeterministic Finite Automaton) 기술로 분류할 수 있다. 자동 기계 장치는 이산 시간(Discrete Time) 단위로 운영되는 것으로 가정한다. 즉, 자동 기계 장치는 그 장치가 기본적으로 동작하는데 필요한 클록(Clock)에 따라 운영된다. Regular expression matching techniques can be classified into deterministic finite automaton technology and non-deterministic finite automaton technology. It is assumed that the automatic machinery is operated in discrete time units. In other words, the automatic mechanical device operates according to the clock required for the device to operate basically.

자동 기계 장치는 어떠한 초기 상태에 머무르다 특정 조건이 가해지면 다른 상태로 천이한다. 따라서, 정규 표현 매칭 기술은 이러한 특성을 활용하여 특정 문자 또는 문자열이 검출될 때마다 자동 기계 장치의 상태를 천이시킴으로 해서 궁극적으로 어떠한 상태에 이르면 특정 패턴이 검출되었음을 나타낼 수 있다. An automatic machine stays in one initial state and transitions to another when certain conditions are applied. Thus, regular expression matching techniques can exploit this property to transition the state of the automatic machine whenever a particular character or string is detected, ultimately indicating that a certain pattern has been detected.

결정적 유한 기계 장치는 다음 상태로의 천이가 현재 상태와 가해지는 조건에 의해 유일하게 결정되며 동시에 여러 상태로 천이할 수가 없다. 따라서 장치에 데이터가 입력되기 시작하면 상태 천이를 계속하다가 특정 상태에 이르거나 데이터의 입력이 종료되면 상태 천이를 종료할 수 있다. The deterministic finite mechanism is uniquely determined by the current state and the conditions under which the transition to the next state is impossible and cannot transition to several states at the same time. Therefore, when data starts to be input to the device, the state transition may be continued, and when the specific state is reached or the data input is terminated, the state transition may be terminated.

결정적 유한 기계 장치는 입력되는 데이터에 찾고자 하는 패턴들이 복수 포함되어 있는 경우, 그 포함된 패턴들을 순차적으로 검색하며, 맨 처음 검출되는 패턴에 대응되는 상태에 이르게 되면 상태 천이를 종료한다. 또한 결정적 유한 기계 장치를 활용하는 패턴 매칭 장치는 그 검출된 패턴에 따라 입력되는 데이터를 처리한다. If a definite finite machine apparatus includes a plurality of patterns to be searched for in the input data, the determined finite machine apparatus sequentially searches for the included patterns, and terminates the state transition when a state corresponding to the first detected pattern is reached. The pattern matching device utilizing the deterministic finite machine device also processes the input data according to the detected pattern.

비결정적 유한 기계 장치는 현재 상태에서 다음 상태로 천이할 때 동시에 여러 상태로 천이할 수가 있다. 즉, 이것은 동시에 복수의 상태 천이 프로세스들이 공존한다는 의미와 같다. 따라서 장치에 데이터가 입력되기 시작하면 상태 천이를 계속하다가 특정 상태에 이르더라도 현재 공존하고 있는 다른 상태 천이 프로세스 들을 종료할 필요는 없다.A non-deterministic finite mechanism can transition to several states at the same time as it transitions from the current state to the next. In other words, this means that multiple state transition processes coexist at the same time. Therefore, when data starts to be input to the device, the state transition continues, and even if a certain state is reached, other state transition processes that currently coexist do not need to be terminated.

비결정적 유한 기계 장치는 입력되는 데이터에 찾고자 하는 패턴들이 복수 포함되어 있는 경우, 그 포함된 패턴들을 동시에 검색하는 것이 가능하며, 그 중 하나의 패턴이 검출되면 상태 천이를 종료할 수 있다. 또한 비결정적 유한 기계 장치를 활용하는 패턴 매칭 장치는 그 검출된 패턴에 따라 입력되는 데이터를 처리한다. When the non-deterministic finite-mechanical apparatus includes a plurality of patterns to be searched for in the input data, the non-deterministic finite-mechanical apparatus may search for the included patterns at the same time, and terminate the state transition when one of the patterns is detected. A pattern matching device utilizing non-deterministic finite mechanical devices also processes the input data in accordance with the detected pattern.

이와 같이 종래 단일 CAM으로 그 엔트리에 포함된 문자열을 찾는 문자열 매칭과 검출된 문자열로 구성되는 정규 표현을 찾는 정규 표현 매칭을 동시에 수행하는 패턴 매칭 장치의 경우, 그 장치가 찾고자 하는 패턴에 포함되는 문자열들의 수가 많아질수록 그리고 그 포함된 문자열의 길이가 길어질수록 정규 표현 매칭에 따른 상태 천이가 급속히 증가함에 따라 CAM에 포함되는 메모리 및 상태 천이를 위해 사용되는 메모리가 크게 증가한다.As described above, in the case of a pattern matching device which simultaneously performs a string matching to find a string included in the entry and a regular expression matching to find a regular expression consisting of the detected string, the string included in the pattern to be searched for by the single single CAM. As the number of fields increases and the length of the string included increases, the memory included in the CAM and the memory used for the state transition greatly increase as the state transition according to regular expression matching increases rapidly.

따라서, 본 발명은 데이터가 1 클록에 n-바이트씩 고속으로 처리되는 높은 처리 용량의 통신 네트워크 장비 또는 시스템에서 메모리를 효율적으로 사용할 수 있는 패턴 매칭 방법 및 장치를 제공한다. Accordingly, the present invention provides a pattern matching method and apparatus that can efficiently use memory in a high processing capacity communication network equipment or system in which data is processed at high speed by n-bytes per clock.

상기 본 발명의 기술적 과제를 달성하기 위한 본 발명의 하나의 특징인 패턴 매칭 장치의 패턴 매칭 방법은,The pattern matching method of the pattern matching device which is one feature of the present invention for achieving the technical problem of the present invention,

연속적으로 입력되는 문자열 스트림 내에 검색하고자 하는 패턴에 포함되는 제1 문자열이 있는지 확인하고, 상기 제1 문자열을 나타내는 문자열 인덱스 및 상기 문자열 인덱스에 대응되는 오프셋 신호를 출력하는 제1 문자열 매칭 단계; 상기 제1 문자열을 나타내는 문자열 인덱스들로 구성될 수 있는 제2 문자열이 있는지 확인하고, 상기 제2 문자열을 나타내는 문자열 ID를 출력하는 제2 문자열 매칭 단계; 상기 문자열 인덱스를 지연시키는 단계; 상기 문자열 ID와 상기 지연시킨 문자열 인덱스를 이용하여 패턴 키를 생성하는 단계; 및 생성한 상기 패턴 키들로 구성될 수 있는 정규 표현들 중에 검색하고자 하는 상기 패턴을 나타내는 정규 표현을 검출하는 단계를 포함한다.A first string matching step of checking whether there is a first string included in a pattern to be searched in a continuously input string stream, and outputting a string index representing the first string and an offset signal corresponding to the string index; A second string matching step of checking whether there is a second string, which may be composed of string indices representing the first string, and outputting a string ID representing the second string; Delaying the string index; Generating a pattern key using the string ID and the delayed string index; And detecting a regular expression representing the pattern to be searched among regular expressions that may be composed of the generated pattern keys.

상기 본 발명의 기술적 과제를 달성하기 위한 본 발명의 또 다른 특징인 패턴 매칭 장치는,Pattern matching device is another feature of the present invention for achieving the technical problem of the present invention,

연속적으로 입력되는 문자열 스트림 내에 검색하고자 하는 패턴에 포함되는 제1 문자열이 있는지 확인하고, 상기 제1 문자열을 나타내는 문자열 인덱스 및 상기 제1 문자열 인덱스에 대응되는 오프셋 신호를 출력하는 제1 문자열 매칭부; 상기 제1 문자열 매칭부로부터 출력되는 오프셋 신호 및 문자열 인덱스를 이용하여 상기 제1 문자열을 나타내는 문자열 인덱스들로 구성되는 제2 문자열이 있는지 확인하고, 상기 제2 문자열을 나타내는 문자열 ID를 출력하는 제2 문자열 매칭부; 상기 문자열 인덱스를 지연시키는 지연부; 상기 제2 문자열 매칭부에서 출력한 상기 문자열 ID와 상기 지연부에서 지연시킨 상기 문자열 인덱스를 이용하여 패턴 키를 생성하는 키 발생부; 및 상기 키 발생부에서 생성한 상기 패턴 키들로 구성될 수 있는 정규 표현들 중에 검색하고자 하는 상기 패턴을 나타내는 정규 표현을 검출하는 정규 표현 매칭부를 포함한다.A first string matching unit configured to check whether there is a first string included in a pattern to be searched in a continuously input string stream, and to output a string index representing the first string and an offset signal corresponding to the first string index; A second string that checks whether there is a second string composed of string indexes representing the first string using an offset signal and a string index output from the first string matching unit, and outputs a string ID representing the second string A string matching unit; A delay unit for delaying the string index; A key generation unit generating a pattern key using the string ID output from the second string matching unit and the string index delayed by the delay unit; And a regular expression matching unit detecting a regular expression representing the pattern to be searched among regular expressions that may be configured of the pattern keys generated by the key generator.

본 발명의 실시 예에 의하면, 패턴 매칭 장치에 필요한 메모리를 보다 효율적으로 사용할 수 있으며, 문자열 매칭과 정규 패턴 매칭을 분리함으로써 필요한 경우 그 중 한 부분만 확장이 가능해질 수 있다.According to an embodiment of the present invention, the memory required for the pattern matching apparatus can be used more efficiently, and by separating the string matching and the regular pattern matching, only one portion thereof can be expanded if necessary.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.DETAILED DESCRIPTION Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art may easily implement the present invention. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In the drawings, parts irrelevant to the description are omitted in order to clearly describe the present invention, and like reference numerals designate like parts throughout the specification.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 "…부", "…기", "모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.Throughout the specification, when a part is said to "include" a certain component, it means that it can further include other components, without excluding other components unless specifically stated otherwise. Also, the terms " part, "" module," and " module ", etc. in the specification mean a unit for processing at least one function or operation and may be implemented by hardware or software or a combination of hardware and software have.

이제 본 발명의 실시예에 따른 다문자 병렬 데이터 스트림에 대한 패턴 매칭 방법 및 장치에 대하여 도면을 참고로 하여 상세하게 설명한다. 본 발명의 실시예에서는 ASCII 문자와 같은 형태의 문자들로 구성된 응용 계층의 데이터를 처리함에 있어, 데이터가 n-바이트(여기서, n은 1보다 큰 정수임)씩 입력된다고 가정하여 설명한다.Now, a pattern matching method and apparatus for a multi-character parallel data stream according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings. In the embodiment of the present invention, it is assumed that data is input by n-bytes (where n is an integer greater than 1) in processing data of an application layer composed of characters in the form of ASCII characters.

본 발명의 실시예에서는 문자열은 시간상으로 연속되는 문자들의 순차열을 의미한다. 또한, 본 발명의 실시예에서는 패턴은 문자 및 문자열들의 조합으로 나타낼 수 있는 형태를 의미한다. 예를 들어, "A High Speed and Performance Pattern Matching System for Network Security"라는 문장에서 "Pattern Matching"이나 "Network Security"는 이 문장에서 찾을 수 있는 문자열이다. In an embodiment of the present invention, a string means a sequence of characters that are contiguous in time. In addition, in the embodiment of the present invention, the pattern refers to a form that can be represented by a combination of characters and strings. For example, in the sentence "A High Speed and Performance Pattern Matching System for Network Security", "Pattern Matching" or "Network Security" is a string that can be found in this sentence.

뿐만 아니라 이 문장 전체도 일종의 문자열로 취급할 수 있다. 그러나 이 문장에서 "High Speed System"이라는 문자열은 존재하지 않는다. 다만, "High Speed System"이라는 문자열은 이 문장에서 찾을 수 있는 "High Speed"와 "System" 두 문자열들의 조합으로 구성된 패턴이라 할 수 있다.In addition, the whole sentence can be treated as a string. However, the string "High Speed System" does not exist in this statement. However, the string "High Speed System" is a pattern composed of a combination of the two strings "High Speed" and "System" found in this sentence.

도 1은 본 발명의 실시예에 따른 패턴 매칭 장치의 구조도이다.1 is a structural diagram of a pattern matching apparatus according to an embodiment of the present invention.

도 1에 도시된 바와 같이, 본 발명의 실시예에 따른 패턴 매칭 장치는 제1 문자열 매칭부(100), 제2 문자열 매칭부(200), 지연부(500), 키 발생부(300) 및 정규 표현 매칭부(400)를 포함한다.As shown in FIG. 1, the pattern matching apparatus according to an embodiment of the present invention includes a first string matching unit 100, a second string matching unit 200, a delay unit 500, a key generator 300, and the like. The regular expression matching unit 400 is included.

제1 문자열 매칭부(100)는 동시(또는 1클록)에 n-바이트씩 입력되는 데이터 스트림(Data Stream)(또는 '문자열 스트림'이라고도 지칭) 내에, 특징적인 n-바이트 문자열(또는 '제1 문자열'이라고도 지칭)들이 있는지를 검색한다. 그리고 그에 대한 결과로 n-바이트 문자열 인덱스 및 오프셋 신호를 출력한다.The first string matching unit 100 is a characteristic n-byte character string (or 'first') in a data stream (or 'string stream') input by n-bytes at the same time (or one clock). Strings, also called strings'). As a result, n-byte string index and offset signals are output.

제2 문자열 매칭부(200)는 제1 문자열 매칭부(100)에서 출력된 n-바이트 문자열 인덱스 및 오프셋 신호를 활용하여, 보다 의미 있고 완성된 형태의 특징적인 문자열(또는 '제2 문자열'이라고도 지칭)들이 있는지를 검색한다. 그리고 그 결과로 문자열 ID를 출력한다. 여기서 특징적인 문자열들이라 함은, 최종적으로 찾고자 하는 패턴들에 포함되는 문자열을 의미한다. The second string matching unit 200 utilizes an n-byte string index and an offset signal output from the first string matching unit 100, so that the characteristic string (or 'second string') of a more meaningful and completed form may also be used. Search for presence). And the result is the string ID. Here, the characteristic strings refer to character strings included in patterns to be finally searched for.

지연부(500)는 제2 문자열 매칭부(200)가 제1 문자열 매칭부(100)에서 출력되는 데이터를 처리하고, 그 결과를 출력하기까지에 소요되는 시간만큼 제1 문자열 매칭부(100)에서 출력되는 n-바이트 문자열 인덱스를 지연시킨다. The delay unit 500 processes the data output from the first string matching unit 100 by the second string matching unit 200, and outputs the result of the first string matching unit 100 by the time required to output the result. Delay n-byte string index output from.

키 발생부(300)는 제2 문자열 매칭부(200)의 검색 결과인 문자열 ID와, 지연부(500)에 의해 지연된 제1 문자열 매칭부(100)에서 출력된 n-바이트 문자열 인덱스를 포함하는 패턴 키를 발생시킨다. The key generating unit 300 includes a string ID which is a search result of the second string matching unit 200 and an n-byte string index output from the first string matching unit 100 delayed by the delay unit 500. Generate a pattern key.

정규 표현 매칭부(400)는 키 발생부(300)에서 발생된 패턴 키들로 구성될 수 있는 정규 표현(Regular Expression)들 중에서, 찾고자 하는 패턴들에 따른 정규 표현들이 있는지를 검색한다. 여기서 정규 표현들은 키 발생부(300)에서 발생될 수 있는 패턴 키들로 구성되며, 찾고자 하는 패턴들은 이러한 정규 표현들로 표현 가능한 것들이다.The regular expression matching unit 400 searches whether there are regular expressions according to patterns to be searched among regular expressions that may be composed of pattern keys generated by the key generator 300. Here, the regular expressions are composed of pattern keys that can be generated in the key generator 300, and the patterns to be searched are those that can be expressed by these regular expressions.

다음은, 상기 구성 요소 중 제1 문자열 매칭부(100)의 세부 구조에 대하여 도 2를 참조하여 설명하기로 한다.Next, a detailed structure of the first string matching unit 100 among the above components will be described with reference to FIG. 2.

도 2는 본 발명의 실시예에 따른 제1 문자열 매칭부의 구조도이다.2 is a structural diagram of a first string matching unit according to an embodiment of the present invention.

도 2에 도시된 바와 같이, 본 발명의 실시예에 따른 제1 문자열 매칭부(100)는 지연기(110), 분배기(120), 연상 메모리인 복수의 컨텐트 주소지정가능 메모리(Content Addressable Memory, 이하 "CAM"이라 지칭)(130) 및 오프셋 검사기(140)를 포함한다.As shown in FIG. 2, the first string matching unit 100 according to an embodiment of the present invention may include a plurality of content addressable memories, which are a delay unit 110, a divider 120, and an associative memory. 130) and an offset checker 140.

지연기(110)는 입력되는 n-바이트 데이터(혹은 문자열) 스트림을 1 클록만큼 지연시킨다. 참고로, 제1 문자열 매칭부(100)로 데이터 스트림이 n-바이트씩 입력될 때, 연속되는 n-바이트와 n-바이트 사이의 시간 간격은 1 클록이다. 즉, 1 클록에 n-바이트씩 제1 문자열 매칭부(100)로 데이터가 입력된다. 여기서 클록은 본 발명의 실시예에 따른 장치가 기계적으로 동작하는데 필요한 기본 단위 시간을 의미한다.The delay unit 110 delays the input n-byte data (or string) stream by one clock. For reference, when the data stream is input by n-bytes to the first string matching unit 100, the time interval between consecutive n-bytes and n-bytes is 1 clock. That is, data is input to the first string matching unit 100 by n-bytes at one clock. Here, the clock refers to the basic unit time required for the mechanical operation of the device according to the embodiment of the present invention.

분배기(120)는 지연기(110)에서 출력되는 n-바이트 데이터 스트림을 상위로 하고, 제1 문자열 매칭부(100)로 새로이 입력되는 n-바이트 데이터 스트림을 하위로 하는 2n-바이트 데이터 스트림(또는 '제3 문자열 스트림'이라고도 지칭함)을 만든다. 그리고, CAM 1(130-1)에는 2n-바이트 데이터의 상위 첫 번째 바이트부터 n 번째 바이트를 출력하고, CAM 2(130-2)에는 2n-바이트 데이터의 상위 두 번째 바이트부터 (n+1) 번째 바이트를 출력한다. The distributor 120 uses the n-byte data stream outputted from the delayer 110 as an upper part and the n-byte data stream newly input to the first string matching unit 100 as a lower 2n-byte data stream ( Or 'third string stream'). The CAM 1 130-1 outputs the n th byte from the first byte of the 2n-byte data, and the CAM 2 130-2 outputs the n th byte from the upper second byte of the 2n-byte data (n + 1). Output the first byte.

이와 같은 방식으로, 임의의 CAM k에는 상기 2n-바이트 데이터의 상위 k 번째 바이트부터 (n+k-1)번째 바이트까지의 n-바이트 데이터 스트림(또는 '제4 문자열 스트림'이라고도 지칭함)을 출력한다. 여기서 k는 1부터 n까지의 정수이다. 이때, 데이터의 형태에 대해 도 3을 참조로 먼저 설명하기로 한다.In this way, an arbitrary n-byte data stream (also referred to as a 'fourth string stream') from the upper k th byte to the (n + k-1) th byte of the 2n-byte data is output to any CAM k. do. Where k is an integer from 1 to n. In this case, the form of data will be described first with reference to FIG. 3.

도 3은 본 발명의 실시예에 따른 데이터의 형태를 나타낸 구조도이다.3 is a structural diagram showing the form of data according to an embodiment of the present invention.

다시 말해, 도 3은 도 2의 페이즈(Phase) 1부터 페이즈 3까지에 해당되는 데이터의 형태를 나타낸 것이다. 예를 들어서, n이 4라고 가정하고, "A High Speed and Performance Pattern Matching System for Network Security"라는 데이터 스트림이 입력된다고 가정한다. In other words, FIG. 3 illustrates a form of data corresponding to phases 1 to 3 of FIG. 2. For example, suppose n is 4, and a data stream of "A High Speed and Performance Pattern Matching System for Network Security" is input.

그러면 도 3의 페이즈 1(150-1)과 같이 t=0인 시점부터 t=17인 시점까지, 1 클록에 4 바이트씩 입력된다. 여기서 t는 상기 데이터 스트림이 4 바이트씩 제1 문자열 매칭부(100)에 입력되는 시점을 나타낸다.Then, as in phase 1 (150-1) of FIG. 3, four bytes are input to one clock from the time point t = 0 to the time point t = 17. In this case, t represents a time point at which the data stream is input to the first string matching unit 100 by 4 bytes.

지연기(110)는 입력되는 4-바이트 데이터를 1 클록 지연시키기 때문에, 페이즈 2에서는 t=1인 시점부터 t=18인 시점까지 상기 데이터를 4-바이트씩 출력한다. 이와 같이 페이즈 2(150-2)에는 t=1인 시점부터 t=18인 시점까지 지연기(110)에서 출력되는 데이터와 제1 문자열 매칭부(100)로 입력되는 데이터가 도 3의 형태로 분배기(120)에 입력된다. Since the delay unit 110 delays the input 4-byte data by one clock, in phase 2, the delay unit 110 outputs the 4-byte data from the time point t = 1 to the time point t = 18. As described above, in phase 2 150-2, data output from the delay unit 110 and data input to the first string matching unit 100 are displayed in the form of FIG. 3 from a time point t = 1 to a time point t = 18. Input to the dispenser 120.

n이 4라고 가정하였기 때문에, 제1 문자열 매칭부(100)는 최소 4 개의 CAM을 포함한다. 페이즈 2(150-2)에서 형성된 8-바이트 데이터는 4개의 CAM 각각에 4 바이트씩, 도 3의 페이즈 3(150-3)과 같은 형태로 입력된다. Since n is assumed to be 4, the first string matching unit 100 includes at least four CAMs. The 8-byte data formed in phase 2 150-2 is input in the form of phase 3 150-3 of FIG. 3 by 4 bytes for each of the four CAMs.

데이터 스트림을 구성하는 문자들 중 순차적으로 먼저 나타나는 문자가 상위에 놓이도록 4-바이트 데이터를 정렬하면 다음과 같다. 즉, 페이즈 3에(150-3)서는 페이즈 2(150-2)에서 형성된 8-바이트 데이터의 상위 첫 번째 바이트부터 네 번째 바이트는 CAM 1에, 상위 두 번째 바이트부터 다섯 번째 바이트는 CAM 2에, 상위 세 번째 바이트부터 여섯 번째 바이트는 CAM 3에, 상위 네 번째 바이트부터 일곱 번째 바이트는 CAM 4에 입력되도록 분배한다.If the 4-byte data is arranged such that the first character among the characters constituting the data stream is placed in the upper order, it is as follows. That is, in phase 3 (150-3), the upper first to fourth bytes of the 8-byte data formed in phase 2 (150-2) are in CAM 1, and the upper second bytes in the fifth byte are in CAM 2. For example, the upper third to sixth bytes are allocated to CAM 3 and the upper fourth to seventh bytes are input to CAM 4.

제1 문자열 매칭부(100)는 도 2에 도시된 바와 같이 최소 n개의 CAM(130-1 ∼ 130-n)을 포함한다. n은 상기에서 설명한 바와 같이, 제1 문자열 매칭부(100)에 매 클록마다 동시에 입력되는 데이터의 바이트 수이다. 모든 CAM은 동일한 구조를 가지며, CAM에 저장되는 컨텐트들도 동일하다. The first string matching unit 100 includes at least n CAMs 130-1 to 130-n as shown in FIG. 2. As described above, n is the number of bytes of data simultaneously input to the first string matching unit 100 every clock. All CAMs have the same structure, and the contents stored in the CAM are also the same.

다시 말해서, 각 CAM에 동일한 n-바이트 문자열을 입력하면, 동일한 결과를 얻는다. 단, 각 CAM에는 도 3에 표현된 바와 같이, 분배기(120)에서 출력되는 서로 다른 n-바이트 데이터가 입력된다.In other words, entering the same n-byte character string into each CAM yields the same result. However, as shown in FIG. 3, different n-byte data output from the distributor 120 is input to each CAM.

도 2의 CAM(130)은 복수의 엔트리를 포함한다. CAM(130)의 엔트리에는 n-바이트 문자열이 컨텐트로서 저장된다. CAM(130)은 분배기(120)에서 출력되는 n-바이트 데이터가 입력되면, 모든 엔트리들에 저장되어 있는 컨텐트들과 n-바이트 데이터를 동시에 비교한다. 그리고 그 결과 일치되는 엔트리가 존재하면 그 엔트리에 해당되는 히트 신호(Hit Signal)를 발생시킨다. CAM 130 of FIG. 2 includes a plurality of entries. In the entry of the CAM 130, an n-byte string is stored as content. When the n-byte data output from the distributor 120 is input, the CAM 130 compares the n-byte data and the contents stored in all the entries simultaneously. As a result, if a matching entry exists, a hit signal corresponding to the entry is generated.

여기서 CAM(130)에 입력되는 n-바이트 데이터는 문자열로 표현 가능하다. 추가적으로 CAM은 히트 신호를 발생시킨 엔트리에 대한 인덱스(Index)를 출력한다. 이때, 인덱스는 CAM의 엔트리가 CAM 내에서 위치하는 곳을 주소의 형태로 표현한 것이다. 추후 설명의 편의를 위하여 이 인덱스를 n-바이트-문자열 인덱스라 칭하며, 문자열들이 저장되는 형태에 대해 도 4를 참조로 설명하기로 한다.Here, n-byte data input to the CAM 130 may be represented by a character string. In addition, the CAM outputs an index for the entry that generated the hit signal. In this case, the index represents the position where the CAM entry is located in the CAM in the form of an address. For convenience of explanation later, this index is referred to as an n-byte-string index, and a form in which strings are stored will be described with reference to FIG. 4.

도 4는 본 발명의 실시예에 따른 n-바이트 문자열들이 저장되는 형태를 나타 낸 예시도이다.4 is an exemplary diagram illustrating a form in which n-byte character strings are stored according to an embodiment of the present invention.

도 4는 예를 들어 n이 4일 때 "High", "Speed", "Performance", "System", "Network" 등의 문자열을 찾고자 하는 경우, 도 2의 CAM(130)에 그 문자열들이 저장되는 형태를 나타낸다. 상기 n-바이트 문자열들을 모두 4-바이트씩 나누어 CAM(130)에 저장되다. 이때, "High"를 제외한 나머지 4 문자들은 모두 4-바이트씩 정확하게 나누어 떨어지지 않는다. For example, when n is 4, the strings such as "High", "Speed", "Performance", "System", and "Network" are to be found. The strings are stored in the CAM 130 of FIG. It shows the form to become. The n-byte character strings are divided into four bytes and stored in the CAM 130. At this time, all four characters except for "High" are not divided exactly by four bytes.

이 경우에는 부족한 비트에 무관심 항(Don't-Care Term)을 추가하여 4-바이트 문자열을 완성한다. 예를 들어서, "Speed"는 "Spee"와 "d"로 나누어지기 때문에 "d"에 무관심 항을 추가하여 "d***"의 형태로 4-바이트 문자열을 완성한다. 여기서 "*"는 무관심 항을 의미한다. 무관심 항은 그 위치에 아무 문자나 나타나도 상관없음을 의미한다. 도 4에서 ss1, ss2, … 등은 히트 신호들을 나타낸다.In this case, add a Don't-Care Term to the missing bits to complete the 4-byte string. For example, "Speed" is divided into "Spee" and "d", so add an indifference term to "d" to complete a four-byte string in the form of "d ***". Where "*" means the indifference term. An indifference term means that any letter may appear in that position. In FIG. 4, ss 1 , ss 2 ,... And the like represent hit signals.

상기한 바와 같이, n이 4일 때 제1 문자열 매칭부(100)는 최소 4 개의 CAM을 포함하며, 각 CAM에는 도 4와 같은 형태로 찾고자 하는 문자열들이 저장되어 있다. 도 3의 페이즈 3에 해당되는 데이터가 각 CAM에 입력되고, CAM이 입력되는 4-바이트 데이터를 처리하고 출력하기까지에 소요되는 시간이 1 클록이라면, 도 2의 페이즈 4에 해당되는 각 CAM의 출력은 도 5에 표현된 바와 같다. 도 5는 본 발명의 실시예에 따른 CAM에서 출력되는 히트 신호들 및 인덱스의 형태를 나타낸 예시도이다.As described above, when n is 4, the first string matching unit 100 includes at least four CAMs, and the strings to be searched are stored in each CAM as shown in FIG. If data corresponding to phase 3 of FIG. 3 is input to each CAM, and the time required for processing and outputting 4-byte data inputted by the CAM is one clock, each CAM corresponding to phase 4 of FIG. The output is as represented in FIG. 5. 5 is an exemplary view showing the form of the hit signals and the index output from the CAM according to an embodiment of the present invention.

도 3에 표현된 바와 같이, CAM 1에는 페이즈 3(150-3)의 첫 번째 데이터 스 트림이 4 바이트씩 입력된다. CAM 1은 도 4에 표현된 바와 같은 형태의 컨텐트들을 저장하고 있다. 따라서, CAM 1에서는 "Netw"와 "ork*"가 검출된다. As shown in FIG. 3, the first data stream of phase 3 (150-3) is input by 4 bytes into CAM 1. CAM 1 stores contents of the type as represented in FIG. 4. Therefore, "Netw" and "ork *" are detected in CAM 1.

상기한 바와 같이 CAM 1이 데이터를 처리하고 그 결과를 출력하기까지에 소요되는 시간이 1 클록이라면, CAM 1은 도 5에 표현된 바와 같이, t=16인 시점에 "Netw"가 검출되었음을 알리는 히트 신호 ss9를 출력하고, t=17인 시점에 "ork*"가 검출되었음을 알리는 히트 신호 ss10을 출력한다. 또한 이와 동시에 인덱스 9와 10을 출력한다. As described above, if the time required for the CAM 1 to process data and output the result is 1 clock, the CAM 1 indicates that "Netw" has been detected at the time t = 16, as shown in FIG. The hit signal ss 9 is output, and the hit signal ss 10 indicating that "ork *" is detected at the time t = 17 is output. At the same time, indexes 9 and 10 are output.

그리고, 도 3에 표현된 바와 같이, CAM 2에는 페이즈 3의 두 번째 데이터 스트림이 4 바이트씩 입력된다. CAM 2는 도 4에 표현된 바와 같은 형태의 컨텐트들을 저장하고 있다. 따라서, CAM 2에서는 "Perf", "orma", "nce*"가 검출된다. CAM 2는, 도 5에 표현된 바와 같이, t=6인 시점에 "Perf"가 검출되었음을 알리는 히트 신호 ss4를 출력하고, t=7인 시점에 "orma"가 검출되었음을 알리는 히트 신호 ss5를 출력하고, t=8인 시점에 "nce*"가 검출되었음을 알리는 히트 신호 ss6을 출력한다. 또한 이와 동시에 인덱스 4, 5, 6을 출력한다. As shown in FIG. 3, the second data stream of phase 3 is input by 4 bytes to CAM 2. CAM 2 stores contents of the type as represented in FIG. 4. Therefore, in CAM 2, "Perf", "orma", and "nce *" are detected. As shown in FIG. 5, the CAM 2 outputs a hit signal ss 4 indicating that "Perf" has been detected at a time t = 6, and a hit signal ss 5 indicating that "orma" has been detected at a time t = 7. Outputs a hit signal ss 6 indicating that "nce *" is detected at a time t = 8. At the same time, indexes 4, 5, and 6 are output.

이와 같은 방식으로, CAM 3에서는 "High", "Syst", "em**"가 검출되며, t=2, t=13, t=14인 시점에 각각 그에 해당되는 히트 신호 ss1, ss7, ss8이 출력되고 이와 동시에 인덱스 1, 7, 8이 출력된다. 또한 같은 방식으로, CAM 4에서는 "Spee"와 "d***"가 검출되며, t=3과 t=4인 시점에 각각 그에 해당되는 히트 신호 ss2와 ss3이 출력되고 이와 동시에 인덱스 2와 3이 출력된다.In this way, “High”, “Syst”, and “em **” are detected in CAM 3, and the corresponding hit signals ss 1 and ss 7 at t = 2, t = 13, and t = 14, respectively. , ss 8 is output and at the same time indexes 1, 7, 8 are output. In the same way, "Spee" and "d ***" are detected in CAM 4, and corresponding hit signals ss 2 and ss 3 are output at the time points t = 3 and t = 4, and at the same time, index 2 And 3 are output.

다음, 도 2의 오프셋 검사기(140)는 복수의 CAM에서 출력되는 히트 신호들을 하나로 통합하여 출력하고, 복수의 CAM에서 출력되는 n-바이트 문자열 인덱스들을 하나로 통합하여 n-바이트 문자열을 대표하는 n-바이트 문자열 인덱스를 출력한다. 이 과정에서 도 2의 복수의 CAM(130-1 ∼ 130-n)에서 동시에 히트 신호들과 인덱스들이 출력될 때에는, 그 중 우선 순위가 높은 히트 신호와 인덱스를 선택하여 출력한다. 또한 오프셋 검사기(140)는 연속적으로 히트 신호들이 출력될 때, 그 연속되는 히트 신호들이 동일한 CAM에서 출력되는 것인지의 여부를 알리는 오프셋 신호를 출력한다.Next, the offset checker 140 of FIG. 2 integrates and outputs the hit signals output from the plurality of CAMs into one, and n- representing the n-byte strings by integrating the n-byte string indices output from the plurality of CAMs into one. Output the byte string index. In this process, when the hit signals and the indexes are simultaneously output from the plurality of CAMs 130-1 to 130-n of FIG. 2, the hit signals and the index having the highest priority are selected and output. In addition, the offset checker 140 outputs an offset signal indicating whether the successive hit signals are output from the same CAM when the hit signals are continuously output.

예를 들어서, n이 4일 때 도 5에 표현된 바와 같은 형태의 결과들이 CAM 1, CAM 2, CAM 3, CAM 4에서 출력되면, 도 2의 오프셋 검사기(140)는 도 6에 표현된 바와 같이 하나로 통합된 히트 신호와 n-바이트-문자열 인덱스를 출력한다. 도 6은 본 발명의 실시예에 따른 오프셋 검사 수단에서 출력되는 통합된 히트 신호와 인덱스의 형태를 나타내는 예시도이다.For example, when n is 4 and the results of the form as shown in FIG. 5 are output from CAM 1, CAM 2, CAM 3, and CAM 4, the offset checker 140 of FIG. 2 is represented as shown in FIG. 6. Together we output a single hit signal and an n-byte-string index. FIG. 6 is an exemplary view illustrating the form of an integrated hit signal and an index output from an offset check means according to an exemplary embodiment of the present invention.

그리고 도 5에 표현된 바와 같이, CAM 1에서는 ss9와 ss10이 연속적으로 출력된다. 이 때 오프셋 검사기(140)는, 도 6에 표현된 바와 같이, ss9와 ss10을 출력할 때, ss10이 ss9와 동일한 CAM에서 출력되었음을 알리는 신호(so)를 출력한다. 같은 방식으로, CAM 2에서는 ss4, ss5, ss6이 연속적으로 출력되므로, ss5와 ss6은 ss4와 동일한 CAM에서 출력되었음을 알리는 신호를 출력한다. As shown in FIG. 5, in CAM 1, ss 9 and ss 10 are continuously output. In this case, as shown in FIG. 6, when the offset checker 140 outputs ss 9 and ss 10 , the offset checker 140 outputs a signal so indicating that ss 10 is output from the same CAM as ss 9 . In the same way, since s2 4 , ss 5 , and ss 6 are continuously output from CAM 2, ss 5 and ss 6 output a signal indicating that they are output from the same CAM as ss 4 .

도 6에서 ss는 하나로 통합된 히트 신호이고, so는 오프셋 검사기(140)에서 출력되는 히트 신호가 동일한 CAM에서 연속적으로 출력된 것인지의 여부를 알리는 오프셋 신호이다. 오프셋 검사기(140)가 데이터를 처리하고 그 결과를 출력하기까지에 소요되는 시간이 1 클록이라면, 오프셋 검사기(140)는 도 6에 표현된 바와 같이, t=3인 시점에 CAM 3에서 출력된 ss1에 해당되는 ss를 출력하고 CAM 3에서 출력된 1을 인덱스로서 출력한다.In FIG. 6, ss is a heat signal integrated into one, and so is an offset signal indicating whether or not the heat signal output from the offset checker 140 is continuously output from the same CAM. If the time required for the offset checker 140 to process data and output the result is 1 clock, the offset checker 140 is output from the CAM 3 at the time t = 3, as shown in FIG. outputs corresponding to ss ss 1 and outputs the first output from the CAM 3, as an index.

오프셋 검사기(140)는 t=4와 t=5인 시점에 CAM 4에서 출력된 ss2와 ss3에 해당되는 ss를 출력하고 CAM 4에서 출력된 2와 3을 인덱스로서 출력한다. 이 때 ss3은 ss2에 이어서 CAM 4로부터 연속적으로 출력되기 때문에 이를 알리는 신호 so를 출력한다. The offset checker 140 outputs ss corresponding to ss 2 and ss 3 output from the CAM 4 at times t = 4 and t = 5, and outputs 2 and 3 output from the CAM 4 as indexes. At this time, since ss 3 is continuously output from CAM 4 following ss 2 , a signal so indicating this is output.

같은 방식으로, 오프셋 검사기(140)는 t=7, t=8, t=9인 시점에 CAM 2에서 출력된 ss4, ss5, ss6에 해당되는 ss를 출력하고 CAM 2에서 출력된 4, 5, 6을 인덱스로서 출력한다. 이 때 ss5, ss6은 ss4에 이어서 CAM 2로부터 연속적으로 출력되기 때문에 이를 알리는 신호 so를 출력한다. 이때, so 신호를 출력하는 것은, 동일한 인덱스가 서로 다른 CAM에서 발생될 경우 하나의 CAM에서 연속적으로 발생한 인덱스를 우선순위로 선택하여 사용하고자 함이며, 이에 대해서는 본 발명의 실시예에서는 상세한 설명을 생략하기로 한다.In the same manner, the offset checker 140 outputs ss corresponding to ss 4 , ss 5 , and ss 6 output from CAM 2 at the time t = 7, t = 8, t = 9 and 4 output from CAM 2. Print 5, 6 as indexes. At this time, since ss 5 and ss 6 are continuously output from CAM 2 following ss 4 , a signal so indicating this is output. In this case, the outputting of the so signal is to select and use an index continuously generated in one CAM as a priority when the same index is generated in different CAMs, which will not be described in detail in the embodiment of the present invention. Let's do it.

도 2의 CAM(130)은 보다 바람직하게는 TCAM(Ternary CAM)이다. TCAM은 엔트 리에 포함되는 요소들 각각을 무관심 항으로 만들 수 있는 기능을 포함한다. 예를 들어서, 문자열 "d***"를 찾고자 하는 경우, TCAM에 포함된 기능이 사용된다. 여기서 "*"는 무관심 항들을 나타낸다. 무관심 항은 그 위치에 아무 문자나 나타나도 상관없음을 의미한다.CAM 130 of FIG. 2 is more preferably a TCAM (Ternary CAM). TCAM includes the ability to make each of the elements of an entry into an indifference term. For example, if you want to find the string "d ***", the functions included in the TCAM are used. Where "*" denotes indifference terms. An indifference term means that any letter may appear in that position.

다음 도 1의 제2 문자열 매칭부(200)에 대하여 도 7을 참조로 설명하기로 한다.Next, the second string matching unit 200 of FIG. 1 will be described with reference to FIG. 7.

도 7은 본 발명의 실시예에 따른 제2 문자열 매칭부의 구조도이다.7 is a structural diagram of a second string matching unit according to an embodiment of the present invention.

도 7에 도시된 바와 같이, 제2 문자열 매칭부(200)는 복수의 엔트리를 포함하는 CAM(210), 연쇄기(220) 및 인덱스 변환기(230)를 포함한다.As shown in FIG. 7, the second string matching unit 200 includes a CAM 210, a concatemer 220, and an index converter 230 including a plurality of entries.

먼저 CAM(210)의 엔트리에는 제1 문자열 매칭부(100)에서 발생될 수 있는 검색 결과, 즉 도 2의 오프셋 검사기(140)에서 출력될 수 있는 n-바이트-문자열 인덱스와 오프셋 신호가 컨텐트로서 저장된다. 또한, CAM(210)은 제1 문자열 매칭부(100)서 출력된 검색 결과들, 즉 오프셋 검사기(140)에서 출력된 n-바이트-문자열 인덱스와 오프셋 신호가 입력되면, 모든 엔트리들에 저장되어 있는 컨텐트들과 입력된 n-바이트-문자열 인덱스 및 오프셋 신호를 동시에 비교한다. 비교 결과 일치되는 엔트리가 존재하면 그 엔트리에 해당되는 히트 신호(si1, si2, … )를 발생시킨다. First of all, an entry of the CAM 210 includes a search result generated by the first string matching unit 100, that is, an n-byte-string index and an offset signal output from the offset checker 140 of FIG. 2 as contents. Stored. In addition, when the search results output from the first string matching unit 100, that is, the n-byte-string index and the offset signal output from the offset checker 140 are input, the CAM 210 is stored in all entries. Compare the existing contents with the input n-byte-string index and offset signal. If there is a matching entry as a result of the comparison, a hit signal si 1 , si 2 ,... Corresponding to the entry is generated.

제1 문자열 매칭부(100)에서 발생될 수 있는 검색 결과들, 즉 n-바이트-문자열 인덱스와 오프셋은, 보다 의미 있고 완성된 형태의 특징적인 문자열들에 포함되 는 n-바이트 문자열들에 대응된다. 따라서, 도 7의 CAM(210)의 엔트리들에는 이러한 n-바이트 문자열들이 순차적으로 저장된다고 볼 수 있다. The search results that may be generated in the first string matching unit 100, that is, the n-byte-string index and the offset correspond to the n-byte strings included in the characteristic strings of a more meaningful and completed form. do. Thus, it can be seen that these n-byte character strings are stored sequentially in the entries of the CAM 210 of FIG.

CAM(210)을 이용해 특징적인 문자열을 검색하면, 상기 n-바이트-문자열 인덱스들과 오프셋들이 저장되어 있는 CAM(210)의 엔트리들에서, 연쇄적으로 히트 신호(si1, si2, … )들이 출력된다. 예를 들어서, 도 4에 표현된 바와 같이, "Speed"라는 문자열을 검색하고자 하는 경우, 우선, "Speed"에 포함되는 n-바이트 문자열들인 "Spee"와 "d***"에 대응되는 제1 문자열 매칭부(100)에서 발생될 수 있는 검색 결과들, 즉, 도 7에 표현된 바와 같이, n-바이트-문자열 인덱스 2와 3을 CAM에 차례로 저장한다. When a characteristic string is retrieved using CAM 210, in the entries of CAM 210 where the n-byte-string indexes and offsets are stored, the hit signal si 1 , si 2 ,... Are printed. For example, as shown in FIG. 4, when a character string "Speed" is to be searched, first, an item corresponding to "Spee" and "d ***" which are n-byte character strings included in "Speed" is searched. The search results that may be generated in the first string matching unit 100, that is, as illustrated in FIG. 7, n-byte-string indexes 2 and 3 are sequentially stored in the CAM.

이어서, 제1 문자열 매칭부(100)에 "Speed"라는 문자열이 입력되고, 그 검색 결과로서 도 2의 오프셋 검사기(140)에서 출력된 인덱스와 오프셋 신호가 CAM에 입력되면, "Speed"에 포함된 "Spee"와 "d***"에 대응되는 인덱스들을 저장하고 있는 CAM의 각 엔트리에서 연쇄적으로 히트 신호가 출력된다. 단, "d***"에 대응되는 인덱스를 저장하고 있는 CAM의 엔트리에서 히트 신호가 출력되기 위해서는 오프셋이 동일함을 나타내어야 한다. Subsequently, when the string “Speed” is input to the first string matching unit 100, and the index and the offset signal output from the offset checker 140 of FIG. 2 are input to the CAM as the search result, the string is included in “Speed”. The hit signal is serially output from each entry of the CAM that stores the indexes corresponding to the "Spee" and "d ***". However, in order to output the hit signal in the entry of the CAM that stores the index corresponding to "d ***", the offset must be the same.

즉, 제1 문자열 매칭부(100)에서 "Spee"와 "d***"를 검출한 CAM이 동일해야 한다. 또한 "Spee"와 "d***"은 동일한 CAM에서 시간상 연속되게 검출되어야 한다. 상기 두 조건을 만족해야 제 2 문자열 매칭 수단을 통해 "Speed"를 검출할 수 있다.That is, the CAM detecting “Spee” and “d ***” in the first string matching unit 100 should be the same. Also, "Spee" and "d ***" should be detected continuously in time in the same CAM. When the two conditions are satisfied, the speed can be detected through the second string matching means.

다음, 도 7의 연쇄기(220)는 n-바이트-문자열 인덱스들과 오프셋들을 저장하고 있는 CAM의(210) 각 엔트리에서 연쇄적으로 출력되는 히트 신호(si1, si2, … )들을 논리적으로 조합하여, 완성된 형태의 특징적인 문자열이 검출되었음을 알리는 신호를 발생시킨다. 여기서 n-바이트-문자열 인덱스와 오프셋은 완성된 형태의 특징적인 문자열에 포함되는 n-바이트 문자열에 대응된다. Next, the concatenator 220 of FIG. 7 logically outputs the hit signals si 1 , si 2 ,... Output at each entry of the CAM 210 that stores n-byte-string indexes and offsets. In combination with each other, a signal indicating that a characteristic character string of the completed form is detected. The n-byte-string index and offset correspond to the n-byte string included in the character string of the completed form.

연쇄기(220)는 CAM(210)에서 출력되는 히트 신호들을 플립플롭(Flip-Flop)들과 논리곱(Logical AND) 회로들을 이용한 일종의 연쇄 회로로 묶어서, 히트 신호들이 시간상 연쇄적으로 발생되는 경우 완성된 형태의 특징적인 문자열이 검출되었음을 알리는 신호를 발생시킨다. 이는 찾고자 하는 문자열의 첫 n-바이트 문자열부터 마지막 n-바이트 문자열까지 그 문자열을 구성하는 n-바이트 문자열들이 시간상 연쇄적으로 발생되는 경우, 그 문자열이 검출되었음을 알리는 신호를 발생시키는 것을 의미한다. 이때 연쇄기(220)는 복수의 연쇄 회로(220-1, 220-2)를 포함한다. The concatemer 220 bundles the heat signals output from the CAM 210 into a kind of a concatenation circuit using flip-flops and logical AND circuits, and when the heat signals are generated serially in time. Generate a signal indicating that a characteristic string of the completed form has been detected. This means that when the n-byte strings constituting the string, from the first n-byte string of the string to be searched to the last n-byte string, are generated serially in time, a signal indicating that the string is detected is generated. At this time, the chain linker 220 includes a plurality of chain circuits 220-1 and 220-2.

여기서, 플립플롭은 입력되는 데이터를 1 클록만큼 지연시킨다. 상기 연쇄 회로가 시작되는 곳에 있는 플립플롭(220-21)으로는 CAM(210)에서 출력되는 히트 신호가 입력되고, 그 외의 플립플롭(220-22)으로는 논리곱 회로(220-23)에서 출력되는 신호가 입력된다. 여기서 클록은 본 발명에 따른 장치가 기계적으로 동작하는데 필요한 기본 단위 시간을 의미한다. Here, the flip-flop delays the input data by one clock. The heat signal output from the CAM 210 is input to the flip-flops 220-21 where the chain circuit starts, and the logical product circuit 220-23 is input to the other flip-flops 220-22. The output signal is input. The clock here means the basic unit time required for the device according to the invention to operate mechanically.

그리고 논리곱 회로는 플립플롭에서 출력되는 신호와 상기 히트 신호를 논리적으로 앤드(AND)한다. 추가적으로 연쇄기(220)는 완성된 형태의 특징적인 문자열 이 검출되었음을 알리는 신호에 대응되는 인덱스를 출력한다. 이때, 인덱스는 복수의 연쇄 회로(220-1, 220-2)에서 출력되는 신호들을 보다 의미 있는 형태의 숫자로 표현한 것이다.The AND circuit logically ANDs the signal output from the flip-flop and the hit signal. In addition, the concatemer 220 outputs an index corresponding to a signal indicating that a characteristic character string of a completed form is detected. In this case, the index is expressed by a number of more meaningful forms of signals output from the plurality of chain circuits 220-1 and 220-2.

예를 들어서 도 4에 표현된 바와 같이, 제1 문자열 매칭부(100)에 포함된 CAM(130)에는 "Performance"라는 문자열에 포함되는 "Perf", "orma", "nce*" 등이 저장되어 있다. 그리고 도 7에 표현된 바와 같이, 제2 문자열 매칭부(200)의 CAM(210)에는 세 개의 4-바이트 문자열("Perf", "orma", "nce*")들에 대응되는 인덱스들이 저장되어 있다고 가정한다. 본 발명의 실시예에 따른 패턴 매칭 장치에 "Performance"라는 문자열이 입력되면, 제1 문자열 매칭부(100)에 포함된 CAM(130)의 "Perf", "orma", "nce*" 등을 저장하고 있는 각 엔트리에서 연쇄적으로 히트 신호(ss4, ss5, ss6)와 더불어 인덱스(4, 5, 6)들이 출력된다. For example, as shown in FIG. 4, the CAM 130 included in the first string matching unit 100 stores "Perf", "orma", "nce *", etc., which are included in the string "Performance". It is. As shown in FIG. 7, indices corresponding to three 4-byte strings (“Perf”, “orma”, “nce *”) are stored in the CAM 210 of the second string matching unit 200. Assume that it is. When the string "Performance" is input to the pattern matching device according to the embodiment of the present invention, "Perf", "orma", "nce *", etc. of the CAM 130 included in the first string matching unit 100 may be used. The indexes 4, 5, and 6 are outputted in series with the hit signals ss 4 , ss 5 , and ss 6 in each stored entry.

제1 문자열 매칭부(100)에서 발생된 인덱스(4, 5, 6)들이 제2 문자열 매칭부(200)의 CAM(210)에 입력되면, 그 인덱스들을 저장하고 있는 각 엔트리에서 연쇄적으로 히트 신호(si4, si5, si6)가 출력된다. 우선 "Perf"에 대응되는 인덱스가 입력되면 si4가 출력된다. 이 신호를 플립플롭을 이용해 다음 인덱스가 입력될 때까지 지연시킨다. When the indexes 4, 5, and 6 generated by the first string matching unit 100 are input to the CAM 210 of the second string matching unit 200, the hits are consecutively hit in each entry that stores the indexes. The signals si 4 , si 5 , si 6 are output. First, when an index corresponding to "Perf" is input, si 4 is output. This signal is delayed using a flip-flop until the next index is input.

이어서 "orma"에 대응되는 인덱스가 입력되면 si5가 출력된다. si4의 지연된 신호와 si5를 논리적으로 앤드하고, 그 결과를 플립플롭을 이용해 다음 인덱스가 입 력될 때까지 지연시킨다. 이어서 "nce*"에 대응되는 인덱스가 입력되면 si6이 출력된다. Subsequently, when an index corresponding to "orma" is input, si 5 is output. Logically AND the delayed signal of si 4 and si 5 , and delay the result using a flip-flop until the next index is entered. Subsequently, when an index corresponding to "nce *" is input, si 6 is output.

si4의 지연된 신호와 si5를 논리적으로 앤드한 결과의 지연된 신호와 si5를 논리적으로 앤드하고 그 결과를 플립플롭을 이용해 다음 인덱스가 입력될 때까지 지연시킨다. 이와 같은 방식으로 하면, 결국 "Performance"에 포함된 모든 4-바이트 문자열들에 대응되는 히트 신호들 즉, si4, si5, si6 등을 모두 논리적으로 앤드한 결과가 출력된다. And the delayed signal si and the 5-and the results of the delayed signal and the si si 5 4 logically into logical and using the result to delay flip-flop until the next index type. In this manner, a result of logically ANDing all of the hit signals corresponding to all 4-byte character strings included in "Performance", that is, si 4 , si 5 , si 6, etc., is output.

이는 곧 "Performance"라는 문자열이 검출되었음을 알리는 결과가 된다. 도 7에서 s1, s2, … 등은 상기 완성된 형태의 특징적인 문자열이 검출되었음을 알리는 신호들이다. 도 7에서 s1에 대한 인덱스는 1이고, s2에 대한 인덱스는 3이고, s3에 대한 인덱스는 6이다.This results in a notification that the string "Performance" has been detected. S 1 , s 2 ,. And the like are signals indicating that the characteristic string of the completed form has been detected. In FIG. 7, the index for s 1 is 1 , the index for s 2 is 3, and the index for s 3 is 6.

이와 같이 완성된 형태의 특징적인 문자열들의 길이는 일정하지 않다. 따라서 본 발명의 실시예에 따른 제2 문자열 매칭부(200)는 검색하고자 하는 문자열들에 포함된 n-바이트 문자열들에 대응되는 인덱스들을 CAM(210)에 저장하고자 할 때, 먼저 저장된 문자열의 마지막 n-바이트-문자열 인덱스와 다음 저장될 문자열의 첫 번째 n-바이트-문자열 인덱스 사이의 경계를 알리는 수단을 추가적으로 포함한다. 또한 상기 문자열들 사이의 경계는 CAM(210)의 임의의 엔트리에서 발생할 수 있다. The lengths of the characteristic strings in the completed form are not constant. Therefore, when the second string matching unit 200 according to the embodiment of the present invention attempts to store indices corresponding to n-byte strings included in the strings to be searched in the CAM 210, the last of the stored strings first. and means for informing the boundary between the n-byte-string index and the first n-byte-string index of the next string to be stored. The boundary between the strings may also occur at any entry in CAM 210.

도 7에 표현된 연쇄기(220)는 찾고자 하는 문자열이 정해지면 그것에 따라 플립플롭들과 논리곱 회로들을 연결하여, 일종의 연쇄 회로를 독립적으로 만들어 두기 때문에 문자열들 사이의 경계는 명확하다고 할 수 있다. 그러나 새 문자열이 추가될 때마다 상기 연쇄 회로를 새로이 추가해야 한다. When the string 220 to be shown in FIG. 7 is determined, the boundary between the strings is clear because the flip-flops and the logical AND circuits are connected to each other to make the chain circuits independent. . However, each time a new string is added, the chain circuit must be added anew.

이러한 작업을 소프트웨어로 처리하는 것은 매우 간단한 것이 될 수 있으나, 하드웨어로 처리하고자 할 때는 매우 번거롭거나 불가능한 일이다. 예를 들어서, FPGA(Field Programmable Gate Array)로 상기 회로를 구현한다면 상기 연쇄 회로가 추가될 때마다, FPGA에 포함된 모든 기능을 정지하고 새로 작성된 코드를 FPGA에 프로그래밍한 후 다시 동작시켜야 한다. Doing this in software can be very simple, but it can be very cumbersome or impossible when you want to do it in hardware. For example, if the circuit is implemented in a field programmable gate array (FPGA), each time the chain circuit is added, all functions included in the FPGA must be stopped, newly written code is programmed into the FPGA, and then operated again.

이것은 매우 번거로운 작업일 뿐만 아니라 상기 기능을 포함한 시스템 운영 중에는 거의 불가능한 일이다. 따라서, 연쇄기(220)는 CAM(210)과 더불어 쉽게 프로그래밍 가능한 구조로 만들어야 한다. 이에 본 발명에 따른 연쇄기(220)는 CAM(210)의 각 엔트리에 대응되는 플립플롭과 논리곱 회로마다 상기 경계를 나타낼 수 있는 수단을 추가적으로 포함한다. 이에 대해 도 8을 참조로 설명하기로 한다.This is not only a very cumbersome task, but also almost impossible during system operation with the above functions. Thus, the concatemer 220 should be made of an easily programmable structure along with the CAM 210. Accordingly, the concatemer 220 according to the present invention further includes a means for indicating the boundary for each flip-flop and logical AND circuit corresponding to each entry of the CAM 210. This will be described with reference to FIG. 8.

도 8은 본 발명의 실시예에 따른 제2 문자열 매칭부에 포함되는 연쇄기의 구조도이다.8 is a structural diagram of a chain linker included in a second string matching unit according to an embodiment of the present invention.

도 8에 도시된 바와 같이, 도 7에 표현된 연쇄기(220)와 도 8에 도시한 또 다른 연쇄기(220')의 차이점은, 연쇄기(220')에 멀티플렉서(Multiplexer)와 제어 신호가 추가된다는 점이다. 도 8을 참조하면, 연쇄기(220')는 복수의 스테이지를 포함한다. 각 스테이지는 두 입력 단자와 두 출력 단자 및 제어 단자를 가지며, 각 스테이지의 두 입력 단자 중 하나(이하, 제1 입력 단자라고 지칭)는 인접한 스테이지의 두 출력 단자 중 하나의 출력 단자(이하, 제1 출력 단자라고 지칭)에 연결되어 있다. As shown in FIG. 8, the difference between the chainer 220 shown in FIG. 7 and another chainer 220 ′ shown in FIG. 8 is a multiplexer and a control signal in the chainer 220 ′. Is added. Referring to FIG. 8, the concatemer 220 ′ includes a plurality of stages. Each stage has two input terminals, two output terminals, and a control terminal, and one of the two input terminals of each stage (hereinafter referred to as the first input terminal) is an output terminal of one of the two output terminals of the adjacent stage (hereinafter, 1 output terminal).

그리고, 각 스테이지의 두 입력 단자 중 다른 하나의 입력 단자(이하, 제2 입력 단자라고 지칭)는 검색하고자 하는 문자열의 각 문자에 대응하는 히트 신호가 순차적으로 입력된다. 그리고 제어 단자로는 제어 신호가 입력되며, 각 스테이지의 두 출력 단자 중 다른 하나의 출력 단자(이하, 제2 출력 단자라고 지칭함)로 검출 신호가 출력된다.The other one of the two input terminals of each stage (hereinafter, referred to as a second input terminal) is sequentially input hit signals corresponding to each character of the character string to be searched. The control signal is input to the control terminal, and the detection signal is output to the other output terminal (hereinafter, referred to as a second output terminal) of two output terminals of each stage.

즉, 도 8에서 멀티플렉서(MUX1, MUX2, …)는 두 개의 데이터 입력 포트, 한 개의 출력 포트 그리고 한 개의 제어 신호 입력 포트를 가지고 있다. 두 개의 데이터 입력 포트는 0번 포트와 1번 포트로 구분된다. 제어 신호가 '0'이면 0번 포트에 입력된 데이터가 출력 포트로 출력되고, '1'이면 1번 포트에 입력된 데이터가 출력 포트로 출력된다. That is, in FIG. 8, the multiplexers MUX 1 , MUX 2 ,..., Have two data input ports, one output port, and one control signal input port. The two data input ports are divided into port 0 and port 1. If the control signal is '0', the data input to port 0 is output to the output port. If the control signal is '1', the data input to port 1 is output to the output port.

도 8에서 se1, se2, … 등은 멀티플렉서(MUX1, MUX2, …)들을 제어하기 위한 제어 신호들이다. 이 제어 신호(se1, se2, …)들은 문자열과 문자열 사이 경계를 구분하기 위해 사용된다. 예를 들어서, se1이 '1'이면 첫 번째 플립플롭(FF221-1)의 출력 포트가 그 다음에 오는 두 번째 논리곱 회로(221-2)의 입력 포트에 연결되어 일종의 연쇄 회로가 형성된다. Se 1 , se 2 ,. And the like are control signals for controlling the multiplexers MUX 1 , MUX 2 ,... These control signals se 1 , se 2 ,... Are used to separate the boundary between the character string and the character string. For example, if se 1 is '1', the output port of the first flip-flop (FF 221-1 ) is connected to the input port of the second logical AND circuit 221-2 that follows, forming a kind of chain circuit. do.

반면, se1이 '0'이면 첫 번째 플립플롭(221-11)의 출력이 그 다음에 오는 두 번째 논리곱 회로(221-2)에 전달되지 않고, 그 논리곱 회로(221-2)는 첫 번째 논리곱 회로(221-1)와 같은 형태가 되어 첫 번째 플립플롭(221-11) 및 논리곱 회로(221-1)와 분리가 된다. 즉, se1이 '0'일 때 문자열과 문자열 사이에 경계가 발생되며, 이에 따라 연쇄 회로가 다른 연쇄 회로와 분리된다. 또한 첫 번째 논리곱 회로의 결과가 s1에 전달된다. On the other hand, when se 1 is '0', the output of the first flip-flop 221-11 is not passed to the second logical AND circuit 221-2 that follows, and the logical AND circuit 221-2 is The first logical product circuit 221-1 is formed to be separated from the first flip-flop 221-11 and the logical AND circuit 221-1. That is, when se 1 is '0', a boundary is generated between the character string and the character string, thereby separating the chain circuit from other chain circuits. The result of the first AND circuit is also passed to s 1 .

따라서, si1이 발생하면 즉, 도 7에서 CAM(210)의 첫 번째 엔트리에 해당하는 n-바이트-문자열 인덱스가 제2 문자열 매칭부(200)에 입력된 경우, si1이 s1에 전달되어, 원하는 문자가 검출되었음을 알리게 된다. 도 8에서 se1, se3, se6 등은 '0'으로 하고 se2, se4, se5 등은 '1'로 가정하면, 도 7의 연쇄기(220)에 표현된 연쇄 회로와 동일한 연쇄 회로가 구성된다. 이 때 도 8의 s1, s3, s6 등은 도 7의 s1, s2, s3 등과 각각 동일한 결과를 나타낸다.Therefore, when si 1 occurs, that is, when n-byte-string index corresponding to the first entry of the CAM 210 in FIG. 7 is input to the second string matching unit 200, si 1 is transferred to s 1 . This informs the user that the desired character has been detected. In FIG. 8, it is assumed that se 1 , se 3 , se 6, and the like are '0', and se 2 , se 4 , se 5, and the like is '1'. A chain circuit is constructed. At this time, s 1 , s 3 , s 6, etc. of FIG. 8 show the same results as s 1 , s 2 , s 3 , etc. of FIG. 7.

도 7의 CAM(220)은 보다 바람직하게는 TCAM(Ternary CAM)이다. TCAM은 포함되는 엔트리 및 그 엔트리에 포함되는 요소들, 즉 도 2의 오프셋 검사기(140)에서 출력될 수 있는 인덱스와 오프셋 신호 각각을 무관심 항으로 만들 수 있는 기능을 포함한다. 도 7에서 "*"는 무관심 항들을 나타낸다. 무관심 항은 그 위치에 아무 신호 또는 값이 나타나도 상관없음을 의미한다.The CAM 220 of FIG. 7 is more preferably a TCAM (Ternary CAM). The TCAM includes a function of making an indifferent term each of an included entry and elements included in the entry, that is, an index and an offset signal that can be output from the offset checker 140 of FIG. 2. In FIG. 7, "*" denotes indifference terms. An indifference term means that no signal or value appears at that location.

도 1의 제2 문자열 매칭부(200)는 도 7에 표현된 바와 같이, 인덱스 변환기(Index Converting Unit)(230)를 포함한다. 인덱스 변환기(230)는 연쇄기(220)에서 완성된 형태의 특징적인 문자열이 검출되었음을 알리는 신호(s1, s2, s3, …)가 발생되었을 때, 출력되는 인덱스(1, 3, 6, …)를 문자열 ID(String Identifier) 형태로 변환한다. As illustrated in FIG. 7, the second string matching unit 200 of FIG. 1 includes an index converting unit 230. The index converter 230 outputs the indexes 1, 3, 6 when the signals s 1 , s 2 , s 3 ,..., Indicating that the character string of the completed form has been detected in the concatemer 220. ,…) Into a String Identifier.

찾고자 하는 문자열들의 수에 비해 CAM(210)에 포함된 엔트리들의 수는 상당히 많다. 또한, 도 8에 표현된 바와 같이, 연쇄기(220')에서 발생 가능한 신호의 수는 CAM(210)에 포함된 엔트리의 수와 동일하다. 따라서, 연쇄기(220')에서 출력된 인덱스는 상당히 큰 수를 표현하기 위해 하드웨어적으로 불필요한 로직을 요구한다.The number of entries included in the CAM 210 is considerably larger than the number of strings to be searched for. In addition, as shown in FIG. 8, the number of signals that can be generated in the concatemer 220 ′ is equal to the number of entries included in the CAM 210. Thus, the index output from the concatemer 220 'requires unnecessary logic in hardware to represent a fairly large number.

도 7에 표현된 바와 같이, n-바이트-문자열 인덱스들이 검출되면 연쇄기(220')에서 완성된 형태의 특징적인 문자열이 검출되었음을 알리는 신호들이 발생되고, 이때 연쇄기(220')에서 출력되는 인덱스들은 그 특징적인 문자열들을 대표하는 요소들이 된다. 도 7의 연쇄기(220)에서 출력되는 인덱스들만을 놓고 보면, 1, 3, 6 등의 수를 하드웨어적으로 표현하기 위해서는 3 비트가 필요하다.  As shown in FIG. 7, when n-byte-string indexes are detected, signals are generated in the concatemer 220 ′ indicating that a characteristic string of a completed form has been detected, and output from the concatemer 220 ′. The indices are the elements that represent the characteristic strings. Looking only at the indices output from the concatemer 220 of FIG. 7, three bits are required to represent the number of 1, 3, 6, etc. in hardware.

그러나, 인덱스 3을 문자열 ID 2로 그리고 인덱스 6을 문자열 ID 3으로 변환하면, 단지 2 비트로 상기 완성된 형태의 특징적인 문자열들을 대표할 수가 있다. 또한 제2 문자열 매칭부(100)의 검색 결과는 이차적으로 특정 패턴을 찾기 위한 정규 표현 매칭 과정에서 여러 번 사용될 수 있다. 따라서, 이러한 점을 고려한다면, 제2 문자열 매칭부(200)의 검색 결과를 인덱스로 표현하는 것보다는 이를 변환하여 문자열들을 대표할 수 있는 문자열 ID 형태로 표현하는 것이 보다 효율적이다. However, by converting index 3 to string ID 2 and index 6 to string ID 3, only 2 bits can represent the character strings of the completed form. In addition, the search results of the second string matching unit 100 may be used several times in a regular expression matching process to secondarily find a specific pattern. Therefore, considering this point, it is more efficient to convert the search result of the second string matching unit 200 into a string ID that can represent the strings by converting the search result into an index.

이때 문자열마다 문자열 ID를 다르게 부여할 필요는 없다. 서로 다른 문자열들을 하나의 그룹으로 묶어서 그 그룹에 속하는 문자열들은 같은 문자열 ID를 부여할 수도 있다.At this time, it is not necessary to give string ID differently for each string. Different strings can be grouped into a group so that the strings in the group can be given the same string ID.

도 1의 제1 문자열 매칭부(100) 및 제2 문자열 매칭부(200)는 특징적인 문자열을 검색하기 위한 것뿐만 아니라, 특징적인 문자를 검색하기 위한 수단으로도 사용될 수 있다. 또한, 검색 대상이 되는 문자들 몇몇을 하나의 그룹으로 묶어서 그 그룹에 속하는 문자들은 상기 인덱스 변환 과정에서 같은 ID를 부여할 수도 있다.The first string matching unit 100 and the second string matching unit 200 of FIG. 1 may be used not only to search for a characteristic string but also as a means for searching for a characteristic character. Also, some of the characters to be searched may be grouped into one group, and the characters belonging to the group may be given the same ID in the index conversion process.

다음 상기 도 1의 지연부(500)는 플립플롭 형태의 버퍼를 포함한다. 지연부(500)는 도 1의 제2 문자열 매칭부(200)가 입력되는 데이터를 처리하고 그 결과를 출력하기까지에 소요되는 시간이 1 클록이면, 제2 문자열 매칭부(200)에 입력되는 데이터를 1 클록만큼 지연시킨 후 출력한다. 만약 소요 시간이 2 클록이면 그 입력되는 데이터를 2 클록만큼 지연시킨다. 이를 다시 표현하면, 지연부(500)는 제2 문자열 매칭부(200)에 입력되는 데이터를 일정 클록만큼 지연시킨 후 출력한다. Next, the delay unit 500 of FIG. 1 includes a flip-flop type buffer. The delay unit 500 is input to the second string matching unit 200 when the time required for processing the data input by the second string matching unit 200 of FIG. 1 and outputting the result is one clock. Output the data after delaying 1 clock. If the time required is two clocks, the input data is delayed by two clocks. In other words, the delay unit 500 delays the data input to the second string matching unit 200 by a predetermined clock and outputs the delayed data.

다음 도 1의 키 발생부(300)의 구조에 대하여 도 9a 및 도 9b를 참조로 설명하기로 한다.Next, a structure of the key generator 300 of FIG. 1 will be described with reference to FIGS. 9A and 9B.

도 9a 및 도 9b는 본 발명의 실시예에 따른 키 발생부에서 출력되는 패턴 키의 형태를 나타내는 구조도이다.9A and 9B are structural diagrams illustrating the shape of a pattern key output from a key generating unit according to an embodiment of the present invention.

도 9a 및 도 9b에 표현된 바와 같이 키 발생부(300)는, 제2 문자열 매칭 부(200)에서 출력되는 문자열 ID와 지연부(500)에서 출력되는 데이터를 포함하는 패턴 키를 만들어 출력한다. 지연부(500)에서 출력되는 데이터는 제1 문자열 매칭부(100)에서 출력되는 n-바이트-문자열 인덱스와 동일하다. As shown in FIGS. 9A and 9B, the key generator 300 generates and outputs a pattern key including a string ID output from the second string matching unit 200 and data output from the delay unit 500. . The data output from the delay unit 500 is the same as the n-byte-string index output from the first string matching unit 100.

도 9a는 제2 문자열 매칭부(200)에서 출력된 문자열 ID와 지연부(500)에서 출력된 n-바이트-문자열 인덱스를 이어 붙여서, 패턴 키를 만들 수 있음을 의미하는 것이다. FIG. 9A means that a pattern key can be created by concatenating a string ID output from the second string matching unit 200 and an n-byte-string index output from the delay unit 500.

이와 달리 도 9b를 참고하면, 제2 문자열 매칭부(200)에서 특정 문자열이 검출된 경우에는 그 문자열이 검출되었음을 알리는 검출 신호와 그 문자열에 해당되는 문자열 ID를 패턴 키로서 출력하고, 그 외의 경우에는 지연부(500)에서 출력되는 n-바이트-문자열 인덱스를 패턴 키로서 출력하는 것을 의미한다. 도 9b에서 검출 신호는 패턴 키가 문자열 ID인지 n-바이트-문자열 인덱스인지를 구분하는데 사용된다.In contrast, referring to FIG. 9B, when a specific string is detected by the second string matching unit 200, a detection signal indicating that the string is detected and a string ID corresponding to the string are output as a pattern key. Means that the n-byte-string index output from the delay unit 500 is output as a pattern key. In FIG. 9B, the detection signal is used to distinguish whether the pattern key is a string ID or an n-byte-string index.

다음 상기 도 1의 정규 표현 매칭부(400)의 구조에 대하여 도 10을 참조로 설명하기로 한다.Next, the structure of the regular expression matching unit 400 of FIG. 1 will be described with reference to FIG. 10.

도 10은 본 발명의 제1 실시예에 따른 정규 표현 매칭부의 구성도이다.10 is a configuration diagram of a regular expression matching unit according to the first embodiment of the present invention.

도 10에 표현된 바와 같이 제1 실시예에 따른 정규 표현 매칭부(400)는 CAM(410), 상태 천이기(420) 및 지연기(430)를 포함한다.As shown in FIG. 10, the regular expression matching unit 400 according to the first embodiment includes a CAM 410, a state shifter 420, and a delayer 430.

도 10의 CAM(410)은 복수의 엔트리를 포함한다. CAM의 엔트리에는 패턴 키와 상태 변수(State Variable)가 컨텐트로서 저장된다. 여기서 패턴 키는 키 발생부(300)에서 발생 가능한 것들이며, 상태 변수는 상태 천이기(420)에서 발생 가능 한 것들이다. The CAM 410 of FIG. 10 includes a plurality of entries. In the entry of the CAM, a pattern key and a state variable are stored as contents. Here, the pattern keys are those that can be generated in the key generating unit 300, and the state variables are those that can be generated in the state transition 420.

CAM(410)은 키 발생부(300)에서 출력된 패턴 키와 상태 천이기(420)에서 출력된 상태 변수가 입력되면, 모든 엔트리들에 저장되어 있는 컨텐트들과 입력되는 패턴 키와 상태 변수로 구성되는 데이터를 동시에 비교한다. 그리고 그 결과 일치되는 엔트리가 존재하면 그 엔트리에 해당되는 히트 신호(h1, h2, … )를 발생시킨다. When the pattern key output from the key generating unit 300 and the state variable output from the state shifter 420 are input, the CAM 410 converts the contents stored in all the entries and the pattern key and state variable input thereto. The data to be constructed is compared simultaneously. As a result, if a matching entry exists, a hit signal h 1 , h 2 ,... Corresponding to the entry is generated.

추가적으로 CAM(410)은 히트 신호(h1, h2, … )를 발생시킨 엔트리에 대한 인덱스를 출력한다. 여기서 인덱스는 CAM(410)의 엔트리가 CAM 내에서 위치하는 곳을 주소의 형태로 표현한 것이다.Additionally, the CAM 410 outputs an index for the entry that generated the hit signals h 1 , h 2 ,... In this case, the index represents where the entry of the CAM 410 is located in the CAM in the form of an address.

도 10의 상태 천이기(420)는 CAM(410)에서 히트 신호(h1, h2, … )가 발생되었을 때, CAM(410)에서 출력되는 인덱스에 대응되는 상태 변수를 출력한다. 또한, 상태 천이기(420)는 특정 인덱스에 대응되는 실행 정보를 추가적으로 출력한다. 여기서 실행 정보는 찾고자 하는 패턴이 검출되었음을 알리는 히트 신호와 찾고자 하는 패턴이 검출되었음에 따른 다음 단계에서 수행되어야 할 사항들을 포함한다.The state shifter 420 of FIG. 10 outputs a state variable corresponding to an index output from the CAM 410 when the hit signals h 1 , h 2 ,... Are generated in the CAM 410. In addition, the state shifter 420 additionally outputs execution information corresponding to a specific index. Here, the execution information includes a hit signal indicating that the pattern to be searched for is detected and items to be performed in the next step according to the detection of the pattern to be searched for.

예를 들어서, "High", "Speed", "Network" 등의 문자열들이 순차적으로 발생되는 형태의 패턴 1과, "High", "Performance", "System" 등의 문자열들이 순차적으로 발생되는 형태의 패턴 2를 찾고자 하는 경우, 예측 가능한 형태의 상태 천이도를 도 11과 같이 구성할 수 있다. For example, pattern 1 in which strings such as "High", "Speed", and "Network" are sequentially generated, and strings such as "High", "Performance" and "System" are sequentially generated. In order to find the pattern 2, a state transition diagram in a predictable form can be configured as shown in FIG.

도 11은 본 발명의 제1 실시예에 따른 정규 표현 매칭부의 상태 천이도이다.11 is a state transition diagram of a regular expression matching unit according to the first embodiment of the present invention.

도 11에 표현된 바와 같이 상태 천이부(420)는 상태 0에서 "High"가 검출되면 상태 1로 천이하고, 상태 1에서 "Speed"가 검출되면 상태 2로 천이한다. 그리고, 상태 2에서 "Network"이 검출되면 상태 3으로 천이한다. 또한 상태 3은 상기 패턴 1이 검출되었음을 의미한다. As illustrated in FIG. 11, the state transition unit 420 transitions to state 1 when "High" is detected in state 0, and transitions to state 2 when "Speed" is detected in state 1. When "Network" is detected in State 2, the state transitions to State 3. State 3 also means that pattern 1 was detected.

따라서, 도 10의 상태 천이기(420)는 상태 3에 대한 실행 정보로서 패턴이 검출되었음을 알리는 히트 신호를 출력한다. 상태 1에서 "Performance"가 검출되면 상태 4로 천이하고, 상태 4에서 "System"이 검출되면 상태 5로 천이한다. 또한 상태 5는 상기 패턴 2가 검출되었음을 의미한다. 따라서, 도 10의 상태 천이기(420)는 상태 5에 대한 실행 정보로서 패턴이 검출되었음을 알리는 히트 신호를 출력한다. Accordingly, the state shifter 420 of FIG. 10 outputs a hit signal indicating that a pattern has been detected as execution information for state 3. FIG. Transition to State 4 when "Performance" is detected in State 1 and Transition to State 5 when "System" is detected in State 4. State 5 also means that pattern 2 was detected. Accordingly, the state transition 420 of FIG. 10 outputs a hit signal indicating that a pattern has been detected as execution information for state 5. FIG.

도 11은 상태 6과 같이 추가적으로 발생 가능한 형태의 상태 천이를 포함하고 있다. 뿐만 아니라, 도 11에 표시된 상태 천이 형태 외에도 다양한 형태의 상태 천이가 가능하다. 도 11에 표현된 문자열들 각각에 도 12에 표현된 형태로 문자열 ID를 부여하면, 도 11의 상태 천이도는 도 10과 같이 구성할 수 있다. 11 includes a state transition in a form that can additionally occur, such as state 6. In addition, various types of state transitions are possible in addition to the state transition forms shown in FIG. 11. If a string ID is assigned to each of the strings shown in FIG. 11 in the form shown in FIG. 12, the state transition diagram of FIG. 11 may be configured as shown in FIG. 10.

이제 본 발명에 따른 패턴 매칭 장치에 "A High Speed and Performance Pattern Matching System for Network Security"라는 데이터 스트림이 입력될 때 이를 도 10과 11에 따라 분석하면 다음과 같다. 단, 상기 데이터 스트림이 상기 패턴 매칭 장치에 처음으로 입력되는 데이터 스트림이라 가정한다. Now, when a data stream called "A High Speed and Performance Pattern Matching System for Network Security" is input to the pattern matching device according to the present invention, the analysis is performed according to FIGS. 10 and 11 as follows. However, it is assumed that the data stream is a data stream inputted to the pattern matching device for the first time.

상태 0에서 "High"가 검출되므로 상태 1로 천이하고, 상태 1에서 "Speed"가 검출되므로 상태 2로 천이한다. 그리고 상태 2에서 "Performance"가 검출되므로 상 태 6으로 천이하고, 상태 6에서 "System"이 검출되므로 상태 5로 천이한다. 상태 5는 상기 패턴 2가 검출되었음을 의미하므로, 상태 5로 천이함과 더불어 그에 대한 실행 정보가 출력된다.Transition to state 1 because "High" is detected in state 0, and transition to state 2 because "Speed" is detected in state 1. In state 2, "Performance" is detected, so it transitions to state 6, and in state 6, "System" is detected, so it transitions to state 5. Since state 5 means that pattern 2 is detected, transition to state 5 and execution information thereof are output.

도 1의 본 발명의 제1 실시예에 따른 정규 표현 매칭부(400)는, 도 10에 표현된 바와 같이 지연기(430)도 포함한다. 지연기(430)는 도 10의 CAM(410)에서 출력되는 인덱스를 도 10의 상태 천이기(420)가 CAM(410)에서 출력되는 인덱스와 히트 신호를 처리하고 그에 대한 실행 정보를 출력하기까지에 소요되는 시간만큼 지연시킨다.The regular expression matching unit 400 according to the first embodiment of the present invention of FIG. 1 also includes a delay unit 430 as shown in FIG. 10. The delay unit 430 uses the index output from the CAM 410 of FIG. 10 until the state transition 420 of FIG. 10 processes the index and hit signals output from the CAM 410 and outputs execution information thereof. Delay as much time as needed.

도 10의 CAM(410)은 보다 바람직하게는 TCAM(Ternary CAM)이다. TCAM은 포함되는 엔트리 및 엔트리에 포함되는 요소들, 즉 패턴 키와 상태 변수 각각을 무관심 항으로 만들 수 있는 기능을 포함한다. 뿐만 아니라 패턴 키를 구성하고 있는 요소들 각각을 무관심 항으로 만들 수 있는 기능도 포함한다. The CAM 410 of FIG. 10 is more preferably a TCAM (Ternary CAM). The TCAM includes the entries that are included and the elements that are included in the entries, namely the pattern key and the state variable, respectively. It also includes the ability to make each of the elements that make up the pattern key into an indifference term.

예를 들어서, 현재 상태에 상관없이 문자열 "High"가 검출될 때 상태 1로 천이하고자 한다면, 그에 해당하는 TCAM 엔트리에서 상태 변수를 무관심 항으로 만들면 된다. 또한 상기한 바와 같이 특정 패턴이 검출된 상태 3이나 상태 5에서 이후로 검출되는 문자나 문자열에 상관없이 초기 상태로 천이하고자 한다면, 그에 해당하는 TCAM 엔트리에서 패턴 키를 무관심 항으로 만들면 된다.For example, if you want to transition to state 1 when the string "High" is detected regardless of the current state, you can make the state variable indifferent in the corresponding TCAM entry. In addition, as described above, if a specific pattern is to be transitioned to an initial state regardless of a character or a string detected later in state 3 or state 5, the pattern key may be made an indifference term in the corresponding TCAM entry.

이러한 정규 표현 매칭부(400)는 도 13에 도시한 바와 같이 달리 구성될 수도 있다. 다음 본 발명의 제2 실시예에 따른 정규 표현 매칭부(400')에 대해 도 13을 참조로 설명하기로 한다. The regular expression matching unit 400 may be configured differently as shown in FIG. 13. Next, the regular expression matching unit 400 ′ according to the second embodiment of the present invention will be described with reference to FIG. 13.

제2 실시예에 따른 정규 표현 매칭부(400')는, 도 13에 표현된 바와 같이, CAM(440), 연쇄기(450), 메모리(460) 및 지연기(470)를 포함한다.The regular expression matching unit 400 ′ according to the second embodiment includes a CAM 440, a concatemer 450, a memory 460, and a delay 470, as shown in FIG. 13.

도 13의 CAM(440)은 복수의 엔트리를 포함한다. CAM(440)의 엔트리에는 패턴 키가 컨텐트로서 저장된다. 여기서 패턴 키는 도 1의 키 발생부(300)에서 출력될 수 있는 패턴 키들이다. CAM(440)은 키 발생부(300)에서 출력된 패턴 키가 입력되면 모든 엔트리들에 저장되어 있는 컨텐트들과 입력되는 패턴 키를 동시에 비교한다. 그리고, 그 결과 일치되는 엔트리가 존재하면 그 엔트리에 해당되는 히트 신호(h1, h2, … )를 발생시킨다. The CAM 440 of FIG. 13 includes a plurality of entries. The pattern key is stored as content in an entry of the CAM 440. The pattern keys are pattern keys that can be output from the key generator 300 of FIG. 1. When the pattern key output from the key generator 300 is input, the CAM 440 simultaneously compares the content stored in all the entries with the input pattern key. As a result, if a matching entry exists, the hit signals h 1 , h 2 ,... Corresponding to the entry are generated.

연쇄기(450)는 패턴 키들을 저장하고 있는 CAM(440)의 각 엔트리에서 순차적으로 출력되는 히트 신호(h1, h2, … )들을 논리적으로 조합하여, 패턴이 검출되었음을 알리는 신호(p1, p2, … )를 발생시킨다. 연쇄기(450)는 CAM(440)에서 출력되는 히트 신호들을 래치(Latch)(450-1, 450-2, …)들과 논리곱 회로(450-11, 450-12, …)들을 이용한, 일종의 연쇄 회로로 묶어서 히트 신호들이 순차적으로 발생되는 경우 상기 패턴이 검출되었음을 알리는 신호를 발생시킨다. The concatemer 450 logically combines the hit signals h 1 , h 2 ,... Sequentially output from each entry of the CAM 440 storing the pattern keys, thereby indicating a signal p 1. , p 2 ,...) The concatemer 450 uses latches 450-1, 450-2, ... and logical AND circuits 450-11, 450-12, ... for the hit signals output from the CAM 440. When the hit signals are sequentially generated by tying up a chain circuit, a signal indicating that the pattern is detected is generated.

이는 곧 찾고자 하는 패턴의 첫 문자 또는 문자열부터 마지막 문자 또는 문자열까지 그 패턴을 구성하는 문자 또는 문자열들이 순차적으로 발생되는 경우, 그 패턴이 검출되었음을 알리는 신호를 발생시키는 것을 의미한다. 또한 연쇄기(450)는 복수의 연쇄 회로(450', 450'')를 포함한다. 여기서 문자열은 문자열 ID로 표현된다. This means that when the characters or strings constituting the pattern are sequentially generated from the first character or string of the pattern to be searched to the last character or string, this means generating a signal indicating that the pattern has been detected. The chainer 450 also includes a plurality of chain circuits 450 ′, 450 ″. Where the string is represented by a string ID.

연쇄기(450)가 시작되는 곳에 있는 래치(450-1, 450-3, …)로는 CAM(440)에서 출력되는 히트 신호(h1, h4, … )가 입력되고, 그 외의 래치(450-2, 450-4, …)로는 논리곱 회로(450-11, 450-12, …)에서 출력되는 신호가 입력된다. The hit signals h 1 , h 4 ,... Output from the CAM 440 are input to the latches 450-1, 450-3,..., Where the cascade 450 is started, and the other latches 450. The signals output from the logical AND circuits 450-11, 450-12, ... are input to -2, 450-4, ...).

즉, 래치(450-1, 450-2, …)는 CAM(440)에서 출력되는 히트 신호 또는 논리곱 회로에서 출력되는 특정 신호를 계속 유지하여 출력한다. 래치(450-1, 450-2, …)는 특정 데이터가 입력되기 이전에 유지하고 있던 값을 출력하기 위한 수단을 추가적으로 포함한다. 여기서 래치에 대해서 도 14를 참조로 설명하기로 한다.That is, the latches 450-1, 450-2,... Maintain and output the hit signal output from the CAM 440 or the specific signal output from the logical AND circuit. The latches 450-1, 450-2, ... further include means for outputting a value held before the specific data is input. Here, the latch will be described with reference to FIG. 14.

도 14는 본 발명의 실시예에 따른 래치의 예시도이다.14 is an exemplary view of a latch according to an embodiment of the present invention.

도 14에 표현된 바와 같이, 래치(450-1)는 플립-플롭(FFL1)과 멀티플렉서(MUXL1)로 구성된다. 도 14에서 제어 신호(h)가 '1'이면 플립-플롭(FFL1)에 '1'이 입력되고, 플립-플롭(FFL1)은 입력된 '1'을 출력한다. 제어 신호(h)가 '0'이면 플립-플롭(FFL1)에 플립-플롭(FFL1)의 출력 단자에서 출력되는 '1'이 다시 입력된다. 따라서 플립-플롭(FFL1)의 출력은 계속 '1'을 유지한다. As shown in FIG. 14, the latch 450-1 includes a flip-flop FF L1 and a multiplexer MUX L1 . It is also a "1" control signal (h) from 14 flip-flops to be '1' input to the (L1 FF), the flip-flop (FF L1) and outputs the inputted "1". A control signal (h) is '0' the flip-flop to flip (FF L1) - a '1' is output from the output terminal of the flop (FF L1) is input again. Therefore, the output of the flip-flop FF L1 remains '1'.

래치(450-1)는 출력되는 값을 '0'으로 변경하기 위한 수단을 추가적으로 포함한다. 즉, 도 14에서 리셋(Reset) 신호가 플립-플롭(FFL1)에 입력되면 래치는 '0'을 출력한다. 그리고 논리곱 회로는 래치(450-1)에서 출력되는 신호와 상기 히트 신호를 논리적으로 앤드한다. The latch 450-1 further includes means for changing the output value to '0'. That is, when the reset signal is input to the flip-flop FF L1 in FIG. 14, the latch outputs '0'. The AND circuit logically ANDs the signal output from the latch 450-1 and the hit signal.

추가적으로 연쇄기(450)는 패턴이 검출되었음을 알리는 신호에 대응되는 인 덱스를 출력한다. 즉, 인덱스는 복수의 연쇄 회로(450', 450'')에서 출력되는 신호들을 보다 의미 있는 형태의 숫자로 표현한 것이다.In addition, the concatemer 450 outputs an index corresponding to a signal indicating that a pattern has been detected. In other words, the index is expressed as a more meaningful number of signals output from the plurality of chain circuits 450 'and 450' '.

예를 들어서, "High", "Speed", "Network" 등의 문자열들이 순차적으로 발생되는 형태의 패턴 1과, "High", "Performance", "System" 등의 문자열들이 순차적으로 발생되는 형태의 패턴 2를 찾고자 하는 경우, 두 패턴에 포함되는 문자열들 각각에 도 12에 표현된 형태로 문자열 ID를 부여하고, 도 13에 표현된 바와 같이 CAM(430)에 문자열 ID들을 순차적으로 저장한다. 여기서 도 12는 본 발명의 실시예에 따른 문자열 ID를 표시한 예시도이다.For example, pattern 1 in which strings such as "High", "Speed", and "Network" are sequentially generated, and strings such as "High", "Performance" and "System" are sequentially generated. When a pattern 2 is to be found, a string ID is assigned to each of the strings included in the two patterns in the form shown in FIG. 12, and the string IDs are sequentially stored in the CAM 430 as shown in FIG. 13. 12 is an exemplary view showing a string ID according to an embodiment of the present invention.

따라서, 패턴 1 또는 패턴 2에 포함된 문자열들이 순차적으로 검출되면 CAM(430)에서는 그에 해당되는 히트 신호(h1, h2, …)들이 순차적으로 출력된다. 우선 "High"가 검출되면, "High"에 대한 문자열 ID가 1이기 때문에, 이에 대한 히트신호 h1이 출력된다. 이 신호를 제1 래치(450-1)를 이용해 계속 유지한다. Therefore, when the character strings included in the pattern 1 or the pattern 2 are sequentially detected, the corresponding hit signals h 1 , h 2 ,... Are sequentially output from the CAM 430. First, when "High" is detected, since the string ID for "High" is 1, the hit signal h 1 for it is output. This signal is maintained using the first latch 450-1.

이어서 "Speed"가 입력되면 h2가 출력된다. 제1 래치(450-1)에서 출력되는 h1과 h2를 논리적으로 앤드하고 그 결과를 제2 래치(450-2)를 이용해 계속 유지한다. 이어서 "Network"이 입력되면 제2 래치(450-2)에서 출력되는 신호와 히트 신호 h3을 논리적으로 앤드한다. 결국, h1, h2, h3 등을 모두 논리적으로 앤드한 결과가 출력된다. Subsequently, when "Speed" is input, h 2 is output. The first-and the h 1 and h 2 to be output from the first latch (450-1) in a logical and maintain the result with a second latch (450-2). Subsequently, when "Network" is input, the signal output from the second latch 450-2 and the hit signal h 3 are logically ANDed. As a result, the result of logically ANDing all of h 1 , h 2 , h 3 and the like is output.

이는 곧 패턴 1이 검출되었음을 알리는 결과가 된다. 도 13에서 p1, p2, … 등은 찾고자 하는 패턴들이 검출되었음을 알리는 신호들이다. 그리고 도 13에 나타낸 바와 같이 p1에 대한 인덱스는 3이고, p2에 대한 인덱스는 6이다.This is a result indicating that pattern 1 has been detected. 13, p 1 , p 2 ,... Etc. are signals indicating that patterns to be searched for have been detected. As shown in FIG. 13, the index for p 1 is 3 and the index for p 2 is 6.

찾고자 하는 패턴들이 포함하는 문자 또는 문자열들의 개수는 일정하지 않다. 따라서, 본 발명의 제2 실시예에 따른 정규 표현 매칭부는 검색하고자 하는 패턴들에 포함된 문자 또는 문자열들을 패턴 키의 형태로 CAM에 저장하고자 할 때, 먼저 저장된 패턴의 마지막 패턴 키와 다음 저장될 패턴의 첫 번째 패턴 키 사이의 경계를 알리는 수단을 추가적으로 포함한다. 또한 상기 패턴들 사이의 경계는 CAM의 임의의 엔트리에서 발생할 수 있다. The number of characters or strings included in the patterns to find is not constant. Therefore, when the regular expression matching unit according to the second embodiment of the present invention intends to store the characters or character strings included in the patterns to be searched in the CAM in the form of a pattern key, the last pattern key of the stored pattern and the next pattern may be stored. And means for informing the boundary between the first pattern key of the pattern. The boundary between the patterns may also occur at any entry in the CAM.

도 13에 나타낸 연쇄기(440)는 찾고자 하는 패턴이 정해지면 그것에 따라 래치들과 논리곱 회로들을 연결하여 일종의 연쇄 회로를 독립적으로 만들어 두기 때문에, 먼저 저장된 패턴의 마지막 패턴 키와 다음 저장될 패턴의 첫 번째 패턴 키 사이의 경계는 명확하다고 할 수 있다. 그러나 새 패턴이 추가될 때마다 연쇄 회로를 새로이 추가해야 한다. Since the chain 440 shown in FIG. 13 determines the pattern to be searched and connects the latches and the AND circuits accordingly to make a kind of chain circuit independent, the last pattern key of the first stored pattern and the next pattern to be stored The boundary between the first pattern keys is clear. However, each time a new pattern is added, a new chain circuit must be added.

이러한 작업을 소프트웨어로 처리하는 것은 매우 간단한 것이 될 수 있으나, 하드웨어로 처리하고자 할 때는 매우 번거롭거나 불가능한 일이다. 예를 들어서, FPGA로 상기 회로를 구현한다면 상기 연쇄 회로가 추가될 때마다, FPGA에 포함된 모든 기능을 정지하고 새로 작성된 코드를 FPGA에 프로그래밍한 후 다시 동작시켜야 한다. Doing this in software can be very simple, but it can be very cumbersome or impossible when you want to do it in hardware. For example, if you implement the circuit in an FPGA, each time the chain is added, you must stop all the functions contained in the FPGA, program the newly written code in the FPGA, and then run it again.

이것은 매우 번거로운 작업일 뿐만 아니라 상기 기능을 포함한 시스템 운영 중에는 거의 불가능한 일이다. 따라서, 연쇄기(440)는 CAM(430)과 더불어 쉽게 프로그래밍 가능한 구조로 만들어야 한다. 이에 본 발명에 따른 연쇄기(440)는 CAM의 각 엔트리에 대응되는 래치와 논리곱 회로마다 상기 경계를 나타낼 수 있는 수단을 추가적으로 포함한다.This is not only a very cumbersome task, but also almost impossible during system operation with the above functions. Accordingly, the concatemer 440 must be made in an easily programmable structure with the CAM 430. Accordingly, the concatemer 440 according to the present invention further includes a means for indicating the boundary for each latch and logical circuit corresponding to each entry of the CAM.

도 15는 본 발명의 제2 실시예에 따른 정규 표현 매칭부에 포함되는 연쇄기의 예시도이다.15 is an exemplary diagram of a concatemer included in a regular expression matching unit according to the second embodiment of the present invention.

도 15에 도시된 바와 같이, 제2 실시예에 따른 연쇄기(480)는 복수의 스테이지를 포함하며, 각 스테이지는 논리곱 소자(480-1, 480-6, …), 래치(481L1, 481L5, …) 및 멀티플렉서(480M1, 480M10, …)를 포함한다. 여기서 멀티플렉서(480M1, 480M10, …)는 제1 멀티플렉서(480M1, 480M3, 480M5, 480M9 …)와 제2 멀티플렉서(480M2, 480M4, 480M6, 480M8, 480M10 …)로 구분지을 수 있다. 이때, 각 스테이지는 도 8에 도시한 각 스테이지와 유사한 구조를 가진다. 따라서, 연쇄기(480)의 동작은 도 8에 도시한 연쇄기(220')의 동작과 유사하다.As shown in FIG. 15, the concatemer 480 according to the second embodiment includes a plurality of stages, and each stage includes the logical AND elements 480-1, 480-6,..., And the latches 481 L1 ,. 481 L5 ...) And multiplexers 480 M1 , 480 M10 ... The multiplexer (480 M1, 480 M10, ... ) includes a first multiplexer (480 M1, 480 M3, 480 M5, 480 M9 ...) and a second multiplexer (480 M2, 480 M4, 480 M6, 480 M8, 480 M10 ...) Can be separated by At this time, each stage has a structure similar to that of each stage shown in FIG. Therefore, the operation of the chain linker 480 is similar to the operation of the chain linker 220 'shown in FIG.

다시 말해, 제2 실시예에 따른 연쇄기(480)가 도 13에 표현된 연쇄기(440)와 다른 점은, 복수의 멀티플렉서(480M1, 480M10, …)와 제어 신호가 추가되었다는 것이다. 도 15에서 멀티플렉서(480M1, 480M10, …)는 두 개의 데이터 입력 포트, 한 개의 출력 포트 그리고 한 개의 제어 신호 입력 포트를 가지고 있다. 두 개의 데이터 입력 포트는 0번 포트와 1번 포트로 구분된다. In other words, the cascade 480 according to the second embodiment differs from the cascade 440 illustrated in FIG. 13, in which a plurality of multiplexers 480 M1 , 480 M10 ,..., And control signals are added. In FIG. 15, the multiplexers 480 M1 , 480 M10 ,... Have two data input ports, one output port, and one control signal input port. The two data input ports are divided into port 0 and port 1.

제어 신호가 '0'이면 0번 포트에 입력된 데이터가 출력 포트로 출력되고, '1'이면 1번 포트에 입력된 데이터가 출력 포트로 출력된다. 도 15에서 pe1, pe2, … 등은 멀티플렉서들을 제어하기 위한 제어 신호들이다. 이 제어 신호들은 패턴과 패턴 사이 경계를 구분하기 위해 사용된다. If the control signal is '0', the data input to port 0 is output to the output port. If the control signal is '1', the data input to port 1 is output to the output port. In FIG. 15, pe 1 , pe 2 ,. And the like are control signals for controlling the multiplexers. These control signals are used to distinguish the pattern and the boundary between the patterns.

예를 들어서, pe1이 '1'이면 첫 번째 래치(480L1)의 출력 포트가 그 다음에 오는 두 번째 논리곱 회로(480-2)의 입력 포트에 연결되어 일종의 연쇄 회로가 형성된다. 반면, pe1이 '0'이면 첫 번째 래치(480L1)의 출력이 그 다음에 오는 두 번째 논리곱 회로(480-2)에 전달되지 않고 그 논리곱 회로(480-2)는 첫 번째 논리곱 회로(470-1)와 같은 형태가 되어, 첫 번째 래치(480L1) 및 논리곱 회로(480-1)와 분리가 된다. For example, if pe 1 is '1', the output port of the first latch 480 L1 is connected to the input port of the next logical AND circuit 480-2, which forms a kind of chain circuit. On the other hand, if pe 1 is '0', the output of the first latch 480 L1 is not passed to the second logical AND circuit 480-2 that follows, and the logical AND circuit 480-2 is the first logic. It becomes the same as the product circuit 470-1, and is separated from the first latch 480 L1 and the AND product circuit 480-1.

즉, pe1이 '0'일 때 패턴과 패턴 사이에 경계가 발생되며, 이에 따라 연쇄 회로가 다른 연쇄 회로와 분리된다. 또한 첫 번째 논리곱 회로의 결과가 p1에 전달된다. 따라서, h1이 발생하면 즉, 도 13에서 CAM의 첫 번째 엔트리에 해당하는 패턴 키가 제2 형태의 정규 표현 매칭부(470')에 입력된 경우 h1이 p1에 전달되어, 원하는 패턴이 검출되었음을 알리게 된다. That is, when pe 1 is '0', a boundary is generated between the pattern and the pattern, thereby separating the chain circuit from other chain circuits. The result of the first AND circuit is also passed to p 1 . Therefore, when h 1 occurs, that is, when the pattern key corresponding to the first entry of the CAM in FIG. 13 is input to the regular expression matching unit 470 ′ of the second type, h 1 is transferred to p 1 , and a desired pattern is obtained. It is informed that this is detected.

도 15에서 pe1과 pe2는 모두 '1'로 하고 pe3은 '0'으로 가정하면, 도 13의 연쇄 수단에 표현된 첫 번째 연쇄 회로와 동일한 연쇄 회로가 구성된다. 이 때 도 15 의 p3은 도 13의 p1과 동일한 결과를 나타낸다. In FIG. 15, assuming that both pe 1 and pe 2 are '1' and pe 3 is '0', the same chain circuit as the first chain circuit represented by the chain means of FIG. 13 is configured. At this time, p 3 of FIG. 15 shows the same result as p 1 of FIG. 13.

도 13의 CAM(440)은 보다 바람직하게는 TCAM이다. TCAM은 포함되는 엔트리 및 그 엔트리에 포함되는 요소를 무관심 항으로 만들 수 있는 기능을 포함한다.CAM 440 of FIG. 13 is more preferably TCAM. TCAM includes the ability to make indifferent terms contain an entry and the elements contained in that entry.

다음 본 발명의 제2 실시예에 따른 정규 표현 매칭부(400')는, 도 13에 표현된 바와 같이 메모리(460)를 포함한다. 메모리(460)는 특정 인덱스에 대응되는 실행 정보를 출력한다. 여기서 실행 정보는 찾고자 하는 패턴이 검출되었음을 알리는 히트 신호와 찾고자 하는 패턴이 검출되었음에 따른 다음 단계에서 수행해야될 사항들을 포함한다.Next, the regular expression matching unit 400 ′ according to the second embodiment of the present invention includes a memory 460 as shown in FIG. 13. The memory 460 outputs execution information corresponding to a specific index. Here, the execution information includes a hit signal indicating that the pattern to be searched for is detected and items to be performed in the next step according to the detection of the pattern to be searched for.

또한 본 발명의 제2 실시예에 따른 정규 표현 매칭부(400')의 지연기(470)는, 도 13의 메모리(460)가 연쇄기(450)에서 출력되는 인덱스를 처리하고 그에 대한 실행 정보를 출력하기까지에 소요되는 시간만큼 지연시킨다.In addition, the delay unit 470 of the regular expression matching unit 400 ′ according to the second embodiment of the present invention processes the index output from the concatenator 450 by the memory 460 of FIG. Delay as long as it takes to print.

이상에서 설명한 본 발명의 실시예는 장치 및 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하는 프로그램 또는 그 프로그램이 기록된 기록 매체를 통해 구현될 수도 있으며, 이러한 구현은 앞서 설명한 실시예의 기재로부터 본 발명이 속하는 기술분야의 전문가라면 쉽게 구현할 수 있는 것이다. The embodiments of the present invention described above are not only implemented by the apparatus and method but may be implemented through a program for realizing the function corresponding to the configuration of the embodiment of the present invention or a recording medium on which the program is recorded, The embodiments can be easily implemented by those skilled in the art from the description of the embodiments described above.

이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, It belongs to the scope of right.

도 1은 본 발명의 실시예에 따른 패턴 매칭 장치의 구조도이다.1 is a structural diagram of a pattern matching apparatus according to an embodiment of the present invention.

도 2는 본 발명의 실시예에 따른 제1 문자열 매칭부의 구조도이다.2 is a structural diagram of a first string matching unit according to an embodiment of the present invention.

도 3은 본 발명의 실시예에 따른 데이터의 형태를 나타낸 구조도이다.3 is a structural diagram showing the form of data according to an embodiment of the present invention.

도 4는 본 발명의 실시예에 따른 문자열들이 저장되는 형태를 나타낸 예시도이다.4 is an exemplary view showing a form in which character strings are stored according to an embodiment of the present invention.

도 5는 본 발명의 실시예에 따른 CAM에서 출력되는 히트 신호들 및 인덱스의 형태를 나타낸 예시도이다.5 is an exemplary view showing the form of the hit signals and the index output from the CAM according to an embodiment of the present invention.

도 6은 본 발명의 실시예에 따른 오프셋 검사 수단에서 출력되는 통합된 히트 신호와 인덱스의 형태를 나타내는 예시도이다.FIG. 6 is an exemplary view illustrating the form of an integrated hit signal and an index output from an offset check means according to an exemplary embodiment of the present invention.

도 7은 본 발명의 실시예에 따른 제2 문자열 매칭부의 구조도이다.7 is a structural diagram of a second string matching unit according to an embodiment of the present invention.

도 8은 본 발명의 실시예에 따른 제2 문자열 매칭부에 포함되는 연쇄기의 구조도이다.8 is a structural diagram of a chain linker included in a second string matching unit according to an embodiment of the present invention.

도 9a 및 도 9b는 본 발명의 실시예에 따른 키 발생부에서 출력되는 패턴 키의 형태를 나타내는 구조도이다.9A and 9B are structural diagrams illustrating the shape of a pattern key output from a key generating unit according to an embodiment of the present invention.

도 10은 본 발명의 제1 실시예에 따른 정규 표현 매칭부의 구성도이다.10 is a configuration diagram of a regular expression matching unit according to the first embodiment of the present invention.

도 11은 본 발명의 제1 실시예에 따른 정규 표현 매칭부의 상태 천이도이다.11 is a state transition diagram of a regular expression matching unit according to the first embodiment of the present invention.

도 12는 본 발명의 실시예에 따른 문자열 ID를 표시한 예시도이다.12 is an exemplary view showing a string ID according to an embodiment of the present invention.

도 13은 본 발명의 제2 실시예에 따른 정규 표현 매칭부의 구성도이다.13 is a configuration diagram of a regular expression matching unit according to the second embodiment of the present invention.

도 14는 본 발명의 실시예에 따른 래치의 예시도이다.14 is an exemplary view of a latch according to an embodiment of the present invention.

도 15는 본 발명의 제2 실시예에 따른 정규 표현 매칭부에 포함되는 연쇄기의 예시도이다.15 is an exemplary diagram of a concatemer included in a regular expression matching unit according to the second embodiment of the present invention.

Claims (25)

패턴 매칭 장치의 매턴 매칭 방법에 있어서,In the Maton matching method of the pattern matching device, 연속적으로 입력되는 문자열 스트림 내에 검색하고자 하는 패턴에 포함되는 제1 문자열이 있는지 확인하고, 상기 제1 문자열을 나타내는 문자열 인덱스 및 상기 문자열 인덱스에 대응되는 오프셋 신호를 출력하는 제1 문자열 매칭 단계;A first string matching step of checking whether there is a first string included in a pattern to be searched in a continuously input string stream, and outputting a string index representing the first string and an offset signal corresponding to the string index; 상기 제1 문자열을 나타내는 문자열 인덱스들로 구성될 수 있는 제2 문자열이 있는지 확인하고, 상기 제2 문자열을 나타내는 문자열 ID를 출력하는 제2 문자열 매칭 단계;A second string matching step of checking whether there is a second string, which may be composed of string indices representing the first string, and outputting a string ID representing the second string; 상기 문자열 인덱스를 지연시키는 단계;Delaying the string index; 상기 문자열 ID와 상기 지연시킨 문자열 인덱스를 이용하여 패턴 키를 생성하는 단계; 및Generating a pattern key using the string ID and the delayed string index; And 생성한 상기 패턴 키들로 구성될 수 있는 정규 표현들 중에 검색하고자 하는 상기 패턴을 나타내는 정규 표현을 검출하는 단계Detecting a regular expression representing the pattern to be searched among regular expressions that may be composed of the generated pattern keys 를 포함하는 패턴 매칭 방법.Pattern matching method comprising a. 제1항에 있어서,The method of claim 1, 상기 패턴 매칭 장치는 복수의 엔트리에 검색하고자 하는 제1 문자열이 각각 컨텐트로 저장되어 있는 복수의 CAM(Content Addressable Memory)을 포함하며,The pattern matching device includes a plurality of CAMs (Content Addressable Memory) in which a first string to be searched is stored in a plurality of entries, respectively, as contents. 상기 제1 문자열 매칭 단계는,The first string matching step, 상기 연속적으로 입력되는 제1 문자열들 사이의 시간 간격만큼, 상기 문자열 스트림을 지연시키는 단계;Delaying the string stream by a time interval between the successively input first strings; 지연된 상기 문자열 스트림을 상위로 하고, 새로 입력되는 문자열 스트림을 하위로 하는 제3 문자열 스트림을 생성하는 단계;Generating a third string stream having the delayed string stream as an upper level and having a newly input string stream as a lower level; 상기 제3 문자열 스트림을 상기 복수의 CAM에 각각 분배하여 제4 문자열 스트림을 출력하는 단계;Distributing the third string stream to the plurality of CAMs to output a fourth string stream; 상기 출력된 제4 문자열 스트림 내에 상기 제1 문자열에 해당하는 문자열이 있는지 검색하는 단계;Searching whether there is a string corresponding to the first string in the output fourth string stream; 상기 복수의 엔트리 중 상기 제1 문자열과 일치하는 문자열이 저장되어 있는 엔트리에 해당하는 히트 신호와 상기 문자열 인덱스를 발생시키는 단계; 및Generating a hit signal and the string index corresponding to an entry in which a string matching the first string is stored among the plurality of entries; And 상기 히트 신호를 발생시킨 엔트리에 대한 문자열 인덱스 및 오프셋 신호를 출력하는 단계Outputting a string index and an offset signal for the entry that generated the hit signal; 를 포함하는 패턴 매칭 방법.Pattern matching method comprising a. 제2항에 있어서,3. The method of claim 2, 상기 문자열 인덱스를 발생시키는 단계는,Generating the string index, 복수의 CAM에서 출력되는 복수의 히트 신호가 동시에 발생된 경우, 상기 복수의 히트 신호가 발생되기 바로 전에 검출된 제1 문자열에 대한 히트 신호를 발생시킨 CAM과 동일한 CAM에서 출력되는 히트 신호를 선택하여 출력하는 패턴 매칭 방법.When a plurality of hit signals output from a plurality of CAMs are generated at the same time, the hit signals output from the same CAM as the CAM that generated the hit signal for the first character string detected immediately before the plurality of hit signals are generated are selected. Pattern matching method to output. 제1항에 있어서,The method of claim 1, 상기 패턴 매칭 장치는 복수의 엔트리에 문자열 인덱스 및 오프셋 신호를 각각 컨텐트로 저장하고 있는 CAM(Content Addressable Memory)을 포함하며, The pattern matching apparatus includes a CAM (Content Addressable Memory) for storing a string index and an offset signal as content in a plurality of entries, respectively, 상기 제2 문자열 매칭 단계는,The second string matching step, 상기 제1 문자열 매칭 단계에서 출력된 문자열 인덱스와 오프셋 신호가 입력되면, 상기 CAM에 포함된 복수의 엔트리에 각각 저장되어 있는 컨텐트들과 상기 입력된 문자열 인덱스 및 오프셋 신호를 비교하는 단계;When the string index and the offset signal output in the first string matching step are input, comparing the input string index and offset signal with contents stored in a plurality of entries included in the CAM; 상기 컨텐트들과 상기 입력된 문자열 인덱스 및 오프셋 신호 중 일치되는 엔트리가 존재하면, 상기 일치되는 엔트리에 해당하는 히트 신호를 발생하는 단계;Generating a hit signal corresponding to the matched entry if there is a matched entry among the contents and the input string index and offset signal; 상기 히트 신호들을 조합하여 상기 검색하고자 하는 패턴에 포함되는 상기 제2 문자열이 검출되었음을 알리는 검출 신호를 발생하는 단계; 및Generating a detection signal indicating that the second character string included in the pattern to be searched is detected by combining the hit signals; And 상기 검출 신호에 대응하는 인덱스를 포함하는 상기 문자열 ID를 출력하는 단계Outputting the string ID including an index corresponding to the detection signal 를 포함하는 패턴 매칭 방법.Pattern matching method comprising a. 제4항에 있어서,5. The method of claim 4, 상기 문자열 ID를 출력하는 단계는,The step of outputting the string ID, 상기 검출 신호가 발생하면, 상기 인덱스를 문자열 ID 형태로 변환하는 단계Converting the index into a string ID form when the detection signal is generated 를 더 포함하는 패턴 매칭 방법.Pattern matching method further comprising. 제1항에 있어서,The method of claim 1, 상기 패턴 키를 생성하는 단계는,Generating the pattern key, 상기 제2 문자열이 검출되면, 상기 제2 문자열이 검출되었음을 알리는 검출 신호와 상기 검출한 제2 문자열에 해당되는 문자열 ID를 상기 패턴 키로 생성하는 단계; 및When the second string is detected, generating a detection signal indicating that the second string is detected and a string ID corresponding to the detected second string as the pattern key; And 상기 제2 문자열이 검출되지 않으면, 상기 지연시킨 문자열 인덱스를 상기 패턴 키로서 생성하는 단계If the second string is not detected, generating the delayed string index as the pattern key 를 포함하는 패턴 매칭 방법.Pattern matching method comprising a. 제1항에 있어서,The method of claim 1, 상기 패턴 매칭 장치는 복수의 엔트리에 각각 패턴 키와 상태 변수를 컨텐트로 저장하고 있는 CAM을 포함하며,The pattern matching device includes a CAM for storing a pattern key and a state variable as contents in a plurality of entries, respectively, 상기 정규 표현을 검출하는 단계는,Detecting the regular expression, 상기 CAM에서 히트 신호가 발생되면, 상기 히트 신호에 따른 인덱스에 대응되는 상태 변수를 생성하고, 상기 인덱스에 대응되는 실행 정보를 출력하는 상태 천이 단계When a hit signal is generated in the CAM, a state transition step of generating a state variable corresponding to the index according to the hit signal and outputting execution information corresponding to the index 를 더 포함하는 패턴 매칭 방법.Pattern matching method further comprising. 제7항에 있어서,The method of claim 7, wherein 상기 정규 표현을 검출하는 단계는,Detecting the regular expression, 상기 상태 천이 단계를 통해 생성된 상태 변수와 상기 생성한 패턴 키가 입력되면 상기 복수의 엔트리에 저장되어 있는 컨텐트들과 비교하는 단계; 및Comparing a state variable generated through the state transition step and contents generated in the plurality of entries when the generated pattern key is input; And 상기 복수의 엔트리와 일치하는 상기 생성한 패턴 키가 존재하면, 일치하는 엔트리에 해당하는 히트 신호 및 상기 일치하는 엔트리에 대한 인덱스를 출력하는 단계If the generated pattern key that matches the plurality of entries exists, outputting a hit signal corresponding to the matching entry and an index for the matching entry; 를 포함하는 패턴 매칭 방법.Pattern matching method comprising a. 제1항에 있어서,The method of claim 1, 상기 패턴 매칭 장치는 복수의 엔트리에 패턴 키를 각각 컨텐트로 저장하고 있는 복수의 CAM을 포함하며,The pattern matching device includes a plurality of CAMs each storing a pattern key as a content in a plurality of entries, 상기 정규 표현을 검출하는 단계는,Detecting the regular expression, 상기 생성한 패턴 키가 입력되면, 상기 복수의 엔트리에 저장되어 있는 컨텐트 중 상기 패턴 키와 일치하는 컨텐트에 대한 엔트리가 존재하는지 판단하는 단계;When the generated pattern key is input, determining whether there is an entry for content that matches the pattern key among contents stored in the plurality of entries; 일치하는 엔트리가 존재하면, 상기 일치하는 엔트리에 해당하는 히트 신호를 발생하는 단계;If there is a matching entry, generating a hit signal corresponding to the matching entry; 상기 복수의 엔트리에서 순차적으로 출력되는 히트 신호들을 조합하여, 상기 패턴이 검출되었음을 알리는 검출 신호를 발생하는 단계; Generating a detection signal informing that the pattern is detected by combining hit signals sequentially output from the plurality of entries; 상기 검출 신호에 대응되는 인덱스를 발생하는 단계; 및Generating an index corresponding to the detection signal; And 상기 인덱스에 대응되는 실행 정보를 출력하는 단계Outputting execution information corresponding to the index 를 포함하는 패턴 매칭 방법.Pattern matching method comprising a. 제2항에 있어서,3. The method of claim 2, 상기 연속적으로 입력되는 문자열 스트림, 제1 문자열, 제3 문자열 스트림 및 제4 문자열 스트림은 1 클록에 2바이트 이상씩 처리되는 패턴 매칭 방법.And the string string, the first string, the third string stream, and the fourth string stream, which are continuously input, are processed by two or more bytes per clock. 패턴 매칭 장치에 있어서,In the pattern matching device, 연속적으로 입력되는 문자열 스트림 내에 검색하고자 하는 패턴에 포함되는 제1 문자열이 있는지 확인하고, 상기 제1 문자열을 나타내는 문자열 인덱스 및 상기 제1 문자열 인덱스에 대응되는 오프셋 신호를 출력하는 제1 문자열 매칭부;A first string matching unit configured to check whether there is a first string included in a pattern to be searched in a continuously input string stream, and to output a string index representing the first string and an offset signal corresponding to the first string index; 상기 제1 문자열 매칭부로부터 출력되는 오프셋 신호 및 문자열 인덱스를 이용하여 상기 제1 문자열을 나타내는 문자열 인덱스들로 구성되는 제2 문자열이 있는지 확인하고, 상기 제2 문자열을 나타내는 문자열 ID를 출력하는 제2 문자열 매칭부;A second string that checks whether there is a second string composed of string indexes representing the first string using an offset signal and a string index output from the first string matching unit, and outputs a string ID representing the second string A string matching unit; 상기 문자열 인덱스를 지연시키는 지연부;A delay unit for delaying the string index; 상기 제2 문자열 매칭부에서 출력한 상기 문자열 ID와 상기 지연부에서 지연시킨 상기 문자열 인덱스를 이용하여 패턴 키를 생성하는 키 발생부; 및A key generation unit generating a pattern key using the string ID output from the second string matching unit and the string index delayed by the delay unit; And 상기 키 발생부에서 생성한 상기 패턴 키들로 구성될 수 있는 정규 표현들 중에 검색하고자 하는 상기 패턴을 나타내는 정규 표현을 검출하는 정규 표현 매칭부A regular expression matching unit that detects a regular expression representing the pattern to be searched among regular expressions that may be composed of the pattern keys generated by the key generator. 를 포함하는 패턴 매칭 장치.Pattern matching device comprising a. 제11항에 있어서,12. The method of claim 11, 상기 제1 문자열 매칭부는,The first string matching unit, 상기 연속적으로 입력되는 제1 문자열들 사이의 시간 간격만큼 상기 문자열 스트림을 지연시키는 지연기;A delayer for delaying the string stream by the time interval between the successively input first strings; 상기 지연된 문자열 스트림을 상위로, 새로 입력되는 문자열 스트림을 하위로 하는 제3 문자열 스트림을 생성하고, 상기 생성한 제3 문자열 스트림을 분배하여 제4 문자열 스트림을 출력하는 분배기;A distributor configured to generate a third string stream having the delayed string stream above and a newly input string stream below, and to distribute the generated third string stream to output a fourth string stream; 상기 제1 문자열이 컨텐트로서 각각 저장되어 있는 복수의 엔트리를 포함하며, 상기 분배기로부터 분배되어 출력되는 제4 문자열 스트림과 상기 복수의 엔트리에 저장되어 있는 복수의 컨텐트를 비교하여 일치되는 엔트리에 해당하는 히트 신호 및 인덱스를 발생하는 복수의 CAM; 및The first string includes a plurality of entries, each of which is stored as content, and corresponds to a matched entry by comparing a plurality of contents stored in the plurality of entries with a fourth string stream distributed and output from the distributor. A plurality of CAMs for generating hit signals and indices; And 상기 복수의 CAM에서 출력되는 인덱스들 중 우선 순위가 높은 인덱스 신호를 문자열 인덱스로 출력하고, 히트 신호들 중 우선 순위가 높은 히트 신호에 대한 오프셋 신호를 출력하는 오프셋 검사기An offset checker for outputting a high priority index signal among strings output from the plurality of CAMs as a string index and outputting an offset signal for a high priority hit signal among the hit signals; 를 포함하는 패턴 매칭 장치.Pattern matching device comprising a. 제11항에 있어서,12. The method of claim 11, 상기 제2 문자열 매칭부는,The second string matching unit, 문자열 인덱스와 오프셋 신호가 컨텐트로서 각각 저장되어 있는 복수의 엔트리를 포함하며, 상기 제1 문자열 매칭부로부터 출력되는 상기 오프셋 신호 및 문자열 인덱스와 상기 복수의 엔트리에 저장되어 있는 복수의 컨텐트를 비교하여 일치되는 엔트리에 해당하는 히트 신호를 발생하는 CAM;A plurality of entries each having a string index and an offset signal stored as content, and comparing the offset signal and the string index output from the first string matching unit with a plurality of contents stored in the plurality of entries to match. A CAM for generating a hit signal corresponding to the entry; 상기 CAM으로부터 상기 히트 신호가 발생되면 상기 히트 신호를 조합하여 상기 제2 문자열이 검출되었음을 알리는 검출 신호를 발생하는 연쇄기; 및A concatemer for generating a detection signal indicating that the second character string is detected by combining the hit signals when the hit signal is generated from the CAM; And 상기 연쇄기로부터 출력되는 인덱스를 문자열 ID로 변환하는 인덱스 변환기Index converter for converting the index output from the concatemer into a string ID 를 포함하는 패턴 매칭 장치.Pattern matching device comprising a. 제13항에 있어서,14. The method of claim 13, 상기 연쇄기는,The chain linker, 상기 문자열 인덱스에 대응되는 히트 신호들이 입력되는 복수의 제1 입력 단자, 그리고 상기 검출 신호를 출력하는 제1 출력 단자를 가지는 복수의 연쇄 회로를 포함하는 패턴 매칭 장치.And a plurality of chain circuits having a plurality of first input terminals to which hit signals corresponding to the character string index are input, and a first output terminal to output the detection signal. 제14항에 있어서,The method of claim 14, 상기 복수의 연쇄 회로는The plurality of chain circuits 제2 입력 단자, 그리고 제2 출력 단자를 가지는 복수의 플립플롭; 및A plurality of flip-flops having a second input terminal and a second output terminal; And 제3 및 제4 입력 단자, 그리고 제3 출력 단자를 가지는 복수의 논리곱 게이트A plurality of AND gates having third and fourth input terminals and a third output terminal 를 포함하며,/ RTI > 각 플립플롭의 제2 출력 단자가 각 논리곱 게이트의 제3 입력 단자에 연결되어 있고, 복수의 논리곱 게이트 중 마지막에 위치하는 논리곱 게이트를 제외한 나머지 논리곱 게이트의 제3 출력 단자가 상기 복수의 플립플롭 중 맨 앞에 위치하는 플립플롭을 제외한 나머지 플립플롭의 제2 입력 단자에 연결되어 있으며,The second output terminal of each flip-flop is connected to the third input terminal of each AND gate, and the third output terminal of the AND gate except for the last AND gate of the plurality of AND gates is the plurality of AND gates. Is connected to the second input terminal of the other flip-flops except for the flip-flop located at the front of the flip-flop, 상기 마지막에 위치하는 논리곱 게이트의 제3 출력 단자가 상기 제1 출력 단자를 형성하며, 상기 맨 앞에 위치하는 플립플롭의 제2 입력 단자와 상기 각 논리곱게이트의 제4 입력 단자가 각각 상기 복수의 제1 입력 단자를 형성하는 패턴 매칭 장치.A third output terminal of the last logical AND gate forms the first output terminal, and a second input terminal of the front flip-flop and a fourth input terminal of each logical AND gate are each of the plurality; The pattern matching device which forms the 1st input terminal of a. 제13항에 있어서,14. The method of claim 13, 상기 연쇄기는,The chain linker, 검색하고자 하는 제2 문자열에 각각 대응하는 복수의 연쇄 회로를 포함하고,A plurality of chain circuits each corresponding to a second string to be searched, 각 연쇄 회로는,Each chain circuit, 각각 제1 및 제2 입력 단자, 제1 및 제2 출력 단자, 그리고 제어 단자를 가지는 복수의 스테이지를 포함하며,A plurality of stages each having a first and a second input terminal, a first and a second output terminal, and a control terminal, 각 스테이지의 상기 제1 입력 단자는 인접한 스테이지의 상기 제2 출력 단자에 연결되어 있으며,The first input terminal of each stage is connected to the second output terminal of an adjacent stage, 각 스테이지의 상기 제2 입력 단자는 검색하고자 하는 제2 문자열에 포함되는 각 문자열 인덱스에 대응하는 히트 신호를 입력받고, 상기 제어 단자는 제어 신 호를 입력받으며, 상기 제1 출력 단자는 상기 검출 신호를 출력하며,The second input terminal of each stage receives a hit signal corresponding to each string index included in the second string to be searched, the control terminal receives a control signal, and the first output terminal receives the detection signal. Outputs 상기 제어 신호에 의해 인접한 스테이지가 분리되는 패턴 매칭 장치.And a pattern matching device in which adjacent stages are separated by the control signal. 제16항에 있어서,17. The method of claim 16, 각 스테이지는,Each stage, 상기 제1 및 제2 입력 단자로 입력되는 데이터를 논리곱 연산하여 출력 단자로 출력하는 논리곱 게이트;An AND gate for performing an AND operation on the data input to the first and second input terminals and outputting the AND signal to an output terminal; 상기 논리곱 게이트의 출력 단자와 연결되어 있는 입력 단자, 그리고 출력 단자를 가지는 플립플롭;A flip-flop having an input terminal connected to the output terminal of the AND gate and an output terminal; 제1 데이터가 입력되는 제3 입력 단자, 상기 논리곱 게이트의 출력 단자와 연결되어 있는 제4 입력 단자, 그리고 상기 제1 출력 단자를 형성하는 제3 출력 단자를 가지는 제1 멀티플렉서; 및A first multiplexer having a third input terminal to which first data is input, a fourth input terminal connected to the output terminal of the AND gate, and a third output terminal forming the first output terminal; And 상기 플립플롭의 출력 단자에 연결되어 있는 제5 입력 단자, 제2 데이터가 입력되는 제6 입력 단자, 그리고 상기 제2 출력 단자를 형성하는 제4 출력 단자를 가지는 제2 멀티플렉서를 포함하는 패턴 매칭 장치.A pattern matching device comprising a second multiplexer having a fifth input terminal connected to an output terminal of the flip-flop, a sixth input terminal to which second data is input, and a fourth output terminal forming the second output terminal. . 제16항에 있어서,17. The method of claim 16, 상기 제어 신호에 의해 먼저 저장된 제2 문자열에 포함되는 마지막 문자열 인덱스와 다음 저장된 제2 문자열에 포함되는 첫 번째 문자열 인덱스 사이의 경계가 구분되는 패턴 매칭 장치.And a boundary between the last string index included in the first stored second string and the first string index included in the next stored second string by the control signal. 제11항에 있어서,12. The method of claim 11, 상기 정규 표현 매칭부는,The regular expression matching unit, 패턴 키와 상태 변수가 컨텐트로서 각각 저장되어 있는 복수의 엔트리를 포함하며, 상기 키 발생부에서 생성된 패턴 키와 상태 천이기에서 출력된 상태 변수가 입력되면, 상기 입력된 패턴 키 및 상태 변수를 복수의 엔트리에 저장되어 있는 컨텐트들과 비교하여 일치되는 엔트리에 해당하는 히트 신호를 발생시키고, 상기 히트 신호를 발생시킨 엔트리에 대응하는 인덱스를 출력하는 CAM; 및And a plurality of entries in which a pattern key and a state variable are stored as content, respectively, and when the pattern key generated by the key generator and the state variable output from the state translator are input, the input pattern key and state variable are inputted. A CAM for generating a hit signal corresponding to a matched entry compared to contents stored in a plurality of entries, and outputting an index corresponding to the entry for generating the hit signal; And 복수의 엔트리의 각 인덱스에 대응하는 상태 변수가 저장되어 있으며, 상기 CAM으로부터 출력된 인덱스에 대응하는 상태 변수를 상기 CAM으로 출력하는 상태 천이기A state shifter corresponding to each index of a plurality of entries is stored and outputs a state variable corresponding to an index output from the CAM to the CAM. 를 포함하는 패턴 매칭 장치.Pattern matching device comprising a. 제19항에 있어서,20. The method of claim 19, 상기 상태 천이기는 상기 각 인덱스 중 특정 인덱스에 대응하는 실행 정보를 출력하며, 상기 실행 정보는 상기 패턴의 검출을 알리는 히트 신호를 포함하는 패턴 매칭 장치.The state shifter outputs execution information corresponding to a specific index among the indices, and the execution information includes a hit signal indicating the detection of the pattern. 제11항에 있어서,12. The method of claim 11, 상기 정규 표현 매칭부는,The regular expression matching unit, 패턴 키가 컨텐츠로서 각각 저장되어 있는 복수의 엔트리를 포함하며, 상기 키 발생부에서 생성된 패턴 키가 입력되면, 상기 패턴 키와 복수의 엔트리에 저장되어 있는 컨텐트들을 비교하여 일치되는 엔트리에 해당하는 히트 신호를 출력하는 CAM;The pattern key includes a plurality of entries each stored as content, and when the pattern key generated by the key generation unit is input, the pattern key is compared with the contents stored in the plurality of entries to correspond to the matching entry. A CAM for outputting a hit signal; 상기 복수의 엔트리에서 순차적으로 출력되는 히트 신호를 조합하여 상기 패턴의 검출을 알리는 검출 신호를 발생시키며, 상기 검출 신호에 대응하는 인덱스를 출력하는 연쇄기; 및A concatemer for generating a detection signal indicative of detection of the pattern by combining hit signals sequentially output from the plurality of entries, and outputting an index corresponding to the detection signal; And 상기 인덱스에 대응하는 실행 정보를 출력하는 메모리부A memory unit for outputting execution information corresponding to the index 를 포함하는 패턴 매칭 장치.Pattern matching device comprising a. 제21항에 있어서,22. The method of claim 21, 상기 연쇄기는,The chain linker, 상기 패턴에 포함되는 제2 문자열에 대응하는 히트 신호가 입력되는 복수의 제1 입력 단자, 그리고 상기 검출 신호를 출력하는 제1 출력 단자를 가지는 복수의 연쇄 회로를 포함하며, A plurality of chain circuits having a plurality of first input terminals to which a heat signal corresponding to a second character string included in the pattern is input, and a first output terminal to output the detection signal, 각 연쇄 회로는,Each chain circuit, 제2 입력 단자, 그리고 제2 출력 단자를 가지는 복수의 래치, 그리고A plurality of latches having a second input terminal and a second output terminal, and 제3 및 제4 입력 단자, 그리고 제3 출력 단자를 가지는 복수의 논리곱 게이트를 포함하며,A plurality of AND gates having a third and fourth input terminal and a third output terminal, 각 래치의 제2 출력 단자가 각 논리 게이트의 제3 입력 단자에 연결되어 있 고, 복수의 논리 게이트 중 마지막에 위치하는 논리곱 게이트를 제외한 나머지 논리곱 게이트의 제3 출력 단자가 상기 복수의 래치 중 맨 앞에 위치하는 래치를 제외한 나머지 래치의 제2 입력 단자에 연결되어 있으며,The second output terminal of each latch is connected to the third input terminal of each logic gate, and the third output terminal of the logical AND gate except the last logical gate positioned among the plurality of logic gates is the plurality of latches. Is connected to the second input terminal of the remaining latches except for the latch located at the front of the 상기 마지막에 위치하는 논리곱 게이트의 제3 출력 단자가 상기 제1 출력 단자를 형성하며, 상기 맨 앞에 위치하는 래치의 제2 입력 단자와 상기 각 논리곱 게이트의 제4 입력 단자가 각각 상기 복수의 제1 입력 단자를 형성하는 패턴 매칭 장치.The third output terminal of the last logical AND gate forms the first output terminal, and the second input terminal of the first latch and the fourth input terminal of each logical AND gate are each of the plurality of logical gates. A pattern matching device forming a first input terminal. 제21항에 있어서,22. The method of claim 21, 상기 연쇄기는,The chain linker, 상기 패턴에 각각 대응하는 복수의 연쇄 회로를 포함하고,A plurality of chain circuits each corresponding to the pattern; 각 연쇄 회로는,Each chain circuit, 각각 제1 및 제2 입력 단자, 제1 및 제2 출력 단자, 그리고 제어 단자를 가지는 복수의 스테이지를 포함하며,A plurality of stages each having a first and a second input terminal, a first and a second output terminal, and a control terminal, 각 스테이지의 상기 제1 입력 단자는 인접한 스테이지의 상기 제2 출력 단자에 연결되어 있으며,The first input terminal of each stage is connected to the second output terminal of an adjacent stage, 각 스테이지의 상기 제2 입력 단자는 상기 문자열 검출부에서 검출한 문자열에 대응하는 히트 신호를 입력 받고, 상기 제어 단자는 제어 신호를 입력 받으며, 상기 제1 출력 단자는 상기 검출 신호를 출력하며,The second input terminal of each stage receives a hit signal corresponding to the character string detected by the character string detector, the control terminal receives a control signal, and the first output terminal outputs the detection signal. 상기 제어 신호에 의해 인접한 스테이지가 분리되는 패턴 매칭 장치.And a pattern matching device in which adjacent stages are separated by the control signal. 제23항에 있어서,24. The method of claim 23, 상기 각 스테이지는,Each stage, 상기 제1 및 제2 입력 단자로 입력되는 데이터를 논리곱 연산하여 출력 단자로 출력하는 논리곱 게이트;An AND gate for performing an AND operation on the data input to the first and second input terminals and outputting the AND signal to an output terminal; 상기 논리곱 게이트의 출력 단자와 연결되어 있는 입력 단자, 그리고 출력 단자를 가지는 래치;A latch having an input terminal and an output terminal connected to an output terminal of the AND gate; 제1 데이터가 입력되는 제3 입력 단자, 상기 논리곱 게이트의 출력 단자와 연결되어 있는 제4 입력 단자, 그리고 상기 제1 출력 단자를 형성하는 제3 출력 단자를 가지는 제1 멀티플렉서; 및A first multiplexer having a third input terminal to which first data is input, a fourth input terminal connected to the output terminal of the AND gate, and a third output terminal forming the first output terminal; And 상기 래치의 출력 단자에 연결되어 있는 제5 입력 단자, 제2 데이터가 입력되는 제6 입력 단자, 그리고 상기 제2 출력 단자를 형성하는 제4 출력 단자를 가지는 제2 멀티플렉서를 포함하는 패턴 매칭 장치. And a second multiplexer having a fifth input terminal connected to an output terminal of the latch, a sixth input terminal to which second data is input, and a fourth output terminal forming the second output terminal. 제22항에 있어서,23. The method of claim 22, 상기 래치는,The latch is, 두 입력 단자 및 출력 단자를 가지는 제3 멀티플렉서; 및A third multiplexer having two input terminals and an output terminal; And 상기 제3 멀티플렉서의 출력 단자에 연결되어 있는 입력 단자 및 상기 제3 멀티플렉서의 두 입력 단자 중 하나의 입력 단자에 연결되어 있는 출력 단자를 가지는 플립플롭을 포함하며,A flip-flop having an input terminal connected to an output terminal of the third multiplexer and an output terminal connected to one input terminal of two input terminals of the third multiplexer, 상기 제3 멀티플렉서의 두 입력 단자 중 다른 하나의 입력 단자가 상기 래치의 입력 단자를 형성하는 패턴 매칭 장치.And the other input terminal of two input terminals of the third multiplexer forms an input terminal of the latch.
KR1020090079440A 2008-12-02 2009-08-26 Method and apparatus for pattern matching for multi-character parallel data stream KR101262337B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20080121422 2008-12-02
KR1020080121422 2008-12-02

Publications (2)

Publication Number Publication Date
KR20100062896A KR20100062896A (en) 2010-06-10
KR101262337B1 true KR101262337B1 (en) 2013-05-08

Family

ID=42363095

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020090079440A KR101262337B1 (en) 2008-12-02 2009-08-26 Method and apparatus for pattern matching for multi-character parallel data stream

Country Status (1)

Country Link
KR (1) KR101262337B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080046423A1 (en) 2006-08-01 2008-02-21 Lucent Technologies Inc. Method and system for multi-character multi-pattern pattern matching

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080046423A1 (en) 2006-08-01 2008-02-21 Lucent Technologies Inc. Method and system for multi-character multi-pattern pattern matching

Also Published As

Publication number Publication date
KR20100062896A (en) 2010-06-10

Similar Documents

Publication Publication Date Title
Bispo et al. Regular expression matching for reconfigurable packet inspection
US8972450B2 (en) Multi-stage parallel multi-character string matching device
US7308446B1 (en) Methods and apparatus for regular expression matching
US7464254B2 (en) Programmable processor apparatus integrating dedicated search registers and dedicated state machine registers with associated execution hardware to support rapid application of rulesets to data
US6792502B1 (en) Microprocessor having a content addressable memory (CAM) device as a functional unit therein and method of operation
CN104881422B (en) Engine, method and software defined network for generating lookups and making decisions
US8190738B2 (en) Detection of patterns in a data stream
US7596553B2 (en) String matching using data bit masks
US20140019486A1 (en) Logic Content Processing for Hardware Acceleration of Multi-Pattern Search
WO2006074014A2 (en) Database query processor
JP6592310B2 (en) Semiconductor device
Bando et al. Scalable lookahead regular expression detection system for deep packet inspection
Wang et al. Memory-based architecture for multicharacter Aho–Corasick string matching
US8599853B2 (en) System and method for an exact match search using pointer based pipelined multibit trie traversal technique
US8666930B2 (en) String matching method
Erdem Tree-based string pattern matching on FPGAs
KR101276796B1 (en) Apparatus and method for matching pattern
Simão et al. Generating checking sequences for partial reduced finite state machines
US8463988B2 (en) System and method for matching patterns
KR101262337B1 (en) Method and apparatus for pattern matching for multi-character parallel data stream
Lin et al. Efficient pattern matching algorithm for memory architecture
US6384713B1 (en) Serial comparator
JP2004526274A (en) Search for words of different sizes
Hajiabadi et al. Scalable, high-throughput and modular hardware-based string matching algorithm
Wang et al. Hardware accelerator to detect multi-segment virus patterns

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20160425

Year of fee payment: 8