Log type conversion processing method, apparatus, device, and storage medium

By automating the processing of equipment operation error logs and generating system event logs, the problem of time-consuming manual conversion in existing technologies is solved, enabling real-time alarms and efficient log management for hardware failures within the server.

CN120560951BActive Publication Date: 2025-10-21INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511056115.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-10-21
Estimated Expiration
2045-07-30

AI Technical Summary

Technical Problem

In existing technologies, manually calling the intelligent platform management interface to inject key fields from the device operation error log into the system event log one by one is time-consuming and cannot meet the real-time alarm requirements for hardware failures within the server.

Method used

By acquiring pre-generated device operation error logs within the server, identifying multiple data segments and filtering out key data segments, and generating system event logs based on sensor type and physical location information, an automatic conversion process is achieved.

Benefits of technology

It enables automatic conversion of device operation error logs to system event logs, meets the real-time alarm requirements for hardware failures within the server, and improves the efficiency of cross-layer tracing of hardware problems and log backup.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120560951B_ABST
    Figure CN120560951B_ABST
Patent Text Reader

Abstract

The application discloses a log type conversion processing method and device, equipment and a storage medium, and relates to the technical field of data processing. The method comprises the following steps: obtaining a pre-generated device operation error log in a server; determining a plurality of data segments in the device operation error log; determining one or more key data segments from the plurality of data segments; determining corresponding sensor types and system message data according to the key data segments; determining the physical position information of one or more devices according to the device operation error log; generating corresponding sensor number indexes according to the physical position information; and generating a system event log according to the sensor types, the system message data and the sensor number indexes. The device operation error log is automatically converted into the system event log, and the real-time alarm demand of hardware failure in the server can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a log type conversion processing method, apparatus, device, and storage medium. Background Art

[0002] During server operation, device error logs generated using the Extensible Firmware Interface (EFI) resolve operational issues between the operating system and device errors. However, with the increasing complexity of servers and the growing demand for remote management, system event logs based on the Intelligent Platform Management Interface (IPMI) specification and managed by the baseboard management controller (BMC) have become a core data source for hardware O&M diagnostics. Therefore, converting device error logs into system event logs is crucial.

[0003] In related art, log type conversion processing methods use a server's baseboard management controller to parse the semantic text of device error logs, extract key fields using a customized script, and then manually call an intelligent platform management interface to inject these key fields into the system event log one by one. However, this method of manually calling the intelligent platform management interface to inject key fields from device error logs into the system event log one by one is time-consuming and cannot meet the real-time alert requirements for hardware failures within the server. Summary of the Invention

[0004] The present application provides a log type conversion processing method, apparatus, device and storage medium to at least solve the problem in the related art that the key fields in the device operation error log are injected into the system event log one by one by manually calling the intelligent platform management interface. The process is time-consuming and cannot meet the real-time alarm requirements of hardware failures in the server.

[0005] This application provides a log type conversion processing method, including:

[0006] Get the pre-generated device operation error log in the server;

[0007] Identify multiple data segments in the device operation error log;

[0008] determining one or more key data segments from the plurality of data segments;

[0009] Determine the corresponding sensor type and system message data according to each key data segment;

[0010] Determine the physical location information of one or more devices based on device operation error logs;

[0011] Generate corresponding sensor number index according to each physical location information;

[0012] Generate a system event log based on each sensor type, each system message data and each sensor number index.

[0013] This application also provides a log type conversion processing device, including:

[0014] The acquisition module is used to obtain the pre-generated device operation error log in the server;

[0015] A first determining module is used to determine multiple data segments in the device operation error log;

[0016] a second determining module, configured to determine one or more key data segments from the plurality of data segments;

[0017] A third determination module is used to determine the corresponding sensor type and system message data according to each key data segment;

[0018] a fourth determining module, configured to determine physical location information of one or more devices based on a device operation error log;

[0019] A first generating module is used to generate a corresponding sensor number index according to each physical location information;

