Whole vehicle log system and vehicle
By designing the vehicle logging system, including log management and storage modules, the problems of limited logging and difficult log management in traditional vehicle electronic control units are solved, and long-term recording and remote acquisition of vehicle logs are realized, log timestamps are unified, and resource utilization efficiency is improved.
Patent Information
- Application Number
- CN202411704925.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-04
AI Technical Summary
Traditional vehicle electronic control unit (ECU) has problems such as limited logging, inability to record for a long time and remote log acquisition in vehicle problem troubleshooting, making it difficult to capture occasional problems. At the same time, the log format and timing of the intelligent domain controller are inconsistent, which leads to difficulty in log management. The independent management of logs of each domain may cause some logs to be overwritten and it is difficult to extract complete and effective vehicle log data.
A vehicle logging system is designed, including the first log source module, the second log source module, the log management module and the log storage module. The system processes the received log source messages through the log management module, generates log source data packets, and sends them to the log storage module for storage. The log management module also includes a data cache unit and a PCIe interface for periodically sorting and sending log packets.
It realizes long-term recording and remote acquisition of vehicle logs, unifies the log timestamps of each log source module, facilitates log management and query, provides sufficient log storage space, improves resource utilization efficiency, and solves log management difficulties and coverage problems in traditional systems.
Smart Images

