Communication Method, System and Vehicle

By introducing the Native layer and DBC management module in the Android system, CAN packets are directly transmitted and parsed, solving the problem of inefficient transmission of CAN communication networks, and efficient signal transmission and rapid system iteration are achieved.

CN120090896BActive Publication Date: 2025-07-22CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510564908.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-07-22
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

In the prior art, the transmission efficiency of the vehicle CAN communication network is low, it is difficult to adapt to the rapid iteration of the vehicle-mounted system, and requires multi-layer analysis and debugging, resulting in low efficiency and high error rate.

Method used

By introducing a Native layer between the BSP layer and the Framework layer of the Android system for transparent transmission, and using the DBC management module to parse CAN messages in the Framework layer, reducing intermediate processing links, and signal analysis and processing are only performed through the DBC management module, supporting two-way communication.

Benefits of technology

It improves the transmission efficiency of CAN signals, reduces the detection and analysis workload of each layer, simplifies the system iteration process, reduces the error rate and debugging time, and realizes the rapid adaptation of the on-board system update.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120090896B_ABST
    Figure CN120090896B_ABST
Patent Text Reader

Abstract

The present application relates to a communication method, system and vehicle, and relates to the field of communication technologies. The method includes: being applied to an application processor installed with an Android system, where the Android system at least includes a BSP layer, a Native layer, and a Framework layer; the method includes: the BSP layer receives a first CAN message forwarded by the MCU; the Native layer transparently transmits the first CAN message received by the BSP layer to the Framework layer; the DBC management module in the Framework layer parses the first CAN message to obtain the signal value of the corresponding first CAN signal, and sends the signal value of the first CAN signal to the application program in the application layer. Thereby, the transmission efficiency can be improved, and it can adapt to the rapid iteration of the in-vehicle system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, particularly to the field of vehicle cockpit communication technologies, and specifically to a communication method, system, and vehicle. Background Art

[0002] With the development of automotive intelligence, modern vehicles have evolved from simple mechanical systems to complex electronic systems integrating communication, computing, and control. Among them, the Controller Area Network (CAN) serves as the in-vehicle communication network, undertaking data interaction tasks among systems such as power, chassis, body, and infotainment. To adapt to the vehicle's CAN communication network, related technologies have proposed an Android-based vehicle electronic system (Vehicle).

[0003] However, Vehicle is limited by a multi-level hierarchical design and fragmented signal parsing logic, resulting in low transmission efficiency and difficulty in adapting to the rapid iteration of in-vehicle systems. Summary of the Invention

[0004] This application provides a communication method, system, and vehicle to at least solve the technical problem of low transmission efficiency and difficulty in adapting to the rapid iteration of in-vehicle systems in related technologies. The technical solutions of this application are as follows:

[0005] According to the first aspect provided by this application, a communication method is provided, which is applied to an application processor installed with an Android system. The Android system at least includes a Board Support Package (BSP) layer, a Native layer, and a Framework layer. The method includes: the BSP layer receives a first CAN message forwarded by a Microcontroller Unit (MCU); the Native layer transparently transmits the first CAN message received by the BSP layer to the Framework layer; the Controller Area Network Database (DBC) management module in the Framework layer parses the first CAN message to obtain the signal value of the corresponding first CAN signal, and sends the signal value of the first CAN signal to the application program in the application layer.

[0006] According to the above technical means, the present application can directly transmit the first CAN message received by the BSP layer to the Framework layer at the Native layer, reducing the intermediate processing links and improving the message transmission efficiency. Moreover, only the DBC management module is used to parse and process the first CAN message, avoiding the need for multiple layers to parse and encapsulate CAN signals in the related art, and being able to reduce the detection and parsing workload of each layer. In addition, after the communication system of the present application is updated and iterated, only the DBC management module needs to be debugged, avoiding the problem in the related art that layer-by-layer debugging is required, resulting in a large number of CAN signal levels to be configured for a single vehicle model. Therefore, the present application can improve the transmission efficiency and can adapt to the rapid iteration of in-vehicle systems.

[0007] In a possible way, the DBC management module in the Framework layer parses the first CAN message to obtain the signal value of the corresponding first CAN signal, including: the DBC management module parses the first CAN message based on the DBC file to obtain the signal value of the corresponding first CAN signal, and the DBC file is used to indicate the parsing rule of the first CAN message.

[0008] According to the above technical means, the present application can be parsed through the DBC management module and the DBC file, avoiding the need for multiple layers to parse and encapsulate CAN signals in the related art, and being able to reduce the detection and parsing workload of each layer and improve the transmission efficiency.

[0009] In a possible way, the method further includes: after the vehicle is powered on, the DBC management module reads the version number of the DBC file, and requests the cloud server to verify whether the DBC file is the latest version based on the version number of the DBC file; the DBC management module determines whether to update the DBC file based on the verification result.

