Traffic shaping method and device based on synchronous and asynchronous fusion of time reference

By adopting a time reference-based synchronous and asynchronous converged traffic shaping method in network devices, the congestion and packet loss caused by inter-stream interference are solved, and resource saving and flexibility of shaping algorithms are achieved.

CN119484418BActive Publication Date: 2025-03-21NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510078864.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-03-21
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

The traffic shaping mechanism based on priority queues in existing network devices has the problem of "interstream interference", which leads to congestion and packet loss, and the design resources for synchronous and asynchronous shaping are consumed relatively large.

Method used

A synchronous and asynchronous fusion traffic shaping method based on time reference is adopted. By receiving the message descriptor, the received time value is recorded, the plastic shaping parameters are obtained according to the flow identification table, the qualified time is calculated, the PIFO queue is inserted according to the qualified time, and the current time value is judged whether to dequeue.

Benefits of technology

It effectively reduces storage resource consumption, avoids congestion and packet loss caused by inter-stream interference, and realizes a flexible combination of synchronization and asynchronous plastic surgery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484418B_ABST
    Figure CN119484418B_ABST
Patent Text Reader

Abstract

The present application relates to a traffic shaping method and device based on synchronous and asynchronous fusion of time reference, the method comprising receiving a message descriptor and recording a receiving time value; looking up a table according to a flow identifier in the message descriptor to obtain a shaping type and a corresponding qualified time calculation parameter; performing qualified time calculation and traffic supervision according to the receiving time value, shaping parameters and time reference; sorting the message descriptors according to the qualified time from early to late order through the supervised message descriptors and inserting them into a PIFO queue; if the qualified time corresponding to the head descriptor of the queue is later than the current time value, the head descriptor is dequeued, otherwise no operation is performed. The method supports both synchronous and asynchronous shaping modes, and can flexibly support different shaping algorithms by modifying shaping parameters and qualified time calculation methods; since synchronous and asynchronous shaping share the same set of sorting and transmission selection logic, storage resource consumption is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a traffic shaping method and device based on synchronous and asynchronous fusion of time reference. Background Art

[0002] During network transmission, traffic shaping is an effective network management strategy that can improve overall network performance, ensure quality of service (QoS), optimize bandwidth usage, and ensure fair allocation of network resources. Through a reasonable shaping strategy, user experience and overall network operation efficiency can be effectively improved.

[0003] There are two common traffic shaping algorithms: token bucket and leaky bucket. Among them, the principle of the token bucket algorithm is to generate tokens at a fixed rate and use a "bucket" to store tokens. Each token represents a certain amount of data transmission, and data packets can only be sent when there are enough tokens in the bucket. The token bucket supports burst traffic while maintaining average traffic control, which is suitable for applications that require bursty high traffic. In contrast, the principle of the leaky bucket is to queue data packets into a "bucket" and "leak" the data packets at a fixed rate. Even if the input traffic bursts, the output traffic will remain stable, so the leaky bucket can provide a stable output rate, which is suitable for scenarios that require smooth traffic.

[0004] The token bucket algorithm can implement traffic regulation and traffic shaping. Specifically, the token bucket algorithm has at least two fixed parameters and one variable parameter. The fixed parameter is the committed information rate (CIR, denoted as r ) and committed burst size (cbs, denoted as b ); The variable parameter is the number of tokens in the token bucket. The service curve of the token bucket can be expressed as: .

[0005] The implementation process of the token bucket algorithm specifically includes: when the device receives a message, it will use the historical timestamp (Timestamp, recorded as T ), that is, the time when the last message was sent, the difference between it and the current time, multiplied by the committed information rate and added with the number of remaining tokens after the last sending, to calculate the current number of tokens. If the number of tokens is greater than the number of tokens required to send the message, the message is sent directly and the timestamp is updated; if the number of tokens is less than the message length, supervision or shaping is performed according to the policy. In a narrow sense, when there are not enough tokens in the token bucket to send a message, if you choose to discard the message directly, it is supervision; if you make the message wait in the cache until enough tokens are accumulated before sending the message, it is shaping.

