Data transmission method and device, vehicle, medium and product

By receiving TBOX forwarded data acquisition commands in the vehicle, collecting and filtering CAN message data, the high cost and real-time problem of obtaining CAN message data in the prior art is solved, and the effect of remote real-time data acquisition is achieved.

CN119814876APending Publication Date: 2025-04-11ROX MOTOR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411967839.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The method of obtaining vehicle CAN message data in the prior art requires relying on professional equipment, which is costly and difficult to guarantee real-time data, which may lead to the omission of fault data or the inability to reproduce.

Method used

The CCU receives the TBOX forwarded data acquisition command, collects the CAN message data of the corresponding channel, and filters out some data needed by the user based on the ECU filtering rules to achieve remote acquisition of CAN message data.

Benefits of technology

There is no need to rely on local hardware equipment, reduce labor costs, realize real-time data acquisition, and improve the accuracy and reliability of obtaining CAN message data in the event of failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814876A_ABST
    Figure CN119814876A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device, a vehicle, a medium and a product. The method is applied to a CCU, and comprises the following steps: receiving a first data acquisition command sent by a vehicle-mounted communication terminal TBOX, the first data acquisition command comprising a channel identifier and a first electronic control unit ECU filtering rule; collecting first CAN message data corresponding to the channel identifier, wherein the first CAN message data comprises sub CAN message data of a plurality of ECUs in a CAN channel corresponding to the channel identifier; screening out first target sub CAN message data meeting a first ECU filtering rule from the sub CAN message data of the plurality of ECUs; and sending the first target sub-CAN message data to the TBOX, so that the TBOX sends the first target sub-CAN message data to the target device. A user does not need to collect on site, so that the labor cost is reduced; and the CAN message data can be acquired remotely without being limited by the acquisition time, so that the CAN message data can be acquired more easily when the fault occurs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to a data transmission method, device, vehicle, medium and product. Background Art

[0002] If an Electronic Control Unit (ECU) suddenly fails while the car is driving, such as a "black screen" on the dashboard, it is necessary to obtain the Controller Area Network (CAN) message data at the time of the failure in the car and analyze the cause through CAN message data to ensure the safety of passengers.

[0003] At present, the acquisition of CAN message data usually requires the use of professional acquisition equipment, such as CAN analyzers or CAN interface cards. When a vehicle has a problem, engineers need to go to the site and connect the acquisition equipment to the On Board Diagnostics (OBD) interface to obtain CAN message data. However, due to the real-time nature of CAN message data, the CAN message data obtained multiple times may be inconsistent, data may be missing, and occasional faults may not be reproduced.

[0004] Therefore, the method of obtaining CAN message data in the prior art not only has high labor costs, but also the obtained CAN message data is not necessarily the data when a fault occurs. Summary of the invention

[0005] The embodiment of the present application provides a data transmission method, device, vehicle, medium and product. The CCU collects the CAN message data of the corresponding channel by receiving the data acquisition command sent by the target device forwarded by TBOX, filters out part of the CAN message data required by the user based on the ECU filtering rules, and returns it to the target device through TBOX to achieve remote acquisition of CAN message data. There is no need to rely on local hardware equipment, and users do not need to collect CAN message data on site, which reduces labor costs; remote acquisition of CAN message data can realize real-time data collection, is not limited by collection time, and is easier to collect CAN message data when a fault occurs.

[0006] In a first aspect, an embodiment of the present application provides a data transmission method, which is applied to a central control unit CCU, and the method includes:

[0007] receiving a first data acquisition command sent by the vehicle-mounted communication terminal TBOX, the first data acquisition command including a channel identifier and a first electronic control unit ECU filtering rule, the first data acquisition command being sent by the target device to the TBOX;

[0008] Collecting first CAN message data corresponding to the channel identifier, the first CAN message data including sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier;

[0009] Filtering out first target sub-CAN message data satisfying a first ECU filtering rule from sub-CAN message data of multiple ECUs;

[0010] The first target sub-CAN message data is sent to the TBOX, so that the TBOX sends the first target sub-CAN message data to the target device.

[0011] In a possible implementation, sending the first target sub-CAN message data to the TBOX includes:

[0012] According to a preset data format, the first target sub-CAN message data is packaged to obtain a CAN message data packet;

[0013] Send CAN message data packets to TBOX, so that TBOX can send CAN message data packets to the target device.

[0014] In a possible embodiment, the CCU includes a CAN interrupt module, a ring buffer, and a user datagram protocol UDP sending buffer; according to a preset data format, the first target sub-CAN message data is packetized to obtain a CAN message data packet, including:

[0015] Using the CAN interrupt module, the first target sub-CAN message data is written into the ring buffer;

[0016] The UDP sending buffer is used to read the first target sub-CAN message data from the ring buffer, and the read sub-CAN message data is packaged according to a preset data format to obtain a CAN message data packet.

[0017] In a possible implementation, the CCU further includes a CAN receiving first-in-first-out buffer; after filtering out first target sub-CAN message data satisfying a first ECU filtering rule from sub-CAN message data of multiple ECUs, the method further includes:

[0018] Writing the first target sub-CAN message data into the CAN receiving first-in-first-out buffer;

[0019] Using the CAN interrupt module, the first target sub-CAN message data is written into the ring buffer, including:

[0020] The CAN interrupt module is used to read the first target sub-CAN message data from the CAN receiving first-in-first-out buffer, and the read first target sub-CAN message data is written into the ring buffer.

[0021] In a possible implementation, the first data acquisition command further includes a first execution state identifier; and the first CAN message data corresponding to the acquisition channel identifier includes:

[0022] When the first execution state identifier indicates that execution has started, first CAN message data corresponding to the channel identifier is collected.

[0023] In a possible implementation, after sending the first target sub-CAN message data to the TBOX, the method further includes:

[0024] receiving a second data acquisition command sent by TBOX, the second data acquisition command including the first target channel identifier and deletion information of the target ECU filtering rule, the channel identifier including the first target channel identifier, and the second data acquisition command being sent by the target device to TBOX;

[0025] Deleting the target ECU filtering rule in the first ECU filtering rule to obtain a second ECU filtering rule;

[0026] Collecting second CAN message data corresponding to the channel identifier, the second CAN message data including sub-CAN message data of multiple ECUs in the CAN channel corresponding to the first target channel identifier;

