# US 2004/0073550 A1 · String matching using data bit masks

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

- Number: US 2004/0073550 A1
- Document ID: US20040073550A1
- Status: Published application
- Kind: A1
- Application number: 10/269,742
- Filed: 2002-10-11
- Published: 2004-04-15
- Earliest claimed: 2002-10-11
- Assignees: Avaya Inc.
- Inventors: Orna Meirovitz; Dan Beiser
- Web page: https://patentgrep.com/patent/US20040073550A1

## CPC

- G06F 16/90344: {by using string matching techniques}
- Y10S 707/99934: Query formulation, input preparation, or translation
- Y10S 707/99936: Pattern matching access
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y10S: TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS

## Abstract

A method of searching a text for a pattern. The method includes receiving at least one portion of the text, providing a pattern to be searched for in the text and generating, in accordance with the pattern, a plurality of bit masks each representing one or more characters, each bit mask indicating for each position in the received portion whether the position carries one of the one or more characters represented by the bit mask. Bit-wise operations indicative of whether the pattern is found in the portion are performed on the generated bit masks and an indication of whether the pattern appears in the text is provided responsive to the performed bit-wise operations.

## Claims

### Claim 1

A method of searching a text for a pattern, comprising:
receiving at least one portion of the text;
providing a pattern to be searched for in the text;
generating, in accordance with the pattern, a plurality of bit masks each representing one or more characters, each bit mask indicating for each position in the received portion whether the position carries one of the one or more characters represented by the bit mask;
performing bit-wise operations indicative of whether the pattern is found in the portion, on the generated bit masks; and
providing an indication of whether the pattern appears in the text, responsive to the performed bit-wise operations.

### Claim 2 (depends on 1)

A method according to claim 1, wherein receiving the at least one portion comprises receiving a plurality of consecutive portions of the text.

### Claim 3 (depends on 2)

A method according to claim 2, wherein the plurality of portions have a same length.

### Claim 4 (depends on 2)

A method according to claim 2, wherein at any time only a single text portion is processed.

### Claim 5 (depends on 2)

A method according to claim 2, wherein after beginning to handle a text portion, previous text portions are not handled.

### Claim 6 (depends on 1)

A method according to claim 1, wherein generating the plurality of bit masks comprises generating bit masks for each of the possible characters in the text and selecting bit masks corresponding to characters in the pattern.

### Claim 7 (depends on 1)

A method according to claim 1, wherein generating the plurality of bit masks comprises generating bit masks for each of the characters or groups in the pattern.

### Claim 8 (depends on 1)

A method according to claim 1, wherein generating the plurality of bit masks comprises generating bit masks in which each bit corresponds to a single position in the text portion.

### Claim 9 (depends on 1)

A method according to claim 1, wherein generating the plurality of bit masks comprises generating bit masks such that each position in the text portion corresponds to a plurality of bits in the bit mask.

### Claim 10 (depends on 1)

A method according to claim 1, wherein performing the bit-wise operations comprises shifting at least one of the bit masks according to the position of its respective one or more characters in the pattern.

### Claim 11 (depends on 10)

A method according to claim 10, wherein generating the plurality of bit masks comprises generating a number of bit masks equal to the number of characters in the text portion.

### Claim 12 (depends on 11)

A method according to claim 11, wherein if the pattern includes fewer characters than in the text portion, one or more don't-care bit masks are generated.

### Claim 13 (depends on 1)

A method according to claim 1, wherein performing the bit-wise operations comprises performing an AND operation on the bit masks.

### Claim 14 (depends on 13)

A method according to claim 13, wherein the AND operation is performed additionally on one or more bit words representative of the content of a previous portion of the text.

### Claim 15 (depends on 14)

A method according to claim 14, wherein the one or more bit words comprise a feedback bit word indicative of appearance of prefixes of the pattern in the previous text portion.

### Claim 16 (depends on 14)

A method according to claim 14, wherein the one or more bit words comprise a carry over bit word indicative of appearance of another pattern included in a single multi-pattern with the pattern for which the bit words are generated, in the previous text portion.

### Claim 17 (depends on 1)

A method according to claim 1, wherein providing the indication of whether the pattern appears in the text comprises providing an indication on where the pattern appears in the text.

### Claim 18 (depends on 1)

A method according to claim 1, wherein performing bit-wise operations comprises performing a set of independents which is independent of the pattern and text.

### Claim 19 (depends on 1)

A method according to claim 1, comprising generating bit-masks, performing bit-wise operations and providing an indication for a plurality of patterns, substantially concurrently.

### Claim 20

A search machine, comprising:
a text window adapted to receive a portion of a text;
at least one bit mask generator adapted to generate a plurality of bit masks each representing one or more characters, each bit mask indicating for each position in the text window whether the position carries one of the one or more characters represented by the bit mask; and
at least one pattern matching unit adapted to search for a respective pattern in the text, by manipulating bit masks, generated by the at least one bit mask generator, corresponding to the pattern.

### Claim 21 (depends on 20)

A search machine according to claim 20, wherein the text window is adapted to receive consecutive segments of a length L of the text.

### Claim 22 (depends on 20)

A search machine according to claim 20, wherein the at least one pattern matching unit comprises a plurality of pattern matching units.

### Claim 23 (depends on 22)

A search machine according to claim 22, wherein the at least one bit mask generator comprises a single bit mask generator which provides bit masks to each of the plurality of pattern matching units.

### Claim 24 (depends on 22)

A search machine according to claim 22, wherein the at least one bit mask generator comprises a plurality of bit mask generators which correspond to the plurality of pattern matching units.

### Claim 25 (depends on 22)

A search machine according to claim 22, comprising at least one transfer line which passes results from one pattern matching unit to at least one other pattern matching unit.

### Claim 26 (depends on 25)

A search machine according to claim 25, wherein the at least one transfer line comprises at least two transfer lines which pass results from one pattern matching unit to at least one other pattern matching unit.

### Claim 27 (depends on 25)

A search machine according to claim 25, comprising a configurable controlled gate adapted to determine whether the transfer line passes results to the other pattern matching unit.

### Claim 28 (depends on 22)

A search machine according to claim 22, wherein the plurality of pattern matching units are substantially identical.

### Claim 29 (depends on 22)

A search machine according to claim 22, wherein at least one of the plurality of pattern matching units is different in structure from at least one other of the pattern matching units.

### Claim 30 (depends on 22)

A search machine according to claim 22, wherein the plurality of pattern matching units comprise at least ten pattern matching units.

### Claim 31 (depends on 22)

A search machine according to claim 22, wherein the plurality of pattern matching units represent patterns of at least two different lengths.

### Claim 32 (depends on 22)

A search machine according to claim 22, wherein the at least one pattern matching unit comprises a shift unit adapted to shift at least one of the bit masks according to the position in the pattern represented by the bit mask.

### Claim 33 (depends on 32)

A search machine according to claim 32, wherein the at least one pattern matching unit comprises an AND unit which performs an AND operation between bit masks corresponding to each of the positions of the pattern.
