CN113472617A - Data transmission method and device, gateway and electric automobile - Google Patents
Data transmission method and device, gateway and electric automobile Download PDFInfo
- Publication number
- CN113472617A CN113472617A CN202010236906.9A CN202010236906A CN113472617A CN 113472617 A CN113472617 A CN 113472617A CN 202010236906 A CN202010236906 A CN 202010236906A CN 113472617 A CN113472617 A CN 113472617A
- Authority
- CN
- China
- Prior art keywords
- message
- transmitted
- data transmission
- data
- gateway
- 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.)
- Pending
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 55
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000005538 encapsulation Methods 0.000 claims abstract description 24
- 238000004806 packaging method and process Methods 0.000 claims abstract description 19
- 238000004590 computer program Methods 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 5
- 238000006243 chemical reaction Methods 0.000 abstract description 4
- 238000013461 design Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
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
-
- 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/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- 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/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention provides a data transmission method, a data transmission device, a gateway and an electric automobile, and relates to the technical field of data transmission, wherein the data transmission method comprises the following steps: receiving a message to be transmitted; packaging the message to be transmitted to obtain a packaged message; and sending the encapsulation message to a target network segment node. The scheme of the invention reduces the complexity of message analysis and conversion and improves the efficiency of message transmission.
Description
Technical Field
The invention relates to the technical field of data transmission, in particular to a data transmission method, a data transmission device, a gateway and an electric automobile.
Background
In the prior art, messages of a Controller Area Network (CAN) of an electric vehicle and a Controller Area Network (CANFD) with a Flexible Data Rate need to be forwarded to an ethernet through a gateway, so the gateway needs to convert the CAN/CANFD messages into ethernet somep messages and send the ethernet somep messages to a Network node of an ethernet segment.
Disclosure of Invention
The invention aims to provide a data transmission method, a data transmission device, a gateway and an electric automobile, so that the problems of complex software processing and low conversion efficiency when the gateway converts a message in the prior art are solved.
In order to achieve the above object, an embodiment of the present invention provides a data transmission method, including:
receiving a message to be transmitted;
packaging the message to be transmitted to obtain a packaged message;
and sending the encapsulation message to a target network segment node.
Optionally, the step of encapsulating the packet to be transmitted to obtain an encapsulated packet includes:
analyzing the message to be transmitted to obtain data to be transmitted;
and according to a preset packaging format, packaging the data to be transmitted to obtain a packaging message.
Optionally, the preset encapsulation format includes: a header, a plurality of message ID fields and check bits;
wherein each of the packet ID fields includes: a type field, a length field, and a data field.
Optionally, the step of encapsulating the data to be transmitted according to a preset encapsulation form to obtain an encapsulated packet includes:
writing a signal value representing the type of the message to be transmitted into the type field;
and writing the data to be transmitted in the data field.
Optionally, the message to be transmitted includes at least one of the following:
a Controller Area Network (CAN) message;
controller area network CANFD message with flexible data rate.
An embodiment of the present invention further provides a data transmission device, including:
the receiving module is used for receiving the message to be transmitted;
the processing module is used for packaging the message to be transmitted to obtain a packaged message;
and the sending module is used for sending the encapsulation message to the target network segment node.
Optionally, the receiving module includes:
the analysis submodule is used for analyzing the message to be transmitted and acquiring data to be transmitted;
and the encapsulation submodule is used for encapsulating the data to be transmitted according to a preset encapsulation format to obtain an encapsulation message.
Optionally, the preset encapsulation format includes: a header, a plurality of message ID fields and check bits;
wherein each of the packet ID fields includes: a type field, a length field, and a data field.
Optionally, the packaging sub-module includes:
a first writing unit: the message sending device is used for writing a signal value representing the type of the message to be transmitted into the type field;
and the second writing unit is used for writing the data to be transmitted in the data field.
Optionally, the message to be transmitted includes at least one of the following:
a Controller Area Network (CAN) message;
controller area network CANFD message with flexible data rate.
An embodiment of the present invention further provides a gateway, where the gateway includes the data transmission device as described above, and the gateway is connected between a controller area network CAN network, a controller area network CANFD network with a flexible data rate, and an ethernet network.
The embodiment of the invention also provides an electric automobile which comprises the gateway.
An embodiment of the present invention further provides an electric vehicle, including: a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the data transmission method as described above.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the data transmission method described above are implemented.
The technical scheme of the invention at least has the following beneficial effects:
according to the data transmission method, when the messages are transmitted among different networks, the messages to be transmitted are packaged, so that the messages to be transmitted form a uniform packaging format suitable for a target network, the data domain of the messages is prevented from being analyzed and converted by the gateway, the software processing complexity of the gateway and the hardware requirement on the gateway are reduced, the working efficiency of the gateway is improved, and the problem of overhigh load rate of network segments is solved.
Drawings
FIG. 1 is a flow chart illustrating steps of a data transmission method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a data transmission apparatus according to an embodiment of the present invention;
fig. 3 is a schematic diagram of connection between a gateway and each network according to an embodiment of the present invention.
Description of reference numerals:
1-gateway, 2-CAN network, 3-CAN FD network, 4-Ethernet.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
The invention provides a data transmission method, a data transmission device, a gateway and an electric vehicle, aiming at the problems that the process of analyzing an Ethernet message by the gateway and an unexpected Tang node connected with the gateway in the prior art is complex and the software implementation difficulty is high. The message analysis process is simplified, the software implementation difficulty is reduced, and the rapid analysis and transmission of the message are realized.
As shown in fig. 1, an embodiment of the present invention provides a data transmission method, where the data transmission method includes:
step S101, receiving a message to be transmitted;
step S102, packaging the message to be transmitted to obtain a packaged message;
and step S103, sending the encapsulation message to a target network segment node.
It should be noted that the data transmission method according to the embodiment of the present invention is preferably applied to the gateway 1 and the network shown in fig. 3, specifically, the gateway 1 is respectively connected to the CAN network 2, the CAN fd network 3, and the ethernet 4; the message format of the CAN network 2 is similar to that of the CANFD network 3, the parsing and conversion work of the gateway 1 is relatively simple when the CAN network 2 and the CANFD network 3 perform message transmission, and when the CAN network 2 or the CANFD network 3 performs message transmission with the ethernet 4, the gateway 1 needs to parse the CAN message or the CANFD message and convert the CAN message or the CANFD message into an ethernet 4 message, and send the ethernet 4 message to a network node, because the content rule of the ethernet protocol is more, the software processing of the gateway 1 is complex.
Therefore, the embodiment of the invention encapsulates the message to be transmitted through the gateway 1, so that the encapsulated message can be suitable for the target network segment, thereby simplifying the software processing process of the gateway 1, reducing the hardware requirement on the gateway 1 and improving the data transmission efficiency.
As an alternative embodiment, step S102 is to encapsulate a message to be transmitted to obtain an encapsulated message, and includes:
analyzing the message to be transmitted to obtain data to be transmitted;
as is known, a message generally comprises: in the process of transmitting messages in different network segments, the gateway needs to analyze the received messages so as to obtain the message entities in the messages, namely: data to be transmitted.
And according to a preset packaging format, packaging the data to be transmitted to obtain a packaging message.
Preferably, in this step, the preset encapsulation format is a format suitable for the target network, and the encapsulation format is simple and easy to encapsulate relative to the message format of the target network, so that the storage content of the gateway 1 is reduced, the processing procedure of the gateway 1 is simplified, and the hardware requirement on the gateway 1 is also reduced.
Specifically, the preset packaging format includes: a header, a plurality of message ID fields and check bits;
wherein each of the packet ID fields includes: a type field, a length field, and a data field.
The header is preferably the header of the target network, i.e.: when the CAN network 2 transmits data to the Ethernet 4, the header is an Ethernet header; the check bit is a field corresponding to the header; the message ID field comprises data information in the CAN message analyzed by the gateway.
For example: the format of the encapsulated message is as follows:
wherein, the Header is the Header of the target network;
the Type is a Type field, which characterizes the Type of signal transmission, and preferably uses one byte, wherein the signal value of the Type field is defined as follows:
length is a Length field, which represents the Length of the ID field, preferably using four bytes;
the CAN/CANFD Data field is Data to be transmitted;
FCS is a check bit.
As an optional embodiment, the step of encapsulating the data to be transmitted according to a preset encapsulation form to obtain an encapsulated packet includes:
A) writing a signal value representing the type of the message to be transmitted into the type field; the signal value in this step is the signal value defined for the Type field as described above.
B) And writing the data to be transmitted in the data field.
As an optional embodiment, the message to be transmitted includes at least one of:
a Controller Area Network (CAN) message;
controller area network CANFD message with flexible data rate.
Because the SOMEIP protocol content of the ethernet 4 has more rules, and when the node of the ethernet 4 connected to the value gateway 1 and the domain gateway 1 analyzes the ethernet packet, the process is complex, so the data transmission method of the embodiment of the present invention is preferably applied to a scenario where the CAN network 2/the CAN fd network 3 transmits data to the ethernet 4. Namely: the packaging form is a definition mode of the Ethernet message, so that the design of the CAN message and the CAN FD message is reserved in the Ethernet message, and the requirement of Ethernet communication design is met.
According to the data transmission method, the data of the message to be transmitted are encapsulated according to the preset encapsulation format, so that the design of the CAN message and the CAN FD message is reserved in the Ethernet message, and the problem of overhigh load rate in the design of the CAN network 2 and the CAN FD network 3 is solved; the analysis and conversion processes of the gateway 1 are simplified, the processing complexity of the gateway 1 and the hardware requirement on the gateway 1 are reduced, and the data transmission efficiency is improved.
As shown in fig. 2, an embodiment of the present invention further provides a data transmission apparatus, including:
a receiving module 201, configured to receive a message to be transmitted;
a processing module 202, configured to package the packet to be transmitted, so as to obtain a packaged packet;
a sending module 203, configured to send the encapsulation packet to a target network segment node.
Optionally, in the data transmission apparatus according to the embodiment of the present invention, the receiving module 201 includes:
the analysis submodule is used for analyzing the message to be transmitted and acquiring data to be transmitted;
and the encapsulation submodule is used for encapsulating the data to be transmitted according to a preset encapsulation format to obtain an encapsulation message.
In the data transmission apparatus according to the embodiment of the present invention, the preset encapsulation format includes: a header, a plurality of message ID fields and check bits;
wherein each of the packet ID fields includes: a type field, a length field, and a data field.
Optionally, in the data transmission apparatus according to the embodiment of the present invention, the encapsulation sub-module includes:
a first writing unit: the message sending device is used for writing a signal value representing the type of the message to be transmitted into the type field;
and the second writing unit is used for writing the data to be transmitted in the data field.
In the data transmission apparatus according to the embodiment of the present invention, the packet to be transmitted includes at least one of:
a Controller Area Network (CAN) message;
controller area network CANFD message with flexible data rate.
It should be noted that, the data transmission device provided in the embodiments of the present invention is a data transmission device capable of executing the data transmission method, and all embodiments of the data transmission device are applicable to the data transmission device, and can achieve the same or similar beneficial effects.
An embodiment of the present invention further provides a gateway, where the gateway includes the data transmission device as described above, and as shown in fig. 3, the gateway 1 is connected between a controller area network CAN network 2, a controller area network CANFD network 3 with a flexible data rate, and an ethernet 4.
An embodiment of the present invention further provides an electric vehicle, including: the data transmission method comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein when the computer program is executed by the processor, each process of the data transmission method embodiment can be realized, and the technical effect of mutual projection can be achieved.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the data transmission method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (10)
1. A method of data transmission, comprising:
receiving a message to be transmitted;
packaging the message to be transmitted to obtain a packaged message;
and sending the encapsulation message to a target network segment node.
2. The data transmission method according to claim 1, wherein the step of encapsulating the packet to be transmitted to obtain an encapsulated packet comprises:
analyzing the message to be transmitted to obtain data to be transmitted;
and according to a preset packaging format, packaging the data to be transmitted to obtain a packaging message.
3. The data transmission method according to claim 2, wherein the predetermined encapsulation format comprises: a header, a plurality of message ID fields and check bits;
wherein each of the packet ID fields includes: a type field, a length field, and a data field.
4. The data transmission method according to claim 3, wherein the step of encapsulating the data to be transmitted according to a preset encapsulation form to obtain an encapsulated packet comprises:
writing a signal value representing the type of the message to be transmitted into the type field;
and writing the data to be transmitted in the data field.
5. The data transmission method according to claim 1 or 4, wherein the message to be transmitted includes at least one of:
a Controller Area Network (CAN) message;
controller area network CANFD message with flexible data rate.
6. A data transmission apparatus, comprising:
the receiving module is used for receiving the message to be transmitted;
the processing module is used for packaging the message to be transmitted to obtain a packaged message;
and the sending module is used for sending the encapsulation message to the target network segment node.
7. A gateway comprising the data transmission arrangement of claim 6, wherein the gateway is connected between a controller area network, CAN, network having a flexible data rate, CAN FD, and an Ethernet.
8. An electric vehicle, comprising: the gateway of claim 7.
9. An electric vehicle, comprising: processor, memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the data transmission method according to one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data transmission method according to one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010236906.9A CN113472617A (en) | 2020-03-30 | 2020-03-30 | Data transmission method and device, gateway and electric automobile |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010236906.9A CN113472617A (en) | 2020-03-30 | 2020-03-30 | Data transmission method and device, gateway and electric automobile |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113472617A true CN113472617A (en) | 2021-10-01 |
Family
ID=77864882
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010236906.9A Pending CN113472617A (en) | 2020-03-30 | 2020-03-30 | Data transmission method and device, gateway and electric automobile |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113472617A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113949599A (en) * | 2021-10-18 | 2022-01-18 | 广州小鹏汽车科技有限公司 | Method, device and system for transmitting vehicle data and computer readable storage medium |
CN115051887A (en) * | 2022-06-06 | 2022-09-13 | 国汽智控(北京)科技有限公司 | Data conversion method, interface conversion device and vehicle |
CN115766760A (en) * | 2022-08-31 | 2023-03-07 | 成都赛力斯科技有限公司 | Automobile E/E architecture and signal transmission method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108370342A (en) * | 2016-05-27 | 2018-08-03 | 松下电器(美国)知识产权公司 | Gateway apparatus, vehicle netbios, forwarding method and program |
US20190250610A1 (en) * | 2018-02-13 | 2019-08-15 | Sf Motors, Inc. | Systems and methods for scalable electrical engineering (ee) architecture in vehicular environments |
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 |
-
2020
- 2020-03-30 CN CN202010236906.9A patent/CN113472617A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108370342A (en) * | 2016-05-27 | 2018-08-03 | 松下电器(美国)知识产权公司 | Gateway apparatus, vehicle netbios, forwarding method and program |
US20190250610A1 (en) * | 2018-02-13 | 2019-08-15 | Sf Motors, Inc. | Systems and methods for scalable electrical engineering (ee) architecture in vehicular environments |
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 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113949599A (en) * | 2021-10-18 | 2022-01-18 | 广州小鹏汽车科技有限公司 | Method, device and system for transmitting vehicle data and computer readable storage medium |
CN115051887A (en) * | 2022-06-06 | 2022-09-13 | 国汽智控(北京)科技有限公司 | Data conversion method, interface conversion device and vehicle |
CN115766760A (en) * | 2022-08-31 | 2023-03-07 | 成都赛力斯科技有限公司 | Automobile E/E architecture and signal transmission method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113472617A (en) | Data transmission method and device, gateway and electric automobile | |
CN110380970B (en) | Self-adaptive data message forwarding method and device suitable for heterogeneous network | |
EP3813318B1 (en) | Packet transmission method, communication device, and system | |
CN112787902B (en) | Message encapsulation method and device and message decapsulation method and device | |
CN113114706B (en) | Multichannel Ethernet message processing method based on power chip | |
US20240073128A1 (en) | Message encapsulation and de-encapsulation method and device, storage medium, and electronic device | |
CN114422617B (en) | Message processing method, system and computer readable storage medium | |
CN113660191A (en) | Communication method for bridging MIL-STD-1553 and GJB1188B protocols through FC-AE-1553 protocol | |
CN113438633B (en) | Communication data processing method, terminal and computer readable storage medium | |
CN111371736B (en) | iOAM information processing method, iOAM information processing device and computer readable storage medium | |
EP3813281A1 (en) | Method for receiving code block stream, method for sending code block stream and communication apparatus | |
CN114301993B (en) | Data transmission method, device, terminal equipment and storage medium | |
CN113612668B (en) | Communication method for bridging three protocols | |
CN113056008B (en) | Data transmission method and device | |
CN113300959A (en) | MPLS-VPN communication method applied in 5G network | |
CN110611892B (en) | Modem short message reporting method, device, system, equipment and medium | |
CN103580805B (en) | The processing method and processing device of message | |
CN111327575B (en) | Communication method and device based on Ethernet in train | |
CN115174699A (en) | Processing method of Ethernet message and related equipment | |
WO2023231264A1 (en) | Ethernet device with high transmission efficiency | |
CN113163025B (en) | Data transmission method, device, equipment and storage medium | |
CN112688879B (en) | Data limit value determining method and device | |
CN117749912B (en) | Data transmission control method and system based on FPGA module | |
CN115720214B (en) | Method, system, medium and equipment for recombining IP data message in IPSec transmission mode | |
CN114745351A (en) | Message transmission method, system, network equipment and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211001 |
|
RJ01 | Rejection of invention patent application after publication |