[0020] The second generating module is used to generate a system event log according to each sensor type, each system message data and each sensor number index.

[0021] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned log type conversion processing methods when executing the computer program.

[0022] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned log type conversion processing methods are implemented.

[0023] Through the log type conversion processing method, device, equipment and storage medium provided in the embodiments of the present application, by obtaining a pre-generated device operation error log in the server; determining multiple data segments in the device operation error log; determining one or more key data segments from the multiple data segments; determining the corresponding sensor type and system message data based on each key data segment; determining the physical location information of one or more devices based on the device operation error log; generating a corresponding sensor number index based on each physical location information; generating a system event log based on each sensor type, each system message data and each sensor number index, by automatically converting the device operation error log into a system event log, replacing the manual time-consuming method, it can meet the real-time alarm requirements of hardware failures in the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0025] Figure 1 Schematic diagram of an application scenario of the log type conversion processing method provided in an embodiment of the present application;

[0026] Figure 2 A flow chart of the log type conversion processing method provided in an embodiment of the present application;

[0027] Figure 3 A flowchart of another log type conversion processing method provided in an embodiment of the present application;

[0028] Figure 4 A schematic diagram of a preset ring storage structure provided in an embodiment of the present application;

[0029] Figure 5 A schematic diagram of the structure of the log type conversion processing device provided in an embodiment of the present application;

[0030] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0032] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0033] During the operation of the server, the device operation error log generated based on the extensible firmware interface solves the operation and maintenance problems between the operating system and the device operation errors. However, with the increase in server complexity and the growth of remote management needs, the system event log based on the intelligent platform management interface specification, which is controlled by the baseboard management controller, has gradually become the core data source for hardware operation and maintenance diagnosis. Therefore, how to convert the device operation error log into a system event log is particularly important. In the related art, the log type conversion processing method uses the baseboard management controller of the server to parse the semantic text of the device operation error log, extract the key fields through a customized script, and manually call the intelligent platform management interface to inject the key fields into the system event log one by one. However, in the related art, the method of manually calling the intelligent platform management interface to inject the key fields in the device operation error log into the system event log one by one is time-consuming and cannot meet the real-time alarm requirements of hardware failures in the server.

[0034] In order to solve the above technical problems, the embodiments of the present application propose the following technical concepts: the inventor takes into account the pre-generated device operation error log; determines one or more corresponding key data segments based on the device operation error log; determines the corresponding sensor type and system message data according to each key data segment; uses the device operation error log to determine the physical location information of one or more devices, and generates a corresponding sensor number index based on each physical location information; generates a system event log based on each sensor type, each system message data and each sensor number index. By automatically converting the device operation error log into a system event log, the real-time alarm requirements of hardware failures in the server can be met.

[0035] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0036] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the log type conversion processing method depends, the specific application environment architecture or specific hardware architecture is described here. Figure 1 , Figure 1 Schematic diagram of an application scenario of the log type conversion processing method provided in an embodiment of the present application.

[0037] like Figure 1 As shown, the application scenario of the log type conversion processing method includes: a server 10 and an electronic device 101.

[0038] The server 10 may be a single server or a cluster of multiple servers, or other devices. The server 10 further includes a preset storage device 102 .

[0039] The electronic device 101 may be a baseboard management controller in a server, or may be another controller.

[0040] The electronic device 101 obtains a pre-generated device operation error log in the server 10; determines multiple data segments in the device operation error log; determines one or more key data segments from the multiple data segments; determines the corresponding sensor type and system message data based on each key data segment; determines the physical location information of one or more devices based on the device operation error log; generates a corresponding sensor number index based on each physical location information; and generates a system event log based on each sensor type, each system message data and each sensor number index.

[0041] Figure 2 A flow chart of the log type conversion processing method provided in the embodiment of the present application is shown as follows: Figure 2 As shown, the embodiment of the present application provides a log type conversion processing method, which is described in detail as follows:

[0042] S201: Obtain a pre-generated device operation error log in the server.

[0043] In this embodiment, the device operation error log may be a binary CPER log or other error log.

[0044] Among them, the CPER log is the Common Platform Error Recording Log, which is a standardized hardware error recording format. It is mainly used to capture and report platform-level hardware failures in servers, such as PCIe errors, memory errors, or processor exceptions.

[0045] Specifically, the process of generating the device operation error log in step S201 includes:

[0046] S2011: Monitor the level changes of the preset interrupt pin in the server.

[0047] In this embodiment, the preset interrupt pin is a GPIO interrupt pin, for example, the GPIO_17 pin.

[0048] Among them, the GPIO interrupt pin is configured as edge trigger mode, rising edge trigger.

[0049] Among them, the level change of the preset interrupt pin is caused by the UEFI firmware in the critical path of generating the device operation error log.

[0050] UEFI, or Unified Extensible Firmware Interface, is a modern firmware standard that replaces the traditional Basic Input / Output System (BIOS). It initializes hardware, boots the operating system, and provides an interface between the hardware and the operating system during system startup.

[0051] S2012: If it is detected that the level of the preset interrupt pin increases, it is determined that a device operation error event has occurred in the server, and the preset storage device is controlled to retrieve the device operation error log.

[0052] Specifically, step S2012 includes:

[0053] S20121: If the level of the preset interrupt pin is detected to be increased, it is determined that a device operation error event has occurred in the server, and the interrupt service routine response is triggered, wherein the device operation error log corresponding to the device operation error event is temporarily stored in a preset storage device.

[0054] In this embodiment, the preset storage device may be a memory or other storage device; illustratively, the storage device corresponding to address 0x50.

[0055] S20122: After completing the interrupt service routine response, generate an information transmission control protocol.

[0056] In this embodiment, the information transmission control protocol may be the MCTP over I2C protocol or other transmission control protocols.

[0057] Among them, the MCTP over I2C protocol is a binding specification for implementing the Management Component Transport Protocol based on the I2C / SMBus physical layer, and is mainly used for out-of-band communication between management controllers and devices in server systems.

[0058] S20123: According to the information transmission control protocol, a preset read error log command is sent to a preset storage device, and the storage device is controlled to retrieve the device operation error log according to the preset read error log command.

[0059] In this embodiment, the preset error log reading command may be a Read CPER Packet command or other commands.

[0060] The Read CPER Packet command contains the start address and data length fields of the device operation error log.

[0061] S202: Determine multiple data segments in a device operation error log.

[0062] Specifically, step S202 includes:

[0063] S2021: Determine the corresponding header fixed position data and the number of data segments based on the device operation error log.

[0064] Exemplarily, the offset of the header fixed position data is 135 bytes.

[0065] The fixed-position data in the header includes the version number, event type identifier, thread number, and other basic metadata required for maintaining subsequent processing.

[0066] S2022: Calculate the corresponding dynamic offset based on the header fixed position data, the number of data segment divisions, and the preset division length.

[0067] In this embodiment, after locating the starting position of the payload of the device operation error log, the corresponding dynamic offset is calculated according to the fixed position data of the header, the number of data segment divisions, and the preset division length through a loop traversal method. The calculation formula includes:

[0068]

[0069] Where, is the corresponding dynamic offset; To fix the position data according to the header; Divide the number of data segments; Divide the length for the preset.

[0070] The number of data segments is obtained by parsing the 17th and 18th bytes in the device operation error log.

[0071] Exemplarily, the preset partition length is 72 bytes.

[0072] S2023: Determine corresponding data segments from the device operation error log according to each dynamic offset, and obtain multiple data segments.

[0073] S203: Determine one or more key data segments from the multiple data segments.

[0074] Specifically, step S203 includes:

[0075] S2031: Determine the error level of each data segment.

[0076] For example, the error levels can be divided into a fatal level, a serious level, a general level, and an ignore level.

