System log analysis method and device, vehicle and storage medium
By automatically parsing log analysis requests and obtaining system log files, and combining analysis scripts to perform fault analysis and result forwarding, the problems of low fault positioning efficiency and high labor cost in the intelligent cockpit system are solved, and efficient and accurate fault handling is achieved.
Patent Information
- Application Number
- CN202510233165.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-13
AI Technical Summary
Due to the diversification of functions and increased system complexity in the smart cockpit system, the positioning efficiency and labor cost are low when the system module fails.
By obtaining the log analysis request when each target cockpit system fails, parsing the request to obtain the system log file, calling the corresponding analysis script based on the system log text for fault analysis, generating the analysis results and forwarding them to the processing terminal of the fault module.
The system module for quickly positioning and identifying faults in the cockpit system is realized, which improves the efficiency and accuracy of fault handling, reduces the inefficiency and error proneness of manual analysis, and ensures the normal operation and safety of the cockpit system.
Smart Images

Figure CN120144402A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of intelligent cockpits, and specifically to a system log analysis method, apparatus, vehicle, and storage medium. Background Art
[0002] With the progress of society, the demand for intelligence in automobiles is increasing day by day. The development of intelligent cockpits depends on the collaborative work of high-performance main processors, advanced system software, and numerous intelligent external devices. Due to the continuous diversification of the functions of intelligent cockpits, the number of functional modules covered by the system software is also increasing, and the complexity of the system is also increasing, resulting in an increased possibility of system module failures. However, in related technologies, when a system module fails, multiple types of engineers usually need to analyze and locate the faulty system module in sequence, resulting in a large investment in human resources and low location efficiency. Summary of the Invention
[0003] In view of the above problems, embodiments of the present invention provide a system log analysis method, apparatus, vehicle, and storage medium.
[0004] According to one aspect of the embodiments of the present invention, a system log analysis method is provided. The method includes: obtaining a log analysis request sent when each target cockpit system in the cockpit system set fails; parsing the log analysis request to obtain a system log file corresponding to each target cockpit system, where the system log file includes system log texts of each system module in the target cockpit system; based on the system module to which the system log text belongs, calling a corresponding analysis script to perform a fault analysis on the system log file to obtain a faulty module in the system module; generating an analysis result for the log analysis request based on the fault identifier of the faulty module and the corresponding log text, and forwarding the analysis result to the processing terminal corresponding to the faulty module. Through the above process, the faulty system module in the cockpit system can be quickly located and identified, improving the efficiency and accuracy of fault handling. By automatically parsing the log analysis request, obtaining the system log file, and calling the corresponding analysis script according to the system module for fault analysis, the inefficiency and error-proneness of manual analysis are avoided. At the same time, by directly forwarding the analysis result to the processing terminal corresponding to the faulty module, maintenance personnel can quickly obtain the fault information and take corresponding repair measures, thereby ensuring the normal operation and safety of the cockpit system.
[0005] In an alternative embodiment, parsing the log analysis request to obtain a system log file corresponding to each target cockpit system includes:
[0006] obtaining the request timestamp of the log analysis request and the system priority of the corresponding target cockpit system;
[0007] Sort the log analysis requests based on the request timestamp and system priority;
[0008] Retrieve and extract the corresponding log storage files from the target log storage path based on the system identifier of the target cockpit system in the sorted log analysis requests to obtain log extraction files;
[0009] Verify the integrity of the log extraction files, and use the log extraction files that pass the verification as the system log files corresponding to the target cockpit system.
[0010] In an alternative embodiment, verifying the integrity of the log extraction files and using the log extraction files that pass the verification as the system log files corresponding to the target cockpit system includes:
[0011] Obtain the text position information of each log extraction text in the log extraction file, and determine the log storage text corresponding to the text position information in the log storage file;
[0012] Obtain the first text feature vector of the log storage text;
[0013] Encode the content defined by the log extraction text to obtain the second text feature vector of the log extraction text, and compare the second text feature vector with the first text feature vector;
[0014] If the second text feature vector is the same as the first text feature vector, determine that the log extraction file passes the verification, use the log extraction text as the system log text corresponding to the target cockpit system, and use the log extraction file as the system log file corresponding to the target cockpit system.
[0015] In an alternative embodiment, verifying the integrity of the log extraction files and using the log extraction files that pass the verification as the system log files corresponding to the target cockpit system further includes:
[0016] Obtain multiple extracted text values stored in the log extraction file;
[0017] Perform a hashing operation on the multiple extracted text values to obtain the file extraction value of the log extraction file;
[0018] Compare the file extraction value with the file storage value of the log storage file to verify the integrity of the log extraction file based on the comparison result;
[0019] If the comparison result indicates that the file extraction value is the same as the file storage value, use the log extraction file as the system log file corresponding to the target cockpit system, and use the log extraction text as the system log text corresponding to the target cockpit system.
[0020] In an alternative embodiment, based on the system module to which the system log text belongs, a corresponding analysis script is called to perform fault analysis on the system log file to obtain the faulty module in the system module, including:
[0021] Obtain the system module identifier associated with the system log text;
[0022] Based on the system module identifier, select the analysis script that matches the system module from the analysis script library;
[0023] Parse the system log text line by line based on the analysis script to obtain the text entries related to the fault;
[0024] Perform aggregation analysis on the text entries to identify and mark the fault information in the text entries;
[0025] Based on the fault information, determine the faulty module in the system module.
[0026] In an alternative embodiment, based on the fault identifier of the faulty module and the corresponding log text, generate an analysis result for the log analysis request and forward the analysis result to the processing terminal corresponding to the faulty module, including:
[0027] Based on the log text, obtain the fault information of the faulty module and the fault occurrence time;
[0028] Based on the fault identifier, fault information, and fault occurrence time, generate an analysis result for the log analysis request;
[0029] According to the processing terminal identifier of the faulty module, send the analysis result to the corresponding processing terminal through a preset communication protocol.
[0030] In an alternative embodiment, based on the fault identifier of the faulty module and the corresponding log text, generate an analysis result for the log analysis request and forward the analysis result to the processing terminal corresponding to the faulty module, further including:
[0031] Receive the feedback information from the processing terminal regarding the analysis result, and the feedback information is used to indicate whether the analysis result is correct;
[0032] Based on the feedback information, adjust the analysis result.
[0033] According to another aspect of the embodiments of the present invention, a system log analysis device is provided, including: a request acquisition module, configured to acquire a log analysis request sent when each target cockpit system in the cockpit system set fails; a request parsing module, configured to parse the log analysis request to obtain a system log file corresponding to each target cockpit system, where the system log file includes system log texts of each system module in the target cockpit system; a log analysis module, configured to perform fault analysis on the system log file by invoking a corresponding analysis script based on the system module to which the system log text belongs, so as to obtain a faulty module in the system module; and a result feedback module, configured to generate an analysis result for the log analysis request based on the fault identifier of the faulty module and the corresponding log text, and forward the analysis result to a processing terminal corresponding to the faulty module. Through the above modules, the system module with a fault in the cockpit system can be quickly located and identified, improving the efficiency and accuracy of fault handling. By automatically parsing the log analysis request, obtaining the system log file, and performing fault analysis by invoking a corresponding analysis script according to the system module, the inefficiency and error-proneness of manual analysis are avoided. At the same time, directly forwarding the analysis result to the processing terminal corresponding to the faulty module enables maintenance personnel to quickly obtain the fault information and take corresponding repair measures, thereby ensuring the normal operation and safety of the cockpit system.
[0034] According to another aspect of the embodiments of the present invention, a vehicle is provided, including: a processor, a memory, a communication interface, and a communication bus, where the processor, the memory, and the communication interface complete mutual communication through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the operations of the foregoing system log analysis method.
[0035] According to still another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which at least one executable instruction is stored, and the executable instruction causes the vehicle / device to perform the operations of the foregoing system log analysis method.
[0036] According to still another aspect of the embodiments of the present invention, a computer program product is provided, including computer instructions, and the computer instructions are used to cause a computer to perform the operations of the system log analysis method in the first aspect or any corresponding embodiment thereof.
[0037] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to be able to understand the technical means of the embodiments of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features, and advantages of the embodiments of the present invention more obvious and understandable, the following specifically illustrates the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings are only used to illustrate the embodiments and are not considered as a limitation to the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0039] Figure 1 It shows a schematic flow diagram of a system log analysis method provided by the present invention;
[0040] Figure 2 It shows another schematic flow diagram of a system log analysis method provided by the present invention;
[0041] Figure 3 It shows a schematic structural diagram of a system log analysis device provided by the present invention;
[0042] Figure 4 It shows a schematic structural diagram of a vehicle provided by the present invention. Detailed Embodiments
[0043] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0044] With the development of society, the requirements for intelligence in automobiles are getting higher and higher. The development of intelligent cockpits relies on high-performance main processors, system software, and the support of multiple intelligent external devices. The more diverse the functions of the intelligent cockpit, the more system modules the system software involves, and the more complex the system becomes. The probability of problems occurring in system modules increases accordingly, and the quantity and difficulty of analyzing and solving problems also become greater, resulting in a large investment in human resources.
[0045] In the related art, taking the black screen problem as an example in the solution to system problems, after the project manager or the factory production person in charge gets the case, they will first find the engineer responsible for the screen driver. The driver responsible engineer downloads the log for analysis. After confirming that there is no problem with the underlying driver of the project, they will then find the stability engineer for analysis. The stability engineer downloads the log again for positioning and analysis. The stability engineer locates that the black screen problem is caused by the camera, and then finds the camera engineer. The camera engineer has to download the log again to analyze and locate the problem. Maybe this is caused by an obvious error, but multiple module analyses are carried out, thus wasting time and a large amount of human resources.
[0046] Based on this, embodiments of the present invention provide a system log analysis method, apparatus, vehicle, and storage medium. By obtaining log analysis requests sent when each target cockpit system in the cockpit system set fails; parsing the log analysis requests to obtain system log files corresponding to each target cockpit system, where the system log files include system log texts of each system module in the target cockpit system; based on the system module to which the system log text belongs, calling a corresponding analysis script to perform fault analysis on the system log file to obtain a faulty module in the system module; generating an analysis result for the log analysis request based on the fault identifier of the faulty module and the corresponding log text, and forwarding the analysis result to the processing terminal corresponding to the faulty module.
[0047] Figure 1 FIG. shows a flowchart of a first embodiment of a system log analysis method of the present invention, which is applied to a cloud server. As Figure 1 shown, the method includes the following steps:
[0048] Step 110, obtain log analysis requests sent when each target cockpit system in the cockpit system set fails.
[0049] Among them, the cockpit system set stores multiple target cockpit systems, and each target cockpit system is configured with an independent system log file for recording various log information generated during the operation of the system. When a certain target cockpit system fails, it can send a log analysis request to the cloud server, requesting an analysis of its own system log file. After receiving the request, the cloud server parses and processes the request, so as to quickly locate the faulty module and generate a corresponding analysis result. This automated log analysis method greatly improves the efficiency of fault troubleshooting and reduces the cost of manual intervention.
[0050] Specifically, when obtaining log analysis requests sent when each target cockpit system in the cockpit system set fails, the cloud server will perform a preliminary screening on these log analysis requests, excluding log analysis requests with incorrect formats or incomplete information. Then, the cloud server will perform a priority sorting on the screened log analysis requests to ensure that urgent and important faults can be processed first. In addition, the cloud server will also perform preprocessing on the data in the log analysis requests, such as data cleaning, format conversion, etc., to facilitate subsequent analysis and processing, so as to improve the efficiency and accuracy of log analysis, quickly locate and solve problems, and ensure the normal operation of the cockpit system.
[0051] Further, the cockpit system includes a cockpit host and a data storage device connected to the cockpit host for storing data of multiple cockpit terminals. The cockpit host, as the core of the system (including Qualcomm 8155 and 8295 chips, system software, and other system modules for its functional operation, such as external electronic devices), is responsible for receiving the log text data generated during the operation of each system module and storing these log texts in the storage device connected to it. When a failure occurs in the cockpit system, the system log file generated based on these log texts can be sent to the cloud server through the data storage device for further analysis. Among them, the data storage device can be an internal hard disk, an external mobile hard disk, a network storage device (such as NAS), etc., and its storage capacity and read / write speed can meet the storage requirements of the log data generated during the long-term operation of the cockpit system. The cockpit host is connected to the data storage device through a high-speed data transmission interface to ensure the real-time transmission and storage of log data. When a failure occurs in the cockpit system, the cockpit host will automatically trigger a log analysis request or can also manually trigger a log analysis request, and upload the system log file to the cloud server. After receiving the log file, the cloud server will perform log analysis according to the steps mentioned above to quickly locate the cause of the failure and provide a solution. During the process of uploading the system log file to the cloud server, these log files can be compressed first and then the upload operation can be performed.
[0052] Step 120: Parse the log analysis request to obtain the system log files corresponding to each target cockpit system.
[0053] Among them, the system log file includes the system log texts of each system module in the target cockpit system.
[0054] In some optional embodiments, when parsing the log analysis request to obtain the system log files corresponding to each target cockpit system, the request timestamp of the log analysis request and the system priority of the corresponding target cockpit system can be obtained first; based on the request timestamp and the system priority, sort the log analysis requests; based on the system identifier of the target cockpit system in the sorted log analysis request, retrieve and extract the corresponding log storage file from the target log storage path to obtain the log extraction file; verify the integrity of the log extraction file, and use the log extraction file that passes the verification as the system log file corresponding to the target cockpit system.
[0055] When obtaining the request timestamp of the log analysis request and the system priority of the corresponding target cockpit system, the timestamp field and the system priority field can be extracted by parsing the request header information of the log analysis request. Among them, the request header information usually contains the metadata of the request, such as key information like the sending time, request type, and target cockpit system. By parsing the request header information, the request timestamp of the log analysis request can be quickly and accurately obtained. This timestamp represents the sending time of the request and can be used for subsequent operations such as sorting requests or comparing timestamps. At the same time, the system priority field in the request header information reflects the importance or urgency of the corresponding target cockpit system. This priority information can be used to reasonably schedule and process multiple log analysis requests when resources are limited, ensuring that high-priority requests can be responded to and processed first.
[0056] When sorting the log analysis requests based on the request timestamp and system priority, a priority queue data structure can be adopted to sort the log analysis requests according to the combination of the request timestamp and system priority. Specifically, all requests can be initially sorted according to the request timestamp to ensure that requests sent earlier are ranked ahead. In the case of the same request timestamp, a secondary sort is then performed according to the system priority to ensure that high-priority requests are ranked ahead of low-priority requests. In this way, efficient and orderly processing of the log analysis requests can be achieved, improving the efficiency and accuracy of system log analysis. At the same time, this sorting strategy can also be flexibly adjusted according to actual needs to adapt to different application scenarios and changing requirements.
[0057] When retrieving and extracting the corresponding log storage file from the target log storage path based on the system identifier of the target cockpit system in the sorted log analysis requests to obtain the log extraction file, the log storage path of the target cockpit system can be quickly located through the system identifier. During the retrieval process, the index mechanism of the storage system can be utilized to reduce unnecessary disk I / O operations and improve the retrieval efficiency. When extracting the log storage file, the log file can be parsed and extracted according to the preset log format specification to ensure that the extracted log information is complete and accurate. At the same time, to improve the real-time performance of log processing, parallel processing technology can be adopted to concurrently process multiple log extraction tasks to make full use of system resources and shorten the overall processing time of log analysis.
[0058] In some alternative embodiments, when verifying the integrity of the log extraction file and using the log extraction file that passes the verification as the system log file corresponding to the target cockpit system, the text position information of each log extraction text in the log extraction file can be obtained first, and the log storage text corresponding to the text position information can be determined in the log storage file; then the first text feature vector of the log storage text can be obtained; the content defined by the log extraction text can be encoded to obtain the second text feature vector of the log extraction text, and the second text feature vector can be compared with the first text feature vector; if the second text feature vector is the same as the first text feature vector, it is determined that the log extraction file passes the verification, the log extraction text is used as the system log text corresponding to the target cockpit system, and the log extraction file is used as the system log file corresponding to the target cockpit system.
[0059] Specifically, for any log extraction text in the log extraction file, the delimiter adjacent to the log extraction text in the log extraction file can be identified, and based on the position information of the delimiter, the text position information of each log extraction text in the log extraction file can be determined, and the log storage text corresponding to the text position information can be determined in the log storage file. Then, after performing n-gram encoding on the content defined by the log storage text and then calculating the MD5 value or SHA-256 value, the first text feature vector of the content defined by the log storage text can be obtained. Next, after encoding the content defined by the log extraction text and then calculating the MD5 value or SHA-256 value, the second text feature vector of the log extraction text can be obtained. Finally, the second text feature vector is compared with the first text feature vector; if the second text feature vector is the same as the first text feature vector, it is determined that the log extraction file passes the verification, the log extraction text is used as the system log text corresponding to the target cockpit system, and the log extraction file is used as the system log file corresponding to the target cockpit system.
[0060] In addition, if the second text feature vector is the same as the first text feature vector, it is determined that the log extraction file fails the verification. At this time, it can be considered that the log extraction file may have been tampered with or there is an abnormality, and the log extraction file needs to be further checked or verified. For example, the user can be prompted to re-upload the log extraction file, or the log extraction file can be analyzed more deeply to determine whether there are security issues or data inconsistencies. For example, a higher-level hashing algorithm, such as SHA-3 or WHIRLPOOL, can be used to recalculate the log extraction file to obtain a new hash value. This new hash value is compared with a known and trusted hash value to further verify the integrity and authenticity of the log extraction file. In addition, semantic analysis can be performed on the content of the log extraction file to check for abnormal or inconsistent entries, as well as potential attack patterns or malicious code. If, after further checking or verification, it is confirmed that there are indeed problems with the log extraction file, then the log extraction text can be rejected as the system log text corresponding to the target cockpit system, and the log extraction file can be rejected as the system log file corresponding to the target cockpit system to ensure the accuracy and security of the system log.
[0061] In some alternative embodiments, when verifying the integrity of the log extraction file and using the log extraction file that passes the verification as the system log file corresponding to the target cockpit system, multiple extracted text values stored in the log extraction file can also be obtained; a hash operation is performed on the multiple extracted text values to obtain the file extraction value of the log extraction file; the file extraction value is compared with the file storage value of the log storage file to verify the integrity of the log extraction file based on the comparison result; if the comparison result indicates that the file extraction value is the same as the file storage value, the log extraction file is used as the system log file corresponding to the target cockpit system, and the log extraction text is used as the system log text corresponding to the target cockpit system.
[0062] During implementation, the MD5 value of multiple extracted texts stored in the log extraction file can be calculated to obtain the extracted text values corresponding to each extracted text, and then a hash operation is performed on the multiple extracted text values to obtain the file extraction value of the log extraction file. By comparing the file extraction value with the file storage value of the log storage file, if the comparison result indicates that the file extraction value is the same as the file storage value, it indicates that the log extraction file passes the integrity verification. At this time, the log extraction file can be used as the system log file corresponding to the target cockpit system, and the log extraction text can be used as the system log text corresponding to the target cockpit system.
[0063] In addition, during the implementation process, in order to ensure the authenticity and integrity of the log extraction file, digital signature technology can also be used to sign the log extraction file and compare the signature value with the pre-stored signature value. If the signature values match, the legitimacy of the log extraction file is further confirmed, thereby enhancing the security and credibility of the system log. At the same time, in order to improve the verification efficiency, verification rules can be preset, such as setting the allowed verification time range, verification times limit, etc., to avoid frequent or ineffective verification operations and improve the overall performance of system log analysis.
[0064] Step 130, based on the system module to which the system log text belongs, call the corresponding analysis script to perform a fault analysis on the system log file to obtain the faulty module in the system module.
[0065] Among them, by performing a fault analysis on the system log file based on the system module to which the system log text belongs and calling the corresponding analysis script to obtain the faulty module in the system module, the part with problems in the system can be more accurately located, greatly improving the accuracy and efficiency of system log analysis.
[0066] In some optional implementation manners, when performing a fault analysis on the system log file based on the system module to which the system log text belongs and calling the corresponding analysis script to obtain the faulty module in the system module, the system module identifier associated with the system log text can be obtained; based on the system module identifier, select the analysis script that matches the system module from the analysis script library; perform line-by-line parsing on the system log text based on the analysis script to obtain the text entries related to the fault; perform aggregation analysis on the text entries to identify and mark the fault information in the text entries; based on the fault information, determine the faulty module in the system module.
[0067] Among them, when performing aggregation analysis on the text entries to identify and mark the fault information in the text entries, multiple text entries related to the same fault can be merged, thus presenting a clearer picture of the entire fault. Specifically, the aggregation analysis can group the relevant text entries into one category according to information such as keywords and timestamps in the text entries and extract the fault information. Then, mark these fault information, such as highlighting or adding annotations, so that users can quickly identify the location of the fault. In this way, not only can the accuracy of system log analysis be improved, but also more intuitive and easy-to-understand fault information can be provided to users.
[0068] Furthermore, during the process of calling the analysis script for fault analysis, the update situation of the system log file can also be monitored in real time. When it is detected that new log entries are added to the system log file, the analysis script can be immediately triggered to parse and analyze the newly added log entries, ensuring that fault information can be discovered and processed in a timely manner. In addition, in order to improve the degree of automation of fault analysis, the entire fault analysis process can be integrated into an automated tool, and the fault analysis process can be automatically triggered through preset rules and conditions, reducing manual intervention and improving the analysis efficiency.
[0069] Step 140, generate an analysis result for the log analysis request based on the fault identifier of the fault module and the corresponding log text, and forward the analysis result to the processing terminal corresponding to the fault module.
[0070] Among them, by generating an analysis result for the log analysis request based on the fault identifier of the fault module and the corresponding log text, and forwarding the analysis result to the processing terminal corresponding to the fault module, accurate transmission and rapid response of fault information can be achieved. The processing terminal can be a technician's workstation, mobile device, etc., ensuring that technicians can obtain the analysis result in the first time, so as to take corresponding fault handling measures. This real-time and automated log analysis method greatly shortens the cycle from fault discovery to handling. At the same time, since the analysis result is generated based on the fault identifier and log text of the fault module, it has high accuracy and pertinence, which helps technicians quickly locate the root cause of the problem and reduce the situations of misjudgment and missed judgment.
[0071] In some optional implementation manners, when generating an analysis result for the log analysis request based on the fault identifier of the fault module and the corresponding log text, and forwarding the analysis result to the processing terminal corresponding to the fault module, the fault information and the fault occurrence time of the fault module can be obtained based on the log text; an analysis result for the log analysis request can be generated based on the fault identifier, the fault information, and the fault occurrence time; according to the processing terminal identifier of the fault module, the analysis result is sent to the corresponding processing terminal through a preset communication protocol. Among them, when sending the analysis result to the corresponding processing terminal through the preset communication protocol, the log analysis process log_analyzer of the cloud server can directly create a task on the automated office system jira based on the analysis result and send it to the processing terminals where the person in charge of each system module is located.
[0072] Specifically, during the process of generating the analysis result, the log text can be further deeply mined to extract key information related to the fault, such as fault type, fault level, scope of influence, etc., so that technicians can more comprehensively understand the fault situation. In addition, to ensure the timeliness and effectiveness of the analysis result, the system can adopt the TCP / IP protocol to quickly and stably send the analysis result to the corresponding processing terminal. In this way, technicians can not only obtain the fault information in the first place, but also formulate a more accurate and effective fault handling plan based on the detailed data in the analysis result, further improving the stability and reliability of the system.
[0073] In addition, the cloud server can also output the analysis result to a document, and the output format is unified, which is: error system log file name + system time + error information, where the error information has a unified format: module name (unique) + log reporting information (the module can be customized) + pass / fail. The module name is defined according to the system module name. For example, the display problem is display, and the camera problem is camera, etc.
[0074] The system log analysis method of the embodiment of the present invention obtains a log analysis request sent when each target cockpit system in the cockpit system set fails; parses the log analysis request to obtain the system log file corresponding to each target cockpit system, and the system log file includes the system log text of each system module in the target cockpit system; based on the system module to which the system log text belongs, calls the corresponding analysis script to perform fault analysis on the system log file to obtain the faulty module in the system module; based on the fault identifier of the faulty module and the corresponding log text, generates an analysis result for the log analysis request, and forwards the analysis result to the processing terminal corresponding to the faulty module, which can quickly locate and identify the faulty system module in the cockpit system, improving the efficiency and accuracy of fault handling. By automatically parsing the log analysis request, obtaining the system log file, and performing fault analysis according to the system module by calling the corresponding analysis script, the inefficiency and error-proneness of manual analysis are avoided. At the same time, by directly forwarding the analysis result to the processing terminal corresponding to the faulty module, the maintenance personnel can quickly obtain the fault information and take corresponding repair measures, thereby ensuring the normal operation and safety of the cockpit system.
[0075] Figure 2 The flowchart of another embodiment of the system log analysis method of the present invention is shown. As Figure 2 shown, the method includes the following steps:
[0076] Step 210, obtain the log analysis request sent when each target cockpit system in the cockpit system set fails.
[0077] For details, please refer to Figure 1Step 110 of the illustrated embodiment will not be elaborated here.
[0078] Step 220: Parse the log analysis request to obtain the system log files corresponding to each target cockpit system.
[0079] For details, please refer to Figure 1 Step 120 of the illustrated embodiment will not be elaborated here.
[0080] Step 230: Based on the system module to which the system log text belongs, call the corresponding analysis script to perform fault analysis on the system log file to obtain the faulty module in the system module.
[0081] For details, please refer to Figure 1 Step 130 of the illustrated embodiment will not be elaborated here.
[0082] Step 240: Based on the fault identifier of the faulty module and the corresponding log text, generate an analysis result for the log analysis request and forward the analysis result to the processing terminal corresponding to the faulty module.
[0083] Specifically, the above step 240 includes:
[0084] Step 2401: Receive the feedback information from the processing terminal regarding the analysis result. The feedback information is used to indicate whether the analysis result is correct.
[0085] Among them, the above feedback information may include a correct identifier or an incorrect identifier. The correct identifier is used to indicate that the analysis result is correct, and the incorrect identifier is used to indicate that the analysis result is incorrect.
[0086] Step 2402: Adjust the analysis result based on the feedback information.
[0087] Specifically, when the feedback information includes an incorrect identifier, correct the analysis result according to the incorrect identifier and regenerate the corrected analysis result. The correction process may involve a more in-depth analysis of the faulty module indicated by the incorrect identifier or an adjustment of the analysis logic to ensure that the corrected analysis result can accurately reflect the fault situation in the system log. Send the corrected analysis result to the processing terminal again for relevant personnel to conduct further processing or decision-making. Through this feedback mechanism, continuous optimization of the analysis result can be achieved, improving the accuracy and reliability of system log analysis.
[0088] In summary, the system log analysis method according to the embodiments of the present invention obtains log analysis requests sent when various target cockpit systems in the cockpit system set fail; parses the log analysis requests to obtain system log files corresponding to the various target cockpit systems, where the system log files include system log texts of various system modules in the target cockpit systems; based on the system modules to which the system log texts belong, calls corresponding analysis scripts to perform fault analysis on the system log files to obtain fault modules in the system modules; generates an analysis result for the log analysis request based on the fault identifiers of the fault modules and the corresponding log texts, and forwards the analysis result to the processing terminal corresponding to the fault module, which can quickly locate and identify the system modules with faults in the cockpit system, improving the efficiency and accuracy of fault handling. By automatically parsing the log analysis requests, obtaining the system log files, and calling corresponding analysis scripts for fault analysis according to the system modules, the inefficiency and error-proneness of manual analysis are avoided. At the same time, by directly forwarding the analysis result to the processing terminal corresponding to the fault module, maintenance personnel can quickly obtain the fault information and take corresponding repair measures, thus ensuring the normal operation and safety of the cockpit system.
[0089] Figure 3 FIG. shows a structural schematic diagram of an embodiment of a system log analysis device according to the present invention. As Figure 3 shown, the device includes:
[0090] A request acquisition module 310, configured to acquire log analysis requests sent when various target cockpit systems in the cockpit system set fail;
[0091] A request parsing module 320, configured to parse the log analysis requests to obtain system log files corresponding to the various target cockpit systems, where the system log files include system log texts of various system modules in the target cockpit systems;
[0092] A log analysis module 330, configured to perform fault analysis on the system log files by calling corresponding analysis scripts based on the system modules to which the system log texts belong, to obtain fault modules in the system modules;
[0093] A result feedback module 340, configured to generate an analysis result for the log analysis request based on the fault identifiers of the fault modules and the corresponding log texts, and forward the analysis result to the processing terminal corresponding to the fault module.
[0094] In an optional implementation manner, the request parsing module 320 includes:
[0095] A priority acquisition sub-module, configured to acquire the request timestamp of the log analysis request and the system priority of the corresponding target cockpit system;
[0096] A request sorting sub-module, configured to sort log analysis requests based on the request timestamp and system priority;
[0097] A file extraction sub-module, configured to retrieve and extract the corresponding log storage file from the target log storage path based on the system identifier of the target cockpit system in the sorted log analysis request, to obtain a log extraction file;
[0098] A file verification sub-module, configured to verify the integrity of the log extraction file, and use the log extraction file that passes the verification as the system log file corresponding to the target cockpit system.
[0099] In an optional implementation manner, the file verification sub-module includes:
[0100] A position acquisition unit, configured to acquire the text position information of each log extraction text in the log extraction file, and determine the log storage text corresponding to the text position information in the log storage file;
[0101] A feature acquisition unit, configured to acquire the first text feature vector of the log storage text;
[0102] A feature comparison unit, configured to encode the content defined by the log extraction text to obtain the second text feature vector of the log extraction text, and compare the second text feature vector with the first text feature vector;
[0103] A first verification unit, configured to, if the second text feature vector is the same as the first text feature vector, determine that the log extraction file passes the verification, use the log extraction text as the system log text corresponding to the target cockpit system, and use the log extraction file as the system log file corresponding to the target cockpit system.
[0104] In some optional implementation manners, the file verification sub-module further includes:
[0105] A text value acquisition unit, configured to acquire multiple extraction text values stored in the log extraction file;
[0106] A hash operation unit, configured to perform a hash operation on the multiple extraction text values to obtain the file extraction value of the log extraction file;
[0107] A stored value comparison unit, configured to compare the file extraction value with the file stored value of the log storage file, to verify the integrity of the log extraction file based on the comparison result;
[0108] A second verification unit, configured to, if the comparison result indicates that the file extraction value is the same as the file stored value, use the log extraction file as the system log file corresponding to the target cockpit system, and use the log extraction text as the system log text corresponding to the target cockpit system.
[0109] In some alternative embodiments, the log analysis module 330 includes:
[0110] An identifier acquisition sub-module, configured to acquire the system module identifier associated with the system log text;
[0111] A script matching sub-module, configured to select an analysis script that matches the system module from the analysis script library based on the system module identifier;
[0112] A text parsing sub-module, configured to parse the system log text line by line based on the analysis script to obtain text entries related to faults;
[0113] A fault marking sub-module, configured to perform aggregated analysis on the text entries to identify and mark the fault information in the text entries;
[0114] A fault sub-determination module, configured to determine the faulty module in the system module based on the fault information.
[0115] In some alternative embodiments, the result feedback module 340 includes:
[0116] An information acquisition sub-module, configured to acquire the fault information of the faulty module and the fault occurrence time based on the log text;
[0117] A result generation sub-module, configured to generate an analysis result for the log analysis request based on the fault identifier, the fault information, and the fault occurrence time;
[0118] A result feedback sub-module, configured to send the analysis result to the corresponding processing terminal through a preset communication protocol according to the processing terminal identifier of the faulty module.
[0119] In some alternative embodiments, the result feedback module 340 is further configured to receive feedback information from the processing terminal regarding the analysis result, where the feedback information is used to indicate whether the analysis result is correct; and adjust the analysis result based on the feedback information.
[0120] The further function descriptions of the above-mentioned various modules and units are the same as those in the corresponding method embodiments described above, and will not be elaborated here.
[0121] Through the above-mentioned apparatus and its components, the technical solution provided by the embodiments of the present invention has the following advantages:
[0122] The system log analysis device according to the embodiment of the present invention obtains log analysis requests sent when each target cockpit system in the cockpit system fails; parses the log analysis requests to obtain system log files corresponding to each target cockpit system, where the system log files include system log texts of each system module in the target cockpit system; based on the system module to which the system log text belongs, calls the corresponding analysis script to perform fault analysis on the system log file to obtain the faulty module in the system module; based on the fault identifier of the faulty module and the corresponding log text, generates an analysis result for the log analysis request and forwards the analysis result to the processing terminal corresponding to the faulty module, which can quickly locate and identify the faulty system module in the cockpit system, improving the efficiency and accuracy of fault handling. By automatically parsing the log analysis request, obtaining the system log file, and calling the corresponding analysis script according to the system module for fault analysis, the inefficiency and error-proneness of manual analysis are avoided. At the same time, by directly forwarding the analysis result to the processing terminal corresponding to the faulty module, the maintenance personnel can quickly obtain the fault information and take corresponding repair measures, thereby ensuring the normal operation and safety of the cockpit system.
[0123] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of a vehicle provided by an alternative embodiment of the present invention. As Figure 4 shown, the vehicle includes: one or more processors 410, a memory 420, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common main board or installed in other ways as needed. The processor can process instructions executed in the vehicle, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple vehicles can be connected, and each device provides some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Figure 4 In
[0124] FIG. 410, a processor 410 is taken as an example.
[0125] Among them, the memory 420 stores instructions that can be executed by at least one processor 410, so that the at least one processor 410 executes the methods shown in the above embodiments.
[0126] The memory 420 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the vehicle presented by a kind of landing page of a small program, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 420 may optionally include a memory remotely provided with respect to the processor 410, and these remote memories may be connected to the vehicle through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a server cluster, a mobile communication network, and combinations thereof.
[0127] The memory 420 may include a volatile memory, for example, a random access memory; the memory may also include a non-volatile memory, for example, a flash memory, a hard disk, or a solid-state drive; the memory 420 may also include a combination of the above types of memories.
[0128] The vehicle further includes a communication interface 430 for the vehicle to communicate with other devices or a communication network.
[0129] An embodiment of the present invention also provides a computer-readable storage medium, and the storage medium stores at least one executable instruction. When the executable instruction runs on a vehicle / system log analysis device, the vehicle / system log analysis device is caused to execute the system log analysis method in any of the above method embodiments.
[0130] An embodiment of the present invention also provides a computer program product, including computer instructions, and the computer instructions are used to cause a computer to execute the system log analysis method in the first aspect or any corresponding embodiment thereof.
[0131] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. In addition, embodiments of the present invention are not directed to any particular programming language.
[0132] In the specification provided herein, a large number of specific details are set forth. However, it will be understood that embodiments of the invention may be practiced without these specific details. Similarly, in order to streamline the present invention and assist in understanding one or more of the various inventive aspects, in the foregoing description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Among them, the claims following the specific implementation manners are hereby expressly incorporated into the specific implementation manners, and each claim itself serves as a separate embodiment of the present invention.
[0133] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive.
[0134] It should be noted that the above embodiments illustrate the present invention rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim listing several devices, several of these devices may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A system log analysis method, characterized in that: The method comprises: Obtain the log analysis request sent when each target cockpit system in the cockpit system set fails; Parsing the log analysis request to obtain a system log file corresponding to each of the target cockpit systems, wherein the system log file includes a system log text of each system module in the target cockpit system; Based on the system module to which the system log text belongs, calling a corresponding analysis script to perform fault analysis on the system log file to obtain a fault module in the system module; Based on the fault identification of the fault module and the corresponding log text, an analysis result for the log analysis request is generated, and the analysis result is forwarded to a processing terminal corresponding to the fault module.
2. The method according to claim 1, characterized in that The parsing of the log analysis request to obtain the system log files corresponding to each of the target cockpit systems includes: Obtaining a request timestamp of the log analysis request and a system priority of a corresponding target cockpit system; sorting the log analysis requests based on the request timestamp and the system priority; Based on the system identifier of the target cockpit system in the sorted log analysis request, retrieve and extract the corresponding log storage file from the target log storage path to obtain a log extraction file; The integrity of the log extraction file is verified, and the log extraction file that passes the verification is used as the system log file corresponding to the target cockpit system.
3. The method according to claim 2, characterized in that The step of verifying the integrity of the log extraction file and using the verified log extraction file as the system log file corresponding to the target cockpit system includes: Acquire text position information of each log extraction text in the log extraction file, and determine the log storage text corresponding to the text position information in the log storage file; Obtaining a first text feature vector of the log storage text; Encoding the content defined by the log extracted text to obtain a second text feature vector of the log extracted text, and comparing the second text feature vector with the first text feature vector; If the second text feature vector is the same as the first text feature vector, it is determined that the log extraction file passes the verification, and the log extraction text is used as the system log text corresponding to the target cockpit system, and the log extraction file is used as the system log file corresponding to the target cockpit system.
4. The method according to claim 2, characterized in that: The integrity of the log extraction file is verified, and the log extraction file that passes the verification is used as the system log file corresponding to the target cockpit system, and further includes: Obtaining multiple extracted text values stored in the log extraction file; Performing a hash operation on the plurality of extracted text values to obtain a file extraction value of the log extraction file; Comparing the file extraction value with the file storage value of the log storage file to verify the integrity of the log extraction file based on the comparison result; If the comparison result indicates that the file extraction value is the same as the file storage value, the log extraction file is used as the system log file corresponding to the target cockpit system, and the log extraction text is used as the system log text corresponding to the target cockpit system.
5. The method according to claim 1, characterized in that The system module to which the system log text belongs, calling a corresponding analysis script to perform fault analysis on the system log file to obtain a fault module in the system module, comprises: Obtaining a system module identifier associated with the system log text; Based on the system module identifier, selecting an analysis script matching the system module from an analysis script library; Parsing the system log text line by line based on the analysis script to obtain text entries related to the fault; Performing aggregate analysis on the text entry to identify and mark fault information in the text entry; Based on the fault information, a faulty module in the system modules is determined.
6. The method according to claim 1, characterized in that The generating an analysis result for the log analysis request based on the fault identifier of the fault module and the corresponding log text, and forwarding the analysis result to a processing terminal corresponding to the fault module, includes: Based on the log text, obtaining the fault information and fault occurrence time of the fault module; Generate an analysis result for the log analysis request based on the fault identifier, the fault information and the fault occurrence time; According to the processing terminal identification of the fault module, the analysis result is sent to the corresponding processing terminal through a preset communication protocol.
7. The method according to claim 1, characterized in that The method of generating an analysis result for the log analysis request based on the fault identifier of the fault module and the corresponding log text, and forwarding the analysis result to a processing terminal corresponding to the fault module, further includes: receiving feedback information from the processing terminal regarding the analysis result, wherein the feedback information is used to indicate whether the analysis result is correct; Based on the feedback information, the analysis result is adjusted.
8. A system log analysis device, characterized in that: The device comprises: A request acquisition module is used to acquire log analysis requests sent when each target cockpit system in the cockpit system set fails; A request parsing module, used to parse the log analysis request to obtain a system log file corresponding to each of the target cockpit systems, wherein the system log file includes a system log text of each system module in the target cockpit system; A log analysis module, for invoking a corresponding analysis script to perform fault analysis on the system log file based on the system module to which the system log text belongs, so as to obtain a fault module in the system module; The result feedback module is used to generate an analysis result for the log analysis request based on the fault identification of the fault module and the corresponding log text, and forward the analysis result to the processing terminal corresponding to the fault module.
9. A vehicle, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the system log analysis method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction, and when the executable instruction is executed on the vehicle, the vehicle executes the system log analysis operation as described in any one of claims 1-7.