CN108206787A - A kind of congestion-preventing approach and device - Google Patents

A kind of congestion-preventing approach and device Download PDF

Info

Publication number
CN108206787A
CN108206787A CN201611171554.3A CN201611171554A CN108206787A CN 108206787 A CN108206787 A CN 108206787A CN 201611171554 A CN201611171554 A CN 201611171554A CN 108206787 A CN108206787 A CN 108206787A
Authority
CN
China
Prior art keywords
time
data packet
label
value
type
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
Application number
CN201611171554.3A
Other languages
Chinese (zh)
Inventor
王晓明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Huawei Digital Technologies Co Ltd
Original Assignee
Beijing Huawei Digital Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Huawei Digital Technologies Co Ltd filed Critical Beijing Huawei Digital Technologies Co Ltd
Priority to CN201611171554.3A priority Critical patent/CN108206787A/en
Publication of CN108206787A publication Critical patent/CN108206787A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/23Bit dropping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames

Abstract

The invention discloses a kind of congestion-preventing approach and devices, belong to field of communication technology.The method includes:Data packet to receive sets the time to mark;The data packet is stored in buffer queue;It is whether overtime according to data packet described in the time marker for judgment of the data packet;When the data packet time-out, the data packet is abandoned from the buffer queue.The present invention passes through when receiving data packet, the time is set to mark for it, then the data packet marked there is provided the time is stored in buffer queue, when going out time time-out of the data packet in buffer queue according to time marker for judgment, data packet is abandoned from buffer queue, do so avoid the data packet in buffer queue can not go out team always due to system performance reasons caused by time delay it is excessive, while reduce data packet to system performance occupy.

Description

