A method, device, equipment and medium for judging and resetting a bare metal exception

CN122673048APending Publication Date: 2026-09-01HANGZHOU WULIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610969370.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-30
Publication Date
2026-09-01

AI Technical Summary

Technical Problem

为了降低偶发性噪声对平台稳定性的影响,现有系统通常基于异常次数累计、固定阈值比较或简单时间窗口统计的方式决定是否触发处置,容易导致判罚结果不精准

Benefits of technology

[0036]为每一裸金属的每一异常类型独立维护状态滑窗,降低不同裸金属和不同异常类型之间的状态统计干扰;接收到目标裸金属的针对目标异常类型的当前事件类型后,定位对应的状态滑窗,按事件发生的时间顺序写入状态,通过正常恢复状态和异常状态联合写入机制,提高系统对恢复场景的识别能力;基于写入当前事件类型对应的状态的状态滑窗中的状态组合信息,判断是否命中与目标裸金属的所述目标异常类型对应的异常规则;当状态组合信息命中异常规则时,及时生成并下发处置指令;在指令执行成功后立即对滑窗执行复位操作,清除了已处置异常的旧状态,通过处置完成后的窗口复位机制,减少同一异常链条上的重复判罚。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122673048A_ABST
    Figure CN122673048A_ABST
Patent Text Reader

Abstract

This application relates to the field of bare metals, and in particular to a method, apparatus, device, and medium for bare metal anomaly judgment and reset. The method includes: independently maintaining a state sliding window for each anomaly type of each bare metal to reduce statistical interference between different bare metals and different anomaly types; upon receiving the current event type of the target bare metal for the target anomaly type, locating the corresponding state sliding window, writing the state in chronological order of event occurrence, and improving the system's ability to identify recovery scenarios through a joint writing mechanism of normal recovery state and abnormal state; based on the state combination information in the state sliding window corresponding to the current event type, determining whether it matches the anomaly rule corresponding to the target anomaly type of the target bare metal; when the state combination information matches the anomaly rule, promptly generating and issuing a handling instruction; and immediately resetting the sliding window after successful instruction execution to reduce duplicate judgments on the same anomaly chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of bare metals, and in particular to a method, apparatus, equipment, and medium for judging and resetting abnormalities in bare metals. Background Technology

[0002] With the increasing application of bare-metal computing nodes in scenarios such as cloud desktops, rendering computing, inference training, and edge operation, the platform needs to identify anomalies such as blue screen disconnections, system freezes, startup failures, and hardware malfunctions during bare-metal operation. It also needs to automatically perform penalty deductions, disabling, or other actions based on the severity of the anomaly. To reduce the impact of occasional noise on platform stability, existing systems typically determine whether to trigger actions based on the accumulation of anomaly counts, comparisons of fixed thresholds, or simple time window statistics, which can easily lead to inaccurate judgment results.

[0003] Therefore, how to provide a new method for judging and resetting bare metal anomalies so that the platform can improve the accuracy of judgment is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0004] The purpose of this application is to provide a method, apparatus, device, and medium for judging and resetting bare metal anomalies, which can improve the accuracy of judgment.

[0005] Firstly, a method for judging and resetting bare metal anomalies is provided, including:

[0006] In response to receiving the current event type for the target abnormality type of the target bare metal, a status sliding window for the target abnormality type of the target bare metal is located, wherein the current event type includes one of a final confirmed abnormality event and a recovery event; for each abnormality type of the target bare metal, there is a corresponding status sliding window including the status corresponding to the abnormal event and the status corresponding to the recovery event;

[0007] Write the status corresponding to the current event type into the status sliding window in the order of the event occurrence time;

[0008] Based on the state combination information in the state sliding window corresponding to the state of the current event type, determine whether the exception rule corresponding to the target exception type of the target bare metal is hit;

[0009] When an exception rule is hit, a handling instruction for the target exception type is generated and issued.

[0010] After confirming that the processing instruction has been executed successfully, a reset operation is performed on the status slider that contains the status corresponding to the current event type.

[0011] In a preferred embodiment, this application can be further configured to: write the state corresponding to the current event type into the state sliding window according to the chronological order of the event occurrence, including:

[0012] Write the state corresponding to the current event type into the state sliding window according to the chronological order of the events.

[0013] After writing the state corresponding to the current event type, historical states that exceed the preset window length of the state slider are discarded.

[0014] In a preferred embodiment, this application can be further configured as follows: based on the state combination information in the state sliding window corresponding to the current event type, determine whether an exception rule corresponding to the target anomaly type of the target bare metal is matched, including: based on the state sliding window corresponding to the current event type, determining the data type according to the rules required for all anomaly types of the target bare metal, determining the data corresponding to the rule-determined data type of the state sliding window corresponding to the current event type as the first state combination information; obtaining the exception rule corresponding to the target anomaly type of the target bare metal; determining the data to be compared from the state combination information according to the exception rule corresponding to the target anomaly type of the target bare metal; performing rule determination on the data to be compared according to the exception rule corresponding to the target anomaly type of the target bare metal to obtain a determination result;

[0015] Alternatively, obtain the anomaly rule corresponding to the target anomaly type of the target bare metal; based on the state sliding window corresponding to the current event type, determine the data to be compared with the anomaly rule corresponding to the target anomaly type of the target bare metal, as the second state combination information; perform rule judgment on the second state combination information according to the anomaly rule corresponding to the target anomaly type of the target bare metal, and obtain the judgment result.

[0016] In a preferred embodiment, this application may be further configured to include:

[0017] When an exception rule is not hit, or when the number of times the handling instruction fails to be executed reaches a preset number, the current state of the status window is retained.

