Data flow scheduling method and system, medium, program product and equipment
By generating time-sensitive networks and establishing target constraint mathematical models, the problem of insufficient scalability and efficiency of data flow scheduling algorithms in the prior art is solved, and fast and efficient data flow scheduling scheme calculation is realized, and stronger scalability is achieved.
Patent Information
- Application Number
- CN202411570765.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2044-11-05
AI Technical Summary
The existing data flow scheduling algorithms have shortcomings in terms of scalability and efficiency, and it is difficult to quickly and efficiently output scheduling solutions that meet the needs of complex systems.
By obtaining network information configuration files, generating a time-sensitive network, planning the transmission path under a linear topology, establishing a mathematical model of target constraints, and analyzing the model to obtain a scheduling scheme, and realizing data flow scheduling.
This method can quickly and efficiently calculate the data flow scheduling scheme that meets application requirements while retaining low jitter and low latency, and has stronger scalability.
Smart Images

Figure CN120186025A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technologies, and in particular, to a data flow scheduling method, system, medium, program product, and device. Background Art
[0002] In recent years, the rapid development of communication technologies has completely transformed all walks of life, making it possible to develop complex systems with demanding real-time requirements. From industrial automation, vehicular communication, and avionics to multimedia data streaming and telecommunication networks, there is an increasing demand for reliable and deterministic communication to ensure the timely delivery of critical data. In particular, a core feature of the Industry 4.0 paradigm is networked cyber-physical systems, where physical processes are controlled by computers. A real-time communication network with deterministic bounded network latency and jitter is usually required to ensure the controlled operation of physical systems.
[0003] Determining whether there is an effective schedule for a set of data flows is a very difficult combinatorial optimization problem: even when limited to various special classes of instances, it is NP-hard. Current scheduling algorithms can be divided into exact methods and heuristic methods. Representing the scheduling problem as a Satisfiability Modulo Theories (SMT) problem, an Integer Linear Programming (ILP) problem, or a Constraint Programming (CP) problem, etc., and then calling the corresponding solver to find the optimal solution, but they cannot scale beyond very small problem instances. In addition to exact methods, many heuristic algorithms have been developed in an attempt to find reasonably good schedules in a short time, such as algorithms based on tabu search or simulated annealing. However, heuristic methods cannot infer whether a problem instance is infeasible, nor can they guarantee finding a solution (if one exists). In short, existing scheduling algorithms are either poorly scalable or suboptimal. Summary of the Invention
[0004] The purpose of the present application is to provide a data flow scheduling method, system, medium, program product, and device that can quickly and efficiently output a data flow scheduling scheme.
[0005] To solve the above technical problems, the present application provides a data flow scheduling method, and the specific technical solution is as follows:
[0006] Obtain a network information configuration file; the network information configuration file includes several hierarchical network nodes;
[0007] Generate a time-sensitive network corresponding to the network information configuration file; the time-sensitive network is used to describe the transmission spatio-temporal progress of the data flow;
[0008] Plan a transmission path under a linear topology according to the time-sensitive network;
[0009] Establish a target constraint mathematical model based on the transmission path;
[0010] Analyze the target constraint mathematical model to obtain a scheduling plan, and apply the scheduling plan to perform data flow scheduling.
[0011] Optionally, before obtaining the network information configuration file, it further includes:
[0012] Determine the node architecture; the node architecture includes a first-level node for algorithm operation and a first-level node for network topology and communication services; the first-level node for algorithm operation and the network topology and the communication service first-level node include several sub-level nodes;
[0013] Generate a network information configuration file based on the node architecture using Extensible Markup Language.
[0014] Optionally, generating a time-sensitive network corresponding to the network information configuration file includes:
[0015] Read the packet sending time, link transmission delay, packet receiving time, switch-assisted data flow time, and closing delay between network nodes of each level in the network information configuration file;
[0016] Generate a time-sensitive network according to the packet sending time, the link transmission delay, the packet receiving time, the switch-assisted data flow time, and the closing delay.
[0017] Optionally, establishing a target constraint mathematical model based on the transmission path includes:
[0018] Set the model establishment conditions;
[0019] Under the model establishment conditions, connect all switches in the order of data flow using a daisy-chain topology;
[0020] For each switch in the daisy-chain topology, determine its left exit port and right exit port;
[0021] For any data flow belonging to the data flow set to be scheduled, determine the period of the data flow;
[0022] Assume that each terminal device can only send or receive one data flow at the same time. Treat each data flow as an edge in graph theory, and treat the switch and the terminal device as vertices in the graph;
[0023] The target constraint mathematical model is to find the minimum number of time slots such that all data flows can be transmitted within the minimum number of time slots without conflicts; among them, for each data flow, enough time slots need to be allocated within its corresponding period to satisfy the transmission.
[0024] Optionally, analyzing the target constraint mathematical model to obtain a scheduling plan includes:
[0025] Determine the analytical objective of the target constraint mathematical model, where the analytical objective is to calculate a wait-free schedule for the data flow set and the daisy-chain topology structure;
[0026] Call an analytical algorithm to solve the analytical objective and output a scheduling scheme.
[0027] Optionally, calling an analytical algorithm to solve the analytical objective and outputting a scheduling scheme includes:
[0028] Calculate the binary logarithm of the maximum value of the periods of all data flows.
[0029] Calculate the data traffic load index of the ports of each switch; the data traffic load index is used to measure the number of data flows passing through the port;
[0030] If the load of a specific switch port exceeds the port capacity, return that there is no wait-free schedule;
[0031] If the load of all ports does not exceed the corresponding port capacity, call a recursive program for scheduling calculation and output a scheduling scheme.
[0032] Optionally, the calculating the data traffic load index of the ports of each switch includes:
[0033] Calculate the weight of each data flow passing through the port and accumulate the data flows with different periods to obtain the data traffic load index of each switch port.
[0034] Optionally, calling a recursive program for scheduling calculation and outputting a scheduling scheme includes:
[0035] If the data flow set is empty, return an empty scheduling result;
[0036] If the periods of all data flows are the same, allocate a unique time period for each data flow; the unique time period is used to ensure that there are no conflicts among the data flows in the scheduling;
[0037] When the data flows have different periods, divide the current data flow set into two subsets according to the load of the switch ports and readjust the periods of the data flows in these two subsets;
[0038] Recursively call respectively to continue to find scheduling schemes for these two subsets;
[0039] After recursively calculating the scheduling results of the two subsets, merge the scheduling results as the scheduling scheme of the data flow set;
[0040] Output a dictionary structure containing the scheduling scheme, where the dictionary structure contains the scheduling time points assigned to each data stream, and all the scheduling time points and the corresponding data streams are used as the scheduling scheme.
[0041] Optionally, assigning a unique time period to each data stream includes:
[0042] First step: Represent each data stream as a node in the greedy graph coloring algorithm;
[0043] Second step: Initialize the colors of all vertices as uncolored;
[0044] Third step: Traverse all vertices. For each uncolored target vertex, select the smallest color not used by any adjacent vertices and assign it to the target vertex;
[0045] Fourth step: If no available color can be found, it indicates a conflict and a unique time period cannot be assigned;
[0046] Fifth step: Repeat the third and fourth steps until all vertices are colored, and determine the unique time period according to the colors.
[0047] Optionally, when dividing the current data stream set into two subsets according to the load of the switch ports, it further includes:
[0048] Construct a linear programming problem; the linear programming problem is used to balance the loads of different switch ports;
[0049] Based on the linear programming problem, solve the data flow division corresponding to each switch port.
[0050] Optionally, applying the scheduling scheme to execute data stream scheduling includes:
[0051] Generate a network scheduling table configuration file corresponding to the scheduling scheme; the network scheduling table configuration file includes the algorithm operation first-level node and the train time-sensitive network subnet first-level node;
[0052] Based on the network scheduling table configuration file, execute data stream scheduling.
[0053] Optionally, generating the network scheduling table configuration file corresponding to the scheduling scheme includes:
[0054] Determine the algorithm operation second-level nodes managed by the algorithm operation first-level node; the algorithm operation second-level nodes include the scheduling algorithm solution strategy, the maximum allowable transmission delay of the data stream end-to-end, the maximum allowable transmission jitter of the data stream end-to-end, the delay of a single door opening, the maximum acceptable scheduling type data stream bandwidth occupancy ratio, and the auxiliary data stream time when the data frame passes through the switch;
[0055] Determine the train time-sensitive network secondary nodes, train time-sensitive network tertiary nodes, train time-sensitive network quaternary nodes, and train time-sensitive network quinary nodes managed by the primary nodes of the train time-sensitive network subnet. The train time-sensitive network secondary nodes include the time schedule secondary nodes on the network ports of each switch and the time schedule secondary nodes on the network ports of each terminal device; the time schedule secondary nodes on the network ports of each switch include the total number of time-sensitive network switches in the subnet and the time schedule tertiary nodes of a single switch network port; the time schedule tertiary nodes of a single switch network port contain the time schedule quaternary nodes of a single network port on a single switch; the time schedule quaternary nodes of a single network port on a single switch contain at least a single scheduling quinary node of a single network port on a single switch.
[0056] This application also provides a data flow scheduling system, including:
[0057] A file acquisition module for acquiring a network information configuration file; the network information configuration file includes several levels of network nodes;
[0058] A time-sensitive network generation module for generating a time-sensitive network corresponding to the network information configuration file; the time-sensitive network is used to describe the transmission spatio-temporal progress of the data flow;
[0059] A path planning module for planning a transmission path under a linear topology according to the time-sensitive network;
[0060] A model establishment module for establishing a target constraint mathematical model based on the transmission path;
[0061] A solution output module for parsing the target constraint mathematical model to obtain a scheduling solution and applying the scheduling solution to execute data flow scheduling.
[0062] This application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described above are implemented.
[0063] This application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps of the method described above are implemented.
[0064] This application also provides a computer program product, including a computer program, and when the computer program is executed, the steps of the data flow scheduling method described above are implemented.
[0065] The present application provides a data flow scheduling method, including: obtaining a network information configuration file; the network information configuration file includes several hierarchical network nodes; generating a time-sensitive network corresponding to the network information configuration file; the time-sensitive network is used to describe the transmission spatio-temporal progress of the data flow; planning a transmission path under a linear topology according to the time-sensitive network; establishing a target constraint mathematical model based on the transmission path; parsing the target constraint mathematical model to obtain a scheduling scheme, and applying the scheduling scheme to execute data flow scheduling.
[0066] In view of the scenario where there are a large number of data flows with diverse periods and frame lengths, the present application uses a time-sensitive network for data flow scheduling, which can clearly describe the transmission status of each data flow, and thus convert it into a target constraint mathematical model. On the basis of retaining the low jitter and low latency characteristics of the time-sensitive network, it can quickly and efficiently calculate results that meet the application requirements, and has stronger scalability.
[0067] The present application also provides a data flow scheduling system, a computer-readable storage medium, a computer program product, and an electronic device, which have the above beneficial effects and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0069] Figure 1 It is a flowchart of a data flow scheduling method provided by an embodiment of the present application;
[0070] Figure 2 It is a schematic diagram of data flow transmission of a time-sensitive network provided by an embodiment of the present application;
[0071] Figure 3 It is a schematic diagram of a series topology structure provided by an embodiment of the present application;
[0072] Figure 4 It is a schematic diagram of a data flow set provided by an embodiment of the present application;
[0073] Figure 5 It is a schematic diagram of a routing path in the data flow set provided by an embodiment of the present application;
[0074] Figure 6 It is a schematic diagram of a first undirected graph provided by an embodiment of the present application;
[0075] Figure 7Schematic diagram of the second undirected graph provided by the embodiments of the present application;
[0076] Figure 8 Gantt chart describing wait-free scheduling provided by the embodiments of the present application;
[0077] Figure 9 Gantt chart corresponding to each data stream in the data stream set provided by the embodiments of the present application;
[0078] Figure 10 Schematic diagram of the structure of a data stream scheduling system provided by the embodiments of the present application;
[0079] Figure 11 Structural diagram of the electronic device provided by the embodiments of the present application. Specific embodiments
[0080] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0081] The object information involved in the present application, including but not limited to object device information, object personal information, etc., and data, including but not limited to data for analysis, stored data, displayed data, etc., are all information and data authorized by the object or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the laws, regulations, and standards of relevant countries and regions.
[0082] See Figure 1 , Figure 1 Data flow diagram of a data stream scheduling method provided by the embodiments of the present application. The method includes:
[0083] S101: Obtain a network information configuration file; the network information configuration file includes several hierarchical network nodes;
[0084] S102: Generate a time-sensitive network corresponding to the network information configuration file; the time-sensitive network is used to describe the transmission spatio-temporal progress of the data stream;
[0085] S103: Plan a transmission path under a linear topology according to the time-sensitive network;
[0086] S104: Establish a target constraint mathematical model based on the transmission path;
[0087] S105: Analyze the target constraint mathematical model to obtain a scheduling plan, and execute data flow scheduling by applying the scheduling plan.
[0088] First, obtain a network information configuration file, which is used to describe the relevant information of the network environment for data flow scheduling. Here, there is no limitation on how to generate the network information configuration file. In a feasible implementation, the node architecture can be determined first, and the network information configuration file can be generated based on the node architecture by using Extensible Markup Language (XML). The node architecture includes a first-level node for algorithm operation and a first-level node for network topology and communication services. The first-level node for algorithm operation and the first-level nodes for network topology and communication services include several sub-level nodes.
[0089] An exemplary structure and content of the network information configuration file can be as follows:
[0090] The network information configuration file is described in Extensible Markup Language (XML) and includes two first-level nodes: a first-level node for algorithm operation (hereinafter represented by Algorithm) and a first-level node for communication services (hereinafter represented by SubNetwork).
[0091] A. The Algorithm first-level node contains:
[0092] (1) The scheduleStrategy attribute, that is, the scheduling algorithm solution strategy.
[0093] (2) The maxTlrTransDelay attribute, which is the maximum allowable transmission delay of the data flow from end to end.
[0094] (3) The maxTlrTransJitter attribute, which is the maximum allowable transmission jitter of the data flow from end to end.
[0095] (4) The gateDurationDelay attribute, which is the delay for a single door opening.
[0096] (5) The maxPercentOfSch attribute, which is the maximum acceptable bandwidth occupancy ratio of the schedulable data flow.
[0097] (6) The CTLatency attribute, which is the assisting flow time when the data frame passes through the switch.
[0098] B. The SubNetwork first-level node contains:
[0099] (1) The type attribute, which is the type of the subnet.
[0100] (2) The serialNumber attribute, which is the number of the subnet.
[0101] (3) Four types of secondary nodes: each switch, each end device, each communication link, and each data flow.
[0102] The Switches secondary node contains:
[0103] (1) The switchNumber attribute, which is the total number of switches in the subnet.
[0104] (2) The three - level node of a single switch (Switch).
[0105] The Switch three - level node contains:
[0106] (1) The type attribute, which is the type of the switch.
[0107] (2) The mane attribute, which is the name of the switch.
[0108] (3) The idendity attribute, which is the identification code of the switch.
[0109] (4) The plane attribute, which is the communication plane where the switch is located.
[0110] (5) portNumbere, which is the number of ports of the switch.
[0111] (6) The four - level node of the port (Port) of a single switch.
[0112] The Port four - level node contains:
[0113] (1) The identity attribute, which is the identification code of the port.
[0114] (2) The transBandwidth attribute, which is the transmission bandwidth of the port.
[0115] (3) The media attribute, which is the port medium.
[0116] The EndDevices secondary node contains:
[0117] (1) The endDeviceNumber attribute, which is the total number of end devices in the subnet.
[0118] (2) The three - level node of a single end device (EndDevice).
[0119] The EndDevice three - level node contains:
[0120] (1) The type attribute, which is the type of the subnet.
[0121] (2) name attribute, which is the name of the terminal device.
[0122] (3) identity attribute, which is the identification code of the terminal device.
[0123] (4) portNumber attribute, which is the number of ports of the terminal device.
[0124] (5) The fourth-level node of the port of a single terminal device.
[0125] The fourth-level Port node contains:
[0126] (1) identity attribute, which is the identification code of the port.
[0127] (2) transBandwidth attribute, which is the transmission bandwidth of the port.
[0128] (3) media attribute, which is the port medium.
[0129] The second-level Links node contains:
[0130] (1) linkNumber attribute, which is the number of communication links.
[0131] (2) The third-level node of a single communication link (Link).
[0132] The third-level Link node contains:
[0133] (1) name attribute, which is the name of the communication link.
[0134] (2) identity attribute, which is the identification code of the communication link.
[0135] (3) port attribute, which is the port to which both ends of the communication link are connected.
[0136] (4) media attribute, which is the link medium.
[0137] The second-level Flows node contains:
[0138] (1) flowNumber attribute, which is the number of service data flows.
[0139] (2) The third-level node of a single multicast group (Group), which contains two types of fourth-level nodes: single multicast group ports (GroupPorts) and periodic data flows of a single multicast group (GroupFlows).
[0140] The fourth-level GroupPorts node contains:
[0141] (1) portNumber attribute, which is the number of ports in the multicast group.
[0142] (2) Single port level-5 node of a single multicast group.
[0143] The Port level-5 node includes:
[0144] (1) value attribute, port attribute.
[0145] The GroupFlows level-4 node includes:
[0146] (1) flowNumber attribute, the number of periodic data flows in the multicast group.
[0147] (2) Single periodic data flow (Flow) level-5 node of a single multicast group.
[0148] The Flow level-5 node includes:
[0149] (1) identity attribute, the identification code of the data flow.
[0150] (2) schPriority attribute, the scheduling priority of the data flow.
[0151] (3) cycle attribute, the communication cycle of the data flow.
[0152] (4) vldLength attribute, the valid frame length of the data flow.
[0153] Thereafter, a time-sensitive network needs to be generated. The packet sending time, link transmission delay, packet receiving time, switch assist data flow time, and closing delay between network nodes of each level in the network information configuration file can be configured according to the read information, and a time-sensitive network can be generated accordingly. Specifically, the spatial relationship of network nodes of each level in the network information configuration file, that is, the superior-subordinate relationship, can be shown in the horizontal axis, i.e., the spatial axis, of the time-sensitive network, and the communication processes of network nodes of each level can be shown in the vertical axis, i.e., the time axis, in chronological order.
[0154] See Figure 2 , Figure 2 which is the data flow transmission schematic diagram of the time-sensitive network provided by the embodiment of the present application. When the time-sensitive network is actually used, considering its high efficiency and reliability for the data flow carrying function, the network topology construction will not be too complex. Therefore, the present application mainly considers the path planning of data flows under a linear topology structure. Thereafter, a target constraint mathematical model is constructed.
[0155] First, set the model establishment conditions. Assume that for all flows and all switches, the time for a switch to forward a flow (i.e., the time from when the switch receives the first bit of the flow to when the next node receives the first bit) is the same and is set to 1 unit of time. The forwarding time consists of the transmission time and several types of delays, namely, the propagation delay of the signal along the link, the processing delay for determining the port to forward the incoming packet, and the queuing delay of the packet in the outgoing port queue (which is zero in a no-wait schedule). The forwarding time intervals of two flows on the same egress port can overlap slightly, but the transmission time intervals must not overlap, otherwise their electrical signals will interfere. Here, the model establishment conditions can stipulate that the forwarding time intervals of two flows on the same egress port must not overlap. The assumption of the same forwarding time is reasonable because the forwarding time is mainly determined by the encapsulation size and link bandwidth. In an actual time-sensitive network, the encapsulation size and bandwidth of the link are usually similar.
[0156] Under the above model establishment conditions, connect all switches in sequence according to the data flow order using a daisy-chain topology;
[0157] For each switch in the daisy-chain topology, determine its left egress port and right egress port;
[0158] For any data flow belonging to the set of data flows to be scheduled, determine the period of the data flow;
[0159] Assume that each terminal device can only send or receive one data flow at a time. Treat each data flow as an edge in graph theory and treat the switches and the terminal devices as vertices in the graph;
[0160] The target constraint mathematical model is to find the minimum number of time slots such that all data flows can be transmitted within the minimum number of time slots without conflicts; among them, for each data flow, enough time slots need to be allocated within its corresponding period to satisfy the transmission.
[0161] See Figure 3 , Figure 3 which is the schematic diagram of the series topology provided by the embodiment of the present application. Figure 3 In it, solid circles represent switches and hollow circles represent terminal stations.
[0162] For two integers a ≤ b, define [a, b] := {a, a + 1 ···, b}. As a shorthand, denote [1, n] = {1, 2, ···, n} as [n]. Figure 3 shows the daisy-chain topology. In Figure 3 , there are n switches connected in sequence and named SW1, SW2, ···, SW n from left to right. Use to represent The right exit port, which sends data from to SW i+1 , and uses to represent The left exit port, which sends data from to . Let E[i] represent the terminal devices directly connected to . For example, in Figure 3 , E[1] = {ED1, ED2}, E[2] = {ED3, ED4, ED5}. Use S to represent the set of data streams to be scheduled. See Figure 4 and Figure 5 , Figure 4 is a schematic diagram of the data stream set provided by the embodiment of the present application, Figure 5 is a schematic diagram of the routing path in the data stream set provided by the embodiment of the present application.
[0163] For the data stream s in the data stream set S, use p s N to represent the period of the data stream s (i.e., the period of the data stream s is p s unit times), and define a s , b s [n] as sending the data stream s from the terminal station in to another terminal station in . Focus on the stream in . According to whether it is , divide S into two groups:
[0164] (i) One group consists of all the streams s from right to left in S, that is, ;
[0165] (ii) The other group consists of all the reverse streams s in S, that is, .
[0166] The transmissions of the two groups involve different exit ports, so they can be scheduled separately. Therefore, for the convenience of demonstration, assume that for any s in the data stream set S, there is . It should be noted that the data stream s will pass through the exit port in sequence.
[0167] Let p S represent the hyperperiod of the data stream set S, which is defined as the least common multiple LCM ( ) of the stream periods in the data stream set S. The wait-free scheduling is based on the hyperperiod Execute periodically as its period. The scheduling of S includes copies of s, each copy with a hyper-period as the period.
[0168] At this time, the wait-free scheduling problem can be recast as a graph coloring problem. For each data flow s S, associate it with the interval In addition, associate S with the first undirected graph G S This G S :
[0169] (i) Create a vertex v for each flow s s;
[0170] (ii) Add an edge (v , v s , v s ’) if and only if
[0171] A useful observation is that the first undirected graph G S is an interval graph. In addition, associate S with the second undirected graph This :
[0172] (i) Create for each flow vertices ;
[0173] (ii) Add an edge if and only if In other words,
[0174] is obtained from G by replicating each v s times. Note that is also an interval graph. For examples of G S and , see S and , Figure 6 and Figure 7 Figure 6 is a schematic diagram of the first undirected graph provided by the embodiment of this application, Figure 7 is a schematic diagram of the second undirected graph provided by the embodiment of this application.
[0175] See Figure 8 Figure 8 A Gantt chart for describing wait - free scheduling provided by an embodiment of the present application. Wait - free scheduling can be graphically described using a Gantt chart. Specifically, in the Gantt chart, the horizontal axis corresponds to time and is divided into a series of bars each of 1 unit of time. Here, 1 unit of time is the time for the switch to forward a flow. The vertical axis corresponds to n - 1 output ports . Flow s corresponds to horizontal bars, each bar lasting 1 unit of time and gradually descending from left to right. See Figure 9 , Figure 9 a Gantt chart corresponding to each data flow in the data flow concentration provided by an embodiment of the present application. The "wait - free" restriction corresponds to the end time of the previous bar also being the start time of the next bar.
[0176] The Gantt chart can be regarded as a dimensional table. The table is divided into parallelograms: each parallelogram contains p S layers, and each layer is defined as a descending staircase. At this time, the bar charts of a data flow are all contained in the same layer. Therefore, wait - free scheduling is equivalent to loading a given set of downward - shaped bar charts (such as the "bricks" in Figure 9 ) into a parallelogram, where the restriction is that for all s and , there is a replication of s between the th layer and the th layer. For example, Figure 8 successfully loads the "bricks" in Figure 9 into a parallelogram, so there is a wait - free scheduling.
[0177] Based on the Gantt chart description, wait - free scheduling can be reformulated as a variant of the graph - coloring problem, where some restrictions are imposed on the available colors for each vertex. Specifically, a proper q - coloring of graph is a function such that no two adjacent vertices share the same color, that is, for any , there is .
[0178] For a proper p - coloring of the second undirected graph S , if for all and all , there is , it is called good. Assume that the second undirected graph allows a good p S - coloring C. Then, a wait - free scheduling can be obtained by placing the i - th replication of s in the th layer of the parallelogram.
[0179] On the other hand, assume that the data flow set S allows a wait-free schedule. Then, a good p can be obtained by setting the number of the layer that contains the i-th copy of the data flow s S coloring. To summarize, the following conclusion can be drawn:
[0180] There exists a wait-free schedule for the data flow set S if and only if there exists a good p coloring of the first undirected graph S Moreover, a wait-free schedule can be obtained from a good p S coloring.
[0181] After constructing the above-mentioned objective constraint mathematical model, the objective constraint mathematical model can be parsed to obtain a scheduling scheme, and the data flow scheduling can be performed by applying the scheduling scheme.
[0182] In a preferred manner, the following steps may be included:
[0183] The first step: Calculate the binary logarithm of the maximum value of the periods of all data flows.
[0184] The second step: Calculate the data traffic load index of the ports of each switch; the data traffic load index is used to measure the number of data flows passing through the port;
[0185] The third step: If the load of a specific switch port exceeds the port capacity, return that there is no wait-free schedule;
[0186] The fourth step: If the loads of all ports do not exceed the corresponding port capacities, call a recursive program to perform scheduling calculations and output a scheduling scheme.
[0187] Among them, the third step and the fourth step are in a parallel conditional judgment relationship. The scheduling calculated using this algorithm is compared with the scheduling generated by the SAT Modulo Theory (SMT) solver, which can accurately solve the SMT formula of the corresponding problem. The SMT solver only returns a wait-free schedule when Algorithm 1 returns a wait-free schedule. In addition, the average execution time of the SMT solver on these instances is about 3 minutes, while the above-mentioned algorithm can solve the instances in an average of 2 seconds and has strong scalability.
[0188] The complete algorithm implementation process is as follows:
[0189] Input: A data flow set that contains multiple flows, and each flow has information such as its source, destination, and transmission period.
[0190] A daisy-chain topology (linear topology) network, in which the switches are connected in sequence, and the end devices are located at both ends of the switches.
[0191] Goal: Calculate a wait - free schedule for a given set of networks and data flows (i.e., data flows do not queue and wait at any switch), and output a scheduling scheme within a finite time if it exists.
[0192] Main steps:
[0193] Step 1. Calculate the logarithm of the maximum period: Calculate the binary logarithm of the maximum value among the periods of all data flows.
[0194] Step 2. Traverse each switch port: Calculate a traffic load metric for each port of each switch to measure the number of data flows passing through that port. This is achieved by calculating the weight of each data flow passing through the port and accumulating data flows with different periods.
[0195] Step 3. Check if the load exceeds the capacity: If it is found that the load of a certain switch port exceeds its capacity, return "There is no wait - free schedule".
[0196] Step 4. Call the Find subroutine: If the loads of all ports do not exceed the capacity limit, call the subroutine in Algorithm 2 for actual scheduling calculation.
[0197] The algorithm implementation process of the Find subroutine is as follows:
[0198] Input:
[0199] A set of data flows and the logarithm of the maximum period.
[0200] Goal:
[0201] Recursively find a suitable wait - free scheduling scheme according to the current period information and topology.
[0202] Specific steps may include:
[0203] Step 1. Check the empty data flow set: If the input data flow set is empty, directly return an empty scheduling result (i.e., there are no flows to schedule).
[0204] Step 2. Handle the case when all flow periods are the same: If the periods of all data flows are the same, then directly assign a unique time period to each flow to ensure that they do not conflict in the schedule. This can be achieved through a greedy graph coloring algorithm because in this case, the problem has been reduced to a classic interval graph coloring problem, which can be solved in linear time.
[0205] Step 3. Process data streams with different periods: When the data streams have different periods, divide the current data stream set into two subsets according to the load of the switch ports, and readjust the periods of the streams in these two subsets. Recursively call separately to continue finding scheduling schemes for these two subsets.
[0206] Step 4. Recursively merge results: After recursively calculating the scheduling results of the two subsets, merge them into the scheduling scheme of the entire stream set. To ensure the correctness of the non-waiting scheduling, appropriate time periods need to be allocated for multiple periodic transmissions of each data stream.
[0207] Step 5. Solve by linear programming: During the process of dividing subsets, a linear programming problem will be constructed to balance the loads of different switch ports to ensure that a suitable scheduling scheme can be found. Specifically, use linear programming to solve the traffic division on the ports so that the load of each port is within an acceptable range.
[0208] Output: Return a dictionary structure that assigns a specific scheduling time point to each data stream, forming the final non-waiting scheduling scheme.
[0209] The following describes how to use the greedy graph coloring algorithm to allocate unique time periods:
[0210] The first step: Represent each data stream as a node in the greedy graph coloring algorithm;
[0211] The second step: Initialize the colors of all vertices as uncolored;
[0212] The third step: Traverse all vertices. For each uncolored target vertex, select the smallest color not used by any adjacent vertices and assign it to the target vertex;
[0213] The fourth step: If no available color can be found, it indicates that there is a conflict and a unique time period cannot be allocated;
[0214] The fifth step: Repeat the third step and the fourth step until all vertices are colored, and determine the unique time period according to the colors of the coloring.
[0215] In addition, when performing data stream scheduling, a network scheduling table configuration file corresponding to the scheduling scheme can be generated, and thus data stream scheduling can be performed based on the network scheduling table configuration file. The network scheduling table configuration file includes the algorithm operation first-level node and the train time-sensitive network subnet first-level node.
[0216] Specifically, the algorithm operation secondary nodes managed by the algorithm operation primary node can be determined; the algorithm operation secondary nodes include a scheduling algorithm solution strategy, the maximum transmission delay allowed for the end-to-end data stream, the maximum transmission jitter allowed for the end-to-end data stream, the delay for a single door opening, the maximum acceptable bandwidth occupancy ratio of the schedulable data stream, and the assist data stream time when the data frame passes through the switch.
[0217] Determine the train time-sensitive network secondary nodes, train time-sensitive network tertiary nodes, train time-sensitive network quaternary nodes, and train time-sensitive network quinary nodes managed by the train time-sensitive network subnet primary node. The train time-sensitive network secondary nodes include the time scheduling table secondary nodes on the upper network ports of each switch and the time scheduling table secondary nodes on the upper network ports of each terminal device; the time scheduling table secondary nodes on the upper network ports of each switch include the total number of time-sensitive network switches in the subnet and the time scheduling table tertiary nodes of a single switch's upper network port; the time scheduling table tertiary nodes of a single switch's upper network port contain the time scheduling table quaternary nodes of a single network port on a single switch; the time scheduling table quaternary nodes of a single network port on a single switch contain at least a single scheduling quinary node of a single network port on a single switch.
[0218] The following is the structure and content of an exemplary network scheduling table configuration file:
[0219] The network scheduling table configuration file is also described in XML, including two primary nodes: the algorithm operation primary node (hereinafter referred to as Algorithm) and the train time-sensitive network subnet primary node (hereinafter referred to as SubNetwork).
[0220] A. Algorithm node:
[0221] (1) scheduleStrategy attribute, the scheduling algorithm solution strategy;
[0222] (2) maxTlrTransDelay attribute, the maximum transmission delay allowed for the end-to-end data stream;
[0223] (3) maxTlrTransJitter attribute, the maximum transmission jitter allowed for the end-to-end data stream;
[0224] (4) gateDurationDelay attribute, the delay for a single door opening;
[0225] (5) maxPercentOfSch attribute, the maximum acceptable bandwidth occupancy ratio of the schedulable data stream;
[0226] (6) CTLatency attribute, the assist stream time when the data frame passes through the switch.
[0227] B. SubNetwork Node:
[0228] (1) type attribute, the type of the subnet;
[0229] (2) serialNumber attribute, the serial number of the subnet;
[0230] (3) Time scheduling table (Switches) secondary node on each network port of each switch;
[0231] (4) Time scheduling table (EndDevice) secondary node on each network port of each terminal device;
[0232] The Switches secondary node includes:
[0233] (1) switchNumber attribute, the total number of time-sensitive network switches in the subnet;
[0234] (2) Time scheduling table (Switch) tertiary node on each network port of a single switch.
[0235] The Switch tertiary node contains:
[0236] (1) name attribute, the name of the switch;
[0237] (2) identity attribute, the identification code of the switch;
[0238] (3) Time scheduling table (Port) quaternary node on a single network port of a single switch.
[0239] The Port quaternary node contains:
[0240] (1) identity attribute, the identification code of the data transmission port of the time-sensitive network switch;
[0241] (2) operCycleTime attribute, the macro cycle of port scheduling;
[0242] (3) operControlListLength attribute, the number of entries in the time scheduling table;
[0243] (4) operBaseTime attribute, the moment to start executing the scheduling table;
[0244] (5) Single scheduling (Entry) quinary node on a single network port of a single switch.
[0245] The Entry quinary node contains:
[0246] (1) The timeIntervalValue attribute, which is the duration for which this table entry is executed;
[0247] (2) The gateStatesValue attribute, which is the gating operation sequence in this table entry.
[0248] The EndDevices secondary node contains:
[0249] (1) The endDeviceNumber attribute, which is the total number of time-sensitive network end devices in the subnet;
[0250] (2) The time schedule table (EndDevice) tertiary node on each network interface of a single end device.
[0251] The EndDevice tertiary node contains:
[0252] (1) The name attribute, which is the name of the end device;
[0253] (2) The identity attribute, which is the identification code of the end device;
[0254] (3) The time schedule table (Port) quaternary node on a single port of a single end device.
[0255] The Port quaternary node contains:
[0256] (1) The identity attribute, which is the identification code of the network interface;
[0257] (2) The operCycleTime attribute, which is the macro cycle of the network interface;
[0258] (3) The operControlListLength attribute, which is the number of entries in the time schedule table;
[0259] (4) The operBaseTime attribute, which is the moment to start executing the schedule table;
[0260] (5) The single schedule (Entry) quinary node on a single network interface of a single end device.
[0261] The Entry quinary node contains:
[0262] (1) The timeIntervalValue attribute, which is the duration for which this table entry is executed;
[0263] (2) The gateStatesValue attribute, which is the gating operation sequence in this table entry.
[0264] In this embodiment, for the scenario where there are numerous data streams with diverse periods and frame lengths, a time-sensitive network is adopted for data stream scheduling, which can clearly describe the transmission status of each data stream, thereby converting it into a target constraint mathematical model. On the basis of retaining the low jitter and low latency characteristics of the time-sensitive network, it can quickly and efficiently calculate the results that meet the application requirements and has stronger scalability.
[0265] See Figure 11 , Figure 11 which is a schematic structural diagram of a data stream scheduling system provided by an embodiment of the present application. The system includes:
[0266] A file acquisition module for acquiring a network information configuration file; the network information configuration file includes several levels of network nodes;
[0267] A time-sensitive network generation module for generating a time-sensitive network corresponding to the network information configuration file; the time-sensitive network is used to describe the transmission spatio-temporal progress of the data stream;
[0268] A path planning module for planning a transmission path under a linear topology according to the time-sensitive network;
[0269] A model establishment module for establishing a target constraint mathematical model based on the transmission path;
[0270] A solution output module for parsing the target constraint mathematical model to obtain a scheduling solution and applying the scheduling solution to perform data stream scheduling.
[0271] The present application also provides a computer-readable storage medium with a computer program stored thereon. When the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.
[0272] The present application also provides a computer program product including a computer program. When the computer program is executed, the steps of the data stream scheduling method described above are implemented.
[0273] The present application also provides an electronic device. See Figure 11 , a structural diagram of an electronic device provided by an embodiment of the present application. As shown in Figure 11 , it may include a processor 1410 and a memory 1420.
[0274] Among them, the processor 1410 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1410 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1410 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1410 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1410 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0275] The memory 1420 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 1420 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory 1420 is at least used to store the following computer program 1421. After the computer program is loaded and executed by the processor 1410, it can implement the relevant steps in the method executed by the electronic device side disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 1420 may further include an operating system 1422 and data 1423, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 1422 may include Windows, Linux, Android, etc.
[0276] In some embodiments, the electronic device may further include a display screen 1430, an input / output interface 1440, a communication interface 1450, a sensor 1460, a power supply 1470, and a communication bus 1480.
[0277] Of course, Figure 11 The structure of the illustrated electronic device does not constitute a limitation on the electronic device in the embodiments of the present application. In practical applications, the electronic device may include more or fewer components than Figure 11 shown, or combine certain components.
[0278] The various embodiments in the specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the system provided in the embodiment, since it corresponds to the method provided in the embodiment, the description is relatively simple. For the relevant parts, reference can be made to the description in the method section.
[0279] Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
[0280] It should also be noted that in this specification, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or device including the said element.
Claims
1. A data stream scheduling method, characterized in that: include: Obtaining a network information configuration file; the network information configuration file includes a plurality of hierarchical network nodes; Generate a time-sensitive network corresponding to the network information configuration file; The time-sensitive network is used to describe the spatiotemporal progress of data flow transmission; Planning a transmission path under a linear topology structure according to the time-sensitive network; Establishing a target constraint mathematical model based on the transmission path; The target constraint mathematical model is parsed to obtain a scheduling scheme, and the scheduling scheme is applied to perform data flow scheduling.
2. The data flow scheduling method according to claim 1, characterized in that: Before obtaining the network information configuration file, it also includes: Determine a node architecture; the node architecture includes a first-level node for algorithm operation, a network topology, and a first-level node for communication services; the first-level node for algorithm operation, the network topology, and the first-level node for communication services include a plurality of sub-level nodes; Based on the node architecture, an extensible markup language is applied to generate a network information configuration file.
3. The data stream scheduling method according to claim 2, characterized in that: Generating a time-sensitive network corresponding to the network information configuration file includes: Read the data packet sending time, link transmission delay, data packet receiving time, switch data flow assistance time and closing delay between network nodes of each level in the network information configuration file; A time-sensitive network is generated according to the data packet sending time, the link transmission delay, the data packet receiving time, the switch assisting data flow time and the gate closing delay.
4. The data stream scheduling method according to claim 1, characterized in that: Establishing a target constraint mathematical model based on the transmission path includes: Set model building conditions; Under the model establishment conditions, a daisy chain topology is used to connect all switches in the order of data flow; For each switch in the daisy chain topology, determining that it has a left egress port and a right egress port; For any data flow belonging to the set of data flows to be scheduled, determining a period of the data flow; Assume that each terminal device can only send or receive one data stream at a time, regard each data stream as an edge in a graph, and regard the switch and the terminal device as vertices in the graph; The objective constraint mathematical model is to find the minimum number of time slots so that all data streams can complete transmission within the minimum number of time slots without causing conflicts; wherein, for each data stream, sufficient number of time slots needs to be allocated within its corresponding cycle to meet the transmission needs.
5. The data stream scheduling method according to claim 4, characterized in that: Analyze the target constraint mathematical model to obtain the scheduling solution including: Determining an analytical target of the target constraint mathematical model, wherein the analytical target is to calculate a wait-free schedule for the set of data flows and the daisy-chain topology; The analytical algorithm is called to solve the analytical target and output a scheduling solution.
6. The data stream scheduling method according to claim 5, characterized in that: The analytical algorithm is called to solve the analytical target, and the output scheduling solution includes: Calculate the binary logarithm of the maximum value of the period of all data streams; Calculate the data traffic load index of each switch port; the data traffic load index is used to measure the amount of data flow passing through the port; If there is a load on a specific switch port that exceeds the port capacity, then the return value is no-wait scheduling does not exist; If the load of all ports does not exceed the capacity of the corresponding port, the recursive program is called to perform scheduling calculations and output the scheduling plan.
7. The data stream scheduling method according to claim 6, characterized in that: The calculation of the data flow load index of each switch port includes: The weight of each data flow passing through the port is calculated, and the data flows of different periods are accumulated to obtain the data flow load index of each switch port.
8. The data stream scheduling method according to claim 6, characterized in that: Call the recursive program to perform scheduling calculations, and the output scheduling plan includes: If the data stream set is empty, return the empty measurement result; If the periods of all data flows are the same, a unique time period is allocated to each data flow; the unique time period is used to ensure that the data flows do not conflict during scheduling; When the data flows have different periods, the current data flow set is divided into two subsets according to the load of the switch port, and the periods of the data flows of the two subsets are readjusted; Recursively call each other to continue looking for scheduling solutions for the two subsets; After recursively calculating the scheduling results of the two subsets, the scheduling results are combined as a scheduling solution for the data flow set; The output includes a dictionary structure of the scheduling scheme, wherein the dictionary structure includes a scheduling time point allocated to each data stream, and all the scheduling time points and corresponding data streams are used as the scheduling scheme.
9. The data flow scheduling method according to claim 8, characterized in that: Allocating a unique time period to each of the data flows comprises: The first step is to represent each data flow as a node in the greedy graph coloring algorithm; Step 2: Initialize the colors of all vertices to uncolored; Step 3: traverse all vertices, and for each uncolored target vertex, select a minimum color that is not used by any adjacent vertex and assign it to the target vertex; Step 4: If no available color can be found, it indicates that there is a conflict and a unique time period cannot be assigned; Step 5. Repeat steps 3 and 4 until all vertices are colored, and determine the unique time period based on the colored color.
10. The data stream scheduling method according to claim 8, characterized in that: When the current data flow set is divided into two subsets according to the load of the switch port, it also includes: Constructing a linear programming problem; the linear programming problem is used to balance the loads of different switch ports; The data flow division corresponding to each switch port is solved based on the linear programming problem.
11. The data stream scheduling method according to claim 1, characterized in that: Applying the scheduling scheme to perform data flow scheduling includes: Generate a network scheduling table configuration file corresponding to the scheduling scheme; the network scheduling table configuration file includes an algorithm operation level 1 node and a train time sensitive network subnet level 1 node; Data flow scheduling is performed based on the network scheduler configuration file.
12. The data stream scheduling method according to claim 11, characterized in that: Generating a network scheduling table configuration file corresponding to the scheduling scheme includes: Determine the algorithm running secondary node managed by the algorithm running primary node; the algorithm running secondary node includes the scheduling algorithm solution strategy, the maximum transmission delay allowed from end to end for the data flow, the maximum transmission jitter allowed from end to end for the data flow, the delay of a single door opening, the maximum acceptable scheduling data flow bandwidth occupancy ratio and the auxiliary data flow time when the data frame passes through the switch; Determine the train time-sensitive network level-2 nodes, train time-sensitive network level-3 nodes, train time-sensitive network level-4 nodes and train time-sensitive network level-5 nodes managed by the train time-sensitive network subnet level-1 nodes. The train time-sensitive network level-2 nodes include the time scheduling table level-2 nodes on the Internet ports of each switch and the time scheduling table level-2 nodes on the Internet ports of each terminal device; the time scheduling table level-2 nodes on the Internet ports of each switch include the total number of time-sensitive network switches in the subnet and the time scheduling table level-3 nodes on the Internet ports of a single switch; the time scheduling table level-3 nodes on the Internet ports of a single switch include the time scheduling table level-4 nodes for a single network port on a single switch; the time scheduling table level-4 nodes for a single network port on a single switch include at least a single scheduling level-5 node for a single network port on a single switch.
13. A data stream scheduling system, characterized in that: include: A file acquisition module, used to acquire a network information configuration file; the network information configuration file includes a plurality of hierarchical network nodes; A time-sensitive network generation module, used to generate a time-sensitive network corresponding to the network information configuration file; the time-sensitive network is used to describe the transmission time and space progress of the data flow; A path planning module, used for planning a transmission path under a linear topology structure according to the time sensitive network; A model building module, used for building a target constraint mathematical model based on the transmission path; The scheme output module is used to analyze the target constraint mathematical model, obtain a scheduling scheme, and apply the scheduling scheme to perform data flow scheduling.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the steps of the data stream scheduling method according to any one of claims 1 to 12 are implemented.
15. A computer program product, characterized in that The method comprises a computer program, which implements the steps of the data stream scheduling method according to any one of claims 1 to 12 when the computer program is executed.
16. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the data stream scheduling method according to any one of claims 1 to 12 when executing the computer program.
Citation Information
Patent Citations
Route planning and scheduling method and device for traffic frames in time-sensitive network
CN112953830A
Delay deterministic transmission method based on routing scheduling and joint optimization
CN113300960A
Low-delay zero-jitter hybrid time-sensitive traffic scheduling method and device
CN113612700A
Train communication network real-time flow scheduling optimization method based on QSILP algorithm
CN115022182A
Non-latency sensitive network traffic hybrid scheduling method
CN116389277A