[0006] The difference between policing and shaping is that: in policing mode, if there are insufficient tokens in the token bucket when receiving a message, the message will be discarded directly; in shaping mode, the message will be temporarily stored when there are insufficient tokens, and then scheduled when there are enough tokens. Policing is suitable for scenarios where packet loss is allowed and traffic needs to be smoothed and latency reduced, especially for scenarios with high requirements for real-time applications. Shaping is suitable for scenarios with high requirements for packet loss rate and traffic needs to be smoothed.

[0007] In the shaping mechanism, if the current token is insufficient when subsequent messages arrive, the newly received message data cannot be scheduled immediately. The unschedulable messages need to be stored and operated after the number of tokens meets the scheduling conditions.

[0008] Current mainstream network devices often perform traffic shaping based on priority queues. Different flows are first mapped to the same priority queue, and then the queue is shaped as a whole. Each priority queue is configured with a FIFO to buffer messages. Since different flows of the same priority share the queue, the shaping bandwidth of the queue is the sum of the rates of all flows, which inevitably introduces the problem of "inter-flow interference". For example, assuming that 10 flows share a priority queue, and the rate of each flow is 1Mbps, the shaping bandwidth of the priority queue is configured to be 10Mbps. If a burst or failure occurs in a flow, the bandwidth occupied is 2Mbps. Since the overall input traffic of 11Mbps is greater than the allocated bandwidth of 10Mbps, message transmission will be congested, and the message delay of all flows sharing the queue will increase. When the storage resources are exhausted, all flows will cause packet loss due to congestion.

[0009] In order to solve the problem of congestion and packet loss caused by interference between flows, previous studies have proposed the concept of "stream-by-stream shaping", such as the UBS / ATS algorithm. This type of algorithm is based on the idea of ​​token buckets, uses the qualified time as the basis for monitoring and scheduling messages, proposes the calculation method of the qualified time, supervision and scheduling strategy, and uses the message's input port number in the previous hop, the current hop, and the priority of the current hop as grouping conditions to cache messages in different FIFO queues. However, the FIFO-based queue organization has scalability issues. As the number of priorities and the number of input ports increase, the number of FIFOs will also increase exponentially, greatly consuming storage resources.

[0010] In the token bucket shaping mechanism, the token counting clock uses the local clock, and the time between different devices in the network is not synchronized, and asynchronous shaping is performed in an independent manner. A time-aware shaping method is proposed in the IEEE 802.1Qbv standard. This method makes an overall plan for when each device receives and sends messages based on the time synchronization between different devices, and realizes synchronous and coordinated shaping between different nodes.

[0011] In order to meet the needs of synchronous shaping and asynchronous shaping in current transmission application scenarios, existing solutions often design synchronous algorithms and asynchronous algorithms separately and then combine them. This design method consumes a lot of design resources. Therefore, it is necessary to study the implementation method of the fusion of synchronous shaping and asynchronous shaping. Summary of the invention

[0012] Based on this, the present invention provides a traffic shaping method and device based on synchronous and asynchronous fusion of time reference.

[0013] A traffic shaping method based on synchronous and asynchronous fusion of time reference, the method comprising:

[0014] Receive the message descriptor and record the receiving time value; the message descriptor includes the flow identifier to which the message belongs and the message body storage address.

[0015] The shaping parameters are obtained by looking up the shaping parameter table according to the flow identifier in the message descriptor; the shaping parameter table is a data table that uses the flow identifier in the message descriptor as an index to record the shaping parameters used for the flow; the shaping parameters include the shaping type and the corresponding qualified time calculation parameters; the shaping type refers to the synchronous shaping method or the asynchronous shaping method.

[0016] The current time value is obtained from the time reference module, and the qualified time calculation module is used to calculate and supervise the qualified time of the message according to the current time value, the receiving time value and the shaping parameter.

