Finite State Machine for Multi-String Streaming Search

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing algorithms, such as the Boyer-Moore algorithm, are inefficient for searching multiple strings of varying lengths in a streaming environment, as they require buffering large data amounts and are slow due to their inability to handle multiple search strings effectively.

Innovation Solution

A finite state machine combined with a matching string machine using a tail-first search approach forms states based on character strings, allowing for efficient matching of multiple strings by shifting the match pointer and annotating patterns to indicate matched characters or unknowns, enabling efficient string matching without buffering.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the Boyer-Moore algorithm is used for string matching, then matching speed for single strings is improved, but it cannot handle multiple search strings effectively

Engineering Contradiction:
Improvematching speedVSAvoidability to handle multiple search strings
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The finite state machine is designed to handle multiple search strings simultaneously by creating states that represent different matching conditions for all strings. Each state encodes information about which strings have been partially matched and to what extent, allowing the algorithm to process multiple patterns in a single pass through the text.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Adaptability or versatility

If regular expression matching algorithm is used, then multiple search strings can be matched, but the matching operation becomes slow

Engineering Contradiction:
Improveability to match multiple stringsVSAvoidmatching speed
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The algorithm performs preliminary processing by pre-computing the finite state machine transitions based on the set of search strings. This pre-computation creates a compact state representation that captures all possible matching scenarios, allowing the actual matching phase to proceed efficiently without repeated complex pattern matching operations.

Inventive Principle:
Principle #10Preliminary action

3Ease of operation

If streaming environment matching is required, then buffering of large data amounts must be avoided, but matching efficiency decreases

Engineering Contradiction:
Improvestreaming environment compatibilityVSAvoidmatching efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The matching process is segmented into discrete states that can be processed incrementally as data streams in. Each state represents a specific matching condition that can be evaluated with limited information, allowing the algorithm to process data in small chunks without requiring large buffers while maintaining matching efficiency.

Inventive Principle:
Principle #1Segmentation

4Adaptability or versatility

If strings of varying lengths are searched, then flexibility is improved, but algorithm complexity increases

Engineering Contradiction:
Improvehandling of varying string lengthsVSAvoidalgorithm complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The algorithm handles varying string lengths by dynamically adjusting the state representation based on the lengths of the search strings. The finite state machine transitions are configured to account for different string lengths, allowing the same core algorithm to efficiently handle strings of any length without requiring separate processing logic.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS8775457B2Efficient string matching state machine
Publication Date: 2014.07.08 RED HAT INC
  • US8775457B2 patent drawing
  • US8775457B2 patent drawing
  • US8775457B2 patent drawing

AI summary

An apparatus and a method for searching one or more documents for several different strings is described. A finite state machine receives and processes one or more search strings with a tail-first search. A matching string machine forms states based on the characters in the search string with at least one state accepting a match. The states are annotated with a pattern that indicates what the state has matched and can match. Each position within the pattern is either a character that has been matched at that point or an indicator that it is unknown.