Vehicle end data transmission method, program product and vehicle

By using CAN bus and Ethernet bus in the vehicle to achieve communication redundancy between controllers, and using message timing identification for data screening, the problem of communication stability of the vehicle internal controller is solved, ensuring the stability of data transmission and Real-time.

CN119210927APending Publication Date: 2024-12-27SHANGHAI JIDU AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411373698.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Communication between internal controllers of the vehicle may be interrupted due to collisions, cable wear and other reasons, resulting in unstable communication, and the prior art is difficult to effectively solve this problem.

Method used

Communication redundancy between the controller is achieved through the CAN bus and the Ethernet bus, and data screening and updating is used to use message timing identification to ensure the stability and order of data transmission.

Benefits of technology

It realizes communication redundancy between controllers, avoids communication abnormalities caused by cable damage, and ensures stability and real-time data transmission, especially when the CAN bus and the Ethernet bus are arranged differently, reducing simultaneous damage to the dual bus probability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119210927A_ABST
    Figure CN119210927A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle end data transmission method, a program product and a vehicle. Relates to the technical field of communication. According to the invention, connection is established between the two controllers needing communication through the CAN bus and the Ethernet bus, so that communication redundancy between the controllers in the vehicle is realized. Particularly, in consideration of different connection modes of the CAN bus and the Ethernet bus and different arrangement modes of the CAN bus and the Ethernet bus in the vehicle, the probability of simultaneous damage of the two buses is low, and the stability of the system is ensured. Besides, when the controllers communicate with each other, a message time sequence identifier can be added in the message, so that redundant data can be verified and screened based on the message time sequence identifier when the message is received, the data does not need to be processed, the data processing amount during communication is reduced, and the real-time performance of communication is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] As the process of vehicle electrification accelerates, more and more electronically controlled devices are configured in vehicles, and multiple controllers are often configured in vehicles to control various devices. For example, a vehicle is often configured with a left controller and a right controller, so as to be connected to various electronically controlled devices in the vehicle.

[0003] However, considering the complexity of the working environment inside the vehicle and external risks, the communication between the controllers may be interrupted (such as vehicle collision, cable wear, etc.). Therefore, how to ensure the stability of communication between the controllers is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a vehicle-side data transmission method, a program product, and a vehicle, which can achieve communication redundancy between controllers through the CAN bus and the Ethernet bus to ensure the stability of data transmission.

[0005] In the first aspect, the present application provides a vehicle-side data transmission method, which is applied to a first controller, and the first controller is communicatively connected to a second controller via a CAN bus and an Ethernet bus, and the method includes: receiving a data message to be transmitted sent by the second controller via the CAN bus and the Ethernet bus respectively, wherein the data message to be transmitted includes a message type identifier, a message timing identifier, and a message content. Based on the message reception record, determine whether the data message to be transmitted is a new message, wherein the message reception record is used to record the latest transmission message of each type of message. If so, the data message to be transmitted is used and the message reception record is updated based on the data message to be transmitted.

[0006] In the second aspect, the present application provides a vehicle-side data transmission method, which is applied to a second controller, and the second controller is communicatively connected to the first controller via a CAN bus and an Ethernet bus, and the method includes: determining the data to be transmitted, wherein the data to be transmitted includes a message type identifier and a message content. Based on the message type identifier, a message timing identifier of the data to be transmitted is determined from a message sending record, wherein the message sending record is used to record the message timing identifier of the latest transmission message of each type of message. The data to be transmitted and the message timing identifier are encapsulated into a data message to be transmitted. The data message to be transmitted is sent to the first controller via the CAN bus and the Ethernet bus respectively.

[0007] In a third aspect, a vehicle-side data transmission method is applied to a first controller and a second controller connected to each other by a CAN bus and an Ethernet bus, the method comprising: the second controller determines the data to be transmitted, wherein the data to be transmitted includes a message type identifier and a message content. The second controller determines the message timing identifier of the data to be transmitted from the message sending record based on the message type identifier, wherein the message sending record is used to record the message timing identifier of the latest transmission message of each type of message. The second controller encapsulates the data to be transmitted and the message timing identifier into a data message to be transmitted, wherein the data message to be transmitted includes a message type identifier, a message timing identifier and a message content. The second controller sends the data message to be transmitted to the first controller via the CAN bus and the Ethernet bus respectively. The first controller receives the data message to be transmitted sent by the second controller via the CAN bus and the Ethernet bus respectively. The first controller determines whether the data message to be transmitted is a newly added message based on the message receiving record, wherein the message receiving record is used to record the latest transmission message of each type of message. If so, the first controller adopts the data message to be transmitted and updates the message receiving record based on the data message to be transmitted.

[0008] In a fourth aspect, the present application provides a computer program product, including a computer program / instruction, which is used to implement the steps in the vehicle-side data transmission method described in the first aspect, the second aspect, or the third aspect when the computer program / instruction processor is executed. Optionally, the computer program can be stored in a readable storage medium or in the cloud of a computer device; the processor of the computer device reads the computer program from the readable storage medium or the cloud.

[0009] In a fifth aspect, the present application provides a vehicle, a vehicle comprising: at least two controllers, a memory connected to the at least two controllers for communication, and a CAN bus and an Ethernet bus connected between the at least two controllers. The memory stores instructions that can be executed by the at least two controllers, and the instructions are executed when the at least two controllers transmit data, so as to implement the vehicle-side data transmission method as described in the first aspect, the second aspect, or the third aspect.

