Log interception control method and system and vehicle
The log retrieval method, triggered by external storage media and controlled by voice interaction, solves the problems of operational complexity and equipment damage during log retrieval from vehicle-mounted devices, achieving convenient, safe, and efficient log retrieval and analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies are complex to operate during the process of capturing logs from vehicle-mounted devices, are prone to damaging the devices, have poor connection flexibility, inconvenient triggering methods, weak real-time control capabilities, and low automation, resulting in high maintenance costs and low efficiency.
The log retrieval process is triggered by external storage media. Using voice interaction control, the system automatically parses the configuration file to define log classification rules and performs filtering and storage, achieving intelligent log retrieval without disassembly or wired connection.
It reduces the skill requirements for operators, avoids equipment damage, improves ease of operation and safety, enables flexible real-time control and efficient log classification, and improves analysis efficiency and system intelligence.
Smart Images

Figure CN122019295A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of log management technology, and more specifically, to a control method, system, and vehicle for log interception. Background Technology
[0002] In the development and testing of in-vehicle devices such as smart cockpits, capturing vehicle system logs is a crucial method for problem localization and performance analysis. Currently, log capture in mass-produced vehicles primarily relies on traditional wired connections and physical operation methods. Specifically, this involves first disassembling the device casing to expose the internal hardware interfaces, then establishing a physical connection between the device and an external terminal using a dedicated network or serial cable. Subsequently, during a specific startup phase of the device, the operator must press and hold a preset special physical button to trigger and enter the log capture mode. In the capture mode interface, the desired log category must be manually selected. Finally, throughout the entire log capture process, the physical connection between the external terminal and the device must be maintained at all times. However, the aforementioned existing technical solutions have many shortcomings: First, they are highly complex to operate, requiring operators to have specific hardware skills to disassemble the equipment, and are prone to damaging the equipment, increasing maintenance costs; second, they have strong connection limitations, heavily relying on cables and lacking flexibility in complex equipment deployment environments; third, the triggering method is inconvenient, relying on physical buttons at specific startup times, resulting in low fault tolerance and inflexible adjustment; fourth, the automation level of log classification operations is low, requiring manual intervention and resulting in low efficiency; and fifth, the real-time control capability is weak, making it impossible to conveniently control the start and stop of logs during the interception process, leading to poor operational continuity. Summary of the Invention
[0003] The problem solved by this invention is how to provide a vehicle log capture solution that is easy to operate, requires no disassembly or wired connection, and can be triggered and precisely controlled in an intelligent manner.
[0004] To address the aforementioned problems, this invention provides a log interception control method. The control method includes: triggering a log interception process in response to an external storage medium access device; reading a log configuration file pre-stored in the external storage medium, and, based on the parsing result of the log configuration file, enabling the system to enter a log interception state that is responsive to voice commands; receiving user control commands through voice interaction in the log interception state; and, in response to a first voice command indicating the start of interception, performing filtering and storage operations on the target log data according to the rules defined in the log configuration file, and writing the target log data to the external storage medium.
[0005] Compared to existing technologies, the technical benefits of this solution are as follows: By using the insertion of an external storage medium as a trigger condition, the physical disassembly and wired connection steps required in traditional solutions are completely eliminated. This not only reduces the skill requirements for operators but also completely avoids the risk of equipment damage during disassembly and assembly, significantly improving operational convenience and safety. The collaborative approach of "external storage medium trigger configuration loading + voice command control" replaces the traditional triggering mode that relies on specific physical buttons and start-up timing. The system can enter standby mode at any time and achieve real-time initiation of log interception through natural voice interaction. The triggering method is more flexible, more fault-tolerant, and does not rely on external terminals. By automatically defining log classification rules, storage formats, and other parameters through a configuration file pre-installed in the external storage medium, the system can automatically filter and classify target log data accordingly. This eliminates the need for manual screening later, ensuring the standardization, consistency, and accuracy of target log data from the source, greatly improving the efficiency of subsequent log analysis.
[0006] Furthermore, the system reads the log configuration file pre-stored in the external storage medium and, based on the parsing results of the log configuration file, puts the system into a log-ready state that can respond to voice commands. Specifically, this includes the following steps: after detecting the access of the external storage medium, automatically scanning specific files or directories in the external storage medium; identifying and reading log configuration files that conform to the predetermined naming rules; and parsing the log configuration file to obtain the log classification rules, storage path format, and log truncation parameters defined therein.
[0007] Compared to existing technologies, the technical benefits of this solution are as follows: Through an automated process of "automatic scanning-identification-reading-parsing," the system can proactively discover and load configuration files, eliminating the need for users to manually locate and trigger log configuration file loading. This eliminates the manual steps of searching for and selecting configurations, reducing operational complexity and learning costs, and improving the intelligence level of the entire log extraction process. Core settings such as log classification rules, storage paths, and extraction parameters are centralized in the log configuration file for parsing and loading, achieving decoupling between control logic and specific parameters. Users do not need to modify system code or perform complex interface operations; they can flexibly adjust log extraction behavior simply by replacing or editing the configuration file, greatly enhancing the adaptability and scalability of the solution and enabling rapid response to different log analysis needs.
[0008] Furthermore, log classification rules define different categories of logs using at least one of log tags, process identifiers, or keywords.
[0009] Compared to existing technologies, the technical benefits of this solution are as follows: By defining classification rules using three methods, or combinations thereof, namely log tags (precisely identifying the module from which the logs originate), process identifiers (accurately locating the specific application or service that generated the logs), and keywords (semantic matching based on log content), the dimensions for log filtering become more diverse and precise. This overcomes the shortcomings of traditional methods, which can only capture the entire log stream or perform coarse-grained classification. It can accurately capture logs from specific modules, specific applications, or those containing specific key events from massive amounts of log data, greatly enhancing the effective value and targeted nature of the captured logs.
[0010] Furthermore, when the log is in the pending interception state, the user's control commands are received through voice interaction, specifically including the following steps: when the log is in the pending interception state, the voice monitoring function is activated; the received voice signal is recognized, and the recognized result is matched with the pre-stored command set; when the first voice command or the second voice command indicating the stop of interception is matched, the corresponding control signal is generated.
[0011] Compared to existing technologies, the technical effects achieved by adopting this solution are as follows: By activating the voice monitoring function while the log is waiting to be captured, the system enters a continuous standby state after the USB flash drive is inserted and the configuration is loaded. Users can start or stop log capture at any time via voice commands without any physical operation. This completely overcomes the limitations of traditional solutions that rely on physical buttons and require operation at specific times, achieving "manual-free" control throughout the entire process and greatly improving the continuity of operation and user experience. A mechanism of "matching recognition results with a pre-stored command set," rather than simple keyword wake-up, is used to establish a closed voice command set optimized specifically for log capture scenarios. This systematically avoids accidental triggering caused by everyday conversations or other irrelevant voices. Furthermore, by accurately recognizing and distinguishing the two core commands, "start" and "stop," the system ensures the accuracy of understanding user intent, thereby achieving precise and reliable control over the log capture process.
[0012] Furthermore, in response to the first voice command indicating the start of logging, the process specifically includes the following steps: upon receiving the first voice command, generating and outputting a first voice prompt message to inform the user that logging has started; and upon receiving a second voice command, generating and outputting a second voice prompt message to inform the user that logging has stopped.
[0013] Compared to existing technologies, the technical effects achieved by adopting this solution are as follows: By providing clear voice prompts immediately after performing key operations (starting / stopping interception), the system provides clear auditory feedback to the user's actions. This allows the user to know the current status of the system (whether log interception has started or stopped) in real time and accurately, completely avoiding the "blind operation" problem caused by the lack of feedback in traditional solutions, such as the inability to determine whether interception has been successfully triggered or whether it has stopped normally, thereby greatly enhancing the user's sense of control and confidence in the operation process.
[0014] Furthermore, according to the rules defined in the log configuration file, the target log data is filtered and stored, and the target log data is written to the external storage medium. Specifically, this includes the following steps: filtering target log data that meets the conditions in real time from at least one source among the system's kernel log buffer, application layer log interface, or network log port according to the log classification rules; encapsulating the filtered target log data according to the format specified in the configuration file; and writing the encapsulated data to the specified storage path of the external storage medium in real time. The specified storage path is dynamically generated based on the device identifier, timestamp, and log category.
[0015] Compared with existing technologies, the technical effects achieved by adopting this solution are as follows: By explicitly filtering logs in real time from three key data sources—the kernel log buffer, the application layer log interface, and the network log port—this solution overcomes the limitations of traditional solutions, which rely on a single log source and provide incomplete information. It can simultaneously capture underlying system behavior, upper-layer application runtime status, and network communication data, achieving three-dimensional and comprehensive monitoring of the vehicle's infotainment system's operational status, and providing a more comprehensive and accurate data foundation for locating complex problems.
[0016] Furthermore, the control method also includes: if insufficient storage space on the external storage medium, write failure, or configuration file parsing error is detected during the log interception process, the log interception will be automatically stopped and corresponding error message will be generated.
[0017] Compared to existing technologies, the technical effects achieved by adopting this solution are as follows: By actively monitoring key indicators such as storage space and write status, and automatically suspending the interception process when an anomaly occurs, this mechanism fundamentally prevents problems such as incomplete log data writing, file corruption, or loss due to full storage media or hardware failure. Simultaneously, it avoids potential resource exhaustion or program crashes caused by continuous attempts to write to unavailable targets, significantly improving the robustness and reliability of the entire log interception process.
[0018] Furthermore, the control method also includes: automatically stopping any ongoing log capture operations in response to detecting that an external storage medium has been removed, and clearing the configuration and state loaded in the current session.
[0019] Compared to existing technologies, the technical benefits of this solution are as follows: By automatically stopping log capture upon detecting the removal of external storage media, it effectively prevents log file corruption, data loss, or write errors caused by the sudden removal of the storage target. This mechanism ensures the integrity of each capture task, keeping the stored log data available and providing a reliable guarantee for subsequent analysis.
[0020] To address the aforementioned problems, this invention provides a log truncation control system for implementing the log truncation control method provided by the above-mentioned technical features. The control system includes: a detection module, a voice interaction module, a log management module, and a storage control module. The detection module detects access and removal events of the external storage medium and triggers or terminates the log truncation process accordingly. The voice interaction module receives and recognizes user voice commands when the log is to be trunculated, and converts the voice commands into control signals. The log management module reads and parses the log configuration file in the external storage medium, and, in response to the control signals from the voice interaction module, schedules and executes log filtering, formatting, and storage operations according to the parsed configuration rules. The storage control module manages the file system operations of the external storage medium and writes the formatted log data to a specified path.
[0021] Compared to existing technologies, the technical effects achieved by adopting this solution are as follows: Through the collaborative design of four functional modules—detection, voice interaction, log management, and storage control—a system architecture with separated responsibilities and clearly defined interfaces is constructed. Each module performs its specific function (e.g., the detection module is responsible for physical event perception, the voice module for human-computer interaction, the log module for core logic scheduling, and the storage module for data persistence), which reduces system complexity and facilitates independent debugging and upgrades. This highly cohesive and loosely coupled design significantly improves the system's maintainability, scalability, and long-term operational stability. The system automatically senses physical triggers through the detection module, automatically parses configurations and schedules tasks through the log management module, achieves natural interactive control through the voice module, and finally, the storage module completes data persistence. This process forms a complete automated control closed loop, integrating multiple independent steps such as disassembly, connection, selection, and control that relied on manual operation in traditional solutions into a smooth automated operation, significantly reducing the need for human intervention and the probability of operational errors.
[0022] To address the aforementioned problems, the present invention provides a vehicle that includes a vehicle log capture control system as described above.
[0023] In summary, the above-mentioned technical solutions of this application can have one or more of the following advantages or beneficial effects: i) By triggering through external storage media, physical disassembly and wired connection are completely eliminated, achieving non-intrusive and convenient operation, reducing the operating threshold and the risk of equipment damage; ii) By using "external storage configuration loading + voice command coordination," the limitations of traditional physical buttons and fixed-time triggering are replaced, achieving natural interaction of being ready at any time and controlling in real time; iii) By automatically defining classification rules and storage formats through preset configuration files, automatic filtering, classification, and structured storage of logs are achieved, avoiding manual intervention and improving data standardization and analysis efficiency; iv) Through the coordination of the four core modules of detection, voice, log management, and storage control, a reliable system with separation of responsibilities and easy maintenance and expansion is achieved, laying a solid foundation for the industrialization of the technology. Attached Figure Description
[0024] Figure 1 This is a general flowchart of a log interception control method in an embodiment of this application; Figure 2 The flowchart of the log interception control method in the embodiments of this application Figure 1 ; Figure 3 The flowchart of the log interception control method in the embodiments of this application Figure 2 ; Figure 4 The flowchart of the log interception control method in the embodiments of this application Figure 3 ; Figure 5 This is a flowchart illustrating the control method for log capture in the embodiments of this application; Figure 6 This is a block diagram of the control system for log capture in the embodiments of this application. Detailed Implementation
[0025] The purpose of this invention is to provide a control method, system, and vehicle for log interception, which enables intelligent log interception that is non-disassembly-free, cordless, accurately classified, and controllable in real time, through triggering via external storage medium and coordinated control with voice commands.
[0026] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0027] See Figures 1-6 This invention provides a control method for log interception, the control method including: S1: In response to the access of an external storage medium device, the log capture process is triggered; S2: Read the log configuration file pre-stored in the external storage medium, and based on the parsing result of the log configuration file, enable the system to enter the log interception state that can respond to voice commands; S3: When the log is waiting to be captured, receive the user's control commands through voice interaction; S4: In response to the first voice command indicating the start of interception, perform filtering and storage operations on the target log data according to the rules defined in the log configuration file, and write the target log data to the external storage medium.
[0028] Specifically, the user inserts a USB flash drive containing the log_config.xml configuration file into the vehicle's USB port. The vehicle's USB detection module detects this connection event in real time and sends a "USB insertion" signal to the log module, triggering the entire log capture process. Upon receiving the trigger signal, the log module automatically accesses the USB flash drive's file system, locates and reads the log_config.xml file. The module parses the file, obtaining rules regarding log categories (such as "System," "Audio," and "Network") and storage formats (such as TXT). After successful parsing, the system is ready and awaits voice commands. At this point, the voice interaction module enters active listening mode. The user says "Start capturing logs," and the microphone array of the voice interaction module picks up the voice signal, processes it through an internal recognition algorithm, converts it into a "Start" control command, and sends it to the log module. Based on the "Start" command and the loaded configuration rules, the log module begins to filter out the required log data in real time from the vehicle's operating system kernel and specified applications, and writes this data in TXT format to a file named System_Log_timestamp.txt on the USB flash drive.
[0029] In one embodiment of the present invention, a log configuration file pre-stored in an external storage medium is read, and based on the parsing result of the log configuration file, the system enters a log interception state that is responsive to voice commands. Specifically, this includes the following steps: S201: After detecting the access of an external storage medium, automatically scan for specific files or directories in the external storage medium; S202: Identify and read log configuration files that conform to the predefined naming rules; S203: Parse the log configuration file to obtain the log classification rules, storage path format, and log truncation parameters defined therein.
[0030] Specifically, upon receiving the trigger signal, the log module immediately sends a command to the storage control module to mount and access the file system of the USB drive. It scans and locates the log_config.xml file in the root directory of the USB drive and reads it completely into the vehicle's memory. Next, the log module's built-in XML parser parses the file content, extracting key parameters such as log classification rules and storage format. After successful parsing, the log module notifies the voice interaction module. The voice interaction module (which integrates a voice recognition engine) is then activated and enters a continuous listening state, awaiting user commands. At this point, the entire system enters a "log waiting state," indicating to the user through an icon in a corner of the vehicle's screen or a brief notification sound that it is ready.
[0031] In one embodiment of the present invention, log classification rules define different categories of logs by at least one of log tags, process identifiers, or keywords.
[0032] Specifically, the definition of log classification rules is very flexible and can be set by combining one or more of the following: log tags, process identifiers, or keywords.
[0033] For example, log tags allow the system to filter all logs tagged with "ERROR"; process identifiers (PIDs) allow the system to capture only all logs generated by the application with process ID 1234; and keywords allow the system to filter log lines containing the keyword "Timeout".
[0034] In one embodiment of the present invention, when the log is in a state to be truncated, the user's control command is received through voice interaction, specifically including the following steps: S301: Activate the voice monitoring function while the log is waiting to be captured; S302: Recognize the received voice signal and match the recognition result with the pre-stored instruction set; S303: When a first voice command or a second voice command indicating the cessation of interception is matched, a corresponding control signal is generated.
[0035] Specifically, once the system enters the log interception state, a dedicated voice monitoring thread for log interception is activated. This thread performs noise reduction and feature extraction on the received voice signal, and then matches the recognized text result with a pre-stored, closed instruction set (which includes phrases such as "start intercepting logs" and "stop intercepting logs"). When a match is found for "start intercepting logs" (the first voice instruction) or "stop intercepting logs" (the second voice instruction), the system generates the corresponding "start" or "stop" control electrical signal.
[0036] In one embodiment of the present invention, in response to a first voice command indicating the start of interception, the target log data is filtered and stored according to the rules defined in the log configuration file, and the target log data is written to an external storage medium, specifically including the following steps: S401: After receiving the first voice command, generate and output the first voice prompt message to inform the user that log retrieval has started; S402: Based on log classification rules, filter target log data that meets the conditions in real time from at least one source among the system's kernel log buffer, application layer log interface, or network log port. S403: Encapsulate the selected target log data according to the format specified in the configuration file; write the encapsulated data to the specified storage path of the external storage medium in real time; S404: Upon receiving the second voice command, generate and output the second voice prompt message to inform the user that log retrieval has stopped; The specified storage path is dynamically generated based on the device identifier, timestamp, and log category.
[0037] Specifically, the user utters the voice command, "Start capturing logs." The microphone of the voice interaction module picks up the voice signal, performs noise reduction and feature extraction, and matches it against a pre-set command library, successfully recognizing it as the "start capturing" command. Subsequently, the voice interaction module generates a "start" control signal and sends it to the log module via the vehicle's operating system message bus.
[0038] Upon receiving the "Start" signal, the logging module immediately initiates log filtering and writing operations according to the loaded log_config.xml configuration rules. The system simultaneously captures data from multiple log sources in real time based on the parsed classification rules. Kernel logs are read from the Linux kernel's kernel log buffer. Application-layer logs output by specified system services and applications (based on process names or tags in the configuration file) are captured using the Android system's log capture tool. The system listens on the local network communication port, receiving network communication logs sent from the vehicle's in-vehicle network module. Based on the "System Log" and "Network Log" classification rules in the configuration, the captured raw log stream is filtered, retaining only entries that match the rules.
[0039] The selected log entries are encapsulated in TXT format by the log module, with a precise timestamp and source tag appended to each entry. The encapsulated data stream is then passed to the storage control module. The storage control module manages file operations on the USB drive, creating a folder named "Logs" on the drive (or creating it if it doesn't exist) and dynamically generating a unique file path based on the device VIN, current date, and time. Subsequently, the storage control module continuously and in real-time appends the formatted log data stream to this file.
[0040] When a user needs to end log capture, they speak the voice command, "Stop capturing logs." The voice interaction module recognizes the command again, generates a "stop" control signal, and sends it to the log module. Upon receiving the "stop" signal, the log module immediately sends a command to the storage control module to stop writing data to the log file and safely close the file handle. Simultaneously, the log module itself also stops all log filtering and capture activities. Subsequently, the log module notifies the voice interaction module again, which plays a voice prompt: "Log capture has stopped," informing the user that the operation has ended.
[0041] In one embodiment of the present invention, the control method further includes: during the log interception process, if insufficient storage space of the external storage medium is detected, write failure is detected, or configuration file parsing error is detected, log interception is automatically stopped and corresponding error message is generated.
[0042] Specifically, the system continuously monitors its status during log capture. If any issues are detected, such as insufficient space on the USB drive, multiple failed write attempts to the USB drive, or unparseable configuration files due to syntax errors, the system will immediately stop the current log capture operation without waiting for user commands. It will then generate and output specific error messages via voice or on-screen pop-ups.
[0043] For example, when the USB drive has less than 50MB of remaining space, an error message "Error: Insufficient storage space, operation terminated" is generated and output.
[0044] In one embodiment of the present invention, the control method further includes: automatically stopping any ongoing log capture operations and clearing the configuration and state loaded in the current session in response to detecting that the external storage medium has been unplugged.
[0045] Specifically, regardless of whether the log is in the pending or ongoing interception state, once the USB detection module detects that the USB drive has been physically removed, it will immediately send a high-priority "removal event" notification to the log management core. Upon receiving this notification, the log management core will force the following operations: First, immediately terminate any ongoing log filtering and writing tasks; second, safely close any open log files; and finally, clear all configuration parameters and temporary session states loaded after the USB drive was inserted, causing a complete system reset.
[0046] See Figures 1-2 This invention provides a control system for capturing vehicle-mounted logs, which implements the control method for capturing logs provided by the aforementioned technical features. The control system includes: a detection module, a voice interaction module, a log management module, and a storage control module. The detection module detects access and removal events of external storage media and triggers or terminates the log capture process accordingly. The voice interaction module receives and recognizes user voice commands when the logs are to be captured, and converts the voice commands into control signals. The log management module reads and parses the log configuration file in the external storage media, and, in response to the control signals from the voice interaction module, schedules and executes log filtering, formatting, and storage operations according to the parsed configuration rules. The storage control module manages the file system operations of the external storage media and writes the formatted log data to a specified path.
[0047] Specifically, the detection module is implemented by the USB host controller chip and corresponding drivers on the vehicle's motherboard, used for physically detecting the insertion and removal of the USB flash drive. The voice interaction module is implemented by the vehicle's built-in microphone, speaker, and software integrating speech recognition and synthesis algorithms, responsible for listening and broadcasting. The log management module, as the core control software, runs on the vehicle's main processor. It embeds a configuration file parser (such as an XML parser), a log filtering engine, and a task scheduler. The storage control module, as part of the log management module, or as an independent file system driver layer, is responsible for handling low-level operations such as file creation, opening, writing, and closing of the USB flash drive.
[0048] Furthermore, the detection module, voice interaction module, log management module, and storage control module collaborate with each other through the inter-process communication mechanism provided by the vehicle's operating system to complete the entire process from triggering to storage.
[0049] The present invention provides a vehicle, the vehicle including the vehicle log interception control system provided by the above-described technical features.
[0050] Specifically, the vehicle comprises a complete body and an integrated infotainment system housed within the dashboard at the front of the body. All hardware and software of the entire log capture and control system are integrated within this infotainment system. The system's USB port is conveniently located for easy user access (e.g., on the center console), the microphone is integrated into the headliner or near the steering wheel, and the speakers utilize the system's existing audio system.
[0051] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.
Claims
1. A method for controlling log truncation, characterized in that, The control method includes: In response to the access of an external storage medium device, the log capture process is triggered. The system reads the log configuration file pre-stored in the external storage medium and, based on the parsing result of the log configuration file, puts the system into a log interception state that can respond to voice commands. When the log is in the state of being to be captured, the user's control commands are received through voice interaction; In response to the first voice command indicating the start of interception, the system performs filtering and storage operations on the target log data according to the rules defined in the log configuration file, and writes the target log data to the external storage medium.
2. The log truncation control method according to claim 1, characterized in that, The process of reading the log configuration file pre-stored in the external storage medium and, based on the parsing result of the log configuration file, putting the system into a log-ready state that can respond to voice commands, specifically includes the following steps: Upon detecting the access of an external storage medium, the system automatically scans for specific files or directories within the external storage medium. Identify and read log configuration files that conform to predefined naming rules; The log configuration file is parsed to obtain the log classification rules, storage path format, and log truncation parameters defined therein.
3. The log truncation control method according to claim 2, characterized in that, The log classification rules define different categories of logs using at least one of log tags, process identifiers, or keywords.
4. The log truncation control method according to claim 1, characterized in that, When the log is in the pending truncation state, receiving user control commands via voice interaction specifically includes the following steps: Activate the voice monitoring function while the log is in the pending capture state; The received voice signal is recognized, and the recognition result is matched with a pre-stored instruction set; When the first voice command or the second voice command indicating the cessation of interception is matched, a corresponding control signal is generated.
5. The log truncation control method according to claim 4, characterized in that, The response to the first voice command indicating the start of the interception specifically includes the following steps: Upon receiving the first voice command, generate and output the first voice prompt message to inform the user that log retrieval has begun; Upon receiving the second voice command, a second voice prompt is generated and output to inform the user that log retrieval has stopped.
6. The log truncation control method according to claim 1, characterized in that, The step of filtering and storing the target log data according to the rules defined in the log configuration file, and writing the target log data to the external storage medium, specifically includes the following steps: Based on log classification rules, target log data that meets the criteria are filtered in real time from at least one source, such as the system's kernel log buffer, application layer log interface, or network log port. The selected target log data is encapsulated according to the format specified in the configuration file; The encapsulated data is written to the specified storage path of the external storage medium in real time; The specified storage path is dynamically generated based on the device identifier, timestamp, and log category.
7. The log truncation control method according to claim 1, characterized in that, The control method further includes: If insufficient storage space on the external storage medium, write failure, or configuration file parsing error is detected during log retrieval, log retrieval will automatically stop and corresponding error messages will be generated.
8. The log truncation control method according to claim 1, characterized in that, The control method further includes: In response to the detection that the external storage medium has been removed, any ongoing log capture operations are automatically stopped, and the configuration and status loaded in this session are cleared.
9. A log interception control system, characterized in that, The control system for implementing the log interception control method as described in any one of claims 1 to 8 includes: The detection module is used to detect the access and removal events of external storage media, and trigger or terminate the log interception process accordingly. A voice interaction module is used to receive and recognize the user's voice commands when the log is to be intercepted, and to convert the voice commands into control signals. The log management module is used to read and parse the log configuration file in the external storage medium, and in response to the control signal from the voice interaction module, schedule and execute the filtering, formatting and storage operations of the log according to the parsed configuration rules. The storage control module is used to manage the file system operations of the external storage medium and to write formatted log data to a specified path.
10. A vehicle, characterized in that, The vehicle includes a log capture control system as described in claim 9.