Deterministic finite automaton (DFA) matching method and device based on TCAM (ternary content addressable memory)
A state automaton and matching method technology, applied in special data processing applications, instruments, electrical digital data processing, etc., can solve the problems of large automata, inability to store DFA, and inability to use DFA storage.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0035] The specific processing flow of a TCAM-based DFA matching method provided in this embodiment is as follows figure 1 As shown, the following processing steps are included:
[0036] Step S101, each state of the DFA is represented by several TCAM entries, and each TCAM entry is composed of three fields: a source state field, an input character field, and a destination state field, and the source state field and the destination state field are composed of a copy ID field and a The private ID domain consists of two subdomains.
[0037] DFA can be implemented using TCAM. As a high-speed parallel search engine, TCAM has been widely deployed in various high-speed network devices for network applications such as IP address search and header-based packet classification. The TCAM storage unit can store the bit values of "0", "1" and "*", among which the bit value "*" means "don't care about the state", that is, it can be either "0" or "1" . A TCAM chip consists of a certain ...
Embodiment 2
[0130] Use the Thompson algorithm to transform the regular expression into a standard NFA, and then use the subset construction method and the Hopcroft algorithm to transform this NFA into a DFA with the least number of states.
[0131] figure 2 Shown is the NFA used to match the regular expressions ab[^h]*cd and ef[^h]*c[hH]. The circle is the NFA state, and the arrow is the state transition edge of the NFA. State 0 is the initial state, state 13 and state 14 are receiving states, and the receiving states are represented by double circles.
[0132] Define the "ε edge" of NFA, which is an edge that does not consume any input characters to transfer to a new state; figure 2 The state 0, state 5, state 6, state 7 and state 8 in have ε edges;
[0133] Define "ε-NFA", which is an NFA with ε edges; figure 2 The NFA of is an ε-NFA;
[0134] Define the "combined edge" of NFA, which is an edge composed of all outgoing edges that start from the same NFA state and arrive at the same...
Embodiment 3
[0151] A method for identifying chains in the NFA provided in this embodiment includes:
[0152] Find all the NFA chain head states, that is, there is no NFA state with any non-ε entry edge; for example figure 2 , state 1, state 2, state 9, and state 10 can be used as the chain head state;
[0153] Begin to extend the chain starting from each chain head state in turn: if the current NFA state has a non-ε outgoing edge to the next NFA state, and the next NFA state has no ε edge pointing to the state that has been extended on the chain, then extend the chain to the next One NFA state, and use the next NFA state as the current state, continue to expand the chain according to the above method; otherwise, stop extending the chain; if from figure 2 The chain head in state 1 starts to extend the chain, state 1 has a non-ε outgoing edge to state 3, and state 3 has no ε edge, so the chain is extended to state 3; state 3 is extended to state 5 after character b; state 5 tries Extend...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com