CN112953848A - Strict priority based traffic supervision method, system and equipment - Google Patents

Strict priority based traffic supervision method, system and equipment Download PDF

Info

Publication number
CN112953848A
CN112953848A CN202110270204.7A CN202110270204A CN112953848A CN 112953848 A CN112953848 A CN 112953848A CN 202110270204 A CN202110270204 A CN 202110270204A CN 112953848 A CN112953848 A CN 112953848A
Authority
CN
China
Prior art keywords
token
data frame
token bucket
priority
updating
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
Application number
CN202110270204.7A
Other languages
Chinese (zh)
Other versions
CN112953848B (en
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.)
Xidian University
Original Assignee
Xidian University
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 Xidian University filed Critical Xidian University
Priority to CN202110270204.7A priority Critical patent/CN112953848B/en
Publication of CN112953848A publication Critical patent/CN112953848A/en
Application granted granted Critical
Publication of CN112953848B publication Critical patent/CN112953848B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/215Flow control; Congestion control using token-bucket
    • 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/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention belongs to the technical field of flow supervision, and discloses a flow supervision method, a system and equipment based on strict priority, wherein the flow supervision method based on the strict priority comprises the following steps: initializing a token bucket algorithm parameter and establishing a mapping table; updating the token bucket parameters to generate a service sending grade; reading a data frame to be supervised and extracting the priority; judging whether the priority is not lower than the service sending level; if yes, outputting the data frame, and if not, discarding the data frame. The invention corresponds to the priority service by dividing the multi-level threshold, and can realize flexible expansion according to the specific requirements; the method is realized by adopting a single token bucket algorithm, and the data frame is stored without extra consumption of storage resources, so that the structure is simple, and less resources are occupied; the method is suitable for flow control scenes with strict priority distinction, and can realize the absolute priority of high priority to bandwidth; compared with the flow shaping method, the invention does not consume cache resources and can provide better time delay performance.

Description

