KR100832539B1 - Method and module for searching multi-pattern using pattern board which does not support multi-pattern - Google Patents

Method and module for searching multi-pattern using pattern board which does not support multi-pattern Download PDF

Info

Publication number
KR100832539B1
KR100832539B1 KR1020060123197A KR20060123197A KR100832539B1 KR 100832539 B1 KR100832539 B1 KR 100832539B1 KR 1020060123197 A KR1020060123197 A KR 1020060123197A KR 20060123197 A KR20060123197 A KR 20060123197A KR 100832539 B1 KR100832539 B1 KR 100832539B1
Authority
KR
South Korea
Prior art keywords
pattern
index
patterns
rule
search
Prior art date
Application number
KR1020060123197A
Other languages
Korean (ko)
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 한국전자통신연구원
Priority to KR1020060123197A priority Critical patent/KR100832539B1/en
Application granted granted Critical
Publication of KR100832539B1 publication Critical patent/KR100832539B1/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/1425Traffic logging, e.g. anomaly detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • H04L63/0263Rule management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A multi-pattern search method using a pattern board which doesn't support a multi-pattern and an apparatus for the same are provided to implement multi-pattern searching through a pattern board supporting only single-pattern searching by configuring a bitmap table for search rules and creating a pattern index table containing the input pattern information of each pattern board. A multi-pattern search apparatus comprises a search rule setup part(410), an information storage part(420), and a multi-pattern judgement part(430). The search rule setup part creates a bitmap table, which contains rule indexes, pattern information, and bitmap information, and a pattern index table, which contains the input pattern and pattern index information of each pattern board corresponding to each of the patterns of the bitmap table. The information storage part stores the bitmap table and the pattern index table. Using the pattern boards, the multi-pattern judgement part extracts one or more patterns from an input stream, confirms a search rule associated with the extracted patterns through the pattern index table, and judges the existence of a multi-pattern in the input stream through the bitmap table.

Description

다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법 및 장치{Method and module for searching multi-pattern using pattern board which does not support multi-pattern}Method and module for searching multi-pattern using pattern board which does not support multi-pattern}

도 1은 본 발명의 실시예에 따른 패턴보드를 이용한 다중패턴 검색 방법의 흐름도,1 is a flowchart of a multi-pattern search method using a pattern board according to an embodiment of the present invention;

도 2는 본 발명의 실시예에 따른 비트맵 테이블을 나타내는 도면,2 is a diagram illustrating a bitmap table according to an embodiment of the present invention;

도 3은 본 발명의 실시예에 따른 패턴 인덱스 테이블을 나타내는 도면, 그리고3 illustrates a pattern index table according to an embodiment of the present invention; and

도 4는 본 발명의 실시예에 따른 패턴보드를 이용한 다중패턴 검색 장치를 나타낸 구성도이다.4 is a block diagram showing a multi-pattern search apparatus using a pattern board according to an embodiment of the present invention.

본 발명은 패턴 검색 방법 및 장치에 관한 것으로, 특히 입력 스트림에 대해 다중패턴의 검색을 지원하지 않는 패턴보드를 이용하여 둘 이상의 다중패턴의 존재 유무를 검색하기 위한 다중패턴 검색 방법 및 장치에 관한 것이다. The present invention relates to a pattern retrieval method and apparatus, and more particularly, to a multi-pattern retrieval method and apparatus for retrieving the presence or absence of two or more multi-patterns using a pattern board that does not support retrieval of multiple patterns for an input stream. .

일반적으로 패턴보드는 입력 스트림(stream)으로부터 찾고자 하는 패턴이 포 함되어 있는지를 검색하는 가속 보드 형태로서 방화벽 또는 침입탐지 시스템에서 고속의 패턴 검색을 수행하는데 이용된다. In general, the pattern board is an acceleration board that searches whether a pattern to be found from an input stream is included and is used to perform a fast pattern search in a firewall or intrusion detection system.

그러나 기존의 패턴보드는 입력 스트림에 대한 패턴 검색시 단일 패턴의 검색만을 반복할 수 있을 뿐이어서, 다중패턴이 포함된 규칙을 사용하는 시스템에서는 사용상의 제약이 따른다는 문제가 있다.However, the existing pattern board can only repeat the search of a single pattern when searching for a pattern on the input stream, and there is a problem in that a system using a rule including multiple patterns has usage restrictions.

본 발명이 이루고자 하는 기술적 과제는, 단일 패턴의 검색을 지원하도록 설계된 패턴보드를 이용하여 입력 스트림에 다중패턴이 포함되어 있는지를 검색할 수 있는 다중패턴 검색 방법 및 장치를 제공하는 데 있다.An object of the present invention is to provide a multi-pattern retrieval method and apparatus for retrieving whether an input stream includes a multi-pattern using a pattern board designed to support a single pattern retrieval.

상기와 같은 목적을 달성하기 위하여 본 발명의 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법은, 검색 규칙에 포함된 다중패턴에 대한 정보를 관리하는 비트맵 테이블을 생성하는 제1단계; 패턴보드의 입력패턴별로 상기 비트맵 테이블의 각 검색 규칙과의 관계를 정의한 패턴 인덱스 테이블을 생성하는 제2단계; 상기 패턴보드를 이용하여 입력 스트림에 존재하는 하나 이상의 패턴을 추출하는 제3단계 및; 상기 패턴 인덱스 테이블을 참조하여 상기 추출된 패턴과 관련된 검색 규칙을 확인하고, 상기 비트맵 테이블을 참조하여 각 검색규칙의 다중패턴 존재 여부를 판단하는 제4단계를 포함한다.In order to achieve the above object, a multi-pattern retrieval method using a pattern board that does not support the multi-pattern of the present invention, the first step of generating a bitmap table for managing information about the multi-pattern included in the search rule; Generating a pattern index table defining a relationship with each search rule of the bitmap table for each input pattern of a pattern board; Extracting one or more patterns present in the input stream using the pattern board; And a fourth step of checking a search rule related to the extracted pattern by referring to the pattern index table and determining whether multiple search patterns exist in each search rule by referring to the bitmap table.

상기와 같은 목적을 달성하기 위하여 본 발명의 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 장치는, 상기 검색규칙에 포함된 패턴에 대한 정 보를 포함하는 비트맵 테이블 및 상기 비트맵 테이블의 각각의 패턴에 해당하는 패턴보드의 입력패턴과 패턴 인덱스 정보를 포함하는 패턴 인덱스 테이블을 생성하는 검색규칙 설정부; 상기 비트맵 테이블 및 패턴 인덱스 테이블을 저장하는 정보 저장부; 및 상기 패턴보드를 이용하여 입력된 스트림에 존재하는 하나 이상의 패턴을 추출하고 상기 패턴 인덱스 테이블 및 비트맵 테이블을 참조하여 상기 추출된 패턴이 포함된 규칙을 확인하며 상기 입력 스트림에 존재하는 다중패턴을 검색하는 다중패턴 판단부를 포함한다.In order to achieve the above object, a multi-pattern retrieval apparatus using a pattern board that does not support the multi-pattern of the present invention includes a bitmap table and a bitmap table each including information about a pattern included in the search rule. A search rule setting unit generating a pattern index table including an input pattern of the pattern board and pattern index information corresponding to a pattern of the pattern board; An information storage unit for storing the bitmap table and the pattern index table; And extracting one or more patterns existing in the input stream using the pattern board, checking the rules including the extracted patterns by referring to the pattern index table and the bitmap table, and extracting the multiple patterns existing in the input stream. It includes a multi-pattern determination unit for searching.