[0010] The present application provides a vehicle-side data transmission method, a program product, and a vehicle. It relates to the field of communication technology. In the present application, two controllers communicating in a vehicle can be connected via a CAN bus and an Ethernet bus, and when the two controllers communicate, a message timing identifier of the reaction time information is added to the data message to be transmitted and transmitted respectively via the two buses, so as to facilitate the screening and adoption of the data message to be transmitted based on the message timing identifier. As a result, communication redundancy is achieved between the controllers of the vehicle, especially since the directions of the CAN bus and the Ethernet bus in the vehicle are often different, thereby avoiding communication anomalies between the two controllers due to cable wear. In addition, for redundant communication information, especially when there is a communication delay, the message screening can be performed based on the message timing identifier to ensure the orderly data transmission between the two controllers. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0012] Figure 1 It is a schematic diagram of the connection relationship of controllers in a vehicle provided by an exemplary embodiment of the present application.

[0013] Figure 2 It is an exemplary signaling diagram of a dual-end vehicle-side data transmission method provided by an exemplary embodiment of the present application.

[0014] Figure 3 It is a data schematic diagram of a process of sending a data message to be transmitted provided by an exemplary embodiment of the present application.

[0015] Figure 4 It is an exemplary flow chart of a method for determining a target data message provided by an exemplary embodiment of the present application.

[0016] Figure 5 This is a schematic diagram of the decision logic of the data receiving process based on the timing threshold provided in some embodiments of the present application.

[0017] Figure 6 It is a data schematic diagram of a process of receiving a data message to be transmitted provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0019] Example Vehicles:

[0020] To further describe the connection of the controllers in the vehicle, the present application also provides a schematic diagram of the connection relationship of the controllers in the vehicle ( Figure 1 ).

[0021] In order to realize communication redundancy of the controllers in the vehicle, in the vehicle control system of the present application, communication redundancy between the controllers can be realized by connecting the CAN bus and the Ethernet bus simultaneously between the controllers. Figure 1 As shown, Figure 1 The vehicle includes two controllers 110 , a CAN bus 120 , an Ethernet bus 130 and an Ethernet switch 140 .

[0022] The CAN bus 120 is directly connected between the two controllers 110 , and the Ethernet bus 130 is connected between the controller 110 and the Ethernet switch 140 , so that the Ethernet connection between the controllers 110 is realized through the Ethernet switch 140 .

[0023] The controller 110 in the vehicle is a physical electronic device used to manage and control various systems and components of the vehicle. It controls the functions of the vehicle by receiving signals from sensors and other input devices, and then processing and analyzing these signals according to predetermined programs and algorithms.

