CN106685848A - Message discarding method and device - Google Patents
Message discarding method and device Download PDFInfo
- Publication number
- CN106685848A CN106685848A CN201510762817.7A CN201510762817A CN106685848A CN 106685848 A CN106685848 A CN 106685848A CN 201510762817 A CN201510762817 A CN 201510762817A CN 106685848 A CN106685848 A CN 106685848A
- Authority
- CN
- China
- Prior art keywords
- message
- queue
- drop probability
- probability
- attribute
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/32—Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a message discarding method. The method comprises a step of extracting the attribute information and queue number of a message corresponding to a message descriptor from the message descriptor after receiving the message descriptor, and generating a pseudo random probability value at the same time, a step of obtaining a message attribute discarding probability of the message according to the attribute information, and generating a cache discarding probability of the message according to the queue number and the global cache space occupation when the message arrives, a step of generating a message discarding probability according to a first preset function based on the message attribute discarding probability and the cache discarding probability, and a step of determining the message as a discard message when the generated pseudo random probability value is at the interval divided according to the message discarding probability. The invention also discloses a message discarding device. The discarding strategy is optimized, while cache overflow is avoided, the arbitrary discarding of a message with an important attribute is avoided effectively, and the communication quality and the throughput of a network are improved.
Description
Technical field
The present invention relates to communication technical field, more particularly to a kind of packet loss method and device.
Background technology
Storage forwarding (Store and Forward) is that computer network field uses to obtain most commonly used technology
One of, the controller of Ethernet switch first gets up the data pack buffer that input port arrives, and first checks
Whether packet is correct, then according to destination address, the output port for wanting to send is found by look-up table
Address, then sends the packet.Router, exchanger chip are when process storage is forwarded
Wait, the problem for generally facing is to need the caching situation for being based on current memory space come dropping packets.
The packet loss technology of earliest period is exactly Drop-Tail (tail drop), that is, when caching is full
Start to be discarded into the message for reaching.But this strategy has several big defects, for example, can only when caching is filled with
By whole packet loss, it is impossible to embody the individual difference of different size message queue;Or, in caching
Start to abandon when being filled with, it is difficult to pinpoint the problems in advance, chip can be allowed to be chronically at the shape that caching almost exhausts
State, running efficiency of system is low etc..
RED (Random Early Detection, random early check) technology was occurred in that later, also
It is early detection discarding technology.The situation that it is used according to caching, sets with different threshold values to caching,
The threshold region of each alarm, takes message different drop probabilities, 0% corresponding tail drop, and 100%
Correspondence retains.This technology, is found that in advance caching, by full problem, starts in advance discarding behavior, compared with
Good avoiding makes chip longtime running in the state of caching almost exhausts, and improves to a certain extent and is
The problem of system inefficiency.On this basis, also occur in that based on message queue, based on message team
Row carry out the early detection discarding technology of dropping packets, set with different threshold values, at each for queue caching
The threshold region of alarm, takes message different drop probabilities, and queue difference is embodied to a certain extent
The management discarding method of property.But these technique for detection do not account for the diversity of message attribute, and
When caching is filled with, make message overflow discarding because storing without spatial cache, result in network service energy
Power is low.
The content of the invention
The present invention provides a kind of packet loss method and device, and its main purpose is optimization drop policy,
It is prevented effectively from important attribute message to be abandoned wantonly, improves network communication quality and handling capacity.
For achieving the above object, the present invention provides a kind of packet loss method, and the packet loss method includes:
After message descriptor is received, the message descriptor correspondence is extracted from the message descriptor
Message attribute information and queue number, wherein, meanwhile, generate pseudo-random probabilistic value;
The message attribute drop probability of the message is obtained according to the attribute information, according to the queue number
Global buffer space hold situation when reaching with message generates the caching drop probability of the message;
Based on the message attribute drop probability and the caching drop probability, give birth to according to the first preset function
Into packet drop probability;
When generate the pseudo-random probabilistic value be located at according to the packet drop probability delimit it is interval when,
Determine that the message is dropping packets.
Preferably, the step of the message attribute drop probability that the message is obtained according to the attribute information
Suddenly include:
It is general corresponding with the attribute information first to be obtained from the message attribute probability mapping table for prestoring
Rate value;
Using first probit as the message attribute drop probability.
Preferably, global buffer space hold situation when being reached according to the queue number and message generates institute
The process for stating the caching drop probability of message is comprised the following steps:
Queue drop probability, root are obtained according to the occupancy situation of the corresponding queue spatial cache of the queue number
Global drop probability is generated according to the global buffer space hold situation;
Based on the queue drop probability and the global drop probability, according to the second preset function institute is generated
State caching drop probability.
Preferably, queue drop is obtained according to the occupancy situation of the corresponding queue spatial cache of the queue number
The process of probability is comprised the following steps:
Obtain the corresponding queue of the queue number currently to take up room;
Exclusively enjoy space less than or equal to the queue when the corresponding queue of the queue number currently takes up room
When, the queue drop probability is zero;
It is when the corresponding queue of the queue number currently takes up room more than the space that exclusively enjoys of the queue and little
In or equal to the queue the communal space when, determine that the corresponding queue of the queue number currently takes up room
Corresponding first pre-set interval;
Corresponding second probit of first pre-set interval is obtained, by second probit for getting
As the queue drop probability.
Preferably, the process for generating global drop probability according to the global buffer space hold situation includes
Following steps:
Currently taking up room for whole queues is obtained, and determines that currently taking up room for whole queues is corresponding
Second pre-set interval;
Corresponding 3rd probit of second pre-set interval is obtained, by the 3rd probit for getting
As the global drop probability.
Preferably, it is described when the message is received, obtain the interval process of pseudo-random probabilistic include with
Lower step:
When the message is received, pseudorandom values are obtained according to pseudo-random sequence;
According to the digit of the pseudorandom values and the pseudo-random sequence for getting, the pseudorandom is generated
Probit.
It is preferably, described when the packet drop probability for generating is located at pseudo-random probabilistic interval,
After determining the step of message is dropping packets, the packet loss method also includes:
Add in the message descriptor by the packet labeling for dropping packets identification information.
Additionally, for achieving the above object, the present invention provides a kind of packet loss device, the packet loss dress
Put including:
Information extraction unit, for after message descriptor is received, extracting from the message descriptor
The attribute information and queue number of the corresponding message of the message descriptor, meanwhile, generate pseudo-random probabilistic value;
Attribute drop probability unit, the message attribute for obtaining the message according to the attribute information is lost
Abandon probability;
Caching drop probability unit, global buffer space during for being reached according to the queue number and message
Occupancy situation generates the caching drop probability of the message;
Packet drop probability unit, it is general for being abandoned based on the message attribute drop probability and the caching
Rate, according to the first preset function packet drop probability is generated, and when the pseudo-random probabilistic value for generating
Positioned at delimited according to the packet drop probability it is interval when, determine the message be dropping packets.
Preferably, the caching drop probability unit, is additionally operable to slow according to the corresponding queue of the queue number
The occupancy situation for depositing space obtains queue drop probability, is generated according to the global buffer space hold situation
Global drop probability;And based on the queue drop probability and the global drop probability, according to second
Preset function generates the caching drop probability.
Preferably, the packet loss device also includes:
Information adding device, for adding the packet labeling in the message descriptor to abandon report
The identification information of text.
Packet loss method and device proposed by the present invention, the service condition, message according to spatial cache
Attribute information generates a packet drop probability, and when the message is received, generates a pseudorandom general
Rate value, if packet drop probability is more than pseudo-random probabilistic value, by packet loss, this method both considered
The service condition of spatial cache has been arrived, it is also contemplated that the diversity of message attribute, so as to optimizing discarding
Strategy, while cache overflow is avoided, effectively prevent important attribute message and is abandoned wantonly, carry
High network communication quality and handling capacity.
Description of the drawings
Fig. 1 is the configuration diagram of message forwarding system in packet loss method preferred embodiment of the present invention;
Fig. 2 is that the flow process that packet drop probability is generated in packet loss method preferred embodiment of the present invention is illustrated
Figure;
Fig. 3 is the schematic diagram of pseudo-random probabilistic maker in packet loss method preferred embodiment of the present invention;
Fig. 4 is the high-level schematic functional block diagram of packet loss device preferred embodiment of the present invention;
Fig. 5 is the refinement function that drop probability unit is cached in packet loss device preferred embodiment of the present invention
Module diagram.
The realization of the object of the invention, functional characteristics and advantage will be done referring to the drawings further in conjunction with the embodiments
Explanation.
Specific embodiment
It should be appreciated that specific embodiment described herein is not used to limit only to explain the present invention
The fixed present invention.
The present invention provides a kind of packet loss method, is below the preferred embodiment of the packet loss method.
In the present embodiment, the packet loss method is comprised the following steps:
Step S10, after message descriptor is received, extracts the message and retouches from the message descriptor
The attribute information and queue number for according with corresponding message is stated, meanwhile, generate pseudo-random probabilistic value.
In the present embodiment, with reference to shown in Fig. 1, Ethernet switch input port is received after message,
Message content is parsed by packet parsing device, obtains the attribute informations such as type of message, input port
And the queue number of message, it is recorded in message descriptor, send to packet loss device, message
After packet loss device is reached, packet loss device gets message to descriptor from message descriptor
Attribute information and queue number, meanwhile, pseudo random sequence generator is provided with packet loss device, it is pseudo-
Random sequence generator can generate a random sequences, and then obtain a pseudorandom values, according to the puppet with
The digit of machine value and pseudo-random sequence is calculated pseudo-random probabilistic value.
Step S20, obtains the message attribute drop probability of the message, according to institute according to the attribute information
Global buffer space hold situation when stating queue number and message arrival generates the caching of the message and abandons generally
Rate.
In view of the diversity and the occupancy situation of spatial cache of message attribute in the present embodiment, give birth to respectively
Into message attribute drop probability and caching drop probability.
The step of obtaining the message attribute drop probability of the message according to the attribute information includes following thin
Change step:
Step S21, obtains corresponding with the attribute information from the message attribute probability mapping table for prestoring
The first probit;
Step S22, using first probit as the message attribute drop probability.
The message attribute probability mapping table of table 1
First address 0 (type of message 0) | First probit 0 |
First address 1 (type of message 1) | First probit 1 |
First address 2 (type of message 2) | First probit 2 |
First address 3 (type of message 3) | First probit 3 |
…… | …… |
First address N (type of message N) | First probit N |
In the present embodiment, illustrate by taking type of message as an example, with reference to shown in table 1, packet loss dress
Put and be previously stored with message attribute probability mapping table, different type of messages is previously provided with corresponding first
Probit, user is that important message arranges less probit, the i.e. significance level of message as needed
Higher, the probability that the message is dropped is lower, and message attribute can reflect the important journey of outgoing packet
Degree.
According to the message attribute information for getting, corresponding first address is found, obtain message attribute general
Corresponding first probit in first address in rate mapping table, using the first probit for getting as the report
The message attribute probability of text.
In other examples, it is also possible to according to multiple attribute co-maps of message be one " first
Probit ", for example, with type of message, input port, tri- message attributes of vlan id, merges mapping
Become one " the first probit ", for example with Hash mapping.
Global buffer space hold situation when being reached according to the queue number and the message generates the report
The caching drop probability of text, can there is numerous embodiments, and for example, it is right to be found according to queue number
The spatial cache occupancy situation of the queue answered, and comprehensive global buffer space hold situation, according to setting in advance
The corresponding probit of caching drop probability mapping table search put, as caching drop probability;Or, press
Caching drop probability is generated according to following steps:
Step S23, according to the occupancy situation of the corresponding queue spatial cache of the queue number queue drop is obtained
Probability, global drop probability is generated according to the global buffer space hold situation;
Wherein, queue drop is obtained according to the occupancy situation of the corresponding queue spatial cache of the queue number general
The process of rate can include following refinement step:
Step S231, obtains the corresponding queue of the queue number and currently takes up room.
Step S232, when the corresponding queue of the queue number currently takes up room less than or equal to the queue
When exclusively enjoying space, the queue drop probability is zero.
Each queue assignment is generally in spatial cache has exclusive space to pacify and the communal space, when exclusive space
After being occupied full, message can be stored in the communal space, currently accounted for when the corresponding queue of queue number is got
After with space, if it takes up room exclusively enjoy space less than queue, then illustrate for the message,
Spatial cache is more sufficient, and its queue drop probability is zero.
Step S233, when the corresponding queue of the queue number currently takes up room exclusively enjoying more than the queue
Space, and less than or equal to the queue the communal space when, determine the corresponding queue of the queue number work as
Before take up room corresponding first pre-set interval.
Step S234, obtains corresponding second probit of first pre-set interval, described in getting
Second probit is used as the queue drop probability.
If but the queue currently to take up room and exclusively enjoy space being total to less than or equal to queue more than queue
Space is enjoyed, now, its corresponding first pre-set interval that takes up room is judged, is team with reference to shown in table 2
The queue drop probability mapping table of row 1, is set in advance in packet loss device, different spatial intervals
Different probits are set, and each queue is provided with a queue drop probability mapping table, for queue
Drop device takes up room according to queue and searches corresponding queue drop probability, wherein, specific interval
Dividing condition, can be configured according to the size of spatial cache.
The queue drop probability mapping table of the queue 1 of table 2
First pre-set interval 0 | Second probit 0 |
First pre-set interval 1 | Second probit 1 |
First pre-set interval 2 | Second probit 2 |
First pre-set interval 3 | Second probit 3 |
…… | …… |
First pre-set interval N | Second probit N |
After getting the space that the corresponding queue of queue number takes, confirm that the corresponding queue of queue number takes
Space belonging to the first pre-set interval, and then obtain corresponding second probit of first pre-set interval,
As the queue drop probability of the message, wherein, queue currently takes up room bigger, corresponding team
Row drop probability value is bigger, and the probability that the message is dropped is bigger.
The process for generating global drop probability according to the global buffer space hold situation can include following
Refinement step:
Step S235, obtains currently taking up room for whole queues, and determines the current occupancy of whole queues
Corresponding second pre-set interval in space;
Step S236, obtains corresponding 3rd probit of second pre-set interval, described in getting
3rd probit is used as the global drop probability.
When global drop probability is generated according to the interval occupancy situation of global buffer, can adopt with it is above-mentioned
Queue drop probability similar mode is generated, global drop probability mapping is prestored in packet loss device
Table, arranges the second different pre-set intervals, and each second pre-set interval has corresponding 3rd probit,
It is determined that corresponding second pre-set interval that currently takes up room of whole queues, further obtains the corresponding 3rd
Probit, as global drop probability, with reference to shown in table 3, wherein, the sky that whole queues currently take
Between it is bigger, corresponding global drop probability value is bigger, and the probability that the message is dropped is bigger.
The global drop probability mapping table of table 3
Second pre-set interval 0 | 3rd probit 0 |
Second pre-set interval 1 | 3rd probit 1 |
Second pre-set interval 2 | 3rd probit 2 |
Second pre-set interval 3 | 3rd probit 3 |
…… | …… |
Second pre-set interval N | 3rd probit N |
Step S24, based on the queue drop probability and the global drop probability, according to the second default letter
Number generates the caching drop probability.
After getting queue drop probability and global drop probability, can generate according to the second preset function
Caching drop probability, the second preset function can take minima, average.
Step S30, it is pre- according to first based on the message attribute drop probability and the caching drop probability
If function generates packet drop probability.
After getting message attribute drop probability and caching drop probability, can be according to the first preset function
Packet drop probability is generated, the first preset function can take minima, average, be multiplied, example
It is such as that the meansigma methodss of message attribute drop probability and caching drop probability are general as the packet loss of the message
Rate, with reference to shown in Fig. 2, in being the present embodiment, generates the schematic flow sheet of packet drop probability.
Step S40, when the pseudo-random probabilistic value for generating is located at what is delimited according to the packet drop probability
When interval, determine that the message is dropping packets.
It should be noted that being provided with pseudo random sequence generator in packet loss device, report is being received
During literary descriptor, the pseudo random sequence generator can generate a random sequences, be obtained according to random sequences
Pseudorandom values, according to the digit of the pseudorandom values and pseudo-random sequence pseudo-random probabilistic value, example are calculated
Such as, if pseudo-random sequence be 8, by generate pseudorandom values divided by 2 eight power, i.e., 256, obtain
To a pseudo-random probabilistic value, the scope of the value is 0-100%, wherein, the generation of pseudo-random sequence is multinomial
The digit of formula and pseudo-random sequence can be arranged as required to, and be a kind of 8 byte with reference to shown in Fig. 3
Pseudo random sequence generator.
One interval delimited according to the packet drop probability for generating, the interval can be【0, packet loss is general
Rate】Or【Packet drop probability, 100%】, user arranges according to demand, adopts in the present embodiment【0,
Packet drop probability】This is interval, if the pseudo-random probabilistic value for generating is located in above-mentioned interval, it is determined that
The message is drop probability, if not being located at the interval, it is not dropping packets to confirm the message, is not lost
Abandon process.
The method that the present embodiment is proposed, it is interval based on above-mentioned packet drop probability and pseudo-random probabilistic, according to
The packet drop probability of generation judges whether message is dropping packets, judges that the packet drop probability for generating is
It is no interval positioned at above-mentioned pseudo-random probabilistic, if being located at, it is determined that the message is dropping packets.Conversely,
If it is interval that packet drop probability is not located at pseudo-random probabilistic, it is determined that the message is not abandoned, then be normally carried out
The storage of this article and forwarding, for each message for receiving, can all generate a corresponding pseudorandom general
Rate is interval, that is to say, that when judging whether message abandons, and the judgment standard of employing is different, tool
There is a kind of randomness, significantly reduce in higher drop probability interval, by the possibility of important packet loss
Property.
It is understood that in another embodiment, according to the corresponding queue spatial cache of the queue number
Occupancy situation obtain queue drop probability, according to the global buffer space hold situation generate the overall situation lose
Abandoning probability can also realize according to other modes, for example:When queue currently takes up room the only of the queue
When taking up space, queue drop probability is zero, when queue currently takes up room more than exclusive space, and is less than
Or equal to queue the communal space when, the communal space that corresponding queue currently takes is obtained according to queue number,
And calculate queue drop probability according to below equation:
Queue drop probability=(communal space of the communal space/queue that queue currently takes) * 100%
When generating global drop probability according to global buffer space hold situation, current whole team can be obtained
The gross space that row take, according to below equation global drop probability is calculated:
Global drop probability=(gross space/caching gross space that whole queues take) * 100%, wherein, delay
It is the whole spatial caches for stored messages to deposit gross space.
In other examples, it is also possible in other ways, according to the corresponding team of the queue number
The occupancy situation of row spatial cache obtains queue drop probability, according to the global buffer space hold situation
Global drop probability is generated, here will not enumerate.
Further, after the step s 40, the method is further comprising the steps of:
Step S50, the mark by the packet labeling for dropping packets is added in the message descriptor and is believed
Breath.
Packet loss device adds after it is determined that the message is dropping packets in the descriptor of the message
Identification information, is dropping packets by the packet labeling, and exports descriptor, with reference to shown in 1, follow-up dress
Put after descriptor is received, according to its identification information, the message is all deleted.
The packet loss method that the present embodiment is proposed, the attribute of service condition, message according to spatial cache
Information generates a packet drop probability, and when the message is received, generates a pseudo-random probabilistic area
Between, if packet drop probability is located in pseudo-random probabilistic interval, by packet loss, this method was both
The service condition of spatial cache is take into account, it is also contemplated that the diversity of message attribute, so as to optimizing
Drop policy, while cache overflow is avoided, effectively prevent important attribute message and is abandoned wantonly,
Improve network communication quality and handling capacity.
With reference to shown in Fig. 4, the present invention also proposes a kind of packet loss device, is below the packet loss dress
The preferred embodiment put.
In the present embodiment, the packet loss device is included with lower unit:
Information extraction unit 10, for after message descriptor is received, carrying from the message descriptor
The attribute information and queue number of the corresponding message of the message descriptor are taken, meanwhile, generate pseudo-random probabilistic
Value.
In the present embodiment, with reference to shown in Fig. 1, Ethernet switch input port is received after message,
Message content is parsed by packet parsing device, obtains the attribute informations such as type of message, input port
And the queue number of message, it is recorded in message descriptor, send to packet loss device, message
After packet loss device is reached, information extraction unit 10 gets report to descriptor from message descriptor
The attribute information and queue number of text, meanwhile, pseudo random sequence generator is provided with packet loss device,
Pseudo random sequence generator can generate a random sequences, and then obtain a pseudorandom values, according to the puppet
The digit of random value and pseudo-random sequence is calculated pseudo-random probabilistic value.
Attribute drop probability unit 20, for obtaining the message attribute of the message according to the attribute information
Drop probability.
In view of the diversity and the occupancy situation of spatial cache of message attribute in the present embodiment, give birth to respectively
Into message attribute drop probability and caching drop probability.
Attribute drop probability unit 20, for from the message attribute probability mapping table for prestoring obtain with
Corresponding first probit of the attribute information;And using first probit as the message attribute
Drop probability.
In the present embodiment, illustrate by taking type of message as an example, with reference to shown in table 1, packet loss dress
Put and be previously stored with message attribute probability mapping table, different type of messages is previously provided with corresponding first
Probit, user is that important message arranges less probit, the i.e. significance level of message as needed
Higher, the probability that the message is dropped is lower, and message attribute can reflect the important journey of outgoing packet
Degree.
Attribute drop probability unit 20 finds corresponding first ground according to the message attribute information for getting
Location, obtains corresponding first probit in first address in message attribute probability mapping table, by what is got
Message attribute probability of first probit as the message.
In other examples, it is also possible to according to multiple attribute co-maps of message be one " first
Probit ", for example, with type of message, input port, tri- message attributes of vlan id, merges mapping
Become one " the first probit ", for example with Hash mapping.
Caching drop probability unit 30, global buffer during for being reached according to the queue number and message is empty
Between occupancy situation generate the caching drop probability of the message.
Global buffer space when caching drop probability unit 30 is reached according to the queue number and the message
Occupancy situation generates the caching drop probability of the message, can there is numerous embodiments, for example, caching
Drop probability unit 30 can find the spatial cache occupancy situation of corresponding queue according to queue number, and
Comprehensive global buffer space hold situation, according to the caching drop probability mapping table search correspondence for pre-setting
Probit, as caching drop probability;Or, caching drop probability unit 30 is additionally operable to according to institute
State the corresponding queue spatial cache of queue number occupancy situation obtain queue drop probability, according to the overall situation
Spatial cache occupancy situation generates global drop probability.
Further, with reference to shown in Fig. 5, caching drop probability unit 30 includes:
Queue drop probability subelement 31, for accounting for according to the corresponding queue spatial cache of the queue number
Queue drop probability is obtained with situation.
Global drop probability subelement 32, it is global for being generated according to the global buffer space hold situation
Drop probability.
Specifically, queue drop probability subelement 31, it is current for obtaining the corresponding queue of the queue number
Take up room, and when the corresponding queue of the queue number currently takes up room less than or equal to the queue
When exclusively enjoying space, the queue drop probability is zero;When the corresponding queue of the queue number currently takes
Space exclusively enjoys space more than the queue, and less than or equal to the queue the communal space when, it is determined that
The corresponding queue of the queue number currently takes up room corresponding first pre-set interval;Obtain described first pre-
If interval corresponding second probit, general as the queue drop using second probit for getting
Rate.
Each queue assignment is generally in spatial cache has exclusive space to pacify and the communal space, when exclusive space
After being occupied full, message can be stored in the communal space, currently accounted for when the corresponding queue of queue number is got
After with space, if it takes up room exclusively enjoy space less than queue, then illustrate for the message,
Spatial cache is more sufficient, and its queue drop probability is zero.
If but the queue currently to take up room and exclusively enjoy space being total to less than or equal to queue more than queue
Space is enjoyed, now, queue drop probability subelement 31 judges its corresponding first pre-set interval that takes up room,
It is the queue drop probability mapping table of queue 1 with reference to shown in table 2, is set in advance in packet loss device
Interior, different spatial intervals arrange different probits, and it is general that each queue is provided with a queue drop
Rate mapping table, so that queue drop device takes up room according to queue corresponding queue drop probability is searched,
Wherein, specific interval dividing condition, can be configured according to the size of spatial cache.
Queue drop probability subelement 31 is got after the space that the corresponding queue of queue number takes, and is confirmed
The first pre-set interval belonging to space that the corresponding queue of queue number takes, and then obtain first preset areas
Between corresponding second probit, as the queue drop probability of the message, wherein, queue is currently accounted for
Bigger with space, corresponding queue drop probit is bigger, and the probability that the message is dropped is bigger.
Specifically, global drop probability subelement 32, for obtaining currently taking up room for whole queues,
And determine corresponding second pre-set interval that currently takes up room of whole queues;And obtain described second pre-
It is if interval corresponding 3rd probit, the 3rd probit for getting is general as the global discarding
Rate.
Global drop probability subelement 32 is generating global discarding generally according to the interval occupancy situation of global buffer
During rate, can adopt and above-mentioned generation queue drop probability similar mode, it is pre- in packet loss device
There is global drop probability mapping table, the second different pre-set intervals, each second pre-set interval are set
There is corresponding 3rd probit, it is determined that corresponding second pre-set interval that currently takes up room of whole queues,
Corresponding 3rd probit is further obtained, as global drop probability, with reference to shown in table 3, wherein,
The space that whole queues currently take is bigger, and corresponding global drop probability value is bigger, and the message is lost
The probability abandoned is bigger.
Caching drop probability unit 30, based on the queue drop that queue drop probability subelement 31 is obtained
The described global drop probability that probability and global drop probability subelement 32 are generated, according to the second preset function
Generate the caching drop probability.
After getting queue drop probability and global drop probability, caching drop probability unit 30 can be by
Caching drop probability is generated according to the second preset function, the second preset function can take minima, be averaging
Value etc..
Packet drop probability unit 40, for being abandoned based on the message attribute drop probability and the caching
Probability, according to the first preset function packet drop probability is generated, and when the pseudo-random probabilistic for generating
Value be located at according to the packet drop probability delimit it is interval when, determine the message be dropping packets.
Packet drop probability unit 40 is got after message attribute drop probability and caching drop probability, can
To generate packet drop probability according to the first preset function, the first preset function can take minima, ask
Meansigma methodss, multiplication etc., such as using the meansigma methodss of message attribute drop probability and caching drop probability as this
The packet drop probability of message.
It should be noted that being provided with pseudo random sequence generator in packet loss device, report is being received
During literary descriptor, the pseudo random sequence generator can generate a random sequences, be obtained according to random sequences
Pseudorandom values, according to the digit of the pseudorandom values and pseudo-random sequence pseudo-random probabilistic value, example are calculated
Such as, if pseudo-random sequence be 8, by generate pseudorandom values divided by 2 eight power, i.e., 256, obtain
To a pseudo-random probabilistic value, the scope of the value is 0-100%, wherein, the generation of pseudo-random sequence is multinomial
The digit of formula and pseudo-random sequence can be arranged as required to, and be a kind of 8 byte with reference to shown in Fig. 3
Pseudo random sequence generator.
One interval delimited according to the packet drop probability for generating, the interval can be【0, packet loss is general
Rate】Or【Packet drop probability, 100%】, user arranges according to demand, adopts in the present embodiment【0,
Packet drop probability】This is interval, if the pseudo-random probabilistic value for generating is located in above-mentioned interval, it is determined that
The message is drop probability, if not being located at the interval, it is not dropping packets to confirm the message, is not lost
Abandon process.
Interval based on above-mentioned packet drop probability and pseudo-random probabilistic, packet drop probability unit 40 is according to life
Into packet drop probability judge whether message is dropping packets, whether judge the packet drop probability for generating
It is interval positioned at above-mentioned pseudo-random probabilistic, if being located at, it is determined that the message is dropping packets.Conversely,
If it is interval that packet drop probability is not located at pseudo-random probabilistic, it is determined that the message is not abandoned, then be normally carried out
The storage of this article and forwarding, for each message for receiving, can all generate a corresponding pseudorandom general
Rate is interval, that is to say, that when judging whether message abandons, and the judgment standard of employing is different, tool
There is a kind of randomness, significantly reduce in higher drop probability interval, by the possibility of important packet loss
Property.
It is understood that in another embodiment, according to the corresponding queue spatial cache of the queue number
Occupancy situation obtain queue drop probability, according to the global buffer space hold situation generate the overall situation lose
Abandoning probability can also realize according to other modes, for example:When queue currently takes up room the only of the queue
When taking up space, queue drop probability is zero, when queue currently takes up room more than exclusive space, and is less than
Or equal to queue the communal space when, queue drop probability subelement 31 obtains corresponding team according to queue number
The communal space taken before Herba Orobanchess, and calculate queue drop probability according to below equation:
Queue drop probability=(communal space of the communal space/queue that queue currently takes) * 100%
When generating global drop probability according to global buffer space hold situation, global drop probability subelement
32 can obtain the gross space that the queue of current whole takes, and according to below equation global drop probability is calculated:
Global drop probability=(gross space/caching gross space that whole queues take) * 100%, wherein, delay
It is the whole spatial caches for stored messages to deposit gross space.
In other examples, it is also possible in other ways, according to the corresponding team of the queue number
The occupancy situation of row spatial cache obtains queue drop probability, according to the global buffer space hold situation
Global drop probability is generated, here will not enumerate.
Further, the device is also included with lower unit:
Information adding device 50, it is dropping packets to add the packet labeling in the message descriptor
Identification information.
After it is determined that the message is dropping packets, information adding device 50 is in the message for packet loss device
Descriptor in add identification information, be dropping packets by the packet labeling, and descriptor is exported, with reference to 1
Shown, follow up device, according to its identification information, the message is all deleted after descriptor is received.
The packet loss device that the present embodiment is proposed, the attribute of service condition, message according to spatial cache
Information generates a packet drop probability, and when the message is received, generates a pseudo-random probabilistic area
Between, if packet drop probability is located in pseudo-random probabilistic interval, by packet loss, this method was both
The service condition of spatial cache is take into account, it is also contemplated that the diversity of message attribute, so as to optimizing
Drop policy, while cache overflow is avoided, effectively prevent important attribute message and is abandoned wantonly,
Improve network communication quality and handling capacity.
It should be noted that in above-described embodiment, with regard to the first preset function and the second preset function, the
One probit, the second probit and the 3rd probit, and the first pre-set interval and the second pre-set interval,
" first ", " second ", " the 3rd " etc. are intended merely to the above-mentioned different parameters of convenient differentiation, not with preferential
Difference in level.
The preferred embodiments of the present invention are these are only, the scope of the claims of the present invention is not thereby limited, it is every
The equivalent structure made using description of the invention and accompanying drawing content or equivalent flow conversion, or directly or
Connect and be used in other related technical fields, be included within the scope of the present invention.
Claims (10)
1. a kind of packet loss method, it is characterised in that the packet loss method includes:
After message descriptor is received, the message descriptor correspondence is extracted from the message descriptor
Message attribute information and queue number, meanwhile, generate pseudo-random probabilistic value;
The message attribute drop probability of the message is obtained according to the attribute information, according to the queue number
Global buffer space hold situation when reaching with message generates the caching drop probability of the message;
Based on the message attribute drop probability and the caching drop probability, give birth to according to the first preset function
Into packet drop probability;
When generate the pseudo-random probabilistic value be located at according to the packet drop probability delimit it is interval when,
Determine that the message is dropping packets.
2. packet loss method according to claim 1, it is characterised in that described according to the category
The step of message attribute drop probability of property message described in acquisition of information, includes:
It is general corresponding with the attribute information first to be obtained from the message attribute probability mapping table for prestoring
Rate value;
Using first probit as the message attribute drop probability.
3. packet loss method according to claim 1, it is characterised in that according to the queue number
Global buffer space hold situation when reaching with message generates the process of the caching drop probability of the message
Comprise the following steps:
Queue drop probability, root are obtained according to the occupancy situation of the corresponding queue spatial cache of the queue number
Global drop probability is generated according to the global buffer space hold situation;
Based on the queue drop probability and the global drop probability, according to the second preset function institute is generated
State caching drop probability.
4. packet loss method according to claim 3, it is characterised in that according to the queue number
The occupancy situation of corresponding queue spatial cache obtains the process of queue drop probability and comprises the following steps:
Obtain the corresponding queue of the queue number currently to take up room;
Exclusively enjoy space less than or equal to the queue when the corresponding queue of the queue number currently takes up room
When, the queue drop probability is zero;
It is when the corresponding queue of the queue number currently takes up room more than the space that exclusively enjoys of the queue and little
In or equal to the queue the communal space when, determine that the corresponding queue of the queue number currently takes up room
Corresponding first pre-set interval;
Corresponding second probit of first pre-set interval is obtained, by second probit for getting
As the queue drop probability.
5. packet loss method according to claim 3, it is characterised in that according to described global slow
The process for depositing the global drop probability of space hold situation generation is comprised the following steps:
Currently taking up room for whole queues is obtained, and determines that currently taking up room for whole queues is corresponding
Second pre-set interval;
Corresponding 3rd probit of second pre-set interval is obtained, by the 3rd probit for getting
As the global drop probability.
6. packet loss method according to claim 1, it is characterised in that described receiving
When stating message, obtain the interval process of pseudo-random probabilistic and comprise the following steps:
When the message is received, pseudorandom values are obtained according to pseudo-random sequence;
According to the digit of the pseudorandom values and the pseudo-random sequence for getting, the pseudorandom is generated
Probit.
7. packet loss method according to claim 1, it is characterised in that described when the institute for generating
State packet drop probability positioned at the pseudo-random probabilistic it is interval when, determine the step that the message is dropping packets
After rapid, the packet loss method also includes:
Add in the message descriptor by the packet labeling for dropping packets identification information.
8. a kind of packet loss device, it is characterised in that the packet loss device includes:
Information extraction unit, for after message descriptor is received, extracting from the message descriptor
The attribute information and queue number of the corresponding message of the message descriptor, meanwhile, generate pseudo-random probabilistic value;
Attribute drop probability unit, the message attribute for obtaining the message according to the attribute information is lost
Abandon probability;
Caching drop probability unit, global buffer space during for being reached according to the queue number and message
Occupancy situation generates the caching drop probability of the message;
Packet drop probability unit, it is general for being abandoned based on the message attribute drop probability and the caching
Rate, according to the first preset function packet drop probability is generated, and when the pseudo-random probabilistic value for generating
Positioned at delimited according to the packet drop probability it is interval when, determine the message be dropping packets.
9. packet loss device according to claim 8, it is characterised in that
The caching drop probability unit, is additionally operable to according to the corresponding queue spatial cache of the queue number
Occupancy situation obtains queue drop probability, generates global discarding according to the global buffer space hold situation
Probability;And based on the queue drop probability and the global drop probability, according to the second preset function
Generate the caching drop probability.
10. packet loss device according to claim 8, it is characterised in that the packet loss
Device also includes:
Information adding device, for adding the packet labeling in the message descriptor to abandon report
The identification information of text.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510762817.7A CN106685848A (en) | 2015-11-10 | 2015-11-10 | Message discarding method and device |
PCT/CN2016/097004 WO2017080284A1 (en) | 2015-11-10 | 2016-08-26 | Packet discard method and device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510762817.7A CN106685848A (en) | 2015-11-10 | 2015-11-10 | Message discarding method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106685848A true CN106685848A (en) | 2017-05-17 |
Family
ID=58694438
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510762817.7A Pending CN106685848A (en) | 2015-11-10 | 2015-11-10 | Message discarding method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106685848A (en) |
WO (1) | WO2017080284A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020119202A1 (en) * | 2018-12-12 | 2020-06-18 | 深圳市中兴微电子技术有限公司 | Congestion control method and apparatus, network device, and storage medium |
CN112148479A (en) * | 2020-09-04 | 2020-12-29 | 杭州安恒信息技术股份有限公司 | Data processing method and device based on Siddhi log audit and computer equipment |
CN117424864A (en) * | 2023-12-18 | 2024-01-19 | 南京奕泰微电子技术有限公司 | Queue data management system and method for switch |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113542152A (en) * | 2020-04-17 | 2021-10-22 | 华为技术有限公司 | Method for processing message in network equipment and related equipment |
CN115022250A (en) * | 2022-05-26 | 2022-09-06 | 苏州雄立科技有限公司 | Cache management method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1964310A (en) * | 2005-11-09 | 2007-05-16 | 中兴通讯股份有限公司 | Packet discarding system and method of IP network |
CN101958833A (en) * | 2010-09-20 | 2011-01-26 | 云南省科学技术情报研究院 | RED-based network congestion control algorithm |
US20110242979A1 (en) * | 2010-03-31 | 2011-10-06 | Blue Coat Systems Inc. | Enhanced Random Early Discard for Networked Devices |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7602720B2 (en) * | 2004-10-22 | 2009-10-13 | Cisco Technology, Inc. | Active queue management methods and devices |
US20070070907A1 (en) * | 2005-09-29 | 2007-03-29 | Alok Kumar | Method and apparatus to implement a very efficient random early detection algorithm in the forwarding path |
CN104580008B (en) * | 2015-01-07 | 2019-02-22 | 盛科网络(苏州)有限公司 | The method and device of more queue random drop message precision is improved based on hardware |
-
2015
- 2015-11-10 CN CN201510762817.7A patent/CN106685848A/en active Pending
-
2016
- 2016-08-26 WO PCT/CN2016/097004 patent/WO2017080284A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1964310A (en) * | 2005-11-09 | 2007-05-16 | 中兴通讯股份有限公司 | Packet discarding system and method of IP network |
US20110242979A1 (en) * | 2010-03-31 | 2011-10-06 | Blue Coat Systems Inc. | Enhanced Random Early Discard for Networked Devices |
CN101958833A (en) * | 2010-09-20 | 2011-01-26 | 云南省科学技术情报研究院 | RED-based network congestion control algorithm |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020119202A1 (en) * | 2018-12-12 | 2020-06-18 | 深圳市中兴微电子技术有限公司 | Congestion control method and apparatus, network device, and storage medium |
CN111314240A (en) * | 2018-12-12 | 2020-06-19 | 深圳市中兴微电子技术有限公司 | Congestion control method and device, network equipment and storage medium |
CN112148479A (en) * | 2020-09-04 | 2020-12-29 | 杭州安恒信息技术股份有限公司 | Data processing method and device based on Siddhi log audit and computer equipment |
CN112148479B (en) * | 2020-09-04 | 2024-03-19 | 杭州安恒信息技术股份有限公司 | Data processing method, device and computer equipment based on Siddi log audit |
CN117424864A (en) * | 2023-12-18 | 2024-01-19 | 南京奕泰微电子技术有限公司 | Queue data management system and method for switch |
CN117424864B (en) * | 2023-12-18 | 2024-02-27 | 南京奕泰微电子技术有限公司 | Queue data management system and method for switch |
Also Published As
Publication number | Publication date |
---|---|
WO2017080284A1 (en) | 2017-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106685848A (en) | Message discarding method and device | |
CN103118013B (en) | The method of packet incidentally reverse interest bag in content center network | |
CN103052130B (en) | A kind of wireless multimedia sensor network data fusion method based on rough set | |
CN110149274A (en) | Based on location information and the comprehensive method for routing of the name data network of content push | |
CN107566275B (en) | Multi-path transmission method based on the delay inequality opposite sex in data center network | |
CN109788319B (en) | Data caching method | |
CN103260264A (en) | Wireless sensor network data fusion method based on double-fusion node ant colony optimization | |
CN101389084A (en) | Terminal and method for recognizing and processing duplicate short message | |
CN109688070A (en) | A kind of data dispatching method, the network equipment and retransmission unit | |
CN107749826B (en) | Data packet forwarding method and system | |
CN108289062A (en) | A kind of information centre's network structure based on software definition | |
CN102006238B (en) | Balanced quick searching method in structureless P2P (Peer-to-Peer) network | |
CN109951390B (en) | Network device based on PopBetw strategy and cooperative route caching method thereof | |
CN101371531B (en) | Improved route determining methods for a network | |
CN101388848A (en) | Flow recognition method combining network processor with general processor | |
CN106941695B (en) | It is a kind of in opportunistic network to be based on the matched data distributing method of interest | |
CN105871747A (en) | Communication system downlink data transmission method and system | |
CN108076144B (en) | Fair caching algorithm and device for content-centric network | |
CN108632148B (en) | Device and method for learning MAC address based on pre-reading mode | |
CN101795310A (en) | Mobile phone and method for processing multimedia message notification message | |
US20180102974A1 (en) | Flow entry delivering method, flow entry storage method, related apparatus, and related system | |
Yu et al. | Distributed packet-aware routing scheme based on dynamic network coding | |
CN108834165A (en) | A kind of wireless sensor network adaptive transmission method and device | |
CN110099410B (en) | DTN distributed caching method and device for temporary empty vehicle ground network | |
Das et al. | A congestion aware routing for lifetime improving in grid-based sensor networks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170517 |