Communication method and device applied to vehicle and controller

By applying double caching technology and SPI bus in the car cockpit entertainment system, the problems of insufficient communication bandwidth and data processing delay in the cockpit system and vehicle control system are solved, efficient data interaction and real-time communication are achieved, and user experience is improved.

CN119892881AActive Publication Date: 2025-04-25CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510095205.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-04-25
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

Existing car cockpit entertainment systems and vehicle control systems face problems such as insufficient communication bandwidth, data processing delays and user experience, especially in the case of increased demand for functional expansion and high-bandwidth communication.

Method used

Using dual cache technology and innovative means of adding additional input/output interfaces, a serial peripheral interface (SPI) bus with master-slave characteristics is applied to smart cockpit systems to achieve efficient real-time communication between MCU, MPU and SoC.

Benefits of technology

It significantly improves the data interaction capability between the cockpit system and the entire vehicle, ensures real-time data transmission, solves the problem of insufficient communication bandwidth, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892881A_ABST
    Figure CN119892881A_ABST
Patent Text Reader

Abstract

The invention relates to a communication method and device applied to a vehicle and a controller, which are applied to the technical field of automobile accessories, and comprises the following steps: controlling to trigger synchronous processing of service data once when a preset first time interval is reached. The controller can also execute the business program of the controller itself when the second time interval is reached, and can call the business data which is subjected to synchronous processing and pre-stored from the local storage through the business program for business processing. Wherein the second time interval is greater than the first time interval. According to the invention, the data transmission and processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of automobile accessories, and in particular to a communication method, device and controller applied to a vehicle. Background Art

[0002] With the continuous development of the automotive industry, the functions of cockpit entertainment systems are also evolving, gradually expanding from simple entertainment functions to vehicle control. This transformation has spawned a variety of control functions, as well as non-user functions based on safety and after-sales service needs, which has put forward higher requirements on the data collection and processing capabilities of the cockpit system. Therefore, how to improve the efficiency of data transmission and processing has become an urgent problem to be solved. Summary of the invention

[0003] The embodiments of the present application provide a communication method, device and controller applied to a vehicle, so as to achieve the effect of improving data transmission and processing efficiency.

[0004] In a first aspect, an embodiment of the present application provides a communication method applied to a vehicle, including: (characteristic part).

[0005] When a first time interval is reached, synchronous processing of business data is performed with other controllers; and when a second time interval is reached, business data pre-stored after synchronization is retrieved, and business processing is performed on the business data;

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

[0007] In a second aspect, an embodiment of the present application provides a communication device applied to a vehicle, including: (characteristic part).

[0008] A synchronization module, used for performing synchronization processing of business data with other controllers at intervals of a first time interval;

[0009] A processing module, used for retrieving the pre-stored business data after synchronization at a second time interval, and performing business processing on the business data;

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

[0011] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;

[0012] The memory stores computer-executable instructions;

[0013] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.

[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0016] The communication method, device and controller applied to vehicles provided in the embodiments of the present application trigger a synchronization process of business data when a preset first time interval is reached; when a second time interval is reached, the business program of the controller itself is executed, and the business program can retrieve the synchronized and pre-stored business data from the local storage for business processing, so that the synchronization process of the business data and the business processing process of the business data are independent of each other, and the synchronization of the business data is achieved through a smaller first time interval, thereby ensuring that when the business data is processed at the second time interval, the business has completed synchronization, thereby achieving the effect of improving data transmission and processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flow chart of the communication method for a vehicle provided in this application Figure 1 ;

[0018] Figure 2 An example of a communication method for a vehicle provided in this application is shown in FIG. Figure 1 ;

[0019] Figure 3 Signaling interaction for the communication method applied to the vehicle provided by the present application Figure 1 ;

[0020] Figure 4 A flow chart of the communication method for a vehicle provided in this application Figure 2 ;

[0021] Figure 5 Signaling interaction for the communication method applied to the vehicle provided by the present application Figure 2 ;

[0022] Figure 6 An example of a communication method for a vehicle provided in this application is shown in FIG. Figure 2 ;

[0023] Figure 7 Signaling interaction for the communication method applied to the vehicle provided by the present application Figure 3 ;

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

[0025] Fig. 9 Signaling interaction for the communication method applied to the vehicle provided by the present application Figure 4 ;

[0026] Fig.10 Signaling interaction for the communication method applied to the vehicle provided by the present application Figure 5 ;

[0027] Fig.11 A flow chart of the communication method for a vehicle provided in this application Figure 3 ;

[0028] Fig.12 A schematic diagram of the system structure provided for this application;

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

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

[0031] Fig.15 A schematic diagram of the waveform in a normal state based on SPI provided in this application;

[0032] Fig.16 A schematic diagram of the structure of a communication device applied to a vehicle provided by the present application;

[0033] Fig.17 A schematic diagram of the structure of the controller provided in this application. DETAILED DESCRIPTION

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

[0035] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0036] With the continuous progress of the automotive industry, the functional boundaries of the cockpit entertainment system are constantly expanding, gradually integrating from a single entertainment enjoyment to the comprehensive control of the whole vehicle, and covering non-directly user-oriented functions such as safety monitoring and after-sales service. This transformation has greatly increased the demand for cockpit system data collection and processing capabilities. However, the Universal Asynchronous Receiver / Transmitter (UART) serial port, which is widely used in the industry, is limited by its fixed communication bandwidth (115kbit / s), and it is difficult to carry the high-bandwidth communication needs of these new functions. This not only hinders the development of new functions, but may also lead to frequent problems such as low vehicle control efficiency and response delays, which seriously weakens the user experience and thus has an adverse impact on the brand image. Specifically, the challenges faced by the UART serial port, such as communication bandwidth bottlenecks, data processing delays, functional expansion limitations, and reduced user experience, have become key factors restricting the development of automotive intelligence.

[0037] In order to solve the above problems, the communication method applied to vehicles provided in this application adopts the innovative means of double buffer technology and adding additional input / output (I / O) interfaces, and applies the serial peripheral interface (SPI) bus with master-slave characteristics to the intelligent cockpit system, realizing efficient real-time communication between the microcontroller unit (MCU), microprocessor unit (MPU), and system-on-chip (SoC), effectively solving the communication bandwidth bottleneck problem caused by the expansion of vehicle functions. This solution not only greatly improves the data interaction capability between the cockpit system and the vehicle, but also ensures the real-time performance of data transmission.

[0038] In view of the fact that when the traditional SPI bus is used as a synchronous bus, its clock and chip select lines controlled by the main controller limit its application in certain complex scenarios, especially the data flow from the controller to the main controller has a delay problem. To this end, the present application innovatively introduces the IO control and cache module logic, transforming the traditional SPI bus into a two-way communication bus with high real-time performance, thereby meeting the needs of the intelligent cockpit system for efficient two-way communication. The implementation of this application successfully solves the problem of insufficient communication bandwidth faced by modern cockpit entertainment systems and vehicle control by adopting the technical means of replacing the UART serial port with the SPI bus, significantly improves the communication bandwidth, meets the needs of large data volumes and high-frequency communications, effectively reduces data processing delays, and improves the real-time response capabilities of the system. In addition, the implementation of the application provides strong support for the further expansion of the cockpit entertainment system and vehicle control functions, and significantly improves the user experience by increasing data transmission speed and reducing delays.

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

[0040] Figure 1 A flow chart of the communication method for a vehicle provided in this application Figure 1 The vehicle may include multiple micro control units, micro processing units, and system-level chips, and there is a need for communication between them. In this embodiment, the micro control unit, micro processing unit, and system-level chip can be a controller. Figure 1 As shown, taking a controller as an example, the method includes:

[0041] S101. Performing synchronization processing of service data with other controllers at a first time interval.