[0017] The corresponding message descriptors are inserted into the PIFO queue in the order of the qualified time from earliest to latest; wherein the head descriptor of the PIFO queue is the message descriptor with the earliest qualified time.

[0018] Determine whether the qualified time corresponding to the header descriptor is later than the current time value. If so, dequeue the header descriptor, otherwise do nothing.

[0019] In one of the embodiments, searching a shaping parameter table according to a flow identifier in a message descriptor to obtain a shaping parameter includes:

[0020] In the shaping parameter table, a lookup is performed according to the flow identifier in the message descriptor. If the shaping type is synchronous shaping, the corresponding qualified time calculation parameters include: the earliest receiving time, the latest receiving time, and the sending time relative to the synchronous period.

[0021] If the shaping type is asynchronous shaping, the corresponding qualified time calculation parameters include agreed bandwidth, agreed burst, maximum residence delay, token bucket empty time, historical qualified time, etc.

[0022] In one embodiment, a current time value is obtained from a time reference module, and a qualified time calculation module is used to calculate and supervise the qualified time of the message according to the current time value, the receiving time value and the shaping parameter, including:

[0023] Get the current time value from the time base module.

[0024] If the shaping type is synchronous shaping, determine whether the current time value falls within the allowed receiving time window obtained by table lookup. If so, the packet passes supervision and the sending time in the table lookup result is used as the qualified time; otherwise, the message is discarded.

[0025] If the shaping type is asynchronous shaping, the qualified time is calculated according to the bucket empty time, the agreed bandwidth and the agreed burst length, and it is determined whether the qualified time is later than the sum of the receiving time and the maximum residence delay. If so, the message is discarded, otherwise it passes the supervision.

[0026] In one of the embodiments, the shaping parameter table is used to store shaping parameters for each flow and is indexed by flow identifier.

[0027] The shaping parameter table uses a random access memory, the flow identifier is used as the read and write address of the random access memory, and the data stored at the corresponding address is the shaping parameter used by the corresponding flow.

[0028] In one of the embodiments, if the shaping type is a synchronous shaping mode, the time reference module is synchronized with other nodes in the entire network using a preset time synchronization method.

[0029] A traffic shaping device based on synchronous and asynchronous fusion of time reference comprises: a shaping parameter table lookup module, a qualified time calculation module, a time reference module, a descriptor sorting module and a transmission selection module.

[0030] A shaping parameter lookup module is used to store the shaping parameters of each flow in a shaping parameter table; it is also used to receive a message descriptor, record the receiving time value, and look up the shaping parameter table according to the flow identifier in the message descriptor to obtain the shaping parameter; the shaping parameter table is a data table that uses the flow identifier in the message descriptor as an index to record the shaping parameters used by the flow; the shaping parameters include a shaping type and a corresponding qualified time calculation parameter; the shaping type refers to a synchronous shaping method or an asynchronous shaping method; the qualified time calculation parameter is related to the shaping algorithm.

[0031] The time base module is used to provide a unified global time base.

[0032] The qualified time calculation module is used to obtain the current time value from the time reference module, and calculate and supervise the qualified time of the message according to the current time value, the receiving time value and the shaping parameter using the qualified time calculation module.

[0033] The descriptor sorting module is used to insert the message descriptors into the PIFO queue in a descending order according to the qualified time corresponding to the message descriptors; wherein the head descriptor of the PIFO queue is the message descriptor with the earliest qualified time.

[0034] The transmission selection module is used to determine whether the qualified time corresponding to the header descriptor is later than the current time value. If so, the header descriptor is dequeued, otherwise no operation is performed.

[0035] In one of the embodiments, the shaping parameter lookup module is also used to look up the shaping parameter table according to the flow identifier in the message descriptor. If the shaping type is a synchronous shaping method, the corresponding qualified time calculation parameters include: the earliest receiving time, the latest receiving time, and the sending time relative to the synchronous cycle; if the shaping type is an asynchronous shaping method, the corresponding qualified time calculation parameters include the agreed bandwidth, the agreed burst, the maximum residence delay, the token bucket empty time, and the historical qualified time.