[0027] Filtering out second target sub-CAN message data satisfying a second ECU filtering rule from the second CAN message data;

[0028] The second target sub-CAN message data is sent to the TBOX, so that the TBOX sends the second target sub-CAN message data to the target device.

[0029] In a possible implementation, after sending the first target sub-CAN message data to the TBOX, the method further includes:

[0030] receiving a third data acquisition command sent by the TBOX, the third data acquisition command including the second target channel identifier and the second execution state identifier, the channel identifier including the second target channel identifier, and the third data acquisition command being sent by the target device to the TBOX;

[0031] Stop collecting the third CAN message data corresponding to the second target channel identifier.

[0032] In a second aspect, an embodiment of the present application provides a data transmission method, which is applied to TBOX, and the method includes:

[0033] Receiving a first data acquisition command sent by a target device, the first data acquisition command including a channel identifier and a first ECU filtering rule;

[0034] Sending a first data acquisition command to the CCU, so that the CCU collects first CAN message data corresponding to the channel identifier, the first CAN message data including sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier, and filtering out first target sub-CAN message data that meets the first ECU filtering rule from the sub-CAN message data of the multiple ECUs;

[0035] Receive the first target sub-CAN message data sent by the CCU;

[0036] Send the first target sub-CAN message data to the target device.

[0037] In one possible implementation, receiving first target sub-CAN message data sent by the CCU includes:

[0038] Receiving a CAN message data packet sent by the CCU, where the CAN message data packet is obtained by the CCU by performing data packaging on the first target sub-CAN message data according to a preset data format;

[0039] Sending the first target sub-CAN message data to the target device includes:

[0040] Send CAN message data packets to the target device.

[0041] In a possible implementation, after receiving the CAN message data packet sent by the CCU, the method further includes:

[0042] Cache CAN message data packets, the CAN message data packets include a sending timestamp.

[0043] In a possible embodiment, the CAN message data packet is obtained by the CAN interrupt module of the CCU, which writes the first target sub-CAN message data into the ring buffer, and then uses the UDP sending buffer of the CCU to package the sub-CAN message data read from the ring buffer according to a preset data format. The first target sub-CAN message data is obtained by the CCU writing the filtered first target sub-CAN message data into the CAN receive first-in-first-out buffer, and then using the CAN interrupt module to read the first target sub-CAN message data from the CAN receive first-in-first-out buffer.

[0044] In a third aspect, an embodiment of the present application provides a data transmission device, which is applied to a CCU, and the device includes:

[0045] A receiving module, used for receiving a first data acquisition command sent by the TBOX, the first data acquisition command including a channel identifier and a first electronic control unit ECU filtering rule, and the first data acquisition command is sent by a target device;

[0046] A collection module, used for collecting first CAN message data corresponding to the channel identifier, the first CAN message data including sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier;

[0047] A screening module, used for screening out first target sub-CAN message data satisfying a first ECU filtering rule from sub-CAN message data of multiple ECUs;

[0048] The sending module is used to send the first target sub-CAN message data to the TBOX, so that the TBOX sends the first target sub-CAN message data to the target device.

[0049] In a fourth aspect, an embodiment of the present application provides a data transmission device, which is applied to TBOX, and the device includes:

[0050] A receiving module, used for receiving a first data acquisition command sent by a target device, wherein the first data acquisition command includes a channel identifier and a first ECU filtering rule;

[0051] a sending module, configured to send a first data acquisition command to the CCU, so that the CCU collects first CAN message data corresponding to the channel identifier, the first CAN message data including sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier, and screens out first target sub-CAN message data that meets the first ECU filtering rule from the sub-CAN message data of the multiple ECUs;

[0052] The receiving module is further used to receive the first target sub-CAN message data sent by the CCU;

[0053] The sending module is also used to send the first target sub-CAN message data to the target device.

[0054] In a fifth aspect, an embodiment of the present application provides a vehicle, the vehicle comprising:

[0055] a processor and a memory storing computer program instructions;

[0056] The processor implements any of the above data transmission methods when executing computer program instructions.

[0057] In a sixth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, any of the above-mentioned data transmission methods is implemented.

[0058] In a seventh aspect, an embodiment of the present application provides a computer program product, characterized in that when the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the above-mentioned data transmission methods.

[0059] The data transmission method, device, vehicle, medium and product of the embodiments of the present application are applied to CCU, including: receiving a first data acquisition command sent by a vehicle-mounted communication terminal TBOX, the first data acquisition command including a channel identifier and a first electronic control unit ECU filtering rule; collecting first CAN message data corresponding to the channel identifier, the first CAN message data including sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier; screening out first target sub-CAN message data that meets the first ECU filtering rule from the sub-CAN message data of multiple ECUs; sending the first target sub-CAN message data to TBOX, so that TBOX sends the first target sub-CAN message data to the target device.

[0060] In this way, CCU collects CAN message data of the corresponding channel by receiving the data acquisition command sent by the target device forwarded by TBOX, filters out part of the CAN message data required by the user based on the ECU filtering rules, and returns it to the target device through TBOX to achieve remote acquisition of CAN message data. There is no need to rely on local hardware equipment, and users do not need to collect CAN message data on site, which reduces labor costs; remote acquisition of CAN message data can realize real-time data collection, is not limited by collection time, and is easier to collect CAN message data when a fault occurs. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0062] Figure 1 is a schematic diagram of the structure of a vehicle-mounted system provided by an embodiment of the present application;

[0063] Figure 2 is a flowchart of a data transmission method provided by another embodiment of the present application;

[0064] Figure 3 is a structural diagram of a data acquisition command provided by yet another embodiment of the present application;

[0065] Figure 4 is a flowchart of a data transmission method provided in yet another embodiment of the present application;

[0066] Figure 5 is a flowchart of a data transmission method provided in yet another embodiment of the present application;

[0067] Figure 6 is a structural diagram of a vehicle-mounted system provided by yet another embodiment of the present application;

[0068] Figure 7 It is a structural diagram of CAN message data provided by another embodiment of the present application;

[0069] Figure 8 is a flowchart of a data transmission method provided in yet another embodiment of the present application;

[0070] Fig. 9 is a flowchart of a data transmission method provided in yet another embodiment of the present application;