[0024] In the present application, the controller 110 may refer to a physical processing device. It should be understood that in the embodiments of the present application, the controller 110 may be implemented by a general-purpose central processing unit (CPU), high-performance computing (HPC), an electronic control unit (ECU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, and configured as a computing device in the vehicle.

[0025] CAN (Controller Area Network) bus 120 is a high-performance, high-reliability serial communication protocol bus, mainly used in real-time applications, such as communication between various components in a car. CAN bus 120 generally uses twisted pair cables to transmit signals and has functions such as multi-master control, system flexibility, error detection and recovery, etc.

[0026] The Ethernet bus (also referred to as the Ethernet bus) 130 is a vehicle-mounted network system based on standard Ethernet technology. Specifically, the Ethernet bus is a bus-based topology. In a vehicle, the Ethernet bus 130 is often configured based on a switch (such as an Ethernet switch 140) to form a star topology. That is, in Figure 1 The Ethernet switch 140 may also be included, and the Ethernet bus 130 may be connected to two controllers 110 by connecting each controller 110 to the Ethernet switch 140 .

[0027] Considering the connection mode of the CAN bus 120 and the Ethernet bus 130, in the wiring arrangement inside the vehicle, the CAN bus 120 and the Ethernet bus 130 are generally arranged independently and will not be arranged in parallel (i.e., forming a wiring harness for arrangement). Therefore, when the cable is damaged (such as collision damage or friction damage), the two buses will not be damaged at the same time because of the parallel arrangement of the two buses.

[0028] It should be noted that Figure 1 The vehicle 100 shown only shows the connection between two controllers. In actual applications, the CAN bus and the Ethernet bus can be connected between any two controllers as needed, and can be adjusted according to actual needs.

[0029] In actual applications, the vehicle 100 is generally equipped with a HPC-based controller and multiple ECU controllers. For example, the vehicle 100 generally includes a central controller (HPC), a left controller (ECU) and a right controller (ECU), and is connected to the electronic control equipment (such as sensors, motors, etc.) of each vehicle through the left controller and the right controller, respectively, to achieve the drive, power distribution and management of the corresponding equipment, and then aggregate the data to the central controller. Among them, the ECU and the HPC are often connected by communication, and the ECUs may not be configured with communication cables.

[0030] To further illustrate the practical application of the above vehicle control system, the following will combine Figure 2 to Figure 5 The vehicle-side data transmission method is described in detail.

[0031] Exemplary vehicle-side data transmission method:

[0032] The vehicle data transmission method provided in this application can be applied to data transmission between a first controller and a second controller, wherein the first controller can be the controller sending data in this data transmission, and the second controller can be the controller receiving data in this data transmission. Figure 1 As shown, the first controller and the second controller can be connected via a CAN bus and an Ethernet bus.

[0033] In order to fully describe the vehicle data transmission method, the present application provides an exemplary signaling diagram of a dual-end vehicle-side data transmission method ( Figure 2 ). The vehicle-side data transmission method may be executed by the aforementioned first controller and the second controller.

[0034] like Figure 2 As shown, process P200 may include the following steps:

[0035] S210: The second controller determines the data type and data content of the data to be transmitted.

[0036] S220: The second controller determines a timing identifier of the data to be transmitted based on the data type of the data to be transmitted and the message sending record.

[0037] S230: The second controller determines a data message to be transmitted based on the data type, data type, and timing identifier of the data to be transmitted.

[0038] S240: The second controller sends the data message to be transmitted to the first controller via the CAN bus and the Ethernet bus respectively.

[0039] S250: The first controller receives at least one candidate data message sent by the second controller through the CAN bus and the Ethernet bus respectively.

[0040] S260: The first controller performs redundancy screening on at least one candidate data message based on the message type identifier and the message timing identifier to determine a target data message.

[0041] S270. The first controller determines whether the target data message is a new message based on the message reception record.

[0042] S280: If yes, the first controller adopts the target data message and updates the message receiving record based on the target data message.

[0043] S290: If not, the first controller discards the target data message.

[0044] In the aforementioned S210, the data to be transmitted may refer to the data that the second controller needs to transmit to the first controller at the current moment. To facilitate subsequent processing, the data to be transmitted may include a data type and data content. Among them, the data content may refer to the specific data content to be transmitted (such as the sensor data of the sensor at a specific moment), and the data type may reflect the unique type of the data to be transmitted.

[0045] The data type of each data in the vehicle can generally be globally determined during the vehicle communication design, and its corresponding identifier can be determined to distinguish different data.

[0046] In some embodiments, the data type in the aforementioned S210 can be directly carried in the data to be transmitted, or can be identified according to the source / destination of the data to be transmitted. For example, when the controller receives sensor data from a specific sensor, it can configure an identification information for the sensor data according to the source of the data to indicate that the data is generated by the specific sensor. For another example, when the controller receives a data message transmitted by other controllers, the data message contains the global type of the message (recorded as a message type identifier).

[0047] In the aforementioned S220, the timing mark of the data to be transmitted may be a dynamically assigned time mark, which is used to reflect the change of the processing time of the data to be transmitted through the increment of the timing mark. In order to reduce the amount of data transmitted, the timing mark is often incremented by 1 in response to the newly added data. That is, if the time mark of data A at the current moment is T, the time mark of the newly added data A at the next moment is T+1.

[0048] In addition, in the actual transmission process, considering that the data storage space of the timing identifier is limited, the timing identifier can be reset periodically. Among them, the timing identifier is generally reset based on the timing threshold. That is, the value range of the timing identifier is generally [0, timing threshold], so that at the next moment when the current timing identifier = the timing threshold, the value of the timing identifier is reset to 0.

[0049] Specifically, the aforementioned time threshold is generally related to the data length allocated for the timing identifier. Generally, the data length of the timing identifier is generally configured as 2Bytes, a total of 16 bits. Then the aforementioned time threshold is generally 2 16 -1=65535. That is, the value range of the aforementioned timing identifier is generally [0,65535], and at the next moment when the timing identifier = 65535, the timing identifier is reset to 0.

[0050] The message sending record can be used to record the data sending situation of the second controller, so as to be configured into a corresponding data format. Considering that the data sent by the second controller is generally a data message, the message sending record can record the latest timing identifier of each type of data message. That is, in general, in response to the data message sending behavior of the second controller, the corresponding record can be updated in the message sending record based on the sent data message.

[0051] In some embodiments, the message sending record can be configured as a database / data structure (such as a dictionary) with the message type identifier as the primary key, and the timing identification information of the data to be transmitted (recorded as the message timing identifier) ​​can be cached in the data corresponding to the message type identifier.

[0052] For example, the message sending record can be configured as a sending dictionary TxDict<PDU ID,Sequence ID> , where PDU ID can refer to a message type identifier, and Sequence ID can refer to a message timing identifier. In the data structure of TxDict, PDU ID can be used as the primary key (Key) of the transmission dictionary TxDict, and Sequence ID can be configured as the value (value) corresponding to each primary key.

[0053] Based on the aforementioned message sending record, when executing the aforementioned S220, the latest timing identifier of the data message of this type can generally be determined from the message sending record based on the data type, and then the latest timing identifier count (i.e., value +1) is processed, so that the processed value is used as the timing identifier of the data to be transmitted.

[0054] Specifically, based on the aforementioned transmission dictionary TxDict, when executing the aforementioned S220, the target PDU ID can be determined from the message type identifier PDU ID based on the data type, and the latest message sequence identifier Sequence ID of the target PDU ID can be determined from the message transmission record TxDict. Among them, the sequence identifier of the data to be transmitted can be the Sequence ID+1 of the PDU ID pair in TxDict to characterize the new data transmission process.

[0055] It is understandable that the executor of the aforementioned +1 operation can also be the aforementioned message sending record, that is, after the second controller sends the data, the timing mark of the data can be directly +1 through the message sending record, so that the corresponding data can be directly called when sending data next time.

[0056] In the aforementioned S230, the data message to be transmitted may be a message encapsulation result of the data to be transmitted, that is, in S230, it is generally necessary to adjust the various values ​​of the data to be transmitted based on the format requirements when the data is sent, so as to determine data of a specific structure as the data message to be transmitted.

[0057] Among them, the data message generally includes a message type identifier, a message timing identifier and a message content, so in the aforementioned S230, the data type can be configured as the message type identifier of the data message to be transmitted, the timing identifier can be configured as the message timing identifier of the data message to be transmitted, and the data content can be configured as the message content of the data message to be transmitted. That is, the message type identifier of the data message to be transmitted is configured as the data type, the message timing identifier of the data message to be transmitted is configured as the timing identifier, and the message content of the data message to be transmitted is configured as the data content.

[0058] If it is necessary to explain, the above conversion process is generally processed based on the corresponding data format. For example, a data message is generally characterized by a message header and a message content, wherein the message header may include a message type identifier and a message timing identifier of a specific length (generally 2 Bytes). Based on the data format, the corresponding value can be filled.

[0059] In some embodiments, the corresponding data may be further processed based on the format requirements in the aforementioned S230. For example, the aforementioned message content may include information such as a check bit in addition to the data content, and the message may be processed based on the corresponding data content during message encapsulation to determine the check bit of the data content, thereby performing data filling.

[0060] Based on the data message to be transmitted, data can be transmitted through two buses in S240. Specifically, the data message to be transmitted can be copied and distributed to each bus so as to transmit data through the bus.

[0061] In some embodiments, considering that different buses have different transmission modes, when executing S240 , the data messages to be transmitted can generally be copied to the cache area of ​​the corresponding bus respectively, so as to be subsequently processed and sent.

[0062] Specifically, the data message to be transmitted may be copied to the buffer area of ​​the CAN bus and the buffer area of ​​the Ethernet bus respectively.

[0063] For the Ethernet bus, the data format of the data message to be transmitted in the cache area of ​​the Ethernet bus is converted based on the data transmission type of the Ethernet bus to determine the Ethernet transmission message. The Ethernet transmission message is sent to the first controller through the Ethernet switch based on the Ethernet bus. Among them, considering the data transmission requirements of the Ethernet bus, the data message is generally serialized when the format conversion is performed, and then the routing information is determined (considering the transmission through the switch), so as to be encapsulated into an Ethernet transmission message. Therefore, the Ethernet switch can accurately put the data to the first controller based on the routing information in the message.

[0064] As for the CAN bus, considering that the CAN bus is generally directly connected, the data message to be transmitted in the cache area of ​​the CAN bus can be directly sent to the first controller based on the CAN bus.

[0065] It should be noted that, considering that the message sending record is used to store the latest message timing identifier, the message sending record needs to be updated after the above data is sent. That is, the message timing identifier of the corresponding data class in the message sending record is replaced with the sent message timing identifier. Among them, the specific execution time of the above update process can be adjusted according to actual needs, and can be executed after S220 (such as after S220, after S230, and after S240).

[0066] Based on the above S210 to S240, the second controller can send the data to be transmitted in the form of data messages through the CAN bus and the Ethernet bus respectively, thereby achieving communication redundancy. A message timing identifier is added to the data message to facilitate the redundancy screening process of the first controller and ensure the real-time performance of data communication.

[0067] Based on the above S210 to S240, in theory, the first controller can simultaneously receive data packets to be transmitted by different types of buses. Considering that the same data packets to be transmitted are transmitted in different channels, redundancy is generated. When receiving data packets, they can be aligned for redundancy screening to determine the actually required packets and perform subsequent processing (such as transmission to the application layer of the controller).

[0068] That is, in the aforementioned S250, the candidate data message may refer to the data message received by the first controller. Generally, considering the differences in data transmission process of different types of buses, the received data messages may be processed periodically, and the data messages received during the data period may be configured as candidate data messages.

[0069] To avoid frame loss caused by untimely processing by the controller, the first controller can cache the data message when receiving the data message, so as to process the corresponding message periodically. Specifically, the first controller can configure data cache containers (referred to as BUFFER) for different buses, respectively, to store data messages received from the Ethernet bus and the CAN bus.

[0070] Based on the above configuration, a first cache container and a second cache container may be configured in the first controller, so that in a data collection cycle, at the cache time of the data collection cycle, the data message received through the CAN bus is cached in the first cache container, and the data message received through the Ethernet bus is cached in the second cache container. At the call time of the data collection cycle, the data message is called from the first cache container and the second cache container and cached in the candidate queue. Among them, the candidate queue may refer to the cache area of ​​each data message to be processed.

[0071] Thus, the first controller can periodically cache and call data messages, thereby avoiding frame loss caused by untimely processing by the controller. At the same time, considering that periodic calls are more likely to receive redundant data of the same data message, so as to process it directly.

[0072] In the aforementioned S260, redundant screening may refer to removing redundant parts in the candidate data message. That is, when there are two data messages with the same message type identifier and the same message timing identifier in the candidate data message, only one data message is retained and recorded as the target data message. That is, the aforementioned target data message is the screening result of the aforementioned redundant screening, thereby ensuring that the target data message does not include multiple data messages with the same message type identifier and the same message timing identifier, that is, the message timing identifiers of the target data messages with the same message type identifier are different from each other.

[0073] When both buses are communicating normally, the first controller can obtain two data messages with the same message type identifier and message timing identifier from different buses in each cycle, thereby executing the aforementioned S260 and retaining one data message from the two data messages for subsequent processing.

[0074] Considering the actual transmission process, different buses may have different communication conditions (such as possible hysteresis, frame loss, etc.), so the two candidate data messages received by the first controller at the same time (i.e., within a data acquisition cycle) may not be redundant results of the same data message (i.e., the message timing identifiers of the two candidate data messages at the same time may be different), and in the aforementioned S260, the two candidate data messages with different timing identifiers can also be processed, so as to ensure that only one data message is processed each time, so as to ensure the real-time nature of the communication. For more information about this process, please refer to Figure 4 and its related description.

[0075] In the aforementioned S260, the message receiving record is similar to the aforementioned message sending record, and the message receiving record is used to record the latest transmission message of each type of message. Specifically, the message receiving record can be dictionary data maintained by the second controller, and its primary key and value are the same as the message sending record, that is, the message receiving record can record the latest message timing identifier of each message type through the message type identifier (primary key).

[0076] The newly added message may refer to a data message to be transmitted that has not been processed by the first controller. That is, after determining the target data message, it can be further determined whether the target data message is valid. If it is valid, it is determined to be a newly added message and subsequent steps are executed.

[0077] In some embodiments, the aforementioned S270 can be directly executed based on the latest message timing identifier in the message reception record. Generally, it can be directly determined whether the message timing identifier of the data message to be transmitted is newer than the latest message timing identifier (such as a larger value). If so, it is determined that the data message to be transmitted is a newly added message.

[0078] In some embodiments, taking into account the retention of unreceived data, if the judgment is made only based on the latest message timing identifier, the target data message with transmission delay may be omitted. In the judgment process of the aforementioned latest message, a cache size threshold for caching data may be configured. Thus, after determining the target data message, the timing difference between the message timing identifier of the target data message and the latest timing identifier of the corresponding latest transmission message can be determined, and it is judged that the timing difference is less than the cache size threshold. When the timing difference is less than the cache size threshold, it is judged to be within the cache size, so that the corresponding target data message can be used (that is, if so, the target data message is judged to be a newly added message. If not, the target data message is judged not to be a newly added message and the target data message is discarded).

[0079] As an alternative embodiment, considering that the target data messages transmitted by the CAN bus and the Ethernet bus are theoretically matched (ie, the first controller can receive the same two target data messages), the aforementioned message reception record can be adjusted to determine the situation of the newly added message.

[0080] Specifically, the message receiving record records each unmatched target data message through the message type identifier and the message timing identifier. Among them, each unmatched target data message may refer to the first controller only receiving one target data message with the same message type identifier and message timing identifier. Based on the aforementioned message receiving record, when determining the newly added message, it can be directly judged based on the target data message whether there is a matching message of the target data message in the message receiving record.

[0081] Among them, if there is a matching message of the target data message, then the target data message is recorded in the message reception record to indicate that it has been received once, and this reception is redundant data, then the matching message can be eliminated from the message reception record and the target data message can be discarded. If there is no matching message of the target data message, it can be explained that the message has been recorded, then it can be determined as a new message, and based on the redundancy situation at the current moment (i.e., whether redundant messages are received at the same time), the message reception record is updated (i.e., if it is not received, a record of the target data message is added to the message reception record).

[0082] In the aforementioned S280, if the target data message is a newly added message, it means that the application layer of the first processor has not processed the message, and the use of the data message to be transmitted can be understood as sending it to the corresponding application layer of the first processor or transmitting it externally based on its message type identifier. In addition, after the data message to be transmitted is adopted, the message reception record can be updated based on the message timing identifier of the data message to be transmitted. Specifically, when the message reception record only records the latest transmitted message, the message timing identifier of the latest transmitted message can be directly updated.

[0083] It is understandable that if the target data message is not a newly added message, the target data message may not be subsequently processed, and the target data message that is not a newly added message is generally directly discarded at this time.

[0084] Thus, based on the aforementioned method P200, a connection is established between two controllers that need to communicate through the CAN bus and the Ethernet bus communication, thereby achieving communication redundancy between the controllers in the vehicle. In particular, considering that the connection methods of the CAN bus and the Ethernet bus are different, and the layout methods of the CAN bus and the Ethernet bus in the vehicle are different, the probability of simultaneous damage to the two buses is low, ensuring the stability of the system. In addition, when the controllers communicate with each other, a message timing identifier can be added to the message, so that when receiving the message, the redundant data can be verified and screened based on the message timing identifier, without processing the data itself, reducing the amount of data processing during communication and ensuring the real-time nature of communication.

[0085] Exemplary data sending process:

[0086] To further illustrate the aforementioned sending process of the data message to be transmitted, the present application also provides a data schematic diagram of the sending process of the data message to be transmitted ( Figure 3 ).

[0087] like Figure 3As shown, in the process of sending the data message to be transmitted by the second controller, the relevant data can be obtained through SWC (Software Component), RTE (Runtime Environment), COM (Communication Manager), PDUR (PDU Router) to obtain the data to be transmitted, and then through CDD (Complex Driver) to determine the data message to be transmitted. In the Ethernet bus, the data message to be transmitted is sent from EthIf (Ethernet Interface) through SoAd (Socket Adaptor). In the CAN bus, the data message to be transmitted is sent through CanIf (CAN Interface).

[0088] In the above process, SWC can be configured as a functional unit for sending and receiving data. In actual operation, SWC is often the starting point or end point of data transmission, that is, data generated by sensors or other devices can be sent to the second processor through SWC.

[0089] RTE mainly provides a running environment so that RTE can be configured as a bridge for data exchange between SWCs to ensure that data is transmitted according to the predetermined path and method.

[0090] The COM module is responsible for converting the data of the application layer into a format suitable for transmission and sending it to other modules through RTE.

[0091] PDUR is a PDU router, which can be used in the aforementioned second controller to route between different communication channels of the controller. Specifically in data transmission, the PDUR module is responsible for routing and forwarding data to ensure that the data can reach the target module correctly.

[0092] Based on the above functional modules, the data to be transmitted can be determined. If the data to be transmitted itself has a message type identifier, it can be directly processed in the subsequent CDD. If it does not have a message type identifier, the message type identifier can be determined in the CDD based on the above transmission path.

[0093] CDD is a complex driver, usually used to implement complex functions or diagnostic functions of a specific ECU. It may contain OEM-specific code or logic. In data transmission, CDD may be responsible for handling specific data formats or protocols to ensure that the data can be parsed and processed correctly.

[0094] In the present application, CDD can be used to complete the main logic of the aforementioned S220 to S240, that is, to determine the timing identifier for the data to be transmitted, encapsulate it into a data message to be transmitted, and then copy it to the corresponding port respectively.

[0095] Specifically, when the data to be transmitted determined by the aforementioned function is directly a message PDU, the processing process of the CDD during the sending process may include the following steps:

[0096] Receive the PDU and determine the message class identifier (PDU_ID) of the PDU.

[0097] Use PDU_ID as the query key (KEY) and send the record TxDict from the message<PDU ID,Sequence ID> Get the latest sequence ID of PDU_ID.

[0098] Sequence ID increases by 1 (ie Sequence ID=Sequence ID+1).

[0099] Determine whether the Sequence ID is greater than the timing threshold. As mentioned above, if the Sequence ID is 2Bytes, the time threshold is 65535. That is, determine whether Sequence ID>65535 is true.

[0100] If so, the Sequence ID is reset (ie, Sequence ID=0), and the updated Sequence ID is synchronized to TxDict and added to the PDU.

[0101] If not, the new Sequence ID is directly synchronized to TxDict and added to the PDU.

[0102] The updated PDU is distributed to the CAN bus port (CANIF) and the Ethernet bus port (EthIF).

[0103] For data PDUs to be transmitted that are copied to the Ethernet bus:

[0104] The format conversion can be performed first through SoAd (Socket Adaptor). PDU is generally converted into the format required for Ethernet bus transmission at SoAd, and then related routing information is added to convert it into Ethernet transmission message.

[0105] The Ethernet transmission message is transmitted to the Ethernet physical layer (PHY) through EthIf (Ethernet Interface) and then sent out. Among them, EthIf is an Ethernet interface, which provides a standardized interface with the Ethernet bus to ensure that the ECU can communicate with the Ethernet system. In data transmission, the EthIf module is responsible for handling the underlying details of Ethernet communication to ensure that data can be transmitted through Ethernet.

[0106] Similar to the Ethernet bus mentioned above, for the data PDU to be transmitted copied to the CAN bus:

[0107] The PDU is directly transmitted to the CAN physical layer through CANIF and then sent out. In the data transmission, the CanIf module is responsible for processing the communication of the CAN bus to ensure that the data can be transmitted through the CAN bus.

[0108] Exemplary target data message determination method:

[0109] As mentioned above, considering the real-time nature of communication, when the first controller receives two data messages at the same time, if the message type identifiers are the same, they are generally processed as one data message.

[0110] To further illustrate the process, the present application also provides an exemplary flow chart of a method for determining a target data message ( Figure 4 ).

[0111] like Figure 4 As shown, process P400 may include the following steps:

[0112] S410: Determine two candidate data packets with the same packet type identifier from at least one candidate data packet.

[0113] S420: Determine whether the message timing identifiers of two candidate data messages are the same.

[0114] S430: If yes, determine one candidate data message from the two candidate data messages as the target data message.

[0115] S440: If not, determine the latest timing identifier of the latest transmitted message corresponding to the message type identifier from the message reception record based on the message type identifiers of the two candidate data messages.

[0116] S450: Determine a candidate data message from two candidate data messages based on the latest timing identifier and use it as the target data message.

[0117] In the aforementioned S410, the two candidate data messages may specifically refer to two candidate data messages with the same message type identifier in at least one candidate data message. That is, when there are no two candidate data messages with the same message type identifier in at least one candidate data message, this process P400 may not be executed, and the message type identifier may be directly processed independently.

[0118] In some embodiments, in S450, the target data packet may be determined based on the magnitude relationship between the packet timing identifier of the candidate data packet and the latest timing identifier.

[0119] Among them, when the message timing identifiers of the two candidate data messages are both greater than the latest timing identifier, it can be said that the candidate data messages are later in time than the data messages that have been sent. In order to avoid skipping a message due to message jumps, the message with the smaller data identifier is selected from the two candidate data messages as the target data message.

[0120] When the message timing identifiers of two candidate data messages are one greater than the latest timing identifier and the other less than the latest timing identifier, considering that the candidate data message with the smaller timing identifier has theoretically been adopted, the candidate data message with the larger message data identifier should be adopted at this time.

[0121] Furthermore, considering the situation that the message timing identifier is reset based on the timing threshold, the present application also provides a decision logic diagram of the data receiving process based on the timing threshold ( Figure 5 ).

[0122] like Figure 5 As shown, when making a decision based on the timing threshold, the following decision logic may be included:

[0123] S510: Determine whether the message timing identifiers of the two candidate data messages are both greater than the latest timing identifier. If so, select the candidate data message with the smaller message timing identifier as the target data message. If not, continue to determine S520.

[0124] S520: Determine whether the message timing identifiers of the two candidate data messages are both smaller than the latest timing identifier. If so, select the candidate data message with the smaller message timing identifier as the target data message. If not, select the candidate data message with the larger message timing identifier as the data message to be transmitted.

[0125] That is, based on the aforementioned S510 and S520, it can be known that the relationship between the message timing identifiers and the latest timing identifiers of the two candidate data messages includes the following three types:

[0126] ① The message timing identifiers of the two candidate data messages are both greater than the latest timing identifier: This is consistent with the logic in P400 above, that is, the two candidate data messages are both newer than the latest timing identifier, then the smaller candidate data message can be selected to avoid message mutation. In addition, there may be a situation where the latest timing identifier is reset, and one of the two candidate data messages that are both greater than the latest timing identifier is greater after the reset, and the other is greater before the reset (actually older than the latest timing identifier). Based on the aforementioned logic, the candidate data message that is greater than the latest timing identifier after the reset can be selected, and considering that the timing identifier is recounted from 0 after the reset, the message timing identifier of the reset candidate data message is smaller. That is, in summary of the above two situations, the message timing identifiers of the two candidate data messages are both greater than the latest timing identifier, and the candidate data message with the smaller message timing identifier can be directly selected as the target data message.

[0127] ② The message timing identifiers of the two candidate data messages are both smaller than the latest timing identifier: According to the logic of not being reset, the data messages will not all be smaller than the latest timing identifier. That is, at least one candidate data message and the message corresponding to the aforementioned latest timing identifier come from the same bus. Based on the increment of the timing identifier, there will not be a situation where both are smaller than the latest timing identifier. At this time, it can be said that the identifier reset has occurred. Specifically, it can be divided into two situations: the message timing identifiers of the two candidate data messages are both reset. At this time, the situation is similar to the aforementioned ①, and the smaller candidate data message can be directly selected. If one is reset and the other is not reset, the reset candidate data message can be selected, where the timing identifier is recounted from 0 after the reset, and the message timing identifier of the reset candidate data message is smaller. In summary of the above two situations, the message timing identifiers of the two candidate data messages are both smaller than the latest timing identifier, and the candidate data message with the smaller message timing identifier can be directly selected as the target data message.

[0128] ③ One of the message timing identifiers of the two candidate data messages is smaller than the latest timing identifier, and the other is larger than the latest timing identifier. This also includes two situations: reset and non-reset. Among them, the non-reset situation has been discussed in the previous article. When reset, the candidate data message that is smaller than the latest timing identifier is theoretically the result after reset. Therefore, at this time, both candidate data messages are newer than the latest timing message, and the data message that has not been reset can be selected to avoid mutation. In summary of the above two situations, when one of the message timing identifiers of the two candidate data messages is smaller than the latest timing identifier, and the other is larger than the latest timing identifier, the candidate data message with the larger message timing identifier can be directly selected as the target data message.

[0129] After determining the target data message based on the above judgment steps, the target data message may be adjusted in consideration of the reset situation. That is, the following judgment logic may also be included:

[0130] S530. Determine whether the message sequence ID of the target data message is less than or equal to the latest sequence ID. If so, determine that the message sequence ID of the target data message is reset and adjust the message sequence ID of the target data message based on the timing threshold. Generally, the message sequence ID Sequence ID can be set to Sequence ID + 65535 (timing threshold). If not, maintain the message sequence ID.

[0131] Therefore, based on the adjusted message timing identifier, it can be determined whether the target data message is a newly added message. Specifically, it can be determined by the following judgment:

[0132] S540, determine whether the timing difference between the message timing identifier of the target data message and the latest timing identifier is less than or equal to the cache size threshold. If so, use the target data message and update the message reception record based on the target data message. If not, discard the target data message.

[0133] It should be noted that in order to avoid the impact of sequence reset on message reception records, when the message reception records are updated based on the target data message, if the message timing identifier of the target data message has been adjusted based on the aforementioned timing threshold, the value before adjustment is directly recorded in the record.

[0134] As an exemplary embodiment, a variable (such as NewSequence ID) can be rebuilt when executing the aforementioned S530 and S540. In the aforementioned S530, the New Sequence ID is assigned a value based on the reset situation (i.e., if it is not reset, NewSequence ID = Sequence ID; if it is reset, NewSequence ID = Sequence ID + timing threshold). In the aforementioned S540, the message timing identifier of the target data message involved in the judgment can be the New Sequence ID, and the message timing identifier involved in updating the record can be the Sequence ID.

[0135] Exemplary vehicle-side data receiving method:

[0136] To further illustrate the aforementioned data message receiving process, the present application also provides a data schematic diagram of a data message receiving process ( Figure 6 ).

[0137] With the aforementioned Figure 3 Similarly, the first controller can also have modules such as SWC (Software Component), RTE (Runtime Environment), COM (Communication Manager), PDUR (PDU Router), CDD (Complex Driver), SoAd (Socket Adaptor), EthIf (Ethernet Interface), and CanIf (CAN Interface), but Figure 6 The data transmission direction and Figure 3 The direction is opposite.

[0138] That is Figure 6 In the embodiment, two candidate data messages can be received through EthIf and CANIf respectively, and sent to CDD. The SoAd can change the data format (such as deserialization processing) during data transmission to determine the candidate data message.

[0139] When the CDD receives two candidate data messages, the aforementioned S250 to S280 and / or the aforementioned Figure 4 , 5 The target data message that can be adopted is determined by the relevant description of the PDUR, COM, RTE and other functional modules, and the target data message is sent to the appropriate corresponding data port SWC.

[0140] The present application also provides a vehicle, which includes the vehicle-side data transmission system provided by the present application. The vehicle provided by the present application can be a fully automatic driving vehicle or a semi-automatic driving vehicle. The specific model of the vehicle provided by the present application can be a car, a commercial vehicle, a truck, a bus, a tram, etc.

[0141] Based on the same technical concept, the present application also provides a vehicle, comprising: at least two controllers, a memory connected to the at least two controllers in communication, and a CAN bus and an Ethernet bus connected between the at least two controllers. The memory stores instructions that can be executed by the at least two controllers, and the instructions are executed when the at least two controllers transmit data, thereby realizing any of the above-mentioned vehicle-side data transmission methods.

[0142] Based on the same technical concept, the present application also provides a computer program product, which includes a computer program / instruction, and when the computer program / instruction processor is executed, it implements the vehicle-side data transmission method as described in any of the above embodiments.

[0143] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK).

