CN110519377B - Communication data transmission method and device - Google Patents

Communication data transmission method and device Download PDF

Info

Publication number
CN110519377B
CN110519377B CN201910807400.6A CN201910807400A CN110519377B CN 110519377 B CN110519377 B CN 110519377B CN 201910807400 A CN201910807400 A CN 201910807400A CN 110519377 B CN110519377 B CN 110519377B
Authority
CN
China
Prior art keywords
storage area
communication data
vehicle communication
whole vehicle
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910807400.6A
Other languages
Chinese (zh)
Other versions
CN110519377A (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.)
Beijing Jingwei Hirain Tech Co Ltd
Original Assignee
Beijing Jingwei Hirain Tech 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 Beijing Jingwei Hirain Tech Co Ltd filed Critical Beijing Jingwei Hirain Tech Co Ltd
Priority to CN201910807400.6A priority Critical patent/CN110519377B/en
Publication of CN110519377A publication Critical patent/CN110519377A/en
Application granted granted Critical
Publication of CN110519377B publication Critical patent/CN110519377B/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/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial bus
    • H04L12/40078Bus configuration
    • 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 application discloses a communication data transmission method and a device, comprising the following steps: receiving vehicle communication data by using a target communication bus, wherein the bandwidth of the target communication bus at least meets the requirement of the target communication bus on real-time transmission of the vehicle communication data; packing the vehicle communication data according to a preset packing rule to obtain a vehicle communication data packet; according to a preset storage rule, the whole vehicle communication data packets are alternately stored in at least two preset storage areas, and the whole vehicle communication data packets stored in the storage areas are sent to a network node with a networking function. The bandwidth of the target communication bus at least meets the requirement that the target communication bus transmits the whole vehicle communication data in real time, so that the target communication bus is adopted to transmit the whole vehicle communication data, and all the whole vehicle communication data can be transmitted in real time without being limited by the bandwidth.

Description