[0042] In this embodiment, the controller plays a vital role in the execution process of the vehicle. Each controller not only needs to independently perform its own tasks, but also needs to work together to complete the task at a specific time point. In order to ensure the execution efficiency of the business and the synchronization efficiency of the data, this embodiment can use the first time interval as the cycle length to periodically perform the synchronization of business data between the controller and other controllers. Specifically, the control can trigger the synchronization of business data once when the preset first time interval is reached. The execution of this process can ensure that the controller can hold the latest and most accurate copies of business data in other controllers. And, the business data copies of the business data of the controller can be held by other controllers.

[0043] In one example, in addition to being triggered when the first time interval is reached, the synchronization processing of the business data can also be performed during the data synchronization processing between the controller and other controllers in response to an exception processing signal in the data synchronization process to perform the next data synchronization processing.

[0044] Specifically, when the controller performs data synchronization processing, in order to ensure the integrity of the data and the robustness of the system, an exception handling mechanism may also be provided inside the controller. When the data synchronization process encounters abnormal situations such as network delay, data inconsistency, and permission verification failure, the controller will quickly respond to the exception handling signal issued by the synchronization process. The controller can perform corresponding processing according to a preset strategy when receiving the exception handling signal. Optionally, the controller can evaluate the nature and severity of the exception. Optionally, when the controller determines that the current exception does not affect the synchronization operation, the controller can continue to perform data synchronization. Alternatively, when the controller determines that the exception can be resolved by a simple retry, the controller can trigger and execute the next data synchronization processing. This example can improve the reliability and stability of data synchronization through the automated exception handling and retry mechanism, reduce the need for manual intervention, and improve system performance. In addition, for serious exceptions that cannot be resolved by automatic retry, the controller can also record detailed error logs and trigger alarm notifications to the system administrator or relevant technical support team to facilitate timely intervention and take corresponding solutions.

[0045] In another example, in addition to being triggered when the first time interval is reached, the synchronization of the business data can also be triggered during the data synchronization process between the controller and other controllers, in response to receiving a data synchronization indication, to perform the next data synchronization process. The data synchronization indication can be determined by the controller during the business processing according to the business program.

[0046] In one example, the controller may also determine whether the communication bus between the controller and the other controller is in a busy state before performing synchronization processing of business data with other controllers. If the communication bus between the controller and the other controller is in a busy state, the controller may enter a waiting state. The controller may end the waiting state when the communication bus returns to an idle state and start to perform synchronization processing of business data.

[0047] Specifically, during the communication process, such as Figure 2As shown, the communication bus between the controller and other controllers may include a CS pin. The controller may determine whether the communication bus is in a busy state through the level signal of the CS pin. When starting to judge, the controller may first switch the CS pin to the general purpose input / output (GPIO) mode. The controller may obtain the level signal of the CS pin in the GPIO mode. The controller may determine whether the level signal is a low level signal. If so, it means that the communication bus is in an idle state, and the controller may directly switch the CS pin to the SPI mode. Otherwise, if the level signal of the CS pin is at a high level, it means that the communication bus is in a busy state and is transmitting information. At this time, the controller may enter a waiting state until the level signal of the CS pin is at a low level. When the level signal of the CS pin is at a low level, the CS pin may be switched to the SPI mode. When the CS pin is switched to the SPI mode, the controller may write reception (Rx) and transmission (Tx) to the SPI driver so that the SPI driver performs synchronization processing.

[0048] In this example, the waiting setting of the busy state can prevent the controller from unexpected communication after pulling up IO to a high level, causing IO to be pulled up again. If the controller pulls up IO twice, it may cause communication failure. Even more, communication failures may accumulate multiple times until an unrecoverable problem occurs. Therefore, before pulling up IO to generate a high-level signal, the controller needs to determine whether the SPI is already in a busy state. The busy state is a 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 up IO.