[0077] S2032: Obtain a preset error level threshold.

[0078] Exemplarily, the preset error level threshold is an ignore level.

[0079] S2033: Filter each data segment according to each error level and a preset error level threshold to obtain one or more key data segments.

[0080] Exemplarily, each data segment is screened according to each error level and the ignore level to eliminate data segments belonging to the ignore level, thereby obtaining one or more key data segments.

[0081] S204: Determine the corresponding sensor type and system message data according to each key data segment.

[0082] Specifically, step S204 includes:

[0083] S2041: Extract and process each key data segment to obtain a corresponding error type code.

[0084] In this embodiment, the error type is encoded as 16 consecutive bytes starting from the 16th bit in the corresponding key data segment.

[0085] Exemplarily, the error types indicated by the error type codes are respectively a CPU error, a memory error, and a PCIe device error.

[0086] S2042: Convert each error type code according to the pre-built sensor type mapping table to obtain the corresponding sensor type.

[0087] In this embodiment, the sensor type mapping table is specifically a mapping table of error type codes and sensor parameters.

[0088] For example, each sensor type is a central processing unit, and corresponds to a processor type, a memory type, and a severe interrupt type.

[0089] S2043: Obtain the error level corresponding to each key data segment.

[0090] Exemplarily, the error levels are fatal, severe, and general.

[0091] S2044: Convert each key data segment into corresponding system message data according to each error level.

[0092] Specifically, each key data segment is converted into corresponding system message data according to each error level and each error type code.

[0093] For example, each system message data is respectively a CPU unrecoverable check error, a CPU serious check error, a memory unrecoverable error, a memory serious error, an interrupt unrecoverable error, and an interrupt serious error.

[0094] S205: Determine physical location information of one or more devices according to the device operation error log.

[0095] S206: Generate a corresponding sensor number index according to each physical location information.

[0096] Exemplarily, each sensor number index is a CPU number, a memory number, and a logical identifier in device enumeration.

[0097] S207: Generate a system event log according to each sensor type, each system message data and each sensor number index.

[0098] In this embodiment, the system event log may be an SEL log or another type of log.

[0099] Among them, the SEL log is a hardware-level event log recorded by the baseboard management controller in devices such as servers. It is used to monitor system health status and diagnose hardware failures.

[0100] In summary, the log type conversion processing method provided in this embodiment obtains a pre-generated device operation error log in the server; determines multiple data segments in the device operation error log; determines one or more key data segments from the multiple data segments; determines the corresponding sensor type and system message data based on each key data segment; determines the physical location information of one or more devices based on the device operation error log; generates a corresponding sensor number index based on each physical location information; generates a system event log based on each sensor type, each system message data and each sensor number index, and automatically converts the device operation error log into a system event log, replacing the manual time-consuming method, and can meet the real-time alarm requirements of hardware failures in the server.

[0101] In addition, the log type conversion processing method provided in this embodiment can trigger the event of the device operation error log in real time through the level change of the preset interrupt pin, laying the foundation for the real-time alarm of hardware failure in the subsequent server.

[0102] In addition, the log type conversion processing method provided in this embodiment improves the cross-layer tracing efficiency of hardware problems by converting device operation error logs and system event logs.

[0103] Figure 3 A flow chart of another log type conversion processing method provided in an embodiment of the present application. Figure 2 Based on the provided embodiment, the specific implementation method for subsequent device operation error log backup is described in detail. Figure 3 As shown, the method includes:

[0104] S301: Setting an identifier for a device operation error log and storing the identifier in a system event log.

[0105] Specifically, an identifier of the device operation error log is set, and the identifier is stored in the EvtData3 field in the system event log for subsequent one-click collection of the device operation error log.

[0106] Among them, the EvtData3 field, as one of the extended data fields of the event record, is used to store additional information related to the event, such as error code, process ID or operation context.

[0107] S302: Obtain an identifier from the system event log, and retrieve a log file of a device operation error log according to the identifier.