이하 첨부된 도면을 참조하여 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있는 바람직한 실시예를 상세히 설명한다. 다만, 본 발명의 바람직한 실시예에 대한 동작 원리를 상세하게 설명함에 있어 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다. 또한, 도면 전체에 걸쳐 유사한 기능 및 작용을 하는 부분에 대해서는 동일한 도면 부호를 사용한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, in describing in detail the operating principle of the preferred embodiment of the present invention, if it is determined that the detailed description of the related known functions or configurations may unnecessarily obscure the subject matter of the present invention, the detailed description thereof will be omitted. In addition, the same reference numerals are used for parts having similar functions and functions throughout the drawings.

도 1은 본 발명의 바람직한 일 실시예에 따른 다중패턴을 검색하는 방법의 흐름을 개략적으로 도시한 도면이다. 도 1을 참조하면, 다중패턴의 검색 규칙에 따라서 상기 규칙의 인덱스(index), 상기 규칙 인덱스 각각에 대응되는 규칙에 포함된 하나 이상의 패턴, 및 상기 규칙 인덱스 각각에 대응되는 단일 규칙에 포함된 패턴의 최대 개수와 동일한 비트(bit)수로 이루어진 패턴 비트맵 정보를 포함하여 검색 규칙에 포함된 다중 패턴 정보를 관리하는 비트맵 테이블을 생성한다(S100). 상기 검색 규칙은 방화벽 또는 침입 탐지 시스템에서 침입 탐지를 위해 미리 정의된 규칙이며, 상기 비트맵 테이블의 실제 구현 예에 대해서는 도 2를 참조하여 설명하기로 한다.1 is a view schematically showing the flow of a method for searching for multiple patterns according to an embodiment of the present invention. Referring to FIG. 1, an index of the rule, one or more patterns included in a rule corresponding to each rule index, and a pattern included in a single rule corresponding to each rule index according to a multi-pattern search rule A bitmap table is generated to manage the multi-pattern information included in the search rule, including the pattern bitmap information having the same number of bits as the maximum number of times (S100). The search rule is a predefined rule for intrusion detection in a firewall or intrusion detection system, and an actual implementation of the bitmap table will be described with reference to FIG. 2.

도 2는 본 발명의 일 실시예에 따른 비트맵 테이블의 개략적인 모습을 도시한 도면이다. 비트맵 테이블은 본 발명을 이용하여 검색을 하는 시스템의 다중패턴 검색 규칙에 따라서, 각 규칙별로 다중패턴의 비트맵 정보를 포함하여 구성한 테이블이다. 도 2를 참조하면, 본 실시예에서 비트맵 테이블은 규칙 인덱스(210), 패턴(220), 및 패턴 비트맵(230)을 포함하여 구성된다. 2 is a diagram illustrating a schematic view of a bitmap table according to an embodiment of the present invention. The bitmap table is a table including bitmap information of multiple patterns for each rule according to the multi-pattern search rule of the system for searching using the present invention. Referring to FIG. 2, in the present embodiment, the bitmap table includes a rule index 210, a pattern 220, and a pattern bitmap 230.

상기 규칙 인덱스(210)는 예를 들어, 본 발명을 이용하여 다중패턴을 검색하는 칩입 탐지 시스템 등에서 제공되는 규칙의 색인이다. 그리고 상기 패턴(220)은 상기 검색 규칙에 포함된 하나 이상의 패턴 정보를 나타낸다.The rule index 210 is, for example, an index of a rule provided in an intrusion detection system or the like which searches for multiple patterns using the present invention. The pattern 220 represents one or more pattern information included in the search rule.

상기 패턴 비트맵(230)은 각 규칙별로 포함된 다중패턴에 대한 정보를 포함한 것으로서, 검색 규칙에 포함된 패턴(220) 각각의 위치 정보를 이용하여 생성된다. 본 테이블에서 패턴 비트맵(230)의 최대 비트수는 단일 규칙 내 패턴의 최대 개수와 동일하다. 상기 비트맵 테이블은, 예를 들어, 단일 규칙 내 패턴의 최대 개수가 10인 경우 각각의 규칙 인덱스(210)에 대응되는 10비트로 구성된 패턴 비트맵(230) 정보를 갖게 된다. 상기 패턴 비트맵(230)의 비트수는 단일 규칙 내 패턴의 최대 개수 이상이면 되지만 최소의 비트수로 표현하는 것이 바람직하므로, 최대 개수로 설정한다.The pattern bitmap 230 includes information on multiple patterns included in each rule and is generated by using location information of each of the patterns 220 included in the search rule. In this table, the maximum number of bits of the pattern bitmap 230 is equal to the maximum number of patterns in a single rule. For example, when the maximum number of patterns in a single rule is 10, the bitmap table has pattern bitmap 230 information including 10 bits corresponding to each rule index 210. The number of bits of the pattern bitmap 230 may be equal to or greater than the maximum number of patterns in a single rule, but it is preferable to express the minimum number of bits.

상기 단계(S100)를 구체적으로 살펴보면, 먼저 각 규칙들에 대해서 규칙 인덱스(210)를 설정하고, 해당 규칙 인덱스에 포함되는 패턴(220)을 정한 후, 해당 패턴(220)들에 대한 패턴 비트맵(230) 정보를 생성하여 비트맵 테이블을 구성한다. 이때, 각 규칙 내에서 패턴들의 위치 정보에 해당하는 비트를 '1'로 설정하고 나머지는 '0'으로 설정하는 방식으로 패턴 비트맵(230)을 생성한다. 예를 들어, 도 2의 테이블에서 규칙 인덱스(210)가 5인 행(240)을 참조하면, 해당 규칙에서 검색하고자 하는 패턴은 'root', 'tree', 'branch'의 세 개이다. 이런 세 개의 패턴(220)이 비트맵 테이블에 기술될 때에, 상기 행(240)에서 패턴(220) 항목의 첫 번째 패턴인 'root'에 해당되는 패턴 비트맵(230)의 첫 번째 비트를 '1'로 설정한다(물론, '1'과 '0'의 값을 바꾸어 설정하거나 다른 방식으로 설정하는 것도 가능할 것이다). 여기에서, 첫 번째 비트의 오른쪽에 위치한 '(b)'는 이진수(binary number)를 의미한다(이하, 이진수는 '(b)'로서 표현하기로 함). 마찬가지로 'tree'와 'branch'에 해당되는 상기 패턴 비트맵(230)의 두 번째, 세 번째 비트를 각각 '1'로 설정한다. 이 때, 단일 규칙 내 패턴의 최대 개수가 10이라면, 규칙 인덱스(210)가 5인 규칙의 최종 패턴 비트맵(230)은 0000000111(b)의 값을 갖게 된다. Referring to step S100 in detail, first, a rule index 210 is set for each rule, a pattern 220 included in the rule index is determined, and a pattern bitmap for the patterns 220 is provided. The information is generated to construct a bitmap table. At this time, the pattern bitmap 230 is generated by setting the bit corresponding to the position information of the patterns within each rule to '1' and setting the rest to '0'. For example, referring to the row 240 in which the rule index 210 is 5 in the table of FIG. 2, three patterns of 'root', 'tree', and 'branch' are searched for in the rule. When these three patterns 220 are described in the bitmap table, the first bit of the pattern bitmap 230 corresponding to 'root' which is the first pattern of the pattern 220 item in the row 240 is' Set to 1 '(of course, it is possible to change the values of' 1 'and' 0 'or set them in different ways). Here, '(b)' located to the right of the first bit means binary number (hereinafter, binary will be referred to as '(b)'). Similarly, the second and third bits of the pattern bitmap 230 corresponding to 'tree' and 'branch' are set to '1', respectively. In this case, if the maximum number of patterns in a single rule is 10, the final pattern bitmap 230 of the rule having the rule index 210 of 5 has a value of 0000000111 (b).