[0018] In a preferred embodiment, this application can be further configured to include, before determining whether an anomaly rule corresponding to the target anomaly type of the target bare metal is hit based on the state combination information in the state sliding window corresponding to the state of the current event type:

[0019] Based on the target anomaly type of the target bare metal, the corresponding anomaly rule is determined from the preset mapping and handling rule relationship.

[0020] In a preferred embodiment, this application can be further configured to: when an anomaly rule is hit, generate and issue a handling instruction for the target anomaly type, including:

[0021] When an exception rule is hit, the corresponding handling method is determined from the preset mapping handling method relationship according to the target exception type;

[0022] The corresponding handling instructions are generated and issued according to the handling method.

[0023] In a preferred embodiment, this application may be further configured to include:

[0024] Obtain the total score of the target bare metal; the total score is the sum of the scores of each anomaly type for which the target bare metal is to be processed.

[0025] When the total score of the target bare metal reaches a preset score threshold, an alarm is generated.

[0026] Secondly, a bare metal anomaly detection and reset device is provided, comprising:

[0027] The response module is used to respond to the current event type of the target bare metal for the target anomaly type received, and to locate the status sliding window of the target bare metal for the target anomaly type, wherein the current event type includes one of a final confirmed anomaly event and a recovery event; for each anomaly type of the target bare metal, there is a corresponding status sliding window including the status corresponding to the anomaly event and the status corresponding to the recovery event;

[0028] The status writing module is used to write the status corresponding to the current event type into the status sliding window in the order of the event occurrence time.

[0029] The hit determination module is used to determine whether the anomaly rule corresponding to the target anomaly type of the target bare metal is hit based on the state combination information written in the state sliding window corresponding to the current event type.

[0030] The module for issuing handling instructions is used to generate and issue handling instructions for the target anomaly type when an anomaly rule is hit.

[0031] The reset module is used to perform a reset operation on the status sliding window that contains the status corresponding to the current event type after confirming that the disposal instruction has been executed successfully.

[0032] Thirdly, an electronic device is provided, the electronic device including a memory and a processor, the memory storing a computer program, the processor executing the method of any one of the first aspects when running the computer program.

[0033] Fourthly, a computer-readable storage medium is provided, wherein at least one piece of program code is stored therein, the program code being loaded and executed by a processor to implement the method as described in any of the first aspects.

[0034] Fifthly, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the method as described in any of the first aspects.

[0035] In summary, the bare metal anomaly detection and reset method provided in this application has the following beneficial technical effects:

[0036] A state sliding window is maintained independently for each anomaly type of each bare metal to reduce statistical interference between different bare metals and different anomaly types. After receiving the current event type of the target bare metal for the target anomaly type, the corresponding state sliding window is located, and the state is written in the order of the event occurrence. Through the joint writing mechanism of normal recovery state and abnormal state, the system's ability to identify recovery scenarios is improved. Based on the state combination information in the state sliding window corresponding to the current event type, it is determined whether the anomaly rule corresponding to the target anomaly type of the target bare metal is hit. When the state combination information hits the anomaly rule, a handling instruction is generated and issued in a timely manner. After the instruction is successfully executed, the sliding window is immediately reset to clear the old state of the handled anomaly. Through the window reset mechanism after the handling is completed, duplicate penalties on the same anomaly chain are reduced.

[0037] In addition, this application also provides a bare metal anomaly detection and reset device, equipment and medium, all of which have the above-mentioned beneficial technical effects. Attached Figure Description

[0038] To more clearly illustrate the technical solutions of the embodiments of this application 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 some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a schematic flowchart of a bare metal anomaly judgment and reset method provided in an embodiment of this application;

[0040] Figure 2 This is a schematic diagram of the overall architecture of the dual-state sliding window judgment and reset system in the embodiments of this application;

[0041] Figure 3 This is a flowchart illustrating the process of writing abnormal events and recovery events into an independent state sliding window in an embodiment of this application;

[0042] Figure 4 This is a schematic diagram of the rule determination and processing triggering process based on the dual-state sliding window in this application embodiment;

[0043] Figure 5 This is a schematic diagram of the process of resetting the sliding window after the processing is completed in the embodiments of this application;

[0044] Figure 6 This is a schematic diagram of the structure of a bare metal anomaly detection and reset device provided in an embodiment of this application;

[0045] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0046] This specific embodiment is merely an explanation of this application and is not intended to limit it. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they are within the scope of this application.

[0047] It should be noted that, in the optional embodiments of this application, the data related to object information, when applied to specific products or technologies, requires the permission or consent of the object. Furthermore, the collection, use, and processing of this data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. In other words, if the embodiments of this application involve data related to an object, it must be obtained with the permission and consent of the object, the permission and consent of relevant departments, and in accordance with the relevant laws, regulations, and standards of the country and region. If the embodiments involve personal information, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject is required. The embodiments also need to be implemented with the permission and consent of the object.

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

[0049] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.

[0050] Existing penalty mechanisms mostly only record abnormal states, rarely including normal recovery states in a unified judgment window. When the same bare metal exhibits alternating fluctuations of "abnormal-recovery-abnormal" over a period of time, if the platform only accumulates the number of abnormal events, it often fails to distinguish between continuous abnormalities, intermittent abnormalities, and abnormalities that have already recovered, leading to over-penalization or duplicate penalties. For example, an abnormality may be clearly eliminated by a recovery event after its first trigger, but because the historical abnormality count is not cleared synchronously, the system may still directly trigger a disable function when minor fluctuations occur again later.

[0051] On the other hand, existing rule engines typically lack a reset mechanism linked to the penalty window after successful anomaly handling, causing historical states on the same anomaly chain to remain in the statistical window. When the system deducts points or disables the same bare metal, if the corresponding judgment window is not reset in time, subsequent adjacent events may still hit the same rule, resulting in multiple duplicate penalties. Furthermore, different anomaly types often have different business tolerances; if multiple anomaly types share the same statistical window, cross-type interference may be introduced, reducing the accuracy of the penalty results. Therefore, a new bare metal anomaly penalty and reset method is needed, enabling the platform to maintain bi-state sliding windows containing normal recovery and anomaly states in both the bare metal and anomaly type dimensions. This allows for refined penalty and reset based on the state combination relationship within the sliding window, rule thresholds, and handling completion signals, thereby reducing duplicate penalties and improving the business consistency of automatic handling results.

[0052] This invention relates to the fields of cloud computing operation and maintenance, bare metal resource management, anomaly monitoring, rule judgment and automatic handling, and in particular to a bare metal anomaly judgment and reset method based on a dual-state sliding window of normal recovery state and abnormal state.

[0053] The purpose of this invention is to provide a bare metal anomaly judgment and reset method based on a dual-state sliding window of normal recovery state and abnormal state, so as to solve the problem that the existing technology only accumulates abnormal states, making it difficult to identify recovery scenarios, solves the problem that the historical window is not cleared in time after anomaly handling, resulting in repeated judgments, and solves the problem of inaccurate judgment caused by multiple anomalies sharing the same statistical caliber.

[0054] This application relates to a bare metal anomaly judgment and reset method based on a dual-state sliding window with normal recovery and abnormal states. This method addresses the problems of alternating abnormal and recovery events during bare metal operation, the difficulty in distinguishing between persistent and recovered anomalies by simply accumulating the number of anomalies, the tendency for automatic handling to trigger repeatedly, and the difficulty in timely clearing of the state after handling. It maintains a dual-state sliding window containing normal recovery and abnormal states simultaneously in both the bare metal and anomaly type dimensions, and determines rules based on window length, the number of abnormal states occurring within the window, and the writing status of recovery states. When an anomaly rule is matched, a deduction or disabling command is output, and the corresponding sliding window is reset after handling. This method improves the stability of anomaly judgment, the consistency of business semantics, and the noise resistance of automatic handling.

[0055] This application provides a method for judging and resetting bare metal anomalies, such as... Figure 1 As shown, the method provided in this application embodiment can be executed by an electronic device, and the method includes:

[0056] S101. In response to receiving the current event type for the target abnormality type of the target bare metal, locate the status sliding window of the target abnormality type of the target bare metal;

[0057] The current event type includes either a final confirmed abnormal event or a recovery event; for each abnormal type of the target bare metal, there is a corresponding status window that includes the status corresponding to the abnormal event and the status corresponding to the recovery event.

[0058] The target bare metal refers to the physical bare metal server instance that has experienced an anomaly or failure. The target anomaly type indicates the specific category of failure faced by the bare metal server. The current event type indicates the type of event received by the system regarding the anomaly at the current moment, specifically including a definitively confirmed anomaly event (indicating that after multiple tests or confirmations, the system ultimately determines that the anomaly does exist and needs to be addressed) and a recovery event (indicating that the anomaly has been eliminated and the bare metal server has returned to a normal state). The state window refers to a sequence of state records maintained within a time window for anomaly types, used to store historical event state changes (such as anomaly state or recovery state) related to that anomaly type. The state value corresponding to an anomaly event is marked as the state value where the anomaly occurred in the state window; the state value corresponding to a recovery event is marked as the state value where the anomaly has been recovered in the state window.

[0059] Abnormal types for bare metal include, but are not limited to: processing abnormalities, power-on failure, CPU power saving not turned off, no dedicated GPU, network speed of 100 Mbps, system freeze, GPU abnormality, boot failure, blue screen disconnection, and blue screen disconnection - memory failure.

[0060] This invention does not share a single statistical window for all abnormal events. Instead, it maintains independent state sliding windows for each bare metal and each abnormality type. This ensures that the state statistics of different target bare metals and different abnormal types do not interfere with each other, thereby improving the targeting of rule determination. Furthermore, this invention does not merely accumulate abnormal states; it includes both normal recovery states and abnormal states in the same state sliding window. This allows the system to identify whether an abnormality has been covered by a recovery state during rule determination, thus distinguishing between continuous abnormalities, intermittent abnormalities, and recovered abnormalities.

[0061] In this embodiment, based on the currently received target bare metal identifier and target anomaly type, a unique state sliding window maintained for that anomaly type of the bare metal is located. This state sliding window is a fixed-length sliding window (e.g., retaining a fixed length of state records in chronological order) used to record the occurrence of anomaly events and recovery events in chronological order.

[0062] S102. Write the status corresponding to the current event type into the status sliding window in the order of the event occurrence time;

[0063] In one embodiment, the platform establishes an independent state window for each bare metal and each anomaly type. When a confirmed anomaly event is received, the anomaly state is written into the corresponding state window; when a recovery event corresponding to that anomaly type is received, the normal recovery state is written into the corresponding state window. Preferably, the state window maintains a fixed-length window according to the event time sequence, and discards historical states that exceed the window length after writing a new state.

[0064] S103. Based on the state combination information in the state sliding window corresponding to the current event type, determine whether the exception rule corresponding to the target exception type of the target bare metal is hit.

[0065] State combination information refers to the characteristics formed by one or more state values ​​arranged in chronological order of event occurrence within a state sliding window. State combination information includes the number of times an abnormal state occurs within the state sliding window and the writing order of abnormal and recovery states. Anomaly rules are predefined logical judgment conditions for a specific anomaly type (target anomaly type) of the target bare metal, used to determine whether to trigger the handling process. It is understandable that different bare metals or different anomaly types may have different rule parameters.

[0066] Retrieve the pre-configured anomaly rules for the target bare metal and the target anomaly type. These rules may include one or more condition types, such as: N consecutive anomaly events, anomaly percentage exceeding P% in the most recent M states, or no recovery event received within a specified time window.

[0067] Read all the state sequences in the current time sequence contained in the state window to determine the state combination information.

[0068] In one feasible approach, based on a state sliding window corresponding to the current event type, the data type corresponding to the rule-determined data type of the state sliding window corresponding to the current event type is determined according to the rules required for all anomaly types of the target bare metal, and this data is used as the first state combination information. The anomaly rules corresponding to the target anomaly type of the target bare metal are then obtained. Based on the anomaly rules corresponding to the target anomaly type of the target bare metal, the data to be compared is determined from the state combination information. Rule-determination is then performed on the data to be compared according to the anomaly rules corresponding to the target anomaly type of the target bare metal to obtain the determination result. Specifically, all data corresponding to the rule-determination conditions can be determined in advance based on the entire state sequence according to the rule-determination conditions required for all anomaly types, and this data is used as state combination information. Then, based on the anomaly rules of the target anomaly type, the data to be compared is determined from the state combination information, and then rule-determination is performed on the data to be compared according to the anomaly rules. For example, if anomaly type 1 requires comparing the number of consecutive abnormal states and anomaly type 2 requires comparing the proportion of abnormal states in the state sliding window, then the state combination information determined based on the entire state sequence includes the number of consecutive abnormal states and the proportion of abnormal states. At this time, the rule corresponding to the target anomaly type is that there are 2 consecutive abnormal events. In this case, the number of consecutive abnormal states is filtered out from the state combination information, and then a judgment is made based on the rule.

[0069] In another feasible approach, the anomaly rules corresponding to the target anomaly type of the target bare metal are obtained; based on the state sliding window corresponding to the current event type, the comparison data corresponding to the anomaly rules of the target bare metal's target anomaly type is determined as the second state combination information; and the second state combination information is then judged according to the anomaly rules of the target bare metal's target anomaly type to obtain the judgment result. Specifically, after obtaining the anomaly rules pre-configured for the target bare metal and the target anomaly type, the comparison data corresponding to the anomaly rules is determined based on the time sequence of states in the state sliding window, and then the comparison data is judged according to the anomaly rules.

[0070] Besides the two methods mentioned above, other forms may exist. This application embodiment is not limited to these forms. Users can set them according to actual conditions, as long as they can achieve the purpose of this application embodiment.

[0071] Understandably, if it's necessary to determine the number of consecutive anomalies, the process scans backward from the latest state of the sliding window, counting the length of consecutive anomaly states. If it's necessary to determine the percentage of anomalies, the process iterates through the entire sliding window, counting the ratio of the number of anomaly states to the total number of states. If the rule includes a time limit, only states within the sliding window whose timestamps fall within the most recent time period are counted. Only when all the set conditions are met is the rule considered hit; otherwise, it's considered a miss.

[0072] This invention considers not only the number of times abnormal states occur during rule matching, but also window length and state order, so that the handling trigger conditions can be matched with the business tolerance of different abnormal types.

[0073] In one embodiment, the rule engine performs rule matching based on the state distribution in a state sliding window. For exception types that require a single exception to trigger action, the window length can be configured to one; for exception types that require two consecutive exceptions to trigger action, the window length can be configured to two or more. Preferably, when a normal recovery state overlaps with a previous exception state within the window, the system considers the exception chain to be recovered and blocks further action triggering based on the recovered state.

[0074] S104. When an exception rule is hit, generate and issue a handling instruction for the target exception type.

[0075] In this application, the exception type and the handling instruction correspond. After an exception rule is hit, the corresponding handling instruction can be determined based on the target exception rule and sent to the downstream system. The handling instructions include, but are not limited to, disabling instructions and deducting points instructions.

[0076] S105. After confirming that the disposal instruction has been successfully executed, perform a reset operation on the status slider that contains the status corresponding to the current event type.

[0077] After receiving a message from the downstream system confirming successful execution of the processing command, a reset operation is performed. The reset operation can clear the current status window.

[0078] In one possible implementation, the present invention resets the corresponding state window after the deduction or disabling instruction is successfully executed, instead of continuing to retain the historical state, thereby avoiding the residual state on the same abnormal chain from triggering the same action again when subsequent events occur.

[0079] In this embodiment of the application, by introducing recovery status to participate in the judgment, isolating windows according to the type of abnormality, and performing a reset after the handling, the present invention can reduce the impact of occasional noise, short-term fluctuations and repeated reporting on the automatic handling results, and enhance the judgment stability of the platform in complex operating scenarios.

[0080] As can be seen, in this embodiment, a state sliding window is first maintained independently for each anomaly type. Through a dual-isolation independent sliding window mechanism, the interference of state statistics between different bare metals and different anomaly types is reduced. Based on this, after receiving the current event type of the target bare metal for the target anomaly type, the corresponding state sliding window is located, and the state is written strictly according to the chronological order of the event occurrence. Through a joint writing mechanism of normal recovery state and anomaly state, the system's ability to identify recovery scenarios is improved. Based on the state combination information in the state sliding window corresponding to the current event type, it is determined whether the anomaly rule corresponding to the target anomaly type of the target bare metal is matched. Through a rule-based judgment mechanism based on state combination relationships, the penalty conditions are made more consistent with business semantics. When the state combination information matches the anomaly rule, a handling instruction is generated and issued promptly. Immediately after successful instruction execution, a reset operation is performed on the sliding window, clearing the old state of the handled anomaly. Through the window reset mechanism after handling, duplicate penalties on the same anomaly chain are reduced. Through the interaction of the above technical features and the noise-resistant penalty stability enhancement mechanism, the consistency and stability of the automatic handling results are improved.

[0081] One possible implementation of this application embodiment is to write the state corresponding to the current event type into a state sliding window according to the time sequence of the events, including: writing the state corresponding to the current event type into the state sliding window according to the time sequence of the events; after writing the state corresponding to the current event type, discarding historical states that exceed the preset window length of the state sliding window.

[0082] The preset window length refers to the maximum number of status records or the maximum time range that the system's pre-configured status sliding window can accommodate. Preferably, the preset window length is the maximum time range.

[0083] When the state writing operation is completed, the state sliding window may temporarily contain records exceeding the preset window length. If the window length is defined as the maximum number of records, the total number of state records in the current sliding window is calculated. If the total number exceeds the threshold, the excess number is calculated (e.g., exceeding 1 record). Then, the corresponding number of historical state records are removed sequentially from the beginning of the sliding window (i.e., the earliest time position) until the total number of records equals the preset window length. If the window length is defined as the maximum time range, the timestamps of all state records in the current sliding window are obtained, and all records whose timestamps are earlier than the current time minus the time window length are found. All these historical states that exceed the time range are removed.

[0084] As can be seen, in this embodiment, the states are written into the sliding window in the order of the events, which ensures the correctness of the temporal sequence of the states in the sliding window and avoids state misalignment caused by network latency or message out-of-order. On this basis, historical states that exceed the preset window length are actively discarded after each write, so that the sliding window always retains only the most recent and most relevant event records.

[0085] One possible implementation of this application embodiment further includes: when an exception rule is not hit, or when the number of times the handling instruction fails to be executed reaches a preset number, retaining the current state of the state sliding window.

[0086] The number of times a handling instruction failed to execute refers to the cumulative number of times a handling instruction generated by the system for the current exception type failed to execute or failed to complete confirmation within a specified time after being sent to the downstream system. The preset number of times refers to the maximum number of retries allowed for handling instruction execution failures (e.g., 3 times, 5 times) that the system pre-configured. Users can set this number based on experience.

[0087] Specifically, when the downstream execution system returns a successful handling result, the platform resets the status window of the corresponding bare metal under the corresponding anomaly type, clearing the window status corresponding to the current anomaly chain. If the handling fails, the current status window content is retained and continues to participate in rule judgment when subsequent events occur, thereby avoiding premature loss of judgment basis due to unsuccessful handling.

[0088] When the system determines that the exception rule has not been hit, it means that the combination of state information in the current state window is not sufficient to trigger any exception response action. At this time, the state information already accumulated in the state window should not be disturbed. Therefore, the state window is retained as is without any reset operation, and the system waits for the next event to arrive.

[0089] When an exception rule is hit and a handling instruction is generated, but the instruction fails to execute multiple times on the execution end, and the cumulative number of failures has reached the system's preset threshold (e.g., 3 times), in order to avoid infinite retries consuming system resources or causing erroneous repeated operations, the handling instruction will be stopped from being issued, and the current state of the status window will be retained without any changes.

[0090] As can be seen, in this embodiment of the application, the current state of the status window is retained when the abnormal rule is not hit, so that the accumulated historical state information can continue to participate in the rule judgment of subsequent events, avoiding the loss of state due to clearing the window because the condition is not met once; at the same time, the status of the status window is also retained when the execution of the handling instruction fails to reach a preset number of times, which on the one hand prevents the consumption of system resources by infinite retries, and on the other hand can also retain a complete on-site evidence chain for manual operation and maintenance intervention.

[0091] One possible implementation of this application, before determining whether an exception rule corresponding to the target exception type of the target bare metal is matched based on the state combination information written in the state sliding window corresponding to the current event type, further includes: determining the corresponding exception rule from a preset mapping and handling rule relationship according to the target exception type of the target bare metal. The preset mapping and handling rule relationship refers to a pre-configured association structure used to map combinations of bare metal instances and exception types to unique exception rules.

[0092] In one feasible approach, the unique identifier bm_id of the target bare metal and the target exception type error_code are determined; the corresponding exception rule object is searched from the hash map table in local memory using bm_id and error_code as a composite key; if not found, the search is repeated; and the found exception rule object is returned to the caller.

[0093] As can be seen, in this embodiment, the corresponding abnormal rules are found from the preset mapping and handling rule relationship based on the target bare metal and the target abnormal type. Then, the rule relationship can be adjusted according to actual needs, so that the same abnormal type can be subject to completely different judgment standards in different environments or different business levels. This significantly reduces the operation and maintenance cost of rule changes while ensuring the accuracy of fault response, and avoids frequent version releases caused by hard-coded rules.

[0094] One possible implementation of this application embodiment is to generate and issue a handling instruction for the target exception type when an exception rule is hit, including: when an exception rule is hit, determining the corresponding handling method from a preset mapping handling method relationship according to the target exception type; and generating and issuing the corresponding handling instruction according to the handling method.

[0095] The preset mapping and handling relationship refers to the association structure that is pre-configured by the system to map exception types to handling methods.

