Method and device for character string matching

A string matching and string technology, applied in the Internet field, can solve problems such as poor definition flexibility, low efficiency, and inability to meet application requirements, and achieve the effect of meeting matching requirements, ensuring flexibility, and solving multi-pattern matching.

Active Publication Date: 2020-02-07
北京神州泰岳智能数据技术有限公司
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The present invention provides a method and device for character string matching to solve the problem that the existing AC algorithm has poor definition flexibility of pattern strings, low efficiency and cannot meet application requirements when performing multi-pattern matching

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 character string matching
  • Method and device for character string matching

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] 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 below in conjunction with the accompanying drawings.

[0020] figure 1 It is a schematic flow diagram of a method for character string matching in an embodiment of the present invention, such as figure 1 As shown, the method for character string matching of the present embodiment includes the following steps:

[0021] Step S101, initializing the AC state machine with fuzzy nodes;

[0022] Wherein, the AC state machine generates regular nodes according to the non-wildcard relationship between characters included in each rule string, and generates corresponding fuzzy nodes according to the wildcard relationship between characters;

[0023] Step S102, input the target character string into the AC state machine, compare each character in the target character string with the characters corres...

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 device for character string matching. The method includes the steps that an AC state machine with fuzzy nodes is initialized, wherein the AC state machine generates regular nodes based on the non-wildcard relationship between the characters contained in each rule character string, and generates the corresponding fuzzy nodes according to the wildcard relationship between characters; target character strings are entered into the AC state machine, each character in the target character strings is compared with the corresponding character of each node in the ACstate machine, one or more rule character strings matching the target strings is determined, and a corresponding operation is performed according to the matched rule character strings. According to the technical scheme, after obtaining the target character strings, the target character strings are entered into the AC state machine to match, the matched one or more rule character strings in the target character string is determined, the multi-segment fuzzy matching is achieved, the flexible ability defined by the rule character strings is guaranteed, and the application demand is satisfied.

Description

technical field [0001] The invention relates to the technical field of the Internet, in particular to a string matching method and device. Background technique [0002] The multi-pattern matching problem is one of the basic problems in computer science. The multi-pattern matching problem can be simply described as: a target string and a set of pattern strings, judging that the target string contains multiple pattern strings in the set of pattern strings . [0003] The AC (Aho-Corasick) algorithm is a classic multi-pattern matching algorithm, which uses a finite state machine to convert character comparison into a state transition, for example, using the matched target string as the input of the finite state machine to make the finite The state machine performs state transition according to the target string, and when the finite state machine reaches certain specific states, it indicates that pattern matching occurs. [0004] However, the AC algorithm in the prior art still...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/903
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