[0049] S102: When a second time interval passes, retrieve the pre-stored service data after synchronization and perform service processing on the service data, wherein the second time interval is greater than the first time interval.

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

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

[0052] In one example, the second time interval may also be less than or equal to the product of the first time interval and M. Wherein, M is the number of sub-receiving areas in the data receiving area. Figure 8 As shown, when three sub-receiving areas are included, if the first time interval is 15 ms, the second time interval may be less than or equal to 75 ms. Since in the data synchronization process, each synchronization usually updates only one sub-receiving area. Therefore, the controller may use the data in one of the sub-receiving areas and release the sub-receiving area before performing the fourth synchronization, so that the service data of the fourth synchronization can be stored without overwriting the valid data.

[0053] The communication method for vehicles provided in the embodiment of the present application sets a reasonable first time interval and periodically synchronizes business data with other controllers to ensure the real-time and consistency of data and improve data synchronization efficiency. And by performing business processing on the synchronized business data after a longer second time interval, the business data can be quickly acquired during the business processing, thereby improving the business processing efficiency.

[0054] Based on the above embodiment, the controller may include a driver module and a cache module. The driver module is used to manage the data transmission on the SPI master. The cache module is used to manage the storage space in the controller. The storage space is used to store the business data to be synchronized that needs to be sent to other controllers, as well as the business data synchronized from other controllers. Optionally, the controller may also include an application module. The application module may include a business program. The interaction process between the driver module, the cache module, the application module and the SPI can be as follows: Figure 3 As shown, the following steps are included:

[0055] S201, periodic call.

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

[0057] S202: When conditions are met, trigger communication.

[0058] In this step, the controller can obtain the state of the SPI drive in real time through the driver module. The controller can trigger the business program and the SPI communication action according to the current state of the SPI drive and in combination with the trigger condition. Among them, the trigger condition may include reaching the agreed communication cycle. The agreed communication cycle is the first time interval. Alternatively, the controller can also trigger the SPI communication action when the last communication cycle triggers a timeout exception. The SPI communication action is synchronous processing.

[0059] S203: Obtain a sending data location and a receiving data storage location.

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

[0061] S204: Provide a sending and receiving address.