[0010] According to the above technical means, after the vehicle is powered on, the present application can immediately read the version number of the DBC file through the DBC management module and perform verification with the cloud server to ensure that the DBC file used by the vehicle is the latest version, so as to improve the accuracy of CAN signal parsing by using the latest version of the DBC file.

[0011] In a possible way, the method further includes: the DBC management module obtains the DBC file corresponding to the vehicle model.

[0012] According to the above technical means, the present application can ensure the use of parsing rules that exactly match the current vehicle model by obtaining the DBC file corresponding to the vehicle model, thereby improving the accuracy of CAN signal parsing.

[0013] In a possible way, the method further includes: the DBC management module obtains the DBC file from the cloud server or an external storage device.

[0014] According to the above technical means, the present application can obtain the DBC file from the cloud server or an external storage device, enabling the communication system to select the optimal acquisition method according to the actual situation.

[0015] In a possible way, the first CAN message forwarded by the MCU is encapsulated in the target message of the target transport protocol; before the DBC management module in the Framework layer parses the first CAN message to obtain the signal value of the corresponding first CAN signal, the method includes: the DBC management module verifies the validity of the target message based on the target transport protocol; when the target message is valid, the DBC management module parses the first CAN message from the target message.

[0016] According to the above technical means, the present application can ensure that the received target message is complete and not tampered with through the message validity verification based on the target transport protocol, preventing message damage or data loss caused by transmission errors or malicious attacks.

[0017] In a possible way, sending the signal value of the first CAN signal to the application program in the application layer includes: the DBC management module sends the signal value of the first CAN signal subscribed by the application program to the application program based on the subscription information of the application program, and the subscription information is used to indicate the signal name and / or signal identifier of the first CAN signal subscribed by the application program.

[0018] According to the above technical means, the present application can enable the DBC management module to accurately push the signal value of the first CAN signal required by the application program to the application program through the subscription information, avoiding unnecessary data transmission and improving the pertinence of data transmission.

[0019] In a possible way, the method further includes: the DBC management module receives the second CAN signal of the application program, encapsulates the second CAN signal into a second CAN message, and sends the second CAN message to the Native layer; the Native layer transparently transmits the second CAN message to the BSP layer; the BSP layer forwards the second CAN message to the MCU.

[0020] According to the above technical means, the present application not only supports the CAN signal transmission from the MCU to the application program (such as the first CAN signal), but also realizes the CAN signal feedback from the application program to the MCU (such as the second CAN signal), constituting a two-way communication mechanism, enabling the application program to control or adjust the state of vehicle components in real time.

[0021] In a possible way, the method further includes: the MCU parses the second CAN message to obtain the signal value of the corresponding second CAN signal, and sends the signal value of the second CAN signal to the hardware device in the hardware layer.

[0022] According to the above technical means, the present application can parse the second CAN message through the MCU and accurately extract the signal value of the second CAN signal.

[0023] In a possible way, sending the signal value of the second CAN signal to the hardware device in the hardware layer includes: the MCU sends the signal value of the second CAN signal to the hardware device based on the sending information of the application program, and the sending information is used to indicate at least one of the signal name, signal identifier, and sending times of the second CAN signal sent by the application program.

[0024] According to the above technical means, the present application can, through the sending information, enable the MCU to accurately transmit the signal value of the second CAN signal sent by the application program to the hardware device, avoiding unnecessary data transmission and improving the pertinence of data transmission.

[0025] According to the second aspect provided by the present application, a communication system is provided. The communication system includes a BSP layer, a Native layer, and a Framework layer; the Framework layer includes a DBC management module; the BSP layer is used to receive the first CAN message forwarded by the MCU; the Native layer is used to transparently transmit the first CAN message received by the BSP layer to the Framework layer; the DBC management module is used to parse the first CAN message to obtain the signal value of the corresponding first CAN signal and send the signal value of the first CAN signal to the application program in the application layer.

[0026] In a possible way, the DBC management module is specifically used to parse the first CAN message to obtain the signal value of the corresponding first CAN signal based on the DBC file, and the DBC file is used to indicate the parsing rule of the first CAN message.

[0027] In a possible way, the DBC management module is further used to, after the vehicle is powered on, read the version number of the DBC file and request the cloud server to verify whether the DBC file is the latest version of the DBC file based on the version number of the DBC file; the DBC management module is further used to determine whether to update the DBC file based on the verification result.

[0028] In a possible way, the DBC management module is further used to obtain the DBC file corresponding to the vehicle model.

[0029] In a possible way, the DBC management module is further used to obtain the DBC file from the cloud server or an external storage device.

[0030] In one possible way, the DBC management module is further configured to verify the validity of the target message based on the target transport protocol; the DBC management module is further configured to parse the first CAN message from the target message when the target message is valid.