[0071] Fig.10 is a structural schematic diagram of a data transmission device applied to a CCU provided in yet another embodiment of the present application;

[0072] Fig.11 is a structural schematic diagram of a data transmission device applied to TBOX provided by yet another embodiment of the present application;

[0073] Fig.12 It is a structural diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0074] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0075] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0076] If an ECU fails while the car is driving, such as a "black screen" on the dashboard, it is necessary to obtain the CAN message data in the car and analyze the cause through the CAN message data to ensure the safety of the passengers. The acquisition of CAN message data usually requires professional acquisition equipment, such as a CAN analyzer or a CAN interface card.

[0077] At present, the acquisition of CAN message data usually requires the reliance on professional acquisition equipment, such as CAN analyzers or CAN interface cards. When a vehicle has a problem, engineers need to go to the site to connect the CAN message data to the On Board Diagnostics (OBD) interface through the CAN message data transceiver tool in the acquisition equipment to obtain the CAN message data. This process is usually performed locally in the vehicle system, and the parameters of the CAN message data (such as baud rate, identifier, data length, etc.) are set through specific software tools or platforms, and the CAN message data is captured and stored by connecting the acquisition equipment to the CAN bus network. However, due to the real-time nature of CAN message data, the CAN message data acquired multiple times may be inconsistent, and there may be data omissions, and occasional faults may not be reproduced.

[0078] Therefore, the method of obtaining CAN message data in the prior art not only has high labor costs, but also the obtained CAN message data is not necessarily the data when a fault occurs.

[0079] In order to solve the problems of the prior art, the embodiments of the present application provide a data transmission method, device, vehicle, medium and product. The data transmission method provided in the embodiments of the present application is applied to a vehicle-mounted system. Figure 1 As shown, the vehicle-mounted system 100 includes a vehicle-mounted communication terminal (Telematics Box, TBOX) 110 and a central control unit (CCU) 120. The TBOX 110 is used to receive a data acquisition command sent by a target device and forward it to the CCU 120; the CCU 120 is used to collect CAN message data of the corresponding channel, filter out part of the CAN message data required by the user based on the ECU filtering rule, and return it to the TBOX 110, and send it to the target device through the TBOX 110.

[0080] The data transmission method provided in the embodiment of the present application is that the CCU collects the CAN message data of the corresponding channel by receiving the data acquisition command sent by the target device forwarded by TBOX, filters out part of the CAN message data required by the user based on the ECU filtering rules, and returns it to the target device through TBOX to achieve remote acquisition of CAN message data. There is no need to rely on local hardware equipment, and users do not need to collect CAN message data on site, which reduces labor costs; remote acquisition of CAN message data can realize real-time data collection, is not limited by collection time, and is easier to collect CAN message data when a fault occurs.

[0081] Here, the target device includes the cloud, such as the cloud database (DB) and the cloud WEB. CAN message data can be acquired in real time by using the Ethernet connection between TBOX and CCU. Due to the wireless Internet access feature of TBOX itself, CAN message data can also be uploaded to the cloud. Unnecessary CAN message data transceiver tools and acquisition equipment are eliminated.

[0082] It should be noted that the main connection methods between the cloud and the vehicle system are as follows:

[0083] CCU and TBOX are connected via Ethernet; TBOX and the cloud are connected via MQTT / RabbitMQ. TBOX forwards data acquisition commands to CCU via Transmission Control Protocol (TCP), and CCU sends CAN message data to TBOX via User Datagram Protocol (UDP).

[0084] Among them, MQTT is a lightweight message transmission protocol based on the publish / subscribe mode; RabbitMQ is an open source message queue management system based on the AMQP (Advanced Message Queuing Protocol) standard, which provides reliable message storage and forwarding functions for handling a large number of message delivery tasks. TCP is a connection-oriented, reliable protocol. It ensures that data is correctly transmitted from the sender to the receiver through confirmation mechanisms (ACK), timeout retransmission mechanisms, error detection mechanisms (such as checksums), etc., and is suitable for command transmission control here. UDP is a connectionless, unreliable protocol. It does not guarantee the arrival, order and integrity of data, and only provides the simplest transmission service. It is suitable for applications that have high real-time requirements but low reliability requirements, such as video streaming, audio streaming, etc. The cloud supports page settings such as channel selection, baud rate, start, stop, filtering logic in data acquisition commands, CAN data file format, etc.

[0085] It should be noted that the vehicle system includes the Lwpi protocol stack (a lightweight TCP / IP protocol stack), which enables the vehicle system to use the TCP protocol. In addition, the vehicle system also includes an operating system (OS) and a software development kit (SDK) to maintain the normal operation of the vehicle.

[0086] The following first introduces the data transmission method provided in the embodiment of the present application. Figure 2 A schematic flow chart of a data transmission method provided in one embodiment of the present application is shown.

[0087] like Figure 2 As shown, the data transmission method provided in the embodiment of the present application includes the following steps.

[0088] S210 , the TBOX receives a first data acquisition command sent by a target device, where the first data acquisition command includes a channel identifier and a first electronic control unit ECU filtering rule.

[0089] Here, the format of the first data acquisition command is pre-set. The target device includes the cloud.

[0090] In some embodiments, TBOX is used to receive the first data acquisition command sent by the target device. The configuration client (Config Client) serves as a client of TBOX and supports receiving the data acquisition command from the cloud.

[0091] S220. TBOX sends a first data acquisition command to the CCU.

[0092] In some embodiments, after TBOX parses the data acquisition command, it forwards it to the configuration commander (Config Commander) of the CCU through the TCP protocol; the configuration commander serves as the server of the CCU, receives the data acquisition command, and writes it into the configuration message queue (Config Message Quene).

[0093] In some embodiments, the data acquisition command is sent after encryption in the cloud, and the vehicle-mounted system obtains the command parsing key by negotiating with the cloud in advance. TBOX uses the command parsing key to parse the data acquisition command to obtain the channel identification and the first electronic control unit ECU filtering rule. It should be noted that the CAN bus is generally divided according to functional requirements for the convenience of management and control. Traditional cars are mainly divided into two channels: power and body. The body bus uses low speed and the power uses high speed. However, with the development of intelligent automobiles, the types and numbers of channels are very different for different models. There is also a CAN bus dedicated to diagnosis connected to the OBD interface in the car. Communication between different bus networks all relies on the gateway to forward messages. The gateway is the most important component in the bus in the car, and its importance is equivalent to the human spine.