[0036] In one of the embodiments, the qualified time calculation module is also used to obtain the current time value from the time reference module; if the shaping type is synchronous shaping mode, it is determined whether the current time value falls within the allowed receiving time window obtained by table lookup, if so, it passes the supervision, and the sending time in the table lookup result is used as the qualified time; otherwise, the message is discarded; if the shaping type is asynchronous shaping mode, the qualified time is calculated according to the bucket empty time, the agreed bandwidth and the agreed burst length, and it is determined whether the qualified time is later than the sum of the receiving time and the maximum residence delay, if so, the message is discarded, otherwise it passes the supervision.

[0037] In one of the embodiments, the shaping parameter table is used to store shaping parameters for each flow and is indexed by flow identifier.

[0038] The shaping parameter table uses a random access memory, the flow identifier is used as the read and write address of the random access memory, and the data stored on the address is the shaping parameter used by the corresponding flow.

[0039] In one of the embodiments, the PIFO queue uses the eligibility time as the sorting weight.

[0040] The above-mentioned traffic shaping method and device based on synchronous and asynchronous fusion of time reference, the method includes receiving a message descriptor and recording the receiving time value; looking up a table according to the flow identifier in the message descriptor to obtain the shaping type and the corresponding qualified time calculation parameter; the shaping type refers to a synchronous or asynchronous shaping mode; according to the receiving time value, shaping parameters and time reference, the qualified time is calculated and supervised; the message descriptor is inserted into the PIFO queue in the order of qualified time from early to late; it is determined whether the qualified time corresponding to the head descriptor of the queue is later than the current time value, if so, the head descriptor is dequeued, otherwise no operation is performed. The method supports both synchronous and asynchronous shaping modes, and can flexibly support different shaping algorithms by modifying the shaping parameters and the qualified time calculation method; since synchronous and asynchronous shaping share the same set of sorting and transmission selection logic, the storage resource consumption is greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A flow chart of a traffic shaping method based on synchronous and asynchronous fusion of a time reference in one embodiment;

[0042] Figure 2 A flow chart of traffic shaping based on synchronous and asynchronous fusion of time reference in one embodiment;

[0043] Figure 3 It is a schematic diagram of a flow chart of qualified time calculation when the asynchronous shaping algorithm adopts the ATS algorithm in another embodiment;

[0044] Figure 4 ATS algorithm pseudo code schematic diagram in another embodiment;

[0045] Figure 5 The structure block diagram of a traffic shaping device based on synchronous and asynchronous fusion of time reference in one embodiment. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] In one embodiment, Figure 1 , Figure 2 As shown, a traffic shaping method based on synchronous and asynchronous fusion of time reference is provided, and the method includes the following steps:

[0048] Step 100: Receive a message descriptor and record the receiving time value; the message descriptor includes the flow identifier to which the message belongs and the message body storage address.

[0049] Specifically, the extracted message descriptor in this application does not involve the storage of the complete message.

[0050] The message can use multiple different identifiers to organize the shaping parameter retrieval table at the same time, which is used to implement various complex shaping algorithms and joint shaping of different algorithms. For example, the ATS algorithm described in IEEE 802.1Q uses two identification fields, the scheduler identifier and the scheduling group identifier, to participate in shaping.

[0051] Step 102: Look up the shaping parameter table according to the flow identifier in the message descriptor to obtain the shaping parameters; the shaping parameter table is a data table that uses the flow identifier in the message descriptor as an index to record the shaping parameters used for the flow; the shaping parameters include the shaping type and the corresponding qualified time calculation parameters; the shaping type refers to the synchronous shaping method or the asynchronous shaping method.

[0052] Specifically, the calculation parameters of the qualified time are determined by a specific shaping algorithm. For example, if the shaping algorithm is an ATS asynchronous shaping algorithm, the calculation parameters of the qualified time include: agreed rate, agreed burst, maximum residence delay, and the like.