[0031] In one possible way, the DBC management module is further configured to send the signal values of the first CAN signals subscribed by the application program to the application program based on the subscription information of the application program, where the subscription information is used to indicate the signal names and / or signal identifiers of the first CAN signals subscribed by the application program.

[0032] In one possible way, the DBC management module is further configured to receive the second CAN signals of the application program, encapsulate the second CAN signals into second CAN messages, and send the second CAN messages to the Native layer; the Native layer is further configured to transparently transmit the second CAN messages to the BSP layer; the BSP layer is further configured to forward the second CAN messages to the MCU.

[0033] In one possible way, the MCU is configured to parse the second CAN message to obtain the signal values of the corresponding second CAN signals, and send the signal values of the second CAN signals to the hardware devices in the hardware layer.

[0034] In one possible way, the MCU is further configured to send the signal values of the second CAN signals to the hardware devices based on the sending information of the application program, where the sending information is used to indicate at least one of the signal names, signal identifiers, and sending times of the second CAN signals sent by the application program.

[0035] According to a third aspect provided by the present application, there is provided a vehicle, including: an application processor; a memory for storing executable instructions of the application processor; wherein, the application processor is configured to execute the instructions to implement the method according to the first aspect and any one of its possible implementation manners.

[0036] According to a fourth aspect provided by the present application, there is provided a computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by the application processor of the vehicle, enabling the vehicle to execute the method according to the first aspect and any one of its possible implementation manners.

[0037] According to a fifth aspect provided by the present application, there is provided a computer program product, the computer program product includes computer instructions, when the computer instructions run on the vehicle, enabling the vehicle to execute the method according to the first aspect and any one of its possible implementation manners.

[0038] It should be noted that the technical effects brought by any implementation manner in the second aspect to the fifth aspect can refer to the technical effects brought by the corresponding implementation manner in the first aspect, which will not be elaborated here.

[0039] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit this application. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application, and do not constitute an undue limitation of this application.

[0041] Figure 1 is a schematic diagram of a communication system architecture of a vehicle cockpit in the related art shown according to an exemplary embodiment;

[0042] Figure 2 is a schematic diagram of a communication system architecture shown according to an exemplary embodiment;

[0043] Figure 3 is a schematic diagram of the functions of a DBC management module shown according to an exemplary embodiment;

[0044] Figure 4 is a flowchart of a communication method shown according to an exemplary embodiment;

[0045] Figure 5 is a schematic diagram of a target transport protocol shown according to an exemplary embodiment;

[0046] Figure 6 is a schematic diagram of a process for obtaining a DBC file shown according to an exemplary embodiment;

[0047] Figure 7 is a schematic diagram of a subscription interface and a sending interface shown according to an exemplary embodiment;

[0048] Figure 8 is a schematic diagram of a communication link shown according to an exemplary embodiment;

[0049] Figure 9 is a block diagram of a vehicle shown according to an exemplary embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0050] In order to enable those of ordinary skill in the art to better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the drawings.

[0051] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. On the contrary, they are only examples of devices and methods consistent with some aspects of this application as detailed in the appended claims.

[0052] In the embodiments of this application, words such as "exemplary", "such as", or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary", "such as", or "for example" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary", "such as", or "for example" is intended to present relevant concepts in a specific manner.

[0053] To facilitate understanding of the technical content of this solution, the following first introduces the specific process of image processing in the related art.

[0054] As Figure 1 shown, it is a schematic diagram of a communication system architecture of a vehicle cockpit in a related art shown according to an exemplary embodiment. Figure 1 The communication system in

[0055] The application layer 110 may include multiple application programs such as entertainment or tool applications installed by users (such as navigation, music players), vehicle functions (such as driving mode switching, battery management), and vehicle basic services (such as vehicle status display, system settings).

[0056] The virtual vehicle 120 is used to decouple vehicle signals from upper-layer applications, provide a data caching and synchronization mechanism, and support data distribution in a publish-subscribe model. The virtual vehicle 120 can define an interface for vehicle attributes, receive and save messages from the MCU 150, and convert the original signals of CAN messages into signals recognizable by the Android system.

[0057] As the "communication bridge" between the Application layer 110 and the HAL layer 140, the Framework layer 130 can provide standardized vehicle function interfaces for the Application layer to call. The Framework layer 130 can manage the lifecycle of vehicle services, handle permission verification, data routing, and multitasking scheduling. The Framework layer 130 can include the Car Service System (Carservice) 131.

[0058] The HAL layer 140 can provide standardized hardware interfaces. The HAL layer 140 can define vehicle attribute metadata and implement protocol conversion between the CAN protocol and the Android framework. The HAL layer 140 can include Vehicle 141.

[0059] The MCU 150 can ensure the real-time performance and reliability of vehicle control signals, interact with the Android main control chip through a serial link (such as Ethernet), and achieve function decoupling.

