Search

CN-122019295-A - Log interception control method, system and vehicle

CN122019295ACN 122019295 ACN122019295 ACN 122019295ACN-122019295-A

Abstract

The invention provides a control method, a system and a vehicle for log interception, wherein the control method comprises the steps of responding to external storage medium access equipment, triggering a log interception flow, reading a log configuration file pre-stored in an external storage medium, enabling a system to enter a log to-be-intercepted state capable of responding to voice instructions based on an analysis result of the log configuration file, receiving a control instruction of a user through voice interaction when the log is to-be-intercepted state, responding to a first voice instruction representing starting interception, executing screening and storage operation on target log data according to rules defined in the log configuration file, and writing the target log data into the external storage medium. The method solves the problems that the existing vehicle-machine log intercepting scheme is complex in operation, depends on wired connection and physical keys, is inconvenient to trigger, cannot be controlled in real time and is low in log classification automation degree.

Inventors

  • REN HAILIANG

Assignees

  • 上海均胜普联智能科技有限公司

Dates

Publication Date
20260512
Application Date
20251209

Claims (10)

  1. 1. A control method for log interception, the control method comprising: responding to an external storage medium access device, and triggering a log intercepting process; reading a log configuration file pre-stored in the external storage medium, and enabling the system to enter a log to-be-intercepted state capable of responding to a voice instruction based on an analysis result of the log configuration file; Receiving a control instruction of a user through voice interaction when the log is in a state to be intercepted; And responding to a first voice instruction representing starting interception, executing screening and storing operation on target log data according to rules defined in the log configuration file, and writing the target log data into the external storage medium.
  2. 2. The method for controlling log interception according to claim 1, wherein the step of reading a log configuration file pre-stored in the external storage medium and enabling the system to enter a log to-be-intercepted state in response to a voice command based on an analysis result of the log configuration file comprises the steps of: automatically scanning a specific file or a specific directory in an external storage medium after detecting that the external storage medium is accessed; identifying and reading a log configuration file conforming to a preset naming rule; And analyzing the log configuration file to obtain the log classification rule, the storage path format and the log interception parameter defined in the log configuration file.
  3. 3. The method of claim 2, wherein the log classification rules define different categories of logs by at least one of log labels, process identifiers, or keywords.
  4. 4. The method for controlling log interception according to claim 1, wherein the step of receiving the control command of the user through voice interaction when the log is in a state to be intercepted specifically comprises the following steps: activating a voice monitoring function in the state that the log is to be intercepted; identifying the received voice signal, and matching the identified result with a pre-stored instruction set; And when the first voice command or the second voice command representing stopping interception is matched, generating a corresponding control signal.
  5. 5. The method for controlling log intercept according to claim 4, wherein said responding to the first voice command characterizing the start of intercept comprises the steps of: after receiving the first voice instruction, generating and outputting first voice prompt information to inform a user that log interception is started; And after receiving the second voice instruction, generating and outputting second voice prompt information to inform a user that log interception is stopped.
  6. 6. The method for controlling log interception according to claim 1, wherein the filtering and storing operations of the target log data are performed according to the rule defined in the log configuration file, and the target log data are written into the external storage medium, specifically comprising the steps of: According to the log classification rule, screening target log data meeting the conditions in real time from at least one source in a kernel log buffer zone, an application layer log interface or a weblog port of the system; encapsulating the screened target log data according to a format specified by the configuration file; writing the packaged data into a designated storage path of the external storage medium in real time; the appointed storage path is dynamically generated according to the equipment identification, the time stamp and the log category.
  7. 7. The control method of log interception according to claim 1, characterized in that said control method further comprises: in the log intercepting process, if insufficient storage space, writing failure or configuration file analysis errors of the external storage medium are detected, log intercepting is automatically stopped, and corresponding error prompt information is generated.
  8. 8. The control method of log interception according to claim 1, characterized in that said control method further comprises: In response to detecting that the external storage medium is unplugged, automatically stopping any ongoing log intercept operations and clearing configuration and status loaded in the current session.
  9. 9. A control system for log interception, characterized by a control method for implementing log interception according to any one of claims 1 to 8, comprising: The detection module is used for detecting access and extraction events of an external storage medium and triggering or terminating a log interception flow according to the access and extraction events; The voice interaction module is used for receiving and identifying a voice instruction of a user in a log to-be-intercepted state and converting the voice instruction into a control signal; The log management module is used for reading and analyzing the log configuration file in the external storage medium, responding to the control signal from the voice interaction module, and scheduling and executing screening, format packaging and storage operation of the log according to the analyzed configuration rule; and the storage control module is used for managing file system operation of the external storage medium and writing the formatted log data into a specified path.
  10. 10. A vehicle is characterized in that, the vehicle comprising the log intercept control system of claim 9.

