A multi-database environment operation and maintenance method and system

By designing multi-database environment operation and maintenance methods and systems, and automatically processing database operation and maintenance tasks, the problem of operation and maintenance reliance on manual operations in the existing technology is solved, efficient and safe operation and maintenance operations and detailed records are achieved, and operation and maintenance costs are reduced , supports the operation and maintenance of multi-database products and high concurrent execution.

CN114116679BActive Publication Date: 2024-12-20CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111501758.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-09
Publication Date
2024-12-20
Estimated Expiration
2041-12-09

AI Technical Summary

Technical Problem

The existing technology relies on manual operations in database operation and maintenance, resulting in high communication costs, time costs and labor costs, making it difficult to deal with large-scale work content, and lacks automated processing capabilities, making it impossible to achieve safe and reliable operation and maintenance operations and detailed records.

Method used

Design a multi-database environment operation and maintenance method and system, and provide an automated operation and maintenance platform by configuring database interfaces, compiling maintenance script collections, generating operation and maintenance project options, receiving operation and maintenance requests, matching and executing maintenance scripts, providing an automated operation and maintenance platform, supporting Oracle, MySQL, Tablespace expansion, database building, table building, parameter optimization and other operations of Redis and other databases, and records the operation and maintenance process.

Benefits of technology

It realizes automated operation and maintenance, saves manpower and resource costs, improves operation and maintenance efficiency, provides strong scalability, facilitates access to more database products in the future, and supports high concurrent and asynchronous execution of operation and maintenance operations, ensuring the safety and reliability of operation and maintenance processes and Detailed records.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116679B_ABST
    Figure CN114116679B_ABST
Patent Text Reader

Abstract

The present invention relates to a multi-database environment operation and maintenance method and system. Operation and maintenance scripts are set and classified according to different databases and different operation and maintenance operations. The operation and maintenance scripts to be adopted are automatically matched for database operation and maintenance requests. Authority management is performed according to business system administrators, who can submit relevant operation and maintenance operation requirements, such as table space expansion, database and table construction, parameter optimization, etc. for Oracle, MySQL, and Redis. An automatic operation and maintenance platform for daily database products including general parameters, table spaces, data migration, etc. is provided, so as to save manpower and resource costs, improve operation and maintenance efficiency, provide strong scalability, and facilitate the access of more database products in the future.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of database operation and maintenance, and in particular to a multi-database environment operation and maintenance method and system. Background Art

[0002] At present, the most common mainstream databases are relational databases such as Oracle, MySQL, and non-relational databases such as Redis. The usual operation and maintenance means are that users put forward requirements, and database administrators log in to the database environment to perform common operations, such as: expanding table space, unlocking tables or data locks, increasing the number of connections, and even restarting database services. During the development and testing of various application system services, and even after production, the database environment is subject to modification, restart and other operation and maintenance operations at any time due to business changes, space, performance and other reasons. In the face of such difficult situations, it is necessary to establish a safe, efficient, and on-demand operation and maintenance tool or platform to perform operation and maintenance operations in real time and regularly according to the characteristics of different database products to meet business requirements. In addition, it should also be able to effectively track the entire operation process and ensure that each execution step is recorded in detail. During daily work, database administrators often need to perform DDL, DML, and instance-related operations. For standardized database maintenance, developers are not allowed to bypass database administrators and directly operate on the server, especially DDL and parameter configuration-related operations, which need to be approved by the program before being performed by the database administrator. Therefore, how to provide a safe and reliable system that can automatically handle common problems and reduce labor costs is itself a very challenging task.

[0003] The existing technology mainly relies on database administrators to perform manual operations, which has high communication costs, time costs, and labor costs, and involves a large amount of repetitive work and a linear working mode, making it difficult to cope with large-scale work content. Another existing technology is implemented through the system. The user submits an operation application. After the management approval is passed, the operation and maintenance platform calls the associated script or command and sends it to the job platform for execution, and records the real-time execution progress and promptly feeds back to the user end for display. After the entire process is completed (whether successful or failed), the administrator or user will be notified. The entire process records in detail the initiator, execution time, step name, execution information, and execution results of each step, which is easy to view and trace back. However, the application of this method to execute detailed log records requires the combination of a log analysis platform such as ELK. Unauthorized personnel cannot submit applications and operations, and obtain complete execution log information, and the log needs to be processed twice. Summary of the invention

