Communication method, apparatus and controller applied to vehicle

By replacing the UART serial port with the SPI bus in the cockpit system, and combining it with IO control and buffer module logic, the problem of insufficient UART serial port communication bandwidth is solved, achieving efficient data interaction and real-time response, and improving the communication efficiency and user experience of the cockpit entertainment system and vehicle control.

CN119892881BActive Publication Date: 2026-04-21CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING CHANGAN AUTOMOBILE CO LTD
Filing Date
2025-01-21
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The existing UART serial communication bandwidth is insufficient, which leads to communication bandwidth bottlenecks, data processing delays, and a decline in user experience in modern cockpit entertainment systems and vehicle control.

Method used

By replacing the UART serial port with the SPI bus, and introducing IO control and buffer module logic, the traditional SPI bus is transformed into a bidirectional communication bus with high real-time performance. Combined with dual buffer technology and additional I/O interfaces, efficient real-time communication between MCU, MPU and SoC is achieved.

Benefits of technology

It significantly improves the data interaction capability between the cockpit system and the whole vehicle, meets the communication requirements of high bandwidth and large data volume, reduces data processing latency, and enhances the system's real-time response capability and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892881B_ABST
    Figure CN119892881B_ABST
Patent Text Reader

Abstract

This application relates to a communication method, device, and controller for vehicles, specifically in the field of automotive parts technology. The method includes: the controller can trigger a synchronization process of business data upon reaching a preset first time interval. The controller can also execute its own business program upon reaching a second time interval, and retrieve synchronized and pre-stored business data from local storage for further processing. The second time interval is longer than the first time interval. This application improves data transmission and processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automotive parts technology, specifically to a communication method, device, and controller for use in vehicles. Background Technology

[0002] As the automotive industry continues to develop, the functions of cockpit entertainment systems are also evolving, gradually expanding from simple entertainment to overall vehicle control. This shift has spurred the development of various control functions, as well as non-user functions based on safety and after-sales service needs, placing higher demands on the data acquisition and processing capabilities of cockpit systems. Therefore, improving data transmission and processing efficiency has become an urgent problem to be solved. Summary of the Invention

[0003] This application provides a communication method, device, and controller for vehicles, which improves data transmission and processing efficiency.

[0004] In a first aspect, embodiments of this application provide a communication method applied to a vehicle, including: (feature portion).

[0005] During the first time interval, business data is synchronized with other controllers; and during the second time interval, the pre-stored synchronized business data is retrieved and business data is processed.

[0006] The second time interval is greater than the first time interval.

[0007] Secondly, embodiments of this application provide a communication device for use in a vehicle, comprising: (featured portion).

[0008] The synchronization module is used to synchronize business data with other controllers at the first time interval.

[0009] The processing module is used to retrieve the pre-stored business data after synchronization at the second time interval, and to perform business processing on the business data.

[0010] The second time interval is greater than the first time interval.

[0011] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0012] The memory stores computer-executed instructions;

[0013] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0015] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0016] The communication method, device, and controller for vehicles provided in this application trigger a synchronization process of service data when a preset first time interval is reached; when a second time interval is reached, the controller's own service program is executed, and the service program can retrieve synchronized and pre-stored service data from local storage for service processing. This makes the synchronization process of service data independent of the service processing process of service data, and achieves synchronization of service data through a smaller first time interval, thereby ensuring that the service has been synchronized when the service data is processed in the second time interval, thus improving the efficiency of data transmission and processing. Attached Figure Description

[0017] Figure 1 A flowchart illustrating the communication method for vehicles provided in this application. Figure 1 ;

[0018] Figure 2 Example illustration of the communication method for vehicles provided in this application Figure 1 ;

[0019] Figure 3 Signaling interaction for the communication method applied to vehicles provided in this application Figure 1 ;

[0020] Figure 4 A flowchart illustrating the communication method for vehicles provided in this application. Figure 2 ;

[0021] Figure 5 Signaling interaction for the communication method applied to vehicles provided in this application Figure 2 ;

[0022] Figure 6 Example illustration of the communication method for vehicles provided in this application Figure 2 ;

[0023] Figure 7 Signaling interaction for the communication method applied to vehicles provided in this application Figure 3 ;

[0024] Figure 8 A schematic diagram of the structure of the cache space provided in this application;

[0025] Figure 9 Signaling interaction for the communication method applied to vehicles provided in this application Figure 4 ;

[0026] Figure 10 Signaling interaction for the communication method applied to vehicles provided in this application Figure 5 ;

[0027] Figure 11 A flowchart illustrating the communication method for vehicles provided in this application. Figure 3 ;

[0028] Figure 12 The system architecture diagram provided in this application;

[0029] Figure 13 A waveform diagram of the over-response state based on SPI provided in this application;

[0030] Figure 14 A waveform diagram of the non-responsive state based on SPI provided in this application;

[0031] Figure 15 A waveform diagram of the SPI-based system under normal conditions provided in this application;

[0032] Figure 16 A schematic diagram of the structure of the communication device applied to a vehicle provided in this application;

[0033] Figure 17 A schematic diagram of the controller provided in this application. Detailed Implementation

[0034] The embodiments of this application will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be understood that the preferred embodiments are only for illustrating this application and are not intended to limit the scope of protection of this application.

[0035] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0036] With the continuous advancement of the automotive industry, the functional boundaries of cockpit entertainment systems are constantly expanding, evolving from simple entertainment to comprehensive vehicle control, and encompassing functions not directly facing users, such as safety monitoring and after-sales service. This shift has significantly increased the demand for data acquisition and processing capabilities in cockpit systems. However, the Universal Asynchronous Receiver / Transmitter (UART) serial port, widely used in the industry, is limited by its fixed communication bandwidth (115kbit / s), making it difficult to handle the high-bandwidth communication requirements of these new functions. This not only hinders the development of new functions but may also lead to inefficient vehicle control, frequent response delays, and other problems, severely weakening the user experience and negatively impacting brand image. Specifically, the challenges faced by UART serial ports, including communication bandwidth bottlenecks, data processing delays, limitations in functional expansion, and degraded user experience, have become key factors restricting the development of automotive intelligence.

[0037] To address the aforementioned issues, this application provides a vehicle-based communication method that employs dual-buffering technology and innovative approaches by adding extra input / output (I / O) interfaces. This method applies a Serial Peripheral Interface (SPI) bus with master-slave characteristics to the intelligent cockpit system, enabling efficient real-time communication between the microcontroller unit (MCU), microprocessor unit (MPU), and system-on-chip (SoC). This effectively solves the communication bandwidth bottleneck problem caused by the expansion of vehicle functions. This solution significantly improves the data interaction capabilities between the cockpit system and the vehicle, ensuring real-time data transmission.

[0038] Given that the traditional SPI bus, when used as a synchronous bus, is limited in certain complex scenarios by the clock and chip select lines controlled by the master controller, especially due to latency issues in the data flow from the controller to the master controller, this application innovatively introduces IO control and buffer module logic to transform the traditional SPI bus into a bidirectional communication bus with high real-time performance, thereby meeting the high-efficiency bidirectional communication requirements of intelligent cockpit systems. This application, by using the SPI bus to replace the UART serial port, successfully solves the problem of insufficient communication bandwidth faced by modern cockpit entertainment systems and vehicle control, significantly improving communication bandwidth, meeting the needs of large data volumes and high-frequency communication, effectively reducing data processing latency, and improving the system's real-time response capability. Furthermore, the implementation of this application provides strong support for the further expansion of cockpit entertainment systems and vehicle control functions, significantly improving the user experience by increasing data transmission speed and reducing latency.

[0039] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0040] Figure 1 A flowchart illustrating the communication method for vehicles provided in this application. Figure 1 The vehicle may include multiple microcontrollers, microprocessors, and system-on-a-chips that require communication. In this embodiment, the microcontrollers, microprocessors, and system-on-a-chips can be configured as a controller. Figure 1 As shown, taking a controller as an example, the method includes:

[0041] S101. During the first time interval, perform business data synchronization processing with other controllers.

[0042] In this embodiment, the controllers play a crucial role in the vehicle's execution process. Each controller not only needs to independently execute its own tasks but also needs to collaborate to complete operations at specific points in time. To ensure the efficiency of business execution and data synchronization, this embodiment can periodically perform business data synchronization processing between the controller and other controllers, using a first time interval as the period length. Specifically, the controller can trigger a business data synchronization process once the preset first time interval is reached. The execution of this process ensures that the controller holds the latest and most accurate copy of the business data from other controllers. Furthermore, the copy of the controller's business data can be held by other controllers.

[0043] In one example, the synchronization processing of the business data is triggered not only when the first time interval is reached, but also when the controller is synchronizing data with other controllers, in response to an exception handling signal during the data synchronization process, the next data synchronization process can be executed.

