Vehicle log processing method and system and medium
By introducing regular expressions and a custom short character dictionary library based on the UDS protocol for compression and encryption in vehicle log processing, and combining time serialization and reflection triggering mechanisms, the problems of standardization, security and readability in vehicle log processing are solved, achieving efficient and secure log storage and fault location.
Patent Information
- Application Number
- CN202511172279.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-11-11
AI Technical Summary
Existing vehicle log processing methods are inadequate in terms of log reading and writing standardization, readability, ease of use, security, and openness. Furthermore, they fail to effectively integrate diagnostic information from vehicle diagnostic services, resulting in a high degree of reliance on engineers' technical expertise when investigating the root causes of problems. The lack of log compression and encryption also affects the readability of vehicle logs and the efficiency of problem localization.
Log compression and encryption are performed using a regular expression query mechanism and a custom short character dictionary library based on the UDS protocol standard. Log files are generated through a time-series read/write scheme, and log processing instances are dynamically generated using a reflection triggering mechanism to achieve on-demand writing and efficient storage.
It improves the standardization, security, and storage efficiency of logs, reduces the generation of redundant data, ensures data traceability and playback positioning accuracy, meets the vehicle system's requirements for real-time performance, storage optimization, and safety compliance, reduces reliance on technical personnel, and supports efficient fault location and visual monitoring.
Smart Images