[0094] In some embodiments, the CCU has the ability to collect multiple CAN message data and can support the selection of different CAN channels. The first data acquisition command includes a channel identifier CH. As an example, Figure 3 As shown, the channel identifier occupies one byte, each channel identifier occupies one bit, each bit represents a channel, and there are 8 channels in total; a bit of 1 indicates that the channel is selected, and a bit of 0 indicates that the channel is not selected; bits 0 to 7 represent channels 1 to 8 respectively, and each channel represents a different ECU unit or module.

[0095] In some embodiments, the data acquisition command may further include a reserved byte Flag, which is assigned a value of 0 for subsequent use. Additional content may be added to the reserved byte to meet user needs.

[0096] S230. The CCU collects first CAN message data corresponding to the channel identifier, where the first CAN message data includes sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier.

[0097] In some embodiments, the CCU takes out a data acquisition command from a configuration message queue through a server task, and collects the first CAN message data corresponding to the channel identifier.

[0098] S240 . The CCU filters out first target sub-CAN message data satisfying a first ECU filtering rule from the sub-CAN message data of the plurality of ECUs.

[0099] In some embodiments, Figure 3As shown, the first data acquisition command also includes message data management information, and the message data management information includes a first management identifier CMD and a first ECU filtering rule. The first management identifier is a new identifier for the filtering rule Add Filter (which can also be represented by the number 3, which is bound to Add Filter), which occupies one byte. The first ECU filtering rule includes a filter identifier number Filter Count, a filter identifier Filter, and a filter task Mask. As an example, Figure 3 As shown, Filter Count occupies one byte, indicating how many pairs of Filter-Mask there are, that is, N; it can be set through CAN-utils, such as: filtering car door, air conditioning, and seat messages, here it is set to 3, meaning there are 3 filtering rules. Filter is the Filter in the Filter-Mask combination, indicating CanID, big endian mode, 8*N-4 is the high byte, and 8*N-1 is the low byte. Mask is the Mask in the Filter-Mask combination, indicating which bits of the received Filter are concerned, and the bits that are 1 indicate that the corresponding bits of the Filter need to be matched; the bits that are 0 indicate that the corresponding bits of the Filter do not need to be matched; big endian mode, 8*N is the high byte, and 8*N+3 is the low byte, such as: set the received CanID (filter) to 0x123 (assuming it is a car door message). In mask mode, we can set the identifier register to 0x123, and the mask register to all 1s to indicate that all bits must match.

[0100] It should be noted that each ECU has its unique identifier CanID.

[0101] S250. The CCU sends the first target sub-CAN message data to the TBOX.

[0102] In some embodiments, the CCU sends the first target sub-CAN message data to the TBOX via UDP.

[0103] S260. TBOX sends the first target sub-CAN message data to the target device.

[0104] In some embodiments, for the filtered first target sub-CAN message data, the CCU acts as a data sender, executes the client task, and sends the first target sub-CAN message data to TBOX. TBOX supports using a recorder server to receive the first target sub-CAN message data sent by the CCU, parses the first target sub-CAN message data, and sends it to the cloud via MQTT / RabbitMQ.

[0105] In some embodiments, TBOX may parse the first target sub-CAN message data to obtain CAN message data corresponding to different CanIDs.

[0106] In this way, CCU collects CAN message data of the corresponding channel by receiving the data acquisition command sent by the target device forwarded by TBOX, filters out part of the CAN message data required by the user based on the ECU filtering rules, and returns it to the target device through TBOX to achieve remote acquisition of CAN message data. There is no need to rely on local hardware equipment, and users do not need to collect CAN message data on site, which reduces labor costs; remote acquisition of CAN message data can realize real-time data collection, is not limited by collection time, and is easier to collect CAN message data when a fault occurs.

[0107] Based on this, in some embodiments, such as Figure 4 As shown, the above S250 may specifically include:

[0108] S251, the CCU performs data packetization on the first target sub-CAN message data according to a preset data format to obtain a CAN message data packet;

[0109] S252, CCU sends CAN message data packet to TBOX;

[0110] The above S260 may specifically include:

[0111] S253, TBOX sends a CAN message data packet to the target device.

[0112] Here, the preset data format is set in advance.

[0113] In some embodiments, the CAN message data packet includes a preset number of units of CAN message data, and the first target sub-CAN message data of each unit includes an event ID (ie, a frame ID), a channel identifier, a valid data length, a message data acquisition timestamp, and valid data content.

[0114] As an example, 80 cells are included in one data frame.

[0115] In some embodiments, the CCU sends a CAN message data packet to the TBOX via Ethernet, and the TBOX sends the CAN message data packet to the target device.

[0116] In some embodiments, the CAN message data packet includes a data packet ID.

[0117] In this way, after the screened first target sub-CAN message data is packaged, the CAN message data packet is sent to the target device, thereby avoiding data loss caused by scattered data transmission.

[0118] Based on this, in some embodiments, the CCU includes a CAN interrupt module, a ring buffer, and a user datagram protocol UDP sending buffer; Figure 5 As shown, the above S251 may specifically include:

[0119] S301, the CCU uses the CAN interrupt module to write the first target sub-CAN message data into the ring buffer;

[0120] S302, the CCU uses the UDP sending buffer to read the first target sub-CAN message data from the ring buffer, and packages the read sub-CAN message data according to a preset data format to obtain a CAN message data packet.

[0121] In some embodiments, the first target sub-CAN message data is read from the ring buffer through the UDP send buffer (UDP Send Buffer) of the CCU. After reading, the read sub-CAN message data is packetized to obtain a CAN message data packet.

[0122] In this way, by setting up a ring buffer mechanism and coordinating the speed of collecting data and the speed of sending CAN message data packets, it can be ensured that data will not be lost.

[0123] Based on this, in some embodiments, the CCU further includes a CAN receiving first-in-first-out buffer; after the above S240, the method may further include:

[0124] The CCU writes the first target sub-CAN message data into the CAN receiving first-in-first-out buffer;

[0125] The above S301 may specifically include:

[0126] The CCU uses the CAN interrupt module to read the first target sub-CAN message data from the CAN receiving first-in-first-out buffer, and writes the read first target sub-CAN message data into the ring buffer.

