A method, apparatus, device, and storage medium for analyzing device logs.
By constructing a structured knowledge package and performing cross-validation and causal correlation analysis, the problems of poor reliability and accuracy in device log analysis were solved, and the root causes of hardware failures were accurately located and reliable results were obtained.
Patent Information
- Application Number
- CN202611611401.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-19
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies suffer from low reliability and poor root cause localization accuracy in device log analysis, especially when dealing with complex hardware systems, making it difficult to accurately identify the causal relationships between various types of error events.
By constructing a structured knowledge package, we can obtain device logs and global underlying state information. We can then use the execution flow in the structured knowledge package for parsing and cross-validation, and combine it with causal relationship analysis to determine the root cause of hardware failure.
It improves the reliability and traceability of device log analysis, ensures the accuracy and credibility of analysis results, and reduces the risk of illusions in artificial intelligence models.
Smart Images

Figure CN123114840A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer data processing technology, and in particular to a device log analysis method, apparatus, device, and storage medium. Background Technology
[0002] In the operation and maintenance of servers and complex computing equipment, the analysis of equipment operation logs is a crucial step in fault diagnosis and root cause localization. Equipment logs typically contain various types of records, including system event logs, power-on self-test codes, and information on replaceable units in the field, which contain rich hardware status information and clues to error events. As the complexity of hardware systems increases, the amount and dimensions of equipment log data increase significantly. Logs often contain multiple types of error events simultaneously, and different error events may have causal relationships or co-occurring relationships, which places higher demands on the accuracy and reliability of log analysis.
[0003] Currently, equipment log analysis mainly employs three types of solutions. The first is manual analysis, where engineers meticulously review log files and compare them against equipment specifications. This approach heavily relies on the engineer's personal experience, resulting in a lack of objectivity and traceability. The second is analysis based on fixed-rule scripts, which use keyword matching scripts to parse specific error fields. However, this approach only covers a limited set of predefined scenarios and cannot provide effective analysis for error types not included in the specifications or for complex error scenarios. The third approach utilizes general artificial intelligence models to directly read log text for question-and-answer analysis. While this offers some flexibility, the lack of understanding of the underlying logic by the general model can easily lead to results that contradict equipment specifications, resulting in unreliable conclusions. Summary of the Invention
[0004] The purpose of this application is to provide a device log analysis method, apparatus, device, and storage medium to solve the technical problems of low reliability of device log analysis results and poor root cause location accuracy in the prior art.
[0005] In a first aspect, this application provides a device log analysis method, the method comprising: acquiring a structured knowledge package, as well as device logs and global low-level state information of a target device, wherein the global low-level state information is used to indicate the hardware reset state of the target device, and the structured knowledge package is used to guide the analysis of the device logs; parsing the device logs based on the execution flow in the structured knowledge package to obtain preliminary analysis results; cross-validating the preliminary analysis results with the domain knowledge in the structured knowledge package to obtain target analysis results; and performing causal correlation analysis on the global low-level state information and the target analysis results to obtain the root cause of the hardware failure of the target device.
[0006] In one embodiment of this application, the construction process of the structured knowledge package includes: obtaining the device specification document and historical device logs of the target device; extracting error code description information and register bit field information from the device specification document to obtain domain knowledge; extracting the structural information of the device logs from the historical device logs to obtain analysis tool interface specification information; generating an execution flow according to preset log analysis specification information; encapsulating the domain knowledge into a knowledge layer, encapsulating the analysis tool interface specification information into a tool layer, and encapsulating the execution flow into a flow layer to obtain the structured knowledge package.
[0007] In one embodiment of this application, the preliminary analysis result is cross-validated with the domain knowledge to obtain the target analysis result, including: extracting error identifiers from the preliminary analysis result and reference identifiers from the domain knowledge, and comparing the error identifiers with the reference identifiers; when the error identifiers and reference identifiers match, the preliminary analysis result is used as the target analysis result; when the error identifiers and reference identifiers are partially inconsistent, a secondary parsing process is triggered to update the preliminary analysis result, and cross-validation is re-executed, wherein the secondary parsing process refers to re-parsing the log segment in the device log corresponding to the error identifier; when the error identifiers and reference identifiers do not match, the search range is expanded to perform fuzzy matching to update the preliminary analysis result, and cross-validation is re-executed.
[0008] In one embodiment of this application, causal correlation analysis is performed on the global low-level state information and the target analysis results to obtain the root cause of the hardware failure of the target device. This includes: extracting multi-dimensional local error events from the target analysis results. The multi-dimensional local error events include error type, occurrence time, impact range, and associated device components. The error types include first-type error events, second-type error events, and transient error events. The first-type error events represent abnormal device communication links, the second-type error events represent abnormal device storage media, and the transient error events represent occasional hardware malfunctions. Based on the global low-level state information, the reset mode of the target device is determined. The reset mode includes a first reset mode, a second reset mode, and a third reset mode. The first reset mode represents a reset triggered by power-on of the device, the second reset mode represents a reset triggered by hardware watchdog timeout, and the third reset mode represents a reset triggered by software watchdog timeout. The reset mode is then subjected to attribution analysis with the multi-dimensional local error events to obtain the root cause of the hardware failure of the target device.
[0009] In one embodiment of this application, attribution analysis is performed on the reset mode and the multidimensional local error events to obtain the root cause of the hardware failure of the target device, including: when the reset mode is a first reset mode and the multidimensional local error events include a first type of error event, the root cause of the hardware failure is determined to be a device power supply failure; when the reset mode is a second reset mode and the multidimensional local error events include a second type of error event, the root cause of the hardware failure is determined to be a device storage medium failure; when the reset mode is a third reset mode and the multidimensional local error events include transient error events, the root cause of the hardware failure is determined to be a hardware transient anomaly.
[0010] In one embodiment of this application, after obtaining the device log of the target device, the method further includes: performing structured parsing on the device log to obtain structured data format parameters of the device log; and extracting error event indexes from the structured data format parameters, wherein the error event indexes are used as input data for the analysis tool interface.
[0011] In one embodiment of this application, after obtaining the root cause of the hardware failure of the target device, the method further includes: determining a severity level based on the root cause of the hardware failure and the error type of the multidimensional local error event; determining a corresponding preset handling suggestion based on the severity level; and generating a structured analysis report based on the severity level and the corresponding preset handling suggestion.
[0012] Secondly, this application provides a device log analysis apparatus, comprising: a data acquisition module for acquiring a structured knowledge package, as well as device logs and global underlying state information of a target device, wherein the global underlying state information indicates the hardware reset state of the target device, and the structured knowledge package guides the analysis of the device logs; a scheduling and verification module for parsing the device logs based on the execution flow in the structured knowledge package to obtain preliminary analysis results; cross-validating the preliminary analysis results with the domain knowledge in the structured knowledge package to obtain target analysis results; and a correlation analysis module for performing causal correlation analysis on the global underlying state information and the target analysis results to obtain the root cause of the hardware failure of the target device.
[0013] Thirdly, this application provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the device log analysis method as described in any of the above embodiments.
[0014] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the device log analysis method as described in any of the above embodiments.
[0015] The beneficial effects of this application are as follows: This application obtains a structured knowledge package, as well as the device logs and global low-level state information of the target device. Based on the execution flow in the structured knowledge package, it parses the device logs to obtain preliminary analysis results. The preliminary analysis results are then cross-validated with the domain knowledge in the structured knowledge package to obtain the target analysis results. Finally, a causal correlation analysis is performed on the global low-level state information and the target analysis results to obtain the root cause of the hardware failure of the target device. This application solves the illusion problem caused by the lack of domain constraints in general intelligent analysis by constructing a multi-level structured knowledge package to drive the analysis process and implementing multi-level cross-validation, thus ensuring the reliability and traceability of the analysis results.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings: Figure 1 This is a flowchart illustrating a device log analysis method in an exemplary embodiment of this application; Figure 2 This is a schematic diagram of the execution system architecture of the device log analysis method shown in an exemplary embodiment of this application; Figure 3 This is a schematic diagram illustrating a structured knowledge package generation method as shown in an exemplary embodiment of this application; Figure 4 This is a schematic diagram illustrating a specific implementation process of the device log analysis method in an exemplary embodiment of this application; Figure 5 This is a schematic diagram of the structure of a device log analysis apparatus shown in an exemplary embodiment of this application; Figure 6 This is a schematic diagram of the structure of a computer system for an electronic device, as illustrated in an exemplary embodiment of this application. Detailed Implementation
[0018] The embodiments of this application will be described below with reference to the accompanying drawings and specific examples. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be understood that the preferred embodiments are only for illustrating this application and are not intended to limit the scope of protection of this application.
[0019] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The illustrations only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the shape, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0020] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the present application. However, it will be apparent to those skilled in the art that embodiments of the present application may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the present application.
[0021] The term "and / or" used in this application describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0022] The technical solution of this application can be further discussed and analyzed in multiple steps. For specific steps, please refer to [link / reference needed]. Figure 1 , Figure 1 This is a flowchart illustrating a device log analysis method as shown in an exemplary embodiment of this application. (Refer to...) Figure 1 The flowchart of this device log analysis method includes at least steps S110 to S140, which are described in detail below: In step S110, a structured knowledge package, as well as the device logs and global underlying state information of the target device, are obtained.
[0023] In one embodiment of this application, global low-level state information is used to indicate the hardware reset status of the target device, and a structured knowledge package is used to guide the analysis of device logs. The target device can be a complex computing device such as a server, storage array, or network switch, and the device logs specifically refer to the one-click log package generated by the Baseboard Management Controller (BMC). The acquisition of the structured knowledge package and the acquisition of the device logs can be parallel or sequential in timing. For example, the structured knowledge package can be stored locally or in the cloud as a pre-built resource and pre-loaded into memory when the analysis task starts; while the device logs and global low-level state information are collected in real time when an analysis request is triggered. By decoupling knowledge dependencies from application data, the same analysis engine can adapt to target devices of different models or manufacturers by switching different structured knowledge packages without modifying the core code. The aforementioned global low-level state information typically originates from specific registers at the device's low level, such as the S5 reset status register, which reflects the device's reset behavior before and after a failure.
[0024] In one embodiment of this application, the process of constructing a structured knowledge package includes: obtaining the device specification document and historical device logs of the target device; extracting error code description information and register bit field information from the device specification document to obtain domain knowledge; extracting the structural information of the device logs from the historical device logs to obtain analysis tool interface specification information; generating an execution flow based on preset log analysis specification information; encapsulating the domain knowledge into a knowledge layer, encapsulating the analysis tool interface specification information into a tool layer, and encapsulating the execution flow into a flow layer to obtain a structured knowledge package.
[0025] like Figure 2 As shown, Figure 2 This is a schematic diagram of the execution system architecture of a device log analysis method illustrated in an exemplary embodiment of this application. For example... Figure 2As shown, the top of this system architecture features three input sources: platform specification documents, a one-click log structure, and an analysis methodology. The platform specification documents include the PPR (Processor Programming Reference) and BIOS (Basic Input / Output System) specification documents; the one-click log structure includes the SEL (System Event Log), 80port (Power-On Self-Test code), FRU (Field Replaceable Unit), PCIe (Peripheral Component Interconnect Express) asset mapping table, and maintenance logs; the analysis methodology is defined by engineer experience. The data streams from the three input sources all point to the Skill structured knowledge package generation module below. The output of this module connects to a three-layer Skill knowledge package, stored in Markdown format, containing three parallel sub-modules: a knowledge layer (covering specification document clauses, error code tables, and register bit field definitions), a tool layer (covering MCP (Model Context Protocol) tool interface definitions), and a process layer (covering parsing, classification, location, and report generation processes). Subsequently, the independent BMC one-click log (Baseboard Management Controller) and the output of the three-layer Skill knowledge package converge into the AIAgent analysis and scheduling module. This scheduling module connects to the MCA (Machine Check Architecture) analysis tool for handling CPU (Central Processing Unit) and memory errors, the PCIe analysis tool for handling link slowdowns and AER (Advanced Error Reporting), the Postcode analysis tool for locating Power-On Self-Test (POST) deadlock issues, and a dump comprehensive analysis tool. The outputs of the four tools converge on the cross-validation module, which performs a three-level comparison (verified, mismatched, not matched) with the processor programming reference manual specification document. Subsequently, the data stream continues down to the S5_RESET_STATUS (S5 reset status register) multidimensional error correlation analysis module, used to identify the causal relationship between the reset cause and the multidimensional error. Finally, a structured analysis report is output, containing error location, root cause analysis, and remedial recommendations.
[0026] As can be seen, this embodiment uses a hybrid approach with a Skill generator to construct the aforementioned three-layer structured knowledge package. This generation process integrates automated extraction with expert-defined processes. When constructing the knowledge layer, the device specification documents of the target device are first obtained, such as processor programming reference manuals or basic input / output system specification documents. Document parsing tools are used to automatically parse these unstructured or semi-structured documents, particularly for handling the splicing of tables across pages. This accurately extracts key information such as error code definitions, register bit field meanings, threshold specifications, and platform configuration information, transforming them into machine-readable domain knowledge. The threshold specifications include the normal range boundaries of various sensor readings and alarm triggering conditions, while the platform configuration information includes the hardware topology and component identification mappings of the target device. The automated extraction method in this embodiment avoids errors from manual input and ensures real-time synchronization of knowledge content with official specification documents.
[0027] In this embodiment, when constructing the tool layer, the interface specification information of the analysis tools is determined by analyzing the structural information of historical device logs. Specifically, the structure of files such as System Event Logs (SEL), port 80 power-on self-test codes, and Field Replaceable Unit (FRU) information in the historical logs is parsed to identify the field definitions, data offsets, and encoding rules of various log files. Based on these parsing results, the interface definitions of the Model Context Protocol (MCP) tools are automatically generated or verified, including the parameter definitions of each tool, such as the data type, required fields, and value range of input parameters, as well as the return value format and calling constraints. This implementation process achieves adaptive matching between analysis capabilities and log formats without relying on fixed tool binding configurations. Port 80 is used for unencrypted transmission of the HTTP protocol.
[0028] In this embodiment, when constructing the process layer, an execution flow is generated based on preset log analysis specifications. This flow typically combines engineers' experience templates and analysis methodologies, defining a complete workflow from log ingestion, error classification, tool scheduling, cross-validation to report generation. By explicitly transforming expert experience into standardized process descriptions, the analysis logic no longer relies on the memory of specific personnel or difficult-to-maintain script code. Finally, this embodiment encapsulates the content of the above three layers into a structured knowledge package in Markdown format.
[0029] Although this embodiment uses Markdown format as an example, other structured description languages such as XML, JSON, or YAML can also be used in other implementations, as long as they can achieve logical separation and standardized expression of knowledge, tools, and processes.
[0030] In view of the specific applications of the above embodiments, this application also provides an application example in a real-world scenario. Please refer to [link / reference]. Figure 3 , Figure 3 This is a schematic diagram illustrating a structured knowledge package generation method as shown in an exemplary embodiment of this application. For example... Figure 3 As shown, the Skill generator operates in a hybrid mode, connecting three input processing modules in parallel. The left side is the specification document automatic extraction module, which uses document parsing tools, such as open-source PDF parsing libraries like pdfplumber, to parse processor programming reference manual PDF (Portable Document Format) documents, performing cross-page table concatenation algorithms to extract error code tables, register bit fields, and threshold specifications. The middle side is the log structure parsing module, responsible for extracting the event format definitions, 80 port power-on self-test code table, field-replaceable unit field mappings, and PCIe mapping parsing rules from the system event logs. The right side is the methodology manual definition module, containing engineer experience templates, analysis workflow orchestration, tool call order, and severity grading rules. The outputs of the three modules all point to a three-layer Skill knowledge package (Markdown format). The knowledge layer includes references to specification documents, error code tables, register bit field tables, log field definitions, threshold specifications, and platform configuration information. The tool layer includes the MCA analysis tool interface, the PCIe advanced error reporting analysis tool, the power-on self-test code analysis tool, the dump comprehensive analysis tool, and their parameter definitions and return value formats. The process layer includes the log parsing process, error classification process, error location process, cross-validation process, correlation analysis process, and report generation process. Finally, the output interface provides the generated knowledge package to the AI agent for on-demand access.
[0031] This three-layer decoupling implementation allows for adaptation to new target devices by simply rerunning the Skill generator to update the structured knowledge package, without modifying the agent's core scheduling code or redeveloping analysis tools. This not only shortens the adaptation cycle to new platforms but also ensures that diagnostic knowledge can be reused and consolidated across different projects in a standardized manner.
[0032] In step S120, the device logs are parsed based on the execution flow in the structured knowledge package to obtain preliminary analysis results.
[0033] In the embodiments of this application, the aforementioned analysis workflow is executed by an AI agent, which is an intelligent program module capable of autonomously understanding task instructions and invoking external tools to complete the analysis process. In this embodiment, the process layer in the structured knowledge package defines a standardized analysis process, and the agent automatically schedules the corresponding analysis tool interfaces in the tool layer according to this execution process. During the scheduling process, the AI agent adopts a batch invocation mechanism, that is, based on the multiple error types contained in the device logs, it simultaneously initiates invocation requests to multiple corresponding analysis tools, shortening the overall analysis time. Since the analysis behavior is controlled by a structured process that encapsulates expert experience, the standardization of the analysis process can be guaranteed.
[0034] In one embodiment of this application, after obtaining the device log of the target device, the method further includes: performing structured parsing on the device log to obtain structured data format parameters of the device log; and extracting error event indexes from the structured data format parameters, wherein the error event indexes are used as input data for the analysis tool interface.
[0035] In this embodiment, the device logs include various types of log files such as System Event Log (SEL), 80 port power-on self-test code (POSTCode), Field Replaceable Unit (FRU) information, High-Speed Serial Computer Extended Bus Asset Map (PCIeassetmap), and maintenance log. When automatically identifying the various types of log files contained in the device logs, corresponding parsing rules are loaded for each type for structured parsing. Specifically, for the System Event Log, each event record is parsed according to its event format definition and converted into key-value pairs of structured data format parameters. For the 80 port power-on self-test code, the original code sequence is structured according to the code table definition to generate structured data format parameters containing code values and their corresponding time points. For Field Replaceable Unit information, component identification fields related to fault diagnosis are extracted according to field mapping rules and converted into structured asset association records. Through the above parsing process, each type of log file is uniformly converted into structured data format parameters in JavaScript Object Notation (JSON) or comma-separated value (CSV) format.
[0036] In this embodiment, after completing the structured parsing described above, an error event index is further extracted from the structured data format parameters. This error event index refers to a combination of key parameters that can identify abnormal records and be used to locate the corresponding log segments. The extraction process is based on predefined error filtering rules, which define what data features constitute error events of interest. Specifically, for system event logs, the error filtering rules can be set to filter records whose event severity reaches a preset threshold, extracting their event identifier and timestamp as the error event index. For the 80 port power-on self-test code, the error filtering rules can be set to filter code values that match a predefined error code table, extracting the code value and its occurrence time as the error event index. These error event indexes serve as input data for subsequent analysis tool interfaces, enabling the analysis process to directly locate the log segments to be analyzed, providing standardized data input for subsequent precise analysis based on structured knowledge packages.
[0037] In step S130, the preliminary analysis results are cross-validated with the domain knowledge in the structured knowledge package to obtain the target analysis results.
[0038] In one embodiment of this application, the domain knowledge includes authoritative processor programming reference (PPR) specification documents, error code definition tables, and register bit field interpretations. Key identifiers in the preliminary analysis results are compared and verified with standard reference identifiers in the domain knowledge. Only results verified to conform to the specification definitions are adopted as target analysis results. This ensures that each analysis conclusion has clear evidence and is traceable to authoritative documents, improving the credibility of the analysis results.
[0039] In one embodiment of this application, the preliminary analysis results are cross-validated with domain knowledge to obtain the target analysis results. This includes: extracting error identifiers from the preliminary analysis results and reference identifiers from the domain knowledge, and comparing the error identifiers with the reference identifiers; when the error identifiers and reference identifiers match, the preliminary analysis results are used as the target analysis results; when the error identifiers and reference identifiers are partially inconsistent, a secondary parsing process is triggered to update the preliminary analysis results, and cross-validation is re-executed. The secondary parsing process refers to re-parseing the log segments in the device logs corresponding to the error identifiers; when the error identifiers and reference identifiers do not match, the search scope is expanded to perform fuzzy matching to update the preliminary analysis results, and cross-validation is re-executed.
[0040] In this embodiment, error identifiers refer to key feature information output by the analysis tool after processing the device logs, including but not limited to error codes, register bit field values, and their combined states; reference identifiers refer to standard definition data extracted from the knowledge layer of the structured knowledge package, derived from device specification documents such as the Processor Programming Reference (PPR), including official error code tables, bit field meaning explanations, and threshold specifications.
[0041] In this embodiment, when the error identifier matches the reference identifier, it indicates that the result output by the analysis tool conforms to the definition in the device specification document. For example, the machine check architecture error code and the status values of each bit field parsed by the tool can all find a unique corresponding entry in the error code table of the processor programming reference manual, and the semantic interpretation of the bit fields is conflict-free. At this time, the preliminary analysis result is directly confirmed as the target analysis result and can be marked as verified. This ensures that fault information conforming to the standard definition can be adopted quickly and accurately, and also ensures that the final output analysis result follows the hardware specification document and is not tampered with.
[0042] In this embodiment, when the error identifier and the reference identifier are partially inconsistent, it means that although the corresponding error code entry was found in the specification document, the specific bit field state, parameter value, or associated information conflicts with the document definition. This situation may stem from defects in the analysis tool's own parsing algorithm, a mismatch between the tool version and the current device firmware version, or corruption of the log data itself. To address this, this embodiment triggers a secondary parsing process to update the preliminary analysis results. This secondary parsing process specifically targets the original log segment in the device log corresponding to the error identifier. By calling a backup parser to reinterpret this original log segment, new preliminary analysis results are generated and cross-validated again. By tracing back to the data source for error correction, it is possible to distinguish between genuine hardware anomalies and tool parsing errors, preventing false reporting of normal hardware states due to limitations of the analysis tool itself.
[0043] In this embodiment, when an error identifier does not match a reference identifier, it means that a standard definition completely corresponding to the error identifier cannot be found in the current domain knowledge base. This typically occurs when the device uses a non-public error code, firmware version updates cause specification documents to not be synchronized, or in complex error scenarios. In this case, the exact matching mode is downgraded to the fuzzy matching mode. Regular expressions are used to match the high-order features of the error code, similar error codes are found based on the edit distance algorithm, or keyword searches are performed in a wider range of document sections. If the fuzzy match is successful, the preliminary analysis results are updated using the matched approximate reference information, and cross-validation is re-executed to confirm its reliability. If a match still cannot be found, the error identifier is recorded and the original data is retained for subsequent manual review, reducing the risk of the entire analysis process being interrupted or key fault clues being missed due to incomplete knowledge base coverage.
[0044] This embodiment transforms the intelligent analysis process into a verifiable standardized workflow through the hierarchical processing of the three verification states described above. Each decision branch has clear triggering conditions and execution paths, which not only suppresses the illusion risk of artificial intelligence models, but also meets the requirements of high reliability operation and maintenance scenarios for fault diagnosis accuracy and traceability.
[0045] In step S140, a causal correlation analysis is performed on the global low-level state information and the target analysis results to obtain the root cause of the hardware failure of the target device.
[0046] In one embodiment of this application, the aforementioned global low-level state information is combined with the obtained target analysis results for comprehensive judgment, establishing a causal mapping relationship between the global state and local errors. This enables the differentiation between the authenticity and primary / secondary nature of faults, achieving accurate root cause localization of hardware faults and avoiding misjudgment and omission.
[0047] In one embodiment of this application, a causal correlation analysis is performed on the global low-level state information and the target analysis results to obtain the root cause of the hardware failure of the target device. This includes: extracting multi-dimensional local error events from the target analysis results. The multi-dimensional local error events include error type, occurrence time, scope of impact, and associated device components. The error types include first-type error events, second-type error events, and transient error events. The first-type error events represent abnormal device communication links, the second-type error events represent abnormal device storage media, and the transient error events represent occasional hardware malfunctions. Based on the global low-level state information, the reset mode of the target device is determined. The reset mode includes a first reset mode, a second reset mode, and a third reset mode. The first reset mode represents a reset triggered by the device power-on, the second reset mode represents a reset triggered by a hardware watchdog timeout, and the third reset mode represents a reset triggered by a software watchdog timeout. The reset mode is then subjected to attribution analysis with the multi-dimensional local error events to obtain the root cause of the hardware failure of the target device.
[0048] This embodiment establishes a causal mapping relationship between system-level states and local component-level errors. When extracting multidimensional local error events from the target analysis results, it not only focuses on the identifier of the error itself, but also simultaneously extracts the timestamp of the error occurrence, the range of affected hardware, and the specific associated device component information, thereby constructing multidimensional error feature information containing spatiotemporal dimensions.
[0049] In some feasible environments, the first type of error event corresponds to scenarios such as training failure of the Peripheral Component Interconnect Express (PCIe) link, fatal errors in Advanced Error Reporting (AER), or loss of network interface card link, indicating damage to the integrity of the data transmission path; the second type of error event corresponds to scenarios such as correctable and uncorrectable errors in Dual-Inline Memory Modules (DIMMs), read / write timeouts in Solid State Drives (SSDs), or bad blocks in flash memory chips, indicating functional failure of persistent or temporary storage media; transient error events manifest as transient parity flips in the cache of the Central Processing Unit (CPU) Machine Check Architecture (MCA) or transient spikes in sensor readings, which are usually not reproducible and do not cause permanent hardware damage. The above classification of error types is only an illustrative example. In practical applications, multidimensional local error events can also include other abnormal events such as heat dissipation anomalies and power supply voltage deviations, as long as they can be structured and parsed and used for subsequent correlation analysis.
[0050] In this embodiment, the reset mode of the target device can be determined by reading the reset reason register or related flag bits recorded in the global underlying state information. The first reset mode is the AC power failure followed by power-on or a complete power-down and restart of the power supply unit (PSU). In this mode, all hardware components undergo a complete power-down and power-on process, and the initial state is reset. The second reset mode is a reset forcibly triggered by an independent hardware watchdog timer after detecting a system deadlock or bus hang, corresponding to an unrecoverable stagnation state in the underlying hardware logic or firmware. The third reset mode is a watchdog reset actively triggered by the operating system or Baseboard Management Controller (BMC) software, used to deal with software-level infinite loops, driver conflicts, or resource exhaustion, in which case the underlying hardware logic may still be in normal working order. By combining the reset mode with the aforementioned multidimensional local error events, the root cause of the system reset and the accompanying phenomena during the reset process can be accurately distinguished.
[0051] In one embodiment of this application, attribution analysis is performed on the reset mode and multidimensional local error events to obtain the root cause of the hardware failure. Specifically, this includes: when the reset mode is a first reset mode and the multidimensional local error events include a first type of error event, the root cause of the hardware failure is determined to be a device power supply failure; when the reset mode is a second reset mode and the multidimensional local error events include a second type of error event, the root cause of the hardware failure is determined to be a device storage medium failure; when the reset mode is a third reset mode and the multidimensional local error events include transient error events, the root cause of the hardware failure is determined to be a hardware transient anomaly.
[0052] In this embodiment, for the first combination, after the device experiences the first reset mode due to power-on, it reports a communication link abnormality as a first type of error event. This is because excessive voltage ripple and timing discrepancies during power-on cause the link chip to fail to complete initialization correctly. Therefore, the root cause is determined to be a device power supply failure, avoiding ineffective repairs. For the second combination, when the device experiences a second reset mode due to a hardware watchdog timeout, and the log contains a second type of error event indicating a storage medium abnormality, it indicates that the storage medium's response delay or bus occupancy is blocking the heartbeat detection circuit, causing the hardware watchdog to malfunction. In this case, the storage medium failure is the direct root cause of the downtime. For the third combination, when the device only experiences a third reset mode with a software watchdog reset, and the accompanying error is only a transient error event, it indicates that there is no substantial damage to the underlying hardware. It may originate from electromagnetic interference or occasional abnormalities under logical boundary conditions. Attributing it to a hardware transient abnormality can guide maintenance personnel to take lightweight measures such as clearing logs or upgrading firmware.
[0053] Among them, the above three attribution combination rules are one possible implementation method of this application, with the aim of more comprehensively covering high-incidence misjudgment scenarios. In other embodiments, attribution analysis can also use decision trees or weighted scoring models for attribution decision-making, but regardless of the specific algorithm used, the core idea is to use global low-level state information to perform contextual causal verification of local error events.
[0054] In one embodiment of this application, after obtaining the root cause of the hardware failure of the target device, the method further includes: determining the severity level based on the root cause of the hardware failure and the error type of the multidimensional local error event; determining the corresponding preset handling suggestions based on the severity level; and generating a structured analysis report based on the severity level and the corresponding preset handling suggestions.
[0055] In this embodiment, the severity level is determined by comprehensively considering the root causes of hardware failures identified in the preceding embodiments and the error types of multidimensional local error events. For example, when the root cause of a hardware failure is determined to be a device storage media failure, and the multidimensional local error events include a second type of error event, the severity level of this failure can be determined as Critical because such failures typically lead to service interruption or data loss risks. When the root cause of a hardware failure is an abnormal device communication link, and the error type is a link slowdown or a non-fatal Advanced Error Reporting (AER) error in the first type of error event, the severity level can be determined as Warning, indicating that the device has an abnormal operating state but has not yet completely failed. When the root cause of a hardware failure is a transient hardware anomaly, and the error type is a transient error event, the severity level is determined as Info, used to alert maintenance personnel but not requiring immediate intervention. The above grading standards are merely illustrative examples. In actual deployment, the grading thresholds and mapping rules can be customized based on the business importance level of the target device, historical failure statistics, or specific maintenance strategies.
[0056] In this embodiment, after determining the severity level, corresponding preset handling suggestions are automatically matched based on the level. These preset handling suggestions can be pre-stored in the process layer of a structured knowledge package or associated with an independent operations and maintenance knowledge base. Different severity levels correspond to handling actions of different urgency. For example, for severe faults, preset handling suggestions include, but are not limited to, "immediately isolate the faulty node," "replace the field replaceable unit (FRU)," or "trigger an emergency backup process"; for warning-level faults, suggestions include, but are not limited to, "schedule link retraining during the next maintenance window" or "update firmware to the recommended patch"; for information-level faults, handling suggestions include, but are not limited to, "clear the log counter and continue monitoring" or "ignore this transient alarm." Through the graded matching mechanism, technical diagnostic conclusions can be transformed into executable standardized operations and maintenance instructions, reducing the reliance of operations and maintenance personnel on expert experience.
[0057] In this embodiment, the structured analysis report not only includes the final conclusions but also fully records the derivation process. Specific elements include, but are not limited to: error event details, root cause analysis, severity classification results and their judgment criteria, and recommended preset handling suggestions. The error event details include original log fragments, timestamps, and parsed field values. The root cause analysis is used to demonstrate the correlation logic between the global underlying state and local errors. In one possible implementation, the structured analysis report can be generated using machine-readable formats such as JavaScript Object Notation (JSON) or Extensible Markup Language (XML), facilitating automatic parsing and triggering of work order flow by the upper-level operation and maintenance management platform. It can also be rendered in readable formats such as Hypertext Markup Language (HTML) or Portable Document Format (PDF) for direct viewing and archiving. This structured output method ensures the traceability and transparency of the analysis results, making every fault diagnosis traceable. Furthermore, by compressing the analysis process to a shorter time and outputting standardized reports, it improves fault response efficiency and operation and maintenance quality in large-scale data center environments.
[0058] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating a specific implementation flow of a device log analysis method according to an exemplary embodiment of this application. For example... Figure 4As shown, the specific process is divided into three main stages. Stage 1 is log ingestion and parsing. The process begins by receiving the one-click log packet from the baseboard management controller, and then automatically identifies the log type, which includes system event logs, 80 port power-on self-test codes, field replaceable unit information, and PCIe mapping tables. Next, structured parsing is performed, converting it into JSON (JavaScript Object Notation) or CSV (Comma-Separated Values) format. Finally, the data is transferred to the next stage by extracting the error event index. Stage 2 is Skill invocation and analysis. In this stage, the AI intelligent agent intelligent scheduling module is responsible for reading the three-layer Skill knowledge packet; the signal is transmitted downwards, and then the MCP tool is dispatched according to the error type. This tool uses a batch invocation mechanism. The process then branches into four parallel analysis tools: MCA analysis, PCIe analysis, power-on self-test code analysis, and dump comprehensive analysis; finally, the analysis results of each tool are summarized, and the error location conclusion is output. Phase 3 involves cross-validation and reporting. This phase begins with cross-validation with the processor programming reference manual specifications, performing a three-level judgment (validated, mismatched, unmatched). The validation results are then passed down to the S5 reset status register for correlation analysis, followed by reset pattern recognition, which can distinguish between memory training failure, cold start, and hot reset patterns. Subsequently, root cause localization and severity grading are performed, categorized into Critical, Warning, and Info levels, finally generating a structured report. The structured analysis report includes error event details, root cause analysis, severity grading, and remediation recommendations. After experiments using various comparative methods, some performance optimization indicators of this application's actual implementation were quantified. Records from the actual implementation process show that the analysis time for this application is 3 to 5 minutes, while manual analysis takes 2 to 4 hours. Furthermore, the accuracy rate of this application's solution is greater than 95%, while manual analysis relies heavily on experience and is subject to excessive subjective factors.
[0059] On the other hand, combining Figure 4To illustrate the specific implementation and technical effects of the technical solution in practical applications, the following description uses a server equipment baseboard management controller log analysis scenario as an example. In this application scenario, the target device is a data center server, and the device log is specifically a one-key dump log generated by the baseboard management controller. This log package typically contains various heterogeneous files such as system event logs (SEL), port 80 power-on self-test codes (POSTCode), field replaceable unit (FRU) information, peripheral component interconnect express (PCIe) asset mapping tables, and maintenance logs. The structured knowledge package of skills built for this scenario includes customized domain knowledge and tool interfaces.
[0060] In this specific embodiment, regarding the knowledge layer, key domain knowledge such as the Machine Check Architecture (MCA) error code definition table, the meaning of the bit fields in PCIe Advanced Error Reporting (AER), and the interpretation of the bit fields in the S5 Reset Status Register (S5_RESET_STATUS) are extracted by analyzing the Processor Programming Reference (PPR) and Basic Input Output System (BIOS) specifications.
[0061] In this specific embodiment, at the tool layer, dedicated analysis tool interfaces conforming to the Model Context Protocol (MCP) specification are encapsulated, including but not limited to the MCA analysis tool (analyze_mca_errors_tool) for parsing CPU and memory errors, the PCIe analysis tool (analyze_pcie_errors_tool) for analyzing link deceleration and AER errors, the power-on self-test code analysis tool (analyze_postcodes_tool) for locating power-on self-test deadlock problems, and the dump comprehensive analysis tool (analyze_server_dump_tool) for comprehensive log analysis.
[0062] In this specific embodiment, at the process layer, a standardized workflow is defined, which includes identifying file types such as system event logs and 80 port power-on self-test codes, assigning tools according to error types, performing cross-validation, and generating reports.
[0063] In this specific embodiment, during the execution of the causal correlation analysis, when the third bit (Bit3, the third bit field) of the S5 reset status register is read as 1, indicating a memory training failure reset, and the MCA error code extracted from the target analysis result is 0x0100, the root cause of the hardware fault is determined to be a Dual-Inline Memory Module (DIMM) failure. When the zeroth bit (Bit0, the zeroth bit field) of the S5 reset status register is 1, indicating a cold start reset, and a PCIe AER speed-down event exists in the log, the root cause is determined to be a PCIe link initialization failure, pointing to poor physical slot contact or signal integrity issues. When the fifth bit (Bit5, the fifth bit field) of the S5 reset status register is 1, indicating a hot reset, accompanied by a transient error event with the MCA overflow flag set to 1, the possibility of a power supply failure is ruled out, and the fault is determined to be a hardware transient anomaly, avoiding unnecessary hardware replacement operations. The aforementioned three-layer structured knowledge package design allows the analysis engine to adapt to different server platforms without modifying its core code; deployment can be completed simply by regenerating the corresponding skill-structured knowledge package. In this scenario, the "memory training failure reset" recorded in the S5 reset status register corresponds to a specific variant of the first reset mode in the aforementioned embodiments, namely, a reset state triggered by device power-on or memory subsystem initialization failure; "cold start reset" corresponds to the specific manifestation of the second reset mode in the aforementioned embodiments, triggered by hardware watchdog timeout or forced triggering by underlying hardware logic; and "hot reset" corresponds to the specific manifestation of the third reset mode in the aforementioned embodiments, triggered actively by software watchdog or operating system. This mapping is not unique and can be adjusted according to the register definitions of the specific hardware platform in practical applications, as long as the core logic of causal correlation analysis between global underlying state information and local error events is satisfied.
[0064] In this specific embodiment, the baseboard management controller log analysis method based on the above-mentioned structured knowledge package, due to the introduction of a three-level cross-validation mechanism and global state correlation analysis, achieves an accuracy rate of over 95%, which is higher than manual analysis relying on personal experience or simple rule script matching. This verifies the effectiveness of the technical solution of this application in solving the problem of complex device log analysis.
[0065] This application provides a device log analysis method that acquires a structured knowledge package, along with the device logs and global underlying state information of the target device. Based on the execution flow, the device logs are parsed to obtain preliminary analysis results. These preliminary results are then cross-validated with domain knowledge to obtain the target analysis results. Finally, a causal correlation analysis is performed between the global underlying state information and the target analysis results to determine the root cause of the target hardware failure. This application addresses the illusion problem caused by the lack of domain constraints in general intelligent analysis by constructing a multi-level structured knowledge package and implementing multi-level cross-validation, ensuring the reliability of device log analysis and improving the accuracy and traceability of root cause localization. Furthermore, causal correlation analysis between the global underlying reset state and multi-dimensional local error events improves the accuracy of root cause localization for complex hardware failures. Moreover, the three-layer structured knowledge package design decouples diagnostic knowledge from the analysis engine, allowing for platform adaptation with only knowledge package updates without modifying core code, thus shortening the deployment cycle.
[0066] The following describes an embodiment of the apparatus described in this application, which can be used to execute the device log analysis method described in the above embodiments of this application. For details not disclosed in the device embodiments of this application, please refer to the embodiments of the device log analysis method described in the above applications.
[0067] Figure 5 This is a schematic diagram illustrating the structure of a device log analysis apparatus according to an exemplary embodiment of this application. The apparatus can be applied to... Figure 1 The method implementation process is shown and specifically configured in a device with the necessary execution conditions. This embodiment does not impose specific restrictions on the devices to which the execution system is applicable.
[0068] like Figure 5 As shown, the device log analysis apparatus provided in this application embodiment includes a data acquisition module 501, a scheduling and verification module 502, and a correlation analysis module 503.
[0069] The data acquisition module 501 is used to acquire a structured knowledge package, as well as the device logs and global underlying state information of the target device. The global underlying state information is used to indicate the hardware reset status of the target device, and the structured knowledge package is used to guide the analysis of the device logs. The scheduling and verification module 502 is used to parse the device logs based on the execution flow in the structured knowledge package to obtain preliminary analysis results. The preliminary analysis results are then cross-validated with the domain knowledge in the structured knowledge package to obtain the target analysis results. The correlation analysis module 503 is used to perform causal correlation analysis on the global underlying state information and the target analysis results to obtain the root cause of the hardware failure of the target device.
[0070] In the device embodiment of this application, the data acquisition module is the data entry point for the analysis process. In actual deployment, log packets can be obtained by calling the out-of-band management interface of the Baseboard Management Controller (BMC) or reading locally stored dump files, and global low-level state information can be extracted by accessing registers. This module is also responsible for performing structured parsing of the raw logs, converting them into a standardized data format, and extracting error event indexes to provide standardized input data for subsequent modules. Although this embodiment uses a server device as an example, in other embodiments, the data acquisition module can also be adapted to other types of target devices such as storage arrays and network devices, as long as it can obtain the corresponding operating logs and low-level state information.
[0071] In the device embodiments of this application, the scheduling and verification module integrates an AI intelligent agent engine, which can dynamically load and parse structured knowledge packages. During execution, based on the definition of the process layer in the knowledge package, the corresponding model context protocol analysis tool in the scheduling tool layer is automatically used to process log fragments and generate preliminary analysis results. Subsequently, the results are subjected to three-level cross-validation using the specification document clauses, error code tables, and register bit field definitions in the knowledge layer, namely, the determination and feedback of three states: matching, partial inconsistency, and no matching. This ensures that when the target device platform changes, only the structured knowledge package needs to be updated without modifying the code of the scheduling and verification module, improving the maintainability and cross-platform adaptability of the system.
[0072] In the device embodiments of this application, the correlation analysis module is responsible for receiving global low-level state information from the data acquisition module and target analysis results from the scheduling and verification module, and making a comprehensive judgment based on preset attribution rules. This avoids the misjudgment problem caused by isolated analysis of a single error event and ensures that the final output of the root cause of the fault has system-level context support.
[0073] The division between the above modules is only a logical functional distinction. In actual product implementation, they can be integrated into the same software process, container or microservice, or they can be distributed and deployed on different computing nodes according to performance requirements.
[0074] Embodiments of this application also provide a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the device log analysis method provided in the above embodiments.
[0075] Figure 6 This is a schematic diagram illustrating the structure of a computer system for an electronic device, as shown in an exemplary embodiment of this application. It should be noted that... Figure 6The computer system 600 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0076] like Figure 6 As shown, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on a program stored in Read-Only Memory (ROM) 602 or a program loaded from storage into Random Access Memory (RAM) 603. The RAM 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus. An I / O interface 605 is also connected to the bus 604, where the I / O interface 605 refers to an input / output interface.
[0077] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section performs communication processing via a network such as the Internet. A drive is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0078] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs various functions defined in the system of this application.
[0079] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0080] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0081] In the corresponding figures of the above embodiments, connecting lines can represent the connection relationship between various components, indicating more constitutive signal paths and / or one or more ends of some lines having arrows to indicate the main information flow direction. Connecting lines are an identifier and are not a limitation on the scheme itself, but rather, when combined with one or more exemplary embodiments, the use of these lines helps to more easily understand the circuit or logic unit. Any signal represented (determined by design requirements or preferences) can actually include one or more signals that can be transmitted in any direction and can be implemented in any suitable type of signal scheme.
[0082] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0083] Another aspect of this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0084] Embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the device log analysis method as described in any of the above embodiments.
[0085] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0086] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or external hard drive) or on a network, and includes several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.
[0087] This application can be used in a wide range of general-purpose or special-purpose computing system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices.
[0088] Other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0089] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A method for analyzing device logs, characterized in that, The method includes: Obtain a structured knowledge package, as well as the device logs and global underlying state information of the target device. The global underlying state information is used to indicate the hardware reset state of the target device, and the structured knowledge package is used to guide the analysis of the device logs. Based on the execution flow in the structured knowledge package, the device logs are parsed to obtain preliminary analysis results; The preliminary analysis results are cross-validated with the domain knowledge in the structured knowledge package to obtain the target analysis results; A causal correlation analysis is performed on the global underlying state information and the target analysis results to obtain the root cause of the hardware failure of the target device.
2. The equipment log analysis method according to claim 1, characterized in that, The construction process of the structured knowledge package includes: Obtain the target device's equipment specification document and historical equipment logs; Extract error code descriptions and register bit field information from the device specification document to obtain domain knowledge; Extract the structural information of the device logs from the historical device logs to obtain the interface specification information of the analysis tool; The execution flow is generated based on the preset log analysis specifications. The domain knowledge is encapsulated into a knowledge layer, the analysis tool interface specification information is encapsulated into a tool layer, and the execution process is encapsulated into a process layer to obtain the structured knowledge package.
3. The equipment log analysis method according to claim 1, characterized in that, The preliminary analysis results are cross-validated with the domain knowledge to obtain the target analysis results, including: Extract error identifiers from the preliminary analysis results and reference identifiers from the domain knowledge, and compare the error identifiers with the reference identifiers; When the error identifier matches the reference identifier, the preliminary analysis result is taken as the target analysis result; When the error identifier is partially inconsistent with the reference identifier, a secondary parsing process is triggered to update the preliminary analysis results and re-execute cross-validation. The secondary parsing process refers to re-parsing the log segment in the device log corresponding to the error identifier. When the error identifier does not match the reference identifier, the search scope is expanded to perform fuzzy matching to update the preliminary analysis results, and cross-validation is re-executed.
4. The equipment log analysis method according to claim 1, characterized in that, A causal correlation analysis is performed on the global low-level state information and the target analysis results to obtain the root cause of the hardware failure of the target device, including: Multidimensional local error events are extracted from the target analysis results. The multidimensional local error events include error type, occurrence time, scope of impact, and associated device components. The error types include first type error events, second type error events, and transient error events. The first type error events represent abnormal device communication links, the second type error events represent abnormal device storage media, and the transient error events represent occasional hardware malfunctions. The reset mode of the target device is determined based on the global underlying state information. The reset mode includes a first reset mode, a second reset mode, and a third reset mode. The first reset mode represents a reset triggered by the device power being restored. The second reset mode represents a reset triggered by a hardware watchdog timeout. The third reset mode represents a reset triggered by a software watchdog timeout. By performing attribution analysis on the reset mode and the multidimensional local error events, the root cause of the hardware failure of the target device can be obtained.
5. The equipment log analysis method according to claim 4, characterized in that, By performing attribution analysis on the reset mode and the multidimensional local error events, the root cause of the hardware failure of the target device is obtained, including: When the reset mode is the first reset mode and the multidimensional local error event includes the first type of error event, the root cause of the hardware fault is determined to be a device power supply fault. When the reset mode is the second reset mode and the multidimensional local error event includes the second type of error event, the root cause of the hardware failure is determined to be a device storage medium failure. When the reset mode is the third reset mode and the multidimensional local error event includes a transient error event, the root cause of the hardware fault is determined to be a hardware transient anomaly.
6. The equipment log analysis method according to any one of claims 1-5, characterized in that, After obtaining the device logs of the target device, the following is also included: The device logs are parsed in a structured manner to obtain the structured data format parameters of the device logs; Error event indexes are extracted from the structured data format parameters and are used as input data for the analysis tool interface.
7. The equipment log analysis method according to any one of claims 4-5, characterized in that, After obtaining the root cause of the hardware failure of the target device, the method further includes: The severity level is determined based on the root cause of the hardware failure and the error type of the multidimensional local error event; Based on the severity level, corresponding preset treatment recommendations are determined, and a structured analysis report is generated based on the severity level and the corresponding preset treatment recommendations.
8. A device for analyzing equipment logs, characterized in that, The device log analysis apparatus includes: The data acquisition module is used to acquire a structured knowledge package, as well as the device logs and global underlying state information of the target device. The global underlying state information is used to indicate the hardware reset state of the target device, and the structured knowledge package is used to guide the analysis of the device logs. The scheduling and verification module is used to parse the device logs based on the execution flow in the structured knowledge package to obtain preliminary analysis results; and to cross-verify the preliminary analysis results with the domain knowledge in the structured knowledge package to obtain the target analysis results. The correlation analysis module is used to perform causal correlation analysis on the global underlying state information and the target analysis results to obtain the root cause of the hardware failure of the target device.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the device log analysis method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the device log analysis method according to any one of claims 1 to 7.
