Routing and scheduling method for complex time-sensitive network and related device
By selecting landmark switches in complex time-sensitive networks, calculating the minimum hop matrix, optimizing paths and generating time slot solutions, the problem of insufficient accuracy of routing and scheduling algorithms in the prior art is solved, and more efficient and reliable service data transmission is achieved.
Patent Information
- Application Number
- CN202411996181.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The existing technology is difficult to effectively improve and optimize the accuracy of routing and scheduling algorithms, resulting in poor network routing transmission performance and affecting network performance.
By selecting the landmark switch from the complex time-sensitive network topology generated by the link layer discovery protocol LLDP, calculating the minimum number of hops matrix, optimizing the path using the A-star search algorithm and the Young Yen algorithm, generating a reference time slot scheme in combination with the differential evolution algorithm, and finally configuring the overall time slot scheme.
Effectively improve and optimize the accuracy of business routing and scheduling algorithms, and ensure the certainty and reliability of business data transmission.
Smart Images

Figure CN119946844A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a routing and scheduling method and related devices for complex time-sensitive networks. Background Art
[0002] With the popularization of the Internet, how to provide high-quality, high-efficiency, safer and more stable network services has become an urgent issue for every operator. The rise of mobile Internet, big data, cloud computing, etc. has also brought new prospects and unprecedented challenges to the network. Traditional network topology is difficult to meet some existing high-demand, high-quality, large-scale network needs, so the network topology has become increasingly complex. The complexity of network topology is generally manifested in its complex structure, large scale, and diversified connection methods between nodes. Large-scale network infrastructure makes data transmission and information exchange more convenient, which greatly promotes the improvement of production efficiency and the optimal allocation of social resources. However, with the expansion of network scale and the heterogeneity, dynamicity, and non-centralization of the network itself, the network has become increasingly prominent in terms of information security, address allocation, network perception, congestion control, path planning, load balancing, etc. At the same time, with more and more mobile devices accessing the network, the original network routing protocol is increasingly difficult to adapt to the network characteristics, resulting in poor network routing transmission performance and restricting network performance. In order to ensure the service quality of data and information in network transmission, it is particularly important to select a suitable path planning algorithm in the network. Therefore, how to improve and optimize the accuracy of routing and scheduling algorithms has become a problem that needs to be solved urgently. Summary of the invention
[0003] The present invention provides a routing and scheduling method and related devices for complex time-sensitive networks to solve the technical problem of how to improve and optimize the accuracy of routing and scheduling algorithms.
[0004] In a first aspect, a routing and scheduling method for a complex time-sensitive network is provided, comprising:
[0005] Selecting landmark switches from a complex time-sensitive network topology generated by a link layer discovery protocol LLDP to obtain a landmark switch set;
[0006] Performing minimum hop count matrix calculation on each switch in the switch set of the complex time-sensitive network topology to obtain a minimum hop count set;
[0007] Based on the landmark switch set and the minimum hop count set, the optimal path is calculated for each flow to be scheduled in the flow set to be scheduled by the AStar search algorithm to obtain the optimal path set;
[0008] According to the optimal path set, the optimal path is optimized by using the Yen algorithm to obtain the K-optimal path set;
[0009] According to the K-optimal path set, the differential evolution algorithm is used for iterative calculation to obtain the reference time slot plan;
[0010] A scheduling decision is made on the reference time slot plan, so as to obtain and configure the overall time slot plan when the reference time slot plan meets the scheduling end condition.
[0011] In a second aspect, a routing and scheduling device for a complex time-sensitive network is provided, comprising:
[0012] A selection module is used to select a landmark switch from a complex time-sensitive network topology generated by a link layer discovery protocol LLDP to obtain a landmark switch set;
[0013] A first processing module is used to perform minimum hop count matrix calculation on each switch in the switch set of the complex time-sensitive network topology to obtain a minimum hop count set;
[0014] The second processing module is used to calculate the optimal path for each flow to be scheduled in the flow set to be scheduled based on the landmark switch set and the minimum hop count set by using the AStar search algorithm to obtain the optimal path set;
[0015] The third processing module is used to optimize the optimal path by using the Yen algorithm according to the optimal path set to obtain a K-optimal path set;
[0016] The fourth processing module is used to perform iterative calculation using a differential evolution algorithm according to the K-optimal path set to obtain a reference time slot solution;
[0017] The fifth processing module is used to perform scheduling judgment on the reference time slot plan, so as to obtain the overall time slot plan and configure the overall time slot plan when the reference time slot plan meets the scheduling end condition.
[0018] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned routing and scheduling method for complex time-sensitive networks when executing the computer program.
[0019] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned routing and scheduling method for complex time-sensitive networks are implemented.
[0020] In the scheme implemented by the above-mentioned routing and scheduling method and related devices for complex time-sensitive networks, landmark switches are selected from the complex time-sensitive network topology generated by the link layer discovery protocol LLDP to obtain a landmark switch set, and the minimum hop matrix calculation is performed on each switch in the switch set of the complex time-sensitive network topology to obtain the minimum hop set. Based on the landmark switch set and the minimum hop set, the optimal path calculation can be performed for each to-be-scheduled flow in the to-be-scheduled flow set by the AStar search algorithm to obtain the optimal path set, and based on the optimal path set, the optimal path optimization is performed by the Yen algorithm to obtain the K-optimal path set, so that the differential evolution algorithm can be used for iterative calculation based on the K-optimal path set to obtain a reference time slot plan, and then the reference time slot plan can be scheduled to determine, so that when the reference time slot plan meets the scheduling end condition, the overall time slot plan can be obtained and configured, which can effectively improve and optimize the accuracy of the service routing and scheduling algorithms, and is conducive to ensuring the certainty and reliability of service data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0022] Figure 1 is a schematic diagram of a TSN network architecture in one embodiment of the present invention;
[0023] Figure 2 It is a flow chart of a routing and scheduling method for complex time-sensitive networks in one embodiment of the present invention;
[0024] Figure 3 is a schematic diagram of a time slot scheme in one embodiment of the present invention;
[0025] Figure 4 It is a structural diagram of a routing and scheduling device for complex time-sensitive networks in one embodiment of the present invention;
[0026] Figure 5 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0027] Figure 6 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] The routing and scheduling method for complex time-sensitive networks provided by the embodiment of the present invention is applicable to the routing and scheduling of time-sensitive networks (TSN) in complex networks. The method provided in this application can perform routing and scheduling calculations for complex time-sensitive networks at a centralized network configurator (CNC), mainly solving the transmission scheduling problem of data flows at the data layer in the TSN network architecture. Among them, CNC can include the execution of all algorithms and the distribution of configuration information, and a network module that can generate the TSN network topology, which is the premise of all TSN scheduling problems.
[0030] When the TSN sender needs to send a data stream to the receiver, the sender uses the user configuration protocol to send the TSN connection requirement to the Centralized User Configuration (CUC), and the CUC discovers and retrieves the capabilities and requirements of the terminal equipment; the CNC discovers the network topology and collects the IP address, performance and other information of the TSN switches in the network; the CUC exchanges the traffic information in text or binary form with the CNC through the User Network Interface (UNI) according to the TSN traffic transmission requirements of the sender; after receiving the requirements, the CNC uses the routing and scheduling algorithm in this method to calculate the optimal transmission path and feasible scheduling table that meet the requirements as a transmission plan.
[0031] See also Figure 1 As shown, Figure 1 A schematic diagram of a TSN network architecture provided for an embodiment of the present invention. It can be understood that the present application mainly solves the path planning and traffic scheduling problems of time-triggered flows in complex time-sensitive networks. Under the premise of taking complex time-sensitive networks as the research object, the present method adopts the proposed shortest path based on bidirectional A-star landmark search (Bidirectional AStar Landmarks Hops, BALH) algorithm and improved differential evolution algorithm to calculate the optimal transmission path and overall time slot plan for the flow to be scheduled, so that when the flow to be scheduled is transmitted using the plan calculated by this method, there will be no transmission conflict between flows, that is, no waiting transmission is satisfied.
[0032] If there is a transmission plan that meets the requirements, CNC can configure TSN features for all TSN switches along each TSN flow transmission path according to the calculated path and schedule table; CNC returns the transmission plan and TSN flow configuration status to CUC, and CUC configures all devices according to the TSN flow configuration status to send data. The routing and scheduling method for complex time-sensitive networks proposed in this application can be divided into routing planning algorithms and traffic scheduling algorithms, which can specifically include the following research contents.
[0033] See also Figure 2 As shown, Figure 2 A schematic flow chart of a routing and scheduling method for a complex time-sensitive network provided by an embodiment of the present invention includes the following steps:
[0034] S10: Select a landmark switch from the complex time-sensitive network topology generated by the link layer discovery protocol LLDP to obtain a landmark switch set.
[0035] Based on the fully centralized configuration model, the sender can use the user configuration protocol to send TSN connection requirements to CUC. CUC collects information such as the IP address of the TSN switch in the network according to the Link Layer Discovery Protocol (LLDP) and sends it to CNC through UNI. CNC generates the network topology based on this information. CUC exchanges traffic information with CNC through the user network interface based on the TSN traffic transmission requirements of the sender.
[0036] Before calculating the optimal path, CNC can first perform pre-calculation, that is, CNC can initialize the adjacency matrix according to the network topology and determine the number of landmark switches to select landmark switches according to the greedy search strategy to obtain a set of landmark switches. The specific steps can be found as follows:
[0037] 1) CNC can convert the network topology into the adjacency matrix α according to the network topology information, and at the same time obtain the number of devices Num vex , number of links Num arc . Assume that the number of switches is defined as Num SW , the number of terminal devices is Num ES , we know that Num SW +Num ES =Num vex When the above parameters are known, for any two switches, such as the first switch SW i and the second switch SW j , find the shortest path by traversing, and gradually try to i and SW jAdd an intermediate switch SW to the shortest path k If an intermediate switch SW is added k If the path becomes shorter, the shortest path is updated; otherwise, the original path is maintained until all switches are traversed to obtain the minimum hop matrix Dis and path matrix Path in the network topology. The minimum hop matrix Dis can be used to record the switch SW i (also called the first switch) to switch SW j The minimum hop count of (i≠j) (also called the second switch) is represented by element a in the minimum hop count matrix Dis. k (i,j) indicates that the path matrix Dis is used to record the intermediate switches SW k , use element b in the path matrix Path k (i,j) represents. The calculation formula for each element of the above matrix can be shown as formula (1.1):
[0038]
[0039] Among them, a k (i,j) can be used to represent the element in the minimum hop count matrix Dis, and min(,) can be used to represent the minimum value of two elements; a k-1 (i,j) can be used to represent the i To SW j The shortest path of k-1 (i,k)+a k-1 (k,j) can be used to represent the i To SW j Add an intermediate switch SW in the path k The path after k (i,j) can be used to represent an element in the path matrix Path.
[0040] 2) CNC determines the number of landmark switches in the network topology l In general, the number of landmark switches in a TSN network accounts for 10% of the number of devices (rounded down), as shown in formula (1.2):
[0041]
[0042] Among them, Num l It can be used to indicate the number of landmark switches in the network topology; Can be used to indicate that the calculation is less than and closest to Num vex An integer of / 10.
[0043] 3) CNC selects the landmark switch through the greedy strategy. The specific steps are as follows:
[0044] ① In the first iteration, CNC can randomly select a switch in the network as a landmark switch, such as the first landmark switch L1, and use Dijkstra algorithm to select the switch with the largest minimum hop value from the current switch as the next landmark switch, such as the second landmark switch L2;
[0045] ② In the i-th iteration, CNC selects the i-1th landmark switch L from the i-1th iteration i-1 At the beginning, the Dijkstra algorithm is used to select the switch with the largest minimum hop value as the next switch, such as the i-th landmark switch L i ;
[0046] ③Iteration total Num l Then, CNC can finally obtain a set of landmark switches, such as
[0047] S20: performing minimum hop count matrix calculation on each switch in the switch set of the complex time-sensitive network topology to obtain a minimum hop count set.
[0048] After CNC selects the landmark switch, it can further pre-process all switches in the network according to the landmark switch. Specifically, CNC can calculate the landmark switch set L according to the minimum hop matrix Dis all The minimum hop count of each landmark switch in the complex time-sensitive network topology and each switch in the switch set is obtained to obtain the minimum hop count set corresponding to each switch, such as
[0049] S30: Based on the landmark switch set and the minimum hop count set, the optimal path is calculated for each flow to be scheduled in the flow set to be scheduled by using the AStar search algorithm to obtain the optimal path set.
[0050] The set of to-be-scheduled flows may include one or more to-be-scheduled flows, which may be data flows to be scheduled in complex time-sensitive network topologies that need to be managed through appropriate routing planning and traffic scheduling algorithms to meet the requirements of the time-sensitive network.
[0051] For example, this application refers to an ordered sequence of data frames transmitted from the transmitter to the receiver according to certain requirements as a flow, and the research object is mainly the periodic time-triggered flow in a complex time-sensitive network (hereinafter collectively referred to as TT flow or flow to be scheduled). This application denotes the total number of flows to be scheduled as N l , the set of flows to be scheduled is recorded as Each flow f m In the form of a seven-tuple (srcm ,dst m ,StreamID m ,PRI m ,FRL m ,T m ,td m ) indicates that src m It is a flow m The sending end, dst m It is a flow m The receiving end, StreamID m It is a flow m The stream identifier, PRI m It is a flow m Priority, FRL m It is a flow m The frame length, T m It is a flow m The sending period, td m It is a flow m The maximum end-to-end allowed delay. Assume that the link transmission rate is V F , then the terminal device and the switch send flow f m The time required for one frame can be FRL m / V F .
[0052] After the CNC obtains the landmark switch set and the minimum hop count set through pre-calculation, it can perform AStar search. After the CNC initializes the parameters required for AStar search, it can start AStar search at the sending end and the receiving end at the same time until the end condition is met.
[0053] It should be understood that, based on the landmark switch set and the minimum hop count set, the optimal path calculation is performed on each flow to be scheduled in the flow set to be scheduled of the complex time-sensitive network topology through a search algorithm to obtain the optimal path set, which refers to the process of performing AStar search. Among them, step S30, that is, based on the landmark switch set and the minimum hop count set, the optimal path calculation is performed on each flow to be scheduled in the flow set to be scheduled of the complex time-sensitive network topology through a search algorithm to obtain the optimal path set, including the following steps:
[0054] S31: Obtain a first minimum hop count from each landmark switch in the landmark switch set to a first switch; the first switch is any switch in the switch set;
[0055] S32: Obtain a second minimum number of hops from each landmark switch in the landmark switch set to a second switch; the second switch is any switch in the switch set except the first switch;
[0056] S33: Determine an estimated value set according to the first minimum number of hops and the second minimum number of hops;
[0057] S34: determining an estimation function according to the estimation value set and the first constraint condition;
[0058] S35: determining an evaluation function of the AStar search according to an estimated cost from the first switch to the second switch and an actual cost from the sending end of each to-be-scheduled flow in the to-be-scheduled flow set to the first switch;
[0059] S36: Based on the evaluation function, AStar search is started from the sending end of each flow to be scheduled in the set of flows to be scheduled and the receiving end of each flow to be scheduled in the set of flows to be scheduled to obtain an optimal path set.
[0060] 1) CNC initializes the parameters required for the AStar search step. Assume that the current switch traversed during the AStar search process is defined as SW AStar , define the open set β1 as the set of all switches to be traversed in the AStar search process starting from the sender, define the open set β2 as the set of all switches to be traversed in the AStar search process starting from the receiver, define the closed set γ1 as the set of all switches selected in the AStar search process starting from the sender, and define the closed set γ2 as the set of all switches selected in the AStar search process starting from the receiver. When the AStar search starts, the CNC places the sender in the open set β1, the receiver in the open set β2, and sets the closed set γ1 and the closed set γ2 to empty.
[0061] 2) For any flow to be scheduled in the set of flows to be scheduled, such as the mth flow to be scheduled f m , CNC can first determine the first switch sw i To the second switch sw j The estimated function P(sw i ,sw j ), and then determine the evaluation function F(sw i ,sw j ). P(sw i ,sw j ) can be represented by the landmark switch set L all The first switch sw i To the second switch sw j The estimation function P(sw i ,sw j ) can be calculated as follows:
[0062] ① For the first landmark switch L1, the first switch sw is obtained through the above pre-calculation i The first minimum hop count to the first landmark switch L1 and the first landmark switch L1 to the second switch sw j The second minimum number of hops Calculate the first switch sw i and the second switch sw j For the process estimate value P1 of the first landmark switch L1, the calculation formula of the process estimate value P1 can be shown as (1.3):
[0063]
[0064] Among them, P1 can be used to represent the process estimate, such as being called the first process estimate; Can be used to represent calculations The absolute value of Can be used to represent the first switch sw i The first minimum hop count to the first landmark switch L1; It can be used to represent the first landmark switch L1 to the second switch sw j The second minimum number of hops.
[0065] ②For the i-th landmark switch L i Repeat the above step ① to find the estimated value P i , such as is called the i-th process estimate.
[0066] ③The estimated cost of AStar search h(sw i ,sw j ) is determined, the closer the cost is to the actual consumption, the better the calculation result of the optimal path. After selecting the first landmark switch L1, considering that all switches in the network can satisfy the formula (1.4), that is, the first constraint condition:
[0067]
[0068] in, Can be used to represent the first switch sw i To the second switch sw j The minimum number of hops; Can be used to represent the first switch sw i The first minimum hop count to the first landmark switch L1; It can be used to represent the first landmark switch L1 to the second switch sw j The second minimum number of hops.
[0069] That is, the first switch sw is finally calculated iTo the second switch sw j The estimated function P(sw i ,sw j ) can be shown as formula (1.5):
[0070] P(sw i ,sw j )=max(P1,P2,...,P i ) (1.5)
[0071] Among them, P(sw i ,sw j ) can be used to represent the estimated function; max(P1,P2,...,P i ) can be used to represent the calculation of P1, P2, ..., P i The maximum value in; P1 can be used to represent the estimated value of the first process; P2 can be used to represent the estimated value of the second process; P i Can be used to represent the estimated value of the i-th process.
[0072] Furthermore, the evaluation function F(sw i ,sw j ) can be calculated as shown in (1.6):
[0073] F(sw i ,sw j ) = g(src m ,sw i )+h(sw i ,sw j ) (1.6)
[0074] Among them, F(sw i ,sw j ) can be used to represent the evaluation function; g(src m ,sw i ) can be used to indicate the actual cost, indicating the sender src of the flow to be scheduled m To the first switch sw i The actual cost of h(sw i ,sw j ) can be used to represent the estimated cost, indicating that the first switch sw i To the second switch sw j estimated cost.
[0075] This method considers calculating the path with fewer hops to ensure the end-to-end delay of the flow; at the same time, considering the link load problem, the frame length of the flow transmitted at the same time on a single link should not be too large. Therefore, this method determines the evaluation function of AStar search based on the sum of the number of hops of the flow in the network topology and the frame length of the flow transmitted on the current link. For details, please refer to formula (1.7) and formula (1.8):
[0076]
[0077] Among them, g(src m ,sw i ) can be used to indicate the actual cost, indicating the sender src of the flow to be scheduled m To the first switch sw i the actual cost of Can be used to represent the flow f to be scheduled m From the sender src m To switch sw i The minimum hop number; m can be used to represent the index of the flow to be scheduled in the set of flows to be scheduled; ω g1 Can be used to represent the actual cost hop coefficient; ω g2 Can be used to indicate the actual cost load factor; FRL m Can be used to represent the flow f to be scheduled m Frame length; FRL sum It can be used to represent the sum of the frame lengths of all flows transmitted on the current link; h(sw i ,sw j ) can be used to represent the estimated cost, indicating that the first switch sw i To the second switch sw j The expected cost; P(sw i ,sw j ) can be used to represent the estimation function; ω h1 Can be used to express the estimated cost hop coefficient, ω h2 Can be used to indicate the estimated cost load factor. Optional, It can be obtained by the minimum hop count matrix Dis, FRL m and FRL sum The flow to be scheduled that can be received by CNC m information obtained.
[0078] Optionally, the above coefficient, i.e. ω g1 ,ω g2 ,ω g2 and ω h2 , can be adjusted for different scenarios to increase the applicability of the algorithm. The above coefficients can satisfy the conditions shown in formula (1.9):
[0079] ω g1 +ω g2 =ω g2 +ω h2 =1(1.9)
[0080] When AStar searches for the first flow to be scheduled f1, it does not need to consider the link load; when AStar searches for subsequent flows to be scheduled, it should consider the impact of the load of the determined flows to be scheduled in the link. Therefore, the load index can be used in the calculation of AStar's search for the second flow to be scheduled f2 and subsequent flows to be scheduled.
[0081] 3) CNC from the sender src m and the receiving end dst m At the same time, AStar search starts. The specific steps of AStar search can be as follows:
[0082] ① Assume that the switch directly connected to the sender is defined as the switch currently traversed SW SRC , CNC searches for the switch SW currently traversed through the path matrix Path SRC The switches with connection relationships are placed in the open set β1, and the evaluation function value of each switch in the open set β1 is calculated, and the switch S with the smallest evaluation function value is selected. 1, Place in closed set γ1;
[0083] ② Assume that the switch directly connected to the receiving end is defined as the switch currently traversed SW DST , CNC searches for the switch SW currently traversed through the path matrix Path DST The switches with connection relationships are placed in the open set β2, and the evaluation function value of each switch in the open set β2 is calculated, and the switch S with the smallest evaluation function value is selected. 2, Place in closed set γ2;
[0084] ③Switch S 1, As the current switch SW SRC , CNC repeats step ① and obtains the next traversed switch S 1, , and placed in the closed set γ1;
[0085] ④ Switch S 2, As the current switch SW DST , CNC repeats step ② to get the next traversed switch S 2, , and placed in the closed set γ2;
[0086] ⑤CNC repeats the above steps ① to ④ to determine whether the condition is met: there are switches in the closed set γ2 in the open set β1 or there are switches in the closed set γ1 in the open set β2. If so, execute step ⑥, otherwise execute step ⑦;
[0087] ⑥CNC obtains the optimal path set Best according to the order of switches in the open set β1 and the open set β2. m , AStar search ends;
[0088] ⑦CNC determines whether the condition is met: all switches in the current network have been traversed. If the condition is not met, it jumps back to step ①, and if the condition is met, it continues to step ⑧;
[0089] ⑧CNC output path planning fails and the overall plan ends.
[0090] S40: According to the optimal path set, the optimal path is optimized by using the Yen algorithm to obtain a K-optimal path set.
[0091] The optimal path set obtained by AStar search can be a set of optimized transmission paths found for the scheduled flow in a complex time-sensitive network. These transmission paths take into account various factors such as delay, bandwidth, link reliability, etc., and can transmit data from the sender to the receiver at the lowest cost. The K-optimal path set obtained by the Yen algorithm based on the optimal path set can provide more alternative paths. Among them, the value of K can be adjusted according to actual needs. A larger K value means that there are more suboptimal paths to choose from. During the traffic scheduling process, if the initial optimal path cannot meet the requirements, or network failures, congestion, etc. occur, the K-optimal path set can provide a backup plan to ensure that data can be transmitted in a timely and reliable manner. At the same time, it also increases the flexibility and adaptability of the network, and can better cope with various complex network conditions.
[0092] It should be understood that, according to the optimal path set, the optimal path is optimized by the Yen algorithm to obtain the K-optimal path set, which refers to the process of iterating the Yen algorithm. Among them, step S40, that is, according to the optimal path set, the optimal path is optimized by the Yen algorithm to obtain the K-optimal path set, includes the following steps:
[0093] S41: taking the optimal path set as an iterative object and performing iterative iteration to obtain the optimal path, and recording it as the first K optimal iterative paths;
[0094] S42: Determine the switch that each optimal iterative path in the optimal path set passes through as a target switch, and obtain a target switch set;
[0095] S43: Calculate the optimal path between every two target switches in the target switch set by using AStar search to obtain a target optimal iterative path set;
[0096] S44: comparing the target optimal iterative paths in the target optimal iterative path set, selecting the optimal path with the best AStar search evaluation function, and recording it as the second K optimal iterative paths;
[0097] S45: taking the first K optimal iterative paths and the second K optimal iterative paths as iterative objects, performing iteration and obtaining an optimal path, and recording the optimal path as a third K optimal iterative path;
[0098] S46: Obtain a K-optimal path set according to the first K optimal iterative path, the second K optimal iterative path, and the third K optimal iterative path.
[0099] CNC uses the Yen algorithm to calculate the optimal path set Best m Calculate and get the final K-optimal path set KBest m , the specific steps can be as follows:
[0100] 1) CNC sets the optimal path Best m As an iterative object, recorded as K optimal iterative paths That is, the first K optimal iterative paths mentioned above, and define their total number of hops as J. The switches passed by the optimal iterative path are σ1, σ2, …, σ J+1 ;
[0101] 2) In the first iteration, CNC sets the path length between the first target switch σ2 and the second target switch σ2 in the target switch set to positive infinity (+∞), and uses the above AStar search to calculate the optimal iterative path, which is recorded as Such as the second K optimal iterative path 1; in the second iteration, CNC sets the path length between the second target switch σ2 and the third target switch σ3 in the target switch set to +∞, and uses AStar search to perform a calculation to obtain the optimal iterative path, which is recorded as This is called the second K-optimal iterative path 2; until the J-th iteration, CNC will be the J-th target switch σ in the target switch set J and the J+1th target switch σ J+1 The path length between is set to +∞, and the optimal iterative path is calculated using AStar search and recorded as Such as called the second K optimal iterative path J;
[0102] 3) CNC calculates the optimal iterative path Compare and select the record with the best AStar search evaluation function as the K optimal iterative path That is, the second K optimal iterative path mentioned above;
[0103] 4) CNC will K optimal iterative path (i.e., the first K optimal iterative path and the second K optimal iterative path) are used as iterative objects, and steps 2) to 3) are repeated to obtain the K optimal iterative paths. That is, the third K optimal iterative path mentioned above, until the K optimal iterative path The path contained in If there is an intersection, we get the K-optimal path set KBest m , The algorithm ends.
[0104] S50: According to the K-optimal path set, a differential evolution algorithm is used to perform iterative calculation to obtain a reference time slot solution.
[0105] CNC obtains the K-optimal path set KBest according to the above m , under the premise of determining the constraints, the first frame sending time τ of each optimal path can be further determined by the differential evolution algorithm m , thereby determining the reference time slot plan.
[0106] It should be understood that, according to the K-optimal path set, using the differential evolution algorithm to perform iterative calculations to obtain the reference time slot solution refers to the process of obtaining the reference time slot solution. Among them, in step S50, that is, according to the K-optimal path set, using the differential evolution algorithm to perform iterative calculations to obtain the reference time slot solution, includes the following steps:
[0107] S51: taking each K-optimal path in the K-optimal path set as an iteration object to obtain a super-period set;
[0108] S52: Determine the initial sending time of each flow to be scheduled in the set of flows to be scheduled according to the second constraint condition, and obtain the initial sending time set;
[0109] S53: Determine an initial total time slot set according to the super period set and the initial transmission time set;
[0110] S54: Taking the initial total time slot set as input, a reference time slot scheme is iteratively generated using a differential evolution algorithm.
[0111] CNC can determine the flow to be scheduled m The initial total time slot SA m When initializing the initial solution of the time slot scheme, the K-optimal paths in the K-optimal path set obtained above are used, such as As an iterative object, we can first calculate the super period Assume that K-optimal path is defined The total number of hops is J, and the switches that the path passes through are defined as: θ0, θ1, …, θ J ; For the i-th (i=0,1,…,J-1) link on the K-optimal path, assume that the definition on the link (θ i ,θ i+1 ) is the set of flows on i,i+1 , flow set f i,i+1 The total number of included streams is N i,i+1 , define the super period is the flow set f i,i+1 The least common multiple of the periods of each included flow can be calculated as shown in (1.10):
[0112]
[0113] in, Can be used to represent superperiodic sets; Can be used to represent the calculation of T1, T2, ..., The least common multiple of ; T1 can be used to represent the period of the first flow to be scheduled; T2 can be used to represent the period of the second flow to be scheduled; Can be used to represent the Nth i,i+1 The period of the flow to be scheduled.
[0114] Then, CNC can calculate the start time τ of the first frame of the scheduled flow m For the flow set f i,i+1 Each flow f in m , its source node can be defined as src m , the destination node is defined as dst m , the frame length is defined as FRL m , the period is defined as T m , the maximum tolerable delay is td m From the traffic model, we know that the link transmission rate is V F , then the terminal device and the switch send flow f m The time required for one frame is FRL m / V F , define the switch processing delay as δ. Under the delay requirement, flow f m The first frame starts sending time τ m Should be less than f m The period T m , the constraint can be expressed as (1.11):
[0115] τ m ∈[0,Tm ) (1.11)
[0116] Among them, τ m Can be used to represent the flow f m The first frame starts sending time; T m Can be used to represent the flow f m cycle.
[0117] At the same time, flow m The first frame starts sending time τ m The maximum tolerable delay td must also be met m The constraint condition can be expressed as (1.12):
[0118] τ m ∈[0,td m -(J+1)×FRL m / V F -J×δ) (1.12)
[0119] Among them, τ m Can be used to represent the flow f m The first frame starts sending time; td m Can be used to represent the flow f m The maximum tolerable delay; J can be used to represent the K-optimal path Total hop count; FRL m / V F Can be used to indicate that terminal devices and switches send streams f m The time required for one frame; FRL m Flow m The frame length of V F It can be used to indicate the link transmission rate; δ can be used to indicate the switch processing delay.
[0120] Therefore, the flow f m The first frame starts sending time τ m The constraint (1.13) can be satisfied:
[0121] τ m ∈[0,min(T m ,td m -(J+1)×FRL m / V F -J×δ)] (1.13)
[0122] Among them, τ m Can be used to represent the flow f m The first frame starts sending time; T m Can be used to represent the flow f m The cycle of td mCan be used to represent the flow f m The maximum tolerable delay; J can be used to represent the K-optimal path Total hop count; FRL m / V F Can be used to indicate that terminal devices and switches send streams f m The time required for one frame; FRL m Flow m The frame length of V F It can be used to indicate the link transmission rate; δ can be used to indicate the switch processing delay.
[0123] The above constraints (1.11) - (1.13) can be understood as the second constraint. CNC randomly initializes the flow f within the constraint (1.13) m The time when the first frame starts to be sent is defined as For the flow f m , in the optimal iterative path On the first link (θ0, θ1) of According to the periodicity of the flow, the sending time of the second frame on the link (θ0, θ1) can be determined as Then the time slot reserved by CNC for the second frame on link 9θ0,θ1) is From the above, we can see that flow f m A total of θ0, θ1 are sent on the link frame, we can get CNC reserved for flow f m The total time slot on the link (θ0,θ1) is Flow m Total can send It should be noted that if decimal places are generated in the calculation of the maximum and minimum values of the time slot interval, the maximum or minimum value needs to be rounded up before subsequent calculations; if the maximum value of the calculated time slot interval exceeds the super period, the remainder of the super period needs to be taken.
[0125] According to the optimal iterative path It can be seen that flow f m The first frame consists of θ0 at Start sending at The transmission is completed at time θ1 and all arrive at θ1. After the processing delay δ of θ1, θ1 is Start sending stream f at time m The first frame of m The time when the first frame of is sent on the link (θ1, θ2) is Flow m The total time slot on the link (θ1, θ2) is
[0126] In summary, for all flows to be scheduled, the flow f can be obtained m In the i-th (i=0,1,…,J-1) hop link (θ i ,θ i+1 ) on the initial total slot set SA m for An exemplary time slot scheme can be found in Figure 3 shown.
[0127] It should be understood that taking the initial total time slot set as input and iteratively generating the reference time slot scheme using the differential evolution algorithm refers to the process of iterative calculation using the differential evolution algorithm. In step S54, that is, taking the initial total time slot set as input and iteratively generating the reference time slot scheme using the differential evolution algorithm, the following steps are included:
[0128] S541: Initialize the population of the first frame sending time of each flow to be scheduled in the flow set to be scheduled on the initial total time slot to obtain an initialized population set;
[0129] S542: Determine a differential evolution evaluation function according to the conflict degree of any two to-be-scheduled flows in the link;
[0130] S543: performing a mutation operation on each of the initialization populations in the initialization population set to obtain a mutation intermediate set;
[0131] S544: performing a crossover operation on each variant intermediate in the variant intermediate set to obtain a next generation population set;
[0132] S545: using a differential evolution evaluation function, comparing each initialization population in the initialization population set with each next generation population in the corresponding next generation population set, and selecting the optimal solution as a reference time slot solution.
[0133] First, CNC can initialize the differential evolution algorithm parameters. The initial population X of differential evolution M,D (G) has two parameters, dimension and population number, which are set to M and D respectively, where M = Num l , D is a constant. The iteration number of the current population is G, and the iteration limit is set to X max , the iteration lower limit is set to X min , the variation factor is set to F i , the crossover factor is set to C r , the maximum number of iterations is set to K.
[0134] Secondly, CNC uses differential evolution algorithm to iteratively generate the optimal time slot plan. m The first frame sending time Iterating over the input can be divided into the following steps:
[0135] 1) CNC initializes the population and obtains the initialization population set X M,D (0). The flow to be scheduled f m The first frame sending time Initial solution of SA in the time slot scheme m (i.e., the above-mentioned initial total time slot set) initializes M×D populations, and the specific formula for each initialization can be shown as follows (1.14):
[0136] X M,D (0) = X min (0)+(X max (0)-X min (0))×rand(0,1) (1.14)
[0137] Among them, X M,D (0) can be the initialization population set; X max Can be a stream f m The initial total time slot SA m The upper limit of the transmission interval on the first link; X min Can be a stream f m The initial total time slot SA m The lower limit of the transmission interval on the first link; rand(0,1) can be used to represent a random number in the interval (0,1).
[0138] 2) CNC calculation of differential evolution evaluation function F de (G). Evaluation function F de (G) can be used to evaluate the superiority of populations. In the TSN scheduling problem, it is defined as the total time slot conflict degree of all scheduled flows in all links in the reference time slot scheme. For the transmission link (θ i ,θ i+1 ), there are N i,i+1 The flow passes through the link, defining the flow set f i,i+1 Any two flows to be scheduled in x and f y In the link (θ i ,θ i+1 ) is and Calculation can be obtained x and f y In the link (θ i ,θ i+1 ) Then, the total time slot conflict degree of all scheduled flows in all links in the reference time slot scheme can be obtained: The calculation formula is shown in (1.15):
[0139]
[0140] Among them, F de (G) can be a differential evolution evaluation function; Num can be the total time slot conflict degree of all to-be-scheduled flows in all links in the reference time slot scheme; arc can be the number of links; z can be the index of the number of links; N i, It can be the number of flows to be scheduled; Can be any two flows to be scheduled f x and f y In the link (θ i ,θ i+1 ) degree of conflict.
[0141] 3) CNC performs mutation operation. M,D (G) as an example, three individuals are randomly selected for mutation operation, which are defined as and Where r1, r2 and r3 are defined constants, and the mutation intermediate generated by the mutation operation is defined as V M,D (G+1). The specific formula for each mutation can be shown as follows (1.16):
[0142]
[0143] Among them, V M,i (G+1) can be a set of variant intermediates; F i is the scaling factor of the population under the current traversal, which can be a random decimal between 0 and 1; F i-1 is the scaling factor of the last traversal of the population, which can be a random decimal between 0 and 1; The population X of the G generation can be M,D (G) An individual is called the first individual; The population X of the G generation can be M,D (G) an individual, such as the second individual; The population X of the G generation can be M,D (G) An individual is called the third individual.
[0144] 4) CNC performs a crossover operation. In order to generate diverse offspring, a crossover operation is required after the mutation operation. M,D (G+1) and X M,D (G), define the next generation population as UM,D (G+1), for the G-th generation population X M,D (G) and variant intermediate V M,D (G+1), the process of performing the crossover operation can be shown as follows (1.17):
[0145]
[0146] Among them, U M,i (G+1) can be the next generation population set; V M,i (G+1) can be a set of variant intermediates; C r is the crossover probability, which can be a random decimal between 0 and 1; X M,i (G) may be the population of the Gth generation.
[0147] 5) CNC performs the selection operation. For the next generation of population generated, it is necessary to determine whether the solution is the optimal solution. M,i (G+1) and X M,D (G), using the evolutionary evaluation function F de (G) Compare and select the best solution as the final solution X of the time slot solution for this iteration best , the specific formula for the selection operation is shown in (1.18):
[0148]
[0149] Among them, X best It can be the final solution of the time slot scheme of this iteration, that is, the reference time slot scheme; X M,D (G+1) can be the population of the G+1th generation; U M,i (G+1) can be the next generation population set; F de ( ) can be used to operate using the differential evolution evaluation function; X M,D (G) may be the population of the Gth generation.
[0150] S60: Perform scheduling determination on the reference time slot plan, so as to obtain the overall time slot plan and configure the overall time slot plan when the reference time slot plan meets the scheduling end condition.
[0151] Optionally, the CNC may calculate the initial sending time corresponding to each to-be-scheduled flow in the to-be-scheduled flow set according to the reference time slot scheme to obtain a reference sending time set; calculate the total time slot conflict degree of the reference time slot scheme according to the reference sending time set; when the total time slot conflict degree is zero, determine the reference time slot scheme as the overall time slot scheme and configure the overall time slot scheme; when the total time slot conflict degree is not zero, determine whether the differential evolution algorithm has reached the maximum number of iterations; when the differential evolution algorithm has not reached the maximum number of iterations, use the reference time slot scheme as the next generation population to iterate the differential evolution algorithm, and repeat “calculate the initial sending time corresponding to each to-be-scheduled flow in the to-be-scheduled flow set according to the reference time slot scheme”. moment, obtain a reference sending time set" and subsequent steps; when the differential evolution algorithm reaches the maximum number of iterations, determine whether there is an unused optimal path for each flow to be scheduled in the set of flows to be scheduled; when there is any unused optimal path for any flow to be scheduled, use the method of sequentially selecting alternative paths to input the next optimal path in the K-optimal path set as the optimal iterative path, and repeat "according to the reference time slot plan, calculate the initial sending time corresponding to each flow to be scheduled in the set of flows to be scheduled, and obtain a reference sending time set" and subsequent steps; when there is no unused optimal path for each flow to be scheduled in the set of flows to be scheduled, output the result of traffic scheduling failure.
[0152] That is to say, when the condition of no-wait transmission is met, the reference time slot plan can be determined as the overall time slot plan and the overall time slot plan can be configured; when the condition of no-wait transmission is not met, it can be determined whether the differential evolution algorithm has reached the maximum number of iterations; if the maximum number of iterations has not been reached, the next iteration is performed; if the maximum number of iterations is reached, the method of sequentially selecting alternative paths is adopted, and the next optimal path of the K-optimal path set is used as input to continue iteration, and the above steps are repeated until the scheduling end condition is met (that is, the no-wait transmission condition is met).
[0153] Optionally, the CNC may further perform a scheduling decision. The specific steps of the scheduling decision may be as follows:
[0154] ① According to the final solution of the population best , that is, the reference time slot scheme mentioned above, calculates the initial sending time corresponding to all the streams to be scheduled.
[0155] ②Determine the final solution X best Whether the scheduling end condition is met. Calculate the final solution X according to the initial sending time corresponding to all the streams to be scheduled. best If the total time slot conflict degree is 0, that is Then output the final solution X best , jump to step ⑤; otherwise, continue to step ③.
[0156] ③CNC determines whether the differential evolution algorithm has reached the maximum number of iterations K. If it has not reached the maximum number of iterations K, the final solution X is used. best Perform differential evolution algorithm iteration as the next generation population and repeat steps 1) to 6); otherwise, proceed to step ④.
[0157] ④CNC determines whether there is any optimal iterative path that has not been adopted for the flow to be scheduled. If there is any optimal iterative path that has not been adopted for any flow to be scheduled, the method of sequentially selecting alternative paths is adopted: for the flow to be scheduled f1, f2, …, f m First, the next optimal iterative path in the K optimal path set of flow f1 is adopted, that is, the next optimal iterative path in KBest1 As the optimal iterative path input, repeat steps 1) to 6) of the differential evolution algorithm; if the scheduling end condition is not met, the second alternative path of flow f2, that is, As the optimal iterative path input, repeat the steps 1) to 6) of the differential evolution algorithm; repeat the above steps, if the flow f is used m The last candidate path is used as the optimal iterative path input. If the scheduling end condition is still not met, the output scheduling fails and the algorithm ends.
[0158] ⑤According to the final solution X output best The CNC calculates the time slots for all the terminal devices and switches in the network after calculating the initial sending time of all the scheduled flows. Finally, the CNC sends the configuration information of the terminal devices to the CUC and configures the terminal devices; the CNC configures the TSN switches, and the overall solution is completed.
[0159] It can be seen that in the above scheme, by selecting landmark switches from the complex time-sensitive network topology generated by the link layer discovery protocol LLDP, a landmark switch set is obtained, and the minimum hop matrix is calculated for each switch in the switch set of the complex time-sensitive network topology to obtain the minimum hop set. Based on the landmark switch set and the minimum hop set, the AStar search algorithm can be used to calculate the optimal path for each flow to be scheduled in the flow set to be scheduled to obtain the optimal path set, and according to the optimal path set, the Yen algorithm is used to optimize the optimal path to obtain the K-optimal path set, so that the differential evolution algorithm can be used for iterative calculation according to the K-optimal path set to obtain the reference time slot plan, and then the reference time slot plan can be scheduled to determine, so that when the reference time slot plan meets the scheduling end condition, the overall time slot plan can be obtained and configured, which can effectively improve and optimize the accuracy of business routing and scheduling algorithms, and is conducive to ensuring the certainty and reliability of business data transmission.
[0160] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0161] In one embodiment, a routing and scheduling device for complex time-sensitive networks is provided, and the routing and scheduling device for complex time-sensitive networks corresponds one-to-one with the routing and scheduling method for complex time-sensitive networks in the above embodiment. Figure 3 As shown, the routing and scheduling device for complex time-sensitive networks includes a selection module 101, a first processing module 102, a second processing module 103, a third processing module 104, a fourth processing module 105 and a fifth processing module 106. The functional modules are described in detail as follows:
[0162] A selection module 101 is used to select a landmark switch from a complex time-sensitive network topology generated by a link layer discovery protocol LLDP to obtain a landmark switch set;
[0163] The first processing module 102 is used to perform minimum hop count matrix calculation on each switch in the switch set of the complex time-sensitive network topology to obtain a minimum hop count set;
[0164] The second processing module 103 is used to calculate the optimal path for each flow to be scheduled in the flow set to be scheduled by using the AStar search algorithm based on the landmark switch set and the minimum hop count set to obtain the optimal path set;
[0165] The third processing module 104 is used to optimize the optimal path by using the Yen algorithm according to the optimal path set to obtain a K-optimal path set;
[0166] The fourth processing module 105 is used to perform iterative calculation using a differential evolution algorithm according to the K-optimal path set to obtain a reference time slot solution;
[0167] The fifth processing module 106 is used to perform scheduling determination on the reference time slot plan, so as to obtain and configure the overall time slot plan when the reference time slot plan meets the scheduling end condition.
[0168] In one embodiment, the second processing module is used to calculate the optimal path for each flow to be scheduled in the flow set to be scheduled based on the landmark switch set and the minimum hop count set by using the AStar search algorithm to obtain the optimal path set, which is specifically used to:
[0169] Obtaining a first minimum hop count from each landmark switch in the landmark switch set to a first switch; the first switch is any switch in the switch set;
[0170] Obtaining a second minimum number of hops from each landmark switch in the landmark switch set to a second switch; the second switch is any switch in the switch set except the first switch;
[0171] Determine an estimated value set according to the first minimum number of hops and the second minimum number of hops;
[0172] Determine an estimation function according to the estimation value set and the first constraint condition;
[0173] Determine an evaluation function of the AStar search according to an estimated cost from the first switch to the second switch and an actual cost from the sending end of each to-be-scheduled flow in the to-be-scheduled flow set to the first switch;
[0174] Based on the evaluation function, AStar search is started from the sending end of each flow to be scheduled in the set of flows to be scheduled and the receiving end of each flow to be scheduled in the set of flows to be scheduled to obtain the optimal path set.
[0175] In one embodiment, the third processing module is used to optimize the optimal path according to the optimal path set by using the Yen algorithm to obtain the K-optimal path set, and is specifically used to:
[0176] The optimal path obtained by iterating the optimal path set as the iteration object is recorded as the first K optimal iterative paths;
[0177] The switch passed by each optimal iterative path in the optimal path set is determined as the target switch to obtain the target switch set;
[0178] The optimal path between each two target switches in the target switch set is calculated by using AStar search to obtain the target optimal iterative path set;
[0179] Compare the target optimal iterative paths in the target optimal iterative path set, select the optimal path with the best AStar search evaluation function, and record it as the second K optimal iterative paths;
[0180] The optimal path obtained by iterating the first K optimal iterative paths and the second K optimal iterative paths as iterative objects is recorded as the third K optimal iterative paths;
[0181] According to the first K optimal iterative path, the second K optimal iterative path and the third K optimal iterative path, a K-optimal path set is obtained.
[0182] In one embodiment, the fourth processing module is used to perform iterative calculations using a differential evolution algorithm according to the K-optimal path set to obtain a reference time slot solution, specifically for:
[0183] Each K-optimal path in the K-optimal path set is taken as an iteration object to obtain a super-period set;
[0184] Determine the initial sending time of each flow to be scheduled in the set of flows to be scheduled according to the second constraint condition, and obtain the initial sending time set;
[0185] Determine an initial total time slot set according to the super period set and the initial sending time set;
[0186] Taking the initial total time slot set as input, the differential evolution algorithm is used to iteratively generate the reference time slot scheme.
[0187] In one embodiment, the fourth processing module is used to take the initial total time slot set as input and iteratively generate a reference time slot scheme using a differential evolution algorithm, specifically for:
[0188] Initialize the population at the initial total time slot using the first frame sending time of each flow to be scheduled in the flow set to be scheduled, to obtain an initialized population set;
[0189] Determine the differential evolution evaluation function according to the conflict degree of any two flows to be scheduled in the link;
[0190] Perform mutation operation on each initialization population in the initialization population set to obtain a set of mutation intermediates;
[0191] Perform a crossover operation on each variant intermediate in the variant intermediate set to obtain the next generation population set;
[0192] Using the differential evolution evaluation function, each initialization population in the initialization population set is compared with each next-generation population in the corresponding next-generation population set, and the optimal solution is selected as the reference time slot solution.
[0193] The present invention provides a routing and scheduling device for complex time-sensitive networks. By selecting landmark switches from the complex time-sensitive network topology generated by the link layer discovery protocol LLDP, a landmark switch set is obtained, and a minimum hop matrix calculation is performed on each switch in the switch set of the complex time-sensitive network topology to obtain a minimum hop set. Based on the landmark switch set and the minimum hop set, an optimal path calculation can be performed for each to-be-scheduled flow in the to-be-scheduled flow set by an AStar search algorithm to obtain an optimal path set, and based on the optimal path set, an optimal path optimization is performed by a Yen algorithm to obtain a K-optimal path set. Therefore, a differential evolution algorithm can be used to perform iterative calculations based on the K-optimal path set to obtain a reference time slot plan, and then a scheduling decision can be made on the reference time slot plan, so that when the reference time slot plan meets the scheduling end condition, an overall time slot plan can be obtained and the overall time slot plan can be configured, which can effectively improve and optimize the accuracy of service routing and scheduling algorithms, and is conducive to ensuring the certainty and reliability of service data transmission.
[0194] For the specific limitations of the routing and scheduling device for complex time-sensitive networks, please refer to the limitations of the routing and scheduling method for complex time-sensitive networks in the above text, which will not be repeated here. Each module in the above-mentioned routing and scheduling device for complex time-sensitive networks can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0195] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it implements the functions or steps of a routing and scheduling method service side for complex time-sensitive networks.
[0196] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of the client side of a routing and scheduling method for complex time-sensitive networks.
[0197] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0198] Selecting landmark switches from a complex time-sensitive network topology generated by a link layer discovery protocol LLDP to obtain a landmark switch set;
[0199] Performing minimum hop count matrix calculation on each switch in the switch set of the complex time-sensitive network topology to obtain a minimum hop count set;
[0200] Based on the landmark switch set and the minimum hop count set, the optimal path is calculated for each flow to be scheduled in the flow set to be scheduled by the AStar search algorithm to obtain the optimal path set;
[0201] According to the optimal path set, the optimal path is optimized by using the Yen algorithm to obtain the K-optimal path set;
[0202] According to the K-optimal path set, the differential evolution algorithm is used for iterative calculation to obtain the reference time slot plan;
[0203] A scheduling decision is made on the reference time slot plan, so as to obtain and configure the overall time slot plan when the reference time slot plan meets the scheduling end condition.
[0204] The present invention provides a computer device, which selects landmark switches from a complex time-sensitive network topology generated by a link layer discovery protocol LLDP to obtain a landmark switch set, and performs minimum hop matrix calculation on each switch in the switch set of the complex time-sensitive network topology to obtain a minimum hop set. Based on the landmark switch set and the minimum hop set, an AStar search algorithm can be used to perform optimal path calculation on each to-be-scheduled flow in a to-be-scheduled flow set to obtain an optimal path set, and based on the optimal path set, an optimal path optimization is performed by a Yen algorithm to obtain a K-optimal path set, so that a differential evolution algorithm can be used to perform iterative calculation based on the K-optimal path set to obtain a reference time slot plan, and then a scheduling decision can be made on the reference time slot plan, so that when the reference time slot plan meets a scheduling end condition, an overall time slot plan can be obtained and configured, which can effectively improve and optimize the accuracy of service routing and scheduling algorithms, and is conducive to ensuring the certainty and reliability of service data transmission.
[0205] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0206] Selecting landmark switches from a complex time-sensitive network topology generated by a link layer discovery protocol LLDP to obtain a landmark switch set;
[0207] Performing minimum hop count matrix calculation on each switch in the switch set of the complex time-sensitive network topology to obtain a minimum hop count set;
[0208] Based on the landmark switch set and the minimum hop count set, the optimal path is calculated for each flow to be scheduled in the flow set to be scheduled by the AStar search algorithm to obtain the optimal path set;
[0209] According to the optimal path set, the optimal path is optimized by using the Yen algorithm to obtain the K-optimal path set;
[0210] According to the K-optimal path set, the differential evolution algorithm is used for iterative calculation to obtain the reference time slot plan;
[0211] A scheduling decision is made on the reference time slot plan, so as to obtain and configure the overall time slot plan when the reference time slot plan meets the scheduling end condition.
[0212] The present invention provides a computer-readable storage medium, which selects landmark switches from a complex time-sensitive network topology generated by a link layer discovery protocol LLDP to obtain a landmark switch set, and performs minimum hop matrix calculation on each switch in the switch set of the complex time-sensitive network topology to obtain a minimum hop set. Based on the landmark switch set and the minimum hop set, an AStar search algorithm can be used to perform optimal path calculation on each to-be-scheduled flow in a to-be-scheduled flow set to obtain an optimal path set, and based on the optimal path set, an optimal path optimization is performed by a Yen algorithm to obtain a K-optimal path set, so that a differential evolution algorithm can be used to perform iterative calculation based on the K-optimal path set to obtain a reference time slot plan, and then a scheduling decision can be made on the reference time slot plan, so that when the reference time slot plan meets the scheduling end condition, an overall time slot plan can be obtained and the overall time slot plan can be configured, which can effectively improve and optimize the accuracy of service routing and scheduling algorithms, and is conducive to ensuring the certainty and reliability of service data transmission.
[0213] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0214] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0215] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0216] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A routing and scheduling method for complex time-sensitive networks, characterized in that: The method comprises: Selecting landmark switches from a complex time-sensitive network topology generated by a link layer discovery protocol LLDP to obtain a landmark switch set; Performing minimum hop count matrix calculation on each switch in the switch set of the complex time-sensitive network topology to obtain a minimum hop count set; Based on the landmark switch set and the minimum hop count set, an optimal path is calculated for each flow to be scheduled in the flow set to be scheduled by using an AStar search algorithm to obtain an optimal path set; According to the optimal path set, the optimal path is optimized by using the Yen algorithm to obtain a K-optimal path set; According to the K-optimal path set, a differential evolution algorithm is used to perform iterative calculation to obtain a reference time slot solution; A scheduling decision is performed on the reference time slot plan, so as to obtain an overall time slot plan and configure the overall time slot plan when the reference time slot plan meets a scheduling end condition.
2. The routing and scheduling method for complex time-sensitive networks according to claim 1, characterized in that: The method of performing optimal path calculation on each flow to be scheduled in the set of flows to be scheduled of the complex time-sensitive network topology based on the set of landmark switches and the set of minimum hop counts through a search algorithm to obtain an optimal path set includes: Obtaining a first minimum number of hops from each landmark switch in the landmark switch set to a first switch; the first switch is any switch in the switch set; Obtaining a second minimum number of hops from each landmark switch in the landmark switch set to a second switch; the second switch is any switch in the switch set except the first switch; Determining an estimated value set according to the first minimum number of hops and the second minimum number of hops; Determining an estimation function according to the estimation value set and the first constraint condition; Determine an evaluation function of AStar search according to an estimated cost from the first switch to the second switch and an actual cost from a sending end of each to-be-scheduled flow in the to-be-scheduled flow set to the first switch; Based on the evaluation function, an AStar search is started from a sending end of each flow to be scheduled in the set of flows to be scheduled and a receiving end of each flow to be scheduled in the set of flows to be scheduled to obtain an optimal path set.
3. The routing and scheduling method for complex time-sensitive networks according to claim 2, characterized in that: According to the optimal path set, the optimal path is optimized by using the Yen algorithm to obtain a K-optimal path set, including: The optimal path obtained by iterating the optimal path set as the iteration object is recorded as the first K optimal iterative paths; The switch passed by each optimal iterative path in the optimal path set is determined as the target switch to obtain the target switch set; The optimal path between each two target switches in the target switch set is calculated by using AStar search to obtain the target optimal iterative path set; Compare the target optimal iterative paths in the target optimal iterative path set, select the optimal path with the best AStar search evaluation function, and record it as the second K optimal iterative paths; An optimal path obtained by iterating the first K optimal iterative paths and the second K optimal iterative paths as iterative objects is recorded as a third K optimal iterative path; A K-optimal path set is obtained according to the first K-optimal iterative paths, the second K-optimal iterative paths and the second K-optimal iterative paths.
4. The routing and scheduling method for complex time-sensitive networks according to claim 3, characterized in that: The step of iteratively calculating the reference time slot scheme using a differential evolution algorithm according to the K-optimal path set includes: Taking each K-optimal path in the K-optimal path set as an iteration object, obtaining a super-period set; Determine the initial sending time of each to-be-scheduled flow in the to-be-scheduled flow set according to the second constraint condition, and obtain an initial sending time set; Determining an initial total time slot set according to the super period set and the initial sending time set; The initial total time slot set is taken as input, and a differential evolution algorithm is used to iteratively generate a reference time slot scheme.
5. The routing and scheduling method for complex time-sensitive networks according to claim 4, characterized in that: The method of taking the initial total time slot set as input and iteratively generating a reference time slot scheme using a differential evolution algorithm comprises: Initialize the population at the initial total time slot of the first frame sending time of each flow to be scheduled in the flow set to be scheduled, to obtain an initialized population set; Determine the differential evolution evaluation function according to the conflict degree of any two flows to be scheduled in the link; Perform mutation operation on each initialization population in the initialization population set to obtain a mutation intermediate set; Perform a crossover operation on each variant intermediate in the variant intermediate set to obtain the next generation population set; The differential evolution evaluation function is used to compare each initialization population in the initialization population set with each next generation population in the corresponding next generation population set, and the optimal solution is selected as the reference time slot solution.
6. A routing and scheduling device for complex time-sensitive networks, characterized in that: The routing and scheduling device for complex time-sensitive networks includes: A selection module is used to select a landmark switch from a complex time-sensitive network topology generated by a link layer discovery protocol LLDP to obtain a landmark switch set; A first processing module is used to perform minimum hop count matrix calculation on each switch in the switch set of the complex time-sensitive network topology to obtain a minimum hop count set; A second processing module is used to calculate the optimal path for each flow to be scheduled in the flow set to be scheduled based on the landmark switch set and the minimum hop count set by using an AStar search algorithm to obtain an optimal path set; A third processing module is used to optimize the optimal path by using the Yen algorithm according to the optimal path set to obtain a K-optimal path set; A fourth processing module, configured to perform iterative calculation using a differential evolution algorithm according to the K-optimal path set to obtain a reference time slot solution; The fifth processing module is used to perform scheduling judgment on the reference time slot plan, so as to obtain the overall time slot plan and configure the overall time slot plan when the reference time slot plan meets the scheduling end condition.
7. The routing and scheduling device for complex time-sensitive networks according to claim 6, characterized in that: The second processing module is used to calculate the optimal path for each flow to be scheduled in the flow set to be scheduled based on the landmark switch set and the minimum hop count set by using the AStar search algorithm to obtain the optimal path set, specifically for: Obtaining a first minimum number of hops from each landmark switch in the landmark switch set to a first switch; the first switch is any switch in the switch set; Obtaining a second minimum number of hops from each landmark switch in the landmark switch set to a second switch; the second switch is any switch in the switch set except the first switch; Determining an estimated value set according to the first minimum number of hops and the second minimum number of hops; Determining an estimation function according to the estimation value set and the first constraint condition; Determine an evaluation function of AStar search according to an estimated cost from the first switch to the second switch and an actual cost from a sending end of each to-be-scheduled flow in the to-be-scheduled flow set to the first switch; Based on the evaluation function, an AStar search is started from a sending end of each flow to be scheduled in the set of flows to be scheduled and a receiving end of each flow to be scheduled in the set of flows to be scheduled to obtain an optimal path set.
8. The routing and scheduling device for complex time-sensitive networks according to claim 7, characterized in that: The third processing module is used to optimize the optimal path according to the optimal path set by using the Yen algorithm to obtain a K-optimal path set, specifically for: The optimal path obtained by iterating the optimal path set as the iteration object is recorded as the first K optimal iterative paths; The switch passed by each optimal iterative path in the optimal path set is determined as the target switch to obtain the target switch set; The optimal path between each two target switches in the target switch set is calculated by using AStar search to obtain the target optimal iterative path set; Compare the target optimal iterative paths in the target optimal iterative path set, select the optimal path with the best AStar search evaluation function, and record it as the second K optimal iterative paths; An optimal path obtained by iterating the first K optimal iterative paths and the second K optimal iterative paths as iterative objects is recorded as a third K optimal iterative path; A K-optimal path set is obtained according to the first K-optimal iterative paths, the second K-optimal iterative paths and the second K-optimal iterative paths.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the routing and scheduling method for complex time-sensitive networks as described in any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the routing and scheduling method for complex time-sensitive networks as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Delay deterministic transmission method based on routing scheduling and joint optimization
CN113300960A
DDQN-based TSN routing method
CN116132353A
Time-sensitive network routing and scheduling joint optimization method
CN117914769A
Global route planning method based on traffic perception road network
CN118097943A
Deadlock-free multipath routing for direct interconnect networks
WO2022269357A1