A kind of congestion-preventing approach and device
Technical field
The present invention relates to field of communication technology, more particularly to a kind of congestion-preventing approach and device.
Background technology
With popularizing for network, information interchange becomes an essential part in people's daily life with information sharing. And in network information (data packet) continuous growth, necessarily cause network congestion.Then, Congestion Avoidance is particularly important, mesh Before use more extensive congestion avoidance mechanism include tail drop (English:Tail-Drop), random detection (English in advance: Random Early Detection, referred to as:RED), Weighted random detects (English in advance:Weighted Random Early Detection, referred to as:WRED) etc..
Wherein, tail drop, RED and WRED are when the length of queue reaches given threshold, will wait for the data joined the team Packet all abandons, part abandons or according to priority by the data packet discarding of low priority.
In above-mentioned congestion avoidance schemes, for coming into the data packet of queue, may due to system performance reasons and Team can not be gone out always, these be buffered in data packet in queue may time delay it is excessive, the requirement of time delay is not achieved, in addition, number It is buffered in the performance that queue also occupies system for a long time according to packet.
Invention content
In order to solve the data packet being buffered in the prior art in queue may time delay it is excessive, occupy the performance of system The problem of, an embodiment of the present invention provides a kind of congestion-preventing approach and devices.The technical solution is as follows:
In a first aspect, an embodiment of the present invention provides a kind of congestion-preventing approach, the method includes:For the number received It is marked according to the packet setting time, the time marks to judge whether the time of the data packet in the buffer is overtime;By described in In data packet deposit buffer queue;It is whether overtime according to data packet described in the time marker for judgment of the data packet;When the number During according to packet time-out, the data packet is abandoned from the buffer queue.
The present invention for it by when receiving data packet, setting the time to mark, the number that then will be marked there is provided the time It is stored in buffer queue according to packet, when going out time time-out of the data packet in buffer queue according to time marker for judgment, by data Packet is abandoned from buffer queue, does so and the data packet in buffer queue is avoided to be made since system performance reasons can not go out team always Into time delay it is excessive, while reduce data packet to system performance occupy.
With reference to first aspect, in the first realization method of first aspect, it is described for receive data packet setting when Between mark, including:Judge the type of the data packet;It is the data packet when the type of the data packet is setting type The time is set to mark.In the realization method, before the setting time marks, the type of data packet is first judged, only in data packet During for setting type, just the time is set to mark for it, it is achieved thereby that the service differentiation processing different to delay requirement.
The first realization method with reference to first aspect, in second of realization method of first aspect, the judgement institute The type of data packet is stated, including:Field in the packet header judges the type of the data packet;Alternatively, according to The size of the data packet judges the type of the data packet.In the realization method, by the field of packet header or The size of data packet judges the type of the data packet, and judgment mode is simple, and judging result is accurate.
Wherein, the type of data packet can be type of service or length type (data packet length).Wherein, industry Service type can be VoP, IPTV data packets etc..Length type can be less than 1500 bytes, 1500-9600 bytes Deng.Field in packet header may determine that the type of service of data packet, may determine that according to the size of data packet Go out the length type of data packet.
The first realization method with reference to first aspect, in the third realization method of first aspect, described is described The data packet setting time marks, including:Store the mark of the data packet and its label of corresponding time.
For example, the storage organizations such as chained list, which may be used, stores the mark of the data packet and its label of corresponding time.
Wherein, the mark of data packet can be the number of the data packet.
Any one of with reference to first aspect or the first realization method of first aspect is to the third realization method, In 4th kind of realization method of one side, the initial value of the time label is 0, and time label gradually increases at any time Greatly;Alternatively, the initial value of the time label is time threshold, and time label is gradually reduced at any time;It is alternatively, described Time value when time marks labeled as the setting time.
In the realization method, time label includes three kinds of realization methods, for the time label at any time gradually increase or The mode being gradually reduced judges whether relatively simple during time-out;By the way of being marked using current time value as the time, when Between label setting it is relatively simple.
The 4th kind of realization method with reference to first aspect, it is described according to institute in the 5th kind of realization method of first aspect Whether overtime state data packet described in the time marker for judgment of data packet, including:Judge whether the value of the time label reaches institute Time threshold is stated, when the value of time label reaches the time threshold, judges the data packet time-out;Alternatively, judge Whether the value of the time label is reduced to 0, when the value of time label is reduced to 0, judges the data packet time-out;Or Person judges that current time value sets whether the difference of the time value during time label is more than or waits in being marked with the time In the time threshold, when the difference is greater than or equal to the time threshold, the data packet time-out is judged.
In the realization method, the judgement timeout approach corresponding to the realization method of three kinds of time labels is provided.
Further, for different types of data packet, time threshold setting can be different, so as to fulfill operator to not With the flexible configuration of business, network bandwidth utilization factor is improved, unnecessary caching is reduced and occupies.
Any one of with reference to first aspect or the first realization method of first aspect is to the third realization method, In 6th kind of realization method of one side, the method further includes:Delete one after the data packet or continuous at least two Data packet, one after the data packet or continuous at least two data packet it is identical with the type of the data packet.For example, data Packet 1,2 and 3 is continuous three data packets in queue, and before data packet 1 is in most, the type of these three data packets is identical, at this point, If it is judged that 1 time-out of data packet, then abandon data packet 1,2 and 3 together.This reduces the time-out to data packet 2 and 3 Judge, reduce treating capacity.
Second aspect, an embodiment of the present invention provides a kind of Congestion Avoidance device, described device includes being used to implement above-mentioned The unit of method described in first aspect, such as setting unit, buffer unit, judging unit and processing unit.
The third aspect, an embodiment of the present invention provides a kind of Congestion Avoidance device, the Congestion Avoidance device includes processing Device, memory and communication interface;The processor, memory and communication interface are coupled by bus;The memory is used In storage program instruction, the processor is by performing the program instruction Congestion Avoidance being stored in the memory Device is able to carry out the method described in first aspect.
Fourth aspect, the embodiment of the present invention additionally provide a kind of computer-readable medium, are filled for storing for Congestion Avoidance The program code of execution is put, said program code includes performing the instruction of the method described in first aspect.
5th aspect, the embodiment of the present invention additionally provide a kind of communication chip, apply in communication system equipment, described logical Letter chip includes:Processor, memory and communication interface;The processor, memory and communication interface pass through bus coupling It closes, the memory is for storing program instruction, and the processor is by performing the program instruction being stored in the memory So that the communication system equipment for being mounted with the communication chip is able to carry out such as the possible reality of any one in above-mentioned first aspect The method that the mode of applying provides.
Description of the drawings
Fig. 1 is data packet storage schematic diagram provided in an embodiment of the present invention;
Fig. 2 is a kind of hardware architecture diagram of Congestion Avoidance device provided in an embodiment of the present invention;
Fig. 3 is a kind of congestion-preventing approach flow chart provided in an embodiment of the present invention;
Fig. 4 is another congestion-preventing approach flow chart provided in an embodiment of the present invention;
Fig. 4 A are processing data packets procedure charts provided in an embodiment of the present invention;
Fig. 5 is a kind of structure diagram of communication device provided in an embodiment of the present invention;
Fig. 6 is a kind of structure diagram of communication chip provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
For the ease of the description of embodiment, first the scene of Congestion Avoidance is briefly described below:
Fig. 1 is data pack buffer schematic diagram provided in an embodiment of the present invention, as shown in Figure 1, router or computer Read module from buffer queue for taking data packet, and data packet is using first in first out (English:First Input First Output, referred to as:FIFO form) is stored in buffer queue, and data packet 1 is first joined the team, and can first go out team.Data packet is into joining the team The process and read module of row take the speed of data packet usual and unequal from buffer queue.Such as it is in non-congested In system, seldom have an opportunity data packet to be retained in buffer queue, each data packet is read module timely processing, only When read module performance is insufficient or breaks down, into the data packet of buffer queue, it just cannot can slowly go out group chance, when When data packet read module restores normal, the data packet of caching is likely to for network that time delay is excessive, it is not necessary that Performance is expended again to handle, and is helpful for system performance so actively abandoning the excessive data packet of time delay.The present invention is exactly It is realized based on the thinking for abandoning the excessive data packet of time delay in queue, referring specifically to hereinafter.
The congestion avoidance schemes that the embodiment of the present invention proposes can be both applied in fixed network technology, can also be applied In Linux message communicatings and computer task processing.It can specifically apply in the equipment such as router, computer.
With reference to specific hardware configuration to realizing that Congestion Avoidance device provided in an embodiment of the present invention illustrates.
Fig. 2 shows a kind of realization hardware configuration of Congestion Avoidance device 120 provided in an embodiment of the present invention, which keeps away It can be router, computer etc. to exempt from device 120.As shown in Fig. 2, the Congestion Avoidance device 120 includes:Processor 21, communication Interface 22, memory 23.
Processor 21 includes one or more than one processing core, and processor 21 passes through runs software program and mould Block, so as to perform various functions application and information processing.
Communication interface 22, memory 23 and processor 21 are coupled by bus.Memory 23 can be used for storage software journey Sequence and module.Memory can storage program area 24, the application program module 25 described at least one function.
Application program module 25 includes at least:For setting setup module 250 that the time marks, for being stored in data packet Cache module 251, for judging whether the judgment module 252 of time-out and processing module 253 for deleting data packet.Mould is set The data packet that block 250 is used for receive sets the time to mark, and the time marks to judge the data packet in the buffer Time it is whether overtime;Cache module 251, for the data packet to be stored in buffer queue;Judgment module 252, for root It is whether overtime according to data packet described in the time marker for judgment of the data packet;Processing module 253, for working as the data packet time-out When, the data packet is abandoned from the buffer queue.
Optionally, processor 21 is for the modules in executing application module 25, realize as in Fig. 3 and Fig. 4 by The step of being performed required for Congestion Avoidance device.
It, can be by any kind of volatibility or non-volatile in addition, memory 23 is a kind of computer readable storage medium Property storage device or combination thereof realize that such as static access memory (SRAM) at any time, electrically erasable is read-only to be deposited Reservoir (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or CD.
It will be understood by those skilled in the art that the structure of the Congestion Avoidance device 120 shown in Fig. 2 is not formed to gathering around The restriction of avoiding device is filled in, can be included than illustrating more or fewer components or combining certain components or different components Arrangement.
Referring to Fig. 3, it illustrates a kind of congestion-preventing approach provided in an embodiment of the present invention, by Fig. 2 shows congestion keep away Exempt from device 120 to perform, this method includes:
S101:Data packet to receive sets the time to mark, and the time marks to judge the data packet slow Whether the time in depositing is overtime.
In embodiments of the present invention, the time marks to judge whether data packet residence time in buffer queue surpasses When.Time label can be specifically the quiet hour, such as the time that the setting time marks;Can also be dynamic time, such as from 0 Start gradually increase or be gradually reduced since sometime value.
In embodiments of the present invention, time label may be used the storage organizations such as chained list and be stored.
S102:The data packet is stored in buffer queue.
After the setting time marks, data packet is put into buffer queue.When the time, label was dynamic time, with number Increase according to the time that packet stores in buffer queue, the numerical value that can be marked to the above-mentioned time is modified.
S103:It is whether overtime according to data packet described in the time marker for judgment of the data packet.
Specifically judgment method is different and different according to time type, such as initial when time label It is 0 to be worth, and the time is marked when gradually increasing at any time, judges whether the value of the time label reaches the time threshold Value when the value of time label reaches the time threshold, judges the data packet time-out;At the beginning of time label Initial value is time threshold, and when time label is gradually reduced at any time, judges whether the value of the time label is reduced to 0, when the value of time label is reduced to 0, judge the data packet time-out;When the time is labeled as the setting time During time value (setting time mark time) during label, when judging current time value with setting described in time label Between mark when time value difference whether be greater than or equal to the time threshold, when the difference be greater than or equal to the time During threshold value, the data packet time-out is judged.
S104:When the data packet time-out, the data packet is abandoned from the buffer queue.
In embodiments of the present invention, after data packet is deleted from buffer queue, by follow-up data packet in queue forward It is mobile, fill up the position of deleted data packet.
Referring to Fig. 4, it illustrates another congestion-preventing approach provided in an embodiment of the present invention, by Fig. 2 shows congestion Avoiding device 120 performs, and this method includes:
S201:Received data packet.
In different application scenarios, the data packet received may also be different.For example, in fixed network, router can be with Receive the business data packet of other network nodes transmission;In Linux message communicatings, a process can receive it in computer The message packets that his process is sent.In computer task processing, the central processing unit (English of computer:Central Processing Unit, referred to as:CPU task requests data packet can) be received.
S202:Judge the type of the data packet.
In embodiments of the present invention, for different types, there is different delay requirements.Thus, to different types The processing method of data packet is also just different.It is stringent for delay requirement, it needs the time to be set to mark it, and periodically judge Whether data packet retention time is overtime, when retention time time-out, deletes in time.It is and relatively low to delay requirement for other Business, can not time tag be set to it, without perform subsequent processing.In the business for having delay requirement, for not With business, delay requirement is also not quite similar, and therefore, the time threshold judged for different business time-out may just not yet Together.
Wherein, the type of data packet can be type of service or length type (data packet length).Wherein, industry Service type can be VoP, network agreement TV (English:Internet Protocol Television, referred to as: IPTV) data packet etc..Length type can be less than 1500 bytes, 1500-9600 bytes etc..
Different scenes can be classified, such as using different types in fixed network, can pass through type of service pair Data packet is classified, and in Linux message communicatings, then it can be classified by length type to data packet.
In a kind of possible realization method, judging the type of the data packet can include:
Field in the packet header judges the type (type of service) of the data packet;Alternatively, according to institute The size for stating data packet judges the type (length type) of the data packet.
For example, tag types, the internet protocol (English in the packet header:Internet Protocol, referred to as:IP) address or media access control (English:Media Access Control, referred to as:MAC) address etc. Field judges the type of service of data packet.Wherein, the IP address in packet header or MAC Address be with some user or certain One Business Stream is corresponding, and some user or a certain Business Stream are corresponding with specific business, therefore according to IP address Or MAC Address is the type of service that can determine whether data packet.
Alternatively, its length type is determined by detection data packet length after data packet is received.This mode can be with needle Congestion Avoidance is carried out to the data packet of certain length, such as wishes that the data packet for long packet 1500-9600 bytes carries out congestion The configuration avoided.
In embodiments of the present invention, it can realize as desired and the business for needing to carry out Congestion Avoidance is configured.Example Such as, user wishes to carry out Congestion Avoidance configuration for IPTV service, at this point, router when receiving data packet, judges data packet Whether it is IPTV data packets.
S203:When the type of the data packet is setting type, the time is set to mark for the data packet, the time It marks to judge whether the time of the data packet in the buffer is overtime.
Wherein, it is described the time to be set to mark for the data packet, including:
Store the mark of the data packet and its label of corresponding time.
For example, the storage organizations such as chained list, which may be used, stores the mark of the data packet and its label of corresponding time.
Wherein, the mark of data packet can be the number of the data packet.
As shown in Figure 4 A, after data packet is received, first judge the type of data packet, then set for different data packets Different time label T.
Wherein, the initial value of the time label is 0, and the gradually increase at any time of time label;Alternatively, when described Between the initial value that marks be time threshold, and time label is gradually reduced at any time;Alternatively, the time is labeled as setting Time value during the time label.
By taking Fig. 4 A as an example, the time label T that data packet 1,2 and 3 is set in figure is respectively NA, X and NA, and wherein T=X is represented Data packet setting having time marks, and T=NA represents that the data packet is not provided with time label.
In embodiments of the present invention, time threshold according to can be the second, millisecond set nanosecond.
S204:The data packet is stored in buffer queue.
After the setting time marks, data packet is put into buffer queue.When the time, label was dynamic time, with number Increase according to the time that packet stores in buffer queue, the numerical value that can be marked to the above-mentioned time is modified.
If time label initial value is T=X, T can be gradually reduced with the time, and variation successively is X-1, X-2 ... Until 0.For example, X=3ms, then after initial value begins to pass through 3ms, T=0.
If time label initial value is T=0, T can gradually increase with the time, variation successively is 1,2 ... until X.For example, X=3ms, then after initial value begins to pass through 3ms, T=3ms.
S205:It is whether overtime according to data packet described in the time marker for judgment of the data packet.
In embodiments of the present invention, it is periodically whether overtime according to the time marker for judgment data packet of the data packet. Wherein, the period can specifically be configured on demand, minimum 1ms.Period setting is excessive, then treating capacity can be caused excessive, period setting It is too small, it is impossible to meet the needs of delay requirement higher business.
Specific judgment method is different and different according to time type, such as initial when time label It is 0 to be worth, and the time is marked when gradually increasing at any time, judges whether the value of the time label reaches the time threshold, when When the value of the time label reaches the time threshold, the data packet time-out is judged;When the initial value of time label For time threshold, and when time label is gradually reduced at any time, judge whether the value of the time label is reduced to 0, when When the value of the time label is reduced to 0, the data packet time-out is judged;When the time is labeled as the setting time label When time value (setting time mark time) when, judge current time value with the time being set to mark in time label Whether the difference of the time value to clock is greater than or equal to the time threshold, when the difference is greater than or equal to the time threshold When, judge the data packet time-out.
For the third mode, since the size of the time threshold is corresponding with the type of data packet, counting After calculating the difference, time threshold is determined according to the type of the data packet, then compares difference and the size of time threshold. Such as the time that the setting time marks is T1, current time value T2, and time threshold is determined as X according to the type of data packet, If T2-T1 >=X, the data packet time-out is judged.Wherein, the corresponding time threshold size of each type is configured on demand, because The requirement disunity for being each equipment vendor or operator to time delay.
It, can be with when recording the number of the data packet and its corresponding time and marking for the third mode Its type is stored, so as to convenient in the relatively size of difference and time threshold, convenient for obtaining corresponding time threshold.
S206:When the data packet time-out, the data packet is abandoned from the buffer queue.
Optionally, the method further includes:
Delete one after the data packet or continuous at least two data packet, one after the data packet or it is continuous extremely Few two data packets are identical with the type of the data packet.
For example, data packet 1,2 and 3 is continuous three data packets in queue, and before data packet 1 is in most, these three data The type of packet is identical, at this point, if it is judged that 1 time-out of data packet, then abandon data packet 1,2 and 3 together.This reduces The time-out of data packet 2 and 3 is judged, reduces treating capacity.
In embodiments of the present invention, when entering buffer queue there are multiple data packets of continuous same type, both may be used Think that multiple data packets all set the time to mark, only the which part data packet setting time can also be marked, such as first And the last one.
In embodiments of the present invention, when there are during multiple data packets of continuous same type, when first data packet surpasses Constantly, the entire packet in multiple data packets can have both been deleted, can also only delete the partial data packet in multiple data packets. For example, in buffer queue some business of Coutinuous store data packet common x, when first data packet time-out, follow-up data packet The possibility of time-out is also very big, but not all data packet all synchronizations enter caching, therefore, can only delete setting quantity Data packet.Here setting quantity needs to set according to actual needs.Illustrate the size of setting quantity below by example, to we The influence of case:As preceding 10 data packets are by time-out in this 10 data packets simultaneously into buffer queue in multiple data packets Moment, but the data packet for having 1 same type enters buffer queue, at this time if when setting quantity is more than 10, has just enter into caching The last one data packet just abandoned in advance, but the treating capacity of hardware can be reduced in this way.
In embodiments of the present invention, after data packet is deleted from buffer queue, by follow-up data packet in queue forward It is mobile, fill up the position of deleted data packet.
Optionally, this method further includes:When the data packet that a predetermined level is exceeded is continuously abandoned in setting time, output Warning information, so as to prompt current packet loss larger.
Different alarms can be realized according to the different settings of predetermined quantity, such as predetermined quantity is 0, as long as then there is data packet Discarding is then alerted;It, then can be big by the current packet loss of alarm prompt when predetermined quantity is more than 0.
In addition, above-mentioned warning information is generated by Congestion Avoidance device, which, which can also include corresponding equipment, believes It ceases (such as Router Distinguisher), which can be for transmission to other management and control equipments, so as to notify network pipe in time The equipment that reason person sends congestion, even if so as to solve congestion.
Above-mentioned congestion-preventing approach provided by the invention can with traditional congestion avoidance policy (such as tail drop, RED, WRED etc.) it is used together.For example, for the data packet in queue using method provided in this embodiment handle, and for not into Tail drop may be used in the data packet of enqueue, RED or WRED mechanism is handled.
It is the device embodiment of the embodiment of the present invention below, for the details not being described in detail in device embodiment, please joins It is admitted to and states corresponding embodiment of the method.
Fig. 5 shows the block diagram of communication device provided by one embodiment of the present invention.The communication device can be by special Hardware circuit, alternatively, software and hardware be implemented in combination with as Congestion Avoidance device all or part of.The Congestion Avoidance device packet It includes:Setting unit 301, buffer unit 302, judging unit 303 and processing unit 304.Wherein, setting unit 301, for connect The data packet setting time received marks, and the time marks to judge whether the time of the data packet in the buffer surpasses When;Buffer unit 302, for the data packet to be stored in buffer queue;Judging unit 303, for according to the data packet Time marker for judgment described in data packet it is whether overtime;Processing unit 304, for when the data packet time-out, by the number It is abandoned from the buffer queue according to packet.
Wherein, the setting unit 301, is used for:Judge the type of the data packet;When the type of the data packet is sets When determining type, the time is set to mark for the data packet.
Wherein, the setting unit 301, is used for:Field in the packet header judges the data packet Type;Alternatively, the type of the data packet is judged according to the size of the data packet.
Wherein, the setting unit 301, is used for:Store the mark of the data packet and its label of corresponding time.
Wherein, the initial value of the time label is 0, and the gradually increase at any time of time label;Alternatively, when described Between the initial value that marks be time threshold, and time label is gradually reduced at any time;Alternatively, the time is labeled as setting Time value during the time label.
Wherein, the judging unit 303, is used for:Judge whether the value of the time label reaches the time threshold, when When the value of the time label reaches the time threshold, the data packet time-out is judged;Alternatively, judge the time label Whether value is reduced to 0, when the value of time label is reduced to 0, judges the data packet time-out;Alternatively, when judging current Between set whether the difference of time value of time when marking is greater than or equal to the time threshold in value and the time label Value when the difference is greater than or equal to the time threshold, judges the data packet time-out.
Optionally, the processing unit 304, is additionally operable to:Delete one after the data packet or continuous at least two number According to packet, one after the data packet or continuous at least two data packet it is identical with the type of the data packet.
Correlative detail can be with reference to reference to the embodiment of the method described in figure 3 and Fig. 4.
It should be noted that above-mentioned setting unit 301, buffer unit 302, judging unit 303 and processing unit 304 can be with It is realized by processor alternatively, processor performs the program instruction in memory to realize.
Fig. 6 shows the structure chart of communication chip provided by one embodiment of the present invention, applies and is filled in aforementioned Congestion Avoidance In putting.The communication chip includes:Processor 410, memory 420 and communication interface 430.Processor 410 by bus respectively with Memory 420 is connected with communication interface 430.
Communication interface 430 is used for realizing the communication between other communication equipments.
Processor 410 includes one or more processing cores.Processor 410 is by running operating system or using journey Sequence module.
Optionally, memory 420 can storage program area 422, the application program module 424 needed at least one function. Optionally, application program module 424 includes:Receiving module 424a, processing module 424b and sending module 424c.Wherein, it receives Module 424a is used to implement data packet and receives related step;Processing module 424b is used to implement time label setting, time-out is sentenced The step of related calculating such as disconnected and data packet discarding or processing;Sending module 424c is used to implement related the step of sending.
In addition, memory 420 can be by any kind of volatibility or non-volatile memory device or combination thereof It realizes, such as static RAM (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable Read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, Disk or CD.
It will be understood by those skilled in the art that the structure shown in Fig. 6 does not form the restriction of above-mentioned communication chip, it can To include than illustrating more or fewer components or combining certain components or different components arrangement.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.

Claims (14)

1. a kind of congestion-preventing approach, which is characterized in that the method includes:
Data packet to receive sets the time to mark;
The data packet is stored in buffer queue;
It is whether overtime according to data packet described in the time marker for judgment of the data packet;
When the data packet time-out, the data packet is abandoned from the buffer queue.
2. according to the method described in claim 1, it is characterized in that, the data packet to receive sets time label, packet It includes:
Judge the type of the data packet;
When the type of the data packet is setting type, the time is set to mark for the data packet.
3. according to the method described in claim 2, it is characterized in that, the type for judging the data packet, including:
Field in the packet header judges the type of the data packet;Alternatively,
The type of the data packet is judged according to the size of the data packet.
4. according to the method described in claim 2, it is characterized in that, it is described for the data packet set the time mark, including:
Store the mark of the data packet and its label of corresponding time.
5. method according to any one of claims 1 to 4, which is characterized in that the initial value of the time label is 0, and The time label gradually increase at any time;Alternatively, the initial value of the time label is time threshold, and the time marks It is gradually reduced at any time;Alternatively, the time value when time marks labeled as the setting time.
6. according to the method described in claim 5, it is characterized in that, described in the time marker for judgment according to the data packet Whether data packet is overtime, including:
Judge whether the value of the time label reaches the time threshold, the value of label reaches the time threshold when the time During value, the data packet time-out is judged;Alternatively,
Judge whether the value of the time label is reduced to 0, when the value of time label is reduced to 0, judge the data Packet time-out;Alternatively,
Judge to set in current time value and the time label difference of time value of time when marking whether be more than or Equal to the time threshold, when the difference is greater than or equal to the time threshold, the data packet time-out is judged.
7. method according to any one of claims 1 to 4, which is characterized in that the method further includes:
Delete one after the data packet or continuous at least two data packet, one after the data packet or continuous at least two A data packet is identical with the type of the data packet.
8. a kind of Congestion Avoidance device, which is characterized in that described device includes:
Setting unit, for the time being set to mark for the data packet received, the time marks to judge the data packet Whether the time in the buffer is overtime;
Buffer unit, for the data packet to be stored in buffer queue;
Judging unit, it is whether overtime for data packet described in the time marker for judgment according to the data packet;
Processing unit, for when the data packet time-out, the data packet to be abandoned from the buffer queue.
9. device according to claim 8, which is characterized in that the setting unit is used for:
Judge the type of the data packet;When the type of the data packet is setting type, is set for the data packet time Label.
10. device according to claim 9, which is characterized in that the setting unit is used for:
Field in the packet header judges the type of the data packet;Alternatively, the size according to the data packet Judge the type of the data packet.
11. device according to claim 9, which is characterized in that the setting unit is used for:
Store the mark of the data packet and its label of corresponding time.
12. according to claim 8 to 11 any one of them device, which is characterized in that the initial value of the time label is 0, And the time label gradually increase at any time;Alternatively, the initial value of the time label is time threshold, and the time marks Note is gradually reduced at any time;Alternatively, the time value when time marks labeled as the setting time.
13. device according to claim 12, which is characterized in that the judging unit is used for:
Judge whether the value of the time label reaches the time threshold, the value of label reaches the time threshold when the time During value, the data packet time-out is judged;Alternatively, judge whether the value of the time label is reduced to 0, when time label When value is reduced to 0, the data packet time-out is judged;Alternatively, when judging current time value with setting described in time label Between mark when time value difference whether be greater than or equal to the time threshold, when the difference be greater than or equal to the time During threshold value, the data packet time-out is judged.
14. according to claim 8 to 11 any one of them device, which is characterized in that the processing unit is additionally operable to:
Delete one after the data packet or continuous at least two data packet, one after the data packet or continuous at least two A data packet is identical with the type of the data packet.
CN201611171554.3A 2016-12-17 2016-12-17 A kind of congestion-preventing approach and device Pending CN108206787A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611171554.3A CN108206787A (en) 2016-12-17 2016-12-17 A kind of congestion-preventing approach and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611171554.3A CN108206787A (en) 2016-12-17 2016-12-17 A kind of congestion-preventing approach and device

Publications (1)

Publication Number Publication Date
CN108206787A true CN108206787A (en) 2018-06-26

Family

ID=62602562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611171554.3A Pending CN108206787A (en) 2016-12-17 2016-12-17 A kind of congestion-preventing approach and device

Country Status (1)

Country Link
CN (1) CN108206787A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109361616A (en) * 2018-10-31 2019-02-19 晶晨半导体(上海)股份有限公司 A kind of control method improving network performance
CN111224820A (en) * 2019-12-30 2020-06-02 视联动力信息技术股份有限公司 Bandwidth calculation method and device
CN112491871A (en) * 2020-11-25 2021-03-12 北京宝兰德软件股份有限公司 TCP (Transmission control protocol) recombination method and device, electronic equipment and storage medium
WO2022016889A1 (en) * 2020-07-22 2022-01-27 华为技术有限公司 Congestion control method and device
CN114765585A (en) * 2020-12-30 2022-07-19 北京华为数字技术有限公司 Service quality detection method, message processing method and device
WO2023045551A1 (en) * 2021-09-26 2023-03-30 中兴通讯股份有限公司 Camera control method and system, electronic device and storage medium
CN116347229A (en) * 2022-12-21 2023-06-27 荣耀终端有限公司 Image shooting method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009847A (en) * 2006-01-23 2007-08-01 美国阿尔卡特资源有限合伙公司 Video aware traffic management
CN201444641U (en) * 2007-10-01 2010-04-28 交互数字专利控股公司 Wireless transmitter / receiver unit
CN101904197A (en) * 2007-12-20 2010-12-01 株式会社Ntt都科摩 Mobile station, base station device, communication control method, and mobile communication system
CN102170663A (en) * 2011-05-23 2011-08-31 迈普通信技术股份有限公司 3G (The Third Generation Telecommunication)-based method and equipment for guaranteeing service quality in real-time transmission service
CN104702531A (en) * 2013-12-10 2015-06-10 华为技术有限公司 Network equipment congestion avoidance method and network equipment
CN105897365A (en) * 2016-03-23 2016-08-24 京信通信技术(广州)有限公司 Anti-impact processing method and apparatus for processor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009847A (en) * 2006-01-23 2007-08-01 美国阿尔卡特资源有限合伙公司 Video aware traffic management
CN201444641U (en) * 2007-10-01 2010-04-28 交互数字专利控股公司 Wireless transmitter / receiver unit
CN101904197A (en) * 2007-12-20 2010-12-01 株式会社Ntt都科摩 Mobile station, base station device, communication control method, and mobile communication system
CN102170663A (en) * 2011-05-23 2011-08-31 迈普通信技术股份有限公司 3G (The Third Generation Telecommunication)-based method and equipment for guaranteeing service quality in real-time transmission service
CN104702531A (en) * 2013-12-10 2015-06-10 华为技术有限公司 Network equipment congestion avoidance method and network equipment
CN105897365A (en) * 2016-03-23 2016-08-24 京信通信技术(广州)有限公司 Anti-impact processing method and apparatus for processor

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109361616A (en) * 2018-10-31 2019-02-19 晶晨半导体(上海)股份有限公司 A kind of control method improving network performance
CN109361616B (en) * 2018-10-31 2022-05-31 晶晨半导体(上海)股份有限公司 Control method for improving network performance
CN111224820A (en) * 2019-12-30 2020-06-02 视联动力信息技术股份有限公司 Bandwidth calculation method and device
CN111224820B (en) * 2019-12-30 2023-10-13 视联动力信息技术股份有限公司 Bandwidth calculation method and device
WO2022016889A1 (en) * 2020-07-22 2022-01-27 华为技术有限公司 Congestion control method and device
CN112491871A (en) * 2020-11-25 2021-03-12 北京宝兰德软件股份有限公司 TCP (Transmission control protocol) recombination method and device, electronic equipment and storage medium
CN114765585A (en) * 2020-12-30 2022-07-19 北京华为数字技术有限公司 Service quality detection method, message processing method and device
CN114765585B (en) * 2020-12-30 2024-03-01 北京华为数字技术有限公司 Service quality detection method, message processing method and device
WO2023045551A1 (en) * 2021-09-26 2023-03-30 中兴通讯股份有限公司 Camera control method and system, electronic device and storage medium
CN116347229A (en) * 2022-12-21 2023-06-27 荣耀终端有限公司 Image shooting method and electronic equipment
CN116347229B (en) * 2022-12-21 2024-03-15 荣耀终端有限公司 Image shooting method and electronic equipment

Similar Documents

Publication Publication Date Title
CN108206787A (en) A kind of congestion-preventing approach and device
US9185047B2 (en) Hierarchical profiled scheduling and shaping
CN109684269B (en) PCIE (peripheral component interface express) exchange chip core and working method
CN105991470B (en) method and device for caching message by Ethernet equipment
US20220191140A1 (en) Data transmission control method, apparatus, and storage medium
CN104378308A (en) Method and device for detecting message sending rate
CN102047619B (en) Methods, systems, and computer readable media for dynamically rate limiting slowpath processing of exception packets
EP2670085B1 (en) System for performing Data Cut-Through
CN115516833A (en) Packet buffer overflow in a network device
CN101356777B (en) Managing on-chip queues in switched fabric networks
US7123614B2 (en) Method and device for communicating between a first and a second network
WO2021128927A1 (en) Message processing method and apparatus, storage medium, and electronic apparatus
CN109005126B (en) Data stream processing method, device and computer readable storage medium
US20050068798A1 (en) Committed access rate (CAR) system architecture
CN103685062A (en) Cache management method and device
US9137158B2 (en) Communication apparatus and communication method
US10594631B1 (en) Methods and apparatus for memory resource management in a network device
KR20120008478A (en) 10 gbps scalable flow generation and control, using dynamic classification with 3-level aggregation
US9154455B1 (en) Method and system for determining drop eligibility of network information
US10367749B2 (en) Automatically cycling among packet traffic flows subjecting them to varying drop probabilities in a packet network
US20190044867A1 (en) Technologies for controlling jitter at network packet egress
JP4276094B2 (en) Communication apparatus and priority control method for performing priority control of packet
WO2017016300A1 (en) Method and apparatus for processing token application, computer storage medium
US7855967B1 (en) Method and apparatus for providing line rate netflow statistics gathering
CN109308180B (en) Processing method and processing device for cache congestion

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180626