[0127] In some embodiments, the CCU writes the filtered first target sub-CAN message data into a message queue, i.e., a CAN receiving first-in-first-out buffer. The first target sub-CAN message data is read from the message queue through the CAN interrupt module of the CCU, and after reading, the read first target sub-CAN message data is written into a ring buffer.

[0128] In some embodiments, after reading the first target sub-CAN message data from the message queue, the first target sub-CAN message data that has been read from the message queue is formatted.

[0129] In some embodiments, if the reading time of the first target sub-CAN message data from the message queue is longer than a preset value, the first target sub-CAN message data in the message queue is read again.

[0130] In some embodiments, Figure 6 As shown, CCU 120 includes a CAN receiving FIFO buffer 121, a CAN interrupt module 122, a ring buffer 123 and a UDP sending buffer 124. CCU 120 writes the filtered first target sub-CAN message data into a message queue, i.e., a CAN receiving FIFO buffer (CAN Rx FIFO) 121. Then, it is given to the CAN interrupt module (CAN ISR) 122 of the CCU through a message queue, and the CAN interrupt module 122 writes the first target sub-CAN message data into a ring buffer (Ring Buffer) 123. The first target sub-CAN message data is read from the ring buffer 123 through the UDP sending buffer 124 of the CCU, and after reading, it starts to assemble the packets to obtain a CAN message data packet. Finally, the UDP sending buffer 124 of the CCU passes the CAN message data packet to TBOX 110 through Ethernet.

[0131] As an example, the CAN message data packet format is divided into several 18-byte units, and about 80 units express a frame of data, that is, 18*80=1440 bytes, plus a 5-byte sending timestamp, which is less than the maximum transmission unit (MTU) optimal value of 1500. Figure 7As shown, the first target sub-CAN message data of each unit includes event ID (i.e. frame ID), channel identifier, valid data length, message data acquisition timestamp and valid data content. Frame ID B0~B3, represented by 4 bytes, big endian mode, B0 is the high byte of ID, B1 is the second highest, B2 is the second lowest, and B3 is the lowest byte; the highest bit indicates whether it is a standard frame or an extended frame, 0 indicates a standard frame, such as 0x00000123 (less than 0x7FF), 1 indicates an extended frame, such as 0x80001314; the second highest bit indicates whether it is a data frame or a remote frame, 0 indicates a data frame, such as 0x00000123, 1 indicates a remote frame, such as 0x40000123; the latter indicates whether it is a CAN or CAN FD frame, 0 indicates a CAN frame, such as 0x00000123 followed by 8 bytes of data, 1 indicates a CAN FD frame, such as 0x20001234 followed by 64 bytes of data. Channel identifier CH, B4 high 4 bits, indicates the channel number of the current frame, such as CAN0, CAN1, CAN8, etc. Effective data length DLC, B4 low 4 bits, indicates the effective data length of the current frame, effective value 0 ~ 8; message data acquisition timestamp TimeStamp, B5 ~ B9, 5 bytes, big endian mode, B5 is the highest byte, B9 is the low byte, the unit is ms, this is the CAN message data acquisition time, such as 0x67481122 converted to 2024-11-2814:43:46; effective data content Data, B10 ~ B17, indicates CAN message data bytes d0 ~ d7, the effective data length is DLC.

[0132] In this way, by receiving the CAN first-in-first-out buffer and the ring buffer, the speed of collecting data, the speed of assembling packets and the speed of sending CAN message data packets are coordinated to ensure that data will not be lost.

[0133] Based on this, in some embodiments, after the above S252, the method may further include:

[0134] TBOX buffers CAN message data packets, which include sending timestamps.

[0135] In some embodiments, due to the storage characteristics of the TBOX itself, the CAN message data can be saved locally on the TBOX.

[0136] In some embodiments, before the CCU transmits the CAN message data packet, the CAN message data packet is timestamped and cached, so that after being transmitted to the TBOX or the cloud, it can be parsed according to the CanID and then sorted according to the sending timestamp.

[0137] In this way, by using TBOX to cache CAN message data packets including sending timestamps, after TBOX or the cloud receives a large amount of CAN message data, it can reorder them according to the sending timestamps, so that the CAN message data will not be out of order.

[0138] Based on this, in some embodiments, the first data acquisition command also includes a first execution state identifier; the above S230 may specifically include:

[0139] When the first execution state identifier indicates that execution has started, the CCU collects first CAN message data corresponding to the channel identifier.

[0140] In some embodiments, the first data acquisition command also includes message data management information, the message data management information includes a first management identifier CMD, the first management identifier CMD is a start execution identifier Rec Start (it can also be represented by the number 1, the number 1 and Rec Start are bound), and occupies one byte. When the first management identifier CMD includes the start execution identifier, the first CAN message data corresponding to the channel identifier is collected.

[0141] In this way, the first execution status identifier in the first data acquisition command is used to determine whether to collect the first CAN message data corresponding to the channel identifier. The user can set whether to collect CAN message data based on the setting of the first execution status identifier to meet user needs and improve user experience.

[0142] Based on this, in some embodiments, such as Figure 8 As shown, after the above S260, the method may further include:

[0143] S311, TBOX receives a second data acquisition command sent by the target device, the second data acquisition command includes the first target channel identifier and deletion information of the target ECU filtering rule, and the channel identifier includes the first target channel identifier;

[0144] S312, TBOX sends a second data acquisition command to the CCU;

[0145] S313, the CCU deletes the target ECU filtering rule in the first ECU filtering rule to obtain a second ECU filtering rule;

[0146] S314, the CCU collects second CAN message data corresponding to the channel identifier, where the second CAN message data includes sub-CAN message data of multiple ECUs in the CAN channel corresponding to the first target channel identifier;

[0147] S315, the CCU filters out the second target sub-CAN message data satisfying the second ECU filtering rule from the second CAN message data;

[0148] S316, CCU sends the second target sub-CAN message data to TBOX;

[0149] S317. TBOX sends the second target sub-CAN message data to the target device.

[0150] In some embodiments, TBOX and CCU will determine the implementation method of message data according to different commands. The second data acquisition command also includes message data management information, which includes a second management identifier CMD and deletion information of the target ECU filter rule. The second management identifier CMD is a filter rule deletion identifier Clear Filter (which can also be represented by the number 4, which is bound to Clear Filter), which occupies one byte. When the second management identifier CMD includes a filter rule deletion identifier, the target ECU filter rule in the first ECU filter rule is deleted to obtain the second ECU filter rule.