[0004] In order to solve the shortcomings of the prior art, the present invention proposes a multi-database environment operation and maintenance method and system, which performs authority management according to the business system administrator, and can submit relevant operation and maintenance operation requirements, such as table space expansion, database and table construction, parameter optimization, etc. for Oracle, MySQL, and Redis, and provides an automated operation and maintenance platform for daily database products including general parameters, table spaces, data migration, etc., so as to save manpower and resource costs, improve operation and maintenance efficiency, provide strong scalability, and facilitate the access of more database products in the future.

[0005] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0006] A multi-database environment operation and maintenance method, characterized by comprising:

[0007] S1. Configure a database interface and use the database interface to connect to a database;

[0008] S2. Compile a maintenance script set for each database, wherein the maintenance script set uses the corresponding database as a first identification identifier, and each maintenance script in the maintenance script set uses the maintenance item corresponding to the script as a second identification identifier;

[0009] S3, recombining the maintenance scripts in each maintenance script set according to the second identification identifier to form a script display set;

[0010] S4. Generate operation and maintenance project options according to the script display set;

[0011] S5. Receive database operation and maintenance request;

[0012] S6. Match the operation and maintenance project option according to the database operation and maintenance request, and select the corresponding script display set; match the first identification identifier according to the database operation and maintenance request, and select the corresponding maintenance script set;

[0013] S7, comparing the selected script display set with the maintenance script set, and identifying the maintenance script to be adopted;

[0014] S8. Use the identified maintenance script to maintain the database.

[0015] Furthermore, the database includes a relational database and a non-relational database.

[0016] Furthermore, the relational database includes Oracle, MySQL and SQLServer; the non-relational database includes Redis.

[0017] Furthermore, the method further comprises:

[0018] S9. Feedback the execution information of the database operation and maintenance request and record the work log.

[0019] Further, the step S7 comprises:

[0020] Selecting a maintenance script having a corresponding second identification from the maintenance script set;

[0021] or, selecting a maintenance script from a corresponding maintenance script set from the script display set;

[0022] Or, select the intersection of the Script Display Collection and the Maintenance Script Collection Maintenance Script.

[0023] Furthermore, the step S5 further includes:

[0024] Extract database information and corresponding operation information contained in the database operation request;

[0025] When there are multiple database information and / or operation and maintenance information, the database operation and maintenance request is split into multiple sub-requests according to different database information and / or operation and maintenance information.

[0026] Furthermore, the step S6 further includes:

[0027] According to the sub-request matching operation and maintenance project options, a corresponding script display set is selected; according to the sub-request matching the first identification identifier, a corresponding maintenance script set is selected.

[0028] The present invention also relates to a multi-database environment operation and maintenance system, characterized in that it comprises:

[0029] Interface module, used to configure the database interface to connect to the database;

[0030] A script management module, used to manage maintenance scripts, add a first identification mark and a second identification mark, and generate a maintenance script set and a script display set;

[0031] The operation and maintenance project management module is used to generate operation and maintenance project options based on the script display set;

[0032] Interaction module, used to receive database operation and maintenance requests and feedback operation and maintenance results;

[0033] A matching module, used to compare the selected script display set with the maintenance script set, and identify the maintenance script to be adopted;

[0034] The execution module is used to maintain the database using the identified maintenance script.

[0035] The present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.

[0036] The present invention also relates to an electronic device, characterized in that it comprises a processor and a memory;

[0037] The memory is used to store a maintenance script set and a script display set;

[0038] The processor is used to execute the above method by calling the maintenance script set and the script display set.

[0039] The present invention also relates to a computer program product, comprising a computer program and / or instructions, characterized in that the computer program and / or instructions implement the steps of the above method when executed by a processor.

[0040] The beneficial effects of the present invention are:

[0041] The multi-database environment operation and maintenance method and system of the present invention are used to manage the authority of the business system administrator, who can submit relevant operation and maintenance operation requirements, such as table space expansion, database and table construction, parameter optimization, etc. for Oracle, MySQL, and Redis, to provide an automated operation and maintenance platform for daily database products including general parameters, table space, data migration, etc., so as to save manpower and resource costs, improve operation and maintenance efficiency, provide strong scalability, and facilitate the access of more database products in the future. . BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 The figure is a flow chart of the multi-database environment operation and maintenance method of the present invention.

[0043] Figure 2 It is a schematic diagram of the structure of the multi-database environment operation and maintenance system of the present invention. DETAILED DESCRIPTION

[0044] In order to more clearly understand the content of the present invention, it will be described in detail with reference to the drawings and embodiments.

