A baseboard management controller and a log storage method and device thereof

CN122925183APending Publication Date: 2026-10-16INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611407378.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]相关技术中,BMC对日志的保存方式,一种是在基板管理控制器中划分固定存储空间,对连续产生的原始日志数据进行循环覆盖存储;然而受限于BMC的存储空间,设备发生异常并在较短时间内产生较多日志时,较早形成的异常相关日志可能被后续日志覆盖

Benefits of technology

[0022] As can be seen, this invention determines the current log storage mode based on log anomaly confidence or log anomaly confidence and device health, thereby sensing the server's operating status and selecting the appropriate log storage mode to store log content, thus improving the flexibility of log storage. By using local non-volatile memory to store log semantic fingerprints and/or raw log data according to the current log storage mode, it can reduce dependence on the network and reduce the possibility of log loss. Furthermore, by converting raw log data into log semantic fingerprints, it can simplify the stored log content and achieve lightweight log storage. In addition, this invention also provides a log storage device for a baseboard management controller and a baseboard management controller, which also have the above-mentioned beneficial effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122925183A_ABST
    Figure CN122925183A_ABST
Patent Text Reader

Abstract

The application discloses a substrate management controller and a log storage method and device thereof, and relates to the technical field of computers.The method comprises the following steps: performing feature extraction on original log data obtained, and generating log semantic fingerprints according to the extracted log features; determining log abnormal confidence according to the log semantic fingerprints; determining a current log storage mode according to the log abnormal confidence or the log abnormal confidence and device health; and storing the log semantic fingerprints and / or the original log data in a local non-volatile memory according to the current log storage mode.The application can perceive the running state of a server, thereby selecting a corresponding log storage mode to store log content locally, improving the flexibility of log storage, reducing the dependence on a network, and reducing the loss of logs; and by converting the original log data into log semantic fingerprints, the application can simplify the stored log content, and realize lightweight log storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a baseboard management controller and its log storage method and apparatus. Background Technology

[0002] In the current server equipment operating system, the Baseboard Management Controller (BMC) is a crucial component in out-of-band server management. The serial port logs generated by the BMC during device operation can completely record the entire process data from server boot-up, BIOS (Basic Input Output System) and UEFI (Unified Extensible Firmware Interface) program operation, operating system kernel operation, to the operation of the BMC itself. Whether it is server crashes, hardware incompatibility errors, or unstable device performance, these log data can be used to trace and troubleshoot various common problems. They are irreplaceable important data in daily server operation and maintenance.

[0003] In related technologies, BMCs (Baseboard Management Controllers) store logs in two ways: one is by allocating a fixed storage space in the baseboard management controller and cyclically overwriting the continuously generated raw log data; however, due to the limitations of the BMC's storage space, when a device malfunctions and generates a large number of logs in a short period of time, earlier malfunction-related logs may be overwritten by subsequent logs. The other method is to forward logs over the network; however, when the network connection is unavailable, the serial port redirection service is not enabled, or the baseboard management controller itself malfunctions, logs that have not yet been persisted may not be available.

[0004] Therefore, improving the flexibility of BMC log storage, reducing dependence on the network, and minimizing log loss are urgent problems that need to be solved. Summary of the Invention

[0005] The purpose of this invention is to provide a baseboard management controller and its log storage method and apparatus to improve the flexibility of BMC log storage, reduce dependence on the network, and reduce log loss.

[0006] To address the aforementioned technical problems, this invention provides a log storage method for a baseboard management controller, applied to a baseboard management controller, comprising: Feature extraction is performed on the acquired raw log data, and log semantic fingerprints are generated based on the extracted log features; wherein, the raw log data includes serial port logs; Based on the log semantic fingerprint, determine the log anomaly confidence level; The current log storage mode is determined based on the log anomaly confidence level or the log anomaly confidence level and the device health level; wherein, the device health level is the health level of the server where the baseboard management controller is located, determined based on the obtained device operating parameters; the current log storage mode is any preset log storage mode, and at least one of the log storage granularity, retention time and storage location is different for different preset log storage modes; Based on the current log storage mode, the log semantic fingerprint and / or the original log data are stored using local non-volatile memory.

[0007] On the other hand, the step of extracting features from the acquired raw log data and generating log semantic fingerprints based on the extracted log features includes: The original log data is divided into independent log records according to the newline identifier; The log data in each of the independent log records is divided into data of each preset log type; wherein, the preset log types include numerical logs and text logs; Extract the log features of each independent log record according to the extraction method corresponding to each preset log type; The log features of each independent log record are integrated to obtain the log semantic fingerprint of each independent log record.

[0008] On the other hand, the extraction of log features for each independent log record according to the extraction method corresponding to each preset log type includes: If the current log record includes data from the numerical log, then statistical features are extracted from the numerical log data as the log features; wherein, the statistical features include at least one of the following: mean, variance, rate of change, maximum value, and minimum value; If the current log record includes the data of the text log, then the core keywords are extracted from the text log data, and the core keywords are matched with the preset device event dictionary to obtain the event type code as the log feature.

[0009] On the other hand, determining the log anomaly confidence level based on the log semantic fingerprint includes: Log semantic fingerprints within a continuous time window are selected as analysis samples, and the log anomaly confidence is calculated using an anomaly detection algorithm.

[0010] On the other hand, log semantic fingerprints within a continuous time window are selected as analysis samples, and anomaly detection algorithms are used to calculate the log anomaly confidence level, including: Based on the log semantic fingerprint of the preset number of anomaly analyses within the continuous time window, anomaly detection is performed using the 3σ criterion and / or the isolated forest algorithm to obtain the log anomaly confidence score; wherein the value of the log anomaly confidence score ranges from 0 to 1.

[0011] On the other hand, determining the current log storage mode based on the log anomaly confidence level or the log anomaly confidence level and device health includes: The current log storage mode is determined based on the log anomaly confidence level and device health level. Before determining the current log storage mode based on the log anomaly confidence level and device health level, the method further includes: Obtain the device operating parameters; wherein the device operating parameters include at least two of the following: CPU temperature, operating voltage, motherboard temperature, number of communication bus errors, memory error correction rate, and fan speed; The health status of each device is determined based on the degree of deviation of its operating parameters from its corresponding normal operating range.

[0012] On the other hand, determining the health status of the equipment based on the degree of deviation of each equipment's operating parameters from its corresponding normal operating range includes: Identify the target operating range where the current operating parameter is located; wherein, the current operating parameter is any of the device operating parameters, and the target operating range is the normal operating range, warning threshold range, danger threshold range, or danger threshold range corresponding to the current operating parameter; The preset score corresponding to the target operating range is determined as the deviation score of the current operating parameters; The deviation scores of each of the equipment operating parameters are weighted and summed according to their respective weights to obtain the equipment health score.