[0108] S303: traverse multiple index bitmaps in the preset ring storage structure until an unmarked index bitmap is traversed.

[0109] In this embodiment, the number of the plurality of index bitmaps may be any number among 200, 300, or 500, or may be any other number.

[0110] Exemplarily, the number of the plurality of index bitmaps is 300.

[0111] Exemplarily, the unmarked index bitmap is the fifth index bitmap.

[0112] S304: Store the log file in an unmarked index bitmap to obtain a marked index bitmap.

[0113] In addition, after step S304, steps a and b are also included:

[0114] Step a: Determine the adjacent index bitmaps of the marked index bitmap.

[0115] Exemplarily, the adjacent index bitmap is the 6th index bitmap.

[0116] Step b: clean up the log files in the adjacent index bitmap and update the adjacent index bitmap to an idle index bitmap.

[0117] In addition, the preset ring storage structure diagram determined by the number of multiple index bitmaps, unmarked index bitmaps and adjacent index bitmaps is as shown in FIG. Figure 4 shown.

[0118] In summary, the log type conversion processing method provided in this embodiment sets an identifier for the device operation error log and stores the identifier in the system event log; obtains the identifier from the system event log, and calls the log file of the device operation error log according to the identifier; traverses multiple index bitmaps in the preset ring storage structure until traversing to an unmarked index bitmap; stores the log file in the unmarked index bitmap to obtain a marked index bitmap, and stores the device operation error log through the identifier, so that the corresponding log file can be automatically stored without logging into the server's operating system and participating in complex commands, thereby improving log backup efficiency and reducing operation and maintenance costs.

[0119] In addition, the log type conversion processing method provided in this embodiment cleans up the log files in the adjacent index bitmaps and updates the adjacent index bitmaps to free index bitmaps to ensure that there are always free index bitmaps in the preset ring storage structure for storing data.

[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0121] Figure 5 This is a structural diagram of the log type conversion processing device provided in the embodiment of the present application. Figure 5 As shown, an embodiment of the present application also provides a log type conversion processing device, including: an acquisition module 501, a first determination module 502, a second determination module 503, a third determination module 504, a fourth determination module 505, a first generation module 506 and a second generation module 507.

[0122] The acquisition module 501 is used to obtain the pre-generated device operation error log in the server;

[0123] A first determining module 502 is configured to determine a plurality of data segments in a device operation error log;

[0124] A second determining module 503 is configured to determine one or more key data segments from the plurality of data segments;

[0125] The third determining module 504 is used to determine the corresponding sensor type and system message data according to each key data segment;

[0126] A fourth determining module 505 is configured to determine physical location information of one or more devices based on the device operation error log;

[0127] A first generating module 506 is configured to generate a corresponding sensor number index according to each physical location information;

[0128] The second generating module 507 is configured to generate a system event log according to each sensor type, each system message data and each sensor number index.

[0129] In a possible implementation, the first determining module 502 specifically includes:

[0130] A first determining unit is configured to determine corresponding header fixed position data and the number of data segments divided according to a device operation error log;

[0131] A calculation unit, configured to calculate a corresponding dynamic offset based on the header fixed position data, the number of data segment divisions, and a preset division length;

[0132] The second determining unit is configured to determine corresponding data segments from the device operation error log according to each dynamic offset to obtain a plurality of data segments.

[0133] In a possible implementation, the second determining module 503 specifically includes:

[0134] a determination unit, configured to determine an error level of each data segment;

[0135] A first acquiring unit, configured to acquire a preset error level threshold;

[0136] a screening unit, configured to screen each data segment according to each error level and a preset error level threshold to obtain one or more key data segments;

[0137] Accordingly, the third determining module 504 specifically includes:

[0138] An extraction unit is used to extract and process each key data segment to obtain a corresponding error type code;

[0139] A first conversion unit is configured to convert each error type code according to a pre-built sensor type mapping table to obtain a corresponding sensor type;

