Timestamp injection method, apparatus, data acquisition device, vehicle, and storage medium
Patent Information
- Application Number
- CN202611463166.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-20
- Publication Date
- 2026-10-23
AI Technical Summary
[0005]然而,一辆车通常包含多条异构总线,每条总线上的ECU拥有各自独立的时钟源,各时钟之间存在初始偏差、长期漂移,这导致不同总线上不同ECU发送的数据帧的时间基准不一致,造成难以精准排查涉及时间的故障问题
本说明书实施例中,本方案通过采集各待采集总线上传输的电信号,并将电信号转换为比特流数据,在硬件层面上监听比特流数据中出现的帧起始事件,并在识别到的瞬间触发读取本地时钟源输出的时间作为帧起始事件对应的时间戳进行锁存,由于确定的时间戳是数据帧在总线上传输的绝对时刻,以规避软件打戳造成的时间延迟。
Smart Images

Figure CN122969702A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of electronic digital data processing technology, and in particular to timestamp injection methods, apparatus, data acquisition equipment, vehicles, and storage media. Background Technology
[0002] Vehicle electronic control units (ECUs) are interconnected through various buses, forming a vast real-time communication network. At different stages of system development, testing, verification, and fault diagnosis, engineers typically need to collect and record the data transmitted in real time on the buses in order to fully reproduce the ECU's operating status and identify potential problems.
[0003] When acquiring and analyzing bus data, accurately obtaining the timestamp of each data frame transmitted on the bus is crucial. The timestamp not only records the absolute time point when the data frame occurred, but also accurately reflects the relative timing of interactions between ECU nodes on different buses. This plays a decisive role in troubleshooting complex faults such as intermittent network congestion, timing logic reversal, and synchronization failure.
[0004] Each ECU on the bus is equipped with an independent clock source. Existing technology often relies on the local clock source of each ECU to obtain the transmission timestamp of the data frame. After acquiring the data frame transmitted on the bus, the transmission timestamp stamped by the ECU for the data frame is directly extracted for subsequent testing and diagnostic analysis.
[0005] However, a vehicle typically contains multiple heterogeneous buses, and the ECUs on each bus have their own independent clock sources. There are initial deviations and long-term drifts between the clocks, which leads to inconsistent time bases for data frames sent by different ECUs on different buses, making it difficult to accurately troubleshoot time-related faults. Summary of the Invention
[0006] To overcome the problems existing in related technologies, this specification provides a timestamp injection method, apparatus, data acquisition equipment, vehicle, and storage medium.
[0007] According to a first aspect of the embodiments of this specification, a timestamp injection method is provided, the method comprising: Acquire the electrical signals transmitted on each bus to be collected in the vehicle, and convert the electrical signals into bit stream data.
[0008] Monitor the currently processed bitstream data. When a frame start event is detected in the bitstream data, latch the current time output by the local clock source as the timestamp corresponding to the frame start event.
[0009] The data frame corresponding to the frame start event is determined from the bit stream data, and the latched timestamp is used as the transmission time of the data frame and injected into the data frame.
[0010] According to a second aspect of the embodiments of this specification, a timestamp injection apparatus is provided, the apparatus comprising: The data acquisition module is used to acquire the electrical signals transmitted on each bus to be acquired and convert the electrical signals into bit stream data.
[0011] The timestamp module is used to monitor the currently processed bitstream data. When a frame start event is detected in the bitstream data, the current time output by the local clock source is latched as the timestamp corresponding to the frame start event.
[0012] The timestamp injection module is used to determine the data frame corresponding to the frame start event from the bit stream data, and inject the latched timestamp as the transmission time of the data frame into the data frame.
[0013] According to a third aspect of the embodiments of this specification, a data acquisition device is provided, the device comprising: The timestamp injection device as described in the second aspect; The caching module is used to cache the timestamp-injected data frames output by the timestamp injection device.
[0014] According to a fourth aspect of the embodiments of this specification, a vehicle is provided, the vehicle being equipped with the data acquisition device as described in the third aspect.
[0015] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method as described in the first aspect.
[0016] The technical solutions provided in the embodiments of this specification may include the following beneficial effects: In the embodiments of this specification, this solution collects the electrical signals transmitted on each bus to be collected and converts the electrical signals into bit stream data. At the hardware level, it listens for frame start events in the bit stream data and triggers the reading of the time output by the local clock source at the instant of recognition as the timestamp corresponding to the frame start event for latching. Since the determined timestamp is the absolute moment of the data frame transmission on the bus, it avoids the time delay caused by software stamping.
[0017] Since all ECUs on all buses to be acquired determine their transmission time based on the same local clock source, by establishing a unified time reference, the relative time drift caused by the independent clocks of different ECUs is eliminated, and the precise alignment of the transmission time of different ECUs is achieved.
[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.
[0020] Figure 1 This is a schematic diagram illustrating a data acquisition scenario according to an exemplary embodiment of this specification.
[0021] Figure 2 This is a flowchart illustrating a timestamp injection method according to an exemplary embodiment of this specification.
[0022] Figure 3 This is a block diagram illustrating a timestamp injection device according to an exemplary embodiment of this specification.
[0023] Figure 4 This is a schematic diagram of the structure of a data acquisition device according to an exemplary embodiment of this specification. Detailed Implementation
[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.
[0025] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0026] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0027] Vehicle electronic control units (ECUs) are interconnected through various buses, forming a vast real-time communication network. At different stages of system development, testing, verification, and fault diagnosis, engineers typically need to collect and record the data transmitted in real time on the buses in order to fully reproduce the ECU's operating status and identify potential problems.
[0028] To acquire data transmitted on the bus to be collected, existing technologies typically use on-board computing units (such as T-Boxes, domain controllers, etc.) to collect the data transmitted on the bus. Of course, there are also solutions that use external data acquisition devices, which are coupled to the vehicle's bus to be collected, to bypass and collect the data transmitted in real time on the bus.
[0029] When acquiring and analyzing bus data, accurately obtaining the timestamp of each data frame transmitted on the bus is crucial. The timestamp not only records the absolute time point when the data frame occurred, but also accurately reflects the relative timing of interactions between ECU nodes on different buses. This plays a decisive role in troubleshooting complex faults such as intermittent network congestion, timing logic reversal, and synchronization failure.
[0030] Each ECU on the bus is equipped with an independent clock source. Whether data is collected through the on-board computing unit or an external data acquisition device, existing technologies often rely on the local clock source of each ECU to obtain the transmission timestamp of the data frame. After acquiring the data frame transmitted on the bus, the transmission timestamp stamped by the ECU for the data frame is directly extracted for subsequent testing and diagnostic analysis.
[0031] However, a vehicle typically contains multiple heterogeneous buses, and the ECUs on each bus have their own independent clock sources. There are initial deviations and long-term drifts between the clocks, which leads to inconsistent time bases for data frames sent by different ECUs on different buses. This makes it difficult to accurately troubleshoot time-related faults based on the transmission timestamps set by the ECUs.
[0032] To address the aforementioned technical problems, this application provides a timestamp injection method. This method can be executed by a timestamp injection device, which can be integrated into a data acquisition device as a functional module specifically designed to re-inject and transmit timestamps into acquired data frames. Alternatively, the timestamp injection device can be a standalone device, externally connected to the data acquisition device when needed to extend the timestamp re-injection functionality.
[0033] For example, such as Figure 1As shown, the timestamp injection device 111 can be integrated into the data acquisition device 11 as one of its functional modules. The timestamp injection module 111 can be coupled to the bus 10 on the vehicle to be acquired, and is used to acquire data frames and inject a timestamp of the same time reference into each acquired data frame as its transmission time. The data acquisition device 11 may include a buffer module 112 for buffering data frames with re-injected timestamps.
[0034] Of course, the data acquisition device may also have other functional modules, such as an analysis module for performing fault analysis on the acquired data frames locally, or an upload module for uploading the analysis results or the acquired data frames to the cloud, etc. This solution does not limit these.
[0035] like Figure 2 As shown, Figure 2 This is a flowchart illustrating a timestamp injection method according to an exemplary embodiment, including steps 201-203: Step 201: Acquire the electrical signals transmitted on each bus to be collected in the vehicle, and convert the electrical signals into bit stream data.
[0036] Step 202: Listen to the currently processed bitstream data. When a frame start event is detected in the bitstream data, latch the current time output by the local clock source as the timestamp corresponding to the frame start event.
[0037] Step 203: Determine the data frame corresponding to the frame start event from the bit stream data, and inject the latched timestamp as the transmission time of the data frame into the data frame.
[0038] The types of buses to be acquired on a vehicle include, but are not limited to, CAN (Controller Area Network), CAN FD (Flexible Data Rate CAN) bus, LIN (Partial Interconnect Network) bus, in-vehicle Ethernet, and FlexRay bus. The bus to be acquired on a vehicle refers to the bus where the target ECU is located. For example, to analyze whether the issuance and response of control commands to the target ECU are normal, the bus used by the target ECU for communication can be used as the bus to be acquired.
[0039] The local clock source can refer to the clock source internally configured in the timestamp injection device 111, which may include a high-stability crystal oscillator and a time counter. When re-injecting timestamps into the data frames sent by each ECU, the determination of the transmission timestamp is based on the same local clock source, ensuring precise alignment of transmission times between different ECUs and eliminating relative time drift caused by independent clocks of different ECUs. Of course, the local clock source can also reuse the local clock source built into an external device deployed with the clock stamp injection device 111. That is, the manufactured clock stamp injection device 111 may not have its own local clock source, but instead utilize an external local clock source.
[0040] The frame start event refers to the first specific bit identifier (e.g., the SOF bit) at the beginning of each data frame transmission, used to identify that a new data frame begins from the current bit. In this scheme, the frame start event is detected at the acquisition interface, and the current time output by the local clock source is latched as the timestamp corresponding to the frame start event.
[0041] The entire process is implemented at the physical layer, avoiding the uncertainties and delays caused by software-based time stamping. For example, existing technology timestamps data after it arrives at the CPU, handled by the driver. Due to operating system interrupt delays and task scheduling uncertainties, timestamp errors can reach tens of microseconds or even milliseconds, and these errors are unpredictable. This solution, however, triggers the latching of the current time output from the local clock source the instant the data frame arrives at the physical signal level. The entire process is instantaneous, and the error between the latched timestamp and the ECU's data frame transmission time depends only on the propagation delay of the data frame on the bus circuit, which is negligible. Alternatively, the propagation delay can be pre-calibrated, and the latched timestamp minus the pre-calibrated delay can be used as the data frame transmission time.
[0042] In order to acquire the electrical signals transmitted on each bus to be acquired in the vehicle, the timestamp injection device can be equipped with a data acquisition module, which is coupled to each bus to be acquired, to acquire the electrical signals transmitted on each bus to be acquired, and convert the electrical signals into bit stream data.
[0043] Regarding the coupling method between the data acquisition module and each bus to be acquired, the data acquisition module can be connected to the vehicle's OBD-II (On-Board Diagnostics II, second-generation on-board automatic diagnostic system) or DoIP interface (Diagnostic communication over Internet Protocol, IP-based diagnostic communication) to the bus to be acquired. Of course, other coupling methods can also be used, such as coupling through adapter harnesses, etc. This application does not impose any restrictions on the coupling method.
[0044] In order to monitor the bitstream data currently being processed by the data acquisition module and, when a frame start event is identified in the bitstream data, to latch the current time output by the local clock source as the timestamp corresponding to the frame start event, a timestamp generation module can be set in the timestamp injection device to achieve the above function.
[0045] The timestamp generation module can be connected to the data acquisition module and the local clock source respectively, and is used to monitor the bit stream data currently being processed by the data acquisition module and to control the latching of the time output by the local clock source.
[0046] In one embodiment, the data acquisition module may include multiple access interfaces, each of which is coupled to a corresponding bus to be acquired, for receiving electrical signals transmitted on the corresponding bus to be acquired and converting the electrical signals into bit stream data.
[0047] The timestamp stamping module may include a timestamp stamping submodule corresponding to each access interface, which is used to monitor the bit stream data currently being processed by the access interface. When a frame start event is identified in the bit stream data being processed on the corresponding access interface, the current time output by the local clock source is used as the timestamp corresponding to the frame start event and latched.
[0048] In this embodiment, a corresponding timestamp stamping submodule is configured for each access interface coupled to the bus to be acquired, so that the stamping tasks of the data frames transmitted on each bus to be acquired can be processed in parallel, avoiding the delay error caused by queuing.
[0049] The functionality of each timestamp submodule in the timestamp module can be implemented based on an FPGA (Field-Programmable Gate Array). For each access interface, it can be implemented based on a standard physical layer transceiver. This application does not limit the hardware architecture used to implement the above functions.
[0050] In one embodiment, the data acquisition module may further include a mode switching submodule, which is used to identify the bus type of the bus to be acquired coupled to the access interface, and control the access interface to switch to the corresponding working mode according to the bus type, so that the access interface can adapt to the bus to be acquired.
[0051] Bus types can include CAN (Controller Area Network), CAN FD (Flexible Data Rate CAN), LIN (Partial Interconnect Network), FlexRay, and automotive Ethernet, among others. Access interfaces typically require different operating modes for different bus types during data acquisition. Existing technology designs access interfaces can only acquire data transmitted on the corresponding bus type. This embodiment, however, uses a mode switching submodule to control the access interface to switch operating modes to adapt to the bus being acquired, thus minimizing the number of access interfaces.
[0052] Over time, the local clock source may experience clock drift. To address this, in one embodiment, time calibration information can be acquired, and the local clock source can be calibrated based on this information. The time calibration information includes a reference time provided by a reference clock source and the local time output by the local clock source at the reference time.
[0053] For example, a GNSS receiver or an Ethernet gPTP interface can be integrated into the timestamp injection device to receive reference time from a reference time source. For instance, the moment the GNSS receiver receives the reference time, the local time output by the local clock source is locked, and the reference time is parsed from the time message. Based on the difference between the reference time and the local time, the local clock source is calibrated.
[0054] Of course, a loop calibration method can also be used, which does not require an integrated GNSS receiver or Ethernet gPTP interface to complete the calibration operation. By sending a test message with a known delay to the device where the reference clock source is located, the clock drift of the local clock source is calculated in reverse based on the timestamp of the test message and the required transmission delay.
[0055] In this embodiment, the clock drift problem of the local clock source can be effectively mitigated.
[0056] However, the above-mentioned time calibration based on GPS / PTP technology still has its limitations. For example, if a vehicle is driven to a location such as an underground parking garage where GPS signals cannot be received, clock calibration based on GPS / PTP technology will fail. While the loop calibration method avoids signal loss, it does not continuously calibrate the local clock in real time. During periods of uncalibration, the local clock source still suffers from clock drift.
[0057] To address this, this solution further determines whether the local clock source has been calibrated within a preset duration before outputting the current time. If it has not been calibrated, a correction parameter is obtained, and the timestamp of the injected data frame is corrected according to the correction parameter. The correction parameter is used to compensate for the drift of the local clock source relative to the reference clock source.
[0058] If calibrated, no correction is needed to the timestamps of the injected data frames.
[0059] After determining the correction parameters, they can be stored in the data acquisition device integrated with the timestamp injection device or in the cloud where the data acquisition device needs to upload data. For example, if the timestamp injection device is a functional module integrated into the data acquisition device, the timestamp of the data frame injected by the timestamp injection device can be the uncorrected original timestamp. The data acquisition device can correct the injected original timestamp at the software layer according to the correction parameters, while the timestamp injection device only performs the hardware stamping function at the hardware layer and does not need to care about the accuracy of the time provided by the local clock source.
[0060] For example, the correction parameters can be stored in the cloud, and the timestamp of the data frame uploaded to the cloud by the data acquisition device can be the original timestamp injected by the timestamp injection device. The cloud can correct the injected original timestamp according to the correction parameters.
[0061] Through the decoupling design described above, the hardware does not need to calibrate the time when the timestamp injection device triggers the timestamp stamping function, ensuring zero-latency stamping. Furthermore, deploying the time correction logic externally to the device also simplifies the hardware design of the timestamp injection device.
[0062] In one embodiment, the correction parameters can be determined as follows: based on several historical time calibration information obtained, a fitting function is established to describe the mapping relationship between the reference time and the corresponding local time, and the fitting parameters used by the fitting function are used as correction parameters.
[0063] For example, during the historical calibration process of a local clock source, several historical time calibration information used in the historical process can be collected. Specifically, it can be represented as: (tglobal(1),tlocal(1)),…,(tglobal(n),tlocal(n)); where tglobal() represents the reference time provided by the reference clock source at a certain moment, and tlocal() represents the local time output by the local clock source at the reference time. The fitting function can be expressed as the following formula 1: Tglobal=α⋅Tlocal+β+ (t) Formula 1 The fitting function describes the mapping relationship between the reference time and the corresponding local time, where Tlocal represents the local time and Tglobal represents the reference time. α β represents the clock frequency ratio (also known as the drift rate), and β represents the initial deviation (also known as the fixed drift). (t) represents the residual (unmodeled jitter, expected to be 0).
[0064] The α and β values mentioned above can be used as correction parameters to correct the timestamp Tlocal of the injected data frame in order to obtain the fitted Tglobal.
[0065] In practical implementation, some historical time calibration information can be obtained from the data acquisition device. Then, a fitting function describing the mapping relationship between the reference time and the corresponding local time can be established in the data acquisition device to obtain the fitting parameters. Then, the original timestamp injected into the data frame can be corrected based on the fitting parameters in the data acquisition device.
[0066] If the data acquisition device has the function of uploading data to the cloud, it can upload some historical time calibration information to the cloud, and the cloud can establish a fitting function to describe the mapping relationship between the reference time and the corresponding local time, and the cloud can correct the timestamp of the data frame uploaded by the data acquisition device.
[0067] Of course, after acquiring some historical time calibration information, the data acquisition device can also establish a fitting function locally to describe the mapping relationship between the reference time and the corresponding local time, so as to obtain the fitting parameters used by the fitting function as correction parameters, and only upload the correction parameters to the cloud, so that the cloud can correct the timestamp of the data frame uploaded by the data acquisition device.
[0068] As time goes on, with the acquisition of more and more historical time calibration information, the fitting parameters of the fitting function can be continuously updated based on the newly acquired information to compensate for the nonlinear and slowly changing clock drift of the local clock source.
[0069] Corresponding to the embodiments of the aforementioned methods, this specification also provides embodiments of a timestamp injection device and the data acquisition equipment to which it is applied.
[0070] Figure 3 This is a block diagram illustrating a timestamp injection apparatus according to an exemplary embodiment of this specification. Figure 3 As shown, the device includes: The data acquisition module 302 is used to acquire the electrical signals transmitted on each bus to be acquired and convert the electrical signals into bit stream data.
[0071] The timestamp module 304 is used to monitor the currently processed bitstream data. When a frame start event is detected in the bitstream data, the current time output by the local clock source is used as the timestamp corresponding to the frame start event and latched.
[0072] The timestamp injection module 306 is used to determine the data frame corresponding to the frame start event from the bit stream data, and inject the latched timestamp as the sending time of the data frame into the data frame.
[0073] Optionally, the device may further include a local clock source for providing a time reference.
[0074] Optionally, the data acquisition module includes multiple access interfaces, each of which is coupled to a corresponding bus to be acquired, for receiving electrical signals transmitted on the corresponding bus to be acquired and converting the electrical signals into bit stream data; the timestamp module includes timestamp submodules corresponding to each access interface, for monitoring the bit stream data currently being processed by the access interface, and when a frame start event is identified in the bit stream data being processed on the corresponding access interface, the current time output by the local clock source is latched as the timestamp corresponding to the frame start event.
[0075] Optionally, the data acquisition module further includes a mode switching submodule, used to identify the bus type of the bus to be acquired coupled to the access interface, and control the access interface to switch to the corresponding working mode according to the bus type, so that the access interface can adapt to the bus to be acquired.
[0076] Optionally, the device further includes a clock discipline module for acquiring time calibration information and performing calibration operations on the local clock source based on the time calibration information; the time calibration information includes a reference time provided by a reference clock source and a local time output by the local clock source at the reference time.
[0077] Optionally, the device further includes a timestamp correction module, used to determine whether the local clock source has been calibrated within a preset duration before outputting the current time; if it has not been calibrated, it obtains correction parameters and corrects the timestamp of the injected data frame according to the correction parameters; the correction parameters are used to compensate for the drift of the local clock source relative to the reference clock source.
[0078] Optionally, the correction parameter is determined as follows: based on several historical time calibration information obtained, a fitting function is established to describe the mapping relationship between the reference time and the corresponding local time, and the fitting parameters used by the fitting function are used as the correction parameter.
[0079] Figure 4 This is a schematic diagram illustrating the structure of a data acquisition device according to an exemplary embodiment. Figure 4 As shown, the data acquisition device 11 includes, as follows: Figure 3 The timestamp injection device 111 and the cache module 112 shown are used to cache the data frames with timestamps injected by the timestamp injection device.
[0080] This specification also provides a vehicle that uses a data acquisition device 11.
[0081] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the aforementioned timestamp injection methods provided in this application.
[0082] Specifically, computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks.
[0083] This specification also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of any of the aforementioned timestamp injection methods.
Claims
1. A timestamp injection method, characterized in that, The method includes: Acquire the electrical signals transmitted on each bus to be collected in the vehicle, and convert the electrical signals into bit stream data; Listen to the currently processed bitstream data. When a frame start event is detected in the bitstream data, latch the current time output by the local clock source as the timestamp corresponding to the frame start event. The data frame corresponding to the frame start event is determined from the bit stream data, and the latched timestamp is used as the transmission time of the data frame and injected into the data frame.
2. The method according to claim 1, characterized in that, The method further includes: Obtain time calibration information and perform calibration operation on the local clock source based on the time calibration information; the time calibration information includes a reference time provided by a reference clock source and a local time output by the local clock source at the reference time.
3. The method according to claim 2, characterized in that, The method further includes: Determine whether the local clock source has been calibrated within a preset duration before outputting the current time. If it has not been calibrated, obtain correction parameters and correct the timestamp of the injected data frame according to the correction parameters. The correction parameters are used to compensate for the drift of the local clock source relative to the reference clock source.
4. The method according to claim 3, characterized in that, The correction parameter is determined in the following manner: Based on the acquired historical time calibration information, a fitting function is established to describe the mapping relationship between the reference time and the corresponding local time, and the fitting parameters used by the fitting function are used as the correction parameters.
5. A timestamp injection device, characterized in that, The device includes: The data acquisition module is used to acquire the electrical signals transmitted on each bus to be acquired and convert the electrical signals into bit stream data; The timestamp module is used to monitor the currently processed bitstream data. When a frame start event is detected in the bitstream data, the current time output by the local clock source is used as the timestamp corresponding to the frame start event and latched. The timestamp injection module is used to determine the data frame corresponding to the frame start event from the bit stream data, and inject the latched timestamp as the transmission time of the data frame into the data frame.
6. The apparatus according to claim 5, characterized in that, The device further includes: A local clock source is used to provide a time reference.
7. The apparatus according to claim 5, characterized in that, The data acquisition module includes multiple access interfaces, each of which is coupled to a corresponding bus to be acquired, for receiving electrical signals transmitted on the corresponding bus to be acquired, and converting the electrical signals into bit stream data. The timestamp stamping module includes a timestamp stamping submodule corresponding to each access interface. It is used to monitor the bitstream data currently being processed by the access interface. When a frame start event is identified in the bitstream data being processed on the corresponding access interface, the current time output by the local clock source is used as the timestamp corresponding to the frame start event and latched.
8. The apparatus according to claim 7, characterized in that, The data acquisition module also includes a mode switching submodule, which is used to identify the bus type of the bus to be acquired coupled to the access interface, and control the access interface to switch to the corresponding working mode according to the bus type, so that the access interface can adapt to the bus to be acquired.
9. A data acquisition device, characterized in that, The device includes: The timestamp injection device as described in any one of claims 5-8; The caching module is used to cache the timestamp-injected data frames output by the timestamp injection device.
10. A vehicle, characterized in that, The vehicle is equipped with the data acquisition device as described in claim 9.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps of the method as described in any one of claims 1-4.
12. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method as claimed in any one of claims 1-4.