[0013] On the other hand, the preset log storage mode includes a lightweight storage mode, an enhanced storage mode, and a secure storage mode; the lightweight storage mode is used to store the log semantic fingerprint using the local non-volatile memory; the enhanced storage mode is used to store raw log data for a first preset duration using the local non-volatile memory; the secure storage mode is used to store raw log data for a second preset duration using the local non-volatile memory; the second preset duration is longer than the first preset duration. The step of determining the current log storage mode based on the log anomaly confidence level or the log anomaly confidence level and device health includes: If the device health is lower than the first state threshold and the log anomaly confidence level is lower than the first anomaly threshold, then the current log storage mode is determined to be the lightweight storage mode. If the device health is between the first state threshold and the second state threshold and the log anomaly confidence level is not higher than the second anomaly threshold, or if the log anomaly confidence level is between the first anomaly threshold and the second anomaly threshold and the device health is not higher than the second state threshold, then the current log storage mode is determined to be the enhanced storage mode; wherein, the second state threshold is greater than the first state threshold, and the second anomaly threshold is greater than the first anomaly threshold; If the device health is higher than the second state threshold, or the log anomaly confidence level is higher than the second anomaly threshold, then the current log storage mode is determined to be the preservation storage mode.

[0014] On the other hand, storing the log semantic fingerprint and / or the original log data using local non-volatile memory according to the current log storage mode includes: If the current log storage mode is the lightweight storage mode, then the log semantic fingerprint is stored in the log storage area of ​​the local non-volatile memory; If the current log storage mode is the enhanced storage mode, then the original log data of the first preset duration in the local volatile memory is stored in the log storage area. If the current log storage mode is the secure storage mode, then the original log data of the second preset duration in the local volatile memory is stored in the log storage area, and the original log data of the second preset duration is redundantly backed up to the server.

[0015] On the other hand, the redundant backup of the original log data for the second preset duration to the server includes: The fault scene data is stored in a dedicated preservation area in the local non-volatile memory; wherein, the fault scene data includes the original log data of the second preset duration, the log semantic fingerprint in the log storage area, device sensor data, system process list and memory usage; The fault scene data in the dedicated security area is redundantly backed up to the server.

[0016] On the other hand, the method also includes: Monitor the load status of the internal communication bus between the baseboard management controller and the main central processing unit; When the load state meets the preset idle condition and the current log storage mode indicates redundant backup, the log data to be backed up is encapsulated into low-priority data packets, and the low-priority data packets are transmitted to the server for storage using the idle bandwidth of the internal communication bus; wherein, the log data to be backed up includes the log semantic fingerprint and / or the original log data.

[0017] On the other hand, the preset idle condition includes a load utilization rate below an idle utilization rate threshold; the lightweight storage mode and the enhanced storage mode are used to instruct redundant backups when the storage space of the local non-volatile memory is insufficient.

[0018] On the other hand, the redundant backup of the original log data for the second preset duration to the server includes: When the load condition meets the preset idle condition, the raw log data of the second preset duration is encapsulated into the low-priority data packet, and the low-priority data packet is transmitted to the server for storage using the idle bandwidth of the internal communication bus; wherein, the priority and transmission frequency of the low-priority data packet corresponding to the preservation storage mode are higher than the priority and transmission frequency of the low-priority data packet corresponding to the lightweight storage mode and the enhanced storage mode.

[0019] The present invention also provides a log storage device for a baseboard management controller, applied to a baseboard management controller, comprising: The feature extraction module is used to extract features from the acquired raw log data and generate log semantic fingerprints based on the extracted log features; wherein, the raw log data includes serial port logs; The confidence determination module is used to determine the confidence level of log anomalies based on the log semantic fingerprint. The mode determination module is used to determine the current log storage mode based on the log anomaly confidence level or the log anomaly confidence level and the device health level; wherein, the device health level is the health level of the server where the baseboard management controller is located, determined based on the acquired device operating parameters; the current log storage mode is any preset log storage mode, and at least one of the log storage granularity, retention time and storage location is different for different preset log storage modes; The log storage module is used to store the log semantic fingerprint and / or the original log data using local non-volatile memory according to the current log storage mode.

[0020] Furthermore, the present invention also provides a baseboard management controller, comprising: Memory, used to store computer programs; A processor, used to implement the steps of the log storage method for the baseboard management controller as described above when executing the computer program.

[0021] The present invention provides a log storage method for a baseboard management controller, applied to the baseboard management controller, comprising: extracting features from acquired raw log data and generating a log semantic fingerprint based on the extracted log features; wherein the raw log data includes serial port logs; determining a log anomaly confidence level based on the log semantic fingerprint; determining a current log storage mode based on the log anomaly confidence level or the log anomaly confidence level and device health; wherein the device health is the health of the server where the baseboard management controller is located, determined based on acquired device operating parameters; the current log storage mode is any preset log storage mode, and different preset log storage modes correspond to at least one different aspect of log storage granularity, retention time, and storage location; and storing the log semantic fingerprint and / or raw log data using local non-volatile memory according to the current log storage mode.

[0022] As can be seen, this invention determines the current log storage mode based on log anomaly confidence or log anomaly confidence and device health, thereby sensing the server's operating status and selecting the appropriate log storage mode to store log content, thus improving the flexibility of log storage. By using local non-volatile memory to store log semantic fingerprints and / or raw log data according to the current log storage mode, it can reduce dependence on the network and reduce the possibility of log loss. Furthermore, by converting raw log data into log semantic fingerprints, it can simplify the stored log content and achieve lightweight log storage. In addition, this invention also provides a log storage device for a baseboard management controller and a baseboard management controller, which also have the above-mentioned beneficial effects. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0024] Figure 1 A flowchart illustrating a log storage method for a baseboard management controller provided in an embodiment of the present invention; Figure 2 A flowchart illustrating a method for generating log semantic fingerprints according to an embodiment of the present invention; Figure 3 This is a structural block diagram of a log storage device for a baseboard management controller provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a baseboard management controller provided in an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] Please refer to Figure 1 , Figure 1 A flowchart illustrating a log storage method for a baseboard management controller (BMC) according to an embodiment of the present invention. This method, applied to a baseboard management controller (BMC), may include: Step 101: Extract features from the acquired raw log data and generate log semantic fingerprints based on the extracted log features.

[0027] The raw log data includes serial port logs.

[0028] It should be noted that the method provided in this embodiment can be applied to servers equipped with a BMC and a main CPU (Central Processing Unit). The baseboard management controller can continuously acquire the operating information of the server and itself using firmware, and can access local volatile memory, local non-volatile memory, and the internal communication bus connected to the main CPU. The method provided in this embodiment can run in parallel with the existing serial port forwarding service and management page service of the BMC without changing the hardware connection relationship of the server.

[0029] Correspondingly, the local volatile memory can be the volatile memory (such as RAM) in the BMC; the local non-volatile memory can be the non-volatile memory in the BMC, such as flash memory; the internal communication bus can be the internal communication bus between the BMC and the main CPU, such as PCIe (peripheral component interconnect express, a high-speed serial computer expansion bus standard), LPC (Low pin count Bus, a computer bus), and / or eSPI (Enhanced Serial Peripheral Interface, a high-speed serial communication interface), etc. In this embodiment, the raw log data can be the raw log data that needs to be stored locally. The internal communication bus can be the internal communication bus between the BMC and the main CPU. The specific content of the raw log data in this embodiment can be set by the designer, such as including serial port logs generated during device operation, and can also include other logs that the BMC can collect. This embodiment does not impose any restrictions on this.

[0030] Accordingly, the method provided in this embodiment may also include a process for acquiring raw log data. This can be achieved using a method similar to or the same as the serial port log acquisition method for BMC in related technologies, such as directly reading the data stream output by the BMC serial port device to obtain the corresponding raw log data. In this embodiment, local volatile memory can also be used to store the raw log data. For example, the local volatile memory can be configured with a buffer to store recent raw log data. The storage capacity of the buffer can be configured according to requirements. For instance, the buffer can store the most recent 1000 raw log data entries in a first-in, first-out (FIFO) manner. After newly formed raw log data enters the buffer, the oldest raw log data is removed when the buffer reaches a preset capacity, thus continuously retaining raw log data closest to the current moment.

[0031] Understandably, this step converts continuous, variable-length, and potentially repetitive raw log data into log semantic fingerprints that can be used for anomaly analysis and streamlined storage. The input to this step can be raw log data collected in the order it was collected, and the output can be a log semantic fingerprint corresponding to the data characteristics of the raw log data. The log semantic fingerprint can serve as analytical data for determining the confidence level of log anomalies, or as persistent data stored under a pre-defined log storage model.

[0032] Correspondingly, the specific method for extracting features from the acquired raw log data and generating log semantic fingerprints based on the extracted log features in this step can be set by the designer according to the practical scenario and user needs. For example, to facilitate data parsing and processing, in this embodiment, the raw log data can be divided into standardized independent log records, and then the log semantic fingerprints corresponding to each independent log record can be extracted and generated. For example, this step can be as follows: Figure 2 As shown, it includes: Step 1011: Divide the original log data into independent log records according to the newline indicator.

[0033] In this step, the BMC continuously reads the data stream output from the serial port device and uses the detected newline marker (such as carriage return and newline characters) as the boundary for logging, thus determining the end position of an independent log record and splitting it into multiple independent log records. The collection order of each independent log record is maintained during the segmentation process so that the subsequently formed log semantic fingerprints can be arranged in the same order.

[0034] In other words, this step involves continuously reading the data stream output from the BMC serial port device, segmenting the data stream according to the natural line ending format of the log, and organizing it into standardized, independent log records for easier subsequent parsing and processing.

[0035] Step 1012: Divide the log data in each independent log record into data of each preset log type; wherein, the preset log types include numerical logs and text logs.

[0036] It is understood that in this step, the log data of each independent log record can be classified, and the corresponding extraction method can be used according to the classification results to extract the corresponding log features. The preset log type in this embodiment can be a pre-set type of log data, such as quantifiable numerical logs like temperature and voltage; it can also include text logs describing device events and operating status; or it can include other log types corresponding to other log content. This embodiment does not impose any limitations on this.

[0037] Correspondingly, the specific method for classifying the log data in each independent log record into each preset log type in this step can be set by the designer. For example, this step can use keyword matching and / or regular expression filtering to classify the log data in each independent log record to ensure the accuracy of the classification results.

[0038] Step 1013: Extract the log features of each independent log record according to the extraction method corresponding to each preset log type.

[0039] In this step, features can be extracted from the corresponding log data in independent log records according to the preset extraction methods for each log type, thus obtaining the log features of each independent log record. The specific settings for the extraction methods corresponding to each preset log type can be customized by the designer. For example, when the current log record includes numerical log data, statistical features can be extracted from the numerical log data as log features; these statistical features include at least one of the following: mean, variance, rate of change, maximum value, and minimum value. When the current log record includes text log data, core keywords can be extracted from the text log data, and these core keywords can be matched with a preset device event dictionary to obtain the event type code as the log feature.

[0040] In other words, for numerical log data, instead of directly saving the raw values, statistical features such as the average, variance, rate of change, maximum, and minimum values ​​can be extracted as log features to form a unique set of numerical features. For text-based log data, core keywords can be extracted and matched with a pre-prepared device event dictionary to determine the corresponding event type code, replacing lengthy text descriptions with simple codes. The pre-prepared device event dictionary stores the correspondence between each core keyword and the event type code.

[0041] Step 1014: Integrate the log features of each independent log record to obtain the log semantic fingerprint of each independent log record.

[0042] In this step, BMC can integrate the log features (such as the event type encoding and statistical features mentioned above) of each independent log record to generate a unique log semantic fingerprint for that log record. Correspondingly, this embodiment does not limit the specific content and length of the log semantic fingerprint. The log semantic fingerprint can be adjusted according to actual operational needs. For example, the length of the log semantic fingerprint can use 128-bit and / or 256-bit binary data, which ensures the integrity of the feature information while effectively controlling the storage volume.

[0043] In other embodiments, in step 101, the BMC may also use other methods to divide the original log data into corresponding log records and then extract and generate the corresponding log semantic fingerprints. This embodiment does not impose any limitations on this.

[0044] Step 102: Determine the log anomaly confidence level based on the log semantic fingerprint.

[0045] It is understood that the log anomaly confidence level in this embodiment can indicate the degree to which the original log data deviates from normal logs. Since log semantic fingerprints can characterize the data features of the corresponding original log data, this step can utilize log semantic fingerprints to determine the log anomaly confidence level.

[0046] Correspondingly, the specific method for determining the log anomaly confidence level based on log semantic fingerprints in this step can be set by the designer according to the practical scenario and user needs. For example, the current log semantic fingerprint can be directly compared with a preset normal log fingerprint to obtain the log anomaly confidence level. To improve the accuracy and adaptability of the determined log anomaly confidence level, this step can select log semantic fingerprints within a continuous time window as analysis samples and use anomaly detection algorithms to calculate the log anomaly confidence level. In other words, since multiple log semantic fingerprints within a continuous time window can represent changes in log content over a period of time, this step uses log semantic fingerprints within a continuous time window to form analysis samples to detect log anomaly confidence levels.

[0047] Correspondingly, the specific method for calculating the log anomaly confidence level using an anomaly detection algorithm by selecting log semantic fingerprints within a continuous time window as analysis samples can be set by the designer. For example, anomaly detection can be performed using the 3σ criterion and / or the isolated forest algorithm based on the log semantic fingerprints of a preset number of anomaly analyses within the continuous time window to obtain the log anomaly confidence level. The value of the log anomaly confidence level ranges from 0 to 1, and an increase in the value indicates an increase in the difference between the current original log data and the original log data corresponding to the normal operating state.

[0048] The continuous time window can be updated on a rolling basis as new log semantic fingerprints are generated. After a newly generated log semantic fingerprint enters the analysis sample, the earliest log semantic fingerprint exceeding the continuous time window is removed from the current analysis sample. The analysis sample after the rolling update maintains a fixed or configurable preset number of anomaly analyses (e.g., 100). In some embodiments, the preset number of anomaly analyses can be 100. When using the 3σ criterion, deviations can be identified based on the distribution of corresponding log features in the analysis sample; when using the isolated forest algorithm, anomalies can be identified based on the separability of log semantic fingerprints in the analysis sample. The two algorithms can be used individually or in combination. This embodiment does not change the basic calculation process of each anomaly detection algorithm; the algorithm output is converted into a log anomaly confidence score in the range of 0 to 1.

[0049] Step 103: Determine the current log storage mode based on the log anomaly confidence level or the log anomaly confidence level and device health.

[0050] Among them, the device health status is the health status of the server where the baseboard management controller is located, determined based on the acquired device operating parameters; the current log storage mode is any preset log storage mode, and at least one of the following is different for different preset log storage modes: log storage granularity, retention time, and storage location.

[0051] It is understood that in this embodiment, the current log storage mode can be determined using only the log anomaly confidence level, or it can be determined using both the log anomaly confidence level and the device health level. When only the log anomaly confidence level is used, the determination of the current log storage mode can reflect the abnormal changes in the log data itself; when both indicators are used, the determination of the current log storage mode can also reflect the health of the server where the BMC resides.

[0052] Correspondingly, when using log anomaly confidence and device health to determine the current log storage mode, this step may also include a process for obtaining device health. For example, the process for obtaining device health may include: obtaining device operating parameters; determining device health based on the deviation of each device operating parameter from its corresponding normal operating range; wherein the device operating parameters include at least two of the following: CPU temperature, operating voltage, motherboard temperature, number of communication bus errors (such as PCIe bus error count), memory error correction rate, and fan speed.

[0053] Among these parameters, CPU temperature, operating voltage, motherboard temperature, and fan speed can be provided by the corresponding sensor data interfaces, while the number of communication bus errors and memory error correction rate can be provided by the status data or management command interface accessible to the baseboard management controller. Multiple device operating parameters are updated within the same acquisition cycle, providing input for calculating device health at the same time.

[0054] Correspondingly, the specific method for determining the health of equipment based on the deviation of each equipment's operating parameters from its corresponding normal operating range can be set by the designer. For example, the target operating range of the current operating parameters can be identified; the preset score corresponding to the target operating range can be determined as the deviation score of the current operating parameters; and the deviation scores of each equipment's operating parameters can be weighted and summed according to their respective weights to obtain the equipment health.

[0055] Correspondingly, the current operating parameters can be any device operating parameters, and the target operating range can be one of multiple preset ranges corresponding to the current operating parameters. For example, the preset ranges can include normal operating ranges, warning threshold ranges, danger threshold ranges, and ranges exceeding danger thresholds, that is, the target operating range is the normal operating range, warning threshold range, danger threshold range, or range exceeding danger thresholds; the preset ranges can also include normal operating ranges, warning threshold ranges, and danger threshold ranges, that is, the target operating range is the normal operating range, warning threshold range, or danger threshold range.

[0056] For example, a BMC can acquire n equipment operating parameters, with the real-time collected value of each parameter denoted as vi; where i ranges from 1 to n. Each parameter is further divided into a normal operating range, a warning threshold range, a danger threshold range, and a danger threshold exceedance range. The BMC can assign a deviation score si based on which range the real-time value of each parameter falls into. For instance, if parameter vi is within the preset normal operating range, it indicates that the equipment is operating normally, and the deviation score si is 0; if parameter vi falls within the warning threshold range, it indicates a potential risk for that parameter, and the deviation score si is 1; if parameter vi falls within the danger threshold range, it indicates an abnormal operation or high-risk fault, and the deviation score si is 2; if parameter vi falls within the danger threshold exceedance range, it indicates an emergency anomaly for that parameter, and the deviation score si is 3.

[0057] After calculating the deviation scores of all equipment operating parameters, and combining the weight ratio of each equipment operating parameter (e.g., the sum of all weights is fixed at 1), the overall equipment health H of the server is obtained through a weighted summation calculation. That is, the larger the value of the equipment health H, the worse the equipment health status.

[0058] Correspondingly, BMC can collect data and update the device health status H every second. It can not only reflect the current operating health status of the server in real time, but also predict the trend of device operating status by recording the changes in the device health status H value, providing reliable data reference for subsequent adjustments to the log storage method.

[0059] It should be noted that the specific method for determining the current log storage mode based on log anomaly confidence or log anomaly confidence and device health in this step can be set by the designer. For example, it can be set according to the number of preset log storage modes. If the preset log storage modes include lightweight storage mode (or normal operation mode), enhanced storage mode (or potential hazard monitoring mode), and secure storage mode (or fault protection mode), this step can determine the current log storage mode as lightweight storage mode when the device health is below (i.e., less than) the first state threshold and the log anomaly confidence is below the first anomaly threshold; and when the device health is between the first and second state thresholds (i.e., greater than or equal to the first state threshold and less than or equal to the second state threshold) and the log anomaly confidence is not higher than... When the log anomaly confidence level is less than or equal to the second anomaly threshold, or when the log anomaly confidence level is between the first and second anomaly thresholds and the device health level is not higher than the second state threshold, the current log storage mode is determined to be enhanced storage mode; when the device health level is higher than (i.e., greater than) the second state threshold, or when the log anomaly confidence level is higher than the second anomaly threshold, the current log storage mode is determined to be secure storage mode; wherein, the second state threshold is greater than the first state threshold, and the second anomaly threshold is greater than the first anomaly threshold; lightweight storage mode is used to store log semantic fingerprints using local non-volatile memory; enhanced storage mode is used to store raw log data for a first preset duration using local non-volatile memory; secure storage mode is used to store raw log data for a second preset duration using local non-volatile memory; the second preset duration is greater than the first preset duration.