[0053] Step 104: Obtain the current time value from the time reference module, and use the qualified time calculation module to calculate and supervise the qualified time of the message according to the current time value, the receiving time value and the shaping parameter.

[0054] Step 106: insert the corresponding message descriptors into the PIFO queue in the order of qualified time from earliest to latest; wherein the head descriptor of the PIFO queue is the message descriptor with the earliest qualified time.

[0055] Specifically, the implementation form of PIFO is not limited in this application. This application only restricts PIFO to use the qualified time as the sorting weight.

[0056] Step 108: Determine whether the qualified time corresponding to the header descriptor is later than the current time value. If so, dequeue the header descriptor; otherwise, do nothing.

[0057] The above-mentioned traffic shaping method based on synchronous and asynchronous fusion of time base includes receiving a message descriptor and recording the receiving time value; looking up a table according to the flow identifier in the message descriptor to obtain the shaping type and the corresponding qualified time calculation parameter; the shaping type refers to a synchronous or asynchronous shaping mode; calculating and supervising the qualified time according to the receiving time value, shaping parameters and time base; inserting the message descriptor into the PIFO queue in the order of qualified time from early to late; judging whether the qualified time corresponding to the head descriptor of the queue is later than the current time value, if so, dequeueing the head descriptor, otherwise not operating. The method supports both synchronous and asynchronous shaping modes, and can flexibly support different shaping algorithms by modifying the shaping parameters and the qualified time calculation method; since synchronous and asynchronous shaping share the same set of sorting and transmission selection logic, the storage resource consumption is greatly reduced.

[0058] In one of the embodiments, step 102 includes: looking up a shaping parameter table according to the flow identifier in the message descriptor, if the shaping type is a synchronous shaping method, the corresponding qualified time calculation parameters include: the earliest receiving time, the latest receiving time, and the sending time relative to the synchronous cycle; if the shaping type is an asynchronous shaping method, the corresponding qualified time calculation parameters include the agreed bandwidth, the agreed burst, the maximum residence delay, the token bucket empty time, and the historical qualified time.

[0059] Specifically, as an optimization, more fields may be included to support different policing and shaping algorithms, such as including a maximum dwell delay to support the ATS policing algorithm mentioned in IEEE 802.1Q.

[0060] It is worth noting that the specific shaping parameters are related to the shaping algorithm and may be different from the above.

[0061] In one embodiment, step 104 includes: obtaining the current time value from the time reference module; if the shaping type is a synchronous shaping method, determining whether the current time value falls within the allowed receiving time window obtained by table lookup, if so, passing supervision, and taking the sending time in the table lookup result as the qualified time; otherwise, discarding the message; if the shaping type is an asynchronous shaping method, calculating the qualified time according to the bucket empty time, the agreed bandwidth and the agreed burst length, determining whether the qualified time is later than the sum of the receiving time and the maximum residence delay, if so, discarding the message, otherwise passing supervision.

[0062] In one of the embodiments, the shaping parameter table in step 102 is used to store shaping parameters for each flow, and is indexed by the flow identifier; the shaping parameter table uses a random access memory, the flow identifier serves as the read and write address of the random access memory, and the data stored at the address is the shaping parameter used for the corresponding flow.

[0063] Specifically, in order to save storage space, the shaping parameter table uses a high-density random access memory (RAM), the flow identifier is used as the read and write address of the RAM, and the data stored on the address corresponds to the shaping parameter used by the flow.

[0064] In one of the embodiments, if the shaping type is a synchronous shaping mode, the time reference module and other nodes in the entire network use a preset time synchronization method to synchronize time.

[0065] Specifically, in order to support synchronous shaping, the time reference module is not only the free clock of the node, but also needs to be synchronized with other nodes in the entire network. The time synchronization method can adopt the method mentioned in the IEEE 1588 or AS6802 standards.

