Method and apparatus for content matching

A matching method and matching device technology, applied in the field of data processing, can solve the problems of large resource consumption, unfavorable thermal upgrade, performance degradation, etc., and achieve the effects of high matching efficiency, easy upgrade and maintenance, and improved matching speed.

Inactive Publication Date: 2013-01-09
HUAWEI TECH CO LTD
View PDF5 Cites 18 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Existing content matching methods have at least the following defects: 1) If the target string is long, the branching of the matching node and the matching time will increase exponentially, and the performance will drop sharply; 2) In order to improve performance, only multiple matching engines can be used. Resource consumption is too large; 3) When adding a target string, the rule tree needs to be recompiled, which is not conducive to hot upgrade, and can only be solved by table item backup switching

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and apparatus for content matching
  • Method and apparatus for content matching
  • Method and apparatus for content matching

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] figure 1 This is a flowchart of the content matching method provided in the first embodiment of the present invention. The content matching method can be specifically applied to various application scenarios, typically such as URL filtering, message filtering, etc., carried by software and / or hardware The content matching device in the server executes it, for example, it is carried by a gateway GPRS support node (Gateway GPRS Support Node, GGSN for short). The method specifically includes the following steps:

[0027] Step 110: The content matching device performs a hash operation on at least one target character string based on the set at least one hash algorithm to obtain each target hash result corresponding to each target character string and each hash algorithm.

[0028] Step 120: The content matching device forms a hash table entry of each target character string according to each target hash result of each target character string, and combines the hash table entries o...

Embodiment 2

[0036] On the basis of the technical solutions of the foregoing embodiments, it is preferable that the number of hash algorithms is at least two, and forming the hash table entry of the target string according to the target hash results of each target string may specifically include: The first target hash result of each target string is used as the hash table entry index, and the other target hash results are used as the hash table entry content; in the above steps, the first measured hash result is selected as the hash table Item index, but in actual application, it is not limited to determine which result is the table item index according to the order of the hash result. The order of the hash algorithm can be set arbitrarily, and the first target hash result obtained can be arbitrarily determined as Hash table entry index.

[0037] Then in step 140, matching is performed in each hash table entry of the hash matching table according to each tested hash result of the tested chara...

Embodiment 3

[0096] image 3 This is a flowchart of the content matching method provided in the third embodiment of the present invention. This embodiment may be based on the above-mentioned embodiment and further includes an upgrade operation of adding a target character string. On the basis of the foregoing process, it also includes the following steps:

[0097] Step 310: The content matching device performs a hash operation on the target character string to be added based on at least one set hash algorithm according to the target character string to be added in the received target character string addition request, to obtain the target character string to be added. The target string of and each target hash result corresponding to each hash algorithm;

[0098] In the above steps, other restrictions on the adding operation can also be set. For example, it is first judged whether the entries of the hash matching table have reached the upper limit, so as to determine whether to allow adding a new...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention provides a method and an apparatus for content matching. The method comprises: based on at least one set hash algorithm, performing a hash operation to at least one target string to respectively obtain hash results for each target; forming a hash table item of the target string according to each target hash result, and combinging the hash table item of the target string to be a hash table; according to the at least one hash algorithm, performing a hash operation to to-be-tested strings to obtain to-be-tested hash results; according to of the to-be-tested hash results of the to to-be-tested strings, matching the each of the hash items in the hash table, to obtain matching results. According to the invention, the system resources occupied by the matching can be simplified; the string extraction process and the string hash matching process is in parallel execution, so matching speed is improved; and when target strings are increased or decreased, recompilation of the hash matching table is not needed, easy for upgrade and maintenance.

Description

Technical field [0001] The embodiment of the present invention relates to data processing technology, in particular to a content matching method and device. Background technique [0002] With the refined development of networks, many network users and equipment vendors are paying more and more attention to the content of messages above layer 7 for packet filtering, content billing, traffic detection, search engines, etc., in defense, public security, security, and network services. Management, commercial advertising and other fields have gradually been widely used. Deep Packet Inspection (DPI) technology emerges at the historic moment, which can identify the content of each field in the message based on the protocol. Protocol recognition / analysis is one of the key technologies of DPI, and string / character matching is an important content of protocol recognition / analysis. The speed of matching directly affects product performance. [0003] The prior art content matching technology...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F17/30G06F16/90344
Inventor 徐文广戴崇经田聃
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products