[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 exchange with the driver module through SPI.

[0065] S206: Obtain received data.

[0066] In this step, the controller can periodically access the cache module according to the second time interval after the application module is started. To avoid the anomaly of production exceeding consumption, the second time interval is usually 3 times the first time interval. Optionally, the setting of 3 times can be determined according to the number of submodules in the cache module. For example, if the first time interval is 15ms for a business data request, then the business data synchronization is performed at 5ms. The application module can periodically attempt to obtain the 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 and feed the obtained parsed data back to the cache module.

[0069] S208. Complete business processing.

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

[0071] S209: Generate sending data.

[0072] In this step, the controller may generate business data to be synchronized during the business logic processing process and may put the business data to be synchronized into the cache module.

[0073] S210, completing the data closed 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 a closed-loop flow of data.

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

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

[0077] In this embodiment, the controller may generate a first synchronization request at an initial moment after the first time interval. The first synchronization request is a request sent by the controller as a slave controller to other controllers to request the execution of synchronization processing. Optionally, the controller may send the first synchronization request through a communication bus between the controller and other controllers. Specifically, the slave controller end may notify the master controller end to perform an SPI communication by pulling up IO. Optionally, pulling up IO is to generate a high level signal. That is, optionally, the first synchronization request may be a high level signal.

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

[0079] Step 1: Generate a first high-level signal at an initial moment after a first time interval, wherein the first high-level signal is a first synchronization request, and optionally, the generation of the first high-level signal can be achieved by pulling up IO.

[0080] Step 2: Send the first high level signal to the other controllers through the first channel in the communication bus connected to the other controllers. Optionally, the first channel can be a channel of the communication bus. Optionally, the channel can be an agreed channel. For example, the channel can be channel 4.

[0081] In one example, before generating the first synchronization request, Figure 6 As shown, the controller can also perform the following steps to complete the verification of whether the current communication bus is in a busy state. This verification can avoid the data synchronization processing of the previous cycle not being completed. The specific process may include:

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

[0083] Step 2: 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.

[0084] In this step, if the current state is already high, it means that the business data synchronization processing of the previous cycle was not completed as scheduled due to some unexpected event. Figure 6 As shown in the dotted line flow, the controller needs extra time to wait for the previous cycle to complete successfully. The waiting time can be a first duration. The first duration can be 4s.

[0085] Step 3: If the reacquired current level signal is in a high level state, a first synchronization end signal is generated and sent.

[0086] In this step, after waiting for the first time, the controller can obtain 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 has not been completed within 4 seconds, and step S303 needs to be forcibly executed.

[0087] Step 4: If the current level signal is in a low level state, the controller can directly pull up the IO and perform SPI transmission, and pull down the IO after completing the SPI transmission. After completing the execution of pulling down the IO, the controller can wait for the execution of the next cycle.

[0088] S302: Send the service data to be synchronized to other controllers.

[0089] In this embodiment, the controller can send the business data to be synchronized to other controllers. The other controller is a controller connected to the controller through a communication bus. And the other controller has received the first synchronization request sent by the controller. The controller can realize the transmission of the business data to be synchronized by SPI communication. Specifically, the master controller can perform a 4096-byte communication operation on the slave controller. The 4096 bytes can be the size of a sub-storage area in the cache module.

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

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

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

[0093] The controller includes a data transmission area, and the data transmission area includes N sub-transmission areas. Each sub-transmission area is a sub-storage area. Optionally, the size of the 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. Wherein, N is a positive integer. For example, N can be 3.

[0094] Optionally, the controller may include a cache module. The cache module may provide an interface for the driver module and the application module to obtain service data. The application module may obtain data cache space for sending and received data for parsing from the cache module. The driver module may obtain cache space that has been filled with good data and idle cache space without valid data from the cache module. Optionally, the process may be as follows: Figure 7 shown.

[0095] Optionally, the cache space of the 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 space is consumed for single-channel SPI processing. The cache space can be as follows Figure 8 shown.

[0096] Step 2: Send the service 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 the first address to other controllers to synchronize 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 area or sub-receiving area is designated as an idle state in the initial stage. During operation, the buffering purpose is achieved by switching between idle and busy states. The idle and busy state switching is implemented by two one-way linked lists. When synchronization is required, the controller can mount the storage area currently being read and written to the corresponding linked list for the next step of synchronization processing. When reading data in the storage area, reading and writing are performed according to the first-in-first-out rule to ensure the safety of communication timing. Optionally, during the reading and writing process, the data output process can be as follows Fig. 9 As shown, the data writing process can be as follows Fig.10 shown.

[0099] Optionally, in order to increase the real-time attribute and improve the real-time performance, the sub-sending area cannot perform sending only when the data is full. If there is valid data in the sub-sending area currently read and written, and other sub-sending areas have no valid data except the sub-sending area currently read and written, if the communication management module requires it, the controller can also immediately set the sub-sending area currently read and written to a busy state and perform synchronization processing to send the business data of the sub-sending area to other controllers. This step can send out the existing data immediately, avoiding the problem of poor real-time performance caused by retention.

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

[0101] In this embodiment, the controller may generate a first synchronization end signal after completing the transmission of the data to be synchronized. The controller may send the first synchronization end signal to the other controller that has completed the synchronization. The first synchronization end signal may be a low-level signal. Specifically, after completing the SPI communication, the controller may pull down the IO from the controller to complete a cycle of communication. Optionally, in the subsequent time, the slave controller may perform the above three steps again after 15ms to complete the synchronization of the business data again and form a stable cycle communication.

[0102] Optionally, the generation of the first synchronization end signal is equivalent to an interrupt when the SPI transmission is completed, and the IO is pulled low in the interrupt. If the current interrupt type is a successful transmission, the controller needs to additionally notify the cache module to switch. Otherwise, if the transmission fails, the controller needs to suppress the switching action to ensure data security.

[0103] In the communication method applied to a vehicle provided by an embodiment of the present application, the controller may generate a first synchronization request at an initial moment after a first time interval. The first synchronization request is a request sent by the controller as a slave controller to other controllers to request the execution of synchronization processing. The controller may send the business data to be synchronized to other controllers. The controller may generate a first synchronization end signal after completing the sending of the data to be synchronized. The controller may send the first synchronization end signal to the other controller that has completed the synchronization. In the present application, by periodically synchronizing the business data to be synchronized to other controllers according to the first time interval, the data synchronization process is isolated from the business processing process, thereby improving the data synchronization efficiency.

[0104] Fig.11 A flow chart of the communication method for a vehicle provided in this application Figure 3 ,like Fig.11 As shown, in this embodiment Figures 1 to 10 Based on the illustrated embodiment, when the controller serves as a main controller, the detailed steps of synchronizing the service 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 time after a first time interval, receiving service data to be synchronized sent by another controller.

[0106] In this embodiment, the first time interval may also be set in other controllers. In addition, other controllers may also send a second synchronization request at the initial moment after the first time interval. The second synchronization request is different from the first synchronization request only in that the controller sending it is different. The controller may accept the second synchronization request sent by other controllers. The other controller may be connected to the controller via a communication bus. The controller may communicate with other controllers via SPI after receiving the second synchronization request sent by other controllers to obtain the business data to be synchronized sent by other controllers.

[0107] S402: Store the business data to be synchronized.

[0108] In this embodiment, after obtaining the business data to be synchronized sent by other controllers, the controller can store the business data in the storage space. Optionally, the controller can obtain a second address for storing the business data to be synchronized. The controller can store the business data to be synchronized sent by other controllers to the storage area corresponding to the second address. Optionally, the controller includes the following: Figure 8 The data receiving area shown. The data receiving area includes M sub-receiving areas. Among them, 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, in order 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 for storing 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-sending area. During the data transmission process, the controller can store the entire received sub-sending area directly into a sub-receiving area.

[0109] In the communication method applied to a vehicle provided in an embodiment of the present application, the controller can accept a second synchronization request sent by other controllers. After receiving the second synchronization request sent by other controllers, the controller can communicate with other controllers via SPI to obtain the business data to be synchronized sent by other controllers. After obtaining the business data to be synchronized sent by other controllers, the controller can store the business data in a storage space. In the present application, the business data to be synchronized will be periodically obtained from other controllers according to a first time interval, so that the data synchronization process is isolated from the business processing process, thereby improving the data synchronization efficiency.

[0110] Based on the above embodiments, Fig.12As shown, the intelligent cockpit system of the vehicle may include: application module driver module, cache module, SPI bus and several parts. Among them, the application module may include business programs, which are responsible for handling various business needs. The driver module is used to schedule the SPI driver, trigger communication and handle exceptions, and realize communication management. The cache module is used to realize cache management, optimize data access efficiency, and exchange data through the SPI bus. The SPI bus is a data transmission channel. The application module can generate data consumption needs through business programs. The application module can consume business data in the cache module. The application module can obtain business data that needs to be parsed from the cache module, and generate business data to be synchronized to the cache module. The driver module can monitor the communication status in real time and transmit data to other system components through the SPI bus. The cache module connects the driver and the application, and assumes the role of temporary data storage between the two to achieve the purpose of leveling peaks and valleys. The present application can ensure that the system can significantly improve the throughput of data interaction while meeting the real-time requirements through this architecture, and provide an efficient communication and data management solution for the intelligent cockpit system.

[0111] Based on the above embodiment, the waveform diagram under the over-response state of SPI can be as follows: Fig.13 As shown. When the INT signal of channel 4 is pulled high, it marks the beginning of a data synchronization process of the current SPI communication. Subsequently, the chip select signal (Chip Select, CS) of channel 1 is pulled low, and the SPI host immediately starts data transmission with the slave. It should be clear that in this embodiment, the roles of the host and the slave are only used to distinguish the two controllers connected to the SPI bus in a specific data transmission process. The two controllers can flexibly interchange the roles of the master and the slave in different data transmission processes.

[0112] At the same time, the clock (Clock, CLK) of channel 0 starts to generate waveforms to transmit data. When the CLK of channel 0 completes the output of the 4096-byte waveform in a storage area, it will stop generating waveforms, indicating the completion of the current data transmission. Subsequently, the CS signal of channel 1 becomes high, and the SPI bus enters the idle state. After the slave successfully receives the complete 4096 bytes of data, the INT signal of channel 4 will be pulled low, indicating that the slave has also entered the idle state. After an interval of 15 milliseconds, the system will start a data interaction process again.

[0113] However, the current system has a problem of "over-response" on the host side. Specifically, a 4096-byte clock waveform will be generated multiple times in one cycle. This "over-response" phenomenon may cause confusion in the rhythm of the INT signal and SPI communication, thereby causing long-term communication failures. In order to solve this problem, the present application adds judgment logic for the CS signal to the system. In the event of "over-response", the present application will delay the timing of pulling up the INT signal of channel 4 to ensure that even if "over-response" occurs, the next communication can proceed normally, thereby improving the stability and reliability of the system.

[0114] Another waveform diagram based on the SPI non-response state can be as follows Fig.14 As shown in the figure. When the INT signal of channel 4 is pulled high, it sends a signal to the SPI host to request a data exchange. However, for some reason, the host does not respond to the INT signal. If the INT signal remains in the high state for more than 3.75 seconds, the system will trigger the timeout mechanism. Subsequently, the system will pull the INT signal high again and try to establish a communication connection again until the communication is restored to normal. The setting of this mechanism ensures that the system can continue to try to restore communication even if the host does not respond, improving the reliability and stability of the system.

[0115] Based on the above embodiment, the waveform diagram under the normal state of SPI can be as follows: Fig.15 shown.

[0116] Fig.16 A schematic diagram of the structure of a communication device for a vehicle provided in the present application, such as Fig.16 As shown, the communication device 500 applied to a vehicle provided in this embodiment includes:

[0117] The synchronization module 501 is used to synchronize the service data with other controllers at a first time interval.

[0118] The processing module 502 is used to retrieve the pre-stored business data after synchronization at a 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 to:

[0121] At an initial moment after a 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 to:

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

[0125] A first high level signal is sent to other controllers via a first channel in a communication bus connected to other controllers.

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

[0127] A first address of storing the service data to be synchronized is obtained from the controller.

[0128] The service data to be synchronized corresponding to the first address is sent to other controllers.

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

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

[0131] After the service data to be synchronized is sent 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.

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

[0133] Get the current level signal.

[0134] If the current level signal is in a high level state, the current level signal is acquired again after waiting for a first time period.

[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 to:

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

[0138] Stores business data to be synchronized.

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

[0140] A second address for storing the service data to be synchronized is obtained from the controller.

[0141] The service data to be synchronized and received from other controllers are stored in the storage area corresponding to the second address.

[0142] Optionally, the controller includes a data receiving area, and the data receiving area includes M sub-receiving areas. The second address represents an address of the sub-receiving area for storing the received service data to be synchronized. Wherein, 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. M is the number of sub-receiving areas in the data receiving area.

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

[0145] In the process of performing data synchronization processing with other controllers, in response to an abnormal processing signal in the data synchronization process, the next data synchronization processing is performed.

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

[0147] In the process of performing data synchronization processing with other controllers, in response to receiving a data synchronization instruction, the next data synchronization processing is performed.

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

[0149] If the communication bus between the controller and other controllers is in a busy state, the controller enters a waiting state until the communication bus returns to an idle state.

[0150] The communication device for use in a vehicle provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be described in detail here.

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

[0152] In a specific implementation process, at least one processor 601 executes the computer execution instructions stored in the memory 602, so that at least one processor 601 executes the above method.

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

[0154] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the invention may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0155] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.

[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. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0157] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0158] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0159] The above-mentioned 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 memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0160] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium 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 be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0161] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

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

