Method and device for establishing pattern matching state machine and pattern recognition
A pattern matching and state machine technology, applied in the field of pattern matching, can solve the problems of complex storage and low processing, and achieve the effects of optimizing storage structure, improving processing speed, and simple processing steps
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0070] see Figure 5 , the embodiment of the present invention provides a method for establishing a pattern matching state machine. The method utilizes the simplicity of delta function processing after eliminating the Failure chain, and avoids the storage of a large number of branches from Fail to the initial state q0. The specific steps are as follows:
[0071] 101: divide the character strings in the pattern library into a series of segments according to the preset length as the boundary;
[0072] Wherein, when the character strings in the pattern library are divided according to the preset length as the boundary, the preset length may be a preset byte n, correspondingly, a segment is formed separately for the character strings that are less than n bytes.
[0073] For example, taking the key fields {technical, technically, tel, telephone, phone, elephant} mentioned in the background technology as characteristic strings, the default byte is 4 bytes as an example, then {tech n...
Embodiment 2
[0110] see Figure 11 , an embodiment of the present invention provides a device for establishing a pattern matching state machine, the device includes:
[0111]An acquisition module, configured to divide keywords in the predefined keyword set according to preset rules, and acquire subkeyword fields obtained after division;
[0112] The Goto function generation module is used to generate a state transfer Goto function according to the subkey field obtained by the acquisition module;
[0113] The Failure function generation module is used to generate the failure Failure function of each state node according to the Goto function generated by the Goto function generation module;
[0114] The delta function generation module is used to generate the next-hop state transition delta function of each state node according to the Goto function generated by the Goto function generation module and the Failure function generated by the Failure function generation module.
[0115] Among t...
Embodiment 3
[0131] see Figure 12 , the embodiment of the present invention provides a pattern recognition device, the device includes:
[0132] The pattern matching state machine building module is used to divide the keywords in the predefined keyword set according to the preset rules, and obtain the sub-keyword fields obtained after the division; according to the sub-keyword fields, generate a state transition Goto function; and according to The Goto function generates the Failure function of each state node; according to the Goto function and the Failure function, a next-hop state transition delta function of each state node is generated.
[0133] The processing module is used to execute the pattern matching of the sub-key field according to the delta function established by the pattern matching state machine building module. If the state node and the sub-key field cannot be obtained under the non-initial state node q0 δ function entry, set the initial state node q0 as the input state...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com