다시, 도 1을 참조하면, 검색 규칙에 대한 비트맵 테이블을 생성한 후(S100), 상기 비트맵 테이블의 패턴 비트맵(230)에서 각각의 패턴의 위치를 나타내는 비트 인덱스를 계산한다(S110). 상기 비트 인덱스는, 예를 들어, n이 자연수일 때, 해당 패턴을 나타내는 비트가 n번째 비트인 경우 해당 패턴의 비트 인덱스를 n으로 나타내는 방식으로 계산될 수 있다. 즉, 상기 설명한 도 2의 비트맵 테이 블의 5번째 행(240)을 참조하면, 패턴(220)의 'root'를 나타내는 패턴 인덱스(230)의 비트는 첫번째 비트이므로, 해당 비트 인덱스는 1이 되고, 마찬가지 방식으로 'tree'와 'branch'에 해당하는 비트 인덱스는 각각 2와 3이 된다.Referring back to FIG. 1, after generating a bitmap table for a search rule (S100), a bit index indicating a position of each pattern in the pattern bitmap 230 of the bitmap table is calculated (S110). . For example, when n is a natural number, when the bit representing the pattern is the nth bit, the bit index may be calculated in a manner of representing the bit index of the pattern as n. That is, referring to the fifth row 240 of the bitmap table of FIG. 2 described above, since the bit of the pattern index 230 indicating 'root' of the pattern 220 is the first bit, the corresponding bit index is 1; Similarly, the bit indices corresponding to 'tree' and 'branch' are 2 and 3, respectively.

다시 도 1을 참조하면, 비트맵 테이블 상의 각각의 패턴에 대한 비트 인덱스를 계산하고 나면(S110), 상기 비트맵 테이블의 규칙 인덱스, 단일 규칙 내 패턴의 최대 개수 정보 및 상기 계산된 비트 인덱스 정보를 이용하여, 상기 비트맵 테이블에 포함된 모든 패턴에 대해 패턴 인덱스를 생성한다(S120). 그리고, 각각의 패턴 정보 및 이에 대응되는 패턴 인덱스 정보를 포함하는 패턴 인덱스 테이블을 생성한다(S130). 상기 패턴 인덱스 및 패턴 인덱스의 생성에 대해서는 도 3을 참조하여 보다 상세하게 설명하기로 한다.Referring back to FIG. 1, after calculating a bit index for each pattern on a bitmap table (S110), the rule index of the bitmap table, the maximum number information of patterns in a single rule, and the calculated bit index information are calculated. In operation S120, a pattern index is generated for all patterns included in the bitmap table. In operation S130, a pattern index table including pattern information and pattern index information corresponding thereto is generated. The generation of the pattern index and the pattern index will be described in more detail with reference to FIG. 3.

도 3은 본 발명의 일 실시예에 따른 패턴 인덱스 테이블을 개략적으로 표현한 도면이다. 본 실시예에서 패턴 인덱스 테이블은 상기 비트맵 테이블의 각각의 패턴에 해당하는 입력패턴(310)과 패턴 인덱스(320) 정보를 포함하여 구성된다. 상기 입력패턴(310)은 패턴보드를 이용한 검색에 사용되는 패턴이다. 상기 입력패턴(310)은 상기 비트맵 테이블의 패턴(220) 각각에 대한 정보를 담고 있다. 그리고 패턴 인덱스(320)는 해당 패턴을 포함하는 검색 규칙의 규칙 인덱스(210)와 해당 패턴의 비트맵(230) 인덱스로부터 생성된다. 이때 생성된 패턴 인덱스는 이후 패턴보드의 입력패턴(310)과 일치하는 입력 스트림의 패턴이 검색되면 추출된 패턴을 나타내는 결과값으로 출력된다.3 is a view schematically showing a pattern index table according to an embodiment of the present invention. In the present exemplary embodiment, the pattern index table includes input pattern 310 and pattern index 320 information corresponding to each pattern of the bitmap table. The input pattern 310 is a pattern used for searching using a pattern board. The input pattern 310 contains information about each pattern 220 of the bitmap table. The pattern index 320 is generated from the rule index 210 of the search rule including the pattern and the index of the bitmap 230 of the pattern. In this case, the generated pattern index is then output as a result value indicating the extracted pattern when a pattern of an input stream matching the input pattern 310 of the pattern board is searched.

각각의 패턴이 패턴 인덱스 테이블에 입력될 때에는 이후 입력 스트림에 대 한 패턴 검색 결과로 사용될 인덱스가 필요하게 되는데, 이러한 패턴 인덱스(320)는 패턴의 규칙 인덱스(210)와 패턴의 비트맵(230) 인덱스 및 단일 규칙 내 패턴의 최대 개수를 이용하여 아래와 같은 수식을 통해 생성한다.When each pattern is input to the pattern index table, an index to be used as a pattern search result for the input stream is required. The pattern index 320 includes the rule index 210 of the pattern and the bitmap 230 of the pattern. Using the maximum number of indexes and patterns in a single rule, create the following equation.

PI = (RI - 1) x MP + BIPI = (RI-1) x MP + BI

상기 수식에서, PI는 패턴 인덱스,In the above formula, PI is the pattern index,

RI는 규칙 인덱스,RI is the rule index,

MP는 단일 규칙 내 패턴의 최대 개수, 그리고MP is the maximum number of patterns within a single rule, and

BI는 비트 인덱스.BI bit index.

예를 들어, 단일 규칙 내 패턴의 최대 개수(MP)가 10인 경우, 상기 도 2의 행(240)의 패턴 'tree'에 대한 패턴 인덱스(320)는 규칙 인덱스(RI)가 5이고 비트 인덱스(BI)가 2이기 때문에 상기 수식에 의해 42가 된다. For example, when the maximum number MP of patterns in a single rule is 10, the pattern index 320 for the pattern 'tree' of the row 240 of FIG. 2 has a rule index RI of 5 and a bit index. Since (BI) is 2, it becomes 42 by the said formula.

PI = (5 - 1) x 10 + 2 = 42PI = (5-1) x 10 + 2 = 42

이러한 과정을 반복하여 상기 비트맵 테이블의 모든 패턴(220)에 대한 패턴 인덱스(320)를 생성하고, 상기 패턴(220) 각각을 입력패턴(310)으로 하고 해당 패턴 인덱스(320) 정보를 포함한 패턴 인덱스 테이블을 생성할 수 있게 된다.By repeating this process, a pattern index 320 is generated for all patterns 220 of the bitmap table, and each of the patterns 220 is an input pattern 310 and a pattern including corresponding pattern index 320 information. You can create index tables.