[0144] The method in the present application can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the present application is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM or other programmable device.

[0145] The computer program or instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0146] It should be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0147] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0148] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A vehicle-side data transmission method, characterized in that: The method is applied to a first controller, the first controller is communicatively connected with a second controller via a CAN bus and an Ethernet bus, and the method comprises: Receiving at least one candidate data message sent by the second controller through the CAN bus and the Ethernet bus respectively, wherein the candidate data message includes a message type identifier, a message timing identifier, and a message content; Redundancy screening is performed on the at least one candidate data message based on the message type identifier and the message timing identifier to determine a target data message, wherein the message timing identifiers of target data messages with the same message type identifier are different from each other; Determining whether the target data message is a newly added message based on a message reception record, wherein the message reception record is used to record the latest data message identified by each message type; If so, the target data message is adopted, and the message reception record is updated based on the target data message.

2. The vehicle-side data transmission method according to claim 1, characterized in that: The redundancy screening of the at least one candidate data message based on the message type identifier and the message timing identifier to determine the target data message includes: Determine two candidate data packets with the same message type identifier from the at least one candidate data packet; Determine whether the message timing identifiers of the two candidate data messages are the same; If yes, determining a candidate data message from the two candidate data messages as the target data message; If not, based on the message type identifiers of the two candidate data messages, determine the latest timing identifier of the latest transmitted message corresponding to the message type identifier from the message reception record; based on the latest timing identifier, determine a candidate data message from the two candidate data messages and use it as the target data message.

