CN103269342A - High-dimensional large-scale packet matching method based on IPV6 - Google Patents
High-dimensional large-scale packet matching method based on IPV6 Download PDFInfo
- Publication number
- CN103269342A CN103269342A CN2013101737133A CN201310173713A CN103269342A CN 103269342 A CN103269342 A CN 103269342A CN 2013101737133 A CN2013101737133 A CN 2013101737133A CN 201310173713 A CN201310173713 A CN 201310173713A CN 103269342 A CN103269342 A CN 103269342A
- Authority
- CN
- China
- Prior art keywords
- value
- point
- territory
- algorithm
- mapped
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a high-dimensional large-scale packet matching method based on IPV6. A difference evolutionary algorithm based on real number encoding and a traditional packet matching algorithm are combined, a variable coefficient thought is introduced in adaptive value design, and therefore problem processing is more objective. Due to the facts that distributivity characteristics are introduced and variable intensity can be adjusted through self-adaptation, consequently contradiction between diversity and convergence of population can be weighed in a dynamic mode. Numerical experiments show that compared with the traditional algorithm, the high-dimensional large-scale packet matching method based on the IPV6 is effectively improved in comprehensive performance like speeds and storage spaces. In addition, the high-dimensional large-scale packet matching method based on IPV6 has the obvious advantage that time performance and the rule number of packet matching are poor in relevance, and therefore the high-dimensional large-scale packet matching method based on the IPV6 is suitable for processing high-dimensional and large-scale packet matching problems.
Description
Technical field
The present invention relates to a kind of higher-dimension based on IPV6 and wrap matching process on a large scale.
Background technology
Traditional bag matching process is not to apply to the IPV6 environment, is exactly that performance is too poor.Need improve.
Summary of the invention
The object of the present invention is to provide a kind of simply, easy to operate, the higher-dimension based on IPV6 of excellent combination property wraps matching process on a large scale.
Technical solution of the present invention is:
A kind of higher-dimension based on IPV6 wraps matching process on a large scale, it is characterized in that: packet adopts and to comprise that the five-tuple of source IP address, purpose IP address, source port, destination interface, agreement determines a grouping; In the IPV6 agreement IP address with * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * * * form exist;
Source IP and purpose IP address are designated x to each section respectively from a high position to the low level
Ij, i ∈ { 1,2}, j ∈
Wherein the value of lambda parameter designs according to network size, is handling x
I1The time, only consider the situation of clean culture, the value of Senior Three position is fixed as 001, so x
I1Do not consider the value of high three-dimensional;
Source port and destination interface all are with the sixteen bit binary representation, with corresponding decimal system Y
3, Y
4Sign; X
i=Y
iMod1024 λ, i ∈ (3,4), the upper transmission layer agreement is with eight binary representation, with corresponding decimal system X
5Sign is established X and is represented vector (X
1, X
2, X
3, X
4, X
5);
F (X) ∈ (0,1024 λ), and F (X) is integer, 0 ≦ α
i≦ 1,0 ≦ β ≦ 1024;
According to formula (1), (2), F (X) function is mapped to the one-dimensional space (0,1024 λ) to X; The purpose of F (X) function is mapped to an interval to random rule base exactly;
At mapping function F (X), under the known condition of X domain space and F (X) mapping space, identification α
iWith the parameter value of β, defining vectorial A is (α
1,α
2,α
3,α
4,α
5), the A that uses the differential evolution algorithm to search for to make the adaptive value minimum and the combination of β;
Adopt real number to encode, in order to introduce the heuristic information relevant with problem domain to increase the search capability of evolution algorithmic;
Two problems below when adopting real coding, considering:
(a) description of colony's individuality: individuality is a real number vector, and each element in the vector is a continuous variable; Individual body and function vector is S
i(s
I1S
IjS
In), n is the dimension of problem, S
iRepresent i individuality, s
IjRepresent i j individual component, s
IjBe a floating number, scope is at [l (j), u (j)];
(b) when individuality is carried out mutation operation, as s
IjValue exceed [l (j), u (j)], operate accordingly, adopt following formula to carry out:
Wherein r is the random number of a scope between [0,1];
Described basic differential evolution algorithm is: two different random individuals of parent differ from the differential vector that obtains of operation and are added on the 3rd the different individuality of selecting at random, it is individual to generate a variation, then according to certain probability, carry out interlace operation between parent individuality and the variation individuality, generate a new individuality, between the individual and new individuality of parent, select operation according to the size of adaptive value, select the more excellent individuality of adaptive value as filial generation;
Operate according to following formula (6) during variation.
ν
m(t+1)=S
gbest(t)+Δ(t,S
r2(t)-S
r3(t)) (6)
M ≠ gbest ≠ r wherein
2≠ r
3
Wherein t is current evolution algebraically, and the function Δ (t, codomain x) is [0, x] or [x, 0], and feasible when t increases, Δ (t, x) heighten close to 0 probability, the value that is t is more big, and Δ (t, x) value is more big close to 0 probability, thereby can accomplish the more consideration global search of evolution initial stage, and be partial to Local Search in the later stage;
Δ (t, x)=x (1-τ
β), β=(1-t/T) wherein
η(7)
Wherein τ is a random number on [0,1], and T represents maximum algebraically, and η is a parameter that determines the fierce degree of variation, plays a part to adjust the Local Search zone, and its value is generally { 2,3,4,5};
Work as ν
Mj(t+1) exceed [l (j), u (j)], handle according to formula (5); S
R2(t), S
R3(t) be two pairs of individualities that parent is selected at random, carry out two different individualities that algorithm of tournament selection obtains, S
Gbest(t) be father population optimum individual;
Operate according to following formula (8) during intersection:
C
R=RED
N/(64λ) (9)
RED wherein
NBe defined as: as outnumbering the M threshold values in the X territory, and these points are mapped to F (X from the X territory
)The same point in territory, F (X
)Point such in the territory is defined as redundant points, and the number of redundant points is defined as RED in F (X) territory
N, and the λ value arranges according to network size, C is guaranteed in the setting of the value of λ
RBe small probability event greater than 1;
Select the following formula of operating basis (10) to operate:
Design flexibility tolerance:
The number of redundant points is more few in F (X) territory, i.e. RED
NPoint is more little, and population is individual just more excellent; The point that is mapped to by the X territory in statistics F (X) territory, the mean value of these points is designated as
Calculate standard deviation S again, according to
Calculate coefficient of variation C
V,-C
VBe worth more for a short time, population is individual just more excellent;
RED
NAnd C
VThe distribution performance that all is the point that is mapped to from F (X) territory considers a problem, utilize Principle of Statistics to come the distributivity of guarantee point, distributivity is more good, memory headroom takies just more few, and the distributivity of the point that is mapped in the matching speed of bag and F (X) territory has much relations, distributivity is more good, the corresponding raising of the matching speed of bag;
If the x territory is mapped to the number of same some i among the F (X) and is defined as H (i); V is the summation of all mapping points of x territory, and definition is as formula (12)
If H (i)=0then H (i)=ω wherein, ω can regulate, among the F (X) as exist point not have mapped attending the meeting to bring the waste of internal memory, suitably ω dynamically increased, the A that obtains, the β combination can reduce memory consumption;
Order
The V that is obtained by formula (11), (12), (13)
AVEThis index can be used for analyzing the mapped closeness of F (X) territory mid point, anywhere rule counts the situation of change that increases by the time efficiency of its observation bag coupling, and its value is more for a short time to mean that mapped some distribution is more even, and distribution performance is more good;
Make f (A, β)=φ RED
N-ψ C
V+V
AVE(14)
φ, ψ, regulate RED
N, G and the adaptive value of contribution, the value of φ, ψ, is between 0 and 1 and be 1; The index of weighing the population individuality be exactly f (A, β), its value is more little, and is individual just more excellent, seeks the optimum combination of A and β, search makes f (A, the A of value minimum β), β combination exactly;
By RED in the formula (9)
NDescription know that point in F (X) territory may have a plurality of X mappings, so just may have a plurality of rules to leave same point in, can design a pointer chained list a plurality of rules of connecting by conventional method, carry out smoothly to guarantee to wrap to mate;
When fire compartment wall or router are received packet, analyze the protocol header of packet, extract the IP address, go out the point of this packet mapping according to Extract (IP) and F (X) two function calculation, so there are a plurality of rules in point, carries out sequential search according to the pointer chained list.
Accomplish C
RValue be small probability event greater than 1, λ carries out following setting: establishing regular number is n, and it is S that redundant points is shone upon the regular number that falls, and the scale of mapped discrete region point is Y, ∵ C
R〉=1, ∴ RED
N〉=64 λ, ∴ S 〉=64M/ λ, ∴ will make [(Y-S)/Y]
nBe small probability event; Namely to make C
RValue be small probability event greater than 1, make when λ arranges [(Y-S)/Y]
nBe small probability event.
Described higher-dimension based on IPV6 wraps matching process on a large scale, detailed process is as follows: produce A by algorithm (1), the combination of β optimum, strictly all rules is mapped to the one-dimensional space of 0 to 1024 λ according to F (X) function, each point of the one-dimensional space can have S rule at most, to pointer chained list series connection: Algorithm (1) Input: maximum algebraically T, population number p of this S rule design
n, the threshold values Δ S of new and old individual difference, λ, φ, ψ,, η, ω, Output:A, β; Step 1: initialization P (0), t=0; The initial value that counter C is set is 0; Step 2: construct each individual adaptive value among the f function calculation P (t) according to formula (14), determine new optimum individual S ' gbest (t), calculate and the difference of original optimum individual Sgbest (t), and difference and threshold values Δ S, as less than threshold values Δ S, counter C increases by 1; Step 3: if t greater than the value of T or counter C greater than 3, then stop the algorithm operation, and the output optimal solution; Otherwise change step4; Step 4: produce two different individual Sr2, Sr3 according to algorithm of tournament selection; Step: P (t) makes a variation according to formula (6) and produces ν m (t+1), calculates CR according to formula (9); Step6: carry out interlace operation according to formula (8) and produce μ m (t+1); Step 7: select operation to produce Sm (t+1) according to formula (10); Step 8:t=t+1 changes step 2;
When arriving fire compartment wall or router, carries out a packet following algorithm (2): Algorithm (2) Input:A, β, the packet of arrival, Output: bag is handled accordingly; Step 1: the packet according to arriving, extract the IP address, according to Extract (IP) function etc., calculate the value of X-direction amount, A and the β combination of developing and according to algorithm (1) again is among the substitution F (X); Step 2: according to the reference point in F (X) mapped one-dimensional space, search for the corresponding rule of this point, as surpassing a rule, then search in chained list according to the algorithm of traditional sequential search; Step 3: if rule does not exist, handle according to corresponding default; Step 4: exist as rule, carry out respective handling with specified action in the rule.
The present invention in the thought of the adaptive value design introducing coefficient of variation, thereby makes the processing of problem have more objectivity merging mutually based on the differential evolution algorithm of real coding and traditional bag matching algorithm.By introducing distributivity feature, the severe degree of self adaptation adjustment variation, thus dynamically weigh the diversity of population and the contradiction between the convergence.Numerical experiment shows with traditional algorithm to be compared, effectively improved in combination properties such as speed, memory spaces, this method also has a distinguishing feature in addition: have very weak correlation between the time performance of bag coupling and the regular number, thereby this method is fit to handle higher-dimension and extensive bag matching problem.
Description of drawings
The invention will be further described below in conjunction with drawings and Examples.
Fig. 1 is the pretreatment time comparison diagram of 3 kinds of algorithms.
Fig. 2 is each data packet matched mean consumption time comparison diagram of 3 kinds of algorithms.
Fig. 3 is the average memory consumption comparison diagram of 3 kinds of algorithms.
Fig. 4 be regular number be 500 o'clock the mapping point distribution map.
Fig. 5 is the mapping point distribution map of regular number when being 1k.
Fig. 6 is the mapping point distribution map of regular number when being 5k.
Fig. 7 is the mapping point distribution map of regular number when being 8k.
Fig. 8 is the mapping point distribution map of regular number when being 10k.
Embodiment
Packet adopts five-tuple (source IP address, purpose IP address, source port, destination interface, agreement) to determine a grouping.In the IPV6 agreement IP address with * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * * * form exist.
Source IP and purpose IP address are designated x to each section respectively from a high position to the low level
Ij, i ∈ { 1,2}, j ∈
Wherein the value of lambda parameter designs according to network size, is handling x
I1The time, only consider the situation of clean culture, the value of Senior Three position is fixed as 001, so x
I1Do not consider the value of high three-dimensional.
Source port and destination interface all are with the sixteen bit binary representation, with corresponding decimal system Y
3, Y
4Sign.X
i=Y
iMod1024 λ, i ∈ (3,4), the upper transmission layer agreement is with eight binary representation, with corresponding decimal system X
5Sign is established X and is represented vector (X
1, X
2, X
3, X
4, X
5).
F (X) ∈ (0,1024 λ), and F (X) is integer, 0 ≦ α
i≦ 1,0 ≦ β ≦ 1024.
According to formula (1), (2), F (X) function is mapped to the one-dimensional space (0,1024 λ) to X.The purpose of F (X) function is mapped to an interval to random rule base exactly.
At mapping function F (X), under the known condition of X domain space and F (X) mapping space, identification α
iParameter value with β.Defining vectorial A is (α
1,α
2,α
3,α
4,α
5), the A that this paper uses the differential evolution algorithm to search for to make the adaptive value minimum and the combination of β.
Adopt real number to encode, in order to introduce the heuristic information relevant with problem domain to increase the search capability of evolution algorithmic.As using binary coding or gray coding, will cause individual coding oversize at the IPV6 environment in addition.Two problems below when adopting real coding, will considering.
1. the description of colony's individuality: individuality is a real number vector, and each element in the vector is a continuous variable.Body and function vector S for example
i(s
I1S
IjS
In), n is the dimension of problem, S
iRepresent i individuality, s
IjRepresent i j individual component, s
IjBe a floating number, scope is at [l (j), u (j)].
2. when individuality is carried out mutation operation, as s
IjValue exceed [l (j), u (j)], operate accordingly.Can select to be undertaken by following formula:
Also can be undertaken by following formula
This method adopts following formula to carry out:
Wherein r is the random number of a scope between [0,1].
Basic differential evolution algorithm: two different random individuals of parent differ from the differential vector that operation obtains and are added on the 3rd the different individuality of selecting at random, it is individual to generate a variation, then according to certain probability, carry out interlace operation between parent individuality and the variation individuality, generate a new individuality, between the individual and new individuality of parent, select operation according to the size of adaptive value, select the more excellent individuality of adaptive value as filial generation.
Operate according to following formula (6) during variation.
ν
m(t+1)=S
Gbest(t)+Δ (t, S
R2(t)-S
R3(t)) (6) m ≠ gbest ≠ r wherein
2≠ r
3
Wherein t is current evolution algebraically, and the function Δ (t, codomain x) is [0, x] or [x, 0], and feasible when t increases, Δ (t, x) heighten close to 0 probability, the value that is t is more big, and Δ (t, x) value is more big close to 0 probability, thereby can accomplish the more consideration global search of evolution initial stage, and be partial to Local Search in the later stage.
Δ (t, x)=x (1-τ
β), β=(1-t/T) wherein
η(7)
Wherein τ is a random number on [0,1], and T represents maximum algebraically, and η is a parameter that determines the fierce degree of variation, plays a part to adjust the Local Search zone, and its value is generally { 2,3,4,5}, this parameter value 2 in this method numerical experiment.
Work as ν
Mj(t+1) exceed [l (j), u (j)], handle according to formula 5.S
R2(t), S
R3(t) be two pairs of individualities that parent is selected at random, carry out two different individualities that algorithm of tournament selection obtains, S
Gbest(t) be father population optimum individual.
Operate according to following formula (8) during intersection.
C
R=RED
N/(64λ) (9)
RED wherein
NBe defined as: as outnumbering the point of M threshold values (this value is set to 5) in the X territory herein, and these points are mapped to F (X from the X territory
)The same point in territory, F (X
)Point such in the territory is defined as redundant points, and the number of redundant points is defined as RED in F (X) territory
NAnd the λ value arranges according to network size, and C is guaranteed in the setting of the value of λ
RBe small probability event greater than 1.
How to accomplish C
RValue be small probability event greater than 1, λ must following setting:
Namely to make C
RValue be small probability event greater than 1, make when λ arranges [(Y-S)/Y]
nBe small probability event.
C
RBe worth more high, ν then
m(t+1) to μ
m(t+1) contribution is more many, is conducive to Local Search and accelerating ated test speed; If C
RMore little, ν then
m(t+1) to μ
m(t+1) contribution is more little, is conducive to keep diversity and the global search of population.This shows, be contradiction keeping between population diversity and the rate of convergence.C in this article
RDynamic change, rather than immobilize, when mapped some distributivity was better in F (X) territory, the value of N can reduce accordingly, thereby reaches C
RValue diminish automatically, on the contrary, the value of N can improve, thus C
RValue can corresponding increase.So just can weigh the contradiction between population diversity and the convergence rate automatically.C
RAs a steady state value is set, can bring pretreatment time increase, the coupling average time deterioration, shown in table 1 numerical experiment:
Select the following formula of operating basis (10) to operate.
When estimating the population individuality, the individuality of generation is excellent or bad, needs adaptive metrology.The success or not of adaptive value computational methods design is a critical job, because it is the actuating force of algorithm evolutionary process, is unique foundation of natural selection, and the operation that changes the population internal structure is all controlled by adaptive value.
Table 1C
RDifference band is set the bag matching performance relatively
Design flexibility tolerance:
The number of redundant points is more few in F (X) territory, i.e. RED
NPoint is more little, and population is individual just more excellent.The point that is mapped to by the X territory in statistics F (X) territory, the mean value of these points is designated as
Calculate standard deviation S again, according to
Calculate coefficient of variation C
V,-C
VBe worth more for a short time, population is individual just more excellent.
RED
NAnd C
VThe distribution performance that all is the point that is mapped to from F (X) territory considers a problem.Utilize Principle of Statistics to come the distributivity of guarantee point, distributivity is more good, and memory headroom takies just more few.And the distributivity of the point that is mapped to has much relations in the matching speed of bag and F (X) territory, and distributivity is more good, the corresponding raising of the matching speed of bag.
If the x territory is mapped to the number of same some i among the F (X) and is defined as H (i); V is the summation of all mapping points of x territory, and definition is as formula (12)
If H (i)=0then H (i)=ω wherein, ω can regulate, among the F (X) as exist point not have mapped attending the meeting to bring the waste of internal memory, suitably ω dynamically increased, the A that obtains, the β combination can reduce memory consumption.Value is 1 in the numerical experiment of this paper.
Order
Order
V
AVE=V/T (13)
The V that is obtained by formula (11), (12), (13)
AVEThis index can be used for analyzing the mapped closeness of F (X) territory mid point, observes the time efficiency of bag coupling by it and anywhere rule counts the situation of change that increases.Its value is more for a short time to mean that mapped some distribution is more even,
Distribution performance is more good.
Make f (A, β)=φ RED
N-ψ C
V+V
AVE(14)
φ, ψ, regulate RED
N, G and the adaptive value of contribution, the value of φ, ψ, is between 0 and 1 and be 1.Their values of this method all just are made as 0.3,0.3,0.4, find that though adaptive value is more excellent, redundant points is too many if observe in experimental result, and just improve φ and value this moment, thereby reduce the value of ψ accordingly.The index of weighing the population individuality is exactly that (A, β), its value is more little, and is individual just more excellent, seeks the optimum combination of A and β, searches for exactly to make f (A, the A of value minimum β), β combination for f.
By RED in the formula (9)
NDescription know that point in F (X) territory may have a plurality of X mappings, so just may have a plurality of rules to leave same point in, can design a pointer chained list a plurality of rules of connecting by conventional method, carry out smoothly to guarantee to wrap to mate.
When fire compartment wall or router are received packet, analyze the protocol header of packet, extract the IP address, go out the point of this packet mapping according to Extract (IP) and F (X) two function calculation, so there are a plurality of rules in point, carries out sequential search according to the pointer chained list.
The basic thought of this method uses the differential evolution algorithm to estimate A, the β value of calculating, thereby makes the generation of hash function have more science, sets up rule list in conjunction with the pointer chained list then.
Detailed process is as follows:
Produce A by algorithm (1), the combination of β optimum is mapped to the one-dimensional space of 0 to 1024 λ to strictly all rules according to F (X) function, and each point of the one-dimensional space may have S rule at most, this S rule is designed a pointer chained list connect.
When arriving fire compartment wall or router, carries out a packet following algorithm (2)
Attached: relevant parameter and function declaration:
Parameter or function | Explanation |
Extract(IP) | To the source and destination IP address in the packet extraction packet header that enters |
F(X) | The mapping function of looking for for this algorithm |
α i and β | The coefficient correlation that need try to achieve with evolution algorithmic |
l(j),u(j) | The lower limit of the value of J parameter and the upper limit |
algorithm | Applied to seek the optimum combination of function parameter |
This law and conventional method RFC and HyperCuts are compared experiment:
RFC wraps the optimal algorithm of matching speed at present, and HyperCuts is the many algorithms that use at present, and combination property is more excellent.Experiment is carried out under simulated environment.In experiment, fire compartment wall packet per second clock is set arrives 400k,
Each testing time is 10s.The used operating system platform of emulation is RHEL5.0, and CPU is Duo E7500 double-core 2.93HZ, the 4G internal memory; Used simulator is Network Simulator v2.27.Based on 6 groups of experimental datas, observe when regular number linear growth each changes of performance parameters situation of three kinds of algorithms.This experimental subjects is firewall rule.Rule generates the principle follow at random, and experimental result is the average of computing 60 times.
Table 23 kind of algorithm performance relatively
Table 2 has showed that data structure consumption settling time, the packet forwarding of 3 kinds of algorithms consume and the internal memory mean consumption average time.
From table 2 and Fig. 2, the RDEPM algorithm is more superior than RFC on pretreatment time consumes; Can find that from table 2 and Fig. 3 the RDEPM algorithm is superior to RFC far away on the memory consumption performance, and from Fig. 3, the memory consumption of RFC is along with the increase of regular number acutely increases.This memory consumption explosive increase mode can not adapt to extensive bag coupling.Can observe out from table 2 and Fig. 2, this algorithm RDEPM is superior to HiperCuts in coupling consumption average time of packet, more estimable is, the RDEPM algorithm is anywhere rule counted the growth of scale, data packet matched consumption average time only presents faint growth, and the increasing degree of HiperCuts is bigger.Thereby illustrate that though HiperCuts has certain advantage in preliminary treatment and memory consumption, owing to consume poor performance the match time of packet, also be not suitable for the extensive bag coupling under the IPV6 environment.
Can observe the distribution situation that the X territory is shone upon in F (X) territory from Fig. 4 to Fig. 8, corresponding during from 500 linear growths to 10K at regular number, it is satisfactory for result to find to distribute, thereby the average behavior that guarantees the bag coupling is corresponding fine.The distributivity ideal means that the redundant points on F (X) territory is fewer, so just makes the regular number of link above the chained list negligible amounts of threshold values.Thereby improve the time loss of bag coupling.
Conclusion: the inventive method applies to the coupling of packet under the IPV6 environment to the differential evolution algorithm, thereby constructively solves under rational memory consumption, realizes the quick forwarding problems of packet.Be very suitable for the coupling of the large-scale packet of higher-dimension under the IPV6 environment.
Claims (3)
1. the higher-dimension based on IPV6 wraps matching process on a large scale, it is characterized in that: packet adopts and to comprise that the five-tuple of source IP address, purpose IP address, source port, destination interface, agreement determines a grouping; In the IPV6 agreement IP address with * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * × × ︰ * * * * form exist;
Source IP and purpose IP address are designated x to each section respectively from a high position to the low level
Ij, i ∈ { 1,2}, j ∈
Wherein the value of lambda parameter designs according to network size, is handling x
I1The time, only consider the situation of clean culture, the value of Senior Three position is fixed as 001, so x
I1Do not consider the value of high three-dimensional;
Source port and destination interface all are with the sixteen bit binary representation, with corresponding decimal system Y
3, Y
4Sign; X
i=Y
iMod1024 λ, i ∈ (3,4), the upper transmission layer agreement is with eight binary representation, with corresponding decimal system X
5Sign is established X and is represented vector (X
1, X
2, X
3, X
4, X
5);
F (X) ∈ (0,1024 λ), and F (X) is integer, 0 ≦ α
i≦ 1,0 ≦ β ≦ 1024;
According to formula (1), (2), F (X) function is mapped to the one-dimensional space (0,1024 λ) to X; The purpose of F (X) function is mapped to an interval to random rule base exactly;
At mapping function F (X), under the known condition of X domain space and F (X) mapping space, identification α
iWith the parameter value of β, defining vectorial A is (α
1,α
2,α
3,α
4,α
5), the A that uses the differential evolution algorithm to search for to make the adaptive value minimum and the combination of β;
Adopt real number to encode, in order to introduce the heuristic information relevant with problem domain to increase the search capability of evolution algorithmic;
Two problems below when adopting real coding, considering:
(a) description of colony's individuality: individuality is a real number vector, and each element in the vector is a continuous variable; Individual body and function vector is S
i(s
I1S
IjS
In), n is the dimension of problem, S
iRepresent i individuality, s
IjRepresent i j individual component, s
IjBe a floating number, scope is at [l (j), u (j)];
(b) when individuality is carried out mutation operation, as s
IjValue exceed [l (j), u (j)], operate accordingly, adopt following formula to carry out:
Wherein r is the random number of a scope between [0,1];
Described basic differential evolution algorithm is: two different random individuals of parent differ from the differential vector that obtains of operation and are added on the 3rd the different individuality of selecting at random, it is individual to generate a variation, then according to certain probability, carry out interlace operation between parent individuality and the variation individuality, generate a new individuality, between the individual and new individuality of parent, select operation according to the size of adaptive value, select the more excellent individuality of adaptive value as filial generation;
Operate according to following formula (6) during variation.
ν
m(t+1)=S
gbest(t)+Δ(t,S
r2(t)-S
r3(t)) (6)
M ≠ gbest ≠ r wherein
2≠ r
3
Wherein t is current evolution algebraically, and the function Δ (t, codomain x) is [0, x] or [x, 0], and feasible when t increases, Δ (t, x) heighten close to 0 probability, the value that is t is more big, and Δ (t, x) value is more big close to 0 probability, thereby can accomplish the more consideration global search of evolution initial stage, and be partial to Local Search in the later stage;
Δ (t, x)=x (1-τ
β), β=(1-t/T) wherein
η(7)
Wherein τ is a random number on [0,1], and T represents maximum algebraically, and η is a parameter that determines the fierce degree of variation, plays a part to adjust the Local Search zone, and its value is generally { 2,3,4,5};
Work as ν
Mj(t+1) exceed [l (j), u (j)], handle according to formula (5); S
R2(t), S
R3(t) be two pairs of individualities that parent is selected at random, carry out two different individualities that algorithm of tournament selection obtains, S
Gbest(t) be father population optimum individual;
Operate according to following formula (8) during intersection:
C
R=RED
N/(64λ) (9)
RED wherein
NBe defined as: as outnumbering the M threshold values in the X territory, and these points are mapped to F (X from the X territory
)The same point in territory, F (X
)Point such in the territory is defined as redundant points, and the number of redundant points is defined as RED in F (X) territory
N, and the λ value arranges according to network size, C is guaranteed in the setting of the value of λ
RBe small probability event greater than 1;
Select the following formula of operating basis (10) to operate:
Design flexibility tolerance:
The number of redundant points is more few in F (X) territory, i.e. RED
NPoint is more little, and population is individual just more excellent; The point that is mapped to by the X territory in statistics F (X) territory, the mean value of these points is designated as
Calculate standard deviation S again, according to
Calculate coefficient of variation C
V,-C
VBe worth more for a short time, population is individual just more excellent;
RED
NAnd C
VThe distribution performance that all is the point that is mapped to from F (X) territory considers a problem, utilize Principle of Statistics to come the distributivity of guarantee point, distributivity is more good, memory headroom takies just more few, and the distributivity of the point that is mapped in the matching speed of bag and F (X) territory has much relations, distributivity is more good, the corresponding raising of the matching speed of bag;
If the x territory is mapped to the number of same some i among the F (X) and is defined as H (i); V is the summation of all mapping points of x territory, and definition is as formula (12)
If H (i)=0then H (i)=ω wherein, ω can regulate, among the F (X) as exist point not have mapped attending the meeting to bring the waste of internal memory, suitably ω dynamically increased, the A that obtains, the β combination can reduce memory consumption;
Order
The V that is obtained by formula (11), (12), (13)
AVEThis index can be used for analyzing the mapped closeness of F (X) territory mid point, anywhere rule counts the situation of change that increases by the time efficiency of its observation bag coupling, and its value is more for a short time to mean that mapped some distribution is more even, and distribution performance is more good;
Make f (A, β)=φ RED
N-ψ C
V+V
AVE(14)
φ, ψ, regulate RED
N, G and the adaptive value of contribution, the value of φ, ψ, is between 0 and 1 and be 1; The index of weighing the population individuality be exactly f (A, β), its value is more little, and is individual just more excellent, seeks the optimum combination of A and β, search makes f (A, the A of value minimum β), β combination exactly;
By RED in the formula (9)
NDescription know that point in F (X) territory may have a plurality of X mappings, so just may have a plurality of rules to leave same point in, can design a pointer chained list a plurality of rules of connecting by conventional method, carry out smoothly to guarantee to wrap to mate;
When fire compartment wall or router are received packet, analyze the protocol header of packet, extract the IP address, go out the point of this packet mapping according to Extract (IP) and F (X) two function calculation, so there are a plurality of rules in point, carries out sequential search according to the pointer chained list.
2. the higher-dimension based on IPV6 according to claim 1 wraps matching process on a large scale, it is characterized in that: accomplish C
RValue be small probability event greater than 1, λ carries out following setting: establishing regular number is n, and it is S that redundant points is shone upon the regular number that falls, and the scale of mapped discrete region point is Y, ∵ C
R〉=1, ∴ RED
N〉=64 λ, ∴ S 〉=64M/ λ, ∴ will make [(Y-S)/Y]
nBe small probability event; Namely to make C
RValue be small probability event greater than 1, make when λ arranges [(Y-S)/Y]
nBe small probability event.
3. the higher-dimension based on IPV6 according to claim 1 and 2 wraps matching process on a large scale, it is characterized in that: detailed process is as follows: produce A by algorithm (1), the combination of β optimum, strictly all rules is mapped to the one-dimensional space of 0 to 1024 λ according to F (X) function, each point of the one-dimensional space can have S rule at most, to pointer chained list series connection: Algorithm (1) Input: maximum algebraically T, population number p of this S rule design
n, the threshold values Δ S of new and old individual difference, λ, φ, ψ,, η, ω, Output:A, β; Step 1: initialization P (0), t=0; The initial value that counter C is set is 0; Step 2: construct each individual adaptive value among the f function calculation P (t) according to formula (14), determine new optimum individual S ' gbest (t), calculate and the difference of original optimum individual Sgbest (t), and difference and threshold values Δ S, as less than threshold values Δ S, counter C increases by 1; Step 3: if t greater than the value of T or counter C greater than 3, then stop the algorithm operation, and the output optimal solution; Otherwise change step4; Step 4: produce two different individual Sr2, Sr3 according to algorithm of tournament selection; Step: P (t) makes a variation according to formula (6) and produces ν m (t+1), calculates CR according to formula (9); Step6: carry out interlace operation according to formula (8) and produce μ m (t+1); Step 7: select operation to produce Sm (t+1) according to formula (10); Step 8:t=t+1 changes step 2;
When arriving fire compartment wall or router, carries out a packet following algorithm (2): Algorithm (2) Input:A, β, the packet of arrival, Output: bag is handled accordingly; Step 1: the packet according to arriving, extract the IP address, according to Extract (IP) function etc., calculate the value of X-direction amount, A and the β combination of developing and according to algorithm (1) again is among the substitution F (X); Step 2: according to the reference point in F (X) mapped one-dimensional space, search for the corresponding rule of this point, as surpassing a rule, then search in chained list according to the algorithm of traditional sequential search; Step 3: if rule does not exist, handle according to corresponding default; Step 4: exist as rule, carry out respective handling with specified action in the rule.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310173713.3A CN103269342B (en) | 2013-05-10 | 2013-05-10 | The extensive bag matching process of a kind of higher-dimension based on IPV6 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310173713.3A CN103269342B (en) | 2013-05-10 | 2013-05-10 | The extensive bag matching process of a kind of higher-dimension based on IPV6 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103269342A true CN103269342A (en) | 2013-08-28 |
CN103269342B CN103269342B (en) | 2016-03-02 |
Family
ID=49012951
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310173713.3A Expired - Fee Related CN103269342B (en) | 2013-05-10 | 2013-05-10 | The extensive bag matching process of a kind of higher-dimension based on IPV6 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103269342B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106817376A (en) * | 2017-02-21 | 2017-06-09 | 南通大学 | A kind of bag matching process based on genetic algorithm |
CN112995362A (en) * | 2021-05-11 | 2021-06-18 | 长扬科技(北京)有限公司 | Method and device for matching data packet and protocol rule |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080072279A1 (en) * | 2005-03-22 | 2008-03-20 | Huawei Technologies Co., Ltd. | Method for mobile ipv6 packet traversing firewall and firewall |
CN101241506A (en) * | 2008-03-17 | 2008-08-13 | 张建中 | Many dimensions search method and device and system |
CN101309274A (en) * | 2008-06-27 | 2008-11-19 | 南京邮电大学 | Mixed structure invasion detection system rule base establishing method |
CN101345707A (en) * | 2008-08-06 | 2009-01-14 | 北京邮电大学 | Method and apparatus for implementing IPv6 packet classification |
-
2013
- 2013-05-10 CN CN201310173713.3A patent/CN103269342B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080072279A1 (en) * | 2005-03-22 | 2008-03-20 | Huawei Technologies Co., Ltd. | Method for mobile ipv6 packet traversing firewall and firewall |
CN101241506A (en) * | 2008-03-17 | 2008-08-13 | 张建中 | Many dimensions search method and device and system |
CN101309274A (en) * | 2008-06-27 | 2008-11-19 | 南京邮电大学 | Mixed structure invasion detection system rule base establishing method |
CN101345707A (en) * | 2008-08-06 | 2009-01-14 | 北京邮电大学 | Method and apparatus for implementing IPv6 packet classification |
Non-Patent Citations (3)
Title |
---|
王则林 等: "《基于差分演化算法的大规模包匹配研究》", 《计算机工程》, vol. 38, no. 23, 31 December 2012 (2012-12-31) * |
王则林 等: "《运用差分演化算法实现多维包匹配的研究》", 《计算机科学与探索》, 31 July 2012 (2012-07-31) * |
赵姣姣: "《高性能多维包分类算法的研究》", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 4, 15 April 2011 (2011-04-15) * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106817376A (en) * | 2017-02-21 | 2017-06-09 | 南通大学 | A kind of bag matching process based on genetic algorithm |
CN106817376B (en) * | 2017-02-21 | 2020-07-07 | 南通大学 | Genetic algorithm-based packet matching method |
CN112995362A (en) * | 2021-05-11 | 2021-06-18 | 长扬科技(北京)有限公司 | Method and device for matching data packet and protocol rule |
CN112995362B (en) * | 2021-05-11 | 2021-08-10 | 长扬科技(北京)有限公司 | Method and device for matching data packet and protocol rule |
Also Published As
Publication number | Publication date |
---|---|
CN103269342B (en) | 2016-03-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Liu et al. | Fedbcd: A communication-efficient collaborative learning framework for distributed features | |
Barbero et al. | Sheaf neural networks with connection laplacians | |
CN105976048A (en) | Power transmission network extension planning method based on improved artificial bee colony algorithm | |
Zhao et al. | MOCCA-II: A multi-objective co-operative co-evolutionary algorithm | |
Chakraborty et al. | Designing trust propagation algorithms based on simple multiplicative strategy for social networks | |
CN104268629A (en) | Complex network community detecting method based on prior information and network inherent information | |
CN113422695A (en) | Optimization method for improving robustness of topological structure of Internet of things | |
Berezovskaya et al. | Population models with singular equilibrium | |
CN103269342A (en) | High-dimensional large-scale packet matching method based on IPV6 | |
CN104199884A (en) | Social networking service viewpoint selection method based on R coverage rate priority | |
Su et al. | Comparing the performance of evolutionary algorithms for sparse multi-objective optimization via a comprehensive indicator [research frontier] | |
Cavallo et al. | GCNH: A simple method for representation learning on heterophilous graphs | |
CN109889525A (en) | Multi-communication protocol Intellisense method | |
Dioşan et al. | Evolving the structure of the particle swarm optimization algorithms | |
CN105550208A (en) | Similarity storage design method based on spectral hashing | |
Ono et al. | Island model genetic programming based on frequent trees | |
Mowshowitz et al. | Entropy, orbits, and spectra of graphs | |
Shoaib et al. | Data aggregation for Vehicular Ad-hoc Network using particle swarm optimization | |
Piraveenan et al. | On congruity of nodes and assortative information content in complex networks | |
Talluri et al. | Influence maximization in social networks: Considering both positive and negative relationships | |
CN110213279A (en) | Dynamic network based on secret protection is averagely known together algorithm | |
Zhang et al. | A decision tree scoring model based on genetic algorithm and k-means algorithm | |
Hassan | Classical and urgencies assignment methods in p-median problems with fuzzy genetic algorithm | |
Sharma et al. | Artificial bee colony with mean mutation operator for better exploitation | |
Guan et al. | Topological effects on the performance of island model of parallel genetic algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160302 Termination date: 20170510 |