CN112953848B - Traffic supervision method, system and equipment based on strict priority - Google Patents
Traffic supervision method, system and equipment based on strict priority Download PDFInfo
- Publication number
- CN112953848B CN112953848B CN202110270204.7A CN202110270204A CN112953848B CN 112953848 B CN112953848 B CN 112953848B CN 202110270204 A CN202110270204 A CN 202110270204A CN 112953848 B CN112953848 B CN 112953848B
- Authority
- CN
- China
- Prior art keywords
- token
- token bucket
- data frame
- parameters
- priority
- 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.)
- Active
Links
Images
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/215—Flow control; Congestion control using token-bucket
-
- 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
- H04L47/2425—Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
- H04L47/2433—Allocation of priorities to traffic types
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing 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 method, a system and equipment for flow supervision based on strict priority, wherein the method for flow supervision based on strict priority comprises the following steps: initializing algorithm parameters of a token bucket, and establishing a mapping table; updating token bucket parameters to generate service transmission grades; reading a data frame to be supervised, and extracting priority; judging whether the priority is not lower than the service transmission level; if yes, outputting the data frame, otherwise, discarding the data frame. The invention corresponds to priority service by dividing the multi-level threshold, and can realize flexible expansion according to specific requirements; the method is realized by adopting a single token bucket algorithm, and the data frames are stored without additionally consuming storage resources, so that the structure is simple, and the occupied resources are less; the method is suitable for flow control scenes with strict priority discrimination, and can realize absolute priority of high priority to bandwidth; compared with the flow shaping method, the method does not consume cache resources and can provide better time delay performance.
Description
Technical Field
The invention belongs to the technical field of flow supervision, and particularly relates to a method, a system and equipment for flow supervision based on strict priority.
Background
In recent years, with the continuous expansion of the internet scale and the rapid increase of the number of network users, the diversity and rate of network traffic service have also been greatly developed, and different traffic services have also brought about higher network service quality requirements. As a basic device for network access and switching, a switch is also faced with the problem of how to use fewer resources to meet higher quality of service requirements while being able to carry larger and larger switching capacities. The flow control can enable users to transmit data at a specified reasonable rate, and is an efficient method for preventing the congestion of a switching network and effectively improving the network performance. Different flow control is realized for the business with different priority, and the service quality of the business with high priority when the network is congested can be better satisfied.
The original back pressure control method adopted by the traffic shaping realizes the adaptation of different equipment rates and the control of traffic, but the traffic control method can lead to larger time delay of transmitted data frames, is not suitable for transmitting data with stronger real-time requirements such as voice, live broadcast and the like, and meanwhile, the queue cache is required to be set for the transmitted priority service so as to realize the distinction of each priority service flow of an output port and consume more cache resources.
Many existing flow supervision methods are realized by means of a plurality of token buckets, and in a flow control scene only needing to distinguish strict priorities, the complexity is improved, and the resources are additionally consumed.
The patent literature of the applied by the China communication stock, namely, "a method and a device for monitoring the service flow" (publication number CN 101674247B) discloses a method and a device for monitoring the service flow. The method comprises the following steps: the user token bucket is configured for each user to be supervised to perform single flow supervision, the total token bucket is configured for all users to be supervised to perform total flow supervision, and the token addition rate of the total token bucket is configured to be associated with the sum of the token addition rates of all user token buckets. When the token adding rate of the configured total token bucket is equal to the sum of the token adding rates of all user token buckets, after the 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 greater than or equal to the number of arriving messages, forwarding the arriving messages; otherwise, discarding the message. 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 solving the defects of a flow control scene needing strict priority, and comprises the following steps:
1. a plurality of token barrels are required to be set according to the number of the priorities, the capacity of each token barrel and the token adding rate are required to be reasonably set, the occupation of resources is more, and the complexity is higher;
2. strict priority cannot be realized, namely, the method can only allocate different bandwidths according to the priority, and the absolute occupation of bandwidth resources by high priority when traffic is congested cannot be realized.
Through the above analysis, the problems and defects existing in the prior art are as follows:
(1) The original back pressure control method adopted by the traffic shaping can lead to larger time delay of the transmitted data frame, is not suitable for transmitting data with stronger real-time requirements such as voice, live broadcast and the like, and meanwhile, the queue cache is required to be set for the transmitted priority service so as to realize the distinction of the service flows with each priority of the output port, and more cache resources are required to be consumed.
(2) Many existing flow supervision methods are implemented by means of a plurality of token buckets, and in a flow control scene only needing to distinguish strict priorities, the complexity is improved, and resources are additionally consumed.
(3) The existing method for supervising the service flow needs to set a plurality of token barrels according to the number of priority levels, and needs to reasonably set the capacity of each token barrel and the token adding rate, so that the resources are occupied more and the complexity is higher.
(4) The existing method for monitoring the service flow cannot realize strict priority, namely, 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 flow is congested.
The difficulty of solving the problems and the defects is as follows: the supervision and differentiation of multi-priority service under the same output port are realized by using a smaller number of token barrels, the structure is required to be as simple as possible, the implementation is easy, and the time delay performance of real-time service transmission is ensured.
The meaning of solving the problems and the defects is as follows: by dividing a single token bucket into multiple levels of thresholds, establishing a corresponding relation between the thresholds and priorities, and adopting a flow supervision mode, the method is beneficial to realizing the strict priority distinguishing function of massive service queues more easily, ensures the bandwidth occupation of high-priority services and the time delay performance of real-time services, has a simple structure, and greatly reduces the consumption of resources.
Disclosure of Invention
Aiming at the problems existing 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 monitoring method based on strict priority comprises the following steps:
initializing algorithm parameters of a token bucket, and establishing a mapping table; by initializing the algorithm parameters of the token bucket, setting the mapping relation between the actual requirements and the related token bucket parameters, a token bucket model meeting 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 to generate service transmission grades; updating parameters and generating operation of service transmission level according to the current parameters, so that the state of the token bucket model is updated, normal operation of the token bucket model is maintained, and meanwhile, a judgment basis of strict priority and flow supervision is provided for the fourth step;
step three, reading the data frame to be supervised, and extracting priority; the data frames to be supervised are read, and the operation of priority is extracted from the data frames, so that a judgment basis and an actual operation object are provided for the fourth step, and meanwhile, the function of distinguishing the priority of the flow is embodied;
judging whether the priority is not lower than the service transmission level; if yes, outputting the data frame, otherwise, discarding the data frame. And through judging and specifically executing the operation, the judgment is completed by using the conditions in the second step and the third step, the output or discarding operation is implemented on the actual operation object in the third step, and the flow supervision function of strictly prioritizing the actual flow is executed and completed. If judging priority is not lower than service transmission level, besides outputting data frame operation, it also needs to update the token bucket residual token number in token bucket parameter, i.e. subtracting the length of transmitted data frame from said parameter
Further, in the first step, initializing algorithm parameters of the token bucket, and establishing a mapping table, including:
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 token bucket maximum capacity and eight service transmission grade threshold values according to the longest data frame length, wherein the eight threshold values are respectively unequal, the maximum threshold value is smaller than the token bucket maximum capacity, the minimum value is not lower 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 token bucket, threshold of sending level of each service, adding rate of peak value of token, and length of longest data frame;
the token bucket parameters at least comprise token adding periods, token adding quantity, token period counters, token bucket residual token quantity, token adding rate gear and token updating quantity;
the service transmission grade thresholds are 8 in total, the threshold values are respectively unequal, the maximum capacity of the token bucket is not exceeded, the minimum capacity of the token bucket is not less than the longest data frame length, and the service transmission grade thresholds are respectively corresponding to eight service transmission grades 8-1 from high to low according to the threshold values from low to high;
the number of the priority is 8, and the priority numbers corresponding to the priority from low to high are respectively 0-7.
Further, in the second step, the updating the token bucket parameter generates a service transmission level, including:
updating the token bucket algorithm rule parameters, external input signals and the mapping relation table by using the token bucket algorithm rule parameters; the token adding rate gear is updated according to the external input signal, the mapping relation table is searched according to the token adding gear and the token bucket algorithm rule parameter, and the search result is used for updating the token adding period and the token adding quantity; generating a service transmission grade according to the parameters of the algorithm rule of the token bucket and the parameters of the token bucket, simultaneously acquiring a data frame to be supervised, acquiring the priority of the data frame, allowing transmission of the data frame when the priority of the data frame is not lower than the service transmission 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, external input signals, and the mapping relationship table includes:
(1) Initializing and updating a token bucket to generate a service transmission grade;
(2) And reading the data frame, judging and transmitting according to the service transmission grade.
Further, in step (1), the initializing and updating the token bucket, generating a service transmission level, includes:
1) Initializing the number of remaining tokens of the token bucket parameters according to the maximum capacity of the token bucket algorithm rule parameters, and simultaneously zeroing the token cycle counter;
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 or not:
if yes, pull Gao Lingpai adds the enabling signal, the token cycle counter is reset to zero, and step 4) is executed;
if not, the token cycle counter is increased by 1, and the step 4) is executed;
4) Judging whether the token adding enabling signal and the data frame length valid signal are pulled up simultaneously or not:
if yes, setting the token updating number as the number of the remaining tokens of the token bucket plus the number of the remaining tokens of the token bucket minus the number of the token deleting, and executing the step 5), wherein the number of the token bucket deleting is the length of the data frame;
otherwise, judging whether the token addition enabling signal is pulled high or not:
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 the step 5);
otherwise, judging whether the data frame length effective signal is pulled up or not:
if yes, setting the token updating quantity as the difference between the residual token quantity and the deleting quantity of the token bucket, and executing the step 5);
otherwise, setting the token updating quantity as the remaining token quantity of the token bucket, and executing the step 5);
5) Judging whether the token updating quantity is larger than the maximum capacity of the token bucket or not:
if yes, setting the token updating quantity as the maximum capacity of a 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 token updating number;
6) And judging the 8 service transmission grade thresholds with the number of the remaining tokens of the token bucket from high to low in sequence, and setting the service transmission grade as the grade corresponding to the current threshold when a certain service transmission grade threshold is not higher than the number of the remaining tokens of the token bucket.
Further, in step (2), the reading the data frame, judging 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 transmission level:
if yes, executing the step 3);
otherwise, executing the step 4);
3) Continuously reading the data frame and outputting the data frame to a data bus, simultaneously pulling up the data frame length effective signal, and setting the data frame length to be the length of the current transmission data frame;
4) The data frame continues to be read but is not output to the data bus.
Another object of the present invention is to provide a strict priority based traffic monitoring system applying the strict priority based traffic monitoring method, the strict priority based traffic monitoring system comprising:
the initialization module is used for initializing algorithm parameters of the token bucket and establishing a mapping table;
the updating module is used for updating the token bucket parameters and generating service transmission grades;
the priority extraction module is used for reading the data frames to be supervised and extracting the priority;
the judging module is used for judging whether the priority is not lower than the service sending grade; if yes, outputting the data frame, otherwise, discarding the data frame.
It is a further object of the present 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 algorithm parameters of a token bucket, and establishing a mapping table;
updating token bucket parameters to generate service transmission grades;
reading a data frame to be supervised, and extracting priority;
judging whether the priority is not lower than the service transmission level; if yes, outputting the data frame, otherwise, discarding the data frame.
Another object of the present invention is 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 algorithm parameters of a token bucket, and establishing a mapping table;
updating token bucket parameters to generate service transmission grades;
reading a data frame to be supervised, and extracting priority;
judging whether the priority is not lower than the service transmission level; if yes, outputting the data frame, otherwise, discarding the data frame.
By combining all the technical schemes, the invention has the advantages and positive effects that: the traffic supervision method based on strict priority provided by the invention corresponds to priority service by dividing the multi-level threshold, and can realize flexible expansion according to specific requirements; the method is realized by adopting a single token bucket algorithm, and the data frames are stored without additionally consuming storage resources, so that the structure is simple, and the occupied resources are less; the method is suitable for flow control scenes with strict priority division, 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 queues with multiple priorities. Compared with the flow shaping method, the method does not consume cache resources and can provide better time delay performance; compared with the existing flow supervision method, the method can realize strict priority control of multi-priority service flow under the same user by using the single token bucket, and the transmission of high-priority service flow is preferentially ensured when the flow is congested, so that the resource consumption is saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed 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 other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a strict priority-based traffic supervision method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a traffic supervision method based on strict priority according to an embodiment of the present invention.
FIG. 3 is a block diagram of a strict priority based flow supervision system according to an embodiment of the present invention;
in the figure: 1. initializing a module; 2. updating a module; 3. a priority extraction module; 4. and a judging module.
Fig. 4 is a schematic diagram of a token bucket model for introducing a multi-level threshold according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following examples in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Aiming at the problems existing in the prior art, the invention provides a traffic supervision method, a traffic supervision system and traffic supervision equipment based on strict priority, and the invention is described in detail below with reference to the accompanying drawings.
As shown in fig. 1, the traffic supervision method based on strict priority provided by the embodiment of the invention includes the following steps:
s101, initializing algorithm parameters of a token bucket, and establishing a mapping table;
s102, updating token bucket parameters to generate service transmission grades;
s103, reading a data frame to be supervised, and extracting priority;
s104, judging whether the priority is not lower than the service transmission level; if yes, outputting the data frame, otherwise, discarding the data frame.
The schematic diagram of the traffic supervision method based on strict priority provided by the embodiment of the invention is shown in fig. 2.
As shown in fig. 3, the traffic monitoring system based on strict priority provided in the embodiment of the present invention includes:
initializing a module 1, which is used for initializing algorithm parameters of a token bucket and establishing a mapping table;
the updating module 2 is used for updating the token bucket parameters and generating service transmission grades;
the priority extraction module 3 is used for reading the data frames to be supervised and extracting the priority;
a judging module 4, configured to judge whether the priority is not lower than the service transmission level; if yes, outputting the data frame, otherwise, discarding the data frame.
The technical scheme of the present invention is further described in conjunction with the term explanation.
Strict priority: an algorithm for strictly distinguishing different priorities, wherein a high priority is absolutely higher than a low priority;
and (3) flow supervision: the method belongs to one of the flow control methods in the technical field of communication, and discards the data packets exceeding a certain rate range in the supervised data flow so as to ensure that the flow does not excessively occupy the network bandwidth.
Packet switch: and receiving the data frame and forwarding among different ports.
The data frame size is 64-1518 bytes.
The technical scheme of the invention is further described below by combining the embodiments.
Referring to fig. 2, the specific steps of the present invention for traffic supervision based on strict priority are as follows:
(1) Setting various parameters of a token bucket algorithm rule in advance, wherein a token peak value adding rate and a longest data frame length are set according to requirements, then a token bucket maximum capacity and eight service transmission grade threshold values are set according to the longest data frame length, the eight threshold values are respectively unequal, the maximum threshold value is smaller than the token bucket maximum capacity, the minimum 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 parameters;
(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 rate 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 search result is used for updating the token adding period and the token adding quantity; generating a service transmission grade according to the parameters of the algorithm rule of the token bucket and the parameters of the token bucket, simultaneously acquiring a data frame to be supervised, acquiring the priority of the data frame, allowing transmission of the data frame when the priority of the data frame is not lower than the service transmission grade, and subtracting the number of tokens corresponding to the length of the data frame from the token bucket.
In the step (1), the parameters of the token bucket algorithm rule at least include: maximum capacity of token bucket, threshold of sending level of each service, adding rate of peak value of token, and length of longest data frame;
the token bucket parameters at least comprise token adding period, token adding quantity, token period counter, token bucket residual token quantity, token adding rate gear and token updating quantity.
The service transmission grade thresholds are 8 in total, the threshold values are respectively unequal, the maximum capacity of the token bucket is not exceeded, the minimum capacity of the token bucket is not less than the longest data frame length, and the service transmission grade thresholds are respectively corresponding to eight service transmission grades 8-1 from high to low according to the threshold values from low to high;
the number of the priority is 8, and the priority numbers corresponding to the priority from low to high are respectively 0-7.
Wherein, the step (2) comprises the following two steps of parallel processing:
(1) Initializing and updating a token bucket, and generating a service transmission grade:
(1a) Initializing the number of remaining tokens of the token bucket parameters according to the maximum capacity of the token bucket algorithm rule parameters, and simultaneously zeroing the token cycle counter;
(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 or not:
if yes, pull Gao Lingpai adds an enable signal, the token cycle counter is zeroed, and (1 d) is performed;
if not, adding 1 to the token cycle counter, and executing (1 d);
(1d) Judging whether the token adding enabling signal and the data frame length valid signal are pulled up simultaneously or not:
if yes, setting the token updating number as the number of the remaining tokens of the token bucket plus the number of the tokens added minus the number of the tokens deleted, and executing (1 e), wherein the number of the tokens deleted is the length of the data frames;
otherwise, judging whether the token addition enabling signal is pulled high or not:
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 data frame length effective signal is pulled up or not:
if yes, setting the token updating quantity as the difference between the residual token quantity and the deleting quantity of the token bucket, and executing (1 e);
otherwise, setting the token updating quantity as the remaining token quantity of the token bucket, and executing (1 e);
(1e) Judging whether the token updating quantity is larger than the maximum capacity of the token bucket or not:
if yes, setting the token updating quantity as the maximum capacity of a 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 token updating number;
(1f) Judging the 8 service transmission grade thresholds with the number of the remaining tokens of the token bucket from high to low in sequence, and setting the service transmission grade as the grade corresponding to the current threshold when a certain service transmission grade threshold is not higher than the number of the remaining tokens of the token bucket;
(2) Reading the data frame, judging and transmitting according to the service transmission 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 transmission level:
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 pulling up the data frame length effective signal, and setting the data frame length to be the length of the current transmission data frame;
(2d) The data frame continues to be read but is not output to the data bus.
A token bucket model incorporating multi-level thresholding is shown in fig. 4.
The invention corresponds to priority service by dividing the multi-level threshold, and can realize flexible expansion according to specific requirements; the method is realized by adopting a single token bucket algorithm, and the data frames are stored without additionally consuming storage resources, so that the structure is simple, and the occupied resources are less; the method is suitable for flow control scenes with strict priority division, 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 queues with multiple priorities. Compared with the flow shaping method, the method does not consume cache resources and can provide better time delay performance; compared with the existing flow supervision method, the method can realize strict priority control of multi-priority service flow under the same user by using the single token bucket, and the transmission of high-priority service flow is preferentially ensured when the flow is congested, so that the resource consumption is saved.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When used in whole or in part, is implemented in the form of a computer program product comprising one or more computer instructions. When loaded or executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more 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)), etc.
The foregoing is merely illustrative of specific embodiments of the present invention, and the scope of the invention is not limited thereto, but any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention will be apparent to those skilled in the art within the scope of the present invention.
Claims (7)
1. The traffic monitoring method based on the strict priority is characterized by comprising the following steps:
initializing algorithm parameters of a token bucket, and establishing a mapping table;
updating token bucket parameters to generate service transmission grades;
reading a data frame to be supervised, and extracting priority;
judging whether the priority is not lower than the service transmission level; if yes, outputting a data frame, otherwise, discarding the data frame;
the initializing the algorithm parameters of the token bucket and establishing a mapping table comprises the following steps: 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 token bucket maximum capacity and eight service transmission grade threshold values according to the longest data frame length, wherein the eight threshold values are respectively unequal, the maximum threshold value is smaller than the token bucket maximum capacity, the minimum value is not lower 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 token bucket, threshold of sending level of each service, adding rate of peak value of token, and length of longest data frame;
the token bucket parameters at least comprise token adding periods, token adding quantity, token period counters, token bucket residual token quantity, token adding rate gear and token updating quantity;
the service transmission grade thresholds are 8 in total, the threshold values are respectively unequal, the maximum capacity of the token bucket is not exceeded, the minimum capacity of the token bucket is not less than the longest data frame length, and the service transmission grade thresholds are respectively corresponding to eight service transmission grades 8-1 from high to low according to the threshold values from low to high;
the number of the priority is 8, and the priority numbers corresponding to the priority from low to high are respectively 0-7;
the updating the token bucket parameters to generate a service transmission grade comprises the following steps: updating the token bucket algorithm rule parameters, external input signals and the mapping relation table by using the token bucket algorithm rule parameters; the token adding rate gear is updated according to the external input signal, the mapping relation table is searched according to the token adding rate gear and the token bucket algorithm rule parameter, and the search result is used for updating the token adding period and the token adding quantity; generating a service transmission grade according to the parameters of the algorithm rule of the token bucket and the parameters of the token bucket, simultaneously acquiring a data frame to be supervised, acquiring the priority of the data frame, allowing transmission of the data frame when the priority of the data frame is not lower than the service transmission grade, and subtracting the number of tokens corresponding to the length of the data frame from the token bucket.
2. The strict priority based traffic policing method of claim 1, wherein said updating said token bucket parameters using said token bucket algorithm rule parameters, external input signals and said mapping table comprises:
(1) Initializing and updating a token bucket to generate a service transmission grade;
(2) And reading the data frame, judging and transmitting according to the service transmission grade.
3. The strict priority based traffic policing method of claim 2, wherein in step (1), the initializing and updating token buckets, generating traffic transmission levels, comprises:
1) Initializing the number of remaining tokens of the token bucket parameters according to the maximum capacity of the token bucket algorithm rule parameters, and simultaneously zeroing the token cycle counter;
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 or not:
if yes, pull Gao Lingpai adds the enabling signal, the token cycle counter is reset to zero, and step 4) is executed;
if not, the token cycle counter is increased by 1, and the step 4) is executed;
4) Judging whether the token adding enabling signal and the data frame length valid signal are pulled up simultaneously or not:
if yes, setting the token updating number as the number of the remaining tokens of the token bucket plus the number of the remaining tokens of the token bucket minus the number of the token deleting, and executing the step 5), wherein the number of the token bucket deleting is the length of the data frame;
otherwise, judging whether the token addition enabling signal is pulled high or not:
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 the step 5);
otherwise, judging whether the data frame length effective signal is pulled up or not:
if yes, setting the token updating quantity as the difference between the residual token quantity and the deleting quantity of the token bucket, and executing the step 5);
otherwise, setting the token updating quantity as the remaining token quantity of the token bucket, and executing the step 5);
5) Judging whether the token updating quantity is larger than the maximum capacity of the token bucket or not:
if yes, setting the token updating quantity as the maximum capacity of a 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 token updating number;
6) And judging the 8 service transmission grade thresholds with the number of the remaining tokens of the token bucket from high to low in sequence, and setting the service transmission grade as the grade corresponding to the current threshold when a certain service transmission grade threshold is not higher than the number of the remaining tokens of the token bucket.
4. The strict priority based traffic policing method of claim 2, wherein in step (2), the reading the data frame, determining and transmitting according to the traffic 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 transmission level:
if yes, executing the step 3);
otherwise, executing the step 4);
3) Continuously reading the data frame and outputting the data frame to a data bus, simultaneously pulling up the data frame length effective signal, and setting the data frame length to be the length of the current transmission data frame;
4) The data frame continues to be read but is not output to the data bus.
5. A strict priority based traffic monitoring system implementing the strict priority based traffic monitoring method of any one of claims 1 to 4, characterized in that the strict priority based traffic monitoring system comprises:
the initialization module is used for initializing algorithm parameters of the token bucket and establishing a mapping table;
the updating module is used for updating the token bucket parameters and generating service transmission grades;
the priority extraction module is used for reading the data frames to be supervised and extracting the priority;
the judging module is used for judging whether the priority is not lower than the service sending grade; if yes, outputting a data frame, otherwise, discarding the data frame;
the traffic policing based on strict priority specifically includes:
(1) Setting various parameters of a token bucket algorithm rule in advance, wherein a token peak value adding rate and a longest data frame length are set according to requirements, then a token bucket maximum capacity and eight service transmission grade threshold values are set according to the longest data frame length, the eight threshold values are respectively unequal, the maximum threshold value is smaller than the token bucket maximum capacity, the minimum 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 parameters;
(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 rate 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 search result is used for updating the token adding period and the token adding quantity; generating a service transmission grade according to the parameters of the algorithm rule of the token bucket and the parameters of the token bucket, simultaneously acquiring a data frame to be supervised, acquiring the priority of the data frame, allowing transmission of the data frame when the priority of the data frame is not lower than the service transmission grade, and subtracting the number of tokens corresponding to the length of the data frame from the token bucket;
wherein, in (1), the parameters of the token bucket algorithm rule at least comprise: maximum capacity of token bucket, threshold of sending level of each service, adding rate of peak value of token, and length of longest data frame;
the token bucket parameters at least comprise token adding periods, token adding quantity, token period counters, token bucket residual token quantity, token adding rate gear and token updating quantity;
the service transmission grade thresholds are 8 in total, the threshold values are respectively unequal, the maximum capacity of the token bucket is not exceeded, the minimum capacity of the token bucket is not less than the longest data frame length, and the service transmission grade thresholds are respectively corresponding to eight service transmission grades 8-1 from high to low according to the threshold values from low to high;
the number of the priority is 8, and the priority numbers corresponding to the priority from low to high are respectively 0-7.
6. 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 algorithm parameters of a token bucket, and establishing a mapping table;
updating token bucket parameters to generate service transmission grades;
reading a data frame to be supervised, and extracting priority;
judging whether the priority is not lower than the service transmission level; if yes, outputting a data frame, otherwise, discarding the data frame;
the traffic policing based on strict priority specifically includes:
(1) Setting various parameters of a token bucket algorithm rule in advance, wherein a token peak value adding rate and a longest data frame length are set according to requirements, then a token bucket maximum capacity and eight service transmission grade threshold values are set according to the longest data frame length, the eight threshold values are respectively unequal, the maximum threshold value is smaller than the token bucket maximum capacity, the minimum 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 parameters;
(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 rate 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 search result is used for updating the token adding period and the token adding quantity; generating a service transmission grade according to the parameters of the algorithm rule of the token bucket and the parameters of the token bucket, simultaneously acquiring a data frame to be supervised, acquiring the priority of the data frame, allowing transmission of the data frame when the priority of the data frame is not lower than the service transmission grade, and subtracting the number of tokens corresponding to the length of the data frame from the token bucket;
wherein, in (1), the parameters of the token bucket algorithm rule at least comprise: maximum capacity of token bucket, threshold of sending level of each service, adding rate of peak value of token, and length of longest data frame;
the token bucket parameters at least comprise token adding periods, token adding quantity, token period counters, token bucket residual token quantity, token adding rate gear and token updating quantity;
the service transmission grade thresholds are 8 in total, the threshold values are respectively unequal, the maximum capacity of the token bucket is not exceeded, the minimum capacity of the token bucket is not less than the longest data frame length, and the service transmission grade thresholds are respectively corresponding to eight service transmission grades 8-1 from high to low according to the threshold values from low to high;
the number of the priority is 8, and the priority numbers corresponding to the priority from low to high are respectively 0-7.
7. A computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
initializing algorithm parameters of a token bucket, and establishing a mapping table;
updating token bucket parameters to generate service transmission grades;
reading a data frame to be supervised, and extracting priority;
judging whether the priority is not lower than the service transmission level; if yes, outputting a data frame, otherwise, discarding the data frame;
the traffic policing based on strict priority specifically includes:
(1) Setting various parameters of a token bucket algorithm rule in advance, wherein a token peak value adding rate and a longest data frame length are set according to requirements, then a token bucket maximum capacity and eight service transmission grade threshold values are set according to the longest data frame length, the eight threshold values are respectively unequal, the maximum threshold value is smaller than the token bucket maximum capacity, the minimum 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 parameters;
(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 rate 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 search result is used for updating the token adding period and the token adding quantity; generating a service transmission grade according to the parameters of the algorithm rule of the token bucket and the parameters of the token bucket, simultaneously acquiring a data frame to be supervised, acquiring the priority of the data frame, allowing transmission of the data frame when the priority of the data frame is not lower than the service transmission grade, and subtracting the number of tokens corresponding to the length of the data frame from the token bucket;
wherein, in (1), the parameters of the token bucket algorithm rule at least comprise: maximum capacity of token bucket, threshold of sending level of each service, adding rate of peak value of token, and length of longest data frame;
the token bucket parameters at least comprise token adding periods, token adding quantity, token period counters, token bucket residual token quantity, token adding rate gear and token updating quantity;
the service transmission grade thresholds are 8 in total, the threshold values are respectively unequal, the maximum capacity of the token bucket is not exceeded, the minimum capacity of the token bucket is not less than the longest data frame length, and the service transmission grade thresholds are respectively corresponding to eight service transmission grades 8-1 from high to low according to the threshold values from low to high;
the number of the priority is 8, and the priority numbers corresponding to the priority from low to high are respectively 0-7.
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 CN112953848A (en) | 2021-06-11 |
CN112953848B true 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) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113950104B (en) * | 2021-08-26 | 2024-02-09 | 西安空间无线电技术研究所 | Satellite network service deterministic scheduling method based on dynamic period mapping |
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 |
CN114338544B (en) * | 2021-12-23 | 2024-01-12 | 中国航空工业集团公司西安航空计算技术研究所 | Flow control method of FC switching network based on priority |
CN114567601B (en) * | 2022-03-02 | 2024-04-12 | 统信软件技术有限公司 | Flow limiting method and system |
CN114827040B (en) * | 2022-03-25 | 2024-02-06 | 西安电子科技大学 | Scheduling method for planning and scheduling transmission limited service |
Citations (7)
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) |
CN101317392A (en) * | 2006-04-24 | 2008-12-03 | 华为技术有限公司 | Access equipment and its bandwidth control method and apparatus |
CN101557348A (en) * | 2009-05-25 | 2009-10-14 | 杭州华三通信技术有限公司 | Message forwarding method and device based on token bucket |
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 |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7738382B2 (en) * | 2004-12-21 | 2010-06-15 | Cisco Technology, Inc. | Hierarchical multi-rate multi-precedence policer |
CN100433718C (en) * | 2005-10-31 | 2008-11-12 | 华为技术有限公司 | Method for ensuring data grouped business service grade and speed limiting method |
CN100502315C (en) * | 2006-05-18 | 2009-06-17 | 华为技术有限公司 | Business flow monitoring method and system |
US7826358B2 (en) * | 2006-12-29 | 2010-11-02 | Ellacoya Networks, Inc. | Hierarchical virtual queuing |
CN101753423A (en) * | 2008-12-12 | 2010-06-23 | 华为技术有限公司 | Method and device for managing traffic |
CN101997766B (en) * | 2009-08-31 | 2012-09-05 | 中兴通讯股份有限公司 | Method and system for limiting speed of token bucket based on priority |
CN101674247B (en) * | 2009-10-21 | 2015-01-28 | 中兴通讯股份有限公司 | Method for supervising traffic flow and apparatus thereof |
CN109246031A (en) * | 2018-11-01 | 2019-01-18 | 郑州云海信息技术有限公司 | A kind of switch port queues traffic method and apparatus |
CN110336756B (en) * | 2019-07-05 | 2022-04-05 | 西安电子科技大学 | Crossbar flow back pressure control method with port convergence function |
-
2021
- 2021-03-12 CN CN202110270204.7A patent/CN112953848B/en active Active
Patent Citations (7)
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) |
CN101317392A (en) * | 2006-04-24 | 2008-12-03 | 华为技术有限公司 | Access equipment and its bandwidth control method and apparatus |
CN101557348A (en) * | 2009-05-25 | 2009-10-14 | 杭州华三通信技术有限公司 | Message forwarding method and device based on token bucket |
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 |
Non-Patent Citations (3)
Title |
---|
列车控制与服务网络流量调节算法研究;赵晋南;《中国优秀硕士论文全文数据库(电子期刊)》;20200315;全文 * |
动态令牌分配的TCSN多级令牌桶流量监管算法;赵晋南等;《计算机工程》;20170927(第08期);全文 * |
基于分层令牌桶的通讯流量控制模型的设计;许冰晖;《硅谷》;20090608(第11期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112953848A (en) | 2021-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112953848B (en) | Traffic supervision method, system and equipment based on strict priority | |
US8311049B2 (en) | Method and device for scheduling packets for routing in a network with implicit determination of packets to be treated as priority | |
US20030169688A1 (en) | System and method for dynamic rate flow control | |
CN111355669A (en) | Method, device and system for controlling network congestion | |
WO2001005107A1 (en) | Apparatus and method to minimize congestion in an output queuing switch | |
CN111181873B (en) | Data transmission method, data transmission device, storage medium and electronic equipment | |
WO1998030061A1 (en) | Method and system for quality of service assessment for multimedia traffic under aggregate traffic conditions | |
CN107404443B (en) | Queue cache resource control method and device, server and storage medium | |
CN110086728B (en) | Method for sending message, first network equipment and computer readable storage medium | |
JP2006506845A (en) | How to select a logical link for a packet in a router | |
WO2021103706A1 (en) | Data packet sending control method, model training method, device, and system | |
US6504824B1 (en) | Apparatus and method for managing rate band | |
CN114039918A (en) | Information age optimization method and device, computer equipment and storage medium | |
US8867353B2 (en) | System and method for achieving lossless packet delivery in packet rate oversubscribed systems | |
WO2021098730A1 (en) | Switching network congestion management method and apparatus, device, and storage medium | |
CN106792905B (en) | Message processing method and base station | |
CN110247858A (en) | A kind of data uploading method and system based on DPI | |
CN111740922B (en) | Data transmission method, device, electronic equipment and medium | |
CN104426796A (en) | Congestion avoiding method and apparatus of router | |
CN112491573A (en) | Network parameter configuration method and device | |
WO2023274006A1 (en) | Active queue management method for network device and network device | |
CN113904994B (en) | Method for uniformly reporting big data of home gateway to platform | |
US10079769B1 (en) | Methods and apparatus for implementing dynamic rate controllers using linked list of rate programs | |
US10084709B1 (en) | Methods and apparatus for scheduling transmission of data in a network | |
CN114745333A (en) | Adaptive flow control method of IMS (IP multimedia subsystem) |
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 |