다시 도 1을 참조하면, 상기 패턴 인덱스 테이블을 생성한 후에(S130), 입력 스트림이 수신되면(S140), 상기 패턴보드의 입력패턴(310)과 일치하는 패턴을 추출하고, 상기 패턴 인덱스 테이블로부터 해당하는 패턴 인덱스(320)를 검색한 다(S150). 그리고 상기 단계(S150)에서 검색한 패턴 인덱스(320) 및 상기 단일 규칙 내 패턴의 최대 개수를 이용하여, 상기 추출된 패턴의 규칙 인덱스 및 비트 인덱스를 계산한다(S160). 이때, 상기 규칙 인덱스는, 예를 들어, 다음과 같은 수식을 통해 계산할 수 있다.Referring back to FIG. 1, after generating the pattern index table (S130), and when an input stream is received (S140), a pattern matching the input pattern 310 of the pattern board is extracted, and from the pattern index table. The pattern index 320 is searched for (S150). The rule index and the bit index of the extracted pattern are calculated using the pattern index 320 retrieved in the step S150 and the maximum number of patterns in the single rule (S160). In this case, the rule index may be calculated through, for example, the following equation.

RI = (PI / MP) + 1RI = (PI / MP) + 1

상기 수식에서, RI는 규칙 인덱스,In the above formula, RI is a rule index,

'/'는 좌측 변수를 우측 변수로 나눈 몫을 나타내는 연산자,'/' Is an operator representing the quotient of the left variable divided by the right variable,

PI는 패턴 인덱스, 그리고PI is the pattern index, and

MP는 단일 규칙 내 패턴의 최대 개수.MP is the maximum number of patterns within a single rule.

또한, 상기 비트 인덱스는, 예를 들어, 다음과 같은 수식을 통해 계산할 수 있다.In addition, the bit index may be calculated through, for example, the following equation.

BI = PI % MPBI = PI% MP

상기 수식에서, BI는 비트 인덱스In the above formula, BI is a bit index

'%'는 좌측 변수를 우측 변수로 나눈 나머지를 나타내는 연산자,'%' Is an operator representing the remainder of the left variable divided by the right variable,

PI는 패턴 인덱스, 그리고PI is the pattern index, and

MP는 단일 규칙 내 패턴의 최대 개수.MP is the maximum number of patterns within a single rule.

예를 들어, 상기 검색 결과 패턴 인덱스(PI)(320)가 42인 경우, 규칙 인덱스(RI)와 비트 인덱스(BI)는 각각 5와 2가 된다. For example, when the search result pattern index (PI) 320 is 42, the rule index RI and the bit index BI are 5 and 2, respectively.

RI = (42 / 10) + 1 = 5RI = (42/10) + 1 = 5

BI = 42 % 10 = 2BI = 42% 10 = 2

즉, 패턴 인덱스(320)의 검색 결과 42는 비트맵 테이블 상에서 규칙 인덱스(210)가 5인 규칙의 두번째 패턴(220)인 "tree"가 입력 스트림에 포함되어 있다는 의미가 된다.That is, the search result 42 of the pattern index 320 means that the input stream includes “tree”, which is the second pattern 220 of the rule having the rule index 210 of 5 on the bitmap table.

그 후, 이렇게 계산된 정보를 이용하여 입력 스트림에 포함된 각 패턴의 플래그 변수를 생성한다(S170). 상기 플래그 변수는 상기 비트맵 테이블의 단일 규칙 내 패턴의 최대 개수와 같은 수의 비트수를 갖고 있다. 그리고 해당 패턴에 대해 계산한 비트 인덱스가 나타내는 위치의 비트를 '1'로 설정하고, 나머지 비트값은 '0'으로 설정하여 생성한다(이 경우에도 '1'과 '0'의 값을 서로 바꾸어 설정하거나 다른 방식으로 설정할 수 있음은 물론이다).Thereafter, the flag variable of each pattern included in the input stream is generated using the calculated information (S170). The flag variable has a number of bits equal to the maximum number of patterns in a single rule of the bitmap table. The bit at the position indicated by the bit index calculated for the pattern is set to '1' and the remaining bit values are set to '0' (in this case, the values of '1' and '0' are interchanged). Of course, you can set or otherwise).

예를 들어, 상기 플래그 변수는 다음과 같은 수식을 이용하여 생성된다.For example, the flag variable is generated using the following equation.

Flag[RI] = Flag[RI] OR {1<<(BI-1)}Flag [RI] = Flag [RI] OR {1 << (BI-1)}

상기 수식에서, RI는 규칙 인덱스,In the above formula, RI is a rule index,

BI는 비트 인덱스, 그리고BI is a bit index, and

'<<'는 비트 쉬프트 레프트(bit shift left) 연산자.'<<' is a bit shift left operator.

예를 들어, 단일 규칙 내 최대 다중패턴의 개수가 10이고 스트림에서 추출한 특정 패턴에 대한 계산 결과 규칙 인덱스가 5이고 비트 인덱스가 2인 경우, 해당 플래그 변수 Flag[RI]는 1<<(2-1)하여(즉, '1'의 비트를 1만큼 왼쪽으로 쉬프트하여), 아래와 같이 두번째 비트를 '1'로 설정한 형태가 된다. For example, if the maximum number of multiple patterns in a single rule is 10 and the calculation result for a specific pattern extracted from the stream has a rule index of 5 and a bit index of 2, then the corresponding flag variable Flag [RI] is 1 << (2- 1) (i.e., shifting the bit of '1' to the left by 1), the second bit is set to '1' as shown below.

Flag[5] = 0000000010(b)Flag [5] = 0000000010 (b)

특정 패턴에 대한 플래그 변수의 생성(S170)이 끝나면, 상기 스트림의 다른 패턴에 대해 상기 단계들(S150 내지 S170)을 반복한다. 만일 더 검색할 입력 스트림이 없으면(S180), 해당 스트림으로부터 추출한 패턴 중 상기 단계(S160)에서 계산한 규칙 인덱스를 비교하여 그 값이 서로 같은 패턴의 플래그 변수들을 조합하여 최종 플래그 변수를 생성한다(S190).After generation of the flag variable for a specific pattern (S170), the steps (S150 to S170) are repeated for another pattern of the stream. If there is no input stream to be searched further (S180), the rule index calculated in step S160 among the patterns extracted from the stream is compared and the final flag variable is generated by combining the flag variables of the pattern having the same pattern (S180). S190).

