Flow scheduling method applied to low-speed network equipment
The proposed traffic scheduling method optimizes resource consumption and reduces bandwidth waste by prioritizing messages based on time sensitivity and calculating transmission times to ensure real-time, deterministic transmission in low-speed network equipment.
Patent Information
- Application Number
- CN202411367549.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-29
AI Technical Summary
Existing traffic scheduling methods for low-speed network equipment in rail transit on-board communication networks result in bandwidth waste and increased packet loss due to the use of protection bands and deviations in transmission time slots, which are exacerbated by network load increases.
A traffic scheduling method that prioritizes messages based on time sensitivity, calculates gating list cycles, and determines message transmission times by comparing message lengths to allocate exclusive queues and ensure real-time, deterministic transmission without protection bands.
Reduces network bandwidth waste and computing overhead by optimizing resource consumption and ensuring timely transmission of time-sensitive traffic without occupying high-priority slots with low-priority messages.
Smart Images

Figure CN119254700A_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 on-board equipment communication technology, the time-sensitive network integrates time synchronization, link redundancy, gated scheduling, resource allocation and other technologies, and can provide low-latency, high-stability and low-packet-loss rate transmission services for time-sensitive traffic. In addition, the protocol is completely based on the link layer, can be implemented without the participation of the application layer, has low deployment difficulty and good scalability, and has a very broad application prospect in the field of train on-board communication networks. In addition, with the continuous development of unmanned and intelligent trains, the traditional on-board communication bus cannot meet the bandwidth requirements, and traffic scheduling of network messages can allocate special transmission time slots for time-sensitive traffic, ensuring the real-time and deterministic transmission of time-sensitive traffic.
[0003] At present, in the process of implementing the traffic scheduling algorithm of network equipment, a certain message may be transmitted halfway and the gate may be closed. The remaining content in the queue will still occupy the time of opening the gate when it is processed in the next cycle, resulting in a deviation between the planned traffic transmission time slot and the actual available time slot. The frequency of this situation will increase with the increase of network load, and the packet loss rate will increase accordingly. This problem can be solved by making the transmission gate have no right to truncate messages and adding a protection band to the gate list. The protection band only allows the messages that have not been transmitted when the low-priority gate is closed to continue to be transmitted, and no new messages are allowed to be transmitted. The duration of the protection band should be sufficient to transmit a complete frame to ensure the completion of the transmission of low-priority messages. When in the protection band, all transmission gates are closed. However, the existence of the protection band wastes a lot of network bandwidth. In the worst case, no message is transmitted during the entire duration of the protection band.
[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 equipment, which is suitable for equipment with network interfaces such as 100M Ethernet, and 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 devices, 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, and when the sending permission is obtained, the message is sent out. The sending permission of the queue is jointly 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 a group of message transmission times of different length ranges, and comparing the message lengths, that is, messages within a certain range of length 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, divides traffic into eight priorities from 0 to 7 according to the time sensitivity of network device messages, 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 gated list cycle according to the gated 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 gated cycle.
[0011] S4, after receiving the cycle start indication pulse of step S3, according to the current time slot running time OperBaseTime, the system internal clock cycle T, the current time slot total time c_totaltime, 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 gate list state, output the current time slot gating state c_gatestates and the next time slot gating state n_gatestates. At the same time, calculate and output the remaining time c_exittime of the current time slot.
[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 for transmitting 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 Calculates the start time of the gating 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 current time slot total time c_totaltime, the current time slot gating state c_gatestates, and the next time slot gating state 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 is:
[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] 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 turned on and whether the next time slot gating is turned on. If the current gating is turned off, the message is blocked. If the current gating is turned on and the next time slot gating is turned on, the message is not blocked. If the current gating is turned on and the next time slot gating is turned off, 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 by the message. If it meets the requirement, the message transmission is not blocked; if it does not meet the requirement, the message transmission is blocked. In this way, traffic scheduling is realized, and a special transmission time slot is allocated for time-sensitive traffic, ensuring the real-time and deterministic transmission of time-sensitive traffic.
[0028] The present invention has the following beneficial effects: Based on the traditional time-sensitive network traffic scheduling method, the present invention adopts a method of judging whether the next gating state corresponds to the priority gating whether it is turned on, and comparing the message transmission time and the remaining time of the current time slot, thereby removing the guard band added to prevent the low-priority message transmission from invading the high-priority transmission time slot, thereby reducing the waste of network bandwidth. In addition, the present invention determines the message length interval by comparing the size, and the messages within the same length interval share the same transmission time length, thereby reducing the computing time overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a schematic diagram of an example framework in an embodiment of the present invention;
[0030] Figure 2 is a schematic diagram of a gating 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 drawings in the embodiments of the present invention. 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 creative work are all within the scope of protection of the present invention.
[0033] The purpose of the present invention is to provide an efficient traffic scheduling method that can reduce network bandwidth waste and reduce computing 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 current time slot remaining time can completely transmit the message, 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 size. Messages with the same length in the same interval share the same transmission time length, thereby reducing computing overhead. This method does not have the problem that the sending of low-priority messages may occupy the time of high-priority messages, nor does it have the protection band in the traditional traffic scheduling method, and can effectively reduce network bandwidth waste. The overall structure diagram is shown in the figure. Figure 1 The whole process specifically includes the following steps.
[0034] S1, divides traffic into eight priorities from 0 to 7 according to the time sensitivity of network device messages, 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 continuous time slot of each gating state.
[0037] S3, calculating the start time CycleStartTime of each gated list cycle according to the gated 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 gated 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, the start time of the previous cycle is updated to:
[0041] LastCycleStartTime i =CycleStartTime i (2)
[0042] Updated LastCycleStartTime i Calculates the start time of the gating list loop for the next loop period.
[0043] After the gating cycle begins, the opening and closing of each priority queue is controlled by the gating list. The gating list traffic scheduling mechanism is as follows: Figure 2 shown.
[0044] S4, after receiving the cycle start indication pulse of step S3, according to the current time slot running time OperBaseTime, the system internal clock cycle T, the current time slot total time c_totaltime, 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 gate list state, output the current time slot gating state c_gatestates and the next time slot gating state n_gatestates. At the same time, calculate and output the remaining time c_exittime of the current time slot.
[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 that in each internal clock cycle, the current time slot running time increases by one 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 current time slot total time c_totaltime, the current time slot gating state c_gatestates, and the next time slot gating state n_gatestates are obtained by querying 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 of the current time slot. The remaining time of the current time slot is used to determine whether the message can be transmitted before the gating state changes. Let n be the current system internal clock cycle, j be the current time slot, and 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 for transmitting 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 to transmit 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 turned on and whether the next time slot gating is turned on. If the current gating is turned on and the next time slot gating is turned on, the message is not blocked. If the current gating is turned on and the next time slot corresponding priority gating is turned on, the message is not blocked. If the current gating is turned on and the next time slot corresponding priority gating is turned off, 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. The message transmission is blocked or allowed by comparing the message transmission time send_message_time and the remaining time c_exittime of the current time slot, as shown in the schematic diagram. Figure 3 As shown in the figure, when the T2 time slice is about to end, priority 5 and priority 6 queues have messages that need to be sent. The sending time of the message in the priority 5 queue is less than the remaining time of the current time slot, while the sending time of the message in the priority 6 queue is greater than the remaining time of the current time slot. Therefore, the message in the priority 5 queue is allowed to be sent, and the message in the priority 6 queue is blocked. In this way, on the basis of realizing traffic scheduling and allocating special transmission time slots for time-sensitive traffic, the protection band of the traditional traffic scheduling method is removed, the network bandwidth waste is reduced, and the computing overhead is reduced.
[0053] With the above-mentioned ideal embodiments of the present invention as inspiration, through the above-mentioned description, those skilled in the art can make various changes and modifications without departing from the technical concept of the present invention. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A traffic scheduling method applied to a low-speed network device, characterized in that: The steps include: S1, divides traffic into eight priorities from 0 to 7 according to the time sensitivity of network device messages, 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 gated list cycle according to the gated 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 gated cycle; S4, after receiving the cycle start indication pulse of step S3, according to the current time slot running time OperBaseTime, the system internal clock cycle T, and the current time slot total time c_totaltime, 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 state, output the current time slot gating state c_gatestates and the next time slot gating state n_gatestates; 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 for transmitting the message.
2. According to claim 1, a traffic scheduling method applied to a low-speed network device is characterized in that: 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: CycleStartTime i =LastCycleStartTime i-1 +OperCycleTime i (1)。 3. The method for traffic scheduling applied to low-speed network equipment according to claim 2, characterized in that: In step S3, the start time of the previous cycle is updated to: LastCycleStartTime i =CycleStartTime i (2) Updated LastCycleStartTime i Calculates the start time of the gating list loop for the next loop period.
4. The method for traffic scheduling applied to 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 method for traffic scheduling applied to 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. A 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 by querying the result of step S2.
7. A 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 is: c_exittime n =c_totaltime j -OperBaseTime n (4)。 8. The method for traffic scheduling applied to 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. A 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 for transmitting the message, and messages within the same length interval share the same transmission time length, thereby reducing the computing 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 state and the next time slot gating state outputted in step S4, it is possible to inquire 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 ensured.
Citation Information
Patent Citations
Mixed flow cooperative transmission method for time-sensitive network
CN115914133A
Message forwarding method and device, equipment and storage medium
CN116915714A
Configuration system and method based on time-sensitive network gating list
CN117201424A
Cited By
Message transmission method and system, electronic equipment and storage medium
CN121193688A
