UART-based vehicle-mounted communication method, device and equipment

By adopting multi-channel dynamic allocation and unified data frame format in UART communication between IVI and MCU, the problem of insufficient efficiency, reliability and security in the on-board system of UART communication solutions is solved, and efficient and reliable communication and timely feedback are achieved.

CN120475061AInactive Publication Date: 2025-08-12NANJING COOWOR ZHIXING TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510984476.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-08-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing UART communication solutions are difficult to meet the high requirements of communication efficiency, reliability and security in vehicle-mounted communication systems. The protocol structure is not flexible enough, the data packet format is not unified enough, and the error handling mechanism is not perfect enough.

Method used

By using multiple communication channels between the IVI and the MCU, dynamically allocate the target channel to send control instructions in parallel based on load information, use a unified data frame format to generate and analyze control instructions, and promptly feedback the operation results to achieve multi-channel communication and error correction.

Benefits of technology

It improves communication efficiency and reliability, ensures balanced utilization of each channel, enhances users' trust and satisfaction with the system, and a timely feedback mechanism improves users' understanding of operation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120475061A_ABST
    Figure CN120475061A_ABST
Patent Text Reader

Abstract

The invention provides a UART-based vehicle-mounted communication method, device and equipment, and relates to the technical field of communication, the UART-based vehicle-mounted communication method, device and equipment are applied to an IVI of a vehicle-mounted communication system, the vehicle-mounted communication system further comprises an MCU and a CAN controller, the IVI and the MCU are connected through a plurality of communication channels, the MCU and the CAN controller are in communication connection, and the method comprises the following steps: responding to a service demand of a user, and sending the service demand of the user to the vehicle-mounted communication system; and generating a control instruction according to a preset data frame format. And based on the load information of all the communication channels, determining a plurality of target communication channels for sending the control instruction. And sending the control instruction to the MCU in parallel through the plurality of target communication channels. And receiving a feedback instruction generated by the MCU based on the control instruction, extracting an operation result from the feedback instruction, and displaying the operation result to a user. The feedback instruction is obtained by the MCU from the hardware equipment and / or the CAN controller based on the control instruction. The problem that an existing UART communication scheme is difficult to meet the high requirements of a vehicle-mounted communication system for communication efficiency, reliability and safety can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a UART-based vehicle-mounted communication method, device, and equipment. Background Art

[0002] With the increasing degree of automotive electronics, modern vehicles are integrating an increasing number of microcontroller units (MCUs) and in-vehicle infotainment (IVI) systems. Currently, communication between MCUs and IVIs primarily involves the controller area network (CAN) bus, the serial peripheral interface (SPI) protocol, the inter-integrated circuit (I2C), and the universal asynchronous receiver / transmitter (UART). While the CAN bus is widely used in the automotive sector for its exceptional reliability, its limited bandwidth is increasingly unable to meet the growing demand for data transmission. SPI and I2C excel in short-distance communication due to their high transmission rates. However, over longer distances, they are susceptible to external interference, resulting in reduced data transmission stability. In contrast, the UART, with its simple hardware implementation, good reliability, and moderate transmission speed, has become a key option for MCU-IVI communication.

[0003] However, existing UART-based communication solutions present several challenges that need to be addressed. For example, the protocol structure is not flexible enough, the data packet format is not uniform, and the error handling mechanism is not perfect. These issues make it difficult for existing UART communication solutions to meet the high efficiency, reliability, and security requirements of in-vehicle communication systems. Summary of the Invention

[0004] The purpose of this application is to provide a UART-based vehicle-mounted communication method, device and equipment to solve the problem that the current UART communication solution is difficult to meet the high requirements of the vehicle-mounted communication system for communication efficiency, reliability and security.

[0005] In the first aspect, an embodiment of the present application provides a UART-based vehicle communication method, which is applied to an IVI of a vehicle communication system. The vehicle communication system also includes an MCU and a CAN controller. The IVI and the MCU are connected through multiple communication channels, and the MCU and the CAN controller are communicated. The method includes: generating control instructions in accordance with a preset data frame format in response to the user's business needs. Based on the load information of all communication channels, multiple target communication channels for sending control instructions are determined. The control instructions are sent to the MCU in parallel through multiple target communication channels. Feedback instructions generated by the MCU based on the control instructions are received, the operation results are extracted from the feedback instructions, and the operation results are displayed to the user. The feedback instructions are obtained by the MCU from the hardware device and / or the CAN controller based on the control instructions.

[0006] In the UART-based in-vehicle communication method adopted in the embodiment of the present application, the IVI generates control instructions in accordance with a preset data frame format in response to the user's business needs. By using a unified data frame format, the reliability of the data transmission process can be guaranteed. Based on the load information of the communication channel, the target communication channel is screened from the communication channels used between the MCU, and the control instructions are sent to the MCU in parallel through multiple target communication channels. This dynamic allocation mechanism can avoid overloading of a single communication channel, ensure that the utilization rate of each channel is more balanced, and improve communication efficiency. Due to the use of multi-channel communication, the IVI can more easily detect and correct errors that may occur during the transmission process. For example, if the data received by a channel is erroneous, the system can use the correct data from other channels to correct it, thereby improving the reliability of data transmission. At the same time, the feedback instructions generated by the MCU based on the control instructions are received, and the operation results are extracted from the feedback instructions, and then the operation results are displayed to the user. This timely feedback mechanism allows users to quickly understand the execution status and operation results of the instructions, improving user satisfaction and trust in the system.

