CN111245776A - Vehicle-mounted data transmission method, device, equipment and storage medium - Google Patents

Vehicle-mounted data transmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN111245776A
CN111245776A CN201910960415.6A CN201910960415A CN111245776A CN 111245776 A CN111245776 A CN 111245776A CN 201910960415 A CN201910960415 A CN 201910960415A CN 111245776 A CN111245776 A CN 111245776A
Authority
CN
China
Prior art keywords
message
vehicle
data
ethernet
type
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
Application number
CN201910960415.6A
Other languages
Chinese (zh)
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.)
FAW Group Corp
Original Assignee
FAW Group Corp
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 FAW Group Corp filed Critical FAW Group Corp
Priority to CN201910960415.6A priority Critical patent/CN111245776A/en
Publication of CN111245776A publication Critical patent/CN111245776A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • 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

Abstract

The invention discloses a vehicle-mounted data transmission method, a device, equipment and a storage medium. Wherein, the method comprises the following steps: when a data message is received, determining the message type according to the source of the data message; determining that the message type is a vehicle-mounted message, and encapsulating the data message into an Ethernet message and sending the Ethernet message when the encapsulation condition is met; or determining that the message type is an Ethernet message, disassembling the data message into a vehicle-mounted message and sending the vehicle-mounted message. According to the technical scheme of the embodiment of the invention, the data message type is determined according to the source, and the data messages are processed and sent according to different types, so that data transmission under the condition of hybrid networking of the Ethernet and the vehicle-mounted bus is realized, the data transmission delay is reduced on the premise of ensuring the capacity of the vehicle-mounted network, and the data transmission efficiency is improved.

Description