3. The vehicle-side data transmission method according to claim 2, characterized in that: The message timing identifier is reset based on a timing threshold, and the determining a candidate data message from the two candidate data messages based on the latest timing identifier and using the candidate data message as the target data message includes: Determine whether the message timing identifiers of the two candidate data messages are both greater than the latest timing identifier or both less than the latest timing identifier; If yes, select the candidate data message with the smaller message timing identifier as the target data message; If not, select the candidate data message with the larger message timing identifier as the target data message.

4. The vehicle-side data transmission method according to claim 3, characterized in that: The method further comprises: In response to the message timing identifier of the target data message being less than or equal to the latest timing identifier, it is determined that the message timing identifier of the target data message is reset and the message timing identifier of the target data message is adjusted based on the timing threshold.

5. The vehicle-side data transmission method according to any one of claims 1 to 4, characterized in that: The receiving at least one candidate data message sent by the second controller through the CAN bus and the Ethernet bus respectively includes: During the cache time of the data collection cycle, the data message received through the CAN bus is cached in a first cache container, and the data message received through the Ethernet bus is cached in a second cache container; At the calling time of the data collection cycle, data messages are called from the first cache container and the second cache container and cached in the candidate queue.

6. The vehicle-side data transmission method according to any one of claims 1 to 4, characterized in that: The determining whether the target data message is a newly added message based on the message reception record includes: Determine a timing difference between a message timing identifier of the target data message and a latest timing identifier of a corresponding latest transmitted message; Determining that the timing difference is less than a cache size threshold; If yes, determining that the target data message is the newly added message; If not, it is determined that the target data message is not the newly added message and the target data message is discarded.