[0066] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0067] In order to avoid "inter-flow interference", a flow-by-flow shaping method is required, that is, to allocate independent shaping bandwidth to each flow, and use independent storage queues to avoid "head-of-line blocking problems". In the specific project implementation, the bandwidth granularity of shaping and the consumption of hardware resources need to be considered.

[0068] In a specific embodiment, Figure 3 As shown, the ATS algorithm is selected as the asynchronous shaping algorithm as an example to give the specific implementation process of the qualified time calculation module.

[0069] Figure 3 Explanation of symbols:

[0070] Eligibility Time, );

[0071] Committed information rate (CIR) r );

[0072] Committed burst size (cbs,b );

[0073] The empty time of the token bucket for each flow (ATS_BucketEmptyTime, );

[0074] The time when the token bucket is full (ATS_EmptyToFullTime, );

[0075] The recovery time of the token required for each byte of the message (ATS_PerByteRecoveryTime, );

[0076] The recovery time of the token required for the message (ATS_RecoveryTime, );

[0077] Group Eligibility Time (ATS_GroupEigibilityTime, );

[0078] The maximum residence time of the message in the current device node (ATS_MaxResidenceTime, );

[0079] Message arrival time (ATS_ArrivalTime, ) is the moment when this module receives the message descriptor. The recording clock is the local free clock. Time synchronization is not a necessary condition, but in the asynchronous shaping mechanism, time synchronization helps to improve shaping accuracy.

[0080] The pseudo code of ATS algorithm is as follows Figure 4 In one embodiment, as shown Figure 5 As shown, a traffic shaping device based on synchronous and asynchronous fusion of time reference is provided, the device includes: a shaping parameter table lookup module, a qualified time calculation module, a time reference module, a descriptor sorting module and a transmission selection module; wherein:

[0081] A shaping parameter lookup module is used for storing the shaping parameters of each flow in a shaping parameter table; it is also used to receive a message descriptor, record the receiving time value, and look up the shaping parameter table according to the flow identifier in the message descriptor to obtain the shaping parameter; the shaping parameter table is a data table that uses the flow identifier in the message descriptor as an index to record the shaping parameters used by the flow; the shaping parameters include a shaping type and a corresponding qualified time calculation parameter; the shaping type refers to a synchronous shaping method or an asynchronous shaping method.

[0082] The time base module is used to provide a unified global time base.

[0083] Specifically, the time reference module is used to provide a unified global time reference for the shaping process, and the scheduling time calculation module calculates the qualified time according to the shaping parameters and the time reference obtained by the table lookup.

[0084] The qualified time calculation module is used to obtain the current time value from the time reference module, and calculate and supervise the qualified time of the message according to the current time value, the receiving time value and the shaping parameter using the qualified time calculation module.

[0085] The descriptor sorting module is used to insert the message descriptors into the PIFO queue in a descending order according to the qualified time corresponding to the message descriptors; wherein the head descriptor of the PIFO queue is the message descriptor with the earliest qualified time.

[0086] Specifically, the descriptor sorting module includes an insert-first-out (PIFO) queue that can store descriptors in order of qualified time from earliest to latest. The descriptor at the head of the queue corresponds to the earliest qualified time.

[0087] The transmission selection module is used to determine whether the qualified time corresponding to the header descriptor is later than the current time value. If so, the header descriptor is dequeued, otherwise no operation is performed.

[0088] Specifically, the transmission selection module obtains the current time from the time reference module and compares it with the qualified time of the first element of the PIFO queue. If the qualified time of the first element of the PIFO queue is later than the current time, the first element is dequeued, otherwise no operation is performed.

[0089] In one of the embodiments, the shaping parameter lookup module is also used to look up the shaping parameter table according to the flow identifier in the message descriptor. If the shaping type is a synchronous shaping method, the corresponding qualified time calculation parameters include: the earliest receiving time, the latest receiving time, and the sending time relative to the synchronous cycle; if the shaping type is an asynchronous shaping method, the corresponding qualified time calculation parameters include the agreed bandwidth, the agreed burst, the maximum residence delay, the token bucket empty time, and the historical qualified time.