Communication data transmission method and device
Technical Field
The invention relates to the technical field of vehicle communication, in particular to a communication data transmission method and device.
Background
A lot of whole vehicle communication data can be generated in the running process of the vehicle, and the whole vehicle communication data is an important information source for a whole vehicle factory to analyze the performance of the whole vehicle and know the driving requirements of customers. In order to analyze the whole vehicle communication data, the whole vehicle communication data needs to be collected firstly, after the whole vehicle communication data is collected, the collected whole vehicle communication data is uploaded to a server through a node with a networking function in the whole vehicle, and the whole vehicle communication data is analyzed and processed through the server.
In the prior art, collected communication data of the whole vehicle are mainly received through a CAN bus, however, the transmission bandwidth of the CAN bus adopted in the prior art is small and limited by the transmission bandwidth of the CAN bus, a field bus cannot transmit the collected communication data of the whole vehicle, and part of the communication data of the whole vehicle CAN be discarded, so that the communication data of the whole vehicle uploaded to a server is incomplete.
Based on this, how to transmit all the vehicle communication data is a technical problem to be solved at present.
Disclosure of Invention
In view of this, embodiments of the present invention provide a communication data transmission method and apparatus, which can transmit all vehicle communication data when the data volume of the vehicle communication data is large.
A communication data transmission method is applied to a gateway and comprises the following steps:
receiving vehicle communication data by using a target communication bus, wherein the bandwidth of the target communication bus at least meets the requirement of the target communication bus on real-time transmission of the vehicle communication data;
packing the vehicle communication data according to a preset packing rule to obtain a vehicle communication data packet;
according to a preset storage rule, the whole vehicle communication data packets are alternately stored in at least two preset storage areas, and the whole vehicle communication data packets stored in the storage areas are sent to a network node with a networking function.
Preferably, the process of alternately storing the whole vehicle communication data packets in at least two preset storage areas according to a preset storage rule and sending the whole vehicle communication data packets stored in the storage areas to the network node with the networking function includes:
selecting one storage area in an unlocking state from at least two preset storage areas as a storage area in the timing duration;
triggering a timer to start timing;
when the timer starts to count, storing the whole vehicle communication data packet by using a storage area in the timing duration;
when the length counted by the timer exceeds the preset length, locking a storage area in the length counted by the timer to enable the storage area to be in a locked state, and stopping storing the whole vehicle communication data packet in the storage area;
and reselecting a storage area in an unlocked state from other storage areas as a storage area in the next timing duration, triggering the timer to restart timing, sending the whole vehicle communication data packet in the storage area in the timing duration to a network node with a networking function when the timer restarts timing, automatically unlocking the storage area in the timing duration after the whole vehicle communication data packet is sent in a timing period of the timer restarting timing, and executing a process of storing the whole vehicle communication data packet by the storage area in the next timing duration.
Preferably, the size of the storage space of the storage area is determined according to the data valid flag, the information length of the target communication message of the whole vehicle, the maximum value of the number of messages transmitted by the target communication bus within a preset time length, and the number of the target communication networks in the whole vehicle.
Preferably, if the selected storage area in the timing duration is occupied in the process of storing the vehicle communication data packet, and the duration counted by the timer does not exceed the preset duration, the method further includes:
locking the storage area in the timing duration, reselecting one storage area in an unlocked state from other storage areas as a storage area in the next timing duration, triggering the timer to restart timing, and sending the whole vehicle communication data packet in the storage area in the timing duration to a network node with a networking function when the timer restarts timing;
or;
locking the storage area in the timing duration, reselecting a storage area in an unlocked state from other storage areas as a new storage area in the timing duration to continuously store the whole vehicle communication data packet, locking the new storage area when the timing duration of the timer exceeds the preset duration, reselecting a storage area in an unlocked state from other storage areas as a storage area in the next timing duration, triggering the timer to restart timing, and sending the whole vehicle communication data packet in the storage area in the timing duration and the new storage area to the network node with the networking function when the timer restarts timing.
Preferably, when a communication connection between the gateway and the network node having the networking function fails, the entire vehicle communication data packet is alternately stored in at least two preset storage areas according to a preset storage rule, and the process of sending the entire vehicle communication data packet stored in the storage area to the network node having the networking function includes:
selecting a storage area in an unlocking state from at least two preset storage areas as a target storage area;
storing the whole vehicle communication data packet by using the target storage area;
locking the target storage area until the storage space of the target storage area is occupied, so that the target storage area is in a locked state;
and reselecting a storage area in an unlocked state from the rest of other storage areas as a new target storage area, and storing the whole vehicle communication data packet by using the new target storage area.
Preferably, in case of a failure of the communication connection between the gateway and the networking capable network node, the method further comprises:
selecting a storage area in an unlocking state from at least two preset storage areas as a target storage area;
storing the whole vehicle communication data packet by using the target storage area;
locking the target storage area until the storage space of the target storage area is occupied, so that the target storage area is in a locked state;
and selecting a storage area in a locked state from the rest of other storage areas, unlocking the storage area, releasing all vehicle communication data packets in the storage area, taking the storage area as a new target storage area, and storing the vehicle communication data packets by using the new target storage area.
Preferably, the process of selecting a storage area in a locked state from the remaining other storage areas, unlocking the storage area, releasing all vehicle communication data packets in the storage area, using the storage area as a new target storage area, and storing the vehicle communication data packets by using the new target storage area includes:
according to the sequence of the occupied storage space of the storage area, unlocking the storage area which is in a locking state and is occupied with the storage space first, releasing all vehicle communication data packets in the storage area, and taking the storage area as a new target storage area;
storing the whole vehicle communication data packet by using the new target storage area;
and locking the new target storage area until the storage space of the new target storage area is occupied, so that the new target storage area is in a locked state, and returning to execute the process of unlocking the storage area in the locked state, the storage space of which is occupied first according to the sequence of the occupied storage space of the storage area.
Preferably, after the communication connection between the gateway and the network node with networking function is recovered from failure, the method further includes:
and sending the whole vehicle communication data packet in the storage area in the locked state to a network node with a networking function.
A communication data transmission device applied to a gateway, the device comprising:
the whole vehicle communication data receiving unit is used for receiving whole vehicle communication data by using a target communication bus, and the bandwidth of the target communication bus at least meets the requirement that the target communication bus transmits the whole vehicle communication data in real time;
the packaging unit is used for packaging the whole vehicle communication data according to a preset packaging rule to obtain a whole vehicle communication data packet;
and the storage unit is used for alternately storing the whole vehicle communication data packets in at least two preset storage areas according to a preset storage rule and sending the whole vehicle communication data packets stored in the storage areas to the network node with the networking function.
Preferably, the storage unit includes:
the device comprises a storage area selection unit, a time counting unit and a time counting unit, wherein the storage area selection unit is used for selecting one storage area in an unlocking state from at least two preset storage areas as a storage area in the time counting duration;
the timing trigger unit is used for triggering the timer to start timing;
the storage subunit is used for storing the whole vehicle communication data packet by utilizing a storage area in the timing duration when the timer starts to time;
the locking unit is used for locking the storage area in the timing duration when the timing duration of the timer exceeds the preset duration, so that the storage area is in a locking state, and the storage of the whole vehicle communication data packet in the storage area is stopped;
and the whole vehicle communication data packet sending unit is used for reselecting a storage area in an unlocked state from other storage areas as a storage area in the next timing duration, triggering the timer to restart timing, sending the whole vehicle communication data packet in the storage area in the timing duration to a network node with a networking function when the timer restarts timing, automatically unlocking the storage area in the timing duration after the whole vehicle communication data packet is sent in a timing period when the timer restarts timing, and executing a process of storing the whole vehicle communication data packet by the storage area in the next timing duration.
Based on the technical scheme, the embodiment of the invention discloses a communication data transmission method and a device, comprising the following steps: receiving vehicle communication data by using a target communication bus, wherein the bandwidth of the target communication bus at least meets the requirement of the target communication bus on real-time transmission of the vehicle communication data; packing the vehicle communication data according to a preset packing rule to obtain a vehicle communication data packet; according to a preset storage rule, the whole vehicle communication data packets are alternately stored in at least two preset storage areas, and the whole vehicle communication data packets stored in the storage areas are sent to a network node with a networking function. The bandwidth of the target communication bus at least meets the requirement that the target communication bus transmits the whole vehicle communication data in real time, so that the target communication bus is adopted to transmit the whole vehicle communication data, and all the whole vehicle communication data can be transmitted without being limited by the bandwidth.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a communication data transmission method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a vehicle communication data packet according to an embodiment of the present invention;
fig. 3 is a flowchart of another communication data transmission method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a vehicle network architecture according to an embodiment of the present invention;
fig. 5 is a flowchart of another communication data transmission method according to an embodiment of the present invention;
fig. 6 is a flowchart of another communication data transmission method according to an embodiment of the present invention;
fig. 7 is a block diagram of a communication data transmission apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Fig. 1 shows a flow chart of a communication data transmission method, which may be implemented by a gateway, and referring to fig. 1, the method may include:
s100, receiving vehicle communication data by using a target communication bus, wherein the bandwidth of the target communication bus at least meets the requirement of the target communication bus on real-time transmission of the vehicle communication data;
it should be noted that, in the prior art, a CAN (Controller Area Network) bus is used to transmit vehicle communication data, but the vehicle communication data cannot be transmitted in real time due to the limitation of a CAN bus bandwidth, and with the development of the technology, a new communication technology appears: the transmission bandwidth of the CAN fd (Controller Area Network with Flexible Data rate) communication technology, the FlexRay communication technology or the ethernet communication technology is far greater than that of the CAN bus communication technology, so the target communication bus in the embodiment of the present invention adopts the CAN bus in combination with at least one of the CAN fd (Controller Area Network with Flexible Data rate) bus, the FlexRay bus or the ethernet communication bus, so that the bandwidth of the target communication bus at least meets the requirement of the target communication bus for real-time transmission of the whole vehicle communication Data.
S110, packing the whole vehicle communication data according to a preset packing rule to obtain a whole vehicle communication data packet;
because the data formats of the vehicle communication data transmitted by the different types of target communication buses are different, after receiving the vehicle communication data transmitted by the different types of target communication buses, the gateway needs to perform format conversion on the vehicle communication data with different data formats, and after unifying the vehicle communication data which can be identified by the network node with the networking function, the gateway can send the vehicle communication data to the network node with the networking function.
Optionally, in the embodiment of the present invention, after the vehicle communication data packet is obtained, encryption processing or compression processing may be performed on the vehicle communication data packet, and then the encrypted or compressed vehicle communication data packet is sent to the network node having the networking function.
It should be noted that, the vehicle communication data packet in the embodiment of the present invention may be a TCP frame structure, as shown in fig. 2, the embodiment of the present invention provides a structure of a TCP vehicle communication data packet, where the TCP vehicle communication data packet includes two parts, namely a TCP header and a Payload (application data) storage area, and a data valid flag is stored in the TCP header and is used to identify whether new vehicle communication data is received in the Payload storage area. If new vehicle communication data are received in the Payload storage area, the valid flag is set to be '1', if the new vehicle communication data are not received, the valid flag is set to be '0', the specific identification of the valid flag bit is not limited in the application, and the valid flag bit can be set as long as whether the new vehicle communication data are received in the Payload storage area can be distinguished.
The Payload storage area stores received vehicle communication data, the vehicle communication data in the Payload storage area are sequentially stored according to the receiving front and back of the vehicle communication data, the received vehicle communication data are placed in front of the Payload of the TCP frame, and the received vehicle communication data are placed behind the Payload of the TCP frame.
It should be noted that each piece of vehicle-to-vehicle communication data in the Payload storage area is represented by the following four identifiers: the Time represents the system Time for receiving the communication Data of the whole vehicle, the ID represents the unique identification of the communication Data of the whole vehicle, the Len represents the length of the communication Data of the whole vehicle, and the Data represents the content of the communication Data of the whole vehicle.
And S120, alternately storing the whole vehicle communication data packets in at least two preset storage areas according to a preset storage rule, and sending the whole vehicle communication data packets stored in the storage areas to a network node with a networking function.
Optionally, the gateway in the embodiment of the present invention may alternately store the entire vehicle communication data packet in at least two preset storage areas, where a certain storage area can only be used to receive data or send data at a certain time, and a certain storage area cannot both receive data and send data at a certain time, so that the present application provides at least two storage areas, and the storage area cannot execute a sending process of the entire vehicle communication data packet in a process of storing the entire vehicle communication data packet in a certain storage area; and only when the storage area does not store data, the sending process of the whole vehicle communication data packet can be executed, the whole vehicle communication data packet in the storage area is sent to the network node with the networking function, and in the sending process of the whole vehicle communication data packet executed in the storage area, the newly received whole vehicle communication data packet can be stored in other storage areas.
After the gateway sends the whole vehicle communication data packet to a network node with a networking function (such as a vehicle-mounted intelligent terminal), the network node with the networking function sends the whole vehicle communication data packet to a server. The network node with the networking function and the server can transmit the whole vehicle communication data packet according to a specified protocol (such as GB/T32960.3) through network connection (such as a 4G or 3G network).
The embodiment of the invention discloses a communication data transmission method, which comprises the following steps: receiving vehicle communication data by using a target communication bus, wherein the bandwidth of the target communication bus at least meets the requirement of the target communication bus on real-time transmission of the vehicle communication data; packing the vehicle communication data according to a preset packing rule to obtain a vehicle communication data packet; according to a preset storage rule, the whole vehicle communication data packets are alternately stored in at least two preset storage areas, and the whole vehicle communication data packets stored in the storage areas are sent to a network node with a networking function. The bandwidth of the target communication bus at least meets the requirement that the target communication bus transmits the whole vehicle communication data in real time, so that the target communication bus is adopted to transmit the whole vehicle communication data, and all the whole vehicle communication data can be transmitted without being limited by the bandwidth.
Meanwhile, if a certain storage area receives and sends data at the same time, the phenomenon of data loss is easy to occur.
In the following, a detailed description is given of a process of alternately storing entire vehicle communication data packets in the present application with reference to a flowchart of another communication data transmission method shown in fig. 3, where the method may be implemented by a gateway, and the method may include:
s200, receiving vehicle communication data by using a target communication bus, wherein the bandwidth of the target communication bus at least meets the requirement of the target communication bus on real-time transmission of the vehicle communication data;
step S210, packing the whole vehicle communication data according to a preset packing rule to obtain a whole vehicle communication data packet;
it should be noted that steps S200 to S210 in the embodiment of the present application are the same as steps S100 to S110 in the embodiment described above, and specific contents are detailed in steps S100 to S110 in the embodiment described above, which is not described herein again.
S220, selecting one storage area in an unlocking state from at least two preset storage areas as a storage area in the timing duration;
in the process of unlocking a certain storage area, an action of releasing the whole vehicle communication data packet in the storage area is executed at the same time, namely the whole vehicle communication data packet stored in the storage area is deleted, so that the storage space of the storage area is emptied, therefore, the storage area just unlocked is empty, the whole vehicle communication data packet is stored in the storage area after unlocking in the process of receiving the whole vehicle communication data packet, and the storage area is locked after the storage space of the storage area is occupied, so that the storage area in the unlocked state is the storage area with the storage space not occupied.
Optionally, in the embodiment of the present invention, the number of the set storage areas may be set according to the resource size of the gateway, and the size of the storage space of the storage area is set according to the maximum vehicle communication data traffic that can be transmitted by the target communication bus. The maximum value of the storage space of the storage area can be set as the maximum value of the maximum vehicle communication data flow which can be transmitted by the target communication bus, and the size of the storage space of each storage area cannot exceed the maximum value of the storage space.
In the embodiment of the invention, the CAN bus CAN be combined with at least one of the CANFD bus, the FlexRay bus or the Ethernet communication bus to receive the communication data of the whole vehicle, the Ethernet communication bus transmits the infotainment data at present, most of the key data of the whole vehicle are transmitted on the CANFD communication bus, the FLEXRAY communication bus and the CAN communication bus, the data transmitted by the Ethernet communication bus CAN be directly transmitted to the server without passing through a gateway, only a small part of the data transmitted in the Ethernet communication bus needs to be processed by the gateway, for example, the data transmitted by using a communication protocol SomeIP used in the automobile industry needs to be processed by the gateway after being transmitted by the Ethernet communication bus. Therefore, in the embodiment of the present invention, in the process of setting the maximum value of the storage space of the storage area, the maximum vehicle communication data traffic that CAN be transmitted by the ethernet communication bus may not be considered, and only the maximum vehicle communication data traffic that CAN be transmitted by the CAN fd communication bus, the FLEXRAY communication bus, and the CAN communication bus is considered.
It should be noted that, in the embodiment of the present application, the size of the storage space of the storage area is determined according to the data valid flag, the information length of the target communication packet of the entire vehicle, the maximum value of the number of packets transmitted by the target communication bus within the preset time period, and the number of target communication networks in the entire vehicle.
Specifically, in the following, taking a CAN communication bus combined with a CANFD communication bus as an example, a detailed description is given of a calculation process of calculating a maximum value of a storage space of a storage area according to a data valid flag, a length of a target communication message information of a whole vehicle, a maximum value of a number of messages transmitted by the target communication bus within a preset time period, and a number of target communication networks in the whole vehicle in the embodiment of the present invention:
the maximum value of the storage space of the storage area is 1+ CAN message information length 10msCanMsgNum + CANFD message information length 10msCanFDMsgNum CanFDNum;
the maximum value unit of the storage space of the storage area is byte.
In the above formula:
A)1 indicates a data valid flag, occupying one byte.
B) The length of the CAN message information is 15 bytes, and the CAN message information comprises time information of 4 bytes, CAN message identification information of 2 bytes, CAN message length information of 1 byte and CAN data information of 8 bytes.
C) The 10 mscarmsgnum refers to the maximum value of the number of messages with the effective data length of 8 bytes which CAN be transmitted by the CAN communication bus in 10ms, and is related to the CAN bus rate of the network, and the 10 mscarmsgnum is the value of dividing the CAN bus rate by the message length multiplied by 10 ms. The message length of the valid data with 8 bytes is 111 bytes, and if the CAN bus rate is 500Kbps, 10msCanMsgNum is 500000 ÷ 111 × 0.01s ═ 45.05, and the whole is 45.
D) CanNum refers to the number of CAN networks in the entire car.
E) The length of the CANFD message information is 71 bytes, which includes time information of 4 bytes, CANFD message identification information of 2 bytes, CANFD message length information of 1 byte, and CANFD data information of 64 bytes.
F) The 10 mscancefdgnum refers to the maximum number of packets with an effective data length of 64 bytes that CAN be transmitted by the CANFD communication bus within 10ms, and is related to the CANFD bus rate of the network, where the 10 mscancefdgnum is a value rounded by CANFD bus rate ÷ packet length × 10ms, where the CAN packet length with effective data of 64 bytes is 568 bits, and if the CANFD bus rate is 2Mbps, the 10 mscngnum is 2000000 ÷ 568 × 0.01s ═ 35.21, and the round is 35.
CanFDNum, which refers to the number of CANFD networks in the entire car.
Step S230, triggering a timer to start timing;
step S240, when the timer starts to count, storing the whole vehicle communication data packet by using a storage area in the timing duration;
step S250, when the length counted by the timer exceeds the preset length, locking a storage area in the length counted by the timer to enable the storage area to be in a locked state, and stopping storing the whole vehicle communication data packet in the storage area;
the preset duration in the embodiment of the invention is set according to the data updating frequency of the target communication bus. Optionally, the preset time duration may be set to 10ms, and the embodiment of the present invention is not specifically limited.
When the length counted by the timer exceeds the preset length, the storage area in the length counted by the timer is locked, the locked storage area can not receive and store the whole vehicle communication data packet any more, and the whole vehicle communication data packet in the storage area can only be transmitted to the network node with the networking function.
Step S260, a storage area in an unlocked state is reselected from other storage areas to serve as a storage area in the next timing duration, the timer is triggered to restart timing, the whole vehicle communication data packet in the storage area in the timing duration is sent to the network node with the networking function when the timer restarts timing, the storage area in the timing duration is automatically unlocked after the whole vehicle communication data packet is sent in the timing period of the timer restarting timing, and the process of storing the whole vehicle communication data packet by the storage area in the next timing duration is executed.
It should be noted that the other storage area in the embodiment of the present application is a storage area selected from at least two preset storage areas, that is, the other storage area in the embodiment of the present application is included in at least two preset storage areas in the embodiment of the present application.
When the timer restarts to count, sending the whole vehicle communication data packets in the storage area in the timing duration to a network node (such as a vehicle-mounted intelligent terminal) with a networking function through the Ethernet by using a TCP/IP protocol, wherein in the embodiment of the application, after all the whole vehicle communication data packets in the storage area in the timing duration are sent to the network node with the networking function in the timing period of the timer restarting to be counted, the storage area in the timing duration is automatically unlocked; if the length counted by the timer exceeds the preset length, all vehicle communication data packets in the storage area in the length counted by the timer are not sent to the network node with the networking function, the vehicle communication data packets can be continuously sent, and after the vehicle communication data packets are sent, the vehicle communication data packets are automatically unlocked; and when the length counted by the timer exceeds the preset length, forcibly unlocking the storage area, and deleting the rest unsent vehicle communication data packets in the storage area, so as to empty the storage space of the storage area.
In the embodiment of the application, in the process of storing the whole vehicle communication data packet in the storage area within the timing duration, the whole vehicle communication data packet cannot be sent, and only after the storage area within the timing duration is locked, the whole vehicle communication data packet is stopped being stored in the storage area, the whole vehicle communication data packet in the storage area can be sent to the network node with the networking function.
The embodiment of the invention stores the whole vehicle communication data packet by using the storage area in the gateway, can fully utilize the storage resource of the gateway, does not need to add additional storage equipment, reduces the storage cost, has good system expansibility, processes the whole vehicle communication data packet in the gateway, can meet the subsequent requirements of a client on the whole vehicle data safety and network safety, and can also meet the requirement of the client on the whole vehicle network expandability.
Next, a specific process of the communication data transmission method disclosed in the embodiment of the present invention is described in detail with a specific application scenario, a vehicle network architecture applied by the method is shown in fig. 4, a gateway is respectively connected to a CANFD communication bus, a FLEXRAY communication bus, and an ethernet communication bus and a CAN communication bus, and the gateway is connected to a network node (a vehicle-mounted intelligent terminal) having a networking function.
The method comprises the following steps:
step A: receiving vehicle communication data by using a target communication bus (a CANFD communication bus, a FLEXRAY communication bus, an Ethernet communication bus and a CAN communication bus), wherein the bandwidth of the target communication bus at least meets the requirement of the target communication bus for transmitting the vehicle communication data in real time;
and B: after the gateway is initially completed, a connection request for creating the TCP is initiated to the vehicle-mounted intelligent terminal,
after the connection is established, the gateway closes the connection until the gateway meets the dormancy condition.
And C: packing the vehicle communication data according to a preset packing rule to obtain a vehicle communication data packet;
step D: selecting one storage area Buffer1 in an unlocked state from two preset storage areas (Buffer1 and Buffer2) as a target storage area;
and E, step E: triggering a timer to start timing, and storing a whole vehicle communication data packet by using a Buffer1 when the timer starts timing;
step F: when the length counted by the timer exceeds 10ms, the gateway locks the Buffer1 to enable the Buffer1 to be in a locked state, and the whole vehicle communication data packet is stopped being stored in the Buffer 1;
step G: after the Buffer1 is locked, triggering the timer to restart timing, and when the timer restarts timing, sending the whole vehicle communication data packet in the Buffer1 to the vehicle-mounted intelligent terminal through the Ethernet by using a TCP/IP protocol, after all the whole vehicle communication data packets in the Buffer1 are sent, automatically unlocking the Buffer1, and before the time length counted by the timer exceeds 10ms, if a new whole vehicle communication data packet is received, storing the new whole vehicle communication data packet in the Buffer 2;
step H: when the length counted by the timer exceeds 10ms, the gateway locks Buffer2 for 10ms, triggers the timer to restart timing after Buffer2 is locked, sends data in Buffer2 to the vehicle-mounted intelligent terminal through the Ethernet by using a TCP/IP protocol, automatically unlocks Buffer2 after all finished vehicle communication data packets in Buffer2 are sent, and stores a new finished vehicle communication data packet in Buffer1 if the new finished vehicle communication data packet is received before the length counted by the timer exceeds 10 ms.
Step I: and when the length measured by the timer exceeds 10ms, the gateway locks the Buffer1, and transmits the data in the Buffer1 to the vehicle-mounted intelligent terminal through the Ethernet by using a TCP/IP protocol.
And the Buffer1 and the Buffer2 are alternately used according to the description, so that the storage of the communication data packet of the whole vehicle is completed, and the communication data packet is sent to the vehicle-mounted intelligent terminal through the Ethernet.
Optionally, if the selected storage area within the timing duration is occupied in the process of storing the entire vehicle communication data packet, and the duration counted by the timer does not exceed the preset duration, in order to avoid the loss of the entire vehicle communication data packet, the following two processing methods are provided in the embodiment of the present application:
the processing method A comprises the following steps: locking the storage area in the timing duration, reselecting one storage area in an unlocked state from other storage areas as the storage area in the next timing duration, triggering the timer to restart timing, and sending the whole vehicle communication data packet in the storage area in the timing duration to the network node with the networking function when the timer restarts timing.
The storage area in the timing duration is full in the process of storing the whole vehicle communication data packet, the whole vehicle communication data packet cannot be stored any more, at this time, the storage area needs to be locked, then, one storage area in an unlocked state is selected from other storage areas again to serve as the storage area in the next timing duration, the timer is triggered to restart timing, and when the timer restarts timing, the whole vehicle communication data packet in the storage area in the timing duration is sent to the network node with the networking function.
Treatment method B: locking the storage area in the timing duration, reselecting a storage area in an unlocked state from other storage areas as a new storage area in the timing duration to continuously store the whole vehicle communication data packet, locking the new storage area when the timing duration of the timer exceeds the preset duration, reselecting a storage area in an unlocked state from other storage areas as a storage area in the next timing duration, triggering the timer to restart timing, and sending the whole vehicle communication data packet in the storage area in the timing duration and the new storage area to the network node with the networking function when the timer restarts timing.
Because the storage area in the timing duration is full in the process of storing the whole vehicle communication data packet and the whole vehicle communication data packet cannot be stored any more, the storage area needs to be locked, and reselecting a storage area in an unlocked state from other storage areas as a new storage area in the timing duration to continuously store the whole vehicle communication data packet, and when the counted time length of the timer exceeds the preset time length, the new storage area is locked, one storage area in an unlocked state is reselected from other storage areas to be used as the storage area in the next counted time length, the timer is triggered to restart the counting, since the memory area within the present timer period and the new memory area are both in the locked state, therefore, and when the timer restarts to count, sending the whole vehicle communication data packets in the storage area in the timing duration and the new storage area to the network node with the networking function.
It should be noted that, in the case of a failure of a communication connection between a gateway and a network node with networking function, referring to a flowchart of another communication data transmission method shown in fig. 5, the method may be implemented by the gateway, and the method may include:
s300, receiving vehicle communication data by using a target communication bus;
the bandwidth of the target communication bus at least meets the requirement that the target communication bus transmits the whole vehicle communication data in real time;
s310, packing the whole vehicle communication data according to a preset packing rule to obtain a whole vehicle communication data packet;
it should be noted that steps S300 to S310 in the embodiment of the present application are the same as steps S100 to S110 in the embodiment described above, and specific contents are detailed in steps S100 to S110 in the embodiment described above, which is not described herein again.
Step S320, selecting a storage area in an unlocking state from at least two preset storage areas as a target storage area;
s330, storing the whole vehicle communication data packet by using the target storage area;
step S340, locking the target storage area until the storage space of the target storage area is occupied, so that the target storage area is in a locked state;
in the embodiment of the application, in the process of storing the vehicle communication data packet in a certain target storage area, the overtime time of a timer is not set, and the target storage area cannot be locked until the storage space of the target storage area is occupied, so that the target storage area is in a locked state.
And S350, reselecting a storage area in an unlocked state from the rest of other storage areas as a new target storage area, and storing the whole vehicle communication data packet by using the new target storage area.
It should be noted that the remaining other storage areas in the embodiment of the present application are storage areas selected from at least two preset storage areas, that is, the remaining other storage areas in the embodiment of the present application are included in the at least two preset storage areas in the embodiment of the present application.
According to the embodiment of the application, under the condition that the communication connection between the gateway and the network node with the networking function is failed, the overtime time of the timer is not set, and the target storage area is locked until the storage space of the target storage area is occupied in the process of storing the whole vehicle communication data packet by utilizing a certain target storage area, so that the target storage area is in the locked state. Therefore, the storage space in the gateway is utilized to the maximum extent, and the gateway can receive the communication data packet of the whole vehicle to the maximum extent.
In the event of a failure of a communication connection between a gateway and a network node with networking capability, referring to a flow chart of another communication data transmission method shown in fig. 6, the method may be implemented by the gateway, and the method may include:
s400, receiving communication data of the whole vehicle by using a target communication bus;
the bandwidth of the target communication bus at least meets the requirement that the target communication bus transmits the whole vehicle communication data in real time;
s410, packaging the whole vehicle communication data according to a preset packaging rule to obtain a whole vehicle communication data packet;
it should be noted that steps S400 to S410 in the embodiment of the present application are the same as steps S100 to S110 in the embodiment described above, and specific contents are detailed in steps S100 to S110 in the embodiment described above, which is not described herein again.
Step S420, selecting a storage area in an unlocking state from at least two preset storage areas as a target storage area;
step S430, storing the whole vehicle communication data packet by using the target storage area;
step S440, locking the target storage area until the storage space of the target storage area is occupied, so that the target storage area is in a locked state;
and S450, selecting a storage area in a locked state from the rest of the other storage areas, unlocking the storage area, releasing all vehicle communication data packets in the storage area, taking the storage area as a new target storage area, and storing the vehicle communication data packets by using the new target storage area.
It should be noted that the remaining other storage areas in the embodiment of the present application are storage areas selected from at least two preset storage areas, that is, the remaining other storage areas in the embodiment of the present application are included in the at least two preset storage areas in the embodiment of the present application.
It should be noted that, in the embodiment of the present application, the specific execution process of step S450 is as follows: according to the sequence of the occupied storage space of the storage area, unlocking the storage area which is in a locking state and is occupied with the storage space first, releasing all vehicle communication data packets in the storage area, and taking the storage area as a new target storage area; storing the whole vehicle communication data packet by using the new target storage area; and locking the new target storage area until the storage space of the new target storage area is occupied, so that the new target storage area is in a locked state, and returning to execute the process of unlocking the storage area in the locked state, the storage space of which is occupied first according to the sequence of the occupied storage space of the storage area.
Because the reference value of the storage data in the storage area which is full of the storage space and is in the locked state is relatively low, in the embodiment of the application, under the condition that the communication connection between the gateway and the network node with the networking function fails, in order to enable the gateway to receive the whole vehicle communication data packets to the maximum extent, the storage area which is full of the storage space and is in the locked state can be unlocked, all the whole vehicle communication data packets in the storage area which is full of the storage space are released, and the storage space is used for storing the whole vehicle communication data packets.
After the communication connection between the gateway and the network node with the networking function is recovered from the failure, the method further comprises the following steps: and sending the whole vehicle communication data packet in the storage area in the locked state to a network node with a networking function.
Specifically, the entire vehicle communication data packets in the target storage area in the locked state and the new target storage area may be sent to the network node with the networking function, where a situation that at least two storage areas are in the locked state may occur under the situation, in this embodiment of the present application, after a communication connection failure between the gateway and the network node with the networking function is recovered, the entire vehicle communication data packets may be sent according to the sequence in which the storage areas are locked, and the entire vehicle communication data packets in the first-locked storage area are preferentially sent to the network node with the networking function; of course, the embodiment of the application may also preferentially send the entire vehicle communication data packet in the storage area that is locked last time to the network node with the networking function.
In addition, in the present application, a storage area for preferentially sending the entire vehicle communication data packet may also be selected according to the importance degree of the entire vehicle communication data packet stored in the storage area, and a storage area for preferentially sending the entire vehicle communication data packet may also be selected according to the size of the storage space of the storage area, and the present application is not particularly limited.
When all storage areas in the gateway are occupied, a storage area in a locked state needs to be selected from the remaining other storage areas, the storage area is unlocked, all finished automobile communication data packets in the storage area in the locked state are released, the storage area in the locked state is used as a new target storage area, and the finished automobile communication data packets are stored by using the new target storage area. Therefore, the storage space in the gateway is utilized to the maximum extent, and the gateway can receive the communication data packet of the whole vehicle to the maximum extent.
In the following, the communication data transmission device provided by the embodiment of the present invention is introduced, and the communication data transmission device described below may be referred to in correspondence with the above communication data transmission method.
Fig. 7 is a block diagram of a communication data transmission apparatus according to an embodiment of the present invention, where the communication data transmission apparatus is applied to a gateway, and referring to fig. 7, the communication data transmission apparatus may include:
the whole vehicle communication data receiving unit 100 is used for receiving whole vehicle communication data by using a target communication bus, wherein the bandwidth of the target communication bus at least meets the requirement of the target communication bus on real-time transmission of the whole vehicle communication data;
the packaging unit 110 is configured to package the vehicle communication data according to a preset packaging rule to obtain a vehicle communication data packet;
the storage unit 120 is configured to alternately store the vehicle communication data packets in at least two preset storage areas according to a preset storage rule, and send the vehicle communication data packets stored in the storage areas to a network node with a networking function.
The memory cell includes:
the device comprises a storage area selection unit, a time counting unit and a time counting unit, wherein the storage area selection unit is used for selecting one storage area in an unlocking state from at least two preset storage areas as a storage area in the time counting duration;
the timing trigger unit is used for triggering the timer to start timing;
the storage subunit is used for storing the whole vehicle communication data packet by utilizing a storage area in the timing duration when the timer starts to time;
the locking unit is used for locking the storage area in the timing duration when the timing duration of the timer exceeds the preset duration, so that the storage area is in a locking state, and the storage of the whole vehicle communication data packet in the storage area is stopped;
and the whole vehicle communication data packet sending unit is used for reselecting a storage area in an unlocked state from other storage areas as a storage area in the next timing duration, triggering the timer to restart timing, sending the whole vehicle communication data packet in the storage area in the timing duration to a network node with a networking function when the timer restarts timing, automatically unlocking the storage area in the timing duration after the whole vehicle communication data packet is sent in a timing period when the timer restarts timing, and executing a process of storing the whole vehicle communication data packet by the storage area in the next timing duration.
Optionally, the size of the storage space of the storage area is determined according to the data valid flag, the information length of the target communication message of the whole vehicle, the maximum value of the number of messages transmitted by the target communication bus within a preset time period, and the number of the target communication networks in the whole vehicle.
If the selected storage area in the timing duration is occupied in the process of storing the whole vehicle communication data packet and the duration counted by the timer does not exceed the preset duration, the communication data transmission device is further specifically configured to:
locking the storage area in the timing duration, reselecting one storage area in an unlocked state from other storage areas as a storage area in the next timing duration, triggering the timer to restart timing, and sending the whole vehicle communication data packet in the storage area in the timing duration to a network node with a networking function when the timer restarts timing;
or;
locking the storage area in the timing duration, reselecting a storage area in an unlocked state from other storage areas as a new storage area in the timing duration to continuously store the whole vehicle communication data packet, locking the new storage area when the timing duration of the timer exceeds the preset duration, reselecting a storage area in an unlocked state from other storage areas as a storage area in the next timing duration, triggering the timer to restart timing, and sending the whole vehicle communication data packet in the storage area in the timing duration and the new storage area to the network node with the networking function when the timer restarts timing.
In the case of a failure of a communication connection between the gateway and a network node with networking functionality, the storage unit is specifically configured to:
selecting a storage area in an unlocking state from at least two preset storage areas as a target storage area; storing the whole vehicle communication data packet by using the target storage area; locking the target storage area until the storage space of the target storage area is occupied, so that the target storage area is in a locked state; and reselecting a storage area in an unlocked state from the rest of other storage areas as a new target storage area, and storing the whole vehicle communication data packet by using the new target storage area.
In a case where a communication connection between the gateway and the network node having the networking function is failed, the communication data transmission apparatus specifically further includes:
the first target storage area selecting unit is used for selecting one storage area in an unlocking state from at least two preset storage areas as a target storage area; storing the whole vehicle communication data packet by using the target storage area; locking the target storage area until the storage space of the target storage area is occupied, so that the target storage area is in a locked state;
and the second target storage area selecting unit selects a storage area in a locked state from the rest of the other storage areas, unlocks the storage area, releases all vehicle communication data packets in the storage area, takes the storage area as a new target storage area, and stores the vehicle communication data packets by using the new target storage area.
The second target storage area selecting unit is specifically configured to:
according to the sequence of the occupied storage space of the storage area, unlocking the storage area which is in a locking state and is occupied with the storage space first, releasing all vehicle communication data packets in the storage area, and taking the storage area as a new target storage area;
storing the whole vehicle communication data packet by using the new target storage area;
and locking the new target storage area until the storage space of the new target storage area is occupied, so that the new target storage area is in a locked state, and returning to execute the process of unlocking the storage area in the locked state, the storage space of which is occupied first according to the sequence of the occupied storage space of the storage area.
After the communication connection between the gateway and the network node with the networking function is recovered from the failure, the method further comprises the following steps:
and the whole vehicle communication data packet sending subunit is used for sending the whole vehicle communication data packet in the storage area in the locked state to the network node with the networking function.
In summary, the following steps:
the embodiment of the invention discloses a communication data transmission method and a device, comprising the following steps: receiving vehicle communication data by using a target communication bus, wherein the bandwidth of the target communication bus at least meets the requirement of the target communication bus on real-time transmission of the vehicle communication data; according to a preset packaging rule, packaging the whole vehicle communication data to obtain a whole vehicle communication data packet; according to a preset storage rule, the whole vehicle communication data packets are alternately stored in at least two preset storage areas, and the whole vehicle communication data packets stored in the storage areas are sent to a network node with a networking function. The bandwidth of the target communication bus at least meets the requirement that the target communication bus transmits the whole vehicle communication data in real time, so that the target communication bus is adopted to transmit the whole vehicle communication data, and all the whole vehicle communication data can be transmitted without being limited by the bandwidth.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A communication data transmission method, wherein the communication data transmission method is applied to a gateway, and the method comprises:
receiving all real-time communication data generated in the running process of the whole vehicle by using a target communication bus, wherein the bandwidth of the target communication bus at least meets the requirement that the target communication bus transmits all the real-time communication data of the whole vehicle;
the method comprises the steps of packaging finished automobile communication data according to a preset packaging rule to obtain a finished automobile communication data packet, wherein the data format of the finished automobile communication data packet comprises a Transmission Control Protocol (TCP) header and an application data Payload storage area, the TCP header is used for storing a data valid bit, the data valid bit is used for identifying whether new finished automobile communication data are received in the Payload storage area, the Payload storage area is used for storing the received finished automobile communication data, and the finished automobile communication data in the Payload storage area are sequentially stored according to the receiving front and back of the finished automobile communication data;
and alternately storing the whole vehicle communication data packets in at least two preset storage areas according to a preset storage rule, wherein the whole vehicle communication data packets are only used for receiving data or sending data for any storage area at any moment, and the whole vehicle communication data packets stored in the storage areas are sent to a network node with a networking function.
2. The method according to claim 1, wherein the step of alternately storing the vehicle communication data packets in at least two preset storage areas according to a preset storage rule, wherein the step of only receiving data or sending data for any storage area at any moment and sending the vehicle communication data packets stored in the storage areas to the network node with the networking function comprises the following steps:
selecting one storage area in an unlocking state from at least two preset storage areas as a storage area in the timing duration;
triggering a timer to start timing;
when the timer starts to count, storing the whole vehicle communication data packet by using the storage area in the timing duration;
when the length counted by the timer exceeds the preset length, locking the storage area in the length counted by the timer to enable the storage area to be in a locked state, and stopping storing the whole vehicle communication data packet in the storage area;
and reselecting a storage area in an unlocked state from other storage areas as a storage area in the next timing duration, triggering the timer to restart timing, sending the whole vehicle communication data packet in the storage area in the timing duration to the network node with the networking function when the timer restarts timing, and automatically unlocking the storage area in the timing duration and executing the process of storing the whole vehicle communication data packet by the storage area in the next timing duration after the whole vehicle communication data packet is sent in a timing period of the timer restarting timing.
3. The method according to claim 1, wherein the size of the storage space of the storage area is determined according to a data valid flag, the information length of the target communication messages of the whole vehicle, the maximum value of the number of messages transmitted by the target communication bus within a preset time length, and the number of target communication networks in the whole vehicle.
4. The method of claim 2, wherein if the selected memory area within the current time period is full during the process of storing the vehicle-mounted communication data packet, and the time period counted by the timer does not exceed the preset time period, further comprising:
locking the storage area in the timing duration, reselecting one storage area in an unlocked state from other storage areas as a storage area in the next timing duration, triggering the timer to restart timing, and sending the whole vehicle communication data packet in the storage area in the timing duration to the network node with the networking function when the timer restarts timing;
or;
locking the storage area in the timing duration, reselecting a storage area in an unlocked state from other storage areas to serve as a new storage area in the timing duration to continuously store the whole vehicle communication data packet, locking the new storage area when the timing duration of the timer exceeds the preset duration, reselecting a storage area in an unlocked state from other storage areas to serve as a storage area in the next timing duration, triggering the timer to restart timing, and sending the whole vehicle communication data packet in the storage area in the timing duration and the new storage area to the network node with the networking function when the timer restarts timing.
5. The method according to claim 2, wherein, in the case of a failure in the communication connection between the gateway and the network node with networking function, the step of alternately storing the vehicle communication data packets in at least two preset storage areas according to a preset storage rule, and sending the vehicle communication data packets stored in the storage areas to the network node with networking function at any time, wherein the step of sending the vehicle communication data packets stored in any one of the preset storage areas to any one of the preset storage areas only for receiving data or sending data, comprises:
selecting a storage area in an unlocking state from at least two preset storage areas as a target storage area;
storing the whole vehicle communication data packet by using the target storage area;
locking the target storage area until the storage space of the target storage area is occupied, so that the target storage area is in a locked state;
and reselecting a storage area in an unlocked state from the rest of other storage areas as a new target storage area, and storing the whole vehicle communication data packet by using the new target storage area.
6. The method according to claim 2, wherein in case of a failure of the communication connection between the gateway and the networking enabled network node, the method further comprises:
selecting a storage area in an unlocking state from at least two preset storage areas as a target storage area;
storing the whole vehicle communication data packet by using the target storage area;
locking the target storage area until the storage space of the target storage area is occupied, so that the target storage area is in a locked state;
selecting a storage area in a locked state from the rest of other storage areas, unlocking the storage area, releasing all vehicle communication data packets in the storage area, taking the storage area as a new target storage area, and storing the vehicle communication data packets by using the new target storage area.
7. The method according to claim 6, wherein the process of selecting a storage area in a locked state from the remaining other storage areas, unlocking the storage area, releasing all vehicle communication data packets in the storage area, using the storage area as a new target storage area, and storing the vehicle communication data packets by using the new target storage area comprises:
according to the sequence of the occupied storage space of the storage area, unlocking the storage area which is in a locking state and is occupied with the storage space first, releasing all vehicle communication data packets in the storage area, and taking the storage area as a new target storage area;
storing the whole vehicle communication data packet by using the new target storage area;
and locking the new target storage area until the storage space of the new target storage area is occupied, so that the new target storage area is in a locked state, and returning to execute the process of unlocking the storage area in the locked state, the storage space of which is occupied first according to the sequence of the occupied storage space of the storage area.
8. The method according to any of claims 5-7, further comprising, after the communication connection between the gateway and the networking enabled network node is recovered from failure:
and sending the whole vehicle communication data packet in the storage area in the locked state to the network node with the networking function.
9. A communication data transmission apparatus, wherein the communication data transmission apparatus is applied to a gateway, the apparatus comprising:
the whole vehicle communication data receiving unit is used for receiving all real-time communication data generated in the running process of a whole vehicle by using a target communication bus, and the bandwidth of the target communication bus at least meets the requirement that the target communication bus transmits all the real-time communication data of the whole vehicle;
the system comprises a packing unit, a data processing unit and a data processing unit, wherein the packing unit is used for packing the whole vehicle communication data according to a preset packing rule to obtain a whole vehicle communication data packet, the data format of the whole vehicle communication data packet comprises a Transmission Control Protocol (TCP) header and an application data Payload storage area, the TCP header is used for storing a data valid bit, the data valid bit is used for identifying whether new whole vehicle communication data are received in the Payload storage area, the Payload storage area is used for storing the received whole vehicle communication data, and the whole vehicle communication data in the Payload storage area are sequentially stored before and after being received according to the whole vehicle communication data;
and the storage unit is used for alternately storing the whole vehicle communication data packet in at least two preset storage areas according to a preset storage rule, only receiving data or sending data aiming at any storage area at any moment, and sending the whole vehicle communication data packet stored in the storage area to a network node with a networking function.
10. The apparatus of claim 9, wherein the storage unit comprises:
the device comprises a storage area selection unit, a time counting unit and a time counting unit, wherein the storage area selection unit is used for selecting one storage area in an unlocking state from at least two preset storage areas as a storage area in the time counting duration;
the timing trigger unit is used for triggering the timer to start timing;
the storage subunit is used for storing the whole vehicle communication data packet by utilizing the storage area in the timing duration when the timer starts to time;
the locking unit is used for locking the storage area in the timing duration when the timing duration of the timer exceeds the preset duration, so that the storage area is in a locking state, and the storage of the whole vehicle communication data packet in the storage area is stopped;
the whole vehicle communication data packet sending unit is used for reselecting a storage area in an unlocking state from other storage areas to serve as a storage area in the next timing duration, triggering the timer to restart timing, and sending the whole vehicle communication data packet in the storage area in the timing duration to the network node with the networking function when the timer restarts timing.
CN201910807400.6A 2019-08-29 2019-08-29 Communication data transmission method and device Active CN110519377B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910807400.6A CN110519377B (en) 2019-08-29 2019-08-29 Communication data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910807400.6A CN110519377B (en) 2019-08-29 2019-08-29 Communication data transmission method and device