7. The vehicle-side data transmission method according to claim 1, characterized in that: The message reception record records each unmatched target data message through the message type identifier and the message timing identifier, and the determining whether the target data message is a newly added message based on the message reception record includes: Determining whether there is a matching message of the target data message in the message reception record based on the target data message, wherein the message type identifier and the message timing identifier of the matching message are consistent with those of the target data message; If not, determining that the target data message is the newly added message; If so, the matching message is deleted from the message reception record.

8. A vehicle-side data transmission method, characterized in that: The method is applied to a second controller, the second controller is communicatively connected to the first controller via a CAN bus and an Ethernet bus, and the method comprises: Determine the data type and data content of the data to be transmitted; Determine the timing identification of the data to be transmitted based on the data type of the data to be transmitted and the message sending record, wherein the message sending record is used to record the latest timing identification of each type of data; Determine the data message to be transmitted based on the data type, data type and timing identifier of the data to be transmitted; The data message to be transmitted is sent to the first controller via the CAN bus and the Ethernet bus respectively.

9. The vehicle-side data transmission method according to claim 8, characterized in that: The sending the data message to be transmitted to the first controller through the CAN bus and the Ethernet bus respectively includes: Copying the data message to be transmitted to the cache area of ​​the CAN bus and the cache area of ​​the Ethernet bus respectively; Performing data format conversion on the data message to be transmitted in the buffer area of ​​the Ethernet bus based on the data transmission type of the Ethernet bus, and determining the Ethernet transmission message; Sending the Ethernet transmission message to the first controller through an Ethernet switch based on the Ethernet bus; Based on the CAN bus, the data message to be transmitted in the cache area of ​​the CAN bus is sent to the first controller.