[0044] Specifically, during data synchronization, the controller can incorporate an exception handling mechanism to ensure data integrity and system robustness. When the data synchronization process encounters anomalies such as network latency, data inconsistency, or authentication failure, the controller will quickly respond to the exception handling signal issued by the synchronization process. Upon receiving the exception handling signal, the controller can execute corresponding processing according to a preset strategy. Optionally, the controller can assess the nature and severity of the exception. Optionally, if the controller determines that the current exception does not affect the synchronization operation, it can continue data synchronization. Alternatively, if the controller determines that the exception can be resolved through a simple retry, it can trigger and execute the next data synchronization process. This example improves the reliability and stability of data synchronization, reduces the need for manual intervention, and enhances system performance through this automated exception handling and retry mechanism. Furthermore, for severe exceptions that cannot be resolved through automatic retries, the controller can also record detailed error logs and trigger alarms to notify system administrators or relevant technical support teams for timely intervention and appropriate solutions.

[0045] In another example, the synchronization processing of this business data is triggered not only when the first time interval is reached, but also during the data synchronization process between the controller and other controllers. In response to receiving a data synchronization instruction, the controller can perform the next data synchronization process. This data synchronization instruction can be determined by the controller during the business processing based on the business procedure.

[0046] In one example, the controller can also determine whether the communication bus between itself and other controllers is busy before synchronizing business data with them. If the communication bus is busy, the controller can enter a waiting state. The controller can end the waiting state and begin synchronizing business data when the communication bus becomes idle.

[0047] Specifically, during the communication process, such as Figure 2As shown, the communication bus between this controller and other controllers may include a CS pin. The controller can determine whether the communication bus is busy by the level signal of this CS pin. Upon initiating the determination, the controller can first switch the CS pin to General Purpose Input / Output (GPIO) mode. In GPIO mode, the controller can obtain the level signal of the CS pin. The controller can determine whether the level signal is low. If it is, it indicates that the communication bus is idle, and the controller can directly switch the CS pin to SPI mode. Otherwise, if the CS pin level is high, it indicates that the communication bus is busy and transmitting information. In this case, the controller can enter a waiting state until the CS pin level is low. Once the CS pin level is low, it can be switched to SPI mode. After the CS pin is switched to SPI mode, the controller can write the receive (Rx) and transmit (Tx) signals to the SPI driver to enable the SPI driver to perform synchronization processing.

[0048] In this example, the busy state wait setting prevents unexpected communication after the controller pulls the I / O high, causing it to pull the I / O high again. If the controller pulls the I / O high twice, it could lead to communication failure. Furthermore, communication failures can accumulate until they become unrecoverable. Therefore, before pulling the I / O high to generate a high-level signal, the controller needs to determine if the SPI is already in a busy state. This busy state is the high-level state. If it is in a busy state, the controller needs to wait for the communication bus to return to an idle state before pulling the I / O high.

[0049] S102, and at the second time interval, retrieve the pre-stored business data after synchronization and perform business processing on the business data. The second time interval is longer than the first time interval.

[0050] In this embodiment, the controller can also execute its own business program when the second time interval arrives. This business program can retrieve synchronized and pre-stored business data from local storage. The business program can also perform business processing on this business data. Optionally, the business program can generate new business data during the business data processing. Optionally, the controller can store this business data and use it as business data to be synchronized. Optionally, the second time interval is longer than the first time interval. This setting ensures that the business data has been synchronized to the controller when the business program is executed.

[0051] It should be noted that the business data processing performed by the controller in step S102 and the business data synchronization processing performed by the controller in step S101 are parallel processes. That is, the execution of these two steps can be regarded as two independent processes.

[0052] In one example, the second time interval can also be less than or equal to the product of the first time interval and M, where M is the number of sub-receiving areas in the data receiving region. For example, as... Figure 8 As shown, when there are three sub-receiving areas, if the first time interval is greater than 15ms, then the second time interval can be less than or equal to 75ms. Since each synchronization typically updates only one sub-receiving area during data synchronization, the controller can use the data in one of the sub-receiving areas and release that sub-receiving area before performing the fourth synchronization. This allows the business data for the fourth synchronization to be stored without overwriting valid data.

[0053] The vehicle communication method provided in this application, by setting a reasonable first time interval, periodically synchronizes business data with other controllers to ensure data real-time performance and consistency, thereby improving data synchronization efficiency. Furthermore, by processing the synchronized business data after a longer second time interval, it enables rapid acquisition of business data during the processing, further improving processing efficiency.

[0054] Based on the above embodiments, the controller may include a driver module and a cache module. The driver module manages data transmission on the SPI interface. The cache module manages the storage space pairs within the controller. These storage spaces store business data to be synchronized and sent to other controllers, as well as business data synchronized from other controllers. Optionally, the controller may also include an application module. This application module may include business programs. The interaction process between the driver module, cache module, application module, and SPI can be as follows: Figure 3 As shown, it includes the following steps:

[0055] S201, Periodic Call.