Vehicle-mounted data transmission method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of intelligent automobile networking, in particular to a vehicle-mounted data transmission method, device, equipment and storage medium.
Background
With the development of automobile networking technology, the demand for expanding the capacity of a vehicle-mounted network is increasingly vigorous due to the development of automobile intellectualization, networking, automatic driving and big data application, and in order to meet the demand of the capacity of the vehicle-mounted network, the vehicle-mounted Ethernet enters the visual field of all finished automobile manufacturers.
In the prior art, the ethernet network and the traditional vehicle bus network are often combined for networking in order to enlarge the capacity of the vehicle network, but because the message payload of the traditional vehicle network is only 8 bytes, and the message payload of the ethernet network can reach 1500 bytes, the performance of the ethernet network cannot be fully utilized due to the combined networking of the ethernet network and the traditional vehicle bus network, the data transmission delay is high, and the data transmission efficiency is reduced.
Disclosure of Invention
The invention provides a vehicle-mounted data transmission method, a device, equipment and a storage medium, which are used for realizing hybrid networking of vehicles, improving the capacity of a vehicle-mounted network, reducing data transmission time delay and enhancing the data transmission efficiency.
In a first aspect, an embodiment of the present invention provides a vehicle-mounted data transmission method, where the method includes:
when a data message is received, determining the message type according to the source of the data message;
determining that the message type is a vehicle-mounted message, and encapsulating the data message into an Ethernet message and sending the Ethernet message when the encapsulation condition is met; or
And if the message type is determined to be an Ethernet message, the data message is disassembled into a vehicle-mounted message and is sent.
In a second aspect, an embodiment of the present invention provides an on-vehicle data transmission device, where the device includes:
the type determining module is used for determining the message type according to the source of the data message when the data message is received;
the vehicle-mounted processing module is used for determining that the message type is a vehicle-mounted message, and encapsulating the data message into an Ethernet message and transmitting the Ethernet message when the encapsulation condition is met; or
And the Ethernet processing module is used for disassembling the data message into a vehicle-mounted message and sending the vehicle-mounted message when the message type is determined to be the Ethernet message.
In a third aspect, an embodiment of the present invention provides an apparatus, where the apparatus includes:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the vehicle-mounted data transmission method according to any one of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the vehicle-mounted data transmission method according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, when the data message is received, the message type is determined according to the source of the data message, when the message type is the vehicle-mounted message, the data message is packaged into the Ethernet message and sent when the packaging condition is met, and when the message type is the Ethernet message, the data message is disassembled into the vehicle-mounted message and sent, so that the hybrid networking of the vehicle-mounted bus network and the Ethernet network is realized, the network capacity of the vehicle-mounted network is improved, the data transmission delay is reduced on the premise of ensuring the capacity of the vehicle-mounted network, and the data transmission efficiency is improved.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for transmitting vehicle-mounted data according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an ethernet packet according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating steps of a vehicle-mounted data transmission method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data packet according to an embodiment of the present invention;
fig. 5 is a diagram illustrating an example of sending an ethernet packet according to a second embodiment of the present invention;
fig. 6 is an exemplary diagram of a vehicle-mounted data transmission method according to a second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a vehicle-mounted data transmission device according to a third embodiment of the present invention;
fig. 8 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only a part of the structures related to the present invention, not all of the structures, are shown in the drawings, and furthermore, embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
Example one
Fig. 1 is a flowchart of steps of a vehicle data transmission method according to an embodiment of the present invention, where the embodiment of the present invention may be used in a case of hybrid networking data transmission between a vehicle bus network and an ethernet network, and the method may be executed by a vehicle data transmission device, where the device may be implemented in a hardware and/or software manner, and the device may be integrated in a vehicle gateway, referring to fig. 1, where the method according to the embodiment of the present invention includes:
step 101, when receiving a data message, determining a message type according to a source of the data message.
The data message can be data sent in a mixed and combined vehicle-mounted network, the data message can be specifically an Ethernet message and a vehicle-mounted bus message, and the data message can be transmitted to the vehicle-mounted bus network through the Ethernet or transmitted to the Ethernet through the vehicle-mounted bus network; the source can be a sending source for representing data messages, and the source of the data messages can comprise Ethernet and a vehicle-mounted bus network; the message type can be the type of the data message, the message type of the data message can be related to a network for sending the data message, if the data message is sent from the Ethernet, the message type is the Ethernet message, and if the data message is sent from the vehicle-mounted bus network, the message type is the vehicle-mounted bus message.
Specifically, when the data packet is acquired, the packet type may be determined according to the source of the data packet, if the data packet is sent by an ethernet, the packet type of the data packet may be determined as the ethernet packet, and if the data packet is sent by a vehicle bus packet, the packet relation of the data packet may be determined as the vehicle packet, it may be understood that the manner of acquiring the source of the data packet may include analyzing the format of the data packet, and the source of the data packet may be determined according to the source address or the format of the data packet, for example, if the length of the data packet is 1500 bytes, the source of the data packet is the ethernet, and if the length of the data packet is 8 bytes, the source of the data packet is the vehicle bus.
And 102, determining that the message type is a vehicle-mounted message, and packaging the data message into an Ethernet message and sending the Ethernet message when the packaging condition is met.
The encapsulation condition may be a condition for encapsulating the data packet into an ethernet packet, and may include that a time interval for encapsulating the ethernet packet meets a requirement, and may also include that the data packet is a data packet that needs to be immediately forwarded; the ethernet packet may be a data packet sent to a vehicle bus network by an ethernet, fig. 2 is a schematic structural diagram of the ethernet packet provided in an embodiment of the present invention, referring to fig. 2, the ethernet packet may be composed of protocol data units, the ethernet packet may include a plurality of protocol data units, each protocol data unit may include a protocol data unit header 10 and a protocol data unit load 11, the protocol data unit header 10 may be used for a number of the protocol data unit and a length of the protocol data unit, and the protocol data unit load may store transmission data.
In the embodiment of the present invention, after determining that the message type of the data message is a vehicle-mounted message, the data message needs to be sent to an ethernet network through a vehicle-mounted bus network, and therefore the data message needs to be encapsulated into an ethernet message, because the length of the ethernet message may be 1500 bytes, and the length of the vehicle-mounted message is only 8 bytes, in order to improve the advantage that the ethernet network can send long data, a plurality of vehicle-mounted messages may be encapsulated into one ethernet message, and the acquired vehicle-mounted message may be stored.
And 103, determining that the message type is an ether message, disassembling the data message into a vehicle-mounted message and sending the vehicle-mounted message.
In the embodiment of the present invention, the ethernet packet may be composed of a plurality of vehicle-mounted packets, the vehicle-mounted packets may be used as protocol data units in the ethernet packet, the protocol data unit packet header may be a vehicle-mounted packet header, and the protocol data unit load may be a vehicle-mounted packet load.
Specifically, after the message type of the data message is determined to be an ethernet message, the ethernet message may need to be forwarded to the vehicle bus network, and since the length of the ethernet message is much longer than that of the vehicle message, the ethernet message needs to be disassembled, for example, a load part of the ethernet message may be disassembled into a plurality of vehicle message loads according to the length of the vehicle message, and a message header is added to each vehicle message load; the length of the protocol data unit of the ether message can be set to be the same as that of the vehicle-mounted message when the ether message is generated, and the protocol data unit of the ether message can be directly used as the vehicle-mounted message when the ether message is disassembled. After the vehicle-mounted message is acquired, the vehicle-mounted message can be sent to a vehicle-mounted bus network.
According to the technical scheme of the embodiment of the invention, when the data message is received, the message type is determined according to the source of the data message, if the message type is the vehicle-mounted message, the data message is encapsulated into the Ethernet message and is sent when the encapsulation condition is met, and if the message type is the Ethernet message, the data message is disassembled into the vehicle-mounted message and is sent, so that data transmission under the condition of hybrid networking is realized, format conversion is rapidly carried out on the vehicle-mounted message and the Ethernet message, and on the premise of meeting the capacity of a vehicle-mounted network, the data transmission delay is reduced and the data transmission efficiency is improved.
Example two
Fig. 3 is a flowchart of steps of a vehicle-mounted data transmission method according to a second embodiment of the present invention, which is embodied based on the second embodiment of the present invention, and referring to fig. 3, the vehicle-mounted data transmission method according to the second embodiment of the present invention includes:
step 201, when a data message is received and it is determined that the data message does not belong to a preset routing table, discarding the data message.
The preset routing table may be a data table composed of routing information in a vehicle-mounted network, and the preset routing table may be composed of network addresses of each device in the vehicle, and may include a transmission address of the information and a reception address of the information.
Specifically, when the data packet is acquired, a source address or a destination address of the data packet may be acquired, and the corresponding source address and destination address may be searched in the preset routing table, and if the source address and destination address of the data packet cannot be searched in the preset routing table, it may be determined that the data packet is an illegal packet, and the data packet may be directly discarded without further processing. Furthermore, the length of the data message can be judged, when the length of the data message is smaller than the threshold length, the data message format error can be determined, the data message can be discarded, and the data message is not processed any more.
Step 202, analyzing the data message to obtain a source address.
The source address may be a network address of the data message sending device, and the source address may be an ethernet address or a vehicle bus network address according to different networks.
Specifically, the data message may be analyzed to obtain a source address stored in the data message header, fig. 4 is a schematic structural diagram of the data message provided in the embodiment of the present invention, referring to fig. 4, the data message may include two parts, namely, a data message header 21 and data 22, the data message header may include an identifier and address information 23, the address information may include the source address and the destination address of the data message, and the source address in the data message may determine whether the data message is from the ethernet network or the vehicle bus network.
And 203, if the source address is the vehicle-mounted bus network, determining that the message type of the data message is a vehicle-mounted message.
Specifically, the source address of the data packet may be determined, and if the source address corresponds to the vehicle bus network, it may be determined that the data packet is sent from the vehicle bus network, and accordingly, the packet type of the data packet may be a vehicle packet.
Step 2031, determining the message type as a vehicle-mounted message, and storing the data message in a preset space.
In the embodiment of the present invention, after determining that the message type is a vehicle-mounted message, the vehicle-mounted message needs to be converted into an ethernet message, because the length of the ethernet message is much longer than the length of the vehicle-mounted message, for example, the length of the ethernet message is 1500 bytes, and the length of the vehicle-mounted message is 8 bytes, in order to improve the transmission efficiency of data in the ethernet network, a plurality of vehicle-mounted messages may be encapsulated into the ethernet message, before the ethernet message is encapsulated, the data message determined as the vehicle-mounted message may be stored, and the preset space may be a hard disk, a memory, a cache, and the like, and may store.
Step 2032, when it is determined that the encapsulation condition is satisfied, encapsulating the data packet in the preset space as data into an ethernet packet, and clearing the data packet stored in the preset space.
The encapsulation condition may be a condition for encapsulating the vehicle-mounted message into an ethernet message.
Specifically, when the encapsulation condition is met, all data messages stored in the preset space can be acquired, the ether message can be composed of protocol data units, when the vehicle-mounted message is encapsulated into the ether message, the vehicle-mounted message can be encapsulated as the protocol data units in the ether message, all the data messages stored in the preset space can be respectively encapsulated into the same ether message as the protocol data units, and further, after the encapsulation of the ether message is completed, the preset space can be emptied, and all the stored data messages can be deleted.
Further, the meeting of the packaging condition comprises:
if the attribute of the data message is the event type, determining that the encapsulation condition is met; or if the attribute of the data message is a periodic type and the time interval between the current time and the previous time for encapsulating the Ethernet message is equal to the threshold time, determining that the encapsulation condition is met.
In this embodiment of the application, the attribute corresponding to the data packet, which is a type of the vehicle-mounted packet, may refer to a frequency at which the data packet is transmitted, and if the data packet is periodically transmitted, for example, the tire pressure monitoring packet of the vehicle is transmitted once at regular intervals, the tire pressure monitoring packet may still be normally used as long as the packet does not exceed an timeout time, the attribute of the tire pressure monitoring packet may be a periodic type, the requirement of the periodic type vehicle-mounted packet on time limit is not high, and the vehicle-mounted packet may be stored in a preset space, and when a time interval at which the ethernet packet occurs is reached, the vehicle-mounted packet may be encapsulated in the ethernet packet; the fault alarm message is only generated when a fault occurs, the fault alarm message must be transmitted in time, and when the vehicle-mounted message of the event type is obtained, the vehicle-mounted message can be immediately packaged into an Ethernet message, so that the vehicle-mounted message with the attribute of the event type can be received as a packaging condition; and when the attribute of the data message of the vehicle-mounted message type is a periodic type, when the time interval for encapsulating the ether message is equal to the threshold time, the threshold time is taken as the encapsulation condition, wherein the threshold time can be the overtime time of the vehicle-mounted message of the periodic type.
Step 2033, sending the ethernet packet to an ethernet network.
Specifically, the ethernet packet encapsulated by the vehicle-mounted packet may be transmitted through an ethernet network.
And 204, if the message type is determined to be an ether message, disassembling the data message into a vehicle-mounted message and sending the vehicle-mounted message.
Specifically, the source address of the data packet may be determined, and if the source address corresponds to the ethernet network, it may be determined that the data packet is sent from the ethernet network, and accordingly, the packet type of the data packet may be the ethernet packet.
Step 2041, if the message type is determined to be an ether message, the data message is analyzed to obtain the message content.
The message content may be data transmitted in an ethernet message, for example, the ethernet message uses a protocol data unit as the message content, and when the data message of the ethernet message type is analyzed, the protocol data unit in the ethernet message may be directly acquired.
In the embodiment of the present invention, after determining that the packet type is the ethernet packet, the data packet may be analyzed to obtain the packet content of the data packet, for example, the ethernet packet is composed of a protocol data unit, and the protocol data unit of the ethernet packet may be directly obtained.
Step 2042, the message content is divided into vehicle-mounted messages according to the content number.
The content number may be a number of the message content, the message content may be composed of a plurality of segments of data, and each segment of data may correspond to its own message content.
Specifically, the content numbers in the message content can be acquired, different content numbers can correspond to different message contents, the message content can be divided into multiple sections according to the content numbers, and each section of message content can be used as a vehicle-mounted message.
And 2043, sending each vehicle-mounted message to a vehicle-mounted bus network.
Specifically, the vehicle-mounted message obtained by splitting the ethernet message may be transmitted through a vehicle-mounted bus network.
According to the technical scheme of the embodiment of the invention, when the data message is received and the data message is determined not to belong to the preset routing table, the data message is discarded; otherwise, analyzing the data message to obtain a source address, if the source address is the vehicle-mounted bus network, determining that the data message is the vehicle-mounted message, storing the data message into a preset space, and encapsulating all the data messages in the preset space into an Ethernet message to be sent when the encapsulation condition is met; if the source address is an Ethernet, determining that the data message is an Ethernet message, analyzing and acquiring the message content of the data message, dividing the message content into vehicle-mounted messages according to the content number and sending the vehicle-mounted messages; the data transmission under the condition of hybrid networking is realized, the vehicle-mounted messages and the Ethernet messages are mutually converted, and a plurality of vehicle-mounted messages are packaged into the Ethernet messages on the premise of meeting the bandwidth capacity, so that the data transmission efficiency is improved.
Further, on the basis of the above embodiment of the present invention, the storage space of the data packet in the preset space is less than or equal to the threshold space.
The threshold space may be a maximum length of a preset space for storing the data packet, and specifically may be a maximum length of the terapacket.
Specifically, in order to ensure that all data packets in the preset space can be encapsulated into the ethernet packet, the size of the preset space may be set as a threshold space, and the length of the data packets stored in the preset space may not exceed the threshold space. Fig. 5 is an exemplary diagram of sending an ethernet packet according to the second embodiment of the present invention, referring to fig. 5, where a CAN1, a CAN2, a CAN3, a CAN4, and a CAN5 are vehicle-mounted packets respectively, and an attribute of the vehicle-mounted packet is a cycle type, when the CAN1 is obtained, the data packet may be stored in a buffer terminal Hd1 and a PDU1, and a timer is started to monitor a time interval of ethernet packet encapsulation, where Hd may be a packet header and PDU may be packet data. When the CAN2 and the CAN3 are acquired, the CAN2 and the CAN3 are stored in the buffer area, at this time, the buffer area does not reach the threshold space, when the CAN4 is stored in the buffer area, the data message stored in the buffer area reaches the threshold space, the data message in the buffer area CAN be packaged into an Ethernet message for transmission, the timer is restarted, and the CAN5 is continuously received and stored in the buffer area.
Exemplarily, fig. 6 is an exemplary diagram of a vehicle-mounted data transmission method provided in the second embodiment of the present invention, referring to fig. 6, taking a CAN bus network and an ethernet hybrid networking as an example, the method in the second embodiment of the present invention includes: step 1, the gateway judges whether the message is received from a CAN bus or an Ethernet bus. And 2, if the message is received on the CAN bus, comparing the message with the routing table, if the message ID exists in the routing table, continuing to process, and if the message ID does not exist, discarding. And 3, judging the length of the received message, if the length is greater than or equal to the expected length, continuing to process, and if the length is smaller than the expected length, discarding. And 4, if the length of the message is greater than or equal to the expected length, judging the cycle type of the message, and if the message is the cycle type, judging whether the timer is started. And 5, if the timer is started, judging whether the size of the buffer area is satisfied. And 6, if the size of the buffer area meets the requirement, putting the message into the buffer area. And 7, if the size of the buffer area is not satisfied, packing the messages in the buffer area into an Ethernet message to be sent, then putting the message into the buffer area, and restarting the starting timer. And 8, according to the step 5, if the timer is not started, starting the timer and placing the message into a buffer area. And 9, according to the step 4, if the received message is event-type, judging whether the size of the buffer area is satisfied, if so, immediately packaging the message in the buffer area and the message into an Ethernet message to be sent, and setting the timer to be 0 but not starting the Ethernet message. And step 10, if the size of the buffer area is not satisfied, packing the messages in the buffer area into an Ethernet message to be sent out, immediately packing the message into an Ethernet message to be sent out, and setting the timer to be 0 but not starting the timer. Step 11, if the received message is determined to be an ethernet message in step 1, then the PDUID (PDU is a protocol data unit, i.e. a data unit in an ethernet message) is parsed according to the format defined in fig. 1 and 2. And step 12, judging whether the PDUID is defined in the routing table or not, and discarding the PDUID if the PDUID is not defined. Step 13, determine whether PDULength is defined in the routing table, and discard if it is smaller than the expected length. And step 14, routing the corresponding PDU to the corresponding CAN bus according to the definition in the routing table.
EXAMPLE III
Fig. 7 is a schematic structural diagram of a vehicle-mounted data transmission device provided in a third embodiment of the present invention, which is capable of executing the vehicle-mounted data transmission method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. The device can be implemented by software and/or hardware, and specifically comprises: a type determination module 301, an in-vehicle processing module 302, and an ethernet processing module 303.
The type determining module 301 is configured to determine a packet type according to a source of a data packet when the data packet is received.
And the vehicle-mounted processing module 302 is configured to determine that the packet type is a vehicle-mounted packet, and package the data packet into an ethernet packet and send the ethernet packet when the package condition is met. Or
And the ethernet processing module 303 is configured to, if the message type is determined to be an ethernet message, disassemble the data message into a vehicle-mounted message and send the vehicle-mounted message.
According to the technical scheme of the embodiment of the invention, when the type determining module receives the data message, the message type is determined according to the source of the data message, when the message type is the vehicle-mounted message, the vehicle-mounted processing module packages the data message into the Ethernet message and sends the Ethernet message when the packaging condition is met, and when the message type is the Ethernet message, the Ethernet processing module disassembles the data message into the vehicle-mounted message and sends the vehicle-mounted message, so that the hybrid networking of a vehicle-mounted bus network and the Ethernet network is realized, the network capacity of the vehicle-mounted network is improved, the data transmission delay is reduced on the premise of ensuring the capacity of the vehicle-mounted network, and the data transmission efficiency is improved.
Further, on the basis of the above embodiment of the present invention, the type determining module includes:
and the analysis unit is used for analyzing the data message to obtain a source address.
And the vehicle-mounted processing unit is used for determining that the message type of the data message is a vehicle-mounted message if the source address is a vehicle-mounted bus network. Or
And the Ethernet processing unit is used for determining that the message type of the data message is an Ethernet message if the source address is an Ethernet.
Further, on the basis of the above embodiment of the present invention, the meeting of the packaging condition of the vehicle-mounted processing module includes:
if the attribute of the data message is the event type, determining that the encapsulation condition is met; or if the attribute of the data message is a periodic type and the time interval between the current time and the previous time for encapsulating the Ethernet message is equal to the threshold time, determining that the encapsulation condition is met.
Further, on the basis of the above embodiment of the present invention, the vehicle-mounted processing module includes:
and the storage unit is used for determining that the message type is a vehicle-mounted message and storing the data message into a preset space.
The packaging unit is used for packaging the data message in the preset space into the Ethernet message as data when the packaging condition is met, and clearing the data message stored in the preset space;
and the Ethernet sending unit is used for sending the Ethernet message to an Ethernet.
Further, on the basis of the above embodiment of the present invention, the storage space of the data packet in the preset space in the storage unit is less than or equal to the threshold space.
Further, on the basis of the above embodiment of the present invention, the ethernet processing module includes:
and the analysis unit is used for analyzing the data message to acquire the message content if the message type is determined to be the Ethernet message.
And the disassembling unit is used for dividing the message content into vehicle-mounted messages according to the content numbers.
And the vehicle-mounted sending unit is used for sending each vehicle-mounted message to the vehicle-mounted bus network.
Further, on the basis of the above embodiment of the invention, the method further includes:
and the illegal processing module is used for discarding the data message when determining that the data message does not belong to a preset routing table.
Example four
Fig. 8 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention, as shown in fig. 8, the apparatus includes a processor 80, a memory 81, an input device 82, and an output device 83; the number of the processors 80 in the device may be one or more, and one processor 80 is taken as an example in fig. 8; the processor 80, the memory 81, the input device 82 and the output device 83 in the apparatus may be connected by a bus or other means, and the connection by a bus is exemplified in fig. 8.
The memory 81, as a computer-readable storage medium, may be used to store software programs, computer-executable programs, and modules, such as program instructions corresponding to the in-vehicle data transmission method in the embodiment of the present invention (for example, the type determination module 301, the in-vehicle processing module 302, and the ethernet processing module 303 in the in-vehicle data transmission apparatus). The processor 80 executes various functional applications of the device and data processing by running software programs, instructions, and modules stored in the memory 81, that is, implements the above-described in-vehicle data transmission method.
The memory 81 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 81 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 81 may further include memory located remotely from processor 80, which may be connected to devices through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 82 may be used to receive entered numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 83 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a method for transmitting vehicle-mounted data, and the method includes:
when a data message is received, determining the message type according to the source of the data message;
determining that the message type is a vehicle-mounted message, and encapsulating the data message into an Ethernet message and sending the Ethernet message when the encapsulation condition is met; or
And if the message type is determined to be an Ethernet message, the data message is disassembled into a vehicle-mounted message and is sent.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the vehicle-mounted data transmission method provided by any embodiments of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the vehicle-mounted data transmission device, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A vehicle-mounted data transmission method is characterized by comprising the following steps:
when a data message is received, determining the message type according to the source of the data message;
determining that the message type is a vehicle-mounted message, and encapsulating the data message into an Ethernet message and sending the Ethernet message when the encapsulation condition is met; or
And if the message type is determined to be an Ethernet message, the data message is disassembled into a vehicle-mounted message and is sent.
2. The method of claim 1, wherein determining the packet type based on the source of the data packet comprises:
analyzing the data message to obtain a source address;
if the source address is a vehicle-mounted bus network, determining that the message type of the data message is a vehicle-mounted message; or
And if the source address is an Ethernet, determining that the message type of the data message is an Ethernet message.
3. The method of claim 1, wherein the satisfaction of the encapsulation condition comprises:
if the attribute of the data message is the event type, determining that the encapsulation condition is met; or if the attribute of the data message is a periodic type and the time interval between the current time and the previous time for encapsulating the Ethernet message is equal to the threshold time, determining that the encapsulation condition is met.
4. The method according to claim 1, wherein if it is determined that the packet type is a vehicle-mounted packet, encapsulating the data packet into an ethernet and transmitting the data packet when an encapsulation condition is satisfied comprises:
determining that the message type is a vehicle-mounted message, and storing the data message into a preset space;
when the encapsulation condition is determined to be met, encapsulating the data message in the preset space into an Ethernet message as data, and clearing the data message stored in the preset space;
and sending the Ethernet message to an Ethernet.
5. The method of claim 4, wherein the storage space of the data packets in the preset space is less than or equal to a threshold space.
6. The method according to claim 1, wherein if the message type is determined to be an ether message, the data message is disassembled into a vehicle-mounted message and is sent, and the method comprises the following steps:
if the message type is determined to be an Ethernet message, analyzing the data message to obtain message content;
dividing the message content into vehicle-mounted messages according to the content numbers;
and sending each vehicle-mounted message to a vehicle-mounted bus network.
7. The method of claim 1, wherein upon receiving the data packet, further comprising:
and when the data message is determined not to belong to a preset routing table, discarding the data message.
8. An on-vehicle data transmission device, comprising:
the type determining module is used for determining the message type according to the source of the data message when the data message is received;
the vehicle-mounted processing module is used for determining that the message type is a vehicle-mounted message, and encapsulating the data message into an Ethernet message and transmitting the Ethernet message when the encapsulation condition is met; or
And the Ethernet processing module is used for disassembling the data message into a vehicle-mounted message and sending the vehicle-mounted message when the message type is determined to be the Ethernet message.
9. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the in-vehicle data transmission method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the in-vehicle data transmission method according to any one of claims 1 to 7.
CN201910960415.6A 2019-10-10 2019-10-10 Vehicle-mounted data transmission method, device, equipment and storage medium Pending CN111245776A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910960415.6A CN111245776A (en) 2019-10-10 2019-10-10 Vehicle-mounted data transmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910960415.6A CN111245776A (en) 2019-10-10 2019-10-10 Vehicle-mounted data transmission method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111245776A true CN111245776A (en) 2020-06-05