[0090] In one of the embodiments, the qualified time calculation module is also used to obtain the current time value from the time reference module; if the shaping type is synchronous shaping mode, it is determined whether the current time value falls within the allowed receiving time window obtained by table lookup, if so, it passes the supervision, and the sending time in the table lookup result is used as the qualified time; otherwise, the message is discarded; if the shaping type is asynchronous shaping mode, the qualified time is calculated according to the bucket empty time, the agreed bandwidth and the agreed burst length, and it is determined whether the qualified time is later than the sum of the receiving time and the maximum residence delay, if so, the message is discarded, otherwise it passes the supervision.

[0091] In one of the embodiments, the shaping parameter table is used to store shaping parameters for each flow and is indexed by flow identifier.

[0092] The shaping parameter table uses a random access memory, the flow identifier is used as the read and write address of the random access memory, and the data stored on the address is the shaping parameter used by the corresponding flow.

[0093] In one of the embodiments, the PIFO queue uses the eligibility time as the sorting weight.

[0094] For the specific definition of the traffic shaping device based on the fusion of synchronous and asynchronous time reference, please refer to the definition of the traffic shaping method based on the fusion of synchronous and asynchronous time reference in the above text, which will not be repeated here. Each module in the above-mentioned traffic shaping device based on the fusion of synchronous and asynchronous time reference can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0095] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0096] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A traffic shaping method based on synchronous and asynchronous fusion of time reference, characterized in that: The method comprises: Receive a message descriptor and record the receiving time value; the message descriptor includes a flow identifier to which the message belongs and a message body storage address; In a shaping parameter table, a table is looked up according to the flow identifier in the message descriptor to obtain a shaping parameter; the shaping parameter table is a data table that uses the flow identifier in the message descriptor as an index to record the shaping parameters used by the flow; the shaping parameters include a shaping type and a corresponding qualified time calculation parameter; the shaping type refers to a synchronous shaping mode or an asynchronous shaping mode; Obtaining a current time value from a time reference module, and using a qualified time calculation module to calculate and supervise a qualified time of a message according to the current time value, the receiving time value and the shaping parameter; Insert the corresponding message descriptors into the PIFO queue in the order of qualified time from earliest to latest; the head descriptor of the PIFO queue is the message descriptor with the earliest qualified time; Determine whether the qualified time corresponding to the header descriptor is later than the current time value, if so, dequeue the header descriptor, otherwise do nothing.

2. The traffic shaping method based on synchronous and asynchronous fusion of time reference according to claim 1 is characterized in that: In the shaping parameter table, a table is looked up according to the flow identifier in the message descriptor to obtain shaping parameters, including: In the shaping parameter table, a table is looked up according to the flow identifier in the message descriptor. If the shaping type is a synchronous shaping mode, the corresponding qualified time calculation parameters include: the earliest receiving time, the latest receiving time, and the sending time relative to the synchronization period; If the shaping type is an asynchronous shaping mode, the corresponding qualified time calculation parameters include the agreed bandwidth, the agreed burst, the maximum residence delay, the token bucket empty time, and the historical qualified time.

3. The traffic shaping method based on synchronous and asynchronous fusion of time reference according to claim 2 is characterized in that: The current time value is obtained from the time reference module, and a qualified time calculation module is used to calculate and supervise the qualified time of the message according to the current time value, the receiving time value and the shaping parameter, including: Get the current time value from the time base module; If the shaping type is synchronous shaping, determine whether the current time value falls within the allowed receiving time window obtained by table lookup. If so, the message passes the supervision and the sending time in the table lookup result is used as the qualified time; otherwise, the message is discarded; If the shaping type is asynchronous shaping, the qualified time is calculated according to the bucket empty time, the agreed bandwidth and the agreed burst length, and it is determined whether the qualified time is later than the sum of the receiving time and the maximum residence delay. If so, the message is discarded, otherwise it passes the supervision.