Publications (2)

Publication Number Publication Date
CN110519377A CN110519377A (en) 2019-11-29
CN110519377B true CN110519377B (en) 2022-05-27

Family

ID=68627881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910807400.6A Active CN110519377B (en) 2019-08-29 2019-08-29 Communication data transmission method and device

Country Status (1)

Country Link
CN (1) CN110519377B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110677466A (en) * 2019-09-17 2020-01-10 中国第一汽车股份有限公司 Application program downloading method, device, gateway and storage medium
CN111193781B (en) * 2019-12-17 2022-04-01 河南嘉晨智能控制股份有限公司 Vehicle operation data real-time acquisition and transmission method and system
CN111212413B (en) 2020-01-13 2023-07-18 北京小米移动软件有限公司 Unlocking communication method and device and computer storage medium
CN111726777B (en) * 2020-06-30 2023-04-07 北京经纬恒润科技股份有限公司 Data transmission method and device
CN114125008B (en) * 2020-09-01 2024-03-08 上海汽车集团股份有限公司 Data transmission method and device
CN115664599B (en) * 2022-12-08 2023-03-28 杭州云酷智能科技有限公司 Data transmission 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
CN1993936A (en) * 2004-08-05 2007-07-04 罗伯特·博世有限公司 Flexray communication component
CN101334667A (en) * 2007-06-26 2008-12-31 株洲南车时代电气股份有限公司 Locomotive status messages checking and diagnosis recording method and device
CN102724291A (en) * 2012-05-23 2012-10-10 北京经纬恒润科技有限公司 Vehicle network data acquisition method, unit and system
CN104216978A (en) * 2014-09-01 2014-12-17 观致汽车有限公司 Automatic generation method and system for vehicle diagnosis database
CN104516345A (en) * 2013-09-30 2015-04-15 福特全球技术公司 Vehicle diagnostic and prognostic system and method
CN108647176A (en) * 2018-05-15 2018-10-12 北京经纬恒润科技有限公司 A kind of car networking equipment data transmission method and car networking equipment
CN109074250A (en) * 2016-04-27 2018-12-21 日立汽车系统株式会社 Electronic control device for vehicle, method for updating program and server unit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9064422B2 (en) * 2012-08-10 2015-06-23 Xrs Corporation Data transmission for transportation management

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1993936A (en) * 2004-08-05 2007-07-04 罗伯特·博世有限公司 Flexray communication component
CN101334667A (en) * 2007-06-26 2008-12-31 株洲南车时代电气股份有限公司 Locomotive status messages checking and diagnosis recording method and device
CN102724291A (en) * 2012-05-23 2012-10-10 北京经纬恒润科技有限公司 Vehicle network data acquisition method, unit and system
CN104516345A (en) * 2013-09-30 2015-04-15 福特全球技术公司 Vehicle diagnostic and prognostic system and method
CN104216978A (en) * 2014-09-01 2014-12-17 观致汽车有限公司 Automatic generation method and system for vehicle diagnosis database
CN109074250A (en) * 2016-04-27 2018-12-21 日立汽车系统株式会社 Electronic control device for vehicle, method for updating program and server unit
CN108647176A (en) * 2018-05-15 2018-10-12 北京经纬恒润科技有限公司 A kind of car networking equipment data transmission method and car networking equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CAN FD突破CAN总线应用局限;王伟;《电子技术应用》;20150521;全文 *
Improving compatibility between CAN FD and legacy CAN devices;G. Cena, I. C. Bertolotti, T. Hu,;《IEEE》;20150916;全文 *

