{'fraction_non_alphanumeric': 0.012477718360071301, 'fraction_numerical': 0.0, 'mean_word_length': 5.644970414201183, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Flexible pattern matching algorithm in Chinese strings

Presently the research on the security of network contents has faced the challenge of network breakthrough techniques. A popular Chinese network breakthrough technique is to jam malicious characters in key words, and/or replace the Chinese characters in key words with homonyms or homophones, or complicated Chinese characters. With this method some malicious web pages make themselves escape from the network filtering and intrusion detection. While most existing pattern matching algorithms in Chinese strings cannot detect this kind of attacks. In this paper we give a formulized definition of flexible pattern matching in Chinese strings, and compare the classical algorithms for pattern matching in strings, and choose the prefix searching strategy to realize the flexible algorithms for pattern matching in single-pattern string and multi-pattern string. Our algorithm can match the Chinese strings jammed with malicious characters, and partially resolve the Chinese network breakthrough problem that other classical matching algorithms in string cannot solve.