Vehicle communication method and apparatus, and storage medium
By adopting incremental communication methods and periodic verification in the vehicle communication system, the problem of excessive communication load caused by the increase in the number of ECUs and signal data in the vehicle is solved, and efficient and reliable vehicle communication is achieved.
Patent Information
- Application Number
- PCT/CN2024/112202
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-22
- Filing Date
- 2024-08-14
- Publication Date
- 2025-02-27
AI Technical Summary
With the increase in vehicle functions, the number of ECUs and signal data in the vehicle increases, resulting in excessive communication load between the MCU and the SOC, which makes it difficult for the prior art to meet this demand.
In incremental communication method, only changing data packets are transmitted, including generating data packets containing signal identification and communication data of the target signal, and ensuring data reliability through periodic verification.
It reduces the communication load between the MCU and the SOC, improves the utilization rate of the communication bus, and ensures data reliability and consistency.
Smart Images

Figure CN2024112202_27022025_PF_FP_ABST
Abstract
Description
Vehicle communication method, device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on August 22, 2023, with application number 2023110696742 and application name “Vehicle Communication Method, Device and Storage Medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to, but is not limited to, the field of vehicle communication technology, and more specifically, to a vehicle communication method, device, and storage medium. Background Art
[0003] At present, the intelligent cockpit of a vehicle generally includes a motor control unit (MCU) and a system on chip (SOC). As for the internal communication function of the vehicle, the MCU is responsible for completing signal interaction with each electronic control unit (ECU) inside the vehicle through various buses. The MCU receives the signals sent by each ECU, and according to the protocol definition, fills the signal data carried in the received signal into the data packet, and transmits the data packet filled with signal data through the communication bus within the domain to the SOC. The SOC further processes the data packet and finally presents it to the user. It can be seen that the intra-domain communication between the MCU and the SOC is the bridge for communication between the SOC and each ECU in the vehicle.
[0004] However, with the development of the vehicle industry, users have increasingly defined more vehicle functions, the number of ECUs in vehicles has increased, and the number of signals in vehicles has also increased, resulting in an increasing communication load between MCU and SOC. The above technical solutions are increasingly unable to meet the requirements of the communication load.
[0005] Summary of the Invention
[0006] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0007] The purpose of this application is to provide a vehicle communication method, device and storage medium, which adopts an incremental communication method to reduce the communication load between the MCU and the SOC in the vehicle's smart cockpit.
[0008] In a first aspect, the present application provides a vehicle communication method, which is applied to an MCU included in a smart cockpit of a vehicle, and the smart cockpit also includes a SOC for signal interaction with the MCU. The vehicle communication method includes:
[0009] receiving a target signal sent by the ECU, where the target signal carries first communication data;
[0010] In response to detecting a change in the first communication data relative to the second communication data, generating a first communication data packet including a signal identifier of a target signal and the first communication data using an incremental communication method, wherein the second communication data is carried in a previous signal sent by the ECU to the MCU;
[0011] A first communication data packet is sent to the SOC.
[0012] In one possible embodiment, the above-mentioned signal identifier includes a table index number, a frame index number and a signal index number. The table corresponding to the table index number contains signals. The signal periods of the signals contained in different tables are different. The same table contains at least one frame of signals. The frame index number is used to uniquely identify the frame, and the signal index is used to uniquely identify the signal. The above-mentioned incremental communication method is used to generate a first communication data packet containing the signal identifier of the target signal and the first communication data, including: according to a preset incremental communication data packet strategy, the table index number, frame index number and signal index number of the target signal are filled into the packet header of the first communication data packet, and the first communication data is filled into the data field of the first communication data packet to obtain the first communication data packet containing the signal identifier of the target signal and the first communication data, so as to perform incremental communication.
[0013] In one possible embodiment, M target signals respectively sent by M ECUs are received at the same time, and the communication data carried by N target signals among the M target signals changes, M and N are both positive integers, and M is greater than or equal to N; before the above-mentioned incremental communication method is adopted to generate a first communication data packet containing a signal identifier of the target signal and the first communication data, the above-mentioned vehicle communication method also includes: for the N target signals whose communication data have changed, obtaining the table index number and frame index number of each target signal; determining that the table index number and frame index number of the N target signals whose communication data have changed are the same.
[0014] In a possible embodiment, the above-mentioned vehicle communication method also includes: if the table index numbers of the N target signals whose communication data have changed are the same, and the frame index numbers of the N target signals whose communication data have changed are different, then the N target signals whose communication data have changed are grouped according to the frame index numbers; for the target signals in each group, the above-mentioned step of using the incremental communication method to generate a first communication data packet containing a signal identifier of the target signal and the first communication data is executed.
[0015] In a possible embodiment, the above-mentioned vehicle communication method also includes: if the table index numbers of the N target signals whose communication data have changed are different, and the frame index numbers of the N target signals whose communication data have changed are different, then the N target signals whose communication data have changed are grouped according to the table index number and the frame index number; for the target signal in each group, the above-mentioned step of using the incremental communication method to generate a first communication data packet containing the signal identifier of the target signal and the first communication data is executed.
[0016] In one possible implementation, the SOC records the number of first communication data packets received according to the table index number and the frame index number, and the MCU records the number of first communication data packets sent according to the table index number and the frame index number; the above-mentioned vehicle communication method also includes: receiving a first count value sent by the SOC, the first count value being used to indicate the number of first communication data packets containing the target table index number and the target frame index number; determining whether the first count value is consistent with the second count value, the second count value being used to indicate the number of first communication data packets containing the target table index number and the target frame index number sent by the MCU to the SOC; if the first count value is inconsistent with the second count value, determining the target communication data packet that is lost; and sending the target communication data packet to the SOC.
[0017] In a possible embodiment, the above-mentioned receiving the first count value sent by the SOC includes: receiving a second communication data packet sent by the SOC, the second communication data packet carrying the first count value, the second communication data packet carrying multiple first count values, and different first count values corresponding to different target table index numbers and / or target frame index numbers.
[0018] In a second aspect, the present application provides a vehicle communication device, which is applied to an MCU included in a smart cockpit of a vehicle, and the smart cockpit also includes a SOC for signal interaction with the MCU. The vehicle communication device includes:
[0019] A receiving module, configured to receive a target signal sent by the ECU, the target signal carrying first communication data;
[0020] a response module, configured to respond to detecting a change in the first communication data relative to the second communication data by generating, using an incremental communication method, a first communication data packet including a signal identifier of a target signal and the first communication data, wherein the second communication data is carried in a previous signal sent by the ECU to the MCU;
[0021] The sending module is used to send a first communication data packet to the SOC.
[0022] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0023] Memory stores computer-executable instructions;
[0024] The processor executes the computer-executable instructions, so that the processor performs the vehicle communication method described in the first aspect.
[0025] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed, they are used to implement the vehicle communication method as described in the first aspect.
[0026] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed, implements the vehicle communication method as described in the first aspect.
[0027] In a sixth aspect, the present application provides a computer program. When the computer program runs on a computer, the computer executes the vehicle communication method as described in the first aspect.
[0028] The vehicle communication method, device and storage medium provided in the present application are applied to the MCU contained in the smart cockpit of the vehicle. The smart cockpit also contains an SOC that interacts with the MCU by signals. The method receives a target signal sent by the ECU, and the target signal carries the first communication data. In response to detecting that the first communication data has changed relative to the second communication data, an incremental communication method is used to generate a first communication data packet containing a signal identifier of the target signal and the first communication data, wherein the second communication data is carried in the previous signal sent by the ECU to the MCU. After that, the first communication data packet is sent to the SOC. By adopting an incremental communication method, the present application always transmits changing data except for the necessary header information, and unchanged data is no longer transmitted. As a result, the data exchanged between the MCU and the SOC is all changing data, and unchanged data no longer occupies communication resources, thereby improving the utilization rate of the communication bus and reducing the communication load. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0030] FIG1 is a schematic diagram of an application scenario of a vehicle communication method provided by an exemplary embodiment of the present application;
[0031] FIG2 is a flow chart of a vehicle communication method provided by an exemplary embodiment of the present application;
[0032] FIG3 is a schematic diagram of a packet grouping strategy in which the TID and FID of a target signal are the same, provided by an exemplary embodiment of the present application;
[0033] FIG4 is a schematic diagram of a packet grouping strategy for target signals having the same TID but different FIDs provided by an exemplary embodiment of the present application;
[0034] FIG5 is a schematic diagram of a packet grouping strategy for target signals with different TIDs and different FIDs provided by an exemplary embodiment of the present application;
[0035] FIG6 is a schematic diagram of an SOC signal data restoration strategy provided by an exemplary embodiment of the present application;
[0036] FIG7 is a schematic structural diagram of a vehicle communication device provided by an exemplary embodiment of the present application;
[0037] FIG8 is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application.
[0038] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0039] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0040] It should be noted that the vehicle communication method, device and storage medium provided in this application can be used in the field of vehicle communication technology, and can also be used in any field other than the field of vehicle communication technology, such as the Internet of Things field, cloud computing field or other related fields. The application field of the vehicle communication method, device and storage medium provided in this application is not limited.
[0041] In one alternative, vehicle signals are typically grouped when developing a communication protocol. Each group's signals are defined byte by byte according to the signal data length, forming a communication protocol. When the sender needs to send a signal, the signal data is inserted into each byte of the communication data packet according to the communication protocol. Upon receiving the data packet, the receiver also parses it byte by byte according to the communication protocol to obtain the values of each functional signal. For example, Table 1 illustrates the communication protocol used in one alternative. The first row of Table 1 represents the byte sequence number of a communication data packet. The opcode in the second row represents the packet header, which occupies byte 0 to byte 3, a total of 4 bytes. The data bytes + sequence numbers in the second row represent the byte sequence numbers of the signal data, with signal data inserted from byte 4 to byte 4. The packet header in the third row refers to the specific content inserted from byte 0 to byte 3, and the communication data refers to the specific content inserted from byte 4 to byte 4. As shown in Table 1, the communication protocol developed in one alternative is designed for full signals, and the corresponding packet encapsulation and parsing processes are also designed for full signals. Therefore, full signals are transmitted on the communication bus within the domain. Normally, only a small number of signals change at the same time, but the vast majority of signals transmitted on the communication bus within the domain remain unchanged. As a result, most of the data exchanged between the MCU and the SOC is repeated and useless, greatly reducing the efficiency of communication and causing a waste of communication resources.
[0042] Table 1
[0043] On the other hand, two common signal transmission schemes are used: periodic transmission and data-changed transmission. Periodic transmission involves assigning different communication cycles to all communication packets according to their function, and then sending the packets to the receiver based on the cycle. While periodic transmission ensures data reliability, it significantly increases the communication bus load. Data-changed transmission involves sending the entire packet to the receiver only when the data within the packet changes. If the data remains unchanged, the data is not transmitted. While this variable transmission method reduces the communication bus load, it cannot guarantee data reliability and can easily lead to packet loss.
[0044] In order to solve the above problems, the embodiment of the present application provides a vehicle communication solution, which aims to reduce the communication bus load and improve communication efficiency under the premise of ensuring data reliability. Specifically, on the one hand, an incremental communication method is adopted. In addition to the necessary packet header information, the communication data packet transmission is always the changed data, and the unchanged data is no longer transmitted, so that the data exchanged between the MCU and the SOC is the changed data, and the unchanged data no longer occupies communication resources, thereby improving the communication bus utilization rate and reducing the communication load; on the other hand, a periodic check is added. The SOC records the number of each communication data packet received and periodically sends the number of all communication data packets to the MCU according to the preset communication protocol. The MCU compares the number of each communication data packet sent by the SOC with the number of transmissions stored locally to see if they are consistent. If they are inconsistent, the lost communication data packet can be determined and the lost communication data packet can be resent to the SOC. By adopting this periodic check method, the consistency of data transmission and reception between the MCU and the SOC is guaranteed, thereby ensuring the reliability of communication.
[0045] Figure 1 is a schematic diagram of an application scenario of the vehicle communication method provided by an exemplary embodiment of the present application. As shown in Figure 1, the vehicle communication method provided by an exemplary embodiment of the present application is applied to an MCU contained in a vehicle's smart cockpit, which also includes a SOC that exchanges signals with the MCU. After the MCU receives a signal from the ECU, it executes the vehicle communication method provided by the present application to exchange data between the MCU and the SOC.
[0046] The MCU is responsible for communicating with various ECUs within the vehicle via various buses. Examples of these buses include the Controller Area Network (CAN), Local Interconnect Network (LIN), FlexRay, and Media Oriented System Transport (MOST). The MCU transmits data to the SoC via the intra-domain communication bus, typically using the Serial Peripheral Interface (SPI).
[0047] It's important to note that the MCU is the vehicle's microcontroller, responsible for controlling all electronic systems within the vehicle, including multimedia, audio, navigation, and suspension. The SOC, capable of performing complex calculations, can be considered the vehicle's "brain." The ECU, also known as the "on-board computer" or "vehicle computer," is divided into multiple units, each controlling a specific area. The ECU shown in Figure 1 refers to an ECU unit.
[0048] The following describes a vehicle communication method according to an exemplary embodiment of the present application in conjunction with the application scenario of Figure 1 and with reference to Figure 2. It should be noted that the above application scenario is only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited to the application scenario shown in Figure 1.
[0049] FIG2 is a flow chart of a vehicle communication method provided by an exemplary embodiment of the present application. As shown in FIG2 , the vehicle communication method in the embodiment of the present application includes the following steps:
[0050] Step 201: Receive a target signal sent by an ECU, where the target signal carries first communication data.
[0051] In the embodiment of the present application, as shown in Figure 1 , the MCU receives a target signal sent by the ECU. This application does not limit the specific type of the target signal. For example, the signal may include vehicle speed, gear status, warning light status, tire pressure, tire temperature, air conditioning, and fragrance status. It will be appreciated that the signal carries valid data. For ease of distinction, the valid data carried in the target signal is referred to as "first communication data."
[0052] In one implementation, the target signal may be a signal sent by a single ECU, that is, at the same time, the MCU receives a target signal sent by one ECU.
[0053] In another implementation, the target signal can be sent by multiple ECUs. That is, the MCU receives target signals from at least two ECUs at the same time. In this case, there are multiple target signals, and these multiple target signals can be different. "Target signal" is simply a general term for the signals received by the MCU and does not mean that the target signals sent by each ECU are the same. For example, Target Signal 1 sent by ECU 1 is the vehicle speed signal, Target Signal 2 sent by ECU 2 is the gear status signal, and so on.
[0054] Step 202: In response to detecting that the first communication data has changed relative to the second communication data, an incremental communication method is used to generate a first communication data packet including a signal identifier of the target signal and the first communication data, and the second communication data is carried in the previous signal sent by the ECU to the MCU.
[0055] In this step, the MCU parses the target signal received in step 201 to obtain the signal identifier and first communication data of the target signal. When it is detected that the first communication data has changed relative to the second communication data, an incremental communication method is adopted to generate a first communication data packet containing the signal identifier of the target signal and the first communication data.
[0056] Incremental communication refers to a method where, apart from the necessary header information, communication packets transmit only changing data. For example, a certain number of bytes (e.g., 2) are used to represent the communication packet header information, a certain number of bytes (e.g., 8) are used to represent the changing signal ID information, and the changing signal data is used to fill the communication data segment. This generates a first communication packet containing the target signal's signal identifier and the first communication data. Unchanged data is not transmitted. Table 2 shows an example of the overall definition of a communication protocol using incremental communication.
[0057] Table 2
[0058] Step 203: Send a first communication data packet to the SOC.
[0059] For example, as shown in Figure 1, the MCU sends the first communication data packet generated in step 202 to the SOC via the SPI. Correspondingly, the SOC further processes the first communication data packet and finally presents it to the user.
[0060] In an embodiment of the present application, a target signal sent by the ECU is received, the target signal carrying first communication data, and in response to detecting that the first communication data has changed relative to the second communication data, an incremental communication method is adopted to generate a first communication data packet including a signal identifier of the target signal and the first communication data, wherein the second communication data is carried in the previous signal sent by the ECU to the MCU, and then the first communication data packet is sent to the SOC. During this process, by adopting the incremental communication method, except for the necessary packet header information, the communication data packet always transmits the changed data, and the unchanged data is no longer transmitted, so that the data exchanged between the MCU and the SOC are all changed data, and the unchanged data no longer occupies communication resources, thereby improving the utilization rate of the communication bus and reducing the communication load.
[0061] In some embodiments, the signal identifier includes a table index number, a frame index number, and a signal index number. The table corresponding to the table index number contains signals, and the signal periods of the signals contained in different tables are different. The same table contains at least one frame of signals. The frame index number is used to uniquely identify the frame, and the signal index is used to uniquely identify the signal. The incremental communication method is used to generate a first communication data packet containing the signal identifier of the target signal and the first communication data, including: according to a preset incremental communication data packet strategy, the table index number, frame index number, and signal index number of the target signal are added to the packet header of the first communication data packet, and the first communication data is added to the data field of the first communication data packet to obtain the first communication data packet containing the signal identifier of the target signal and the first communication data, so as to perform incremental communication. For example, the TID identifies the table index number, the FID identifies the frame index number, and the SID identifies the signal index. The unique signal identifier of the signal is obtained by combining the TID, FID, and SID.
[0062] Correspondingly, Table 3 provides a specific definition of the communication protocol using incremental communication. Pos Byte + Sequence Number represents the byte sequence number of the signal position index, and Payload + Sequence Number represents the byte sequence number of the changed signal data. As shown in Table 3, the TID and FID occupy the first two bytes of the first communication data packet, i.e., the contents filled with byte 0 and byte 1 in Table 3 serve as the packet header for the entire communication data packet. Eight bytes, byte 2 through byte 9, represent the signal position index, with each signal occupying one bit. Each byte can represent eight signals, and eight bytes can represent a total of 64 signals. The signal position index is derived by combining the SIDs of the changed signals. For example, when the MCU receives signals 1 and 2 sent by the ECU, changes occur, and all other signals remain unchanged. The signal identifier of signal 1 is "0x02010001", and the signal identifier of signal 2 is "0x02010002", where "0x0201" in signal 1 and signal 2 refers to the TID and FID of signal 1 and signal 2, "0001" and "0002" correspond to the SID of signal 1 and signal 2, respectively. Based on the communication protocol in Table 3, the TID, FID and SID in signal 1 and signal 2 are filled into the header of the first communication data packet to obtain "0x02010300000000000000", and correspondingly, "03000000000000000" is the signal position index; optionally, the changed data in signal 1 and signal 2, that is, the first communication data, is filled into the data field of the first communication data packet according to a preset byte size. For example, if the changed data in signal 1 occupies 2 bytes and the changed data is "0001", then "0001" is filled into byte10 to byte11; if the changed data in signal 2 occupies 1 byte and the changed data is "01", then "01" is filled into byte12, and the final first communication data packet is "0x020103000000000000000000101".
[0063] Table 3
[0064] In some embodiments, M target signals respectively sent by M ECUs are received simultaneously, and the communication data carried by N target signals among the M target signals changes, M and N are both positive integers, and M is greater than or equal to N; before the above-mentioned incremental communication method is adopted to generate a first communication data packet containing a signal identifier of the target signal and the first communication data, the above-mentioned vehicle communication method also includes: for the N target signals whose communication data have changed, obtaining the table index number and frame index number of each target signal; determining that the table index number and frame index number of the N target signals whose communication data have changed are the same.
[0065] For example, if 10 target signals sent by 10 ECUs are received simultaneously, and the communication data carried by 9 of the 10 target signals changes, and these 9 target signals are the same frame data in the same signal table, that is, the TID and FID are the same, then the 9 signals are combined into a communication data packet according to the communication protocol of the incremental communication method in Table 3, that is, the first communication data packet. Figure 3 is a schematic diagram of the packet grouping strategy for the target signals with the same TID and FID provided by the exemplary embodiment of the present application, wherein the SID index represents the signal position index obtained by combining the SIDs of the above 9 changed target signals. Correspondingly, the MCU sends the first communication data packet to the SOC.
[0066] Based on the above embodiments, in some embodiments, the above vehicle communication method further includes: if the table index numbers of the N target signals whose communication data have changed are the same, and the frame index numbers of the N target signals whose communication data have changed are different, then the N target signals whose communication data have changed are grouped according to the frame index numbers; for the target signals in each group, the above step of using the incremental communication method to generate a first communication data packet containing a signal identifier of the target signal and the first communication data is executed.
[0067] For example, if 10 target signals sent by 10 ECUs are received simultaneously, and the communication data carried by 9 of the 10 target signals changes, and these 9 target signals are different frame data in the same signal table, that is, the TIDs of signals 1 to 9 are the same, but the FIDs of signals 1 to 5 are the same, and the FIDs of signals 6 to 9 are the same, then signals 1 to 5 are combined into communication data packet 1 according to the communication protocol of the incremental communication method in Table 3, and signals 6 to 9 are combined into communication data packet 2. Figure 4 is a schematic diagram of the packet grouping strategy for target signals with the same TID but different FIDs provided by an exemplary embodiment of the present application, wherein FID1 represents the FIDs of signals 1 to 5, and FID2 represents the FIDs of signals 6 to 9. Correspondingly, the MCU sends the first communication data packet, namely communication data packet 1 and communication data packet 2, to the SOC.
[0068] Optionally, in some embodiments, the above-mentioned vehicle communication method further includes: if the table index numbers of the N target signals whose communication data have changed are different, and the frame index numbers of the N target signals whose communication data have changed are different, then the N target signals whose communication data have changed are grouped according to the table index number and the frame index number; for the target signal in each group, executing the above-mentioned step of using the incremental communication method to generate a first communication data packet containing the signal identifier of the target signal and the first communication data.
[0069] For example, if 20 target signals sent by 20 ECUs are received at the same time, and the communication data carried by 18 target signals among the 20 target signals changes, and the TIDs and FIDs of these 18 target signals are different, then these 18 target signals are grouped according to the TID and FID, and those with the same TID and FID are grouped together; among them, the first 9 target signals are different frame data in signal table 1, that is, the TIDs of signals 1 to 9 are the same, but the FIDs of signals 1 to 5 are the same, and the FIDs of signals 6 to 9 are the same, then signals 1 to 5 are combined into communication data packet 1 according to the communication protocol of the incremental communication mode in Table 3, and signals 6 to 9 are combined into communication data packet 2; in addition, the last 9 target signals are the same frame data in signal table 2, and their TIDs and FIDs are the same, then the 9 signals are combined into communication data packet 3 according to the communication protocol of the incremental communication mode in Table 3. Figure 5 is a schematic diagram of the packet grouping strategy for target signals with different TIDs and different FIDs provided by an exemplary embodiment of the present application. Correspondingly, the MCU sends the first communication data packets, namely, communication data packet 1, communication data packet 2, and communication data packet 3, to the SOC.
[0070] Optionally, after receiving the first communication data packet, the SOC parses the TID and FID in the first communication data packet to identify the signal table to be updated and the corresponding signal frame. The SOC then parses the information in the SID index segment to determine which signals have changed, i.e., obtains the TID, FID, and SID of each changed signal. The SOC then restores the data field in the first communication data packet according to a preset byte size, i.e., obtains the first communication data of each changed signal through restoration, which is then broadcast to the application. FIG6 is a schematic diagram of the SOC signal data restoration strategy provided by an exemplary embodiment of the present application, corresponding to the data restoration of different frame data in signal table 1 in FIG5 . The data restoration of the same frame data in signal table 2 in FIG5 is similar, and both are performed according to the specific definition of the communication protocol for the incremental communication method in Table 3, which will not be repeated here.
[0071] In some embodiments, the SOC records the number of first communication data packets received according to the table index number and the frame index number, and the MCU records the number of first communication data packets sent according to the table index number and the frame index number; the above-mentioned vehicle communication method also includes: receiving a first count value sent by the SOC, the first count value is used to indicate the number of first communication data packets containing the target table index number and the target frame index number; determining whether the first count value is consistent with the second count value, the second count value is used to indicate the number of first communication data packets containing the target table index number and the target frame index number sent by the MCU to the SOC; if the first count value is inconsistent with the second count value, determining the target communication data packet that is lost; and sending the target communication data packet to the SOC.
[0072] For example, Table 4 is a communication protocol definition for recording the number of first communication data packets received by the SOC according to the table index number and the frame index number. As shown in Table 4, the SOC is grouped according to TID and FID, and the data packets with the same TID and FID are grouped together. The cumulative count value counter of the first communication data packet received is recorded for each group, and all the counter counts are encapsulated into a communication data packet, i.e., the second communication data packet, which is then periodically sent to the MCU. Taking into account the communication load and application scenarios, the sending period can be flexibly set, such as 1 second; correspondingly, the MCU also records the cumulative count value of each group of communication data packets according to TID and FID. By comparing the received count value (i.e., the first count value) with the locally saved count value (i.e., the second count value), the lost communication data packet can be found, and then the corresponding communication data packet is resent, and the resent communication data packet is not counted in the number of transmissions and is not stored locally in the MCU. In this way, the consistency of signal reception and transmission between the MCU and the SOC communication parties can be achieved, thereby ensuring communication reliability.
[0073] Table 4
[0074] Based on the above embodiments, in some embodiments, the above-mentioned receiving the first count value sent by the SOC includes: receiving a second communication data packet sent by the SOC, the second communication data packet carries the first count value, the second communication data packet carries multiple first count values, and the target table index number and target frame index number corresponding to different first count values are different.
[0075] For example, the SOC receives four target signals, namely signal 1 to signal 4, where the TIDs and FIDs of signals 1 to signal 4 are different. The number of received data packets of signals 1 to signal 4 is counted as counter1 to counter4 respectively, and a second communication data packet is obtained based on the communication protocol group in Table 4. The second communication data packet carries the count values counter1 to counter4 of signals 1 to signal 4.
[0076] Optionally, in some embodiments, the above-mentioned receiving the first count value sent by the SOC includes: receiving a second communication data packet sent by the SOC, the second communication data packet carrying the first count value, the second communication data packet carrying multiple first count values, and different first count values corresponding to different target table index numbers or target frame index numbers.
[0077] For example, the SOC receives four target signals, namely signal 1 to signal 4, where the TIDs of signals 1 to signal 4 are the same, but the FIDs of signals 1 to signal 2 are the same, and the FIDs of signals 3 to signal 4 are the same. Then, the cumulative count of the number of data packets received from signals 1 to signal 2 is counter1, and the cumulative count of the number of data packets received from signals 3 to signal 4 is counter2. Based on the communication protocol grouping in Table 4, a second communication data packet is obtained, which carries the count values counter1 of signals 1 to signal 2 and the count values counter2 of signals 3 to signal 4, respectively.
[0078] The MCU obtains the count value received by the SOC by parsing the second communication data packet, and then compares it with the locally saved count value to find the lost communication data packet, and then resend the corresponding communication data packet. In this way, the consistency of signal reception and transmission between the MCU and SOC communication parties can be achieved, thereby ensuring communication reliability.
[0079] In summary, this application has at least the following advantages:
[0080] 1. By adopting the incremental communication mode, except for the necessary header information, the communication data packet always transmits the changed data, and the unchanged data is no longer transmitted. As a result, the data exchanged between the MCU and the SOC is the changed data, and the unchanged data no longer occupies the communication resources, thereby improving the utilization rate of the communication bus and reducing the communication load.
[0081] 2. Add periodic verification. The SOC records the number of each communication data packet received and periodically sends the total number of communication data packets to the MCU according to the preset communication protocol. The MCU compares the number of each communication data packet sent by the SOC with the number of transmissions stored locally. If they are inconsistent, the lost communication data packet can be determined and the lost communication data packet can be resent to the SOC. By adopting this periodic verification method, the consistency of data transmission and reception between the MCU and SOC is guaranteed, thereby ensuring the reliability of communication.
[0082] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0083] FIG7 is a schematic diagram of the structure of a vehicle communication device provided by an exemplary embodiment of the present application, which is applied to the MCU contained in the smart cockpit of a vehicle. As shown in FIG7 , the vehicle communication device 70 includes a receiving module 71, a responding module 72, and a sending module 73, wherein:
[0084] A receiving module 71 is configured to receive a target signal sent by the ECU, the target signal carrying first communication data;
[0085] a response module 72 for generating, in response to detecting a change in the first communication data relative to the second communication data, a first communication data packet including a signal identifier of the target signal and the first communication data using an incremental communication method, wherein the second communication data is included in a previous signal sent by the ECU to the MCU;
[0086] The sending module 73 is configured to send a first communication data packet to the SOC.
[0087] In one possible implementation, the signal identifier includes a table index number, a frame index number, and a signal index number. The table index number corresponds to a table containing signals, and different tables contain signals with different signal periods. The same table contains at least one frame of signals. The frame index number is used to uniquely identify the frame, and the signal index is used to uniquely identify the signal. Response module 72 may be specifically configured to, according to a preset incremental communication data packet strategy, insert the table index number, frame index number, and signal index number of the target signal into the header of a first communication data packet, and insert the first communication data into the data field of the first communication data packet, thereby obtaining a first communication data packet containing the signal identifier of the target signal and the first communication data, thereby performing incremental communication.
[0088] In one possible embodiment, M target signals respectively transmitted by M ECUs are simultaneously received, and communication data carried by N of the M target signals changes, where M and N are both positive integers, and M is greater than or equal to N. The response module 72 may also be configured to: before generating a first communication data packet including a signal identifier of the target signal and first communication data in an incremental communication manner, obtain a table index number and a frame index number of each target signal for the N target signals whose communication data has changed; and determine that the table index numbers and frame index numbers of the N target signals whose communication data has changed are the same.
[0089] In one possible implementation, the response module 72 can also be used for: if the table index numbers of the N target signals whose communication data have changed are the same, and the frame index numbers of the N target signals whose communication data have changed are different, then the N target signals whose communication data have changed are grouped according to the frame index numbers; for the target signals in each group, the above-mentioned step of using the incremental communication method to generate a first communication data packet containing a signal identifier of the target signal and the first communication data is executed.
[0090] In one possible implementation, the response module 72 can also be used for: if the table index numbers of the N target signals whose communication data have changed are different, and the frame index numbers of the N target signals whose communication data have changed are different, then the N target signals whose communication data have changed are grouped according to the table index number and the frame index number; for the target signal in each group, the above-mentioned step of using the incremental communication method to generate a first communication data packet containing the signal identifier of the target signal and the first communication data is executed.
[0091] In one possible implementation, the SOC records the number of received first communication data packets according to the table index number and the frame index number, and the MCU records the number of sent first communication data packets according to the table index number and the frame index number. In this case:
[0092] The receiving module 71 may also be configured to receive a first count value sent by the SOC, where the first count value is used to indicate the number of first communication data packets including a target table index number and a target frame index number;
[0093] The response module 72 may also be configured to determine whether a first count value is consistent with a second count value, where the second count value indicates the number of first communication data packets including a target table index number and a target frame index number sent by the MCU to the SOC; and to determine if the target communication data packet is lost if the first count value is inconsistent with the second count value;
[0094] The sending module 73 may also be specifically configured to send a target communication data packet to the SOC.
[0095] In one possible implementation, the receiving module 71 can also be used to: receive a second communication data packet sent by the SOC, the second communication data packet carries a first count value, the second communication data packet carries multiple first count values, and different first count values correspond to different target table index numbers and / or target frame index numbers.
[0096] The vehicle communication device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principles and beneficial effects are similar and will not be repeated here.
[0097] It should be noted that it should be understood that the division of the various modules of the above device is merely a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. Moreover, these modules can all be implemented in the form of software called by a processing element; or they can all be implemented in the form of hardware; or some modules can be implemented in the form of software called by a processing element, and some modules can be implemented in the form of hardware. For example, the processing module can be a separately established processing element, or it can be integrated into a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called by a processing element of the above device to perform the functions of the above processing module. The implementation of other modules is similar. In addition, these modules can all or partly be integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by the hardware integrated logic circuit in the processor element or by instructions in the form of software.
[0098] For example, the above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented by scheduling program code through a processing element, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0099] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. Available media may be magnetic media (eg, floppy disks, hard disks, tapes), optical media (eg, Digital Video Discs (DVDs)), or semiconductor media (eg, solid state disks (SSDs)).
[0100] FIG8 is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. As shown in FIG8 , the electronic device 80 includes: at least one processor 81, a memory 82, a communication interface 83, and a system bus 84. The memory 82 and the communication interface 83 are connected to the processor 81 via the system bus 84 and communicate with each other. The memory 82 is used to store instructions, the communication interface 83 is used to communicate with other devices, and the processor 81 is used to call instructions in the memory to execute the method steps provided in the above-mentioned vehicle communication method embodiment. The specific implementation method and technical effects are similar and will not be repeated here.
[0101] The system bus 84 mentioned in FIG8 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The system bus 84 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the figure shows only one bus line, but this does not mean that there is only one bus or only one type of bus.
[0102] The memory 82 may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0103] The processor 81 can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0104] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed, they are used to implement the method steps in the above-mentioned method embodiment. The specific implementation method and technical effects are similar and will not be repeated here.
[0105] An embodiment of the present application also provides a computer program product, including a computer program. When the computer program is executed, the method steps in the above method embodiment are implemented. The specific implementation method and technical effects are similar and will not be repeated here.
[0106] The embodiment of the present application also provides a computer program, which, when executed on a computer, enables the computer to execute the method steps in the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.
[0107] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0108] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
[0109] Still other aspects will become apparent upon reading and understanding the accompanying drawings and detailed description.
Claims
1. A vehicle communication method, applied to a motor control unit MCU included in a smart cockpit of a vehicle, wherein the smart cockpit also includes a system on chip SOC for signal interaction with the MCU, the vehicle communication method comprising: Receiving a target signal sent by an electronic control unit ECU, wherein the target signal carries first communication data; In response to detecting that the first communication data changes relative to the second communication data, generating a first communication data packet including a signal identifier of the target signal and the first communication data by using an incremental communication method, wherein the second communication data is carried in a previous signal sent by the ECU to the MCU; The first communication data packet is sent to the SOC.
2. The vehicle communication method according to claim 1, wherein: The signal identifier includes a table index number, a frame index number and a signal index number. The table corresponding to the table index number contains signals. The signal periods of the signals contained in different tables are different. The same table contains at least one frame of signals. The frame index number is used to uniquely identify the frame, and the signal index is used to uniquely identify the signal. The step of adopting an incremental communication method to generate a first communication data packet including a signal identifier of the target signal and the first communication data comprises: According to the preset incremental communication data packet strategy, the table index number, frame index number and signal index number of the target signal are filled into the packet header of the first communication data packet, and the first communication data is filled into the data field of the first communication data packet to obtain the first communication data packet containing the signal identifier of the target signal and the first communication data for incremental communication.
3. The vehicle communication method according to claim 2, wherein M target signals respectively sent by M ECUs are received at the same time, and the communication data carried by N target signals among the M target signals changes, M and N are both positive integers, and M is greater than or equal to N; Before the incremental communication method is used to generate a first communication data packet including a signal identifier of the target signal and the first communication data, the vehicle communication method further includes: For N target signals whose communication data have changed, obtaining a table index number and a frame index number of each target signal; It is determined that the table index numbers and frame index numbers of the target signals whose communication data have changed are the same.
4. The vehicle communication method according to claim 3, further comprising: If the table index numbers of the N target signals whose communication data have changed are the same, and the frame index numbers of the N target signals whose communication data have changed are different, the N target signals whose communication data have changed are grouped according to the frame index numbers; For the target signal in each group, the step of using the incremental communication method to generate a first communication data packet including the signal identifier of the target signal and the first communication data is performed.
5. The vehicle communication method according to claim 3, further comprising: If the table index numbers of the N target signals whose communication data have changed are different, and the frame index numbers of the N target signals whose communication data have changed are different, the N target signals whose communication data have changed are grouped according to the table index number and the frame index number; For the target signal in each group, the step of using the incremental communication method to generate a first communication data packet including the signal identifier of the target signal and the first communication data is performed.
6. The vehicle communication method according to any one of claims 1 to 5, wherein the SOC records the number of first communication data packets received according to the table index number and the frame index number, and the MCU records the number of first communication data packets sent according to the table index number and the frame index number; The vehicle communication method further includes: receiving a first count value sent by the SOC, where the first count value is used to represent the number of first communication data packets including a target table index number and a target frame index number; Determine whether the first count value is consistent with a second count value, where the second count value is used to represent the number of first communication data packets including the target table index number and the target frame index number sent by the MCU to the SOC; If the first count value is inconsistent with the second count value, determining the target communication data packet that is lost; The target communication data packet is sent to the SOC.
7. The vehicle communication method according to claim 6, wherein: The receiving a first count value sent by the SOC includes: A second communication data packet sent by the SOC is received, wherein the second communication data packet carries the first count value, and the second communication data packet carries multiple first count values, and different first count values correspond to different target table index numbers and / or target frame index numbers.
8. A vehicle communication device, applied to a motor control unit MCU contained in a smart cockpit of a vehicle, wherein the smart cockpit also contains a system on chip SOC for signal interaction with the MCU, and the vehicle communication device comprises: A receiving module, used for receiving a target signal sent by an electronic control unit ECU, wherein the target signal carries first communication data; a response module, configured to respond to a detection that the first communication data changes relative to the second communication data, and to generate a first communication data packet including a signal identifier of the target signal and the first communication data in an incremental communication manner, wherein the second communication data is carried in the last communication data packet sent by the ECU to the MCU; in signal; A sending module is used to send the first communication data packet to the SOC.
9. An electronic device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions to implement the vehicle communication method according to any one of claims 1 to 7. 10 . A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed, the vehicle communication method according to claim 1 is implemented.
11. A computer program product, comprising a computer program, wherein when the computer program is executed, the method according to any one of claims 1 to 7 is implemented.
12. A computer program, wherein when the computer program is executed on a computer, the computer executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Vehicle communication interaction method and system and electronic equipment
CN115604052A
Vehicle communication method and device and storage medium
CN117118775A
Data processing method and system, computer equipment and storage medium
CN118432971A
Low-power can management
US20170005828A1