CN111901215A - Multi-bus hybrid routing method and gateway device - Google Patents

Multi-bus hybrid routing method and gateway device Download PDF

Info

Publication number
CN111901215A
CN111901215A CN202010760439.XA CN202010760439A CN111901215A CN 111901215 A CN111901215 A CN 111901215A CN 202010760439 A CN202010760439 A CN 202010760439A CN 111901215 A CN111901215 A CN 111901215A
Authority
CN
China
Prior art keywords
bus
protocol
port
target
ethernet
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.)
Granted
Application number
CN202010760439.XA
Other languages
Chinese (zh)
Other versions
CN111901215B (en
Inventor
马荣福
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhicheauto Technology Beijing Co ltd
Original Assignee
Zhicheauto Technology Beijing Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhicheauto Technology Beijing Co ltd filed Critical Zhicheauto Technology Beijing Co ltd
Priority to CN202010760439.XA priority Critical patent/CN111901215B/en
Publication of CN111901215A publication Critical patent/CN111901215A/en
Application granted granted Critical
Publication of CN111901215B publication Critical patent/CN111901215B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus 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

Multi-bus hybrid routing method and gateway device
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 the routing forwarding of the hybrid bus such as LIN and ethernet is not taken into consideration, so that the information transmission between various networks is realized, and the analysis and the redistribution of the information are mainly carried out by depending on the 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 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 valid 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 thereof;
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 more 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 apparatus according to an embodiment of the invention.
Description of 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 complex hybrid gateways basically only implement routing forwarding between the same networks, such as a gateway combining ethernet switching, CAN switching, ethernet switching, and CAN network, but the forwarding between CAN and ethernet is mainly completed by the self-analysis of each 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 (identity) 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, routing of data unit transmission among different buses is met through a multi-protocol conversion and multi-bus static routing method, and 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 mode 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: the data from the bus b1 is received, the data ID is obtained after the data is analyzed through the protocol p2, the obtained information is inquired in the static routing table and needs to be forwarded to the bus bn, and the data is packaged and sent to the bus bn through the protocol p 1. The normal signal routing process is as follows: and receiving data from the bus b2, analyzing the data through the protocol pm to obtain a signal, finding out the corresponding message ID 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 the UART bus, the 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 authentication is correct, the security authentication is passed, and the encrypted temporary secret key and the validity 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 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 monitoring the frequency of sending the Ethernet message of the Ethernet port in the valid period, and disconnecting the Ethernet port if the frequency exceeds a preset value.
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 a 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 (eth1, eth2, eth3, eth4), four CAN buses (CAN0, CAN1, CAN2, CAN3), one SPI bus, and one 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 a TCP link, the gateway device 1 searches 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 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) if the forwarded target port is the CAN port, the message is directly sent 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 (10)

