A time-sensitive network-oriented real-time data stream scheduling method and device
By integrating the concept of flow optimization and the Z3 solver, the real-time data stream scheduling algorithm for time-sensitive networks is optimized, solving the problem of low computational efficiency in existing technologies. This enables efficient and reliable transmission of real-time data streams on TSN networks, adapting to various application scenarios with different topologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-09
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, real-time data stream scheduling algorithms for time-sensitive networks take too long to compute under large-scale conditions and have low solution efficiency. They fail to effectively solve the scheduling optimization and transmission constraint problems of time-triggered data streams, making it difficult to guarantee the reliable and real-time transmission of real-time service data streams on TSN networks.
By adopting the integrated flow optimization approach, real-time data streams with the same period are integrated into a single integrated data stream. The mathematical model is optimized by integrating the data stream, and the Z3 solver is used to calculate and solve the target constraints. A network scheduling table is generated, which optimizes the data stream transmission path and constraint model, reduces the number of conflict-free constraints, and improves computational efficiency and success rate.
It significantly improves the computational efficiency and success rate of real-time data stream scheduling in time-sensitive networks, ensuring reliable, real-time, and deterministic transmission of real-time business data streams on the TSN network, and has good scalability to adapt to different application scenarios.
Smart Images

Figure CN116781522B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of operational optimization, in particular to a real-time data stream scheduling method and device for a time sensitive network. BACKGROUND
[0002] TSN (Time sensitive network) is a new standard hard real-time Ethernet developed based on standard Ethernet. Through centralized control of network bandwidth resources, network bandwidth is flexibly and reasonably allocated to services with different QoS (Quality of Service) requirements, ensuring the determinacy of end-to-end transmission delay, jitter and bandwidth of time sensitive services and the real-time transmission, improving the efficiency of network bandwidth use, and meeting the urgent needs of real-time tasks of automation devices for efficient and integrated transmission of massive real-time and deterministic network services and traditional network services, and gradually applied to aerospace, rail transportation, automotive electronics and other industrial fields with strict time and reliability requirements for network communication services. Real-time data streams in TSN network, i.e. time triggered traffic, are data streams carrying critical real-time transmission services. A time schedule table is generated in advance by a scheduling algorithm to plan transmission time slots for each real-time service data stream on each transmission network port or link, and TSN terminals or switch chips transmit and receive real-time service data on time according to the time information of the schedule table, realizing the ordered, conflict-free and reliable transmission of real-time service data streams in the same physical network topology.
[0003] IEEE 802.1 series of standards gives the requirements and methods for TSN chip implementation, and currently there are commercial TSN chips officially released by domestic and foreign companies such as Broadcom, ADI, Mosa, Huawei, etc. However, there is no unified commercial algorithm tool software for real-time service data stream scheduling algorithm in the industry. The calculation time of the part of the scheduling algorithm disclosed is more than 3 hours under the condition that the number of real-time service data streams reaches about 1000, and the solving efficiency is low. The existing technical solutions of scheduling algorithm in the prior art mainly solve the problems of solving, transmission delay optimization and idle bandwidth balancing of time triggered data stream scheduling, but do not deeply involve the problems of optimizing transmission constraints modeling and improving algorithm solving efficiency.
[0004] In order to overcome the above-mentioned defects existing in the prior art, there is an urgent need in the field for a real-time data stream scheduling method for a time sensitive network, which is used for a scheduling algorithm of real-time service data stream based on integrated flow optimization idea and satisfiability model theory solving, greatly improves the calculation efficiency and success rate of scheduling, and effectively guarantees the reliable, real-time and deterministic end-to-end transmission of real-time service data stream on TSN network. SUMMARY
[0005] The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
[0006] In order to overcome the above-mentioned defects existing in the prior art, the present application provides a real-time data stream scheduling method for a time-sensitive network, comprising: parsing a network information configuration file, wherein the network information configuration file comprises a plurality of constraint parameters; planning a real-time data stream transmission path based on a network topology structure of the time-sensitive network and the constraint parameters; setting a target constraint condition based on the transmission path of the real-time data stream and the constraint parameters to establish a mathematical model, optimizing the mathematical model by integrating real-time data streams with the same period; calculating and solving the mathematical model; and generating a network scheduling table configuration file according to the result of solving the mathematical model.
[0007] In an embodiment, preferably, the optimizing the mathematical model by integrating real-time data streams with the same period comprises: integrating real-time data streams with the same period into an integrated data stream; and limiting the receiving and sending time of the integrated data stream through a network port within a time range Δt.
[0008] In an embodiment, preferably, the target constraint condition comprises a time conflict-free constraint, and the optimizing the mathematical model by integrating real-time data streams with the same period further comprises: only adding the time conflict-free constraint to the integrated data stream, while adding target constraint conditions other than the time conflict-free constraint to all data streams to optimize the established mathematical model.
[0009] In an embodiment, preferably, the calculating and solving the mathematical model comprises: calculating the solution of the receiving and sending time of each integrated data stream with different periods on the network port within the time range Δt, respectively.
[0010] In an embodiment, preferably, the target constraint condition comprises: for any pair of redundant real-time data streams, the difference between the sending time and the receiving time of the source device and the sink device should satisfy:
[0011] f j ∈F,i≠j,f i .TTID=f j .TTID
[0012] v a =f i .srcDev=f j .srcDev
[0013]
[0014] and
[0015] v c = f i .srcDev = f j .srcDev
[0016]
[0017] wherein f i represents the i-th real-time data stream, real-time ID is the identification number of the real-time data stream, srcDev is the source device, and minStreamTxGap is the minimum data stream transmission interval, represents the data stream f a flowing through the device v i , sendTime is the transmission time, maxTlrRedunTxTimeDiff is the maximum allowed redundant transmission time difference, rxStartOffsetInMacroCycle is the reception start offset time, and rxWindow is the reception window.
[0018] In an embodiment, preferably, the target constraint condition further comprises: ensuring that the source device simultaneously transmits real-time data streams with the same real-time ID.
[0019] In an embodiment, preferably, the target constraint condition further comprises one or more of the following: the transmission offset time is non-negative, the reception start offset time, the reception window and the transmission offset time are integer multiples of the minimum schedulable time; the same network port does not simultaneously transmit two real-time data streams; the same network port does not simultaneously receive two real-time data streams and any two reception windows do not overlap; the switch forwards after receiving the real-time data stream and completing the buffering; the time synchronization accuracy of the network, the maximum transmission delay of the network port and the maximum reception delay of the network port meet the predetermined conditions after the real-time data stream reception time window of the network port is completed; and the end-to-end transmission delay of any real-time data stream should be less than the maximum allowed transmission delay, while the time synchronization accuracy of the network meets the preset condition.
[0020] In an embodiment, optionally, the network topology comprises a star topology, a double-line topology and a ring topology, the network topology of the time-sensitive network is a combination of one or more of the three topologies, and a double-redundant data transmission path of double-receiving and double-transmitting is adopted between adjacent two switches or between adjacent terminal devices and switches in the network.
[0021] In an embodiment, preferably, the network topology planning of the time-sensitive network plans a real-time data stream transmission path, including: when the network topology is a star topology, containing four terminal devices and two switches, the two switches are located in two planes respectively, and two network ports of each terminal device are respectively connected to the two switches to realize double-receiving and double-transmitting.
[0022] In an embodiment, preferably, the network topology planning of the time-sensitive network plans a real-time data stream transmission path, including: when the network topology is a double-line topology, containing two terminal devices and multiple switches, the multiple switches are divided into two planes, and the switches in each plane are connected in a line type, two network ports of each terminal device are respectively connected to the switches in the two planes to realize double-receiving and double-transmitting, and the two terminal devices are connected to different switches in the same plane.
[0023] In an embodiment, preferably, the network topology planning of the time-sensitive network plans a real-time data stream transmission path, including: when the network topology is a ring topology, containing two terminal devices and multiple switches, the multiple switches are connected in a ring type, two network ports of each terminal device are connected to two different switches in the ring topology to realize double-receiving and double-transmitting, and two communication links between any two switches or between a switch and a terminal device through two network ports are the shortest communication paths that do not overlap in the ring topology network.
[0024] In an embodiment, preferably, the calculation of the mathematical model includes: taking the sending time and receiving window time of each real-time data stream in the device as a solving variable, using a scheduling solver to determine whether a solution that satisfies the target constraint condition exists; and in response to the existence of the solution that satisfies the target constraint condition, obtaining an optimal solution that satisfies the target constraint condition.
[0025] In an embodiment, optionally, the scheduling solver is a Z3 solver.
[0026] In an embodiment, preferably, the multiple constraint parameters in the network information configuration file include network topology constraint parameters and communication service constraint parameters, the network topology constraint parameters at least include one or more of network port link, link transmission bandwidth, switch forwarding delay, and time synchronization accuracy, and the communication service constraint parameters at least include one or more of communication period, frame length, and source and sink network ports.
[0027] In an embodiment, preferably, the parameters in the network scheduling table configuration file at least include one or more of scheduling period, sending time and receiving time of a communication service stream on each network port.
[0028] Another aspect of the present application provides a time-sensitive network oriented real-time data stream scheduling apparatus, comprising: a memory; and a processor coupled to the memory, the processor configured to perform the steps of the time-sensitive network oriented real-time data stream scheduling method described in any of the above aspects.
[0029] The present application also provides a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the steps of the time-sensitive network oriented real-time data stream scheduling method described in any of the above aspects. BRIEF DESCRIPTION OF DRAWINGS
[0030] The above features and advantages of the present application will be better understood by reading the following detailed description of embodiments of the present application, when considered in conjunction with the accompanying drawings. In the drawings, each component is not necessarily drawn to scale, and components of similar or identical function or structure can be designated with identical or similar reference numerals.
[0031] Figure 1 is a method flowchart of a time-sensitive network oriented real-time data stream scheduling method according to an aspect of the present application;
[0032] Figure 2 is a real-time data stream service data frame single-hop transmission space-time model according to an embodiment of the present application;
[0033] Figure 3 is a communication path diagram of a double-channel star topology according to an embodiment of the present application;
[0034] Figure 4 is a communication path diagram of a double-double network port device double linear topology according to an embodiment of the present application;
[0035] Figure 5 is a communication path diagram of a ring topology according to an embodiment of the present application;
[0036] Figure 6 is a diagram of integrated real-time data stream according to an embodiment of the present application; and
[0037] Figure 7 is a flowchart of a time-sensitive network oriented real-time data stream scheduling method according to an embodiment of the present application;
[0038] Figure 8 is an apparatus structure diagram of a time-sensitive network oriented real-time data stream scheduling apparatus according to another aspect of the present application.
[0039] For the sake of clarity, the following gives a brief explanation of the reference numerals:
[0040] 301a, 301b, 301c, 301d terminal device
[0041] 302a, 302b switch
[0042] 303a A plane
[0043] 303b B plane
[0044] 401a, 401b terminal device
[0045] 402a, 402b,..., 402g switch
[0046] 403a A plane
[0047] 403b B plane
[0048] 501a, 501b terminal device
[0049] 502a, 502b,..., 502g switch DETAILED DESCRIPTION
[0050] The present application is described herein with reference to particular embodiments for a purpose of illustration only. The present application is not limited to the embodiments described herein, but can be practiced with alternative or modified embodiments. The description of the embodiments is intended to cover all alternatives, modifications and equivalents of the present application, including all those resulting from the practice of the present application to the full extent allowed by the claims.
[0051] In order to provide a thorough understanding of the present application, numerous specific details are described in the following description. The present application can be practiced without these details. In other instances, well-known methods, procedures and components have not been described in detail so as not to unnecessarily obscure aspects of the present application.
[0052] In the description of the present application, it is to be understood that the terms "mounting", "connected", "connecting" should be interpreted broadly, for example, can be fixed connection, can also be detachable connection, or integrally connected; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be internal communication of two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0053] In addition, "upper", "lower", "left", "right", "top", "bottom", "horizontal", "vertical" used in the following description and shown in the drawings should be understood as the orientation of the section and related drawings. The relative terms are only for the convenience of description, and do not mean that the device described thereby needs to be manufactured or operated in a specific orientation, and therefore should not be understood as a limitation of the present application.
[0054] It can be understood that although the terms "first", "second", "third" and the like are used herein to describe various components, regions, layers and / or parts, these components, regions, layers and / or parts should not be limited by these terms, and these terms are only used to distinguish different components, regions, layers and / or parts. Therefore, the first components, regions, layers and / or parts discussed below can be referred to as the second components, regions, layers and / or parts without departing from some embodiments of the present application.
[0055] In order to overcome the above-mentioned defects existing in the prior art, the present application provides a real-time data flow scheduling method for time-sensitive network, which is used for solving the scheduling algorithm of real-time service data flow based on the integrated flow optimization idea and satisfiability model theory. The calculation efficiency and success rate of scheduling are greatly improved, and good scalability is also possessed to adapt to different application scenarios. The data flow constraint model is optimized and solved, and the reliable, real-time and deterministic end-to-end transmission of real-time service data flow on TSN network is effectively guaranteed.
[0056] Figure 1 The method flow diagram of the real-time data flow scheduling method for time-sensitive network according to an aspect of the present application is shown.
[0057] Please refer to Figure 1 The real-time data flow scheduling method for time-sensitive network provided by the present application 100 includes:
[0058] Step 101: Analyzing the network information configuration file, which includes a plurality of constraint parameters.
[0059] In an embodiment, the plurality of constraint parameters in the network information configuration file includes network topology constraint parameters and communication service constraint parameters, the network topology constraint parameters at least including one or more of network port link, link transmission bandwidth, switch forwarding delay and time synchronization accuracy, and the communication service constraint parameters at least including one or more of communication period, frame length and source and sink network port.
[0060] For example, the network information configuration file is described by Extensible Markup Language (XML) and can include four main nodes, i.e., SyncDomain, NetworkDevices, StreamLinks and CommunicationTraffics, wherein the StreamLinks main node contains parameter information of all communication links of real-time service data streams of the TSN network.
[0061] Each main node can contain multiple sub-nodes, for example, the NetworkDevices node contains two types of sub-nodes, i.e., Switch and EndDevice, and each sub-node can contain multiple attribute values, each of which has a respective physical meaning. For specific examples, refer to the following table.
[0062] Table 1: Parameters of the network information configuration file
[0063]
[0064]
[0065]
[0066] Figure 2 A real-time data stream service data frame single-hop transmission space-time model is shown according to an embodiment of the present application.
[0067] Based on the parameter of each node in Table 1, a transmission space-time model of real-time data stream data frames in the TSN network under single-hop can be obtained, please refer to Figure 2 wherein SW represents a switch, ED represents an end device, and LK represents a communication link. In combination with Figure 2 It can be clearly obtained that multiple parameters involved in the transmission of real-time data streams in the TSN network and the physical meaning of each parameter.
[0068] The parameters in the network information configuration file shown in Table 1 can be generally divided into two types of constraint parameters from the perspective of constraint conditions: network topology constraint parameters and communication traffic constraint parameters. The network topology constraint parameters refer to the parameters in the SyncDomain, NetworkDevices, and StreamLinks nodes, and specifically include port connection, transmission bandwidth, link transmission delay, switch forwarding delay, clock synchronization accuracy, and the like. The communication traffic constraint parameters refer to the parameters in the CommunicationTraffics node, and include communication period, frame length, delay, jitter, source port, and sink port. The two types of parameters are respectively generated into corresponding data structures for subsequent use in mathematical modeling of target solving.
[0069] Before establishing the mathematical model of the target constraint condition, the network advancement path planning must be performed. After the path planning is completed, the corresponding constraint condition is established.
[0070] Please continue to refer to Figure 1 The real-time data flow scheduling method for a time-sensitive network provided by the application further includes the following steps.
[0071] Step 102: planning a real-time data flow transmission path based on the network topology structure of the time-sensitive network and the constraint parameters.
[0072] In actual use of the TSN network, considering the high efficiency and reliability of the real-time data flow service bearing function, the network topology is not too complex, and therefore the application mainly considers path planning of double-redundancy real-time data flow under three commonly used basic types of network topology structures, namely, star type, double-line type, and ring type. Various combinations can cover most application scenarios of the TSN network. It should be noted that, since the network topology structure bearing double-redundancy real-time data flow has symmetry, only half of the corresponding network topology structure needs to be considered for non-redundancy real-time data flow.
[0073] The network topology structure includes star type topology, double-line type topology, and ring type topology. The network topology structure of the time-sensitive network is a combination of one or more of the three types of topology structures. Double-redundancy data transmission paths are used between adjacent two switches or between adjacent terminal devices and switches in the network.
[0074] Figure 3 FIG. 2 is a schematic diagram of a communication path of a double-channel star type topology structure according to an embodiment of the application.
[0075] Please refer to Figure 3 When the network topology structure is a star type topology, it includes four terminal devices 301a, 301b, 301c, and 301d and two switches 302a and 302b, and the two switches are located in two planes, respectively.Figure 3 Each of the two network ports of the terminal device is connected to the switches in the two planes respectively to achieve dual-receiving and dual-transmitting.
[0076] Dual-receiving and dual-transmitting means that each of the two dual-network-port redundant devices can simultaneously transmit two same data streams from its two redundant network ports to the other device. For example, when the terminal device 301a and the terminal device 301b communicate with each other, the first network port of the terminal device 301b is used only to receive the data stream transmitted by the first network port of the terminal device 301a, the first network port of the terminal device 301a is used only to receive the data stream transmitted by the first network port of the terminal device 301b, the second network port of the terminal device 301b is used only to receive the data stream transmitted by the second network port of the terminal device 301a, and the second network port of the terminal device 301a is used only to receive the data stream transmitted by the second network port of the terminal device 301b, so as to achieve real-time data stream redundancy of dual communication paths.
[0077] Figure 4 FIG. 4 is a schematic diagram of communication paths of a dual-dual-network-port device dual-line topology according to an embodiment of the present application.
[0078] Please refer to Figure 4 When the network topology is a dual-line topology, the network topology includes two terminal devices 401a and 401b and multiple switches 402a, 402b, …, 402g. The multiple switches 402a, 402b, …, 402g are divided into two planes (an A plane 403a and a B plane 403b). The switches in each plane are connected in a line. Each of the two network ports of the terminal device is connected to the switches in the two planes respectively to achieve dual-receiving and dual-transmitting. The two terminal devices 401a and 401b are connected to different switches in the same plane. Figure 4
[0079] That is, the terminal devices 401a and 401b are both dual-network-port redundant devices. The first / second network port of each of the terminal devices 401a and 401b is connected to two switches in the A plane 403a and the B plane 403b respectively. The first network port of the terminal device 401a and the first network port of the terminal device 401b are not connected to the same switch (the switches 402a and 402c are connected respectively). Meanwhile, the second network port of the terminal device 401a and the second network port of the terminal device 401b are not connected to the same switch (the switches 402e and 402g are connected respectively). The terminal devices 401a and 401b communicate with each other in a dual-receiving and dual-transmitting mode. Figure 4 Figure 4
[0080] For example, the first network port of terminal device 401a or 401b communicates with the first network port of another terminal device 401b or 401a only through plane A 403a, and the second network port of terminal device 401a or 401b communicates with the second network port of another terminal device 401b or 401a only through plane B 403b, thereby realizing real-time data stream redundancy of dual communication paths.
[0081] Figure 5 This is a schematic diagram of a communication path in a ring topology according to an embodiment of the present invention.
[0082] When the network topology is a ring topology, it includes two terminal devices 501a and 501b and multiple switches 502a, 502b, ..., 502g connected in a ring. It's important to note that in a ring topology network, there is no distinction between "plane A" and "plane B".
[0083] like Figure 5 As shown, each terminal device has two network ports that are connected to two different switches in the ring topology to achieve dual transmission and reception. The two communication links between any two switches or between a switch and a terminal device through the two network ports are the shortest communication paths that do not overlap in the ring topology network.
[0084] For example, please refer to Figure 5 Switches 502a and 502d communicate. The data stream sent from the first network port of switch 502a reaches switch 502d through the paths of switches 502e, 502f and 502g. At the same time, the data stream sent from the second network port of switch 502a reaches switch 502d through the paths of switches 502b and 502c. These two communication links do not overlap and are the shortest paths connecting the two.
[0085] For example, regarding communication between switch 502a and terminal device 501b, please refer to... Figure 5 The data stream sent from the first network port of switch 502a reaches the terminal device 501b through the paths of switches 502b and 502c. At the same time, the data stream sent from the second network port of switch 502a reaches the terminal device 501b through the paths of switches 502e and 502f. This dual-transmit and dual-receive communication mode realizes real-time data stream redundancy of dual communication paths.
[0086] Please continue to refer to this. Figure 1 The real-time data stream scheduling method 100 for time-sensitive networks provided by the present invention further includes:
[0087] Step 103: Based on the transmission path of the real-time data stream and the constraint parameters, establish target constraints to build a mathematical model, and optimize the mathematical model by integrating real-time data streams with the same cycle.
[0088] First, this step needs to establish a mathematical model by setting up target constraints.
[0089] In an embodiment, the target constraints can include the following eight types of constraints.
[0090] 1. Basic constraints, which can be expressed by formulas (1.1) ~ (1.4):
[0091]
[0092] Where, f i represents the i-th real-time data stream; represents the data stream f a flowing through the device v i ; F is the set of data streams. Take the symbol:
[0093]
[0094] It is also necessary to ensure that the sending offset time is non-negative:
[0095]
[0096] At the same time, the receiving start offset time, the receiving window, and the sending offset time need to be integer multiples of the minimum schedulable time:
[0097]
[0098] In formula (1.4), represents the communication link of the p network port of the linked device v a .
[0099] 2. Sending time conflict constraints, which can be expressed by formulas (1.5) ~ (1.6):
[0100] It is easy to understand that the same network port cannot send two real-time data streams at the same time, and the next real-time data stream needs to wait for the current real-time data stream to appear on the cable before sending. Since the sending conflict and receiving conflict constraints on the network ports of the same communication link are repetitive, and the receiving conflict is more stringent, the sending conflict constraint is not considered too much, so:
[0101]
[0102] In formula (1.5), the real-time ID is the identification number of the real-time data stream; LCM(F.period) is the least common multiple of all real-time service data stream communication periods, and satisfies:
[0103]
[0104] In formula (1.6), indicates the device v a p network port in.
[0105] 3. Receive no time conflict constraints, available formula (1.7) ~ (1.8) can be expressed:
[0106] Similar to the sending, the same network port cannot receive two real-time data streams at the same time, the next receiving real-time data stream needs to wait for the previous real-time data stream to be completely received before it can be received, and any two receiving windows have no overlap. It should be noted that here the waiting for the previous real-time data stream to be completely received is not the first bit being received, so:
[0107]
[0108] And satisfy:
[0109]
[0110] 4. Switch forwarding constraints, can be expressed by formula (1.9):
[0111] Understandably, the switch forwarding time must be after receiving the real-time data stream and completing the buffering, and this constraint is also used to model the switch cache size constraint: reducing the upper limit of the forwarding time will make the forwarding time of each switch network port sending data frames configurable, so:
[0112]
[0113] 5. Source device multicast, broadcast sending constraints, can be expressed by formula (1.10):
[0114] Multicast, broadcast real-time data streams, etc. are split into multiple streams due to their different sink devices. The source devices and source network ports of these split real-time data streams are the same, so the source device should ensure that it sends real-time data streams with the same real-time ID at the same time, so:
[0115]
[0116] 6. Receiving time constraints, can be expressed by formula (1.11) ~ (1.13):
[0117] Because the real-time data stream receiving time window of the network port must be after the data stream link transmission is completed, while considering the TSN network time synchronization accuracy, so:
[0118]
[0119] In formula (1.11), l(v a ,v b ) indicates the connection device v aand v b communication link.
[0120] Meanwhile, the receiving window offset constraint needs to be considered:
[0121]
[0122] and the length constraint of the receiving window:
[0123]
[0124] 7. The end-to-end transmission delay constraint can be expressed by formula (1.14):
[0125] For the end-to-end transmission delay of any real-time data stream, the following condition should be met:
[0126]
[0127] 8. The dual-redundancy data stream constraint can be expressed by formula (1.15) and (1.16):
[0128] For the transmission and reception time difference of any dual-redundancy real-time data stream at the source device and the sink device, the following condition should be met:
[0129]
[0130] and
[0131]
[0132] In this embodiment, the target constraint mathematical model of the TSN network is established by the above eight types of constraint conditions. The target constraint mathematical model of the TSN is a series of constraints based on the network topology and the real-time data stream communication services carried thereby, and takes the transmission time and the receiving window time of each real-time data stream at the devices as the solving variables.
[0133] However, there are often problems in model calculation in actual application. If all the constraints are completely added to the solver, the solving capacity of the solver will often be exceeded due to too many constraints, resulting in no solving result.
[0134] The main reason for too many constraints is the existence of non-time conflict constraints. For other constraints, such as the end-to-end transmission delay constraint, each data stream only considers the time difference between the sending end and the receiving end when adding the constraint, and has no binding relationship with other data streams, and the time complexity is O(N). However, the non-conflict constraint involves the binding between different data streams, and the time complexity is O(N 2 ).
[0135] Worse, the non-conflict constraints between two data streams are not added only once, that is, the coefficient before N in the equation of O(N 2 ) is also large. In the above embodiment, the coefficient is equal to a*b, where a=L 2 CM(F.period) / p1, b=L 2 CM(F.period) / p1, that is, the number of times each of the two data streams appears in a macro period.
[0136] For example, if the macro period is 20 ms, and the periods of the two data streams are 2 ms and 5 ms respectively, then they will appear 10 times and 4 times in the macro period respectively, and the number of non-conflict constraints between the two data streams reaches 40.
[0137] Some methods in the prior art can reduce the number of constraints, such as not using the macro period but using the least common multiple of the periods of the two data streams, but the number of constraints that can be ultimately reduced by this method is limited. Too many constraints will make the subsequent solver exceed its own computing capacity, and ultimately cannot efficiently or even cannot obtain a suitable solution.
[0138] In this problem background, the present application introduces the heuristic idea based on integrated streams, and integrates real-time data streams with the same period into one data stream in a macro manner.
[0139] In an embodiment, the real-time data stream scheduling method provided by the present application optimizes the established mathematical model in the following manner: the receiving and sending time of the integrated data stream through the network port is limited within a time range Δt, only the non-conflict constraints of each integrated data stream are added to realize the optimization of the target constraint mathematical model, and then the subsequent solver is used to calculate the solution of the receiving and sending time of each integrated data stream with different periods in Δt on the network port, and the target constraint conditions other than the non-conflict constraints are added to all data streams to optimize the established mathematical model, thereby effectively solving the problem of too many non-conflict constraints in the conventional method.
[0140] Figure 6 FIG. 1 is a schematic diagram of integrated real-time data streams according to an embodiment of the present application.
[0141] AsAs shown, there are three real-time data streams with periods of 2, 3 and 4 respectively, and each short horizontal line represents a set of integrated data streams. By adding non-conflict constraints between the integrated data streams, the solver calculates the maximum sending or receiving time range Δt of each integrated data stream on the network port (for example, each integrated data stream is set to the same Δt), and further adjusts the optimal Δt of each integrated data stream as needed, while calculating the offset of each integrated data stream in the current period, and adding constraints between each real-time data stream in the integrated data stream, calculating the specific sending or receiving time of each real-time data stream within Δt, which is added to the offset to obtain the first sending or receiving time of each real-time data stream in the macro period, and then all the time information in the macro period is calculated.
[0142] Through the integration of data streams, the number of non-conflict constraints in model solving is greatly reduced, O(N 2 ) in which N is reduced from the number of all data streams to the number of data streams with different periods, and the coefficient is reduced from a*b to 1, thereby improving the model solving efficiency and increasing the reliability of the model solving, and avoiding the failure of result calculation due to excessive calculation amount.
[0143] Please continue to refer to Figure 1 , the real-time data stream scheduling method for time-sensitive network provided by the application 100 further comprises:
[0144] Step 104: calculating and solving the mathematical model.
[0145] In an embodiment, the Z3 solver is selected to solve the mathematical model, which can be divided into the following sub-steps.
[0146] Sub-step 1. Create a Solver object:
[0147] Solver(): This method is used to create a Z3 solver object. The specific code example is as follows:
[0148] import z3
[0149] self.solver=z3.Solver()
[0150] Sub-step 2. Define decision variables:
[0151] Int(): Define a decision variable and declare it as an integer.
[0152] In the application, the sending time fi.sendTime of each real-time data stream on different devices is an integer decision variable, and the specific code example is as follows:
[0153] import z3
[0154] self.fi_sendTime = z3.Int("fi_sendTime")
[0155] Sub-step 3. Add various constraints:
[0156] Add() : The input value is the constraint condition that needs to be added. The specific code example is:
[0157] self.solver.add(v1.sendTime == v2.sendTime)
[0158] This example adds a constraint that the sending time of real-time data flow for two network interfaces is the same.
[0159] Or() : Used for logical judgment, and only one of the two conditions needs to be met. The specific code example is:
[0160] self.solver.add(z3.Or(m1.sendTime - m2.sendTime >= src_dev1.minStreamTxGap, m2.sendTime - m1.sendTime >= src_dev1.minStreamTxGap))
[0161] This example adds a constraint that the sending time difference of real-time data flow for two network interfaces is greater than or equal to minStreamTxGap (for example, the forwarding time of device 1 is greater than that of device 2, or vice versa).
[0162] Sub-step 4. Existence solution:
[0163] check() : This function mainly judges whether the constraint problem has a solution. If there is a solution, the return value is sat; otherwise, the return value is unsat; the solver may also be unable to solve the constraint system and return unknown. The specific code example is:
[0164] self.solver.check() == z3.sat
[0165] This example is used to judge whether the solver solution result is a solution.
[0166] model() : This function is a method of the solver object to get the solution result. The specific code example is:
[0167] m = self.solver.model()
[0168] for x in m:
[0169] …
[0170] The example obtains the solution result by model, and analyzes the solution result by using a for loop.
[0171] Sub-step 5. Optimized solution:
[0172] optimize(): similar to solver. The difference is that solver only solves the existence problem of solution, and optimize needs to solve the optimal solution of the constraint problem, and has methods such as add, check, model, etc. as solver. By using this method, the problem of integrating the optimal Δt of data flow can be solved.
[0173] When the model is solved, the result needs to be output.
[0174] Please continue to refer to Figure 1 The real-time data flow scheduling method for a time-sensitive network provided by the application further comprises:
[0175] Step 105: generating a network scheduling table configuration file according to the result of solving the mathematical model.
[0176] In an embodiment, the parameters in the network scheduling table configuration file at least include one or more of a scheduling period, a sending time and a receiving time of a communication service flow on each network port.
[0177] Similar to the network information configuration file, the network scheduling table configuration file is described by using XML, and can include four main nodes of ScheduleCycle, NetworkDevices, StreamLinks and CommunicationTraffics.
[0178] Table 2: Parameters of the network scheduling table configuration file
[0179]
[0180]
[0181]
[0182] Table 2 shows various parameters in the network scheduling table configuration file finally obtained by the real-time data flow scheduling method of the application in detail.
[0183] Figure 7 The flowchart of the real-time data flow scheduling method for a time-sensitive network is shown according to an embodiment of the application.
[0184] As Figure 7As shown, in this embodiment, the real-time data stream scheduling method for time-sensitive networks provided by the present invention first executes step 701: parsing the network information configuration file. The network information configuration file contains two types of constraint parameters, namely those in steps 702 and 704: network topology constraint parameters, such as network interface connections, transmission bandwidth, link transmission delay, switch forwarding delay, synchronization accuracy, etc.; and communication service constraint parameters, such as period, frame length, delay, jitter, source network interface, destination network interface, redundancy, etc.
[0185] Corresponding to the two types of parameters, namely steps 703 and 705, network topology constraint parameter data structures and communication service constraint parameter data structures are generated respectively.
[0186] Then, step 706 is executed: planning the transmission path of the data flow. After the path planning is completed, step 707 is executed: establishing the mathematical model of the target constraints, and step 708 is executed: calculating and solving the established mathematical model based on the scheduling solver.
[0187] Simultaneously, step 709 needs to be executed: optimize the established target constraint mathematical model, for example, in the embodiments of the present invention, reduce the computational load of the model by integrating data streams with the same cycle, thereby obtaining better solution performance and improving solution efficiency and reliability.
[0188] Finally, step 710 is completed: the parameters obtained by optimizing the solution model are used to generate a network scheduling table configuration file. At this point, the real-time data stream scheduling method for time-sensitive networks provided by this invention is complete.
[0189] Although the methods described above are illustrated and depicted as a series of actions for the sake of simplicity, it should be understood and appreciated that these methods are not limited by the order of the actions, as some actions may occur in a different order and / or concurrently with other actions from the illustrations and descriptions herein or not illustrated and described herein but which may be understood by those skilled in the art, according to one or more embodiments.
[0190] According to another aspect of the invention, an embodiment of a real-time data stream scheduling device 800 for time-sensitive networks is also provided herein.
[0191] Figure 8 This is a schematic diagram of the device structure of a real-time data stream scheduling apparatus for time-sensitive networks, as illustrated in another aspect of the present invention.
[0192] like Figure 8 As shown, the real-time data stream scheduling device 800 for time-sensitive networks provided in this embodiment may include a memory 801 and a processor 802 coupled to the memory 801. The processor 802 may be configured to implement any of the above-described real-time data stream scheduling methods for time-sensitive networks.
[0193] According to another aspect of the present application, embodiments of a computer storage medium are also provided herein.
[0194] The computer storage medium stores a computer program. The computer program, when executed by a processor, can implement the steps of any of the real-time data flow scheduling methods for time-sensitive networks described above.
[0195] Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality.
[0196] Whether such functionality is implemented in hardware or software depends on the particular application and design constraints imposed on the overall system. Skilled artisans can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
[0197] The processors described herein can be implemented using electronic hardware, computer software, or any combination thereof. Whether such functionality is implemented in hardware or software depends on the particular application and design constraints imposed on the overall system. As an example, the processors presented in this disclosure, any portion of a processor, or any combination of processors can be implemented with a microprocessor, microcontroller, digital signal processor (DSP), field-programmable gate array (FPGA), programmable logic device (PLD), state machine, gated logic, discrete hardware circuits, and other suitable processing components configured to perform the various functions described throughout this disclosure. The functionality of the processors presented in this disclosure, any portion of a processor, or any combination of processors can be implemented with software executed by a microprocessor, microcontroller, DSP, or other suitable platform.
[0198] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium.
[0199] In alternative embodiments, the storage medium can be integral to the processor. The processor and the storage medium can reside in an ASIC. The ASIC can reside in a user terminal. In alternative embodiments, the processor and the storage medium can reside as discrete components in a user terminal.
[0200] In one or more exemplary embodiments, the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
[0201] By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or
[0202] Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray® disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0203] The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A real-time data stream scheduling method for time-sensitive networks, comprising: Parse the network information configuration file, which includes multiple constraint parameters; Plan the real-time data stream transmission path based on the network topology of the time-sensitive network and the constraint parameters. Based on the transmission path of the real-time data stream and the constraint parameters, target constraints are set to establish a mathematical model, and the mathematical model is optimized by integrating real-time data streams with the same cycle. Calculate and solve the mathematical model; and A network scheduling table configuration file is generated based on the results of solving the mathematical model.
2. The real-time data stream scheduling method as described in claim 1, characterized in that, The optimization of the mathematical model by integrating real-time data streams with the same cycle includes: Integrate real-time data streams with the same period into a single integrated data stream; The time for receiving and sending the integrated data stream through the network port is limited to a time range Δt.
3. The real-time data stream scheduling method as described in claim 2, characterized in that, The target constraints include time-conflict-free constraints, and the optimization of the mathematical model by integrating real-time data streams with the same period further includes: The time-conflict-free constraint is added only to the integrated data stream, while target constraints other than the time-conflict-free constraint are added to all data streams to optimize the established mathematical model.
4. The real-time data stream scheduling method as described in claim 3, characterized in that, The calculation to solve the mathematical model includes: Calculate the solutions for the reception and transmission times of the integrated data stream in each different period on the network interface within the time range Δt.
5. The real-time data stream scheduling method as described in claim 1, characterized in that, The target constraints include: For any dual-redundant real-time data stream, the time difference between transmission and reception at the source and destination devices should satisfy: as well as , Among them, f i This represents the i-th real-time data stream, where Real-time ID is the identifier of the real-time data stream, srcDev is the source device, dstDev is the destination device, and v a The identifier code for the source device, v c This is the identifier code for the destination device, and minStreamTxGap is the minimum data stream transmission interval. Indicates the flow through device v a Data stream f on i sendTime is the sending time, maxTlrRedunTxTimeDiff is the maximum allowed redundant sending time difference, rxStartOffsetInMacroCycle is the receiving start offset time, and rxWindow is the receiving window.
6. The real-time data stream scheduling method as described in claim 5, characterized in that, The target constraint also includes: Ensure that the source devices simultaneously send real-time data streams with the same real-time ID.
7. The real-time data stream scheduling method as described in claim 6, characterized in that, The target constraints also include one or more of the following: The transmit offset time is non-negative, and the receive start offset time, receive window, and transmit offset time are all integer multiples of the minimum schedulable time. Two real-time data streams are not sent simultaneously through the same network port; The same network port can not receive two real-time data streams at the same time, and any two receiving windows do not overlap; The switch receives the real-time data stream and performs buffering before forwarding it; The real-time data stream reception window of the network port is after the data stream link transmission is completed, provided that the network time synchronization accuracy, the maximum transmission delay of the network port, and the maximum reception delay of the network port meet the predetermined conditions. as well as The end-to-end transmission delay of any real-time data stream should be less than the maximum permissible transmission delay, while the network's time synchronization accuracy meets preset conditions.
8. The real-time data stream scheduling method as described in claim 1, characterized in that, The network topology includes star topology, two-line topology and ring topology. The network topology of the time-sensitive network is a combination of one or more of these three topologies. Adjacent switches in the network or adjacent terminal devices and switches adopt dual-receive and dual-transmit redundant data transmission paths.
9. The real-time data stream scheduling method as described in claim 8, characterized in that, The planning of real-time data stream transmission paths based on the network topology of the time-sensitive network includes: When the network topology is a star topology, it includes four terminal devices and two switches. The two switches are located in two planes respectively. The two network ports of each terminal device are connected to the two switches for dual transmission and reception.
10. The real-time data stream scheduling method as described in claim 8, characterized in that, The planning of real-time data stream transmission paths based on the network topology of the time-sensitive network includes: When the network topology is a two-line topology, it includes two terminal devices and multiple switches. The multiple switches are divided into two planes, and the switches in each plane are connected in a linear manner. The two network ports of each terminal device are respectively connected to the switches in the two planes to achieve dual transmission and reception. The two terminal devices are connected to different switches in the same plane.
11. The real-time data stream scheduling method as described in claim 8, characterized in that, The planning of real-time data stream transmission paths based on the network topology of the time-sensitive network includes: When the network topology is a ring topology, it includes two terminal devices and multiple switches. The multiple switches are connected in a ring. Each terminal device has two network ports that are connected to two different switches in the ring topology to achieve dual transmission and reception. The two communication links between any two switches or between a switch and a terminal device through two network ports are the shortest communication paths in the ring topology network that do not overlap.
12. The real-time data stream scheduling method as described in claim 1, characterized in that, The calculation to solve the mathematical model includes: Using the transmission time and reception window time of each real-time data stream on the devices it flows through as solution variables, a scheduling solver is used to determine whether a solution satisfying the target constraints exists; and In response to the existence of a solution that satisfies the target constraint, the optimal solution that satisfies the target constraint is obtained.
13. The real-time data stream scheduling method as described in claim 12, characterized in that, The scheduling solver is the Z3 solver.
14. The real-time data stream scheduling method as described in claim 1, characterized in that, The multiple constraint parameters in the network information configuration file include network topology constraint parameters and communication service constraint parameters. The network topology constraint parameters include at least one or more of the following: network port link, link transmission bandwidth, switch forwarding delay, and time synchronization accuracy. The communication service constraint parameters include at least one or more of the following: communication period, frame length, and source and destination network ports.
15. The real-time data stream scheduling method as described in claim 1, characterized in that, The parameters in the network scheduling table configuration file include at least one or more of the following: scheduling period, transmission time of communication service flow on each network interface, and reception time.
16. A real-time data stream scheduling device for time-sensitive networks, comprising: Memory; as well as A processor coupled to the memory, the processor being configured to perform the steps of the real-time data stream scheduling method for time-sensitive networks as described in any one of claims 1 to 15.
17. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the real-time data stream scheduling method for time-sensitive networks as described in any one of claims 1 to 15.
Citation Information
Patent Citations
Software-defined industrial heterogeneous time-sensitive network system and resource scheduling method
CN112511462A
Traffic scheduling method and device for time-sensitive network
CN113992601A