发明名称 Regular expression matching method and system
摘要 The present invention discloses a regex matching method and system, and relates to the field of computer technologies. The method includes: sorting multiple regexes into several regex groups, where all regexes in one regex group include a common string, which is known as a generic string; compiling each regex group into a DFA, and setting up a correlation between the generic string of each regex group and the DFA; matching to-be-matched data streams with the generic string respectively, and using the matched generic string as a matched string; obtaining a DFA corresponding to the matched string; and performing regex matching for the to-be-matched data streams according to the DFA, and outputting a matching result. The embodiments of the present invention shorten the data loading process, decrease the time consumed by data loading, and improve the matching performance.
申请公布号 US8756170(B2) 申请公布日期 2014.06.17
申请号 US201113115400 申请日期 2011.05.25
申请人 Huawei Technologies Co., Ltd. 发明人 Chen Jian;Hu Xinyu
分类号 G06N99/00 主分类号 G06N99/00
代理机构 Brinks Gilson & Lione 代理人 Brinks Gilson & Lione
主权项 1. A regular expression (regex) matching method, comprising: sorting multiple regexes into several regex groups, wherein all regexes in one regex group comprise a common string, which is known as a generic string; compiling each regex group into a Deterministic Finite Automata (DFA), and setting up a correlation between the generic string of each regex group and the DFA, wherein the correlation between the generic string of each regex group and the DFA comprises: a mapping relation between the generic string of each regex group and an address for storing the DFA;matching input data streams with the generic string respectively, and using the matched generic string as a matched string;obtaining a DFA corresponding to the matched string; andperforming regex matching for the input data streams according to the DFA, and outputting a matching result.
地址 Shenzhen CN