[0096] A handling instruction refers to a specific operation command generated based on a determined handling method, which can be executed by downstream components. Handling methods include, for example, disabling instructions and scoring instructions. Based on the target exception type corresponding to the currently matched exception rule, the system searches for the handling method bound to that exception type from the preset mapping handling method relationship. If no corresponding relationship is found, the system can use the default handling method (such as default scoring with a lower score) or refuse handling and record an alarm.

[0097] In this embodiment, the same bare metal can simultaneously maintain multiple independent state windows corresponding to different anomaly types. For example, blue screen disconnection anomaly, boot failure anomaly, and hardware anomaly each correspond to different windows. Each window independently writes its state, independently executes rule judgment, independently outputs handling instructions, and independently executes a reset, thereby avoiding cross-contamination of states between different anomaly types. When a state window hits an anomaly rule, the platform generates a deduction instruction or a disabling instruction based on the handling strategy corresponding to the anomaly type and sends the instruction to the downstream execution system. Preferably, different anomaly types can be mapped to different handling levels, deduction scores, or disabling durations to meet differentiated governance requirements.

[0098] This application may also record the details of each disposal, see Table 1.

[0099] Table 1. Record of Handling Status

[0100]

[0101] As can be seen, in this embodiment of the application, determining the handling method from the preset mapping handling method relationship based on the target anomaly type can improve the flexibility of the system.

[0102] One possible implementation of this application embodiment further includes: obtaining the total score of the target bare metal; the total score is the sum of the scores of each anomaly type of the target bare metal's handling method; when the total score of the target bare metal reaches a preset score threshold, an alarm is generated.

[0103] The preset scoring threshold refers to a critical score (such as 15 points or 30 points) pre-configured by the system. An alarm is triggered when the total score reaches or exceeds this threshold. Users can set this threshold based on experience.

[0104] In this embodiment, a scoring aggregation structure is maintained with the target bare metal as the dimension. When a certain anomaly type triggers a scoring handling method, the score value corresponding to that anomaly type is added to the total score of the bare metal. If score deduction after anomaly recovery is required, the recovery event needs to be monitored, and the corresponding score needs to be subtracted from the total score during recovery. After each change in the total score, the system compares the new total score with a preset scoring threshold. If the total score reaches or exceeds the threshold, the system enters the alarm handling process: generating alarm content, which typically includes the target bare metal identifier, the current total score, the scoring threshold that triggered the alarm, score details, and the time when the score reached the threshold; determining the alarm level (e.g., urgent, severe, warning), generally the higher the level, the more the score exceeds the threshold; selecting the alarm recipient and alarm channel; executing alarm sending and recording alarm logs to prevent duplicate alarms (e.g., setting an alarm cooldown time to avoid repeated triggering in a short period of time). If the total score does not reach the threshold, only the scoring record is updated, and no alarm handling is triggered. It is important to note that once bare metal is disabled, its overall score is usually no longer evaluated, or it is directly marked as unavailable and a highest-level alarm is generated.

[0105] As can be seen, in this embodiment, the scores of all anomaly types for which the target bare metal is handled are summed to obtain a total score, achieving information convergence from a single anomaly dimension to an overall health dimension; when the total score reaches a preset threshold, an alarm is triggered. Quantifying and aggregating the risks of multiple anomaly types can identify potential comprehensive failure risks of bare metal in advance, issuing warnings to maintenance personnel before the failure truly deteriorates, significantly improving the failure prediction capability of bare metal clusters. Consequently, when selecting bare metal resources in the future, more accurate scheduling can be achieved, reducing the occurrence of low system operating efficiency or reliability caused by unreasonable allocation of system resources.

[0106] Based on any of the above embodiments, see Figure 2 , Figure 2 This is a schematic diagram of the overall architecture of the dual-state sliding window judgment and reset system in the embodiments of this application.

[0107] This invention maintains independent state windows for each target bare metal and each anomaly type, and writes the corresponding state into the state window upon receiving a confirmed anomaly or recovery event. Specifically, anomalies correspond to an abnormal state, and recovery events correspond to a normal recovery state. The system executes rules to determine the state windows based on a preset window length, the number of times an abnormal state occurs within the window, and the state order.

[0108] When the state window matches an anomaly rule, the system outputs a deduction or disabling command corresponding to that anomaly type. After successful handling, the system resets the state window for that bare metal under that anomaly type, thus preventing residual states on the same anomaly chain from triggering repeated penalties. By doubly isolating the state window at the bare metal and anomaly type dimensions, and introducing a recovery state participation mechanism for judgment and post-handling reset, this invention improves the granularity and stability of anomaly judgment.

[0109] Specifically, this application provides a specific method, including:

[0110] 1. Receive the final confirmed abnormal event or recovery event of bare metal, and determine the target bare metal identifier and abnormality type identifier corresponding to the event.

[0111] 2. Locate the corresponding independent state sliding window based on the target bare metal identifier and the anomaly type identifier.

[0112] 3. When the event is a confirmed abnormal event, write the abnormal status to the status slider; when the event is a recovery event, write the normal recovery status to the status slider.

[0113] See Figure 3 , Figure 3 This is a flowchart illustrating the process of writing abnormal events and recovery events into an independent state sliding window in this embodiment of the application. The process involves: receiving an abnormal event or recovery event; determining the event type; locating the independent state sliding window based on the bare metal of the sliding window and the abnormality type; determining whether to write an abnormal state or a normal recovery state; and then updating a fixed-length window in chronological order to write the new state and discarding excessively long historical states.

[0114] 4. Perform rule matching on the state sliding window based on the preset window length, the number of times abnormal states occur within the window, the state order, and the coverage of restored states.

[0115] See Figure 4 , Figure 4 This is a schematic diagram of the rule determination and handling triggering process based on the dual-state sliding window in the embodiments of this application.