[0056] In this step, the controller can periodically call the driver module according to the first time interval, so that the driver module can drive the communication bus to perform synchronization processing.

[0057] S202. When the condition is met, communication is triggered.

[0058] In this step, the controller can obtain the SPI driver status in real time through the driver module. The controller can then trigger the business program and SPI communication actions based on the current SPI driver status and triggering conditions. These triggering conditions may include reaching a pre-agreed communication cycle, which is the first time interval. Alternatively, the controller can also trigger SPI communication actions when a timeout exception occurs in the previous communication cycle. This SPI communication action is called synchronization processing.

[0059] S203. Obtain the location of the transmitted data and the location of the received data storage.

[0060] In this step, when a communication action is triggered, the SPI driver can obtain a first address from the cache module to store the business data to be synchronized. This first address is the data transmission location. The SPI driver can also obtain a second address from the cache module for the storage area used to store the received data. This second address is the data storage location for the received data.

[0061] S204. Provide the sending and receiving addresses.

[0062] In this step, the controller can obtain the network addresses of other controllers that send and receive service data from the SPI through the cache module.

[0063] S205, Complete one SPI data interaction.

[0064] In this step, the controller can complete an SPI data interaction with the driver module via SPI.

[0065] S206. Obtain received data.

[0066] In this step, the controller can periodically access the cache module according to a second time interval after the application module starts. To avoid anomalies where production exceeds consumption, this second time interval is typically three times the first time interval. Optionally, this three-times setting can be determined based on the number of sub-modules in the cache module. For example, if a business data request is made every 15ms in the first time interval, then business data synchronization is performed every 5ms. The application module can periodically attempt to retrieve received business data from the cache module.

[0067] S207. Return the received data.

[0068] In this step, the application module can parse the received data. The application module can then feed the parsed data back to the cache module.

[0069] S208. Complete business processing.

[0070] In this step, the application module can execute corresponding business logic to process the business data.

[0071] S209, Generate transmission data.

[0072] In this step, the controller can generate business data to be synchronized during business logic processing. The controller can then place this business data into the cache module.

[0073] S210, Complete the data loop.

[0074] In this step, the controller can trigger the communication action again to ensure that the business data to be synchronized can be sent out through the SPI bus, thereby realizing the closed-loop flow of data.

[0075] Figure 4 A flowchart illustrating the communication method for vehicles provided in this application. Figure 2 ,like Figure 4 As shown, in this embodiment... Figures 1 to 3 Based on the illustrated embodiment, during a single communication process, the two communicating parties can be referred to as the master controller and the slave controller, respectively. When the controller acts as a slave controller, the detailed steps for synchronizing business data between the controller and other controllers may include the following steps. Optionally, one implementation of this process may be as follows: Figure 5 As shown.

[0076] S301. At the initial moment after the first time interval, generate a first synchronization request and send the first synchronization request to other controllers.

[0077] In this embodiment, the controller can generate a first synchronization request at an initial moment after the first time interval. This first synchronization request is sent by the controller, acting as a slave controller, to other controllers, requesting synchronization processing. Optionally, the controller can send the first synchronization request via the communication bus between itself and other controllers. Specifically, the slave controller can pull a high I / O pin to notify the master controller to perform an SPI communication. Optionally, pulling the high I / O pin means generating a high-level signal. That is, the first synchronization request can optionally be a high-level signal.

[0078] In one example, the process of sending the first synchronization request may include the following steps:

[0079] Step 1: At the initial moment after the first time interval, generate a first high-level signal. This first high-level signal is a first synchronization request. Optionally, the generation of this first high-level signal can be achieved by pulling up an I / O pin.

[0080] Step 2: Send a first high-level signal to the other controllers via the first channel of the communication bus connecting them. Optionally, the first channel can be a channel of the communication bus. Optionally, the channel can be a pre-defined channel. For example, the channel can be channel 4.

[0081] In one example, before generating the first synchronization request, such as Figure 6 As shown, the controller can also perform the following steps to verify whether the current communication bus is busy. This verification can prevent data synchronization processing from failing to complete in the previous cycle. The specific process may include:

[0082] Step 1: Obtain the current level signal.

[0083] Step 2: If the current level signal is in a high level state, wait for the first time period and then reacquire the current level signal.

[0084] In this step, if the current level is already high, it indicates that the business data synchronization processing of the previous cycle did not complete as scheduled due to some unforeseen event. At this time, if... Figure 6 As shown by the dashed line, the controller needs additional time to wait for the previous cycle to complete successfully. This waiting time can be a first duration, which can be 4 seconds.

[0085] Step 3: If the newly acquired current level signal is in a high level state, then generate and send the first synchronization end signal.