[0007] In one possible implementation, the load information includes data flow, queue length, and transmission delay. Determining multiple target communication channels for sending control instructions based on the load information of all communication channels includes: determining, for any first communication channel among all communication channels, a first load score for the first communication channel based on first data flow, first queue length, and first transmission delay in first load information of the first communication channel. If the first load score of the first communication channel is less than or equal to a load score threshold, determining the first communication channel as the target communication channel.

[0008] One possible implementation method for sending control instructions to an MCU in parallel via multiple target communication channels includes: dividing the control instructions into multiple data packets; dynamically allocating all data packets to each target communication channel based on load information of each target communication channel; and sending each data packet to the MCU via the target communication channel corresponding to each data packet.

[0009] One possible implementation involves dynamically allocating all data packets to each target communication channel based on load information of each target communication channel, including: determining the transmission capacity of each target communication channel based on the load information of each target communication channel; and determining the order and number of data packets to be transmitted by each target communication channel based on the transmission capacity of each target communication channel.

[0010] One possible implementation method is to generate a control instruction according to a preset data frame format, including: determining an operation type and operation information corresponding to the business requirement according to the business requirement, and encapsulating the operation type and operation information into a control instruction according to the data frame format.

[0011] In a second aspect, an embodiment of the present application provides a UART-based vehicle communication method, which is applied to an MCU of an in-vehicle communication system. The in-vehicle communication system also includes an IVI and a CAN controller. The MCU and the IVI are connected via multiple communication channels, and the MCU and the CAN controller are in communication connection. The method includes: receiving a control instruction sent by the IVI. The control instruction is generated by the IVI in response to the user's business needs and sent to the MCU in a preset data frame format. After verifying that the control instruction is correct, the control instruction is parsed and processed to obtain the business needs. Based on the business needs, the business results are determined, and the business results are encapsulated into feedback instructions in a preset data frame format. The business results are obtained by the MCU from the hardware device and / or the CAN controller based on the business needs. Based on the load conditions of the multiple communication channels, at least one target communication channel for sending the feedback instruction is determined. The feedback instruction is sent to the IVI in parallel via the at least one target communication channel, so that after receiving the feedback instruction, the IVI extracts the business results from the feedback instruction and displays the business results to the user.

[0012] In the UART-based in-vehicle communication method provided in the embodiment of the present application, the MCU can determine the target communication channel for sending control instructions based on the load information of all communication channels. This dynamic allocation mechanism can avoid overloading of a single communication channel, ensure more balanced utilization of each communication channel, and improve the communication efficiency between the MCU and the IVI.

[0013] In one possible implementation, determining a service result based on a service requirement includes: sending a query request to a hardware device according to the service requirement, so that the hardware device returns a service result based on the query request; and receiving the service result.

[0014] One possible implementation method for determining a service result based on a service requirement includes: generating a CAN message based on the service requirement; sending the CAN message to a CAN controller so that the CAN controller parses the CAN message to obtain the service requirement; determining a service result based on the service requirement; and returning the service result; and receiving the service result.

[0015] In a third aspect, an embodiment of the present application provides a UART-based vehicle-mounted communication device, which is applied to the IVI of the vehicle-mounted communication system. The vehicle-mounted communication system also includes an MCU and a CAN controller. The IVI and the MCU are connected through multiple communication channels, and the MCU and the CAN controller are communicated. The device includes: a generation module, a determination module, a sending module and a display module.

[0016] The generation module is used to generate control instructions according to a preset data frame format in response to the user's business needs.

[0017] The determination module is used to determine multiple target communication channels for sending control instructions based on load information of all communication channels.

[0018] The sending module is used to send control instructions to the MCU in parallel through multiple target communication channels.

[0019] The display module is used to receive feedback instructions generated by the MCU based on the control instructions, extract the operation results from the feedback instructions, and display the operation results to the user. The feedback instructions are obtained by the MCU from the hardware device and / or CAN controller based on the control instructions.

[0020] In the fourth aspect, an embodiment of the present application provides a UART-based vehicle-mounted communication device, which is applied to an MCU of a vehicle-mounted communication system. The vehicle-mounted communication system also includes an IVI and a CAN controller. The MCU and the IVI are connected through multiple communication channels, and the MCU and the CAN controller are communicated. The device includes: a receiving module, a parsing module, a determination module and a sending module.

[0021] The receiving module is used to receive control instructions sent by the IVI. The control instructions are generated by the IVI in response to user business needs and sent to the MCU in a preset data frame format.

[0022] The parsing module is used to parse and process the control instructions to obtain business requirements after verifying that the control instructions are correct.

[0023] The determination module is configured to determine a service result based on service requirements and encapsulate the service result into a feedback instruction in a preset data frame format. The service result is obtained by the MCU from the hardware device and / or CAN controller based on service requirements. Based on the load of multiple communication channels, at least one target communication channel for sending the feedback instruction is determined.

[0024] The sending module is used to send the feedback instructions to the IVI in parallel through at least one target communication channel, so that after receiving the feedback instructions, the IVI extracts the business results from the feedback instructions and displays the business results to the user.