1. A multi-bus hybrid routing method, comprising:
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.
2. The multi-bus hybrid routing method of claim 1, wherein matching a first protocol corresponding to the current bus by a first preset rule comprises:
and matching a first protocol corresponding to the current bus through a preset bus protocol description table, wherein the bus protocol description table comprises a mapping relation between each bus in the plurality of buses and the corresponding protocol.
3. The multi-bus hybrid routing method according to claim 1, wherein the second predetermined rule is a predetermined static routing table, and the static routing table comprises a mapping relationship of the first data unit routing in each bus to other buses.
4. The multi-bus hybrid routing method of claim 1, wherein 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.
5. The multi-bus hybrid routing method of claim 4, wherein receiving the 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.
6. The multi-bus hybrid routing method according to claim 5, further comprising, before receiving the ethernet packet from the ethernet port:
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 valid period.
7. The multi-bus hybrid routing method according to claim 6, 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.
8. The multi-bus hybrid routing method of claim 6, 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.
9. A gateway device to which a plurality of buses are connected, 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 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.
10. The gateway apparatus according to claim 9, wherein 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 thereof;
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.
CN202010760439.XA 2020-07-31 2020-07-31 Multi-bus hybrid routing method and gateway device Active CN111901215B (en)

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 true CN111901215A (en) 2020-11-06
CN111901215B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112688846A (en) * 2020-12-31 2021-04-20 北京物芯科技有限责任公司 Routing method, device, equipment and storage medium of CAN message
CN113765761A (en) * 2021-09-09 2021-12-07 深圳市信锐网科技术有限公司 Data transmission method, device, equipment, system and storage medium
CN113949599A (en) * 2021-10-18 2022-01-18 广州小鹏汽车科技有限公司 Method, device and system for transmitting vehicle data and computer readable storage medium
CN114466046A (en) * 2022-02-23 2022-05-10 石家庄通合电子科技股份有限公司 Data forwarding method and power module
CN115914429A (en) * 2022-10-31 2023-04-04 重庆长安汽车股份有限公司 Communication protocol adaptation method, device, electronic equipment, vehicle and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10044818A1 (en) * 2000-09-11 2002-04-04 Am3 Automotive Multimedia Ag Mutual adaptation of differing bus systems, employs gateway comparing command sets existing on each, to carry out exchange transmissions in appropriate formats and protocols
CN102111759A (en) * 2009-12-28 2011-06-29 中国移动通信集团公司 Authentication method, system and device
CN102546477A (en) * 2010-12-31 2012-07-04 北京时代凌宇科技有限公司 Multifunctional gateway for distributed networked embedded system
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
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
CN210120567U (en) * 2019-08-15 2020-02-28 北京汽车股份有限公司 Vehicle-mounted composite gateway and vehicle
CN111077883A (en) * 2019-12-27 2020-04-28 国家计算机网络与信息安全管理中心 Vehicle-mounted network safety protection method and device based on CAN bus

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10044818A1 (en) * 2000-09-11 2002-04-04 Am3 Automotive Multimedia Ag Mutual adaptation of differing bus systems, employs gateway comparing command sets existing on each, to carry out exchange transmissions in appropriate formats and protocols
CN102111759A (en) * 2009-12-28 2011-06-29 中国移动通信集团公司 Authentication method, system and device
CN102546477A (en) * 2010-12-31 2012-07-04 北京时代凌宇科技有限公司 Multifunctional gateway for distributed networked embedded system
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
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
CN111077883A (en) * 2019-12-27 2020-04-28 国家计算机网络与信息安全管理中心 Vehicle-mounted network safety protection method and device based on CAN bus

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112688846A (en) * 2020-12-31 2021-04-20 北京物芯科技有限责任公司 Routing method, device, equipment and storage medium of CAN message
CN113765761A (en) * 2021-09-09 2021-12-07 深圳市信锐网科技术有限公司 Data transmission method, device, equipment, system and storage medium
CN113765761B (en) * 2021-09-09 2023-03-14 深圳市信锐网科技术有限公司 Data transmission method, device, equipment, system and storage medium
CN113949599A (en) * 2021-10-18 2022-01-18 广州小鹏汽车科技有限公司 Method, device and system for transmitting vehicle data and computer readable storage medium
CN114466046A (en) * 2022-02-23 2022-05-10 石家庄通合电子科技股份有限公司 Data forwarding method and power module
CN114466046B (en) * 2022-02-23 2024-03-22 石家庄通合电子科技股份有限公司 Data forwarding method and power module
CN115914429A (en) * 2022-10-31 2023-04-04 重庆长安汽车股份有限公司 Communication protocol adaptation method, device, electronic equipment, vehicle and storage medium
CN115914429B (en) * 2022-10-31 2024-04-26 重庆长安汽车股份有限公司 Communication protocol adaptation method, device, electronic equipment, vehicle and storage medium

Also Published As

Publication number Publication date
CN111901215B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
CN111901215B (en) Multi-bus hybrid routing method and gateway device
CN106953796B (en) Security gateway, data processing method and device, vehicle network system and vehicle
US6101543A (en) Pseudo network adapter for frame capture, encapsulation and encryption
US7046638B1 (en) Wireless access to closed embedded networks
Murvay et al. Security shortcomings and countermeasures for the SAE J1939 commercial vehicle bus protocol
CN107819730B (en) Data transmission method, safety isolation device and vehicle-mounted Ethernet system
US10110599B2 (en) Motor vehicle communication network with switch device
CN112202665A (en) Vehicle-mounted security gateway and data communication method thereof
CN110213221B (en) Method for performing diagnostics
King Investigating and securing communications in the Controller Area Network (CAN)
Kwon et al. Mitigation mechanism against in-vehicle network intrusion by reconfiguring ECU and disabling attack packet
US20200045057A1 (en) Motor vehicle having a data network which is divided into multiple separate domains and method for operating the data network
US20220312202A1 (en) Authenticating a device in a communication network of an automation installation
CN110741660B (en) Data transmission between a terminal and an associated server
EP3713190B1 (en) Secure bridging of controller area network buses
CN113900429B (en) Gateway system design method for converting CAN bus into vehicle-mounted Ethernet bus
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
Khemissa et al. Centralized architecture for ECU security management in connected and autonomous vehicles
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
CN112995508A (en) Intelligent camera
US20070211729A1 (en) Device authentication system
Došek et al. Secure high level communication protocol for CAN bus
KR20180070610A (en) Method for generating a secret in a network having two or more transport channels

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