[0060] However, in the related art, the CAN signal needs to pass through the MCU 150 - Vehicle 141 - Carservice 131 - Virtual Vehicle 120 - Application layer 110, forming a vertical signal chain of more than 4 layers. Moreover, the CAN signal is adapted and forwarded at each layer of Vehicle 141, Carservice 131, Virtual Vehicle 120, and Application layer 110, resulting in poor real-time performance.

[0061] In addition, each layer of the MCU 150, HAL layer 140, Framework layer 130, Virtual Vehicle 120, and Application layer 110 needs to independently develop adaptation logic for CAN signals (such as signal identifiers (dentification, ID), data types, parsing rules, etc.), resulting in a large number of CAN signal levels that need to be configured for a single vehicle model, and layer-by-layer debugging is required, with a long debugging time and a high error rate.

[0062] Moreover, when the CAN signal needs to be changed (such as added, deleted, or modified) in the related art, the code in the MCU 150, HAL layer 140, Framework layer 130, Virtual Vehicle 120, and Application layer 110 needs to be synchronously modified, with a high error rate and easy to cause version inconsistency. And in the related art, a signal mapping table needs to be manually configured, lacking generality and poor cross-vehicle reusability.

[0063] In a possible implementation, the communication network 100 may further include a Native layer 160 and a Runtime layer 170. The Native layer 160 may be a native code layer that directly runs on top of the operating system kernel or the HAL 140, capable of operating hardware resources or providing high-performance computing capabilities. The Runtime layer 170 may be an intermediate layer between the application layer and the Native layer, providing capabilities such as a code execution environment (e.g., virtual machine, interpreter), memory management, and garbage collection.

[0064] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments.

[0065] The communication method provided by the embodiments of the present application can be applied to an application processor in a vehicle. A vehicle may also be referred to as a vehicle, a mobile carrier, an electric vehicle (EV), a hybrid electric vehicle (HEV), a plug-in hybrid electric vehicle (PHEV), a fuel cell vehicle (FCV), an autonomous vehicle, an intelligent and connected vehicle (ICV), a driverless vehicle, etc.

[0066] In the embodiments of the present application, the vehicle may be a sedan, a sport utility vehicle (SUV), a truck, an electric vehicle, a motorcycle, a tricycle, a special vehicle (such as an ambulance, a fire truck, a police car, etc.), a driverless taxi, an intelligent and connected bus, an autonomous logistics vehicle, an electric truck, etc. In addition, the method is also applicable to various special vehicles, such as agricultural vehicles, mining vehicles, forestry vehicles, airport vehicles, port vehicles, etc. The present application does not make specific limitations in this regard.

[0067] Combined with Figure 1 , such as Figure 2 shown, Figure 2 is a schematic diagram of a communication system architecture shown according to an exemplary embodiment. The communication system may include an application layer 110, a virtual vehicle 120, a Framework layer 130, a HAL layer 140, an MCU 150, a Native layer 160, and a Runtime layer 170.

[0068] In a possible implementation manner, the application layer 110 may include multiple application programs. The application programs included in the application layer 110 may correspond to the hardware devices of the vehicle. For example, the battery management application may correspond to the battery manager of the vehicle.

[0069] In a possible implementation manner, the HAL layer 140 may include a BSP layer 142. The BSP layer 142 is a key software layer that connects the hardware platform to the operating system / middleware and is responsible for providing basic support for specific hardware boards.

[0070] In a possible implementation manner, the Framework layer 130 may include a DBC management module 132.

[0071] In a possible implementation manner, as Figure 3 shown, Figure 3 is a schematic diagram of the functions of a DBC management module shown according to an exemplary embodiment. The DBC management module can be used for DBC file transfer, transfer protocol management, DBC file verification and storage, DBC parsing, and application program communication management. Application program communication management may include CAN message reception and CAN message transmission.

[0072] In some embodiments, the MCU 150 may be connected to multiple hardware devices of the vehicle. For example, a body controller, a battery manager, a window controller, etc. The MCU 150 may receive the first CAN messages sent by the connected multiple hardware devices. The MCU 150 may forward the first CAN messages to the BSP layer 141 included in the HAL layer 140. The Native layer 160 may transparently transmit the first CAN messages received by the BSP layer 142 to the Framework layer 130. The DBC management module 132 in the Framework layer 130 may parse the first CAN messages to obtain the signal values of the corresponding first CAN signals and send the signal values of the first CAN signals to the application programs in the application layer 110.