[0045] The first aspect of the present invention relates to a process of steps as follows Figure 1 The multi-database environment operation and maintenance method shown includes:

[0046] S1. Configure a database interface and use the database interface to connect to a database. The corresponding connected database may include a relational database and a non-relational database. The relational database includes commonly used large and medium-sized databases such as Oracle, MySQL, and SQLServer; the non-relational database includes Redis, etc.

[0047] The database interface can be configured according to actual needs to adapt to the various database types used in the environment.

[0048] S2. Compile a maintenance script set for each database respectively. The maintenance script set uses the corresponding database as a first identification identifier, and each maintenance script in the maintenance script set uses the maintenance item corresponding to the script as a second identification identifier.

[0049] S3. Recombining the maintenance scripts in each maintenance script set according to the second identification identifier to form a script display set.

[0050] S4. Generate operation and maintenance project options based on the script display set.

[0051] S5. Receive database operation and maintenance request.

[0052] Preferably, in order to achieve a more efficient database maintenance effect, a database operation and maintenance request may involve multiple different databases and / or operation and maintenance operations. For example, if a database and table creation operation is performed on all databases in the environment, the instruction may be simplified to perform database and table creation on all. For such a complex database operation and maintenance request, the database information and corresponding operation and maintenance operation information contained in the database operation and maintenance request are extracted. When it is identified that there are multiple database information and / or operation and maintenance operation information, the database operation and maintenance request is split into several sub-requests according to different database information and / or operation and maintenance operation information.

[0053] S6. Match the operation and maintenance project option according to the database operation and maintenance request, and select a corresponding script display set; match the first identification identifier according to the database operation and maintenance request, and select a corresponding maintenance script set.

[0054] When there are sub-requests, each sub-request should be processed separately. This processing can be parallel or sequential, and can be matched according to preset rules. For example, if an application is made to execute two different operation and maintenance operations, and at the same time, according to the preset rules, it is matched that these two operation and maintenance operations have a logical order of execution, then they are selected to be executed sequentially. If the two operation and maintenance operations do not affect each other, they can be selected to be executed in parallel at the same time. Therefore, high-concurrency, asynchronously executed operation and maintenance operations can also be realized by applying the method of the present invention.

[0055] S7, compare the selected script display set with the maintenance script set, and identify the maintenance script to be adopted. Specifically, the maintenance script can be selected by, for example, selecting a maintenance script with a corresponding second identification identifier from the maintenance script set, or selecting a maintenance script from the corresponding maintenance script set from the script display set, or selecting a maintenance script that is the intersection of the script display set and the maintenance script set.

[0056] S8. Use the identified maintenance script to maintain the database.

[0057] S9. Feedback the execution information of the database operation and maintenance request and record the work log.

[0058] The entire process of operation and maintenance needs, from the request to the completion feedback, is recorded in detail, and users or administrators can view the progress and status in real time. Information on the entire execution cycle can be viewed based on the work order number, and administrators are required to intervene and approve, while other operations are completed automatically by the system.

[0059] By applying the above method, the needs of users with multi-channel access can be met, and a standardized and normalized operation and maintenance process can be defined. It is also easy to expand and can support more database platforms and more business scenarios.

[0060] Another aspect of the present invention also relates to a multi-database environment operation and maintenance system, the structure of which is as follows: Figure 2 As shown, including:

[0061] The interface module is used to configure the database interface to connect to the database.

[0062] The script management module is used to manage maintenance scripts, add a first identification identifier and a second identification identifier, and generate a maintenance script set and a script display set.

[0063] The operation and maintenance project management module is used to generate operation and maintenance project options based on the script display set;

[0064] The interactive module is used to receive database operation and maintenance requests and feedback the operation and maintenance results.

[0065] A matching module, used to compare the selected script display set with the maintenance script set, and identify the maintenance script to be adopted;

[0066] The execution module is used to maintain the database using the identified maintenance script.

[0067] The development framework of the operation and maintenance system adopts the mainstream VUE+SpringBoot+MySQL+Redis+DDD technology and design methods as well as the microservice development governance framework to establish and provide the presentation layer, service layer, data layer and corresponding operation platform. In actual execution, the high availability of the platform can be submitted in combination with container technology, and Jenkins is preferably used to realize the automated CI / CD capability.

[0068] By using this system, the above-mentioned operation processing method can be executed and the corresponding technical effects can be achieved.

[0069] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.