[0151] It is understandable that the filtering rules of some channels may be adjusted.

[0152] In this way, if the user wants to adjust the ECU filtering rules, the adjustment can be made through the first target channel identifier carried in the second data acquisition command and the deletion information of the target ECU filtering rules, thereby meeting user needs and improving user experience.

[0153] Based on this, in some embodiments, such as Fig. 9 As shown, after the above S260, the method may further include:

[0154] S321, the TBOX receives a third data acquisition command sent by the target device, the third data acquisition command includes a second target channel identifier and a second execution state identifier, and the channel identifier includes a second target channel identifier;

[0155] S322. TBOX sends a third data acquisition command to the CCU;

[0156] S323. The CCU stops collecting the third CAN message data corresponding to the second target channel identifier.

[0157] Here, the second execution state indicator represents stopping the execution.

[0158] In some embodiments, the third data acquisition command includes message data management information, the message data management information includes a third management identifier CMD, the third management identifier CMD is a stop execution identifier Rec Stop (can also be represented by the number 2, the number 2 and Rec Stop are bound), occupying one byte. When the third management identifier CMD includes the stop execution identifier, the collection of the third CAN message data corresponding to the second target channel identifier is stopped.

[0159] It is understandable that data collection of some channels may be stopped.

[0160] In this way, if the user wants to stop collecting CAN message data of some channels, adjustments can be made through the second target channel identifier and the second execution status identifier carried in the third data acquisition command to meet user needs and improve user experience.

[0161] In some embodiments, the message data management information may further include a fourth management identifier CMD, where the fourth management identifier CMD represents reservation, indicating that any processing process will not be changed.

[0162] In the embodiment provided in the present application, TBOX receives the data acquisition command from the cloud and forwards it to the CCU via TCP; the CCU receives the data acquisition command and writes it into the configuration message queue. The CCU takes out the data acquisition command from the configuration message queue through the server task, and determines whether to collect CAN message data according to the execution status in the data acquisition command. The collected CAN message data is sent to TBOX. TBOX saves the CAN message data locally and sends it to the cloud via MQTT / RabbitMQ. CCU supports receiving various commands to set the CAN controller via TCP, and supports packaging CAN message data into Ethernet data packets and sending them out via UDP.

[0163] As an example, CCU provides TCP service, TBOX is the client, and the connection service is implemented as follows: Assume that CCU IP = 172.16.3.10, TCP server port (i.e. server port) = 5555; configure the client and server to execute in command mode. After obtaining CAN message data, CCU uses UDP protocol to send CAN message data of the selected channel at a fixed period, assuming that TBOX IP = 192.16.3.5, UDP server port = 6666; After TBOX receives CAN message data, it is recorded in the TBOX local memory in ASC (ASCII), double-byte character (DBC), binary log format (BLF) or master data file (MDF) format, which is convenient for external tools such as CANoE to read, and uploaded to the cloud for users to download when needed.

[0164] In the embodiments provided in this application, users can obtain CAN message data through the cloud interface and edit the CAN message data, including uploading to the analysis device, deleting CAN message data, or downloading CAN message data. The cloud can also display CAN message data, including CanID, timestamp (acquisition timestamp, cloud receiving timestamp, sending timestamp), frame type, etc.

[0165] The embodiments provided in this application can be performed remotely via the Internet without relying on local hardware devices. It is usually necessary to first transmit the data on the CAN bus to the cloud server through an embedded system or an Internet of Things (IoT) device, such as TBOX. On the cloud server, users can configure the data format through a specific Web interface or API interface, including setting parameters, screening conditions, etc. CAN message data is received and stored in real time through the cloud server. It is applicable to any dual-axle drive pure electric vehicle to improve vehicle performance. It can well improve driving performance / handling performance while taking into account economic performance.

[0166] It should be noted that TCP / UDP belongs to the transport layer protocol in the OSI seven-layer network model.