상기 각각의 플래그 변수의 조합은 각각의 플래그 변수에서 같은 위치의 비트값을 비교하여 해당 비트값이 모두 '0'인 경우에만, 최종 플래그 변수의 동일한 위치의 비트값을 '0'으로 설정하고, 나머지 비트값은 '1'로 설정하는 방식으로 이루어진다(다른 방법도 가능할 것임은 상기 설명한 바와 같다). 예를 들어, 만일 해당 스트림에서 'root'와 'tree'의 패턴이 추출되었다면, 각각의 플래그 변수는 상기와 같은 방법으로 Flag[5] = 0000000001(b), Flag[5] = 0000000010(b)과 같이 생성될 것이다. 여기에서 세번째 비트부터 열번째 비트까지는 양 플래그 변수의 비트값이 모두 '0'이므로 최종 플래그 변수의 세번째 비트부터 열번째 비트까지는 비트값이 '0'이 되고, 그렇지 않은 첫번째 및 두번째 비트의 비트값은 '1'이 된다. 따라서, 해당 스트림에 포함된 패턴 중 규칙 인덱스가 5인 패턴들의 최종 플래그 변 수 값은 Flag[5]= 0000000011(b)와 같이 된다.The combination of each flag variable compares the bit value of the same position in each flag variable and sets the bit value of the same position of the last flag variable to '0' only when the corresponding bit values are all '0', The remaining bit values are set in a manner of '1' (as described above, other methods may be possible). For example, if the pattern of 'root' and 'tree' is extracted from the stream, each flag variable is set as above Flag [5] = 0000000001 (b), Flag [5] = 0000000010 (b) Will be generated as Since the bit values of both flag variables are '0' from the third bit to the tenth bit, the bit value is '0' from the third bit to the tenth bit of the last flag variable, and the bit value of the first and second bit is not. Becomes '1'. Therefore, the final flag variable value of the patterns having the rule index of 5 among the patterns included in the stream becomes Flag [5] = 0000000011 (b).

이런 방식으로 최종 플래그 변수의 생성을 완료하면(S190), 이 값과 비트맵 테이블의 정보를 비교한다(S200). 즉, 최종 플래그 변수가 Flag[5]라면(규칙 인덱스가 5인 것을 의미) 해당 최종 플래그 값을, 비트맵 테이블의 규칙 인덱스가 5인 행에서 해당 패턴 비트맵 값과 비교하고, 만일 일치한다면, 해당 규칙의 다중패턴은 입력 스트림에 대해 일치하는 검색 결과를 갖게 된다.When the final flag variable is generated in this manner (S190), this value is compared with the information in the bitmap table (S200). That is, if the last flag variable is Flag [5] (meaning the rule index is 5), the corresponding final flag value is compared with the corresponding pattern bitmap value in the row with the rule index of the bitmap table of 5, and if it matches, Multiple patterns of that rule will have matching search results for the input stream.

예를 들어, 단일 규칙 내 패턴의 최대 개수가 10인 패턴 검색의 최종 단계에서, 규칙 인덱스(210)가 5인 최종 플래그 변수의 값이 Flag[5] = 0000000011(b)이고 규칙 인덱스가 5인 규칙의 패턴 비트맵(230)이 0000000111(b)이면 최종적으로 해당 다중패턴(230)은 입력 스트림에 대해서 일치하는 결과가 없다고 판단한다. 즉 인덱스가 5인 행(240)의 'root', 'tree', 'branch'에 대한 다중패턴 검사 결과, 실제로 입력 스트림에는 'root' 및 'tree'의 패턴만 존재하기 때문에 해당 규칙과 일치하는 다중패턴이 존재하지 않음을 알 수 있다.For example, in the final stage of a pattern search where the maximum number of patterns in a single rule is 10, the value of the last flag variable with rule index 210 of 5 is Flag [5] = 0000000011 (b) and rule index of 5 If the pattern bitmap 230 of the rule is 0000000111 (b), the corresponding multipattern 230 finally determines that there is no match for the input stream. In other words, the result of the multi-pattern check on 'root', 'tree', and 'branch' of row 240 with index 5 actually matches only the patterns of 'root' and 'tree' in the input stream. It can be seen that multiple patterns do not exist.

도 4는 본 발명의 일 실시예에 따른 다중패턴 검색 장치(400)의 구성을 개략적으로 나타낸 도면이다. 도 4를 참조하면, 본 실시예의 다중패턴 검색 장치는 검색규칙 설정부(410), 정보 저장부(420) 및 다중패턴 판단부(430)를 포함하여 구성된다. 4 is a diagram schematically showing the configuration of a multi-pattern search apparatus 400 according to an embodiment of the present invention. Referring to FIG. 4, the multi-pattern search apparatus according to the present embodiment includes a search rule setting unit 410, an information storage unit 420, and a multi-pattern determination unit 430.

상기 검색규칙 설정부(410)는 본 발명을 이용하여 검색하고자하는 규칙에 포함된 다중패턴에 대한 정보, 즉, 비트맵 테이블과 패턴 인덱스 테이블을 설정한다. 상기 설정은 시스템 관리자에 의해 이루어질 수 있고, 본 발명을 이용한 시스템 등 에서 필요에 따라 적절하게 설정하는 것도 가능할 것이다.The search rule setting unit 410 sets information on multiple patterns included in a rule to be searched, that is, a bitmap table and a pattern index table using the present invention. The setting may be made by a system administrator, and may be appropriately set as necessary in a system using the present invention.

상기 정보 저장부(420)는 상기 검색규칙 설정부(410)에서 설정된 다중패턴의 검색 규칙에 포함된 패턴에 대한 정보를 포함하는 비트맵 테이블, 및 상기 비트맵 테이블의 패턴 각각에 해당하는 패턴보드(440)의 입력패턴과 패턴 인덱스 정보를 포함하는 패턴 인덱스 테이블을 등을 저장한다. 상기 비트맵 테이블은 다중패턴의 검색 규칙에 따라서 상기 규칙의 인덱스, 상기 규칙 인덱스 각각에 대응되는 규칙에 포함된 하나 이상의 패턴, 및 상기 규칙 인덱스 각각에 대응되는 단일 규칙에 포함된 패턴의 최대 개수와 동일한 비트(bit)수로 이루어진 패턴 비트맵 정보를 포함한다.The information storage unit 420 may include a bitmap table including information about a pattern included in a multi-pattern search rule set by the search rule setting unit 410, and a pattern board corresponding to each of the patterns of the bitmap table. A pattern index table including an input pattern and pattern index information of 440 is stored. The bitmap table may include an index of the rule, one or more patterns included in a rule corresponding to each rule index, and a maximum number of patterns included in a single rule corresponding to each rule index according to a multi-pattern search rule. Contains pattern bitmap information consisting of the same number of bits.

상기 다중패턴 판단부(430)는 입력 스트림에 대하여 상기 패턴보드(440)를 이용하여 검색규칙에 포함되는 패턴을 추출하고, 상기 패턴 인덱스 테이블을 검색하여 해당되는 패턴 인덱스를 추출한다. 그리고 해당 패턴에 대한 규칙 인덱스 및 비트 인덱스를 계산하여 플래그 변수를 생성하고, 같은 규칙 인덱스를 갖는 추출된 패턴을 분류하여 최종 플래그 변수를 생성한다. 마지막으로 상기 분류에 사용된 규칙 인덱스 각각에 해당하는 최종 플래그 변수와 상기 비트맵 테이블의 패턴 비트맵을 비교하여 다중패턴 여부를 검색한다. 상기 비트맵 테이블, 패턴 인덱스 테이블 및 다중패턴의 검색 과정에 대한 내용은 상기 도 1, 도 2 및 도 3을 참조하여 설명한 바와 같다.The multi-pattern determination unit 430 extracts a pattern included in a search rule with respect to the input stream using the pattern board 440, and searches the pattern index table to extract a corresponding pattern index. A flag variable is generated by calculating a rule index and a bit index of the corresponding pattern, and a final flag variable is generated by classifying extracted patterns having the same rule index. Finally, the final flag variable corresponding to each rule index used in the classification and the pattern bitmap of the bitmap table are compared to search for multiple patterns. The details of the bitmap table, the pattern index table, and the multi-pattern search process have been described with reference to FIGS. 1, 2, and 3.

