Alarm processing method and device for distributed database, equipment and storage medium

By identifying and processing alarm events on distributed database management nodes, determining emergency plans and scopes, and performing emergency operations in data nodes, the problem of low efficiency in distributing databases for multiple data nodes is solved, and efficient and reliable alarm processing is achieved.

CN119690785APending Publication Date: 2025-03-25INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411808943.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Distributed databases are inefficient when processing alarms from multiple data nodes, and rely on operation and maintenance personnel to manually execute commands, affecting emergency efficiency.

Method used

By identifying the target alarm event on the management node, obtaining the target alarm code, and determining the emergency plan and alarm range from the configuration storage node and metadatabase, the emergency plan is implemented in the data node of the alarm range based on the distributed concurrency control method.

Benefits of technology

It improves the efficiency and reliability of distributed database alarm processing, reduces the intervention of operation and maintenance personnel, and improves the timeliness of emergency response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690785A_ABST
    Figure CN119690785A_ABST
Patent Text Reader

Abstract

The invention discloses an alarm processing method and device for a distributed database, equipment and a storage medium, and relates to the field of distributed technologies. The method comprises the steps of obtaining a target alarm code of a target alarm event under the condition that the target alarm event is identified, and determining a target emergency scheme from candidate emergency schemes stored in a configuration storage node according to the target alarm code; obtaining an alarm range of the target alarm event from a metadatabase according to the target alarm code; determining an emergency task for the target alarm event according to the target alarm code and the alarm range, and persisting the emergency task to a metadatabase; and based on a distributed concurrency control method, according to the emergency task, executing the target emergency scheme in the data node in the alarm range. According to the technical scheme, the problems that the distributed database processes numerous data node alarms in batches, operation and maintenance personnel need to manually execute commands, and the efficiency is low are solved, and the alarm processing efficiency and reliability can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, in particular to the field of distributed technology, and specifically to an alarm processing method, apparatus, device and storage medium for a distributed database. Background Art

[0002] In the era of big data, the exponential growth in the total amount of data has brought huge challenges to traditional data storage systems. Obviously, a single database cannot handle so much data.

[0003] One existing method is to split a single table with large data volume into multiple tables with small data volume on the server side. When the client accesses, it accesses the corresponding table according to the splitting strategy, and the split tables can be distributed on multiple databases. However, multiple databases will generate alarms due to failures, and distributed databases have the problem of batch processing of many database alarms. The current production environment database system has high requirements for the timeliness of alarm emergency response to avoid affecting major business. Traditional alarm processing requires operation and maintenance personnel to manually execute commands, and depends on the proficiency of operation and maintenance personnel, which affects emergency efficiency. Summary of the invention

[0004] The present application provides a distributed database alarm processing method, device, equipment and storage medium to improve the efficiency and reliability of alarm processing.

[0005] According to one aspect of the present application, a distributed database alarm processing method is provided, which is applied to a management node of the distributed database; the distributed database includes a configuration storage node, a management node, a metadata database and at least one data node; the management node is respectively connected to the configuration storage node, the data node and the metadata database in communication; the method includes:

[0006] When a target alarm event is identified, a target alarm code of the target alarm event is obtained, and a target emergency plan is determined from candidate emergency plans stored in the configuration storage node according to the target alarm code;

[0007] According to the target alarm code, acquiring the alarm scope of the target alarm event from the metadata database;

[0008] Determine an emergency task for the target alarm event according to the target alarm code and the alarm range, and persist the emergency task to the metadata database;

[0009] Based on the distributed concurrent control method, according to the emergency task, the target emergency plan is executed in the data nodes within the alarm range.

[0010] According to another aspect of the present application, an alarm processing device for a distributed database is provided, the device being configured at a management node of the distributed database; the distributed database comprising a configuration storage node, a management node, a metadata database and at least one data node; the management node being respectively connected to the configuration storage node, the data node and the metadata database in communication; the device comprising:

[0011] A solution determination module is used to obtain a target alarm code of the target alarm event when a target alarm event is identified, and determine a target emergency solution from the candidate emergency solutions stored in the configuration storage node according to the target alarm code;

[0012] A range determination module, configured to obtain an alarm range of the target alarm event from the metadata database according to the target alarm code;

[0013] A task determination module, used to determine an emergency task for the target alarm event according to the target alarm code and the alarm range, and persist the emergency task to the metadata database;

[0014] A plan execution module is used to execute the target emergency plan in the data nodes within the alarm range based on the emergency task based on the distributed concurrent control method.

[0015] According to another aspect of the present application, an electronic device is provided, the electronic device comprising:

[0016] one or more processors;

[0017] A memory for storing one or more programs;

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement any distributed database alarm processing method provided in the embodiments of the present application.

[0019] According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, any distributed database alarm processing method provided in the embodiments of the present application is implemented.

[0020] According to another aspect of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements any distributed database alarm processing method provided in the embodiments of the present application.

[0021] This application obtains the target alarm code of the target alarm event when the target alarm event is identified, and determines the target emergency plan from the candidate emergency plans stored in the configuration storage node according to the target alarm code; obtains the alarm range of the target alarm event from the metadata database according to the target alarm code; determines the emergency task for the target alarm event according to the target alarm code and the alarm range, and persists the emergency task to the metadata database; based on the distributed concurrent control method, executes the target emergency plan in the data node in the alarm range according to the emergency task. The above technical solution solves the problem of low efficiency in batch processing of alarms of many data nodes by distributed databases and the need for operation and maintenance personnel to manually execute commands, which helps to improve the efficiency and reliability of alarm processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flowchart of an alarm processing method of a distributed database provided according to the first embodiment of the present application;

[0023] Figure 2 It is a flowchart of an alarm processing method of a distributed database provided according to Embodiment 2 of the present application;

[0024] Figure 3 It is a structural diagram of an alarm processing device for a distributed database provided according to Embodiment 3 of the present application;

[0025] Figure 4 It is a structural diagram of an electronic device that implements the distributed database alarm processing method of an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] In addition, it should be noted that in the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of relevant data such as target warning events and target warning codes are in compliance with the relevant laws and regulations and do not violate public order and good morals.

[0029] Embodiment 1

[0030] Figure 1 This is a flowchart of a distributed database alarm processing method provided according to the first embodiment of the present application. This embodiment can be applied to emergency situations of data node alarms appearing in a distributed database, and can be executed by an alarm processing device of a distributed database. The alarm processing device of the distributed database can be implemented in the form of hardware and / or software. The alarm processing device of the distributed database can be configured in a computer device, such as a management node of a distributed database; the distributed database can include a configuration storage node, a management node, a metadata database, and at least one data node; the management node is respectively connected to the configuration storage node, the data node, and the metadata database. Figure 1 As shown, the method includes:

[0031] S110 . When a target alarm event is identified, a target alarm code of the target alarm event is obtained, and a target emergency plan is determined from candidate emergency plans stored in the configuration storage node according to the target alarm code.

[0032] Among them, the target alarm event refers to an abnormal or fault condition detected by the system during the system monitoring process, which usually triggers an alarm; in the embodiment of the present application, the target alarm event can be at least one. The target alarm code refers to a unique identifier associated with a specific alarm event; each alarm event has a corresponding alarm code, which is usually used to identify and classify different types of alarms; the alarm code is usually a combination of numbers or letters. The configuration storage node refers to a node that stores system configuration, parameters, settings and other data, usually in a distributed system, for storing system configuration files, alarm rules or emergency plans and other information. Candidate emergency plans refer to candidate plans among multiple pre-defined emergency processing plans when an alarm event occurs; according to the alarm code and other information, the most suitable emergency plan is selected to handle the current alarm event. Metadatabase refers to a data set that stores data about other databases; it can be used to store information related to alarm events and emergency tasks, such as alarm scope, emergency tasks, etc. The target emergency plan is a specific processing plan corresponding to the alarm code, which is a specific action plan set to respond to the target alarm event.

[0033] Exemplarily, the management node can view the target alarm event in a Web (World Wide Web) interface and obtain the target alarm code of the target alarm event; using the target alarm code as an index, read the target emergency plan from the candidate emergency plans stored in the configuration storage node, and display the emergency problem description and the target emergency plan in the Web interface.

[0034] It should be noted that candidate emergency plans are prepared in advance based on different alarm codes; when deployed in a distributed system, they are initialized to the configuration storage node through the management node.

[0035] S120. Acquire the alarm scope of the target alarm event from the metadata database according to the target alarm code.

