Multi-mode string matching method and apparatus

A string matching and pattern string technology, applied in the computer field, can solve the problems of reducing search efficiency, consuming large memory, and large depth of binary search tree, so as to achieve the effect of improving matching efficiency and improving matching speed.

Active Publication Date: 2017-07-18
中国移动通信集团青海有限公司
View PDF2 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, when the MASN algorithm compresses the pattern set, it needs to build a prefix tree for the entire pattern set, and the compression of massive pattern strings needs to consume a lot of memory, which is likely to cause memory exhaustion and make the compres

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
  • Multi-mode string matching method and apparatus
  • Multi-mode string matching method and apparatus
  • Multi-mode string matching method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] In order to improve the efficiency and speed of multi-pattern character string matching, embodiments of the present invention provide a multi-pattern character string matching method and device.

[0024] The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention, and in the absence of conflict, the present invention The embodiments and the features in the embodiments can be combined with each other.

[0025] The embodiment of the present invention proposes a multi-pattern character string matching method in view of the shortcomings of the existing multi-pattern character string matching methods in processing massive pattern strings. By classifying and compressing the pattern string according to the first character, extracting ...

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 present invention discloses a multi-mode string matching method and apparatus, in order to improve the matching efficiency and the matching speed of multi-mode string matching. In the method, mode strings with the prefix inclusion relation in the mode strings are compressed into a mode string to obtain a compressed mode set; a prefix set is constructed according to the compression mode set; and the AC automaton is constructed according to the preset algorithm. The method comprises: for each to-be-matched text string, successively inputting characters contained in the current sliding window into the AC automaton so as to obtain at least one initial matching position; for each initial matching position, if the length of the matched string of the initial matching position is less than the preset length, adding the initial matching position and the matched string into a matching result set; if the length of the matched string of the initial matching position is equal to the preset length, adding the initial matching position into a secondary matching entry set; and carrying out secondary matching for each entry position, and adding the entry position of the secondary matching and the matched string into the matching result set.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a multi-pattern character string matching method and device. Background technique [0002] In the computer field, string matching is one of the research hotspots. For example, in applications such as search operations and sensitive word filtering, string matching will be involved. A good character string matching method can help applications reduce CPU (Central Processing Unit, central processing unit) occupation time and improve application response time. [0003] Multi-pattern string matching means that there are more than one matching pattern strings. The matching method of multi-pattern strings is: there are n pattern strings P1, P2, ..., Pn and a main text string T, and n pattern strings are searched in T Whether any of them appear in T, the match is successful. In the fields of network security, information retrieval, bioinformatics and other fields, in order to realize...

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
Inventor 王树栋王明昭汪龙池润清
Owner 中国移动通信集团青海有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products