[0086] In this step, after waiting for the first duration, the controller can acquire the current level signal again. If it is still in a high-level state, it means that the service data synchronization processing of the previous cycle was not completed within 4 seconds, and step S303 needs to be forcibly executed.

[0087] Step 4: If the current level signal is low, the controller can directly pull the IO high and execute SPI transmission, and then pull the IO low after completing the SPI transmission. After pulling the IO low, the controller can wait for the next cycle to start.

[0088] S302, Send the business data to be synchronized to other controllers.

[0089] In this embodiment, the controller can send the service data to be synchronized to other controllers. These other controllers are those connected to the current controller via a communication bus. Furthermore, these other controllers have already received the first synchronization request sent by the current controller. The controller can transmit the service data to be synchronized via SPI communication. Specifically, the master controller can perform a 4096-byte communication operation with the slave controller. This 4096 bytes can be the size of a sub-storage area in the cache module.

[0090] In one example, when a controller sends business data to be synchronized to other controllers, it may perform the following steps:

[0091] Step 1: Obtain the first address of the business data to be synchronized from the controller.

[0092] In this step, the controller, acting as a slave controller, needs to send the service data to be synchronized to the other controllers, which act as master controllers. Therefore, the controller first needs to obtain the first address of the data storage for the service data to be synchronized. Optionally, the data to be synchronized is data generated by the controller during the execution of service processing. Alternatively, the data to be synchronized can also be data obtained by the controller from sensors.

[0093] The controller includes a data transmission area, which in turn includes N sub-transmission areas. Each sub-transmission area is a sub-storage area. Optionally, the size of this storage area can be 4096 bytes. Optionally, the first address represents the address of the sub-transmission area where the business data to be synchronized is stored. Here, N is a positive integer. For example, N can be 3.

[0094] Optionally, the controller may include a caching module. This caching module provides interfaces for the driver module and application module to obtain business data. Specifically, the application module can obtain data cache space for sending data and received data for parsing from the caching module. The driver module obtains cache space filled with valid data and idle cache space without valid data from the caching module. Optionally, this process can be as follows: Figure 7 As shown.

[0095] Optionally, the cache space of this cache module can be specifically divided into two parts, one for receiving data and the other for sending data. Each part consists of three 4096-byte spaces. A total of 24kB of space is consumed for single-channel SPI processing. This cache space can be configured as follows: Figure 8 As shown.

[0096] Step 2: Send the business data to be synchronized corresponding to the first address to other controllers.

[0097] In this step, after determining the first address, the controller can send the service data corresponding to that first address to other controllers to achieve synchronization of the service data to be synchronized. Optionally, when the first address is a sub-sending area, the controller can send the entire sub-sending area to other controllers.

[0098] Each sub-sending or sub-receiving area is initially designated as idle. During operation, the switching between idle and busy states serves as a buffer. This switching is implemented using two singly linked lists. When synchronization is required, the controller can attach the currently read / written storage area to the corresponding linked list for subsequent synchronization processing. When reading data from this storage area, a first-in-first-out (FIFO) rule is followed to ensure the safety of communication timing. Optionally, during this read / write process, the data output process can be as follows... Figure 9 As shown, the data writing process can be as follows: Figure 10 As shown.

[0099] Optionally, to enhance real-time performance, sub-sending areas should not only transmit data when they are full. If valid data exists in the currently read / written sub-sending area, and no other sub-sending areas have valid data, the controller can immediately set the currently read / written sub-sending area to a busy state and perform synchronization processing, sending the service data of that sub-sending area to other controllers if required by the communication management module. This step ensures that existing data is sent out immediately, avoiding poor real-time performance due to delays.

[0100] S303. After sending the service data to be synchronized to other controllers, a first synchronization end signal is generated and sent to other controllers. The first synchronization end signal is a low-level signal.

[0101] In this embodiment, the controller can generate a first synchronization end signal after completing the transmission of the data to be synchronized. The controller can send this first synchronization end signal to the other controllers that have completed synchronization. The first synchronization end signal can be a low-level signal. Specifically, after completing SPI communication, the slave controller can pull the IO low to complete one cycle of communication. Optionally, in the subsequent time, the slave controller can execute the above three steps again after 15ms to complete the synchronization of service data again, forming a stable periodic communication.

[0102] Optionally, the generation of the first synchronization end signal is equivalent to an interrupt upon completion of the SPI transmission, and the I / O is pulled low within the interrupt. If the current interrupt type is successful transmission, the controller needs to additionally notify the buffer module to switch over. Otherwise, if the transmission fails, the controller needs to suppress the switching action to ensure data security.

