A heuristic traffic scheduling method based on delay tolerance
Through a heuristic traffic scheduling method based on latency tolerance, load balancing routing, delay tolerance scheduling and compression algorithms are adopted to solve the problems of low scheduling efficiency and resource utilization in time-sensitive networks, and achieve higher traffic scheduling and bandwidth utilization.
Patent Information
- Application Number
- CN202510698950.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-05-28
AI Technical Summary
The existing time-sensitive network traffic scheduling methods have low scheduling efficiency and resource utilization when the traffic scale is large or the network topology is complex, and cannot meet the needs of high real-time and high bandwidth.
The heuristic traffic scheduling method based on delay tolerance is adopted to optimize the use of network resources through load balancing routing, delay tolerance scheduling and compression algorithms, including computational load balancing routing, heuristic path selection, two-stage conflict processing algorithm and compression operations.
It improves traffic scheduling and bandwidth utilization, and can schedule more time-sensitive streams under the same scheduling conditions, allocate network bandwidth reasonably, and avoid bandwidth waste.
Smart Images

Figure CN120223620B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of time-sensitive networks, and in particular to a heuristic traffic scheduling method based on delay tolerance. Background Art
[0002] With the rapid development of in-vehicle network technology, the requirements for real-time and reliability in in-vehicle communication systems are increasing. Time-Sensitive Networking (TSN), a cutting-edge communication technology, is being gradually introduced into in-vehicle communication systems due to its advantages in time determinism. TSN is becoming the core infrastructure supporting the transmission of critical business data. As an enhanced evolution of traditional Ethernet, TSN provides reliable technical support for in-vehicle communications by introducing a deterministic transmission mechanism. The core concept of TSN traffic scheduling is to pre-calculate and allocate fixed transmission time slots to various data flows in the network. This scheduling method ensures that critical business data is transmitted within a strictly specified time window, thereby meeting microsecond or even nanosecond latency requirements. For example, in intelligent driving systems, environmental perception data must be transmitted within a specified time window; failure to do so will affect the vehicle's decision-making and response speed.
[0003] From a technical implementation perspective, traffic scheduling needs to solve the following problems: first, the scheduling table generation algorithm: how to achieve the optimal configuration of network resources while satisfying the time constraints of all time-sensitive flows; second, the scalability of the scheduling strategy: how to maintain the scheduling efficiency at all times or to maintain a slow decline as the network scale expands. Traditional traffic scheduling algorithms face problems such as low bandwidth utilization, high latency, and poor scalability. In time-sensitive networks, how to fully utilize network bandwidth, reduce latency, and improve the overall efficiency of the system while ensuring the priority transmission of time-sensitive traffic has become an urgent problem to be solved. Existing traffic scheduling methods still have low scheduling efficiency and resource utilization when the traffic scale is large or the network topology is complex, and cannot meet the needs of applications with high real-time and high bandwidth requirements. Summary of the Invention
[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a heuristic traffic scheduling method based on delay tolerance.
[0005] The object of the present invention is achieved through the following technical solutions:
[0006] The present invention discloses a heuristic traffic scheduling method based on delay tolerance, comprising the following steps:
[0007] S1. Calculate the load balancing route and distribute the traffic relatively evenly to all available links through the load balancing strategy.
[0008] S2. Calculate the delay-tolerant schedule and set the scheduling strategy to tolerate delays in intermediate nodes.
[0009] S3. Computational compression optimizes network bandwidth usage and improves network resource utilization efficiency by reducing the number of protection bands.
[0010] Furthermore, the calculation of the load balancing route in step S1 includes sorting and heuristic path selection, which specifically includes the following sub-steps:
[0011] S11. Based on traffic busyness function Sort all traffic to be scheduled from large to small, the traffic busyness function The formula is ,in represents the payload of the stream, Indicates the period of the flow;
[0012] S12: Perform heuristic routing based on the traffic sorted in step S11, and determine a heuristic evaluation function based on the delay that has occurred and the estimated delay that will occur in the future; search all neighboring nodes of the current node except the upstream node, select the node with the smallest overall delay value as the routing node, and search in sequence until the destination node is reached:
[0013] By formula Calculate the conflict function between different flows ,in Indicates the transmission path that stream i has passed through, Representation Flow Heliu The number of paths that overlap, Representation Flow The frame size, Representation Flow cycle, Representation Flow The frame size, Representation Flow cycle, It represents the maximum value of conflicts between any two flows with overlapping paths among all flows;
[0014] By formula Calculating reserved delay ,in Representation Flow propagation delay;
[0015] When any flow reaches an intermediate node, it is assumed that the subsequent transmission path takes the shortest path to reach the destination node first, generating an estimated delay. , through the formula Compute heuristic delay estimation function ;
[0016] Last passed Calculate the total estimated delay for large-scale periodic time-sensitive traffic .
[0017] Preferably, step S2 specifically includes the following steps:
[0018] S21. Input parameters, input description information of each frame, including period, first offset, and transmission path;
[0019] S22. Calculate the starting transmission time of each node in the path of each frame in the first cycle, and start scheduling in order. During the scheduling process, use a conflict detection algorithm to determine whether the current detected frame conflicts with the scheduled frame. If no conflict occurs, continue scheduling the next frame. If a conflict occurs, execute step S23.
[0020] S23: First-stage scheduling: Invoke the first-stage conflict resolution algorithm to attempt to assign the second offset offset1 to the frame so that it does not conflict with any other scheduled frames. If scheduling succeeds, i.e., there is no conflict with any other frames, the timestamp of the frame on all path nodes is added with the second offset offset1 to complete the final time positioning. If scheduling fails, proceed to step S24.
[0021] S24, the second stage of scheduling, for frames that have not been successfully scheduled, call the second stage conflict handling algorithm to avoid the conflicting time slots, calculate the third offset offset2 and the cache delay , and updates the frame sending time on each node.
[0022] Preferably, the conflict detection algorithm described in step S22 specifically includes the following steps:
[0023] S221, traverse the scheduled frame , calculate the current detection frame The earliest possible sending time interval in this cycle ,in Indicates the first start time, Indicates the first end time;
[0024] S222, make a conflict-free judgment, if or ,in Indicates the second start time, Indicates the second end time, the current detection frame Scheduled frames If the cycle does not overlap, the current cycle loop is jumped out and the next frame judgment is continued;
[0025] S223, conflict judgment, if And, the current detection frame The start time of the scheduled frame In the interval, cache delay is used to resolve conflicts: , and returns ;in Indicates whether a conflict occurs. Indicates the scheduled frame that conflicts with the current detection frame, Indicates the value of the adjustable offset, Indicates adjustable delay;
[0026] like and , then the current detection frame Will block scheduled frames , through the fourth offset Let the current detection frame Avoiding scheduled frames : , and returns ,in means yes;
[0027] If the above conditions are not met, return , Indicates failure, None Indicates that it does not exist.
[0028] Preferably, the first-stage conflict handling algorithm described in step S23 specifically includes the following steps:
[0029] S231, traverse the current detection frame Each switching node passed through returns the conflict judgment result and the fourth offset through the conflict detection algorithm described in step S22. ;
[0030] S232, determine the conflict situation, if a conflict occurs, if the fourth offset Exceeding the maximum allowable deviation ,return , scheduling fails; otherwise, the fourth offset is used Modify the current detection frame The scheduling time is calculated and the entire path detection is restarted; if no conflict occurs, the fourth offset All node scheduling requirements have been met, returning the fourth offset .
[0031] Preferably, the second-stage conflict handling algorithm described in step S24 specifically includes the following steps:
[0032] S241, traverse each switching node on the frame path within the cycle and obtain the scheduling time of the node in the current cycle ,in Indicates the third start time, Indicates the third end time, and detects whether there is a conflict with the scheduled frame through the conflict detection algorithm described in step S22, and returns If there is no conflict, continue to the next node detection; if a conflict occurs, the cache delay is used first in step S243 solve;
[0033] S242, if the return adjustable delay If the cumulative buffer delay does not exceed the maximum allowable delay of the detection frame, the adjustable delay is added to the sending time of all nodes starting from the current node in the path. If step S242 cannot be resolved, then use cache delay in step S243 and time offset are jointly solved;
[0034] S243, if only cache delay If the conflict cannot be resolved, use the offset to adjust the overall start time of the frame; ,in Indicates the maximum offset allowed by the frame. If the judgment is yes, it will fail and exit, and return Otherwise adjust for , and reset the path scheduling time; exit the current cycle detection, return to the outermost layer to re-detect the entire path, if the current detection does not have any conflict, it means that the scheduling is successful, and return the adjusted scheduling time and the final offset .
[0035] Preferably, step S3 specifically includes the following steps:
[0036] S31. Traverse all operations for each flow and calculate the delay time of the operation;
[0037] S32. Try to delay the operation, traverse each flow again, traverse each forwarding operation in it, and analyze whether there is a valid compression opportunity within the delay range: if it is determined that there is a compression opportunity, delay the operation for a period of time; when no operation is compressed after a full round of traversal, the algorithm terminates.
[0038] The beneficial effects of the present invention are:
[0039] 1) The present invention improves traffic schedulability. Under the same scheduling conditions, a larger number of time-sensitive flows can be scheduled through the delay tolerance mechanism.
[0040] 2) The present invention improves bandwidth utilization. Through load balancing routing and compression algorithms, the system can more reasonably allocate network bandwidth, thus avoiding bandwidth waste. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 Schematic diagram of the steps of a heuristic traffic scheduling method based on delay tolerance according to an embodiment of the present invention;
[0042] Figure 2 Schematic diagram of a heuristic traffic scheduling method based on delay tolerance according to an embodiment of the present invention;
[0043] Figure 3 This is a topological diagram of the relationships between nodes in a heuristic traffic scheduling method based on delay tolerance according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0045] This paper proposes a traffic scheduling method based on heuristic algorithm, which optimizes the use of network resources by introducing load balancing routing, delay tolerance mechanism and compression algorithm, and significantly improves the schedulability of traffic and bandwidth utilization. Figure 2 As shown, sorting is the pre-step of the entire algorithm process, so it is classified as computational routing. The traffic scheduling algorithm of the present invention has efficient load balancing, high schedulability and bandwidth utilization, and can meet the needs of time-sensitive applications. The step diagram is as follows Figure 1 As shown, the specific steps include:
[0046] S1. Calculates load balancing routes and distributes traffic relatively evenly to all available links through load balancing strategies. This is used to avoid network congestion and improve overall bandwidth utilization.
[0047] S2. Calculate delay-tolerant scheduling and set scheduling policies to tolerate delays in intermediate nodes, enabling scheduling of larger volumes of traffic under the same conditions.
[0048] S3. Computational compression optimizes network bandwidth usage and improves network resource utilization efficiency by reducing the number of protection bands.
[0049] Exemplarily, the calculation of the load balancing route in step S1 includes sorting and heuristic path selection, and specifically includes the following sub-steps:
[0050] S11. Based on traffic busyness function All traffic to be scheduled is sorted from large to small. Specifically, the busier the traffic is in a single cycle, the higher its ranking position is. The traffic busyness function It is defined as the ratio of the flow's payload to its period; its formula is ,in represents the payload of the stream, Indicates the period of the flow;
[0051] S12. Perform heuristic routing based on the traffic that has been sorted in step S11. The delay that has occurred and the estimated delay that will occur in the future are used as specific indicators to determine the heuristic evaluation function. By searching all neighboring nodes of the current node except the upstream node, the node with the smallest overall delay value is selected as the routing node, and the search is carried out in sequence until the destination node. The specific algorithm flow is as follows, where the node set V represents the switches and terminal nodes in the network. The switch is responsible for forwarding and scheduling data, while the terminal node serves as the source or destination of the data. The edge set E represents the physical connection between nodes, and each directed edge represents a communication direction. Therefore, a pair of reverse edges, such as and , collectively representing nodes A full-duplex physical connection between node B and node B. The specific algorithm flow is as follows:
[0052] Input: Source node s , target node t ,picture G=(V,E)
[0053] Output: s arrive t The optimal path
[0054] 1) Parameterization: open list open←{s} , close the list close←∅ ;
[0055] 2)while open≠∅ do
[0056] 3) From open Select the node with the lowest cost u ;
[0057] 4) u from open Remove, add close ;
[0058] 5) if u=t then
[0059] 6) Return path;
[0060] 7) end
[0061] 8) Traversal u All adjacent nodes of v∈Neighbors(u) {if v∉close then
[0062] 9) v join in open ;
[0063] 10) end
[0064] 11)end
[0065] 12) return path does not exist
[0066] The key point is the specific calculation method of node delay cost. Assume that the total estimated delay of the heuristic routing algorithm is , whose expression is ;in, represents the current delay function, that is, the delay D generated from the source node to the current node n; Denotes a heuristic delay estimation function, representing the expected delay from the current node n to the destination node. The specific calculation method of the estimated delay is: the delay generated by the shortest path first routing from the current node n to the destination node. The routing calculation should disperse the time-sensitive traffic to different time slots of different paths as much as possible to avoid conflicts between flows. Based on the transmission characteristics of time-sensitive traffic and the similarity between paths, the conflict function between different flows is defined, and the formula is used. Calculate the conflict function between different flows ,in Indicates the transmission path that stream i has passed through, Representation Flow Heliu The number of paths that overlap, Representation Flow The frame size, Representation Flow cycle, Representation Flow The frame size, Representation Flow cycle, It represents the maximum value of conflicts between any two flows with overlapping paths among all flows;
[0067] The final heuristic function evaluation value of the routing algorithm is delay, so delay reservation is made according to the size of the possible conflict. In order to make the reserved delay closer to the actual value, the reserved delay is defined The product of the maximum conflict degree between any two flows and their propagation delay, the expression of the reserved delay is ;in, Representation Flow propagation delay.
[0068] When any flow reaches an intermediate node, it is assumed that the subsequent transmission path takes the shortest path to reach the destination node first, generating an estimated delay. , through the formula Compute heuristic delay estimation function ;
[0069] Finally, the formula Calculate the total estimated delay for large-scale periodic time-sensitive traffic .
[0070] For example, in step S2, a delay tolerance mechanism is introduced during the scheduling process, which allows a certain delay to occur at the intermediate nodes without affecting the transmission timeliness of the entire flow. The proposed traffic scheduling algorithm is called a two-stage conflict handling algorithm, which specifically includes the following steps:
[0071] S21. Input parameters, input description information of each frame, including period, first offset, and transmission path;
[0072] S22. Calculate the starting transmission time of each node in the path of each frame in the first cycle, and start scheduling in order. During the scheduling process, use a conflict detection algorithm to determine whether the current detected frame conflicts with the scheduled frame. If no conflict occurs, continue scheduling the next frame. If a conflict occurs, execute step S23.
[0073] S23: First-stage scheduling: Invoke the first-stage conflict resolution algorithm to attempt to assign the second offset offset1 to the frame so that it does not conflict with any other scheduled frames. If scheduling succeeds, i.e., there is no conflict with any other frames, the timestamp of the frame on all path nodes is added with the second offset offset1 to complete the final time positioning. If scheduling fails, proceed to step S24.
[0074] S24, the second stage of scheduling, for frames that have not been successfully scheduled, call the second stage conflict handling algorithm to avoid the conflicting time slots, calculate the third offset offset2 and the cache delay , and updates the frame sending time on each node.
[0075] The overall flow of the algorithm is as follows:
[0076] Input: Information of each frame: (not considering switch processing time), cycle T , initial offset offset
[0077] Output: The frame sending time in each switch node
[0078] 1) Initialization:
[0079] 2) Each frame f:f←{}
[0080] 3) Switch Node s The frame collection in: F s ←∅
[0081] 4) Scheduled frame set: F deployed ←∅
[0082] 5) Scheduling cycle time: T cycle
[0083] 6) for each frame f do
[0084] 7) Calculate the path and offset Calculate the initial sending time of each switch node in sequence
[0085] [ t start ,t end ](First cycle only)
[0086] 8) if f Through the switch node s then
[0087] 9) f join in F s
[0088] 10) end
[0089] 11)end
[0090] 12) / / Phase 1: Scheduling without cache delay
[0091] 13) for each switch node s∈S sorted do
[0092] 14) for each frame f∈F s do
[0093] 15) Execute the first-stage conflict resolution algorithm to obtain the adjusted offset1
[0094] 16) If deployable then
[0095] 17) f join in F deployed
[0096] 18) Update f All time parameters: t start ←t start +offset 1 ,t end ←t end +offset 1
[0097] 19) end
[0098] 20) end
[0099] 21)End
[0100] 22) / / Second stage: Add frames that need to be cached and delayed
[0101] 23) for each frame f∈F s and f∉F deployed do
[0102] 24) Execute the two-stage conflict resolution algorithm to obtain offset2 and buffer_delay
[0103] 25)end
[0104] Exemplarily, the conflict detection algorithm described in step S22 specifically includes the following steps:
[0105] S221, traverse the scheduled frame , calculate the current detection frame The earliest possible sending time interval in this cycle ,in Indicates the first start time, Indicates the first end time;
[0106] S222, make a conflict-free judgment, if or ,in Indicates the second start time, Indicates the second end time, the current detection frame Scheduled frames If the cycle does not overlap, the current cycle loop is jumped out and the next frame judgment is continued;
[0107] S223, conflict judgment, if and , then the current detection frame The start time of the scheduled frame In the interval, cache delay is used to resolve conflicts: , and returns ;in Indicates whether a conflict occurs. Indicates the scheduled frame that conflicts with the current detection frame, Indicates the value of the adjustable offset, Indicates adjustable delay;
[0108] like and , then the current detection frame Will block scheduled frames , through the fourth offset Let the current detection frame Avoiding scheduled frames : , and returns ,in means yes;
[0109] If the above conditions are not met, return , Indicates failure, None Indicates that it does not exist. The specific process of the conflict detection algorithm is as follows:
[0110] Input: Deployed frame set Deployed, current frame f curr The time window[ t start ,t end ],cycle T
[0111] Output: conflict flag is_conflict, conflict frame f conflict , the offset to be adjusted, the cache delay to be increased
[0112] 1) for each frame f∈Deployed and f∈F s do
[0113] 2) for k←0 to ⌊ ⌋ do
[0114] 3) if t start (f curr )+kT≥t end (f) or t end (f curr )+kT≤t start (f) then
[0115] 4) Continue without time overlap, skip detection
[0116] 5) end
[0117] 6) else
[0118] 7) if t start (f curr )+kT∈[t start (f),t end (f)] then
[0119] 8) delay← t end (f)−(t start (f curr )+kT) ;
[0120] 9) return True,f,0,delay Cache delay required
[0121] 10) end
[0122] 11) else if t start (f)∈[t start (f curr )+kT,t end (f curr )+kT] then
[0123] 12) offset'← t end (f curr )+kT−t start (f) ;
[0124] 13) returnTrue, f ,offset' ,0Offset needs to be adjusted
[0125] 14) end
[0126] 15) end
[0127] 16) end
[0128] 17)end
[0129] 18) return False, None, None, None no conflict
[0130] Exemplarily, the first-stage conflict handling algorithm described in step S23 specifically includes the following steps:
[0131] S231, traverse the current detection frame Each switching node passed through returns the conflict judgment result and the fourth offset through the conflict detection algorithm described in step S22. ;
[0132] S232, determine the conflict situation, if a conflict occurs, if the fourth offset Exceeding the maximum allowable deviation ,return , scheduling fails; otherwise, the fourth offset is used Modify the current detection frame The scheduling time is calculated and the entire path detection is restarted; if no conflict occurs, the fourth offset All node scheduling requirements have been met, returning the fourth offset .
[0133] The specific process of the first phase conflict resolution algorithm is as follows:
[0134] Input: Frame collection F ,Switch node set S , initial time parameters
[0135] Output: The adjusted offset 'offset' (if successful) or false (if the conflict is unsolvable)
[0136] 1)conflict_free←false;
[0137] 2)while true do
[0138] 3) conflict_free←true;
[0139] 4) for each switch node s∈S do
[0140] 5) If a conflict is detected then
[0141] 6) conflict_free←false;
[0142] 7) break jumps out of the current loop and retests
[0143] 8) end
[0144] 9) Records s Sending time[ t start ,t end ];
[0145] 10) While there is cycle overlap do
[0146] 11) Update offset to adjust to the next cycle
[0147] 12) Calculate new time parameters: t start ←t start +T,t end ←t end +T ;
[0148] 13) If the conflict still exists then
[0149] 14) if offset’>benchmark then
[0150] 15) return false if the threshold is exceeded and the conflict cannot be resolved
[0151] 16) end
[0152] 17) Break retest
[0153] 18) end
[0154] 19) end
[0155] 20) end
[0156] 21) if conflict_free then
[0157] 22) return offset' returns the offset without conflict
[0158] 23) end
[0159] 24)end
[0160] Exemplarily, the second-stage conflict handling algorithm described in step S24 specifically includes the following steps:
[0161] S241, traverse each switching node (output port) on the frame path within the cycle and obtain the scheduling time of the node in the current cycle ,in Indicates the third start time, Indicates the third end time, and detects whether there is a conflict with the scheduled frame through the conflict detection algorithm described in step S22, and returns If there is no conflict, continue to the next node detection; if a conflict occurs, the cache delay is used first in step S243 solve;
[0162] S242, if the return adjustable delay If the cumulative buffer delay does not exceed the maximum allowable delay of the detection frame, the adjustable delay is added to the sending time of all nodes starting from the current node in the path. If step S242 cannot be resolved, then use cache delay in step S243 and time offset are jointly solved;
[0163] S243, if only cache delay If the conflict cannot be resolved, use the offset to adjust the overall start time of the frame; ,in Indicates the maximum offset allowed by the frame. If the judgment is yes, it will fail and exit, and return ; otherwise adjust for , and reset the path scheduling time; exit the current cycle detection, return to the outermost layer to re-detect the entire path, if the current detection does not have any conflict, it means that the scheduling is successful, and return the adjusted scheduling time and the final offset .
[0164] The specific process of the second phase conflict resolution algorithm is as follows:
[0165] Input: Deployed frame set, current frame f Initial time parameters, switch node set S ,cycle
[0166] T , conflict threshold benchmark
[0167] Output: adjusted offset, cache delay of each switch node
[0168] 1)while True do
[0169] 2) for each switch node s∈S do
[0170] 3) Record s Initial sending time[ t start ,t end ];
[0171] 4) delay←0;
[0172] 5) while True do
[0173] 6) If a conflict is detected then
[0174] 7) local_adjusted←False;
[0175] 8) Reset time parameters to restore initial settings
[0176] 9) end
[0177] 10) else
[0178] 11) Update to next cycle: t start ←t start +T,t end ← tend +T;
[0179] 12) end
[0180] 13) is_conflict, f c ,offset' ,delay←ConflictDetection(Deployed, f , s );
[0181] 14) if is_conflict and not global_adjusted then
[0182] 15) if offset’>benchmark then
[0183] 16) return false exceeds the threshold and cannot be resolved
[0184] 17) end
[0185] 18) Adjustment f The time parameter only affects the current and subsequent nodes
[0186] 19) local_adjusted←True ;
[0187] 20) end
[0188] 21) else if is_conflict and global_adjusted then
[0189] 22) if
[0190] twenty three) delay>benchmark then
[0191] 24) return false exceeds the threshold and cannot be resolved
[0192] 25) end
[0193] 26) Adjustment f The global time parameter affects all nodes global_adjusted←True;
[0194] 27) break jumps out of the current loop
[0195] 28) end
[0196] 29) end
[0197] 30) if not local_adjusted then
[0198] 31) global_adjusted←False;
[0199] 32) break needs to be readjusted globally
[0200] 33) end
[0201] 34) end
[0202] 35) if not(global_adjusted or local_adjusted) then
[0203] 36) return offset',delay successfully resolves the conflict
[0204] 37) end
[0205] 38)end
[0206] Exemplarily, step S3 specifically includes the following steps:
[0207] S31. For each flow, traverse all operations (such as the forwarding action of a certain node) and calculate the delay time of the operation; that is, the maximum delay time of the current operation without affecting subsequent scheduling;
[0208] S32. Try to delay the operation, traverse each flow again, traverse each forwarding operation in it, and analyze whether there is a valid compression opportunity within the delay range: if it is determined that there is a compression opportunity, delay the operation for a period of time; when no operation is compressed after a full round of traversal, the algorithm terminates.
[0209] The specific process of compression calculation is as follows:
[0210] Input: A set of scheduled time-sensitive flows
[0211] Output: Optimized scheduling results
[0212] 1) compress←True initializes the compression flag
[0213] 2)while compress do
[0214] 3) compress←False resets the compression flag
[0215] 4) for each data stream flow do
[0216] 5) for each node node do
[0217] 6) computeSlack(sched,flow,oper) calculates the slack time
[0218] 7) end
[0219] 8) end
[0220] 9) for each data stream flow do
[0221] 10) for each node node do
[0222] 11) computeDelays(slack) calculates the delay time
[0223] 12) If delay is allowed then
[0224] 13) applyDelays(flow,oper,sched,delay) Apply delay adjustment
[0225] 14) compress←True sets the continue compression flag
[0226] 15) end
[0227] 16) end
[0228] 17) end
[0229] 18)end
[0230] 19) return sched returns the final scheduling result
[0231] For example, in a vehicle network environment, the traffic scheduling method of the present invention is applied to data transmission between multiple vehicle communication nodes. The relationship topology diagram between each node is as follows: Figure 3 As shown in the figure, it includes 16 terminal nodes and 8 switch nodes. In the figure, Es0-Es15 represent the 16 terminal nodes, and Sw0-Sw7 (Switch0-Switch7) represent the 8 switch nodes. The terminal nodes contain various types of service flows. The service flow parameters are shown in Table 1.
[0232] Table 1: Service flow parameters
[0233]
[0234] Assuming the maximum available link bandwidth is 100 Mbps, the entire scheduling process can be divided into four steps: sorting, routing, scheduling, and compression. Based on the period and load size of the aforementioned parameters, the busyness of each type of traffic can be determined. These traffic types are then sorted from smallest to largest according to the busyness function, resulting in a sorted traffic sequence. For example, [C&C 1, C&C 3, C&C 2, C&C 5, C&C 4, C&C 6, C&C 7, C&C 8, C&C 9, C&C 10]. Heuristic routing calculations are performed on this sorted traffic sequence to determine the paths for all types of traffic. The entire path consists of a sequence of nodes. For example, the route for C&C 5 is calculated as [ES3, SW1, SW2, SW3, ES6]. Based on the above routing calculations, the forwarding paths for all flows are determined. Traffic is now scheduled sequentially according to the order in step 1, and the transmission time windows for each flow as it passes through each node along the path are calculated. For example, the time windows for command and control type 5 traffic at each node along the path are [[533, 540], [555, 562], [577, 584]]. Based on these time windows, we can derive the time transmission window for each node port, compressing the number of guard bands per port. For example, at a port on intermediate node SW1, the calculated time window is [[233, 238], [267, 276], [332, 339]]. At this port, traffic at [233, 238] can be shifted as far back as possible within the range [239, 260] without exceeding the maximum allowable delay for the traffic.
[0235] The foregoing description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein and should not be construed as excluding other embodiments. Rather, the present invention can be used in various other combinations, modifications, and environments and can be modified within the scope of the concept described herein through the above teachings or techniques or knowledge in the relevant field. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention are intended to be protected by the appended claims.
Claims
1. A heuristic traffic scheduling method based on delay tolerance, characterized in that: The following steps are involved: S1. Calculate the load balancing route and distribute the traffic relatively evenly to all available links through the load balancing strategy. S2. Calculate the delay-tolerant schedule and set the scheduling strategy to tolerate delays in intermediate nodes. S3, computational compression, by reducing the number of guard bands, optimizes network bandwidth usage and improves network resource utilization efficiency; The calculation of the load balancing route described in step S1 includes sorting and heuristic path selection, which specifically includes the following sub-steps: S11. Sort all traffic to be scheduled from large to small based on the traffic busyness function b(i). The formula of the traffic busyness function b(i) is: Among them pl i Represents the payload of the stream, T i Indicates the period of the flow; S12: Perform heuristic routing based on the traffic sorted in step S11, and determine a heuristic evaluation function based on the delay that has occurred and the estimated delay that will occur in the future; search all neighboring nodes of the current node except the upstream node, select the node with the smallest overall delay value as the routing node, and search in sequence until the destination node is reached: By formula Calculate the conflict function C between different flows i,j , where p i Indicates the transmission path that stream i has passed through, |p i ∩p j | indicates flow f i and flow j The number of paths that overlap, Represents the flow f i The frame size, Represents the flow f i cycle, Represents the flow f j The frame size, Represents the flow f j cycle, It represents the maximum value of conflicts between any two flows with overlapping paths among all flows; By formula Calculate the reserved delay D r ,in Represents the flow f i propagation delay; When any flow reaches an intermediate node, assuming that the subsequent transmission path takes the shortest path to reach the destination node first, the estimated delay D is generated. f , through the formula D(n)=D r +D f Calculate the heuristic delay estimation function D(n); Finally, through T(n)=C(n)+D f +D r Calculate the total estimated delay T(n) of large-scale periodic time-sensitive traffic, where c(n) represents the current delay function. Step S2 specifically includes the following steps: S21. Input parameters, input description information of each frame, including period, first offset, and transmission path; S22. Calculate the start transmission time of each node in the path of each frame in the first cycle, and start scheduling in order. During the scheduling process, use a conflict detection algorithm to determine whether the current detected frame conflicts with the scheduled frame. If no conflict occurs, continue scheduling the next frame. If a conflict occurs, execute step S23. S23: First-stage scheduling: Invoke the first-stage conflict resolution algorithm to attempt to assign the second offset offset1 to the frame so that it does not conflict with any other scheduled frames. If scheduling succeeds, i.e., there is no conflict with any other frames, the timestamp of the frame on all path nodes is added with the second offset offset1 to complete the final time positioning. If scheduling fails, proceed to step S24. S24, second stage scheduling: For frames that have not been successfully scheduled, the second stage conflict handling algorithm is called to avoid conflicting time slots, calculate the third offset offset2 and the buffer delay BufferDelay, and update the frame sending time on each node; The conflict detection algorithm described in step S22 specifically includes the following steps: S221, traverse the scheduled frame f, and calculate the earliest possible sending time interval [cf_start, cf_end] of the current detection frame cf in this period, where cf_start represents the first start time and cf_end represents the first end time; S222: Perform a conflict-free judgment. If cf_start ≥ f_start or cf_start ≥ f_end, where f_start represents the second start time and f_end represents the second end time, the current detection frame cf does not overlap with the scheduled frame f in this period. The current cycle loop is exited and the next frame judgment is continued. S223, conflict judgment, if cf_start ≥ f_start and cf_start < f_end, then the start time of the current detection frame cf is within the interval of the scheduled frame f, and the conflict is resolved by using buffer delay: BufferDelay = f_end - cf_start, and return (is_conflict, conflict_with, offset_add, delay) = (True, f, 0 , BufferDelay); where is_conflict indicates whether a conflict occurs, conflict_with indicates the scheduled frame that conflicts with the current detection frame, offfset_add indicates the value of the adjustable offset, and delay indicates the adjustable delay; If cf_start < f_start and cf_end > f_start, the current detection frame cf will block the scheduled frame f. The fourth offset offset′ is used to allow the current detection frame cf to avoid the scheduled frame f: offset′ = f_end - cf_end, and return (is_conflict, conflict_with, offset_add, delay) = (True, f, offset′, 0), where True indicates yes. If the above conditions are not met, return (is_conflict, conflict_with, offset_add, delay) = (False, None, None, None), False indicates failure, None indicates non-existence; The first-stage conflict handling algorithm described in step S23 specifically includes the following steps: S231, traverse each switching node that the current detection frame cf passes through, and return the conflict judgment result and the fourth offset offset′ through the conflict detection algorithm described in step S22; S232. Determine whether a conflict occurs. If a conflict occurs, and if the fourth offset offset′ exceeds the maximum allowable offset benchmark, return False and the scheduling fails. Otherwise, use the fourth offset offset′ to modify the scheduling time of the current detection frame cf and restart the entire path detection. If no conflict occurs, the fourth offset offset′ has satisfied the scheduling requirements of all nodes, and return the fourth offset offset′. The second-stage conflict handling algorithm described in step S24 specifically includes the following steps: S241. Traverse each switching node on the frame path within the cycle and obtain the scheduling time [t_start, t_end] of the node in the current cycle, where t_start represents the third start time and t_end represents the third end time. Use the conflict detection algorithm described in step S22 to detect whether there is a conflict with the scheduled frame and return (is_conflict, conflict_with, offset_add, delay). If there is no conflict, continue to the next node detection. If a conflict occurs, preferentially use the buffer delay in step S243 to resolve it. S242. If the returned adjustable delay is ≠ 0 and the accumulated buffer delay does not exceed the maximum allowable delay of the detection frame, then the adjustable delay is added to the transmission time of all nodes in the path starting from the current node. If step S242 cannot solve the problem, then the buffer delay and time offset are used to solve the problem in step S243. S243. If the conflict cannot be resolved using Buffer Delay alone, the offset is used to adjust the overall frame start time. A determination is made as to whether offset′ + offset_add > frame.max_offset, where frame.max_offset represents the maximum offset allowed for the frame. If so, the process fails and returns (offfset_add, delay = False, False). Otherwise, offset′ is adjusted to offset′ + offset_add, and the path scheduling time is reset. The process exits the current cycle detection, returns to the outermost layer, and re-detects the entire path. If no conflict occurs during the current detection, the scheduling is successful, and the adjusted scheduling time, route_time, and the final offset, offset″, are returned.
2. A heuristic traffic scheduling method based on delay tolerance according to claim 1, characterized in that: Step S3 specifically includes the following steps: S31. Traverse all operations for each flow and calculate the delay time of the operation; S32. Try to delay the operation, traverse each flow again, traverse each forwarding operation in it, and analyze whether there is a valid compression opportunity within the delay range: if it is determined that there is a compression opportunity, delay the operation for a period of time; when no operation is compressed after a full round of traversal, the algorithm terminates.
Citation Information
Patent Citations
Business processing method and device
CN111817985A
Time-sensitive network deterministic routing and scheduling method for improving resource availability
CN117640497A