[0140] A second obtaining unit is used to obtain the error level corresponding to each key data segment;

[0141] The second conversion unit is configured to convert each key data segment into corresponding system message data according to each error level.

[0142] In a possible implementation, the apparatus further includes:

[0143] A monitoring module is used to monitor the level changes of the preset interrupt pins in the server;

[0144] The control module is used to determine that a device operation error event has occurred in the server if it monitors that the level of the preset interrupt pin has increased, and control the preset storage device to retrieve the device operation error log.

[0145] In a possible implementation, the control module specifically includes:

[0146] a trigger unit configured to determine that a device operation error event has occurred in the server and trigger an interrupt service routine response if the level of a preset interrupt pin is detected to have increased, wherein a device operation error log corresponding to the device operation error event is temporarily stored in a preset storage device;

[0147] A generating unit, configured to generate an information transmission control protocol after completing an interrupt service routine response;

[0148] The control unit is used to send a preset read error log command to a preset storage device according to the information transmission control protocol, control the storage device, and retrieve the device operation error log according to the preset read error log command.

[0149] In a possible implementation, the apparatus further includes:

[0150] A first storage module is used to set an identifier of a device operation error log and store the identifier in a system event log;

[0151] A calling module, used for obtaining an identifier from a system event log and calling a log file of a device operation error log according to the identifier;

[0152] A traversal module, configured to traverse a plurality of index bitmaps in a preset ring storage structure until an unmarked index bitmap is reached;

[0153] The second storage module is used to store the log file in the unmarked index bitmap to obtain the marked index bitmap.

[0154] In a possible implementation, the apparatus further includes:

[0155] a fifth determining module, configured to determine adjacent index bitmaps of the marked index bitmap;

[0156] The cleaning module is used to clean up the log files in the adjacent index bitmap and update the adjacent index bitmap to an idle index bitmap.

[0157] For the description of the features in the embodiment corresponding to the log type conversion processing device, please refer to the relevant description of the embodiment corresponding to the log type conversion processing method, and will not be repeated here.

[0158] Figure 6 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 6 As shown, the electronic device provided by this embodiment includes: at least one processor 601 and a memory 602. Optionally, the electronic device further includes a communication component 603. The processor 601, the memory 602 and the communication component 603 are connected via a bus.

[0159] In a specific implementation process, at least one processor 601 executes the computer-executable instructions stored in the memory 602 , so that the at least one processor 601 executes the above-mentioned log type conversion processing method embodiment.

[0160] The specific implementation process of the processor 601 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.

[0161] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.

[0162] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.

[0163] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0164] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned log type conversion processing method embodiments when running.

[0165] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0166] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned log type conversion processing method embodiments are implemented.

[0167] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned log type conversion processing method embodiments are implemented.

[0168] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0169] The above is a detailed introduction to the log type conversion processing method, device, equipment and storage medium provided by this application. This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method of this application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

Claims

1. A log type conversion processing method, characterized in that: include: Get the pre-generated device operation error log in the server; determining a plurality of data segments in the device operation error log; determining one or more key data segments from the plurality of data segments; Determine the corresponding sensor type and system message data according to each key data segment; determining physical location information of one or more devices based on the device operation error log; Generate corresponding sensor number index according to each physical location information; Generate system event logs based on sensor types, system message data, and sensor number indexes; Wherein, determining one or more key data segments from the multiple data segments includes: determining an error level of each data segment; obtaining a preset error level threshold; screening each data segment according to each error level and the preset error level threshold to obtain one or more key data segments; correspondingly, determining corresponding sensor types and system message data according to each key data segment includes: extracting each key data segment to obtain a corresponding error type code; converting each error type code according to a pre-built sensor type mapping table to obtain a corresponding sensor type; obtaining an error level corresponding to each key data segment; and converting each key data segment into corresponding system message data according to each error level; Among them, after generating the system event log according to each sensor type, each system message data and each sensor number index, it also includes: setting an identifier of the device operation error log and storing the identifier in the system event log; obtaining the identifier from the system event log, and calling the log file of the device operation error log according to the identifier; traversing multiple index bitmaps in a preset ring storage structure until traversing to an unmarked index bitmap; storing the log file in the unmarked index bitmap to obtain a marked index bitmap.

