Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Multiple-mode-string matching method and device

A string matching and pattern string technology, applied in the computer field to reduce time overhead, improve efficiency, and avoid repeated comparisons

Active Publication Date: 2013-10-30
BEIJING FEINNO COMM TECH
View PDF2 Cites 36 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Assuming that the time complexity of a single pattern string is O(m) and the number of pattern strings is n, then the time complexity of the multi-pattern string matching of the existing scheme is nO(m)
It can be seen that the time complexity of this type of algorithm will increase linearly with the increase of the number of pattern strings. Even if the time complexity of a single pattern is very low, when the number of pattern strings reaches a certain level, the algorithm's CPU time overhead will be substantial

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
  • Multiple-mode-string matching method and device
  • Multiple-mode-string matching method and device
  • Multiple-mode-string matching method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0042] The main problem with existing multi-mode strings is that there are a lot of repeated comparisons. For example, there are the following character strings in the pattern string: "People's Republic of China", "Chinese Embassy", "China is not Chinese", "News", "Xinhua Daily". Since the first character in the three pattern strings is "中", this character will be compared three times in the existing scheme.

[0043] Therefore, the overall idea of ​​the present invention is: in order to avoid such repeated comparisons, first sort and sort the pattern strings to generate a decision tree structure, and traverse downwards from the root node, each path is one or more pattern strings , and then reverse the matching method, and use the main string to match on the decision tree structure.

[0044] In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail belo...

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 multiple-mode-string matching method and device. The method includes that a plurality of mode strings are sequenced according to their respective characters, each character is written into a node along a root node of a tree structure downwards to generate a decision tree structure, and main strings to be matched are matched downwards along the decision tree. By means of the method and device, accurate matching of multiple mode strings can be achieved, meanwhile sub nodes are searched according to the Hash values that the sub nodes correspond to, the width change of the decision tree cannot affect time expense of a central processing unit (CPU) matched with the strings, and the time expense of the algorithm depends on the average depth of the decision tree and is unrelated to the number of the mode strings. For string matching with a large number of mode strings, the algorithm can greatly reduce the time expense of the CPU and improve application response speed.

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 a relatively common topic. For example, in applications such as search operations and sensitive word filtering, string matching will be involved. A good string matching method can help applications reduce CPU usage 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. [0004] For the matching of multiple pattern strings, the idea of ​​the existing scheme is to match according to a single pattern string, and then traverse all the pattern string...

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 BEIJING FEINNO COMM TECH
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
Eureka Blog
Learn More
PatSnap group products