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

Character string searching method and device based on non-determined finite automaton

A finite automaton, non-deterministic technology, applied in the field of data search, can solve the problem of unable to obtain the target string, unsuccessful matching, not containing strings, etc., to achieve the effect of simple, efficient and accurate string search and solving matching problems

Active Publication Date: 2015-07-01
天津亿阳信通科技有限公司
View PDF4 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The obvious disadvantages of doing this are: 1. Some characters in the specific character string are truncated in the excess part, but this time the matching is unsuccessful, and the matching is continued from the truncated message header, and the truncated message header is not does not contain the complete string, thus causing no matching string to be searched
2. The specific string is located at the end of the message, and it needs to search and match multiple times to match the target string, which is very inefficient
[0005] However, since the message arrives in segments in the network environment, it is impossible to provide it at one time. If a part of the target string arrives, the NFA fails to match it. After a period of time, another part of the target string arrives, and the NFA will restart Match the message, causing the string matching to fail, and the target string cannot be obtained

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
  • Character string searching method and device based on non-determined finite automaton
  • Character string searching method and device based on non-determined finite automaton
  • Character string searching method and device based on non-determined finite automaton

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0054] The implementation of the present invention will be described in detail below in conjunction with the drawings and examples, so that the realization process of how to use technical means to solve technical problems and achieve technical effects in the present invention can be fully understood and implemented accordingly.

[0055] Such as figure 1 As shown, Embodiment 1 of the present invention discloses a string search method based on non-deterministic finite automata, including the following steps:

[0056] Step S101: Construct a non-deterministic finite automaton and set state variables for the non-deterministic finite automaton.

[0057] The non-deterministic finite automaton (NFA) is constructed with an array, and each character in the matching expression is sequentially loaded into each position in the array.

[0058] Step S102: Load the matching expression in the non-deterministic finite automaton, and convert the matching expression in the non-deterministic fini...

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 character string searching method based on a non-determined finite automaton. The character string searching method based on the non-determined finite automaton includes: building the non-determined finite automaton and setting a state variable for the non-determined finite automaton; loading a matching expression in the non-determined finite automaton and transforming the matching expression in the non-determined finite automaton into a directed graph according to the operator transformational rule of the directed graph; conducting matching on the characters in the character string of the non-determined finite automaton according to the state position of the state variable; updating the state variable according to the final position directed by the position in the directed graph if the characters are matched successfully, conducting the matching on the next character from the position in the updated state variable and completing the matching till the character string which conforms to the matching expression is obtained or the character matching fails, and placing the state variable as the starting position when the matching is completed. The character string searching method based on the non-determined finite automation can realize more accuracy of the character string searching. The invention further provides a character string searching device based on the non-determined finite automaton.

Description

technical field [0001] The invention relates to the field of data search, in particular to a character string search technology based on non-deterministic finite automata. Background technique [0002] In the process of network element interaction, the program needs to determine its own behavior according to some specific identifiers (that is, specific character strings) in network element messages. Due to the randomness of network transmission, these strings may be received in multiple ways, which requires the ability to shield the diversity of receiving methods at the network transmission level, obtain these specific strings, and send them to the upper-layer business logic. [0003] The traditional cache-based string search uses a fixed-length string array as the receiving cache, searches for the existence of a specific string in the receiving cache, if it exists, the match is successful, and if it does not exist, a new The accepted message is added to the acceptance cach...

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 Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products