Strict priority based traffic supervision method, system and equipment
Technical Field
The invention belongs to the technical field of traffic supervision, and particularly relates to a traffic supervision method, system and equipment based on strict priority.
Background
In recent years, with the continuous expansion of internet scale and the rapid increase of the number of network users, the diversity and the speed of network traffic services have been greatly developed, and different traffic services have brought higher network service quality requirements. The switch, as a basic device for network access and switching, while being capable of carrying larger and larger switching capacity, faces a problem of how to use fewer resources to meet higher quality of service requirements. Flow control enables users to transmit data at a specified reasonable rate, and is an efficient method for preventing congestion of a switching network and effectively improving network performance. Different flow control is realized for the services with different priorities, and the service quality of the services with high priority can be better met when the network is congested.
The existing back pressure control method adopted by the flow shaping realizes the adaptation of different equipment rates and the flow control, but the flow control method can cause the transmitted data frame to have larger time delay and is not suitable for transmitting data with stronger real-time requirements such as voice, live broadcast and the like, and meanwhile, queue cache needs to be set for the transmitted priority service to realize the differentiation of each priority service flow of an output port, and more cache resources need to be consumed.
And many existing traffic supervision methods are realized by depending on a plurality of token buckets, so that in a traffic control scene only needing to distinguish strict priorities, the complexity is improved, and resources are additionally consumed.
The patent document "a method and device for supervising service traffic" (publication number CN 101674247B) applied by zhongxing communication corporation discloses a method and device for supervising service traffic. The method comprises the following steps: the method comprises the steps of carrying out single-flow supervision on each user token bucket to be supervised by user configuration, carrying out total-flow supervision on all user token buckets to be supervised, and associating the token adding rate of the total token bucket with the sum of the token adding rates of all user token buckets. When the token adding rate of the total token bucket is configured to be equal to the sum of the token adding rates of all the user token buckets, after a user message to be supervised arrives, if the number of tokens in the user token bucket of the user and/or the number of tokens in the total token bucket is judged to be larger than or equal to the number of the arrived message, the arrived message is forwarded; otherwise, the message is discarded. The invention can fully utilize the bandwidth resources or fairly distribute the bandwidth resources on the premise of carrying out necessary limitation on the bandwidth resources of the users.
The method is used for the flow control scene needing to distinguish strict priority, and has the following defects:
1. a plurality of token buckets are required to be set according to the number of the priority levels, and the capacity and the token adding rate of each token bucket are required to be reasonably set, so that the resource occupation is large, and the complexity is high;
2. strict priority cannot be realized, that is, the method can only allocate different bandwidths according to the priority, and cannot realize the absolute occupation of bandwidth resources by high priority when the traffic is congested.
Through the above analysis, the problems and defects of the prior art are as follows:
(1) the original back pressure control method adopted by the flow shaping can cause that the transmitted data frame has larger time delay and is not suitable for transmitting data with stronger real-time requirements such as voice, live broadcast and the like, and meanwhile, queue cache needs to be set for the transmitted priority service to realize the differentiation of each priority service flow of an output port, and more cache resources need to be consumed.
(2) Many existing traffic supervision methods are implemented by means of a plurality of token buckets, and in a traffic control scene only needing to distinguish strict priorities, complexity is improved, and resources are additionally consumed.
(3) The existing method for supervising the service traffic needs to set a plurality of token buckets according to the number of the priority levels, and needs to reasonably set the capacity and the token adding rate of each token bucket, so that the resource occupation is more, and the complexity is higher.
(4) The existing method for supervising the service flow cannot realize strict priority, namely the method can only distribute different bandwidths according to the priority and cannot realize the absolute occupation of bandwidth resources by high priority when the flow is congested.
The difficulty in solving the above problems and defects is: the method and the device need to use a smaller number of token buckets to realize supervision and differentiation of multi-priority services under the same output port, have the advantages of simple structure as far as possible, easy implementation and guarantee of time delay performance of real-time service transmission.
The significance of solving the problems and the defects is as follows: the method has the advantages that the corresponding relation between the threshold and the priority is established by dividing the multi-level threshold for the single token bucket, and the traffic supervision mode is adopted, so that the strict priority distinguishing function of the massive service queues is easily realized, the bandwidth occupation of high-priority services and the time delay performance of real-time services are ensured, the structure is simple, and the resource consumption is greatly reduced.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a traffic supervision method, a traffic supervision system and traffic supervision equipment based on strict priority.
The invention is realized in such a way that a traffic supervision method based on strict priority comprises the following steps:
initializing a token bucket algorithm parameter and establishing a mapping table; by initializing the algorithm parameters of the token bucket and setting the mapping relation between the actual requirements and the parameters of the related token bucket, a token bucket model which accords with the actual flow control requirements is established, and basic guarantee is provided for the correct implementation of the subsequent functions;
step two, updating token bucket parameters and generating a service sending grade; updating the state of the token bucket model by updating the parameters and generating the operation of the service sending level according to the current parameters, maintaining the normal operation of the token bucket model, and simultaneously providing a judgment basis of strict priority and flow supervision for the step four;
reading a data frame to be supervised, and extracting the priority; through reading the data frame to be supervised and extracting the operation of priority from the data frame, a judgment basis and an actual operation object are provided for the fourth step, and a function of distinguishing the priority of the flow is embodied;
step four, judging whether the priority is not lower than the service sending level; if yes, outputting the data frame, and if not, discarding the data frame. And through the judgment and the specific execution operation, the judgment is completed by using the conditions in the step two and the step three, the output or discarding operation is carried out on the actual operation object in the step three, and the traffic supervision function of strict priority differentiation of the actual traffic is executed and completed. If the priority is not lower than the service sending level, besides the operation of outputting the data frame, the remaining token number of the token bucket in the token bucket parameter needs to be updated, that is, the parameter is reduced by the length of the sending data frame
Further, in step one, initializing the token bucket algorithm parameters and establishing a mapping table includes:
presetting various parameters of a token bucket algorithm rule; the method comprises the steps of firstly setting a token peak value adding rate and a longest data frame length according to requirements, then setting a maximum capacity of a token bucket and eight service sending grade threshold values according to the longest data frame length, wherein the eight threshold values are unequal, the maximum threshold value is smaller than the maximum capacity of the token bucket, the minimum threshold value is not smaller than the longest data frame length, and finally establishing a mapping relation table of a token adding rate gear and other token bucket parameters according to token bucket algorithm rule parameters.
Wherein the parameters of the token bucket algorithm rule at least comprise: maximum capacity of a token bucket, sending level thresholds of various services, token peak value adding rate and length of a longest data frame;
the token bucket parameters at least comprise a token adding period, a token adding quantity, a token period counter, a token bucket residual token quantity, a token adding rate gear and a token updating quantity;
the number of the service sending level thresholds is 8, the threshold values are not equal, the maximum capacity of the token bucket is not more than the maximum capacity of the token bucket, the minimum capacity of the token bucket is not less than the length of the longest data frame, and the service sending level thresholds are respectively correspondingly higher than eight service sending levels 8-1 from low to high according to the threshold values;
the number of the priority levels is 8, and the corresponding priority level numbers from low to high according to the priority levels are 0-7 respectively.
Further, in step two, the updating the token bucket parameter and generating the service sending level includes:
updating the token bucket parameters using the token bucket algorithm rule parameters, external input signals and the mapping relationship table; updating the token adding rate gear according to the external input signal, searching the mapping relation table according to the token adding gear and the token bucket algorithm rule parameters, wherein the searching result is used for updating the token adding period and the token adding quantity; and generating a service sending grade according to the parameters of the token bucket algorithm rule and the parameters of the token bucket, simultaneously acquiring a data frame to be supervised, acquiring the priority of the data frame, allowing the transmission of the data frame when the priority of the data frame is determined to be not lower than the service sending grade, and subtracting the number of tokens corresponding to the length of the data frame from the token bucket.
Further, the updating the token bucket parameters using the token bucket algorithm rule parameters, the external input signal and the mapping relation table includes:
(1) initializing and updating a token bucket to generate a service sending grade;
(2) and reading the data frame, and judging and transmitting according to the service transmission grade.
Further, in step (1), initializing and updating the token bucket, and generating a service transmission level, includes:
1) initializing the token bucket residual token number of the token bucket parameter according to the maximum token bucket capacity of the token bucket algorithm rule parameter, and simultaneously resetting the token cycle counter to zero;
2) updating the token adding rate gear by using the external input signal, searching the mapping relation table according to the token adding rate gear, and updating the token adding quantity and the token adding period;
2) judging whether the token period counter reaches the token adding period:
if yes, raising the token adding enabling signal, enabling the token period counter to return to zero, and executing the step 4);
if not, adding 1 to the token cycle counter, and executing the step 4);
4) judging whether the token adding enabling signal and a data frame length effective signal are simultaneously pulled high:
if yes, setting the token updating quantity as the number of the remaining tokens of the token bucket plus the token adding quantity minus the token deleting quantity, and executing the step 5), wherein the token bucket deleting quantity is the length of a data frame;
otherwise, judging whether the token adding enabling signal is pulled high:
if yes, setting the token updating quantity as the sum of the remaining token quantity of the token bucket and the token adding quantity, and executing step 5);
otherwise, judging whether the effective signal of the data frame length is pulled high:
if yes, setting the token updating quantity as the difference between the remaining token quantity and the token deleting quantity of the token bucket, and executing step 5);
otherwise, setting the updated token number as the residual token number of the token bucket, and executing the step 5);
5) judging whether the updated number of the tokens is larger than the maximum capacity of the token bucket:
if so, setting the token updating quantity as the maximum capacity of the token bucket, and updating the residual token quantity of the token bucket as the token updating quantity;
otherwise, updating the residual token number of the token bucket to the updated token number;
6) and sequentially judging the 8 service sending grade thresholds from high to low with the number of the remaining tokens in the token bucket, and setting the service sending grade as the grade corresponding to the current threshold when a certain service sending grade threshold is not higher than the number of the remaining tokens in the token bucket.
Further, in step (2), the reading the data frame, and determining and transmitting according to the service transmission level includes:
1) reading the data frame to be supervised, and extracting the priority from the data frame;
2) judging whether the priority is not lower than the service sending grade:
if yes, executing step 3);
otherwise, executing step 4);
3) continuously reading the data frame and outputting the data frame to a data bus, simultaneously increasing the length effective signal of the data frame, and setting the length of the data frame as the length of the currently transmitted data frame;
4) the data frame is continuously read but not output to the data bus.
Another object of the present invention is to provide a strict priority based traffic supervision system applying the strict priority based traffic supervision method, the strict priority based traffic supervision system comprising:
the initialization module is used for initializing the token bucket algorithm parameters and establishing a mapping table;
the updating module is used for updating the token bucket parameters and generating a service sending grade;
the priority extraction module is used for reading a data frame to be supervised and extracting the priority;
the judging module is used for judging whether the priority is not lower than the service sending level; if yes, outputting the data frame, and if not, discarding the data frame.
It is a further object of the invention to provide a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
initializing a token bucket algorithm parameter and establishing a mapping table;
updating the token bucket parameters to generate a service sending grade;
reading a data frame to be supervised and extracting the priority;
judging whether the priority is not lower than the service sending level; if yes, outputting the data frame, and if not, discarding the data frame.
It is another object of the present invention to provide a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
initializing a token bucket algorithm parameter and establishing a mapping table;
updating the token bucket parameters to generate a service sending grade;
reading a data frame to be supervised and extracting the priority;
judging whether the priority is not lower than the service sending level; if yes, outputting the data frame, and if not, discarding the data frame.
By combining all the technical schemes, the invention has the advantages and positive effects that: the flow supervision method based on strict priority corresponds to priority service by dividing a multi-level threshold, and flexible expansion can be realized according to specific requirements; the method is realized by adopting a single token bucket algorithm, and the data frame is stored without extra consumption of storage resources, so that the structure is simple, and less resources are occupied; the method is suitable for flow control scenes with strict priority distinction, and can realize the absolute priority of high priority to bandwidth.
The invention can realize the strict priority flow supervision of the flows of the plurality of priority queues. Compared with a flow shaping method, the method does not consume cache resources and can provide better time delay performance; compared with the existing traffic supervision method, the method can realize strict priority control on the multi-priority traffic of the same user by using the single token bucket, preferentially ensure the transmission of the high-priority traffic when the traffic is congested, and save the resource consumption.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a strict priority based traffic policing method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a strict priority based traffic policing method provided by an embodiment of the present invention.
FIG. 3 is a block diagram of a strict priority based traffic policing system according to an embodiment of the present invention;
in the figure: 1. initializing a module; 2. an update module; 3. a priority extraction module; 4. and a judging module.
Fig. 4 is a schematic diagram of a token bucket model introducing a multi-level threshold according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In view of the problems in the prior art, the present invention provides a method, a system and a device for traffic supervision based on strict priority, which are described in detail below with reference to the accompanying drawings.
As shown in fig. 1, a strict priority based traffic policing method provided by an embodiment of the present invention includes the following steps:
s101, initializing a token bucket algorithm parameter and establishing a mapping table;
s102, updating token bucket parameters and generating a service sending grade;
s103, reading a data frame to be supervised, and extracting priority;
s104, judging whether the priority is not lower than the service sending level; if yes, outputting the data frame, and if not, discarding the data frame.
A schematic diagram of a strict priority based traffic policing method provided by an embodiment of the present invention is shown in fig. 2.
As shown in fig. 3, the traffic policing system based on strict priority provided by the embodiment of the present invention includes:
the initialization module 1 is used for initializing the algorithm parameters of the token bucket and establishing a mapping table;
the updating module 2 is used for updating the token bucket parameters and generating a service sending grade;
the priority extraction module 3 is used for reading a data frame to be supervised and extracting the priority;
the judging module 4 is used for judging whether the priority is not lower than the service sending level; if yes, outputting the data frame, and if not, discarding the data frame.
The technical solution of the present invention will be further described with reference to the following explanation of terms.
Strict priority: algorithms that strictly differentiate between different priorities, in which high priority is absolutely prioritized over low priority;
flow supervision: the method is to discard the data packets exceeding a certain rate range in the monitored data flow, so as to ensure that the flow does not excessively occupy the network bandwidth.
A packet switch: and receiving the data frame and forwarding the data frame among different ports.
The data frame size is 64-1518 bytes.
The technical solution of the present invention will be further described with reference to the following examples.
Referring to fig. 2, the specific steps of the present invention for traffic supervision based on strict priority are as follows:
(1) presetting parameters of a token bucket algorithm rule, wherein a token peak value adding rate and a longest data frame length are firstly set according to requirements, then a token bucket maximum capacity and eight service sending level threshold values are set according to the longest data frame length, the eight threshold values are unequal, the maximum threshold value is smaller than the token bucket maximum capacity, the minimum threshold value is not lower than the longest data frame length, and finally a mapping relation table of a token adding rate gear and other token bucket parameters is established according to the token bucket algorithm rule parameter;
(2) updating the token bucket parameters by using the token bucket algorithm rule parameters, external input signals and the mapping relation table, wherein the token adding speed gear is updated according to the external input signals, the mapping relation table is searched according to the token adding gear and the token bucket algorithm rule parameters, and the searching result is used for updating the token adding period and the token adding quantity; and generating a service sending grade according to the parameters of the token bucket algorithm rule and the parameters of the token bucket, simultaneously acquiring a data frame to be supervised, acquiring the priority of the data frame, allowing the transmission of the data frame when the priority of the data frame is determined to be not lower than the service sending grade, and subtracting the number of tokens corresponding to the length of the data frame from the token bucket.
In step (1), the parameters of the token bucket algorithm rule at least include: maximum capacity of a token bucket, sending level thresholds of various services, token peak value adding rate and length of a longest data frame;
the token bucket parameters at least comprise a token adding period, a token adding quantity, a token period counter, a token bucket residual token quantity, a token adding rate gear and a token updating quantity.
The number of the service sending level thresholds is 8, the threshold values are not equal, the maximum capacity of the token bucket is not more than the maximum capacity of the token bucket, the minimum capacity of the token bucket is not less than the length of the longest data frame, and the service sending level thresholds are respectively correspondingly higher than eight service sending levels 8-1 from low to high according to the threshold values;
the number of the priority levels is 8, and the corresponding priority level numbers from low to high according to the priority levels are 0-7 respectively.
Wherein, the step (2) comprises two steps of the following parallel processing:
(1) initializing and updating the token bucket, generating a service sending grade:
(1a) initializing the token bucket residual token number of the token bucket parameter according to the maximum token bucket capacity of the token bucket algorithm rule parameter, and simultaneously resetting the token cycle counter to zero;
(1b) updating the token adding rate gear by using the external input signal, searching the mapping relation table according to the token adding rate gear, and updating the token adding quantity and the token adding period;
(1c) judging whether the token period counter reaches the token adding period:
if yes, raising the token adding enable signal, enabling the token period counter to return to zero, and executing (1 d);
if not, adding 1 to the token cycle counter, and executing (1 d);
(1d) judging whether the token adding enabling signal and a data frame length effective signal are simultaneously pulled high:
if yes, setting the token updating quantity as the number of the remaining tokens of the token bucket plus the token adding quantity minus the token deleting quantity, and executing (1e), wherein the token bucket deleting quantity is the length of a data frame;
otherwise, judging whether the token adding enabling signal is pulled high:
if yes, setting the token updating quantity as the sum of the remaining token quantity of the token bucket and the token adding quantity, and executing (1 e);
otherwise, judging whether the effective signal of the data frame length is pulled high:
if yes, setting the token updating quantity as the difference between the residual token quantity and the token deleting quantity of the token bucket, and executing (1 e);
otherwise, setting the token updating quantity as the residual token quantity of the token bucket, and executing (1 e);
(1e) judging whether the updated number of the tokens is larger than the maximum capacity of the token bucket:
if so, setting the token updating quantity as the maximum capacity of the token bucket, and updating the residual token quantity of the token bucket as the token updating quantity;
otherwise, updating the residual token number of the token bucket to the updated token number;
(1f) sequentially judging 8 service sending grade thresholds from high to low with the number of the remaining tokens in the token bucket, and setting the service sending grade as the grade corresponding to the current threshold when a certain service sending grade threshold is not higher than the number of the remaining tokens in the token bucket;
(2) reading the data frame, judging and sending according to the service sending grade:
(2a) reading the data frame to be supervised, and extracting the priority from the data frame;
(2b) judging whether the priority is not lower than the service sending grade:
if yes, executing (2 c);
otherwise, executing (2 d);
(2c) continuously reading the data frame and outputting the data frame to a data bus, simultaneously increasing the length effective signal of the data frame, and setting the length of the data frame as the length of the currently transmitted data frame;
(2d) the data frame is continuously read but not output to the data bus.
A token bucket model incorporating multi-level thresholds is shown in fig. 4.
The invention corresponds to the priority service by dividing the multi-level threshold, and can realize flexible expansion according to the specific requirements; the method is realized by adopting a single token bucket algorithm, and the data frame is stored without extra consumption of storage resources, so that the structure is simple, and less resources are occupied; the method is suitable for flow control scenes with strict priority distinction, and can realize the absolute priority of high priority to bandwidth.
The invention can realize the strict priority flow supervision of the flows of the plurality of priority queues. Compared with a flow shaping method, the method does not consume cache resources and can provide better time delay performance; compared with the existing traffic supervision method, the method can realize strict priority control on the multi-priority traffic of the same user by using the single token bucket, preferentially ensure the transmission of the high-priority traffic when the traffic is congested, and save the resource consumption.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When used in whole or in part, can be implemented in a computer program product that includes one or more computer instructions. When loaded or executed on a computer, cause the flow or functions according to embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.)). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the purpose of illustrating the present invention and the appended claims are not to be construed as limiting the scope of the invention, which is intended to cover all modifications, equivalents and improvements that are within the spirit and scope of the invention as defined by the appended claims.