[0025] In a fifth aspect, an embodiment of the present application provides a UART-based vehicle-mounted communication device, which has the function of implementing the above-mentioned first aspect or any possible implementation of the first aspect or the second aspect or any possible implementation of the second aspect or the third aspect of the vehicle-mounted communication method based on UART. This function can be implemented by hardware or by executing corresponding software implementation by hardware. The hardware or software includes one or more modules corresponding to the above-mentioned functions.

[0026] In the sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, the computer can execute the above-mentioned first aspect or any possible implementation method of the first aspect or the second aspect or any possible implementation method of the second aspect or the UART-based vehicle communication method of the third aspect.

[0027] In the seventh aspect, an embodiment of the present application provides a computer program product containing instructions, which, when run on a computer, enables the computer to execute the UART-based vehicle communication method of the above-mentioned first aspect or any possible implementation method.

[0028] Among them, the technical effects brought about by any design method in the third to seventh aspects can be referred to the technical effects brought about by the first aspect or different possible implementation methods in the first aspect or the second aspect or different possible implementation methods in the second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0030] Figure 1A schematic structural diagram of a vehicle-mounted communication system provided in an embodiment of the present application; Figure 2 A flowchart of a UART-based vehicle communication method provided in an embodiment of the present application; Figure 3 A specific example diagram of a data frame provided in an embodiment of the present application; Figure 4 A schematic structural diagram of a UART-based vehicle-mounted communication device provided in an embodiment of the present application; Figure 5 Another structural diagram of a UART-based vehicle-mounted communication device provided in an embodiment of the present application; Figure 6 Another structural diagram of an in-vehicle communication system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0032] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.

[0033] Currently, UART-based in-vehicle communication solutions in related technologies face several pressing challenges. For example, the protocol structure of some solutions lacks flexibility, making it difficult to adapt to the customized requirements of different in-vehicle systems; data packet formats are not standardized, resulting in poor compatibility between different systems; and inadequate error handling mechanisms cannot effectively address various abnormal situations that may arise during communication. These issues make it difficult for existing UART communication solutions to fully meet the stringent standards for communication efficiency, reliability, and security required by modern in-vehicle systems.

[0034] Based on this, an embodiment of the present application provides a UART-based vehicle communication method, which can be applied to the IVI of the vehicle communication system. The vehicle communication system also includes an MCU and a CAN controller. The IVI and the MCU are connected through multiple communication channels, and the MCU and the CAN controller are communicated. The UART-based vehicle communication method includes generating control instructions in accordance with a preset data frame format in response to the user's business needs. Based on the load information of all communication channels, multiple target communication channels for sending control instructions are determined. The control instructions are sent to the MCU in parallel through multiple target communication channels. Feedback instructions generated by the MCU based on the control instructions are received, the operation results are extracted from the feedback instructions, and the operation results are displayed to the user. The feedback instructions are obtained by the MCU from the hardware device and / or the CAN controller based on the control instructions.

[0035] In the UART-based in-vehicle communication method provided by the embodiment of the present application, the IVI generates control instructions in accordance with a preset data frame format in response to the user's business needs. By using a unified data frame format, the reliability of the data transmission process can be guaranteed. Based on the load information of the communication channel, the target communication channel is screened from the communication channels used between the MCU, and the control instructions are sent to the MCU in parallel through multiple target communication channels. This dynamic allocation mechanism can avoid overloading of a single communication channel, ensure that the utilization rate of each channel is more balanced, and improve communication efficiency. Due to the use of multi-channel communication, the IVI can more easily detect and correct errors that may occur during the transmission process. For example, if the data received by a channel is erroneous, the system can use the correct data from other channels to correct it, thereby improving the reliability of data transmission. At the same time, the feedback instructions generated by the MCU based on the control instructions are received, and the operation results are extracted from the feedback instructions, and then the operation results are displayed to the user. This timely feedback mechanism allows users to quickly understand the execution status and operation results of the instructions, improving user satisfaction and trust in the system.

[0036] The embodiments of the present application will be described below with reference to specific drawings.

[0037] On the one hand, the embodiment of the present application provides a vehicle-mounted communication system. Figure 1 As shown, the in-vehicle communication system 100 includes an IVI 101, an MCU 102, and a CAN controller 103. The IVI 101 is communicatively connected to the MCU 102, and the MCU 102 is communicatively connected to the CAN controller 103.

[0038] For example, the IVI 101 and the MCU 102 may be connected via UART communication, and multiple communication channels may exist between the IVI 101 and the MCU 102 .

[0039] Specifically, the IVI 101 can be used to provide an interactive interface for vehicle users, allowing them to interact with the vehicle users through this interactive interface. The IVI 101 is used to receive user service requirements, such as touch operations and voice commands, and generate corresponding control instructions based on these service requirements. The IVI 101 can exchange data with the MCU 102 via a UART communication interface. The IVI 101 sends the user's service requirements to the MCU 102 in a preset data frame format, receives feedback instructions from the MCU 102, extracts the operation results from them, and displays them to the user. Furthermore, the IVI 101 can also receive feedback instructions from the MCU 102, extract the operation results from them, and display them to the user in a graphical or textual format through the interactive interface.

