Heterogeneous database operation and maintenance method and device, computer equipment and storage medium
By introducing a unified API interface and adapter into heterogeneous databases, and parsing it into a dedicated sequence of operation and maintenance commands, the inefficiency and security risks in the unified operation and maintenance of heterogeneous databases are solved, the success rate of operation and maintenance operations and resource utilization efficiency are improved, and user operations are simplified.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XINHUA CENTURY E-COMMERCE CO LTD
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-19
AI Technical Summary
During enterprise digital transformation, the unified operation and maintenance management of heterogeneous databases suffers from low operation and maintenance efficiency, high complexity, security risks, and resource waste.
By introducing a unified API interface, an adapter is used to parse unified operation and maintenance requests into a sequence of operation and maintenance commands specific to each target database system, and execute them using the operation and maintenance solution dataset of each database system. This reduces the learning cost and operational threshold for operation and maintenance personnel, and improves the success rate of operation and maintenance operations and resource utilization efficiency.
It has implemented a standardized entry point for operation and maintenance requests, simplified user operations, avoided performing invalid operations on database systems that do not meet the requirements, improved operation and maintenance efficiency and reliability, adapted to the characteristics of different database systems, and reduced the burden on the operation and maintenance platform.
Smart Images

Figure CN122064666A_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to the field of data security technology, and in particular to a method, apparatus, computer equipment and storage medium for the operation and maintenance of heterogeneous databases. Background Technology
[0002] Enterprises typically introduce multiple technology stacks and databases during their digital transformation. Managing each database separately can lead to low operational efficiency, increased security risks, and wasted resources. Therefore, it is necessary to manage heterogeneous databases in a unified manner.
[0003] Among related technologies, an operation and maintenance platform can be built to perform unified operation and maintenance on heterogeneous databases, such as standardizing indicators, unifying alarms, and synchronizing upgrades. Specifically, the operation and maintenance platform can map the independent performance indicators of different databases to a common health scoring system, and can also perform correlation analysis, deduplication, and merging of alarm signals collected from all heterogeneous databases. Throughout the operation and maintenance process, the operation and maintenance platform needs to uniformly process the complete operation and maintenance operation-related data reported by all databases, which results in low operation and maintenance complexity and efficiency. Summary of the Invention
[0004] In view of the aforementioned defects or deficiencies in the existing technology, it is desirable to provide a heterogeneous database operation and maintenance method, device, computer equipment, and storage medium. By introducing a unified API interface to submit unified operation and maintenance requests, the learning cost and operational threshold for operation and maintenance personnel are reduced. By obtaining the feasibility verification results of operation and maintenance operations and identifying the target database system, invalid operations on unqualified database systems are effectively avoided, improving the success rate and resource utilization efficiency of operation and maintenance operations. By using an adapter to parse the unified operation and maintenance request into a unique operation and maintenance command sequence for each target database system and executing it using the pre-stored operation and maintenance solution dataset of each database system, the burden on the operation and maintenance platform is reduced, and the overall efficiency and reliability of operation and maintenance are improved. This effectively solves the problems of low operation and maintenance efficiency, high complexity, security risks, and resource waste in the unified operation and maintenance of heterogeneous databases.
[0005] Firstly, this application provides a heterogeneous database operation and maintenance method applied to an operation and maintenance platform containing multiple adapters, each of which is configured to parse operation and maintenance requests from a unified API interface, the operation and maintenance platform providing the unified API interface externally. The method includes: The system receives database operation and maintenance requests from users through the unified API interface, and extracts the database system type and operation and maintenance operation type from the database operation and maintenance request. If there are multiple database system types and the operation and maintenance operation type is a unified operation and maintenance operation for multiple database systems, the system obtains the operation and maintenance operation feasibility verification results for each of the multiple database systems. Each database system type corresponds to one database system. Based on the feasibility verification results of multiple operations and maintenance operations, multiple target database systems for executing the unified operations and maintenance operations are determined. Based on the protocol specifications, command syntax, and state machine model of each target adapter corresponding to the target database system, the database operation and maintenance request is parsed into a sequence of multiple executable operation and maintenance commands. The protocol specifications are used to define the rules and standards for communication and data interaction between the target database system and the application or client. The command syntax is used to operate and manage the target database system and the data and objects within the target database system. The state machine model is used to manage and describe the transition process of entity objects in the target database system between different states. The corresponding operation and maintenance command sequence is sent to multiple target database systems respectively, so that each target database system selects operation and maintenance plan data that matches the corresponding operation and maintenance command sequence from its own pre-stored operation and maintenance plan dataset, and then executes the corresponding operation and maintenance command sequence.
[0006] In one embodiment, the step of parsing the database operation and maintenance request into a sequence of executable operation and maintenance commands based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to each target adapter includes: The database system type of each of the multiple target database systems is matched with the pre-registered database system type-adapter mapping table; If the database system type of each of the multiple target database systems matches the database system type-adapter mapping table, then the multiple target adapters participating in the parsing of this operation and maintenance request are determined, and the database operation and maintenance request is parsed into multiple operation and maintenance command sequences according to the protocol specifications, command syntax and state machine model of the target database system corresponding to each target adapter.
[0007] In one embodiment, the method further includes: If the database system type of each of the multiple target database systems fails to match the database system type-adapter mapping table, then the target database system type that exists in the database system type-adapter mapping table and the new database system type that does not exist in the database system type-adapter mapping table are determined from the database system types of each of the multiple target database systems. Load the adapter plugin that is bound to the new database system corresponding to the new database system type, and register the protocol specifications, command syntax and state machine model supported by the adapter plugin to obtain the new adapter corresponding to the new database system; Based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to the target adapter, and the protocol specifications, command syntax, and state machine model of the new adapter corresponding to the new database system, the database operation and maintenance request is parsed into multiple operation and maintenance command sequences; the target database system corresponds to the target database system type.
[0008] In one embodiment, if the database system type of each of the plurality of target database systems successfully matches the database system type-adapter mapping table, then the plurality of target adapters participating in the parsing of this operation and maintenance request are determined, including: If the database system type of each of the multiple target database systems matches the database system type-adapter mapping table, then multiple successfully matched adapters are determined from the database system type-adapter mapping table, and the current process health, current resource utilization, and current performance efficiency of each successfully matched adapter are determined; the current performance efficiency is used to measure the speed and resource consumption of the corresponding successfully matched adapter in parsing the database operation and maintenance request; If the health of each current process is higher than a preset health threshold, the current resource utilization rate is lower than a preset utilization rate threshold, and the current performance efficiency is higher than a preset efficiency threshold, then the multiple successfully matched adapters are determined as the multiple target adapters participating in the parsing of this operation and maintenance request.
[0009] In one embodiment, the operation and maintenance command sequence is a primary / standby switchover command sequence, and sending the corresponding operation and maintenance command sequence to the multiple target database systems includes: The system sends pre-inspection operation requests to multiple target database systems respectively and receives pre-inspection operation results from each target database system; the pre-inspection operation request is used to request the corresponding target database system to confirm whether its environment meets the conditions for primary / standby switchover. If, based on the results of each pre-inspection operation, it is determined that the environment of the target database system meets the master-slave switchover conditions, the corresponding operation and maintenance command sequence is sent to the multiple target database systems in a predetermined order.
[0010] In one embodiment, the step of parsing the database operation and maintenance request into a sequence of executable operation and maintenance commands based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to each target adapter includes: When the database maintenance request carries the user's identity information, it is determined whether the user is a legitimate user based on the user's identity information; If the user is a legitimate user, then the user's operation and maintenance instruction permission level is retrieved from the pre-stored mapping relationship between user identity information and operation and maintenance instruction permission level based on the user's identity information; If the user's operation and maintenance instruction permission level is higher than the permission level threshold, then the database operation and maintenance request is parsed into multiple operation and maintenance command sequences according to the protocol specifications, command syntax and state machine model of the target database system corresponding to each target adapter.
[0011] In one embodiment, the method further includes: Receive the operation and maintenance execution results reported by each of the target database systems, and perform unified data visualization processing on multiple operation and maintenance execution results; The operation and maintenance execution results after the unified data visualization processing are loaded onto the visualization interface to display the unified operation and maintenance execution results corresponding to the database operation and maintenance request to the user.
[0012] Secondly, this application also provides a heterogeneous database operation and maintenance device, characterized in that it is applied to an operation and maintenance platform containing multiple adapters, each of the adapters being configured to parse operation and maintenance instructions from a unified API interface, the operation and maintenance platform providing the unified API interface externally. The device includes: The feasible database determination unit is used to receive database operation and maintenance requests input by users through the unified API interface, and extract the database system type and operation and maintenance operation type from the database operation and maintenance request. If there are multiple database system types and the operation and maintenance operation type is a unified operation and maintenance operation for multiple database systems, then the feasibility verification results of the operation and maintenance operation for each of the multiple database systems are obtained; each database system type corresponds to one database system; based on the multiple operation and maintenance operation feasibility verification results, multiple target database systems for executing the unified operation and maintenance operation are determined. The operation and maintenance request parsing unit is used to parse the database operation and maintenance request into multiple executable operation and maintenance command sequences according to the protocol specification, command syntax, and state machine model of the target database system corresponding to each target adapter; the protocol specification is used to define the rules and standards for communication and data interaction between the target database system and the application or client; the command syntax is used to operate and manage the target database system and the data and objects within the target database system; and the state machine model is used to manage and describe the transition process of entity objects in the target database system between different states. A unified operation and maintenance execution unit is used to send the corresponding operation and maintenance command sequence to multiple target database systems respectively, so that each target database system selects operation and maintenance plan data that matches the corresponding operation and maintenance command sequence from its own pre-stored operation and maintenance plan dataset and then executes the corresponding operation and maintenance command sequence.
[0013] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the heterogeneous database operation and maintenance method as described in the first aspect.
[0014] Fourthly, this application also provides a computer-readable storage medium. This computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the heterogeneous database operation and maintenance method as described in the first aspect.
[0015] This application provides a heterogeneous database operation and maintenance method, apparatus, computer equipment, and storage medium. The heterogeneous database operation and maintenance method, by introducing a unified API interface, standardizes the entry point for operation and maintenance requests, greatly simplifying user operations. Users do not need to concern themselves with the specific type and operational details of the underlying database; they only need to submit a unified operation and maintenance request through a single interface, thereby reducing the learning cost and operational threshold for operation and maintenance personnel. By obtaining the feasibility verification results of operation and maintenance operations and determining the target database system, it effectively avoids executing invalid operations on database systems that do not meet the requirements, improving the success rate and resource utilization efficiency of operation and maintenance operations. Furthermore, by using an adapter to parse the unified operation and maintenance request into a unique operation and maintenance command sequence for each target database system and executing it using the pre-stored operation and maintenance solution dataset of each database system, this design not only allows the operation and maintenance platform to flexibly adapt to the characteristics of different database systems but also decentralizes the specific execution logic to each database system, reducing the burden on the operation and maintenance platform. It also ensures that each database system executes operations in the most optimized and secure way, thereby improving the overall efficiency and reliability of operation and maintenance. This effectively solves the problems of low operation and maintenance efficiency, high complexity, security risks, and resource waste in unified operation and maintenance of heterogeneous databases. Attached Figure Description
[0016] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is one of the flowcharts illustrating a heterogeneous database operation and maintenance method in one embodiment; Figure 2 This is the second flowchart illustrating a heterogeneous database operation and maintenance method in one embodiment; Figure 3 This is the third flowchart illustrating a heterogeneous database operation and maintenance method in one embodiment; Figure 4 This is the fourth flowchart illustrating a heterogeneous database operation and maintenance method in one embodiment; Figure 5 This is the fifth flowchart illustrating a heterogeneous database operation and maintenance method in one embodiment; Figure 6 This is the sixth flowchart illustrating a heterogeneous database operation and maintenance method in one embodiment; Figure 7 This is the seventh flowchart illustrating a heterogeneous database operation and maintenance method in one embodiment; Figure 8 This is a structural block diagram of a heterogeneous database operation and maintenance device in one embodiment; Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0017] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0018] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The present application will now be described in detail with reference to the accompanying drawings and embodiments. Furthermore, the term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The terms "first" and "second," etc., in the specification and claims of the embodiments of this application are used to distinguish different objects, not to describe a specific order of objects.
[0019] Enterprises typically introduce multiple technology stacks and databases during their digital transformation. Managing each database separately can lead to low operational efficiency, increased security risks, and wasted resources. Therefore, it is necessary to manage heterogeneous databases in a unified manner.
[0020] Among related technologies, an operation and maintenance platform can be built to perform unified operation and maintenance on heterogeneous databases, such as standardizing indicators, unifying alarms, and synchronizing upgrades. Specifically, the operation and maintenance platform can map the independent performance indicators of different databases to a common health scoring system, and can also perform correlation analysis, deduplication, and merging of alarm signals collected from all heterogeneous databases. Throughout the operation and maintenance process, the operation and maintenance platform needs to uniformly process the complete operation and maintenance operation-related data reported by all databases, which results in low operation and maintenance complexity and efficiency.
[0021] To address the aforementioned technical problems, this application proposes a heterogeneous database operation and maintenance method, apparatus, computer device, and storage medium. The heterogeneous database operation and maintenance method is applied to an operation and maintenance platform containing multiple adapters. Each adapter is configured to parse operation and maintenance requests from a unified application programming interface (API), and the operation and maintenance platform provides a unified API interface to the outside world. Furthermore, the operation and maintenance platform can be deployed on a server or managed through a computer device. This application does not impose specific limitations in this regard. Further, the heterogeneous database operation and maintenance method can also be applied to a heterogeneous database operation and maintenance apparatus installed in a computer device or server. This heterogeneous database operation and maintenance apparatus can be implemented through software, hardware, or a combination of both. The following description uses an operation and maintenance platform deployed on a server as the execution subject of this heterogeneous database operation and maintenance method as an example.
[0022] To facilitate understanding of the heterogeneous database operation and maintenance method provided in this application, the following examples will provide a detailed description of the method. It is understood that these examples can be combined with each other, and similar concepts or processes may not be repeated in some embodiments.
[0023] Reference Figure 1 This is a flowchart illustrating the heterogeneous database operation and maintenance method provided in the embodiments of this application, as shown below. Figure 1 As shown, the heterogeneous database operation and maintenance method includes the following steps 101 to 104.
[0024] Step 101: Receive the database operation and maintenance request input by the user through the unified API interface, and extract the database system type and operation and maintenance operation type from the database operation and maintenance request. If there are multiple database system types and the operation and maintenance operation type is a unified operation and maintenance operation for multiple database systems, then obtain the feasibility verification results of the operation and maintenance operation for each of the multiple database systems; each database system type corresponds to one database system.
[0025] Among them, multiple database systems may include, but are not limited to, relational databases, non-relational databases, or data warehouses. Relational databases may include, but are not limited to, Oracle databases and MySQL databases, and non-relational databases may include, but are not limited to, NoSQL databases or Redis databases.
[0026] The unified API interface is a standardized application programming interface provided by the operation and maintenance platform. It provides a single entry point for users or other systems to submit database operation and maintenance requests, thereby abstracting the complexity of interacting with different underlying database technologies.
[0027] It should be noted that the operation and maintenance platform has a pre-designed core adapter layer, which deploys multiple adapters. Each adapter can be considered a core component within the operation and maintenance platform. The main function of each adapter is to convert general operation and maintenance requests into specific command sequences that can be understood by a particular database system. Each adapter is customized for a specific database system, enabling the operation and maintenance platform to interact with heterogeneous databases in a unified manner.
[0028] A database maintenance request represents a user-initiated instruction or command to perform a specific maintenance operation on one or more database systems. This request may cover maintenance operations such as backup, recovery, performance tuning, or schema changes.
[0029] Operation and maintenance operation types can be classified according to the nature of the requested operation and maintenance operation, such as backup, recovery, primary / standby switchover, expansion, or performance optimization.
[0030] The feasibility verification result of operation and maintenance is to assess whether the requested operation and maintenance operation can be successfully executed on a specific database system, taking into account the current state, configuration and environmental limitations of that specific database system.
[0031] Specifically, the system receives database maintenance requests from users through a unified API interface and extracts the database system type and maintenance operation type from these requests. In practice, users can submit maintenance operation requirements for different database systems through a unified API interface, such as a web interface or command-line tool. This unified API interface is responsible for collecting these database maintenance requests. Upon receiving a database maintenance request, the maintenance platform needs to identify the type of database system involved in the request and the specific maintenance operation the user wishes to perform. For example, a database maintenance request might include performing a "backup" operation on a "MySQL database" or a "master-slave switchover" operation on a "PostgreSQL database".
[0032] If there are multiple database system types, and the operation type is a unified operation for multiple database systems, then the feasibility verification results of the operation for each database system are obtained. When a user wants to perform the same operation on multiple different types of database systems, such as simultaneously backing up MySQL and Oracle databases, the operation platform needs to assess whether each database system has the conditions to perform the backup operation. For example, this can be done by sending a query request to each database system to check its current status, resource usage, permission configuration, etc., to determine whether the operation is feasible. If a database system is in maintenance mode or has insufficient resources, its feasibility verification result may indicate that the operation is not feasible.
[0033] Step 102: Based on the feasibility verification results of multiple operation and maintenance operations, determine the multiple target database systems to perform unified operation and maintenance operations.
[0034] The number of target database systems can be the same as or different from the number of database systems, meaning the number of target database systems must be greater than or equal to the number of database systems.
[0035] Specifically, after obtaining the feasibility verification results for the operation and maintenance of each database system, the operation and maintenance platform will filter based on these results. Only those database systems verified as feasible will be included as target database systems in this unified operation and maintenance operation. For example, if a user requests a unified backup of database systems A, B, and C, but the feasibility verification result for database system A shows that its storage space is insufficient, then the final target database systems will only include B and C. This filtering mechanism ensures the effectiveness of the operation and maintenance operation and avoids performing invalid operations on database systems that do not meet the requirements.
[0036] Step 103: Based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to each target adapter, parse the database operation and maintenance request into a sequence of multiple executable operation and maintenance commands.
[0037] The protocol specification defines the rules and standards for communication and data interaction between the target database system and the application or client; that is, the protocol specification defines the rules and standards for communication and data interaction between a specific target database system and the application or client, and it specifies the message format, timing, sequence and error handling mechanism.
[0038] Command syntax is used to operate and manage the corresponding target database system and the data and objects within the target database system. In other words, command syntax refers to the specific structure and rules for constructing commands to operate a specific target database system (including its internal data and objects). Each target database system has its own unique command language.
[0039] State machine models are used to manage and describe the transition process of entity objects in a target database system between different states. They help to understand and control the lifecycle and behavior of components in the target database system.
[0040] Specifically, based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to each target adapter, the database operation and maintenance request is parsed into multiple executable sequences of operation and maintenance commands. Once the target database system is determined, the operation and maintenance platform needs to translate the unified operation and maintenance request into a specific sequence of commands that each target database system can understand and execute. This typically involves an adaptation layer. For example, for a "backup" request, a MySQL database might need to execute the `mysqldump` command, while an Oracle database might need to execute the `RMAN` command. The adapter translates the abstract database operation and maintenance request into a series of specific, sequentially executed operation and maintenance commands based on the protocol specifications, command syntax, and state machine model of the corresponding target database system stored internally. The protocol specifications ensure the correctness of communication, the command syntax guarantees the validity of the instructions, and the state machine model is used to manage the state changes of database objects during the operation.
[0041] Step 104: Send the corresponding operation and maintenance command sequence to multiple target database systems respectively, so that each target database system selects the operation and maintenance plan data that matches the corresponding operation and maintenance command sequence from its own pre-stored operation and maintenance plan dataset and then executes the corresponding operation and maintenance command sequence.
[0042] Specifically, after generating the operation and maintenance command sequence for each target database system, the operation and maintenance platform sends these command sequences to their respective target database systems. Upon receiving the corresponding operation and maintenance command sequence, each target database system matches it against its own pre-stored operation and maintenance solution dataset. For example, if the operation and maintenance command sequence is about "full backup," the target database system will find the corresponding full backup script or configuration in its operation and maintenance solution dataset and execute it accordingly. This approach allows each target database system to perform operations based on its own best practices and configurations, improving execution flexibility and efficiency.
[0043] The heterogeneous database operation and maintenance method provided in this application introduces a unified API interface, which standardizes the entry point for operation and maintenance requests, greatly simplifying user operations. Users do not need to pay attention to the specific type and operation details of the underlying database; they only need to submit a unified operation and maintenance request through a single interface, thereby reducing the learning cost and operational threshold for operation and maintenance personnel. By obtaining the feasibility verification results of operation and maintenance operations and determining the target database system, it effectively avoids performing invalid operations on database systems that do not meet the conditions, improving the success rate and resource utilization efficiency of operation and maintenance operations. Furthermore, by using an adapter to parse the unified operation and maintenance request into a unique operation and maintenance command sequence for each target database system and executing it using the pre-stored operation and maintenance solution dataset of each database system, this design not only allows the operation and maintenance platform to flexibly adapt to the characteristics of different database systems, but also decentralizes the specific execution logic to each database system, reducing the burden on the operation and maintenance platform. Moreover, it ensures that each database system executes operations in the most optimized and secure way, thereby improving the overall efficiency and reliability of operation and maintenance. This effectively solves the problems of low operation and maintenance efficiency, high complexity, security risks, and resource waste in the unified operation and maintenance of heterogeneous databases.
[0044] Based on the above Figure 1 In one example embodiment of the method shown, step 103 parses the database operation and maintenance request into a sequence of executable operation and maintenance commands based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to each target adapter. The specific process in this embodiment can be achieved through... Figure 2 Steps 201 and 202 shown are implemented.
[0045] Step 201: Match the database system type of each of the multiple target database systems with the pre-registered database system type-adapter mapping table.
[0046] Step 202: If the database system type of each of the multiple target database systems matches the database system type-adapter mapping table, then determine the multiple target adapters participating in the parsing of this operation and maintenance request, and parse the database operation and maintenance request into multiple operation and maintenance command sequences according to the protocol specifications, command syntax and state machine model of the target database system corresponding to each target adapter.
[0047] The database system type-adapter mapping table is a pre-established data structure used to store the association between database system types and their corresponding adapters. This mapping table can be a hash table or dictionary stored in memory, with the database system type as the key (e.g., MySQL, PostgreSQL, Oracle) and the corresponding adapter identifier or adapter instance as the value. Alternatively, it can be a configuration table persistently stored in a database (e.g., a relational database or NoSQL database), containing a database system type field and an adapter ID field. This table is loaded into memory when the operations and maintenance platform starts for fast querying. Its core function is to provide a fast and accurate method for finding adapters that match a specific database system type, laying the foundation for subsequent operations and maintenance request parsing.
[0048] If the database system types of multiple target database systems match successfully with the database system type-adapter mapping table, it can be understood that adapter information corresponding to the target database system type was found in the database system type-adapter mapping table. The operations and maintenance platform can iterate through the list of target database systems. For each target database system, its type is used as the query key to search the database system type-adapter mapping table. If corresponding adapter information can be found for each target database system, the match is considered successful.
[0049] The multiple target adapters involved in parsing the maintenance request can be understood as the adapter instances that are selected based on the matching results to actually parse the database maintenance request. Upon successful matching, the maintenance platform can obtain the corresponding adapter identifier from the database system type-adapter mapping table, and then instantiate or reference these adapters from the loaded or available adapter pool. Alternatively, this can be a dynamic loading process; when a match is successful, the maintenance platform dynamically loads the corresponding adapter module or plugin based on the mapping information. This clarifies which specific adapters will undertake the parsing task, providing a concrete executor for subsequent parsing operations. Specifically, by introducing a pre-registered database system type-adapter mapping table mechanism, the adapter matching process is optimized, solving the problem of low adapter selection efficiency and ensuring the accuracy and efficiency of operation and maintenance request parsing. When a database operation and maintenance request from a heterogeneous database arrives, the operation and maintenance platform first identifies the database system type involved and uses the pre-registered database system type-adapter mapping table for rapid matching. This matching mechanism can quickly and accurately locate the adapter corresponding to a specific database system type, avoiding the delays and potential errors caused by dynamic searching or manual configuration. Once the target adapter is determined, each adapter can accurately convert the database operation and maintenance request from the heterogeneous database into a sequence of operation and maintenance commands that can be directly executed by each target database system, based on its built-in protocol specifications, command syntax, and state machine model. This pre-registration and precise matching approach greatly improves the efficiency and reliability of heterogeneous database operation and maintenance request parsing, enabling the operation and maintenance platform to manage diverse database environments in a more efficient and accurate manner.
[0050] Based on the above Figure 2 The method shown, in one example embodiment, considers that during the implementation of using a database system type-adapter mapping table to match the target adapter for parsing operation and maintenance requests, when a new, unregistered database system type is encountered, the mapping table match fails, preventing subsequent parsing. This limits the scalability and adaptability of the operation and maintenance platform, resulting in the inability to dynamically handle newly added heterogeneous database systems. To address this, this application embodiment... Figure 3 Steps 301 to 303 shown implement the parsing process of multiple operation and maintenance command sequences when matching fails.
[0051] Step 301: If the database system type of each of the multiple target database systems fails to match the database system type-adapter mapping table, then determine the target database system type that exists in the database system type-adapter mapping table and the new database system type that does not exist in the database system type-adapter mapping table from the database system types of each of the multiple target database systems.
[0052] Step 302: Load the adapter plugin that is bound to the new database system corresponding to the new database system type, and register the protocol specifications, command syntax and state machine model supported by the adapter plugin to obtain the new adapter corresponding to the new database system.
[0053] Step 303: Based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to the target adapter, and the protocol specifications, command syntax, and state machine model of the new database system corresponding to the new adapter, parse the database operation and maintenance request into multiple operation and maintenance command sequences; the target database system corresponds to the target database system type.
[0054] Specifically, when multiple target database systems fail to match their respective database system types with the database system type-adapter mapping table, it is necessary to identify which database system types are known (i.e., target database system types existing in the mapping table) and which are unknown (i.e., new database system types not existing in the mapping table). This process forms the basis for subsequent dynamic processing. The operations and maintenance platform can iterate through the database system types of each target database system and query the database system type-adapter mapping table one by one. If the query is successful, the database system type is classified as a target database system type existing in the mapping table; if the query fails, the database system type is classified as a new database system type not existing in the database system type-adapter mapping table.
[0055] After identifying a new database system type, the corresponding adapter plugin bound to that new database system type can be loaded, and the protocol specifications, command syntax, and state machine model supported by the adapter plugin can be registered, thus obtaining a new adapter for the new database system. This step aims to dynamically expand the operation and maintenance platform's support capabilities for new heterogeneous databases. As one implementation, the operation and maintenance platform can maintain an adapter plugin library that stores adapter plugins for various database types. When a new database system type is detected, the operation and maintenance platform can retrieve and dynamically load the corresponding adapter plugin from the library based on that type. After loading, the adapter plugin will register its supported protocol specifications (e.g., data transmission protocols, authentication protocols), command syntax (e.g., SQL dialects, NoSQL query languages), and state machine model (e.g., the running state and replication state of the database instance) with the operation and maintenance platform through a predefined interface. Another implementation is that the adapter plugin can exist in a modular form. When a new database system type is identified, the operation and maintenance platform can trigger a plugin management service, which is responsible for downloading and installing the corresponding adapter plugin from a specified location (e.g., a remote repository or a local directory). During installation, the adapter plugin's metadata (including protocol specifications, command syntax, and state machine model) is automatically parsed and registered in the adapter management module of the operation and maintenance platform, thereby generating a usable new adapter.
[0056] Subsequently, the operations and maintenance platform will parse the database operation and maintenance requests for heterogeneous databases into multiple operation and maintenance command sequences based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to the existing target adapter, and the protocol specifications, command syntax, and state machine model of the new adapter corresponding to the new database system. This step ensures that both pre-registered database systems and newly dynamically integrated database systems can be processed uniformly. The operations and maintenance platform can have a unified command parser that receives database operation and maintenance requests and dynamically selects the appropriate adapter (whether it is a pre-registered target adapter or a new adapter) based on the type of each target database system (including target database systems corresponding to new database system types). Then, the command parser calls the parsing function of the selected adapter, which uses its internally registered protocol specifications, command syntax, and state machine model to convert the general database operation and maintenance request into an operation and maintenance command sequence that can be recognized and executed by that specific database system.
[0057] Based on the above Figure 2 In one example embodiment of the method shown, if the database system type of each of the multiple target database systems successfully matches the database system type-adapter mapping table in step 202, then the multiple target adapters participating in the parsing of this operation and maintenance request are determined. The specific process in this embodiment is as follows: Figure 4 Steps 401 and 402 shown are implemented.
[0058] Step 401: If the database system type of each of the multiple target database systems matches the database system type-adapter mapping table, then determine multiple successfully matched adapters from the database system type-adapter mapping table, and determine the current process health, current resource utilization, and current performance efficiency of each successfully matched adapter; the current performance efficiency is used to measure the speed and resource consumption of the corresponding successfully matched adapter in parsing database operation and maintenance requests.
[0059] Step 402: If the health of each current process is higher than the preset health threshold, the resource utilization rate of each current process is lower than the preset utilization rate threshold, and the performance efficiency of each current process is higher than the preset efficiency threshold, then the multiple successfully matched adapters are determined as the multiple target adapters participating in the parsing of this operation and maintenance request.
[0060] The process of identifying multiple successfully matching adapters can be understood as recognizing all available adapters that match the target database system type from a pre-registered database system type-adapter mapping table, providing a candidate set for subsequent adapter status evaluation. This can be achieved by traversing the mapping table to find a list of adapter identifiers associated with the target database system type, or the mapping table can be organized as a hash table or tree structure, allowing for fast lookups using the database system type as the key to directly retrieve the corresponding adapter list.
[0061] Determining the current process health of each successfully matched adapter is used to assess whether the adapter process is running normally, reflecting its stability. This can be done by monitoring the adapter process's liveness and resource usage through APIs provided by the operating system, or by integrating a heartbeat mechanism within the adapter to periodically send health reports to the operations and maintenance platform.
[0062] Determining the current resource utilization of each successfully matched adapter is used to measure the adapter's consumption of system resources at the current moment, such as CPU utilization, memory utilization, disk I / O, or network bandwidth. This can be achieved by collecting resource usage data of the adapter process in real time through the performance monitoring interface provided by the operating system, or by the adapter's built-in resource monitoring module periodically reporting its own resource usage data to the operation and maintenance platform.
[0063] Determining the current performance efficiency of each successfully matched adapter is crucial for evaluating the speed and resource consumption of the adapter in parsing database maintenance requests. This is a key metric for measuring the adapter's processing capacity. It can be determined by recording the start and end times of each maintenance request processed by the adapter, calculating the average processing time and throughput, or by the maintenance platform periodically sending simulated maintenance requests to the adapter and comprehensively evaluating its performance efficiency based on the adapter's response time, error rate, and the resources consumed in processing these requests.
[0064] A preset health threshold is a pre-defined value or standard used to determine the minimum acceptable level of adapter process health. For example, it can be set as a percentage of process lifespan or an upper limit on the number of error logs. A preset utilization threshold is a pre-defined value or standard used to determine the maximum acceptable level of adapter resource utilization. For example, CPU utilization should not exceed 80%, and memory utilization should not exceed 90%.
[0065] The preset efficiency threshold is a pre-set value or standard used to determine the minimum acceptable level of adapter performance efficiency, such as an average request parsing time of no more than 500 milliseconds or a minimum of 100 requests per second.
[0066] Understandably, after the operations and maintenance platform receives database operations and maintenance requests from users through a unified API interface and extracts the database system type and operations and maintenance operation type from the requests, when the operations and maintenance operation type is a unified operations and maintenance operation targeting multiple heterogeneous database systems, the operations and maintenance platform will obtain the feasibility verification results of the operations and maintenance operations for each of these database systems, and determine the multiple target database systems to execute the unified operations and maintenance operation based on the verification results. Subsequently, the operations and maintenance platform needs to parse the database operations and maintenance request into multiple executable sequences of operations and maintenance commands according to the protocol specifications, command syntax, and state machine model of the target database system corresponding to each target adapter. During the parsing process, the database system types of the multiple target database systems are first matched with the pre-registered database system type-adapter mapping table. If a match is successful, to ensure the reliability and efficiency of the operations and maintenance request parsing process, this application does not directly select all successfully matched adapters, but introduces a dynamic evaluation of the running status of these successfully matched adapters.
[0067] Specifically, the operations and maintenance platform identifies all adapters that successfully match the target database system type from the database system type-adapter mapping table, forming a set of potentially available adapters. Subsequently, the platform actively or passively acquires real-time status data for each adapter in this set, including current process health, current resource utilization, and current performance efficiency. These metrics comprehensively reflect the adapter's current operating status and processing capacity. After acquiring this real-time status data, the platform compares each adapter's current process health, current resource utilization, and current performance efficiency with preset health thresholds, utilization thresholds, and efficiency thresholds. Only when a successfully matched adapter's current process health is higher than the preset health threshold, its current resource utilization is lower than the preset utilization threshold, and its current performance efficiency is higher than the preset efficiency threshold, is that successfully matched adapter considered to be in optimal working condition and ultimately identified as the target adapter for this operations and maintenance request parsing. Through this dynamic filtering mechanism, the operation and maintenance platform can ensure that only stable, efficient and resource-sufficient adapters are used to handle complex cross-database operation and maintenance requests, thereby significantly reducing the risk of parsing failures, improving the success rate of operation and maintenance operations and the overall system efficiency. This mechanism, combined with the basic adapter matching function, forms a more robust and intelligent adapter scheduling strategy.
[0068] Based on the above Figure 1 In one example embodiment of the method shown, when the operation and maintenance command sequence is a primary / standby switchover command sequence, step 104 involves sending the corresponding operation and maintenance command sequence to multiple target database systems. The specific process of this step in this embodiment can be achieved through... Figure 5 Steps 501 and 502 shown are implemented.
[0069] Step 501: Send pre-check operation requests to multiple target database systems respectively, and receive the pre-check operation results from each target database system; the pre-check operation request is used to request the corresponding target database system to confirm whether its environment meets the conditions for master-slave switchover.
[0070] Step 502: If, based on the results of each pre-inspection operation, it is determined that the environment of the corresponding target database system meets the master-slave switchover conditions, the corresponding operation and maintenance command sequence is sent to the multiple target database systems in a predetermined order.
[0071] In a high-availability database architecture, master-slave failover can be understood as a critical operation. Its purpose is to promote a standby database to master when the primary database fails, ensuring business continuity. The master-slave failover command sequence can include a series of database-specific SQL commands, operating system commands, script calls, or API requests. Specifically, the purpose of sending pre-check operation requests to multiple target database systems is to conduct a comprehensive check and verification of the current state and environment of the target database systems before actually executing the master-slave switchover command sequence, so as to ensure that they meet all the prerequisites for master-slave switchover. This helps to avoid forcibly executing operations when the conditions are not met, which could lead to problems such as data loss, service interruption or system instability.
[0072] A preflight request can be a lightweight query command, such as querying the database replication status, data synchronization latency, disk space, network connectivity, process health status, etc.
[0073] Receiving the pre-check results from each target database system is a crucial step in obtaining their self-check status. These results will serve as the basis for subsequent decisions (whether to perform a master-slave switchover). By collecting feedback from all target database systems, the operations platform can comprehensively assess their readiness. The platform can receive pre-check results by listening on specific ports, parsing database query results, receiving system logs, or through API callbacks. These results typically include success / failure flags, specific error messages, warnings, or detailed status reports.
[0074] The preflight request is used to request the target database system to confirm whether its environment meets the conditions for master-slave failover. This clarifies the core purpose of the preflight request: to allow the target database system to proactively verify whether its environment meets the specific requirements for master-slave failover. This decentralizes the verification logic to the target database system itself, leveraging its most accurate awareness of its own state. Upon receiving the preflight request, the target database system will check a series of conditions related to master-slave failover according to preset rules or built-in logic. These conditions may include, but are not limited to: the current database role (whether it is a master or slave database), replication status (whether it is synchronized, whether there is latency), resource usage (whether CPU, memory, and disk I / O are normal), network connectivity, whether critical processes are running, and whether there are any incomplete transactions.
[0075] If, based on the results of each pre-inspection operation, the environment of the corresponding target database system meets the master-slave switchover conditions, then a sequence of corresponding operation and maintenance commands is sent to multiple target database systems in a predetermined order. This is the decision point and execution mechanism for performing the master-slave switchover operation. It ensures that the actual switchover process is initiated only after all relevant target database systems confirm that the master-slave switchover conditions are met. Furthermore, sending commands in a predetermined order guarantees the orderliness and consistency of the operation, avoiding conflicts and uncertainties that may arise from concurrent operations. After collecting all pre-inspection operation results, the operation and maintenance platform will summarize and analyze them. If all pre-inspection operation results indicate that the master-slave switchover conditions are met, the operation and maintenance platform will generate an execution order based on the pre-configured switchover strategy. Then, the operation and maintenance platform will send the corresponding master-slave switchover command sequence to each target database system in this order.
[0076] Based on the above Figure 1 In one example embodiment of the method shown, step 103 parses the database operation and maintenance request into a sequence of executable operation and maintenance commands based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to each target adapter. The specific process in this embodiment can be achieved through... Figure 6 Steps 601 to 603 shown are implemented.
[0077] Step 601: When a database maintenance request carries the user's identity information, determine whether the user is a legitimate user based on the user's identity information.
[0078] Step 602: If the user is a legitimate user, then search for the user's operation and maintenance instruction permission level from the pre-stored mapping relationship between user identity information and operation and maintenance instruction permission level based on the user's identity information.
[0079] Step 603: If the user's operation and maintenance command permission level is higher than the permission level threshold, then according to the protocol specification, command syntax and state machine model of the target database system corresponding to each target adapter, the database operation and maintenance request is parsed into multiple operation and maintenance command sequences.
[0080] The user's identity information is a credential used to uniquely identify the user who initiates the database operation and maintenance request. This identity information may include username, user ID, digital certificate, API key or token, and its purpose is to provide basic data for subsequent authentication and permission checks.
[0081] Determining whether a user is a legitimate user based on their identity information can be understood as verifying whether the provided identity information matches the user information already registered on the operations and maintenance platform, in order to confirm whether the user is qualified to access the system.
[0082] The pre-stored mapping relationship between user identity information and operation and maintenance instruction permission levels is a data structure used to associate user identity information with the operation and maintenance instruction permission levels granted to them in the operation and maintenance platform. This mapping relationship ensures that each legitimate user has a clearly defined scope of permissions and is the foundation for achieving fine-grained permission control.
[0083] Finding a user's operation and maintenance instruction permission level can be understood as retrieving the specific operation and maintenance operation permission level granted to the user from a pre-stored mapping relationship based on the verified legitimate user identity information.
[0084] A permission level threshold is a preset value or level used to define the minimum permissions required to perform a specific operation and maintenance operation. This permission level threshold can be configured according to the sensitivity and potential impact of the operation and maintenance operation. For example, for low-risk operations such as "querying database status", the permission level can be set lower; while for high-risk operations such as "master-slave switchover" and "delete database", the permission level needs to be set higher.
[0085] Determining whether a user's operational command permission level exceeds the permission level threshold is the core step in authorization. This determination is made by comparing the user's actual permission level with the minimum permission level (i.e., the threshold) required to execute the current operational operation.
[0086] Specifically, upon receiving a database maintenance request from a user, the system first rigorously verifies the legitimacy of the user's identity information carried in the request. Once the user's identity is confirmed to be legitimate, the maintenance platform will further determine the specific maintenance command permission level possessed by the legitimate user based on the pre-established mapping relationship between user identity information and maintenance command permission levels.
[0087] Subsequently, the operations and maintenance (O&M) platform compares the found user permission levels with preset permission level thresholds. Only when the permission level of a legitimate user's O&M command is determined to be higher than the threshold will the O&M platform allow the execution of subsequent database O&M request parsing operations. Based on this, the O&M platform utilizes the protocol specifications, command syntax, and state machine model of each target adapter's corresponding target database system to parse the unified database O&M request into multiple executable sequences of O&M commands specific to the heterogeneous database. This mechanism ensures that all operations during heterogeneous database O&M undergo strict identity authentication and authorization, effectively integrating security controls into the O&M request parsing process. In this way, not only is unified O&M of heterogeneous databases achieved, but a robust security defense is also built before O&M operations are executed, ensuring that only legitimate users with sufficient permissions can trigger sensitive database operations, significantly improving the security and controllability of the entire O&M process.
[0088] Based on the above Figure 1 The method shown, in one example embodiment, addresses the issue that traditional heterogeneous database operation and maintenance methods require users to manually receive and process the operation and maintenance execution results reported by each target database system to generate a unified operation and maintenance execution result, leading to low operation and maintenance efficiency, poor user experience, and difficulty in quickly monitoring and analyzing the overall operation and maintenance status. Therefore, this application embodiment addresses this issue by... Figure 7 Steps 701 and 702 shown enable the automatic and efficient display of unified operation and maintenance execution results corresponding to database operation and maintenance requests.
[0089] Step 701: Receive the operation and maintenance execution results reported by each target database system, and perform unified data visualization processing on multiple operation and maintenance execution results.
[0090] Step 702: Load the operation and maintenance execution results after unified data visualization processing onto the visualization interface to display the unified operation and maintenance execution results corresponding to the database operation and maintenance request to the user.
[0091] Specifically, receiving the operation and maintenance execution results reported by each target database system ensures that the operation and maintenance platform can automatically and comprehensively obtain feedback information from various heterogeneous database systems after executing the operation and maintenance command sequence. The operation and maintenance platform can be configured with listeners or callback mechanisms so that when the target database system completes the operation and maintenance operation, it actively sends the operation and maintenance execution results to the operation and maintenance platform through a preset communication protocol (such as HTTP / HTTPS, TCP / IP, message queues, etc.).
[0092] Unified data visualization processing of multiple operation and maintenance (O&M) execution results aims to standardize, integrate, and transform O&M execution results from different target database systems and with varying formats, presenting them to users in a unified and intuitive manner. The O&M platform can have a built-in data processing engine containing parsers and transformation rules for results from different database systems. This engine converts all raw O&M execution results into a unified data model (such as JSON, XML, or other structured data formats), performs aggregation, filtering, and calculation operations, and completes unified data visualization processing for all O&M execution results, obtaining a unified O&M execution result corresponding to the database O&M request.
[0093] In loading the unified data visualization results of operations and maintenance (O&M) operations onto the visualization interface, its role is to present the unified O&M execution results, after unified data visualization processing, on an interactive graphical interface, facilitating user understanding and operation. The front-end modules of the O&M platform (such as web interfaces and desktop applications) can obtain the unified O&M execution results from the back-end via API interfaces and use front-end visualization libraries (such as ECharts, D3.js, Grafana, etc.) to render the unified O&M execution results into charts, dashboards, tables, and other formats. Alternatively, the O&M platform can integrate report generation tools, using the unified O&M execution results as input to automatically generate interactive reports or dashboards, which can then be displayed in the O&M platform interface through embedding or linking.
[0094] This interface displays unified execution results for database maintenance requests to users, ensuring they have a clear, centralized view of the overall execution status of their requests across all target database systems. The visualization provides an overview, displaying the maintenance status (success, failure, in progress), key metrics (e.g., time consumption, resource usage changes), and anomaly alerts for all target database systems. It also allows users to drill down to view detailed execution logs for specific database systems. Furthermore, the visualization can provide customized display templates based on the type of maintenance operation (e.g., master-slave failover, expansion, backup, etc.). For example, for master-slave failover, it can display the master-slave relationship and data synchronization status before and after the failover; for expansion, it can display the expansion progress and new node status.
[0095] It should be noted that although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart can be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0096] In one embodiment, this application also provides a heterogeneous database operation and maintenance device, applied to an operation and maintenance platform containing multiple adapters, each adapter being configured to parse operation and maintenance requests from a unified API interface, the operation and maintenance platform providing the unified API interface externally; see reference. Figure 8 The structural block diagram of the heterogeneous database operation and maintenance device shown is as follows: Figure 8 As shown, the heterogeneous database operation and maintenance device includes: a feasible database determination unit 801, an operation and maintenance request parsing unit 802, and a unified operation and maintenance execution unit 803.
[0097] The feasible database determination unit 801 is used to receive database operation and maintenance requests input by users through a unified API interface, and extract the database system type and operation and maintenance operation type from the database operation and maintenance requests. If there are multiple database system types and the operation and maintenance operation type is a unified operation and maintenance operation for multiple database systems, then the feasibility verification results of the operation and maintenance operations for each of the multiple database systems are obtained; each database system type corresponds to one database system; based on the feasibility verification results of multiple operation and maintenance operations, multiple target database systems for performing the unified operation and maintenance operation are determined. The operation and maintenance request parsing unit 802 is used to parse the database operation and maintenance request into a series of executable operation and maintenance commands according to the protocol specification, command syntax and state machine model of the target database system corresponding to each target adapter. The protocol specification is used to define the rules and standards for communication and data interaction between the corresponding target database system and the application or client. The command syntax is used to operate and manage the corresponding target database system and the data and objects inside the corresponding target database system. The state machine model is used to manage and describe the transition process of entity objects in the corresponding target database system between different states.
[0098] The unified operation and maintenance execution unit 803 is used to send corresponding operation and maintenance command sequences to multiple target database systems respectively, so that each target database system selects the operation and maintenance plan data that matches the corresponding operation and maintenance command sequence from its own pre-stored operation and maintenance plan dataset and then executes the corresponding operation and maintenance command sequence.
[0099] Optionally, the operation and maintenance request parsing unit 802 is specifically used to match the database system types of multiple target database systems with the pre-registered database system type-adapter mapping table; if the database system types of multiple target database systems match the database system type-adapter mapping table successfully, then the multiple target adapters participating in the operation and maintenance request parsing are determined, and the database operation and maintenance request is parsed into multiple operation and maintenance command sequences according to the protocol specifications, command syntax and state machine model of the target database system corresponding to each target adapter.
[0100] Optionally, the operation and maintenance request parsing unit 802 is specifically used to determine, if the database system types of multiple target database systems fail to match the database system type-adapter mapping table, the target database system types existing in the database system type-adapter mapping table and the new database system types not existing in the database system type-adapter mapping table; load the adapter plugin bound to the new database system corresponding to the new database system type, and register the protocol specifications, command syntax, and state machine model supported by the adapter plugin to obtain the new adapter corresponding to the new database system; according to the protocol specifications, command syntax, and state machine model of the target database system corresponding to the target adapter, and the protocol specifications, command syntax, and state machine model of the new database system corresponding to the new adapter, parse the database operation and maintenance request into multiple operation and maintenance command sequences; the target database system corresponds to the target database system type.
[0101] Optionally, the maintenance request parsing unit 802 is specifically used to determine multiple successfully matched adapters from the database system type-adapter mapping table if the database system types of multiple target database systems match successfully with the database system type-adapter mapping table, and to determine the current process health, current resource utilization, and current performance efficiency of each successfully matched adapter; the current performance efficiency is used to measure the speed and resource consumption of the corresponding successfully matched adapter in parsing the database maintenance request; if the current process health is higher than a preset health threshold, the current resource utilization is lower than a preset utilization threshold, and the current performance efficiency is higher than a preset efficiency threshold, then the multiple successfully matched adapters are determined as multiple target adapters participating in the maintenance request parsing this time.
[0102] Optionally, the unified operation and maintenance execution unit 803 is specifically used to send pre-inspection operation requests to multiple target database systems respectively, and receive the pre-inspection operation results fed back by each target database system; the pre-inspection operation request is used to request the corresponding target database system to confirm whether its environment meets the master-slave switchover conditions; if it is determined from the results of each pre-inspection operation that the environment of the corresponding target database system meets the master-slave switchover conditions, the unit sends the corresponding operation and maintenance command sequence to the multiple target database systems respectively in a predetermined order.
[0103] Optionally, the operation and maintenance request parsing unit 802 is specifically used to determine whether the user is a legitimate user based on the user's identity information when the database operation and maintenance request carries the user's identity information; if the user is a legitimate user, the user's operation and maintenance command permission level is found from the pre-stored mapping relationship between user identity information and operation and maintenance command permission level based on the user's identity information; if the user's operation and maintenance command permission level is higher than the permission level threshold, the database operation and maintenance request is parsed into multiple operation and maintenance command sequences according to the protocol specification, command syntax and state machine model of the target database system corresponding to each target adapter.
[0104] Optionally, the heterogeneous database operation and maintenance device provided in this application embodiment may further include a unified operation and maintenance result display unit, which is used to receive the operation and maintenance execution results reported by each target database system, and perform unified data visualization processing on multiple operation and maintenance execution results; load the operation and maintenance execution results after unified data visualization processing onto the visualization interface to display the unified operation and maintenance execution results corresponding to the database operation and maintenance request to the user.
[0105] It should be understood that the various units recorded in the heterogeneous database operation and maintenance device are related to the reference. Figure 1 The steps in the described method correspond to each other. Therefore, the operations and features described above for the method are also applicable to the heterogeneous database operation and maintenance device and the units contained therein, and will not be repeated here. The heterogeneous database operation and maintenance device can be pre-implemented in the browser or other security applications of a computer device, or it can be loaded into the browser or other security applications of a computer device through download or other means. The corresponding units in the heterogeneous database operation and maintenance device can cooperate with the units in the computer device to implement the solutions of the embodiments of this application.
[0106] The following is for reference. Figure 9 It shows a schematic diagram of the structure of a computer system 900 suitable for implementing computer devices or servers in the embodiments of this application.
[0107] like Figure 9As shown, the computer system 1100 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 902 or programs loaded from storage section 908 into random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the system 900. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0108] The following components are connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 910 as needed so that computer programs read from it can be installed into storage section 908 as needed.
[0109] Specifically, according to embodiments of this application, the above references Figure 1 The described process can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing instructions for performing... Figure 1 The program code for the method. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable media 911.
[0110] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0111] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0112] The units or modules described in the embodiments of this application can be implemented in software or hardware. The described units or modules can also be located in a processor. The names of these units or modules do not, in certain circumstances, constitute a limitation on the unit or module itself.
[0113] On the other hand, this application also provides a computer-readable storage medium, which may be included in the computer device described in the above embodiments, or may exist independently and not assembled into the computer device. The aforementioned computer-readable storage medium stores one or more programs that, when used by one or more processors, execute the methods described in this application. For example, it may execute... Figure 1 The steps of the method shown are as follows.
[0114] This application provides a computer program product including instructions that, when executed, cause the method described in this application to be performed. For example, it can execute... Figure 1 The steps of the method shown are as follows.
[0115] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0116] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for operating and maintaining a heterogeneous database, characterized in that, An operation and maintenance platform with multiple adapters is used, each adapter being configured to parse operation and maintenance requests from a unified API interface, which is provided externally by the operation and maintenance platform; the method includes: The system receives database operation and maintenance requests from users through the unified API interface, and extracts the database system type and operation and maintenance operation type from the database operation and maintenance request. If there are multiple database system types and the operation and maintenance operation type is a unified operation and maintenance operation for multiple database systems, the system obtains the operation and maintenance operation feasibility verification results for each of the multiple database systems. Each database system type corresponds to one database system. Based on the feasibility verification results of multiple operations and maintenance operations, multiple target database systems for executing the unified operations and maintenance operations are determined. Based on the protocol specifications, command syntax, and state machine model of each target adapter corresponding to the target database system, the database operation and maintenance request is parsed into a sequence of multiple executable operation and maintenance commands. The protocol specifications are used to define the rules and standards for communication and data interaction between the target database system and the application or client. The command syntax is used to operate and manage the target database system and the data and objects within the target database system. The state machine model is used to manage and describe the transition process of entity objects in the target database system between different states. The corresponding operation and maintenance command sequence is sent to multiple target database systems respectively, so that each target database system selects operation and maintenance plan data that matches the corresponding operation and maintenance command sequence from its own pre-stored operation and maintenance plan dataset, and then executes the corresponding operation and maintenance command sequence.
2. The method according to claim 1, characterized in that, The step involves parsing the database operation and maintenance request into a sequence of executable operation and maintenance commands based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to each target adapter, including: The database system type of each of the multiple target database systems is matched with the pre-registered database system type-adapter mapping table; If the database system type of each of the multiple target database systems matches the database system type-adapter mapping table, then the multiple target adapters participating in the parsing of this operation and maintenance request are determined, and the database operation and maintenance request is parsed into multiple operation and maintenance command sequences according to the protocol specifications, command syntax and state machine model of the target database system corresponding to each target adapter.
3. The method according to claim 2, characterized in that, The method further includes: If the database system type of each of the multiple target database systems fails to match the database system type-adapter mapping table, then the target database system type that exists in the database system type-adapter mapping table and the new database system type that does not exist in the database system type-adapter mapping table are determined from the database system types of each of the multiple target database systems. Load the adapter plugin that is bound to the new database system corresponding to the new database system type, and register the protocol specifications, command syntax and state machine model supported by the adapter plugin to obtain the new adapter corresponding to the new database system; Based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to the target adapter, and the protocol specifications, command syntax, and state machine model of the new adapter corresponding to the new database system, the database operation and maintenance request is parsed into multiple operation and maintenance command sequences; the target database system corresponds to the target database system type.
4. The method according to claim 2, characterized in that, If the database system type of each of the multiple target database systems successfully matches the database system type-adapter mapping table, then the multiple target adapters participating in the operation and maintenance request parsing are determined, including: If the database system type of each of the multiple target database systems matches the database system type-adapter mapping table, then multiple successfully matched adapters are determined from the database system type-adapter mapping table, and the current process health, current resource utilization, and current performance efficiency of each successfully matched adapter are determined; the current performance efficiency is used to measure the speed and resource consumption of the corresponding successfully matched adapter in parsing the database operation and maintenance request; If the health of each current process is higher than a preset health threshold, the current resource utilization rate is lower than a preset utilization rate threshold, and the current performance efficiency is higher than a preset efficiency threshold, then the multiple successfully matched adapters are determined as the multiple target adapters participating in the parsing of this operation and maintenance request.
5. The method according to claim 1, characterized in that, The operation and maintenance command sequence is a primary / standby switchover command sequence. Sending the corresponding operation and maintenance command sequence to each of the multiple target database systems includes: The system sends pre-inspection operation requests to multiple target database systems respectively and receives pre-inspection operation results from each target database system; the pre-inspection operation request is used to request the corresponding target database system to confirm whether its environment meets the conditions for primary / standby switchover. If, based on the results of each pre-inspection operation, it is determined that the environment of the target database system meets the master-slave switchover conditions, the corresponding operation and maintenance command sequence is sent to the multiple target database systems in a predetermined order.
6. The method according to claim 1, characterized in that, The step involves parsing the database operation and maintenance request into a sequence of executable operation and maintenance commands based on the protocol specifications, command syntax, and state machine model of the target database system corresponding to each target adapter, including: When the database maintenance request carries the user's identity information, it is determined whether the user is a legitimate user based on the user's identity information; If the user is a legitimate user, then the user's operation and maintenance instruction permission level is retrieved from the pre-stored mapping relationship between user identity information and operation and maintenance instruction permission level based on the user's identity information; If the user's operation and maintenance instruction permission level is higher than the permission level threshold, then the database operation and maintenance request is parsed into multiple operation and maintenance command sequences according to the protocol specifications, command syntax and state machine model of the target database system corresponding to each target adapter.
7. The method according to claim 1, characterized in that, The method further includes: Receive the operation and maintenance execution results reported by each of the target database systems, and perform unified data visualization processing on multiple operation and maintenance execution results; The operation and maintenance execution results after the unified data visualization processing are loaded onto the visualization interface to display the unified operation and maintenance execution results corresponding to the database operation and maintenance request to the user.
8. A heterogeneous database operation and maintenance device, characterized in that, An operation and maintenance platform with multiple adapters is provided, each adapter being configured to parse operation and maintenance instructions from a unified API interface, which is provided externally by the operation and maintenance platform; the device includes: The feasible database determination unit is used to receive database operation and maintenance requests input by users through the unified API interface, and extract the database system type and operation and maintenance operation type from the database operation and maintenance request. If there are multiple database system types and the operation and maintenance operation type is a unified operation and maintenance operation for multiple database systems, then the feasibility verification results of the operation and maintenance operation for each of the multiple database systems are obtained; each database system type corresponds to one database system; based on the multiple operation and maintenance operation feasibility verification results, multiple target database systems for executing the unified operation and maintenance operation are determined. The operation and maintenance request parsing unit is used to parse the database operation and maintenance request into multiple executable operation and maintenance command sequences according to the protocol specification, command syntax, and state machine model of the target database system corresponding to each target adapter; the protocol specification is used to define the rules and standards for communication and data interaction between the target database system and the application or client; the command syntax is used to operate and manage the target database system and the data and objects within the target database system; and the state machine model is used to manage and describe the transition process of entity objects in the target database system between different states. A unified operation and maintenance execution unit is used to send the corresponding operation and maintenance command sequence to multiple target database systems respectively, so that each target database system selects operation and maintenance plan data that matches the corresponding operation and maintenance command sequence from its own pre-stored operation and maintenance plan dataset and then executes the corresponding operation and maintenance command sequence.
9. A computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.