[0167] The embodiment provided by the present application is based on the requirements of the fault event. The cloud sends a command to obtain CAN message data (the command information is used to indicate which ECU's message data is to be obtained). After receiving the command, TBOX sends it to the TCP in the CCU module according to TCP. After receiving the above command, CCU forwards it from TCP to UDP. After obtaining the CAN message data according to the command requirements, CCU combines the message characteristics, transmits it through UDP in the form of specific units and frame data, adds a timestamp and processes it through a buffer. Among them, there are queues and buffers with different functions in CCU to package and sort the data.

[0168] Based on the data transmission method provided in the above embodiment, the present application also provides a specific implementation of a data transmission device. Please refer to the following embodiment.

[0169] See also Fig.10 The data transmission device 400 provided in the embodiment of the present application is applied to a CCU, and the device includes:

[0170] The receiving module 410 is used to receive a first data acquisition command sent by the TBOX, the first data acquisition command includes a channel identifier and a first electronic control unit ECU filtering rule, and the first data acquisition command is sent by the target device to the TBOX;

[0171] The acquisition module 420 is used to acquire first CAN message data corresponding to the channel identifier, where the first CAN message data includes sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier;

[0172] A screening module 430, configured to screen out first target sub-CAN message data satisfying a first ECU filtering rule from sub-CAN message data of a plurality of ECUs;

[0173] The sending module 440 is used to send the first target sub-CAN message data to the TBOX, so that the TBOX sends the first target sub-CAN message data to the target device.

[0174] Based on this, in some embodiments, the sending module 440 may specifically include:

[0175] A packaging unit, used for packaging the first target sub-CAN message data according to a preset data format to obtain a CAN message data packet;

[0176] The sending unit is used to send a CAN message data packet to the TBOX, so that the TBOX sends the CAN message data packet to the target device.

[0177] Based on this, in some embodiments, the CCU includes a CAN interrupt module, a ring buffer, and a user datagram protocol UDP sending buffer; the packet assembly unit can be specifically used for:

[0178] Using the CAN interrupt module, the first target sub-CAN message data is written into the ring buffer;

[0179] The UDP sending buffer is used to read the first target sub-CAN message data from the ring buffer, and the read sub-CAN message data is packaged according to a preset data format to obtain a CAN message data packet.

[0180] Based on this, in some embodiments, the CCU further includes a CAN receiving first-in-first-out buffer; the device 400 may further include:

[0181] A writing module, used for writing the first target sub-CAN message data into a CAN receiving first-in-first-out buffer after filtering out the first target sub-CAN message data satisfying the first ECU filtering rule from the sub-CAN message data of the multiple ECUs;

[0182] The package unit can be used for:

[0183] The CAN interrupt module is used to read the first target sub-CAN message data from the CAN receiving first-in-first-out buffer, and the read first target sub-CAN message data is written into the ring buffer.

[0184] Based on this, in some embodiments, the first data acquisition command also includes a first execution state identifier; the acquisition module 420 can be specifically used for:

[0185] When the first execution state identifier indicates that execution has started, first CAN message data corresponding to the channel identifier is collected.

[0186] Based on this, in some embodiments, the device 400 may further include:

[0187] The receiving module 410 is further used to receive a second data acquisition command sent by the TBOX after sending the first target sub-CAN message data to the TBOX, the second data acquisition command including the first target channel identifier and deletion information of the target ECU filtering rule, the channel identifier including the first target channel identifier, and the second data acquisition command is sent by the target device to the TBOX;

[0188] A deletion module, used for deleting the target ECU filtering rule in the first ECU filtering rule to obtain a second ECU filtering rule;

[0189] The acquisition module 420 is further used to acquire second CAN message data corresponding to the channel identifier, where the second CAN message data includes sub-CAN message data of multiple ECUs in the CAN channel corresponding to the first target channel identifier;

[0190] The screening module 430 is further used to screen out the second target sub-CAN message data satisfying the second ECU filtering rule from the second CAN message data;

[0191] The sending module 440 is further used to send the second target sub-CAN message data to the TBOX, so that the TBOX sends the second target sub-CAN message data to the target device.

[0192] Based on this, in some embodiments, the device 400 may further include:

[0193] The receiving module 410 is further used to receive a third data acquisition command sent by the TBOX after sending the first target sub-CAN message data to the TBOX, the third data acquisition command including the second target channel identifier and the second execution state identifier, the channel identifier including the second target channel identifier, and the third data acquisition command is sent by the target device to the TBOX;

[0194] The stop module is used to stop collecting the third CAN message data corresponding to the second target channel identifier.

[0195] See also Fig.11 The data transmission device 500 provided in the embodiment of the present application is applied to TBOX, and the device includes:

[0196] A receiving module 510 is used to receive a first data acquisition command sent by a target device, where the first data acquisition command includes a channel identifier and a first ECU filtering rule;

[0197] The sending module 520 is used to send a first data acquisition command to the CCU, so that the CCU collects first CAN message data corresponding to the channel identifier, the first CAN message data includes sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier, and filters out first target sub-CAN message data that meets the first ECU filtering rule from the sub-CAN message data of the multiple ECUs;

[0198] The receiving module 510 is further used to receive the first target sub-CAN message data sent by the CCU;

[0199] The sending module 520 is further used to send the first target sub-CAN message data to the target device.

[0200] Based on this, in some embodiments, the receiving module 510 may be specifically used for:

[0201] Receiving a CAN message data packet sent by the CCU, where the CAN message data packet is obtained by the CCU by performing data packaging on the first target sub-CAN message data according to a preset data format;

[0202] The sending module 520 can be specifically used for:

[0203] Send CAN message data packets to the target device.

[0204] Based on this, in some embodiments, the apparatus 500 may further include:

[0205] The cache module is used to cache the CAN message data packet after receiving the CAN message data packet sent by the CCU, and the CAN message data packet includes a sending timestamp.

[0206] Based on this, in some embodiments, the CAN message data packet is obtained by the CAN interrupt module of the CCU, which writes the first target sub-CAN message data into the ring buffer, and then uses the UDP sending buffer of the CCU to package the sub-CAN message data read from the ring buffer according to a preset data format. The first target sub-CAN message data is obtained by the CCU writing the filtered first target sub-CAN message data into the CAN receive first-in-first-out buffer, and then using the CAN interrupt module to read the first target sub-CAN message data from the CAN receive first-in-first-out buffer.

[0207] The various modules of the data transmission device provided in the embodiment of the present application can implement the functions of the various steps of the data transmission method provided above and achieve the corresponding technical effects, which will not be repeated here for the sake of concise description.

[0208] Based on the same inventive concept, an embodiment of the present application also provides a vehicle.

[0209] Fig.12 A schematic diagram of the hardware structure of a vehicle provided in an embodiment of the present application is shown.

[0210] The vehicle may include a processor 601 and a memory 602 storing computer program instructions.

[0211] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0212] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 602 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory.

[0213] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.

[0214] The processor 601 implements any one of the data transmission methods in the above embodiments by reading and executing computer program instructions stored in the memory 602 .

[0215] In one example, the vehicle may further include a communication interface 603 and a bus 610. Fig.12 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 and communicate with each other.

[0216] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0217] The bus 610 includes hardware, software, or both, coupling the components of the vehicle to each other. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Linear Predictive Coding (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VESA Local Bus, VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 610 may include one or more buses. Although the embodiments of the present application describe and illustrate a specific bus, the present application considers any suitable bus or interconnection. The vehicle can execute the data transmission method in the embodiments of the present invention, thereby realizing the above-mentioned data transmission method.

[0218] In addition, in combination with the data transmission method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the data transmission methods in the above embodiment is implemented.

[0219] The present application also provides a computer program product. When the instructions in the computer program product are executed by a processor of a vehicle, the vehicle executes each process of implementing any one of the above-mentioned data transmission method embodiments.

[0220] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0221] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable ReadOnly Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0222] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0223] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0224] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A data transmission method, characterized in that: Applied to a central control unit CCU, the method comprises: receiving a first data acquisition command sent by the vehicle-mounted communication terminal TBOX, wherein the first data acquisition command includes a channel identifier and a first electronic control unit ECU filtering rule, and the first data acquisition command is sent by the target device to the TBOX; Collecting first CAN message data corresponding to the channel identifier, wherein the first CAN message data includes sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier; Filtering out first target sub-CAN message data satisfying the first ECU filtering rule from the sub-CAN message data of the plurality of ECUs; The first target sub-CAN message data is sent to the TBOX, so that the TBOX sends the first target sub-CAN message data to the target device.