이제까지 본 발명에 대하여 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질 적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far I looked at the center of the preferred embodiment of the present invention. Those skilled in the art will appreciate that the present invention can be implemented in a modified form without departing from the essential features of the present invention. Therefore, the disclosed embodiments should be considered in descriptive sense only and not for purposes of limitation. The scope of the present invention is shown in the claims rather than the foregoing description, and all differences within the scope will be construed as being included in the present invention.

상기와 같은 본 발명의 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법은, 검색 규칙에 대한 비트맵 테이블을 구성하고 이에 따라 패턴보드의 입력패턴 정보를 포함한 패턴 인덱스 테이블을 생성하여, 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴의 검색이 가능하도록 한다.In the multi-pattern retrieval method using a pattern board that does not support the multi-pattern of the present invention as described above, by constructing a bitmap table for a search rule and generating a pattern index table including input pattern information of the pattern board, Allows to search for multiple patterns using pattern boards that do not support patterns.

상기와 같은 본 발명의 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 장치는, 단일 패턴의 검색만을 지원하는 패턴보드를 이용하여 추가의 하드웨어를 필요로 하지 않으면서 확장이 용이한 다중패턴의 검색 장치를 제시한다.Multi-pattern retrieval apparatus using a pattern board that does not support the multi-pattern of the present invention as described above, by using a pattern board that supports the search of a single pattern of the multi-pattern that can be easily expanded without requiring additional hardware Present a search device.

Claims (22)