Figure CN119561828A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle control technology, and in particular to a vehicle log system and a vehicle. Background Art
[0002] In recent years, intelligent connected technology in the vehicle field has developed rapidly. As vehicle usage scenarios have diversified, the design of vehicle electronic systems has also become complex, and a variety of controllers and operating systems have been introduced. On this basis, multiple software and hardware architectures, operating systems, and protocols coexist in the same vehicle, bringing challenges to vehicle problem troubleshooting.
[0003] Traditional ECU (Electronic Control Unit) performs vehicle problem troubleshooting through offline diagnosis. This method records limited content and can only be manually checked offline. It is impossible to record logs for a long time or obtain logs remotely, and it is difficult to capture occasional problems.
[0004] With the introduction of intelligent domain controllers, existing domain controllers store logs locally in a rolling manner and upload key data to the remote backend for analysis through cloud technology during idle time. However, the operating systems, log frameworks, and time bases of the various domains in the vehicle are inconsistent, which can easily cause confusion in log format and timing, making log management difficult and making it inconvenient to troubleshoot problems. In addition, each domain manages its own log data independently. When troubleshooting a problem, some node logs may have been overwritten and become invalid, making it difficult to extract complete and valid vehicle log data for problem analysis. In addition, the storage resources of each node are limited, making it difficult to record logs for a long time. Summary of the invention
[0005] In view of the above problems, the following technical solutions are provided.
[0006] A vehicle log system of the present application includes a first log source module, a second log source module, a log management module and a log storage module: the first log source module is configured to send a first log source message to the log management module; the second log source module is configured to serialize the second log source message based on a preset protocol, and send the serialized second log source message to the log management module; the log management module is configured to process the received first log source message or the second log source message based on a log collection strategy to generate a log source data packet, and send the log source data packet to the log storage module; and the log storage module is configured to store the received log source data packet.
[0007] Optionally, the log source data packet includes the following fields: a timestamp field and a collection field generated by the processing based on the log collection policy.
[0008] Optionally, the collection fields include the following fields: log source node name, log subsystem name, log type level and log content.
[0009] Optionally, the timestamp field is: the system time of the vehicle log system when the log management module receives the first log source message or the second log source message.
[0010] Optionally, the log management module further includes a data cache unit, and the log management module is further configured to: after the log collection strategy-based processing to generate the log source data packet, send the log source data packet to the data cache unit in sequence.
[0011] Optionally, the log management module is further configured to: periodically organize the log source data packets in the data cache unit, and send the periodically organized log source data packets to the log storage module via PCIe.
[0012] Optionally, the log management module is further configured to: update the log collection strategy based on remotely pushed log strategy update information.
[0013] Optionally, the log storage module is further configured to: maintain the stored log source data packets based on a preset maintenance strategy.
[0014] Optionally, the log storage module is further configured to: in response to a remote log query instruction, filter the stored log source data packets level by level based on preset filtering levels to generate a query result log data packet, and upload the query result log data packet.
[0015] The vehicle of the present application comprises the above-mentioned vehicle log system. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above and / or other aspects and advantages of the present application will become clearer and easier to understand through the following description of various aspects in conjunction with the accompanying drawings, in which the same or similar units are represented by the same reference numerals. In the accompanying drawings:
[0017] Figure 1 A schematic block diagram of a vehicle log system 100 according to an embodiment of the present application is shown;
[0018] Figure 2 A field data structure diagram of a log source data packet according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0019] The description of the following specific embodiments is merely exemplary in nature and is not intended to limit the disclosed technology or the application and use of the disclosed technology. In addition, it is not intended to be bound by any express or implied theory presented in the aforementioned technical field, background technology or the following specific embodiments.
[0020] In the following detailed description of the embodiments, many specific details are set forth in order to provide a more thorough understanding of the disclosed technology. However, it is apparent to one of ordinary skill in the art that the disclosed technology can be practiced without these specific details. In other instances, well-known features are not described in detail to avoid unnecessarily complicating the description.
[0021] Terms such as “comprise” and “include” indicate that in addition to the units and steps directly and explicitly stated in the specification, the technical solution of the present application does not exclude the situation where there are other units and steps that are not directly or explicitly stated.
[0022] Hereinafter, various exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings.
[0023] Reference now Figure 1 , Figure 1 It is a schematic block diagram of a vehicle log system 100 according to an embodiment of the present application.
[0024] like Figure 1 As shown, the vehicle log system 100 includes a first log source module 110 , a second log source module 120 , a log management module 130 and a log storage module 140 .
[0025] like Figure 1 As shown, the first log source module 110 can be configured to send a first log source message to the log management module 130 .
[0026] Specifically, the first log source module 110 refers to a micro control unit node module such as a body control module equipped with a real-time operating system, such as a body control module, an anti-lock braking system control unit, a battery management system control unit, etc.
[0027] In some embodiments, the first log source module 110 sends the first log source message (eg, CAN bus message) to the log management module 130 via a CAN (Controller Area Network) bus.
[0028] The second log source module 120 may be configured to serialize the second log source message based on a preset protocol, and send the serialized second log source message to the log management module 130 .
[0029] Specifically, the second log source module 120 generally refers to a log source node module equipped with a modern operating system such as Linux, QNX, etc., such as an assisted driving domain controller, a cockpit entertainment domain controller, etc. In some embodiments, the second log source module 120 sends the second log source message to the log management module 130 via Ethernet.
[0030] Optionally, before sending the second log source message to the log management module 130 via Ethernet, the second log source module 120 may serialize the second log source message according to the log message protocol agreed upon in the vehicle log system 100 according to the policy locally configured by the second log source module 120, and after completing the serialization of the second log source message, send the second log source message to the log management module 130 via Ethernet.
[0031] like Figure 1 As shown, the log management module 130 is configured to: process the received first log source message or the second log source message based on the log collection strategy to generate a log source data packet, and send the log source data packet to the log storage module 140 .
[0032] Specifically, the log management module 130 may be a domain controller based on an arm processor and equipped with a real-time operating system and Linux. The following will describe in detail the process of the log management module 130 processing the received first log source message and the second log source message.
[0033] For the first log source message, the log management module 130 receives the first log source message from the first log source module 110 via the CAN bus, and the log management module 130 processes the received first log source message according to the log collection strategy.
[0034] In some embodiments, processing based on the log collection policy may include obtaining collection fields from the first log source message. The collection fields are usually obtained by matching and parsing (including identification, filtering, and screening) the attributes and content of the first log source message with the log collection policy, where the collection fields may include the following fields: log source node name, log subsystem name, log type level, and log content.
[0035] In addition, the processing of the first log source message by the log management module 130 further includes obtaining a timestamp field, wherein the timestamp field is set to: the system time of the vehicle log system 100 when the log management module 130 receives the first log source message.
[0036] After obtaining the above-mentioned collection field and timestamp field from the first log source message, the log management module 130 formats all fields according to the format of log timestamp, log source node name, log subsystem name, log type level and log content, thereby generating a log source data packet. In some embodiments, after generating the log source data packet, the log management module 130 can use the log message protocol agreed upon in the vehicle log system 100 to serialize the log source data packet.
[0037] Similarly, for the second log source message, the log management module 130 receives the second log source message from the second log source module 120 via Ethernet, and the log management module 130 processes the received second log source message according to the log collection strategy.
[0038] In some embodiments, processing based on the log collection policy may similarly include obtaining collection fields from the second log source message. The collection fields are usually obtained by matching and parsing (including identification, filtering, and screening) the attributes and content of the second log source message with the log collection policy, where the collection fields may include the following fields: log source node name, log subsystem name, log type level, and log content.
[0039] In addition, the processing of the second log source message by the log management module 130 further includes obtaining a timestamp field, wherein the timestamp field is set to: the system time of the vehicle log system 100 when the log management module 130 receives the second log source message.
[0040] After acquiring the above-mentioned collection field and timestamp field from the second log source message, the log management module 130 formats all fields according to the format of log timestamp, log source node name, log subsystem name, log type level and log content, thereby generating a log source data packet.
[0041] Different from the processing of the first log source message, before being sent to the log management module 130, the second log source message has been serialized in the second log source module 120 according to the locally configured strategy and the log message protocol agreed in the vehicle log system 100.
[0042] like Figure 2 As shown in , the log source data packet generated by the log management module 130 for processing the first log source message and the second log source message adopts the following data field structure: log timestamp, log source node name, log subsystem name, log type level and log content.
[0043] In some embodiments, the log management module 130 further includes a data cache unit ( Figure 1(not shown), the log management module 130 is also configured to: after the log source data packets are generated based on the processing of the log collection strategy, the log source data packets are sent to the data cache unit in sequence. That is, the log source data packets with a unified data structure after the above processing can be added to the data cache unit in a sequential order (optionally, the time order of the log timestamp field of each log source data packet).
[0044] In some embodiments, the log management module 130 may also periodically organize the log source data packets added to the data cache unit according to a certain strategy, and then send the periodically organized log source data packets to the log storage module 140 via PCIe (Peripheral Component Interface Express, bus and interface standard).
[0045] In some embodiments, the log management module 130 is also configured to update the log collection strategy based on the log policy update information pushed remotely. Specifically, the update of the log strategy allows the remote system to adjust the behavior of log collection and filtering according to the new log requirements. When the remote system (such as a cloud server or a central management system) detects that the log collection strategy needs to be updated, it will generate new log policy configuration information, which may include log level changes, new log sources, log filtering rules, etc. The remote system pushes the new log collection strategy to the log management module 130 through a secure communication channel (such as an OTA upgrade channel). After the log management module 130 receives the new log collection strategy, it will update its local configuration. This may involve modifying the frequency of log collection, adjusting log filtering rules, updating log storage and transmission parameters, etc. As the log collection strategy is updated, the log management module 130 will change its log collection behavior according to the new configuration. For example, if the new log collection strategy requires the collection of more detailed error logs, the log management module 130 will increase the capture and reporting of these logs.
[0046] Through this process, the vehicle log system can flexibly respond to remote commands and update the log collection strategy in a timely manner to better meet the needs of monitoring, diagnosis and analysis.
[0047] like Figure 1 As shown, the log storage module 140 may be configured to store log source data packets received from the log management module 130 .
[0048] Specifically, the log storage module 140 can be a domain controller equipped with a Linux or QNX operating system and a large-capacity storage device (such as a solid-state hard disk). In some embodiments, the log storage module 140 receives the log source data packet from the log management module 130 via PCIe. The log source data packet is usually in the form of large-capacity block data. Selecting PCIe for high-speed transmission of large-capacity block data can enable the log storage module 140 responsible for log collection, organization, storage and retrieval to achieve load balancing.
[0049] Optionally, the log storage module 140 is also configured to maintain the stored log source data packets based on a preset maintenance strategy. Specifically, these preset maintenance strategies may include the retention time, cleaning rules, storage level, etc. of the log. These strategies are used to manage and optimize the storage of log data to ensure the validity of the log data and the efficient operation of the storage system. According to these preset maintenance strategies, the log storage module 140 can perform regular maintenance on the stored log data packets, which may include cleaning out expired log data, optimizing storage structure, updating index information, etc., to maintain the performance and stability of the log storage system.
[0050] Optionally, the log storage module 140 is further configured to: in response to a remote log query instruction, filter the stored log source data packets level by level based on preset filtering levels to generate a query result log data packet, and upload the query result log data packet.
[0051] Specifically, the remote log query instruction can directly act on the log storage module 140. No matter where the query instruction comes from, the log storage module 140 can directly receive and execute these instructions. The log storage module 140 can filter the log data step by step according to the order of log timestamp, log source node name, log subsystem name, and log type level. This process ensures that only relevant log data is selected and included in the final log source data packet. The screened log data will be organized into a log source data packet. This step involves integrating log data of different sources and types into a log source data packet of a unified format for easy uploading and analysis. The log source data packet can be uploaded to the cloud server via Ethernet or other network interfaces. The log data packet uploaded to the cloud server will be used for further analysis, such as real-time log collection, content structuring, stable storage, extremely fast retrieval, multi-dimensional analysis, etc., to help users effectively manage and analyze log data.
[0052] Through such a process, the log storage module 140 can efficiently process remote log query instructions and securely upload log data to the cloud server for further analysis and processing.
[0053] In summary, the vehicle log system 100 in this embodiment can realize long-term recording and remote acquisition of traditional ECU logs without modifying the software and hardware of the traditional ECU. At the same time, this application unifies the log timestamps of each log source module under the time base of the vehicle log system, that is, when the log management module 130 receives and processes the message, the system time of the vehicle log system is taken as the log timestamp, instead of the timestamp provided by the log source, which facilitates log management and query. This application also provides sufficient log storage space through the log storage module 140, which can collect and store the vehicle log for a long time, and manage it in a unified manner to improve resource utilization efficiency.
[0054] The present application also provides a vehicle, the vehicle comprising the vehicle log system of the present application. The vehicle referred to in the present application may represent any appropriate vehicle having a drive system consisting of at least a battery, a power conversion device, and a drive motor, such as a hybrid vehicle, an electric vehicle, a plug-in hybrid electric vehicle, etc. A hybrid vehicle is a vehicle having two or more power sources, such as a gasoline-powered and an electric vehicle.
[0055] The specific embodiments described above in this application are only for more clearly describing the principles of this application, wherein each component is clearly shown or described to make the principles of this application easier to understand. Without departing from the scope of this application, those skilled in the art can easily make various modifications or changes to this application. Therefore, it should be understood that these modifications or changes should be included in the scope of patent protection of this application.
Claims
1. A vehicle log system, characterized in that: The vehicle log system includes a first log source module, a second log source module, a log management module and a log storage module: The first log source module is configured to: send a first log source message to the log management module; The second log source module is configured to: serialize the second log source message based on a preset protocol, and send the serialized second log source message to the log management module; The log management module is configured to: process the received first log source message or the second log source message based on the log collection strategy to generate a log source data packet, and send the log source data packet to the log storage module; as well as The log storage module is configured to store the received log source data packet.
2. The vehicle log system according to claim 1, characterized in that: The log source data packet includes the following fields: A timestamp field and a collection field generated by the processing based on the log collection strategy.
3. The vehicle log system according to claim 2, characterized in that: The collection fields include the following fields: log source node name, log subsystem name, log type level and log content.
4. The vehicle log system according to claim 2, characterized in that: The timestamp field is: the system time of the vehicle log system when the log management module receives the first log source message or the second log source message.
5. The vehicle log system according to claim 1, characterized in that: The log management module further includes a data cache unit, and the log management module is further configured to: after the log collection strategy-based processing to generate the log source data packet, send the log source data packet to the data cache unit in sequence.
6. The vehicle log system according to claim 5, characterized in that: The log management module is further configured to: periodically organize the log source data packets in the data cache unit, and send the periodically organized log source data packets to the log storage module via PCIe.
7. The vehicle log system according to claim 1, characterized in that: The log management module is further configured to update the log collection strategy based on the log strategy update information pushed remotely.
8. The vehicle log system according to claim 1, characterized in that: The log storage module is also configured to: maintain the stored log source data packets based on a preset maintenance strategy.
9. The vehicle log system according to claim 1, characterized in that: The log storage module is further configured to: in response to a remote log query instruction, filter the stored log source data packets level by level based on preset filter levels to generate a query result log data packet, and upload the query result log data packet.
10. A vehicle, characterized in that: The vehicle comprises the vehicle logbook system according to any one of claims 1-9.