Communication control method of vehicle and related device
By using CAN transceivers and controllers with message filtering capabilities in the vehicle's CAN network, only the ECUs that need to be processed are woken up, thus solving the problems of energy waste and false wake-ups in the CAN network. This achieves efficient power management and network status monitoring, and avoids the generation of error frames.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SAIC MOTOR
- Filing Date
- 2024-12-05
- Publication Date
- 2026-06-05
Smart Images

Figure CN122160871A_ABST
Abstract
Description
Technical Field
[0001] This application relates to vehicle communication control technology, and more specifically, to a vehicle communication control method and related device. Background Technology
[0002] An ECU (Electronic Control Unit) is a crucial component of modern automobiles, responsible for controlling the vehicle's driving status and performing various functions. A vehicle typically contains multiple ECUs, distributed across different functional domains and communicating via a CAN bus.
[0003] In traditional CAN network management schemes for vehicles, when a network management message exists on the CAN bus, all ECUs in the vehicle will be woken up, regardless of which ECU(s) need to process the message. This results in ECUs that do not have network management messages to process being woken up, leading to a waste of vehicle energy.
[0004] In addition, some message signals on the CAN bus can interfere with the ECU, posing a risk that an ECU that does not need to be woken up may be woken up by mistake and send incorrect message indication signals. Summary of the Invention
[0005] In view of the above, this application provides the following technical solution:
[0006] The first aspect of this application provides a communication control method for a vehicle, comprising:
[0007] When the Electronic Control Unit (ECU) in sleep mode receives the first message, it controls the start of the CAN transceiver and CAN controller. The CAN transceiver is a transceiver with message filtering function.
[0008] Determine whether the first message is a network management message;
[0009] If the first message is a network management message and the first message indicates that the current electronic control unit (ECU) is the target electronic control unit, the electronic control unit (ECU) executes a wake-up procedure to process the first message after wake-up;
[0010] If the first message is not a network management message, monitor the network status and control the working status of the CAN transceiver and the CAN controller based on the network status.
[0011] In one possible implementation, after the network wake-up verification exceeds a first duration, the first message is determined to be a non-network management message.
[0012] In one possible implementation, monitoring the network status includes:
[0013] Enable the first register of the CAN controller, the value stored in the first register is used to characterize whether there is a signal on the CAN bus;
[0014] Determine whether the value in the first register changes during the second time period.
[0015] In one possible implementation, controlling the operating state of the CAN transceiver and CAN controller based on network state includes:
[0016] If the value of the first register does not change, shut down the CAN transceiver and CAN controller;
[0017] If the value of the first register changes, the current state of the CAN transceiver and CAN controller is maintained.
[0018] In one possible implementation, after maintaining the current state of the CAN transceiver and the CAN controller, the following is also included:
[0019] Control the execution of the wake-up process.
[0020] In one possible implementation, the target set of electronic control units for the first message is determined based on the user data of the first message.
[0021] A second aspect of this application provides a communication control device for a vehicle, comprising:
[0022] The first control module is used to control the start of the CAN transceiver and CAN controller when the electronic control unit (ECU) in a dormant state receives the first message. The CAN transceiver is a transceiver with message filtering function.
[0023] The message determination module is used to determine whether the first message is a network management message;
[0024] A wake-up control module is used to, when the first message is a network management message and the first message indicates that the current electronic control unit (ECU) is the target electronic control unit, execute a wake-up process to process the first message after wake-up;
[0025] The second control module is used to monitor the network status when the first message is a non-network management message, and to control the working status of the CAN transceiver and CAN controller based on the network status.
[0026] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement any of the above-described vehicle communication control methods.
[0027] A fourth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement any of the above-described vehicle communication control methods.
[0028] A fifth aspect of this application provides an electronic device applied to a vehicle, comprising at least one processor and a memory connected to the processor, wherein:
[0029] The memory is used to store computer programs;
[0030] The processor is used to execute the computer program so that the electronic device can implement any of the above-described vehicle communication control methods.
[0031] As can be seen from the above technical solutions, this application discloses a vehicle communication control method and related apparatus. The method includes: an electronic control unit (ECU) in a dormant state receives a first message and controls the start of a CAN transceiver and a CAN controller, wherein the CAN transceiver is a transceiver with message filtering function; determining whether the first message is a network management message; if the first message is a network management message and the first message indicates that the current ECU is the target ECU, the ECU executes a wake-up process to process the first message after wake-up; if the first message is not a network management message, monitoring the network status and controlling the working status of the CAN transceiver and the CAN controller based on the network status. The electronic control unit (ECU) in the above solution uses a transceiver with message filtering function. When a message is received in sleep mode, it can determine whether it is a network management message and filter out the messages that need to be processed by the current ECU, thereby waking up a partial ECU instead of all ECUs, saving overall power consumption. In addition, when the received message is not a network message, the solution can monitor the network status and control the working status of the CAN transceiver and CAN controller based on the network status, avoiding the risk that the subsequent ECUs may receive some messages and send erroneous frames after being woken up if the CAN transceiver and CAN controller are directly turned off. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0033] Figure 1This is a flowchart of a vehicle communication control method disclosed in an embodiment of this application;
[0034] Figure 2 This is a flowchart illustrating the monitoring of network status as disclosed in an embodiment of this application;
[0035] Figure 3 This is a schematic diagram of the structure of a vehicle communication control device disclosed in an embodiment of this application;
[0036] Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. Detailed Implementation
[0037] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0038] Figure 1 This is a flowchart illustrating a vehicle communication control method disclosed in an embodiment of this application. See also... Figure 1 As shown, the vehicle's communication control method may include:
[0039] Step 101: The Electronic Control Unit (ECU) in sleep mode receives the first message and controls the start of the CAN transceiver and CAN controller. The CAN transceiver is a transceiver with message filtering function.
[0040] The electronic control unit (ECU) can be any functional domain of the vehicle. In the vehicle, each ECU integrates a CAN controller, and an external CAN transceiver is also configured. The CAN transceiver can be connected to the CAN controller via an SPI interface.
[0041] During the design and selection phase, the Electronic Control Unit (ECU) chooses transceivers that support specific message wake-up, such as the TJA1145 and SIT1145. These transceivers enable control of CAN transceiver mode switching and setting of message filtering, achieving wake-up via specific messages. The specific message is defined according to user requirements and can be a single or multiple frames with a fixed ID (e.g., 0x480, 0x485), or a segment of messages (e.g., 0x490~0x4A0). Message filtering can be achieved by controlling the internal register parameters of the CAN transceiver via SPI commands.
[0042] The aforementioned mode switching refers to the ability to switch the operating mode of the CAN transceiver via control commands, such as switching from standby mode to normal mode, switching from normal mode to sleep mode, and switching from normal mode to standby mode.
[0043] Step 102: Determine whether the first message is a network management message.
[0044] To determine whether the first message is a network management message, we can parse the received CAN message data, i.e., the first message. Specifically, we can check whether the first byte of the message data field is within the agreed network segment range. If the first byte of the message data field is within the agreed network segment range, then it is a network management message; otherwise, it is not.
[0045] Step 103: If the first message is a network management message and the first message indicates that the current electronic control unit (ECU) is the target electronic control unit, the electronic control unit (ECU) executes a wake-up procedure to process the first message after wake-up.
[0046] In implementation, the vehicle's overall network can be divided into multiple Partial Network Clusters (PNCs) as needed, namely PNC1, PNC2, PNC3, etc. Based on the AUTSAR (Automotive Open System Architecture) network management protocol, the PNC information that controls the state of the local network is included in the User data portion of the network management message. The corresponding local network cluster PNC is controlled according to the bits corresponding to the User data. That is, in implementation, the target set of electronic control units of the first message can be determined based on the user data of the first message, and then it can be determined whether the current electronic control unit (ECU) is an item in the target set of electronic control units.
[0047] Tables 1 and 2 are schematic diagrams of user data storage and PNC partitioning in the message.
[0048] Table 1
[0049]
[0050] Table 2
[0051]
[0052]
[0053] Combining Tables 1 and 2, for example, if Bit 0 in User data0 is set to 1 and other Bits in User data are set to 0, then the ECU Node (target electronic control unit) contained in PNC1 under Bit 0 in User data0 will communicate normally, while the ECUs contained in other PNCs will stop sending messages, thereby achieving the filtering of specific messages, and thus reducing bus load and improving power saving efficiency.
[0054] Step 104: If the first message is not a network management message, monitor the network status and control the working status of the CAN transceiver and the CAN controller based on the network status.
[0055] In this application, when the first message is not a network management message, the CAN transceiver and CAN controller are not directly shut down. Instead, the network status is monitored. Specifically, when a non-network management message (such as a diagnostic message or an application message) is received, the CAN transceiver and CAN controller are first turned on. If it is determined that the first message is not a network management message, the need to shut down the CAN transceiver and CAN controller can be determined based on subsequent network status. The specific implementation will be described in detail in the embodiments below and will not be elaborated further here.
[0056] The vehicle communication control method described in this embodiment employs a transceiver with message filtering functionality. When a message is received in sleep mode, it can determine whether it is a network management message and filter out messages that require processing by the current electronic control unit (ECU). This allows for the wake-up of a partial ECU rather than all ECUs, saving overall power consumption. Furthermore, when the received message is not a network message, the solution can monitor the network status and control the operating status of the CAN transceiver and CAN controller based on the network status. This avoids the risk that a direct shutdown of the CAN transceiver and CAN controller might cause subsequent ECUs to receive only partial messages and send out erroneous frames after wake-up.
[0057] In the above embodiments, after the network wake-up verification exceeds the first duration, it can be determined that the first message is a non-network management message.
[0058] Understandably, Wake-up verification is periodic. If the Electronic Control Unit (ECU) fails to wake up effectively for several consecutive cycles, it can be determined that the first message is not a network management message. The first duration is approximately the length of several Wake-up verification cycles, such as 1 second.
[0059] Figure 2 This is a flowchart illustrating the monitoring of network status as disclosed in an embodiment of this application. See also... Figure 2 As shown, the monitoring of network status may include:
[0060] Step 201: Enable the first register of the CAN controller. The value stored in the first register is used to characterize whether there is a signal on the CAN bus.
[0061] In implementation, the current network management status of the CAN controller is monitored. If the CAN controller is in sleep mode, the first register of the CAN controller, such as the LEC register, can be enabled. LEC is a register bit field in the CAN controller unit. Through this register bit field, it is possible to identify whether there is still a signal being generated on the external CAN bus.
[0062] Specifically, network status can be monitored by reading the pin levels of the hardware interface to detect the signal status on the external CAN bus. If the pin levels of the hardware interface change, the change value will be updated in the first register.
[0063] Step 202: Determine whether the value in the first register has changed during the second time period.
[0064] The second duration can be set based on requirements, such as 5 seconds. In the absence of network management messages, the LEC register status can be read periodically. If the register status is NoChange for 5 consecutive seconds, NoMsgRcvFlg is set to True. If the LEC register status changes, NoMsgRcvFlg is set to False.
[0065] After the network wake-up verification timeout of 1 second is triggered, if NoMsgRcvFlg == True, execute CanSm_StopWake to prevent the ECU from waking up; if NoMsgRcvFlg == False, execute EcuM_ReportWake to wake up the ECU. If the LEC register state changes, it indicates that there is still signal disturbance on the external CAN bus. In this case, the CAN controller should not be shut down, and the ECU's operating state should be maintained. If the LEC register state does not change, it indicates that there is no signal disturbance on the external CAN bus, and the CAN controller can be shut down.
[0066] Based on the above, controlling the working state of the CAN transceiver and CAN controller based on network status includes: if the value of the first register does not change, shutting down the CAN transceiver and CAN controller; if the value of the first register changes, maintaining the current state of the CAN transceiver and CAN controller.
[0067] The value of the first register remains unchanged. Disabling the CAN transceiver and CAN controller prevents the electronic control unit from being accidentally woken up by unexpected messages (non-network management messages). The decision to disable the CAN controller is made by monitoring whether there is still a voltage level signal on the external CAN bus; it can only be disabled when there is no voltage level signal. If the CAN controller is disabled while there is a voltage level on the external CAN bus, the received messages may be incomplete when it is reopened, potentially resulting in erroneous frames.
[0068] In one example, upon receiving a message, the ECU activates the CAN transceiver and CAN controller, monitors the current network management status of the CAN controller, and if the network management status is in sleep mode, enables the CAN DELE register. Then: a. If a network management message is received, a wake-up procedure is executed, and the CAN DELE register is disabled; b. If no network management message is received, the LEC register status is periodically read. If the register status is NoChange for 5 consecutive seconds, NoMsgRcvFlg is set to True; if the LEC register status changes, NoMsgRcvFlg is set to False. If the software does not detect a valid wake-up event and there is no signal disturbance on the external CAN bus within 5 seconds, the CAN transceiver and CAN controller are disabled. Otherwise, the current state of the CAN controller and transceiver is maintained.
[0069] Furthermore, in other implementations, after maintaining the current state of the CAN transceiver and CAN controller, the implementation may also include: controlling the execution of a wake-up process to prepare for the reception and processing of possible network management messages.
[0070] The vehicle communication control scheme described in this application uses a CAN transceiver with filtering function as the physical layer interface of the CAN network. It designs a high-efficiency, low-power PNC according to functional categories to achieve the purpose of waking up some ECUs as needed and reducing energy consumption. In addition, by monitoring the network status, this application scheme can avoid the occurrence of erroneous frames after the electronic control unit (ECU) is woken up by unexpected messages. At the same time, it can optimize the utilization of network bandwidth and reduce communication delay and conflicts.
[0071] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0072] The methods described in the above-disclosed embodiments of this application are detailed in terms of the methods. The methods of this application can be implemented by various forms of apparatus. Therefore, this application also discloses an apparatus. Specific embodiments are given below for detailed description.
[0073] Figure 3 This is a schematic diagram of the structure of a vehicle communication control device disclosed in an embodiment of this application. See also... Figure 3 As shown, the vehicle's communication control device 30 may include:
[0074] The first control module 301 is used to control the start of the CAN transceiver and CAN controller when the electronic control unit (ECU) in a dormant state receives the first message. The CAN transceiver is a transceiver with message filtering function.
[0075] The message determination module 302 is used to determine whether the first message is a network management message.
[0076] The wake-up control module 303 is used to, when the first message is a network management message and the first message indicates that the current electronic control unit (ECU) is the target electronic control unit, execute a wake-up process to process the first message after wake-up.
[0077] The second control module 304 is used to monitor the network status when the first message is a non-network management message, and control the working status of the CAN transceiver and CAN controller based on the network status.
[0078] The vehicle communication control device described in this embodiment uses a transceiver with message filtering function. When a message is received in sleep mode, it can determine whether it is a network management message and filter out the messages that need to be processed by the current electronic control unit (ECU). This enables the wake-up of a partial ECU instead of all ECUs, saving overall power consumption. In addition, when the received message is not a network message, the solution can monitor the network status and control the working status of the CAN transceiver and CAN controller based on the network status. This avoids the risk that the CAN transceiver and CAN controller might be directly turned off, which could lead to subsequent ECUs receiving only some messages and sending erroneous frames after being woken up.
[0079] The specific implementation of the communication control device of the vehicle and its various modules, as well as other possible implementations, can be found in the relevant sections of the method embodiments, and will not be repeated here.
[0080] The communication control device for any vehicle described in the above embodiments includes a processor and a memory. The first control module, message determination module, wake-up control module, second control module, etc. in the above embodiments are all stored as program modules in the memory, and the processor executes the above program modules stored in the memory to realize the corresponding functions.
[0081] The processor contains a kernel, which retrieves the corresponding program modules from memory. One or more kernels can be configured, and the processing of backtracking data can be achieved by adjusting kernel parameters.
[0082] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0083] In an exemplary embodiment, a computer-readable storage medium is also provided, which can be directly loaded into the internal memory of a computer, and contains software code. After being loaded and executed by the computer, the computer program can implement the steps shown in any embodiment of the communication control method for the vehicle described above.
[0084] In an exemplary embodiment, a computer program product is also provided, which can be directly loaded into the internal memory of a computer and contains software code. After being loaded and executed by the computer, the computer program can implement the steps shown in any embodiment of the vehicle communication control method described above.
[0085] Furthermore, embodiments of this application provide an electronic device. Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. See also... Figure 4 As shown, the electronic device includes at least one processor 401, at least one memory 402 connected to the processor, and a bus 403; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the above-described vehicle communication control method.
[0086] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0087] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0088] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0089] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A communication control method for a vehicle, characterized in that, include: When the Electronic Control Unit (ECU) in sleep mode receives the first message, it controls the start of the CAN transceiver and CAN controller. The CAN transceiver is a transceiver with message filtering function. Determine whether the first message is a network management message; If the first message is a network management message and the first message indicates that the current electronic control unit (ECU) is the target electronic control unit, the electronic control unit (ECU) executes a wake-up procedure to process the first message after wake-up; If the first message is not a network management message, monitor the network status and control the working status of the CAN transceiver and the CAN controller based on the network status.
2. The vehicle communication control method according to claim 1, characterized in that, in, After the network wake-up verification exceeds the first time interval, the first message is determined to be a non-network management message.
3. The vehicle communication control method according to claim 1, characterized in that, The monitored network status includes: Enable the first register of the CAN controller, the value stored in the first register is used to characterize whether there is a signal on the CAN bus; Determine whether the value in the first register changes during the second time period.
4. The vehicle communication control method according to claim 3, characterized in that, The method of controlling the operating state of the CAN transceiver and CAN controller based on network status includes: If the value of the first register does not change, shut down the CAN transceiver and CAN controller; If the value of the first register changes, the current state of the CAN transceiver and CAN controller is maintained.
5. The vehicle communication control method according to claim 4, characterized in that, After maintaining the current state of the CAN transceiver and CAN controller, the following is also included: Control the execution of the wake-up process.
6. The vehicle communication control method according to claim 1, characterized in that, The target set of electronic control units for the first message is determined based on the user data in the first message.
7. A communication control device for a vehicle, characterized in that, include: The first control module is used to control the start of the CAN transceiver and CAN controller when the electronic control unit (ECU) in a dormant state receives the first message. The CAN transceiver is a transceiver with message filtering function. The message determination module is used to determine whether the first message is a network management message; A wake-up control module is used to, when the first message is a network management message and the first message indicates that the current electronic control unit (ECU) is the target electronic control unit, execute a wake-up process to process the first message after wake-up; The second control module is used to monitor the network status when the first message is a non-network management message, and to control the working status of the CAN transceiver and CAN controller based on the network status.
8. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the vehicle communication control method as described in any one of claims 1 to 6.
9. A computer storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the vehicle communication control method as described in any one of claims 1 to 6.
10. An electronic device applied to a vehicle, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the vehicle communication control method as described in any one of claims 1 to 6.