摘要 |
A multi-pattern matching algorithm according to an embodiment of the present invention comprises: a moving step of shifting a moving window by one byte from a start position; a DF1 acknowledging step of converting a character string with a length of two bytes from the current position of the moving window into an integer value, and acknowledging whether a bit at an associated position in a first direct filter (DF1) for patterns with lengths longer than two bytes is set to 1; a DF moving step of, when it is acknowledged that the bit is set to 1 in the DF1 acknowledging step, moving to another direction filter (DF); a removing step of, when a bit at an associated position of the direct filter (DF) which is acknowledged for the last time is set to 0, moving the moving window again by one byte; and an ending step of acknowledging whether the moving window is located at an end of the character string, and, when it is acknowledged that the moving window is located at the end of the character string, ending the algorithm. According to the present invention, it is possible to incur less cache mistakes by using a direct filter and a compact table, which improves performance. |