Pattern Matching Machine with Conditional Mappings for Wildcards

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The Aho-Corasick pattern matching algorithm is limited in handling indeterminate search patterns due to its dependence on determinate suffixes, making it inefficient for patterns with wildcard symbols or iterative metacharacters, which requires pre- and post-processing steps, increasing resource and time constraints.

Innovation Solution

A pattern matching machine is developed that includes conditional mappings and a dictionary of patterns to handle wildcard symbols, allowing for efficient identification of matches in input symbols by generating a second state machine that can execute at runtime to identify applicable mappings based on input symbols, thereby accommodating indeterminate features like wildcards and iterative metacharacters.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the Aho-Corasick algorithm is used for pattern matching, then single-pass matching efficiency is improved, but the algorithm cannot handle indeterminate symbols (wildcards) without pre- and post-processing steps

Engineering Contradiction:
Improvesingle-pass matching efficiencyVSAvoidcapability to handle wildcard symbols
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The pattern is segmented into determinate parts (fixed symbols) and indeterminate parts (wildcards). The determinate parts are used to construct the finite-state automaton states and transitions, while the indeterminate parts are handled through conditional mappings that are evaluated at runtime. This segmentation allows the algorithm to maintain single-pass efficiency for the determinate portions while accommodating wildcards through conditional logic.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The failure function is transformed from a static mapping (as in traditional Aho-Corasick) to a dynamic conditional mapping system. Instead of pre-defining fixed failure transitions, the system uses conditional mappings that are evaluated at runtime based on the actual input symbols encountered. This dynamic approach allows the algorithm to adapt to wildcard symbols while maintaining the single-pass matching capability.

Inventive Principle:
Principle #15Dynamics

2Adaptability or versatility

If pre- and post-processing steps are added to handle wildcards in Aho-Corasick, then wildcard pattern matching capability is improved, but resource and time constraints increase

Engineering Contradiction:
Improvewildcard pattern matching capabilityVSAvoidprocessing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The automaton is pre-constructed with states and transitions based on the determinate portions of the pattern, including placeholder transitions for wildcard positions. Conditional mappings are pre-computed for each state to identify potential failure targets. This preliminary setup enables the system to handle wildcards during the single pass without requiring separate pre- or post-processing steps, thus avoiding additional time overhead.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If the failure function maps to proper suffixes in Aho-Corasick, then state mapping accuracy is improved, but the approach fails when patterns include wildcard symbols

Engineering Contradiction:
Improvestate mapping accuracyVSAvoidhandling of indeterminate symbols
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

Conditional mappings serve as an intermediary mechanism between the deterministic state transitions and the indeterminate wildcard symbols. When a wildcard is encountered in the pattern, the conditional mapping system identifies potential failure states based on the context and the specific wildcard symbol value, rather than relying on fixed suffix-based mappings. This intermediary layer preserves mapping accuracy by using context-aware logic while enabling wildcard handling.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10339096B2Efficient pattern matching
Publication Date: 2019.07.02 BRITISH TELECOM PLC
  • US10339096B2 patent drawing
  • US10339096B2 patent drawing
  • US10339096B2 patent drawing

AI summary

A computer implemented method to generate a pattern matching machine to identify matches of a plurality of symbol patterns in a sequence of input symbols, wherein one or more of the symbol patterns includes a plurality of wildcard symbols.