Java-based real-time processing method, media, and equipment for multi-source heterogeneous data from test vehicles.

By employing a Java-based real-time processing method for multi-source heterogeneous data, utilizing a lock-free circular buffer and event bus architecture, the stability and real-time performance issues of data processing in intelligent connected vehicle experiments were resolved. This approach achieves efficient and reliable data alignment and processing, supporting rapid development and deployment.

CN123115133APending Publication Date: 2026-11-17WUHAN SOUTH SAGITTARIUS INTEGRATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611202333.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies for processing multi-source heterogeneous data in road tests of intelligent connected vehicles suffer from insufficient stability, high resource consumption, poor cross-platform compatibility, long development cycles, and inability to meet the testing requirements of real-time monitoring and rapid iteration.

Method used

A Java-based real-time processing method for multi-source heterogeneous data is adopted. By concurrently accessing the data stream through a customized data source adapter, and using a lock-free circular buffer, look-ahead buffer and interpolation alignment strategy, event bus architecture and adaptive degradation mechanism, high-precision data alignment and efficient processing are achieved.

Benefits of technology

It achieves strict alignment of data on the application's logical timeline, ensuring high throughput and low latency, improving performance and reliability, supporting rapid development and deployment, and possessing high scalability and maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115133A_ABST
    Figure CN123115133A_ABST
Patent Text Reader

Abstract

This invention provides a Java-based method, medium, and device for real-time processing of multi-source heterogeneous data from test vehicles, relating to the field of automotive test data processing technology. The method includes the following steps: concurrently accessing raw data streams from different physical interfaces via a customized data source adapter, encapsulating them into raw data objects with double timestamps, and placing them into corresponding lock-free circular buffers; a main alignment scheduling thread quantitatively consuming raw data objects from each circular buffer according to a configurable scheduling cycle, precisely placing or generating data objects arriving at different frequencies and non-uniformly as discrete data points on a logical time axis, forming aligned data frames strictly ordered by logical time; pluggable processing components subscribing to and processing data according to the configured chain of responsibility order; batch writing to a time-sliced ​​rolling file, and synchronously generating an index file. This method can fully utilize hardware synchronization results and possesses high performance, high reliability, and high scalability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive test data processing technology, and in particular to a Java-based method, medium, and device for real-time processing of multi-source heterogeneous data from test vehicles. Background Technology

[0002] In road tests of intelligent connected vehicles, the synchronous data acquisition system on the test vehicle can acquire heterogeneous data from multiple sources, including vehicle bus, cameras, LiDAR, and IMU, with high precision (microsecond level). This data is precisely timestamped at the moment of acquisition by the hardware acquisition layer and then transmitted to the vehicle's computing unit (industrial control computer) for real-time aggregation, alignment, preprocessing, and storage for subsequent analysis and data reprocessing. Existing technologies commonly employ the following solutions to process such data streams:

[0003] 1. Solution based on Robot Operating System (ROS): Although it provides a data communication framework, it suffers from problems such as insufficient stability, easy data loss, high resource consumption, and low integration with specific business logic (such as vehicle protocol parsing) in high-bandwidth, multi-node, and real-time vehicle environments. Its time management mechanism is also rather cumbersome when dealing with fine-grained alignment of precise hardware timestamps.

[0004] 2. Self-developed desktop applications based on C / C++: High performance, but long development cycle, poor cross-platform compatibility, and extremely high development requirements in multi-threaded management, memory reclamation, and exception handling, making it difficult to guarantee system robustness.

[0005] 3. Simple Java logging program: It can only implement sequential data storage and lacks advanced functions such as real-time timeline alignment, online data quality checks, and dynamic business processing pipelines, which cannot meet the testing needs of real-time monitoring and rapid iteration. Summary of the Invention

[0006] The purpose of this invention is to provide a Java-based method, medium, and device for real-time processing of multi-source heterogeneous data from test vehicles. This aims to fully utilize hardware synchronization results, offering high performance, high reliability, high scalability, and a vehicle-mounted data aggregation and processing software solution that is easy to develop and deploy quickly. The specific technical solution is as follows:

[0007] A Java-based method for real-time processing of multi-source heterogeneous data from a test vehicle, the method comprising the following steps:

[0008] S100 concurrently accesses raw data streams from different physical interfaces through a customized data source adapter, creates an independent access thread for each data stream, receives raw data packets that have been stamped with high-precision nanosecond-level timestamps by the hardware acquisition layer at the moment of acquisition, adds local receiving timestamps, encapsulates them into raw data objects with double timestamps, and puts them into the corresponding lock-free circular buffer.

[0009] S200: A main alignment scheduling thread consumes raw data objects quantitatively from each circular buffer according to a configurable scheduling period. Based on a globally monotonically increasing software logical time axis, a look-ahead buffer and interpolation alignment strategy is adopted to adaptively select the interpolation algorithm or the nearest neighbor matching algorithm according to the data type of the raw data stream. Data objects arriving at different frequencies and in a non-uniform manner are accurately placed or generated as discrete data points on the logical time axis, forming an aligned data frame that is strictly ordered according to logical time.

[0010] S300: Each aligned data frame is published to the event bus. Pluggable processing components subscribe to and process the data in the configured chain of responsibility order, and the processing results are republished to the event bus.

[0011] The S400 uses an independent storage thread to subscribe to data frames that need to be persisted from the event bus. It employs a double-buffered queue and group commit strategy to write data in batches in a time-sliced ​​rolling file and simultaneously generates an index file containing timestamp ranges, offsets, and data block lengths.

[0012] Furthermore, in step S100, the data types of the original data stream include CAN messages, inertial measurement unit measurement values, lidar point clouds, millimeter-wave radar data, and various camera image frames.

[0013] Furthermore, in step S200, the look-ahead buffer and interpolation alignment strategy includes the following steps:

[0014] S210. Maintain a configurable look-ahead buffer window to ensure that the data objects consumed by the scheduled thread cover a sufficient range before and after the current alignment point;

[0015] S220. For discrete signal data, a linear interpolation algorithm is used to calculate the interpolation based on the two closest data points before and after the current logical time point; when the interval between the preceding and following data exceeds a preset threshold, the interpolation result is marked with a low confidence level; for sampled signal data, a nearest neighbor matching algorithm is used to select the sampled frame with the closest time.

[0016] S230. When there is no valid data for a certain data path within the lookout window, it is marked as a data missing state.

[0017] Furthermore, in step S300, the pluggable processing component can perform at least one of the following data processing functions: data validity verification, unit conversion, vehicle coordinate transformation, rule-based real-time alarm, data compression and filtering, and real-time target detection result fusion.

[0018] Furthermore, in step S400, each index record in the index file includes at least: the filename of the time segment to which it belongs, the start timestamp, the end timestamp, the number of data frames, the start offset, and the length of the data block in bytes.

[0019] Furthermore, step S400 is followed by step S500, an exception handling and degradation mechanism: when a certain data stream is continuously missing beyond the heartbeat timeout threshold, an alarm is issued and subsequent alignment frames are continuously marked as missing, without blocking the processing of other data streams; when a hardware timestamp jump or backflow of a certain data stream is detected to exceed the preset deviation threshold, the data source is marked as timestamp abnormal, and the local system timestamp is temporarily used for compensation and alignment; when the usage rate of the circular buffer exceeds the high watermark, an adaptive degradation strategy is triggered.

[0020] Furthermore, the high water level is set at 80%.

[0021] Furthermore, adaptive degradation strategies include reducing the frequency of non-critical processing or enabling thinning of historical data.

[0022] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the Java-based real-time processing method for multi-source heterogeneous data from a test vehicle as described above.

[0023] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the Java-based real-time processing method for multi-source heterogeneous data of a test vehicle as described above.

[0024] The present invention provides a Java-based method, medium, and device for real-time processing of multi-source heterogeneous data from a test vehicle, which has the following beneficial effects:

[0025] This invention extends the high-precision timestamp value of the hardware acquisition layer to the application layer through a software-layer lookahead buffer and interpolation alignment strategy. This achieves strict and precise data alignment on the application's logical timeline, providing a reliable foundation for subsequent analysis. It employs a lock-free circular buffer to isolate access and processing, uses independent processing threads and an event bus to decouple modules, optimizes I / O through asynchronous storage and group commit, and includes comprehensive data missing detection, timestamp anomaly handling, and adaptive degradation mechanisms. This ensures high throughput, low latency, and stable operation under high load, preventing data loss and system crashes, thus improving performance and reliability. Based on the Java ecosystem, its clear modular design and pluggable processing pipeline and event bus architecture allow adding a new data source or processing algorithm simply by implementing a standard interface and declaring it in a configuration file. This meets the characteristics of rapidly changing testing needs and offers high scalability and maintainability. Attached Figure Description

[0026] Figure 1 A flowchart illustrating a Java-based real-time processing method for multi-source heterogeneous data from a test vehicle, as provided in an embodiment of the present invention;

[0027] Figure 2 This is a structural block diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0028] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. The advantages and features of the present invention will become clearer from the following description. It should be noted that the drawings are all in a very simplified form and use non-precise proportions, and are only used to facilitate and clearly illustrate the purpose of the embodiments of the present invention.

[0029] Example 1

[0030] This embodiment provides a Java-based method for real-time processing of multi-source heterogeneous data from a test vehicle, running on an onboard industrial control computer. (See reference...) Figure 1 As shown, the method includes the following steps:

[0031] S100, High-fidelity data access: Through a customized data source adapter, it concurrently accesses raw data streams from different physical interfaces, creates an independent access thread for each data stream, receives raw data packets that have been stamped with high-precision nanosecond-level timestamps by the hardware acquisition layer at the moment of acquisition, attaches a local received timestamp, encapsulates them into raw data objects with double timestamps, and puts them into the corresponding lock-free circular buffer.

[0032] In one embodiment, the data types of the raw data stream include CAN messages, inertial measurement unit measurements, lidar point clouds, millimeter-wave radar data, and camera image frames.

[0033] Specifically, a customized data source adapter is used to concurrently access raw data streams from different physical interfaces. An independent access thread is created for each data stream to read raw data packets, which have been pre-stamped with high-precision nanosecond timestamps by the hardware acquisition layer at the moment of acquisition, from sources such as Socket, CAN card driver interface, and shared memory. Upon reception, the local system timestamp of the data packet arrival is recorded, and this, along with the hardware timestamp, is encapsulated into a raw data object with dual timestamps. This object is then placed into a corresponding lock-free circular buffer, thus decoupling the acquisition thread from the subsequent processing thread.

[0034] S200, High-Precision Timeline Alignment: A main alignment scheduling thread consumes raw data objects quantitatively from each circular buffer according to a configurable scheduling period. Based on a globally monotonically increasing software logical timeline, a look-ahead buffering and interpolation alignment strategy is adopted to adaptively select the interpolation algorithm or nearest neighbor matching algorithm according to the data type of the raw data stream. Data objects arriving at different frequencies and in a non-uniform manner are accurately placed or generated as discrete data points on the logical timeline, forming aligned data frames that are strictly ordered according to logical time.

[0035] In one embodiment, the look-ahead buffer and interpolation alignment strategy includes the following steps:

[0036] S210. Maintain a configurable look-ahead buffer window to ensure that the data objects consumed by the scheduled thread cover a sufficient range before and after the current alignment point;

[0037] S220. For discrete signal data, a linear interpolation algorithm is used to calculate the interpolation based on the two closest data points before and after the current logical time point; when the interval between the preceding and following data exceeds a preset threshold, the interpolation result is marked with a low confidence level; for sampled signal data, a nearest neighbor matching algorithm is used to select the sampled frame with the closest time.

[0038] S230. When there is no valid data for a certain data path within the lookout window, it is marked as a data missing state.

[0039] Specifically, the look-ahead buffer and interpolation alignment strategy includes: maintaining a configurable look-ahead buffer window (default 50 milliseconds) to ensure that the data objects consumed by the scheduling thread cover a sufficient range before and after the current alignment point on the logical time axis to meet the accuracy requirements of interpolation calculation. Based on the type and characteristics of the data source, an alignment algorithm is adaptively selected: for discrete signal data (such as CAN messages and sensor measurements), a linear interpolation algorithm is used, calculating the interpolation based on the two closest data points before and after the current logical time point; for sampled signal data (such as camera image frames and LiDAR point cloud frames), a nearest neighbor matching algorithm is used, selecting the sampled frame with the closest time. When the sampling interval of a certain data source exceeds a preset threshold, the interpolation result is marked with a low confidence level. Data objects arriving at different frequencies and in a non-uniform manner are precisely placed or generated as discrete data points on the logical time axis according to their hardware timestamps, forming "aligned data frames" strictly ordered by logical time. When a certain data source is missing within the prediction window, the data source location is marked as "data missing" and the duration of the missing data is recorded.

[0040] S300, Pluggable Service Processing: Each aligned data frame is published to the event bus. Pluggable processing components subscribe to and process the data in the configured chain of responsibility order, and the processing results are republished to the event bus.

[0041] In one embodiment, the pluggable processing component can perform at least one of the following data processing functions: data validity verification, unit conversion, vehicle coordinate transformation, rule-based real-time alarm, data compression and filtering, and real-time target detection result fusion.

[0042] Specifically, each aligned data frame is published to an internal event bus. Pluggable processing components' data processing modules subscribe to the event bus and form a data processing pipeline according to the configured chain of responsibility. These modules include, but are not limited to: data validity verification, unit conversion, vehicle coordinate transformation, real-time alarm based on simple rules, data compression and filtering, and real-time target detection result fusion. Each module is dynamically loaded, and the processing results can be redistributed to the event bus for use by subsequent modules or storage.

[0043] S400, Highly Reliable Asynchronous Storage: A separate storage thread subscribes to persistent data frames from the event bus, employs a double-buffered queue and group commit strategy, writes in batches in a time-sharded rolling file, and synchronously generates an index file containing timestamp ranges, offsets, and data block lengths.

[0044] In one embodiment, each index record in the index file includes at least: the filename of the time segment to which it belongs, the start timestamp, the end timestamp, the number of data frames, the start offset, and the length of the data block in bytes.

[0045] Specifically, a separate storage thread subscribes to the final data frames that need to be persisted from the event bus. The storage thread serializes the data frames into a specific format and writes them to disk using a time-sharded rolling file strategy. The stored procedure employs a double-buffered queue and group commit strategy: while one buffer receives new data frames, the other buffer batches and rotates the already full data to the file, avoiding I / O blocking of the real-time processing stream. Simultaneously, a separate index file is generated, with each index record containing at least: the time-shard filename to which the data block belongs, the start timestamp, the end timestamp, the number of data frames, the start offset, and the data block byte length, supporting subsequent fast time range retrieval.

[0046] In one embodiment, step S400 is followed by step S500, an exception handling and degradation mechanism: when a certain data stream is continuously missing beyond the heartbeat timeout threshold, an alarm is issued and subsequent alignment frames are continuously marked as missing, without blocking the processing of other data streams; when a hardware timestamp jump or backflow of a certain data stream is detected to exceed a preset deviation threshold, the data source is marked as timestamp abnormal, and the local system timestamp is temporarily used for compensation and alignment; when the usage rate of the circular buffer exceeds the high watermark, an adaptive degradation strategy is triggered.

[0047] In one embodiment, the high water level is set to 80%.

[0048] In one embodiment, the adaptive degradation strategy includes reducing the frequency of non-critical processing or enabling thinning of historical data.

[0049] Specifically, when a sensor data stream is continuously missing for more than a preset heartbeat timeout threshold, the system issues an alarm and continuously marks the data source location as missing in subsequent alignment frames, without blocking the normal processing of other data streams. When a hardware timestamp jump or reversal is detected in a data stream (the deviation relative to the global time base exceeds a preset threshold), the data source is marked as having an abnormal timestamp state. The alignment module temporarily uses the local system timestamp to compensate for the data stream until the timestamp returns to normal monotonicity. When the system processing speed cannot keep up with the data generation speed, the utilization rate of each circular buffer is monitored. When the utilization rate of a buffer exceeds the high watermark (e.g., 80%), an adaptive degradation strategy is triggered, including: automatically reducing the execution frequency of non-critical processing pipelines or enabling thinning processing for historical frame data.

[0050] This invention extends the high-precision timestamp value of the hardware acquisition layer to the application layer through a software-layer lookahead buffer and interpolation alignment strategy, achieving strict and accurate data alignment on the application's logical timeline and providing a reliable foundation for subsequent analysis. It employs a lock-free circular buffer to isolate access and processing, uses independent processing threads and an event bus to decouple modules, optimizes I / O through asynchronous storage and group commit, and includes comprehensive data missing detection, timestamp anomaly handling, and adaptive degradation mechanisms. This ensures high throughput, low latency, and stable operation under high load, preventing data loss and system crashes, thus improving performance and reliability. Based on the Java ecosystem, its clear modular design and pluggable processing pipeline and event bus architecture allow adding a new data source or processing algorithm simply by implementing a standard interface and declaring it in a configuration file, meeting the rapidly changing testing requirements and offering high scalability and maintainability. Exposing rich runtime metrics through a standard management interface, including buffer level, processing latency, data missing alarms, and timestamp anomaly alarms, facilitates real-time monitoring of system health and performance bottlenecks by developers and testers, improving system maintainability and providing excellent observability.

[0051] Verification Example:

[0052] Develop a Java application named "DataFusion Core" with the following system modules:

[0053] Data access layer:

[0054] For camera data, a CameraAdapter is implemented to read H.264 streams from multicast UDP. At the moment of exposure, the camera embeds a nanosecond-level hardware timestamp into the data frame header via the PTP protocol. The CameraAdapter receives this timestamp, extracts it, and appends a local system timestamp, forming a double-timestamped data object. For CAN data, a CANAdapter is implemented, which reads messages via JNI calls to the SocketCAN interface. The hardware CAN card records a hardware timestamp upon receiving a message; the CANAdapter extracts this timestamp and appends a local timestamp. Each adapter internally maintains a high-performance, lock-free circular buffer instance, writing the double-timestamped data object into the buffer for downstream consumption.

[0055] Time alignment core:

[0056] The AlignmentScheduler thread runs every 5 milliseconds by default (the scheduling cycle can be adjusted via configuration file). It checks the data objects at the header of each buffer, using their hardware timestamps as a reference, and advances the logical timeline in 5-millisecond steps. The look-ahead buffer window is set to 50 milliseconds to ensure sufficient data samples before and after the current alignment point. For the generation of the alignment frame at logical time point t=100ms: the image frame with the closest hardware timestamp to 100ms is selected from the Camera buffer (nearest neighbor matching) and included in the alignment frame; the two most recent messages with hardware timestamps before and after 100ms (e.g., 99.950ms and 100.050ms) are found from the CAN buffer, and the virtual CAN message value at t=100ms is calculated by linear interpolation and included in the alignment frame. If the interval between the preceding and following messages exceeds 20ms, the interpolation result is marked with a low confidence flag; if no data arrives from a certain data source within the 50ms look-ahead window, the data source location is marked as "data missing," and the alignment frame is still generated normally.

[0057] Business processing layer:

[0058] Inter-module communication is implemented using an event bus. The aligned AlignedFrameEvent is published to the event bus. CoordinateTransformModule subscribes to this event, transforming the target from radar coordinates to vehicle coordinates; SimpleAlertModule checks if the vehicle speed exceeds a threshold; DetectionFusionModule subscribes to the event, fusing real-time target detection results. All modules are registered via annotations, and the processing order is defined by a configuration file, forming an ordered chain of responsibility.

[0059] Storage management layer:

[0060] The StorageWriter thread subscribes to ProcessedFrameEvents and collects events using a double-buffered queue. The double-buffered queue contains two buffers: the current write buffer continuously receives new events, and the backup write buffer is switched to write mode when certain conditions are met (every 500 milliseconds of data accumulated or the buffer usage reaches a threshold). The write thread batch serializes the data in the backup write buffer and writes it to time-sharded .dat files (e.g., generating a new file every 10 minutes), and simultaneously records the shard filename, start timestamp, end timestamp, start offset, and data block length to the index file, supporting subsequent fast location and reading by time range.

[0061] Configuration and monitoring layer:

[0062] A dependency injection framework is used for module configuration and lifecycle management. Metrics such as the remaining capacity of each circular buffer, the latest processing timestamp of the alignment thread, the queue length, data missing count, and timestamp anomaly count are exposed to monitoring tools through a standard management interface.

[0063] Exception handling:

[0064] When data from a certain sensor channel is continuously missing for more than 3 seconds (the heartbeat timeout threshold is configurable), the system issues an alarm through the monitoring interface. This data source will continue to be marked as missing in subsequent alignment frames, without affecting the processing of other data sources. When a hardware timestamp jump exceeding 100 milliseconds is detected, the system issues a timestamp anomaly alarm through the monitoring interface, and the alignment module automatically switches to the local system timestamp for temporary compensation alignment of the data channel. When a new millimeter-wave radar data source needs to be added, developers only need to:

[0065] 1. Implement RadarAdapter, conforming to a unified data source interface;

[0066] 2. Declare the adapter and its corresponding buffer size in the configuration file;

[0067] 3. If necessary, develop a specific radar data processing module and register it to the event bus. The system can take effect dynamically without modifying the core alignment and storage logic.

[0068] Example 2

[0069] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the Java-based real-time processing method for multi-source heterogeneous data from a test vehicle described above.

[0070] The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.

[0071] Example 3

[0072] This embodiment provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the Java-based real-time processing method for multi-source heterogeneous data of a test vehicle described above.

[0073] like Figure 2 As shown, the computer device 70 may include: at least one processor 71, such as a CPU (Central Processing Unit), at least one communication interface 73, a memory 74, and at least one communication bus 72. The communication bus 72 is used to enable communication between these components. The communication interface 73 may include a display screen and a keyboard; optionally, the communication interface 73 may also include a standard wired interface or a wireless interface. The memory 74 may be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 74 may also be at least one storage device located remotely from the aforementioned processor 71. The memory 74 stores application programs, and the processor 71 calls the program code stored in the memory 74 to execute any of the above-described method steps.

[0074] The communication bus 72 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 72 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 2 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0075] The memory 74 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 74 may also include a combination of the above types of memory.

[0076] The processor 71 can be a central processing unit (CPU), a network processor (NP), or a combination of CPU and NP.

[0077] The processor 71 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0078] Optionally, the memory 74 is also used to store program instructions. The processor 71 can call the program instructions to implement the Java-based real-time processing method for multi-source heterogeneous data from a test vehicle, as described in this invention.

[0079] Those skilled in the art should understand that the present invention can be implemented in many other specific forms without departing from the spirit and scope of the invention. Any changes or modifications made by those skilled in the art based on the embodiments of the present invention and the above disclosure shall fall within the protection scope of the claims.

Claims