[0040] The IVI 101 and the MCU 102 are connected via a UART communication connection. This communication connection can support multiple communication channels, allowing multiple data streams to be transmitted simultaneously, thereby improving the efficiency and reliability of data transmission.

[0041] MCU 102 receives, parses, and processes control commands from IVI 101. Based on the command content, MCU 102 can interact directly with the vehicle's hardware devices or send the command content to the vehicle's CAN bus via CAN controller 103 to obtain information or control vehicle functions. MCU 102 also receives CAN bus feedback information from CAN controller 103, organizes the data into feedback commands in a predefined data frame format, and sends them to IVI 101.

[0042] The MCU 102 can be connected to the CAN controller 103 via a CAN bus.

[0043] The CAN controller 103 is used to convert the instructions sent by the MCU 102 into signals that comply with the CAN bus protocol and send these signals to the CAN bus. At the same time, the CAN controller 103 can also be used to receive data on the CAN bus and convert it into signals that the MCU 102 can process.

[0044] It should be noted that the above Figure 1 The illustrated in-vehicle communication system 100 is merely an example of an application scenario of the solution of the present application, and is not intended to limit the application scenario of the solution of the present application.

[0045] On the one hand, the embodiment of the present application provides a vehicle communication method based on UART, which can be deployed Figure 1 The vehicle communication system 100 shown in FIG. Figure 2 As shown, the method may include the following steps.

[0046] S201 : The IVI generates a control instruction according to a preset data frame format in response to a user's business needs.

[0047] In one possible implementation, the operation type and operation information corresponding to the business requirement are determined according to the business requirement, and the operation type and operation information are encapsulated into a control instruction in a data frame format.

[0048] Specifically, when a user initiates an operation request based on business needs through the IVI's touch screen or through a voice command, the IVI captures the operation request and converts the operation request into an operation instruction according to a preset data frame format.

[0049] For example, Figure 3 As shown, the data frame format may include the following fields: starting character HeadCode, data length Length, command byte ID, data content Data and checksum CheckSum. Among them, HeadCode is the communication starting character, and HeadCode can be 1 byte. Length is used to indicate the data length of the data frame. Length is calculated as Length = sum{ID, Data1, .., Data n, CheckSum}, and Length can be 1 byte. ID is used to indicate the command byte, which is used to identify different types of commands. ID can be 1 byte. Data is used to indicate the data content, which can contain different content depending on the command type. Data can be 0~N bytes. CheckSum is used to indicate the checksum, and CheckSum can be used to check the integrity and legality of the above data. CheckSum can be 1 byte.

[0050] For example, ID=0x6 indicates version information acquisition, which can be used to obtain information such as software version number, hardware version, VIN number, part number, supplier number, and configuration word. The Data field specifies the specific information type being queried. ID=0x86 indicates version information reporting. The MCU proactively reports system version information through this message. The master IVI responds with an ACK upon receiving this command. ID=0xD indicates factory mode data query and configuration, supporting query and configuration operations. Operable data includes software version number, hardware version, VIN number, part number, supplier number, and configuration word. ID=0x46 indicates factory mode test data acquisition, supporting information such as CAN_D1_D2 status detection, RTC detection, and Bluetooth key MAC address query. ID=0x45 indicates factory mode test data configuration, supporting settings for battery charging on / off, standby mode entry / exit, I / O voltage levels, and amplifier power. ID=0x8B indicates factory mode data reporting, used to report information such as software version number, hardware version, VIN number, part number, supplier number, and configuration word. ID=0x8D indicates factory mode test data reporting, which is used to report information such as battery voltage, CAN_D1_D2 status detection, watch dog status detection, and RTC detection.

[0051] This application can ensure the integrity and accuracy of instructions during transmission by standardizing the data frame format for communication between IVI and MCU, and can include the ability for the receiver to quickly identify and parse the instruction content, thereby improving the communication efficiency and pixel speed of the vehicle communication system.

[0052] S202: The IVI determines multiple target communication channels to which the control instruction is sent based on the load information of all communication channels.

[0053] Specifically, IVI will monitor the load information of multiple communication channels between the MCU and the IVI in real time. The load information includes data flow, queue length and transmission delay. IVI can determine the data flow of the communication channel based on the amount of data transmitted per channel per unit time, IVI can determine the queue length of the communication channel based on the number of data packets currently waiting to be sent, and IVI can determine the transmission delay of the communication channel based on the time required for data to be sent and received. Based on the load information of all communication channels, IVI can use a preset load scoring algorithm to evaluate the load status of each channel, such as assigning different load weights to the data flow, queue length and transmission delay, and then adding them together to obtain a load score. If the load score of a channel is lower than the preset load score threshold, it is considered that the current load of the channel is light and can be used as the target communication channel.

[0054] In one possible implementation, for any first communication channel among all communication channels, a first load score of the first communication channel is determined based on a first data flow rate, a first queue length, and a first transmission delay of first load information of the first communication channel. If the first load score of the first communication channel is less than or equal to a load score threshold, the first communication channel is determined to be a target communication channel.

[0055] By comprehensively considering the load information of each communication channel, the IVI can select the most suitable target communication channels from all communication channels to send control instructions. This process can prevent the control instructions from being delayed and blocked due to the overload of a single communication channel, thereby improving the communication efficiency between the IVI and the MCU.