[0060] Correspondingly, when the preset log storage mode includes two (such as lightweight storage mode and security storage mode) or more than three modes, the current log storage mode can be determined by setting the corresponding threshold. This embodiment does not impose any restrictions on this.

[0061] Step 104: Based on the current log storage mode, store the log semantic fingerprint and / or raw log data using local non-volatile memory.

[0062] In this step, log semantic fingerprints and / or raw log data can be stored in local non-volatile memory according to the current log storage mode, so as to achieve adaptive selection and data storage of different preset log storage modes.

[0063] Correspondingly, the specific method for storing log semantic fingerprints and / or raw log data using local non-volatile memory according to the current log storage mode in this step can be set by the designer. For example, if the preset log storage mode includes three modes: lightweight storage mode, enhanced storage mode, and security storage mode, then when the current log storage mode is lightweight storage mode, the log semantic fingerprint can be stored in the log storage area of ​​the local non-volatile memory; when the current log storage mode is enhanced storage mode, the raw log data of the first preset duration in the local volatile memory can be stored in the log storage area; and when the current log storage mode is security storage mode, the raw log data of the second preset duration in the local volatile memory can be stored in the log storage area, and the raw log data of the second preset duration is redundantly backed up to the server.

[0064] For example, when the device health level H is less than the first state threshold H1, and the log anomaly confidence level C is also less than the first anomaly threshold C1, it indicates that the overall device operation is stable and there are no potential anomalies. In this case, the BMC only needs to store the simplified log semantic fingerprint for a long time. The original log buffer in memory is updated normally in a loop, without having to save the original log data to the local Flash, thus minimizing storage space occupation and Flash read / write wear.

[0065] When the device health level H is between H1 and the second state threshold H2, and the log anomaly confidence level C is not greater than the second anomaly threshold C2, or when the log anomaly confidence level C is between C1 and C2, and the device health level H is not greater than H2, it indicates that the device has some potential operational problems, or that the raw log data contains suspicious anomalies. To avoid missing any issues, the BMC can automatically save the most recent complete raw log data from the memory buffer to the BMC's local Flash memory, recording detailed device operation information. The default log retention time is set to 2 hours, which is sufficient to investigate most potential problems.

[0066] When the device health status H is greater than H2, or the log anomaly confidence level C is greater than C2, it indicates that the device is in a high-risk operating state, and a fault can be basically confirmed. At this time, the BMC can enable the highest level of log preservation function, recording all original log content completely throughout the entire process, extending the log retention time to 24 hours, and automatically enabling the bus backup function to synchronously back up the original log data to the server (such as the main CPU), completely eliminating the loss of fault logs through dual backup. Among them, H1 and H2 are the classification thresholds of device health status, and C1 and C2 are the classification thresholds of log anomaly degree, and they are fixed to satisfy the relationship of H1 < H2 and C1 < C2. All threshold parameters can be flexibly adjusted and adapted according to different server models and different operation and maintenance scenarios. This embodiment does not impose any restrictions on this.

[0067] Correspondingly, when the BMC switches from lightweight storage mode to enhanced storage mode or secure storage mode, it can immediately perform a log dump operation to completely write the original logs that have not yet been saved in memory to Flash. When the device is repaired and restored to normal operation (i.e., lightweight storage mode), it can automatically clean up old logs that have exceeded the retention period, release the occupied storage space, and ensure the rational use of resources.

[0068] Furthermore, to eliminate the reliance on the network for log transmission, this embodiment utilizes the idle resources of the server's internal bus to build an independent log backup channel. This requires no additional hardware and does not consume external network bandwidth, achieving redundant backup entirely through idle bus piggyback transmission using existing hardware resources. For example, the method provided in this embodiment may further include: monitoring the load status of the internal communication bus between the baseboard management controller and the main central processing unit; when the load status meets preset idle conditions and the current log storage mode indicates redundant backup, encapsulating the log data to be backed up into low-priority data packets, and using the idle bandwidth of the internal communication bus to transmit the low-priority data packets to the server for storage; wherein the log data to be backed up includes log semantic fingerprints and / or raw log data.

[0069] For example, the BMC can monitor the load status of various internal communication buses such as PCIe, LPC, and eSPI between itself and the main CPU, calculate the bus utilization rate, and accurately determine whether the bus is idle. When the bus utilization rate is detected to be below the preset idle standard of 30%, the module will package the raw log data that needs to be backed up into a low-priority transmission data packet. The data packet can include data type, serial number, collection time, raw log data, and verification information to ensure data integrity and traceability during transmission. Then, the packaged low-priority data packet is added to the bus transmission queue, and the data transmission is completed during the bus idle time interval. Furthermore, the transmission priority of this type of low-priority data packet can be lower than that of core management commands such as device sensor queries and power control, and will absolutely not affect the normal core business operation of the server.

[0070] Correspondingly, after low-priority data packets are transmitted to the main CPU via the internal bus, they are uniformly saved to the main CPU's reserved memory space or a designated partition on the hard drive. The main CPU can automatically complete the reception, organization, and saving of logs using a running lightweight receiving program. The BMC can monitor the transmission status of each log entry, and for low-priority data packets that fail to transmit, they can be automatically retransmitted the next time the bus is idle, ensuring a high backup success rate.

[0071] The lightweight storage mode and enhanced storage mode can be used to instruct redundant backups when the local non-volatile memory (i.e., BMC local storage space) is insufficient, thus achieving dual backup. In the secure storage mode, redundant backups can be directly instructed. For example, when the load condition meets preset idle conditions, raw log data for a second preset duration is encapsulated into low-priority data packets, and the low-priority data packets are transmitted to the server for storage using the idle bandwidth of the internal communication bus. Furthermore, since the server may be in a high-risk fault state in secure storage mode, the priority and frequency of log transmission can be automatically increased to enhance the log backup effect. That is, the priority and transmission frequency of low-priority data packets corresponding to secure storage mode can be higher than those corresponding to low-priority data packets in lightweight and enhanced storage modes.