[0073] It should be understood that this application takes the Android operating system as an example. In other operating systems (such as the HarmonyOS, iOS system, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of this application, the solution of this application can also be implemented.

[0074] It should be noted that the structure schematically shown in the embodiments of this application does not constitute a limitation on the communication system. It may include more or fewer components than Figure 2 shown, or combine certain components, or split certain components, or have different component arrangements. Figure 2 The components of can be implemented in hardware, software, or a combination of software and hardware.

[0075] For ease of understanding, the communication method provided by this application will be specifically introduced below with reference to the accompanying drawings.

[0076] Figure 4 It is a flowchart of a communication method shown according to an exemplary embodiment. This communication method is applied to an application processor installed with the Android system, and the Android system at least includes a Board Support Package (BSP) layer, a Native layer, and a Hardware Program Framework (Framework) layer. As Figure 4 shown, the communication method includes the following steps: S401 - S403.

[0077] S401. The BSP layer receives the first CAN message forwarded by the MCU.

[0078] Among them, the first CAN message forwarded by the MCU is encapsulated in the target message of the target transport protocol.

[0079] In a possible implementation manner, the MCU can receive the first CAN message sent by other electronic control units (ECUs) of the vehicle (such as a window controller, a door controller), and encapsulate the first CAN message to obtain a target message that conforms to the target transport protocol. The MCU can forward the target message to the BSP layer. The BSP layer can receive the target message forwarded by the MCU.

[0080] Exemplarily, as Figure 5 shown, Figure 5 It is a schematic diagram of a target transport protocol shown according to an exemplary embodiment. The target transport protocol can include a frame header, a frame tail, and a CAN message between the frame header and the frame tail. The CAN message can include a message length (CAN Length), a signal identifier (CAN ID), and a signal value (CAN Byte).

[0081] Among them, the message length can include message length 1, message length 2, message length N, etc. The signal identifier can include signal identifier 1, signal identifier 2, signal identifier N, etc. The signal value can include signal values from signal value 1 to signal value N. Different signal identifiers can correspond to different message lengths and different signal values.

[0082] Among them, the frame header can include the time for encapsulating the original CAN message and the total length of the frame. The frame tail can include a Cyclic Redundancy Check (CRC).

[0083] Optionally, the communication channel through which the MCU forwards the first CAN message to the BSP layer can be set according to actual requirements. For example, the MCU can forward the first CAN message to the BSP layer through the SPI interface, or can also forward the first CAN message to the BSP layer through the USB interface. This application does not make specific restrictions on this.

[0084] In a possible implementation, the MCU encapsulates the first CAN message only when it detects a change in the message signal, and then sends it to the BSP layer.

[0085] Exemplarily, the window controller can periodically send a window opening CAN signal to the MCU through the CAN bus. The window opening CAN signal can include the opening information of the current window. The MCU can receive the window opening CAN signal from the window controller and compare the window opening CAN signal with the window opening CAN signal received in the previous cycle. The MCU can encapsulate the window opening CAN signal when it detects a difference between the window opening CAN signal and the window opening CAN signal sent in the previous cycle, to obtain a target message. The target message can include the new window opening information and other necessary CAN frame information. The BSP layer can receive the target message forwarded by the MCU.

[0086] S402. The Native layer transparently transmits the first CAN message received by the BSP layer to the Framework layer.

[0087] Among them, transparent transmission, that is, transparent transfer, is used to characterize that during the data transmission process, no parsing and modification are performed on the data content, and only the original data is completely transmitted from one end to the other end as a channel.

[0088] In a possible implementation, as a bridge between the BSP layer and the Framework layer, the Native layer can directly transparently transmit the first CAN message received by the BSP layer to the Framework layer through a preset interface without any parsing or modification.

[0089] Exemplarily, a callback function can be registered in the BSP layer. When a CAN message is received, the Native layer calls this callback function to transparently transmit the message to the Framework layer.

[0090] Alternatively, the BSP layer and the Framework layer can exchange CAN messages through a shared memory area. The Native layer is responsible for managing the access and synchronization of the shared memory.

[0091] Or, the Native layer can be configured with a message queue. The BSP layer transmits the received CAN message to the message queue, and the Framework layer reads the message from the queue.

[0092] S403. The DBC management module in the Framework layer parses the first CAN message to obtain the signal value of the corresponding first CAN signal, and sends the signal value of the first CAN signal to the application program in the application layer.

[0093] In a possible implementation, before the DBC management module in the Framework layer parses the first CAN message to obtain the signal value of the corresponding first CAN signal, the DBC management module can verify the validity of the target message (the message encapsulating the first CAN message through the target transport protocol) based on the target transport protocol. The DBC management module can parse the first CAN signal from the target message when the target message is valid.

[0094] Exemplarily, the verification content can include the verification of the message header (such as protocol version, message type, message length, etc.), and the legality check of specific fields (such as sequence number, timestamp, etc.).

[0095] In a possible implementation, if the target message passes the verification, the DBC management module can perform the parsing process. Or, if the target message fails the verification, the DBC management module records an error log and discards the message without performing the next-step parsing.

[0096] In a possible implementation, the DBC management module can parse the first CAN message based on the DBC file to obtain the signal value of the corresponding first CAN signal.

[0097] Among them, the DBC file is used to indicate the parsing rule of the first CAN message. The DBC file includes the definition and transmission information of the CAN signal.

[0098] In some embodiments, as Figure 6 shown, Figure 6 is a schematic diagram of a process for obtaining a DBC file shown according to an exemplary embodiment. The DBC management module can obtain the DBC file from a cloud server or an external storage device. The present application does not make specific limitations on this.

[0099] Among them, the external storage device imports the DBC file into the DBC management module through the engineering mode.

[0100] Exemplarily, the DBC file can be pre-stored in the external storage device. After the vehicle is started, the DBC management module can read the DBC file corresponding to the vehicle model from the external storage device through the engineering mode, parse the content therein, and establish a mapping relationship between the CAN message and the signal. When a CAN message is received, the DBC management module can parse the message and extract the corresponding signal value according to the pre-established mapping relationship.

[0101] Alternatively, the DBC management module can dynamically obtain the DBC file corresponding to the vehicle model through the cloud server. When a CAN message is received, the DBC management module can load the DBC file from a specified location and parse the message through the DBC file to extract the corresponding signal value.

[0102] In a possible implementation, after the vehicle is powered on, the DBC management module can read the version number of the DBC file and request the cloud server to verify whether the DBC file is the latest version based on the version number of the DBC file. The DBC management module can determine whether to update the DBC file based on the verification result.

[0103] Among them, the verification result can include no update required or update required.

[0104] Exemplarily, the cloud server can store the latest DBC file. After receiving the version number of the DBC file sent by the DBC management module, the cloud server can compare it with the version number of the latest DBC file stored on the cloud server. If the local DBC file version number is the same as the cloud latest version number, the cloud server returns a verification result of "no update required". If the local DBC file version number is lower than the cloud latest version number, the cloud server returns a response of "update required" and attaches the download link or file content of the latest DBC file.

[0105] In a possible implementation, the DBC management module can download the latest DBC file according to the download link or file content provided by the cloud server. After the DBC management module finishes downloading, it can perform an integrity check on the new DBC file. After the DBC management module passes the check, it can store the new DBC file in an external storage device and replace the old DBC file. The DBC management module can use the updated DBC file to parse CAN messages.

[0106] In a possible implementation, the DBC management module can send the signal value of the first CAN signal subscribed by the application to the application based on the subscription information of the application.

[0107] Among them, the subscription information can be used to indicate the signal name and / or signal identifier of the first CAN signal subscribed by the application.

[0108] Exemplarily, the subscription information of the body control system can include door subscription information and seat belt subscription information. The signal name in the door subscription information can be the door lock status, and the signal identifier is 0001. When the DBC management module receives a CAN message with a signal identifier of 0001 and a signal name of door lock status, it can send the CAN message to the body control system.

[0109] In yet another example, the subscription information of the vehicle body control system may further include seat belt subscription information. The signal name of the seat belt subscription information may be seat belt status, and the signal identifier is 0002. When the DBC management module receives a CAN message with a signal identifier of 0002 and a signal name of seat belt status, it may send the CAN message to the vehicle body control system.

[0110] Based on the above technical solutions, the present application can directly transmit the first CAN message received by the BSP layer to the Framework layer through the Native layer, reducing the intermediate processing links and improving the message transmission efficiency. Moreover, only the DBC management module parses and processes the first CAN message, avoiding the need for multiple layers to parse and encapsulate CAN signals in the related art, and reducing the detection and parsing workload of each layer. In addition, after the communication system of the present application is updated and iterated, only the DBC management module needs to be debugged, avoiding the problem in the related art that layer-by-layer debugging is required, resulting in a relatively large number of CAN signal levels to be configured for a single vehicle model. Therefore, the present application can improve the transmission efficiency and can adapt to the rapid iteration of in-vehicle systems.

[0111] In some embodiments, the communication method provided by the embodiments of the present application further includes the following steps: S501 - S503.

[0112] S501. The DBC management module receives the second CAN signal of the application program, encapsulates the second CAN signal into a second CAN message, and sends the second CAN message to the Native layer.

[0113] In a possible implementation manner, the DBC management module may encapsulate the first CAN message based on the DBC file to obtain the signal value of the corresponding first CAN signal.

[0114] It should be noted that the specific description of the DBC file may refer to S403 above. It will not be elaborated here.

[0115] S502. The Native layer transparently transmits the second CAN message to the BSP layer.

[0116] In a possible implementation manner, as a bridge between the BSP layer and the Framework layer, the Native layer can directly transparently transmit the second CAN message to the BSP layer through a preset interface without any parsing or modification.

[0117] It should be noted that the specific implementation manner of the Native layer transparently transmitting the second CAN message to the BSP layer may refer to the implementation manner of the Native layer transparently transmitting the first CAN message received by the BSP layer to the Framework layer in S402 above. It will not be elaborated here.

[0118] S503. The BSP layer forwards the second CAN message to the MCU.

[0119] In a possible implementation, after the BSP layer forwards the second CAN message to the MCU, the MCU block can verify the validity of the target message (the message encapsulating the second CAN message through the target transport protocol) based on the target transport protocol. The DBC management module can parse out the second CAN signal from the target message when the target message is valid. The MCU can send the signal value of the second CAN signal to the hardware device in the hardware layer.

[0120] In a possible implementation, the MCU can send the signal value of the second CAN signal to the hardware device based on the sending information of the application program.

[0121] Among them, the sending information is used to indicate at least one of the signal name, signal identifier, and number of transmissions of the second CAN signal sent by the application program.

[0122] Exemplarily, the sending information of the battery management application may include SOC sending information. The signal name included in the SOC sending information can feedback the battery power, the signal identifier is 0003, and the number of transmissions is once every ten seconds. The MCU can send the CAN message to the battery manager when receiving a CAN message with a signal representation of 0003 and a signal name of feedback battery power.

[0123] Based on the above technical solutions, this application not only supports the CAN signal transmission from the MCU to the application program (such as the first CAN signal), but also realizes the CAN signal feedback from the application program to the MCU (such as the second CAN signal), constituting a two-way communication mechanism, enabling the application program to control or adjust the state of vehicle components in real time.

[0124] In some embodiments, as Figure 7 shown, Figure 7 is a schematic diagram of a subscription interface and a sending interface shown according to an exemplary embodiment. The subscription interface may include subscription information, that is, the signal identifier and the signal name. The sending interface may include sending information, that is, the signal identifier, the signal name, and the number of transmissions.

[0125] In some embodiments, as Figure 8 shown, Figure 8It is a schematic diagram of a communication link shown according to an exemplary embodiment. The MCU can forward CAN messages to the BSP layer through the SOC chip. The BSP layer receives the CAN messages forwarded by the MCU. The Native layer can transparently transmit the CAN messages received by the BSP layer to the DBC management module. The DBC management module can parse the CAN messages through the parsing encapsulation module to obtain the signal values of the corresponding CAN signals, and send the signal values of the CAN signals to the application program through the subscription interface.

[0126] In a possible implementation manner, the DBC management module can also perform DBC file transmission, DBC file verification and storage, and DBC file parsing.

[0127] In a possible implementation manner, the application program can send CAN signals to the DBC management module. The DBC management module can perform communication management on the CAN signals through the sending interface. The DBC management module can encapsulate the CAN signals based on the parsing encapsulation module to obtain CAN messages. The DBC management module can forward the CAN messages to the Native layer through the transport protocol management module. The Native layer transparently transmits the CAN messages to the BSP layer. The BSP layer can forward the CAN messages to the MCU.

[0128] The above mainly introduces the solution provided by the embodiments of the present application from the perspective of methods. To implement the above functions, the communication system or vehicle includes the corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, combined with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0129] The embodiments of the present application can, according to the above method, exemplarily divide the functional modules of the communication system or vehicle. For example, the communication system or vehicle can include each functional module corresponding to each functional division, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there can be other division methods in actual implementation.