Figure CN120929341A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of log processing technology, and in particular to a vehicle log processing method, system, and medium. Background Technology
[0002] The core functions of vehicle log processing include remotely acquiring valid logs, online log parsing, and supporting guided diagnostics based on log file-based automated root cause analysis. To ensure the availability of these core functions, it is necessary to standardize and ensure the stability of log reading and writing, log real-time performance, log storage space, and automated fault analysis models, while maintaining the readability, usability, security, and openness of vehicle logs to achieve efficient and rapid problem localization during both engineering and after-sales phases.
[0003] In existing technologies, vehicle log processing typically starts with log files and log applications. Requirements and developers generate corresponding error, warning, information, and debug-level text based on the business logic of each module, and output it to a designated file in real time according to a unified interface. When it's necessary to locate vehicle problems based on the log files, relevant engineers locate the root cause based on the log information and pre-defined logic. This approach means that current vehicle log processing methods still have significant room for improvement in terms of log reading and writing standardization, readability, usability, security, and openness. Furthermore, key information such as diagnostic information from Unified Diagnostic Services (UDS) is not effectively integrated with vehicle logs. Root cause analysis relies heavily on the technical expertise of engineers, lacks a state machine for log generation and parsing, and lacks consideration for log compression and encryption. This is detrimental to maintaining the readability, usability, security, and openness of vehicle logs, as well as for problem localization during engineering and after-sales phases. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a vehicle log processing method, system, and medium that can solve the issues of vehicle log storage, security, and standardization.
[0005] A first aspect of the present invention provides a vehicle log processing method, comprising:
[0006] Log writing is triggered by vehicle application;
[0007] A regular expression query mechanism and a custom short character dictionary library based on the UDS protocol standard are used to compress and encrypt the written logs.
[0008] The compressed and encrypted logs are used to generate storage logs according to a time-series read / write scheme. The storage logs include log files containing protocol headers and payload data.
[0009] As an optional implementation, the log writing triggered by various vehicle applications includes:
[0010] The application identifier and log callback function are dynamically associated based on the reflection triggering mechanism, which triggers the generation of an independent instance callback function to perform log writing.
[0011] As an optional implementation, the step of dynamically associating the application identifier with the log callback function based on the reflection triggering mechanism to trigger the generation of an independent instance callback function to perform log writing includes:
[0012] A predefined log processing callback function corresponding to the vehicle application is configured to dynamically generate an independent log processing instance based on the identifier of the vehicle application.
[0013] A registry container is constructed, using the unique identifier of the vehicle application as the index key, to store and associate the log processing callback function, forming a dynamic binding relationship between the identifier and the log processing logic;
[0014] During the system initialization phase, the identifiers of each vehicle application and their corresponding log processing callback functions are registered in the registry container;
[0015] In response to a log write request from the target vehicle application, the system matches the corresponding log processing callback function from the registry container based on the identifier, calls the callback function to generate an independent log processing instance, and performs the log write operation through the log processing instance.
[0016] As an optional implementation, the method of employing a regular expression query mechanism and introducing a custom short character dictionary library based on the UDS protocol standard to compress and encrypt the written logs includes:
[0017] Build a short character dictionary library adapted to the UDS protocol, in which the key-value mapping relationship of log fields is defined by creating an algorithm rule file;
[0018] Initialize and load the dictionary library. During the application layer process initialization phase, the algorithm rule file is read, parsed, and a key-value mapping table based on hash lookup is generated.
[0019] Perform log compression, where the fields in the written log are replaced with the corresponding short character encoding according to the key-value mapping relationship of the hash lookup table, and compressed logs are generated.
[0020] The execution log is encrypted, which uses an encryption algorithm associated with hash lookup table key values to encrypt the compressed log.
[0021] As an optional implementation, the storage log includes generating a log file containing protocol header and payload data, including:
[0022] Record the log format version number, initial timestamp, and security level identifier in the protocol header;
[0023] The payload data is divided according to the fragmented read / write mechanism. Each fragment contains a start timestamp, a compression algorithm identifier, and an encryption key index.
[0024] As an optional implementation, the vehicle log processing method further includes: converting the decrypted and decompressed logs into a graphical report. This graphical report overlays the log recording results generated by each module based on a state machine model via a timeline, and marks the correlation between abnormal events and UDS diagnostic codes, thereby achieving visualized monitoring of vehicle health status and problem location. This helps to identify the root cause of vehicle diagnostic problems.
[0025] As an optional implementation, the vehicle log processing method further includes: reading and parsing the log file according to a time-based deserialization read / write scheme based on a defined storage protocol to obtain parsed information.
[0026] A second aspect of the present invention provides a vehicle log processing device, comprising:
[0027] The writing module is at least used for triggering log writing based on vehicle applications.
[0028] The compression module is used at least to compress and encrypt the written logs by employing a regular expression query mechanism and introducing a custom short character dictionary library adapted to the UDS protocol standard.
[0029] A storage module is used at least to generate storage logs from compressed and encrypted logs according to a time-series read / write scheme, wherein the storage logs include generating log files containing protocol headers and payload data.
[0030] A third aspect of the present invention provides a vehicle log processing system, comprising: a vehicle ECU side, a host computer side, and a collaborative working unit between them, wherein:
[0031] The automotive ECU side includes at least the following automotive applications:
[0032] The collaborative work department should include at least:
[0033] Log writing unit A is at least used to perform ECU-side log writing operations through the log processing instance;
[0034] The log compression unit is used to compress the written ECU-side logs by employing a regular expression query mechanism and introducing a custom short character dictionary library adapted to the UDS protocol standard.
[0035] The log encryption unit is used at least to perform encryption processing on the compressed ECU-side logs.
[0036] The log reading unit is used at least to read the encrypted ECU-side logs.
[0037] A log service allocator is used at least between the vehicle ECU and the host computer to achieve data interaction, wherein the log service allocator routes the log processing flow according to the application identifier.
[0038] A fourth aspect of the present invention provides an electronic device comprising:
[0039] At least one processor; and at least one memory communicatively connected to the processor, wherein the memory stores program instructions executable by the processor, and the processor invokes the program instructions to perform the method as described in the first aspect of the present invention.
[0040] A fifth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a computer, performs the method described in the first aspect of the embodiments of the present invention.
[0041] This invention reduces redundant data generation and resource consumption by writing logs on demand through event triggering; it achieves efficient compression and encryption by using regular expressions and a customized short character dictionary library based on the UDS protocol, improving log standardization, security, and storage efficiency; and it generates log files with protocol headers based on time serialization, ensuring data traceability and playback positioning accuracy, meeting the vehicle system's requirements for real-time performance, storage optimization, and security compliance. Attached Figure Description
[0042] Figure 1 This is a flowchart illustrating a vehicle log processing method according to an embodiment of the present invention.
[0043] Figure 2 This is a flowchart illustrating another vehicle log processing method in an embodiment of the present invention.
[0044] Figure 3 This is a flowchart illustrating another vehicle log processing method in an embodiment of the present invention.
[0045] Figure 4 This is a schematic diagram illustrating the implementation of a log query and write algorithm in an embodiment of the present invention.
[0046] Figure 5 This is a schematic diagram illustrating an implementation of a log storage format in an embodiment of the present invention.
[0047] Figure 6 This is a block diagram of a vehicle log processing device according to an embodiment of the present invention.
[0048] Figure 7This is a schematic diagram illustrating the operation of a vehicle log processing system according to an embodiment of the present invention.
[0049] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] It should be understood that the terms "first," "second," and "third," etc., in the claims, specification, and drawings of this disclosure are used to distinguish different objects, not to describe a specific order. The terms "comprising" and "including" as used in the specification and claims of this disclosure indicate the presence of a described feature, integral, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. It should also be understood that the terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to limit this disclosure.
[0052] like Figure 1 As shown, the first aspect of the present invention provides a vehicle log processing method, including the following steps.
[0053] Step 100: Trigger log writing based on vehicle application.
[0054] Specifically, this invention triggers log writing through vehicle application events, enabling on-demand processing, avoiding redundant log generation, reducing resource consumption, ensuring real-time recording of critical data, and improving log processing efficiency.
[0055] In some embodiments, step S100 includes: dynamically associating the application identifier with the log callback function based on the reflection triggering mechanism, triggering the generation of an independent instance callback function to perform log writing.
[0056] Specifically, this invention achieves secure registration and flexible read / write by employing a reflection triggering mechanism, which facilitates the customization of task sources, security levels, and session modes.
[0057] Step S200: Use a regular expression query mechanism and introduce a custom short character dictionary library of the UDS protocol standard to compress and encrypt the written logs.
[0058] Specifically, this invention employs an open-source regular expression query mechanism, introduces a customizable short character dictionary library adapted to the UDS protocol standard, and executes a high-efficiency log compression and encryption algorithm engine to achieve log standardization, validity, directionality, and security, while significantly reducing log storage space.
[0059] Step S300: Generate a storage log from the compressed and encrypted log according to the time-series reading and writing scheme. The storage log includes a log file containing the protocol header and payload data.
[0060] Specifically, this method is beneficial for timing the playback of logs and for the serialization of logs.
[0061] Here, the present invention writes logs on demand through event triggering, reducing redundant data generation and resource consumption; it adopts a customized short character dictionary library using regular expressions and UDS protocol to achieve efficient compression and encryption, improving log standardization, security and storage efficiency; and it generates log files with protocol headers based on time serialization to ensure data traceability and playback positioning accuracy, meeting the vehicle system's requirements for real-time performance, storage optimization and security compliance.
[0062] like Figure 2 As shown, in one embodiment of the present invention, the step of dynamically associating the application identifier and the log callback function based on the reflection triggering mechanism to trigger the generation of an independent instance callback function to perform log writing includes:
[0063] Step S110: Predefine a log processing callback function corresponding to the vehicle application. The callback function is configured to dynamically generate an independent log processing instance based on the identifier of the vehicle application.
[0064] Step S120: Construct a registry container, using the unique identifier of the vehicle application as the index key, to store and associate the log processing callback function, forming a dynamic binding relationship between the identifier and the log processing logic;
[0065] Step S130: During the system initialization phase, the identifiers of each vehicle application and their corresponding log processing callback functions are registered in the registry container;
[0066] Step S140: In response to the log write request from the target vehicle application, match the corresponding log processing callback function from the registry container according to the identifier, call the callback function to generate an independent log processing instance, and perform the log write operation through the log processing instance.
[0067] For example, one specific application scenario of this embodiment is as follows:
[0068] Define a callback function in the class that reflects the car logs to create an object of that class;
[0069] Design a factory class with a std::map (hash table) to store the app ID and the callback function for creating instances. Here, std::map is a registry container, which can also be understood as a mapping container.
[0070] Dynamically create class objects using a class factory;
[0071] When the program starts running, the callback function is stored in std::map (hash table), with the vehicle application ID as the key value of the map;
[0072] Implement callback function-based triggering for writing to various vehicle applications.
[0073] Here, a reflection-triggered mechanism is used to achieve secure registration and flexible read / write, which is conducive to the customization of task sources, security levels, and session modes. By dynamically binding vehicle application identifiers and log processing callback functions through a registry container, independent log instances can be generated on demand, reducing memory consumption. The key-value retrieval mechanism improves log writing efficiency and supports parallel log processing for multiple applications. The containerized design enhances system scalability and meets the high real-time and high security log management requirements in vehicle scenarios.
[0074] like Figure 3 As shown, in one embodiment of the present invention, the step of using a regular expression query mechanism and introducing a custom short character dictionary library based on the UDS protocol standard to compress and encrypt the written logs includes:
[0075] Step S210: Construct a short character dictionary library adapted to the UDS protocol, wherein the key-value mapping relationship of log fields is defined by creating an algorithm rule file;
[0076] Step S220: Initialize and load the dictionary library, wherein, during the application layer process initialization phase, the algorithm rule file is read, parsed, and a key-value mapping table based on hash lookup is generated;
[0077] Step S230: Perform log compression, where, for example... Figure 4 As shown, based on the key-value mapping relationship of the hash lookup table, the fields in the written log are replaced with the corresponding short character encoding to generate compressed logs;
[0078] Step S240: Perform log encryption, wherein the compressed log is encrypted using an encryption algorithm associated with a hash lookup table key value.
[0079] Here, the present invention implements a highly efficient log compression and encryption algorithm by introducing a customizable short character dictionary library adapted to the UDS protocol standard.
[0080] For example, one specific application scenario of this embodiment is as follows:
[0081] Establish a customizable short character dictionary library in JSON file format that adapts to the UDS protocol standard as an algorithm rule file;
[0082] The algorithm rule file is read during the initialization phase of the application layer process App, i.e., the car application, and used as input for compression / decompression and decryption / decryption of short log characters;
[0083] An adaptive key-value pair linked list based on a hash lookup algorithm is established to search log data in the compression / decompression and encryption / decryption sections.
[0084] The key value format of the log hash table is defined as shown in Table 1 below:
[0085] Table 1:
[0086]
[0087] The format of the value corresponding to the log hash is shown in Table 2 below:
[0088] Table 2:
[0089] Log level description (level) Event timestamp Log details description (detail)
[0090] The implementation method of the log query and write algorithm is as follows: Figure 4 As shown.
[0091] The log query and write algorithm reads the JSON file using a key-value pair approach, loads the key format and the corresponding value format of the log hash table, and names the JSON file log_dictionary.json.
[0092] Here, the present invention completely decouples the code from the log business logic, allowing the requesting party and the user to focus solely on their business without having to worry about the implementation of the code.
[0093] In one embodiment of the present invention, the storage log includes generating a log file containing protocol headers and payload data, comprising:
[0094] Record the log format version number, initial timestamp, and security level identifier in the protocol header;
[0095] The payload data is divided according to the fragmented read / write mechanism. Each fragment contains a start timestamp, a compression algorithm identifier, and an encryption key index.
[0096] Furthermore, in one embodiment of the present invention, the compressed and encrypted logs can be generated into storage logs according to a time-series read and write scheme based on a defined storage protocol.
[0097] Furthermore, log files can be read and parsed according to a time-based deserialization read / write scheme based on a defined storage protocol to obtain parsed information, which can then be used for log analysis.
[0098] Specifically, such as Figure 5 As shown, this invention employs a time-series read / write scheme, designs a file protocol header (including start bit, app-id, version, file header protocol, offset) and a file payload (data section), and uses a dense data compression structure for compressed storage, saving storage space and facilitating the playback of relevant data over time.
[0099] In one embodiment of the present invention, the vehicle log processing method further includes: converting the decrypted and decompressed log into a graphical report, i.e., an image log, wherein the graphical report displays the log recording results generated by each module based on the state machine model through time axis overlay (i.e., the log recording results of each vehicle application diagnostic module in conjunction with the state machine model, i.e., the state machine transition events of each module in conjunction with the state machine model), and marks the correlation between abnormal events and UDS diagnostic codes, thereby realizing the visual monitoring of vehicle health status and the location of problem points.
[0100] Here, the present invention enables log files to have functions such as playback, report summary, static analysis of point data (i.e., log record results generated by point) and vehicle health monitoring through graphical log display. Since the customized development state of the UDS protocol was used in the early stage, the problem point localization algorithm of the state machine was anchored accordingly. This method can effectively realize the correspondence and localization relationship of the expected logic and can find out the root cause of vehicle diagnostic problems.
[0101] like Figure 6 As shown, a second aspect of the present invention provides a vehicle log processing device, comprising:
[0102] The writing module is at least used for triggering log writing based on vehicle applications.
[0103] The compression module is used at least to compress and encrypt the written logs by employing a regular expression query mechanism and introducing a custom short character dictionary library adapted to the UDS protocol standard.
[0104] A storage module is used at least to generate storage logs from compressed and encrypted logs according to a time-series read / write scheme, wherein the storage logs include generating log files containing protocol headers and payload data.
[0105] like Figure 7 As shown, a third aspect of the present invention provides a vehicle log processing system, comprising: a vehicle ECU side, a host computer side, and a collaborative working unit in between, wherein:
[0106] The vehicle ECU side includes at least various vehicle applications, such as app1, app2, etc.
[0107] The collaborative work department should include at least:
[0108] The log registration unit is used to at least construct a registry container, using the unique identifier of the vehicle application as the index key, to register the identifier of each vehicle application and its corresponding log processing callback function into the registry container, wherein the vehicle application is an ECU-side application;
[0109] The callback function interface is used at least to respond to a log write request from the target vehicle application, match the corresponding log processing callback function from the registry container based on the identifier, and call the callback function to generate an independent log processing instance.
[0110] Log writing unit A is at least used to perform ECU-side log writing operations through the log processing instance;
[0111] The log compression unit is used to compress the written ECU-side logs by employing a regular expression query mechanism and introducing a custom short character dictionary library adapted to the UDS protocol standard.
[0112] The log encryption unit is used at least to perform encryption processing on the compressed ECU-side logs.
[0113] Log service allocator;
[0114] The log reading unit is used at least to read the encrypted ECU-side logs.
[0115] The log decryption unit is used at least to decrypt the ECU-side logs.
[0116] The log decompression unit is used at least to decompress the ECU-side log;
[0117] Log writing unit B is used at least to write the decompressed ECU-side log to the host computer side;
[0118] The host computer side should include at least a log analysis department and a graphical data display department, which should be used to parse logs and generate visual health monitoring reports.
[0119] The vehicle ECU and the host computer interact through a log service allocator, which routes the log processing flow based on the application identifier.
[0120] Specifically, those skilled in the art can design or adjust the layout of the above-mentioned automotive ECU side, host computer side, and each collaborative working module according to actual configuration requirements, such as setting them on the computing chip, and such adjustments still fall within the inventive scope of this invention.
[0121] This invention dynamically binds vehicle application identifiers and processing logic through a registry container, enabling the generation of independent log instances on demand and reducing resource consumption. Regular expression compression technology based on a customized short character dictionary library using the UDS protocol reduces log volume and improves storage and transmission efficiency. A log service allocator coordinates the process processing between the ECU and the host computer, ensuring real-time performance and data consistency in high-concurrency scenarios. Log encryption and decryption modules ensure automotive-grade log security and prevent the leakage of sensitive information. The host computer's decompression and parsing functions support rapid fault diagnosis and visual analysis, significantly improving the maintainability of the vehicle system and meeting the stringent requirements of intelligent vehicles for efficient, safe, and scalable log management. This invention identifies vehicle problems by tracking log information across various modules, decoupling reliance on professional technical personnel. By introducing a graphical log data display format, it generates a vehicle health test report.
[0122] like Figure 8 As shown, a fourth aspect of the present invention provides an electronic device, comprising:
[0123] At least one processor; and at least one memory communicatively connected to the processor, wherein the memory stores program instructions executable by the processor, and the processor can execute the above-described vehicle log processing method by invoking the program instructions.
[0124] The fifth aspect of the present invention provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described vehicle log processing method.
[0125] It is understood that computer-readable storage media can include: any entity or device capable of carrying computer programs, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc. Computer programs include computer program code. Computer program code can be in the form of source code, object code, executable files, or certain intermediate forms, etc. Computer-readable storage media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc.
[0126] In some embodiments of the present invention, the electronic device may include a controller or a processor. The controller is a microcontroller chip that integrates a processor, memory, communication module, etc. The processor may refer to the processor included in the controller. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0127] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0128] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0129] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vehicle log processing method, characterized in that, include: Log writing is triggered by vehicle application; A regular expression query mechanism and a custom short character dictionary library based on the UDS protocol standard are used to compress and encrypt the written logs. The compressed and encrypted logs are used to generate storage logs according to a time-series read / write scheme. The storage logs include log files containing protocol headers and payload data.
2. The vehicle log processing method according to claim 1, characterized in that, The log writing triggered by various vehicle applications includes: The application identifier and log callback function are dynamically associated based on the reflection triggering mechanism, which triggers the generation of an independent instance callback function to perform log writing.
3. The vehicle log processing method according to claim 2, characterized in that, The method of dynamically associating application identifiers with log callback functions based on reflection triggering mechanism, and triggering the generation of independent instance callback functions to perform log writing, includes: A predefined log processing callback function corresponding to the vehicle application is configured to dynamically generate an independent log processing instance based on the identifier of the vehicle application. A registry container is constructed, using the unique identifier of the vehicle application as the index key, to store and associate the log processing callback function, forming a dynamic binding relationship between the identifier and the log processing logic; During the system initialization phase, the identifiers of each vehicle application and their corresponding log processing callback functions are registered in the registry container; In response to a log write request from the target vehicle application, the system matches the corresponding log processing callback function from the registry container based on the identifier, calls the callback function to generate an independent log processing instance, and performs the log write operation through the log processing instance.
4. The vehicle log processing method according to claim 1, characterized in that, The method employs a regular expression query mechanism and incorporates a custom short character dictionary library based on the UDS protocol standard to compress and encrypt the written logs, including: Build a short character dictionary library adapted to the UDS protocol, in which the key-value mapping relationship of log fields is defined by creating an algorithm rule file; Initialize and load the dictionary library. During the application layer process initialization phase, the algorithm rule file is read, parsed, and a key-value mapping table based on hash lookup is generated. Perform log compression, where the fields in the written log are replaced with the corresponding short character encoding according to the key-value mapping relationship of the hash lookup table, and compressed logs are generated. The execution log is encrypted, which uses an encryption algorithm associated with hash lookup table key values to encrypt the compressed log.
5. The vehicle log processing method according to claim 1, characterized in that, The stored logs include generating log files containing protocol headers and payload data, including: Record the log format version number, initial timestamp, and security level identifier in the protocol header; The payload data is divided according to the fragmented read / write mechanism. Each fragment contains a start timestamp, a compression algorithm identifier, and an encryption key index.
6. The vehicle log processing method according to claim 1, characterized in that, Also includes: The decrypted and decompressed logs are converted into a graphical report. The graphical report displays the log record results generated by each module based on the state machine model through timeline overlay, and marks the correlation between abnormal events and UDS diagnostic codes, so as to realize the visual monitoring of vehicle health status and problem location.
7. A vehicle log processing device, characterized in that, include: The writing module is at least used for triggering log writing based on vehicle applications. The compression module is used at least to compress and encrypt the written logs by employing a regular expression query mechanism and introducing a custom short character dictionary library adapted to the UDS protocol standard. A storage module is used at least to generate storage logs from compressed and encrypted logs according to a time-series read / write scheme, wherein the storage logs include generating log files containing protocol headers and payload data.
8. A vehicle log processing system, characterized in that, include: The collaborative working unit between the vehicle ECU side, the host computer side, and the intermediate components includes: The automotive ECU side includes at least the following automotive applications: The collaborative work department should include at least: Log writing unit A is at least used to perform ECU-side log writing operations through the log processing instance; The log compression unit is used to compress the written ECU-side logs by employing a regular expression query mechanism and introducing a custom short character dictionary library adapted to the UDS protocol standard. The log encryption unit is used at least to perform encryption processing on the compressed ECU-side logs. The log reading unit is used at least to read the encrypted ECU-side logs. A log service allocator is used at least between the vehicle ECU and the host computer to achieve data interaction, wherein the log service allocator routes the log processing flow according to the application identifier.
9. An electronic device, characterized in that, include: At least one processor; And at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor invokes the program instructions to execute the vehicle log processing method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a computer, performs the vehicle log processing method as described in any one of claims 1 to 6.