An abnormality detection method and device for vehicle diagnosis time synchronization and a diagnostic instrument
Patent Information
- Application Number
- CN202611120741.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-23
AI Technical Summary
[0005]有鉴于此,有必要提供一种车辆诊断时间同步的异常检测方法、装置及诊断仪,用以解决现有的车辆诊断时间同步机制的安全性有所欠缺的问题
[0016]本发明的有益效果是:综上所述,本发明提供的车辆诊断时间同步的异常检测方法、装置及诊断仪,通过向指定的第一ECU发送静默监听配置报文,可以为诊断通信增加一条独立于数据流之外的验证通道,避免了只通过诊断仪与ECU之间的双方握手进行时间同步异常检测,提供了时间同步异常检测的物理层旁路视角,为通信链路攻击的检测提供了依据,从而提高了诊断会话的安全性,然后在确定第二ECU的处理时延的基础上,从第一ECU获取旁路校验时延,从而确定时间同步报文的物理层真实往返时延,为时间同步异常检测提供依据,最后通过第二ECU的处理时延和旁路校验时延,对目标任务进行时间同步异常检测,本发明提高了车辆诊断时间同步机制的安全性。
Smart Images

Figure CN122969959A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle diagnostic technology, and in particular to a method, device and diagnostic instrument for detecting anomalies in vehicle diagnostic time synchronization. Background Technology
[0002] In the field of automotive aftermarket diagnostics and electronic control unit (ECU) reprogramming, high-precision time synchronization between the diagnostic tool and the ECU is fundamental to ensuring the safety of diagnostic sessions and the accuracy of data timing during reprogramming. This is especially crucial when updating firmware for safety-related ECUs, where the integrity and authenticity of time synchronization messages are paramount.
[0003] Existing vehicle diagnostic time synchronization mechanisms suffer from the following technical problems: over-reliance on two-way handshakes, leading to one-way trust risks; lack of a physical layer bypass perspective, making it impossible to detect man-in-the-middle attacks; and inability to distinguish between ECU internal faults and communication link attacks. These factors result in insufficient security in existing vehicle diagnostic time synchronization mechanisms.
[0004] Therefore, improving the security of vehicle diagnostic time synchronization mechanisms has become an urgent technical problem to be solved. Summary of the Invention
[0005] In view of this, it is necessary to provide a method, device and diagnostic instrument for detecting anomalies in vehicle diagnostic time synchronization, in order to solve the problem of insufficient security of existing vehicle diagnostic time synchronization mechanisms.
[0006] To address the aforementioned problems, in a first aspect, the present invention provides a method for detecting anomalies in vehicle diagnostic time synchronization, comprising: Obtain the function identifiers and capability descriptions of each ECU in the target vehicle. Based on the function identifiers and capability descriptions of each ECU, determine the first ECU and send a silent listening configuration message to the first ECU. The silent listening configuration message is used to instruct the first ECU to listen to the time synchronization request message and time synchronization response message of the target task. The first ECU is an ECU that does not participate in the target task and has the ability to capture timers. Send a time synchronization request message for the target task to the second ECU and receive a time synchronization response message for the target task sent by the second ECU. Determine the processing delay of the second ECU based on the time synchronization response message for the target task. The second ECU is the ECU corresponding to the target task. The bypass verification delay is obtained from the first ECU. The bypass verification delay is determined based on the frame start time of the target task's time synchronization request message and the frame start time of the target task's time synchronization response message. Based on the processing delay and bypass verification delay of the second ECU, time synchronization anomalies of the target task are detected.
[0007] In one possible implementation, the time synchronization anomaly detection of the target task based on the processing delay and bypass verification delay of the second ECU includes: Based on the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU, time synchronization anomalies of the target task are detected.
[0008] In one possible implementation, the time synchronization anomaly detection of the target task based on the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU includes: Based on the absolute value of the difference between the processing delay and bypass verification delay of the second ECU and the empirical threshold, time synchronization anomaly detection is performed on the target task. The empirical threshold is determined based on the bus physical characteristics of the target vehicle and the internal processing jitter of the second ECU.
[0009] In one possible implementation, the time synchronization anomaly detection of the target task based on the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU and an empirical threshold includes: If the absolute value of the difference between the processing delay of the second ECU and the bypass verification delay is less than or equal to the empirical threshold, it is determined that there is no time synchronization anomaly in the target task. If the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU is greater than the empirical threshold, it is determined that there is a time synchronization anomaly in the target task, and the cause of the time synchronization anomaly in the target task is determined based on the processing delay and bypass verification delay of the second ECU.
[0010] In one possible implementation, the determination of the cause of the target task time synchronization anomaly based on the processing delay and bypass verification delay of the second ECU includes: If the bypass verification delay is less than or equal to the first delay threshold, and the processing delay of the second ECU is greater than the second delay threshold, the cause of the abnormal time synchronization of the target task is determined to be the internal software tampering of the second ECU or the gateway software failure.
[0011] In one possible implementation, the determination of the cause of the target task time synchronization anomaly based on the processing delay and bypass verification delay of the second ECU includes: If the bypass verification delay is greater than the first delay threshold and less than or equal to the third delay threshold, and the processing delay of the second ECU is greater than the second delay threshold, the cause of the target task time synchronization anomaly is determined to be a delay injection attack.
[0012] In one possible implementation, the determination of the cause of the target task time synchronization anomaly based on the processing delay and bypass verification delay of the second ECU includes: If the bypass verification delay is greater than the third delay threshold, the cause of the target task time synchronization abnormality is determined to be a bus physical layer abnormality or a second ECU response timeout.
[0013] In one possible implementation, the bypass verification delay is determined based on the difference between the frame start time of the target task's time synchronization response message and the frame start time of the target task's time synchronization request message.
[0014] On the other hand, the present invention also provides an anomaly detection device for vehicle diagnostic time synchronization, comprising: The first acquisition module is used to acquire the function identifier and capability description of each ECU of the target vehicle, determine the first ECU based on the function identifier and capability description of each ECU, and send a silent listening configuration message to the first ECU. The silent listening configuration message is used to instruct the first ECU to listen to the time synchronization request message and time synchronization response message of the target task. The first ECU is an ECU that does not participate in the target task and has the ability to capture timers. The determination module is used to send a time synchronization request message for the target task to the second ECU and receive a time synchronization response message for the target task sent by the second ECU. Based on the time synchronization response message for the target task, the processing delay of the second ECU is determined. The second ECU is the ECU corresponding to the target task. The second acquisition module is used to acquire the bypass verification delay from the first ECU. The bypass verification delay is determined based on the frame start time of the target task's time synchronization request message and the frame start time of the target task's time synchronization response message. The detection module is used to detect time synchronization anomalies in the target task based on the processing delay and bypass verification delay of the second ECU.
[0015] Secondly, the present invention also provides a diagnostic instrument, including a data acquisition unit, a memory, and a processor, wherein, The data acquisition device is communicatively connected to the processor and is used to acquire the functional identifiers and capability descriptions of each ECU of the target vehicle, as well as the bypass verification delay. The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the vehicle diagnostic time synchronization anomaly detection method described in any of the above implementations.
[0016] The beneficial effects of this invention are as follows: In summary, the vehicle diagnostic time synchronization anomaly detection method, device, and diagnostic instrument provided by this invention, by sending a silent monitoring configuration message to a designated first ECU, can add a verification channel independent of the data stream to the diagnostic communication, avoiding time synchronization anomaly detection solely through the handshake between the diagnostic instrument and the ECU. This provides a physical layer bypass perspective for time synchronization anomaly detection, providing a basis for detecting communication link attacks, thereby improving the security of the diagnostic session. Then, based on determining the processing delay of the second ECU, the bypass verification delay is obtained from the first ECU to determine the physical layer true round-trip delay of the time synchronization message, providing a basis for time synchronization anomaly detection. Finally, through the processing delay of the second ECU and the bypass verification delay, time synchronization anomaly detection is performed on the target task. This invention improves the security of the vehicle diagnostic time synchronization mechanism. Attached Figure Description
[0017] Figure 1 A schematic flowchart of an embodiment of the vehicle diagnostic time synchronization anomaly detection method provided by the present invention; Figure 2 A schematic diagram of an embodiment of the synchronous verification architecture based on silent monitoring of a third-party ECU provided by the present invention; Figure 3 A schematic diagram of an embodiment of the vehicle diagnostic time synchronization anomaly detection device provided by the present invention; Figure 4 This is a schematic diagram of an embodiment of the diagnostic instrument provided by the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0019] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0020] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.
[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0022] This invention provides a method, device, and diagnostic instrument for detecting anomalies in vehicle diagnostic time synchronization, which will be described below.
[0023] Figure 1 This is a schematic flowchart of an embodiment of the vehicle diagnostic time synchronization anomaly detection method provided by the present invention, as shown below. Figure 1 As shown, the anomaly detection methods for vehicle diagnostic time synchronization include: S101. Obtain the function identifier and capability description of each ECU of the target vehicle, determine the first ECU based on the function identifier and capability description of each ECU, and send a silent listening configuration message to the first ECU. The silent listening configuration message is used to instruct the first ECU to listen to the time synchronization request message and time synchronization response message of the target task. The first ECU is an ECU that does not participate in the target task and has the ability to capture timers.
[0024] It should be noted that the vehicle diagnostic time synchronization anomaly detection method provided by this invention can be applied to the time synchronization anomaly detection scenario during vehicle ECU diagnostics.
[0025] When performing anomaly detection for vehicle diagnostic time synchronization, the diagnostic tool first obtains the functional identifiers and capability descriptions of each ECU in the target vehicle. Then, based on these descriptions, it identifies the first ECU (an ECU that does not participate in the target task but has timer capture capabilities). A silent monitoring configuration message is then sent to this first ECU, instructing it to listen for the target task's time synchronization request and response messages. By sending this silent monitoring configuration message to the first ECU, a verification channel independent of the data stream is added to the diagnostic communication, thereby improving the security of the diagnostic session.
[0026] S102. Send a time synchronization request message for the target task to the second ECU and receive a time synchronization response message for the target task sent by the second ECU. Determine the processing delay of the second ECU based on the time synchronization response message for the target task. The second ECU is the ECU corresponding to the target task.
[0027] It should be noted that after sending the silent monitoring configuration message to the first ECU, the diagnostic tool can send the target task time synchronization request message to the second ECU (the ECU corresponding to the target task) and receive the target task time synchronization response message sent by the second ECU. The processing delay of the second ECU (i.e., the processing delay claimed by the second ECU) can be determined through the target task time synchronization response message.
[0028] S103. Obtain the bypass verification delay from the first ECU. The bypass verification delay is determined based on the frame start time of the target task's time synchronization request message and the frame start time of the target task's time synchronization response message.
[0029] It should be noted that while determining the processing delay of the second ECU, the diagnostic tool can also obtain the bypass verification delay from the first ECU. The bypass verification delay can be determined based on the frame start time of the target task's time synchronization request message and the frame start time of the target task's time synchronization response message. The bypass verification delay represents the actual physical layer round-trip time from "the request issued by the diagnostic tool arrives on the bus" to "the response issued by the second ECU appears on the bus." This value is completely independent of the software timing logic inside the diagnostic tool and the target ECU, and can provide a basis for detecting time synchronization anomalies.
[0030] S104. Based on the processing delay and bypass verification delay of the second ECU, perform time synchronization anomaly detection on the target task.
[0031] It should be noted that: Finally, based on the processing delay and bypass verification delay of the second ECU, time synchronization anomaly detection of the target task can be performed to ensure the safety of the vehicle diagnostic time synchronization mechanism.
[0032] In summary, the vehicle diagnostic time synchronization anomaly detection method provided by this invention adds a verification channel independent of the data stream to diagnostic communication by sending a silent monitoring configuration message to a designated first ECU. This avoids relying solely on the handshake between the diagnostic tool and the ECU for time synchronization anomaly detection, providing a physical layer bypass perspective for time synchronization anomaly detection and providing a basis for detecting communication link attacks, thereby improving the security of the diagnostic session. Then, based on the processing delay of the second ECU, the bypass verification delay is obtained from the first ECU to determine the physical layer true round-trip delay of the time synchronization message, providing a basis for time synchronization anomaly detection. Finally, the processing delay of the second ECU and the bypass verification delay are used to perform time synchronization anomaly detection on the target task. This invention improves the security of the vehicle diagnostic time synchronization mechanism.
[0033] In some embodiments of the present invention, the step of performing time synchronization anomaly detection on the target task based on the processing delay and bypass verification delay of the second ECU includes: Based on the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU, time synchronization anomalies of the target task are detected.
[0034] It should be noted that when performing time synchronization anomaly detection on the target task based on the processing delay and bypass verification delay of the second ECU, the absolute value of the difference between the processing delay and bypass verification delay of the second ECU can be used to perform time synchronization anomaly detection on the target task.
[0035] In some embodiments of the present invention, the time synchronization anomaly detection of the target task based on the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU includes: Based on the absolute value of the difference between the processing delay and bypass verification delay of the second ECU and the empirical threshold, time synchronization anomaly detection is performed on the target task. The empirical threshold is determined based on the bus physical characteristics of the target vehicle and the internal processing jitter of the second ECU.
[0036] It should be noted that when performing time synchronization anomaly detection on the target task based on the absolute value of the difference between the processing delay of the second ECU and the bypass verification delay, the detection can be performed based on the relationship between the absolute value of the difference between the processing delay of the second ECU and the bypass verification delay and an empirical threshold. The empirical threshold can be determined based on the bus physical characteristics of the target vehicle and the internal processing jitter of the second ECU.
[0037] In some embodiments of the present invention, the time synchronization anomaly detection of the target task based on the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU and an empirical threshold includes: If the absolute value of the difference between the processing delay of the second ECU and the bypass verification delay is less than or equal to the empirical threshold, it is determined that there is no time synchronization anomaly in the target task. If the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU is greater than the empirical threshold, it is determined that there is a time synchronization anomaly in the target task, and the cause of the time synchronization anomaly in the target task is determined based on the processing delay and bypass verification delay of the second ECU.
[0038] It should be noted that when detecting time synchronization anomalies in a target task based on the relationship between the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU and an empirical threshold, if the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU is less than or equal to the empirical threshold, it can be determined that the target task does not have a time synchronization anomaly; if the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU is greater than the empirical threshold, it can be determined that the target task has a time synchronization anomaly. In this case, the cause of the time synchronization anomaly of the target task can be determined based on the processing delay and the bypass verification delay of the second ECU.
[0039] In some embodiments of the present invention, the determination of the cause of the target task time synchronization anomaly based on the processing delay and bypass verification delay of the second ECU includes: If the bypass verification delay is less than or equal to the first delay threshold, and the processing delay of the second ECU is greater than the second delay threshold, the cause of the abnormal time synchronization of the target task is determined to be the internal software tampering of the second ECU or the gateway software failure.
[0040] It should be noted that when determining the cause of the target task time synchronization anomaly, if the bypass verification delay is less than or equal to the first delay threshold, and the processing delay of the second ECU is greater than the second delay threshold, then the cause of the target task time synchronization anomaly can be determined to be the internal software tampering of the second ECU or the gateway software failure.
[0041] In some embodiments of the present invention, the determination of the cause of the target task time synchronization anomaly based on the processing delay and bypass verification delay of the second ECU includes: If the bypass verification delay is less than or equal to the first delay threshold, and the processing delay of the second ECU is greater than the second delay threshold, the cause of the abnormal time synchronization of the target task is determined to be the internal software tampering of the second ECU or the gateway software failure.
[0042] It should be noted that when determining the cause of the target task time synchronization anomaly, if the bypass verification delay is less than or equal to the first delay threshold, and the processing delay of the second ECU is greater than the second delay threshold, then the cause of the target task time synchronization anomaly can be determined to be the internal software tampering of the second ECU or the gateway software failure.
[0043] In some embodiments of the present invention, the determination of the cause of the target task time synchronization anomaly based on the processing delay and bypass verification delay of the second ECU includes: If the bypass verification delay is greater than the third delay threshold, the cause of the target task time synchronization abnormality is determined to be a bus physical layer abnormality or a second ECU response timeout.
[0044] It should be noted that when determining the cause of the target task time synchronization anomaly, if the bypass verification delay is greater than the third delay threshold, the cause of the target task time synchronization anomaly can be determined to be a bus physical layer anomaly or a second ECU response timeout.
[0045] In some embodiments of the present invention, the bypass verification delay is determined based on the difference between the frame start time of the target task's time synchronization response message and the frame start time of the target task's time synchronization request message.
[0046] It should be noted that the bypass verification delay can be determined based on the difference between the frame start time of the target task's time synchronization response message and the frame start time of the target task's time synchronization request message.
[0047] The following specific embodiments illustrate the abnormal detection method for vehicle diagnostic time synchronization provided by the present invention.
[0048] To address the technical problem that existing time synchronization solutions lack third-party bypass verification, thus failing to effectively detect message tampering, delay injection attacks, and differentiate fault root causes, this invention provides a vehicle diagnostic time synchronization anomaly detection method and related system based on third-party ECU silent monitoring. Combined with... Figure 2 The proposed solution involves designating a third-party ECU that does not directly participate in diagnostic function interaction as a silent verifier. This ECU listens to the synchronous message interactions on the bus, independently calculates a bypass check value, and compares it with the claimed response value of the target ECU. Any difference exceeding physical limits is considered an abnormal event. The specific technical solution includes the following steps: 1. Diagnostic topology discovery and silent listening node assignment.
[0049] After the diagnostic tool powers on and establishes vehicle communication, it first performs network topology discovery. By reading the function identifiers and capability descriptions of each ECU, it identifies a third-party ECU that is not involved in this flashing or diagnostic task and possesses high-precision timer capture capabilities, such as the airbag controller (SRS) or body domain controller (BCM). The diagnostic tool then sends a "silent monitoring configuration message" to this ECU during the bus silent period using proprietary diagnostic commands, putting it into a special monitoring mode. In this mode, the ECU only captures physical layer signals and records timestamps for specific IDs on the bus (time synchronization request and response message IDs), but does not send any response messages or trigger its normal communication logic, thus achieving true non-intrusive monitoring.
[0050] 2. The bypass check value based on the time-series fingerprint is calculated independently.
[0051] When the diagnostic tool sends a time synchronization request message T_req to the target ECU, the silently monitoring third-party ECU captures the SOF (Start of Frame) time of this message at the physical layer, denoted as T1'. When the target ECU finishes processing and replies with a time synchronization response message T_resp, the third-party ECU also captures the SOF time of this response message, denoted as T2'. The measurement accuracy of T1' and T2' here can reach the microsecond level, constituting the timing fingerprint of this synchronization interaction.
[0052] The third-party ECU uses these two independently captured moments to calculate the bypass check value (ΔT_side), i.e., ΔT_side = T2' - T1'. This value represents the physical layer real round-trip time from "the request from the diagnostic tool arrives on the bus" to "the response from the target ECU appears on the bus," and this value is completely independent of the software timing logic inside the diagnostic tool and the target ECU.
[0053] 3. Dual verification and anomaly tracing mechanism.
[0054] After receiving the T_resp from the target ECU, the diagnostic tool obtains the processing delay claimed by the target ECU, denoted as ΔT_claimed. Simultaneously, the diagnostic tool reads the calculated ΔT_side from a third-party ECU through an independent diagnostic session. The core anomaly detection logic is as follows: 1) Consistency check: Calculate the difference between the two delays, D = |ΔT_side - ΔT_claimed|. Under normal communication and attack-free scenarios, D should be less than an empirical threshold ε determined by the physical characteristics of the bus and the jitter of the ECU's internal processing.
[0055] 2) Physical limit determination: When D>ε, the system determines that a "time synchronization anomaly" has occurred. The cause of this anomaly cannot be normal physical jitter, but must be external interference or internal logic error.
[0056] Anomaly tracing can be divided into the following situations: a: If ΔT_side is normal, but ΔT_claimed is significantly larger, it can be determined that the target ECU's internal software has been tampered with or that there is a bug in the gateway software. This indicates that before sending a response, the target ECU's internal software intentionally or unintentionally added an unexpected delay, attempting to conceal it in the message content.
[0057] b: If ΔT_side is significantly larger and increases proportionally with ΔT_claimed, then it can be determined that a man-in-the-middle delay injection attack has occurred. This indicates that an intermediate device intercepts the physical signal, delays it, and then replays it on the bus, causing an abnormal increase in the physical delay measured by the bypass.
[0058] c: If ΔT_side is significantly large and irregular, it can be determined that the bus physical layer is abnormal or the target ECU response timeout is caused by strong electromagnetic interference, such as frequent retransmissions by the target ECU.
[0059] Through the above steps, the present invention transforms the time synchronization process of vehicle diagnosis from a simple functional synchronization action into a diagnostic process with physical layer security audit capabilities.
[0060] This invention transforms existing but idle ECUs on the vehicle network into silent verifiers, utilizing their physical layer monitoring capabilities to generate timing fingerprints independent of communication logic. This is equivalent to adding a verification channel to diagnostic communication, independent of the data stream, enabling the diagnostic tool to detect man-in-the-middle attacks where the logic is completely correct but the physical timing has been tampered with, greatly improving the security of diagnostic sessions.
[0061] This invention, through cross-comparison of bypass check values and claimed processing delays, can precisely categorize the general phenomenon of synchronization failure into internal software faults, man-in-the-middle attacks, or physical link problems. This not only provides maintenance technicians with clear troubleshooting directions but also offers tamper-proof physical layer evidence for auditing vehicle cybersecurity incidents.
[0062] In this invention, the third-party ECU, acting as the verifier, only listens to the bus and passively records timestamps without sending any additional messages. Therefore, its impact on the existing bus load and communication latency is zero. Its computational task is extremely lightweight and can be completed using the ECU's existing hardware resources without incurring additional hardware costs. This makes it a highly feasible and extremely low-cost vehicle network security enhancement solution.
[0063] This invention does not rely on any specific upper-layer time synchronization protocol (such as PTP or NTP), but only focuses on the arrival time of physical layer messages. Therefore, it can serve as a universal security verification layer, which can be added to any existing diagnostic tool and ECU time synchronization interaction process, and has good aftermarket adaptability and compatibility with different vehicle platforms.
[0064] To better implement the anomaly detection method for vehicle diagnostic time synchronization in this embodiment of the invention, based on the anomaly detection method for vehicle diagnostic time synchronization, correspondingly, as follows: Figure 3 As shown, this embodiment of the invention also provides an anomaly detection device for vehicle diagnostic time synchronization. The anomaly detection device 300 for vehicle diagnostic time synchronization includes: The first acquisition module 301 is used to acquire the function identifier and capability description of each ECU of the target vehicle, determine the first ECU based on the function identifier and capability description of each ECU, and send a silent listening configuration message to the first ECU. The silent listening configuration message is used to instruct the first ECU to listen to the time synchronization request message and time synchronization response message of the target task. The first ECU is an ECU that does not participate in the target task and has the ability to capture timers. The determination module 302 is used to send a time synchronization request message of the target task to the second ECU and receive a time synchronization response message of the target task sent by the second ECU. Based on the time synchronization response message of the target task, the processing delay of the second ECU is determined. The second ECU is the ECU corresponding to the target task. The second acquisition module 303 is used to acquire the bypass verification delay from the first ECU. The bypass verification delay is determined based on the frame start time of the target task's time synchronization request message and the frame start time of the target task's time synchronization response message. The detection module 304 is used to perform time synchronization anomaly detection on the target task based on the processing delay and bypass verification delay of the second ECU.
[0065] The vehicle diagnostic time synchronization anomaly detection device 300 provided in the above embodiments can realize the technical solutions described in the above vehicle diagnostic time synchronization anomaly detection method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above vehicle diagnostic time synchronization anomaly detection method embodiments, which will not be repeated here.
[0066] like Figure 4 As shown, the present invention also provides a diagnostic instrument 400. The diagnostic instrument 400 includes a processor 401, a memory 402, a display 403, and a data acquisition unit 404. Figure 4 Only some of the components of the diagnostic instrument 400 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0067] In some embodiments, processor 401 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 402 or process data, such as the vehicle diagnostic time synchronization anomaly detection method of the present invention.
[0068] In some embodiments, processor 401 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 401 may be local or remote. In some embodiments, processor 401 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, internal cloud, multi-cloud, etc., or any combination thereof.
[0069] In some embodiments, memory 402 may be an internal storage unit of the diagnostic instrument 400, such as a hard disk or memory of the diagnostic instrument 400. In other embodiments, memory 402 may also be an external storage device of the diagnostic instrument 400, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the diagnostic instrument 400.
[0070] Furthermore, the memory 402 may include both internal storage units of the diagnostic instrument 400 and external storage devices. The memory 402 is used to store the application software and various types of data installed on the diagnostic instrument 400.
[0071] In some embodiments, display 403 may be an LED display, a liquid crystal display, a touch-screen liquid crystal display, or an organic light-emitting diode (OLED) touchscreen. Display 403 is used to display information from the diagnostic instrument 400 and to display a visual user interface. Components 401-403 of the diagnostic instrument 400 communicate with each other via a system bus.
[0072] In some embodiments, the data acquisition device 404 may be a chip or integrated circuit with data transmission and reception functions.
[0073] In one embodiment, when processor 401 executes the vehicle diagnostic time synchronization anomaly detection program in memory 402, the following steps can be implemented: Obtain the function identifiers and capability descriptions of each ECU in the target vehicle. Based on the function identifiers and capability descriptions of each ECU, determine the first ECU and send a silent listening configuration message to the first ECU. The silent listening configuration message is used to instruct the first ECU to listen to the time synchronization request message and time synchronization response message of the target task. The first ECU is an ECU that does not participate in the target task and has the ability to capture timers. Send a time synchronization request message for the target task to the second ECU and receive a time synchronization response message for the target task sent by the second ECU. Determine the processing delay of the second ECU based on the time synchronization response message for the target task. The second ECU is the ECU corresponding to the target task. The bypass verification delay is obtained from the first ECU. The bypass verification delay is determined based on the frame start time of the target task's time synchronization request message and the frame start time of the target task's time synchronization response message. Based on the processing delay and bypass verification delay of the second ECU, time synchronization anomalies of the target task are detected.
[0074] It should be understood that when the processor 401 executes the vehicle diagnostic time synchronization anomaly detection program in the memory 402, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.
[0075] Furthermore, this embodiment of the invention does not specifically limit the type of diagnostic device 400 mentioned. The diagnostic device 400 can be a portable electronic device such as a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, or laptop computer. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the invention, the diagnostic device 400 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0076] The above provides a detailed description of the vehicle diagnostic time synchronization anomaly detection method, device, and diagnostic instrument provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for detecting anomalies in vehicle diagnostic time synchronization, characterized in that, include: Obtain the function identifiers and capability descriptions of each ECU in the target vehicle. Based on the function identifiers and capability descriptions of each ECU, determine the first ECU and send a silent listening configuration message to the first ECU. The silent listening configuration message is used to instruct the first ECU to listen to the time synchronization request message and time synchronization response message of the target task. The first ECU is an ECU that does not participate in the target task and has the ability to capture timers. Send a time synchronization request message for the target task to the second ECU and receive a time synchronization response message for the target task sent by the second ECU. Determine the processing delay of the second ECU based on the time synchronization response message for the target task. The second ECU is the ECU corresponding to the target task. The bypass verification delay is obtained from the first ECU. The bypass verification delay is determined based on the frame start time of the target task's time synchronization request message and the frame start time of the target task's time synchronization response message. Based on the processing delay and bypass verification delay of the second ECU, time synchronization anomalies of the target task are detected.
2. The anomaly detection method for vehicle diagnostic time synchronization according to claim 1, characterized in that, The time synchronization anomaly detection for the target task based on the processing delay and bypass verification delay of the second ECU includes: Based on the absolute value of the difference between the processing delay of the second ECU and the bypass verification delay, time synchronization anomalies of the target task are detected.
3. The anomaly detection method for vehicle diagnostic time synchronization according to claim 2, characterized in that, The method of detecting time synchronization anomalies in the target task based on the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU includes: Based on the absolute value of the difference between the processing delay and bypass verification delay of the second ECU and the empirical threshold, time synchronization anomaly detection is performed on the target task. The empirical threshold is determined based on the bus physical characteristics of the target vehicle and the internal processing jitter of the second ECU.
4. The anomaly detection method for vehicle diagnostic time synchronization according to claim 3, characterized in that, The relationship between the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU and an empirical threshold is used to perform time synchronization anomaly detection on the target task, including: If the absolute value of the difference between the processing delay of the second ECU and the bypass verification delay is less than or equal to the empirical threshold, it is determined that there is no time synchronization anomaly in the target task. If the absolute value of the difference between the processing delay and the bypass verification delay of the second ECU is greater than the empirical threshold, it is determined that there is a time synchronization anomaly in the target task, and the cause of the time synchronization anomaly in the target task is determined based on the processing delay and bypass verification delay of the second ECU.
5. The anomaly detection method for vehicle diagnostic time synchronization according to claim 4, characterized in that, The reasons for determining the time synchronization anomaly of the target task based on the processing delay and bypass verification delay of the second ECU include: If the bypass verification delay is less than or equal to the first delay threshold, and the processing delay of the second ECU is greater than the second delay threshold, the cause of the abnormal time synchronization of the target task is determined to be the internal software tampering of the second ECU or the gateway software failure.
6. The anomaly detection method for vehicle diagnostic time synchronization according to claim 4, characterized in that, The reasons for determining the target task time synchronization anomaly based on the processing delay and bypass verification delay of the second ECU include: If the bypass verification delay is greater than the first delay threshold and less than or equal to the third delay threshold, and the processing delay of the second ECU is greater than the second delay threshold, the cause of the target task time synchronization anomaly is determined to be a delay injection attack.
7. The anomaly detection method for vehicle diagnostic time synchronization according to claim 4, characterized in that, The reasons for determining the target task time synchronization anomaly based on the processing delay and bypass verification delay of the second ECU include: If the bypass verification delay is greater than the third delay threshold, the cause of the target task time synchronization abnormality is determined to be a bus physical layer abnormality or a second ECU response timeout.
8. The method for detecting anomalies in vehicle diagnostic time synchronization according to any one of claims 1 to 7, characterized in that, The bypass verification delay is determined based on the difference between the frame start time of the target task's time synchronization response message and the frame start time of the target task's time synchronization request message.
9. An anomaly detection device for vehicle diagnostic time synchronization, characterized in that, include: The first acquisition module is used to acquire the function identifier and capability description of each ECU of the target vehicle, determine the first ECU based on the function identifier and capability description of each ECU, and send a silent listening configuration message to the first ECU. The silent listening configuration message is used to instruct the first ECU to listen to the time synchronization request message and time synchronization response message of the target task. The first ECU is an ECU that does not participate in the target task and has the ability to capture timers. The determination module is used to send a time synchronization request message for the target task to the second ECU and receive a time synchronization response message for the target task sent by the second ECU. Based on the time synchronization response message for the target task, the processing delay of the second ECU is determined. The second ECU is the ECU corresponding to the target task. The second acquisition module is used to acquire the bypass verification delay from the first ECU. The bypass verification delay is determined based on the frame start time of the target task's time synchronization request message and the frame start time of the target task's time synchronization response message. The detection module is used to detect time synchronization anomalies in the target task based on the processing delay and bypass verification delay of the second ECU.
10. A diagnostic instrument, characterized in that, Includes a data acquisition unit, memory, and processor, among which, The data acquisition device is communicatively connected to the processor and is used to acquire the functional identifiers and capability descriptions of each ECU of the target vehicle, as well as the bypass verification delay. The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the abnormal detection method for vehicle diagnostic time synchronization as described in any one of claims 1 to 7.