1. A Java-based method for real-time processing of multi-source heterogeneous data from a test vehicle, characterized in that, The method includes the following steps: S100 concurrently accesses raw data streams from different physical interfaces through a customized data source adapter, creates an independent access thread for each data stream, receives raw data packets that have been stamped with high-precision nanosecond-level timestamps by the hardware acquisition layer at the moment of acquisition, adds local receiving timestamps, encapsulates them into raw data objects with double timestamps, and puts them into the corresponding lock-free circular buffer. S200: A main alignment scheduling thread consumes raw data objects quantitatively from each circular buffer according to a configurable scheduling period. Based on a globally monotonically increasing software logical time axis, a look-ahead buffer and interpolation alignment strategy is adopted to adaptively select the interpolation algorithm or the nearest neighbor matching algorithm according to the data type of the raw data stream. Data objects arriving at different frequencies and in a non-uniform manner are accurately placed or generated as discrete data points on the logical time axis, forming an aligned data frame that is strictly ordered according to logical time. S300: Each aligned data frame is published to the event bus. Pluggable processing components subscribe to and process the data in the configured chain of responsibility order, and the processing results are republished to the event bus. The S400 uses an independent storage thread to subscribe to data frames that need to be persisted from the event bus. It employs a double-buffered queue and group commit strategy to write data in batches in a time-sliced ​​rolling file and simultaneously generates an index file containing timestamp ranges, offsets, and data block lengths.

2. The method for real-time processing of multi-source heterogeneous data from a test vehicle based on Java, as described in claim 1, is characterized in that... In step S100, the data types of the raw data stream include CAN messages, inertial measurement unit measurements, lidar point clouds, millimeter-wave radar data, and camera image frames.

3. The method for real-time processing of multi-source heterogeneous data from a test vehicle based on Java, as described in claim 1, is characterized in that... In step S200, the look-ahead buffer and interpolation alignment strategy includes the following steps: S210. Maintain a configurable look-ahead buffer window to ensure that the data objects consumed by the scheduled thread cover a sufficient range before and after the current alignment point; S220. For discrete signal data, a linear interpolation algorithm is used to calculate the interpolation based on the two closest data points before and after the current logical time point; when the interval between the preceding and following data exceeds a preset threshold, the interpolation result is marked with a low confidence level; for sampled signal data, a nearest neighbor matching algorithm is used to select the sampled frame with the closest time. S230. When there is no valid data for a certain data path within the lookout window, it is marked as a data missing state.

4. The method for real-time processing of multi-source heterogeneous data from a test vehicle based on Java, as described in claim 1, is characterized in that... In step S300, the pluggable processing component can perform at least one of the following data processing functions: data validity verification, unit conversion, vehicle coordinate transformation, rule-based real-time alarm, data compression and filtering, and real-time target detection result fusion.

5. The method for real-time processing of multi-source heterogeneous data from a test vehicle based on Java, as described in claim 1, is characterized in that... In step S400, each index record in the index file includes at least: the file name of the time segment to which it belongs, the start timestamp, the end timestamp, the number of data frames, the start offset, and the length of the data block in bytes.

6. The method for real-time processing of multi-source heterogeneous data from a test vehicle based on Java, as described in claim 1, is characterized in that... Step S400 is followed by step S500, exception handling and degradation mechanism: when a certain data stream is continuously missing for more than the heartbeat timeout threshold, an alarm is issued and subsequent alignment frames are continuously marked as missing, without blocking the processing of other data streams. When a hardware timestamp jump or backflow of a certain data source is detected to exceed the preset deviation threshold, the data source is marked as a timestamp abnormality, and the local system timestamp is temporarily used for compensation and alignment; when the usage rate of the circular buffer exceeds the high water level, an adaptive degradation strategy is triggered.

7. The Java-based real-time processing method for multi-source heterogeneous data from test vehicles according to claim 6, characterized in that, The high water level is set at 80%.

8. The Java-based real-time processing method for multi-source heterogeneous data from a test vehicle according to claim 6, characterized in that, Adaptive degradation strategies include reducing the frequency of non-critical processing or enabling thinning of historical data.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the Java-based real-time processing method for multi-source heterogeneous data of a test vehicle as described in any one of claims 1-8.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the Java-based real-time processing method for multi-source heterogeneous data of a test vehicle as described in any one of claims 1-8.