Vehicle-mounted network event message processing method and vehicle-mounted can bus network
By acquiring multiple frames of event message signals and determining their validity, the security risks caused by invalid messages in the vehicle network are resolved, and the robustness of the electronic control unit and the reliability of the vehicle's intelligent system are improved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2026-04-02
AI Technical Summary
In current vehicle networks, event messages received by electronic control units may be invalid, leading to security risks and system instability.
By acquiring multiple frames of event message signals, the validity of the message is determined based on the number of valid signals and the accumulation rate, and the corresponding logic is executed only when the message is valid.
This improves the accuracy and reliability of event message judgment, ensures that the electronic control unit does not execute invalid messages, and enhances the safety and reliability of the vehicle's intelligent system.
Smart Images

Figure CN2024136340_02042026_PF_FP_ABST
Abstract
Description
Vehicle-mounted network event message processing method and vehicle-mounted CAN bus network
[0001] The present application claims priority to the Chinese patent application No. 2024113679118, filed on September 27, 2024, to the Chinese Patent Office, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] Embodiments of the present application relate to the technical field of control, in particular to a vehicle-mounted network event message processing method and a vehicle-mounted CAN bus network. BACKGROUND
[0003] Currently, the intelligent level of new energy vehicles is getting higher and higher, and the realization of intelligence needs electronic control units (ECUs) to complete. There are at least dozens of electronic control units on the new energy vehicles, and the degree of intelligence of a vehicle is determined by the cooperation between the electronic control units. TECHNICAL PROBLEM
[0004] Currently, the communication between each electronic control unit on the vehicle is basically through the CAN bus, for example, electronic control units can transmit messages through the CAN bus. When an electronic control unit receives an event message, the electronic control unit will directly execute the logic corresponding to the event message, but in fact the event message may be an invalid message that should not be executed, and the execution of these messages sometimes will produce high safety risks. TECHNICAL SOLUTION
[0005] In a first aspect, the present application provides a vehicle-mounted network event message processing method, the method comprising:
[0006] obtaining a plurality of event message signals corresponding to an event message;
[0007] determining whether the event message is valid according to the accumulation speed of the number of valid signals in the plurality of event message signals;
[0008] if the event message is valid, executing the logic corresponding to the event message.
[0009] In a second aspect, the present application provides a vehicle-mounted network event message processing device, which is arranged in an electronic control unit (ECU), and the device comprises:
[0010] an obtaining module configured to obtain a plurality of event message signals corresponding to an event message;
[0011] a determining module configured to determine whether the event message is valid according to the accumulation speed of the number of valid signals in the plurality of event message signals;
[0012] The execution module is configured to execute logic corresponding to the event message when the event message is valid. Advantages
[0013] The application provides the following advantages. The vehicle network event message processing method provided by the application can determine whether an event message is valid according to the accumulation speed of the number of valid signals in the multiple event message signals corresponding to the event message when the multiple event message signals are obtained. Because the accumulation speed of the number of valid signals in the event message signals is considered, a more accurate and reliable event message validity determination result can be obtained. When the event message is determined to be valid, the logic corresponding to the event message is executed, and when the event message is determined to be invalid, the logic corresponding to the event message is not executed. Therefore, the electronic control unit can be prevented from executing invalid event messages, and incorrect logic determination and execution of actions that should not be executed can be prevented. The robustness of the electronic control unit is greatly improved, and the safety and reliability of the vehicle intelligent system are also improved. BRIEF DESCRIPTION OF DRAWINGS
[0014] FIG. 1 is a flowchart of a vehicle network event message processing method according to an embodiment of the application;
[0015] FIG. 2 is a flowchart of a vehicle network event message processing method according to an embodiment of the application;
[0016] FIG. 3 is a structural block diagram of a vehicle network event message processing device according to an embodiment of the application;
[0017] FIG. 4 is a structural block diagram of a vehicle CAN bus network according to an embodiment of the application.
[0018] Embodiments of the application
[0019] The intelligent level of new energy vehicles is becoming higher and higher, and the realization of intelligence requires electronic control units (ECUs) to complete. There are at least dozens of electronic control units on new energy vehicles, and the degree of intelligence of a vehicle is determined by the coordination between the electronic control units.
[0020] Due to the large number of electronic control units in a vehicle, one electronic control unit does not directly interact with all electronic control units in the vehicle, and the information that one electronic control unit needs to obtain from other electronic control units is limited. However, each electronic control unit will transmit its own state to the CAN bus, and if each electronic control unit is connected to a CAN bus, the load rate of the bus will be high, and a high load rate of the bus will easily cause message loss. To this end, a solution is to set different CAN buses, distribute the electronic control units of the vehicle on different CAN buses, and communicate between different CAN buses through a gateway. In this way, when electronic control units on different CAN buses need to interact, the gateway can forward the corresponding signals to the corresponding electronic control units.
[0021] Currently, when an electronic control unit receives an event message, it directly executes the logic corresponding to the event message, but in some cases, the received event message may be invalid and should not be executed, for example, the event message may be mistakenly sent by another electronic control unit, or external interference makes the electronic control unit mistakenly believe that it has received the event message. This defect of possibly executing invalid messages is a serious vulnerability of the safety and reliability of the vehicle intelligent system.
[0022] The present application first provides a vehicle network event message processing method, which can improve the accuracy of event message validity judgment.
[0023] Referring to FIG. 1, FIG. 1 is a flowchart of a vehicle network event message processing method according to an embodiment of the present application. In an embodiment, the vehicle network event message processing method can be applied to an electronic control unit, i.e., the steps included in the method can be executed by an electronic control unit. In another embodiment, the method can also be executed by the aforementioned gateway and electronic control unit together, for example, the gateway judges whether the event message is valid, the gateway forwards it to the corresponding electronic control unit if the event message is valid, the electronic control unit executes the logic corresponding to the event message, and the gateway does not forward it to the corresponding electronic control unit if the event message is invalid.
[0024] The following mainly takes the electronic control unit as the execution subject to expand the description of the scheme, and the vehicle network event message processing method provided by the present application at least includes the following steps:
[0025] Step 101: Obtain a plurality of event message signals corresponding to an event message.
[0026] The message can be of various types, for example, it can be a periodic message or an event message. The periodic message can be a message periodically sent at a certain time interval, which can effectively realize the data exchange between the electronic control units, so that the data between the electronic control units is kept synchronized. The event message can be a message sent only when a specific event occurs, for example, the electronic control unit of the engine can send a message when the engine speed changes, so that the current state of the engine can be received by other electronic control units. In addition, the event message can also be used to send important control information, for example, control information related to the safety system of the automobile.
[0027] For the CAN message, the CAN message is composed of multiple parts, at least including frame ID and data. In an embodiment, when the electronic control unit receives the CAN message, it can analyze the CAN message to determine whether the message is an event message.
[0028] The event message can include a multi-frame event message signal. Multi-frame can refer to two frames and above. When a specific event occurs, the electronic control unit that detects the occurrence of the event can send a multi-frame event message signal to the related other electronic control units. Here, the multi-frame event message signal sent by the electronic control unit can be a completely identical signal, or an incomplete identical signal, for example, the multi-frame event message signal sent can have the same frame ID, but different data parts, or have different frame IDs, but the same data parts. When judging whether the event message is valid, the other electronic control units can judge based on the received multi-frame event message signal, so that the accuracy of the event message validity judgment can be improved.
[0029] Step 102: determining whether the event message is valid according to the accumulation speed of the number of valid signals in the multi-frame event message signal.
[0030] The multi-frame event message signal can include valid signals and invalid signals, here, the number of valid signals can be accumulated. When judging whether the event message is valid, the application considers the accumulation speed of the number of valid signals, so as to ensure the accuracy and reliability of the judgment result.
[0031] It can be understood that when the electronic control unit obtains the multi-frame event message signal, even if the number of valid signals can be accumulated, if the accumulation speed is slow, the event message can still be an invalid message, because the number of valid signals of the valid event message can be accumulated at a stable and fast speed.
[0032] According to the accumulation speed of the number of valid signals in the multi-frame event message signals, the validity of the acquired event message can be judged. If the judgment result is that the event message is valid, step 103 is entered. If the judgment result is that the event message is invalid, the logic corresponding to the event message is not executed.
[0033] Step 103: If the event message is valid, the logic corresponding to the event message is executed.
[0034] For the event message judged to be valid, the electronic control unit can execute the logic corresponding to the event message. In an embodiment, executing the logic corresponding to the event message can be that the event message contains the corresponding logic (the logic can include one or more executable actions), and the electronic control unit executes the logic indicated in the event message. In an embodiment, the electronic control unit can store the processing logic corresponding to different events. Executing the logic corresponding to the event message can be that, according to the event indicated by the event message, the logic corresponding to the event is determined based on the stored correspondence between events and logic, and then the logic is executed.
[0035] For the event message judged to be invalid, the electronic control unit does not execute the logic corresponding to the event message. It can be understood that the electronic control unit will not respond to the event message to make any action.
[0036] The vehicle-mounted network event message processing method provided in the present application can judge whether the event message is valid according to the accumulation speed of the number of valid signals in the multi-frame event message signals when the event message corresponding to the multi-frame event message signals is acquired. Since the accumulation speed of the number of valid signals in the event message signals is considered, a more accurate and reliable event message validity judgment result can be obtained. When the event message is judged to be valid, the logic corresponding to the event message is executed, and when the event message is invalid, the logic corresponding to the event message is not executed, so as to ensure that the electronic control unit does not execute invalid event messages, does not make wrong logic judgment, and does not execute actions that should not be executed, greatly improving the robustness of the electronic control unit, and improving the safety and reliability of the vehicle intelligent system.
[0037] It can be understood that there are various ways to measure the accumulation speed of the number of valid signals. In an embodiment, the accumulation speed of the number of valid signals can be measured by whether the number of valid signals can be accumulated to a preset threshold within a preset time length. If the number of valid signals can be accumulated to the preset threshold within the preset time length, the accumulation speed can be evaluated as fast, and it can be determined that the event message is valid. If the number of valid signals cannot be accumulated to the preset threshold within the preset time length, the accumulation speed is slow, and it is determined that the event message is invalid. In other embodiments, the accumulation speed of the number of valid signals can also be measured by the increase of the number of valid signals within the preset time length. For example, if the number of valid signals increases by 5 within 1 second, it can be determined that the accumulation speed is fast, and it is determined that the event message is valid. If the number of valid signals increases by 2 within 1 second, it can be determined that the accumulation speed is slow, and it is determined that the event message is invalid.
[0038] In an embodiment, the electronic control unit receives the event message signal frame by frame, and when the first frame of event message signal is received, the counting of valid signals and the timing are started. The counting of valid signals is to accumulate the number of valid signals, and the start of timing is to accumulate the time.
[0039] For valid signals, the electronic control unit can determine the validity of the current frame of event message signal. If the determination result is valid, it is determined that the frame of event message signal is a valid signal. If the determination result is invalid, it is determined that the frame of event message signal is an invalid signal. When it is determined that the current frame of event message signal is a valid signal, the electronic control unit can increase the count value of valid signals by 1. With the continuous validity detection of the received frames of event message signal, the count value of valid signals is continuously increased. If the count value of valid signals is greater than or equal to the preset threshold, and the accumulated time is still less than or equal to the preset time length, it can be determined that the event message is valid. In other words, after the timing is started, two determinations can be made at the same time. The first determination is whether the count value of valid signals is greater than or equal to the preset threshold. The second determination is whether the current accumulated time reaches the preset time length. Only when the count value of valid signals is greater than or equal to the preset threshold, and the current accumulated time is less than the preset time length, it is determined that the event message is valid. On the contrary, if the accumulated time has reached the preset time length, and the count value of valid signals is still less than or equal to the preset threshold, it is determined that the event message is invalid. By adding timing to counting, the validity of the event message is determined from two aspects, and the reliability of the validity determination result of the event message is improved.
[0040] In the foregoing embodiments, it can be determined for each received frame event message signal whether it is a valid signal, and there are various ways to determine whether it is a valid signal. In an embodiment, when the event message signal of the current frame is obtained, the event message signal of the current frame is compared with the event message signal of a historical frame. If the comparison result is consistent, it is determined that the event message signal of the current frame is a valid signal, otherwise, if the comparison result is inconsistent, it is determined that the event message signal of the current frame is an invalid signal. Here, the historical frame can be the event message signal obtained before the current frame.
[0041] As described before, a frame message signal can include multiple parts, such as a frame ID part and a data part. When the event message signal of the current frame is compared with the event message signal of the historical frame, in an embodiment, the frame ID of the event message signal of the current frame can be compared with the frame ID of the event message signal of the historical frame. If the frame IDs are the same, it is determined that the event message signal of the current frame is a valid signal, otherwise, it is determined that the event message signal of the current frame is an invalid signal. In an embodiment, the data part of the event message signal of the current frame can be compared with the data part of the event message signal of the historical frame. If the data parts are the same, it is determined that the event message signal of the current frame is a valid signal, otherwise, it is determined that the event message signal of the current frame is an invalid signal. In an embodiment, the whole of the event message signal of the current frame can also be compared with the whole of the event message signal of the historical frame. If all the parts of the two are the same, it is determined that the event message signal of the current frame is a valid signal, otherwise, it is determined that the event message signal of the current frame is an invalid signal.
[0042] It can be understood that the event message signal is received frame by frame. In an embodiment, if the comparison result of the event message signal of the current frame and the event message signal of the historical frame is inconsistent, i.e., the event message signal of the current frame is an invalid signal, the count and timing of the valid signal can be cleared at the same time. When the event message signal of the current frame is determined to be an invalid signal, it indicates that the continuity of the valid signal is insufficient because the valid signal is interrupted in the current frame. In order to ensure the accuracy of the event message validity determination, all the valid signals before the current frame are denied, and all the valid signal counts and timings are cleared, and it is determined that the event message is an invalid message. As described before, if the accumulated duration has reached the preset duration (greater than or equal to the preset duration), and the count value of the valid signal is still less than or equal to the preset threshold, it is determined that the event message is invalid, and the count and timing of the valid signal are also cleared.
[0043] In determining whether the event message signal of the current frame is a valid signal, the event message signal of the current frame needs to be compared with the event message signal of the historical frame. In an embodiment, the historical frame can be the first frame received, i.e., the event message signal of the current frame can be compared with the event message signal of the first frame to determine the validity of the event message signal of the current frame. In an embodiment, the historical frame can be the previous frame of the current frame, i.e., the event message signal of the current frame can be compared with the event message signal of the previous frame of the current frame to determine the validity of the event message signal of the current frame.
[0044] There are two cases that cause the event message to be invalid. The first case is that the event message is sent by mistake by other electronic control units, and the second case is that the electronic control unit mistakenly receives the event message due to interference from the outside world. The signal interference can come from other electronic devices, electromagnetic noise, and wireless communication networks, etc. In an embodiment, the cause of the invalid event message can be determined according to the reason why the event message is judged to be invalid. For the first case, considering that the mistaken sending of other electronic control units usually lasts for a small number of frames, the mistaken sending usually stops in a short time. Therefore, if the event message is invalid because the count value of the valid signal is less than the preset threshold value within the preset time length, i.e., the count value of the valid signal is less than the preset threshold value when the accumulated time length is greater than or equal to the preset time length, it can be determined that the event message is a message sent by mistake by other ECUs. For the second case, since the interference is usually random and uncertain, the signal caused by the interference is difficult to be consistent between the previous and subsequent frames. Therefore, if the event message is invalid because the comparison result of the event message signal of the current frame and the event message signal of the historical frame is inconsistent, it can be determined that the event message is an invalid message caused by interference.
[0045] Referring to FIG. 2, FIG. 2 is a flowchart of a vehicle-mounted network event message processing method according to an embodiment of the present application. In this embodiment, the counting of the valid signal and the timing are started as soon as the first frame event message signal is received, and for each frame event message signal, whether it is a valid signal is determined by comparing it with the event message signal of the historical frame. Only when the accumulated time length does not reach the preset time length and the count value of the valid signal is greater than or equal to the preset threshold value, it is determined that the event message is valid. In this embodiment, the validity of the event message is determined from three aspects of the number of event messages, the sending time of the event message, and the content of the event message, which reduces the risk of mistaken identification of the event message and reduces the erroneous logical judgment of the electronic control unit (ECU) due to mistaken identification of the signal, thereby improving the robustness of the electronic control unit (ECU).
[0046] The vehicle-mounted network event message processing method provided in the application can determine whether an event message is valid according to the accumulation speed of the number of valid signals in the multiple frames of event message signals when the multiple frames of event message signals corresponding to the event message are acquired. Since the accumulation speed of the number of valid signals in the event message signals is considered, a more accurate and reliable event message validity determination result can be obtained. When the event message is determined to be valid, the logic corresponding to the event message is executed, and when the event message is determined to be invalid, the logic corresponding to the event message is not executed, so that the electronic control unit can be ensured not to execute invalid event messages, incorrect logic determination and actions that should not be performed, the robustness of the electronic control unit is greatly improved, and the safety and reliability of the vehicle intelligent system are also improved.
[0047] The application further provides a vehicle-mounted network event message processing device which can be arranged in an electronic control unit. Referring to FIG. 3, FIG. 3 is a structural block diagram of a vehicle-mounted network event message processing device provided in an embodiment of the application. The vehicle-mounted network event message processing device comprises:
[0048] An acquisition module 301 is configured to acquire multiple frames of event message signals corresponding to an event message;
[0049] A determination module 302 is configured to determine whether the event message is valid according to the accumulation speed of the number of valid signals in the multiple frames of event message signals.
[0050] An execution module 303 is configured to execute the logic corresponding to the event message when the event message is valid.
[0051] Optionally, the determination module 302 is further configured to determine that the event message is valid if the number of valid signals accumulates to a preset threshold value within a preset time length.
[0052] Optionally, the determination module 302 is further configured to start counting and timing of valid signals when a first frame of event message signal is acquired, increase the count value of the valid signals by 1 if the acquired event message signal is a valid signal, and determine that the event message is valid if the count value of the valid signals is greater than or equal to the preset threshold value and the accumulated time length is less than or equal to the preset time length.
[0053] Optionally, the determination module 302 is further configured to compare the event message signal of a current frame with the event message signal of a historical frame when the event message signal of the current frame is acquired, and determine that the event message signal of the current frame is a valid signal if the comparison result is consistent, wherein the historical frame is the event message signal before the current frame.
[0054] Optionally, the determining module 302 is further configured to clear the count and timing of the valid signal if the comparison result of the event message signal of the current frame and the event message signal of the historical frame is inconsistent.
[0055] Optionally, the event message signal of the historical frame is a first frame event message signal.
[0056] Optionally, the determining module 302 is further configured to determine that the event message is an invalid message generated by interference if the comparison result of the event message signal of the current frame and the event message signal of the historical frame is inconsistent.
[0057] Optionally, the determining module 302 is further configured to determine that the event message is a message mis-sent by another electronic control unit (ECU) if the count value of the valid signal is less than the preset threshold when the accumulated time length is greater than or equal to the preset time length.
[0058] Optionally, the determining module 302 is further configured to clear the count and timing of the valid signal if the count value of the valid signal is less than or equal to the preset threshold when the accumulated time length is greater than or equal to the preset time length.
[0059] With the vehicle-mounted network event message processing device provided in the application, when the electronic control unit acquires multiple frames of event message signals corresponding to an event message, the electronic control unit can determine whether the event message is valid according to the accumulation speed of the number of valid signals in the multiple frames of event message signals. Since the accumulation speed of the number of valid signals in the event message signal is considered, a more accurate and reliable event message validity determination result can be obtained. When the event message is determined to be valid, the logic corresponding to the event message is executed, and when the event message is determined to be invalid, the logic corresponding to the event message is not executed, so that the electronic control unit can be ensured not to execute invalid event messages, and the electronic control unit will not make incorrect logical determinations and will not execute actions that should not be executed, thereby greatly improving the robustness of the electronic control unit and the safety and reliability of the vehicle intelligent system.
[0060] The application further provides a vehicle-mounted CAN bus network, which includes multiple electronic control units (ECUs), and the multiple ECUs can communicate with each other. Here, as described above, the multiple ECUs can be mounted in the same bus for communication, or the multiple ECUs can be mounted in different buses and communicate by forwarding information between the different buses through a gateway. Referring to FIG. 4, which is a structural block diagram of a vehicle-mounted CAN bus network according to an embodiment of the application.
[0061] For any one of the plurality of ECUs, it can include a memory and a processor, the memory can store a computer program, and the processor can execute the computer program stored in the memory, thereby realizing the vehicle-mounted network event message processing method provided in the present application.
[0062] Through the vehicle-mounted CAN bus network provided in the present application, when the electronic control unit obtains the plurality of event message signals corresponding to the event message, it can judge whether the event message is valid according to the accumulation speed of the number of valid signals in the plurality of event message signals. Since the accumulation speed of the number of valid signals in the event message signal is considered, a more accurate and reliable event message validity judgment result can be obtained. When the event message is judged to be valid, the logic corresponding to the event message is executed, and when the event message is invalid, the logic corresponding to the event message will not be executed, thereby ensuring that the electronic control unit does not execute invalid event messages, does not make incorrect logical judgments, and does not execute actions that should not be executed, greatly improving the robustness of the electronic control unit operation, and the safety and reliability of the vehicle intelligent system are also improved.
Claims
1. A method for processing event messages of an in-vehicle network, the method comprising: obtaining a plurality of event message signals corresponding to an event message; determining whether the event message is valid according to an accumulation speed of a number of valid signals in the plurality of event message signals; and if the event message is valid, executing logic corresponding to the event message.
2. The in-vehicle network event message processing method of claim 1, wherein, The determining whether the event message is valid according to the accumulation speed of the number of valid signals in the plurality of event message signals comprises: if the number of valid signals accumulates to a preset threshold within a preset time length, determining that the event message is valid.
3. The in-vehicle network event message processing method of claim 2, wherein, The determining whether the event message is valid according to the accumulation speed of the number of valid signals in the plurality of event message signals comprises: starting counting and timing of valid signals when a first event message signal is obtained; if the obtained event message signal is a valid signal, the counting value of the valid signal is incremented by 1; if the counting value of the valid signal is greater than or equal to the preset threshold and the accumulated time length is less than or equal to the preset time length, determining that the event message is valid.
4. The in-vehicle network event message processing method of claim 3, wherein, The determining whether the obtained event message signal is a valid signal comprises: comparing the event message signal of a current frame with event message signals of historical frames when the event message signal of the current frame is obtained, and if the comparison result is consistent, determining that the event message signal of the current frame is a valid signal, wherein the historical frames are event message signals before the current frame.
5. The in-vehicle network event message processing method of claim 4, wherein, The method further comprises: if the comparison result of the event message signal of the current frame and the event message signals of the historical frames is inconsistent, clearing the counting and timing of the valid signal.
6. The in-vehicle network event message processing method of claim 4, wherein, The event message signal of the historical frame is a first event message signal.
7. The in-vehicle network event message processing method of claim 4, wherein, The method further comprises: if the comparison result of the event message signal of the current frame and the event message signals of the historical frames is inconsistent, determining that the event message is an invalid message generated by interference.
8. The in-vehicle network event message processing method of claim 3, wherein, The method further comprises: if the counting value of the valid signal is less than the preset threshold when the accumulated time length is greater than or equal to the preset time length, determining that the event message is a message mis-sent by another electronic control unit (ECU).
9. The in-vehicle network event message processing method of claim 3, wherein, The method further comprises: if the counting value of the valid signal is less than or equal to the preset threshold when the accumulated time length is greater than or equal to the preset time length, clearing the counting and timing of the valid signal.
10. An on-board CAN bus network comprising: A plurality of electronic control units (ECUs), the plurality of ECUs communicate with each other, any of the ECUs stores a computer program, and the ECU implements the method for processing event messages of an in-vehicle network according to any one of claims 1-9 when executing the computer program.
Citation Information
Patent Citations
Automobile CAN network message monitoring method and device, computer equipment and storage medium
CN113691432A
Network security communication method of vehicle-mounted CAN bus and control device
CN115296861A
Network message processing equipment and method and electronic equipment
CN116686267A
Signal-based CAN bus intrusion detection method and device
CN117201084A
CAN message detection method and device, processor and computer equipment
CN117650941A