2. The data transmission method according to claim 1, characterized in that: The sending the first target sub-CAN message data to the TBOX includes: Packaging the first target sub-CAN message data according to a preset data format to obtain a CAN message data packet; The CAN message data packet is sent to the TBOX, so that the TBOX sends the CAN message data packet to the target device.

3. The data transmission method according to claim 2, characterized in that: The CCU includes a CAN interrupt module, a ring buffer, and a user datagram protocol UDP sending buffer; the first target sub-CAN message data is packaged according to a preset data format to obtain a CAN message data packet, including: Using the CAN interrupt module, writing the first target sub-CAN message data into the ring buffer; The UDP sending buffer is used to read the first target sub-CAN message data from the ring buffer, and the read sub-CAN message data is packaged according to a preset data format to obtain a CAN message data packet.

4. The data transmission method according to claim 3, characterized in that: The CCU further includes a CAN receiving first-in-first-out buffer; after filtering out first target sub-CAN message data satisfying the first ECU filtering rule from the sub-CAN message data of the plurality of ECUs, the method further includes: Writing the first target sub-CAN message data into the CAN receiving first-in-first-out buffer; The step of using the CAN interrupt module to write the first target sub-CAN message data into the ring buffer comprises: The CAN interrupt module is used to read the first target sub-CAN message data from the CAN receiving first-in-first-out buffer, and the read first target sub-CAN message data is written into the ring buffer.

5. The data transmission method according to claim 1 or 2, characterized in that: The first data acquisition command also includes a first execution state identifier; the collecting of the first CAN message data corresponding to the channel identifier includes: When the first execution state identifier indicates that execution has started, first CAN message data corresponding to the channel identifier is collected.

6. The data transmission method according to claim 1, characterized in that: After sending the first target sub-CAN message data to the TBOX, the method further includes: receiving a second data acquisition command sent by the TBOX, the second data acquisition command including a first target channel identifier and deletion information of a target ECU filtering rule, the channel identifier including the first target channel identifier, the second data acquisition command being sent by the target device to the TBOX; Deleting the target ECU filtering rule in the first ECU filtering rule to obtain a second ECU filtering rule; Collecting second CAN message data corresponding to the channel identifier, wherein the second CAN message data includes sub-CAN message data of multiple ECUs in the CAN channel corresponding to the first target channel identifier; Filtering out second target sub-CAN message data satisfying the second ECU filtering rule from the second CAN message data; The second target sub-CAN message data is sent to the TBOX, so that the TBOX sends the second target sub-CAN message data to the target device.

7. The data transmission method according to claim 1, characterized in that: After sending the first target sub-CAN message data to the TBOX, the method further includes: receiving a third data acquisition command sent by the TBOX, the third data acquisition command including a second target channel identifier and a second execution state identifier, the channel identifier including the second target channel identifier, and the third data acquisition command being sent by the target device to the TBOX; Stop collecting the third CAN message data corresponding to the second target channel identifier.

8. A data transmission method, characterized in that: Applied to TBOX, the method comprises: Receiving a first data acquisition command sent by a target device, wherein the first data acquisition command includes a channel identifier and a first ECU filtering rule; Sending the first data acquisition command to the CCU, so that the CCU collects first CAN message data corresponding to the channel identifier, wherein the first CAN message data includes sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier, and filtering out first target sub-CAN message data that meets the first ECU filtering rule from the sub-CAN message data of the multiple ECUs; Receiving the first target sub-CAN message data sent by the CCU; Send the first target sub-CAN message data to the target device.

9. The data transmission method according to claim 8, characterized in that: The receiving the first target sub-CAN message data sent by the CCU includes: receiving a CAN message data packet sent by the CCU, wherein the CAN message data packet is obtained by the CCU performing data packaging on the first target sub-CAN message data according to a preset data format; The sending the first target sub-CAN message data to the target device includes: Send the CAN message data packet to the target device.

10. The data transmission method according to claim 9, characterized in that: After receiving the CAN message data packet sent by the CCU, the method further includes: The CAN message data packet is cached, and the CAN message data packet includes a sending timestamp.

11. The data transmission method according to claim 9, characterized in that: The CAN message data packet is obtained by the CAN interrupt module of the CCU, after the first target sub-CAN message data is written into the ring buffer, and then the UDP sending buffer of the CCU is used to package the sub-CAN message data read from the ring buffer according to a preset data format. The first target sub-CAN message data is obtained by the CCU writing the filtered first target sub-CAN message data into the CAN receiving first-in-first-out buffer, and then reading the first target sub-CAN message data from the CAN receiving first-in-first-out buffer using the CAN interrupt module.

12. A data transmission device, characterized in that: Applied to CCU, the device comprises: A receiving module, used for receiving a first data acquisition command sent by the TBOX, wherein the first data acquisition command includes a channel identifier and a first electronic control unit ECU filtering rule, and the first data acquisition command is sent by a target device; A collection module, used for collecting first CAN message data corresponding to the channel identifier, wherein the first CAN message data includes sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier; A screening module, used for screening out first target sub-CAN message data satisfying the first ECU filtering rule from the sub-CAN message data of the plurality of ECUs; The sending module is used to send the first target sub-CAN message data to the TBOX, so that the TBOX sends the first target sub-CAN message data to the target device.

13. A data transmission device, characterized in that: Applied to TBOX, the device comprises: A receiving module, configured to receive a first data acquisition command sent by a target device, wherein the first data acquisition command includes a channel identifier and a first ECU filtering rule; a sending module, configured to send the first data acquisition command to the CCU, so that the CCU collects first CAN message data corresponding to the channel identifier, wherein the first CAN message data includes sub-CAN message data of multiple ECUs in the CAN channel corresponding to the channel identifier, and filters out first target sub-CAN message data that meets the first ECU filtering rule from the sub-CAN message data of the multiple ECUs; The receiving module is further used to receive the first target sub-CAN message data sent by the CCU; The sending module is also used to send the first target sub-CAN message data to the target device.

14. A vehicle, characterized in that: The vehicle includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the data transmission method according to any one of claims 1 to 11 is implemented.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the data transmission method according to any one of claims 1 to 11 is implemented.

16. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the data transmission method as described in any one of claims 1 to 11.