In-vehicle data communication method, system and vehicle
By setting up a first -level cache and a second -level cache on the second communication side of the vehicle data communication system, and using the differential data synchronization method, the problem of low data transmission efficiency in traditional vehicle data communication systems and large resource consumption have been solved, and efficiently achieve efficient resources. Data access and management.
Patent Information
- Application Number
- CN202411259798.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-09-10
AI Technical Summary
In traditional vehicle data communication systems, MCU resources are limited, resulting in low data transmission efficiency, high resource consumption, and inconvenient data use.
Set up first -level cache and second -level cache on the second communication side to achieve rapid access and management of signal update data. Only transmitted data through differential data synchronization methods to reduce data transmission volume and system load.
Improved data access efficiency, optimized the use of system resources, reduced system load and bandwidth consumption, and ensured the accuracy and consistency of data.
Smart Images

Figure CN118802957B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of vehicle-mounted communication technology, and specifically relates to a vehicle-mounted data communication method, system and vehicle. Background Art
[0002] In traditional vehicle data communication systems, data communication between microcontroller units (MCU) and microprocessor units (MPU) is usually carried out using Ethernet, mainly using protocols such as Data Distribution Service (DDS), Scalable service-oriented middleware over IP (SOME / IP) or User Datagram Protocol (User Datagram Protocol) / (Transmission Control Protocol) for communication. Due to limited MCU resources, a large number of signals are usually packaged and transmitted to the MPU. However, this method has the following problems:
[0003] 1. Low data transmission efficiency: Even if only a small number of signal values change, the entire data packet needs to be transmitted, resulting in bandwidth waste and unnecessary delays.
[0004] 2. Large MCU resource consumption: The MCU needs to handle a large number of signal packaging and transmission operations, which increases the burden on the MCU and may affect the execution of its main functions.
[0005] 3. Inconvenient data use: The MPU-side application needs to parse the required signal from the complete data packet, which increases the complexity of data processing. Summary of the invention
[0006] The technical purpose of the present application is to provide a vehicle-mounted data communication method, system and vehicle to address the above technical problems of low data transmission efficiency and high communication resource consumption in traditional vehicle-mounted data communication systems.
[0007] In order to achieve the above technical objectives, this application adopts the following technical solutions.
[0008] In a first aspect, an embodiment of the present application provides a vehicle-mounted data communication method for implementing vehicle-mounted data communication between a first communication terminal and a second communication terminal, the vehicle-mounted data communication method comprising:
[0009] The second communication terminal is provided with a first-level cache, a second-level cache and an application program;
[0010] The first communication terminal obtains vehicle bus signal update data, and synchronously updates the signal update data to the first-level cache;
[0011] The first-level cache receives the signal update data, performs data update, and synchronously updates the signal update data to the second-level cache;
[0012] The first-level cache receives a data read instruction sent by the application, and returns the latest data to the application in response to the data read instruction;
[0013] The secondary cache receives a data write operation instruction or a control request instruction sent by the application, and sends the data write operation instruction or the control request instruction to the first communication end.
[0014] In some implementations, the first communication end is provided with a plurality of micro control units, each of which acquires signal update data and sends the signal update data to the first-level cache.
[0015] In some implementations, the first-level cache includes a plurality of first-level cache sub-units, each of the first-level cache sub-units is respectively disposed in an independent first-level microprocessing unit, and each of the microcontroller units corresponds one-to-one to each of the first-level cache sub-units.
[0016] In some implementations, the secondary cache is disposed in an independent secondary microprocessing unit.
[0017] In some implementations, synchronously updating the signal update data to the first-level cache includes:
[0018] The first communication terminal periodically detects changes in the vehicle bus signal, and when the signal changes, obtains the signal update data;
[0019] Packing the signal update data into a differential data packet of a set format, wherein the differential data packet includes a unique identifier of the changed signal and a new value of the changed signal;
[0020] The differential data packet is sent to the first-level cache, so that the first-level cache receives and parses the differential data packet and updates the corresponding signal value.
[0021] In some implementation modes, the first communication end sends the differential data packet to the first-level cache via Ethernet using any one of UDP, DDS or SOME / IP protocols.
[0022] In a second aspect, an embodiment of the present application provides a vehicle data communication system for implementing vehicle data communication between a first communication terminal and a second communication terminal, the vehicle data communication system comprising:
[0023] The first communication terminal is used to obtain vehicle bus signal update data and synchronously update the signal update data to the first-level cache;
[0024] The second communication terminal is provided with a first-level cache, a second-level cache and an application program;
[0025] The first-level cache is used to receive the signal update data, perform data update, and synchronously update the signal update data to the second-level cache;
[0026] The first-level cache is further used to receive a data read instruction sent by the application, and return the latest data to the application in response to the data read instruction;
[0027] The secondary cache is used to receive a data write operation instruction or a control request instruction sent by the application, and send the data write operation instruction or the control request instruction to the first communication end.
[0028] In some implementations, the first communication end is provided with a plurality of micro control units, each of which acquires signal update data and sends the signal update data to the first-level cache.
[0029] In some implementations, the first communication end sends the signal update data to the first-level cache via a traditional bus such as CAN.
[0030] In some implementations, the first-level cache includes a plurality of first-level cache sub-units, each of the first-level cache sub-units is respectively disposed in an independent first-level microprocessing unit, and each of the microcontroller units corresponds one-to-one to each of the first-level cache sub-units.
[0031] In a third aspect, an embodiment of the present application provides a vehicle, comprising a vehicle body and an on-board data communication system provided by any possible implementation scheme of the first aspect, wherein the on-board communication system is arranged in the vehicle body.
[0032] Compared with the prior art, the vehicle-mounted data communication method provided by the embodiment of the present application achieves beneficial technical effects: by setting a first-level cache and a second-level cache at the second communication end, fast access to signal update data is achieved, thereby improving data access efficiency; the second-level cache is not only used to store data, but also responsible for receiving and processing control request instructions. This division of labor and cooperation helps to optimize the utilization of system resources; the first-level cache focuses on providing fast data access, while the second-level cache is responsible for more complex data management and control functions, which is conducive to fast feedback and real-time processing of the vehicle-mounted system; the data synchronization mechanism between the first-level cache and the second-level cache ensures the accuracy and consistency of the data, and the differential data synchronization method only transmits changed data, significantly reducing the amount of data transmission, reducing the system load, and saving precious bandwidth resources.
[0033] The vehicle-mounted data communication system provided in the embodiment of the present application has the same technical effect as the vehicle-mounted data communication method provided in the above embodiment of the present application, and will not be described in detail. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings described herein are for explanation purposes only and are not intended to limit the scope of the present application in any way. In addition, the shapes and proportional dimensions of the components in the drawings are only for illustration purposes and are used to help understand the present application. They do not specifically limit the shapes and proportional dimensions of the components of the present application. Under the guidance of the present application, those skilled in the art can select various possible shapes and proportional dimensions to implement the present application according to specific circumstances. In the drawings:
[0035] Figure 1 This is a schematic diagram of the principle of implementing vehicle data communication in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of this application.
[0037] See also Figure 1 An in-vehicle data communication method provided by an embodiment of the present application can be applied on a vehicle to realize in-vehicle data communication between a first communication end and a second communication end. The method may include: the second communication end is provided with a first-level cache, a second-level cache and an application; the first communication end obtains the in-vehicle bus signal update data, and synchronously updates the signal update data to the first-level cache; the first-level cache receives the signal update data, performs data update, and synchronously updates the signal update data to the second-level cache; the first-level cache receives a data read instruction sent by the application, and returns the latest data to the application in response to the data read instruction; the second-level cache receives a data write operation instruction or a control request instruction sent by the application, and sends the data write operation instruction or the control request instruction to the first communication end.
[0038] In some embodiments, the first communication terminal is provided with a plurality of microcontroller units (MCUs), each of which obtains the signal update data and sends the signal update data to the first-level cache. The MCU may be a chip integrating functions such as a microprocessor core, a memory, and a peripheral interface.
[0039] In some embodiments, the first-level cache includes multiple first-level cache sub-units, each of which is respectively arranged in an independent first-level micro-processing unit (MPU), and each micro-control unit (MCU) can correspond one-to-one to each first-level cache sub-unit.
[0040] In some embodiments, multiple first-level cache sub-units such as Figure 1 MPU-2, MPU-3, and MPU-4 in the CPU. MPU can have strong processing and computing capabilities and is used to execute complex and diverse large programs. Each L1 cache subunit only needs to focus on synchronization with the L2 cache, without having to deal with synchronization conflicts between L1 cache subunits. This approach reduces complexity and reduces the overhead of handling conflicts.
[0041] In some embodiments, the L2 cache is provided in an independent L2 microprocessing unit (MPU), such as Figure 1 The MPU-1 in.
[0042] The applications running on the second communication terminal may include, but are not limited to: vehicle status monitoring software, driver assistance systems, fault diagnosis software, and remote control systems.
[0043] The embodiment of the present application deploys a hierarchical cache on the MPU, including a first-level cache and a second-level cache. The first-level cache is deployed on multiple MPUs (such as MPU-2, MPU-3 and MPU-4), mainly to implement data reading operations. The first communication end includes multiple MCUs, and each MCU sends the signal update data it is responsible for one-to-one to the corresponding first-level cache subunit.
[0044] In the embodiment, the application program may send a data read instruction to the first-level cache to directly obtain the latest status from the first-level cache.
[0045] In some embodiments, the application sends instructions to the secondary cache. The secondary cache is deployed in a single MPU (such as MPU-1), which mainly implements receiving data write operation instructions and is responsible for receiving control request instructions; the data write operation instruction is used to transfer data to a certain storage location; the control request instruction is used to request the execution of a certain control operation. All MCUs receive data write operation instructions or control request instructions issued from the secondary cache. After the MCU executes successfully, it updates the real latest status to the primary cache. Finally, the application can read the "real" status from the primary cache.
[0046] In some embodiments, the data structures of the first-level cache and the second-level cache need to consider efficient read and write operations and data consistency maintenance. As an example, a unique identifier ID or a key-value pair mapping from name to data can be used.
[0047] In some embodiments, in order to reduce the amount and frequency of data transmission, the system adopts a differential data synchronization method.
[0048] As an example, the first communication end uses a differential data synchronization method to synchronously update the signal update data to the first-level cache, including:
[0049] The first communication terminal periodically detects changes in the vehicle bus signal, and records the signal update data when the signal changes; packages all signal update data into a differential data packet in a set format, and the differential data packet includes a unique identifier of the changed signal and a new value of the changed signal; sends each differential data packet to the first-level cache, so that the first-level cache receives and parses the differential data packet and updates the corresponding signal value.
[0050] The data structure of the signal and the definition of the differential data packet can be as follows:
[0051] struct Signal {
[0052] uint16_t id;
[0053] uint8_t type;
[0054] union {
[0055] uint8_t uint8Val;
[0056] uint16_t uint16Val;
[0057] } value;
[0058] }.
[0059] Where id is the unique identifier of the signal, type is the data type, union{} defines other data types, and value is the signal value.
[0060] struct DiffPacket {
[0061] uint8_t numSignals;
[0062] Signal signals[];
[0063] }.
[0064] Where DiffPacket {} defines the differential data packet, numSignals is the number of changed signals, and signals[] is the array of changed signals.
[0065] The differential data synchronization method only transmits changed data, significantly reducing the amount of data transmission, lowering the system load, and saving valuable bandwidth resources, allowing the vehicle system to maintain good performance when facing more complex communication scenarios (such as increased number of signals and increased data update frequency).
[0066] By implementing the signal change detection logic on each MCU at the first communication end, the changes in the vehicle bus signal are checked regularly. When the signal value changes, the change information is recorded. Each MCU packages all the changed signals into a differential data packet, which contains the ID of the changed signal and the new value of the signal. The differential data packet can be represented in a compact binary format. Each MCU transmits the differential data packet to the first-level cache via Ethernet, which can be transmitted using UDP, DDS or SOME / IP. After receiving the differential data packet, the first-level cache parses the data packet and updates the corresponding signal value.
[0067] In some embodiments, a conventional end-to-end protection mechanism (End-to-End, E2E) is integrated to deal with errors or abnormal situations that may occur during data transmission or cache synchronization.
[0068] In the embodiment, the change signal in the first-level cache is synchronized to the second-level cache to ensure the data consistency of all caches in the system.
[0069] The differential data synchronization method can also be used to achieve data synchronization between the first-level cache and the second-level cache.
[0070] In the embodiment, data is synchronized between the first-level cache and the second-level cache regularly, and a reasonable synchronization interval is set, for example, once per second, and the specific interval is adjusted according to system requirements and performance test results. When the first-level cache changes, the second-level cache is immediately notified to synchronize, and combined with the differential data synchronization method, only the changed data is synchronized, and the changed data is packaged into a differential data packet in a set format, and the differential data packet is sent to the second-level cache, reducing the amount of synchronized data, reducing the processing burden of the MCU and MPU, and improving the overall system performance.
[0071] Optionally, the first-level cache can be event-driven, which can update data more timely and ensure data consistency. When the first-level cache receives a data packet, it will parse and compare it. If a change is found, it will trigger data synchronization with the second-level cache to ensure data consistency. The event-driven synchronization mechanism can respond to data changes in a timely manner, ensure the real-time nature of the data, and meet the real-time control requirements of the vehicle system.
[0072] Based on the same inventive concept as the above embodiment, the embodiment of the present application also provides a vehicle-mounted data communication system for implementing vehicle-mounted data communication between a first communication terminal and a second communication terminal, which can be seen in Figure 1The vehicle data communication system includes a first communication terminal and a second communication terminal, wherein the second communication terminal is provided with a first-level cache, a second-level cache and an application.
[0073] The first communication terminal is used to obtain the vehicle bus signal update data and synchronize the signal update data to the first-level cache; the first-level cache is used to receive the signal update data, perform data updates, and synchronize the signal update data to the second-level cache; the first-level cache is also used to receive data read instructions sent by the application, and in response to the data read instructions, return the latest data to the application.
[0074] The secondary cache is used to receive a data write operation instruction or a control request instruction sent by an application program, and send the data write operation instruction or the control request instruction to the first communication end.
[0075] In some embodiments, the first communication end is provided with a plurality of micro control units, each of which obtains the signal update data and sends the signal update data to the first-level cache.
[0076] The vehicle-mounted data communication system provided in the embodiment of the present application can implement the vehicle-mounted data communication method provided in the embodiment of the present application, but the vehicle-mounted data communication system provided in the present application includes but is not limited to the structure of the vehicle-mounted data communication system listed in the embodiment, and all structural deformations and replacements of the prior art made according to the principles of the present application are included in the protection scope of the present application.
[0077] In the vehicle data communication system provided in the embodiment of the present application, the first-level cache is distributedly deployed on multiple MPUs, which can easily expand the processing capacity of the system by increasing the reserved computing power of the MPU to meet the needs of more MCU access. As a central node, the second-level cache is responsible for data writing and control instruction issuance. Its functions are relatively independent and can improve performance by upgrading hardware or optimizing algorithms to meet the data synchronization needs of more MPUs. The system architecture and algorithm design are flexible and can be easily expanded to adapt to more MCUs, MPUs and more complex data communication scenarios, with good scalability.
[0078] This application adopts a layered cache architecture and read-write separation mechanism to flexibly adjust the cache level and read-write strategy to adapt to the requirements of data real-time and consistency in different application scenarios.
[0079] In one scenario of the embodiment, a smart car equipped with an advanced driver assistance system needs to process massive data from multiple sensors (cameras, radars, lidars, etc.) in real time and issue vehicle control instructions. Traditional vehicle-mounted data communication systems may cause delays due to low data transmission efficiency and limited MCU processing capabilities, affecting vehicle decision-making and control. However, by adopting the vehicle-mounted data communication method proposed in the embodiment of the present application, sensor data and control instructions can be efficiently transmitted between the MCU and the MPU by using layered caching and differential update technology. The first-level cache is distributed on multiple MPUs to achieve fast data reading, and the second-level cache centrally manages data writing and control instructions, effectively reducing communication delays; at the same time, the differential data synchronization mechanism only transmits changed data, greatly reducing the amount of data transmission. These measures effectively reduce the system load and ensure that the vehicle can operate efficiently and stably under complex road conditions.
[0080] The system can work on standard Ethernet communication protocols (UDP / TCP, DDS, SOME / IP, etc.), which is convenient for integration and interconnection with other vehicle systems to achieve more extensive data sharing and collaborative work.
[0081] An embodiment of the present application also provides a vehicle, including a vehicle body and the above-mentioned vehicle-mounted data communication system, wherein the vehicle-mounted communication system is arranged in the vehicle body.
[0082] The above is a detailed introduction to the in-vehicle data communication method, system and vehicle provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the concept of the present application and should not be understood as limiting the scope of protection of the present application.
Claims
1. A vehicle data communication method for realizing vehicle data communication between a first communication terminal and a second communication terminal, characterized in that: The vehicle data communication method comprises: the second communication end is provided with a first-level cache, a second-level cache and an application; the first communication end obtains vehicle bus signal update data, and synchronously updates the signal update data to the first-level cache; the first-level cache receives the signal update data, performs data update, and synchronously updates the signal update data to the second-level cache; the first-level cache receives a data read instruction sent by the application, and returns the latest data to the application in response to the data read instruction; the second-level cache receives a data write operation instruction or a control request instruction sent by the application, and sends the data write operation instruction or the control request instruction to the first communication end; Wherein, the first communication end is provided with a plurality of micro control units, each of which obtains signal update data respectively and sends the signal update data to the first-level cache; The first-level cache includes a plurality of first-level cache sub-units, each of which is respectively arranged in an independent first-level micro-processing unit, and each of the micro-control units corresponds to each of the first-level cache sub-units one by one; The secondary cache is arranged in an independent secondary microprocessing unit.
2. The vehicle-mounted data communication method according to claim 1, characterized in that: The signal update data is synchronously updated to the first-level cache, including: the first communication terminal periodically detects changes in the vehicle bus signal, and when the signal changes, obtains the signal update data; packages the signal update data into a differential data packet in a set format, the differential data packet includes a unique identifier of the changed signal and a new value of the changed signal; sends the differential data packet to the first-level cache, so that the first-level cache receives and parses the differential data packet and updates the corresponding signal value.
3. The vehicle-mounted data communication method according to claim 2, characterized in that: The first communication end sends the differential data packet to the first-level cache via Ethernet using any one of UDP, DDS or SOME / IP protocols.
4. A vehicle data communication system, used to implement vehicle data communication between a first communication terminal and a second communication terminal, characterized in that: The vehicle data communication system comprises: the first communication terminal is used to obtain vehicle bus signal update data, and synchronously update the signal update data to the first-level cache; the second communication terminal is provided with a first-level cache, a second-level cache and an application; the first-level cache is used to receive the signal update data, perform data update, and synchronously update the signal update data to the second-level cache; the first-level cache is also used to receive a data read instruction sent by the application, and in response to the data read instruction, return the latest data to the application; the second-level cache is used to receive a data write operation instruction or a control request instruction sent by the application, and send the data write operation instruction or the control request instruction to the first communication terminal; Wherein, the first communication end is provided with a plurality of micro control units, each of which obtains signal update data respectively and sends the signal update data to the first-level cache; The first-level cache includes a plurality of first-level cache sub-units, each of which is respectively arranged in an independent first-level micro-processing unit, and each of the micro-control units corresponds to each of the first-level cache sub-units one by one; The secondary cache is arranged in an independent secondary microprocessing unit.
5. A vehicle, characterized in that: It comprises a vehicle body and the in-vehicle data communication system as claimed in claim 4, wherein the in-vehicle data communication system is arranged in the vehicle body.
Citation Information
Patent Citations
Inter-core data transmission method, multi-core chip and machine readable storage medium
CN115481072A
Data processing method and equipment
CN116700881A