[0103] The communication method for vehicles provided in this application allows the controller to generate a first synchronization request at an initial moment after a first time interval. This first synchronization request is sent by the controller (as a slave controller) to other controllers, requesting synchronization processing. The controller can send the service data to be synchronized to other controllers. After completing the transmission of the data to be synchronized, the controller can generate a first synchronization end signal. The controller can then send this first synchronization end signal to the other controllers that have completed synchronization. This application, by periodically synchronizing the service data to be synchronized to other controllers according to a first time interval, isolates the data synchronization process from the service processing process, thereby improving data synchronization efficiency.

[0104] Figure 11 A flowchart illustrating the communication method for vehicles provided in this application. Figure 3 ,like Figure 11 As shown, in this embodiment... Figures 1 to 10 Based on the illustrated embodiment, when the controller acts as the master controller, the detailed steps for synchronizing business data between the controller and other controllers may include:

[0105] S401. In response to receiving a second synchronization request sent by another controller at an initial moment after a first time interval, receive the service data to be synchronized sent by the other controller.

[0106] In this embodiment, other controllers may also have a first time interval. Furthermore, other controllers may send a second synchronization request at an initial time after the first time interval. This second synchronization request differs from the first synchronization request only in the sending controller. The controller can accept the second synchronization request sent by other controllers. These other controllers can be connected to the controller via a communication bus. Upon receiving the second synchronization request from other controllers, the controller can communicate via SPI with them to obtain the service data to be synchronized.

[0107] S402, Store business data to be synchronized.

[0108] In this embodiment, after receiving service data to be synchronized from other controllers, the controller can store the service data in the storage space. Optionally, the controller can obtain a second address for storing the service data to be synchronized. The controller can store the received service data to be synchronized from other controllers in the storage area corresponding to the second address. Optionally, the controller includes, for example, Figure 8 The data receiving area is shown. This data receiving area includes M sub-receiving areas, where M is a positive integer. For example, M can be 3. Optionally, the setting of the value of M is not related to the setting of the value of N. Optionally, to improve the utilization of storage space, the value of M can be the same as the value of N. Optionally, the second address represents the address of the sub-receiving area used to store the received business data to be synchronized. Optionally, the size of the sub-receiving area can be 4096. That is, the size of the sub-receiving area is the same as the size of the sub-transmitting area. During this data transmission, the controller can directly store the entire received sub-transmitting area into a sub-receiving area.

[0109] The communication method for vehicles provided in this application allows the controller to accept a second synchronization request sent by other controllers. Upon receiving the second synchronization request, the controller can communicate via SPI with other controllers to obtain service data to be synchronized from the other controllers. After obtaining the service data to be synchronized from other controllers, the controller can store the service data in storage space. This application improves data synchronization efficiency by periodically obtaining the service data to be synchronized from other controllers according to a first time interval, thus isolating the data synchronization process from the service processing process.

[0110] Based on the above embodiments, such as Figure 12As shown, the intelligent cockpit system of this vehicle may include several parts: an application module, a driver module, a cache module, and an SPI bus. The application module may include business programs responsible for handling various business requirements. The driver module is used to schedule the SPI driver, trigger communication, handle exceptions, and implement communication management. The cache module is used to implement cache management, optimize data access efficiency, and interact with data via the SPI bus. The SPI bus is the data transmission channel. The application module can generate data consumption requirements through business programs. The application module can consume business data from the cache module. The application module can obtain the business data to be parsed from the cache module and generate business data to be synchronized and send it to the cache module. The driver module can monitor the communication status in real time and transmit data with other system components via the SPI bus. The cache module connects the driver and the application, acting as a temporary data storage between them to achieve peak-valley smoothing. This application, through this architecture, ensures that the system meets real-time requirements while significantly improving the throughput of data interaction, providing an efficient communication and data management solution for the intelligent cockpit system.

[0111] Based on the above embodiments, the waveform diagram of the overresponse state based on SPI can be as follows: Figure 13 As shown, when the INT signal of channel 4 is pulled high, it marks the start of a data synchronization process in the current SPI communication. Subsequently, the chip select signal (CS) of channel 1 is pulled low, and the SPI master immediately initiates data transmission with the slave. It should be clarified that in this embodiment, the roles of master and slave are only used to distinguish the two controllers connected to the SPI bus during a specific data transmission process. These two controllers can flexibly switch between master and slave roles in different data transmission processes.

