IP Library Granted Patent US 7,788,206
Granted Patent B2
US 7,788,206 · App. 12/113,055 · Granted Aug 31, 2010

State machine compression using multi-character state transition instructions

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,788,206
App. No.
12/113,055
Granted
Aug 31, 2010
Kind
B2
Abstract

Compressing state transition instructions may achieve a reduction in the binary instruction footprint of a state machine. In certain embodiments, the compressed state transition instructions are used by state machine engines that use one or more caches in order to increase the speed at which the state machine engine can execute a state machine. In addition to reducing the instruction footprint, the use of compressed state transition instructions as discussed herein may also increase the cache hit rate of a cache-based state machine engine, resulting in an increase in performance.

Claims (33)

1. A method of evaluating a state machine with respect to a data string, wherein the state machine comprises a plurality of state transition instructions that are associated with transitions from respective states, the method comprising:

storing at least some of the state transition instructions in a first memory;

determining if a state transition instruction associated with a currently active state of the state machine comprises a multi-character state transition instruction;

in response to determining that the state transition instruction associated with the currently active state comprises a multi-character state transition instruction,

determining a quantity P of transition conditions indicated in the multi-character state transition instruction, where P is greater than or equal to 2;

determining the transition conditions indicated in the multi-character state transition instruction; and

determining if the next P characters of the data string match the P transition conditions indicated in the multi-character state transition instruction;

otherwise,

determining if the next one character of the data string matches a single transition condition indicated in the state transition instruction.

2. The method of claim 1 , wherein the transition conditions each comprise an indication of a character and a character class.

3. The method of claim 1 , wherein the data string comprises data transmitted across at least the Internet and received at a network node.

4. The method of claim 1 , wherein the state machine is configured to match one or more anti-virus signatures.

5. An apparatus for evaluating a state machine with reference to a data string comprising a plurality of characters, the apparatus comprising:

a memory configured to store at least some of a plurality of state transition instructions associated with respective states of the state machine;

an interface for receiving characters of the data string; and

a processor for 1) selectively accessing memory locations of the memory in response to respective characters of the data string and 2) determining if a state transition instruction associated with a currently active state of the state machine comprises a multi-character state transition instruction,

wherein if the state transition instruction associated with the currently active state comprises a multi-character state transition instruction, the processor is configured to i) determine a quantity P of transition conditions indicated in the multi-character state transition instruction, where P is greater than or equal to 2, ii) determine the transition conditions indicated in the multi-character state transition instruction, and iii) determine if the next P characters of the data string match the P transition conditions indicated in the multi-character state transition instruction;

otherwise, the processor is configured to determine if the next one character of the data string matches a single transition condition indicated in the state transition instruction.

6. The apparatus of claim 5 , wherein the transition conditions each comprise an indication of a character and a character class.

7. The apparatus of claim 5 , wherein the apparatus comprises one or more of a network interface card, an application specific integrated circuit, a field programmable gate array, a multi-chip module, and a reconfigurable logic circuit.

8. The apparatus of claim 5 , wherein the apparatus is configured to interface with a network server.

9. A non-transitory machine-readable storage medium, having encoded thereon program code, wherein, when the program code is executed by a machine, the machine implements a method of generating a compressed state machine representative of a plurality of regular expressions that are associated with data strings, the method comprising:

determining state transition instructions associated with respective states of the state machine, wherein at least some of the state transition instructions indicate at least one respective transition character and at least one next state transition instruction,

wherein at least one of the state transition instructions indicates two or more sequential characters of an input data stream that must be received by the state machine engine in order to initiate a transition to an indicated next state transition instruction,

wherein a first state transition instruction indicates a first quantity of characters of the data string that must be received by the state machine engine to transition to a second of the state transition instructions and the second state transition instruction indicates a second quantity of characters of the data string that must be received by the state machine engine to transition to a third of the state transition instructions, and

wherein the first quantity is equal to a maximum quantity of characters associated with respective state transition instructions and the second quantity is less than or equal to the maximum quantity, the maximum quantity selected from the group comprising 2, 3, 4, 5, 6, 7, 8, 10, 16, 24, 32, 64, and 128.

10. The method of claim 9 , wherein the two or more sequential characters comprise characters of at least one of the data strings.

11. The method of claim 9 , wherein the first state transition instruction is configured to indicate a quantity of state transition instructions for pre-fetching in the cache memory in response to activation of the first state transition instruction by the state machine engine.

12. The method of claim 9 , wherein the first state transition instruction indicates a quantity of state instructions associated with states following the first state transition instruction that each indicate two or more sequential characters of the input data stream that must be received by the state machine engine in order to initiate transitions to respectively indicated next states.

13. The method of claim 12 , further comprising prefetching from a first memory at least some of the quantity of state transition instructions.

14. The method of claim 9 , further comprising:

determining one or more instructions of the state machine for caching in a cache memory of a state machine engine, wherein the state machine engine comprises the cache memory and at least one main memory, wherein access times of the cache memory are lower than access times of the at least one main memory.

15. The method of claim 9 , wherein each of the two or more sequential characters comprise an indication of a character and a character class.

Assignments (6)
TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENT RIGHTS (RELEASES RF 032856-0031) Recorded Feb 2, 2016
From: DEUTSCHE BANK AG NEW YORK BRANCH, AS COLLATERAL AGENT
To: LSI CORPORATION; AGERE SYSTEMS LLC
Reel/Frame 037684/0039 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 24, 2015
From: LSI CORPORATION
To: INTEL CORPORATION
Reel/Frame 035090/0477 →
TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENTS AT REEL/FRAME NO. 32856/0031 Recorded Nov 18, 2014
From: DEUTSCHE BANK AG NEW YORK BRANCH
To: LSI CORPORATION; AGERE SYSTEMS LLC
Reel/Frame 034286/0872 →
PATENT SECURITY AGREEMENT Recorded May 8, 2014
From: LSI CORPORATION; AGERE SYSTEMS LLC
To: DEUTSCHE BANK AG NEW YORK BRANCH, AS COLLATERAL AGENT
Reel/Frame 032856/0031 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 1, 2009
From: TARARI, INC.
To: LSI CORPORATION
Reel/Frame 022482/0907 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 10, 2008
From: MCMILLEN, ROBERT JAMES; RUEHLE, MICHAEL D.
To: TARARI, INC.
Reel/Frame 021816/0138 →