CN111901215B - Multi-bus hybrid routing method and gateway device - Google Patents
Multi-bus hybrid routing method and gateway device Download PDFInfo
- Publication number
- CN111901215B CN111901215B CN202010760439.XA CN202010760439A CN111901215B CN 111901215 B CN111901215 B CN 111901215B CN 202010760439 A CN202010760439 A CN 202010760439A CN 111901215 B CN111901215 B CN 111901215B
- Authority
- CN
- China
- Prior art keywords
- bus
- port
- ethernet
- protocol
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40006—Architecture of a communication node
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/54—Organization of routing tables
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40267—Bus for use in transportation systems
- H04L2012/40273—Bus for use in transportation systems the transportation system being a vehicle
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention discloses a multi-bus hybrid routing method and a gateway device, wherein the method comprises the following steps: receiving a first data unit from a source port in a current bus; matching a first protocol corresponding to the current bus through a first preset rule, and analyzing the first data unit by adopting the first protocol to acquire data information in the first data unit and the ID of the target port; matching a target bus where the target port is located through a second preset rule based on the ID of the target port, wherein the type of the target bus is different from that of the current bus; matching a second protocol corresponding to the target bus through a first preset rule, and packaging the data information by adopting the second protocol to form a second data unit; and sending the second data unit to the target port through the target bus. The routing of data unit transmission among different buses is realized, and the efficiency of data exchange and transmission is improved.
Description
Technical Field
The invention relates to the technical field of new energy automobile gateways, in particular to a multi-bus hybrid routing method and a gateway device.
Background
Due to the rise of intelligent automobiles, network architectures in vehicle-mounted systems tend to be more and more complex, high-medium and low-medium bus mixed gateways such as ethernet, CAN and LIN appear, routing and forwarding of signals among different buses depend on analysis of the signals by various modules and forwarding of application layers at present, and a uniform routing mode is not defined yet.
In the existing static routing gateway, only the processing of the CAN bus is defined, and routing forwarding of hybrid buses such as LIN and ethernet is not taken into consideration, so that information transmission among various networks is realized, and information analysis and redistribution are mainly performed by depending on terminal equipment receiving the information. Various network signals in the existing vehicle-mounted network cannot be mutually routed, the transmission efficiency is low, and the requirement of high-speed information exchange of the vehicle network in the future cannot be met.
Therefore, a new routing method applied to an intelligent automobile is needed to be provided, so that mutual routing of data unit transmission among different buses is met, and data exchange and transmission efficiency is improved.
Disclosure of Invention
The invention aims to provide a multi-bus hybrid routing method and a gateway device, which meet the routing requirement of data unit transmission among different buses and improve the efficiency of data exchange and transmission.
In order to achieve the above object, in one aspect, the present invention provides a multi-bus hybrid routing method, including:
receiving a first data unit from a source port in a current bus;
matching a first protocol corresponding to the current bus through a first preset rule, and analyzing the first data unit by adopting the first protocol to acquire data information in the first data unit and the ID of a target port;
matching a target bus where the target port is located through a second preset rule based on the ID of the target port, wherein the type of the target bus is different from that of the current bus;
matching a second protocol corresponding to the target bus through the first preset rule, and packaging the data information by adopting the second protocol to form a second data unit;
and sending the second data unit to the target port through the target bus.
Optionally, the first preset rule is a bus protocol description table, where the bus protocol description table includes a mapping relationship between each bus and its corresponding protocol.
Optionally, the second preset rule is a preset static routing table, where the static routing table includes routing relationships from messages or signals in different buses to other buses.
Optionally, the plurality of buses includes at least one ethernet bus, at least one CAN bus, at least one SPI bus, at least one LIN bus, and at least one UART bus.
Optionally, receiving a first data unit from the source port in the current bus comprises:
when the current bus is an Ethernet bus, receiving an Ethernet message from an Ethernet port;
when the current bus is a CAN bus, receiving a CAN message from a CAN port;
when the current bus is an SPI bus, receiving an SPI data frame from an SPI port;
when the current bus is an LIN bus, receiving an LIN data frame from an LIN port;
and when the current bus is a UART bus, receiving a UART data frame from a UART port.
Optionally, before receiving the ethernet packet from the ethernet port, the method further includes:
receiving an access request of the Ethernet port;
sending a random number message to the Ethernet interface;
receiving an authentication message returned by the Ethernet interface, wherein the authentication message is obtained by the Ethernet port according to the random number calculation in the random number message;
judging whether the authentication message is correct or not;
if the authentication is correct, the security authentication is passed, and the encrypted temporary secret key and the valid period of the temporary secret key are sent to the Ethernet port;
and establishing connection with the Ethernet port, and receiving the Ethernet message encrypted by the Ethernet port based on the temporary secret key in the validity period.
Optionally, receiving, in the validity period, an ethernet packet encrypted by the ethernet port based on the temporary key, further includes:
and monitoring the frequency of sending the Ethernet message of the Ethernet port within the validity period, and if the frequency exceeds a preset value, disconnecting the Ethernet port.
Optionally, encapsulating the data information by using the second protocol to form a second data unit, including:
when the target bus is an Ethernet bus, encrypting the data information by adopting the temporary secret key, and packaging the encrypted data information by adopting an Ethernet bus protocol to form an Ethernet message;
when the target bus is a CAN bus, packaging the data information by adopting a CAN bus protocol to form a CAN message;
when the target bus is an SPI bus, packaging the analyzed data information by adopting an SPI bus protocol to form an SPI data frame;
when the target bus is an LIN bus, packaging the analyzed data information by adopting an LIN bus protocol to form an LIN data frame;
and when the target bus is a UART bus, packaging the analyzed data information by adopting a UART bus protocol to form a UART data frame.
Another aspect of the present invention provides a gateway device to which a plurality of buses are connected, including:
the receiving module is used for receiving a first data unit from a source port in a current bus;
the analysis module is used for matching a first protocol corresponding to the current bus through a first preset rule and analyzing the first data unit by adopting the first protocol to acquire data information in the first data unit and an ID (identity) of a target port, wherein the type of the target bus is different from that of the current bus;
the protocol conversion module is used for matching a target bus where the target port is located through a second preset rule based on the ID of the target port, matching a second protocol corresponding to the target bus through the first preset rule, and packaging the data information by adopting the second protocol to form a second data unit;
and the forwarding module is used for sending the second data unit to the target port through the target bus.
Optionally, the plurality of buses comprises at least one ethernet bus, at least one CAN bus, at least one SPI bus, at least one LIN bus, and at least one UART bus;
the first preset rule is a bus protocol description table, and the bus protocol description table comprises a mapping relation between each bus in the plurality of buses and a corresponding protocol;
the second preset rule is a preset static routing table, and the static routing table includes a mapping relation from the first data unit in each bus to other buses.
The invention has the beneficial effects that:
the method comprises the steps of matching a first protocol corresponding to a current bus through a preset first rule, analyzing a first data unit sent from a source port in the current bus through the first protocol, obtaining data information in the first data unit and a target bus where an ID (identity) of a target port is located, matching a second protocol corresponding to the target bus through a second preset rule, packaging the analyzed data information through the second protocol, sending the packaged data information to the target port of the target bus, meeting the routing of data unit transmission among different buses through a multi-protocol conversion and multi-bus static routing method, and improving the efficiency of data exchange and transmission.
Furthermore, for open Ethernet port connection, the security of accessing an external open network into an internal network of a vehicle body is increased by establishing connection through security authentication and adopting a temporary secret key for ciphertext communication.
The apparatus of the present invention has other features and advantages which will be apparent from or are set forth in detail in the accompanying drawings and the following detailed description, which are incorporated herein, and which together serve to explain certain principles of the invention.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts.
Fig. 1 shows a flow chart of the steps of a multi-bus hybrid routing method according to the invention.
Fig. 2 shows a schematic diagram of a gateway device according to an embodiment of the invention.
Description of the reference numerals:
1. a gateway device; 2. a receiving module; 3. an analysis module; 4. a protocol conversion module; 5. and a forwarding module.
Detailed Description
The gateway in the existing vehicle-mounted network mainly aims at the routing of CAN network messages, and the design of a routing table mainly considers the interaction of CAN. Some slightly complex hybrid gateways basically only realize routing forwarding among the same networks, such as a gateway with ethernet exchange, CAN exchange, between ethernet and CAN network, and CAN realize forwarding, but forwarding between CAN and ethernet is mainly completed by the self-analysis of each device in the access network. Resulting in inefficient routing and forwarding of signals between different buses.
The multi-bus hybrid routing method and the gateway device define a static routing scheme of a multi-bus and multi-protocol vehicle body network, expand a method and a mode for accessing a gateway in the vehicle body network and a method for routing each bus on the basis of the current CAN static routing, and CAN meet the requirement of efficient routing of signals among different buses.
The invention will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 shows a flow chart of the steps of a multi-bus hybrid routing method according to the invention.
As shown in fig. 1, a multi-bus hybrid routing method according to the present invention includes:
s1: receiving a first data unit from a source port in a current bus;
s2: matching a first protocol corresponding to the current bus through a first preset rule, and analyzing the first data unit by adopting the first protocol to acquire data information in the first data unit and the ID of the target port;
s3: matching a target bus where the target port is located through a second preset rule based on the ID of the target port, wherein the type of the target bus is different from that of the current bus;
s4: matching a second protocol corresponding to the target bus through a first preset rule, and packaging the data information by adopting the second protocol to form a second data unit;
s5: and sending the second data unit to the target port through the target bus.
Specifically, a first protocol corresponding to a current bus is matched through a preset first rule, a first data unit sent from a source port in the current bus is analyzed through the first protocol, after data information in the first data unit and a target bus where an ID of a target port is located are obtained, a second protocol corresponding to the target bus is matched through a second preset rule, the analyzed data information is packaged through the second protocol and sent to the target port of the target bus, and through a multi-protocol conversion and multi-bus static routing method, the transmission route of the data units among different buses is met, and the data exchange and transmission efficiency is improved.
In this embodiment, the first preset rule is a bus protocol description table, where the bus protocol description table includes a mapping relationship between each bus and its corresponding protocol. In a specific implementation process, a bus protocol description table defined based on types of a plurality of buses is needed, wherein the bus protocol description table includes a mapping relation between the buses and the protocols, and specific message information can be analyzed from the protocol corresponding to the bus through the bus protocol description table. The bus protocol description table of the present embodiment is shown in table 1.
TABLE 1
Bus b1 | Bus b2 | Bus b3 | ... | Bus bn | |
Protocol p1 | X | ||||
Protocol p2 | X | X | |||
... | |||||
Protocol pm | X |
In this embodiment, the second preset rule is a preset static routing table, where the static routing table includes routing relationships from messages or signals in different buses to other buses. In the specific implementation process, a static routing table is required to be configured first, the table is a description file of routing interaction and signal event triggering of message information among different buses, and messages received on different buses can be forwarded to other buses according to the table. The static routing manner based on the static routing table is basically the same as the policy of the existing static routing gateway, and is not described herein again.
Further, referring to table 1, a normal packet routing process is as follows: receiving data from the bus b1, obtaining a data ID after analyzing the data through a protocol p2, inquiring information obtained in a static routing table, forwarding the information to the bus bn, packing the information by using the protocol p1, and sending the information to the bus bn. The normal signal routing process is as follows: and receiving data from the bus b2, analyzing a signal after analyzing through the protocol pm, finding a corresponding message ID for packaging the forwarding signal through the static routing table, corresponding to the bus b3 and the protocol p2, and packaging and sending the packet to the b3 bus.
In one example, the plurality of buses includes at least one ethernet bus, at least one CAN bus, at least one SPI (serial peripheral interface) bus, at least one LIN bus, and at least one UART (universal asynchronous receiver transmitter) bus. The CAN bus, the SPI bus, the LIN bus and the UART bus belong to network buses in a vehicle body, generally, a vehicle body control domain, a power domain, an auxiliary driving domain and the like are CAN networks, so that the CAN buses are multiple, the UART is used for communication between a host and auxiliary equipment, such as communication between an automobile sound and an external AP (access point), generally one, and the SPI bus is used for full-duplex and synchronous serial communication between a controller and various peripheral devices, generally one.
In one example, receiving a first data unit from a source port in a current bus comprises:
when the current bus is an Ethernet bus, receiving an Ethernet message from an Ethernet port;
when the current bus is a CAN bus, receiving a CAN message from a CAN port;
when the current bus is an SPI bus, receiving an SPI data frame from an SPI port;
when the current bus is an LIN bus, receiving an LIN data frame from an LIN port;
when the current bus is a UART bus, a UART data frame from the UART port is received.
In one example, before receiving an ethernet packet from an ethernet port, the method further includes:
receiving an access request of an Ethernet port;
sending a random number message to an Ethernet interface;
receiving an authentication message returned by the Ethernet interface, wherein the authentication message is obtained by the Ethernet port according to the random number calculation in the random number message;
judging whether the authentication message is correct or not;
if the key is correct, the security authentication is passed, and the encrypted temporary key and the validity period of the temporary key are sent to the Ethernet port;
and establishing connection with the Ethernet port, and receiving the Ethernet message encrypted by the Ethernet port based on the temporary secret key in the valid period.
Specifically, for one-time network access opening through an ethernet port, a service port needs to be established in a multi-bus network, a link request is made, a random message is sent, a requester calculates an authentication message according to a random number and returns, after the authentication message is confirmed to be correct, an encrypted key and a key validity period are sent, and ciphertext communication is started. And after the validity period expires, rejecting the received message and requiring re-authentication.
In one example, receiving an ethernet message encrypted by an ethernet port based on a temporary key during a validity period further includes:
and in the validity period, monitoring the frequency of the Ethernet port for sending the Ethernet message, and if the frequency exceeds a preset value, disconnecting the Ethernet port.
Specifically, for the route access of the external link, the safety of the internal network of the vehicle body is improved by monitoring the sending frequency of the Ethernet port message. In the specific implementation process, flow control and filtering can be set for a key network of the vehicle body, for example, functions such as flow control and ID filtering are set for the ID of a key target port, and the network is prevented from being attacked by an external network.
In one example, encapsulating the data information using a second protocol to form a second data unit includes:
when the target bus is an Ethernet bus, encrypting the data information by adopting a temporary secret key, and packaging the encrypted data information by adopting an Ethernet bus protocol to form an Ethernet message;
when the target bus is a CAN bus, packaging data information by adopting a CAN bus protocol to form a CAN message;
when the target bus is an SPI bus, packaging the analyzed data information by adopting an SPI bus protocol to form an SPI data frame;
when the target bus is an LIN bus, the analyzed data information is encapsulated by adopting an LIN bus protocol to form an LIN data frame;
and when the target bus is a UART bus, packaging the analyzed data information by adopting a UART bus protocol to form a UART data frame.
Referring to fig. 2, an embodiment of the present invention further provides a gateway device 1, where a plurality of buses are connected to the gateway device, and the gateway device includes:
the receiving module 2 is configured to receive a first data unit from a source port in a current bus;
the analysis module 3 is used for matching a first protocol corresponding to the current bus through a first preset rule, and analyzing the first data unit by adopting the first protocol to acquire data information in the first data unit and an ID (identity) of a target port, wherein the type of the target bus is different from that of the current bus;
the protocol conversion module 4 is used for matching a target bus where the target port is located through a second preset rule based on the ID of the target port, matching a second protocol corresponding to the target bus through the first preset rule, and packaging data information by adopting the second protocol to form a second data unit;
and the forwarding module 5 is configured to send the second data unit to the target port through the target bus.
In a specific implementation process, related functional modules may be developed according to the technical scheme of the present invention, which is easy to implement by those skilled in the art and will not be described herein again.
In one example, the plurality of buses includes at least one ethernet bus, at least one CAN bus, at least one SPI bus, at least one LIN bus, and at least one UART bus; the first preset rule is a bus protocol description table, and the bus protocol description table comprises a mapping relation between each bus in the plurality of buses and a corresponding protocol; the second preset rule is a preset static routing table, and the static routing table comprises a mapping relation of the first data unit in each bus to other buses.
Referring to fig. 2, the gateway apparatus 1 in this embodiment is connected with four ethernet buses (eth 1, eth2, eth3, eth 4), four CAN buses (CAN 0, CAN1, CAN2, CAN 3), an SPI bus and a UART bus.
The analysis flow of each bus is as follows:
a) Ethernet access flow
(1) Each Ethernet port is fixed with an IP, the gateway device 1 has an IP, and a TCP server program is established in the gateway device 1;
(2) The terminal requests TCP link, the gateway device 1 searches for a communication protocol and an internal key according to the source IP;
(3) The gateway apparatus 1 transmits a random number to the device terminal;
(4) The terminal returns authentication information according to the random number;
(5) After the gateway passes the authentication, returning the encrypted key, the encryption algorithm and the validity period of the key to the terminal;
(6) The gateway starts normal message receiving, selects protocol (Ethernet protocol) according to the port, and analyzes;
(7) If the corresponding message can not be found in the routing table, discarding and disconnecting the network connection;
(8) If the sending frequency of the routing message exceeds 50 percent for a long time, the network connection is disconnected.
B) And for CAN bus data, directly receiving messages.
C) For SPI bus data, an SPI data frame is received and analyzed according to a protocol (SPI protocol);
d) The UART network receives the UART data frame and analyzes the UART data frame according to a protocol (UART protocol);
the routing policy of the gateway device is substantially the same as that of the static routing gateway. Namely finding out the corresponding target port ID, finding out whether the signal message is analyzed in the static routing table according to the ID, and carrying out signal routing or message routing.
The specific gateway routing policy is as follows:
(1) If the forwarded target port is an SPI port, framing according to an SPI network protocol and sending the framing to an SPI bus;
(2) If the forwarded target port is an Ethernet port, encrypting according to the temporary key of the corresponding port, packaging according to an Ethernet protocol, and sending to the corresponding link;
(3) And if the forwarded target port is the CAN port, directly sending the message to the corresponding port.
(4) And if the forwarded target port is the UART port, transmitting the target port to the UART bus according to the UART protocol package.
Further, when the bandwidth of a certain bus network in the gateway device 1 is large, the gateway ports can be expanded to record the network messages of the entire vehicle as a part of a vehicle black box. Some bus networks may also be extended to allow multi-frame transmissions at once, which may alleviate the network load due to protocol redundancy fields.
In conclusion, the technical scheme of the invention expands a multi-protocol and multi-bus static routing method on the basis of a simple CAN network static routing, and simultaneously adds functions of verification, authentication, encryption and the like, thereby providing a safe and efficient routing gateway for a complex network in a future vehicle.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments.
Claims (5)
1. A multi-bus hybrid routing method is applied to a vehicle-mounted network and is characterized by comprising the following steps:
receiving a first data unit from a source port in a current bus;
matching a first protocol corresponding to the current bus through a first preset rule, and analyzing the first data unit by adopting the first protocol to acquire data information in the first data unit and an ID (identity) of a target port, wherein the first preset rule is a bus protocol description table which comprises a mapping relation between each bus and the corresponding protocol;
matching a target bus where the target port is located through a second preset rule based on the ID of the target port, wherein the type of the target bus is different from that of the current bus, the second preset rule is a preset static routing table, and the static routing table comprises routing relations from messages or signals in different buses to other buses;
matching a second protocol corresponding to the target bus through the first preset rule, and packaging the data information by adopting the second protocol to form a second data unit;
sending the second data unit to the target port via the target bus;
the plurality of buses comprise at least one Ethernet bus, at least one CAN bus, at least one SPI bus, at least one LIN bus and at least one UART bus;
receiving a first data unit from a source port in a current bus, comprising:
when the current bus is an Ethernet bus, receiving an Ethernet message from an Ethernet port;
before receiving the ethernet packet from the ethernet port, the method further includes:
receiving an access request of the Ethernet port;
sending a random number message to the Ethernet port;
receiving an authentication message returned by the Ethernet port, wherein the authentication message is obtained by the Ethernet port according to the random number calculation in the random number message;
judging whether the authentication message is correct or not;
if the authentication is correct, the security authentication is passed, and the encrypted temporary secret key and the valid period of the temporary secret key are sent to the Ethernet port;
and establishing connection with the Ethernet port, and receiving the Ethernet message encrypted by the Ethernet port based on the temporary secret key in the validity period.
2. The multi-bus hybrid routing method of claim 1, wherein receiving the first data unit from the source port in the current bus further comprises:
when the current bus is a CAN bus, receiving a CAN message from a CAN port;
when the current bus is an SPI bus, receiving an SPI data frame from an SPI port;
when the current bus is an LIN bus, receiving an LIN data frame from an LIN port;
and when the current bus is a UART bus, receiving a UART data frame from a UART port.
3. The multi-bus hybrid routing method according to claim 1, wherein receiving the ethernet packet encrypted by the ethernet port based on the temporary key in the validity period further comprises:
and monitoring the frequency of sending the Ethernet message of the Ethernet port within the validity period, and if the frequency exceeds a preset value, disconnecting the Ethernet port.
4. The multi-bus hybrid routing method of claim 1, wherein encapsulating the data information using the second protocol to form a second data unit comprises:
when the target bus is an Ethernet bus, encrypting the data information by adopting the temporary secret key, and packaging the encrypted data information by adopting an Ethernet bus protocol to form an Ethernet message;
when the target bus is a CAN bus, packaging the data information by adopting a CAN bus protocol to form a CAN message;
when the target bus is an SPI bus, packaging the analyzed data information by adopting an SPI bus protocol to form an SPI data frame;
when the target bus is an LIN bus, packaging the analyzed data information by adopting an LIN bus protocol to form an LIN data frame;
and when the target bus is a UART bus, packaging the analyzed data information by adopting a UART bus protocol to form a UART data frame.
5. A gateway device applied to a vehicle-mounted network, the gateway device being connected with a plurality of buses, the gateway device comprising:
the receiving module is used for receiving a first data unit from a source port in a current bus;
the analysis module is used for matching a first protocol corresponding to the current bus through a first preset rule and analyzing the first data unit by adopting the first protocol to acquire data information in the first data unit and an ID (identity) of a target port, wherein the first preset rule is a bus protocol description table which comprises a mapping relation between each bus and the corresponding protocol;
a protocol conversion module, configured to match, based on the ID of the target port, a target bus where the target port is located through a second preset rule, where the target bus is of a different type from the current bus, match, through the first preset rule, a second protocol corresponding to the target bus, and encapsulate the data information by using the second protocol to form a second data unit, where the second preset rule is a preset static routing table, and the static routing table includes routing relationships from messages or signals in different buses to other buses;
the forwarding module is used for sending the second data unit to the target port through the target bus;
the plurality of buses comprise at least one Ethernet bus, at least one CAN bus, at least one SPI bus, at least one LIN bus and at least one UART bus;
the receiving module receives a first data unit from a source port in a current bus, including:
when the current bus is an Ethernet bus, receiving an Ethernet message from an Ethernet port;
before receiving the ethernet packet from the ethernet port, the method further includes:
receiving an access request of the Ethernet port;
sending a random number message to the Ethernet port;
receiving an authentication message returned by the Ethernet port, wherein the authentication message is obtained by the Ethernet port according to the random number calculation in the random number message;
judging whether the authentication message is correct or not;
if the authentication is correct, the security authentication is passed, and the encrypted temporary secret key and the valid period of the temporary secret key are sent to the Ethernet port;
and establishing connection with the Ethernet port, and receiving the Ethernet message encrypted by the Ethernet port based on the temporary secret key in the validity period.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010760439.XA CN111901215B (en) | 2020-07-31 | 2020-07-31 | Multi-bus hybrid routing method and gateway device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010760439.XA CN111901215B (en) | 2020-07-31 | 2020-07-31 | Multi-bus hybrid routing method and gateway device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111901215A CN111901215A (en) | 2020-11-06 |
CN111901215B true CN111901215B (en) | 2022-10-18 |
Family
ID=73183878
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010760439.XA Active CN111901215B (en) | 2020-07-31 | 2020-07-31 | Multi-bus hybrid routing method and gateway device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111901215B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112688846B (en) * | 2020-12-31 | 2022-06-28 | 北京物芯科技有限责任公司 | Routing method, device, equipment and storage medium of CAN message |
CN113765761B (en) * | 2021-09-09 | 2023-03-14 | 深圳市信锐网科技术有限公司 | Data transmission method, device, equipment, system and storage medium |
CN113949599B (en) * | 2021-10-18 | 2023-03-31 | 广州小鹏汽车科技有限公司 | Method, device and system for transmitting vehicle data, vehicle and computer-readable storage medium |
CN114466046B (en) * | 2022-02-23 | 2024-03-22 | 石家庄通合电子科技股份有限公司 | Data forwarding method and power module |
CN115914429B (en) * | 2022-10-31 | 2024-04-26 | 重庆长安汽车股份有限公司 | Communication protocol adaptation method, device, electronic equipment, vehicle and storage medium |
CN115941595A (en) * | 2022-11-09 | 2023-04-07 | 苏州挚途科技有限公司 | Data forwarding method and device and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102571784A (en) * | 2011-12-29 | 2012-07-11 | 北京交通大学 | Automobile protocol conversion method added based on simulation prelude |
CN104734980A (en) * | 2015-04-10 | 2015-06-24 | 常州多维信息科技有限公司 | Industrial field bus multi-protocol router and multi-protocol conversion method |
KR101651648B1 (en) * | 2016-04-28 | 2016-08-29 | 인포뱅크 주식회사 | Data communication method for vehicle, Electronic Control Unit and system thereof |
CN106487688A (en) * | 2015-08-28 | 2017-03-08 | 惠州市德赛西威汽车电子股份有限公司 | A kind of vehicle-mounted multichannel method for routing and system |
CN108521378A (en) * | 2018-04-23 | 2018-09-11 | 天津芯海创科技有限公司 | Retransmission method, device and the network switching equipment of heterogeneous protocol message |
US10218499B1 (en) * | 2017-10-03 | 2019-02-26 | Lear Corporation | System and method for secure communications between controllers in a vehicle network |
CN111077883A (en) * | 2019-12-27 | 2020-04-28 | 国家计算机网络与信息安全管理中心 | Vehicle-mounted network safety protection method and device based on CAN bus |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10044818B4 (en) * | 2000-09-11 | 2005-06-23 | Volkswagen Aktiengesellschaft | Method for adapting bus systems |
CN102111759A (en) * | 2009-12-28 | 2011-06-29 | ***通信集团公司 | Authentication method, system and device |
CN102546477B (en) * | 2010-12-31 | 2014-11-19 | 北京时代凌宇科技有限公司 | Multifunctional gateway for distributed networked embedded system |
CN210120567U (en) * | 2019-08-15 | 2020-02-28 | 北京汽车股份有限公司 | Vehicle-mounted composite gateway and vehicle |
CN110460621A (en) * | 2019-09-10 | 2019-11-15 | 上海怿星电子科技有限公司 | A kind of industry ethernet based on SOME/IP agreement and CAN bus data transfer device and system |
-
2020
- 2020-07-31 CN CN202010760439.XA patent/CN111901215B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102571784A (en) * | 2011-12-29 | 2012-07-11 | 北京交通大学 | Automobile protocol conversion method added based on simulation prelude |
CN104734980A (en) * | 2015-04-10 | 2015-06-24 | 常州多维信息科技有限公司 | Industrial field bus multi-protocol router and multi-protocol conversion method |
CN106487688A (en) * | 2015-08-28 | 2017-03-08 | 惠州市德赛西威汽车电子股份有限公司 | A kind of vehicle-mounted multichannel method for routing and system |
KR101651648B1 (en) * | 2016-04-28 | 2016-08-29 | 인포뱅크 주식회사 | Data communication method for vehicle, Electronic Control Unit and system thereof |
US10218499B1 (en) * | 2017-10-03 | 2019-02-26 | Lear Corporation | System and method for secure communications between controllers in a vehicle network |
CN108521378A (en) * | 2018-04-23 | 2018-09-11 | 天津芯海创科技有限公司 | Retransmission method, device and the network switching equipment of heterogeneous protocol message |
CN111077883A (en) * | 2019-12-27 | 2020-04-28 | 国家计算机网络与信息安全管理中心 | Vehicle-mounted network safety protection method and device based on CAN bus |
Also Published As
Publication number | Publication date |
---|---|
CN111901215A (en) | 2020-11-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111901215B (en) | Multi-bus hybrid routing method and gateway device | |
CN112202665B (en) | Vehicle-mounted security gateway and data communication method thereof | |
US6101543A (en) | Pseudo network adapter for frame capture, encapsulation and encryption | |
US20200045023A1 (en) | Network guard unit for industrial embedded system and guard method | |
Murvay et al. | Security shortcomings and countermeasures for the SAE J1939 commercial vehicle bus protocol | |
US7046638B1 (en) | Wireless access to closed embedded networks | |
CN110337799A (en) | The motor vehicle of data network with vehicle interior and the method for running motor vehicle | |
CN107819730B (en) | Data transmission method, safety isolation device and vehicle-mounted Ethernet system | |
CN111049803A (en) | Data encryption and platform security access method based on vehicle-mounted CAN bus communication system | |
US10110599B2 (en) | Motor vehicle communication network with switch device | |
CN110213221B (en) | Method for performing diagnostics | |
CN113900429B (en) | Gateway system design method for converting CAN bus into vehicle-mounted Ethernet bus | |
King | Investigating and securing communications in the Controller Area Network (CAN) | |
CN108881302A (en) | Industrial Ethernet and BLVDS bus bar communication device and industrial control system | |
Kwon et al. | Mitigation mechanism against in-vehicle network intrusion by reconfiguring ECU and disabling attack packet | |
CN110290980A (en) | Motor vehicle with the data network for being divided into multiple separate domain and the method for operation data network | |
CN110741660B (en) | Data transmission between a terminal and an associated server | |
EP3713190B1 (en) | Secure bridging of controller area network buses | |
Mokhadder et al. | Evaluation of vehicle system performance of an SAE J1939-91C network security implementation | |
Tashiro et al. | A secure protocol consisting of two different security-level message authentications over CAN | |
JP7151931B2 (en) | RELAY DEVICE, COMMUNICATION NETWORK SYSTEM AND COMMUNICATION CONTROL METHOD | |
CN114978726A (en) | Backbone network safety communication method based on vehicle-mounted Ethernet | |
CN112242943B (en) | IPSec tunnel establishment method and device, branch equipment and center-end equipment | |
KR20180070610A (en) | Method for generating a secret in a network having two or more transport channels | |
US11973700B2 (en) | Trusted remote management unit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |