# US 2017/0293612 A1 · Efficient pattern matching

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0293612 A1
- Document ID: US20170293612A1
- Status: Published application
- Kind: A1
- Application number: 15/512,230
- Filed: 2015-09-22
- Published: 2017-10-12
- Earliest claimed: 2014-09-26
- Assignees: British Telecommunications public limited company
- Applicants: British Telecommunications Public Limited Company
- Inventors: James MISTRY
- Web page: https://patentgrep.com/patent/US20170293612A1

## CPC

- G06F 16/00: Information retrieval; Database structures therefor; File system structures therefor
- G06F 16/245: Query processing
- G06F 16/2452: Query translation
- G06F 16/90344: {by using string matching techniques}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

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.

## Claims

### Claim 1

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, the method comprising:
providing a first state machine of states and directed transitions between states corresponding to the plurality of patterns;
identifying one or more mappings between states of the first state machine such that a state representing a sequence of symbols is mapped to other states constituting a proper suffix of the sequence of symbols, wherein mappings for states representing a sequence of symbols including wildcard symbols include conditional mappings based on input symbols to be received, by the pattern matching state machine in use, to constitute the wildcard symbols;
generating a dictionary of patterns based on the conditional mappings, each pattern in the dictionary including symbols sequences required to constitute wildcard symbols for a conditional mapping; and
providing a second state machine corresponding to patterns in the dictionary and being executable at a runtime of the pattern matching state machine to identify applicable conditional mappings based on input symbols received to constitute wildcard symbols.

### Claim 2 (depends on 1)

The method of claim 1 wherein, at a runtime of the pattern matching state machine, transitions between states of the pattern matching machine are traversed based on input symbols received, and transitions between states of the second state machine are traversed based on input symbols received for wildcard transitions in the pattern matching state machine,

### Claim 3 (depends on 1)

The method of claim 1 wherein one or more conditional mappings for a state representing a particular sequence of symbols includes a conditional output mapping to a state representing a symbol pattern constituting a suffix of the particular sequence of symbols, a suffix symbol pattern, for indicating a match of the suffix symbol pattern in input symbols received by the pattern matching state matching in use.

### Claim 4 (depends on 1)

The method of claim 1 wherein one or more conditional mappings for a particular state includes a conditional failure mapping to a new states in the event of a failure, of the pattern matching state machine in the particular state and for an input symbol, to transition to a subsequent state based on the directed transitions of the state machine.

### Claim 5

A pattern matching machine generator 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, the pattern matching machine generator comprising:
a state machine generator arranged to generate a first state machine of states and directed transitions between states corresponding to the plurality of patterns;
a mapping identifier arranged to identify one or more mappings between states of the first state machine such that a state representing a sequence of symbols is mapped to other states constituting a proper suffix of the sequence of symbols, wherein mappings for states representing a sequence of symbols including wildcard symbols include conditional mappings based on input symbols to be received, by the pattern matching state machine in use, to constitute the wildcard symbols; and
a dictionary generator arranged to generate a dictionary of patterns based on the conditional mappings, each pattern in the dictionary including symbols sequences required to constitute wildcard symbols for a conditional mapping,
wherein the state machine generator is further arranged to generate a second state machine corresponding to patterns in the dictionary and being executable at a runtime of the pattern matching state machine to identify applicable conditional mappings based on input symbols received to constitute wildcard symbols.

### Claim 6 (depends on 5)

The pattern matching machine generator of claim 5 wherein, at a runtime of the pattern matching state machine, transitions between states of the pattern matching machine are traversed based on input symbols received, and transitions between states of the second state machine are traversed based on input symbols received for wildcard transitions in the pattern matching state machine.

### Claim 7 (depends on 5)

The pattern matching machine generator of claim 5 wherein one or more conditional mappings for a state representing a particular sequence of symbols includes a conditional output mapping to a state representing a symbol pattern constituting a suffix of the particular sequence of symbols, a suffix symbol pattern, for indicating a match of the suffix symbol pattern in input symbols received by the pattern matching state matching in use.

### Claim 8 (depends on 5)

The pattern matching machine generator of claim 5 wherein one or more conditional mappings for a particular state includes a conditional failure mapping to a new states in the event of a failure, of the pattern matching state machine in the particular state and for an input symbol, to transition to a subsequent state based on the directed transitions of the state machine.

### Claim 9 (depends on 1)

A non-transitory computer-readable storage medium storing a computer program element comprising computer program code which, when loaded into a computer system and executed thereon, causes the computer to perform the method as claimed in claim 1.