[0116] Read the target independent state sliding window; determine if it meets the window length / abnormal number / order / recovery overwrite rules; if the rules are not hit, retain the current window state; if the abnormal rules are hit, generate the handling intention, output the handling instruction to deduct points or disable, wait for the execution result, and enter the reset or retain branch.

[0117] 5. When the rule matching result indicates that the status sliding window has hit an abnormal rule, a deduction instruction or a disabling instruction corresponding to the abnormal type is generated.

[0118] 6. Send the deduction or disabling instructions to the downstream execution system and receive the execution results.

[0119] 7. When the disposal execution result indicates that the disposal is successful, the state sliding window of the target bare metal under the abnormal type is reset to clear the window state corresponding to the current abnormal chain.

[0120] 8. When a rule is not hit or the number of unsuccessful execution attempts reaches a preset number, the current state of the status slider is retained so that subsequent events can continue to participate in the judgment.

[0121] See Figure 5 , Figure 5 This is a schematic diagram of the process of resetting the sliding window after the processing is completed in the embodiments of this application.

[0122] Receive the execution result of the handling; determine whether the handling was successful; if the handling was successful, reset the corresponding status slider and clear the current exception chain window state; otherwise, retain the current status slider and wait for subsequent events to be judged; and record the reset log to retain the audit trail. Finally, end the current judgment and enter the next exception chain statistics.

[0123] This invention discloses a bare metal anomaly judgment and reset method based on a dual-state sliding window of normal recovery and abnormal states. Upon receiving a final confirmed anomaly event or recovery event of bare metal, the corresponding independent state sliding window is located based on the target bare metal identifier and anomaly type identifier. When the event is a final confirmed anomaly event, an abnormal state is written to the state sliding window; when the event is a recovery event, a normal recovery state is written to the state sliding window. Rule matching is performed based on a preset window length, the number of times abnormal states appear within the window, the state order, and the recovery state coverage relationship. A deduction instruction or a disable instruction is output when an anomaly rule is matched. When the handling is successful, the corresponding state sliding window is reset. This method, by maintaining independent sliding windows in the bare metal dimension and the anomaly type dimension respectively, and jointly incorporating the normal recovery state and abnormal state into the judgment window, can reduce duplicate judgments and improve the stability and business consistency of automatic handling results.

[0124] The following describes a device provided by an embodiment of this application. The device described below can be referred to in correspondence with the method described above. The device of this embodiment is installed in an electronic device. Figure 6 , Figure 6This is a structural block diagram of an apparatus according to one embodiment of the present application, including: a response module 210, configured to, in response to receiving a current event type for a target bare metal, locate a state window for the target bare metal's target abnormality type, wherein the current event type includes one of a final confirmed abnormality event and a recovery event; for each abnormality type of the target bare metal, there is a corresponding state window including the state corresponding to the abnormal event and the state corresponding to the recovery event; a state writing module 220, configured to write the state corresponding to the current event type into the state window according to the chronological order of the event occurrence; a hit judgment module 230, configured to, based on the state combination information in the state window corresponding to the current event type, determine whether an abnormal rule corresponding to the target abnormality type of the target bare metal is hit; a disposal instruction issuing module 240, configured to, when an abnormal rule is hit, generate and issue a disposal instruction for the target abnormality type; and a reset module 250, configured to, after confirming that the disposal instruction has been successfully executed, perform a reset operation on the state window corresponding to the current event type.

[0125] In one possible implementation, the state writing module 220 is used to: write the state corresponding to the current event type into the state sliding window according to the chronological order of the events; after writing the state corresponding to the current event type, discard historical states that exceed the preset window length of the state sliding window.

[0126] In one possible implementation, the hit determination module 230 is used to: determine the data type according to the rules required for all anomaly types of the target bare metal based on the state sliding window corresponding to the current event type, and determine the data corresponding to the rule-determined data type of the state sliding window corresponding to the current event type as the first state combination information; obtain the anomaly rule corresponding to the target anomaly type of the target bare metal; determine the data to be compared from the state combination information according to the anomaly rule corresponding to the target anomaly type of the target bare metal; and perform rule determination on the data to be compared according to the anomaly rule corresponding to the target anomaly type of the target bare metal to obtain the determination result.

[0127] Alternatively, obtain the anomaly rule corresponding to the target anomaly type of the target bare metal; based on the state sliding window corresponding to the current event type, determine the data to be compared with the anomaly rule corresponding to the target anomaly type of the target bare metal, as the second state combination information; perform rule judgment on the second state combination information according to the anomaly rule corresponding to the target anomaly type of the target bare metal, and obtain the judgment result.

[0128] In one possible implementation, it also includes a retention module, which retains the current state of the state slider when an exception rule is not hit, or when the number of times a handling instruction fails to execute successfully reaches a preset number.

[0129] In one possible implementation, the hit determination module 230 is further configured to: determine the corresponding exception rule from a preset mapping and handling rule relationship based on the target exception type of the target bare metal.

[0130] In one possible implementation, the hit determination module 230 is used to: when an exception rule is hit, determine the corresponding handling method from the preset mapping handling method relationship according to the target exception type; and generate and issue the corresponding handling instruction according to the handling method.

[0131] In one possible implementation, the system further includes: an alarm module for obtaining the total score of the target bare metal; the total score is the sum of the scores of each anomaly type of the target bare metal; when the total score of the target bare metal reaches a preset score threshold, an alarm is generated.

[0132] Figure 7 This is a structural diagram of an electronic device provided in an embodiment of this application, such as... Figure 7 As shown, the electronic device includes: a memory 60 for storing a computer program; and a processor 61 for executing the computer program to implement the steps of the method as described in the above embodiments.