[0056] S203, the IVI sends the control instructions to the MCU in parallel through multiple target communication channels.

[0057] Specifically, after determining multiple target communication channels, the IVI divides the control instructions into multiple data packets and dynamically allocates each data packet to each target communication channel based on the load information and transmission capacity of the multiple communication channels.

[0058] One possible implementation method is to divide the control instructions into multiple data packets and dynamically allocate all the data packets to each target communication channel according to the load information of each target communication channel.

[0059] Specifically, the transmission capacity of each target communication channel is determined based on the load information of each target communication channel, and the sending order and quantity of data packets transmitted by each target communication channel are determined based on the transmission capacity of each target communication channel.

[0060] Then, each data packet is sent to the MCU through the target communication channel corresponding to each data packet.

[0061] For example, if target channel A has a strong transmission capability and a low current load, the IVI can simultaneously assign multiple data packets to target channel A. If target channel B has a relatively weak transmission capability or a high current load, the IVI can assign a small number of data packets to target channel B. During the actual transmission process, the IVI arranges the sending order of data packets based on the current status of each channel to ensure that high-priority data packets are sent first.

[0062] By dividing control instructions into multiple data packets and sending them in parallel to the MCU via multiple target communication channels, the present application significantly improves data transmission efficiency, reduces the total time it takes to transmit control instructions, and thus speeds up the MCU's response to control instructions. Furthermore, by dynamically allocating data packets based on the load information and transmission capacity of the communication channels, the present application ensures that multiple communication channels between the IVI and the MCU are efficiently utilized, preventing some communication channels from being idle while others are overloaded, and further improving the communication efficiency and reliability of the in-vehicle communication system.

[0063] S204, the MCU receives the control instruction sent by the IVI.

[0064] The control instructions are generated by the IVI in accordance with a preset data frame format and sent to the MCU in response to the user's business needs.

[0065] Specifically, the MCU monitors the communication channel with the IVI, receives data packets sent by the IVI, and splices multiple data packets into control instructions. After receiving the control instructions, the MCU verifies the integrity and accuracy of the control instructions, such as checking whether the data format is correct and whether the checksum matches.

[0066] S205 , when the MCU verifies that the control instruction is correct, it parses and processes the control instruction to obtain the business requirements.

[0067] Specifically, once the MCU confirms the control instruction is correct, it parses the instruction byte by byte according to the preset data frame format. The MCU extracts the user's business needs from the control instruction by identifying key fields such as the operation type and operation information.

[0068] S206, the MCU determines the service result based on the service requirement, and encapsulates the service result into a feedback instruction according to a preset data frame format.

[0069] The business results are obtained by the MCU from the hardware device and / or CAN controller based on business requirements.

[0070] In one possible implementation, according to business requirements, a query request is sent to the hardware device, so that the hardware device returns a business result based on the query request. The business result is received.

[0071] For example, when the MCU needs to obtain the status or information of a specific hardware device, it generates a query request based on business needs. This request contains information such as the device identifier and the required data type. The MCU sends the query request to the hardware device via a dedicated communication interface. After receiving the request, the hardware device performs the corresponding operation, such as reading sensor data, and returns the business results to the MCU through the same interface. The MCU receives the business results.

[0072] Another possible implementation method is to generate a CAN message based on the service requirements, send the CAN message to the CAN controller, and have the CAN controller parse the CAN message to obtain the service requirements, determine the service results based on the service requirements, and return the service results. The service results are then received.

[0073] For example, the MCU generates a CAN protocol message based on business needs, containing information such as operation instructions and the target device address. The MCU sends the CAN message to the CAN controller, which parses the message content, extracts the target device address and operation instructions, and converts them into signals recognizable by the hardware device. After the hardware device performs the corresponding operation, it feeds the execution result back to the CAN controller, which then encapsulates the result into a CAN message and sends it back to the MCU.

[0074] S207: The MCU determines at least one target communication channel to send a feedback instruction based on load conditions of the multiple communication channels.

[0075] It should be noted that the process of the MCU determining at least one target communication channel for sending feedback instructions based on the load conditions of multiple communication channels can refer to the step of the IVI determining multiple target communication channels for sending control instructions based on the load information of all communication channels recorded in S202 above, and this application will not go into details about this.

[0076] S208 , the MCU sends the feedback instruction to the IVI in parallel through at least one target communication channel.

[0077] It should be noted that the process of the MCU sending the feedback instruction to the IVI in parallel through at least one target communication channel can refer to the step of the IVI sending the control instruction to the MCU in parallel through multiple target communication channels recorded in S203 above, and this application will not elaborate on this.

[0078] S209 , the IVI receives a feedback instruction generated by the MCU based on the control instruction, extracts an operation result from the feedback instruction, and displays the operation result to the user.

[0079] The feedback instruction is obtained by the MCU from the hardware device and / or the CAN controller based on the control instruction.

[0080] Specifically, after receiving the MCU's feedback based on the control command, the IVI extracts the operation result from the feedback according to a preset data frame format. Finally, the IVI displays the operation result to the user in a graphical or textual form through the user interface.

