Vehicle-mounted Ethernet time sensitive traffic planning method based on TSN
By adopting a time-sensitive traffic planning method based on TSN in vehicle Ethernet, and optimizing data flow samples using network topology diagram, priority analysis and genetic simulation annealing algorithm, the problem of insufficient data frame scheduling accuracy and communication fluency in vehicle Ethernet is solved, and more efficient data frame scheduling and communication performance are achieved.
Patent Information
- Application Number
- CN202411740639.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing in-vehicle time-sensitive traffic planning methods have shortcomings in data frame scheduling accuracy and communication fluency, especially the modeling of time-aware plasticizers is too simplified, resulting in the gated state of multiple traffic queues being mutually exclusive, affecting the operation of other traffic queues.
The time-sensitive traffic planning method of vehicle-mounted Ethernet based on TSN is adopted to create a network topology map by obtaining data flow information, analyze the priority of each data flow, and determine the forwarding path and gating list. The data flow samples are optimized in combination with genetic algorithms and simulated annealing algorithms to improve the accuracy of data frame scheduling.
By optimizing data flow samples and scheduling paths, the accuracy and communication fluency of data frame scheduling during on-board Ethernet communication is significantly improved, and the problem of multiple traffic queues mutually exclusive in the existing methods is solved.
Smart Images

