A traffic scheduling method for low-speed network equipment
By dividing priorities and controlling queue sending or blocking in low-speed network devices, the problems of bandwidth waste and transmission time slot deviation are solved, efficient scheduling of time-sensitive traffic is achieved, and real-time and deterministic transmission is guaranteed.
Patent Information
- Application Number
- CN202411367549.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-09-29
AI Technical Summary
In the existing technology, the traffic scheduling method for low-speed network equipment has a serious problem of bandwidth waste. Especially when the network load increases, the transmission time slot deviates from the planned traffic transmission time slot, resulting in an increased packet loss rate and an inability to effectively guarantee the real-time and deterministic nature of time-sensitive traffic.
A traffic scheduling method that prioritizes packets based on their time sensitivity is adopted. By calculating the gating list period and status, combined with the remaining time in the current time slot and the packet transmission time, the sending or blocking of each priority queue is controlled to ensure dedicated transmission time slots for time-sensitive traffic. Furthermore, the shared transmission time of the packet length interval is pre-calculated to reduce computing time overhead.
It effectively reduces network bandwidth waste, improves the deployment feasibility of time-sensitive networks, reduces computing overhead, and ensures real-time and deterministic transmission of time-sensitive traffic.
Smart Images

Figure CN119254700B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of time-sensitive network communications, and in particular to a traffic scheduling method applied to low-speed network equipment. Background Art
[0002] In the field of rail transit onboard equipment communication technology, time-sensitive networking (TSN) integrates technologies such as time synchronization, link redundancy, gating scheduling, and resource allocation. It can provide low-latency, high-stability, and low-packet-loss transmission services for time-sensitive traffic. Furthermore, this protocol is entirely link-layer based, requiring no application layer involvement, offering low deployment difficulty and excellent scalability. It holds broad application prospects in train onboard communication networks. Furthermore, with the continuous development of unmanned and intelligent trains, traditional onboard communication buses are unable to meet bandwidth requirements. Traffic scheduling of network messages can allocate dedicated transmission slots for time-sensitive traffic, ensuring the real-time and deterministic transmission of time-sensitive traffic.
[0003] Currently, when implementing traffic scheduling algorithms on network devices, a gate may close while a packet is halfway through transmission. The remaining content in the queue will still occupy the gate's open time when processed in the next cycle, causing a discrepancy between the scheduled traffic transmission slot and the actual available time slot. This situation increases in frequency with increasing network load, leading to a corresponding increase in packet loss. This problem can be addressed by restricting transmission gates from intercepting packets and adding a guard band to the gate list. A guard band only allows transmission of low-priority packets that were not fully transmitted when the gate closed, preventing new packets from being transmitted. The guard band duration is designed to ensure that a full frame of low-priority packets is transmitted, and all transmission gates are closed during the guard band. However, the existence of a guard band wastes significant network bandwidth; in the worst case, no packets are transmitted for the entire guard band duration.
[0004] In summary, there is an urgent need for a simple and easy traffic scheduling method for Ethernet devices with less bandwidth waste, which can overcome the problem of more waste of network bandwidth in traditional traffic scheduling methods and improve the feasibility of time-sensitive network deployment. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to overcome the deficiencies in the prior art and provide a traffic scheduling method for low-speed network devices, which is suitable for devices with network interfaces such as 100M Ethernet, can optimize resource consumption and reduce bandwidth waste.
[0006] The present invention is achieved through the following technical solutions:
[0007] A traffic scheduling method applied to low-speed network equipment, which divides priorities according to the time sensitivity of network device messages, and calculates the gating list cycle, gating list status and the duration time slot of each list according to the message length of the network device. Each priority has an exclusive queue. When the queue where the message is located does not obtain the sending permission, it queues and waits. When the sending permission is obtained, the message is sent out. The sending permission of the queue is determined by the state of the gate, the message transmission time and the remaining time of the current time slot. The message transmission time is calculated by pre-calculating the transmission time of a group of messages with different length ranges and comparing the message lengths. That is, messages with a length within a certain range share the same transmission time. The state of the gate is determined by the gating list. The gating list switches the gating list output according to the known and agreed-upon gating cycle time slot, controls the switching of 8 queue gates with different priorities, and realizes traffic scheduling. It includes the following steps:
[0008] S1, based on the time sensitivity of network device messages, divides traffic into eight priorities from 0 to 7, where priority 7 is the highest priority and priority 0 is the lowest priority.
[0009] S2, calculating the gating list period, gating list status and duration time slot of each list according to the message length of the network device.
[0010] S3, calculating the start time CycleStartTime of each gate control list cycle according to the gate control list cycle OperCycleTime and the start time of the previous cycle LastCycleStartTime, and when the current time is greater than the calculated start time, outputting a cycle start indication pulse to start the gate control cycle.
[0011] S4, after receiving the cycle start indication pulse from step S3, outputs the current time slot gating state c_gatestates and the next time slot gating state n_gatestates by comparing the current time slot running time OperBaseTime with the current time slot total time c_totaltime calculated in step S2, and querying the gating list status. Simultaneously, the remaining time c_exittime of the current time slot is calculated and output.
[0012] S5, each priority queue controls the sending or blocking of messages queued in each priority queue according to the gate opening or closing state, the remaining time c_exittime of the current time slot and the time send_message_time required to transmit the message.
[0013] According to the above technical solution, preferably, in step S3, assuming that the current gating list cycle period is i, the previous gating list cycle period is i-1, and the calculation formula for the start time of the gating list cycle in the current gating list cycle period is:
[0014] CycleStartTime i =LastCycleStartTime i-1 +OperCycleTime i (1)
[0015] According to the above technical solution, preferably, in step S3, the start time of the previous cycle is updated to:
[0016] LastCycleStartTime i =CycleStartTime i (2)
[0017] Updated LastCycleStartTime i Used to calculate the start time of the gate list loop for the next loop period.
[0018] According to the above technical solution, preferably, in step S4, let n be the current system internal clock cycle, n-1 be the previous system internal clock cycle, and the current time slot running time is:
[0019] OperBaseTime n =OperBaseTime n-1 +T (3)
[0020] According to the above technical solution, preferably, in step S4, the system internal clock period T is the period of the reference clock running inside the system.
[0021] According to the above technical solution, preferably, in step S4, the total time of the current time slot c_totaltime, the gating state of the current time slot c_gatestates, and the gating state of the next time slot n_gatestates are obtained by querying the result of step S2.
[0022] According to the above technical solution, preferably, in step S4, let n be the current system internal clock cycle, j be the current time slot, and the remaining time of the current time slot be:
[0023] c_exittime n =c_totaltime j -OperBaseTime n (4)
[0024] According to the above technical solution, preferably, in step S5, the gating on or off state of each priority queue specifically refers to the gating state of the current time slot and the gating state of the next time slot.
[0025] According to the above technical solution, preferably, in step S5, the message length interval is determined by comparing the time send_message_time required to transmit the message, and messages within the same length interval share the same transmission time length, thereby reducing computing time overhead.
[0026] According to the above technical solution, preferably, in step S5, the method for determining whether to block message sending is:
[0027] Based on the current time slot gating status and the next time slot gating status output in step S4, it is possible to determine whether the current gating is on and whether the next time slot gating is on. If the current gating is off, the message is blocked. If the current gating is on and the next time slot gating is on, the message is not blocked. If the current gating is on and the next time slot gating is off, the remaining time in the current time slot and the required message transmission time are used to determine whether the remaining time in the current time slot meets the message transmission time requirement. If so, message transmission is not blocked; if not, message transmission is blocked. This achieves traffic scheduling, allocating dedicated transmission time slots for time-sensitive traffic, and ensuring the real-time and deterministic transmission of time-sensitive traffic.
[0028] The present invention has the following beneficial effects: Building on traditional time-sensitive network traffic scheduling methods, the present invention employs a method that determines whether the next gating state corresponds to the activation of priority gating and compares the message transmission time with the remaining time in the current time slot. This eliminates the guard band added to prevent low-priority message transmissions from intruding into high-priority transmission time slots, thereby reducing network bandwidth waste. Furthermore, the present invention determines message length intervals by comparing lengths, so that messages within the same length interval share the same transmission time length, reducing computational overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 Schematic diagram of an example framework in an embodiment of the present invention;
[0030] Figure 2 Schematic diagram of the gated list traffic scheduling mechanism in an embodiment of the present invention;
[0031] Figure 3 Schematic diagram of message blocking in an embodiment of the present invention; DETAILED DESCRIPTION
[0032] The following is a clear and complete description of the technical solutions in the embodiments of the present invention, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, other embodiments obtained by ordinary technicians in this field without making creative efforts are all within the scope of protection of the present invention.
[0033] The purpose of the present invention is to provide a highly efficient traffic scheduling method that can reduce network bandwidth waste and computational overhead. This method jointly determines whether the gate opening time meets the message transmission time requirement based on the current gate time slot control state, the next time slot gate control state, the current time slot remaining time and the message transmission time. If the message can be completely transmitted in the current time slot remaining time, the message is allowed to be sent; if the message cannot be completely sent, the message sending is blocked. This method pre-calculates the sending time corresponding to a group of messages of different lengths, and determines the message length interval by comparing the sizes. Messages within the same length interval share the same transmission time length, thereby reducing computational overhead. This method does not have the problem that low-priority message sending may encroach on the time of high-priority messages, nor does it have the protection band in traditional traffic scheduling methods, and can effectively reduce network bandwidth waste. The overall structure diagram is shown in FIG. Figure 1 The whole process specifically includes the following steps.
[0034] S1, based on the time sensitivity of network device messages, divides traffic into eight priorities from 0 to 7, where priority 7 is the highest priority and priority 0 is the lowest priority.
[0035] S2, calculating the gating list period, gating list status and duration time slot of each list according to the message length of the network device.
[0036] Specifically, the gating list is configured as a register group with a bit width of 8 and a depth of 32 according to each time slot gating state, and the gating time slot register group is configured according to the calculated duration time slot of each gating state.
[0037] S3, calculating the start time CycleStartTime of each gate control list cycle according to the gate control list cycle OperCycleTime and the start time of the previous cycle LastCycleStartTime, and when the current time is greater than the calculated start time, outputting a cycle start indication pulse to start the gate control cycle.
[0038] Specifically, assuming that the current gating list cycle period is i and the previous gating list cycle period is i-1, the calculation formula for the start time of the gating list cycle in the current gating list cycle period is:
[0039] CycleStartTime i=LastCycleStartTime i-1 +OperCycleTime i (1)
[0040] Specifically, after calculating the CycleStartTime of the current cycle, the start time of the previous cycle is updated to:
[0041] LastCycleStartTime i =CycleStartTime i (2)
[0042] Updated LastCycleStartTime i Used to calculate the start time of the gate list loop for the next loop period.
[0043] After the gate cycle begins, the opening and closing of each priority queue is controlled by the gate list. The gate list traffic scheduling mechanism is as follows: Figure 2 shown.
[0044] S4, after receiving the cycle start indication pulse from step S3, outputs the current time slot gating state c_gatestates and the next time slot gating state n_gatestates by comparing the current time slot running time OperBaseTime with the current time slot total time c_totaltime calculated in step S2, and querying the gating list status. Simultaneously, the remaining time c_exittime of the current time slot is calculated and output.
[0045] Specifically, the current time slot running time is used to indicate the time when the current gating state has started, and is also used to calculate the current gating remaining time. The calculation method is to increase the current time slot running time by one clock cycle in each internal clock cycle. Let n be the current system internal clock cycle and n-1 be the previous system internal clock cycle. The formula is:
[0046] OperBaseTime n =OperBaseTime n-1 +T (3)
[0047] Specifically, the system internal clock period T is the period of the reference clock running inside the system.
[0048] Specifically, the total time of the current time slot c_totaltime, the gating state of the current time slot c_gatestates, and the gating state of the next time slot n_gatestates are obtained from the result of step S2.
[0049] Specifically, the remaining time of the current time slot is calculated by subtracting the current time slot running time from the total time slot. The remaining time of the current time slot is used to determine whether the message can be transmitted before the gate state changes. Let n be the current system internal clock cycle and j be the current time slot. The remaining time of the current time slot is:
[0050] c_exittime n =c_totaltime j -OperBaseTime n (4)
[0051] S5, each priority queue controls the sending or blocking of messages queued in each priority queue according to the gate opening or closing state, the remaining time c_exittime of the current time slot and the time send_message_time required to transmit the message.
[0052] Specifically, whether to block the message is determined based on the current time slot gating state, the next time slot gating state, and the remaining time of the current time slot. The message length interval is determined by comparing the time send_message_time required for transmitting the message. Messages with the same length in the same interval share the same transmission time length, reducing the computing time overhead. According to the current time slot gating state and the next time slot gating state output in step S4, it can be queried whether the current gating is on and whether the next time slot gating is on. If the current gating is off, the message is blocked. If the current gating is on and the next time slot gating is on, the message is not blocked. If the current gating is on and the next time slot corresponding priority gating is off, then the remaining time of the current time slot is determined based on the remaining time of the current time slot and the transmission time required for the message. If it is satisfied, the message transmission is not blocked; if it is not satisfied, the message transmission is blocked. By comparing the message transmission time send_message_time and the remaining time c_exittime of the current time slot, the message is blocked or allowed to be sent, as shown in the schematic diagram. Figure 3 As shown in the figure, when time slice T2 is about to end, priority 5 and priority 6 queues have messages that need to be sent. The send time of the message in priority 5 queue is less than the remaining time in the current time slot, while the send time of the message in priority 6 queue is greater than the remaining time in the current time slot. Therefore, the message in priority 5 queue is allowed to be sent, while the message in priority 6 queue is blocked. This eliminates the guard band of traditional traffic scheduling methods while implementing traffic scheduling and allocating dedicated transmission time slots for time-sensitive traffic, reducing network bandwidth waste and computing overhead.
[0053] With the above-described preferred embodiments of the present invention as a guide, those skilled in the art will readily be able to make various changes and modifications without departing from the technical spirit of the present invention. The technical scope of the present invention is not limited to the contents of the specification and must be determined in accordance with the scope of the claims.
Claims
1. A traffic scheduling method applied to low-speed network equipment, characterized in that: The steps include: S1, based on the time sensitivity of network device packets, divides traffic into eight priorities from 0 to 7, where priority 7 is the highest priority and priority 0 is the lowest priority; S2, calculating the gating list period, gating list status and duration time slot of each list according to the message length of the network device; S3, calculating the start time CycleStartTime of each gate control list cycle according to the gate control list period OperCycleTime and the start time of the previous cycle LastCycleStartTime, and when the current time is greater than the calculated start time, outputting a cycle start indication pulse to start the gate control cycle; S4, after receiving the cycle start indication pulse of step S3, output the current time slot gating state c_gatestates and the next time slot gating state n_gatestates by comparing the current time slot running time OperBaseTime with the current time slot total time c_totaltime calculated in step S2 and querying the gating list status according to the current time slot running time OperBaseTime, the system internal clock cycle T, and the current time slot total time c_totaltime; at the same time, calculate and output the current time slot remaining time c_exittime; S5, each priority queue controls the sending or blocking of messages queued in each priority queue according to the gate opening or closing state, the remaining time c_exittime of the current time slot and the time send_message_time required to transmit the message.
2. A traffic scheduling method for low-speed network equipment according to claim 1, characterized in that: In step S3, let the current gating list cycle period be i, the previous gating list cycle period be i-1, and the calculation formula for the start time of the gating list cycle in the current gating list cycle period is: CycleStartTime i =LastCycleStartTime i-1 +OperCycleTime i (1)。 3. A traffic scheduling method for low-speed network equipment according to claim 2, characterized in that: In step S3, after calculating the CycleStartTime of the current cycle, the start time of the previous cycle is updated to: LastCycleStartTime i =CycleStartTime i (2) Updated LastCycleStartTime i Used to calculate the start time of the gate list loop for the next loop period.
4. The traffic scheduling method for low-speed network equipment according to claim 1, characterized in that: In step S4, let n be the current system internal clock cycle, n-1 be the previous system internal clock cycle, and the current time slot running time is: OperBaseTime n =OperBaseTime n-1 +T (3)。 5. The traffic scheduling method for low-speed network equipment according to claim 1, characterized in that: In step S4, the system internal clock period T is the period of the reference clock running inside the system.
6. The traffic scheduling method for low-speed network equipment according to claim 1, characterized in that: In step S4, the total time of the current time slot c_totaltime, the gating state of the current time slot c_gatestates, and the gating state of the next time slot n_gatestates are obtained from the result of step S2.
7. The traffic scheduling method for low-speed network equipment according to claim 1, characterized in that: In step S4, let n be the current system internal clock cycle, j be the current time slot, and the remaining time of the current time slot be: c_exittime n =c_totaltime j -OperBaseTime n (4)。 8. The traffic scheduling method for low-speed network equipment according to claim 1, characterized in that: In step S5, the gating on or off state of each priority queue specifically refers to the gating state of the current time slot and the gating state of the next time slot.
9. The traffic scheduling method for low-speed network equipment according to claim 1, characterized in that: In step S5, the message length interval is determined by comparing the time send_message_time required to transmit the message. Messages within the same length interval share the same transmission time length, thereby reducing computational time overhead.
10. The traffic scheduling method for low-speed network equipment according to claim 1, characterized in that: In step S5, the method for determining whether to block message sending is as follows: According to the current time slot gating status and the next time slot gating status output in step S4, it can be queried whether the current gating is on and whether the next time slot gating is on; if the current gating is off, the message is blocked; if the current gating is on and the next time slot gating is on, the message is not blocked; if the current gating is on and the next time slot gating is off, then it is judged whether the remaining time of the current time slot meets the message transmission time requirement based on the remaining time of the current time slot and the transmission time required for the message, if so, the message transmission is not blocked; if not, the message transmission is blocked; thereby, traffic scheduling is realized, special transmission time slots are allocated for time-sensitive traffic, and the real-time and deterministic transmission of time-sensitive traffic is guaranteed.
Citation Information
Patent Citations
Mixed flow cooperative transmission method for time-sensitive network
CN115914133A
Message forwarding method and device, equipment and storage medium
CN116915714A