[0081] Furthermore, the UART-based vehicle communication method provided in the embodiment of the present application may also include: the MCU monitors the data stream on the CAN bus through the CAN controller at a preset period, and extracts the key operating parameters of the vehicle, such as vehicle speed, engine speed, fuel level, battery status, etc. A predefined operating parameter threshold is set inside the MCU to evaluate the key operating parameters obtained from the CAN bus. When a key operating parameter exceeds the operating parameter threshold, such as a sudden change in vehicle speed or excessive engine temperature, the MCU immediately encapsulates the relevant information according to a preset data frame format. These data frames contain necessary information in a preset format, such as the type of anomaly, severity, and related parameter values. The MCU sends these data frames to the IVI through the UART communication interface.

[0082] The IVI continuously monitors data from the MCU via the UART communication interface. Upon receiving reported data, the IVI's communication module first verifies the integrity and accuracy of the data, then parses the data frame to extract status information. Based on this received status information, the IVI updates its display interface to present the latest vehicle status to the user. In the event of an abnormality, the IVI can also trigger appropriate actions, such as sounding an alarm, displaying a warning window, or adjusting vehicle settings, to ensure that users are promptly aware and can take necessary action.

[0083] Furthermore, the UART-based vehicle communication method provided in the embodiment of the present application may further include a power-on initialization phase. The power-on initialization phase may be implemented by the following steps.

[0084] When the IVI and MCU are powered on, they each initialize their UART communication modules. The MCU also initializes its communication interface with the CAN controller, establishing a connection to the vehicle's CAN bus to receive and send vehicle-related control and status information. This initialization process may include setting communication parameters such as baud rate, data bits, parity, and stop bits to ensure proper data transmission between the two parties. For example, the communication parameters might be 115200 bit / s, 8 data bits, no parity, and 1 stop bit.

[0085] After the IVI and MCU are initialized, the IVI sends a handshake message (ID = 0x01) to the MCU to initiate the communication connection. Upon receiving the handshake message, the MCU parses and verifies it. If the message is valid, the MCU responds with an ACK message, confirming the successful connection. Once the connection is established, the MCU proactively reports all status information that requires synchronization, enabling the IVI to obtain the vehicle's initial status.

[0086] After establishing a communication connection between the IVI and MCU, the IVI sends a heartbeat message (ID = 0x02) to the MCU every second to maintain the connection. Upon receiving the heartbeat message, the MCU responds with an ACK message to confirm receipt. If the MCU does not receive any messages (including heartbeat messages) within two consecutive seconds, it assumes the connection with the IVI is broken and reopens the UART connection to re-establish communication.

[0087] Based on user operations or system requirements, the IVI sends command messages to the MCU. These messages can involve various operations, such as vehicle control and status query. The MCU receives and interprets the command message, performs the corresponding operation, and then responds with an ACK message to confirm that the command has been received and processed.

[0088] The MCU proactively reports status information to the IVI based on changes in vehicle status or pre-set reporting conditions. Upon receiving this status information, the IVI responds with an ACK message to confirm receipt. If the MCU receives a command message containing an unsupported command ID, the MCU responds with an error message, informing the IVI that the command cannot be executed. If the checksum of a received packet does not match, the MCU or IVI discards the packet to prevent erroneous data from impacting system operation. If multiple erroneous packets are received consecutively, the system triggers a reconnection mechanism to ensure reliable and stable communication.

[0089] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the working principle of the device. It can be understood that in order to realize the above functions, the UART-based vehicle-mounted communication device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the 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 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 and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0090] In the embodiment of the present application, the UART-based vehicle communication device can be divided into functional modules according to the above method example. For example, each functional module can be divided according to each function, 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 software functional modules.

[0091] It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods. Figure 4 FIG. 1 shows a possible schematic diagram of the composition of the UART-based vehicle-mounted communication device involved in the above and embodiments. Figure 4 As shown, the UART-based in-vehicle communication device 400 may include: a generating module 401 , a determining module 402 , a sending module 403 and a display module 404 .

[0092] The generating module 401 is used to support the UART-based vehicle communication device 400 to execute Figure 3 S201 in the illustrated UART-based vehicle communication method.

[0093] Determining module 402, used to support the UART-based vehicle communication device 400 to execute Figure 2 S202 in the illustrated UART-based vehicle communication method.

[0094] The sending module 403 is used to support the UART-based vehicle communication device 300 to execute Figure 2 S203 in the illustrated UART-based vehicle communication method.

[0095] Display module 404, used to support the UART-based vehicle communication device 300 to execute Figure 2 S209 in the illustrated UART-based vehicle communication method.

[0096] In one possible implementation, the load information includes data flow, queue length, and transmission delay. The UART-based in-vehicle communication device provided in an embodiment of the present application can also be used to: for any first communication channel among all communication channels, determine a first load score for the first communication channel based on the first data flow, first queue length, and first transmission delay of the first load information of the first communication channel. If the first load score of the first communication channel is less than or equal to a load score threshold, the first communication channel is determined to be the target communication channel.

[0097] In one possible implementation, the UART-based in-vehicle communication device provided in an embodiment of the present application can also be used to divide control instructions into multiple data packets. Based on the load information of each target communication channel, all data packets are dynamically allocated to each target communication channel. Each data packet is sent to the MCU via the target communication channel corresponding to each data packet.