[0112] Meanwhile, the clock (CLK) of channel 0 begins generating waveforms to transmit data. Once CLK of channel 0 has completed outputting 4096 bytes of waveform data within a memory area, it stops generating waveforms, marking the completion of the current data transmission. Subsequently, the CS signal of channel 1 goes high, and the SPI bus enters an idle state. After the slave device successfully receives the complete 4096 bytes of data, the INT signal of channel 4 is pulled low, indicating that the slave device has also entered an idle state. After a 15-millisecond interval, the system will initiate another data exchange process.

[0113] However, the current system suffers from a host-side "over-response" problem. Specifically, this manifests as multiple 4096-byte clock waveforms being generated within a single cycle. This "over-response" phenomenon can disrupt the rhythm of the INT signal and SPI communication, leading to prolonged communication failures. To address this issue, this application adds CS signal detection logic to the system. In the event of "over-response," this application delays the timing of the INT signal going high on channel 4 to ensure that even after "over-response," the next communication can proceed normally, thereby improving system stability and reliability.

[0114] Another waveform diagram of the non-responsive state based on SPI can be shown as follows: Figure 14 As shown, when the INT signal of channel 4 is pulled high, it sends a signal to the SPI master requesting a data exchange. However, for some reason, the master does not respond to the INT signal. If the INT signal remains high for more than 3.75 seconds, the system will trigger a timeout mechanism. Subsequently, the system will pull the INT signal high again and attempt to establish a communication connection again until communication is restored. This mechanism ensures that the system can continuously attempt to restore communication even if the master does not respond, improving the reliability and stability of the system.

[0115] Based on the above embodiments, the waveform diagram of the normal state of SPI can be as follows: Figure 15 As shown.

[0116] Figure 16 A schematic diagram of the structure of the communication device applied to a vehicle provided in this application is shown below. Figure 16 As shown, the communication device 500 for vehicles provided in this embodiment includes:

[0117] Synchronization module 501 is used to synchronize business data with other controllers during a first time interval.

[0118] The processing module 502 is used to retrieve the pre-stored business data after synchronization at the second time interval and perform business processing on the business data.

[0119] The second time interval is greater than the first time interval.

[0120] Optionally, the synchronization module 501 is used for:

[0121] At the initial moment after the first time interval, a first synchronization request is generated and sent to other controllers.

[0122] Send the business data to be synchronized to other controllers.

[0123] Optionally, the synchronization module 501 is used for:

[0124] At the initial moment after the first time interval, a first high-level signal is generated. This first high-level signal is a first synchronization request.

[0125] A first high-level signal is sent to other controllers via the first channel in the communication bus that connects them.

[0126] Optionally, the synchronization module 501 is used for:

[0127] Obtain the first address of the business data to be synchronized from the controller.

[0128] Send the business data to be synchronized corresponding to the first address to other controllers.

[0129] Optionally, the controller includes a data transmission area, which in turn includes N sub-transmission areas. The first address represents the address of the sub-transmission area where the service data to be synchronized is stored. Here, N is a positive integer.

[0130] Optionally, the synchronization module 501 is used for:

[0131] After sending the service data to be synchronized to other controllers, a first synchronization end signal is generated and sent to the other controllers. The first synchronization end signal is a low-level signal.

[0132] Optionally, the synchronization module 501 is used for:

[0133] Get the current level signal.

[0134] If the current level signal is in a high level state, wait for the first time period and then reacquire the current level signal.

[0135] If the reacquired current level signal is in a high-level state, a first synchronization end signal is generated and sent.

[0136] Optionally, the synchronization module 501 is used for:

[0137] In response to receiving a second synchronization request sent by another controller at an initial moment after a first time interval, the system receives the service data to be synchronized sent by the other controller.

[0138] Store business data to be synchronized.

[0139] Optionally, the synchronization module 501 is used for:

[0140] Obtain the second address from the controller for storing the business data to be synchronized.

[0141] The business data to be synchronized sent by other controllers is stored in the storage area corresponding to the second address.

[0142] Optionally, the controller includes a data receiving area, which in turn includes M sub-receiving areas. The second address represents the address of the sub-receiving area used to store the received service data to be synchronized. Here, M is a positive integer.

[0143] Optionally, the second time interval is less than or equal to the product of the first time interval and M, where M is the number of sub-receiving areas in the data receiving area.

[0144] Optionally, the synchronization module 501 is used for:

[0145] During data synchronization with other controllers, in response to an exception signal during the data synchronization process, the next data synchronization process is executed.

[0146] Optionally, the synchronization module 501 is used for:

[0147] During data synchronization with other controllers, in response to receiving a data synchronization instruction, the next data synchronization process is executed.

[0148] Optionally, the synchronization module 501 is used for:

[0149] If the communication bus between the controller and other controllers is busy, it enters a waiting state until the communication bus becomes idle.