[0163] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0164] If the function is implemented in the form of 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 the present application can essentially or in other words, the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0165] Those skilled in the art will appreciate that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed. The aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0166] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application, are not limited to the precise structures described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A communication method applied to a vehicle, characterized in that: Applied to a controller, the method comprises: When a first time interval is reached, synchronous processing of business data is performed with other controllers; and when a second time interval is reached, business data pre-stored after synchronization is retrieved, and business processing is performed on the business data; The second time interval is greater than the first time interval.

2. The method according to claim 1, characterized in that When the first time interval is reached, the business data is synchronized with other controllers, including: At an initial moment after the first time interval, generating a first synchronization request, and sending the first synchronization request to the other controller; The service 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, generating a first synchronization request and sending the first synchronization request to the other controller includes: At an initial moment after the first time interval, generating a first high level signal; wherein the first high level signal is the first synchronization request; The first high level signal is sent to the other controller via a first channel in a communication bus connected to the other controller.

4. The method according to claim 2, characterized in that: Sending the service data to be synchronized to the other controllers includes: Acquire a first address of the service data to be synchronized from the controller; The service 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 sending area, and the data sending area includes N sub-sending areas; the first address represents the address of the sub-sending area where the business data to be synchronized is stored; wherein N is a positive integer.

6. The method according to claim 2, characterized in that The method further comprises: After the service data to be synchronized is sent 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 reacquire the current level signal after waiting for a first time period; 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 claim 1, characterized in that When the first time interval is reached, the business data is synchronized with other controllers, including: In response to receiving a second synchronization request sent by the other controller at an initial time after the first time interval, receiving the service data to be synchronized sent by the other controller; The service data to be synchronized is stored.