[0098] In one possible implementation, the UART-based in-vehicle communication device provided in an embodiment of the present application may also be used to determine the transmission capacity of each target communication channel based on the load information of each target communication channel. Based on the transmission capacity of each target communication channel, the transmission order and number of data packets transmitted by each target communication channel are determined.

[0099] In one possible implementation, the UART-based vehicle communication device provided in the embodiment of the present application can also be used to: determine the operation type and operation information corresponding to the business requirement according to the business requirement, and encapsulate the operation type and operation information into a control instruction in a data frame format.

[0100] The UART-based vehicle-mounted communication device 400 provided in the embodiment of the present application is used to perform the above Figure 3 The UART-based in-vehicle communication method shown can therefore achieve the same effect as the above-mentioned UART-based in-vehicle communication method.

[0101] like Figure 5 As shown, the UART-based vehicle-mounted communication device 500 may include: a receiving module 501 , a parsing module 502 , a determining module 503 and a sending module 504 .

[0102] The receiving module 501 is used to support the UART-based vehicle communication device 500 to execute Figure 3 S204 in the illustrated UART-based vehicle communication method.

[0103] Parsing module 502, used to support the UART-based vehicle communication device 500 to execute Figure 3 S205 in the illustrated UART-based vehicle communication method.

[0104] Determining module 503, used to support the UART-based vehicle communication device 500 to execute Figure 3 S207 and S207 in the illustrated UART-based vehicle communication method.

[0105] The sending module 504 is used to support the UART-based vehicle communication device 500 to execute Figure 3 S208 in the illustrated UART-based vehicle communication method.

[0106] In one possible implementation, the UART-based vehicle-mounted communication device provided in the embodiment of the present application can also be used to send a query request to the hardware device according to business needs, so that the hardware device returns a business result based on the query request. Receive the business result.

[0107] In one possible implementation, the UART-based in-vehicle communication device provided in the embodiments of the present application can also be used to generate CAN messages based on service requirements. The CAN messages are sent to a CAN controller, which parses the CAN messages to obtain service requirements, determines service results based on the service requirements, and returns the service results. The service results are then received.

[0108] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0109] The UART-based vehicle communication device 500 provided in the embodiment of the present application is used to perform the above Figure 3 The UART-based in-vehicle communication method shown can therefore achieve the same effect as the above-mentioned UART-based in-vehicle communication method.

[0110] An embodiment of the present application also provides a UART-based vehicle-mounted communication device, which can execute the UART-based vehicle-mounted communication method and related steps in the above method embodiment.

[0111] An embodiment of the present application also provides a computer-readable storage medium having instructions stored thereon, which, when executed, execute the UART-based vehicle communication method and related steps in the above-mentioned method embodiment.

[0112] An embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the UART-based vehicle communication method and related steps in the above method embodiment.

[0113] In some embodiments, the methods described herein may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of manufacture.

[0114] The embodiment of the present application also provides a vehicle-mounted communication system 100, such as Figure 6 As shown, the in-vehicle communication system 100 includes at least one processor 601 and at least one interface circuit 602 .

[0115] As an example, when the vehicle communication system 100 includes a processor and an interface circuit, the processor may be Figure 6The processor 601 shown in the solid line frame (or the processor 601 shown in the dotted line frame) may be Figure 6 The interface circuit 602 shown in the solid line frame (or the interface circuit 602 shown in the dotted line frame). When the vehicle communication system 100 includes two processors and two interface circuits, the two processors include Figure 6 The processor 601 shown in the solid line frame and the processor 601 shown in the dotted line frame, the two interface circuits include Figure 6 The interface circuit 602 shown in the solid line frame and the interface circuit 602 shown in the dotted line frame are not limited to this.

[0116] The processor 601 and the interface circuit 602 can be interconnected via a line. For example, the interface circuit 602 can be used to receive signals. For another example, the interface circuit 602 can be used to send signals to other devices (such as the processor 601). For example, the interface circuit 602 can read computer instructions stored in the memory and send the computer instructions to the processor 601. The processor 601 executes the instructions and, in conjunction with the input and output devices, implements the various steps in the above embodiments, such as implementing Figure 3 Of course, the vehicle communication system may also include other discrete components, which are not specifically limited in the embodiments of the present application.

[0117] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0118] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0120] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0121] 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 embodiment of the present application is essentially or the contributing part or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0122] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A UART-based vehicle communication method, characterized in that: An IVI is applied to an in-vehicle communication system, the in-vehicle communication system further comprising an MCU and a CAN controller, the IVI and the MCU being connected via multiple communication channels, and the MCU being communicatively connected to the CAN controller, the method comprising: In response to the user's business needs, generate control instructions according to the preset data frame format; determining, based on load information of all communication channels, a plurality of target communication channels for sending the control instruction; Sending the control instructions to the MCU in parallel through the plurality of target communication channels; Receive a feedback instruction generated by the MCU based on the control instruction, extract an operation result from the feedback instruction, and display the operation result to the user; the feedback instruction is obtained by the MCU from the hardware device and / or CAN controller based on the control instruction.

