CN108600118A - Message processing method, device and electronic equipment - Google Patents
Message processing method, device and electronic equipment Download PDFInfo
- Publication number
- CN108600118A CN108600118A CN201810295137.2A CN201810295137A CN108600118A CN 108600118 A CN108600118 A CN 108600118A CN 201810295137 A CN201810295137 A CN 201810295137A CN 108600118 A CN108600118 A CN 108600118A
- Authority
- CN
- China
- Prior art keywords
- message
- ratio
- priority
- default
- loss ratio
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
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
-
- 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/24—Traffic characterised by specific attributes, e.g. priority or QoS
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention provides a kind of message processing method, device and electronic equipments, are related to network communication technology field, wherein message processing method includes:Obtain current default average loss ratio;Obtain each type of service it is corresponding enter message ratio and priority weighting ratio;According to it is described enter message ratio, the priority weighting ratio and the default average loss ratio, obtain the corresponding loss ratio of each type of service;According to the corresponding type of service of message, according to the loss ratio preceding dropping packets are dispatched in message enqueue, it solves the message that priority level existing in the prior art is high and flow of giving out a contract for a project is low and is unable to get guarantee, to increase the discarding risk that high priority message undertakes, the technical problem for causing packet loss result unreasonable.
Description
Technical field
The present invention relates to network communication technology fields, are set more particularly, to a kind of message processing method, device and electronics
It is standby.
Background technology
In network communications, message is the data cell exchanged in network with transmission, i.e. the website number disposably to be sent
According to block.Message contains the complete data information that will be sent, and length is very inconsistent, and length is unlimited and variable.
Message is also the unit of network transmission, grouping can be constantly packaged into transmission process, packet, frame transmit, and is encapsulated
Mode be exactly to add some message segments, these are exactly the data that message is organized with certain format.Such as wherein there is message
The information such as type, message version, message length, message entity.
Currently, when flow congestion occurs for network, the existing method abandoned to message is only other to different priorities
Message carry out the discarding of different probability, so take into consideration only the priority level of single message, and for different business flow feelings
Packet drop probability under condition is constant, to make the message that priority level is high and flow of giving out a contract for a project is low be unable to get guarantee, therefore increases
Add the discarding risk that high priority message undertakes, leads to the unreasonable of packet loss result.
Invention content
In view of this, the purpose of the present invention is to provide a kind of message processing method, device and electronic equipment, to solve
The unreasonable technical problem of packet loss result existing in the prior art.
In a first aspect, an embodiment of the present invention provides a kind of message processing method, it is applied to web-transporting device, this method
Including:
Obtain current default average loss ratio;
Obtain each type of service it is corresponding enter message ratio and priority weighting ratio;
According to it is described enter message ratio, the priority weighting ratio and the default average loss ratio, obtain each industry
The corresponding loss ratio of service type;
According to the corresponding type of service of message, preceding dropping packets are dispatched in message enqueue according to the loss ratio.
With reference to first aspect, an embodiment of the present invention provides the first possible embodiments of first aspect, wherein institute
It states before obtaining current default average loss ratio, further includes:
Obtain current queue length;
When the queue length is less than or equal to default Low threshold, then current default average loss ratio is 0%;
When the queue length is greater than or equal to default high threshold, then current default average loss ratio is 100%;
It is more than default Low threshold in the queue length and when less than default high threshold, then current default average loss ratio
It is proportionate with the queue length.
With reference to first aspect, an embodiment of the present invention provides second of possible embodiments of first aspect, wherein institute
State obtain each type of service it is corresponding enter message ratio and priority weighting ratio before, further include:
Calculate the quantity of all messages of network transmission in preset time, and the message amount of each priority level;
By the message amount difference of each priority level divided by the quantity of all messages, each priority is obtained
It is other enter message ratio.
With reference to first aspect, an embodiment of the present invention provides the third possible embodiments of first aspect, wherein institute
State obtain each type of service it is corresponding enter message ratio and priority weighting ratio before, further include:
Obtain the default weight coefficient of each priority level;
The sum for calculating all default weight coefficients, obtains total weight coefficient;
By the default weight coefficient difference of each priority level divided by total weight coefficient, each priority is obtained
Other priority weighting ratio.
With reference to first aspect, an embodiment of the present invention provides the 4th kind of possible embodiments of first aspect, wherein institute
It states and enters message ratio, the priority weighting ratio and the default average loss ratio according to, obtain each type of service
Corresponding loss ratio, specifically includes:
When entering message ratio described in being greater than or equal in the priority weighting ratio, the loss ratio is 0%;
When entering message ratio described in being less than in the priority weighting ratio, it is based on using default formula described default average
Loss ratio calculates the loss ratio.
With reference to first aspect, an embodiment of the present invention provides the 5th kind of possible embodiments of first aspect, wherein institute
Stating default formula is:
Wherein, DpiFor loss ratio;IpiTo enter message ratio;WpiFor priority weighting ratio;DredFor default average discarding
Rate;K is the quantity for the message type to be screened for entering message ratio described in the priority weighting ratio is less than;IpjIt is waited for for jth kind
Screening message enters message ratio;WpjFor the priority weighting ratio of jth kind message to be screened.
Second aspect, the embodiment of the present invention also provide a kind of message process device, are applied to web-transporting device, the report
Literary processing unit includes:
First acquisition module, for obtaining current default average loss ratio;
Second acquisition module, for obtain each type of service it is corresponding enter message ratio and priority weighting ratio;
Computing module is averagely lost for entering message ratio, the priority weighting ratio and described preset according to
Rate is abandoned, the corresponding loss ratio of each type of service is obtained;
Execution module is used for according to the corresponding type of service of message, according to the loss ratio before the scheduling of message enqueue
Dropping packets.
In conjunction with second aspect, an embodiment of the present invention provides the first possible embodiments of second aspect, wherein institute
Computing module is stated to be specifically used for:
When entering message ratio described in being greater than or equal in the priority weighting ratio, the loss ratio is 0%;
When entering message ratio described in being less than in the priority weighting ratio, it is based on using default formula described default average
Loss ratio calculates the loss ratio.
The third aspect, the embodiment of the present invention also provide a kind of electronic equipment, including memory, processor, the memory
In be stored with the computer program that can be run on the processor, the processor is realized when executing the computer program
The step of stating the method described in first aspect.
Fourth aspect, the embodiment of the present invention also provide a kind of meter for the non-volatile program code that can perform with processor
Calculation machine readable medium, said program code make the processor execute the method described in above-mentioned first aspect.
Technical solution provided in an embodiment of the present invention brings following advantageous effect:At message provided in an embodiment of the present invention
It manages in method, apparatus and electronic equipment, message processing method includes:First, current default average loss ratio is obtained, is obtained
Each type of service it is corresponding enter message ratio and priority weighting ratio message ratio, the priority weighting are then entered according to this
Ratio and the default average loss ratio, obtain the corresponding loss ratio of each type of service, later, according to the corresponding service class of message
Type, according to loss ratio before message enqueue is dispatched dropping packets, by obtain each type of service it is corresponding enter message ratio and
Priority weighting ratio is realized during being abandoned to message with this, can enter message ratio, the priority according to this
Weight proportion and the current default average loss ratio obtained before are distinguished, are calculated, to obtain the discarding of message
Rate makes the loss ratio consider not only the priority level of message, and has also combined into message ratio and priority weighting ratio,
It realizes according to currently practical traffic conditions and service priority dynamic, to determine the packet drop probability of each priority, from
And reach the controllable discarding of different priorities message, make that priority weighting ratio is high, priority level is high and enters that message ratio is small, hair
The low message of packet stream amount can be protected, and reduce the discarding risk that high priority message undertakes, existing to solve
Priority level present in technology is high and message that flow of giving out a contract for a project is low is unable to get guarantee, therefore increases high priority message
The discarding risk undertaken, the technical problem for causing packet loss result unreasonable.
By identifying message priority and count different priorities in setting time enters message ratio, according to currently practical
Traffic conditions and service priority dynamic, it is different preferential to reach to determine the packet drop probability of each service priority
The controllable discarding of grade message preferably ensures and arrives high-priority service.
Other features and advantages of the present invention will illustrate in the following description, also, partly become from specification
It obtains it is clear that understand through the implementation of the invention.The purpose of the present invention and other advantages are in specification, claims
And specifically noted structure is realized and is obtained in attached drawing.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment cited below particularly, and coordinate
Appended attached drawing, is described in detail below.
Description of the drawings
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art
Embodiment or attached drawing needed to be used in the description of the prior art are briefly described, it should be apparent that, in being described below
Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor
It puts, other drawings may also be obtained based on these drawings.
Fig. 1 shows the flow chart for the message processing method that the embodiment of the present invention one is provided;
Fig. 2 shows the flow charts for the message processing method that the embodiment of the present invention two is provided;
Fig. 3 shows a kind of structural schematic diagram for message process device that the embodiment of the present invention three is provided;
Fig. 4 shows the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention four is provided.
Icon:3- message process devices;The first acquisition modules of 31-;The second acquisition modules of 32-;33- computing modules;34- is held
Row module;4- electronic equipments;41- memories;42- processors;43- buses;44- communication interfaces.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention
Technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, rather than
Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Lower obtained every other embodiment, shall fall within the protection scope of the present invention.
Currently, when flow congestion occurs for network, usually queue scheduling abandons message by various modes, reaches and subtracts
The effect of light congestion.But due to transmission control protocol (Transmission Control Protocol, abbreviation TCP) packet loss,
TCP can be caused overtime, cause the slow turn-on and congestion avoidance mechanism of TCP so that TCP reduces message and sends.A large amount of TCP in queue
When connection message is dropped, it can cause a large amount of TCP connections all while enter slow turn-on and congestion avoidance mechanism i.e. TCP global synchronizations
State causes the message in network to largely reduce suddenly, reaches less than network transmittable bandwidth, bandwidth availability ratio is caused to decline.
Persistently increase since TCP sends window, congestion can be caused again, forms flow and fluctuated between bandwidth is saturated extremely unsaturation.
Current network introduces random early dropping detection (Random Early Detection, abbreviation RED) technology.It adopts
When with RED, user can set the threshold value of queue, and when queue depth is less than Low threshold, message does not abandon;When queue depth exists
When between Low threshold and high threshold, before message enqueue, random drop is carried out to message, queue depth is bigger, drop probability
It is higher;When queue depth is more than high threshold, all abandon.
It is unfair for the message of high priority since RED discardings are compared blindly, it then develops into Weighted random early stage and loses
Packet detection (Weighted Random Early Detection, abbreviation WRED), by identifying message priority, to priority
High message carries out low probability discarding, and high probability discarding is carried out for the low message of priority.Therefore, entered by WRED modes
The discarding for carrying out different probability before queue to the message of different priorities, to alleviate since buffering area is full rear while largely losing
Abandon TCP global synchronizations caused by message.
Currently, WRED technologies are only identified the priority of single message, it cannot distinguish between most probable in actual flow and draw
The Business Stream of congestion is played, therefore packet loss does not have specific aim, does not have high controllability for service with different priority levels flow, to increase
The discarding risk that high priority business flow undertakes is added.In addition, RED does not have controllability to the random drop of message yet, it is right
It just can not preferably be ensured in the low flow of high priority packet sending speed.For example, the service traffics of a high priority, speed of giving out a contract for a project
Rate is relatively low, the service traffics of other low priorities rate of giving out a contract for a project is very high, RED nonrecognition message priorities, for losing for each message
It abandons probability to be the same within a certain period of time, for high priority business flow, increases the risk being dropped.WRED makees
For the improved method of RED, although improving to some extent, can not to cause may the main cause of congestion be identified, such as congestion shape
Account for principal element at low priority in the process, high-priority service should completely by, and WRED abandon mode can be right
High-priority service TCP carries out packet loss.
Based on this, a kind of message processing method, device and electronic equipment provided in an embodiment of the present invention can solve existing
There is the discarding for only carrying out different probability present in technology to the other message of different priorities when being abandoned to message, only examines
The priority level of single message is considered and constant for the packet drop probability under different business traffic conditions, to make priority
Not high and that flow of giving out a contract for a project is low message is unable to get guarantee, therefore increases the discarding risk that high priority message undertakes, and leads
The technical problem for causing packet loss result unreasonable.
For ease of understanding the present embodiment, first to disclosed in the embodiment of the present invention a kind of message processing method,
Device and electronic equipment describe in detail.
Embodiment one:
A kind of message processing method provided in an embodiment of the present invention is applied to web-transporting device, can be used in network
Flow determines the drop probability of message when blocking, as shown in Figure 1, this method includes:
S11:Obtain current default average loss ratio.
In this step, it can be obtained by random early check (RED, Random Early Detection) algorithm default
Average loss ratio.Certainly, presetting average loss ratio can also be defined by the user, can also be by system configuration.
S12:Obtain each type of service it is corresponding enter message ratio and priority weighting ratio.
As a preferred embodiment, first, the priority level of each type of service message is identified, i.e., in the inflow of network flow
Direction carries out priority mapping to message, specifically, identification network transmission direction in preset time is the several of incoming direction
The priority of a message, to obtain the priority level of these messages.Then, then respectively obtain each type of service it is corresponding enter report
Literary ratio and priority weighting ratio.
For entering the acquisition of message ratio, quantitative proportion of the message of each priority level in all messages is calculated, is obtained
To entering message ratio value.Specifically, first, calculating all message amounts of the network transmission in preset time to be owned
Then the quantity of message calculates the message amount of each priority level in all messages, obtains each priority level message
Quantity by the quantity of each priority level message divided by the quantity of all messages, corresponds to later to obtain each priority level
Enter message ratio.
Acquisition for priority weighting ratio calculates priority weighting of each priority level in all priority levels
Ratio obtains weight proportion value.Specifically, first, obtain the default weight coefficient of each priority level, can be user according to
Then the default weight coefficient of each priority level of priority level setting calculate all default weight coefficients and obtains total
Weight coefficient, later, by the default weight coefficient of each priority level divided by total weight coefficient, to obtain each priority level
Corresponding priority weighting ratio value.
S13:According to message ratio, priority weighting ratio and default average loss ratio is entered, each type of service pair is obtained
The loss ratio answered.
As the preferred embodiment of the present embodiment, it is averaged using entering message ratio, priority weighting ratio and presetting
Loss ratio is calculated, to calculate a more reasonably packet drop probability.
S14:According to the corresponding type of service of message, preceding dropping packets are dispatched in message enqueue according to loss ratio.
Therefore, message processing method provided in this embodiment, can be by identifying message priority and counting setting time
Interior different priorities enter message ratio, according to currently practical traffic conditions and service priority dynamic, to determine each business
The packet drop probability of priority preferably ensures to reach the controllable discarding of different priorities message and arrives high priority industry
Business.
Embodiment two:
A kind of message processing method provided in an embodiment of the present invention is applied to web-transporting device, as shown in Fig. 2, the party
Method includes:
S21:Obtain current queue length.
As the another embodiment of the present embodiment, the current queue length of message is calculated by RED algorithms, is made with this
For the estimation to network flow chocking-up degree.
S22:Judge the magnitude relationship between queue length and default Low threshold, default high threshold.If queue length is small
In or equal to default Low threshold, then step S23 is carried out;If queue length is greater than or equal to default high threshold, step is carried out
S24;If queue length is more than default Low threshold and less than default high threshold, step S25 is carried out.
It preferably, can be according to the Low threshold and high threshold of RED algorithm configuration queue lengths, in this, as to network flow
The division of chocking-up degree.
S23:Current default average loss ratio is 0%.
In this step, when queue length is less than or equal to default Low threshold, determine that default average loss ratio is 0%, i.e.,
Pass through all messages.Therefore, equipment is before the scheduling of message enqueue, if queue length is less than or equal to Low threshold, no
Execute packet loss.
S24:Current default average loss ratio is 100%.
Further, when queue length is greater than or equal to default high threshold, determine that default average loss ratio is
100%, that is, abandon all messages.Therefore, equipment is before the scheduling of message enqueue, if queue length is greater than or equal to high threshold
Value then executes and abandons all messages.
S25:Current default average loss ratio is proportionate with queue length.
In practical applications, in queue length it is more than default Low threshold and when less than default high threshold, according to entering message ratio
Example, priority weighting ratio etc. calculate the corresponding drop probability of message priority, make default average loss ratio and the queue of message
Length is proportionate.Preferably, if queue depth is higher than the Low threshold configured and less than the high threshold of configuration, i.e. queue length
Between Low threshold and high threshold, then step S26 to S37 successively.
S26:Identify the priority level of message.
Further, priority mapping is carried out to message in the inflow direction of network flow, specifically, identification is in preset time
Interior network transmission direction is the priority of several messages in incoming direction, to obtain the priority level of these messages.
S27:Calculate the quantity of all messages of network transmission in preset time, and the message number of each priority level
Amount.
It should be noted that different priorities it is other enter message ratio using at regular intervals to the message in Δ t into
Row sampling obtains, for example, every 5 minutes count the message received in 30s, Δ t=30s at this time.In practical applications,
Sample frequency and Δ t are set according to actual conditions, if burst flow is frequent, sample frequency can be arranged higher.
S28:By the message amount difference of each priority level divided by the quantity of all messages, each priority level is obtained
Enter message ratio.
For example, the message amount of some priority level is 5, the quantity of all messages is 11, then this priority level
The message ratio that enters just be:
S29:Obtain each type of service it is corresponding enter message ratio.
It should be noted that by step S26 to step S28 obtain each type of service it is corresponding enter message ratio, i.e., respectively
Priority level it is corresponding enter message ratio.
S30:Obtain the default weight coefficient of each priority level.
As the preferred embodiment of the present embodiment, default weight coefficient can be defined by the user, can also be by system root
It is configured according to priority level.
S31:The sum for calculating all default weight coefficients, obtains total weight coefficient.
In the present embodiment, the default weight coefficient of all priority levels is added, to obtain total weight coefficient.
S32:By the default weight coefficient difference of each priority level divided by total weight coefficient, each priority level is obtained
Priority weighting ratio.
Wherein, the other weight proportion of different priorities can be defined by the user, can also be according to the default power of message priority
Weight coefficient is calculated.For example, 4 priority, it is 3,2,1,1 respectively to preset weight coefficient, and corresponding weight proportion is
S33:Obtain the corresponding priority weighting ratio of each type of service.
In the present embodiment, the corresponding priority weighting ratio of each type of service is obtained by step S30 to step S32, i.e.,
The corresponding priority weighting ratio of each priority level.
S34:Judge whether priority weighting ratio is less than into message ratio.If not, executing step S35;If so, holding
Row step S36.
S35:The loss ratio of message is 0%.
Specifically, when priority weighting ratio is greater than or equal into message ratio, determine that the loss ratio of message is 0%,
Pass through the message of the priority level.For example, when the message ratio that enters that priority is i is less than or equal to corresponding weight proportion
When, drop probability 0, to ensure that the message of the priority level passes through completely.
S36:It is based on default average loss ratio using default formula and calculates loss ratio.
It should be noted that when priority weighting ratio is less than into message ratio, it is based on using default formula default flat
Equal loss ratio calculates the loss ratio of message.Preferably, default formula is:
Wherein, DpiFor loss ratio;IpiTo enter message ratio;WpiFor priority weighting ratio;DredFor default average discarding
Rate;K is priority weighting ratio WpIt is less than into message ratio IpMessage type to be screened quantity;IpjIt is to be screened for jth kind
Message enters message ratio;WpjFor the priority weighting ratio of jth kind message to be screened.Therefore,Indicate all
Wp<IpPriority the difference for entering message ratio and priority weighting ratio and.
The present embodiment is illustrated by taking n priority number as an example, and n is the priority number of current setting, and i indicates i-th
A priority, then i value ranges are [1, n], and i is positive integer.
When priority is i when entering message ratio more than corresponding weight proportion, each message calculated due to former RED
Default average loss ratio is Dred, then message priority is not distinguished by RED algorithms.Above-mentioned public affairs in through this embodiment
Formula, by IpLess than WpPriority packet default average loss ratio DredAccording to (Ip-Wp) difference ratio, distribute to Ip>Wp's
Priority is ensureing that the loss ratio of message is accurate to reach, is keeping packet loss result more reasonable, preferential to make
Grade weight is low, enters the high priority packet of message ratio has higher drop probability, and enters that message ratio is low, priority weighting
High message then guarantees to pass through completely.
S37:According to the corresponding type of service of message, preceding dropping packets are dispatched in message enqueue according to loss ratio.
As the another embodiment of the present embodiment, to message according to corresponding priority before message enters to row scheduling
Drop probability is abandoned.
In practical applications, when queue length is more than default Low threshold and less than default high threshold, pass through Message processing
Method can ensure weight according to the priority of user configuration, in conjunction with current real-time flows amount situation, calculate with it is each preferential
Grade message drop probability mutually appropriate, to ensure before message enters to row scheduling to message according to corresponding priority drop probability
It is abandoned.
Therefore, message processing method may be a kind of packet drop probability calculating side counted based on message priority
Method, this method are incorporated into message ratio and priority weighting ratio, calculate a more reasonably packet drop probability, reach pair
Priority weighting is low, entering message ratio, high message prior abandons, while can ensure that priority weighting is high, it is low to enter message ratio
Message can pass through completely.
The present embodiment is illustrated by taking the message that the network equipment forwards as an example, and presetting for device configuration RED queue lengths is low
Threshold value is 30%, and it is 100% to preset high threshold.If the method using RED or WRED carries out loss ratio calculating,:Work as reality
When queue length is less than 30%, it is 0% that loss ratio, which is calculated, then not packet loss;When actual queue length is equal to 50%,
It is 40% that loss ratio, which is calculated, then in each message into before enqueue, RED do not differentiate between the packet loss of priority,
WRED all carries out probability dropping according to priority difference;When queue length be equal to 100% when, calculate drop probability is
100%.
The message processing method provided through this embodiment can first count the message in 30s according to priority, it is assumed that
Message has 4 priority:4,3,2,1, it is 0.1,0.1,0.3,0.5 to be calculated into message ratio, and weight proportion is respectively
0.4,0.3,0.2,0.1 the case where it is as follows:
When queue length is less than 30%, it is 0% to calculate loss ratio according to RED, according to formula
It is calculated:D1=0%, D2=0%, D3=0%, D4=0%, then do not execute packet loss;
When queue length is equal to 50%, it is calculated according to above-mentioned formula:D1=0;D2=0;
The result that comparison RED algorithms, wred algorithm and message processing method provided in this embodiment obtain:
Enter message ratio | Priority weighting ratio | RED algorithms | Wred algorithm | The present embodiment |
0.1 | 0.4 | 40% | 25% | 0 |
0.1 | 0.3 | 40% | 30% | 0 |
0.3 | 0.2 | 40% | 40% | 26.7% |
0.5 | 0.1 | 40% | 55% | 64% |
In the present embodiment, by the way that D is calculated1、D2、D2、D2Total loss ratio is also:0.3 × 26.7%+0.5 × 64%
=40%.Moreover, by comparing above, it can be seen that Message processing side provided in this embodiment can make the report of different priorities
Text, which abandons, has more controllability and reasonability.
Therefore, message processing method may be a kind of improved method of the RED counted based on message priority and WRED,
On the basis of RED, enters message ratio and priority weighting ratio by different priorities, calculate the report of different priorities
The drop probability of text reaches under RED drop probability unanimous circumstances, can more rational discardings be reported compared to WRED
Text, realize it is low to priority weighting, enter the high message prior of message ratio and abandon, while ensureing priority weighting height, enter report
The low message of literary ratio can pass through completely.
Can also include step before executing step S36 as the another embodiment of the present embodiment:If entered
The gap value of message ratio and priority weighting ratio then obtains loss ratio within the scope of parameter δ by wred algorithm;If
Enter the gap value of message ratio and priority weighting ratio except parameter δ ranges, thens follow the steps S36.Wherein, parameter δ
Value range can be (0,0.5), and certainly, in practical applications, other can also be arranged according to actual conditions in the value of parameter δ
More particularly suitable value range.
Specifically, if the gap value for entering message ratio and priority weighting ratio within the scope of parameter δ, illustrate it is each
Entering for message of grade tends to be expected substantially between message ratio and weight proportion, can consider the message of all priority levels all at this time
Play the role of to congestion identical, therefore the loss ratio for obtaining by original wred algorithm outgoing packet is more suitable for this situation.
And when entering the gap value of message ratio and priority weighting ratio except parameter δ ranges, then declaratives rank enters message
Prominent influence is played on congestion, the loss ratio of outgoing packet is obtained using step S36 can make result more accurate.
Embodiment three:
A kind of message process device provided in an embodiment of the present invention is applied to web-transporting device, as shown in figure 3, message
Processing unit 3 includes:First acquisition module 31, the second acquisition module 32, computing module 33 and execution module 34.
As a preferred embodiment, the first acquisition module 31 is used to obtain current default average loss ratio.Second obtains
Module 32 for obtain each type of service it is corresponding enter message ratio and priority weighting ratio.
In addition, computing module 33 is used to, according to message ratio, priority weighting ratio and default average loss ratio is entered, obtain
To the corresponding loss ratio of each type of service.Specifically, computing module 33 is used for:It is greater than or equal into report in priority weighting ratio
When literary ratio, loss ratio 0%;When priority weighting ratio is less than into message ratio, it is based on using default formula default flat
Equal loss ratio calculates loss ratio.
As the another embodiment of the present embodiment, execution module 34 is used for according to the corresponding type of service of message, root
According to loss ratio preceding dropping packets are dispatched in message enqueue.
Example IV:
A kind of electronic equipment provided in an embodiment of the present invention, as shown in figure 4, electronic equipment 4 includes memory 41, processor
42, the computer program that can be run on the processor is stored in the memory, the processor executes the calculating
The step of method that above-described embodiment one or embodiment two provide is realized when machine program.
Referring to Fig. 4, electronic equipment 4 further includes:Bus 43 and communication interface 44, processor 42, communication interface 44 and storage
Device 41 is connected by bus 43;Processor 42 is for executing the executable module stored in memory 41, such as computer program.
Wherein, memory 41 may include high-speed random access memory (RAM, Random Access Memory),
May further include nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.By at least
One communication interface 44 (can be wired or wireless) realizes the communication between the system network element and at least one other network element
Connection can use internet, wide area network, local network, Metropolitan Area Network (MAN) etc..
Bus 43 can be isa bus, pci bus or eisa bus etc..The bus can be divided into address bus, data
Bus, controlling bus etc..Only indicated with a four-headed arrow for ease of indicating, in Fig. 4, it is not intended that an only bus or
A type of bus.
Wherein, memory 41 is for storing program, and the processor 42 executes the journey after receiving and executing instruction
Sequence, the method performed by device that the stream process that aforementioned any embodiment of the embodiment of the present invention discloses defines can be applied to handle
In device 42, or realized by processor 42.
Processor 42 may be a kind of IC chip, the processing capacity with signal.During realization, above-mentioned side
Each step of method can be completed by the integrated logic circuit of the hardware in processor 42 or the instruction of software form.Above-mentioned
Processor 42 can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network
Processor (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal
Processing, abbreviation DSP), application-specific integrated circuit (Application Specific Integrated Circuit, referred to as
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, abbreviation FPGA) or other are programmable
Logical device, discrete gate or transistor logic, discrete hardware components.It may be implemented or execute in the embodiment of the present invention
Disclosed each method, step and logic diagram.General processor can be microprocessor or the processor can also be to appoint
What conventional processor etc..The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware decoding processing
Device executes completion, or in decoding processor hardware and software module combination execute completion.Software module can be located at
Machine memory, flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register etc. are originally
In the storage medium of field maturation.The storage medium is located at memory 41, and processor 42 reads the information in memory 41, in conjunction with
Its hardware completes the step of above method.
Embodiment five:
It is provided in an embodiment of the present invention it is a kind of with processor can perform non-volatile program code it is computer-readable
Medium, said program code make the method that the processor executes above-described embodiment one or embodiment two provides.
Unless specifically stated otherwise, the opposite step of the component and step that otherwise illustrate in these embodiments, digital table
It is not limit the scope of the invention up to formula and numerical value.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description
It with the specific work process of device, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In all examples being illustrated and described herein, any occurrence should be construed as merely illustrative, without
It is as limitation, therefore, other examples of exemplary embodiment can have different values.
It should be noted that:Similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined, then it further need not be defined and explained in subsequent attached drawing in a attached drawing.
Flow chart and block diagram in attached drawing show the system, method and computer journey of multiple embodiments according to the present invention
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part for a part for one module, section or code of table, the module, section or code includes one or more uses
The executable instruction of the logic function as defined in realization.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two continuous boxes can essentially base
Originally it is performed in parallel, they can also be executed in the opposite order sometimes, this is depended on the functions involved.It is also noted that
It is the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, can uses and execute rule
The dedicated hardware based system of fixed function or action is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
The computer-readable medium of the non-volatile program code provided in an embodiment of the present invention that can perform with processor,
Message processing method, device and the electronic equipment technical characteristic having the same provided with above-described embodiment, so can also solve
Certainly identical technical problem reaches identical technique effect.
In addition, in the description of the embodiment of the present invention unless specifically defined or limited otherwise, term " installation ", " phase
Even ", " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or be integrally connected;It can
Can also be electrical connection to be mechanical connection;It can be directly connected, can also indirectly connected through an intermediary, Ke Yishi
Connection inside two elements.For the ordinary skill in the art, above-mentioned term can be understood at this with concrete condition
Concrete meaning in invention.
The computer program product for the progress message processing method that the embodiment of the present invention is provided, including store processor
The computer readable storage medium of executable non-volatile program code, the instruction that said program code includes can be used for executing
Method described in previous methods embodiment, specific implementation can be found in embodiment of the method, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with
It realizes by another way.The apparatus embodiments described above are merely exemplary, for example, the division of the unit,
Only a kind of division of logic function, formula that in actual implementation, there may be another division manner, in another example, multiple units or component can
To combine or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or beg for
The mutual coupling, direct-coupling or communication connection of opinion can be by some communication interfaces, device or unit it is indirect
Coupling or communication connection can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be expressed in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic disc or CD.
Finally it should be noted that:Embodiment described above, only specific implementation mode of the invention, to illustrate the present invention
Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair
It is bright to be described in detail, it will be understood by those of ordinary skill in the art that:Any one skilled in the art
In the technical scope disclosed by the present invention, it can still modify to the technical solution recorded in previous embodiment or can be light
It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make
The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention, should all cover the protection in the present invention
Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. a kind of message processing method, which is characterized in that be applied to web-transporting device, this method includes:
Obtain current default average loss ratio;
Obtain each type of service it is corresponding enter message ratio and priority weighting ratio;
According to it is described enter message ratio, the priority weighting ratio and the default average loss ratio, obtain each service class
The corresponding loss ratio of type;
According to the corresponding type of service of message, preceding dropping packets are dispatched in message enqueue according to the loss ratio.
2. message processing method according to claim 1, which is characterized in that described to obtain current default average loss ratio
Before, further include:
Obtain current queue length;
When the queue length is less than or equal to default Low threshold, then current default average loss ratio is 0%;
When the queue length is greater than or equal to default high threshold, then current default average loss ratio is 100%;
It is more than default Low threshold in the queue length and when less than default high threshold, then current default average loss ratio and institute
Queue length is stated to be proportionate.
3. message processing method according to claim 1, which is characterized in that each type of service of acquisition is corresponding to be entered to report
Before literary ratio and priority weighting ratio, further include:
Calculate the quantity of all messages of network transmission in preset time, and the message amount of each priority level;
By the message amount difference of each priority level divided by the quantity of all messages, each priority level is obtained
Enter message ratio.
4. message processing method according to claim 1, which is characterized in that each type of service of acquisition is corresponding to be entered to report
Before literary ratio and priority weighting ratio, further include:
Obtain the default weight coefficient of each priority level;
The sum for calculating all default weight coefficients, obtains total weight coefficient;
By the default weight coefficient difference of each priority level divided by total weight coefficient, each priority level is obtained
Priority weighting ratio.
5. message processing method according to claim 1, which is characterized in that enter message ratio, described described in the basis
Priority weighting ratio and the default average loss ratio, obtain the corresponding loss ratio of each type of service, specifically include:
When entering message ratio described in being greater than or equal in the priority weighting ratio, the loss ratio is 0%;
When entering message ratio described in being less than in the priority weighting ratio, it is based on described preset using default formula and averagely abandons
Rate calculates the loss ratio.
6. message processing method according to claim 5, which is characterized in that the default formula is:
Wherein, DpiFor loss ratio;IpiTo enter message ratio;WpiFor priority weighting ratio;DredFor default average loss ratio;k
Enter the quantity of the message type to be screened of message ratio less than described in for the priority weighting ratio;IpjIt is to be screened for jth kind
Message enters message ratio;WpjFor the priority weighting ratio of jth kind message to be screened.
7. a kind of message process device, which is characterized in that be applied to web-transporting device, the message process device includes:
First acquisition module, for obtaining current default average loss ratio;
Second acquisition module, for obtain each type of service it is corresponding enter message ratio and priority weighting ratio;
Computing module, for entering message ratio, the priority weighting ratio and the default average loss ratio according to,
Obtain the corresponding loss ratio of each type of service;
Execution module, for according to the corresponding type of service of message, being abandoned before message enqueue is dispatched according to the loss ratio
Message.
8. message process device according to claim 7, which is characterized in that the computing module is specifically used for:
When entering message ratio described in being greater than or equal in the priority weighting ratio, the loss ratio is 0%;
When entering message ratio described in being less than in the priority weighting ratio, it is based on described preset using default formula and averagely abandons
Rate calculates the loss ratio.
9. a kind of electronic equipment, including memory, processor, be stored in the memory to run on the processor
Computer program, which is characterized in that the processor realizes that the claims 1 to 6 are any when executing the computer program
Described in method the step of.
10. a kind of computer-readable medium for the non-volatile program code that can perform with processor, which is characterized in that described
Program code makes the processor execute described any the method for claim 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810295137.2A CN108600118B (en) | 2018-03-30 | 2018-03-30 | Message processing method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810295137.2A CN108600118B (en) | 2018-03-30 | 2018-03-30 | Message processing method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108600118A true CN108600118A (en) | 2018-09-28 |
CN108600118B CN108600118B (en) | 2022-09-09 |
Family
ID=63625439
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810295137.2A Active CN108600118B (en) | 2018-03-30 | 2018-03-30 | Message processing method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108600118B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110138610A (en) * | 2019-05-10 | 2019-08-16 | 新华三信息安全技术有限公司 | A kind of sending method and device of service message |
CN111385667A (en) * | 2018-12-27 | 2020-07-07 | 中国电信股份有限公司 | Video data processing method, device and computer readable storage medium |
CN113055306A (en) * | 2019-12-26 | 2021-06-29 | 北京华为数字技术有限公司 | Message forwarding method and related equipment |
CN114006731A (en) * | 2021-09-30 | 2022-02-01 | 新华三信息安全技术有限公司 | Network attack processing method, device, equipment and machine readable storage medium |
CN114760213A (en) * | 2021-01-15 | 2022-07-15 | 南通先进通信技术研究院有限公司 | Method for guaranteeing quality of service of sea area private network service application |
CN115002037A (en) * | 2022-05-31 | 2022-09-02 | 中国电信股份有限公司 | QoS guarantee method and device, network edge router and communication system |
CN115051954A (en) * | 2022-08-17 | 2022-09-13 | 北京左江科技股份有限公司 | High-capacity Ethernet message statistics speed limit structure based on FPGA Block Ram |
CN115801897A (en) * | 2022-12-20 | 2023-03-14 | 南京工程学院 | Dynamic message processing method for edge proxy |
CN117527928A (en) * | 2023-11-07 | 2024-02-06 | 河北燃气有限公司 | SCADA-based data processing method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102638401A (en) * | 2012-03-27 | 2012-08-15 | 中国科学院声学研究所 | Bandwidth allocation method of differentiated service system structure network |
CN103327541A (en) * | 2013-05-20 | 2013-09-25 | 北京邮电大学 | Service unloading method based on different QoS |
US20140341026A1 (en) * | 2013-05-16 | 2014-11-20 | Cisco Technology, Inc. | Enhancing performance of rapid channel changes and other playback positioning changes in adaptive streaming |
CN105490962A (en) * | 2015-12-04 | 2016-04-13 | 哈尔滨工程大学 | QoS management method based on OpenFlow network |
CN107426111A (en) * | 2017-05-27 | 2017-12-01 | 东南大学 | Hardware achievable jamming control method and device based on wred algorithm |
-
2018
- 2018-03-30 CN CN201810295137.2A patent/CN108600118B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102638401A (en) * | 2012-03-27 | 2012-08-15 | 中国科学院声学研究所 | Bandwidth allocation method of differentiated service system structure network |
US20140341026A1 (en) * | 2013-05-16 | 2014-11-20 | Cisco Technology, Inc. | Enhancing performance of rapid channel changes and other playback positioning changes in adaptive streaming |
CN103327541A (en) * | 2013-05-20 | 2013-09-25 | 北京邮电大学 | Service unloading method based on different QoS |
CN105490962A (en) * | 2015-12-04 | 2016-04-13 | 哈尔滨工程大学 | QoS management method based on OpenFlow network |
CN107426111A (en) * | 2017-05-27 | 2017-12-01 | 东南大学 | Hardware achievable jamming control method and device based on wred algorithm |
Non-Patent Citations (2)
Title |
---|
REKHA CHAKRAVARTHI: "IPD: Intelligent Packet Dropping Algorithm for", 《TRENDZ IN INFORMATION SCIENCES & COMPUTING》 * |
朱健等: "面向多终端多业务优先级模型的队列管理算法", 《第四届中国指挥控制大会论文集》 * |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111385667A (en) * | 2018-12-27 | 2020-07-07 | 中国电信股份有限公司 | Video data processing method, device and computer readable storage medium |
CN110138610B (en) * | 2019-05-10 | 2022-04-22 | 新华三信息安全技术有限公司 | Service message sending method and device |
CN110138610A (en) * | 2019-05-10 | 2019-08-16 | 新华三信息安全技术有限公司 | A kind of sending method and device of service message |
CN113055306B (en) * | 2019-12-26 | 2022-10-28 | 北京华为数字技术有限公司 | Message forwarding method and related equipment |
CN113055306A (en) * | 2019-12-26 | 2021-06-29 | 北京华为数字技术有限公司 | Message forwarding method and related equipment |
CN114760213A (en) * | 2021-01-15 | 2022-07-15 | 南通先进通信技术研究院有限公司 | Method for guaranteeing quality of service of sea area private network service application |
CN114006731A (en) * | 2021-09-30 | 2022-02-01 | 新华三信息安全技术有限公司 | Network attack processing method, device, equipment and machine readable storage medium |
CN114006731B (en) * | 2021-09-30 | 2023-12-26 | 新华三信息安全技术有限公司 | Network attack processing method, device, equipment and machine-readable storage medium |
CN115002037A (en) * | 2022-05-31 | 2022-09-02 | 中国电信股份有限公司 | QoS guarantee method and device, network edge router and communication system |
CN115051954B (en) * | 2022-08-17 | 2022-11-11 | 北京左江科技股份有限公司 | High-capacity Ethernet message statistics speed limiting device based on FPGA Block Ram |
CN115051954A (en) * | 2022-08-17 | 2022-09-13 | 北京左江科技股份有限公司 | High-capacity Ethernet message statistics speed limit structure based on FPGA Block Ram |
CN115801897A (en) * | 2022-12-20 | 2023-03-14 | 南京工程学院 | Dynamic message processing method for edge proxy |
CN115801897B (en) * | 2022-12-20 | 2024-05-24 | 南京工程学院 | Message dynamic processing method of edge proxy |
CN117527928A (en) * | 2023-11-07 | 2024-02-06 | 河北燃气有限公司 | SCADA-based data processing method and system |
CN117527928B (en) * | 2023-11-07 | 2024-05-10 | 河北燃气有限公司 | SCADA-based data processing method and system |
Also Published As
Publication number | Publication date |
---|---|
CN108600118B (en) | 2022-09-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108600118A (en) | Message processing method, device and electronic equipment | |
US7522523B2 (en) | Assigning packet queue priority | |
Bonald et al. | Internet and the Erlang formula | |
CN110636011A (en) | Intelligent scheduling method and device for power communication service data stream and terminal equipment | |
CN101547159B (en) | Method and device for preventing network congestion | |
EP2761826B1 (en) | Attribution of congestion contributions | |
Abualhaj et al. | FLRED: an efficient fuzzy logic based network congestion control method | |
CN107431667A (en) | Packet is dispatched in the network device | |
JP4893646B2 (en) | BAND CONTROL DEVICE AND BAND CONTROL METHOD | |
CN103795640A (en) | Flow supervision method and device | |
Kumar et al. | A delay-optimal packet scheduler for M2M uplink | |
CN105577563B (en) | flow management method | |
CN113765812A (en) | Method and device for marking message | |
CN107332785A (en) | A kind of effective discharge control method based on dynamic duty threshold value | |
Jiang et al. | CLTCP: an adaptive TCP congestion control algorithm based on congestion level | |
Liu et al. | On fluid queueing systems with strict priority | |
US20230216805A1 (en) | Method of Managing Data Transmission for Ensuring Per-Flow Fair Bandwidth Sharing | |
EP4181479A1 (en) | Method for identifying flow, and apparatus | |
US11489904B2 (en) | Poor-QoE assessment method and related device | |
Karamchati et al. | A novel architecture to enhance Quality of Service in IP networks | |
US8000237B1 (en) | Method and apparatus to provide minimum resource sharing without buffering requests | |
Domańska et al. | The influence of traffic self-similarity on QoS mechanisms | |
Yamagaki et al. | DMFQ: Hardware design of Flow-based queue management scheme for improving the fairness | |
Ceco et al. | Performance comparison of active queue management algorithms | |
Lin et al. | Location-based time-dependent smart data pricing by SDN |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |