A bare metal computing power anomaly diagnosis method, device, equipment and storage medium
Patent Information
- Application Number
- CN202611260842.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-10-30
AI Technical Summary
这种处理方式容易导致任务悬挂、任务重复处理
[0015]本申请所提供的裸金属算力异常诊断方法,包括:接收裸金属算力异常事件;若所述裸金属算力异常事件属于延迟诊断事件,则生成延迟诊断任务,并将所述延迟诊断事件相关的预设信息封装为任务快照;在调度时间到达后,拉取所述延迟诊断任务进行处理,并采用条件更新的方式将所述延迟诊断任务的任务状态由待处理切换为处理中;根据所述任务快照获取外部依赖;若获取到外部依赖,则根据所述外部依赖分析所述延迟诊断事件生成异常记录;若未获取到外部依赖,则更新所述延迟诊断任务下一次的调度时间并将所述延迟诊断任务的任务状态设置为待处理。
Smart Images

Figure CN123011584A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing operation and maintenance technology, and in particular to a method, device, equipment and storage medium for diagnosing abnormal computing power in bare metal. Background Technology
[0002] Bare-metal computing power has been widely used in scenarios such as cloud desktops, graphics rendering, inference training, and batch processing computing. During the operation of bare-metal computing power, anomalies such as blue screen errors, system crashes, and startup failures may occur. When these anomalies occur, the platform often only receives partial event messages, and the external dependencies used for subsequent processing usually need to wait for the external system to provide supplementary responses. Currently, related technologies immediately determine the anomaly type upon receiving an anomaly event and directly record it in the database or handle it. When the external dependencies corresponding to the anomaly are not yet ready, the only options are often simply to abandon the task, repeat manual checks, or directly adopt a low-confidence fallback result. This approach easily leads to task suspension and duplicate task processing.
[0003] Therefore, how to solve the above-mentioned technical defects has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, device, and storage medium for diagnosing abnormal bare metal computing power, which can avoid task suspension and task duplication.
[0005] To address the aforementioned technical problems, this application provides a method for diagnosing abnormal computing power in bare metal systems, comprising: Receive bare metal computing power anomaly events; If the bare metal computing power anomaly event is a delayed diagnosis event, a delayed diagnosis task is generated, and the preset information related to the delayed diagnosis event is encapsulated as a task snapshot; After the scheduling time arrives, the delayed diagnosis task is retrieved for processing, and the task status of the delayed diagnosis task is switched from pending to processing using a condition update method. External dependencies are obtained based on the task snapshot; these external dependencies serve as the basis for diagnosing the root cause of the delayed diagnostic event. If an external dependency is obtained, an exception record is generated based on the external dependency to diagnose the delayed diagnosis event. If no external dependency is found, the next scheduling time for the delayed diagnostic task is updated and the task status of the delayed diagnostic task is set to pending.
[0006] In some embodiments, updating the next scheduling time of the delayed diagnostic task includes: If the sequence number corresponding to the next scheduling of the delayed diagnosis task is within the first preset interval, then the scheduling time of the next scheduling of the delayed diagnosis task will be updated to the first scheduling time. If the sequence number corresponding to the next scheduling of the delayed diagnosis task is within the second preset interval, then the scheduling time of the next scheduling of the delayed diagnosis task will be updated to the second scheduling time; the second scheduling time is greater than the first scheduling time.
[0007] In some embodiments, it also includes: If the time it takes for the delayed diagnosis task to change to "processing" exceeds a preset threshold, and the number of retries for the delayed diagnosis task has not reached a preset upper limit, then the task status of the delayed diagnosis task will be reset to "pending" and the scheduling time for the next delayed diagnosis task will be updated. If the time it takes for the delayed diagnosis task to change to "processing" exceeds a preset threshold, and the number of retries for the delayed diagnosis task reaches a preset upper limit, then the delayed diagnosis task will be rolled back to the default exception conclusion and an exception record will be generated; the default exception conclusion is a preset conclusion based on the source event code mapping.
[0008] In some embodiments, it also includes: If a terminal failure result is received or an unrecoverable error occurs, the delayed diagnostic task will be rolled back to the default abnormal conclusion.
[0009] In some embodiments, it also includes: The exception records are associated with and stored in the task execution trajectory; the task execution trajectory includes the number of retries, the reason for failure, the reason for rollback, and the final exception record identifier.
[0010] In some embodiments, before encapsulating the preset information related to the delayed diagnostic event into a task snapshot, the method further includes: If the delayed diagnosis event is missing a target identifier, the target identifier is filled in and the preset information related to the delayed diagnosis event is encapsulated into a task snapshot; the preset information includes the target identifier.
[0011] In some embodiments, it also includes: If the task status of the delayed diagnosis task is switched to "processing failed", then the execution of the delayed diagnosis task is abandoned.
[0012] To address the aforementioned technical problems, this application also provides a bare metal computing power anomaly diagnosis device, comprising: The receiving unit is used to receive bare metal computing power anomaly events; The first generation unit is used to generate a delayed diagnosis task if the bare metal computing power abnormality event belongs to a delayed diagnosis event, and to encapsulate the preset information related to the delayed diagnosis event into a task snapshot. The switching unit is used to pull the delayed diagnosis task for processing after the scheduling time arrives, and to switch the task status of the delayed diagnosis task from pending to processing by means of condition update. An acquisition unit is used to acquire external dependencies based on the task snapshot; the external dependencies serve as the basis for diagnosing the root cause of the delayed diagnostic event. The second generation unit is used to generate an exception record based on the external dependency to diagnose the delayed diagnosis event if an external dependency is obtained. An update unit is used to update the next scheduling time of the delayed diagnosis task and set the task status of the delayed diagnosis task to pending if no external dependency is obtained.
[0013] To address the aforementioned technical problems, this application also provides an electronic device, comprising: Memory, used to store computer programs; A processor is configured to implement the steps of the bare metal computing power anomaly diagnosis method as described above when executing the computer program.
[0014] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the bare metal computing power anomaly diagnosis method as described above.
[0015] The bare metal computing power anomaly diagnosis method provided in this application includes: receiving a bare metal computing power anomaly event; if the bare metal computing power anomaly event is a delayed diagnosis event, generating a delayed diagnosis task and encapsulating preset information related to the delayed diagnosis event into a task snapshot; after the scheduling time arrives, pulling the delayed diagnosis task for processing, and switching the task status of the delayed diagnosis task from pending to processing using a conditional update method; obtaining external dependencies based on the task snapshot; if external dependencies are obtained, analyzing the delayed diagnosis event based on the external dependencies to generate an anomaly record; if external dependencies are not obtained, updating the next scheduling time of the delayed diagnosis task and setting the task status of the delayed diagnosis task to pending.
[0016] As can be seen, the bare metal computing power anomaly diagnosis method provided in this application generates delayed diagnosis tasks for delayed diagnosis events and updates the task status of the delayed diagnosis task to "processing" when executing the delayed diagnosis task. This avoids the same delayed diagnosis task being executed repeatedly in multi-node concurrent scenarios. If no external dependencies are obtained, the next scheduling time of the delayed diagnosis task is updated so that the delayed diagnosis task can be reprocessed after the next scheduling time arrives, avoiding task suspension.
[0017] The bare metal computing power anomaly diagnosis device, equipment, and computer-readable storage medium provided in this application all have the aforementioned technical effects. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the prior art and embodiments 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.
[0019] Figure 1 This is a flowchart illustrating a bare metal computing power anomaly diagnosis method provided in an embodiment of this application. Figure 2 A schematic diagram illustrating the process of converting a bare metal computing power anomaly event into a delayed diagnostic task, provided as an embodiment of this application; Figure 3 A schematic diagram illustrating the process of converting a bare metal computing power anomaly event into a delayed diagnostic task, provided as an embodiment of this application; Figure 4 A schematic diagram illustrating a process for retrying and rolling back a delayed diagnostic task, provided as an embodiment of this application; Figure 5 This is a schematic diagram of a bare metal computing power anomaly diagnosis device provided in an embodiment of this application; Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0020] The core of this application is to provide a method, device, equipment, and storage medium for diagnosing abnormal computing power in bare metal, which can avoid task suspension and task duplication.
[0021] 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.
[0022] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a bare metal computing power anomaly diagnosis method provided in an embodiment of this application. (Refer to...) Figure 1 As shown, the method includes: S101: Receive bare metal computing power anomaly event.
[0023] S102: If the bare metal computing power anomaly event is a delayed diagnosis event, then a delayed diagnosis task is generated, and the preset information related to the delayed diagnosis event is encapsulated as a task snapshot.
[0024] Receive bare metal computing power anomaly events. These events may include source event codes, bare metal identifiers, and bare metal scheduling record identifiers. The system can look up the corresponding event definition based on the source event code and then identify whether the bare metal computing power anomaly event belongs to the category of delayed diagnostic events. Delayed diagnostic events refer to bare metal computing power anomaly events whose root cause cannot be directly determined and require waiting for external dependencies. Examples include blue screen disconnection events and system crashes.
[0025] For delayed diagnostic events, a corresponding delayed diagnostic task is generated. Preset information related to the delayed diagnostic event is encapsulated into a task snapshot. This preset information may include the source event code, original event message, bare metal identifier, bare metal scheduling record identifier, region identifier, and event occurrence time.
[0026] In some embodiments, before encapsulating the preset information related to the delayed diagnostic event into a task snapshot, the method further includes: If the delayed diagnosis event is missing a target identifier, the target identifier is filled in and the preset information related to the delayed diagnosis event is encapsulated into a task snapshot; the preset information includes the target identifier.
[0027] The target identifier can be any of the following: bare metal identifier, region identifier, and startup identifier. If any of the bare metal identifier, region identifier, or startup identifier is missing, the missing target identifier will be filled in. Then, the source event code, original event message, bare metal identifier, bare metal scheduling record identifier, region identifier, event occurrence time, and the filled target identifier will be encapsulated into a task snapshot for persistent storage.
[0028] S103: After the scheduling time arrives, the delayed diagnosis task is retrieved for processing, and the task status of the delayed diagnosis task is switched from pending to processing using a condition update method.
[0029] S104: Obtain external dependencies based on the task snapshot; the external dependencies serve as the basis for diagnosing the root cause of the delayed diagnostic event.
[0030] Once the scheduling time arrives, the task scheduler can pull the pending delayed diagnostic tasks that meet the execution conditions, and use the condition update method to switch the task status of the delayed diagnostic task from pending to processing, thereby locking the task.
[0031] External dependencies are obtained from task snapshots. These external dependencies serve as the basis for diagnosing the root cause of delayed diagnostic events. Once the delayed diagnostic event is identified, the required external dependencies are determined accordingly. For example, if the delayed diagnostic event is a blue screen disconnection event, the corresponding external dependencies may include the blue screen dump results and startup event logs. If the delayed diagnostic event is a system freeze event, the corresponding external dependencies may include startup event logs.
[0032] In some embodiments, it also includes: If the task status of the delayed diagnosis task is switched to "processing failed", then the execution of the delayed diagnosis task is abandoned.
[0033] If the task status of the delayed diagnosis task is switched to "processing failed", it means that another node has already obtained the qualification to process the delayed diagnosis task, and the current node abandons the execution of the delayed diagnosis task.
[0034] S105: If an external dependency is obtained, an exception record is generated based on the external dependency to diagnose the delayed diagnosis event.
[0035] S106: If no external dependency is obtained, update the next scheduling time of the delayed diagnosis task and set the task status of the delayed diagnosis task to pending.
[0036] If the external dependency is found (i.e., the external dependency is ready), the delayed diagnostic event is diagnosed based on the external dependency, the root cause is determined, and an exception record is generated. If the external dependency is not found (i.e., the external dependency is not ready), the next scheduling time for the delayed diagnostic task is updated, and the task status of the delayed diagnostic task is set to pending, so that the delayed diagnostic task can be reprocessed after the next scheduling time arrives.
[0037] In some embodiments, updating the next scheduling time of the delayed diagnostic task includes: If the sequence number corresponding to the next scheduling of the delayed diagnosis task is within the first preset interval, then the scheduling time of the next scheduling of the delayed diagnosis task will be updated to the first scheduling time. If the sequence number corresponding to the next scheduling of the delayed diagnosis task is within the second preset interval, then the scheduling time of the next scheduling of the delayed diagnosis task will be updated to the second scheduling time; the second scheduling time is greater than the first scheduling time.
[0038] Each delayed diagnostic task has a total number of retries. The first N retries form a first preset interval, and the subsequent retries form a second preset interval. N is a positive integer greater than or equal to 1. For example, if the total number of retries is 7, the first 3 retries form the first preset interval, and the last 4 retries form the second preset interval.
[0039] If the sequence number corresponding to the next scheduling of the delayed diagnosis task is within the first preset interval, then the next scheduling time of the delayed diagnosis task will be updated to the first scheduling time. If the sequence number corresponding to the next scheduling of the delayed diagnosis task is within the second preset interval, then the scheduling time of the next scheduling of the delayed diagnosis task will be updated to the second scheduling time; the second scheduling time is greater than the first scheduling time.
[0040] For example, if the sequence number of the next scheduled task for delayed diagnosis is 3, which is the third retry, then it falls within the first preset interval, and the scheduling time for the next scheduled task for delayed diagnosis is updated to 6 seconds. If the sequence number of the next scheduled task for delayed diagnosis is 5, which is the fifth retry, then it falls within the second preset interval, and the scheduling time for the next scheduled task for delayed diagnosis is updated to 10 seconds.
[0041] Therefore, the scheduling time for the next retry is updated based on the current number of retries for the task, ensuring that early retries prioritize timeliness while later retries consider the pressure on downstream external systems. This balances the timeliness of exception handling with the pressure on downstream external systems.
[0042] In some embodiments, it also includes: If the time it takes for the delayed diagnosis task to change to "processing" exceeds a preset threshold, and the number of retries for the delayed diagnosis task has not reached a preset upper limit, then the task status of the delayed diagnosis task will be reset to "pending" and the scheduling time for the next delayed diagnosis task will be updated. If the time taken for the delayed diagnosis task to change to "processing" exceeds a preset threshold, and the number of retries for the delayed diagnosis task reaches a preset upper limit, then the delayed diagnosis task will be rolled back to the default abnormal conclusion and an abnormal record will be generated.
[0043] Periodically scan for delayed diagnostic tasks that have been in the processing state for longer than a preset threshold. If the number of retries for a delayed diagnostic task has not yet reached the preset limit, it is put back into the pending state and the next scheduling time is reset. If the preset limit has been reached, the delayed diagnostic task is switched to the failure fallback path, the delayed diagnostic task is rolled back to the default exception conclusion, and an exception record is generated. The default exception conclusion is a preset conclusion based on the source event code mapping.
[0044] When a delayed diagnosis task reaches the maximum number of retries, this embodiment of the application reverts to a preset default exception conclusion and completes the final exception storage, thereby ensuring that each delayed diagnosis task has a corresponding exception conclusion and is traceable. Furthermore, if the processing time of a delayed diagnosis task exceeds a preset threshold, and the number of retries for the delayed diagnosis task has not reached the preset upper limit, the task status of the delayed diagnosis task is reset to pending processing, and the scheduling time for the next delayed diagnosis task is updated. This can reduce link blocking problems caused by long-term delays in delayed tasks.
[0045] In some embodiments, it also includes: If a terminal failure result is received or an unrecoverable error occurs, the delayed diagnostic task will be rolled back to the default abnormal conclusion.
[0046] If a terminal failure result is received or an unrecoverable error occurs during task execution, a final exception record can be generated based on the preset default exception conclusion of the source event code mapping, and the status of the delayed diagnosis task can be updated to the completed or failed final state. At the same time, the number of retries, the reason for failure, the reason for rollback, and the final exception record identifier can be associated and saved.
[0047] Terminal failure refers to a final failure state that cannot be recovered from through retries or subsequent operations. The current processing flow must be terminated immediately and the process rolled back to the default exception conclusion.
[0048] Unrecoverable errors can include data format errors that cannot be parsed, missing essential business data, and system configuration errors.
[0049] When a delayed diagnosis task reaches the maximum number of retries, the external system returns a terminal failure result, or an unrecoverable error occurs, this application embodiment uniformly reverts to the preset default abnormal conclusion and completes the final abnormal data entry, thereby ensuring that each delayed diagnosis task has a corresponding abnormal conclusion and is traceable.
[0050] In some embodiments, it also includes: The exception records are associated with and stored in the task execution trajectory. The task execution trajectory includes the number of retries, the reason for failure, the reason for rollback, and the final exception record identifier.
[0051] The final exception record is associated with the task execution trajectory and stored. The task execution trajectory includes the number of raw retries, failure reasons, rollback reasons, and final exception record identifier. It may also include metal computing power exception event access, task scheduling, etc., thus forming a traceable closed loop covering exception event access, task scheduling, failure rollback and final exception record.
[0052] For the overall architecture of delayed diagnostic task scheduling and failure rollback, please refer to Figure 2 As shown, it mainly includes: accessing bare metal computing power abnormal events, generating delay diagnosis tasks, encapsulating task snapshots, persistently storing task snapshots, the task scheduler pulling delay diagnosis tasks, switching the task status from pending to processing, obtaining external dependencies, outputting diagnostic results, updating the next scheduling time if retry is required, rolling back if failure occurs, mapping the preset default exception conclusion, and generating the final exception record if completed.
[0053] The process for converting bare metal computing power anomaly events into delayed diagnostic tasks can be found in the following reference. Figure 3 As shown, the main components include receiving bare metal computing power anomaly events and determining whether these events are delayed diagnosis events. If they are delayed diagnosis events, the target identifier is supplemented if the context (target identifier) is missing. A task snapshot is then encapsulated and persistently stored for the delayed diagnosis task.
[0054] For the process of retrying and rolling back delayed diagnostic tasks, please refer to [reference needed]. Figure 4 As shown, the main steps include: determining whether the external dependency is ready; if ready, performing a diagnosis based on the external dependency and generating a final exception record; if the external dependency is not ready and the retry limit has not been exceeded, updating the next scheduling time; and if a terminal failure occurs, falling back to the preset default exception conclusion.
[0055] In summary, the bare metal computing power anomaly diagnosis method provided in this application generates delayed diagnosis tasks for delayed diagnosis events and updates the task status of the delayed diagnosis task to "processing" during execution. This avoids the same delayed diagnosis task being repeatedly executed in multi-node concurrent scenarios. Furthermore, if no external dependencies are obtained, the next scheduling time for the delayed diagnosis task is updated so that the task can be reprocessed upon the next scheduling time, preventing task suspension.
[0056] This application also provides a bare metal computing power anomaly diagnosis device, which is described below and can be referred to in conjunction with the method described above. Please refer to... Figure 5 , Figure 5 This is a schematic diagram of a bare metal computing power anomaly diagnosis device provided in an embodiment of this application, combined with... Figure 5 As shown, the device includes: Receiver unit 10 is used to receive bare metal computing power abnormal events; The first generation unit 20 is used to generate a delayed diagnosis task if the bare metal computing power abnormality event belongs to a delayed diagnosis event, and to encapsulate the preset information related to the delayed diagnosis event into a task snapshot. The switching unit 30 is used to pull the delayed diagnosis task for processing after the scheduling time arrives, and to switch the task status of the delayed diagnosis task from pending to processing by using a condition update method. The acquisition unit 40 is used to acquire external dependencies based on the task snapshot; the external dependencies serve as the basis for diagnosing the root cause of the delayed diagnosis event. The second generation unit 50 is used to generate an exception record based on the external dependency if an external dependency is obtained; The update unit 60 is used to update the next scheduling time of the delayed diagnosis task and set the task status of the delayed diagnosis task to pending if no external dependency is obtained.
[0057] In some embodiments, the updating unit 60 includes: The first update subunit is used to update the next scheduling time of the delayed diagnosis task to the first scheduling time if the sequence number corresponding to the next scheduling of the delayed diagnosis task is in the first preset interval. The second update subunit is used to update the scheduling time of the next scheduling of the delayed diagnosis task to the second scheduling time if the sequence number corresponding to the next scheduling of the delayed diagnosis task is located in the second preset interval; the second scheduling time is greater than the first scheduling time.
[0058] In some embodiments, it also includes: The first timeout processing unit is configured to reset the task status of the delayed diagnosis task to pending processing and update the scheduling time of the next delayed diagnosis task if the time for the delayed diagnosis task to change to processing exceeds a preset threshold and the number of retries of the delayed diagnosis task has not reached a preset upper limit. The second timeout processing unit is used to roll back the delayed diagnosis task to the default abnormal conclusion and generate an abnormal record if the time for the delayed diagnosis task to change to the status of processing exceeds a preset threshold and the number of retries of the delayed diagnosis task reaches a preset upper limit.
[0059] In some embodiments, it also includes: The rollback unit is used to roll back the delayed diagnostic task to the default abnormal conclusion if a terminal failure result is received or an unrecoverable error occurs.
[0060] In some embodiments, it also includes: The association unit is used to associate and store the exception record with the task execution trajectory.
[0061] In some embodiments, it also includes: The completion unit is used to complete the target identifier and encapsulate the preset information related to the delayed diagnosis event into a task snapshot if the delayed diagnosis event is missing a target identifier; the preset information includes the target identifier.
[0062] In some embodiments, it also includes: The termination unit is used to abandon the execution of the delayed diagnosis task if the task status of the delayed diagnosis task is switched to "processing failed".
[0063] The bare-metal computing power anomaly diagnosis device provided in this application generates delayed diagnosis tasks for delayed diagnosis events and updates the task status of the delayed diagnosis task to "processing" when executing the delayed diagnosis task. This avoids the same delayed diagnosis task being executed repeatedly in multi-node concurrent scenarios. If no external dependencies are obtained, the next scheduling time of the delayed diagnosis task is updated so that the delayed diagnosis task can be reprocessed after the next scheduling time arrives, avoiding task suspension.
[0064] This application also provides an electronic device, referenced... Figure 6 As shown, the device includes a memory 1 and a processor 2.
[0065] Memory 1 is used to store computer programs; Processor 2 is used to execute computer programs to perform the following steps: Receive bare metal computing power anomaly events; if the bare metal computing power anomaly event is a delayed diagnosis event, generate a delayed diagnosis task and encapsulate the preset information related to the delayed diagnosis event into a task snapshot; after the scheduling time arrives, pull the delayed diagnosis task for processing and switch the task status of the delayed diagnosis task to processing; obtain external dependencies based on the task snapshot; if external dependencies are obtained, analyze the delayed diagnosis event based on the external dependencies to generate an anomaly record; if no external dependencies are obtained, update the next scheduling time of the delayed diagnosis task and set the task status of the delayed diagnosis task to pending processing.
[0066] For a description of the equipment provided in this application, please refer to the above method embodiments; further details will not be provided here.
[0067] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the following steps: Receive bare metal computing power anomaly events; if the bare metal computing power anomaly event is a delayed diagnosis event, generate a delayed diagnosis task and encapsulate the preset information related to the delayed diagnosis event into a task snapshot; after the scheduling time arrives, pull the delayed diagnosis task for processing and switch the task status of the delayed diagnosis task to processing; obtain external dependencies based on the task snapshot; if external dependencies are obtained, analyze the delayed diagnosis event based on the external dependencies to generate an anomaly record; if no external dependencies are obtained, update the next scheduling time of the delayed diagnosis task and set the task status of the delayed diagnosis task to pending processing.
[0068] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0069] For a description of the computer-readable storage medium provided in this application, please refer to the above method embodiments; further details will not be repeated here.
[0070] 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 apparatuses, devices, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant details can be found in the method section.
[0071] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0072] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0073] The above provides a detailed description of the bare metal computing power anomaly diagnosis method, apparatus, equipment, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. A method for diagnosing abnormal computing power in bare metal, characterized in that, include: Receive bare metal computing power anomaly events; If the bare metal computing power anomaly event is a delayed diagnosis event, a delayed diagnosis task is generated, and the preset information related to the delayed diagnosis event is encapsulated as a task snapshot; After the scheduling time arrives, the delayed diagnosis task is retrieved for processing, and the task status of the delayed diagnosis task is switched from pending to processing using a condition update method. External dependencies are obtained based on the task snapshot; these external dependencies serve as the basis for diagnosing the root cause of the delayed diagnostic event. If an external dependency is obtained, an exception record is generated based on the external dependency to diagnose the delayed diagnosis event. If no external dependency is found, the next scheduling time for the delayed diagnostic task is updated and the task status of the delayed diagnostic task is set to pending.
2. The bare metal computing power anomaly diagnosis method according to claim 1, characterized in that, Updating the next scheduling time for the delayed diagnostic task includes: If the sequence number corresponding to the next scheduling of the delayed diagnosis task is within the first preset interval, then the scheduling time of the next scheduling of the delayed diagnosis task will be updated to the first scheduling time. If the sequence number corresponding to the next scheduling of the delayed diagnosis task is within the second preset interval, then the scheduling time of the next scheduling of the delayed diagnosis task will be updated to the second scheduling time; the second scheduling time is greater than the first scheduling time.
3. The bare metal computing power anomaly diagnosis method according to claim 2, characterized in that, Also includes: If the time it takes for the delayed diagnosis task to change to "processing" exceeds a preset threshold, and the number of retries for the delayed diagnosis task has not reached a preset upper limit, then the task status of the delayed diagnosis task will be reset to "pending" and the scheduling time for the next delayed diagnosis task will be updated. If the time it takes for the delayed diagnosis task to change to "processing" exceeds a preset threshold, and the number of retries for the delayed diagnosis task reaches a preset upper limit, then the delayed diagnosis task will be rolled back to the default exception conclusion and an exception record will be generated; the default exception conclusion is a preset conclusion based on the source event code mapping.
4. The bare metal computing power anomaly diagnosis method according to claim 3, characterized in that, Also includes: If a terminal failure result is received or an unrecoverable error occurs, the delayed diagnostic task will be rolled back to the default abnormal conclusion.
5. The bare metal computing power anomaly diagnosis method according to claim 1, characterized in that, Also includes: The exception records are associated with and stored in the task execution trajectory; the task execution trajectory includes the number of retries, the reason for failure, the reason for rollback, and the final exception record identifier.
6. The bare metal computing power anomaly diagnosis method according to claim 1, characterized in that, Before encapsulating the preset information related to the delayed diagnostic event into a task snapshot, the following is also included: If the delayed diagnosis event is missing a target identifier, the target identifier is filled in and the preset information related to the delayed diagnosis event is encapsulated into a task snapshot; the preset information includes the target identifier.
7. The bare metal computing power anomaly diagnosis method according to claim 1, characterized in that, Also includes: If the task status of the delayed diagnosis task is switched to "processing failed", then the execution of the delayed diagnosis task is abandoned.
8. A bare metal computing power anomaly diagnosis device, characterized in that, include: The receiving unit is used to receive bare metal computing power anomaly events; The first generation unit is used to generate a delayed diagnosis task if the bare metal computing power abnormality event belongs to a delayed diagnosis event, and to encapsulate the preset information related to the delayed diagnosis event into a task snapshot. The switching unit is used to pull the delayed diagnosis task for processing after the scheduling time arrives, and to switch the task status of the delayed diagnosis task from pending to processing by means of condition update. An acquisition unit is used to acquire external dependencies based on the task snapshot; the external dependencies serve as the basis for diagnosing the root cause of the delayed diagnostic event. The second generation unit is used to generate an exception record based on the external dependency to diagnose the delayed diagnosis event if an external dependency is obtained. An update unit is used to update the next scheduling time of the delayed diagnosis task and set the task status of the delayed diagnosis task to pending if no external dependency is obtained.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the bare metal computing power anomaly diagnosis method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the bare metal computing power anomaly diagnosis method as described in any one of claims 1 to 7.
