16-04-2014 дата публикации
Номер: CN103729452A
Принадлежит:
The embodiment of the invention provides a rule matching method and device, and relates to the field of communication. The message processing speed can be quickened, the rule storage space can be reduced, and the message matching efficiency can be improved. The rule matching method includes the steps of receiving a first message, matching a plurality of characters in the first message through a DFA, when it is determined that the current state of the DFA is a prefix receiving state and the matching condition is met, starting a first counter, storing the offset address of the first character, meanwhile, matching the characters in the mode of matching x continuous characters every time to determine the n matched continuous characters, updating a value of the first counter according to offset address pairs of the n continuous characters determined this time, when it is determined that the current state of the DFA is a suffix receiving state, storing the offset address of the second character ...
Подробнее