[0036] The alarm scope refers to the system scope or resource scope affected by the alarm event; the alarm scope is usually defined based on the alarm code, indicating the specific system or node that needs to be responded to, such as a single server, an entire cluster, or a subsystem.

[0037] Exemplarily, the alarm scope may be the fault source and a list of data nodes where the fault source is located; the fault source of the target alarm event and a list of data nodes where the fault source is located may be queried in the metadata database according to the target alarm code; and the alarm scope may be fed back to the management node through the metadata database.

[0038] S130: Determine an emergency task for the target alarm event according to the target alarm code and the alarm range, and persist the emergency task to the metadata database.

[0039] Among them, emergency tasks refer to a series of operations performed in response to specific alarm events; the content and execution order of the tasks are usually determined based on the alarm code, alarm scope and predefined emergency plans. Metadatabase persistence refers to storing the information of emergency tasks in the metadatabase to ensure that the status and results of these tasks can be persisted during system recovery or subsequent operations for subsequent tracking and management.

[0040] Optionally, the emergency task includes a main task and a subtask; further, based on the target alarm code and the alarm range, the main task and subtask for the target alarm event are determined, and the main task and subtask are persisted in the metadata database; wherein the main task corresponds to an emergency task; and the subtask corresponds to an emergency task for a certain fault source.

[0041] S140. Based on the distributed concurrent control method and according to the emergency task, execute the target emergency plan in the data nodes within the alarm range.

[0042] Among them, the distributed concurrency control method refers to a method of controlling and coordinating the concurrent execution of tasks between multiple nodes in a distributed system; the purpose is to avoid resource conflicts, ensure data consistency, and improve the overall performance and availability of the system; for example, when multiple data nodes execute emergency tasks at the same time, it is necessary to use distributed locks or transaction management mechanisms to ensure the synchronous execution of tasks and prevent concurrency conflicts. Data nodes in the alarm range refer to those nodes that are affected by the alarm and need to perform emergency tasks. Executing the target emergency plan means that after identifying the target alarm event, the system performs specific emergency operations according to the pre-defined target emergency plan; this process may involve multiple steps and be executed in parallel on different data nodes.

[0043] Exemplarily, a distributed concurrent control method is used to command the data node where the fault source is located to execute an emergency script; the emergency script can execute different emergency plans according to different alarm codes to complete the recovery of different alarms.

[0044] The embodiment of the present application obtains the target alarm code of the target alarm event when the target alarm event is identified, and determines the target emergency plan from the candidate emergency plans stored in the configuration storage node according to the target alarm code; obtains the alarm range of the target alarm event from the metadata database according to the target alarm code; determines the emergency task for the target alarm event according to the target alarm code and the alarm range, and persists the emergency task to the metadata database; based on the distributed concurrent control method, executes the target emergency plan in the data node in the alarm range according to the emergency task. The above technical solution solves the problem of low efficiency in batch processing of alarms of many data nodes by distributed databases and the need for operation and maintenance personnel to manually execute commands, which helps to improve the efficiency and reliability of alarm processing.

[0045] Embodiment 2

[0046] Figure 2 This is a flow chart of an alarm processing method for a distributed database provided in accordance with the second embodiment of the present application. Based on the technical solutions of the above embodiments, this embodiment refines "determining the emergency task for the target alarm event according to the target alarm code and the alarm range" into "determining the target emergency range from the candidate emergency ranges according to the target alarm code and the alarm range; wherein the candidate emergency ranges include the alarm-level emergency range, the cluster-level emergency range and the system-level emergency range; determining the emergency task for the target alarm event according to the target alarm code, the alarm range and the target emergency range". It should be noted that for the parts not described in detail in the embodiments of the present application, please refer to the relevant statements of other embodiments. Figure 2 As shown, the method includes:

[0047] S210: When a target alarm event is identified, a target alarm code of the target alarm event is obtained, and a target emergency plan is determined from candidate emergency plans stored in the configuration storage node according to the target alarm code.

[0048] S220. Obtain an alarm scope of the target alarm event from a metadata database according to the target alarm code.

[0049] S230. Determine a target emergency range from candidate emergency ranges according to the target alarm code and the alarm range; wherein the candidate emergency ranges include an alarm-level emergency range, a cluster-level emergency range, and a system-level emergency range.

[0050] Among them, the candidate emergency scope refers to the different emergency handling scopes preset according to the alarm event, alarm code and alarm scope; the selection of the emergency scope depends on the severity and impact scope of the alarm event, and usually includes multiple levels of emergency response plans. The target emergency scope refers to the actual emergency response scope selected from the candidate emergency scope according to the target alarm code and alarm scope; the target emergency scope is the final emergency scope, which determines which system nodes to be processed and which emergency measures to take. The alarm-level emergency scope refers to the emergency response scope for a specific alarm event, which is usually the smallest emergency scope; it only involves the specific system components or resources that trigger the alarm. The cluster-level emergency scope refers to the emergency response scope taken for an alarm event that occurs in a complete cluster (such as a database cluster, computing cluster, etc.); this emergency scope usually involves multiple system nodes, and the emergency measures may affect the health of the entire cluster. The system-level emergency scope refers to the emergency response measures taken for the alarm event of the entire system or a larger scope; the system-level emergency scope covers all system components that may be affected, which is usually the broadest emergency response scope.

[0051] It should be noted that selecting the alarm level means only taking emergency measures for the fault source where a certain alarm is located; selecting the cluster level means querying the metadata database to obtain all fault sources under the cluster where the fault source corresponding to the alarm is located and taking emergency measures; selecting the system level means querying the database to obtain all fault sources under the system where the fault source corresponding to the alarm is located and taking emergency measures.

[0052] S240: Determine an emergency task for the target alarm event according to the target alarm code, alarm scope and target emergency scope, and persist the emergency task to the metadata database.

[0053] In an optional implementation, the emergency task includes a main task and subtasks; the alarm scope includes candidate fault sources and fault source locations; accordingly, a fault analysis is performed on the candidate fault sources, and the candidate fault sources that pass the fault analysis are determined as target fault sources; for each target fault source, a subtask for the target alarm event is determined based on the target alarm code, the fault source location of the target fault source, and the fault data; the subtasks are integrated to obtain the main task for the target alarm event.

[0054] Among them, the main task refers to the core emergency response task taken for the alarm event, which is usually the core goal of the entire emergency response, involving key solutions and resource allocation. Subtasks refer to the specific actions or steps that need to be completed in the process of executing the main task; each subtask corresponds to a smaller, independent goal, usually a component of the main task. Candidate fault sources refer to the impact area involved in the alarm event or the system components that the fault may affect; the alarm scope can be divided into multiple levels according to the distribution and impact of the fault source, such as local, cluster, system, etc. The fault source location refers to the specific location or component of the candidate fault source when the alarm event occurs; for example, the fault source location can be a hard disk failure of a server, a failure of a switch port, etc. Fault analysis refers to the detailed analysis and diagnosis of the candidate fault source based on the information of the alarm event to determine the real fault source; through fault analysis, other possibilities are excluded and the root cause of the alarm is confirmed. The target fault source refers to the fault source that is determined to be the real cause of the alarm through investigation during the fault analysis process; it is the root cause of the fault event and the processing object of the subsequent emergency response task. Fault data refers to specific information related to the source of the fault, including alarm logs, hardware performance data, network traffic data, etc.; these data help diagnose the root cause of the fault and support subsequent emergency response decisions.

[0055] Exemplarily, for each target fault source, the corresponding emergency handling subtask is determined in combination with the target alarm code, the fault source location and the related fault data; each subtask is a specific operation performed on a specific fault source, aimed at restoring or repairing the system; after integrating the subtasks, the final main task is formed; the main task usually involves the coordination and scheduling of multiple subtasks to ensure that each subtask can be executed in an orderly manner and ultimately achieve the goal of resolving the alarm event.

[0056] S250. Based on the distributed concurrent control method and according to the emergency task, execute the target emergency plan in the data nodes within the alarm range.

[0057] In an optional implementation, there is at least one target alarm code; there is at least one target emergency plan; the target alarm code and the target emergency plan are in a one-to-one relationship; accordingly, for each data node within the alarm range, according to the subtask corresponding to the data node, the target emergency plan corresponding to the target alarm code on the data node is executed, and the emergency result is output to the target log.

[0058] Among them, the target log refers to a log file that records the emergency handling process, execution results and related system status; it contains detailed information on the execution of the task, including execution time, executor (if any), processing steps, problems encountered, solutions, etc.; the target log is used to track and record the entire process of fault emergency handling, ensure that the operation is traceable and auditable, and help with subsequent analysis and summary.

[0059] Furthermore, according to the subtask corresponding to the data node, executing the target emergency plan corresponding to the target alarm code on the data node can be, according to the subtask corresponding to the data node, generating an emergency command, and sending the emergency command and the target emergency plan corresponding to the target alarm code on the data node to the data node; when the data node receives the emergency command, executing the target emergency plan corresponding to the target alarm code on the data node.

[0060] Among them, emergency commands refer to instructions used to direct data nodes to execute target emergency plans; when the system detects a fault and generates a target alarm code, the system will issue a corresponding emergency command to the data node, requiring the node to perform corresponding operations according to the target emergency plan; emergency commands instruct data nodes to perform specific operations to solve the fault problems caused by the alarm; it is the key link in implementing the target alarm code and target emergency plan into specific operations.

[0061] It can be understood that in the emergency response process of the present application, data nodes, target alarm codes, target emergency plans, subtasks and emergency commands interact with each other to form an efficient automated fault handling system; when the system identifies a fault and generates a target alarm code, it will guide the target emergency plan based on the alarm code, further decompose it into subtasks, and issue emergency commands to relevant data nodes to guide each step in their execution plan.

[0062] In another optional implementation, the emergency task includes a globally unique serial number; accordingly, after executing the target emergency plan in the data node within the alarm range, the candidate emergency results of the subtask are asynchronously queried using the globally unique serial number as an index; when the candidate emergency results of all subtasks are obtained, the candidate emergency results are summarized to obtain the target emergency result, and the target emergency result is updated to the metadata database.

[0063] Among them, the globally unique serial number refers to an identifier that is unique throughout the entire system, usually used to identify a specific task, event or object; the globally unique serial number is usually generated by the system to ensure that each serial number is unique even in a distributed environment; in emergency tasks, the globally unique serial number is used to identify each task instance, which can track and manage the execution process of the task, ensuring the uniqueness of each emergency task and its corresponding data, results, operations and other information. Candidate emergency results refer to the potential repair results produced after the execution of subtasks; the execution of each subtask may produce different repair effects, which are called candidate emergency results. The target emergency result refers to the summary result after the execution of all subtasks, representing the execution effect of the entire target emergency plan; it is the final evaluation of all candidate emergency results of subtasks, and reflects whether the emergency task has been completed and whether the problem has been successfully repaired.

[0064] It should be noted that the emergency command includes a globally unique serial number, a target alarm code, and the alarm details required by the emergency script.

[0065] Exemplarily, after executing the emergency command, the management node uses an asynchronous thread to execute a command to query the emergency result according to the global unique serial number, obtains the emergency result of the subtask, and the emergency result of the main task is based on the emergency results of all subtasks, and finally updated to the metadata database.

[0066] It is understandable that after executing the emergency command, an asynchronous query is triggered, and object locks are used to control concurrency. At the same time, only one thread asynchronously queries the results. When other threads come over and find that the asynchronous query is already running, they are only responsible for resetting the query time, reducing performance overhead.

[0067] The embodiment of the present application obtains the target alarm code of the target alarm event when the target alarm event is identified, and determines the target emergency plan from the candidate emergency plans stored in the configuration storage node according to the target alarm code; determines the target emergency range from the candidate emergency range according to the target alarm code and the alarm range; wherein the candidate emergency range includes the alarm-level emergency range, the cluster-level emergency range and the system-level emergency range; determines the emergency task for the target alarm event according to the target alarm code, the alarm range and the target emergency range, and persists the emergency task to the metadata database; based on the distributed concurrent control method, executes the target emergency plan in the data node in the alarm range according to the emergency task. The above technical solution solves the problem of low efficiency in batch processing of alarms of many data nodes by distributed databases and the need for operation and maintenance personnel to manually execute commands, and helps to improve the efficiency and reliability of alarm processing.

[0068] Embodiment 3

[0069] Figure 3 This is a structural diagram of an alarm processing device for a distributed database provided in accordance with the third embodiment of the present application, which can be applied to emergency situations of data node alarms appearing in a distributed database. The alarm processing device for the distributed database can be implemented in the form of hardware and / or software. The alarm processing device for the distributed database can be configured in a computer device, such as a management node of a distributed database; the distributed database may include a configuration storage node, a management node, a metadata database and at least one data node; the management node is respectively connected to the configuration storage node, the data node and the metadata database in communication. Figure 3 As shown, the device comprises:

[0070] The solution determination module 310 is used to obtain the target alarm code of the target alarm event when the target alarm event is identified, and determine the target emergency solution from the candidate emergency solutions stored in the configuration storage node according to the target alarm code;

[0071] A range determination module 320 is used to obtain the alarm range of the target alarm event from the metadata database according to the target alarm code;

[0072] The task determination module 330 is used to determine the emergency task for the target alarm event according to the target alarm code and the alarm range, and persist the emergency task to the metadata database;

[0073] The plan execution module 340 is used to execute the target emergency plan in the data nodes within the alarm range based on the distributed concurrent control method and the emergency task.

[0074] The embodiment of the present application obtains the target alarm code of the target alarm event when the target alarm event is identified, and determines the target emergency plan from the candidate emergency plans stored in the configuration storage node according to the target alarm code; obtains the alarm range of the target alarm event from the metadata database according to the target alarm code; determines the emergency task for the target alarm event according to the target alarm code and the alarm range, and persists the emergency task to the metadata database; based on the distributed concurrent control method, executes the target emergency plan in the data node in the alarm range according to the emergency task. The above technical solution solves the problem of low efficiency in batch processing of alarms of many data nodes by distributed databases and the need for operation and maintenance personnel to manually execute commands, which helps to improve the efficiency and reliability of alarm processing.

[0075] Optionally, the task determination module 330 includes:

[0076] A range determination unit, used to determine a target emergency range from candidate emergency ranges according to a target alarm code and an alarm range; wherein the candidate emergency ranges include an alarm-level emergency range, a cluster-level emergency range, and a system-level emergency range;

[0077] The task determination unit is used to determine the emergency task for the target alarm event according to the target alarm code, alarm range and target emergency range.

[0078] Optionally, the emergency task includes a main task and a subtask; the alarm scope includes a candidate fault source and a fault source location; and correspondingly, the task determination unit is specifically used to:

[0079] Performing fault analysis on candidate fault sources, and determining the candidate fault sources that pass the fault analysis as target fault sources;

[0080] For each target fault source, determine the subtask for the target alarm event according to the target alarm code, the fault source location of the target fault source and the fault data;

[0081] Integrate the subtasks to obtain the main task for the target alarm event.

[0082] Optionally, there is at least one target warning code; there is at least one target emergency plan; the target warning code and the target emergency plan are in a one-to-one relationship; accordingly, the plan execution module 340 includes:

[0083] The plan execution unit is used to execute the target emergency plan corresponding to the target alarm code on each data node in the alarm range according to the subtask corresponding to the data node, and output the emergency result to the target log.

[0084] Optionally, the solution execution unit is specifically used to:

[0085] Generate an emergency command according to the subtask corresponding to the data node, and send the emergency command and the target emergency plan corresponding to the target alarm code on the data node to the data node;

[0086] When a data node receives an emergency command, it executes the target emergency plan corresponding to the target alarm code on the data node.

[0087] Optionally, the emergency task includes a globally unique serial number; accordingly, the device further includes a result query module; the result query module is used to:

[0088] After executing the target emergency plan in the data nodes within the alarm range, asynchronously query the candidate emergency results of the subtask using the globally unique sequence number as the index;

[0089] When the candidate emergency results of all subtasks are obtained, the candidate emergency results are summarized to obtain the target emergency result, and the target emergency result is updated to the metadata database.

[0090] The alarm processing device for a distributed database provided in the embodiment of the present application can execute the alarm processing method for a distributed database provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects for executing the alarm processing method of each distributed database.

[0091] According to an embodiment of the present application, the present application also provides an electronic device, a readable storage medium and a computer program product.

[0092] Embodiment 4

[0093] Figure 4 It is a structural diagram of an electronic device 410 that implements the alarm processing method of the distributed database of an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present application described and / or required herein.

[0094] like Figure 4As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411 in communication, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. In RAM413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, ROM412 and RAM413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.

[0095] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0096] The processor 411 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 411 executes the various methods and processes described above, such as the alarm processing method of the distributed database.

