A Vehicle Communication Method and Device Based on Time-Sensitive Network
By using a TSN protocol stack with hybrid switches and network controllers in the on-board network, the problem that traditional CAN networks cannot meet the low-latency transmission of smart cars is solved, automatic configuration and flexible adaptation to network changes are achieved, and data transmission with low latency and low packet loss rate is ensured.
Patent Information
- Application Number
- CN202211202574.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-09-28
AI Technical Summary
Traditional CAN networks cannot meet the low-latency transmission requirements of smart cars. Time-sensitive networks (TSNs) have shortcomings in flexibility and automatic configuration, which leads to engineers need to manually configure the on-board network transmission when manually configure the on-board network transmission.
The TSN protocol stack composed of a hybrid switch and network controller is used to realize traffic control through data flow reserve tables, data flow tables and gated schedulers, and data frame processing and transmission are combined with virtual gateways, supporting automatic configuration and flexible adaptation to network changes.
Automatic configuration when the on-board network changes is realized, manual configuration steps are avoided, minimum delay and packet loss rate are ensured, and transmission needs of different data types are adapted to the transmission needs.
Smart Images

Figure CN115622964B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communications for intelligent connected vehicles, and in particular to a vehicle-mounted communication method and device based on a time-sensitive network. Background Art
[0002] With the development of intelligent connected vehicle technology, Advanced Driver Assistance Systems (ADAS) will become standard equipment in connected vehicles, posing a challenge to traditional network communication technologies. Advanced Driver Assistance Systems (ADAS) require data from underlying sensors such as cameras, LiDAR, GPS, and inertial sensors. This extensive data requires low-latency transmission. Traditional CAN networks are clearly no longer sufficient for today's smart car development. Existing automotive electrical and electronic architectures rely on in-vehicle Ethernet as the backbone network, connecting different domain controllers via gateways. ADAS systems require cross-domain communication, and these services are dynamic, requiring an adaptable network. While Time-Sensitive Networking (TSN) provides real-time transmission of critical data for in-vehicle Ethernet backbone communications, it lacks flexibility. Changes in in-vehicle network transmission nodes require manual configuration by engineers, and automatic network transmission configuration is not possible. Summary of the Invention
[0003] In view of the defects in the prior art, the present invention provides a vehicle-mounted communication method based on a time-sensitive network, which is characterized by at least comprising:
[0004] On the data plane, the hybrid switch controls its own TSN ingress or egress through preset data flow control rules;
[0005] On the control plane, the network controller senses and processes the real-time flow control commands of the hybrid switch, and controls the TSN ingress data and / or TSN egress data of the hybrid switch;
[0006] The data plane and the control plane exchange information through the control information exchange API;
[0007] Among them, the hybrid switch is equipped with a data flow reservation table, a data flow table, and a gated scheduler. The network controller controls the data flow reservation table, the data flow table, and / or the gated scheduler through preset rules to realize the inlet and outlet flow control of the hybrid switch.
[0008] A vehicle communication method based on a time-sensitive network, further preferably, when a data frame reaches an ingress controlled by a TSN ingress control module, the TSN ingress control module processes the data frame by applying time and filtering rules;
[0009] When the data frame passes through the TSN inlet module, the virtual gateway checks the attributes of the data frame in the data flow table. If a matching entry exists, the predefined behavior is performed and the data frame is sent to the specified port;
[0010] The TSN egress control module sends data frames to the target network according to the TSN protocol specification.
[0011] A vehicle communication method based on a time-sensitive network, further preferably, determines the type of data frame reaching the TSN inlet module. If it is a low-priority best-effort data flow type, and if the best-effort data frame does not establish a transmission data flow, the hybrid gateway sends the data frame message to the network controller. The upper-layer application on the network controller determines whether to discard, directly respond to, or pass on the data frame based on the message attributes of the data frame;
[0012] If it is a transfer, the network application will determine the routing path and send the data flow sending rules to the hybrid switch for installation and record them in the data flow table.
[0013] A vehicle communication method based on a time-sensitive network, further preferably, for asynchronous real-time flow-controlled data transmission, the sender and the receiver declare the data flow through the SPR protocol; the network device submits all SPR protocol packets to the network controller;
[0014] Based on the SPR protocol packet, the network application checks whether the effective bandwidth meets the current protocol. If so, it creates a transmission port that matches the data flow.
[0015] The network controller records the data received from the SPR protocol in the hybrid switch through the data flow reservation table and reserves bandwidth through the data flow reservation table;
[0016] The data flow reservation table of the hybrid switch that transmits asynchronous data identifies the flow, forwards it correctly, and controls the bandwidth of the TSN egress control module port.
[0017] A vehicle communication method based on a time-sensitive network, further preferably, for synchronous real-time flow-controlled data transmission, the sender periodically sends data frames of a known maximum size in corresponding time slots;
[0018] When the data frame passes through the TSN inlet control module, the gate scheduler opens and closes the specific priority gate of each output port according to the time control table to control the data transmission of synchronous real-time traffic.
[0019] A vehicle communication method based on a time-sensitive network, further preferably, when the synchronous real-time data traffic changes, the network controller dynamically (re)calculates the gate scheduler and the transmission path of all data flows;
[0020] By adding or deleting time slots, the time slots are moved forward or backward within the cycle to adapt to changes in synchronous real-time data traffic.
[0021] A vehicle communication method based on a time-sensitive network, further preferably, when a hybrid switch in a network path needs to be upgraded or changed, the network controller locks the hybrid switch in a deterministic order;
[0022] Then, the candidate configuration is configured and verified on all hybrid switches. The configuration includes setting up the data flow reservation table, data flow table, and gate scheduler;
[0023] When the verification is successful, the network controller sends an upgrade execution instruction to the hybrid switch;
[0024] The hybrid switch sends a message indicating that the upgrade is completed to the network controller, and the network controller releases the locked hybrid switch.
[0025] A vehicle communication method based on a time-sensitive network, further preferably, the hybrid switch adopts a simultaneous upgrade method, specifically including:
[0026] The network controller calculates the required activation time and then sends the timestamp of the upgrade execution via the control information exchange API;
[0027] When all hybrid switches are ready for upgrade, they send a message to the network controller that they are ready for upgrade;
[0028] The network controller receives all the upgrade-ready messages and sends the upgrade package to the hybrid switch by broadcasting. The hybrid switch is upgraded at the specified timestamp.
[0029] A vehicle communication method based on a time-sensitive network, further preferably, a data flow reservation table is used to record a transmission domain, a registration path of a data flow, a forwarding rule of the data flow, a worst-case delay, and bandwidth allocation for the data flow;
[0030] The data flow table includes a preset number of data flow rules, and each data flow rule includes at least: a basic field, a condition field, and an action field.
[0031] A real-time vehicle-mounted communication device, comprising:
[0032] A network controller and at least one hybrid switch, wherein the network controller controls the hybrid switch to implement data transmission and reception through the hybrid switch;
[0033] Including the above-mentioned vehicle-mounted communication method based on time-sensitive network.
[0034] Beneficial effects:
[0035] In this technical solution, a hybrid switch, formed by combining the TSN protocol stack with a software-defined virtual gateway, can flexibly adapt to the transmission of different data types for in-vehicle communications, ensuring minimal latency and packet loss. When changes occur in the in-vehicle network's data flow or transmission path, or in the physical links, the network controller can dynamically modify the hybrid switch's configuration, eliminating the need for tedious manual configuration by engineers. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The following drawings are only used to schematically illustrate and explain the present invention and are not intended to limit the scope of the present invention.
[0037] Figure 1 FIG. 1 is a schematic diagram of the structure of a vehicle-mounted device of a TSN time-sensitive network according to an embodiment of the present invention.
[0038] Figure 2 FIG. 1 is a schematic diagram of the structure of a hybrid switch in an embodiment of the present invention.
[0039] Figure 3 FIG. 1 is a schematic diagram of the structure of a network controller in an embodiment of the present invention.
[0040] Figure 4 Schematic diagram of a control method for vehicle-mounted data transmission according to an embodiment of the present invention.
[0041] Figure 5 This is a schematic diagram of the structure of a domain controller equipped with a TSN protocol stack according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] To provide a clearer understanding of the technical features, objectives, and effects of this document, specific embodiments of the present invention are now described with reference to the accompanying drawings. Like reference numerals in the various figures represent like parts. To simplify the drawings, the various figures schematically illustrate parts relevant to the present invention and do not represent the actual structure of the product. Furthermore, to simplify the drawings and facilitate understanding, in some figures, only one of the components with the same structure or function is schematically depicted or labeled.
[0043] Those skilled in the art will appreciate that control systems, functional modules, and application programs (APPs) can take any appropriate form, including hardware or software, and can be multiple discrete functional modules or multiple functional units integrated into a single piece of hardware. In its simplest form, the control system can be a controller, such as a combinational logic controller or microprogrammed controller, as long as it can implement the operations described herein. Of course, the control system can also be integrated into a single physical device as separate modules, without departing from the basic principles and scope of protection of the present invention.
[0044] The term "connection" in the present invention may include direct connection, indirect connection, communication connection, and electrical connection, unless otherwise specified.
[0045] The terms used herein are for the purpose of describing specific embodiments only and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that when used in the specification, the terms "include" and / or "comprise" refer to the presence of the stated features, values, steps, operations, elements and / or components, but do not exclude the presence or additional addition of one or more other features, values, steps, operations, elements, components and / or groups thereof. As used herein, the term "and / or" includes any and all combinations of one or more of the listed items.
[0046] It should be understood that the term "vehicle" or "vehicular" or other similar terms used herein generally includes motor vehicles, such as passenger cars including sport utility vehicles (SUVs), buses, trucks, various commercial vehicles, watercraft including various boats, ships, aircraft, etc., and includes hybrid vehicles, electric vehicles, plug-in hybrid electric vehicles, hydrogen-powered vehicles, and other alternative fuel vehicles (e.g., fuels derived from energy sources other than petroleum). As referred to herein, a hybrid vehicle is a vehicle that has two or more power sources, such as both gasoline-powered and electric-powered vehicles.
[0047] Furthermore, the controller of the present disclosure may be embodied as a non-transitory computer-readable medium on a computer-readable medium containing executable program instructions executed by a processor, controller, or the like. Examples of computer-readable media include, but are not limited to, ROM, RAM, compact disc (CD)-ROMs, magnetic tapes, floppy disks, flash drives, smart cards, and optical data storage devices. The computer-readable recording medium may also be distributed among computer systems coupled via a network, such that the computer-readable medium is stored and executed in a distributed manner, for example, via a telematics server or a controller area network (CAN).
[0048] The present invention provides a vehicle-mounted communication device and a vehicle-mounted communication method based on a time-sensitive network. Figures 1 to 5 The vehicle-mounted communication device specifically includes: a network controller and at least one hybrid switch, wherein the network controller controls the hybrid switch to realize data transmission and reception through the hybrid switch;
[0049] Specifically, in a centralized electrical and electronic architecture, the domain controller is connected to the hybrid switch via the in-vehicle Ethernet. The domain controller is equipped with a TSN protocol stack, which controls the ingress and egress data flowing through the domain controller to achieve real-time communication.
[0050] In the hybrid switch, there are entry ports, exit ports, TSN entry control module, virtual gateway, and TSN exit control module;
[0051] In the hybrid switch, a data flow table, a data flow reservation table, and a gate scheduler are set;
[0052] Wherein, the virtual gateway controls data transmission at least through a data flow table and / or a preset communication protocol, but does not include a data flow reservation table and a gated scheduler;
[0053] The TSN ingress control module and the TSN egress control module use at least a data flow reservation table and a gated scheduler to control data transmission, but do not include a data flow table.
[0054] Specifically, the data flow reservation table is used to record the transmission domain, the registration path of the data flow, the forwarding rules of the data flow, the worst case delay, and the bandwidth allocation for the data flow;
[0055] The data flow table includes a preset number of data flow rules, each of which includes at least: a basic field, a condition field, and an action field;
[0056] The basic fields include at least the effective time, table entry, priority, number of packets processed, and idle timeout;
[0057] The condition field includes at least the input port number, source and destination MAC address, source and destination IP address, data packet type, network layer protocol type, etc.
[0058] The action field includes at least: normal forwarding, directing to a switch port, discarding, changing the source and destination MAC addresses, etc.
[0059] A data flow rule can have multiple actions, and the actions are executed in the specified order.
[0060] The data flow table defines the transmission information from different domain controllers or different ECUs. When the attributes of the transmission information match the messages in the data flow table, the virtual gateway applies the corresponding data flow rules to transmit the matching messages.
[0061] In the hybrid gateway, it adopts a service-oriented architecture communication, is provided with a client and a server, and is used to communicate with the network controller at least;
[0062] The network controller is used for multiple hybrid switches. In fact, in the vehicle network, there is more than one hybrid switch. Hybrid switches may be set between different domains or different locations in the car.
[0063] For example, regional hybrid switches are arranged in the front, middle, and rear of the car, but all hybrid switches are controlled by one network controller;
[0064] Compared with the existing in-vehicle network architecture, this embodiment adopts a hybrid switch with a virtual gateway set up inside. The virtual gateway is implemented by software programming, which can realize all the functions of the hardware gateway and define the gateway through software programming.
[0065] The virtual gateway can make up for the shortcomings of the TSN communication protocol and provide flexibility;
[0066] When changes occur in the vehicle network or new features are needed, only the virtual gateway needs to be upgraded, eliminating the need for traditional hardware upgrades, which increase costs and require a series of reliability verifications.
[0067] The network control is equipped with a control module, a call module, a client, a server, and an upper-layer application. The client and the server are used to communicate with the clients and servers in the hybrid switch, and are used for service-oriented SOA communication to achieve efficient communication through publishing and subscribing.
[0068] The upper-layer application is used to process the requests sent from the hybrid switch by analyzing the requests and making decisions;
[0069] The scheduling module is used to start or shut down the preset process of the hybrid switch to which it is connected;
[0070] The control module is used to run the various functional modules in the network controller, such as starting the scheduling module, client, server or upper-layer application;
[0071] Specifically, the domain controller provided in this embodiment is provided with a TSN protocol stack, which specifically includes:
[0072] Data flow reservation table, gate scheduler, TSN egress control module, TSN ingress control module, entry port and ingress / egress ports, wherein the TSN egress control module and the TSN ingress control module control the direction of the transmitted data flow through the data flow reservation table and the gate scheduler;
[0073] The domain controller and hybrid switch communicate via a high-speed in-vehicle Ethernet bus;
[0074] Based on the above hardware device, the following embodiment provides a vehicle communication method based on a time-sensitive network, specifically including:
[0075] On the data plane, the hybrid switch controls its own TSN ingress or egress through preset data flow control rules;
[0076] On the control plane, the network controller senses and processes the real-time flow control commands of the hybrid switch, and controls the TSN ingress data and / or TSN egress data of the hybrid switch;
[0077] The data plane and the control plane exchange information through the control information exchange API;
[0078] Among them, the hybrid switch is equipped with a data flow reservation table, a data flow table, and a gated scheduler. The network controller controls the data flow reservation table, the data flow table, and / or the gated scheduler through preset rules to realize the inlet and outlet flow control of the hybrid switch.
[0079] In this embodiment, the entire hardware system is divided into a data plane and a control plane, so that the data plane and the control plane do not interfere with each other and each implements its own function. The data plane and the control panel exchange information through the control information exchange API to provide security for system communication, and control the information interaction of the data plane through the control plane.
[0080] When the data frame reaches the TSN ingress control module, the TSN ingress control module processes the data frame by applying time and filtering rules;
[0081] When the data frame passes through the TSN inlet module, the virtual gateway checks the attributes of the data frame in the data flow table. If a matching entry exists, the predefined behavior is performed and the data frame is sent to the specified port;
[0082] The TSN egress module controls the sending of data frames to the target network according to the TSN protocol specification.
[0083] Specifically, in an in-vehicle network, a large number of sensors and controllers generate a large amount of data when communicating with each other, especially in autonomous driving. When a large amount of data is transmitted to the port of a hybrid switch, how to process the data of different sensors or ECUs while ensuring the normal operation of the system with minimal delay is a key technical problem that needs to be solved. Therefore, this embodiment divides the data into multiple data types, specifically including at least: best-effort data flow, synchronous real-time data flow, and asynchronous real-time data flow. Different control measures are adopted according to different data flows, as follows:
[0084] Determine the type of data frame that reaches the TSN inlet module. If it is a low-priority best-effort data flow type, and if the best-effort data frame does not establish a sending data flow, the hybrid gateway sends the data frame message to the network controller. The upper-layer application on the network controller will decide whether to discard, directly respond, or pass it on based on the message attributes of the data frame;
[0085] If it is a transfer, the network application will determine the routing path and send the data flow sending rules to the hybrid switch for installation and record them in the data flow table.
[0086] For asynchronous real-time flow-controlled data transmission, the sender and receiver declare data flows through the SPR protocol; the network device submits all SPR protocol packets to the network controller;
[0087] Based on the SPR protocol packet, the upper-layer application checks whether the effective bandwidth meets the current transmission. If so, it creates a transmission port that matches the current data flow.
[0088] The network controller records the data received from the SPR protocol in the hybrid switch through the data flow reservation table and reserves bandwidth through the data flow reservation table;
[0089] In a hybrid switch that transmits asynchronous real-time data streams, the TSN inlet module identifies the stream through the data stream reservation table and correctly forwards it to the virtual machine gateway. The virtual machine gateway forwards the data stream to the corresponding ingress and egress ports through the data stream table and controls the bandwidth of the ingress and egress ports of the TSN egress control module.
[0090] The TSN egress control module sends data to the network through the designated ingress and egress ports according to the gate scheduler.
[0091] For synchronous real-time flow-controlled data transmission, the sender periodically sends data frames of known maximum size in corresponding time slots;
[0092] When the data frame passes through the TSN inlet control module, the gate scheduler opens and closes the specific priority gate of each output port according to the time control table to control the data transmission of synchronous real-time traffic.
[0093] When the synchronous real-time data traffic changes (traffic or path changes), the network controller dynamically recalculates the gating scheduler and transmission path of all data flows;
[0094] By adding or deleting time slots, the time slots are moved forward or backward within the cycle to adapt to changes in synchronous real-time data traffic.
[0095] Through the above, it is possible to dynamically solve the problem of synchronous real-time data traffic or path transmission problems caused by path changes. The system can automatically configure itself, avoiding the shortcomings of the TSN protocol standard that only relies on static configuration. When changes occur, engineers need to manually configure it.
[0096] Specifically, due to the complexity of in-vehicle networks, new ECUs, domain controllers, and hybrid switches may be added depending on the current in-vehicle network configuration. In this case, if the configured network changes, the transmission configuration needs to be modified, or if the control rules change, the hybrid switches in the network need to be upgraded to ensure deterministic data transmission. Specifically, this implementation provides a solution, including:
[0097] When a hybrid switch in a network path needs to be upgraded or changed, the network controller locks the hybrid switch in a deterministic order;
[0098] Then, the candidate configuration is configured and verified on all hybrid switches. The configuration includes setting up the data flow reservation table, data flow table, and gate scheduler;
[0099] When the verification is successful, the network controller sends an upgrade execution instruction to the hybrid switch;
[0100] The hybrid switch sends a message indicating that the upgrade is completed to the network controller, and the network controller releases the locked hybrid switch.
[0101] The above are merely preferred embodiments of the present invention, and the present invention is not limited to the above embodiments. It will be clear to those skilled in the art that the forms in this embodiment are not limited thereto, and the adjustable manner is also not limited thereto. It will be understood that other improvements and variations directly derived or imagined by those skilled in the art without departing from the basic concept of the present invention should be considered to be included within the scope of protection of the present invention.
Claims
1. A vehicle-mounted communication method based on a time-sensitive network, characterized in that: At least: On the data plane, the hybrid switch controls its own TSN ingress or egress through preset data flow control rules; On the control plane, the network controller senses and processes the real-time traffic control commands of the hybrid switch, and controls the TSN ingress data and / or TSN egress data of the hybrid switch; The data plane and the control plane exchange information through the control information exchange API; The hybrid switch is equipped with a data flow reservation table, a data flow table, and a gated scheduler. The network controller controls the data flow reservation table, the data flow table, and / or the gated scheduler according to preset rules to implement ingress and egress traffic control of the hybrid switch. When a data frame reaches the ingress of the TSN ingress control module, the TSN ingress control module processes the data frame by applying time and filtering rules. When the data frame passes through the TSN inlet module, the virtual gateway checks the attributes of the data frame in the data flow table. If a matching entry exists, the predefined behavior is performed and the data frame is sent to the specified port; The TSN egress control module sends data frames to the target network according to the TSN protocol specification.
2. The vehicle-mounted communication method based on a time-sensitive network as claimed in claim 1, characterized in that: Determine the type of data frame that reaches the TSN inlet module. If it is a low-priority best-effort data flow type, and if the best-effort data frame does not establish a sending data flow, the hybrid gateway sends the data frame message to the network controller. The upper-layer application on the network controller will decide whether to discard, directly respond, or pass it on based on the message attributes of the data frame; If it is a transfer, the network application will determine the routing path and send the data flow sending rules to the hybrid switch for installation and record them in the data flow table.
3. The vehicle-mounted communication method based on a time-sensitive network as claimed in claim 1, characterized in that: For asynchronous real-time flow-controlled data transmission, the sender and receiver declare the data flow through the SPR protocol; The network device submits all SPR protocol packets to the network controller; Based on the SPR protocol packet, the network application checks whether the effective bandwidth meets the current protocol. If so, it creates a transmission port that matches the data flow; The network controller records the data received from the SPR protocol in the hybrid switch through the data flow reservation table and reserves bandwidth through the data flow reservation table; The data flow reservation table of the hybrid switch that transmits asynchronous data identifies the flow, forwards it correctly, and controls the bandwidth of the TSN egress control module port.
4. The vehicle-mounted communication method based on a time-sensitive network as claimed in claim 1, characterized in that: For synchronous real-time flow-controlled data transmission, the sender periodically sends data frames of known maximum size in corresponding time slots; When the data frame passes through the TSN inlet control module, the gate scheduler opens and closes the priority gate of each output port according to the time control table to control the data transmission of synchronous real-time traffic.
5. The vehicle-mounted communication method based on a time-sensitive network as claimed in claim 4, characterized in that: When the synchronous real-time data traffic changes, the network controller dynamically calculates the gate scheduler and transmission path of all data flows; By adding or deleting time slots, the time slots are moved forward or backward within the cycle to adapt to changes in synchronous real-time data traffic.
6. The vehicle-mounted communication method based on a time-sensitive network as claimed in claim 1, characterized in that: When a hybrid switch in a network path needs to be upgraded or changed, the network controller locks the hybrid switch in a deterministic order; Then, the candidate configuration is configured and verified on all hybrid switches. The configuration includes setting up the data flow reservation table, data flow table, and gate scheduler; When the verification is successful, the network controller sends an upgrade execution instruction to the hybrid switch; The hybrid switch sends a message indicating that the upgrade is completed to the network controller, and the network controller releases the locked hybrid switch.
7. The vehicle-mounted communication method based on a time-sensitive network as claimed in claim 6, characterized in that: Hybrid switches are upgraded simultaneously, including: The network controller calculates the required activation time and then sends the timestamp of the upgrade execution via the control information exchange API; When all hybrid switches are ready for upgrade, they send a message to the network controller that they are ready for upgrade; The network controller receives all the upgrade-ready messages and sends the upgrade package to the hybrid switch by broadcasting. The hybrid switch is upgraded at the specified timestamp.
8. The vehicle-mounted communication method based on a time-sensitive network as claimed in claim 1, characterized in that: The data flow reservation table is used to record the transmission domain, the registration path of the data flow, the forwarding rules of the data flow, the worst case delay, and the bandwidth allocation for the data flow; The data flow table includes a preset number of data flow rules, and each data flow rule includes at least: a basic field, a condition field, and an action field.
9. A real-time vehicle-mounted communication device, characterized in that: include: A network controller and at least one hybrid switch, wherein the network controller controls the hybrid switch to implement data transmission and reception through the hybrid switch; The in-vehicle communication method based on a time-sensitive network as claimed in any one of claims 1 to 8.
Citation Information
Patent Citations
Network configuration management method for TSN switch
CN114389946A