[0070] An embodiment of the present invention also provides an electronic device for executing the above method. As an implementation device of the method, the electronic device has at least a processor and a memory, and in particular, the memory stores data and related computer programs required for executing the method, such as a maintenance script set and a script display set, etc., and the processor calls the data and program in the memory to execute all the steps of the implementation method and obtains the corresponding technical effect.

[0071] Preferably, the electronic device may include a bus architecture, the bus may include any number of interconnected buses and bridges, and the bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same component, i.e., a transceiver, providing a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor when performing operations.

[0072] In addition, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or controller, operation control) used may include a microprocessor or other processor device and / or a logic device, which receives input and controls the operation of various components of the electronic device; the memory may be one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices, which may store the above-mentioned related data information, and may also store a program for executing related information, and the processor may execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used to provide input to the processor, for example, it may be a key or a touch input device; the power supply is used to provide power to the electronic device; the display is used to display display objects such as images and text, for example, it may be an LCD display. The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal. Based on different communication technologies, multiple communication modules may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide an audio output via the speaker and receive an audio input from the microphone, thereby realizing a common telecommunication function. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to a central processor, so that recording can be performed on the machine through the microphone, and the sound stored on the machine can be played through the speaker.

[0073] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0074] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0075] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0076] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0077] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A multi-database environment operation and maintenance method, characterized in that: include: S1. Configure a database interface and use the database interface to connect to a database; S2. Compile a maintenance script set for each database, wherein the maintenance script set uses the corresponding database as a first identification identifier, and each maintenance script in the maintenance script set uses the maintenance item corresponding to the script as a second identification identifier; S3, recombining the maintenance scripts in each maintenance script set according to the second identification identifier to form a script display set; S4. Generate operation and maintenance project options according to the script display set; S5. Receive database operation and maintenance request; S6. Match the operation and maintenance project option according to the database operation and maintenance request, and select the corresponding script display set; match the first identification identifier according to the database operation and maintenance request, and select the corresponding maintenance script set; S7, comparing the selected script display set with the maintenance script set, and identifying the maintenance script to be adopted; S8. Use the identified maintenance script to maintain the database.

2. The method according to claim 1, characterized in that The database includes a relational database and a non-relational database.

3. The method according to claim 2, characterized in that The relational database includes any one or more combinations of Oracle, MySQL and SQLServer; the non-relational database includes Redis.

4. The method according to claim 1, characterized in that The method further comprises: S9. Feedback the execution information of the database operation and maintenance request and record the work log.

5. The method according to claim 1, characterized in that The step S7 comprises: Selecting a maintenance script having a corresponding second identification from the maintenance script set; or, selecting a maintenance script from a corresponding maintenance script set from the script display set; Or, select the intersection of the Script Display Collection and the Maintenance Script Collection Maintenance Script.

6. The method according to claim 1, characterized in that The step S5 further comprises: Extract database information and corresponding operation information contained in the database operation request; When there are multiple database information and / or operation and maintenance information, the database operation and maintenance request is split into multiple sub-requests according to different database information and / or operation and maintenance information.

7. The method according to claim 6, characterized in that The step S6 further comprises: According to the sub-request matching operation and maintenance project options, a corresponding script display set is selected; according to the sub-request matching the first identification identifier, a corresponding maintenance script set is selected.

8. A multi-database environment operation and maintenance system, characterized in that: include: Interface module, used to configure the database interface to connect to the database; A script management module, used to manage maintenance scripts, add a first identification mark and a second identification mark and generate a maintenance script set and a script display set, wherein the maintenance script set uses the corresponding database as the first identification mark, and each maintenance script in the maintenance script set uses the maintenance item corresponding to the script as the second identification mark; Recombining the maintenance scripts in each maintenance script set according to the second identification identifier to form a script display set; The operation and maintenance project management module is used to generate operation and maintenance project options based on the script display set; The interactive module is used to receive database operation and maintenance requests and feedback the operation and maintenance results, match the operation and maintenance project options according to the database operation and maintenance requests, and select the corresponding script display set; Matching the first identification identifier according to the database operation and maintenance request, and selecting a corresponding maintenance script set; A matching module, used to compare the selected script display set with the maintenance script set, and identify the maintenance script to be adopted; The execution module is used to maintain the database using the identified maintenance script.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: including a processor and a memory; The memory is used to store a maintenance script set and a script display set; The processor is used to execute the method according to any one of claims 1 to 7 by calling a maintenance script set and a script display set.

11. A computer program product comprising a computer program and / or instructions, characterized in that: When the computer program and / or the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.