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.
CN107545071BActive Publication Date: 2020-02-07北京神州泰岳智能数据技术有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
北京神州泰岳智能数据技术有限公司
Publication Date
2020-02-07

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
Patent Text Reader

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.
Need to check novelty before this filing date? Find Prior Art

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