Description

Log interception control method, system and vehicle Technical Field The invention relates to the technical field of log management, in particular to a log interception control method, a log interception control system and a vehicle. Background In the development and testing process of vehicle-mounted equipment such as an intelligent cabin, intercepting a vehicle-mounted system log is a key and important means for problem positioning and performance analysis. At present, post-dose vehicle-to-machine log interception mainly depends on the traditional wired connection and physical operation modes. Specifically, the device housing needs to be disassembled first to expose the internal hardware interface, and then a dedicated network cable or serial port cable is used to establish a physical connection between the device and the external terminal. Then, the operator needs to press a preset special physical key for a long time in a specific starting stage of the equipment to trigger and enter a log grabbing mode. In the grab mode interface, the required log classification is also manually selected. Finally, in the whole log intercepting process, the physical connection between the external terminal and the equipment is required to be maintained all the time. However, the prior art scheme has the defects of high operation complexity, high connection limitation, severe dependence on cables, poor flexibility in a complex equipment deployment environment, inconvenient triggering mode, low fault tolerance and incapability of flexible adjustment due to dependence on physical keys of specific starting time, low automation degree of log classification operation, manual intervention, low efficiency, weak real-time control capability, incapability of conveniently controlling starting and stopping of logs in the intercepting process and poor operation consistency. Disclosure of Invention The invention solves the problem of providing a vehicle-machine log intercepting scheme which is convenient to operate, does not need to disassemble and connect with a wire, and can be triggered in an intelligent mode and accurately controlled. In order to solve the problems, the invention provides a log interception control method, which comprises the steps of responding to an external storage medium access device, triggering a log interception flow, reading a log configuration file pre-stored in an external storage medium, enabling a system to enter a log to-be-intercepted state capable of responding to voice instructions based on an analysis result of the log configuration file, receiving a control instruction of a user through voice interaction when the log is in the to-be-intercepted state, responding to a first voice instruction representing starting interception, executing screening and storage operation on target log data according to rules defined in the log configuration file, and writing the target log data into the external storage medium. Compared with the prior art, the technical effect achieved by adopting the technical scheme is that the insertion of the external storage medium is used as a trigger condition, so that the steps of equipment physical disassembly and wired connection which are necessary in the traditional scheme are thoroughly avoided, the skill requirement on operators is reduced, the risk that equipment is damaged in the disassembly and assembly process is avoided, and the convenience and safety of operation are obviously improved. The traditional trigger mode which depends on specific physical keys and starting time is replaced by a cooperative mode of 'external storage medium trigger configuration loading+voice instruction control'. The system can enter a standby state at any time, realizes real-time starting of log interception through natural voice interaction, is more flexible in triggering mode and higher in fault tolerance, and does not need to depend on an external terminal. Parameters such as log classification rules, storage formats and the like are automatically defined through configuration files preset in an external storage medium, and the system can automatically screen and classify and store target log data according to the parameters. The link of later-stage manual screening is eliminated, the normalization, consistency and accuracy of target log data are ensured from the source, and the efficiency of subsequent log analysis is greatly improved. Further, the method comprises the steps of automatically scanning a specific file or a specific catalog in an external storage medium after detecting that the external storage medium is accessed, identifying and reading the log configuration file conforming to a preset naming rule, and analyzing the log configuration file to obtain a log classification rule, a storage path format and log interception parameters defined in the log configuration file. Compared with the prior art, the technical effect achieved by adopting the technical scheme is that the