Method, device and system for sending message
By dynamically determining the output time window of delay-sensitive traffic, the problem of low bandwidth utilization in the prior art is solved, and the bandwidth utilization is improved while ensuring the promised end-to-end delay of delay-sensitive traffic.
Patent Information
- Application Number
- CN202211581634.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2017-12-31
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2037-12-31
AI Technical Summary
In the delay-sensitive network, in order to ensure the upper delay limit of delay-sensitive traffic, the source device can only use a small part of the time to send traffic in each time window, resulting in low bandwidth utilization and serious resource waste.
By identifying delay-sensitive traffic, network devices dynamically determine the output time window of messages based on the real-time number of sendable messages and the accumulated sending situation. After sending all sendable messages within one time window, the next message will be arranged to send to the next time window to avoid time constraints on upstream devices.
Improves bandwidth utilization of delay-sensitive traffic, reduces resource waste, and ensures promised end-to-end delay of delay-sensitive traffic.
Smart Images

Figure CN116016371B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of network transmission, and in particular to a method, device, and system for sending a message. Background Art
[0002] Latency-sensitive networks (LSNs) typically refer to communications networks used in specialized fields such as industrial control. These networks typically impose upper limits on the end-to-end latency between the sender and receiver of specific traffic. If a message arrives at its destination later than promised, it may lose its timeliness and become invalid.
[0003] Generally speaking, for delay-sensitive traffic, it is necessary to reserve certain resources for the traffic at each node, port, and other levels on the end-to-end path of the network in which it is located, so as to prevent unpredictable congestion during transmission and generate additional queuing delays.
[0004] Current technologies use global clock synchronization to transmit latency-sensitive traffic. This method requires strict clock synchronization across all nodes in the network and maintains a unified time window rhythm across the entire network. Each node in the network statically configures an enqueue queue for each port in each time window. After receiving a packet, a network device adds the packet to the queue of the corresponding outbound port according to the current time window of the global clock. The added queue will be opened in the next time window, and the packet will be scheduled for transmission.
[0005] In order to meet the upper limit of delay requirements for delay-sensitive traffic, the above method has two constraints during use. Constraint 1: The message sent by the upstream network device in time window N must be received within the time window N of the next network device. Constraint 2: The message received by the current network device in time window N must enter the queue within time window N. In this way, in the process of sending the message from the source to the destination, each network device that the message passes through can ensure that the message received by the network device in the Nth time window can be sent out within the N+1th time window, and the message will be received within the N+1th time window of the next node. Then the maximum end-to-end delay of the message is (K+1)*T, where K is the number of hops the message goes through in the network, and T is the globally unified time window width. In this way, there is a promised transmission delay.
[0006] According to the above method, the message queueing and dequeuing timing is as follows: Figure 1 As shown. Figure 1 It can be seen that due to the possible transmission delay between network devices and the possible message processing delay within the network devices, the message sent by the source needs to experience the transmission delay and message processing delay to be received at the right time. Figure 1The packet arrives at the queue of the next network device at the end of a time window shown in , which requires that the source end cannot send the message later than a certain time, otherwise the message will not be guaranteed to be queued within the same time window.
[0007] That is to say, in order to ensure that delay-sensitive traffic has a promised delay upper limit, the source end can only use a very small part of the time in each time window to send delay-sensitive traffic. For example, assuming that the unified time window time of the entire network is 30us, the network nodes are 1 km apart, the message processing delay of the network nodes is 20us, and the transmission rate of the link is 10Gbps. According to the above method, the bandwidth available for delay-sensitive traffic will be less than 1.6Gbps (1Km fiber transmission delay is 5us, and within the 30us time window, there is a 5us transmission delay and a 20us message processing delay that cannot be used. The available bandwidth is (30us-20us-5us) / 30us x10Gbps=1.6Gbps). It can be seen that the existing technology has less bandwidth available for delay-sensitive traffic and low resource utilization. Summary of the Invention
[0008] The embodiments of the present application provide a method, device, system, and storage medium for sending messages, which can increase the bandwidth used for delay-sensitive traffic and improve bandwidth utilization.
[0009] In a first aspect, embodiments of the present application provide a method for sending a message, which is applied to a network device in a transmission system. In this method, the network device receives a message and identifies that the flow to which the message belongs is delay-sensitive traffic for which resources have been reserved, where the reserved resources include the number of messages that the flow can send within a time window. The network device then schedules the message for transmission within a specific time window based on the number of messages that the flow can send within the time window, the number of messages already in a queue for sending the flow, and the cumulative number of messages sent within the time window.
[0010] The output time window of the message in the embodiment of the present application is dynamically determined based on real-time information (such as the cumulative number of messages sent within a time window), rather than being determined entirely according to a static configuration. In this way, the flexibility in the message sending process can be increased, and the transmission device only needs to ensure that the number of messages sent within each time window meets the number of messages that can be sent within a time window, without constraining the sending time of each message. In other words, after the number of messages sent by the network device within a time window reaches the number of messages that can be sent, the next message can be arranged to be sent in the next time window. Therefore, in this way, the network device can arrange the message sent by the upstream device at any time point within a time window to be sent to a suitable time window, thereby avoiding constraints on the time when the upstream device sends the message, improving the available bandwidth of delay-sensitive traffic, and reducing bandwidth resource waste.
[0011] In one possible implementation, the network device is pre-configured with queue resource reservation information and traffic resource reservation information for sending the flow. The queue resource reservation information includes the queue used to send the flow and the queue's enqueue timing and output timing. The enqueue timing is used to define the enqueue queue for each time window, and the output timing is used to define the switch state of each queue within each time window. The traffic resource reservation information records the current enqueue queue of the flow and a message count representing the number of messages in the current enqueue queue. The cumulative number of messages sent within the time window is the number of messages in the current enqueue queue.
[0012] Accordingly, the network device arranges the message to be sent in a specific time window according to the number of messages that can be sent by the flow in a time window and the cumulative number of messages sent in the time window, including:
[0013] The network device determines an arrival time window of the message, where the arrival time window is the time window of the output port of the network device when the message arrives; queries the number of messages in the current enqueue queue; determines the enqueue queue of the flow based on the arrival time window, the enqueue timing of the queue, the number of messages that can be sent by the flow within a time window, and the number of messages in the current enqueue queue; adds the message to the determined enqueue queue of the flow; opens the queue where the message is located within the time window for opening the queue defined in the output timing, and sends out the message.
[0014] In this embodiment, since each time window can send the required number of packets, delay-sensitive traffic can still maintain a guaranteed end-to-end delay. In other words, by defining time-window-based enqueue and output timing, this embodiment can control the overall delay of packets during transmission, eliminating the need to strictly control the delay in each network device by constraining the sending time. This ensures that delay-sensitive traffic has a guaranteed end-to-end delay, while also increasing the available bandwidth for delay-sensitive traffic and reducing bandwidth resource waste.
[0015] In a possible implementation, the aforementioned network device determines the enqueue queue of the flow based on the arrival time window, the enqueue timing of the queue, the number of messages that can be sent by the flow within a time window, and the number of messages in the current enqueue queue, specifically including: when the number of messages in the current enqueue queue has reached the number of messages that can be sent within a time window, the network device determines the enqueue queue of the next time window of the arrival time window as the enqueue queue of the flow; or, when the number of messages in the current enqueue queue has not reached the number of messages that can be sent within a time window, the network device determines the enqueue queue of the arrival time window as the enqueue queue of the flow.
[0016] In this embodiment, by dynamically switching the queue, after the number of messages sent within a time window reaches the number of messages that can be sent, the next message can be scheduled to be sent in the next time window, which increases flexibility. While improving the available bandwidth of delay-sensitive traffic, it can also ensure that the messages sent within the time window meet the number requirements of messages sent within the time window, and meet the traffic characteristics requirements of delay-sensitive traffic.
[0017] In a possible implementation, in the enqueuing sequence, a time window also has a candidate enqueuing queue, wherein the candidate enqueuing queue of the previous time window is the enqueuing queue of the next time window.
[0018] Accordingly, the aforementioned network device determines the enqueue queue of the flow according to the arrival time window, the enqueue timing of the queue, the number of packets that can be sent by the flow within a time window, and the number of packets in the current enqueue queue, specifically including:
[0019] The network device determines the alternative enqueue queue of the arrival time window as the enqueue queue of the flow when the number of messages in the current enqueue queue has reached the number of messages that can be sent within a time window; or, when the number of messages in the current enqueue queue has not reached the number of messages that can be sent within a time window, determines the enqueue queue of the arrival time window as the enqueue queue of the flow.
[0020] In this embodiment, by setting an alternative enqueue queue, there is no need to query the enqueue queue of the next time window of the arrival time window during the message sending process, which can improve processing efficiency.
[0021] In a possible implementation, in the output time sequence, the enqueue queue of the Mth time window is in an open state in the M+1th time window and is in a closed state in other time windows, where M is an integer greater than or equal to 1.
[0022] In this embodiment, by controlling the output timing, it is ensured that the message received by the network device in the local Nth time window will be sent within the local N+1th (or N+2)th time window. This ensures that the maximum end-to-end delay is ((end-to-end hop count + 1) * (time window size)) + the sum of the time window boundary differences on the path. Therefore, the embodiments of the present application can improve the available bandwidth of delay-sensitive traffic while also better ensuring the end-to-end delay of delay-sensitive traffic.
[0023] In one possible implementation, the method further includes: after the network device determines the enqueue queue of the flow, the network device updates the enqueue queue recorded in the traffic resource reservation information according to the determined enqueue queue; each time the network device updates the recorded enqueue queue, the network device restores the number of packets recorded in the traffic resource reservation information to an initial value, and accumulates the number of packets each time a packet is added to the updated enqueue queue.
[0024] In this embodiment, by recording dynamic information such as the number of messages and directly applying it to the message sending process, calculations during the message sending process can be reduced and processing efficiency can be improved.
[0025] In a possible implementation manner, the network device reserves resources for the flow in advance, and configures the traffic resource reservation information during the resource reservation process.
[0026] In this embodiment, by reserving resources, the delay of delay-sensitive traffic during transmission can be reduced.
[0027] In one possible implementation, the network device is pre-configured with queue resource reservation information and traffic resource reservation information for sending the flow. The queue resource reservation information includes queues corresponding to the flows and dequeue gates configured for the queues, where the dequeue gates are used to control the number of packets sent within each time window. The traffic resource reservation information includes the number of packets that can be sent by the flow within a time window.
[0028] Accordingly, the network device arranges the message to be sent in a specific time window according to the number of messages that can be sent by the flow in a time window and the cumulative number of messages sent in the time window, specifically including:
[0029] The network device adds the message to the queue corresponding to the flow to which the message belongs; takes out the message from the queue corresponding to the flow for transmission according to the dequeue gating, and the dequeue gating is updated according to the time window; wherein the initial value of the dequeue gating in each time window is the number of messages that can be sent by the flow corresponding to the queue in a time window, and decreases according to the number of messages sent in each time window.
[0030] In this embodiment, since there is no time window restriction for entering the queue, but the sending of messages within each time window is controlled during the dequeue process, there is no requirement for the time of receiving the message, and there is no constraint on the sending time of the upstream device. The upstream device can send delay-sensitive traffic in almost the entire time window, thereby improving the available bandwidth of delay-sensitive traffic and reducing bandwidth resource waste.
[0031] In one possible implementation, the network device monitors updates of the time window, and whenever the time window is updated, obtains the number of packets that can be sent by the flow within a time window from the traffic resource reservation information, and updates the dequeue gate according to the number of packets that can be sent by the flow within a time window.
[0032] In this embodiment, the dequeue gating is updated according to the time window and the number of packets that can be sent by the flow in a time window, thereby ensuring that the packets sent in each time window meet the number requirement of packets sent in the time window and meet the traffic characteristic requirements of delay-sensitive traffic.
[0033] In one possible implementation, messages are taken out from the queue corresponding to the flow and sent according to the dequeue gating, specifically including: the network device checks the messages in the queue corresponding to the flow and the tokens in the token bucket in real time, and when there are messages in the queue corresponding to the flow and tokens in the token bucket, the messages are taken out and sent until the tokens in the token bucket are empty or the messages in the queue corresponding to the flow are empty.
[0034] In this embodiment, since the number of packets sent in each time window can be guaranteed, the end-to-end delay can be guaranteed to have a committed upper limit. Therefore, this embodiment of the application can increase the available bandwidth for delay-sensitive traffic while also ensuring that delay-sensitive traffic has a committed end-to-end delay.
[0035] In a possible implementation, the network device reserves resources for the flow in advance, and configures the traffic resource reservation information and the queue resource reservation information during the resource reservation process.
[0036] In this embodiment, since queue resources are allocated based on flows rather than time windows, there is no need to require time window alignment across the entire network. This allows deployment on devices that do not support time alignment, thus expanding applicability.
[0037] In the second aspect, an embodiment of the present application provides a method for managing message sending, which is applied to a network device that can transmit delay-sensitive traffic. In this method, the network device receives a message and identifies that the flow to which the message belongs is delay-sensitive traffic for which resources have been reserved. The network device obtains the arrival time window of the message and the traffic resource reservation information of the flow. The traffic resource reservation information records the number of messages that can be sent by the flow within a time window and the number of messages in the current enqueue queue. The network device determines the enqueue queue of the flow based on the arrival time window, the number of messages that can be sent by the flow within a time window, and the number of messages in the current enqueue queue, adds the message to the enqueue queue, and sends the message through queue scheduling.
[0038] The network device in the embodiment of the present application determines the queue of the stream based on the arrival time window of the message, the number of messages that can be sent by the stream in a time window, and the number of messages in the current queue, and dynamically adds the message to different queues and schedules the output. In this way, the flexibility in the message sending process can be increased. The transmission device only needs to ensure that the number of messages sent in each time window meets the number of messages that can be sent in a time window, without constraining the sending time of each message. In other words, after the number of messages sent in a time window reaches the number of messages that can be sent, the network device can schedule the next message to be sent in the next time window. Therefore, in this way, the network device can schedule the message sent by the upstream device at any time point in a time window to be sent in a suitable time window, thereby avoiding constraints on the time when the upstream device sends the message, improving the available bandwidth of delay-sensitive traffic, and reducing bandwidth resource waste.
[0039] In one possible implementation, the network device is pre-configured with queue resource reservation information and traffic resource reservation information for sending the flow; the queue resource reservation information includes the queue for sending the flow and the enqueue timing of the queue, and the enqueue timing is used to define the enqueue queue of each time window. The network device determines the enqueue queue of the flow based on the arrival time window, the number of messages that the flow can send within a time window, and the number of messages in the current enqueue queue, including: when the number of messages in the current enqueue queue has reached the number of messages that can be sent within a time window, the network device determines the enqueue queue of the next time window of the arrival time window in the enqueue timing as the enqueue queue of the flow. When the number of messages in the current enqueue queue has not reached the number of messages that can be sent within a time window, the enqueue queue of the arrival time window in the enqueue timing is determined as the enqueue queue of the flow.
[0040] In one possible implementation, the queue resource reservation information further includes an output timing sequence, which is used to define an on / off state of each queue within each time window. Sending the message through queue scheduling includes: the network device opening the queue containing the message within the time window for opening the queue containing the message defined in the output timing sequence, and sending the message.
[0041] In a third aspect, an embodiment of the present application provides a network device, comprising a receiving module for receiving a message. The processing module is configured to identify that the flow to which the message belongs is delay-sensitive traffic for which resources have been reserved, wherein the reserved resources include the number of messages that can be sent by the flow within a time window. The processing module then schedules the message to be sent in a specific time window based on the number of messages that can be sent by the flow within a time window and the number of messages already in the queue for sending the flow, based on the cumulative number of messages sent within the time window.
[0042] The output time window of the message in the embodiment of the present application is dynamically determined based on real-time information (such as the cumulative number of messages sent within a time window), rather than being determined entirely according to a static configuration. In this way, the flexibility in the message sending process can be increased, and the transmission device only needs to ensure that the number of messages sent within each time window meets the number of messages that can be sent within a time window, without constraining the sending time of each message. In other words, after the number of messages sent by the network device within a time window reaches the number of messages that can be sent, the next message can be arranged to be sent in the next time window. Therefore, in this way, the network device can arrange the message sent by the upstream device at any time point within a time window to be sent to a suitable time window, thereby avoiding constraints on the time when the upstream device sends the message, improving the available bandwidth of delay-sensitive traffic, and reducing bandwidth resource waste.
[0043] In a possible implementation, the network device further includes a first storage module. The first storage module is used to store pre-set queue resource reservation information and traffic resource reservation information for sending the flow. The queue resource reservation information includes the queue for sending the flow and the enqueue timing and output timing of the queue. The enqueue timing is used to define the enqueue queue of each time window, and the output timing is used to define the switch state of each queue in each time window. The traffic resource reservation information records the current enqueue queue of the flow and the message count used to represent the number of messages in the current enqueue queue; the cumulative number of messages sent within the time window is the number of messages in the current enqueue queue.
[0044] Correspondingly, the processing module arranges the message to be sent in a specific time window according to the number of messages that can be sent by the flow within a time window and the cumulative number of messages sent within the time window, specifically including: the processing module determines the arrival time window of the message, which is the time window of the output port of the network device when the message arrives; queries the number of messages in the current enqueue queue; then, the processing module determines the enqueue queue of the flow according to the arrival time window, the enqueue timing of the queue, the number of messages that can be sent by the flow within a time window and the number of messages in the current enqueue queue, and adds the message to the determined enqueue queue of the flow; then, the queue where the message is located is opened in the time window for opening the queue where the message is located defined in the output timing, and sends out the message.
[0045] In this embodiment, since each time window can send the required number of packets, delay-sensitive traffic can still maintain a guaranteed end-to-end delay. In other words, by defining time-window-based enqueue and output timing, this embodiment can control the overall delay of packets during transmission, eliminating the need to strictly control the delay in each network device by constraining the sending time. This ensures that delay-sensitive traffic has a guaranteed end-to-end delay, while also increasing the available bandwidth for delay-sensitive traffic and reducing bandwidth resource waste.
[0046] In a possible implementation, the processing module determines the enqueue queue of the flow based on the arrival time window, the enqueue timing of the queue, the number of messages that can be sent by the flow within a time window, and the number of messages in the current enqueue queue, specifically including: when the number of messages in the current enqueue queue has reached the number of messages that can be sent within a time window, the processing determines the enqueue queue of the next time window of the arrival time window as the enqueue queue of the flow; or, when the number of messages in the current enqueue queue has not reached the number of messages that can be sent within a time window, the processing determines the enqueue queue of the arrival time window as the enqueue queue of the flow.
[0047] In this embodiment, by dynamically switching the queue, after the number of messages sent within a time window reaches the number of messages that can be sent, the next message can be scheduled to be sent in the next time window, which increases flexibility. While improving the available bandwidth of delay-sensitive traffic, it can also ensure that the messages sent within the time window meet the number requirements of messages sent within the time window, and meet the traffic characteristics requirements of delay-sensitive traffic.
[0048] In a possible implementation, the network device further includes a resource reservation module, which is configured to reserve resources for the flow in advance and configure the traffic resource reservation information during the resource reservation process.
[0049] In one possible implementation, the network device further includes a second storage module, the second storage module being configured to store pre-configured queue resource reservation information and traffic resource reservation information for sending the flow, the queue resource reservation information including a queue corresponding to the flow and a dequeue gating configured for the queue, the dequeue gating being used to control the number of packets sent within each time window; the traffic resource reservation information including the number of packets that can be sent by the flow within a time window;
[0050] Correspondingly, the processing module arranges the message to be sent in a specific time window according to the number of messages that can be sent by the flow within a time window and the cumulative number of messages sent within the time window, specifically including: the processing module adds the message to the queue corresponding to the flow to which the message belongs; takes out the message from the queue corresponding to the flow according to the dequeue gating and sends it, and the dequeue gating is updated according to the time window; the initial value of the dequeue gating in each time window is the number of messages that can be sent by the flow corresponding to the queue within a time window, and decreases according to the number of messages sent in each time window.
[0051] In this embodiment, since there is no time window restriction for entering the queue, but the sending of messages within each time window is controlled during the dequeue process, there is no requirement for the time of receiving the message, and there is no constraint on the sending time of the upstream device. The upstream device can send delay-sensitive traffic in almost the entire time window, thereby improving the available bandwidth of delay-sensitive traffic and reducing bandwidth resource waste.
[0052] In a possible implementation, the network device further includes a second resource reservation module; the second resource reservation module is configured to reserve resources for the flow in advance, and configure the traffic resource reservation information and queue resource reservation information during the resource reservation process.
[0053] In this embodiment, since queue resources are allocated based on flows rather than time windows, there is no need to require time window alignment across the entire network. This allows deployment on devices that do not support time alignment, thus expanding applicability.
[0054] In a fourth aspect, an embodiment of the present application provides a message sending system. The system includes a network control plane and at least one of the network devices. After receiving the traffic application request sent by the source device, the network control plane sends a notification of successful traffic application to the at least one network device on the path where the flow is located, and the notification includes information about the flow for which resource reservation is applied; the network device is used to configure resource reservation for the flow according to the flow information in the notification, receive a message, and identify that the flow to which the message belongs is a delay-sensitive flow with reserved resources, and the reserved resources include the number of messages that can be sent by the flow within a time window. Then, the network device arranges the message to be sent in a specific time window based on the number of messages that can be sent by the flow within a time window and the cumulative number of messages sent within the time window, and the number of messages already in the queue for sending the flow.
[0055] The output time window of the message in the embodiment of the present application is dynamically determined based on real-time information (such as the cumulative number of messages sent within a time window), rather than being determined entirely according to a static configuration. In this way, the flexibility in the message sending process can be increased, and the transmission device only needs to ensure that the number of messages sent within each time window meets the number of messages that can be sent within a time window, without constraining the sending time of each message. In other words, after the number of messages sent by the network device within a time window reaches the number of messages that can be sent, the next message can be arranged to be sent in the next time window. Therefore, in this way, the network device can arrange the message sent by the upstream device at any time point within a time window to be sent to a suitable time window, thereby avoiding constraints on the time when the upstream device sends the message, improving the available bandwidth of delay-sensitive traffic, and reducing bandwidth resource waste.
[0056] In one possible implementation, the network device is further configured to execute any one of the methods in various possible implementations of the first aspect.
[0057] In a fifth aspect, an embodiment of the present application provides a network device, which includes a processor coupled to a memory, and when the processor executes a program on the memory, implements any method as described in the first aspect above or any of the various possible implementation methods based on the first aspect.
[0058] The effects of various implementations of the network device in this embodiment can be referred to the descriptions in the corresponding places above and the descriptions in the relevant parts of the specification, and will not be repeated here.
[0059] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored, and the program code is used to instruct the execution of the first aspect or any method among various possible implementation methods based on the first aspect.
[0060] The effects of the various embodiments of the above computer-readable storage medium can be referred to the descriptions of the corresponding places above and the descriptions of the relevant parts in the specification, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A schematic diagram of the timing of message entry and exit provided in an embodiment of the present application;
[0062] Figure 2 A schematic diagram of a message transmission system architecture provided in an embodiment of the present application;
[0063] Figure 3 Flowchart of the traffic resource reservation method provided in the embodiment of the present application;
[0064] Figure 4 A schematic diagram of scheduling priority provided in an embodiment of the present application;
[0065] Figure 5 A flowchart of a method for sending a message by a network device provided in an embodiment of the present application;
[0066] Figure 6 A flowchart of another method for sending a message by a network device provided in an embodiment of the present application;
[0067] Figure 7 A flowchart of a method for sending a message by a network device provided in an embodiment of the present application;
[0068] Figure 8 A flowchart of a message dequeue provided in an embodiment of the present application;
[0069] Figure 9 A flowchart of a token bucket updating method provided in an embodiment of the present application;
[0070] Figure 10 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0071] Figure 11 A schematic diagram of the structure of another network device provided in an embodiment of the present application.
[0072] Figure 12 A schematic diagram of the structure of another network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0073] The present invention will be described in further detail below with reference to the accompanying drawings.
[0074] The embodiment of the present application can be applied to a transmission system capable of transmitting delay-sensitive traffic. The transmission system can be located in a layer 2 switching network or a layer 3 switching network. Figure 2 As shown, Figure 2 Schematic diagram of the structure of the transmission system provided in the embodiment of the present application, the transmission system may include a source device 201, at least one network device 202, a destination device 203 and a network control plane 204.
[0075] Source device 201 can be a control host in an industrial control network scenario, an industrial sensor, or a sensor in an IoT scenario. Network device 202 can be a switch or router. Destination device 203 can be an actuator (e.g., a servo motor in an industrial control network scenario or an information processing center in an IoT scenario). Network control plane 204 can be a controller or management server.
[0076] During the initialization phase of the transmission system, the network control plane 204 sets a unified time window size (for example, 125us is a time window) and sends the set time window size to each network device 202 in the transmission system. It should be noted that the network control plane 204 can also only send the time window size to the network devices 202 participating in the transmission of delay-sensitive traffic. The network control plane 204 can determine the network devices 202 participating in the transmission of delay-sensitive traffic based on the network topology and the existing message forwarding rules. The network device 202 configures the boundary phase of the time window of each local port according to the time window size set by the network control plane 204. Through the above initialization, the time windows in each network device 202 in the transmission system are set to be time windows of the same size, but the boundaries may not be aligned. In the subsequent process of transmitting messages, the current time window can be obtained by calculating or looking up the real time.
[0077] In the field of delay-sensitive networks, time window is an important concept. A time window is a continuous period of time. Normally, the network control plane 304 divides the time of the network device's output port into a plurality of time windows that are periodically circulated, such as "time window 1, time window 2, time window 3, time window 1...". Each time window has a certain data transmission capacity according to the rate of the link. For example, for a 10Gbit link, a time window of 125us can send 1250Kbit of data (about 100 1.5KB messages) within one time window. Therefore, in the subsequent transmission process of the message, the queuing or dequeuing of the message can be controlled according to the time window.
[0078] When the above transmission system is used in the scenario of transmitting delay-sensitive traffic, before transmitting the message, it is necessary to reserve traffic resources for the delay-sensitive traffic in each network device on the end-to-end path of the delay-sensitive traffic transmission, so as to prevent the delay-sensitive traffic from unpredictable congestion and generating additional queuing delay. The traffic resource reservation process is as follows: Figure 3 shown.
[0079] S301: The source device sends a traffic application request to the network control plane.
[0080] To ensure end-to-end latency for delay-sensitive traffic, traffic requests are typically made before transmission. Traffic requests are typically made based on a "number of packets per time window" (commonly known as traffic characteristics) or a specific traffic rate.
[0081] The traffic application request carries the information of the requested flow and traffic characteristics. The flow information may include information that can identify the flow (such as the source address, destination address, destination port number, Differentiated Services Code Point (DSCP), or protocol).
[0082] S302: The network control plane determines whether to accept the request based on the remaining sending capacity of the corresponding egress port in each network device on the path where the flow is located.
[0083] The corresponding egress port in the network device is the port on the network device used to send the flow. The network control plane can determine the transmission path of the flow based on the network topology of the transmission system and existing message forwarding rules. The transmission path includes the network device that transmits the flow and the egress port on the network device.
[0084] If the traffic characteristics requested in the traffic application request are greater than the current remaining sending capacity of any egress port on the path, the request fails, the network control plane rejects the request and feeds back the failure information to the source device. If the traffic characteristics requested in the traffic application request are less than or equal to the current remaining sending capacity of any egress port on the path, the request succeeds, the network control plane accepts the request and feeds back the success information to the source device, and updates the sending capacity of the egress ports in each network device on the path. For example, for a 125us, 10Gbps network, flow 1 applies to send 90 1.5KB messages per cycle, and the application is successful; after flow 1's application is completed, there is a sending capacity of about 10 messages per time window, and then flow 2 applies for a time window to send 50 1.5KB messages, and the request fails.
[0085] The port's sending capacity is the maximum number of packets that the port can send within a time window. This sending capacity can be calculated using the link bandwidth, window size, and maximum packet size.
[0086] S303: After receiving the traffic application request, the network control plane sends a notification of successful traffic application to each network device on the path where the flow is located.
[0087] The network control plane may send the notification using a control message. The notification includes information about the flow for which resource reservation is requested and traffic characteristics. The flow information and traffic characteristics may be obtained from the traffic request in step S301.
[0088] It should be noted that the figure only shows one network device. In practice, the network control plane will send a notification of successful traffic application to each network device on the path.
[0089] S304: Each network device that receives the notification performs traffic resource reservation configuration for the flow.
[0090] The traffic resource reservation configuration mainly includes:
[0091] 1. Record the flow information. Specifically, this flow information can be updated in the network device's flow table. During subsequent packet transmission, the network device can identify the flow based on the flow table. This can be done by analyzing the flow's source, destination IP address, port number, DSCP, or protocol.
[0092] 2. Configure traffic resource reservation information for the flow, which includes traffic characteristics (ie, the number of packets that can be sent by the flow within a time window).
[0093] After executing the above resource reservation process, the network device can transmit the flow according to the information configured in the resource reservation process.
[0094] During the message transmission process of the embodiment of the present application, for messages of delay-sensitive traffic, the network device arranges the message to be sent in a specific time window based on the number of messages that can be sent by the flow in a time window and the cumulative number of messages sent in a time window.
[0095] Unlike the prior art, the message output time window is dynamically determined based on real-time information (e.g., the cumulative number of messages sent within a time window), rather than being determined entirely according to a static configuration. This approach increases flexibility in the message sending process, as the transmission device only needs to ensure that the number of messages sent within each time window meets the number of messages that can be sent within a time window, without having to impose constraints on the sending time of each message. In other words, after the number of messages sent within a time window reaches the number of messages that can be sent, the network device can schedule the next message to be sent in the next time window. Therefore, by using this scheme that schedules message sending time windows based on the number of messages that can be sent within a time window and the cumulative number of messages sent within a time window, the network device can schedule messages sent by the upstream device at any point within a time window to be sent in an appropriate time window, thereby avoiding constraints on the time when the upstream device sends messages and allowing the upstream device to send delay-sensitive traffic throughout almost the entire time window. Moreover, the message sending time window is determined according to the number of messages that can be sent within a time window and the cumulative number of messages sent within a time window, which can also ensure that the messages sent in each time window meet the number requirements of messages sent within the time window and meet the traffic characteristics of delay-sensitive traffic. In addition, since each time window can send messages according to the required number, the delay-sensitive traffic still has a promised end-to-end delay. Therefore, the dynamic scheduling mechanism adopted in the embodiment of the present application can improve the available bandwidth of delay-sensitive traffic and reduce bandwidth resource waste while ensuring that delay-sensitive traffic has a promised end-to-end delay and that the output traffic of each network device in the network still meets the traffic characteristics.
[0096] The following describes in detail the method for transmitting delay-sensitive traffic messages provided in an embodiment of the present application.
[0097] To facilitate understanding, let's first briefly introduce the queue mechanism of network devices.
[0098] In network devices, each port is equipped with a queue for caching messages. After a message enters the network device, it first enters the cache queue of the egress port, and then exits the queue and is sent according to the queue scheduling mechanism. In order to better distinguish traffic levels, network devices usually adopt queue mechanisms of different levels. In other words, a port in a network device can be equipped with multiple cache queues of different levels. In the queue scheduling, the queue with higher priority will be scheduled first. Figure 4 As shown, Figure 4 This is a schematic diagram of scheduling priority. Figure 4 In the example, queues 1, 2, and 3 are the highest priority queues, and queues 4 to 8 are low priority queues. When queues 2 and 4 to 8 are all open, the network device will prioritize the packets in queue 2 before scheduling the packets in queues 4 to 8. For network devices that can transmit delay-sensitive traffic, the network device will reserve queues for sending delay-sensitive traffic on the egress ports of delay-sensitive traffic in advance. These queues are usually the queues with the highest priority, such as Figure 4 Queue 1, Queue 2, and Queue 3 in .
[0099] According to the above queue mechanism, the process of sending a message by a network device generally includes two processes: one is the enqueuing process of adding the received message to the queue, and the other is the dequeuing process of dispatching the message from the queue.
[0100] In response to these two processes, the embodiments of the present application propose two solutions for optimizing message sending. Solution 1: Mainly involves improving the message enqueuing process. In this solution, the enqueuing of messages can be controlled based on the number of messages that can be sent within a time window and the cumulative number of messages sent within a time window. The network device can dynamically determine the enqueuing queue of the flow to which the message belongs based on the number of messages that can be sent within a time window and the cumulative number of messages sent within a time window, and update the pre-configured enqueuing queue of the flow.
[0101] Solution 2 primarily involves improving the packet dequeueing process. This solution controls packet dequeueing based on the number of packets that can be sent within a time window and the cumulative number of packets sent within that time window. Network devices can set dequeue gating based on the number of packets that can be sent within a time window, and use this gating to control the number of packets that can be dequeued within a time window.
[0102] The two solutions are described in detail below through Example 1 and Example 2 respectively.
[0103] Example 1
[0104] In this embodiment, the network device reserves at least three queues for delay-sensitive traffic in advance, and configures the enqueue timing and output timing of these queues based on the time window. Enqueue timing refers to the timing of each queue becoming an enqueue queue. Among them, the enqueue queue is the queue that the message can enter. The enqueue timing based on the time window is used to define the enqueue queue corresponding to each time window. The enqueue timing is used in the message enqueue stage to determine the enqueue queue of the message in each time window. The output timing refers to the opening timing of each queue in the dequeue scheduling stage. The output timing based on the time window is used to define the switch status of each queue in each time window. The output timing is used in the message dequeue stage to control the switch of each queue in each time window. The enqueue timing and output timing can be stored in a table structure or in other storage structures (such as arrays, etc.). As shown in Table 1 and Table 2:
[0105] Time window value Enqueue Alternative Entry Queue Time window KN+1 Queue 2 Queue 3 Time window KN+2 Queue 3 Queue 4 Time window KN+3 Queue 4 Queue 5 …… …… …… Time window KN+K-1 Queue K Queue 1 Time window KN+K Queue 1 Queue 2
[0106] Table 1
[0107] Time window N+1 Queue 1 Open Queue 2 closed Queue 3 closed …… Queue K closed Other queues open Time window N+2 Queue 1 closed Queue 2 Open Queue 3 closed …… Queue K closed Other queues open Time window N+3 Queue 1 closed Queue 2 closed Queue 3 Open …… Queue K closed Other queues open …… Time window N+K Queue 1 closed Queue 2 closed Queue 3 closed …… Queue K Open Other queues open
[0108] Table 2
[0109] Table 1 stores the queue entry timing. Table 2 stores the output timing. In Tables 1 and 2, N is an integer greater than or equal to 0, and K is the number of queues for sending delay-sensitive traffic, which is an integer greater than or equal to 3.
[0110] In the enqueue sequence shown in Table 1, each time window has both an enqueue queue and a candidate enqueue queue. Thus, when the number of packets in the enqueue queue of a flow in a time window reaches the number of packets that the flow can send within the time window, the candidate packets of the flow can be placed in the candidate enqueue queue of the time window. The candidate enqueue queue of the previous time window can be set as the enqueue queue of the next time window. This allows the excess packets of the previous time window to be placed in the enqueue queue of the next time window.
[0111] In the output timing shown in Table 2, the enqueue queue for the Mth time window is open in the M+1th time window and closed in all other time windows, where M is an integer greater than or equal to 1. Furthermore, queues 1 through K are high-priority queues for sending delay-sensitive traffic, while the other queues are lower-priority queues for sending other traffic.
[0112] Table 1 and Table 2 are only examples. In actual applications, the alternative enqueue queue may not be configured in the enqueue sequence. When the number of messages in the enqueue queue of the previous time window reaches the number of messages that can be sent within a time window, the messages are directly placed in the enqueue queue of the next time window.
[0113] It should be noted that different delay-sensitive traffic can share the same queue. When a queue is shared, the queue entry timing and output timing are also shared.
[0114] The above process of reserving queues and configuring queue entry and output timings is called queue resource reservation. Figure 3 The traffic resource reservation shown may be completed at any time before (for example, during the transmission system initialization phase), or may be completed during the first traffic resource reservation phase when the queue resources are to be used.
[0115] In this embodiment, the network device also configures an enqueue queue item for recording the enqueue queue of the flow, and a message count item for counting the messages in the enqueue queue in the traffic resource reservation information configured in step S304. The message count recorded in the message count item can represent the number of messages in the enqueue queue of the flow. The initial enqueue queue of the flow configured in the enqueue queue item is the enqueue queue of the first time window in the enqueue sequence. The enqueue queue of the flow and the number of messages in the enqueue queue are flow state information, which can be updated according to the real-time state during the message sending process. The enqueue queue item can be updated according to the enqueue queue determined during the message sending process. The traffic resource reservation information can be stored in a table structure or in other storage structures (such as arrays, etc.). Its structure is shown in Table 3:
[0116] Serial Number Packet Count Reserved resource information Enqueue Stream 1 1 One message per time window Queue 2 Stream 2 1 One message per time window Queue 2
[0117] Table 3
[0118] The network device transmits the message according to the information configured in the above queue resource reservation and flow resource reservation process. Figure 5 As shown, Figure 5 This is a flow chart of the method for a network device to send a message in Example 1.
[0119] Among them, 5a-5e is the process of message enqueuing, and 5f-5h is the process of message dequeuing.
[0120] 5a. The network device receives a message from the upstream device.
[0121] After receiving the message, the network device determines the egress port of the message. The method for determining the egress port can be implemented using existing technology and will not be described in detail here.
[0122] 5b. The network device identifies whether the flow to which the packet belongs is delay-sensitive traffic.
[0123] The network device can parse the source and destination IP addresses, port numbers, DSCP, and protocol number information within the packet header and use this information to search the flow information recorded during the resource reservation process to identify whether the flow to which the packet belongs is latency-sensitive traffic. This embodiment uses the example of a flow to which the packet belongs being latency-sensitive traffic. For non-latency-sensitive traffic, the network device places it into a lower-priority queue. The queueing and scheduling process utilizes existing technologies and will not be further described in this embodiment.
[0124] 5c. After the network device identifies the flow as delay-sensitive traffic, it determines the arrival time window of the message.
[0125] The arrival time window is the time window of the message at the egress port of the network device when the message arrives at the network device.
[0126] In a specific implementation, the network device may first obtain the current time when the message is received. The network device may obtain the current time based on a clock crystal in the transmission system or based on time information contained in the message content.
[0127] The network device calculates or looks up the current time window of the egress port based on the port number of the egress port determined in step 5a and the current time. The calculation or table lookup configuration can be configured when the transmission system is initialized.
[0128] 5d. The network device determines the enqueue queue for the flow based on the message's arrival time window, the queue's enqueue sequence, the number of messages that can be sent by the flow to which the message belongs within a time window, and the number of messages currently in the enqueue queue.
[0129] The network device can obtain the number of packets that can be sent by the flow within a time window from the traffic characteristics recorded in the traffic resource reservation information, and can obtain the number of packets currently in the enqueue queue from the packet count in the traffic resource reservation information.
[0130] Specifically, if the number of packets in the current enqueue queue has reached the number of packets that can be sent within a time window, the network device determines the enqueue queue of the next time window after the arrival time window as the enqueue queue for the flow. If the number of packets in the current enqueue queue has not reached the number of packets that can be sent within a time window, the enqueue queue of the arrival time window is determined as the enqueue queue for the flow.
[0131] The above determination method is a processing method when no alternative enqueuing queue is set for the time window in the enqueuing sequence.
[0132] The implementation method of setting an alternative enqueue queue for the time window in the enqueue sequence is as follows:
[0133] When setting the enqueue sequence, the network device sets the candidate enqueue queue of the previous time window as the enqueue queue of the next time window, as shown in Table 1. The process of determining the enqueue queue for a flow specifically includes: if the number of packets in the current enqueue queue has reached the number of packets that can be sent within a time window, the network device determines the candidate enqueue queue of the arrival time window as the enqueue queue for the flow. If the number of packets in the current enqueue queue has not reached the number of packets that can be sent within a time window, the network device determines the enqueue queue of the arrival time window as the enqueue queue for the flow.
[0134] After determining the enqueue queue of the flow, the network device may update the enqueue queue of the flow recorded in the network device according to the determined enqueue queue. Specifically, the updating is performed when the determined enqueue queue changes relative to the recorded enqueue queue.
[0135] After each update of the enqueue queue in the traffic resource reservation information, the network device restores the number of packets recorded in the traffic resource reservation information to its initial value. This initial value can be set to zero, which is then accumulated, and the accumulated value is the current number of packets in the enqueue queue. This initial value can also be set to any value, which is then decremented, and the difference between the initial value and the decremented value is the current number of packets in the enqueue queue.
[0136] 5e. The network device adds the packet to the determined enqueue queue for the flow.
[0137] After the network device adds the packet to the identified enqueue for the flow, it further accumulates the number of packets recorded in the traffic resource reservation information. This accumulation can be either cumulative or decremental. When the initial value of the packet count is set to zero, accumulation is performed cumulatively. When the initial value of the packet count is set to an arbitrary value, accumulation is performed decrementally.
[0138] 5f. The time window in which the network device obtains the outbound port.
[0139] The method for the network device to obtain the time window of the egress port can be referred to step 5c, which will not be repeated here.
[0140] 5g. The network device determines the queue whose current time window is open based on the output timing.
[0141] The current time window here is the time window obtained in step 5g. Assuming that the current time window is time window 2, in the output timing shown in Table 2, the queues that are opened are queue 2 and other queues with lower priorities.
[0142] 5h. The network device schedules the messages in the open queue to be sent.
[0143] During the scheduling process, priority is given to sending messages in the high-priority queue among the open queues. For scheduling by priority, please refer to Figure 4 , I will not go into details here.
[0144] According to the scheduling process from step 5f to step 5h, the queue where the message received in step 5a is located will be opened in the time window for opening the queue defined in the output timing, and then sent out.
[0145] In the above solution, queue enqueue timing is based on time windows, and message dequeueing is also scheduled based on time windows. In other words, determining the enqueue queue for a flow also determines the output time window for messages added to that queue. Therefore, by dynamically determining the enqueue queue for a flow, each received message can be scheduled for delivery within a specific time window.
[0146] The above embodiment, by defining the enqueuing timing, output timing and recording flow status information, can flexibly adjust the message of the previous time window to the enqueuing queue of the next time window, breaking the constraint of the static configuration of the enqueuing queue on the sending time of the upstream device, and enabling the upstream device to send delay-sensitive traffic in almost the entire time window, thereby improving the available bandwidth of delay-sensitive traffic and reducing bandwidth resource waste.
[0147] In addition, in the above embodiment, since the enqueue queue of the Mth time window is opened for transmission in the M+1th time window, according to the above scheme, the message received by the network device in the local Nth time window will be sent in the local N+1th (or N+2)th time window, so that the maximum end-to-end delay can be guaranteed to be ((end-to-end hop count + 1) * (time window size)) + the sum of the time window boundary differences on the path. Therefore, the embodiment of the present application can improve the available bandwidth of delay-sensitive traffic while ensuring that delay-sensitive traffic has a committed end-to-end delay. Moreover, the solution provided by the embodiment of the present application does not require the time window alignment of the entire network, and can be deployed on devices that do not support time alignment, thereby expanding its applicability.
[0148] The following combination Figure 6 right Figure 5 The specific implementation of step 5d shown is introduced in detail.
[0149] like Figure 6 As shown, Figure 6 This is a flow chart of the method for determining the queue for enqueuing in Example 1. The method includes:
[0150] S601. The network device determines whether the arrival time window of the message is the same as the arrival time window of the previous message. If so, step S602 is executed; if not, step S606 is executed.
[0151] At step S602, the network device determines whether the packet count in the traffic resource reservation information is equal to the number of packets that can be sent within a time window. If the packet count is equal to the number of packets that can be sent, the enqueue queue for the flow is determined to be a candidate enqueue queue for the arrival time window, and steps S603-S605 are executed. If the packet count is not equal to the number of packets that can be sent, the enqueue queue for the flow is determined to be the enqueue queue for the arrival time window, and steps S604-S605 are executed.
[0152] This embodiment uses the example of an initial value of zero for the packet count in the traffic resource reservation information, and incrementing the count by 1 each time a packet is added. In this manner, the packet count in the traffic resource reservation information can be directly compared with the traffic characteristics of the flow (i.e., the number of packets that can be sent by the flow within a time window).
[0153] This embodiment is described by taking an example in which a candidate enqueue queue is configured in the enqueue timing table.
[0154] S603: The network device updates the enqueuing queue recorded in the traffic resource reservation information to the candidate enqueuing queue in the enqueuing timing table according to the arrival time window of the message, and clears the message count in the traffic resource reservation information.
[0155] S604: Add the message to the enqueue queue according to the enqueue queue recorded in the traffic resource reservation information.
[0156] It should be noted that there are two ways to implement adding the message to the enqueuing queue determined in S602 in the embodiment of the present application. Method 1: first update the enqueuing queue recorded in the traffic resource reservation information, and then enqueue according to the recorded enqueuing queue. It should be noted that for the case where no update is required (that is, the determined enqueuing queue is unchanged compared to the recorded enqueuing queue), enqueue is performed directly according to the recorded enqueuing queue. Method 2: Enqueue directly according to the determined enqueuing queue. By adopting the method of enqueuing directly according to the determined enqueuing queue, the operation of updating the enqueuing queue recorded in the traffic resource reservation information can be performed before or after enqueuing, and there is an inevitable sequence relationship between the two.
[0157] This embodiment is described by taking method 1 as an example.
[0158] S605: The network device increases the message count in the traffic resource reservation information by 1.
[0159] S606, the network device determines whether the arrival time window of the message is the next time window of the arrival time window of the previous message. If it is the next time window of the arrival time window of the previous message, execute S607; if it is not the next time window of the arrival time window of the previous message, execute S608.
[0160] If the arrival time window of the message is the next time window after the arrival time window of the previous message, then the message is the first message within its arrival time window. Since step S606 is the negative branch of step S601, if the arrival time window of the message is not the next time window after the arrival time window of the previous message, then it is the time window after the next time window after the arrival time window of the previous message. In this case, the message is also the first message within its arrival time window. In other words, as long as the arrival time window of the message is not the same time window as the arrival time window of the previous message, the message is the first message within its arrival time window.
[0161] S607, determine whether the enqueuing queue in the traffic resource reservation information is the enqueuing queue in the enqueuing timing sequence of the arrival time window of the message. If it is the enqueuing queue in the enqueuing timing sequence, execute S602; if it is not the enqueuing queue in the enqueuing timing sequence, execute S608.
[0162] If the enqueue queue in the traffic resource reservation information is the enqueue queue for the packet's arrival time window in the enqueue sequence, this indicates that the standby enqueue queue was used in the time window before the packet's arrival time window. If the enqueue queue in the traffic resource reservation information is not the enqueue queue for the packet's arrival time window in the enqueue sequence, this indicates that the standby enqueue queue was not used in the time window before the packet's arrival time window.
[0163] S608 , the network device updates the enqueue queue recorded in the traffic resource reservation information to the enqueue queue corresponding to the arrival time window, and clears the message count in the traffic resource reservation information to zero, and then continues to execute S604 - S605 .
[0164] Example 2
[0165] In this embodiment, the network device also needs to reserve queue resources and traffic resources.
[0166] The queue resource reservation method in this embodiment is different from the queue resource reservation method in Example 1. In this embodiment, the network device configures a one-to-one queue for each delay-sensitive traffic. That is, the queue in this embodiment is allocated based on the flow, rather than based on the time window. Therefore, there is no time window-based enqueue timing and output timing in this embodiment. In this embodiment, the network device also configures a dequeue gating for the queue of each flow. The dequeue gating is used to control the number of messages sent within each time window. Therefore, the queue resource reservation information in this embodiment includes not only the correspondence between the flow and the queue of the flow, but also the dequeue gating of the queue of each flow.
[0167] The flow resource reservation process in this embodiment can be referred to Figure 3 The embodiments shown are not described in detail here.
[0168] The queue resource reservation in this embodiment may be performed when the traffic resource is reserved, or may be performed before the traffic resource is reserved.
[0169] The network device transmits the message according to the information configured in the above queue resource reservation and flow resource reservation process. Figure 7 As shown, Figure 7 This is a flow chart of the method for a network device to send a message in Example 2.
[0170] Among them, 7a-7c is the process of enqueuing the message, and 7d is the process of dequeuing the message.
[0171] 7a. The network device receives a message from the upstream device.
[0172] 7b. The network device identifies whether the flow to which the packet belongs is delay-sensitive traffic.
[0173] The specific implementation of this step can be referred to Figure 5 Step 5b in the illustrated embodiment will not be described in detail here.
[0174] This embodiment also takes the delay-sensitive flow to which the message belongs as an example for explanation. For messages of non-delay-sensitive flow, the network device places them into other queues with lower priorities. The queueing and scheduling processes adopt existing technologies and will not be described in detail in the embodiment of this application.
[0175] 7c. After the network device identifies the flow as delay-sensitive traffic, it adds the packet to the queue corresponding to the flow to which the packet belongs.
[0176] 7d. The network device takes out the message from the queue corresponding to the flow according to the dequeue gate and sends it.
[0177] Specifically, the network device checks the queue and dequeue gate of the flow in real time. When the dequeue gate is not zero and the queue is not empty, the message is taken from the queue and sent. In the embodiment of the present application, the dequeue gate is updated according to the time window. The initial value of the dequeue gate in each time window is the number of messages that the corresponding flow can send in a time window, and decreases according to the number of messages sent in each time window.
[0178] In a specific implementation, the dequeue gating can be implemented using a token bucket. The update of the dequeue gating is to update the number of tokens in the token bucket.
[0179] Specifically, when using a token bucket, the implementation process of step 7d is as follows: Figure 8 shown.
[0180] Figure 8 The flowchart for scheduling message dequeueing includes:
[0181] In step S801, the network device checks the packets in each queue for delay-sensitive traffic and the tokens in the token bucket in real time to determine whether any queue satisfies the requirement that the queue is not empty and that the token bucket of the queue contains a token. If so, step S802 is executed to extract the packet and send it. If not, step S803 is executed.
[0182] S802: The network device takes out a message from the queue for transmission, and reduces the number of tokens in the root token bucket by 1, and returns to S801. S803: The network device schedules a message in a queue with a lower priority for transmission.
[0183] Step S803 can be implemented using existing technologies, such as scheduling the queue corresponding to the non-delay-sensitive traffic to dequeue and send messages based on priority scheduling or polling scheduling, which will not be described in detail here.
[0184] The following takes the dequeue gating as a token bucket as an example to explain the update process of the dequeue gating in detail.
[0185] like Figure 9 As shown, Figure 9 Flowchart of a token bucket update method. The method includes:
[0186] S901: A network device obtains a time window of an egress port for transmitting delay-sensitive traffic.
[0187] For the method of obtaining the time window of the outbound port, please refer to Figure 5 Step 5a shown is not repeated here.
[0188] S902, the network device determines whether the time window is updated. If the time window is updated, S903 is executed. If the time window is not updated, the process returns to S901.
[0189] The determination of whether the time window is updated is performed by comparing it with the time window when the token bucket was last updated.
[0190] S903: The network device obtains the traffic characteristics (ie, the number of packets that can be sent by each flow within a time window) in the traffic resource reservation information of each flow.
[0191] At S904, the network device updates the number of tokens in the token bucket of each flow's queue to the number of packets that each flow can send within a time window. In this solution, since the dequeue gate is updated based on the number of packets that a flow can send within a time window, and the dequeue gate value implicitly includes the cumulative number of packets sent within a time window, this embodiment also schedules packets for transmission within a specific time window based on the number of packets that a flow can send within a time window and the cumulative number of packets sent within a time window.
[0192] Since this solution does not impose time window restrictions on enqueuing, but controls the sending of messages within each time window during the dequeuing process, there is no requirement for the time of receiving the message, nor will it constrain the sending time of the upstream device. It can enable the upstream device to send delay-sensitive traffic in almost the entire time window, improve the available bandwidth of delay-sensitive traffic, and reduce bandwidth resource waste.
[0193] In addition, in the above embodiment, since the number of messages sent in each time window can be guaranteed, this ensures that the end-to-end delay has a committed upper limit. Therefore, the embodiments of the present application can increase the available bandwidth for delay-sensitive traffic while also ensuring that delay-sensitive traffic has a committed end-to-end delay. Moreover, the solution provided by the embodiments of the present application does not require time window alignment across the entire network and can be deployed on devices that do not support time alignment, expanding its applicability.
[0194] The following is a summary of the above Figures 1-9 The network device 1000 and the network device 1100 involved in the embodiment shown are as follows. The network device 1000 is applied in the above Figure 2-6 In the embodiment described above, the network device 1100 is used in the above Figure 2-3 as well as Figure 7-9 The embodiments described are described one by one below.
[0195] like Figure 10 As shown, Figure 10 The present invention provides a schematic diagram of a network device 1000 according to an embodiment of the present invention. The network device 1000 includes a receiving module 1002 and a processing module 1004 .
[0196] The receiving module 1002 is used to receive a message; the specific processing functions or executable steps of the receiving module 1002 can refer to the above Figure 5 Detailed description in 5a of the illustrated embodiment.
[0197] The processing module 1004 is used to identify that the flow to which the message belongs is a delay-sensitive flow with reserved resources, and the reserved resources include the number of messages that can be sent by the flow in a time window, and arrange the message to be sent in a specific time window according to the number of messages that can be sent by the flow in a time window and the number of messages already in the queue for sending the flow in the cumulative number of messages sent in the time window. The specific detailed processing functions or executable steps of the processing module 1004 can be referred to above. Figure 5 5b-5h of the illustrated embodiment, and Figure 6 Detailed description in S601-S608.
[0198] In a specific embodiment, the network device further includes a first storage module 1006; the first storage module 1006 is used to store pre-set queue resource reservation information and traffic resource reservation information for sending the flow; the queue resource reservation information includes a queue for sending the flow and an entry timing and an output timing of the queue, the entry timing is used to define the entry queue of each time window, and the output timing is used to define the switch state of each queue in each time window; the traffic resource reservation information records the current entry queue of the flow and a message count for indicating the number of messages in the current entry queue; the cumulative number of messages sent within the time window is the number of messages in the current entry queue;
[0199] Accordingly, the processing module arranges the message to be sent in a specific time window according to the number of messages that can be sent by the flow in a time window and the cumulative number of messages sent in the time window, specifically including:
[0200] The processing module determines an arrival time window of the message, where the arrival time window is the time window of the output port of the network device when the message arrives; queries the number of messages in the current enqueue queue; determines the enqueue queue of the flow based on the arrival time window, the enqueue timing of the queue, the number of messages that the flow can send within a time window, and the number of messages in the current enqueue queue; adds the message to the determined enqueue queue of the flow; opens the queue where the message is located within the time window for opening the queue defined in the output timing, and sends out the message.
[0201] The specific details of the first storage module 1006 can be found in the above Figure 3 A detailed description of step S304 in the illustrated embodiment, and a detailed description of the above Tables 1-3 and their corresponding text portions.
[0202] The specific detailed processing functions or executable steps of the processing module 1004 can be referred to above. Figure 5 5b-5h of the illustrated embodiment, and Figure 6 Detailed description in S601-S608.
[0203] In a specific embodiment, the network device further includes a first resource reservation module 1008, and the first resource reservation module 1008 is used to reserve resources for the flow in advance and configure the traffic resource reservation information during the resource reservation process.
[0204] The specific detailed processing functions or executable steps of the first resource reservation module 1008 can be referred to above Figure 3 A detailed description of step S304 in the illustrated embodiment, and a detailed description of the above Tables 1-3 and their corresponding text portions.
[0205] like Figure 11 As shown, Figure 11 The present invention provides a schematic diagram of a network device 1100 according to an embodiment of the present invention. The network device 1100 includes a receiving module 1102 and a processing module 1104 .
[0206] The receiving module 1102 is used to receive messages; the specific detailed processing functions or executable steps of the receiving module 1102 can refer to the above Figure 7 Detailed description in 7a of the illustrated embodiment.
[0207] The processing module 1104 is used to identify that the flow to which the message belongs is delay-sensitive traffic with reserved resources, and the reserved resources include the number of messages that can be sent by the flow within a time window. According to the number of messages that can be sent by the flow within a time window and the cumulative number of messages sent within the time window, the message is arranged to be sent in a specific time window according to the number of messages already existing in the queue for sending the flow.
[0208] The specific detailed processing functions or executable steps of the processing module 1104 can be referred to above. Figure 7 7b-7d of the illustrated embodiment, and Figure 8 and 9 Detailed description in .
[0209] In a specific embodiment, the network device further includes a second storage module 1106, which is used to store pre-configured queue resource reservation information and traffic resource reservation information for sending the flow, the queue resource reservation information including a queue corresponding to the flow and a dequeue gating configured for the queue, the dequeue gating being used to control the number of packets sent in each time window; the traffic resource reservation information includes the number of packets that can be sent by the flow in a time window;
[0210] Accordingly, the processing module 1104 arranges the message to be sent in a specific time window according to the number of messages that can be sent by the flow in a time window and the cumulative number of messages sent in the time window, specifically including:
[0211] The processing module 1104 adds the message to the queue corresponding to the flow to which the message belongs; takes out the message from the queue corresponding to the flow for transmission according to the dequeue gating, and the dequeue gating is updated according to the time window; the initial value of the dequeue gating in each time window is the number of messages that can be sent by the flow corresponding to the queue in a time window, and decreases according to the number of messages sent in each time window.
[0212] The specific details of the second storage module 1106 can be found in the above Figure 3 Detailed description of step S304 in the illustrated embodiment.
[0213] The specific detailed processing functions or executable steps of the processing module 1104 can be referred to above. Figure 7 7b-7d of the illustrated embodiment, and Figure 8 and 9 Detailed description in .
[0214] In a specific embodiment, the network device further includes a second resource reservation module 1108; the second resource reservation module 1108 is used to reserve resources for the flow in advance, and configure the traffic resource reservation information and queue resource reservation information during the resource reservation process.
[0215] The specific detailed processing functions or executable steps of the second storage module 1108 can be referred to above Figure 3 In the embodiment shown, step S304 and Figure 9 A detailed description of the illustrated embodiments.
[0216] It should be understood that the device embodiments described above are merely illustrative. For example, the division of the modules is merely a logical functional division. In actual implementation, there may be other division methods, such as a plurality of modules, units or components may be combined or a certain module therein may be further divided into different functional modules. For example, the function of the first resource reservation module in the network device in the above embodiment may also be combined with the processing module in one module. In addition, it should be noted that the coupling or communication connection between the modules or devices shown or described in the figure may be an indirect coupling or communication connection formed through some interfaces, devices or units, or may be an electrical, mechanical or other form of coupling or connection.
[0217] Modules described as separate components may be physically separate or physically contained within the same physical component. A component named "module" may be a hardware unit, a software module, a logical unit, or a combination of hardware and software. The module may be located within a single network element or distributed across multiple network elements. Some or all of these units may be selected based on actual needs to achieve the objectives of this embodiment.
[0218] Figure 12 This is a possible structural diagram of the network device 1200 involved in the embodiment of the present application. The network device 1200 can be applied to the above Figure 2-9 In the embodiment shown, the functions or operating steps of the network device are implemented by one or more processors in a general-purpose computer or server by executing program code in a memory. In this embodiment, the network device 1200 includes: a transceiver 1210, a processor 1220, a random access memory 1240, a read-only memory 1250, and a bus 1260.
[0219] The processor 1220 is coupled to the transceiver 1210 , the random access memory 1240 , and the read-only memory 1250 via a bus 1260 .
[0220] The processor 1220 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present invention.
[0221] The bus 1260 may include a pathway for transmitting information between the aforementioned components.
[0222] The transceiver 1210 is used to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. In an embodiment of the present invention, the transceiver 1110 can be used to communicate with the network control plane, source device or other network devices.
[0223] In a specific embodiment, the random access memory 1240 can load the implementation Figure 2-6 The application code of the network device in the illustrated embodiment is controlled and executed by the processor 1220.
[0224] In another specific embodiment, the random access memory 1240 can be loaded with Figure 2-3 as well as Figure 7-9 The application program code of the network device in the embodiment is controlled and executed by the processor 1220 .
[0225] When the network device 1200 needs to be run, it is started by the basic input and output system solidified in the read-only memory 1250 or the bootloader boot system in the embedded system, and the network device 1200 is guided into a normal operating state. After the network device 1200 enters the normal operating state, the processor 1220 runs the application program and the operating system in the random access memory 1240, so that the network device 1200 can execute Figure 2-6 The functions and operations of the illustrated embodiments, or Figure 2-3 as well as Figure 7-9 Functionality and operation in the illustrated embodiments.
[0226] The interaction with the network control plane or other network devices or source devices is completed by the transceiver 1210 under the control of the processor 1220 , and the internal processing of the network device 1200 is completed by the processor 1120 .
[0227] It should be noted that in addition to the conventional methods described above, such as processor execution of program code instructions stored in memory, this embodiment can also utilize a virtual network device implemented on a physical server in conjunction with Network Function Virtualization (NFV) technology. The virtual network device may be a virtual switch, router, or other forwarding device. Those skilled in the art will be able to virtualize multiple network devices with the aforementioned functions on a physical server by combining NFV technology after reading this application. This description will not be repeated here.
[0228] The embodiment of the present invention further provides a computer storage medium for storing computer software instructions used by the above network device, which includes instructions for executing the above Figure 2-6The functions of the network device in the illustrated embodiment involve programs.
[0229] The embodiment of the present invention also provides another computer storage medium for storing computer software instructions used by the above network device, which includes instructions for executing the above Figure 2-3 as well as Figure 7-9 The functions of the network device in the illustrated embodiment involve programs.
[0230] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art can understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0231] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices (equipment), or computer program products. Therefore, the embodiments of the present application can adopt the form of hardware embodiments, software embodiments, or embodiments in which software and hardware are combined. Moreover, the application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The computer program is stored / distributed in a suitable medium, provided together with other hardware or as a part of hardware, or other distribution forms can be adopted, such as through the Internet or other wired or wireless telecommunication systems.
[0232] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (devices) and computer program products of the embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as the combination of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0233] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0234] Although the present invention has been described with reference to specific features and embodiments thereof, it will be apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the invention. Accordingly, this specification and drawings are merely illustrative of the invention as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the invention. It will be apparent that various modifications and variations may be made to the present invention by those skilled in the art without departing from the spirit and scope of the invention. Thus, the present invention is intended to encompass such modifications and variations as fall within the scope of the claims and their equivalents.
Claims
1. A method for sending a message, characterized in that: The method comprises: The network device receives the message; The network device identifies that the flow to which the message belongs is delay-sensitive traffic for which resources have been reserved, where the reserved resources include the number of messages that can be sent by the flow within a time window; The network device determines, according to an arrival time window corresponding to the message and the number of messages that can be sent within the time window, a first queue corresponding to the message, wherein the first queue is an enqueue queue; The network device enters the message into a first queue; The network device opens the first queue in a sending time window and sends the message; The network device is pre-configured with queue resource reservation information and traffic resource reservation information for sending the flow; the queue resource reservation information includes the queue used to send the flow and the enqueue timing and output timing of the queue; the traffic resource reservation information records the current enqueue queue of the flow and a message count used to represent the number of messages in the current enqueue queue.
2. The method according to claim 1, wherein The network device determines, according to an arrival time window corresponding to the message and the number of messages that can be sent within the one time window, a first queue corresponding to the message, including: When the number of packets in the second queue corresponding to the arrival time window has reached the number of packets that can be sent within the one time window, the network device determines the queue corresponding to the next time window of the arrival time window as the first queue.
3. The method according to claim 1, wherein The network device determines, according to an arrival time window corresponding to the message and the number of messages that can be sent within the one time window, a first queue corresponding to the message, including: When the number of packets in the second queue corresponding to the arrival time window does not reach the number of packets that can be sent within the one time window, the network device determines the queue corresponding to the arrival time window as the first queue of the flow.
4. The method according to any one of claims 1 to 3, wherein In the output time sequence, the enqueue queue of the Mth time window is in an open state in the M+1th time window and is in a closed state in other time windows, where M is an integer greater than or equal to 1.
5. The method according to any one of claims 1 to 3, wherein The method further comprises: After determining the enqueuing queue of the flow, the enqueuing queue recorded in the traffic resource reservation information is updated according to the determined enqueuing queue; each time the network device updates the recorded enqueuing queue, the number of packets recorded in the traffic resource reservation information is restored to an initial value, and each time a packet is added to the updated enqueuing queue, the number of packets is accumulated.
6. The method according to any one of claims 1 to 3, wherein: The method further comprises: The network device reserves resources for the flow in advance, and configures traffic resource reservation information during the resource reservation process.
7. A network device, characterized in that: The network device includes a receiving module and a processing module; The receiving module is used to receive messages; The processing module is configured to identify that the flow to which the message belongs is delay-sensitive traffic for which resources have been reserved, where the reserved resources include the number of messages that can be sent by the flow within a time window; The processing module is configured to determine a first queue corresponding to the message according to an arrival time window corresponding to the message and the number of messages that can be sent within the time window, wherein the first queue is an enqueue queue; The processing module is further configured to enqueue the message into a first queue; The processing module is further configured to open the first queue in a sending time window and send the message; The network device further includes a first storage module; The first storage module is used to store pre-set queue resource reservation information and traffic resource reservation information for sending the flow; the queue resource reservation information includes the queue used to send the flow and the queue enqueue timing and output timing of the queue; the traffic resource reservation information records the current enqueue queue of the flow and a message count used to represent the number of messages in the current enqueue queue.
8. The network device according to claim 7, wherein: The processing module is specifically used for: When the number of packets in the second queue corresponding to the arrival time window has reached the number of packets that can be sent within the one time window, the queue corresponding to the next time window of the arrival time window is determined as the first queue.
9. The network device according to claim 7, wherein: The processing module is specifically used for: When the number of packets in the second queue corresponding to the arrival time window does not reach the number of packets that can be sent within the one time window, the queue corresponding to the arrival time window is determined as the first queue of the flow.
10. The network device according to any one of claims 7 to 9, wherein: In the output time sequence, the enqueue queue of the Mth time window is in an open state in the M+1th time window and is in a closed state in other time windows, where M is an integer greater than or equal to 1.
11. The network device according to any one of claims 7 to 9, wherein: After determining the enqueue queue of the flow, the processing module updates the enqueue queue recorded in the traffic resource reservation information according to the determined enqueue queue; each time the processing module updates the recorded enqueue queue, the processing module restores the number of packets recorded in the traffic resource reservation information to an initial value, and accumulates the number of packets each time a packet is added to the updated enqueue queue.
12. The network device according to any one of claims 7 to 9, wherein: The network device further includes a first resource reservation module, which is configured to reserve resources for the flow in advance and configure traffic resource reservation information during the resource reservation process.
13. A computer-readable medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a processor, the network device executes the method according to any one of claims 1 to 6.
14. A computer program product, characterized in that Instructions are stored thereon, and when the instructions are executed on the processor, the network device executes the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method, device and system for sending message
CN111512602A
Traffic control apparatus, buffering control method and packet relay apparatus
US20150078395A1