Claims (9)

1. A strict priority based traffic supervision method, characterized in that the strict priority based traffic supervision method comprises:
initializing a token bucket algorithm parameter and establishing a mapping table;
updating the token bucket parameters to generate a service sending grade;
reading a data frame to be supervised and extracting the priority;
judging whether the priority is not lower than the service sending level; if yes, outputting the data frame, and if not, discarding the data frame.
2. The strict priority based traffic policing method of claim 1, wherein initializing token bucket algorithm parameters, establishing a mapping table, comprises: presetting various parameters of a token bucket algorithm rule; firstly, setting a token peak value adding rate and a longest data frame length according to requirements, then setting a maximum capacity of a token bucket and eight service sending grade threshold values according to the longest data frame length, wherein the eight threshold values are unequal, the maximum threshold value is smaller than the maximum capacity of the token bucket, the minimum threshold value is not smaller than the longest data frame length, and finally, establishing a mapping relation table of a token adding rate gear and other token bucket parameters according to the token bucket algorithm rule parameters;
wherein the parameters of the token bucket algorithm rule at least comprise: maximum capacity of a token bucket, sending level thresholds of various services, token peak value adding rate and length of a longest data frame;
the token bucket parameters at least comprise a token adding period, a token adding quantity, a token period counter, a token bucket residual token quantity, a token adding rate gear and a token updating quantity;
the number of the service sending level thresholds is 8, the threshold values are not equal, the maximum capacity of the token bucket is not more than the maximum capacity of the token bucket, the minimum capacity of the token bucket is not less than the length of the longest data frame, and the service sending level thresholds are respectively correspondingly higher than eight service sending levels 8-1 from low to high according to the threshold values;
the number of the priority levels is 8, and the corresponding priority level numbers from low to high according to the priority levels are 0-7 respectively.
3. The strict priority based traffic policing method of claim 1, wherein updating token bucket parameters to generate a traffic transmission level comprises: updating the token bucket parameters using the token bucket algorithm rule parameters, external input signals and the mapping relationship table; updating the token adding rate gear according to the external input signal, searching the mapping relation table according to the token adding gear and the token bucket algorithm rule parameters, wherein the searching result is used for updating the token adding period and the token adding quantity; and generating a service sending grade according to the parameters of the token bucket algorithm rule and the parameters of the token bucket, simultaneously acquiring a data frame to be supervised, acquiring the priority of the data frame, allowing the transmission of the data frame when the priority of the data frame is determined to be not lower than the service sending grade, and subtracting the number of tokens corresponding to the length of the data frame from the token bucket.
4. The strict priority based traffic policing method of claim 3, wherein said updating the token bucket parameters using the token bucket algorithm rule parameters, external input signals, and the mapping relationship table comprises:
(1) initializing and updating a token bucket to generate a service sending grade;
(2) and reading the data frame, and judging and transmitting according to the service transmission grade.
5. The strict priority based traffic policing method according to claim 4, wherein in step (1), initializing and updating the token bucket to generate the traffic transmission level comprises:
1) initializing the token bucket residual token number of the token bucket parameter according to the maximum token bucket capacity of the token bucket algorithm rule parameter, and simultaneously resetting the token cycle counter to zero;
2) updating the token adding rate gear by using the external input signal, searching the mapping relation table according to the token adding rate gear, and updating the token adding quantity and the token adding period;
2) judging whether the token period counter reaches the token adding period:
if yes, raising the token adding enabling signal, enabling the token period counter to return to zero, and executing the step 4);
if not, adding 1 to the token cycle counter, and executing the step 4);
4) judging whether the token adding enabling signal and a data frame length effective signal are simultaneously pulled high:
if yes, setting the token updating quantity as the number of the remaining tokens of the token bucket plus the token adding quantity minus the token deleting quantity, and executing the step 5), wherein the token bucket deleting quantity is the length of a data frame;
otherwise, judging whether the token adding enabling signal is pulled high:
if yes, setting the token updating quantity as the sum of the remaining token quantity of the token bucket and the token adding quantity, and executing step 5);
otherwise, judging whether the effective signal of the data frame length is pulled high:
if yes, setting the token updating quantity as the difference between the remaining token quantity and the token deleting quantity of the token bucket, and executing step 5);
otherwise, setting the updated token number as the residual token number of the token bucket, and executing the step 5);
5) judging whether the updated number of the tokens is larger than the maximum capacity of the token bucket:
if so, setting the token updating quantity as the maximum capacity of the token bucket, and updating the residual token quantity of the token bucket as the token updating quantity;
otherwise, updating the residual token number of the token bucket to the updated token number;
6) and sequentially judging the 8 service sending grade thresholds from high to low with the number of the remaining tokens in the token bucket, and setting the service sending grade as the grade corresponding to the current threshold when a certain service sending grade threshold is not higher than the number of the remaining tokens in the token bucket.
6. The strict priority based traffic supervision method according to claim 4, wherein in step (2), the reading the data frame, and determining and transmitting according to the service transmission level comprises:
1) reading the data frame to be supervised, and extracting the priority from the data frame;
2) judging whether the priority is not lower than the service sending grade:
if yes, executing step 3);
otherwise, executing step 4);
3) continuously reading the data frame and outputting the data frame to a data bus, simultaneously increasing the length effective signal of the data frame, and setting the length of the data frame as the length of the currently transmitted data frame;
4) the data frame is continuously read but not output to the data bus.
7. A strict priority based traffic supervision system implementing the strict priority based traffic supervision method according to any of claims 1 to 6, characterized in that the strict priority based traffic supervision system comprises:
the initialization module is used for initializing the token bucket algorithm parameters and establishing a mapping table;
the updating module is used for updating the token bucket parameters and generating a service sending grade;
the priority extraction module is used for reading a data frame to be supervised and extracting the priority;
the judging module is used for judging whether the priority is not lower than the service sending level; if yes, outputting the data frame, and if not, discarding the data frame.
8. A computer device, characterized in that the computer device comprises a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of:
initializing a token bucket algorithm parameter and establishing a mapping table;
updating the token bucket parameters to generate a service sending grade;
reading a data frame to be supervised and extracting the priority;
judging whether the priority is not lower than the service sending level; if yes, outputting the data frame, and if not, discarding the data frame.
9. A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
initializing a token bucket algorithm parameter and establishing a mapping table;
updating the token bucket parameters to generate a service sending grade;
reading a data frame to be supervised and extracting the priority;
judging whether the priority is not lower than the service sending level; if yes, outputting the data frame, and if not, discarding the data frame.
CN202110270204.7A 2021-03-12 2021-03-12 Traffic supervision method, system and equipment based on strict priority Active CN112953848B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110270204.7A CN112953848B (en) 2021-03-12 2021-03-12 Traffic supervision method, system and equipment based on strict priority

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110270204.7A CN112953848B (en) 2021-03-12 2021-03-12 Traffic supervision method, system and equipment based on strict priority

