Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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

Inactive Publication Date: 2009-10-07
HUAWEI TECH CO LTD
View PDF0 Cites 18 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0020] In order to solve the complex storage, processing and low efficiency problems caused by the failure function processing in the AC algorithm, and improve the processing speed of the AC algorithm, the embodiment of the present invention provides a method and device for establishing a pattern matching state machine and pattern recognition

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for establishing pattern matching state machine and pattern recognition
  • Method and device for establishing pattern matching state machine and pattern recognition
  • Method and device for establishing pattern matching state machine and pattern recognition

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and a device for establishing a pattern matching state machine and pattern recognition, belonging to the technical field of pattern matching. The used method comprises the following steps: obtaining divided keyword subfields; generating a state transition Goto function according to the keyword subfields; generating Failure functions of various state nodes according to the Goto function; and generating a next-jump state transition delta function of the state nodes according to the Goto functions and the Failure functions and matching mode states according to the generated delta fucntion. The device comprises an obtaining module, a Goto function generating module, a Failure function generating module and a delta function generating module. The invention eliminates an original Failure chain in a multi-byte AC algorithm, converts the original Failure chain together with an original Goto function into the uniform delta transition function and does not generate list items possible to cause Failure initial states in the process of transforming the Failure chain so as to avoid increasing large-scale storage space, optimize the storage structure of the AC algorithm and improve the treatment speed of the AC algorithm.

Description

technical field [0001] The invention relates to the technical field of pattern matching, in particular to a method and device for establishing a pattern matching state machine and pattern recognition. Background technique [0002] Pattern matching generally refers to searching for predefined keywords in text data. Pattern matching is a basic problem in computer science. Its research content is of great value in many fields such as information retrieval and pattern recognition. It plays an important role in applications such as signature matching and gene sequence comparison. For example, in some information acquisition and text editing applications, the user will specify some keywords, and the position of the keywords needs to be quickly located in the text. [0003] The Aho-Corasick algorithm (Aho-Crasick algorithm, AC algorithm for short) describes a simple and effective algorithm that can locate all positions of a limited number of keywords in any text. The principle i...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F17/30
CPCG06F17/30985G06F17/3061G06F16/90344
Inventor 陈建周洪胡新宇
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products