[0097] In some embodiments, the alarm processing method for a distributed database may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the alarm processing method for the distributed database described above may be performed. Alternatively, in other embodiments, the processor 411 may be configured as the alarm processing method for a distributed database in any other appropriate manner (e.g., by means of firmware).

[0098] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0099] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of an alarm processing device of a general-purpose computer, a special-purpose computer, or other programmable distributed database, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0100] In the context of the present application, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0101] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0102] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0103] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0104] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.

[0105] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A distributed database alarm processing method, characterized in that: A management node applied to the distributed database; the distributed database includes a configuration storage node, a management node, a metadata database and at least one data node; The management node is respectively connected to the configuration storage node, the data node and the metadata library in communication; the method comprises: When a target alarm event is identified, a target alarm code of the target alarm event is obtained, and a target emergency plan is determined from candidate emergency plans stored in the configuration storage node according to the target alarm code; According to the target alarm code, acquiring the alarm scope of the target alarm event from the metadata database; Determine an emergency task for the target alarm event according to the target alarm code and the alarm range, and persist the emergency task to the metadata database; Based on the distributed concurrent control method, the target emergency plan is executed in the data nodes within the alarm range according to the emergency task.

2. The method according to claim 1, characterized in that Determining an emergency task for the target alarm event according to the target alarm code and the alarm range includes: Determine a target emergency range from candidate emergency ranges according to the target alarm code and the alarm range; wherein the candidate emergency ranges include an alarm-level emergency range, a cluster-level emergency range, and a system-level emergency range; An emergency task for the target alarm event is determined according to the target alarm code, the alarm range and the target emergency range.

3. The method according to claim 2, characterized in that The emergency task includes a main task and a subtask; the alarm range includes a candidate fault source and a fault source location; accordingly, determining the emergency task for the target alarm event according to the target alarm code, the alarm range and the target emergency range includes: Performing fault analysis on the candidate fault sources, and determining the candidate fault sources that pass the fault analysis as target fault sources; For each target fault source, determining a subtask for the target alarm event according to the target alarm code, the fault source location and fault data of the target fault source; The subtasks are integrated to obtain a main task for the target alarm event.

4. The method according to claim 3, characterized in that The target alarm code is at least one; the target emergency plan is at least one; the target alarm code and the target emergency plan are in a one-to-one relationship; accordingly, executing the target emergency plan in the data node within the alarm range includes: For each data node within the alarm range, according to the subtask corresponding to the data node, the target emergency plan corresponding to the target alarm code on the data node is executed, and the emergency result is output to the target log.

5. The method according to claim 4, characterized in that According to the subtask corresponding to the data node, execute the target emergency plan corresponding to the target alarm code on the data node, including: Generate an emergency command according to the subtask corresponding to the data node, and send the emergency command and the target emergency plan corresponding to the target alarm code on the data node to the data node; When the data node receives the emergency command, the target emergency plan corresponding to the target alarm code on the data node is executed.

6. The method according to claim 3, characterized in that The emergency task includes a globally unique sequence number; accordingly, after executing the target emergency plan in the data node within the alarm range, the method further includes: Using the globally unique sequence number as an index, asynchronously querying the candidate emergency results of the subtask; When candidate emergency response results of all subtasks are obtained, the candidate emergency response results are summarized to obtain a target emergency response result, and the target emergency response result is updated to the metadata database.

7. An alarm processing device for a distributed database, characterized in that: A management node configured in the distributed database; the distributed database includes a configuration storage node, a management node, a metadata database and at least one data node; The management node is respectively connected to the configuration storage node, the data node and the metadata library in communication; the device comprises: A solution determination module is used to obtain a target alarm code of the target alarm event when a target alarm event is identified, and determine a target emergency solution from the candidate emergency solutions stored in the configuration storage node according to the target alarm code; A range determination module, configured to obtain an alarm range of the target alarm event from the metadata database according to the target alarm code; A task determination module, used to determine an emergency task for the target alarm event according to the target alarm code and the alarm range, and persist the emergency task to the metadata database; A plan execution module is used to execute the target emergency plan in the data nodes within the alarm range based on the emergency task based on the distributed concurrent control method.

8. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the alarm processing method for a distributed database as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the distributed database alarm processing method as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the alarm processing method for a distributed database according to any one of claims 1 to 6 is implemented.