2. The method according to claim 1, characterized in that The load information includes data flow, queue length, and transmission delay; and determining multiple target communication channels for sending the control instruction based on the load information of all communication channels includes: For any first communication channel among all the communication channels, determining a first load score of the first communication channel according to a first data flow, a first queue length, and a first transmission delay of first load information of the first communication channel; If the first load score of the first communication channel is less than or equal to a load score threshold, the first communication channel is determined to be the target communication channel.

3. The method according to claim 1, characterized in that The sending of the control instruction to the MCU in parallel through the plurality of target communication channels includes: Dividing the control instruction into a plurality of data packets; Dynamically allocating all of the data packets to each of the target communication channels according to load information of each of the target communication channels; Each of the data packets is sent to the MCU via a target communication channel corresponding to each of the data packets.

4. The method according to claim 3, characterized in that The dynamically allocating all the data packets to each of the target communication channels according to the load information of each of the target communication channels comprises: determining the transmission capacity of each of the target communication channels according to the load information of each of the target communication channels; According to the transmission capability of each target communication channel, the sending order and quantity of the data packets transmitted by each target communication channel are determined.

5. The method according to claim 1, wherein Generating a control instruction according to a preset data frame format includes: Determining, based on the business requirement, an operation type corresponding to the business requirement and operation information corresponding to the business requirement; The operation type and the operation information are encapsulated into the control instruction according to the data frame format.

6. A UART-based vehicle communication method, characterized in that: An MCU applied to an in-vehicle communication system, the in-vehicle communication system further comprising an IVI and a CAN controller, the MCU and the IVI being connected via multiple communication channels, and the MCU and the CAN controller being communicatively connected, the method comprising: receiving a control instruction sent by the IVI; the control instruction is generated by the IVI in response to a user's business needs and sent to the MCU in a preset data frame format; When the control instruction is verified to be correct, the control instruction is parsed and processed to obtain the business requirement; Determine a business result based on the business requirement, and encapsulate the business result into a feedback instruction according to a preset data frame format; the business result is obtained by the MCU from the hardware device and / or the CAN controller based on the business requirement; Determining at least one target communication channel for sending the feedback instruction based on load conditions of the plurality of communication channels; The feedback instructions are sent in parallel to the IVI via at least one of the target communication channels, so that after receiving the feedback instructions, the IVI extracts a service result from the feedback instruction and displays the service result to the user.

7. The method according to claim 6, characterized in that Determining a business result based on the business requirement includes: Sending a query request to a hardware device according to the business requirement, so that the hardware device returns the business result based on the query request; Receive the business result.

8. The method according to claim 6, characterized in that Determining a business result based on the business requirement includes: Generate CAN messages according to the business requirements; Sending the CAN message to the CAN controller, so that the CAN controller parses the CAN message to obtain the service requirement, determines a service result according to the service requirement, and returns the service result; Receive the business result.

9. A UART-based vehicle-mounted communication device, characterized in that: An IVI applied to an in-vehicle communication system, the in-vehicle communication system further comprising an MCU and a CAN controller, the IVI and the MCU being connected via multiple communication channels, and the MCU and the CAN controller being communicatively connected, the device comprising: A generation module is used to generate control instructions according to a preset data frame format in response to user business needs; a determination module, configured to determine, based on load information of all communication channels, a plurality of target communication channels for sending the control instruction; A sending module, configured to send the control instructions to the MCU in parallel through a plurality of the target communication channels; The display module is used to receive the feedback instruction generated by the MCU based on the control instruction, extract the operation result from the feedback instruction, and display the operation result to the user; the feedback instruction is obtained by the MCU from the hardware device and / or CAN controller based on the control instruction.

10. A UART-based vehicle-mounted communication device, characterized in that: An MCU applied to an in-vehicle communication system, the in-vehicle communication system further comprising an IVI and a CAN controller, the MCU and the IVI being connected via multiple communication channels, and the MCU and the CAN controller being communicatively connected, the device comprising: A receiving module, configured to receive a control instruction sent by the IVI; the control instruction is generated by the IVI in response to a user's business needs and is sent to the MCU in a preset data frame format; A parsing module, configured to parse and process the control instruction to obtain the business requirement after verifying that the control instruction is correct; a determination module, configured to determine a service result based on the service requirement, and encapsulate the service result into a feedback instruction in a preset data frame format; the service result is obtained by the MCU from the hardware device and / or the CAN controller based on the service requirement; and determine at least one target communication channel for sending the feedback instruction based on the load conditions of the plurality of communication channels; The sending module is configured to send the feedback instruction to the IVI in parallel through at least one of the target communication channels, so that after receiving the feedback instruction, the IVI extracts the service result from the feedback instruction and displays the service result to the user.

11. A UART-based vehicle-mounted communication device, characterized in that: The UART-based in-vehicle communication device includes a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the UART-based in-vehicle communication method according to any one of claims 1 to 5 or any one of 6 to 8.

12. A machine-readable storage medium, characterized in that The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the UART-based in-vehicle communication method according to any one of claims 1 to 5 or any one of claims 6 to 8.

Citation Information

Patent Citations

  • Data stream transmission method, sending device and receiving device

    CN107623646A

  • Data processing method, system and related equipment

    CN107645430A

  • Cloud server-based vehicle control method and system and server

    CN109347854A

  • Communication method and system among multiple vehicle-mounted micro-control units

    CN111124984A

  • Data transmission optimization method and device

    CN117998457A