Publications (2)

Publication Number Publication Date
CN112953848A true CN112953848A (en) 2021-06-11
CN112953848B CN112953848B (en) 2023-05-02

Family

ID=76229624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110270204.7A Active CN112953848B (en) 2021-03-12 2021-03-12 Traffic supervision method, system and equipment based on strict priority

Country Status (1)

Country Link
CN (1) CN112953848B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113727394A (en) * 2021-08-31 2021-11-30 杭州迪普科技股份有限公司 Method and device for realizing shared bandwidth
CN113810306A (en) * 2021-09-07 2021-12-17 山石网科通信技术股份有限公司 Bandwidth allocation method and device, storage medium and processor
CN113950104A (en) * 2021-08-26 2022-01-18 西安空间无线电技术研究所 Satellite network service deterministic scheduling method based on dynamic period mapping
CN114338544A (en) * 2021-12-23 2022-04-12 中国航空工业集团公司西安航空计算技术研究所 Flow control method of FC switching network based on priority
CN114567601A (en) * 2022-03-02 2022-05-31 统信软件技术有限公司 Flow limiting method and system
CN114827040A (en) * 2022-03-25 2022-07-29 西安电子科技大学 Scheduling method for sending limited service plan

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1784867A (en) * 2003-03-21 2006-06-07 思科技术公司 Method for prioritasing access by an access point and for the implementation of a simple 802.11E HCF (hybrid coordination function)
US20060133279A1 (en) * 2004-12-21 2006-06-22 Cisco Technology, Inc. Hierarchical multi-rate multi-precedence policer
CN101051936A (en) * 2006-05-18 2007-10-10 华为技术有限公司 Business flow monitoring method and system
US20080159135A1 (en) * 2006-12-29 2008-07-03 Caram Bruce E Hierarchical virtual queuing
CN101317392A (en) * 2006-04-24 2008-12-03 华为技术有限公司 Access equipment and its bandwidth control method and apparatus
US20090010161A1 (en) * 2005-10-31 2009-01-08 Huawei Technologies Co., Ltd. Method for Ensuring Service Class of Packet Service and Method of Rate Limitation
CN101557348A (en) * 2009-05-25 2009-10-14 杭州华三通信技术有限公司 Message forwarding method and device based on token bucket
CN101674247A (en) * 2009-10-21 2010-03-17 中兴通讯股份有限公司 Method for supervising traffic flow and apparatus thereof
CN101753423A (en) * 2008-12-12 2010-06-23 华为技术有限公司 Method and device for managing traffic
CN101754057A (en) * 2009-12-11 2010-06-23 杭州钦钺科技有限公司 Data scheduling method used in EPON terminal system and based on absolute priority
CN101808033A (en) * 2010-03-09 2010-08-18 杭州华三通信技术有限公司 Method and apparatus for allocating reservation bandwidth of traffic
CN101997766A (en) * 2009-08-31 2011-03-30 中兴通讯股份有限公司 Method and system for limiting speed of token bucket based on priority
CN102404226A (en) * 2011-12-06 2012-04-04 烽火通信科技股份有限公司 Method for dispatching absolute priority of data frame based on 802.1 p under Linux system
CN106789721A (en) * 2017-03-24 2017-05-31 深圳市吉祥腾达科技有限公司 A kind of intelligent QOS method and system based on token bucket
CN109246031A (en) * 2018-11-01 2019-01-18 郑州云海信息技术有限公司 A kind of switch port queues traffic method and apparatus
CN110336756A (en) * 2019-07-05 2019-10-15 西安电子科技大学 Crossbar flow back-pressure control method with trunking function

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1784867A (en) * 2003-03-21 2006-06-07 思科技术公司 Method for prioritasing access by an access point and for the implementation of a simple 802.11E HCF (hybrid coordination function)
US20060133279A1 (en) * 2004-12-21 2006-06-22 Cisco Technology, Inc. Hierarchical multi-rate multi-precedence policer
US20090010161A1 (en) * 2005-10-31 2009-01-08 Huawei Technologies Co., Ltd. Method for Ensuring Service Class of Packet Service and Method of Rate Limitation
CN101317392A (en) * 2006-04-24 2008-12-03 华为技术有限公司 Access equipment and its bandwidth control method and apparatus
CN101051936A (en) * 2006-05-18 2007-10-10 华为技术有限公司 Business flow monitoring method and system
US20080159135A1 (en) * 2006-12-29 2008-07-03 Caram Bruce E Hierarchical virtual queuing
CN101753423A (en) * 2008-12-12 2010-06-23 华为技术有限公司 Method and device for managing traffic
CN101557348A (en) * 2009-05-25 2009-10-14 杭州华三通信技术有限公司 Message forwarding method and device based on token bucket
CN101997766A (en) * 2009-08-31 2011-03-30 中兴通讯股份有限公司 Method and system for limiting speed of token bucket based on priority
CN101674247A (en) * 2009-10-21 2010-03-17 中兴通讯股份有限公司 Method for supervising traffic flow and apparatus thereof
CN101754057A (en) * 2009-12-11 2010-06-23 杭州钦钺科技有限公司 Data scheduling method used in EPON terminal system and based on absolute priority
CN101808033A (en) * 2010-03-09 2010-08-18 杭州华三通信技术有限公司 Method and apparatus for allocating reservation bandwidth of traffic
CN102404226A (en) * 2011-12-06 2012-04-04 烽火通信科技股份有限公司 Method for dispatching absolute priority of data frame based on 802.1 p under Linux system
CN106789721A (en) * 2017-03-24 2017-05-31 深圳市吉祥腾达科技有限公司 A kind of intelligent QOS method and system based on token bucket
CN109246031A (en) * 2018-11-01 2019-01-18 郑州云海信息技术有限公司 A kind of switch port queues traffic method and apparatus
CN110336756A (en) * 2019-07-05 2019-10-15 西安电子科技大学 Crossbar flow back-pressure control method with trunking function

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
杨其钦: "校园网中基于令牌桶算法的流量控制研究", 《中国优秀硕士学位论文全文数据库(电子期刊)》, 31 October 2012 (2012-10-31) *
许冰晖: "基于分层令牌桶的通讯流量控制模型的设计", 《硅谷》 *
许冰晖: "基于分层令牌桶的通讯流量控制模型的设计", 《硅谷》, no. 11, 8 June 2009 (2009-06-08) *
赵晋南: "列车控制与服务网络流量调节算法研究", 《中国优秀硕士论文全文数据库(电子期刊)》 *
赵晋南: "列车控制与服务网络流量调节算法研究", 《中国优秀硕士论文全文数据库(电子期刊)》, 15 March 2020 (2020-03-15) *
赵晋南等: "动态令牌分配的TCSN多级令牌桶流量监管算法", 《计算机工程》 *
赵晋南等: "动态令牌分配的TCSN多级令牌桶流量监管算法", 《计算机工程》, no. 08, 27 September 2017 (2017-09-27) *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113950104A (en) * 2021-08-26 2022-01-18 西安空间无线电技术研究所 Satellite network service deterministic scheduling method based on dynamic period mapping
CN113950104B (en) * 2021-08-26 2024-02-09 西安空间无线电技术研究所 Satellite network service deterministic scheduling method based on dynamic period mapping
CN113727394A (en) * 2021-08-31 2021-11-30 杭州迪普科技股份有限公司 Method and device for realizing shared bandwidth
CN113727394B (en) * 2021-08-31 2023-11-21 杭州迪普科技股份有限公司 Method and device for realizing shared bandwidth
CN113810306A (en) * 2021-09-07 2021-12-17 山石网科通信技术股份有限公司 Bandwidth allocation method and device, storage medium and processor
CN114338544A (en) * 2021-12-23 2022-04-12 中国航空工业集团公司西安航空计算技术研究所 Flow control method of FC switching network based on priority
CN114338544B (en) * 2021-12-23 2024-01-12 中国航空工业集团公司西安航空计算技术研究所 Flow control method of FC switching network based on priority
CN114567601A (en) * 2022-03-02 2022-05-31 统信软件技术有限公司 Flow limiting method and system
CN114567601B (en) * 2022-03-02 2024-04-12 统信软件技术有限公司 Flow limiting method and system
CN114827040A (en) * 2022-03-25 2022-07-29 西安电子科技大学 Scheduling method for sending limited service plan
CN114827040B (en) * 2022-03-25 2024-02-06 西安电子科技大学 Scheduling method for planning and scheduling transmission limited service