Figure CN119561883A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method for time-sensitive traffic planning of an in-vehicle Ethernet based on TSN. Background Art
[0002] At present, TSN refers to time-sensitive networking, which is a protocol family that achieves deterministic minimum time delay in non-deterministic Ethernet. Based on the standard Ethernet protocol, time-sensitive networking expands the capabilities of time synchronization, time-aware traffic scheduling, and seamless redundant traffic transmission. In actual applications, different hardware inside the vehicle comes from different manufacturers. The precise mobilization of data frames during communication on the in-vehicle Ethernet has high requirements on the hardware inside the vehicle, and the communication fluency of the in-vehicle Ethernet is not smooth enough. Therefore, it is very important to plan the time-sensitive traffic of the in-vehicle Ethernet based on TSN.
[0003] The existing method for planning time-sensitive traffic in automotive Ethernet is to visualize the TSN network through RTaW and realize the precise scheduling of data frames with fixed frame length or fixed priority as the sending mode. However, in the existing method for planning time-sensitive traffic in automotive Ethernet, the modeling of the time-aware shaper by RTaW is too simplified, and only a single traffic queue can be protected. The gating states of the protected traffic queue and other traffic queues are mutually exclusive, which affects the operation of other traffic queues. The accuracy of data frame scheduling during automotive Ethernet communication is low, and the communication fluency of automotive Ethernet is poor, so there is room for improvement. Summary of the invention
[0004] In order to improve the accuracy of data frame scheduling during in-vehicle Ethernet communication, the present application provides a TSN-based in-vehicle Ethernet time-sensitive traffic planning method.
[0005] In the first aspect, the TSN-based vehicle Ethernet time-sensitive traffic planning method provided by the present application adopts the following technical solutions:
[0006] The TSN-based vehicle Ethernet time-sensitive traffic planning method includes the following steps:
[0007] Obtain data flow information and create a network topology diagram based on the user scenario of the user to be tested and the data flow information;
[0008] Analyze the priority of each data flow based on the data flow information to obtain a data flow priority result, determine the forwarding path of each data flow based on the data flow priority result and the data flow information to obtain forwarding path matching information, and determine the forwarding table entry information of each data flow to obtain a forwarding table entry data set, and set the gating list of each data flow based on the forwarding path matching information and the forwarding table entry data to obtain gating list generation information;
[0009] Repeat the above steps to obtain multiple data stream samples for simulation operation, detect the effective simulation information of each data stream sample during the simulation process, calculate the fitness f(x) of each data stream sample based on the effective simulation information, and divide the data stream samples based on the fitness f(x) of each data stream sample to obtain the data stream sample division result;
[0010] Based on the data stream sample division result, genetic operations are performed on some data stream samples in the data stream sample division result to obtain genetic data stream samples;
[0011] Based on the simulated annealing algorithm, a simulated annealing operation is performed on each data stream sample in the genetic data stream sample to obtain a simulated annealing data stream sample;
[0012] Determine whether each data stream sample in the simulated annealing data stream sample meets the requirements for ending the iteration. If so, end the iteration. If not, repeat the genetic operation and the simulated annealing operation on each data stream sample in the simulated annealing data stream sample until the requirements for ending the iteration are met, thereby ending the iteration. Combine the first-tier data stream samples and the simulated annealing data stream samples to obtain the final data stream sample. Calculate the fitness f(x) of each data stream sample in the final data stream sample and compare them to obtain the final fitness comparison result. Based on the final fitness comparison result, obtain the optimal solution for the data stream.
[0013] Preferably, a user scenario in a vehicle environment where the user to be tested is located is detected to obtain a vehicle user scenario, functional domains are divided based on the vehicle user scenario to obtain a functional domain division result, and each functional domain is numbered based on the functional domain division result to obtain domain number information;
[0014] Based on the functional domain division result, multiple specific functions of each functional domain are obtained to obtain specific functional information, and based on the specific functional information, a virtual local area network is assigned to each specific functional information in different functional domains, and each virtual local area network is numbered to obtain virtual local area network number information;
[0015] Setting an IP subnet for each specific functional information, marking and numbering different IP subnets to obtain first IP address information;
[0016] Detecting Ethernet nodes and numbering the Ethernet nodes to obtain Ethernet node numbering information;
[0017] Acquire a network card database, and establish a signal link between the network card database and the Ethernet node, wherein the network card database includes multiple network cards, and the network cards are signal-connected to the Ethernet nodes in a one-to-one correspondence, wherein the MAC address of each network card has a unique attribute;
[0018] Based on the specific function information of each functional domain, determine whether each specific function communicates with the Ethernet node, mark the IP subnet corresponding to the specific function information communicating with the Ethernet node and add the second IP address information;
[0019] Binding the second IP address information and the virtual local area network number information corresponding to the same specific function information;
[0020] Acquire data flow information and record and cache the data flow information, wherein the data flow information includes source node IP information, target node IP set, transmission time interval distribution characteristic information, priority information, frame length distribution characteristic information, and redundant path transmission path use judgment information;
[0021] A network topology diagram is drawn based on the domain numbering information, the virtual local area network numbering information, the first IP address information, the Ethernet node numbering information, the second IP address information and the data flow information.
[0022] Preferably, the priority of each data stream is analyzed based on the data stream information to obtain a data stream priority result;
[0023] Obtain a first priority data flow in the data flow priority result, obtain a forwarding path database, the forwarding path database includes multiple feasible forwarding paths, randomly select a forwarding path to obtain a first forwarding path, and match the first priority data flow with the first forwarding path;
[0024] Based on the redundant path transmission path use judgment information, determine whether the first priority data flow needs redundant path transmission, if the first priority data flow needs redundant path transmission, set the first forwarding table entry information, mark the first forwarding table entry information on the first forwarding path corresponding to the first priority data flow and the output port of the switch, the first forwarding table entry information includes the first MAC address information, the first virtual local area network number information and the first port number information;
[0025] The forwarding path of each data flow in the data flow priority result is selected in turn, and when selecting the forwarding path of each data flow, it is determined whether the virtual local area network number information of the forwarding path that has been matched is overlapped. If it is repeated, the forwarding path of the data flow is reselected, and the forwarding path matching information is obtained based on the forwarding path of each data flow;
[0026] Based on the redundant path transmission path use judgment information, determine whether each data stream needs redundant path transmission, and if redundant path transmission is required, set the forwarding table entry information of the corresponding data stream, and combine the first forwarding table entry information with the forwarding table entry information of each data stream to form a forwarding table entry data set;
[0027] According to the forwarding path matching information and the forwarding table entry data set, a gating list of each data flow is generated based on a GCL generation algorithm to obtain gating list generation information.
[0028] Preferably, detecting whether each data flow has a frame preemption requirement, and recording the data flow with the frame preemption requirement as a frame preemption requirement data flow;
[0029] Obtaining the security level of each data flow to obtain a data flow security level value, comparing the data flow security level value with a preset data flow security level threshold, and recording a data flow whose data flow security level value is greater than or equal to the data flow security level threshold as a data flow with a higher security level;
[0030] Obtain a priority logic AND gate, filter out data flows that are frame preemption demand data flows and data flows with a higher security level based on the priority logic AND gate, and mark them as first priority data flows;
[0031] Based on the transmission time interval distribution characteristic information, determine whether the transmission time interval distribution characteristics of the data frames of the data streams other than the first priority data stream belong to a constant distribution, filter out the data streams whose transmission time interval distribution characteristics of the data frames belong to a constant distribution and mark them as constant distribution data streams;
[0032] Based on the transmission time interval distribution characteristic information, transmission time interval data is obtained, and a data flow in the constant distribution data flow whose transmission time interval data is less than or equal to a preset transmission time interval threshold is marked as a second priority data flow, and a data flow in the constant distribution data flow whose transmission time interval data is greater than the preset transmission time interval threshold is marked as a third priority data flow;
[0033] Determine whether the data stream other than the first priority data stream, the second priority data stream and the third priority data stream belongs to the vehicle body camera data stream, and if it belongs to the vehicle body camera data stream, mark it as the fourth priority data stream;
[0034] Determine whether the data streams other than the first priority data stream, the second priority data stream, the third priority data stream, and the fourth priority data stream belong to the vehicle body laser radar data stream or the millimeter wave radar data stream, and if they belong to the vehicle body laser radar data stream or the millimeter wave radar data stream, mark them as the fifth priority data stream;
[0035] Data flows other than the first priority data flow, the second priority data flow, the third priority data flow, the fourth priority data flow, and the fifth priority data flow are recorded as sixth priority data flows.
[0036] Preferably, the above steps are repeated to obtain multiple data stream samples to obtain data stream sample information, obtain omnetpp, obtain an input template based on omnetpp, and obtain input file information of each data stream sample information based on the data stream sample information and the input template;
[0037] Based on the data stream sample information, a simulation environment is created for each data stream sample, each data stream sample is simulated in the simulation environment, and after the simulation is completed, a simulation completion result is output;
[0038] Based on the simulation results, the end-to-end delay of each data stream sample in the simulation process is detected and the maximum value is selected to obtain the maximum end-to-end delay f 1 (x), based on the simulation results, the jitter of each data stream sample during the simulation process is detected and the maximum value is selected to obtain the maximum jitter f 2 (x), based on the simulation completion results, detect the number of packet loss of each data stream sample during the simulation process and select the maximum value to obtain the maximum packet loss number f 3 (x), based on the simulation completion results, detect the length of each port queue of each data flow sample during the simulation process and select the maximum value to obtain the maximum queue length f 4 (x), based on the simulation completion results, the throughput of each data stream sample in the simulation process is detected and the maximum value is selected to obtain the maximum throughput f 5 (x), maximum end-to-end delay f 1 (x), maximum jitter f 2 (x), maximum number of packet losses f 3 (x), maximum queue length f 4 (x) and the maximum throughput f 5 (x) combining to form effective simulation information;
[0039] According to the maximum end-to-end delay f 1 (x), maximum jitter f 2 (x), maximum number of packet losses f 3 (x), maximum queue length f 4 (x) and the maximum throughput f 5 (x), based on the fitness function Calculate and obtain the fitness f(x) of each data stream sample;
[0040] Compare the fitness f(x) of each data stream sample in the data stream sample information to obtain a fitness comparison result, perform ascending sorting based on the fitness comparison result to obtain a fitness ascending sorting result, screen out the top 10% of the data stream samples based on the fitness ascending sorting result and mark them as first-tier data stream samples, and mark the data stream samples other than the first-tier data stream as second-tier data stream samples;
[0041] The first echelon data stream samples and the second echelon data stream samples are combined to form a data stream sample division result.
[0042] Preferably, two data stream samples are randomly selected from the second echelon data stream samples of the data stream sample division result, and are marked as data stream sample A and data stream sample B, respectively, wherein the fitness f(x) of data stream sample A is greater than or equal to the fitness f(x) of data stream sample B;
[0043] The offspring data stream is obtained by integrating data stream sample A and data stream sample B, and the fitness f(x) of the offspring data stream is calculated;
[0044] The data stream sample A is replaced by the child data stream, and the second echelon data stream sample is updated to obtain the child replacement data stream sample;
[0045] The injection time of the flow at the beginning of the simulation of each data flow sample in the offspring replacement data flow sample is mutated to obtain the inherited data flow sample.
[0046] Preferably, detecting whether the number of iterations of each data stream sample in the simulated annealing data stream sample reaches an iteration number threshold, and outputting an iteration number satisfaction result if the iteration number threshold is reached;
[0047] Detect whether the solution time of each data stream sample in the simulated annealing data stream sample reaches the solution time threshold, and if it reaches the solution time threshold, output the solution time satisfaction result;
[0048] Obtain an iterative logic OR gate, and terminate the iteration when the iterative logic OR gate receives a result that the number of iterations meets the result or the solution time meets the result, otherwise repeatedly perform genetic operations and simulated annealing operations on the simulated annealing data stream sample until the iterative logic OR gate receives a result that the number of iterations meets the result or the solution time meets the result, then terminate the iteration and output iteration end information;
[0049] After receiving the iteration end information, the final data stream sample is obtained by combining the first echelon data stream sample and the simulated annealing data stream sample;
[0050] Creating a simulation environment for the final data stream sample, simulating the final data stream sample in the simulation environment, detecting the final effective simulation information of the final data stream sample during the simulation process, and calculating the fitness f(x) of the final data stream sample based on the final effective simulation information;
[0051] The fitness f(x) of each data stream sample in the final data stream sample is compared to obtain a final fitness comparison result, wherein the data stream sample with the highest fitness in the final fitness comparison result is the optimal solution for the data stream.
[0052] In the second aspect, the present application provides a TSN-based vehicle Ethernet time-sensitive traffic planning system, which adopts the following technical solutions:
[0053] The TSN-based automotive Ethernet time-sensitive traffic planning system includes:
[0054] The network topology analysis module is used to obtain data flow information and create a network topology map based on the user scenario of the user to be tested and the data flow information;
[0055] a gating list generation module, configured to analyze the priority of each data flow based on the data flow information to obtain a data flow priority result, determine the forwarding path of each data flow based on the data flow priority result and the data flow information to obtain forwarding path matching information, and determine the forwarding table entry information of each data flow to obtain a forwarding table entry data set, and set the gating list of each data flow based on the forwarding path matching information and the forwarding table entry data to obtain gating list generation information;
[0056] A data stream fitness analysis module is used to repeat the above steps to obtain multiple data stream samples for simulation operation, detect the effective simulation information of each data stream sample during the simulation process, calculate the fitness f(x) of each data stream sample based on the effective simulation information, and divide the data stream samples based on the fitness f(x) of each data stream sample to obtain the data stream sample division result;
[0057] A data stream sample inheritance module is configured to perform inheritance operations on some data stream samples in the data stream sample division results based on the data stream sample division results to obtain inherited data stream samples;
[0058] A data stream sample simulated annealing module is configured to perform a simulated annealing operation on each data stream sample in the genetic data stream sample based on a simulated annealing algorithm to obtain a simulated annealing data stream sample;
[0059] The optimal solution analysis module is used to determine whether each data stream sample in the simulated annealing data stream sample meets the requirements for ending the iteration. If the requirements for ending the iteration are met, the iteration is ended. If the requirements for ending the iteration are not met, the genetic operation and the simulated annealing operation are repeated on each data stream sample in the simulated annealing data stream sample until the requirements for ending the iteration are met, thereby ending the iteration. The first-tier data stream samples and the simulated annealing data stream samples are combined to obtain the final data stream sample, the fitness f(x) of each data stream sample in the final data stream sample is calculated and compared to obtain the final fitness comparison result, and the optimal solution of the data stream is obtained based on the final fitness comparison result.
[0060] In summary, the present application includes at least one of the following beneficial technical effects:
[0061] 1. Create a network topology diagram through data flow information, analyze the priority of each data flow to obtain the data flow priority result, determine the forwarding path matching information and forwarding table entry information of each data flow based on the data flow priority result, and then set the gating list generation information, repeat the above steps to obtain multiple data flow samples, improve the accuracy of the data flow samples, simulate multiple data flow samples, detect the effective simulation information of each data flow sample during the simulation process, calculate the fitness f(x) of each data flow sample based on the effective policy information, improve the accuracy of the fitness f(x) of the data flow sample, and divide the data flow samples based on the fitness f(x) of each data flow sample. The data stream sample division results are obtained by genetic operation and simulated annealing operation on the data stream samples, the simulation environment is constructed to the maximum extent, the data frame scheduling results are optimized, the accuracy of data frame scheduling during vehicle Ethernet communication is improved, and it is judged whether the iteration of each data stream sample in the simulated annealing data stream sample has ended. If the iteration has ended, the first-tier data stream samples and the simulated annealing data stream samples are combined to obtain the final data stream sample, the fitness f(x) of each data stream sample in the final data stream sample is calculated, and the optimal solution of the data stream is selected, and the data frame scheduling results are further optimized, which further improves the accuracy of data frame scheduling during vehicle Ethernet communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 This is a flow chart of a method for planning time-sensitive traffic in an in-vehicle Ethernet based on TSN, which is mainly reflected in this embodiment;
[0063] Figure 2 This is a module diagram of a TSN-based vehicle Ethernet time-sensitive traffic planning system.
[0064] Figure numerals: 1. Network topology analysis module; 2. Gated list generation module; 3. Data stream fitness analysis module; 4. Data stream sample genetic module; 5. Data stream sample simulated annealing module; 6. Optimal solution analysis module. DETAILED DESCRIPTION
[0065] The present application is further described in detail below in conjunction with the accompanying drawings.
[0066] The embodiment of the present application discloses a method for time-sensitive traffic planning of an in-vehicle Ethernet based on TSN.
[0067] The TSN-based vehicle Ethernet time-sensitive traffic planning method includes the following steps:
[0068] Reference Figure 1 , step S1, obtain data flow information, and create a network topology map based on the user scenario of the user to be tested and the data flow information. Step S1 specifically includes the following sub-steps:
[0069] Step S11, detecting a user scenario in the vehicle environment where the user to be tested is located to obtain a vehicle user scenario, performing functional domain division based on the vehicle user scenario to obtain a functional domain division result, and numbering each functional domain based on the functional domain division result to obtain domain number information.
[0070] Step S12, based on the functional domain division result, multiple specific functions of each functional domain are obtained to obtain specific functional information, based on the specific functional information, each specific functional information in different functional domains is assigned a virtual local area network, and each virtual local area network is numbered to obtain virtual local area network numbering information.
[0071] Step S13, setting an IP subnet for each specific functional information, marking and numbering different IP subnets to obtain first IP address information.
[0072] Step S14: Detect Ethernet nodes and number the Ethernet nodes to obtain Ethernet node numbering information.
[0073] Step S15, obtaining a network card database, and establishing a signal link between the network card database and the Ethernet node, wherein the network card database includes multiple network cards, and signal connections are made between the network cards and the Ethernet nodes in a one-to-one correspondence, wherein the MAC address of each network card has a unique attribute.
[0074] Step S16, judging whether each specific function communicates with the Ethernet node based on the specific function information of each functional domain, marking the IP subnet corresponding to the specific function information communicating with the Ethernet node and adding the second IP address information.
[0075] Step S17, binding the second IP address information and the virtual local area network number information corresponding to the same specific function information.
[0076] Step S18, obtain data flow information and record and cache the data flow information, the data flow information includes source node IP information, target node IP set, sending time interval distribution characteristic information, priority information, frame length distribution characteristic information and redundant path transmission path usage judgment information.
[0077] Step S19, drawing a network topology diagram based on the domain number information, the virtual local area network number information, the first IP address information, the Ethernet node number information, the second IP address information and the data flow information.
[0078] Reference Figure 1, step S2, analyzing the priority of each data flow based on the data flow information to obtain a data flow priority result, determining the forwarding path of each data flow based on the data flow priority result and the data flow information to obtain forwarding path matching information, and determining the forwarding table entry information of each data flow to obtain a forwarding table entry data set, and setting the gating list of each data flow based on the forwarding path matching information and the forwarding table entry data to obtain gating list generation information. Step S2 specifically includes the following sub-steps:
[0079] Step S21, analyzing the priority of each data stream based on the data stream information to obtain a data stream priority result. Step S21 specifically includes the following sub-steps:
[0080] Step S211 , detecting whether each data flow has a frame preemption requirement, and recording the data flow with a frame preemption requirement as a frame preemption requirement data flow.
[0081] Step S212, obtaining the security level of each data flow to obtain a data flow security level value, comparing the data flow security level value with a preset data flow security level threshold, and recording the data flow whose data flow security level value is greater than or equal to the data flow security level threshold as a data flow with a higher security level.
[0082] Step S213, obtaining a priority logic AND gate, filtering out data flows that are frame preemption demand data flows and data flows with a higher security level based on the priority logic AND gate, and marking them as first priority data flows.
[0083] Step S214, based on the sending time interval distribution characteristic information, determine whether the sending time interval distribution characteristics of the data frames of the data streams other than the first priority data stream belong to a constant distribution, filter out the data streams whose sending time interval distribution characteristics belong to a constant distribution and mark them as constant distribution data streams.
[0084] Step S215, based on the sending time interval distribution characteristic information, the sending time interval data is obtained, and the data flow in the constant distribution data flow whose sending time interval data is less than or equal to the preset sending time interval threshold is marked as the second priority data flow, and the data flow in the constant distribution data flow whose sending time interval data is greater than the preset sending time interval threshold is marked as the third priority data flow.
[0085] Step S216, determining whether the data streams other than the first priority data stream, the second priority data stream and the third priority data stream belong to the vehicle body camera data stream, and if so, marking them as the fourth priority data stream.
[0086] Step S217, determine whether the data stream other than the first priority data stream, the second priority data stream, the third priority data stream and the fourth priority data stream belongs to the vehicle body laser radar data stream or the millimeter wave radar data stream. If it belongs to the vehicle body laser radar data stream or the millimeter wave radar data stream, it is marked as the fifth priority data stream.
[0087] Step S218: data flows other than the first priority data flow, the second priority data flow, the third priority data flow, the fourth priority data flow, and the fifth priority data flow are recorded as sixth priority data flows.
[0088] Step S22, obtain the first priority data flow in the data flow priority result, obtain a forwarding path database, the forwarding path database includes multiple feasible forwarding paths, randomly select a forwarding path to obtain a first forwarding path, and match the first priority data flow with the first forwarding path.
[0089] Step S23, based on the redundant path transmission path usage judgment information, determine whether the first priority data flow requires redundant path transmission. If the first priority data flow requires redundant path transmission, set the first forwarding table entry information, and mark the first forwarding table entry information on the first forwarding path corresponding to the first priority data flow and on the output port of the switch. The first forwarding table entry information includes the first mac address information, the first virtual LAN number information and the first port number information.
[0090] Step S24, the forwarding path of each data stream in the data stream priority result is selected in turn, and when selecting the forwarding path of each data stream, it is determined whether the virtual LAN number information of the forwarding path that has been matched is overlapped. If it is repeated, the forwarding path of the data stream is reselected, and the forwarding path matching information is obtained based on the forwarding path of each data stream.
[0091] Step S25, based on the redundant path transmission path usage judgment information, determine whether each data stream needs redundant path transmission. If redundant path transmission is required, set the forwarding table entry information of the corresponding data stream. The first forwarding table entry information is combined with the forwarding table entry information of each data stream to form a forwarding table entry data set.
[0092] Step S26 , generating a gating list for each data flow based on a GCL generation algorithm according to the forwarding path matching information and the forwarding table entry data set to obtain gating list generation information.
[0093] Reference Figure 1, step S3, repeat the above steps to obtain multiple data stream samples for simulation operation, detect the effective simulation information of each data stream sample during the simulation process, calculate the fitness f(x) of each data stream sample based on the effective simulation information, and divide the data stream samples based on the fitness f(x) of each data stream sample to obtain the data stream sample division result. Step S3 specifically includes the following sub-steps:
[0094] Step S31, repeat the above steps to obtain multiple data stream samples to obtain data stream sample information, obtain omnetpp, obtain an input template based on omnetpp, and obtain input file information of each data stream sample information based on the data stream sample information and the input template.
[0095] Step S32: Create a simulation environment for each data stream sample based on the data stream sample information. It should be noted that the simulation environment in the embodiment of the present application refers to a complete simulation environment supported by omnetpp6.0.3 and inet4.5.2. Simulate each data stream sample in the simulation environment, and output the simulation completion result after the simulation is completed.
[0096] Step S33: based on the simulation completion result, the end-to-end delay of each data stream sample in the simulation process is detected and the maximum value is selected to obtain the maximum end-to-end delay f 1 (x), based on the simulation results, the jitter of each data stream sample during the simulation process is detected and the maximum value is selected to obtain the maximum jitter f 2 (x), based on the simulation completion results, detect the number of packet loss of each data stream sample during the simulation process and select the maximum value to obtain the maximum packet loss number f 3 (x), based on the simulation completion results, detect the length of each port queue of each data flow sample during the simulation process and select the maximum value to obtain the maximum queue length f 4 (x), based on the simulation completion results, the throughput of each data stream sample in the simulation process is detected and the maximum value is selected to obtain the maximum throughput f 5 (x), maximum end-to-end delay f 1 (x), maximum jitter f 2 (x), maximum number of packet losses f 3 (x), maximum queue length f 4 (x) and the maximum throughput f 5 (x) Combine to form effective simulation information.
[0097] Step S34: according to the maximum end-to-end delay f 1 (x), maximum jitter f 2 (x), maximum number of packet losses f 3 (x), maximum queue length f 4 (x) and the maximum throughput f 5 (x), based on the fitness function The fitness f(x) of each data stream sample is calculated.
[0098] Step S35, compare the fitness f(x) of each data stream sample in the data stream sample information to obtain a fitness comparison result, perform ascending sorting based on the fitness comparison result to obtain a fitness ascending sorting result, screen out the top 10% of the data stream samples based on the fitness ascending sorting result and mark them as first-tier data stream samples, and mark the data stream samples other than the first-tier data stream as second-tier data stream samples.
[0099] Step S36: The first echelon data stream samples and the second echelon data stream samples are combined to form a data stream sample division result.
[0100] Reference Figure 1 , step S4, based on the data stream sample division result, genetic operations are performed on some data stream samples in the data stream sample division result to obtain genetic data stream samples. Step S4 specifically includes the following sub-steps:
[0101] Step S41, randomly select two data stream samples from the second echelon of data stream samples in the data stream sample division result, and mark them as data stream sample A and data stream sample B respectively, wherein the fitness f(x) of data stream sample A is greater than or equal to the fitness f(x) of data stream sample B.
[0102] Step S42, synthesizing the data stream sample A and the data stream sample B to obtain a child data stream, and calculating the fitness f(x) of the child data stream.
[0103] Step S43: Replace the data stream sample A with the child data stream, and update the second-tier data stream sample to obtain a child replacement data stream sample.
[0104] Step S44, mutating the injection time of the flow at the beginning of the simulation of each data flow sample in the offspring replacement data flow sample to obtain a genetic data flow sample.
[0105] Reference Figure 1 , step S5, performing a simulated annealing operation on each data stream sample in the genetic data stream sample based on a simulated annealing algorithm to obtain a simulated annealing data stream sample.
[0106] Reference Figure 1, step S6, determine whether each data stream sample in the simulated annealing data stream sample meets the requirements for ending the iteration, if the requirements for ending the iteration are met, then the iteration is ended, if the requirements for ending the iteration are not met, then the genetic operation and the simulated annealing operation are repeated on each data stream sample in the simulated annealing data stream sample until the requirements for ending the iteration are met, thereby ending the iteration, combining the first echelon data stream samples and the simulated annealing data stream samples to obtain the final data stream sample, calculating the fitness f(x) of each data stream sample in the final data stream sample and comparing them to obtain the final fitness comparison result, and obtaining the optimal solution for the data stream based on the final fitness comparison result. Step S6 specifically includes the following sub-steps:
[0107] Step S61, detecting whether the iteration number of each data stream sample in the simulated annealing data stream sample reaches an iteration number threshold, and outputting an iteration number satisfaction result if the iteration number threshold is reached.
[0108] Step S62, detecting whether the solution time of each data stream sample in the simulated annealing data stream sample reaches a solution time threshold, and outputting a solution time satisfaction result if the solution time threshold is reached.
[0109] Step S63, obtaining an iterative logic OR gate, and ending the iteration when the iterative logic OR gate receives a result that the number of iterations satisfies the result or the solution time satisfies the result; otherwise, repeatedly performing genetic operations and simulated annealing operations on the simulated annealing data stream samples until the iterative logic OR gate receives a result that the number of iterations satisfies the result or the solution time satisfies the result, then ending the iteration and outputting iteration end information.
[0110] Step S64, receiving the iteration end information, integrating the first echelon data stream samples and the simulated annealing data stream samples to obtain the final data stream samples.
[0111] Step S65, creating a simulation environment for the final data stream sample, simulating the final data stream sample in the simulation environment, detecting the final effective simulation information of the final data stream sample during the simulation process, and calculating the fitness f(x) of the final data stream sample based on the final effective simulation information.
[0112] Step S66, comparing the fitness f(x) of each data stream sample in the final data stream sample to obtain a final fitness comparison result, wherein the data stream sample with the highest fitness in the final fitness comparison result is the data stream optimal solution.
[0113] The embodiment of the present application also discloses a TSN-based vehicle Ethernet time-sensitive traffic planning system.
[0114] Reference Figure 2 , the TSN-based automotive Ethernet time-sensitive traffic planning system includes:
[0115] The network topology analysis module is used to obtain data flow information and create a network topology diagram based on the user scenario of the user to be tested and the data flow information.
[0116] The gating list generation module is configured to analyze the priority of each data flow based on the data flow information to obtain the data flow priority result, determine the forwarding path of each data flow based on the data flow priority result and the data flow information to obtain the forwarding path matching information, and determine the forwarding table entry information of each data flow to obtain the forwarding table entry data set, and set the gating list of each data flow based on the forwarding path matching information and the forwarding table entry data to obtain the gating list generation information.
[0117] The data stream fitness analysis module is used to repeat the above steps to obtain multiple data stream samples for simulation operations, detect the effective simulation information of each data stream sample during the simulation process, calculate the fitness f(x) of each data stream sample based on the effective simulation information, and divide the data stream samples based on the fitness f(x) of each data stream sample to obtain the data stream sample division results.
[0118] The data stream sample inheritance module is configured to perform inheritance operations on some data stream samples in the data stream sample division results based on the data stream sample division results to obtain inherited data stream samples.
[0119] The data stream sample simulated annealing module is configured to perform a simulated annealing operation on each data stream sample in the genetic data stream sample based on a simulated annealing algorithm to obtain a simulated annealing data stream sample.
[0120] The optimal solution analysis module is used to determine whether each data stream sample in the simulated annealing data stream sample meets the requirements for ending the iteration. If the requirements for ending the iteration are met, the iteration is ended. If the requirements for ending the iteration are not met, the genetic operation and the simulated annealing operation are repeated on each data stream sample in the simulated annealing data stream sample until the requirements for ending the iteration are met, thereby ending the iteration. The first-tier data stream samples and the simulated annealing data stream samples are combined to obtain the final data stream sample, the fitness f(x) of each data stream sample in the final data stream sample is calculated and compared to obtain the final fitness comparison result, and the optimal solution of the data stream is obtained based on the final fitness comparison result.
[0121] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A time-sensitive traffic planning method for vehicle Ethernet based on TSN, characterized in that: The following steps are involved: Obtain data flow information and create a network topology diagram based on the user scenario of the user to be tested and the data flow information; Analyze the priority of each data flow based on the data flow information to obtain a data flow priority result, determine the forwarding path of each data flow based on the data flow priority result and the data flow information to obtain forwarding path matching information, and determine the forwarding table entry information of each data flow to obtain a forwarding table entry data set, and set the gating list of each data flow based on the forwarding path matching information and the forwarding table entry data to obtain gating list generation information; Repeat the above steps to obtain multiple data stream samples for simulation operation, detect the effective simulation information of each data stream sample during the simulation process, calculate the fitness f(x) of each data stream sample based on the effective simulation information, and divide the data stream samples based on the fitness f(x) of each data stream sample to obtain the data stream sample division result; Based on the data stream sample division result, genetic operations are performed on some data stream samples in the data stream sample division result to obtain genetic data stream samples; Based on the simulated annealing algorithm, a simulated annealing operation is performed on each data stream sample in the genetic data stream sample to obtain a simulated annealing data stream sample; Determine whether each data stream sample in the simulated annealing data stream sample meets the requirements for ending the iteration. If so, end the iteration. If not, repeat the genetic operation and the simulated annealing operation on each data stream sample in the simulated annealing data stream sample until the requirements for ending the iteration are met, thereby ending the iteration. Combine the first-tier data stream samples and the simulated annealing data stream samples to obtain the final data stream sample. Calculate the fitness f(x) of each data stream sample in the final data stream sample and compare them to obtain the final fitness comparison result. Based on the final fitness comparison result, obtain the optimal solution for the data stream.
2. The TSN-based vehicle Ethernet time-sensitive traffic planning method according to claim 1 is characterized in that: The steps of obtaining data flow information and creating a network topology diagram based on the user scenario of the user to be tested and the data flow information specifically include: Detecting a user scenario in a vehicle environment where a user to be tested is located to obtain a vehicle user scenario, performing functional domain division based on the vehicle user scenario to obtain a functional domain division result, and numbering each functional domain based on the functional domain division result to obtain domain number information; Based on the functional domain division result, multiple specific functions of each functional domain are obtained to obtain specific functional information, and based on the specific functional information, a virtual local area network is assigned to each specific functional information in different functional domains, and each virtual local area network is numbered to obtain virtual local area network number information; Setting an IP subnet for each specific functional information, marking and numbering different IP subnets to obtain first IP address information; Detecting Ethernet nodes and numbering the Ethernet nodes to obtain Ethernet node numbering information; Acquire a network card database, and establish a signal link between the network card database and the Ethernet node, wherein the network card database includes multiple network cards, and the network cards are signal-connected to the Ethernet nodes in a one-to-one correspondence, wherein the MAC address of each network card has a unique attribute; Based on the specific function information of each functional domain, determine whether each specific function communicates with the Ethernet node, mark the IP subnet corresponding to the specific function information communicating with the Ethernet node and add the second IP address information; Binding the second IP address information and the virtual local area network number information corresponding to the same specific function information; Acquire data flow information and record and cache the data flow information, wherein the data flow information includes source node IP information, target node IP set, transmission time interval distribution characteristic information, priority information, frame length distribution characteristic information, and redundant path transmission path use judgment information; A network topology diagram is drawn based on the domain numbering information, the virtual local area network numbering information, the first IP address information, the Ethernet node numbering information, the second IP address information and the data flow information.
3. The TSN-based vehicle Ethernet time-sensitive traffic planning method according to claim 2 is characterized in that: The steps of analyzing the priority of each data flow based on the data flow information to obtain a data flow priority result, determining the forwarding path of each data flow based on the data flow priority result and the data flow information to obtain forwarding path matching information, determining the forwarding table entry information of each data flow to obtain a forwarding table entry data set, and setting the gating list of each data flow based on the forwarding path matching information and the forwarding table entry data to obtain the gating list generation information specifically include: Analyze the priority of each data flow based on the data flow information to obtain a data flow priority result; Obtain a first priority data flow in the data flow priority result, obtain a forwarding path database, the forwarding path database includes multiple feasible forwarding paths, randomly select a forwarding path to obtain a first forwarding path, and match the first priority data flow with the first forwarding path; Based on the redundant path transmission path use judgment information, determine whether the first priority data flow needs redundant path transmission, if the first priority data flow needs redundant path transmission, set the first forwarding table entry information, mark the first forwarding table entry information on the first forwarding path corresponding to the first priority data flow and the output port of the switch, the first forwarding table entry information includes the first MAC address information, the first virtual local area network number information and the first port number information; The forwarding path of each data flow in the data flow priority result is selected in turn, and when selecting the forwarding path of each data flow, it is determined whether the virtual local area network number information of the forwarding path that has been matched is overlapped. If it is repeated, the forwarding path of the data flow is reselected, and the forwarding path matching information is obtained based on the forwarding path of each data flow; Based on the redundant path transmission path use judgment information, determine whether each data stream needs redundant path transmission, and if redundant path transmission is required, set the forwarding table entry information of the corresponding data stream, and combine the first forwarding table entry information with the forwarding table entry information of each data stream to form a forwarding table entry data set; According to the forwarding path matching information and the forwarding table entry data set, a gating list of each data flow is generated based on a GCL generation algorithm to obtain gating list generation information.
4. The TSN-based vehicle Ethernet time-sensitive traffic planning method according to claim 3 is characterized in that: The steps of analyzing the priority of each data flow based on the data flow information to obtain the data flow priority result specifically include: Detect whether each data flow has a frame preemption requirement, and record the data flow with the frame preemption requirement as a frame preemption requirement data flow; Obtaining the security level of each data flow to obtain a data flow security level value, comparing the data flow security level value with a preset data flow security level threshold, and recording a data flow whose data flow security level value is greater than or equal to the data flow security level threshold as a data flow with a higher security level; Obtain a priority logic AND gate, filter out data flows that are frame preemption demand data flows and data flows with a higher security level based on the priority logic AND gate, and mark them as first priority data flows; Based on the transmission time interval distribution characteristic information, determine whether the transmission time interval distribution characteristics of the data frames of the data streams other than the first priority data stream belong to constant distribution, filter out the data streams whose transmission time interval distribution characteristics of the data frames belong to constant distribution and mark them as constant distribution data streams; Based on the transmission time interval distribution characteristic information, transmission time interval data is obtained, and a data flow in the constant distribution data flow whose transmission time interval data is less than or equal to a preset transmission time interval threshold is marked as a second priority data flow, and a data flow in the constant distribution data flow whose transmission time interval data is greater than the preset transmission time interval threshold is marked as a third priority data flow; Determine whether the data stream other than the first priority data stream, the second priority data stream and the third priority data stream belongs to the vehicle body camera data stream, and if it belongs to the vehicle body camera data stream, mark it as the fourth priority data stream; Determine whether the data streams other than the first priority data stream, the second priority data stream, the third priority data stream, and the fourth priority data stream belong to the vehicle body laser radar data stream or the millimeter wave radar data stream, and if they belong to the vehicle body laser radar data stream or the millimeter wave radar data stream, mark them as the fifth priority data stream; Data flows other than the first priority data flow, the second priority data flow, the third priority data flow, the fourth priority data flow, and the fifth priority data flow are recorded as sixth priority data flows.
5. The TSN-based vehicle Ethernet time-sensitive traffic planning method according to claim 4 is characterized in that: Repeating the above steps to obtain multiple data stream samples for simulation operation, detecting effective simulation information of each data stream sample during the simulation process, calculating the fitness f(x) of each data stream sample based on the effective simulation information, and dividing the data stream samples based on the fitness f(x) of each data stream sample to obtain the data stream sample division result, specifically includes: Repeat the above steps to obtain multiple data stream samples to obtain data stream sample information, obtain omnetpp, obtain an input template based on omnetpp, and obtain input file information of each data stream sample information based on the data stream sample information and the input template; Based on the data stream sample information, a simulation environment is created for each data stream sample, each data stream sample is simulated in the simulation environment, and after the simulation is completed, a simulation completion result is output; Based on the simulation completion result, the end-to-end delay of each data flow sample in the simulation process is detected and the maximum value is selected to obtain the maximum end-to-end delay f1(x); based on the simulation completion result, the jitter of each data flow sample in the simulation process is detected and the maximum value is selected to obtain the maximum jitter f2(x); based on the simulation completion result, the number of packet losses of each data flow sample in the simulation process is detected and the maximum value is selected to obtain the maximum number of packet losses f3(x); based on the simulation completion result, the length of each port queue of each data flow sample in the simulation process is detected and the maximum value is selected to obtain the maximum queue length f4(x); based on the simulation completion result, the throughput of each data flow sample in the simulation process is detected and the maximum value is selected to obtain the maximum throughput f5(x); the maximum end-to-end delay f1(x), the maximum jitter f2(x), the maximum number of packet losses f3(x), the maximum queue length f4(x) and the maximum throughput f5(x) are combined to form effective simulation information; Based on the maximum end-to-end delay f1(x), maximum jitter f2(x), maximum number of packet losses f3(x), maximum queue length f4(x) and maximum throughput f5(x), based on the fitness function Calculate and obtain the fitness f(x) of each data stream sample; Compare the fitness f(x) of each data stream sample in the data stream sample information to obtain a fitness comparison result, perform ascending sorting based on the fitness comparison result to obtain a fitness ascending sorting result, screen out the top 10% of the data stream samples based on the fitness ascending sorting result and mark them as first-tier data stream samples, and mark the data stream samples other than the first-tier data stream as second-tier data stream samples; The first echelon data stream samples and the second echelon data stream samples are combined to form a data stream sample division result.
6. The TSN-based vehicle Ethernet time-sensitive traffic planning method according to claim 5 is characterized in that: The step of performing genetic operations on some data stream samples in the data stream sample division result based on the data stream sample division result to obtain genetic data stream samples specifically includes: Randomly select two data stream samples from the second echelon of data stream samples in the data stream sample division result, and mark them as data stream sample A and data stream sample B, respectively, wherein the fitness f(x) of data stream sample A is greater than or equal to the fitness f(x) of data stream sample B; The offspring data stream is obtained by integrating data stream sample A and data stream sample B, and the fitness f(x) of the offspring data stream is calculated; The data stream sample A is replaced by the child data stream, and the second echelon data stream sample is updated to obtain the child replacement data stream sample; The injection time of the flow at the beginning of the simulation of each data flow sample in the offspring replacement data flow sample is mutated to obtain the inherited data flow sample.
7. The TSN-based vehicle Ethernet time-sensitive traffic planning method according to claim 6 is characterized in that: Determine whether each data stream sample in the simulated annealing data stream sample meets the end iteration requirement, if the end iteration requirement is met, end the iteration, if not, repeat the genetic operation and the simulated annealing operation on each data stream sample in the simulated annealing data stream sample until the end iteration requirement is met, thereby ending the iteration, synthesize the first echelon data stream samples and the simulated annealing data stream samples to obtain the final data stream sample, calculate the fitness f(x) of each data stream sample in the final data stream sample and compare them to obtain the final fitness comparison result, and obtain the optimal solution of the data stream based on the final fitness comparison result, specifically including: Detect whether the number of iterations of each data stream sample in the simulated annealing data stream sample reaches the iteration number threshold, and if it reaches the iteration number threshold, output the iteration number satisfaction result; Detect whether the solution time of each data stream sample in the simulated annealing data stream sample reaches the solution time threshold, and if it reaches the solution time threshold, output the solution time satisfaction result; Obtain an iterative logic OR gate, and terminate the iteration when the iterative logic OR gate receives a result that the number of iterations meets the result or the solution time meets the result, otherwise repeatedly perform genetic operations and simulated annealing operations on the simulated annealing data stream sample until the iterative logic OR gate receives a result that the number of iterations meets the result or the solution time meets the result, then terminate the iteration and output iteration end information; After receiving the iteration end information, the final data stream sample is obtained by combining the first echelon data stream sample and the simulated annealing data stream sample; Creating a simulation environment for the final data stream sample, simulating the final data stream sample in the simulation environment, detecting the final effective simulation information of the final data stream sample during the simulation process, and calculating the fitness f(x) of the final data stream sample based on the final effective simulation information; The fitness f(x) of each data stream sample in the final data stream sample is compared to obtain a final fitness comparison result, wherein the data stream sample with the highest fitness in the final fitness comparison result is the optimal solution for the data stream.
8. The TSN-based vehicle Ethernet time-sensitive traffic planning system is characterized by: The TSN-based vehicle Ethernet time-sensitive traffic planning system is used to implement the TSN-based vehicle Ethernet time-sensitive traffic planning method described in any one of claims 1 to 7, including: The network topology analysis module is used to obtain data flow information and create a network topology map based on the user scenario of the user to be tested and the data flow information; a gating list generation module, configured to analyze the priority of each data flow based on the data flow information to obtain a data flow priority result, determine the forwarding path of each data flow based on the data flow priority result and the data flow information to obtain forwarding path matching information, and determine the forwarding table entry information of each data flow to obtain a forwarding table entry data set, and set the gating list of each data flow based on the forwarding path matching information and the forwarding table entry data to obtain gating list generation information; A data stream fitness analysis module is used to repeat the above steps to obtain multiple data stream samples for simulation operation, detect the effective simulation information of each data stream sample during the simulation process, calculate the fitness f(x) of each data stream sample based on the effective simulation information, and divide the data stream samples based on the fitness f(x) of each data stream sample to obtain the data stream sample division result; A data stream sample inheritance module is configured to perform inheritance operations on some data stream samples in the data stream sample division results based on the data stream sample division results to obtain inherited data stream samples; A data stream sample simulated annealing module is configured to perform a simulated annealing operation on each data stream sample in the genetic data stream sample based on a simulated annealing algorithm to obtain a simulated annealing data stream sample; The optimal solution analysis module is used to determine whether each data stream sample in the simulated annealing data stream sample meets the requirements for ending the iteration. If the requirements for ending the iteration are met, the iteration is ended. If the requirements for ending the iteration are not met, the genetic operation and the simulated annealing operation are repeated on each data stream sample in the simulated annealing data stream sample until the requirements for ending the iteration are met, thereby ending the iteration. The first-tier data stream samples and the simulated annealing data stream samples are combined to obtain the final data stream sample, the fitness f(x) of each data stream sample in the final data stream sample is calculated and compared to obtain the final fitness comparison result, and the optimal solution of the data stream is obtained based on the final fitness comparison result.
Citation Information
Patent Citations
Method for realizing communication of multiple local area networks based on WinCE system and single network card
CN105635312A
Multifunctional independent suspension control system and control method thereof
CN106945479A
Logistics distribution optimization method based on genetic-simulated annealing combination algorithm
CN112288166A
Multi-path joint scheduling method in time-sensitive network
CN115460130A
Rail transit wireless vehicle-mounted terminal dynamic networking method based on 5G
CN115866558A