검색 규칙에 포함된 다중패턴에 대한 정보인 규칙 인덱스, 패턴 정보 및 패턴 비트맵 정보를 관리하는 비트맵 테이블을 생성하는 제1단계; Generating a bitmap table that manages rule indexes, pattern information, and pattern bitmap information, which are information on multiple patterns included in a search rule; 패턴보드의 입력패턴별로 상기 비트맵 테이블의 각 검색 규칙과의 관계를 정의한 패턴 인덱스 테이블을 생성하는 제2단계; Generating a pattern index table defining a relationship with each search rule of the bitmap table for each input pattern of a pattern board; 상기 패턴보드를 이용하여 입력 스트림에 존재하는 하나 이상의 패턴을 추출하는 제3단계 및; Extracting one or more patterns present in the input stream using the pattern board; 상기 패턴 인덱스 테이블을 참조하여 상기 추출된 패턴과 관련된 검색 규칙을 확인하고, 상기 비트맵 테이블을 참조하여 각 검색규칙의 다중패턴 존재 여부를 판단하는 제4단계를 포함하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.A pattern that does not support multiple patterns including a fourth step of identifying a search rule related to the extracted pattern by referring to the pattern index table and determining whether multiple search patterns exist in each search rule by referring to the bitmap table Multi-pattern search method using board. 제1항에 있어서, The method of claim 1, 상기 규칙 인덱스는 검색 규칙의 색인을 나타내고, 상기 패턴 정보는 상기 각각의 규칙에 포함되는 하나 이상의 패턴 정보를 나타내고, 상기 패턴 비트맵 정보는 단일 규칙 내 패턴의 최대 개수와 동일한 비트(bit)수로 이루어지며 상기 패턴들의 위치 정보로 생성되는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.The rule index indicates an index of a search rule, the pattern information indicates one or more pattern information included in each rule, and the pattern bitmap information includes the same number of bits as the maximum number of patterns in a single rule. The multi-pattern search method using a pattern board that does not support multiple patterns, characterized in that generated by the location information of the patterns. 제2항에 있어서, 상기 패턴 비트맵은 The method of claim 2, wherein the pattern bitmap is 패턴 각각의 위치에 해당하는 비트값을 1로 설정하고, 나머지 비트값을 0으로 설정한 패턴 비트맵인 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.A multi-pattern retrieval method using a pattern board that does not support multiple patterns, characterized in that it is a pattern bitmap in which the bit value corresponding to each position of the pattern is set to 1 and the remaining bit values are set to 0. 제2항에 있어서, 상기 제1단계는 The method of claim 2, wherein the first step 상기 비트맵 테이블의 패턴 비트맵에서 각각의 패턴의 위치를 나타내는 비트 인덱스를 계산하는 단계를 더 포함하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.And calculating a bit index indicating a position of each pattern in the pattern bitmap of the bitmap table. 제4항에 있어서, 상기 비트 인덱스는 The method of claim 4, wherein the bit index is n이 자연수일 때, 해당 패턴을 나타내는 비트가 n번째 비트인 경우 해당 비트 인덱스를 n으로 계산하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.When n is a natural number, if the bit representing the pattern is the nth bit, the multi-pattern retrieval method using a pattern board that does not support multiple patterns, characterized in that the corresponding bit index is calculated as n. 제4항에 있어서, 상기 제2단계의 상기 패턴 인덱스는 The method of claim 4, wherein the pattern index of the second step is 상기 비트맵 테이블의 규칙 인덱스, 단일 규칙 내 패턴의 최대 개수 및 상기 비트 인덱스 정보를 이용하여 생성되는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.The multi-pattern retrieval method using a pattern board that does not support multiple patterns, characterized in that generated using the rule index of the bitmap table, the maximum number of patterns in a single rule and the bit index information. 제6항에 있어서, 상기 패턴 인덱스는 The method of claim 6, wherein the pattern index is 다음 수식을 이용하여 생성하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.Multiple pattern retrieval method using a pattern board that does not support multiple patterns, characterized in that generated using the following formula. PI = (RI - 1) x MP + BIPI = (RI-1) x MP + BI 상기 수식에서, PI는 패턴 인덱스,In the above formula, PI is the pattern index, RI는 규칙 인덱스,RI is the rule index, MP는 단일 규칙 내 패턴의 최대 개수, 그리고MP is the maximum number of patterns within a single rule, and BI는 비트 인덱스.BI bit index. 제6항에 있어서, 상기 제4단계는The method of claim 6, wherein the fourth step 상기 추출된 패턴 각각에 대응되는 패턴 인덱스를 상기 패턴 인덱스 테이블에서 검색하는 단계; 및Retrieving a pattern index corresponding to each of the extracted patterns from the pattern index table; And 상기 검색한 패턴 인덱스와 상기 단일 규칙 내 패턴의 최대 개수를 이용하여 상기 추출된 패턴의 규칙 인덱스 및 비트인덱스를 계산하는 단계를 더 포함하는 것 을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.Computing a rule index and a bit index of the extracted pattern using the retrieved pattern index and the maximum number of patterns in the single rule using a pattern board that does not support multiple patterns Multi-pattern search method. 제8항에 있어서, 상기 추출된 패턴의 규칙 인덱스는 The method of claim 8, wherein the rule index of the extracted pattern is 다음 수식을 이용하여 계산하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.Multiple pattern search method using a pattern board that does not support multiple patterns, characterized in that calculated using the following formula. RI = (PI / MP) + 1RI = (PI / MP) + 1 상기 수식에서, RI는 규칙 인덱스,In the above formula, RI is a rule index, '/'는 좌측 변수를 우측 변수로 나눈 몫을 나타내는 연산자,'/' Is an operator representing the quotient of the left variable divided by the right variable, PI는 패턴 인덱스, 그리고PI is the pattern index, and MP는 단일 규칙 내 패턴의 최대 개수.MP is the maximum number of patterns within a single rule. 제8항에 있어서, 상기 추출된 패턴의 비트 인덱스는 The method of claim 8, wherein the bit index of the extracted pattern is 다음 수식을 이용하여 계산하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.Multiple pattern search method using a pattern board that does not support multiple patterns, characterized in that calculated using the following formula. BI = PI % MPBI = PI% MP 상기 수식에서, BI는 비트 인덱스In the above formula, BI is a bit index '%'는 좌측 변수를 우측 변수로 나눈 나머지를 나타내는 연산자,'%' Is an operator representing the remainder of the left variable divided by the right variable, PI는 패턴 인덱스, 그리고PI is the pattern index, and MP는 단일 규칙 내 패턴의 최대 개수.MP is the maximum number of patterns within a single rule. 제8항에 있어서, 상기 제4단계는The method of claim 8, wherein the fourth step 상기 추출된 패턴에 대하여 계산된 규칙 인덱스 및 비트 인덱스 정보를 이용하여 상기 추출된 패턴 각각의 플래그 변수를 생성하는 단계를 더 포함하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.Generating a flag variable of each of the extracted patterns by using the rule index and bit index information calculated for the extracted patterns; multi-pattern search using a pattern board not supporting multiple patterns Way. 제11항에 있어서, 상기 플래그 변수는 The method of claim 11, wherein the flag variable is 해당 비트 인덱스가 나타내는 위치의 비트값을 1로 설정하고, 나머지 비트값은 0으로 설정하여 생성하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.A multi-pattern search method using a pattern board that does not support multiple patterns, characterized in that the bit value of the position indicated by the corresponding bit index is set to 1 and the remaining bit values are set to 0. 제11항에 있어서, 상기 제4단계는The method of claim 11, wherein the fourth step 상기 입력 스트림에서 추출한 패턴 중 상기 계산한 규칙 인덱스가 동일한 패턴을 분류하고 상기 계산된 해당 플래그 변수를 조합하여 분류된 패턴에 대한 최종 플래그 변수를 생성하는 단계를 더 포함하는 것을 특징으로 하는 다중패턴을 지원 하지 않는 패턴보드를 이용한 다중패턴 검색 방법.Classifying a pattern having the same rule index among the patterns extracted from the input stream and combining the calculated corresponding flag variables to generate a final flag variable for the classified pattern. Multi-pattern search method using pattern board not supported. 제13항에 있어서, 상기 최종 플래그 변수는 The method of claim 13, wherein the last flag variable is 각각의 플래그 변수에서 같은 위치의 비트값을 비교하여 해당 비트값이 모두 0인 경우에만, 최종 플래그 변수의 동일한 위치 비트값을 0으로 설정하고, 나머지 비트값은 1로 설정하는 방식으로 조합하여 생성하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.It is created by comparing bit values of the same position in each flag variable and setting the same position bit value of the last flag variable to 0 and setting the remaining bit values to 1 only when the corresponding bit values are all 0. Multiple pattern search method using a pattern board that does not support multiple patterns, characterized in that. 제13항에 있어서, 상기 제4단계는The method of claim 13, wherein the fourth step 상기 생성한 최종 플래그 변수와, 해당 규칙 인덱스에 대응되는 비트맵 테이블의 패턴 비트맵 정보를 비교하여 일치되는 경우, 해당 규칙의 다중패턴이 입력 스트림에 존재하는 것으로 판단하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 방법.Comparing the generated final flag variable and the pattern bitmap information of the bitmap table corresponding to the rule index, if the match is matched, it is determined that the multiple pattern of the rule exists in the input stream Multi-pattern search method using unsupported pattern board. 검색규칙에 포함된 패턴에 대한 정보인 규칙 인덱스, 패턴 정보 및 패턴 비트맵 정보를 포함하는 비트맵 테이블 및 상기 비트맵 테이블의 각각의 패턴에 해당하는 패턴보드의 입력패턴과 패턴 인덱스 정보를 포함하는 패턴 인덱스 테이블을 생성하는 검색규칙 설정부; A bitmap table including rule index, pattern information, and pattern bitmap information, which are information on patterns included in a search rule, and input patterns and pattern index information of a pattern board corresponding to each pattern of the bitmap table. A search rule setting unit for generating a pattern index table; 상기 비트맵 테이블 및 패턴 인덱스 테이블을 저장하는 정보 저장부; 및 An information storage unit for storing the bitmap table and the pattern index table; And 상기 패턴보드를 이용하여 입력된 스트림에 존재하는 하나 이상의 패턴을 추출하고 상기 패턴 인덱스 테이블 및 비트맵 테이블을 참조하여 상기 추출된 패턴이 포함된 규칙을 확인하며 상기 입력 스트림에 존재하는 다중패턴을 검색하는 다중패턴 판단부를 포함하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 장치.Extract one or more patterns existing in the input stream using the pattern board, check the rules including the extracted patterns by referring to the pattern index table and the bitmap table, and search for the multi-patterns present in the input stream. Multi-pattern retrieval apparatus using a pattern board that does not support multiple patterns including a multi-pattern determination unit. 제16항에 있어서, 상기 비트맵 테이블은The method of claim 16, wherein the bitmap table 상기 규칙 인덱스는 검색 규칙의 색인을 나타내고, 상기 패턴 정보는 상기 각각의 규칙에 포함되는 하나 이상의 패턴 정보를 나타내고, 상기 패턴 비트맵 정보는 단일 규칙 내 패턴의 최대 개수와 동일한 비트(bit)수로 이루어지며 상기 패턴들의 위치 정보로 생성되는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 장치.The rule index indicates an index of a search rule, the pattern information indicates one or more pattern information included in each rule, and the pattern bitmap information includes the same number of bits as the maximum number of patterns in a single rule. Multiple pattern retrieval apparatus using a pattern board that does not support multiple patterns, characterized in that generated by the location information of the patterns. 제17항에 있어서, 상기 다중패턴 판단부는 The method of claim 17, wherein the multi-pattern determination unit 상기 비트맵 테이블의 패턴 비트맵에서 각각의 패턴의 위치를 나타내는 비트 인덱스를 계산하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 장치.Multi-pattern retrieval apparatus using a pattern board that does not support multiple patterns, characterized in that for calculating the bit index indicating the position of each pattern in the pattern bitmap of the bitmap table. 제18항에 있어서, 상기 패턴 인덱스는 The method of claim 18, wherein the pattern index is 다음 수식을 이용하여 생성하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 장치.Multi-pattern retrieval apparatus using a pattern board that does not support multiple patterns, characterized in that by using the following formula. PI = (RI - 1) x MP + BIPI = (RI-1) x MP + BI 상기 수식에서, PI는 패턴 인덱스,In the above formula, PI is the pattern index, RI는 규칙 인덱스,RI is the rule index, MP는 단일 규칙 내 패턴의 최대 개수, 그리고MP is the maximum number of patterns within a single rule, and BI는 비트 인덱스.BI bit index. 제18항에 있어서, 상기 다중패턴 판단부는19. The apparatus of claim 18, wherein the multi-pattern determination unit 상기 추출된 패턴 각각에 대응되는 패턴 인덱스를 상기 패턴 인덱스 테이블에서 검색하고 다음 수식을 이용하여 상기 추출된 패턴의 규칙 인덱스를 계산하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 장치.Search for a pattern index corresponding to each of the extracted patterns in the pattern index table and search for a multi-pattern using a pattern board that does not support multiple patterns, wherein the rule index of the extracted pattern is calculated using the following equation. Device. RI = (PI / MP) + 1RI = (PI / MP) + 1 상기 수식에서, RI는 규칙 인덱스,In the above formula, RI is a rule index, '/'는 좌측 변수를 우측 변수로 나눈 몫을 나타내는 연산자,'/' Is an operator representing the quotient of the left variable divided by the right variable, PI는 패턴 인덱스, 그리고PI is the pattern index, and MP는 단일 규칙 내 패턴의 최대 개수.MP is the maximum number of patterns within a single rule. 제20항에 있어서, 상기 다중패턴 판단부는The method of claim 20, wherein the multi-pattern determination unit 다음 수식을 이용하여 상기 추출된 패턴의 비트 인덱스를 계산하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 장치.Multi-pattern retrieval apparatus using a pattern board that does not support multiple patterns, characterized in that to calculate the bit index of the extracted pattern using the following formula. BI = PI % MPBI = PI% MP 상기 수식에서, BI는 비트 인덱스In the above formula, BI is a bit index '%'는 좌측 변수를 우측 변수로 나눈 나머지를 나타내는 연산자,'%' Is an operator representing the remainder of the left variable divided by the right variable, PI는 패턴 인덱스, 그리고PI is the pattern index, and MP는 단일 규칙 내 패턴의 최대 개수.MP is the maximum number of patterns within a single rule. 제21항에 있어서, 상기 다중패턴 판단부는The method of claim 21, wherein the multi-pattern determination unit 상기 추출된 패턴에 대하여 계산된 규칙 인덱스 및 비트 인덱스 정보를 이용하여 상기 추출된 패턴 각각의 플래그 변수를 생성하고, 상기 입력 스트림에서 추출한 패턴 중 상기 계산한 규칙 인덱스가 동일한 패턴을 분류하고 상기 계산된 해당 플래그 변수를 조합하여 분류된 패턴에 대한 최종 플래그 변수를 생성하는 것을 특징으로 하는 다중패턴을 지원하지 않는 패턴보드를 이용한 다중패턴 검색 장치.The flag variable of each of the extracted patterns is generated using the rule index and the bit index information calculated for the extracted pattern, and the calculated rule index is classified among the patterns extracted from the input stream and the same pattern is calculated. Multi-pattern retrieval apparatus using a pattern board that does not support multiple patterns, characterized in that to generate a final flag variable for the classified pattern by combining the corresponding flag variables.
KR1020060123197A 2006-12-06 2006-12-06 Method and module for searching multi-pattern using pattern board which does not support multi-pattern KR100832539B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060123197A KR100832539B1 (en) 2006-12-06 2006-12-06 Method and module for searching multi-pattern using pattern board which does not support multi-pattern

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060123197A KR100832539B1 (en) 2006-12-06 2006-12-06 Method and module for searching multi-pattern using pattern board which does not support multi-pattern