Also Published As

Publication number Publication date
CN110519377A (en) 2019-11-29

Similar Documents

Publication Publication Date Title
CN110519377B (en) Communication data transmission method and device
JP3290438B2 (en) Network monitoring method and apparatus
US10291482B2 (en) ECU for transmitting large data in HiL test environment, system including the same and method thereof
CN108111509B (en) Data transmission method
CN108234087B (en) Data transmission method and sending end
CN112165447B (en) WAF equipment-based network security monitoring method, system and electronic device
US7346065B2 (en) Bridge apparatus and bridge method
CN111245776A (en) Vehicle-mounted data transmission method, device, equipment and storage medium
KR101714227B1 (en) vehicle data communication method and apparatus using the same
CN110719231B (en) Data processing method, device, equipment and readable storage medium
CN111726777B (en) Data transmission method and device
CN112436950B (en) Method for discovering equipment in local area network based on UDP broadcast
CN109560897A (en) A kind of TCP repeating method and device
CN110460520B (en) Data message transmission method and whole vehicle network system
WO2023051050A1 (en) Network monitoring method and apparatus, and computer storage medium
CN113872949B (en) Address resolution protocol response method and related device
US11588845B2 (en) Method for managing a memory
CN113645103B (en) Method and device for detecting communication link abnormity between video monitoring platform and front-end equipment
CN112491871B (en) TCP reorganization method, TCP reorganization device, electronic equipment and storage medium
CN114503518B (en) Detection device, vehicle, detection method, and detection program
EP3739820B9 (en) Establishing communication at optimized time instances
CN104348711A (en) Apparatus and method for receiving messages
CN109462591B (en) Data transmission method, receiving method, device and system
CN109547389B (en) Code stream file recombination method and device
US11563751B2 (en) Method for managing a memory

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 4 / F, building 1, No.14 Jiuxianqiao Road, Chaoyang District, Beijing 100020

Applicant after: Beijing Jingwei Hengrun Technology Co., Ltd

Address before: 8 / F, block B, No. 11, Anxiang Beili, Chaoyang District, Beijing 100101

Applicant before: Beijing Jingwei HiRain Technologies Co.,Ltd.

GR01 Patent grant
GR01 Patent grant