[0133] The electronic devices provided in this embodiment may include, but are not limited to, smartphones, tablets, laptops, or desktop computers.

[0134] The processor 61 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 61 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 61 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 61 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.

[0135] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 60 is used to store at least the following computer program 601, which, after being loaded and executed by the processor 61, is capable of implementing the relevant steps of the method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. The operating system 602 may include Windows, Unix, Linux, etc.

[0136] In some embodiments, the electronic device may further include a display screen 62, an input / output interface 63, a communication interface 64, a power supply 65, and a communication bus 66.

[0137] Those skilled in the art will understand that Figure 7 The structures shown do not constitute a limitation on electronic devices and may include more or fewer components than those shown.

[0138] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the current technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, magnetic disks, or optical disks, and other media capable of storing program code.

[0139] Based on this, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described above.

[0140] Based on this, embodiments of the present invention also provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described method. It should be understood that although the steps in the flowcharts of the accompanying drawings are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0141] The above are only some embodiments of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for judging and resetting bare metal anomalies, characterized in that, include: In response to receiving the current event type for the target abnormality type of the target bare metal, a status sliding window for the target abnormality type of the target bare metal is located, wherein the current event type includes one of a final confirmed abnormality event and a recovery event; for each abnormality type of the target bare metal, there is a corresponding status sliding window including the status corresponding to the abnormal event and the status corresponding to the recovery event; Write the status corresponding to the current event type into the status sliding window in the order of the event occurrence time; Based on the state combination information in the state sliding window corresponding to the state of the current event type, determine whether the exception rule corresponding to the target exception type of the target bare metal is hit; When an exception rule is hit, a handling instruction for the target exception type is generated and issued. After confirming that the processing instruction has been executed successfully, a reset operation is performed on the status slider that contains the status corresponding to the current event type.

2. The bare metal anomaly judgment and reset method according to claim 1, characterized in that, Write the status corresponding to the current event type into the status sliding window in chronological order of event occurrence, including: Write the state corresponding to the current event type into the state sliding window according to the chronological order of the events. After writing the state corresponding to the current event type, historical states that exceed the preset window length of the state slider are discarded.

3. The bare metal anomaly judgment and reset method according to claim 1, characterized in that, Based on the state combination information in the state sliding window corresponding to the current event type, determining whether an anomaly rule corresponding to the target anomaly type of the target bare metal is matched includes: based on the state sliding window corresponding to the current event type, determining the data type according to the rule determination data type required for all anomaly types of the target bare metal, and determining the data corresponding to the rule determination data type of the state sliding window corresponding to the current event type as the first state combination information; obtaining the anomaly rule corresponding to the target anomaly type of the target bare metal; determining the data to be compared from the state combination information according to the anomaly rule corresponding to the target anomaly type of the target bare metal; and performing rule determination on the data to be compared according to the anomaly rule corresponding to the target anomaly type of the target bare metal to obtain a determination result. Alternatively, obtain the anomaly rule corresponding to the target anomaly type of the target bare metal; based on the state sliding window corresponding to the current event type, determine the data to be compared with the anomaly rule corresponding to the target anomaly type of the target bare metal, as the second state combination information; perform rule judgment on the second state combination information according to the anomaly rule corresponding to the target anomaly type of the target bare metal, and obtain the judgment result.

4. The bare metal anomaly judgment and reset method according to claim 1, characterized in that, Also includes: When an exception rule is not hit, or when the number of times the handling instruction fails to be executed reaches a preset number, the current state of the status window is retained.

5. The bare metal anomaly judgment and reset method according to claim 1, characterized in that, Before determining whether an anomaly rule corresponding to the target anomaly type of the target bare metal is hit, based on the state combination information in the state sliding window corresponding to the state of the current event type, the method further includes: Based on the target anomaly type of the target bare metal, the corresponding anomaly rule is determined from the preset mapping and handling rule relationship.

6. The bare metal anomaly judgment and reset method according to claim 1, characterized in that, When an anomaly rule is hit, a handling instruction for the target anomaly type is generated and issued, including: When an exception rule is hit, the corresponding handling method is determined from the preset mapping handling method relationship according to the target exception type; The corresponding handling instructions are generated and issued according to the handling method.

7. The bare metal anomaly judgment and reset method according to claim 6, characterized in that, Also includes: Obtain the total score of the target bare metal; the total score is the sum of the scores of each anomaly type for which the target bare metal is to be processed. When the total score of the target bare metal reaches a preset score threshold, an alarm is generated.

8. A bare metal anomaly detection and reset device, characterized in that, include: The response module is used to respond to the current event type of the target bare metal for the target anomaly type received, and to locate the status sliding window of the target bare metal for the target anomaly type, wherein the current event type includes one of a final confirmed anomaly event and a recovery event; for each anomaly type of the target bare metal, there is a corresponding status sliding window including the status corresponding to the anomaly event and the status corresponding to the recovery event; The status writing module is used to write the status corresponding to the current event type into the status sliding window in the order of the event occurrence time. The hit determination module is used to determine whether the anomaly rule corresponding to the target anomaly type of the target bare metal is hit based on the state combination information written in the state sliding window corresponding to the current event type. The module for issuing handling instructions is used to generate and issue handling instructions for the target anomaly type when an anomaly rule is hit. The reset module is used to perform a reset operation on the status sliding window that contains the status corresponding to the current event type after confirming that the disposal instruction has been executed successfully.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the method according to any one of claims 1 to 7 when running the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the method as described in any one of claims 1 to 7.