2. The log type conversion processing method according to claim 1, characterized in that: The determining of the plurality of data segments in the device operation error log includes: Determine the corresponding header fixed position data and the number of data segments divided according to the device operation error log; Calculate the corresponding dynamic offset according to the fixed position data of the header, the number of data segment divisions and the preset division length; Corresponding data segments are determined from the device operation error log according to each dynamic offset to obtain multiple data segments.

3. The log type conversion processing method according to claim 1, characterized in that: The process of generating the device operation error log includes: Monitor the level changes of the preset interrupt pins in the server; If it is monitored that the level of the preset interrupt pin increases, it is determined that a device operation error event occurs in the server, and a preset storage device is controlled to retrieve a device operation error log.

4. The log type conversion processing method according to claim 3 is characterized in that: If the level of the preset interrupt pin is detected to be increased, it is determined that a device operation error event has occurred in the server, and a preset storage device is controlled to retrieve a device operation error log, including: If the level of the preset interrupt pin is detected to be increased, it is determined that a device operation error event has occurred in the server, and an interrupt service routine response is triggered, wherein a device operation error log corresponding to the device operation error event is temporarily stored in a preset storage device; After completing the interrupt service routine response, generating an information transmission control protocol; According to the information transmission control protocol, a preset read error log command is sent to the preset storage device, and the storage device is controlled to retrieve the device operation error log according to the preset read error log command.

5. The log type conversion processing method according to claim 1, characterized in that: After storing the log file in the unmarked index bitmap to obtain the marked index bitmap, the method further includes: Determining adjacent index bitmaps of the marked index bitmap; The log files in the adjacent index bitmap are cleared, and the adjacent index bitmap is updated to an idle index bitmap.

6. A log type conversion processing device, characterized in that: include: The acquisition module is used to obtain the pre-generated device operation error log in the server; A first determining module is used to determine a plurality of data segments in the device operation error log; a second determining module, configured to determine one or more key data segments from the plurality of data segments; A third determination module is used to determine the corresponding sensor type and system message data according to each key data segment; a fourth determining module, configured to determine physical location information of one or more devices based on the device operation error log; A first generating module is used to generate a corresponding sensor number index according to each physical location information; The second generating module is used to generate a system event log according to each sensor type, each system message data and each sensor number index; The second determination module specifically includes: a determination unit, configured to determine an error level of each data segment; A first acquiring unit, configured to acquire a preset error level threshold; a screening unit, configured to screen each data segment according to each error level and a preset error level threshold to obtain one or more key data segments; Accordingly, the third determining module specifically includes: An extraction unit is used to extract and process each key data segment to obtain a corresponding error type code; A first conversion unit is configured to convert each error type code according to a pre-built sensor type mapping table to obtain a corresponding sensor type; A second obtaining unit is used to obtain the error level corresponding to each key data segment; a second conversion unit, configured to convert each key data segment into corresponding system message data according to each error level; The device further comprises: A first storage module is used to set an identifier of a device operation error log and store the identifier in a system event log; A calling module, used for obtaining an identifier from a system event log and calling a log file of a device operation error log according to the identifier; A traversal module, configured to traverse a plurality of index bitmaps in a preset ring storage structure until an unmarked index bitmap is reached; The second storage module is used to store the log file in the unmarked index bitmap to obtain the marked index bitmap.

7. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the log type conversion processing method according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the log type conversion processing method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Mass error log processing method and device, electronic device and storage medium

    CN112000502A

  • Service request remediation by machine learning-based identification of critical regions of log files

    CN115129679A