[0150] The communication device for vehicles provided in this embodiment can execute the methods provided in the above-described method embodiments. Its implementation principle and technical effects are similar, and will not be described in detail here.

[0151] Figure 17 This is a schematic diagram of the controller provided in this application. Figure 17 As shown, the controller 600 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the device 60 also includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus 604.

[0152] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the above-described method.

[0153] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0154] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0155] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0156] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0157] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0158] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0159] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0160] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0161] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0162] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0163] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0164] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0165] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0166] Finally, it should be noted that other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and alterations may be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A communication method applied to vehicles, characterized in that, Applied to a controller, the controller includes a data receiving area, the data receiving area includes M sub-receiving areas; The second address represents the address of the sub-receiving area used to store the received service data to be synchronized; where M is a positive integer; the method includes: During the first time interval, business data is synchronized with other controllers; and during the second time interval, the pre-stored synchronized business data is retrieved and business data is processed. Wherein, the second time interval is greater than the first time interval; the second time interval is less than or equal to the product of the first time interval and M; and M is the number of sub-receiving areas in the data receiving area; During the first time interval, business data synchronization with other controllers is performed, including: In response to receiving a second synchronization request sent by the other controller at an initial time after the first time interval, the system receives the service data to be synchronized sent by the other controller. Obtain a second address from the controller for storing the service data to be synchronized; store the service data to be synchronized received from the other controller into the storage area corresponding to the second address.

2. The method according to claim 1, characterized in that, During the first time interval, business data synchronization is performed with other controllers, including: At an initial moment after the first time interval, a first synchronization request is generated and sent to the other controllers; The business data to be synchronized is sent to the other controllers.

3. The method according to claim 2, characterized in that, At an initial moment after the first time interval, a first synchronization request is generated and sent to the other controllers, including: At an initial moment after the first time interval, a first high-level signal is generated; wherein, the first high-level signal is the first synchronization request; The first high-level signal is sent to the other controllers via a first channel in the communication bus that connects them.

4. The method according to claim 2, characterized in that, Sending the business data to be synchronized to the other controllers, including: Obtain the first address of the business data to be synchronized from the controller; The business data to be synchronized corresponding to the first address is sent to the other controllers.

5. The method according to claim 4, characterized in that, The controller includes a data transmission area, which includes N sub-transmission areas; the first address represents the address of the sub-transmission area where the service data to be synchronized is stored; where N is a positive integer.

6. The method according to claim 2, characterized in that, The method further includes: After sending the service data to be synchronized to the other controllers, a first synchronization end signal is generated and sent to the other controllers; the first synchronization end signal is a low-level signal.

7. The method according to claim 2, characterized in that, Before generating the first synchronization request, the method further includes: Get the current level signal; If the current level signal is in a high level state, then wait for a first time period and then reacquire the current level signal; If the reacquired current level signal is in a high level state, a first synchronization end signal is generated and sent.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: During the data synchronization process with other controllers, in response to an exception handling signal during the data synchronization process, the next data synchronization process is executed.

9. The method according to any one of claims 1-7, characterized in that, The method further includes: During the data synchronization process with other controllers, in response to receiving a data synchronization instruction, the next data synchronization process is executed.

10. The method according to any one of claims 1-7, characterized in that, Before synchronizing business data with other controllers, the process also includes: If the communication bus between the controller and the other controllers is busy, it enters a waiting state until the communication bus returns to an idle state.

11. A communication device for use in a vehicle, characterized in that, Applied to a controller, the controller includes a data receiving area, the data receiving area includes M sub-receiving areas; The second address represents the address of the sub-receiving area used to store the received service data to be synchronized; wherein M is a positive integer; the apparatus includes: The synchronization module is used to synchronize business data with other controllers at the first time interval. The processing module is used to retrieve the pre-stored business data after synchronization at the second time interval, and to perform business processing on the business data. Wherein, the second time interval is greater than the first time interval; the second time interval is less than or equal to the product of the first time interval and M; and M is the number of sub-receiving areas in the data receiving area; The synchronization module is used for: In response to receiving a second synchronization request sent by the other controller at an initial time after the first time interval, the system receives the service data to be synchronized sent by the other controller. Obtain a second address from the controller for storing the business data to be synchronized; The received business data to be synchronized sent by the other controllers is stored in the storage area corresponding to the second address.

12. A controller, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-10.

14. A computer program product comprising a computer program that, when executed by a processor, implements the method of any one of claims 1-10.

Citation Information

Patent Citations

  • Data synchronization processing method, device, equipment, medium and program

    CN114138805A

  • Whole vehicle communication method and system based on asymmetric memory synchronization and vehicle

    CN118802976A