[0072] Furthermore, to address the issue of log data loss after a BMC (Browser Control Center) failure and restart, the method provided in this embodiment may also include an automatic BMC fault preservation process. This process automatically saves complete fault scene data under various fault scenarios, such as excessive BMC temperature, abnormal memory usage, core process disconnection, and system crash. The method provided in this embodiment may also include: monitoring BMC operating parameters; detecting the existence of a preset BMC fault based on the BMC operating parameters; and if so, setting the device health level to the maximum value to forcibly enable the highest-level preset log storage mode (such as the aforementioned preservation storage mode).

[0073] Correspondingly, when the current log storage mode is the preservation storage mode, the aforementioned process of redundantly backing up the original log data for the second preset duration to the server can store the fault scene data in a dedicated preservation area in the local non-volatile memory. This fault scene data includes the original log data for the second preset duration, log semantic fingerprints in the log storage area, device sensor data, system process lists, and memory usage. The fault scene data in the dedicated preservation area is redundantly backed up to the server. In other words, in preservation storage mode, an emergency data dump operation can be initiated to uniformly save the recent original log data, log semantic fingerprints, real-time device sensor data, system process lists, memory usage, and other fault scene data from the BMC memory to a separately allocated dedicated preservation area in the BMC Flash. This storage space is isolated from the ordinary log storage area, preventing circular overwriting and thus permanently securing the fault scene data.

[0074] Correspondingly, the process of redundantly backing up the fault scene data in the dedicated security area to the server can be configured by the designer. In some embodiments, this process can transmit all fault scene data to the server for storage via the internal communication bus with the highest priority to complete a secondary backup. Through a dual approach of local isolated storage and device bus backup, the loss of fault scene data is completely avoided. In other embodiments, when the load condition meets preset idle conditions, the process can encapsulate the fault scene data into low-priority data packets and utilize the idle bandwidth of the internal communication bus to transmit these low-priority data packets to the server for storage.

[0075] Correspondingly, after the BMC completes the restart and reset, maintenance personnel can read the fault site data stored in the maintenance area at any time through remote control commands or server communication interfaces, and use it to analyze the cause of the BMC fault offline and complete the problem tracing.

[0076] In this embodiment, the present invention determines the current log storage mode based on log anomaly confidence or log anomaly confidence and device health, thereby sensing the server's operating status and selecting the appropriate log storage mode to store log content, improving the flexibility of log storage. By using local non-volatile memory to store log semantic fingerprints and / or raw log data according to the current log storage mode, the dependence on the network can be reduced, and the possibility of log loss can be reduced. Furthermore, by converting raw log data into log semantic fingerprints, the stored log content can be simplified, achieving lightweight log storage.

[0077] Corresponding to the above method embodiments, this invention also provides a log storage device for a baseboard management controller. The log storage device for a baseboard management controller described below and the log storage method for a baseboard management controller described above can be referred to in correspondence.

[0078] Please refer to Figure 3 , Figure 3 This is a structural block diagram of a log storage device for a baseboard management controller provided in an embodiment of the present invention. The device is applied to a baseboard management controller and may include: The feature extraction module 10 is used to extract features from the acquired raw log data and generate log semantic fingerprints based on the extracted log features; wherein, the raw log data includes serial port logs; The confidence determination module 20 is used to determine the confidence level of log anomalies based on the log semantic fingerprint; The mode determination module 30 is used to determine the current log storage mode based on the log anomaly confidence level or the log anomaly confidence level and the device health level; wherein, the device health level is the health level of the server where the baseboard management controller is located, determined based on the obtained device operating parameters; the current log storage mode is any preset log storage mode, and at least one of the log storage granularity, retention time and storage location is different for different preset log storage modes; The log storage module 40 is used to store log semantic fingerprints and / or raw log data using local non-volatile memory according to the current log storage mode.

[0079] In some embodiments, the feature extraction module 10 may include: The splitting submodule is used to split the original log data into independent log records according to the newline identifier; The classification submodule is used to divide the log data in each independent log record into data of various preset log types; among which, the preset log types include numerical logs and text logs; The extraction submodule is used to extract the log features of each independent log record according to the extraction method corresponding to each preset log type. The integration submodule is used to integrate the log features of each independent log record to obtain the log semantic fingerprint of each independent log record.

[0080] In some embodiments, the extraction submodule may include: The numerical extraction unit is used to extract statistical features from the numerical log data as log features if the current log record includes numerical log data; wherein the statistical features include at least one of the following: mean, variance, rate of change, maximum value, and minimum value; The text extraction unit is used to extract core keywords from the text log data if the current log record includes text log data, and match the core keywords with a preset device event dictionary to obtain the event type code as the log feature.

[0081] In some embodiments, the confidence determination module 20 may be specifically used to select log semantic fingerprints within a continuous time window as analysis samples and use an anomaly detection algorithm to calculate the log anomaly confidence level.

[0082] In some embodiments, the confidence determination module 20 may include: The anomaly detection submodule is used to perform anomaly detection based on the log semantic fingerprint of a preset number of anomaly analyses within a continuous time window, using the 3σ criterion and / or the isolated forest algorithm, to obtain the log anomaly confidence score; wherein the log anomaly confidence score ranges from 0 to 1.

[0083] In some embodiments, the mode determination module 30 may be specifically used to determine the current log storage mode based on the log anomaly confidence level and device health level; The device may also include: The parameter acquisition module is used to acquire device operating parameters; among which, the device operating parameters include at least two of the following: CPU temperature, operating voltage, motherboard temperature, number of communication bus errors, memory error correction rate, and fan speed. The health determination module is used to determine the health of each device based on the degree of deviation of its operating parameters from its corresponding normal operating range.

[0084] In some embodiments, the health determination module may include: The interval identification submodule is used to identify the target operating interval where the current operating parameter is located; wherein, the current operating parameter is the operating parameter of any device, and the target operating interval is the normal operating interval, warning threshold interval, danger threshold interval, or danger threshold exceeding interval corresponding to the current operating parameter; The score determination submodule is used to determine the preset score corresponding to the target operating range as the deviation score of the current operating parameters; The calculation submodule is used to perform a weighted summation of the deviation scores of each device's operating parameters according to their respective weights, in order to obtain the device health score.

[0085] In some embodiments, the preset log storage mode includes a lightweight storage mode, an enhanced storage mode, and a secure storage mode; the lightweight storage mode is used to store log semantic fingerprints using local non-volatile memory; the enhanced storage mode is used to store raw log data for a first preset duration using local non-volatile memory; and the secure storage mode is used to store raw log data for a second preset duration using local non-volatile memory; the second preset duration is longer than the first preset duration. The pattern determination module 30 may include: The first determination submodule is used to determine that the current log storage mode is lightweight storage mode if the device health is lower than the first state threshold and the log anomaly confidence level is lower than the first anomaly threshold. The second determining submodule is used to determine the current log storage mode as enhanced storage mode if the device health is between the first state threshold and the second state threshold and the log anomaly confidence level is not higher than the second anomaly threshold, or if the log anomaly confidence level is between the first anomaly threshold and the second anomaly threshold and the device health is not higher than the second state threshold; wherein the second state threshold is greater than the first state threshold and the second anomaly threshold is greater than the first anomaly threshold. The third determination submodule is used to determine the current log storage mode as the preservation storage mode if the device health level is higher than the second state threshold or the log anomaly confidence level is higher than the second anomaly threshold.

[0086] In some embodiments, the log storage module 40 may include: The first backup submodule is used to store log semantic fingerprints in the log storage area of ​​local non-volatile memory if the current log storage mode is lightweight storage mode. The second backup submodule is used to store the original log data of a first preset duration in the local volatile memory to the log storage area if the current log storage mode is enhanced storage mode. The third backup submodule is used to store the original log data of the second preset duration in the local volatile memory to the log storage area if the current log storage mode is the preservation storage mode, and to redundantly back up the original log data of the second preset duration to the server.

[0087] In some embodiments, the third backup submodule may include: The preservation storage unit is used to store fault scene data in a dedicated preservation area in local non-volatile memory; wherein, the fault scene data includes raw log data of a second preset duration, log semantic fingerprints in the log storage area, device sensor data, system process list and memory usage; The backup unit is used to redundantly back up the fault scene data in the dedicated backup area to the server.

[0088] In some embodiments, the device may further include: The bus monitoring module is used to monitor the load status of the internal communication bus between the baseboard management controller and the main central processing unit. The idle backup module is used to encapsulate the log data to be backed up into low-priority data packets when the load condition meets the preset idle conditions and the current log storage mode indicates that redundant backup is to be performed. The low-priority data packets are then transmitted to the server for storage using the idle bandwidth of the internal communication bus. The log data to be backed up includes log semantic fingerprints and / or raw log data.

[0089] In some embodiments, the preset idle condition includes a load utilization rate below an idle utilization rate threshold; lightweight storage mode and enhanced storage mode are used to instruct redundant backups when the storage space of local non-volatile memory is insufficient.

[0090] In some embodiments, the third backup submodule may include: The idle backup unit is used to encapsulate the raw log data for a second preset duration into low-priority data packets when the load condition meets the preset idle conditions, and to transmit the low-priority data packets to the server for storage using the idle bandwidth of the internal communication bus; wherein, the priority and transmission frequency of the low-priority data packets corresponding to the preservation storage mode are higher than the priority and transmission frequency of the low-priority data packets corresponding to the lightweight storage mode and the enhanced storage mode.

[0091] In this embodiment, the mode determination module 30 determines the current log storage mode based on the log anomaly confidence level or the log anomaly confidence level and device health. This allows the system to perceive the server's operating status and select the appropriate log storage mode to store log content, thus improving the flexibility of log storage. The log storage module 40, based on the current log storage mode, uses local non-volatile memory to store log semantic fingerprints and / or raw log data, reducing reliance on the network and minimizing log loss. Furthermore, by converting raw log data into log semantic fingerprints, the stored log content is streamlined, achieving lightweight log storage.

[0092] Corresponding to the above method embodiments, this invention also provides a baseboard management controller. The baseboard management controller described below and the log storage method of the baseboard management controller described above can be referred to each other.

[0093] Please refer to Figure 4 , Figure 4 This is a schematic diagram of a substrate management controller provided in an embodiment of the present invention. The device may include: Memory D1 is used to store computer programs; The processor D2 is used to implement the steps of the log storage method for the baseboard management controller provided in the above method embodiments when executing a computer program.

[0094] Corresponding to the above method embodiments, this invention also provides a server. The server described below and the log storage method of the baseboard management controller described above can be referred to in correspondence.

[0095] A server includes: a main CPU and a baseboard management controller as provided in the previous embodiment; wherein the baseboard management controller is communicatively connected to the main CPU via an internal communication bus.

[0096] Corresponding to the above method embodiments, this invention also provides a computer program product. The computer program product described below and the log storage method of the baseboard management controller described above can be referred to in correspondence.

[0097] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the log storage method for the baseboard management controller provided in the above-described method embodiments.

[0098] Corresponding to the above method embodiments, this invention also provides a computer-readable storage medium. The computer-readable storage medium described below and the log storage method of the baseboard management controller described above can be referred to in correspondence.

[0099] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the log storage method of the baseboard management controller described in the above method embodiments.

[0100] The computer-readable storage medium can specifically be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other readable storage medium capable of storing program code.

[0101] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus, board management controller, server, computer program product, and computer-readable storage medium disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.

[0102] The log storage method, apparatus, and baseboard management controller of the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A log storage method for a baseboard management controller, characterized in that, Applications to baseboard management controllers include: Feature extraction is performed on the acquired raw log data, and log semantic fingerprints are generated based on the extracted log features; wherein, the raw log data includes serial port logs; Based on the log semantic fingerprint, determine the log anomaly confidence level; The current log storage mode is determined based on the log anomaly confidence level or the log anomaly confidence level and the device health level; wherein, the device health level is the health level of the server where the baseboard management controller is located, determined based on the obtained device operating parameters; the current log storage mode is any preset log storage mode, and at least one of the log storage granularity, retention time and storage location is different for different preset log storage modes; Based on the current log storage mode, the log semantic fingerprint and / or the original log data are stored using local non-volatile memory.

2. The log storage method for the baseboard management controller according to claim 1, characterized in that, The step of extracting features from the acquired raw log data and generating log semantic fingerprints based on the extracted log features includes: The original log data is divided into independent log records according to the newline identifier; The log data in each of the independent log records is divided into data of each preset log type; wherein, the preset log types include numerical logs and text logs; Extract the log features of each independent log record according to the extraction method corresponding to each preset log type; The log features of each independent log record are integrated to obtain the log semantic fingerprint of each independent log record.

3. The log storage method for the baseboard management controller according to claim 2, characterized in that, The step of extracting log features of each independent log record according to the extraction method corresponding to each preset log type includes: If the current log record includes data from the numerical log, then statistical features are extracted from the numerical log data as the log features; wherein, the statistical features include at least one of the following: mean, variance, rate of change, maximum value, and minimum value; If the current log record includes the data of the text log, then extract the core keywords from the text log data, and match the core keywords with the preset device event dictionary to obtain the event type code as the log feature.