[0130] Figure 9 It is a block diagram of a vehicle shown according to an exemplary embodiment. As Figure 9As shown, the vehicle includes, but is not limited to, an application processor 901 and a memory 902.

[0131] Among them, the above-mentioned memory 902 is used to store the executable instructions of the above-mentioned application processor 901. It can be understood that the above-mentioned application processor 901 is configured to execute instructions to implement the communication method in the above-mentioned embodiments.

[0132] It should be noted that those skilled in the art can understand that Figure 9 the vehicle structure shown in does not constitute a limitation on the vehicle. The vehicle may include more or fewer components than Figure 9 shown, or combine certain components, or have different component arrangements.

[0133] The application processor 901 is the control center of the vehicle, connecting various parts of the entire vehicle through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 902, and calling the data stored in the memory 902, it executes various functions of the vehicle and processes data, thereby monitoring the vehicle as a whole. The application processor 901 may include one or more processing units. Optionally, the application processor 901 may integrate an application processor and a modulation / demodulation application processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modulation / demodulation application processor mainly processes wireless communication. It can be understood that the above-mentioned modulation / demodulation application processor may not be integrated into the application processor 901 either.

[0134] The memory 902 can be used to store software programs and various data. The memory 902 mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one functional module (such as a determination unit, a processing unit, etc.). In addition, the memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0135] In an exemplary embodiment, there is also provided a computer-readable storage medium including instructions, such as the memory 902 including instructions. The above instructions can be executed by the application processor 901 of the vehicle to implement the method in the above-mentioned embodiments.