9. The method according to claim 8, characterized in that Storing the business data to be synchronized includes: Acquire from the controller a second address for storing the service data to be synchronized; The service data to be synchronized and received from the other controller is stored in the storage area corresponding to the second address.

10. The method according to claim 9, characterized in that The controller includes a data receiving area, and the data receiving area includes M sub-receiving areas; the second address represents the address of the sub-receiving area for storing the received business data to be synchronized; wherein M is a positive integer.

11. The method according to any one of claims 1 to 10, characterized in that The second time interval is less than or equal to the product of the first time interval and M; M is the number of sub-receiving areas in the data receiving area.

12. The method according to any one of claims 1 to 10, characterized in that The method further comprises: During the data synchronization process with other controllers, in response to an abnormal processing signal during the data synchronization process, the next data synchronization process is performed.

13. The method according to any one of claims 1 to 10, characterized in that The method further comprises: During the data synchronization process with other controllers, in response to receiving a data synchronization instruction, the next data synchronization process is performed.

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

15. A communication device applied to a vehicle, characterized in that: Applied to a controller, the device comprises: A synchronization module, used for performing synchronization processing of business data with other controllers at intervals of a first time interval; A processing module, used for retrieving the pre-stored business data after synchronization at a second time interval, and performing business processing on the business data; The second time interval is greater than the first time interval.

16. A controller, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 14.

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

18. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.

Citation Information

Patent Citations

  • SDN-based Internet of Vehicles distributed fog computing system structure design method

    CN110445855A

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

    CN114138805A

  • Task control method and device based on real-time communication and vehicle control system

    CN115047937A

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

    CN118802976A

  • Controlling device and method of vehicle camera

    US20150189172A1