Also Published As

Publication number Publication date
CN112953848B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN112953848B (en) Traffic supervision method, system and equipment based on strict priority
US7161907B2 (en) System and method for dynamic rate flow control
CN111181873B (en) Data transmission method, data transmission device, storage medium and electronic equipment
CN107404443B (en) Queue cache resource control method and device, server and storage medium
JP2006506845A (en) How to select a logical link for a packet in a router
US6504824B1 (en) Apparatus and method for managing rate band
WO2019109902A1 (en) Queue scheduling method and apparatus, communication device, and storage medium
CN112367270B (en) Method and equipment for sending message
CN111740922B (en) Data transmission method, device, electronic equipment and medium
CN113765812A (en) Method and device for marking message
CN112491573A (en) Network parameter configuration method and device
US10079769B1 (en) Methods and apparatus for implementing dynamic rate controllers using linked list of rate programs
WO2022174444A1 (en) Data stream transmission method and apparatus, and network device
US10084709B1 (en) Methods and apparatus for scheduling transmission of data in a network
CN110661731B (en) Message processing method and device
CN110708255B (en) Message control method and node equipment
CN113765796A (en) Flow forwarding control method and device
CN114531401A (en) Token bucket flow limiting method based on priority
CN115550263A (en) Active queue management method of network equipment and network equipment
CN114338545A (en) Traffic shaping method and device
CN114866490B (en) Named data network congestion control method and terminal
CN114157727B (en) Application method and device of TCP acceleration in OSU
CN113810305B (en) Message forwarding method, device, forwarding node and computer readable storage medium
CN117041166A (en) Congestion control method and device, switch and computer readable storage medium
WO2023226603A1 (en) Method and apparatus for inhibiting generation of congestion queue

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