Publications (1)

Publication Number Publication Date
KR100832539B1 true KR100832539B1 (en) 2008-05-27

Family

ID=39665290

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060123197A KR100832539B1 (en) 2006-12-06 2006-12-06 Method and module for searching multi-pattern using pattern board which does not support multi-pattern

Country Status (1)

Country Link
KR (1) KR100832539B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113923002A (en) * 2021-09-29 2022-01-11 山石网科通信技术股份有限公司 Computer network intrusion prevention method and device, storage medium and processor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040053646A (en) * 2002-12-17 2004-06-24 주식회사 케이티 Search service method to use individual pattern net
KR20050054538A (en) * 2003-12-05 2005-06-10 한국전자통신연구원 Method of high-speed pattern storing and matching
WO2005055487A2 (en) 2003-11-25 2005-06-16 Freescale Semiconductor, Inc. Network message processing using inverse pattern matching
WO2005064868A1 (en) 2003-11-25 2005-07-14 Freescale Semiconductor, Inc. Network message processing using pattern matching
US20060020595A1 (en) 2004-07-26 2006-01-26 Norton Marc A Methods and systems for multi-pattern searching

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040053646A (en) * 2002-12-17 2004-06-24 주식회사 케이티 Search service method to use individual pattern net
WO2005055487A2 (en) 2003-11-25 2005-06-16 Freescale Semiconductor, Inc. Network message processing using inverse pattern matching
WO2005064868A1 (en) 2003-11-25 2005-07-14 Freescale Semiconductor, Inc. Network message processing using pattern matching
KR20050054538A (en) * 2003-12-05 2005-06-10 한국전자통신연구원 Method of high-speed pattern storing and matching
US20060020595A1 (en) 2004-07-26 2006-01-26 Norton Marc A Methods and systems for multi-pattern searching

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113923002A (en) * 2021-09-29 2022-01-11 山石网科通信技术股份有限公司 Computer network intrusion prevention method and device, storage medium and processor
CN113923002B (en) * 2021-09-29 2024-04-19 山石网科通信技术股份有限公司 Computer network intrusion prevention method, device, storage medium and processor

Similar Documents

Publication Publication Date Title
Burd et al. Evaluating clone detection tools for use during preventative maintenance
US11514701B2 (en) System and method for global identification in a collection of documents
JP6828335B2 (en) Search program, search device and search method
KR101508260B1 (en) Summary generation apparatus and method reflecting document feature
US20190228085A1 (en) Log file pattern identifier
KR100995861B1 (en) Module and method for searching named entity of terms from the named entity database using named entity database and mining rule merged ontology schema
WO2012169128A1 (en) Orthographical variant detection device and orthographical variant detection program
WO2007026870A1 (en) Data clustering device, clustering method, and clustering program
KR20220067521A (en) Apparatus and method for analyzing vulnerability of smart contract code
Oramas et al. ELMD: An automatically generated entity linking gold standard dataset in the music domain
CN110096599A (en) The generation method and device of knowledge mapping
Shivaji et al. Plagiarism detection by using karp-rabin and string matching algorithm together
KR100832539B1 (en) Method and module for searching multi-pattern using pattern board which does not support multi-pattern
JP6152711B2 (en) Information search apparatus and information search method
CN110209780A (en) A kind of question template generation method, device, server and storage medium
CN107077465A (en) Quote and explain
CN106354721A (en) Retrieval method and device based on authority
KR20220041337A (en) Graph generation system of updating a search word from thesaurus and extracting core documents and method thereof
JP2008225846A (en) Word meaning tag application device and method, program, and recording medium
JP5894273B2 (en) Document association method, document retrieval method, document association apparatus, document retrieval apparatus, and program therefor
KR100659370B1 (en) Method for constructing a document database and method for searching information by matching thesaurus
Agrawal et al. A novel method to find out the similarity between source codes
KR102370044B1 (en) A system and a method for searching prior art information and measuring similarity thereof
JP6677624B2 (en) Analysis apparatus, analysis method, and analysis program
Sīle et al. level matching of Web of Science to a local database in a comparative context

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
AMND Amendment
J201 Request for trial against refusal decision
B701 Decision to grant
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20120509

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee