Flow scheduling method, system, device and medium
By using traffic scheduling methods in 5G wireless networks, obtaining target delay and jitter parameters, and determining the theoretical sending time and sending queue marks of packets, the problems of delay and congestion in traditional 5G networks are solved, and higher reliability and stability are achieved.
Patent Information
- Application Number
- CN202411933340.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-09
AI Technical Summary
Traditional 5G wireless networks adopt the "go-to-do" data forwarding method, which causes uncertain data packet delay or network congestion when data is transmitted between multiple network elements such as UE, base station, core network, etc., which reduces the reliability of the 5G system and increases jitter.
Through a traffic scheduling method, the target delay, target jitter, the exit timestamp of the TSN traffic and the current time when the message enters the TSN scheduler, determine the theoretical sending time and sending queue marks of the current TSN message, and send one-way traffic packets based on these marks to realize traffic scheduling.
This method can reduce network delay or network congestion, improve the reliability and stability of 5G systems, and meet the strict requirements for delay, jitter and packet loss rates in applications such as high-definition real-time video streaming and industrial machine control.
Smart Images

Figure CN119966901A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a traffic scheduling method, system, device and storage medium. Background Art
[0002] Traditional 5G wireless networks use a "best effort" data forwarding method. Compared with wired networks, data will pass through multiple network elements such as UE, base station, and core network, and will cause greater uncertainty in data packet delay or network congestion in the air interface, greatly reducing the reliability of the 5G system and increasing jitter. Therefore, there are still technical problems that need to be solved in related technologies. Summary of the invention
[0003] The purpose of this application is to solve one of the technical problems existing in the prior art to at least a certain extent.
[0004] To this end, an object of an embodiment of the present application is to provide a traffic scheduling method, system, device and storage medium, which can reduce network delay or network congestion.
[0005] In order to achieve the above-mentioned technical objectives, the technical solution adopted by the embodiments of the present application includes: a traffic scheduling method, comprising the following steps: obtaining the target delay, target jitter, exit timestamp of TSN traffic, and current time when the message enters the TSN scheduler of a unidirectional traffic message; determining the theoretical sending time of the current TSN message according to the target delay and the exit timestamp; determining the sending queue mark of the current TSN message according to the theoretical sending time, the target jitter and the current time; and sending the unidirectional traffic message based on the sending queue mark to realize traffic scheduling.
[0006] The present application can obtain the target delay, target jitter, TSN traffic egress timestamp, and current time when the message enters the TSN scheduler of a unidirectional traffic message; determine the theoretical sending time of the current TSN message based on the target delay and the egress timestamp; determine the sending queue mark of the current TSN message based on the theoretical sending time, the target jitter, and the current time; send the unidirectional traffic message based on the sending queue mark to achieve traffic scheduling. The present application can achieve traffic scheduling through the target delay, target jitter, TSN traffic egress timestamp, and current time when the message enters the TSN scheduler of the unidirectional traffic message, and thus achieve traffic scheduling. The present application can reduce network delay or network congestion.
[0007] In addition, a traffic scheduling method according to the above embodiment of the present invention may also have the following additional technical features:
[0008] Further, in the embodiment of the present application, determining the sending queue mark of the current TSN message according to the theoretical sending time, the target jitter and the current time specifically includes:
[0009] Based on the preset time, the target jitter and the current time, determine the start time of the current sending window of the network card and the current sending queue mark of the network card;
[0010] Determine a first threshold, a second threshold, a third threshold, and a fourth threshold according to the start time and the target jitter;
[0011] Determine a first queue mark, a second queue mark, and a third queue mark according to the current sending queue mark;
[0012] A sending queue mark of the current TSN message is determined according to the theoretical sending time, the first threshold, the second threshold, the third threshold, the fourth threshold, the first queue mark, the second queue mark and the third queue mark.
[0013] Further, in the embodiment of the present application, determining the start time of the current sending window of the network card based on the preset time, the target jitter and the current time specifically includes:
[0014] The preset time, the target jitter and the current time are input into a first formula to obtain the start time of the current sending window of the network card; the first formula is:
[0015] t 10 =((t3-t) / t2)*t2
[0016] t 10 is the start time of the current sending window of the network card, t is the preset time, t2 is the target jitter, and t3 is the current time.
[0017] Further, in the embodiment of the present application, determining the current sending queue mark of the network card based on the preset time, the target jitter and the current time specifically includes:
[0018] The preset time, the target jitter and the current time are input into a second formula to determine the current sending queue mark of the network card; the second formula is:
[0019] q=((t3-t) / t2)%4
[0020] q is the current send queue mark of the network card, t is the preset time, t2 is the target jitter, t3 is the current time, and % is the modulo operation.
[0021] Further, in the embodiment of the present application, determining the first threshold, the second threshold, the third threshold and the fourth threshold according to the start time and the target jitter specifically includes:
[0022] Performing a sum operation on the start time and the target jitter to obtain a first sum, and using the first sum as the first threshold;
[0023] The start time and the target jitter are input into a third formula to obtain the second threshold value; the third formula is:
[0024] T2=t 10 +2t2
[0025] The start time and the target jitter are input into a fourth formula to obtain the third threshold value; the fourth formula is:
[0026] T3=t 10 +3t2
[0027] The start time and the target jitter are input into a fifth formula to obtain the fourth threshold value; the fifth formula is:
[0028] T4=t 10 +4t2
[0029] In the third formula, the fourth formula and the fifth formula, t 10 is the starting time, t2 is the target jitter, T2 is the second threshold, T3 is the third threshold, and T4 is the fourth threshold.
[0030] Further, in an embodiment of the present application, determining the first queue mark, the second queue mark, and the third queue mark according to the current sending queue mark specifically includes:
[0031] Input the current sending queue mark into a sixth formula to determine a first queue mark;
[0032] Input the current sending queue mark into a seventh formula to determine a second queue mark;
[0033] Input the current sending queue mark into an eighth formula to determine a third queue mark;
[0034] The sixth formula is: q1=(q+1)%4;
[0035] The seventh formula is: q2=(q+2)%4;
[0036] The eighth formula is: q3 = (q + 4)% 4
[0037] In the sixth formula, the seventh formula and the eighth formula, q is the current sending queue mark, q1 is the first queue mark, q2 is the second queue mark, q3 is the third queue mark, and % is the remainder operation.
[0038] Further, in an embodiment of the present application, determining the sending queue mark of the current TSN message according to the theoretical sending time, the first threshold, the second threshold, the third threshold, the fourth threshold, the first queue mark, the second queue mark and the third queue mark specifically includes:
[0039] When the theoretical sending time is less than the first threshold, or less than the current time, the current sending queue mark of the network card is used as the sending queue mark of the current TSN message;
[0040] When the theoretical sending time is less than the second threshold, using the first queue mark as the sending queue mark of the current TSN message;
[0041] When the theoretical sending time is less than the third threshold, using the second queue mark as the sending queue mark of the current TSN message;
[0042] When the theoretical sending time is less than the fourth threshold, the third queue mark is used as the sending queue mark of the current TS N message.
[0043] On the other hand, an embodiment of the present application further provides a traffic scheduling system, including:
[0044] The first processing unit is used to obtain the target delay, target jitter, egress timestamp of TSN traffic, and current time when the message enters the TSN scheduler of the unidirectional traffic message;
[0045] A second processing unit, configured to determine a theoretical sending time of a current TSN message according to the target delay and the egress timestamp;
[0046] A third processing unit, configured to determine a sending queue mark of a current TSN message according to the theoretical sending time, the target jitter and the current time;
[0047] The fourth processing unit is used to send the unidirectional traffic message based on the sending queue mark to achieve traffic scheduling.
[0048] On the other hand, the present application also provides a flow scheduling device, including:
[0049] at least one processor;
[0050] at least one memory for storing at least one program;
[0051] When the at least one program is executed by the at least one processor, the at least one processor implements a traffic scheduling method as described in any one of the invention contents.
[0052] In addition, the present application also provides a computer-readable storage medium, which stores processor-executable instructions, and the processor-executable instructions are used to execute a traffic scheduling method as described in any of the above items when executed by the processor.
[0053] The advantages and benefits of the present application will be partially given in the following description, and partially become apparent from the following description, or be understood through the practice of the present application:
[0054] The present application can obtain the target delay, target jitter, TSN traffic egress timestamp, and current time when the message enters the TSN scheduler of a unidirectional traffic message; determine the theoretical sending time of the current TSN message based on the target delay and the egress timestamp; determine the sending queue mark of the current TSN message based on the theoretical sending time, the target jitter, and the current time; send the unidirectional traffic message based on the sending queue mark to achieve traffic scheduling. The present application can achieve traffic scheduling through the target delay, target jitter, TSN traffic egress timestamp, and current time when the message enters the TSN scheduler of the unidirectional traffic message, and thus achieve traffic scheduling. The present application can reduce network delay or network congestion. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A schematic diagram of the steps of a traffic scheduling method in a specific embodiment of the present invention;
[0056] Figure 2 A schematic diagram of a step of determining a sending queue mark of a current TSN message according to a theoretical sending time, a target jitter and a current time in a specific embodiment of the present invention;
[0057] Figure 3 A schematic diagram of steps for determining a first threshold, a second threshold, a third threshold and a fourth threshold according to a start time and a target jitter in a specific embodiment of the present invention;
[0058] Figure 4 A schematic diagram of steps for determining a first queue mark, a second queue mark, and a third queue mark according to a current sending queue mark in another specific embodiment of the present invention;
[0059] Figure 5 A schematic diagram of a flow scheduling system in a specific embodiment of the present invention;
[0060] Figure 6A flow chart of a traffic scheduling method in another specific embodiment of the present invention;
[0061] Figure 7 A flow chart of a traffic scheduling method in another specific embodiment of the present invention;
[0062] Figure 8 It is a structural schematic diagram of a traffic scheduling system in another specific embodiment of the present invention;
[0063] Fig. 9 It is a structural schematic diagram of a flow scheduling device in a specific embodiment of the present invention. DETAILED DESCRIPTION
[0064] The following describes the embodiments of the present invention in detail with reference to the accompanying drawings to illustrate the principles and processes of the traffic scheduling method, system, device and storage medium in the embodiments of the present invention.
[0065] Traditional 5G wireless networks use a "best effort" data forwarding method. Compared with wired networks, data will pass through multiple network elements such as UE, base station, and core network, and will cause greater uncertainty in data packet delay or network congestion in the air interface, greatly reducing the reliability of the 5G system and increasing jitter.
[0066] With the increase in network applications such as high-definition real-time video streaming and industrial machine control, the original 4 / 5G wireless network cannot meet the network requirements for precise control of transmission jitter at the factory level, workshop level, and production line level. These applications have strict requirements on network latency, jitter, and packet loss rate, and require the network to provide deterministic service quality. Therefore, there are still technical problems that need to be solved in related technologies.
[0067] In view of the above-mentioned defects of the prior art, Figure 1 , the present application provides a traffic scheduling method. Figure 1 In the method, the method may include the following steps S101-S104.
[0068] S101. Obtain the target delay, target jitter, TSN traffic egress timestamp, and current time when the message enters the TSN scheduler of the unidirectional traffic message.
[0069] S102: Determine the theoretical sending time of the current TSN message according to the target delay and the egress timestamp.
[0070] S103: Determine a sending queue mark of the current TSN message according to the theoretical sending time, the target jitter and the current time.
[0071] S104: Send a unidirectional traffic message based on the sending queue mark to implement traffic scheduling.
[0072] In some feasible embodiments of the present application, the processor can establish a wired or wireless connection with the acquisition module. After the connection is established, the processor can obtain the target delay, target jitter, TSN traffic egress timestamp, and current time when the message enters the TSN scheduler of the unidirectional traffic message. Then, based on the target delay and egress timestamp, the processor can determine the theoretical sending time of the current TSN message.
[0073] Then, according to the theoretical sending time, the target jitter and the current time, the processor can determine the sending queue mark of the current TSN message. After obtaining the sending queue mark, the processor can send a unidirectional traffic message based on the sending queue mark to implement traffic scheduling.
[0074] It should be noted that the above-mentioned wired connection method may include a connection between a mobile device and a processing module, and may also include a connection between a processing module and a hardware device, as well as a wired connection between other devices currently known or to be developed in the future and the processing module; and the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (Ultra Wide Band) connection, and other wireless connection methods currently known or to be developed in the future.
[0075] The present application can obtain the target delay, target jitter, TSN traffic egress timestamp, and current time when the message enters the TSN scheduler of a unidirectional traffic message; determine the theoretical sending time of the current TSN message based on the target delay and egress timestamp; determine the sending queue mark of the current TSN message based on the theoretical sending time, target jitter, and current time; send a unidirectional traffic message based on the sending queue mark to achieve traffic scheduling. The present application can achieve traffic scheduling through the target delay, target jitter, TSN traffic egress timestamp, and current time when the message enters the TSN scheduler of the unidirectional traffic message, and thus achieve traffic scheduling. The present application can reduce network delay or network congestion.
[0076] Further, refer to Figure 2 , Figure 2 This is a schematic diagram of the steps of determining the sending queue mark of the current TSN message according to the theoretical sending time, target jitter and current time in an embodiment of the present application. Figure 2 The steps may specifically include:
[0077] S201, determining the start time of the current sending window of the network card and the current sending queue mark of the network card based on the preset time, the target jitter and the current time;
[0078] S202, determining a first threshold, a second threshold, a third threshold, and a fourth threshold according to the start time and the target jitter;
[0079] S203, determining a first queue mark, a second queue mark, and a third queue mark according to the current sending queue mark;
[0080] S204. Determine a sending queue mark of the current TSN message according to the theoretical sending time, the first threshold, the second threshold, the third threshold, the fourth threshold, the first queue mark, the second queue mark, and the third queue mark.
[0081] Further, in the embodiment of the present application, based on the preset time, the target jitter and the current time, determining the start time of the current sending window of the network card specifically includes:
[0082] Input the preset time, target jitter and current time into the first formula to obtain the start time of the current sending window of the network card; the first formula is:
[0083] t 10 =((t3-t) / t2)*t2
[0084] t 10 is the start time of the current sending window of the network card, t is the preset time, t2 is the target jitter, and t3 is the current time.
[0085] Further, in the embodiment of the present application, based on the preset time, the target jitter and the current time, determining the current sending queue mark of the network card specifically includes:
[0086] The preset time, target jitter and current time are input into the second formula to determine the current send queue mark of the network card; the second formula is:
[0087] q=((t3-t) / t2)%4
[0088] q is the current send queue mark of the network card, t is the preset time, t2 is the target jitter, t3 is the current time, and % is the modulo operation.
[0089] Further, refer to Figure 3 , Figure 3 1 is a schematic diagram of the steps of determining the first threshold, the second threshold, the third threshold and the fourth threshold according to the start time and the target jitter in an embodiment of the present application. Figure 3 In the method, the method specifically includes steps S301 to S304.
[0090] S301 , performing summation on the start time and the target jitter to obtain a first sum, and using the first sum as a first threshold.
[0091] S302, input the start time and the target jitter into a third formula to obtain a second threshold. The third formula:
[0092] T2=t 10+2t2
[0093] S303, input the start time and the target jitter into the fourth formula to obtain the third threshold. The fourth formula:
[0094] T3=t 10 +3t2
[0095] S304: Input the start time and the target jitter into the fifth formula to obtain a fourth threshold. The fifth formula:
[0096] T4=t 10 +4t2
[0097] In the third, fourth and fifth formulas, t 10 is the starting time, t2 is the target jitter, T2 is the second threshold, T3 is the third threshold, and T4 is the fourth threshold.
[0098] Further, refer to Figure 4 , Figure 4 1 is a schematic diagram of the steps of determining the first queue mark, the second queue mark, and the third queue mark according to the current sending queue mark in an embodiment of the present application. Figure 4 In the process, the steps specifically include step S401 to step S403.
[0099] S401, input the current sending queue mark into the sixth formula to determine the first queue mark;
[0100] S402, input the current sending queue mark into the seventh formula to determine the second queue mark;
[0101] S403, input the current sending queue mark into the eighth formula to determine the third queue mark;
[0102] Among them, the sixth formula is:
[0103] q1=(q+1)%4;
[0104] The seventh formula is:
[0105] q2=(q+2)%4;
[0106] The eighth formula is:
[0107] q3=(q+4)%4;
[0108] In the sixth formula, the seventh formula and the eighth formula, q is the current sending queue mark, q1 is the first queue mark, q2 is the second queue mark, q3 is the third queue mark, and % is the remainder operation.
[0109] Further, in the embodiment of the present application, the sending queue mark of the current TSN message is determined according to the theoretical sending time, the first threshold, the second threshold, the third threshold, the fourth threshold, the first queue mark, the second queue mark and the third queue mark, specifically including:
[0110] When the theoretical sending time is less than the first threshold, or less than the current time, the current sending queue mark of the network card is used as the sending queue mark of the current TSN message;
[0111] When the theoretical sending time is less than the second threshold, the first queue mark is used as the sending queue mark of the current TSN message;
[0112] When the theoretical sending time is less than the third threshold, the second queue mark is used as the sending queue mark of the current TSN message;
[0113] When the theoretical sending time is less than the fourth threshold, the third queue mark is used as the sending queue mark of the current TSN message.
[0114] The following is combined with Figure 5-Figure 7 The principle of this application is explained.
[0115] This embodiment uses the DPDK+VPP framework to implement high-performance data packet processing and forwarding in the system user state of the data plane, introduces the TSN scheduler in the 5G system end-to-end, and adopts different high-precision time synchronization schemes between different network elements in the 5G system to more effectively control the end-to-end delay and jitter of the upstream and downstream traffic, and realize the endogenous determinism of 5G. The specific method is as follows:
[0116] 5.1 5G Intrinsic Deterministic Network Access Solution
[0117] Compared with traditional wireless networks, Figure 5 This solution first ensures the precise alignment of network element time within the 5G system. The base station can receive GPS and Beidou signals for timing. SIB9 synchronization is used between the base station and the UE, and 1588 synchronization is used between the base station and the UPF. In this way, the precise alignment of time between network elements provides a time basis guarantee for software scheduling. Secondly, TSN traffic schedulers are designed at the end-to-end traffic outlets of the 5G system to realize time-based 5G endogenous deterministic network traffic scheduling. The TSN traffic scheduler is designed at the UPF and CPE traffic inlet and outlet, without the need to add other hardware.
[0118] 5.2 5G intrinsic deterministic network traffic identification solution
[0119] Deterministic network traffic is referred to as TSN flow. TSN flow is the key business traffic that needs to achieve deterministic transmission in the network.
[0120] 1. After the N3 interface of the UPF device receives the uplink service message of the UE user, it determines whether the traffic is a TSN flow based on the flow characteristics. After the peer UE downlink port receives the data of the air interface, it determines whether the traffic is a TSN flow based on the flow characteristics.
[0121] The flow feature parameters include the combined matching or QFI matching of the source MAC address, destination MAC address, VLAN ID, source IP address, destination IP address, port number, protocol type, etc. of the message. Users can flexibly send configurations according to the scenario. Before the message enters the TSN traffic scheduler, the MAC, VLANID, IP address and other information are extracted, the hash value is calculated, and compared with the user-configured rules. If the hash values are equal, each element is compared. If they are exactly the same, it means that the message is TSN traffic.
[0122] 5.3 5G Intrinsic Deterministic Traffic Scheduling Solution
[0123] In order to accurately schedule key business flows, refer to Figure 6 According to the 802.1Qbv principle, a TSN traffic scheduler is designed at the network traffic outlet. At the same time, the TSN traffic scheduler should also be configured and managed in combination with the properties of the specific network card. For example, the Intel i225 network card supports multiple sending queue scheduling, and each queue supports the configuration of the switch state of data sending gating within a cycle, as well as the duration of the gating switch state. When the gating is turned on, the queue sends data packets, and when the gating is turned off, the queue does not send data packets, as shown in the following diagram.
[0124] Reference Figure 7 ,The workflow of TSN traffic scheduler is as follows:
[0125] 1. When the UPF system time has been synchronized through 1588, start the TSN traffic scheduler, enable the 802.1Qbv function of the network card and send the configuration.
[0126] 2. Assume that the target delay for controlling one-way messages is t1, the target jitter is t2, design the scheduling period of the TSN scheduler to be t2, configure the single queue gating time of the Qbv network card to be t2, the Qbv period to be 4t2 (assuming that the network card supports 4 gating queues), and configure the preset basic time t.
[0127] 3. After the uplink message of the N3 port is identified, the TSN traffic message will be marked with a TSN mark and enter the TSN traffic scheduler, waiting for scheduling. Non-TSN traffic will be cached first.
[0128] 4. Since the egress timestamp t0 is marked for TSN traffic on the TSN scheduler at the UE side, after the TSN packet enters the TSN scheduler, the current time is taken as t3. Then the latency introduced in the air for the packet is Δt = t3 - t0, and the packet latency is statistically counted.
[0129] 5. Calculate the current transmission queue mark of the network card according to the current time, q = ((t3 - t) / t2) % 4, and calculate the start time of the current transmission window of the network card as t 10 = ((t3 - t) / t2) * t2. The target jitter is t2, and the current time is t3
[0130] 6. Calculate the theoretical transmission time of the current TSN packet as t4 = t0 + t1. If t4 < t3, the packet is directly marked with the queue mark q; if t4 < t 10 + t2, the packet is directly marked with the queue mark q; if t4 < t 10 + 2t2, the packet is directly marked with the queue mark (q + 1) % 4; if t4 < t 10 + 3t2, the packet is directly marked with the queue mark (q + 2) % 4; if t4 < t 10 + 4t2, the packet is directly marked with the queue mark (q + 4) % 4. For packets with t4 >= t 10 + 4t2, they are sorted according to the transmission time and enter the cache queue of the TSN scheduler, waiting for the next TSN scheduling cycle for scheduling.
[0131] 7. Based on the above scheduling results, prepare the final transmission queue. First, send the TSN flow scheduled in step 6. For the packets in each queue, assuming the maximum performance of the network card is m Gbs, the number of bytes sent per microsecond by the network card is n = m / (8 * 1000 * 1000) bytes. For two packets in each queue, we have calculated the transmission time. Assume the transmission time of the first packet is t 20 microseconds and the length is l1 bytes, and the transmission time of the second packet is t21 microseconds. To better control the jitter, padding bytes with a length of l2 = ((t21 - t 20 )) / n) - l1 can be sent between the two packets. Sending padding bytes can control the jitter more precisely.
[0132] 8. Finally, send the non - TSN flow random queue in step 3.
[0133] 9. Dynamically adjust the target latency t1 according to the packet latency statistically counted by the scheduler in step 4 to ensure that more than 99.9999% of the packet latencies fall within the target latency.
[0134] 10. The processing logic for downlink packets is the same.
[0135] In summary, the traffic scheduling method of the present application has the following advantages:
[0136] 1. This application belongs to the field of Internet of Things business applications. Different time synchronization schemes are used between different network elements to ensure accurate time synchronization within the 5G system. A TSN traffic scheduler is creatively designed at the traffic outlets at both ends of the 5G system. The message entry and exit scheduling schemes are designed based on the timestamp, and blank bytes are filled. This can improve the stability of latency and jitter within the system, and can achieve higher service quality assurance for network application scenarios such as high-definition real-time video streaming and industrial machine control, and achieve determinism within 5G.
[0137] In addition, refer to Figure 8 ,and Figure 1 Corresponding to the method, a traffic scheduling system is also provided in an embodiment of the present application. The system may include a first processing unit 1001, a second processing unit 1002, a third processing unit 1003 and a fourth processing unit 1004. Among them, the first processing unit 1001 can be used to obtain the target delay, target jitter, TSN traffic egress timestamp, and current time of the message entering the TSN scheduler of the unidirectional traffic message. The second processing unit 1002 can be used to determine the theoretical sending time of the current TSN message according to the target delay and the egress timestamp. The third processing unit 1003 can be used to determine the sending queue mark of the current TSN message according to the theoretical sending time, the target jitter and the current time; the fourth processing unit 1004 can be used to send the unidirectional traffic message based on the sending queue mark to realize traffic scheduling.
[0138] It should be noted that the first processing unit may be any integrated circuit unit or microprocessor unit obtained by integrating a chip having a processing function and its peripheral circuits through existing integration technology. The first processing unit and the second processing unit may also be any integrated circuit module or microprocessor module obtained by integrating a chip having a processing function and its peripheral circuits through existing integration technology. The first processing unit and the second processing unit may also include one or more memories.
[0139] It should be noted that the contents of the above-mentioned traffic scheduling method embodiment are all applicable to the present traffic scheduling system embodiment. The functions specifically implemented by the present traffic scheduling system embodiment are the same as those of the above-mentioned traffic scheduling method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned traffic scheduling method embodiment.
[0140] and Figure 1 Corresponding to the method, the embodiment of the present application also provides a flow scheduling device, the specific structure of which can be referred to Fig. 9 ,include:
[0141] at least one processor 1011;
[0142] At least one memory 1012, used to store at least one program;
[0143] When the at least one program is executed by the at least one processor, the at least one processor implements the traffic scheduling method.
[0144] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0145] and Figure 1 Corresponding to the method, an embodiment of the present application further provides a computer-readable storage medium, which stores processor-executable instructions, and the processor-executable instructions are used to execute the traffic scheduling method when executed by the processor.
[0146] The contents of the above-mentioned traffic scheduling method embodiment are all applicable to the present storage medium embodiment. The functions specifically implemented by the present storage medium embodiment are the same as those of the above-mentioned traffic scheduling method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned traffic scheduling method embodiment.
[0147] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the application is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are expected, wherein the order of various operations is changed and the sub-operation described as a part of a larger operation is performed independently.
[0148] In addition, although the present application is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present application. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional techniques of the engineer. Therefore, those skilled in the art can implement the present application set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the attached claims and their equivalents.
[0149] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several programs to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0150] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable programs for implementing the logical functions, and may be embodied in any computer-readable medium for use by a program execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch and execute a program from a program execution system, device or apparatus), or in conjunction with such program execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by a program execution system, device or apparatus, or in conjunction with such program execution systems, devices or apparatuses.
[0151] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0152] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable program execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0153] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0154] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
[0155] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the described embodiments. Technical personnel familiar with the field may make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A traffic scheduling method, characterized in that: The following steps are involved: Obtain the target delay, target jitter, TSN traffic egress timestamp, and current time when the message enters the TSN scheduler for unidirectional traffic messages; Determine the theoretical sending time of the current TSN message according to the target delay and the egress timestamp; Determine a sending queue mark of a current TSN message according to the theoretical sending time, the target jitter and the current time; Based on the sending queue mark, the unidirectional traffic message is sent to achieve traffic scheduling.
2. A traffic scheduling method according to claim 1, characterized in that: The determining, according to the theoretical sending time, the target jitter and the current time, a sending queue mark of the current TSN message specifically includes: Based on the preset time, the target jitter and the current time, determine the start time of the current sending window of the network card and the current sending queue mark of the network card; Determine a first threshold, a second threshold, a third threshold, and a fourth threshold according to the start time and the target jitter; Determine a first queue mark, a second queue mark, and a third queue mark according to the current sending queue mark; A sending queue mark of the current TSN message is determined according to the theoretical sending time, the first threshold, the second threshold, the third threshold, the fourth threshold, the first queue mark, the second queue mark and the third queue mark.
3. A traffic scheduling method according to claim 2, characterized in that: The determining the start time of the current sending window of the network card based on the preset time, the target jitter and the current time specifically includes: The preset time, the target jitter and the current time are input into a first formula to obtain the start time of the current sending window of the network card; the first formula is: t 10 =((t3-t) / t2)*t2 t 10 is the start time of the current sending window of the network card, t is the preset time, t2 is the target jitter, and t3 is the current time.
4. A traffic scheduling method according to claim 2, characterized in that: The determining the current sending queue mark of the network card based on the preset time, the target jitter and the current time specifically includes: The preset time, the target jitter and the current time are input into a second formula to determine the current sending queue mark of the network card; the second formula is: q=((t3-t) / t2)%4 q is the current send queue mark of the network card, t is the preset time, t2 is the target jitter, t3 is the current time, and % is the modulo operation.
5. A traffic scheduling method according to claim 2, characterized in that: The determining, according to the start time and the target jitter, a first threshold, a second threshold, a third threshold, and a fourth threshold specifically includes: Performing a sum operation on the start time and the target jitter to obtain a first sum, and using the first sum as the first threshold; The start time and the target jitter are input into a third formula to obtain the second threshold value; the third formula is: T2=t 10 +2t2 The start time and the target jitter are input into a fourth formula to obtain the third threshold value; the fourth formula is: <h2 style=";text-align:left;direction:ltr">T3=t<h2 style=";text-align:left;direction:ltr"> 10 <h2 style=";text-align:left;direction:ltr"> +3t2 The start time and the target jitter are input into a fifth formula to obtain the fourth threshold value; the fifth formula is: T4=t 10 +4t2 In the third formula, the fourth formula and the fifth formula, t 10 is the starting time, t2 is the target jitter, T2 is the second threshold, T3 is the third threshold, and T4 is the fourth threshold.
6. A traffic scheduling method according to claim 2, characterized in that: The determining, according to the current sending queue mark, a first queue mark, a second queue mark, and a third queue mark specifically includes: Input the current sending queue mark into a sixth formula to determine a first queue mark; Input the current sending queue mark into a seventh formula to determine a second queue mark; Input the current sending queue mark into an eighth formula to determine a third queue mark; The sixth formula is: q1=(q+1)%4; The seventh formula is: q2=(q+2)%4; The eighth formula is: q3 = (q + 4)% 4 In the sixth formula, the seventh formula and the eighth formula, q is the current sending queue mark, q1 is the first queue mark, q2 is the second queue mark, q3 is the third queue mark, and % is the remainder operation.
7. A traffic scheduling method according to claim 2, characterized in that: The determining of the sending queue mark of the current TSN message according to the theoretical sending time, the first threshold, the second threshold, the third threshold, the fourth threshold, the first queue mark, the second queue mark and the third queue mark specifically includes: When the theoretical sending time is less than the first threshold, or less than the current time, the current sending queue mark of the network card is used as the sending queue mark of the current TSN message; When the theoretical sending time is less than the second threshold, using the first queue mark as the sending queue mark of the current TSN message; When the theoretical sending time is less than the third threshold, using the second queue mark as the sending queue mark of the current TSN message; When the theoretical sending time is less than the fourth threshold, the third queue mark is used as the sending queue mark of the current TSN message.
8. A traffic scheduling system, characterized in that: include: The first processing unit is used to obtain the target delay, target jitter, egress timestamp of TSN traffic, and current time when the message enters the TSN scheduler of the unidirectional traffic message; A second processing unit, configured to determine a theoretical sending time of a current TSN message according to the target delay and the egress timestamp; A third processing unit, configured to determine a sending queue mark of a current TSN message according to the theoretical sending time, the target jitter and the current time; The fourth processing unit is used to send the unidirectional traffic message based on the sending queue mark to achieve traffic scheduling.
9. A flow scheduling device, characterized in that include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements a traffic scheduling method as described in any one of claims 1-7.
10. A computer-readable storage medium storing instructions executable by a processor, characterized in that: The processor-executable instructions are used to execute a traffic scheduling method as described in any one of claims 1-7 when executed by the processor.