Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Generation method of decision tree and device thereof

A decision tree and rule technology, applied in the computer field, can solve problems such as occupying storage space, and achieve the effect of reducing the probability of rule duplication

Active Publication Date: 2012-09-12
HUAWEI TECH CO LTD
View PDF3 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Rule replication occurs, which means more storage space is required

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
  • Generation method of decision tree and device thereof
  • Generation method of decision tree and device thereof
  • Generation method of decision tree and device thereof

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0098] Figure 1a It is a flowchart of a method for generating a decision tree provided by an embodiment of the present invention. Such as Figure 1a As shown, the method includes:

[0099] 11a: Generate an encoding rule set according to the rule set.

[0100] 12a: Generate the first weighted undirected graph.

[0101] 13a: Calculate the weight of each edge in the first weighted undirected graph.

[0102] 14a: If the weight of the edge with the largest weight in the first weighted undirected graph is greater than the first threshold, execute the first operation in a loop until the weight of the edge with the largest weight in the newly generated weighted undirected graph is less than Or equal to the first threshold.

[0103] 15a: Generate a decision tree for the sub-rule set corresponding to each vertex in the newly generated weighted undirected graph.

[0104] In the above 11a, the rule set includes a plurality of rules, each rule is a character string containing 0, 1 or ...

Embodiment 2

[0197] Figure 10 It is a flowchart of a method for generating a decision tree provided by an embodiment of the present invention. Such as Figure 10 As shown, the method includes:

[0198] 101: Generate a coding rule set according to the rule set.

[0199] 102: Generate a first weighted undirected graph.

[0200] 103: Calculate the weight of each edge in the first weighted undirected graph.

[0201] 104: If the weight of the edge with the largest weight in the first weighted undirected graph is less than the first threshold, the first threshold is an integer greater than or equal to 1 and less than or equal to X, where X is a bit in the first encoding rule number, then execute the first operation in a loop until the weight of the edge with the smallest weight in the newly generated weighted undirected graph is greater than or equal to the first threshold.

[0202] 105: Generate a decision tree for the sub-rule set corresponding to each vertex in the newly generated weigh...

Embodiment 3

[0264] Figure 19 It is a schematic structural diagram of an apparatus for generating a decision tree provided by an embodiment of the present invention. The device can be implemented through the method provided in Embodiment 1. Such as Figure 19 As shown, the device includes:

[0265] The encoding processing unit 191 is configured to generate an encoding rule set according to the rule set; the rule set includes a plurality of rules, and each rule is a string containing 0, 1 or wildcard characters, and any two rules in the plurality of rules are mutually exclusive. Equal; the encoding rule set includes a plurality of encoding rules, any two encoding rules in the plurality of encoding rules are not equal to each other; each encoding rule in the plurality of encoding rules corresponds to at least one of the plurality of rules , each rule in the plurality of rules corresponds to one of the plurality of encoding rules; the encoding rule corresponding to the first rule is obtai...

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 present invention provides a generation method of a decision tree and a device thereof. The method comprises the following steps of: generating a code rule set according to a rule set; generating a first weighted undirected graph; calculating a weight value of each side in the first weighted undirected graph; if a weight value of a side with a largest weight value in the first weighted undirected graph is larger than a first threshold, executing a first operation circularly until a weight value of a side with a largest weight value in a newly generated weighted undirected graph is less than or equal to the first threshold; and generating a decision tree respectively for a sub rule set corresponding to each vertex in the newly generated weighted undirected graph. In addition, the embodiment of the invention also provides other generation methods of the decision tree and devices thereof. Through a technical scheme provided by the embodiment, the probability of rule copy occurrence can be reduced.

Description

technical field [0001] The embodiments of the present invention relate to computer technology, and in particular to a method and device for generating a decision tree. Background technique [0002] Traffic classification usually refers to defining some rules based on certain characteristics of packets, and using these rules to identify packets matching certain characteristics, so as to classify packets. Multiple packets matching a specific rule form a flow. The flow classification mechanism can realize that different flows correspond to different Quality of Service (QoS for short). Compared with the traffic classification method based on specialized hardware such as Ternary Content Addressable Memory (TCAM), the traffic classification method based on decision tree has greater advantages in terms of matching rule search speed and cost saving. Advantage. [0003] The principle of the decision tree-based traffic classification method is to divide a rule set into multiple sma...

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): H04L12/56H04L12/801
CPCH04L47/2441G06N5/04
Inventor 胡晶龚钧
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products