4. The traffic shaping method based on synchronous and asynchronous fusion of time reference according to claim 1, characterized in that: The shaping parameter table is used to store shaping parameters of each flow, and is indexed by flow identifier; The shaping parameter table uses a random access memory, the flow identifier is used as the read and write address of the random access memory, and the data stored on the address is the shaping parameter used by the corresponding flow.

5. The traffic shaping method based on synchronous and asynchronous fusion of time reference according to claim 1, characterized in that: If the shaping type is synchronous shaping, the time reference module and other nodes in the entire network use a preset time synchronization method to perform time synchronization to support synchronous shaping scheduling of the entire network.

6. A traffic shaping device based on synchronous and asynchronous fusion of time reference, characterized in that: The device comprises: a shaping parameter table lookup module, a qualified time calculation module, a time reference module, a descriptor sorting module and a transmission selection module; The shaping parameter lookup module is used to store the shaping parameters of each flow in the shaping parameter table; it is also used to receive the message descriptor, record the receiving time value, and look up the shaping parameter table according to the flow identifier in the message descriptor to obtain the shaping parameter; the shaping parameter table is a data table that uses the flow identifier in the message descriptor as an index to record the shaping parameters used by the flow; the shaping parameters include a shaping type and a corresponding qualified time calculation parameter; the shaping type refers to a synchronous shaping mode or an asynchronous shaping mode; The time reference module is used to provide a unified global time reference; The qualified time calculation module is used to obtain the current time value from the time reference module, and use the qualified time calculation module to calculate and supervise the qualified time of the message according to the current time value, the receiving time value and the shaping parameter; The descriptor sorting module is used to insert the message descriptors into the PIFO queue in a descending order according to the qualified time corresponding to the message descriptors; wherein the head descriptor of the PIFO queue is the message descriptor with the earliest qualified time; The transmission selection module is used to determine whether the qualified time corresponding to the header descriptor is later than the current time value, and if so, remove the header descriptor from the queue, otherwise, do nothing.

7. The traffic shaping device based on synchronous and asynchronous fusion of time reference according to claim 6, characterized in that: The shaping parameter lookup module is also used to look up the shaping parameter table according to the flow identifier in the message descriptor. If the shaping type is a synchronous shaping method, the corresponding qualified time calculation parameters include: the earliest receiving time, the latest receiving time and the sending time relative to the synchronization cycle; if the shaping type is an asynchronous shaping method, the corresponding qualified time calculation parameters include the agreed bandwidth, the agreed burst, the maximum resident delay, the token bucket empty time, and the historical qualified time.

8. The traffic shaping device based on synchronous and asynchronous fusion of time reference according to claim 6, characterized in that: The qualified time calculation module is also used to obtain the current time value from the time reference module; if the shaping type is the synchronous shaping mode, it is determined whether the current time value falls within the allowed receiving time window obtained by table lookup, if so, it passes the supervision, and the sending time in the table lookup result is used as the qualified time; Otherwise, the message is discarded; if the shaping type is asynchronous shaping, the qualified time is calculated according to the bucket empty time, the agreed bandwidth and the agreed burst length, and it is determined whether the qualified time is later than the sum of the receiving time and the maximum residence delay. If so, the message is discarded, otherwise it passes the supervision.

9. The traffic shaping device based on synchronous and asynchronous fusion of time reference according to claim 6, characterized in that: The shaping parameter table is used to store shaping parameters of each flow, and is indexed by flow identifier; The shaping parameter table uses a random access memory, the flow identifier is used as the read and write address of the random access memory, and the data stored on the address is the shaping parameter used by the corresponding flow.

10. The traffic shaping device based on synchronous and asynchronous fusion of time reference according to claim 6, characterized in that: The PIFO queue uses the qualifying time as the sorting weight.

Citation Information

Patent Citations

  • Asynchronous low-delay time-sensitive data processing method

    CN112821977A

  • Asynchronous traffic shaping scheduling method based on frame preemption

    CN117201414A