Family

ID=70869354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910960415.6A Pending CN111245776A (en) 2019-10-10 2019-10-10 Vehicle-mounted data transmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111245776A (en)

Cited By (7)

* 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
CN114095445A (en) * 2020-07-29 2022-02-25 华人运通(上海)自动驾驶科技有限公司 Data transmission control method and device for vehicle-mounted Ethernet, electronic equipment and storage medium
CN114374583A (en) * 2022-01-17 2022-04-19 南京芯驰半导体科技有限公司 Automobile gateway controller and control method thereof
CN114598669A (en) * 2022-03-07 2022-06-07 潍柴动力股份有限公司 Message storage method, device and equipment
CN114866484A (en) * 2022-04-29 2022-08-05 广州小鹏汽车科技有限公司 Vehicle, data transparent transmission method thereof and computer readable storage medium
CN115242575A (en) * 2021-04-22 2022-10-25 广州汽车集团股份有限公司 CANFD network-based message processing method, device, equipment and storage medium
CN115442173A (en) * 2022-06-07 2022-12-06 北京车和家信息技术有限公司 Vehicle message forwarding and processing method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2869502A1 (en) * 2013-11-01 2015-05-06 THN Corp. Method of packaging and unpackaging packet and apparatuses using the same
CN106953796A (en) * 2017-04-13 2017-07-14 北京汽车集团有限公司 Security gateway, data processing method, device, vehicle network topology and vehicle
CN106961437A (en) * 2017-03-24 2017-07-18 华东师范大学 CAN and Ethernet hybrid network gateway network management device and its exchange method
CN106992879A (en) * 2017-03-14 2017-07-28 中国第汽车股份有限公司 A kind of computational methods of CAN load factor
CN107399286A (en) * 2017-07-27 2017-11-28 北京车和家信息技术有限责任公司 Mobile unit, the control method of mobile unit and computer installation
CN108011904A (en) * 2016-10-31 2018-05-08 比亚迪股份有限公司 Method for sending information, method of reseptance, device and information transmission system
CN108696424A (en) * 2017-04-07 2018-10-23 上汽通用汽车有限公司 Vehicle communication system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2869502A1 (en) * 2013-11-01 2015-05-06 THN Corp. Method of packaging and unpackaging packet and apparatuses using the same
CN108011904A (en) * 2016-10-31 2018-05-08 比亚迪股份有限公司 Method for sending information, method of reseptance, device and information transmission system
CN106992879A (en) * 2017-03-14 2017-07-28 中国第汽车股份有限公司 A kind of computational methods of CAN load factor
CN106961437A (en) * 2017-03-24 2017-07-18 华东师范大学 CAN and Ethernet hybrid network gateway network management device and its exchange method
CN108696424A (en) * 2017-04-07 2018-10-23 上汽通用汽车有限公司 Vehicle communication system
CN106953796A (en) * 2017-04-13 2017-07-14 北京汽车集团有限公司 Security gateway, data processing method, device, vehicle network topology and vehicle
CN107399286A (en) * 2017-07-27 2017-11-28 北京车和家信息技术有限责任公司 Mobile unit, the control method of mobile unit and computer installation

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114095445A (en) * 2020-07-29 2022-02-25 华人运通(上海)自动驾驶科技有限公司 Data transmission control method and device for vehicle-mounted Ethernet, electronic equipment and storage medium
CN112688846A (en) * 2020-12-31 2021-04-20 北京物芯科技有限责任公司 Routing method, device, equipment and storage medium of CAN message
CN112688846B (en) * 2020-12-31 2022-06-28 北京物芯科技有限责任公司 Routing method, device, equipment and storage medium of CAN message
CN115242575A (en) * 2021-04-22 2022-10-25 广州汽车集团股份有限公司 CANFD network-based message processing method, device, equipment and storage medium
CN115242575B (en) * 2021-04-22 2023-10-03 广州汽车集团股份有限公司 Packet processing method, device, equipment and storage medium based on CANFD network
CN114374583A (en) * 2022-01-17 2022-04-19 南京芯驰半导体科技有限公司 Automobile gateway controller and control method thereof
CN114598669A (en) * 2022-03-07 2022-06-07 潍柴动力股份有限公司 Message storage method, device and equipment
CN114598669B (en) * 2022-03-07 2024-03-19 潍柴动力股份有限公司 Message storage method, device and equipment
CN114866484A (en) * 2022-04-29 2022-08-05 广州小鹏汽车科技有限公司 Vehicle, data transparent transmission method thereof and computer readable storage medium
CN114866484B (en) * 2022-04-29 2024-04-30 广州小鹏汽车科技有限公司 Vehicle, data transparent transmission method thereof and computer readable storage medium
CN115442173A (en) * 2022-06-07 2022-12-06 北京车和家信息技术有限公司 Vehicle message forwarding and processing method and device, electronic equipment and storage medium
CN115442173B (en) * 2022-06-07 2024-02-06 北京车和家信息技术有限公司 Vehicle message forwarding and processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111245776A (en) Vehicle-mounted data transmission method, device, equipment and storage medium
EP3783847B1 (en) Vehicle-mounted gateway communication method, vehicle-mounted gateway, and smart vehicle
US10756930B2 (en) Gateway device, vehicle network system, transfer method, and non-transitory computer-readable recording medium storing program
CN110083088B (en) Signal control conversion device and signal control conversion method
CN112291124B (en) Vehicle-mounted network ECU communication method based on SOME/IP protocol
CN108848025B (en) Data processing method, intelligent gateway and Internet of things system
CN107483279B (en) Method for local batch operation of network equipment based on Ethernet frame
US9154586B2 (en) Method for parsing network packets having future defined tags
CN111294235B (en) Data processing method, device, gateway and readable storage medium
CN111740847B (en) High-speed network data transmission system and method based on FPGA
EP3745657A1 (en) Gateway device, vehicle network system, transfer method, and program
CN107204924B (en) Link discovery method and device
WO2023124098A1 (en) Method and communication apparatus for generating and sending acknowledgment frame in ieee 802.15.4 network
WO2023016241A1 (en) Method, apparatus, and system for remotely diagnosising vehicle
CN113472718A (en) Service processing method, device, equipment and storage medium
CN115150795A (en) Information filtering method, bluetooth antenna and Internet of things data platform
CN115442177B (en) Data communication method and device of CAN (controller area network)
CN111064729A (en) Message processing method and device, storage medium and electronic device
CN111371736A (en) iOAM information processing method, iOAM information processing device and computer readable storage medium
CN113259200A (en) Vehicle-mounted Ethernet switch hardware testing method, device, equipment and storage medium
CN112235195B (en) Method for processing reported data and related equipment
CN114928581B (en) CAN message forwarding method, device, equipment and storage medium based on AUTOSAR architecture
CN115174439B (en) Verification method, device and storage medium of multi-protocol label switching channel
CN113163025B (en) Data transmission method, device, equipment and storage medium
CN113765726B (en) Statistical method, device and computing equipment for packet loss number of S1-U port data packets

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: 20200605

RJ01 Rejection of invention patent application after publication