An Efficient Parallel String Matching Algorithm Based on DFA

  • Yujian Fan
  • Hongli Zhang
  • Jiahui Liu
  • Dongliang Xu
Part of the Communications in Computer and Information Science book series (CCIS, volume 320)


The classical string matching algorithms are facing a great challenge on speed due to the rapid growth of information on Internet. Meanwhile, multi-core CPU has been widespread on computers. But classical string matching algorithms does not apply to multi-core CPU flexibly. It not only affects the run-time speed, but also makes a waste of the resource on CPU. In this paper, we proposed a parallel string matching algorithm based on DFA, it solved the problem effectively. By classification on the first letter of each pattern, all CPU cores could work at the same time, which do not conflict. Experiments demonstrate whether the hit rate is high or low, the algorithm has an ideal performance.


string matching parallel algorithm DFA 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Fisk, M., Varghese, G.: An Analysis of Fast String Matching Applied to Content-based Forwarding and Intrusion Detection, Technical Report CS2001-0670. University of California, San Diego (2002)Google Scholar
  2. 2.
    Navarro, G., Raffinot, M.: Flexible Pattern Matching in Strings: Practical on-line Search Algorithms or Texts and Biological Sequences. Cambridge University Press (2002)Google Scholar
  3. 3.
    Aho, A.V., Corasick, M.J.: Efficient String Matching: An Aid to Bibliographic Search. Communications of the ACM 18(6), 333–340 (1975)MathSciNetzbMATHCrossRefGoogle Scholar
  4. 4.
    Wu, S., Manber, U.: A Fast Algorithm For Multi-pattern Searching. Technical Report TR-94-17 (1994)Google Scholar
  5. 5.
    Boyer, R.S., Moore, J.S.: A Fast String Searching Algorithm. Communications of the ACM 10(10), 762–772 (1977)CrossRefGoogle Scholar
  6. 6.
    Beate, C.W.: A String Matching Algorithm Fast on the Average. In: Proc. the 6th Colloquium on Automata, Languages and Programming, Graz, Austria, pp. 118–132 (1979)Google Scholar
  7. 7.
    Tan, G., et al.: Revisiting Multiple Pattern Matching Algorithms for Multi-core Architecture. Journal of Computer Science and Technology 26(5), 866–874 (2011)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Sidhu, R., Prasanna, V.K.: Fast Regular Expression Matching using FPGAs. In: Proc. the 9th Ann. IEEE Symp. Field-Programmable Custom Computing Machines, Rohnert, USA, pp. 227–238 (2001)Google Scholar
  9. 9.
    Qiao, G., et al.: A Graphics Processing Unit Based Multi-string Matching Algorithm for Anti-virus Systems. Energy Systems and Electrical Power, 8864–8868 (2011)Google Scholar
  10. 10.
    Norton, M.: Optimizing Pattern Matching for Intrusion Detection (2004),

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Yujian Fan
    • 1
  • Hongli Zhang
    • 1
  • Jiahui Liu
    • 1
  • Dongliang Xu
    • 1
  1. 1.School of Computer Science and TechnologyHarbin Institute of TechnologyHarbinChina

Personalised recommendations