[0136] In actual implementation, the functions of the communication system can all be Figure 9 implemented by the application processor 901 in calling the computer program stored in the memory 902. The specific execution process can refer to the description of the method part in the above embodiments, which will not be elaborated here.

[0137] Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, magnetic tape, a floppy disk, and an optical data storage device, etc.

[0138] In an exemplary embodiment, the embodiment of the present application further provides a computer program product including one or more instructions, and the one or more instructions can be executed by an application processor 901 of a vehicle to complete the method in the above embodiment.

[0139] It should be noted that when the instructions in the above computer-readable storage medium or the one or more instructions in the computer program product are executed by the application processor of the vehicle, the various processes of the above method embodiment are implemented, and the same technical effects as the above method can be achieved. To avoid repetition, it will not be elaborated here.

[0140] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0141] In several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.

[0142] The unit described as a separated component may or may not be physically separated, and the component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0143] In addition, in each embodiment of the present application, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0144] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or an application processor to execute all or part of the steps of the methods of the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.

[0145] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A communication method, characterized in that, An application processor for installing an Android system, where the Android system at least includes a board support package (BSP) layer, a native layer, and a framework layer; the method includes: The BSP layer receives a first Controller Area Network (CAN) message forwarded by a microcontroller unit (MCU); The native layer transparently transmits the first CAN message received by the BSP layer to the framework layer; A CAN database (DBC) management module in the framework layer, based on a DBC file, parses the first CAN message to obtain a signal value of a corresponding first CAN signal, and sends the signal value of the first CAN signal to an application program in the application layer, where the DBC file is used to indicate a parsing rule of the first CAN message.