4. The log storage method for the baseboard management controller according to claim 1, characterized in that, Determining the log anomaly confidence level based on the log semantic fingerprint includes: Log semantic fingerprints within a continuous time window are selected as analysis samples, and the log anomaly confidence is calculated using an anomaly detection algorithm.

5. The log storage method for the baseboard management controller according to claim 4, characterized in that, Log semantic fingerprints within a continuous time window are selected as analysis samples, and anomaly detection algorithms are used to calculate the log anomaly confidence, including: Based on the log semantic fingerprint of the preset number of anomaly analyses within the continuous time window, anomaly detection is performed using the 3σ criterion and / or the isolated forest algorithm to obtain the log anomaly confidence score; wherein the value of the log anomaly confidence score ranges from 0 to 1.

6. The log storage method for the baseboard management controller according to claim 1, characterized in that, The step of determining the current log storage mode based on the log anomaly confidence level or the log anomaly confidence level and device health includes: The current log storage mode is determined based on the log anomaly confidence level and device health level. Before determining the current log storage mode based on the log anomaly confidence level and device health level, the method further includes: Obtain the device operating parameters; wherein the device operating parameters include at least two of the following: CPU temperature, operating voltage, motherboard temperature, number of communication bus errors, memory error correction rate, and fan speed; The health status of each device is determined based on the degree of deviation of its operating parameters from its corresponding normal operating range.

7. The log storage method for the baseboard management controller according to claim 6, characterized in that, The step of determining the health status of each device based on the degree of deviation of its operating parameters from its corresponding normal operating range includes: Identify the target operating range where the current operating parameter is located; wherein, the current operating parameter is any of the device operating parameters, and the target operating range is the normal operating range, warning threshold range, danger threshold range, or danger threshold range corresponding to the current operating parameter; The preset score corresponding to the target operating range is determined as the deviation score of the current operating parameters; The deviation scores of each of the equipment operating parameters are weighted and summed according to their respective weights to obtain the equipment health score.

8. The log storage method for the baseboard management controller according to any one of claims 1 to 7, characterized in that, The preset log storage modes include a lightweight storage mode, an enhanced storage mode, and a secure storage mode; the lightweight storage mode is used to store the log semantic fingerprint using the local non-volatile memory; The enhanced storage mode is used to store raw log data for a first preset duration using the local non-volatile memory; The preservation storage mode is used to store the original log data for a second preset duration using the local non-volatile memory; The second preset duration is longer than the first preset duration; The step of determining the current log storage mode based on the log anomaly confidence level or the log anomaly confidence level and device health includes: If the device health is lower than the first state threshold and the log anomaly confidence level is lower than the first anomaly threshold, then the current log storage mode is determined to be the lightweight storage mode. If the device health is between the first state threshold and the second state threshold and the log anomaly confidence level is not higher than the second anomaly threshold, or if the log anomaly confidence level is between the first anomaly threshold and the second anomaly threshold and the device health is not higher than the second state threshold, then the current log storage mode is determined to be the enhanced storage mode; wherein, the second state threshold is greater than the first state threshold, and the second anomaly threshold is greater than the first anomaly threshold; If the device health is higher than the second state threshold, or the log anomaly confidence level is higher than the second anomaly threshold, then the current log storage mode is determined to be the preservation storage mode.

9. The log storage method for the baseboard management controller according to claim 8, characterized in that, The step of storing the log semantic fingerprint and / or the original log data using local non-volatile memory according to the current log storage mode includes: If the current log storage mode is the lightweight storage mode, then the log semantic fingerprint is stored in the log storage area of ​​the local non-volatile memory; If the current log storage mode is the enhanced storage mode, then the original log data of the first preset duration in the local volatile memory is stored in the log storage area. If the current log storage mode is the secure storage mode, then the original log data of the second preset duration in the local volatile memory is stored in the log storage area, and the original log data of the second preset duration is redundantly backed up to the server.

10. The log storage method for the baseboard management controller according to claim 9, characterized in that, The step of redundantly backing up the original log data for the second preset duration to the server includes: The fault scene data is stored in a dedicated preservation area in the local non-volatile memory; wherein, the fault scene data includes the original log data of the second preset duration, the log semantic fingerprint in the log storage area, device sensor data, system process list and memory usage; The fault scene data in the dedicated security area is redundantly backed up to the server.

11. The log storage method for the baseboard management controller according to claim 9, characterized in that, Also includes: Monitor the load status of the internal communication bus between the baseboard management controller and the main central processing unit; When the load state meets the preset idle condition and the current log storage mode indicates redundant backup, the log data to be backed up is encapsulated into low-priority data packets, and the low-priority data packets are transmitted to the server for storage using the idle bandwidth of the internal communication bus; wherein, the log data to be backed up includes the log semantic fingerprint and / or the original log data.

12. The log storage method for the baseboard management controller according to claim 11, characterized in that, The preset idle conditions include a load utilization rate lower than an idle utilization rate threshold; the lightweight storage mode and the enhanced storage mode are used to instruct redundant backups when the storage space of the local non-volatile memory is insufficient.

13. The log storage method for the baseboard management controller according to claim 11, characterized in that, The step of redundantly backing up the original log data for the second preset duration to the server includes: When the load condition meets the preset idle condition, the raw log data of the second preset duration is encapsulated into the low-priority data packet, and the low-priority data packet is transmitted to the server for storage using the idle bandwidth of the internal communication bus; wherein, the priority and transmission frequency of the low-priority data packet corresponding to the preservation storage mode are higher than the priority and transmission frequency of the low-priority data packet corresponding to the lightweight storage mode and the enhanced storage mode.

14. A log storage device for a baseboard management controller, characterized in that, Applications to baseboard management controllers include: The feature extraction module is used to extract features from the acquired raw log data and generate log semantic fingerprints based on the extracted log features; wherein, the raw log data includes serial port logs; The confidence determination module is used to determine the confidence level of log anomalies based on the log semantic fingerprint. The mode determination module is used to determine the current log storage mode based on the log anomaly confidence level or the log anomaly confidence level and the device health level; wherein, the device health level is the health level of the server where the baseboard management controller is located, determined based on the acquired device operating parameters; the current log storage mode is any preset log storage mode, and at least one of the log storage granularity, retention time and storage location is different for different preset log storage modes; The log storage module is used to store the log semantic fingerprint and / or the original log data using local non-volatile memory according to the current log storage mode.

15. A baseboard management controller, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the log storage method of the baseboard management controller as described in any one of claims 1 to 13 when executing the computer program.