10. A vehicle-side data transmission method, characterized in that: Applied to a first controller and a second controller that are communicatively connected via a CAN bus and an Ethernet bus, the method comprises: The second controller determines the data type and data content of the data to be transmitted; The second controller determines the timing identifier of the data to be transmitted based on the data type of the data to be transmitted and the message sending record, wherein the message sending record is used to record the latest timing identifier of each type of data; The second controller determines a data message to be transmitted based on the data type, data type and timing identifier of the data to be transmitted; The second controller sends the data message to be transmitted to the first controller via the CAN bus and the Ethernet bus respectively; The first controller receives at least one candidate data message sent by the second controller through the CAN bus and the Ethernet bus respectively, wherein the candidate data message includes a message type identifier, a message timing identifier and a message content; Redundancy screening is performed on the at least one candidate data message based on the message type identifier and the message timing identifier to determine a target data message, wherein the message timing identifiers of target data messages with the same message type identifier are different from each other; The first controller determines whether the target data message is a newly added message based on the message reception record, wherein the message reception record is used to record the latest data message of each message type identifier; If so, the first controller adopts the target data message and updates the message reception record based on the target data message.

11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction processor is executed, it is used to implement the steps in the vehicle-side data transmission method as described in any one of claims 1-10.

12. A vehicle, characterized in that: The vehicle comprises: At least two controllers, a memory communicatively connected to the at least two controllers, and a CAN bus and an Ethernet bus connected between the at least two controllers; Among them, the memory stores instructions that can be executed by at least two controllers, and the instructions are executed when the at least two controllers transmit data, thereby implementing the vehicle-side data transmission method described in any one of claims 1-10.