2. The communication method according to claim 1, wherein The method further includes: After the vehicle is powered on, the DBC management module reads a version number of the DBC file, and requests a cloud server to verify whether the DBC file is the latest version of the DBC file based on the version number of the DBC file; The DBC management module determines whether to update the DBC file based on a verification result.

3. The communication method according to claim 1, wherein The method further includes: The DBC management module obtains a DBC file corresponding to a vehicle model.

4. The communication method according to claim 1, wherein The method further includes: The DBC management module obtains the DBC file from a cloud server or an external storage device.

5. The communication method according to claim 1, wherein The first CAN message forwarded by the MCU is encapsulated in a target message of a target transport protocol; Before the DBC management module in the framework layer parses the first CAN message to obtain a signal value of a corresponding first CAN signal, the method includes: The DBC management module verifies the validity of the target message based on the target transport protocol; When the target message is valid, the DBC management module parses the first CAN message from the target message.

6. The communication method according to claim 1, wherein The step of sending the signal value of the first CAN signal to an application program in the application layer includes: The DBC management module, based on subscription information of the application program, sends the signal value of the first CAN signal subscribed by the application program to the application program, where the subscription information is used to indicate a signal name and / or a signal identifier of the first CAN signal subscribed by the application program.

7. The communication method according to any one of claims 1 to 6, characterized in that, The method further includes: The DBC management module receives a second CAN signal of the application program, encapsulates the second CAN signal into a second CAN message, and sends the second CAN message to the native layer; The native layer transparently transmits the second CAN message to the BSP layer; The BSP layer forwards the second CAN message to the MCU.

8. The communication method according to claim 7, wherein The method further includes: The MCU parses the second CAN message to obtain a signal value of a corresponding second CAN signal, and sends the signal value of the second CAN signal to a hardware device in the hardware layer.

9. The communication method according to claim 7, characterized in that The step of sending the signal value of the second CAN signal to a hardware device in the hardware layer includes: Based on the sending information of the application program, the MCU sends the signal value of the second CAN signal to the hardware device, and the sending information is used to indicate at least one of the signal name, signal identifier, and number of transmissions of the second CAN signal sent by the application program.

10. A communication system, characterized in that, The communication system includes a BSP layer, a Native layer, and a Framework layer; the Framework layer includes a DBC management module; The BSP layer is used to receive the first CAN message forwarded by the MCU; The Native layer is used to transparently transmit the first CAN message received by the BSP layer to the Framework layer; The DBC management module is used to parse the first CAN message based on the DBC file to obtain the signal value of the corresponding first CAN signal, and send the signal value of the first CAN signal to the application program in the application layer. The DBC file is used to indicate the parsing rule of the first CAN message.

11. A vehicle, characterized in that, It includes: An application processor; A memory for storing executable instructions of the application processor; Wherein, the application processor is configured to execute the instructions to implement the communication method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Vehicle control communication method, device and equipment based on intelligent central control system and medium

    CN116032733A

  • Vehicle data acquisition method and device, electronic equipment and readable storage medium

    CN117956005A