Vehicle diagnostic log data real-time access system and method
By integrating streaming modules and adaptive transmission modules in the SOVD protocol, the existing vehicle diagnostic protocol cannot meet the real-time log transmission problem, real-time and efficient transmission of log data is achieved, and the compatibility is good, suitable for real-time monitoring and analysis of vehicle diagnostic systems.
Patent Information
- Application Number
- CN202510618115.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-05-14
AI Technical Summary
Existing vehicle diagnostic protocols cannot meet the real-time monitoring needs of modern vehicles for software operation status and system resource usage, especially in remote and near-field diagnostic scenarios, resulting in latency and data loss.
By integrating the streaming module in the SOVD protocol, using HTTP streaming technology, combining adaptive transmission module, data cache and retransmission module and priority queue module, real-time, flexible and efficient transmission of log data is achieved, compatible with existing protocols and supports the rotation mechanism of log files and log level division.
Real-time transmission of log data is realized, reducing latency and data loss, compatible with existing vehicle diagnostic systems, good scalability and system integration convenience, and supports more log types and transmission protocols in the future.
Smart Images

Figure CN120151376B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data transmission, and in particular relates to a real-time access system and method for vehicle diagnostic log data. Background Art
[0002] With the increasing complexity of vehicle electronic architectures, particularly with the introduction of high-performance computing (HPC), vehicle diagnostic requirements are shifting from traditional hardware fault detection to real-time monitoring and analysis of software functions. Existing diagnostic protocols (such as UDS and ODX) primarily focus on hardware fault diagnosis and cannot meet the real-time monitoring requirements of modern vehicles for software operating status and system resource usage (such as CPU load and memory usage). The SOVD protocol, an HTTP REST-based vehicle diagnostic interface, provides unified access to vehicle diagnostic content, supporting remote, near-field, and on-board diagnostic scenarios. The SOVD protocol returns detailed log entries via the / {entity-path} / logs / entries interface. Each log entry contains an href field pointing to the log's access URL (Uniform Resource Locator). However, while the existing SOVD protocol provides an href field, it is designed only to point to static log resources and does not address the need for real-time log transmission.
[0003] HTTP streaming technology is a mature technology used in the internet, enabling real-time data transmission and low-latency access. However, in the field of on-board diagnostics, the existing UDS protocol, due to its request-response-based communication model, lack of a streaming mechanism, low data transmission efficiency, inability to support persistent connections, and inflexible log filtering and querying capabilities, fails to leverage the advantages of HTTP streaming technology. This leads to delays and data loss when monitoring and analyzing vehicle operating status in real time. In particular, in remote and near-field diagnostic scenarios, existing diagnostic protocols lack efficient real-time log transmission capabilities, failing to meet the real-time log transmission requirements of modern vehicles. Summary of the Invention
[0004] Purpose of the invention: To address the problems existing in the prior art, the present invention proposes a real-time access system for vehicle diagnostic log data that fully utilizes the existing SOVD protocol interface to implement HTTP streaming transmission, while maintaining protocol compatibility and improving the real-time performance and efficiency of log transmission.
[0005] Technical solution: To achieve the above purpose, the present invention provides a vehicle diagnostic log data real-time access system, including a log generation and sorting module, a SOVD server, a streaming module and a SOVD client; wherein,
[0006] The streaming module is integrated into the SOVD server. The SOVD server receives the log file path passed by the log generation and collation module through the API interface of the SOVD dynamic library and generates log entries. It reads the log file according to the log file path and divides the log data into data blocks. The streaming module transmits the data blocks to the SOVD client in a streaming manner through HTTP streaming technology.
[0007] The SOVD client sends real-time log requests to the SOVD server through the SOVD protocol's REST API interface; the SOVD client receives log entries returned by the SOVD server, directly accesses the log data acquisition address, and obtains log data in real time through HTTP streaming technology.
[0008] Furthermore, the href field contained in the log entry points to a log data acquisition address that supports HTTP streaming. This allows for better compatibility and allows dynamic log acquisition without making changes to the SOVD protocol.
[0009] Furthermore, the log generation and organization module also includes log file rotation. When the size of the current log file exceeds the file size threshold, or the time interval between data received in the current log file exceeds the time interval threshold, a new log file is automatically created and the old file path is passed to the SOVD server. This keeps individual log files within a small range, which helps improve the timeliness of log transmission while reducing memory and I / O pressure, avoiding file handle resource expansion and increased write latency caused by long-term writing to a single large log file. It also reduces peak memory usage during log reading.
[0010] Furthermore, the SOVD server also includes an adaptive transmission module, a data caching and retransmission module, and a priority queue module. The adaptive transmission module uses the AIMD algorithm to dynamically adjust the data transmission rate based on network conditions; the data caching and retransmission module caches unsuccessfully transmitted data during network interruptions; and the priority queue module prioritizes different types of log data and transmits them accordingly. This effectively ensures the real-time and integrity of data transmission, providing a stable and reliable data foundation for the log collection and monitoring system.
[0011] Furthermore, the adaptive transmission module uses the data block transmission results as a basis for adjustment. If all data blocks in the previous round were successfully transmitted, the number of data blocks pushed in the next round will be increased additively; if all data blocks in the previous round were unsuccessful, the number of data blocks pushed in the next round will be reduced multiplicatively. This effectively copes with network fluctuations and balances resource consumption, while also improving memory usage efficiency.
[0012] Furthermore, the log data is divided into data blocks, which means that the logs are divided into two categories: critical logs and non-critical logs, and each is packaged into independent data blocks. This ensures the transmission order and stability while achieving efficient resource utilization and intelligent scheduling.
[0013] The present invention also provides a method for real-time access to vehicle diagnostic log data, comprising the following steps:
[0014] Step 1: SOVD client sends a real-time vehicle diagnostic log request to SOVD server;
[0015] Step 2: After receiving the vehicle diagnostic log request, the SOVD server reads the log file according to the log file path and divides the log data into data blocks. It also generates log entries and sends them to the SOVD client.
[0016] Step 3: After receiving the log entry, the SOVD client directly accesses the log data acquisition address;
[0017] Step 4: The SOVD server sends the data blocks to the SOVD client in HTTP streaming mode.
[0018] The present invention also provides a computer-readable medium storing software, wherein the software includes instructions that can be executed by one or more computers, and the instructions, through such execution, enable the one or more computers to perform operations, wherein the operations include the process of the above-mentioned method for real-time access to vehicle diagnostic log data.
[0019] The present invention also provides a computer system, comprising:
[0020] one or more processors;
[0021] A memory stores operable instructions, wherein when the instructions are executed by the one or more processors, the one or more processors are caused to perform operations, wherein the operations include the process of the above-mentioned method for real-time access to vehicle diagnostic log data.
[0022] Working Principle: This invention leverages the log access interface and standard field (href in LogEntry) provided by the existing SOVD protocol, setting the resource address corresponding to this field to a server URL that supports HTTP streaming. Without making any changes to the SOVD protocol itself, this method enables real-time access to log data, ensuring excellent compatibility and easy system integration.
[0023] Beneficial effects: Compared with the existing technology, this invention can provide real-time, flexible and efficient log transmission capabilities by combining HTTP streaming technology with SOVD protocol; ensure the real-time transmission of log data, reduce delays and data loss; at the same time, the invention is based on the standardized interface of SOVD protocol, is compatible with existing vehicle diagnostic systems, does not require additional hardware support, and has good scalability, supporting more log types and transmission protocols in the future BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a schematic diagram of the structure of the real-time access system for vehicle diagnostic log data disclosed in Example 1;
[0025] Figure 2 This is a schematic diagram of the structure of the real-time access system for vehicle diagnostic log data disclosed in Example 2. DETAILED DESCRIPTION
[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the examples of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention. Example 1
[0027] like Figure 1 As shown, this embodiment discloses a real-time access system for vehicle diagnostic log data, including a log generation and organization module, a SOVD server, a streaming transmission module and a SOVD client; wherein the log generation and organization module and the SOVD server are integrated in an application, and the application runs in a computing unit of the vehicle; the streaming transmission module is integrated in the SOVD server.
[0028] During the application's operation, the log generation and organization module generates vehicle diagnostic logs, which include vehicle system operation logs, application logs, and other data, and writes the logs to disk files. Log data includes but is not limited to:
[0029] 1) System resource usage (such as CPU load, memory usage, disk I / O, etc.).
[0030] 2) Application running status (such as startup time, running time, error log, etc.).
[0031] 3) Network communication status (such as network delay, packet loss rate, etc.).
[0032] The naming and storage path of the log file can be set according to the configuration; for example, the log file can be named by a timestamp and stored in a specified directory. The log file path is passed to the SOVD server through the API interface of the SOVD dynamic library. The log generation and sorting module also supports a log file rotation mechanism. When the size of the current log file is larger than 5MB, or the time interval of the data received in the current log file is greater than 1 minute, a new log file is automatically created and the old file path is passed to the SOVD server. Keeping a single log file within a small range is conducive to improving the timeliness of log transmission, while reducing memory and I / O pressure, and avoiding problems such as file handle resource expansion and increased write latency caused by long-term writing of a single large log file. At the same time, it reduces the peak memory usage when reading logs.
[0033] The SOVD server primarily manages vehicle diagnostic data, providing a REST API based on the SOVD protocol and supporting real-time streaming of log data. The SOVD server receives log file paths from the log generation and organization module through the SOVD dynamic library API and generates log entries. It then reads log files based on the paths, breaks the log data into chunks, and transmits them through the streaming module. Log entries contain an href field that points to a log access URL that supports HTTP streaming. The SOVD server divides log data into chunks based on their severity level, categorizing them as critical and non-critical logs. These chunks are packaged into separate chunks. ERROR and FATAL logs are considered critical, while INFO, DEBUG, and TRACE logs are considered non-critical. A single critical log entry can be designated as a chunk. If multiple critical logs are consecutive in time, these can be grouped together as a chunk. Each chunk contains metadata, such as an identifier, priority (critical or non-critical), log content, and retransmission count.
[0034] The streaming module primarily uses HTTP streaming technology to stream data blocks to SOVD clients. This module maintains continuous communication with SOVD clients through persistent HTTP connections, avoiding the overhead of frequent connection establishment and disconnection. Log data is incrementally sent to the client using Chunked Transfer Encoding (CTE), ensuring real-time and continuous data delivery.
[0035] The SOVD client primarily sends real-time log requests to the SOVD server through the SOVD protocol's REST API interface. Real-time log requests include the log type, the time range in which the log is required, and the filter conditions. The log type is the type of log to be obtained, such as system logs, application logs, etc.; the time range in which the log is required is the time range in which the log is to be obtained, such as the last hour, the last 24 hours, etc.; and the filter conditions are the filter conditions for the logs to be obtained, such as the log level (INFO, WARN, ERROR, etc.). The SOVD client receives the log entries returned by the SOVD server and extracts the href field. It directly accesses the URL pointed to by the href, obtains the log data in real time through HTTP streaming technology, and performs real-time processing and analysis. The received log data is stored on a local or remote server for subsequent analysis and auditing. Example 2
[0036] like Figure 2 As shown, the SOVD server in this embodiment further includes an adaptive transmission module, a data buffer and retransmission module, and a priority queue module.
[0037] The adaptive transmission module dynamically adjusts the data transmission rate based on network conditions, ensuring high real-time performance even in unstable network conditions. It primarily uses a timer to control the interval between data block transmissions. Whenever the timer triggers a callback function, the number of data blocks sent is dynamically adjusted based on the current network status. Flow control management primarily utilizes the Additive Increase, Multiplicative Decrease (AIMD) algorithm. Specifically, the AIMD algorithm uses data block transmission results as a basis for adjustment: when all data blocks in the previous round are successfully transmitted, the algorithm additively increases the number of data blocks pushed in the next round, gradually improving transmission bandwidth efficiency. However, when transmission failures occur (such as timeouts or packet loss), the algorithm multiplicatively reduces the number of data blocks pushed in the next round, alleviating potential network congestion. Data blocks that fail to be sent are buffered in memory until they are successfully transmitted. AIMD adjusts the number of data blocks and removes them from the cache once they are successfully transmitted, reducing memory usage.
[0038] The priority queue module prioritizes different types of log data, ensuring that critical log data is transmitted first. All data blocks are queued into a unified transmission cache based on the timestamp of the log data generation and sent in strict chronological order, ensuring that the log content received by the client is time-consistent and traceable. Furthermore, the priority queue module sets different retransmission priorities based on the importance of the data block. Data blocks for critical logs are given a higher retransmission priority and can be configured to be retransmitted indefinitely until successful, or with a higher maximum retransmission limit than for non-critical logs, ensuring that important information is reliably delivered under all network conditions. Non-critical logs use a more relaxed retransmission policy to reduce system resource usage and improve overall transmission efficiency. This mechanism ensures high availability and reliable transmission of critical logs while balancing system performance and transmission order consistency, providing a stable and reliable data foundation for log collection and monitoring systems.
[0039] The data cache and retransmission module mainly caches data blocks that have not been successfully transmitted during network interruptions and retransmits them after the network is restored to ensure data integrity. It implements dynamic management of the log cache queue through a time window control strategy. Each data block is automatically timestamped when it is generated and stored in the cache queue in chronological order. The cache management module continuously maintains a sliding time window, for example, set to the last N minutes (such as 5 minutes). Data blocks of non-critical logs are only retained within the time window. Data blocks of non-critical logs that exceed the window time will be cleared and no longer retransmitted to avoid invalid data occupying resources. Data blocks of critical logs are not subject to time window restrictions. If the transmission fails or is waiting for retransmission, it will be retained until it succeeds, or released after the set maximum number of retransmissions is reached. Example 3
[0040] This embodiment discloses a method for real-time access to vehicle log data, which mainly includes the following two parts:
[0041] Vehicle log generation part:
[0042] While the application is running, the log generation and organization module generates vehicle diagnostic logs in real time. These logs include vehicle system operation logs, application logs, and other data, and are written to disk files. The naming and storage path of the log files can be configured; for example, log files can be named by timestamp and stored in a specified directory. The log file path is then passed to the SOVD server through the SOVD dynamic library API.
[0043] When the current log file size exceeds the file size threshold, or the time interval between data received in the current log file exceeds the time interval threshold, a new log file is automatically created and the old file path is passed to the SOVD server. In this embodiment, the file size threshold is 5M and the time interval threshold is 1 minute.
[0044] Vehicle log request part:
[0045] Step 1: The SOVD client sends a real-time log request to the SOVD server through the SOVD protocol REST API interface;
[0046] Step 2: After receiving the log request, the SOVD server reads the log file according to the log file path and divides the log data into data blocks. It also generates log entries and sends them to the SOVD client. The log entries contain an href field that points to a log access URL that supports HTTP streaming.
[0047] Step 3: After receiving the log entry, the SOVD client extracts the href field and directly accesses the URL;
[0048] Step 4: The SOVD server sends the data blocks to the SOVD client via HTTP streaming; the SOVD client chooses to store the received log data locally or on a remote server for subsequent analysis and auditing.
[0049] When the SOVD server sends data blocks to the SOVD client via HTTP streaming, it first maintains continuous communication with the SOVD client via a persistent HTTP connection, and then gradually sends the data blocks to the SOVD client using chunked transfer encoding. The SOVD server divides log data into data blocks based on the severity of the log, dividing the logs into two categories: critical logs and non-critical logs, and packaging each into independent data blocks. ERROR and FATAL levels are critical logs, while INFO, DEBUG, and TRACE levels are non-critical logs. A single critical log can be set as a data block. If there are multiple critical logs that are consecutive in time, these critical logs can be organized into a data block. Each data block contains some metadata, such as an identifier, priority (critical log or non-critical log), log content, and the number of retransmissions. Example 4
[0050] This embodiment discloses a method for real-time access to vehicle log data. In Example 3, in the process of the SOVD server sending data blocks to the SOVD client in HTTP streaming mode, this embodiment adds adaptive network transmission, priority queue, and data caching and retransmission parts.
[0051] Among them, the priority queue part sets priorities for different types of log data to ensure that critical log data is transmitted first. All data blocks will be hung in a unified transmission cache queue according to the timestamp generated by the log, and will be sent in strict chronological order, so as to ensure that the log content received by the client has good time consistency and traceability. At the same time, the priority queue module will set different retransmission priorities based on the importance of the data block. The data blocks of critical logs will be given a higher retransmission priority, which can be configured to be retransmitted indefinitely until successful, or set a higher maximum retransmission number than non-critical logs to ensure that important information can be reliably delivered under any network conditions. Non-critical logs adopt a relatively loose retransmission strategy to reduce system resource usage and improve overall transmission efficiency.
[0052] The adaptive network transmission component primarily uses the AIMD (Additive Increase, Multiplicative Decrease) algorithm for flow control management. Specifically, the AIMD algorithm uses the transmission results of data blocks as the basis for regulation: when all data blocks in the previous round are successfully transmitted, the algorithm will additively increase the number of data blocks pushed in the next round, gradually improving the utilization efficiency of the transmission bandwidth, thereby ensuring high real-time performance even in unstable network conditions.
[0053] The data cache and retransmission section mainly caches data blocks that were not successfully transmitted during network interruptions and retransmits them after the network is restored to ensure data integrity. It uses a time window control strategy to achieve dynamic management of the log cache queue. Each data block is automatically timestamped when it is generated and stored in the cache queue in chronological order. The cache management module continuously maintains a sliding time window, for example, set to the last N minutes (such as 5 minutes). Data blocks of non-critical logs are only retained within the time window. Data blocks of non-critical logs that exceed the window time will be cleared and no longer retransmitted to avoid invalid data occupying resources. Data blocks of critical logs are not subject to time window restrictions. If the transmission fails or is waiting for retransmission, they will be retained until they succeed or are released after the set maximum number of retransmissions is reached.
[0054] This embodiment also uses TLS / SSL encryption and strict access control mechanisms to ensure the security and privacy of log data during transmission.
[0055] The present invention also provides a computer system comprising: one or more processors; a memory storing operable instructions, wherein when the instructions are executed by the one or more processors, the one or more processors perform operations, wherein the operations include a process based on the above-mentioned method for real-time access to vehicle diagnostic log data.
[0056] It should be understood that the aforementioned examples of the method for real-time access to vehicle diagnostic log data can be implemented in any computer system capable of data storage and data processing. The aforementioned computer system can be at least one electronic processing system or electronic device including a processor and memory, such as a personal computer, whether a personal computer, a commercial computer, a graphics processing computer, or a server-class computer. These PCs can implement wired and / or wireless data transmission, particularly of image data, by having data interfaces and / or network interfaces.
[0057] In other embodiments, the computer system may also be a server, in particular a cloud server, having data storage, processing, and network communication functions.
[0058] As an example, a computer system generally includes at least one processor, a memory, and a network interface connected by a system bus. The network interface is used to communicate with other devices / systems.
[0059] The processor is used to provide calculation and control of the system.
[0060] The memory includes non-volatile memory and cache.
[0061] Non-volatile memory generally has a massive storage capacity and can store operating systems and computer programs. These computer programs may include operable instructions that, when executed by one or more processors, enable the one or more processors to execute the process of the above-mentioned embodiment of the present invention based on the real-time access method for vehicle diagnostic log data.
[0062] In necessary or reasonable implementations, the aforementioned computer system, whether a PC device or a server, may also include more or fewer components than shown in the figure, or a combination, or adopt different hardware, software and other components or different deployment methods.
Claims
1. A real-time access system for vehicle diagnostic log data, characterized by: It includes log generation and sorting module, SOVD server, streaming module and SOVD client; among them, The log generation and collation module generates vehicle diagnostic logs and writes the generated log data to disk files; the log file path is passed to the SOVD server through the API interface of the SOVD dynamic library; The streaming module is integrated into the SOVD server. The SOVD server receives the log file path passed by the log generation and collation module through the API interface of the SOVD dynamic library and generates log entries. It reads the log file according to the log file path and divides the log data into data blocks. The streaming module transmits the data blocks to the SOVD client in a streaming manner through HTTP streaming technology. The SOVD client sends real-time log requests to the SOVD server through the SOVD protocol's REST API interface. The SOVD client receives log entries returned by the SOVD server, directly accesses the log data acquisition address, and obtains log data in real time through HTTP streaming technology. The log generation and arrangement module also includes the rotation of log files. When the size of the current log file is larger than the file size threshold, or the time interval of the data received in the current log file is larger than the time interval threshold, a new log file is automatically created and the old file path is passed to the SOVD server. The SOVD server also includes an adaptive transmission module, a data cache and retransmission module, and a priority queue module. The adaptive transmission module uses the AIMD algorithm to dynamically adjust the data transmission rate based on network conditions. The data cache and retransmission module caches unsuccessfully transmitted data during network interruptions. The priority queue module sets priorities for different types of log data and transmits them according to priority. Dividing log data into data blocks means dividing logs into two categories: critical logs and non-critical logs, and packaging them into independent data blocks.
2. The vehicle diagnostic log data real-time access system according to claim 1, characterized in that: The href field contained in the log entry points to the log data acquisition address that supports HTTP streaming.
3. The vehicle diagnostic log data real-time access system according to claim 1, characterized in that: The adaptive transmission module uses the transmission results of the data blocks as the adjustment basis. When the data blocks of the previous round are all transmitted successfully, the data block push amount of the next round is increased in an additive manner; when the data blocks of the previous round are all transmitted unsuccessfully, the data block push amount of the next round is reduced in a multiplicative manner.
4. A method for real-time access to vehicle diagnostic log data, characterized by: The following steps are involved: Step 1: SOVD client sends a real-time vehicle diagnostic log request to SOVD server; Step 2: After receiving the vehicle diagnostic log request, the SOVD server reads the log file according to the log file path and divides the log data into data blocks. It also generates log entries and sends them to the SOVD client. Step 3: After receiving the log entry, the SOVD client directly accesses the log data acquisition address; Step 4: SOVD server sends the data block to SOVD client via HTTP streaming; Among them, when the size of the current log file is larger than the file size threshold, or the time interval of data received in the current log file is larger than the time interval threshold, a new log file is automatically created and the old file path is passed to the SOVD server; The SOVD server also includes an adaptive transmission module, a data cache and retransmission module, and a priority queue module. The adaptive transmission module uses the AIMD algorithm to dynamically adjust the data transmission rate based on network conditions. The data cache and retransmission module caches unsuccessfully transmitted data during network interruptions. The priority queue module sets priorities for different types of log data and transmits them according to priority. Dividing log data into data blocks means dividing logs into two categories: critical logs and non-critical logs, and packaging them into independent data blocks.
5. The method for real-time access to vehicle diagnostic log data according to claim 4, characterized in that: The href field contained in the log entry points to the log data acquisition address that supports HTTP streaming.
6. A computer-readable medium storing software, characterized in that: The software includes instructions that can be executed by one or more computers, and the instructions, through such execution, enable the one or more computers to perform operations, wherein the operations include the process of the vehicle diagnostic log data real-time access method according to any one of claims 4-5.
7. A computer system, characterized in that: include: one or more processors; A memory storing operable instructions, wherein when the instructions are executed by the one or more processors, the one or more processors are caused to perform operations, wherein the operations include the process of the method for real-time access to vehicle diagnostic log data as described in any one of claims 4-5.
Citation Information
Patent Citations
Vehicle automatic driving data telemetering method and system
CN116847221A
Vehicle diagnosis method and device, chip and vehicle
CN119676328A