Database DDL operation management method, device and system and medium

By monitoring and automatically managing DDL operations during database backup, the data inconsistency caused by DDL operations during backup is solved, data consistency and backup integrity are improved, and the risk of human error is reduced.

CN119902929APending Publication Date: 2025-04-29JINZHUAN INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411986544.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

DDL operations during database backup can lead to data inconsistency and integrity issues. Existing backup policies rely on manual control, are inefficient and error-prone.

Method used

By monitoring the start of database backup tasks in real time, automatically detecting and blocking DDL operations, cache these operations until the backup tasks are completed before executing.

Benefits of technology

Improve data consistency and backup integrity, reduce the risk of human errors, and improve database management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902929A_ABST
    Figure CN119902929A_ABST
Patent Text Reader

Abstract

The invention provides a database DDL operation management method, device and system and a medium. The method comprises the steps that the start of a backup task of a database system is monitored in real time; if the backup task starts, monitoring whether an operation instruction executed in a database system contains DDL operation or not, and pushing DDL detection information to a log recording module; when the DDL operation is detected, the DDL operation is stopped, and the DDL operation is cached in a temporary storage area; and when the backup task of the database system is completed, reading the DDL operation of the temporary storage area and executing the DDL operation. By monitoring and automatically managing the DDL operation in the backup process in real time, the method has the advantages that the problem of data inconsistency possibly caused by the DDL operation in the backup process is effectively solved, the data consistency and the backup integrity are improved, the human error risk is reduced, and the database management efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of database technology, and in particular to a database DDL operation management method, device, system and medium. Background Art

[0002] In database management systems, backup is a key step to ensure data security and recoverability. However, performing DDL operations during the backup process, such as creating, modifying, or deleting database objects, may introduce inconsistency and integrity issues in the backup data. This is because DDL operations change the structure of the database. If these changes occur during the backup process, the data structure in the backup file may be out of sync with the actual database structure.

[0003] Existing backup strategies often rely on manual control, requiring database administrators to precisely coordinate DDL operations and backup tasks to avoid data inconsistencies. This approach is not only inefficient, but also has a relatively high risk of error due to the involvement of human factors. For example, an administrator may forget to pause a DDL operation during a backup, or forget to resume the execution of a DDL operation after the backup is complete, which may lead to inconsistent database status. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a database DDL operation management method. The present invention effectively solves the data inconsistency problem that may be caused by DDL operations in the backup process by real-time monitoring and automatic management of DDL operations in the backup process, improves data consistency and backup integrity, reduces the risk of human errors, and improves database management efficiency.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] A first aspect of the present invention provides a database DDL operation management method, comprising the following steps:

[0007] Real-time monitoring of the start of database system backup tasks;

[0008] When the backup task starts, monitor whether the operation instructions executed in the database system contain DDL operations, and push the DDL detection information to the log recording module;

[0009] When the DDL operation is detected, the DDL operation is blocked and the DDL operation is cached in a temporary storage area;

[0010] When the backup task of the database system is completed, the DDL operation of the temporary storage area is read and the DDL operation is executed.

[0011] In one embodiment, the real-time monitoring of the start of the backup task of the database system includes:

[0012] Real-time monitoring of whether the backup task of the database system has started;

[0013] When the backup task of the monitoring database system starts, the DDL automatic filtering mechanism is triggered, and the backup task information is pushed to the log recording module.

[0014] In one embodiment, when the backup task starts, monitoring whether the operation instructions executed in the database system contain DDL operations, and pushing DDL detection information to the log recording module includes:

[0015] When the backup task starts, it is identified whether there is a DDL operation in the operation instruction according to the DDL keyword, and the DDL detection information is pushed to the log recording module.

[0016] In one embodiment, when the DDL operation is detected, the DDL operation is blocked and the DDL operation is cached in a temporary storage area, including:

[0017] When the DDL operation is detected, the DDL operation is blocked;

[0018] The blocked DDL operation is cached in a temporary storage area, and the interception information is pushed to the logging module.

[0019] In one embodiment, when the backup task of the database system is completed, reading the DDL operation of the temporary storage area and executing the DDL operation includes:

[0020] Detecting whether the backup task of the database system is completed;

[0021] When it is detected that the backup task of the database system is completed, reading the DDL operation in the temporary storage area;

[0022] The DDL operation is executed according to the DDL operation storage order, and the execution information is sent to the log recording module.

[0023] In one embodiment, the database DDL operation management method further includes:

[0024] Monitor the operating status of each component in real time to see if there are any abnormalities;

[0025] When an abnormal situation is detected in a component, the abnormality handling module restarts the component;

[0026] If the restart operation reaches a preset number of times, it is considered that the component is abnormal, an alarm mechanism is triggered and an automatic recovery mechanism is executed, and the abnormal information is sent to the log recording module.

[0027] In one embodiment, if the restart operation reaches a preset number of times, it is considered that the component is abnormal, an alarm mechanism is triggered and an automatic recovery mechanism is executed, and the abnormal information is sent to a log recording module, including:

[0028] If the restart operation reaches a preset number of times, it is considered that the component has an abnormal condition;

[0029] When an abnormal situation occurs in the component, an alarm mechanism is triggered and the backup task is terminated;

[0030] After the backup task is terminated, the automatic recovery mechanism is started and the abnormal information is sent to the log recording module.

[0031] A database DDL operation management device, the device comprising:

[0032] The backup monitoring module is used to monitor the start of the backup task of the database system in real time;

[0033] A DDL detection module is used to monitor whether the operation instructions executed in the database system contain DDL operations when the backup task starts, and push the DDL detection information to the log recording module;

[0034] A blocking buffer module, configured to block the DDL operation when the DDL operation is detected, and cache the DDL operation in a temporary storage area;

[0035] The DDL execution module is used to read the DDL operation of the temporary storage area and execute the DDL operation when the backup task of the database system is completed.

[0036] A database DDL operation management system, the system comprising at least one processor; and

[0037] a memory communicatively connected to the at least one processor; wherein,

[0038] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the database DDL operation management method.

[0039] A non-volatile computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors can execute the database DDL operation management method.

[0040] Beneficial Effects :The embodiments of the present invention disclose a database DDL operation management method, device, system and medium. Compared with the prior art, the present invention effectively solves the data inconsistency problem that may be caused by DDL operations in the backup process by real-time monitoring and automatic management of DDL operations in the backup process, improves data consistency and backup integrity, reduces the risk of human errors, and improves database management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0042] Figure 1 A flowchart of a database DDL operation management method provided by an embodiment of the present invention;

[0043] Figure 2 A schematic diagram of the functional modules of the database DDL operation management device provided by an embodiment of the present invention;

[0044] Figure 3 A schematic diagram of the hardware structure of a database DDL operation management system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the technical problems, technical solutions and beneficial effects to be solved by the embodiments of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0046] In database management systems, backup is a key link to ensure data security and recoverability. However, performing DDL operations during the backup process, such as creating, modifying, or deleting database objects, may introduce inconsistency and integrity issues in the backup data. This is because DDL operations change the structure of the database, and if these changes occur during the backup process, the data structure in the backup file may be out of sync with the actual database structure. Existing backup strategies often rely on manual control, requiring database administrators to accurately coordinate DDL operations and backup tasks to avoid data inconsistencies. This approach is not only inefficient, but also has a relatively high risk of error due to the involvement of human factors.

[0047] This application proposes a database DDL operation management method, please refer to Figure 1 , Figure 1 This is a flowchart of an embodiment of the database DDL operation management method provided by the present invention, and the method specifically includes the following steps:

[0048] S100, real-time monitoring of the start of the backup task of the database system;

[0049] S200: When the backup task starts, monitor whether the operation instructions executed in the database system contain DDL operations, and push DDL detection information to the log recording module;

[0050] S300, when the DDL operation is detected, the DDL operation is blocked and the DDL operation is cached in a temporary storage area;

[0051] S400: When the backup task of the database system is completed, read the DDL operation of the temporary storage area and execute the DDL operation.

[0052] In this embodiment, in the database backup process, real-time monitoring of the start of the backup task is a key step. When the backup task starts, the system automatically triggers the monitoring mechanism of the DDL operation. By detecting the DDL keyword in the operation instruction, the system can identify whether there is a DDL operation currently and record the detection information in the log. If DDL operations are detected, the system will immediately block these operations and cache them in a temporary storage area. After the backup task is completed, the system will read and execute these DDL operations from the temporary storage area.

[0053] For example, during a backup, the system detects a DDL operation that creates a new table. This operation is blocked and temporarily stored in the temporary storage area. Once the backup task is completed, the system reads the operation from the temporary storage area and executes it, thus ensuring the consistency and integrity of the backup data.

[0054] Furthermore, the backup monitoring module monitors in real time whether the backup task of the database system has started. When the backup task is detected to have started, the DDL automatic filtering mechanism is triggered, and the backup task information is pushed to the log recording module. The DDL detection module identifies whether there is a DDL operation in the operation instruction based on the DDL keyword, and pushes the detection information to the log recording module. When the blocking buffer module detects the DDL operation, it blocks these operations and caches them in a temporary storage area, and pushes the interception information to the log recording module. When the DDL execution module detects that the backup task of the database system is completed, it reads the DDL operation from the temporary storage area, executes these operations in the storage order, and sends the execution information to the log recording module.

[0055] The technical solution of the present application solves the problem of how to effectively manage DDL operations during the backup process by monitoring the start of the database backup task in real time. When the backup task starts, the system monitors whether the currently executed operation instructions contain DDL operations, and records the detection information in the log. If DDL operations are detected, the system blocks these operations and caches them in a temporary storage area. After the backup task is completed, these DDL operations are read and executed from the temporary storage area. In this way, the technical solution of the present application ensures the consistency and integrity of the backup data, and avoids the problem of the backup data being out of sync with the actual data structure due to DDL operations.

[0056] In one embodiment, the real-time monitoring of the start of the backup task of the database system includes:

[0057] Real-time monitoring of whether the backup task of the database system has started;

[0058] When the backup task of the monitoring database system starts, the DDL automatic filtering mechanism is triggered, and the backup task information is pushed to the log recording module.

[0059] In this embodiment, the backup monitoring module is used to monitor in real time whether the backup task of the database system has started; when the backup task of the monitored database system starts, the DDL automatic filtering mechanism is triggered, and the backup task information is pushed to the log recording module. Real-time monitoring of the start of the backup task can ensure that the DDL operation filtering mechanism is triggered as soon as the backup task starts, avoiding the execution of DDL operations during the backup process, thereby preventing data inconsistency and integrity problems. Pushing the backup task information to the log recording module can record the start time and status of the backup task, providing a basis for subsequent backup task management and troubleshooting. Through the above-mentioned technical means, the solution of the present application can automatically trigger the DDL operation filtering mechanism at the start of the backup task, avoiding the execution of DDL operations during the backup process, thereby solving the problem of automatically triggering the DDL operation filtering mechanism at the start of the backup task.

[0060] Real-time monitoring of whether the backup task of the database system has started can usually be achieved through the task management module of the database system. When the backup task is triggered, the task management module will record the start time and status information of the task. This information can be obtained through the API interface or the monitoring tool of the database system. To trigger the DDL automatic filtering mechanism, you can add detection logic in the DDL operation processing module of the database system. When the backup task starts, the filtering function of the DDL operation is automatically enabled. The logging module can be implemented through the system log service or a dedicated logging tool to record the relevant information of the backup task.

[0061] This application monitors in real time whether the backup task of the database system has started, and triggers the DDL automatic filtering mechanism when the backup task starts, pushing the backup task information to the log recording module, thereby automatically avoiding the execution of DDL operations during the backup process. This method not only improves the automation of the backup process, reduces the risk of human intervention, but also ensures the consistency and integrity of the backup data. Compared with the prior art, this application does not require the database administrator to manually coordinate DDL operations and backup tasks, and the operation is simpler and more efficient, reducing the possibility of errors.

[0062] In one embodiment, when the backup task starts, monitoring whether the operation instructions executed in the database system contain DDL operations, and pushing DDL detection information to the log recording module includes:

[0063] When the backup task starts, it is identified whether there is a DDL operation in the operation instruction according to the DDL keyword, and the DDL detection information is pushed to the log recording module.

[0064] In this embodiment, the operation executed in the database system is monitored in real time to detect whether there are DDL instructions. Specifically, SQL parsing technology is used to identify DDL keywords such as CREATE, ALTER, DROP, etc., so as to detect all DDL operations. The detected DDL statements will be sent to a blocking buffer module, which will automatically filter and block the execution of these operations during the backup period to prevent the inconsistency and integrity problems of the backup data. The blocked DDL operations will be cached in a temporary storage area and executed after the backup task is completed. During the whole process, DDL detection information as well as blocking and execution information will be pushed to the logging module for tracking and auditing.

[0065] There are many options for implementing this method. For example, regular expression-based pattern matching can be used to identify DDL keywords; or a more complex syntax analyzer can be used to parse SQL statements more accurately, thereby improving the accuracy of detection. In addition, the temporary storage area can choose a memory database or a file system, and the specific choice depends on the performance and data persistence requirements. The implementation of the blocking module can be based on the database's own permission control mechanism, or it can intercept and block DDL operations through middleware or proxy servers.

[0066] This method effectively solves the data inconsistency and integrity problems caused by DDL operations during the database backup process by monitoring and identifying DDL operations in real time at the beginning of the backup task, and recording and processing them. Compared with the existing backup strategy that relies on manual control, this application scheme realizes automation, improves the reliability and efficiency of the backup process, reduces the risk of human error, and thus ensures the integrity and consistency of database backup.

[0067] In one embodiment, when the DDL operation is detected, the DDL operation is blocked and the DDL operation is cached in a temporary storage area, including:

[0068] When the DDL operation is detected, the DDL operation is blocked;

[0069] The blocked DDL operation is cached in a temporary storage area, and the interception information is pushed to the logging module.

[0070] In this embodiment, when a DDL operation is detected, the execution of the DDL operation is first blocked to prevent it from modifying the database structure during the backup process, thereby avoiding data inconsistency. Then, these blocked DDL operations are stored in a temporary storage area to ensure that these operations can be re-executed after the backup is completed to ensure the integrity of the database. By pushing the interception information to the log recording module, tracking and recording of these operations can be achieved. For example, when a CREATE TABLE statement is detected, the statement will be blocked and stored in a temporary storage area and will be executed after the backup is completed.

[0071] The above steps can effectively prevent DDL operations during the backup process and avoid data inconsistency caused by changes in the database structure. There is no need for manual intervention by the database administrator, and the degree of automation is high, which reduces the risk of human error and improves the reliability of the backup process and data consistency.

[0072] In one embodiment, when the backup task of the database system is completed, reading the DDL operation of the temporary storage area and executing the DDL operation includes:

[0073] Detecting whether the backup task of the database system is completed;

[0074] When it is detected that the backup task of the database system is completed, reading the DDL operation in the temporary storage area;

[0075] The DDL operation is executed according to the DDL operation storage order, and the execution information is sent to the log recording module.

[0076] In this embodiment, when the backup task of the database system is completed, it is first necessary to detect whether the backup task is completed. This can be achieved by monitoring the status of the backup task. When the backup task is detected to be completed, the system will read the previously blocked DDL operations in the temporary storage area. These DDL operations are executed in the order of storage to ensure the order and consistency of the operations. The execution information will be sent to the log recording module for recording and auditing. The temporary storage area can be implemented in the form of memory or disk storage to ensure the persistence and fast access of data. The sending of execution information can be achieved through network communication or local file writing. Automatic execution after backup: After the backup process is completed, the DDL execution module will automatically read the blocked DDL operations from the DDL buffer module and execute these operations in sequence. This function ensures that the database system can be restored to the expected state and ensures the continuity and integrity of the business.

[0077] This embodiment ensures the stability of the database structure during the backup period by performing the DDL operation after the backup task is completed, avoiding data inconsistency and integrity issues that may be caused by performing the DDL operation during the backup process. It reduces the risk of human intervention and improves the reliability and efficiency of the system. By recording execution information, the auditability of the system is enhanced, which helps to trace and solve problems.

[0078] In one embodiment, the database DDL operation management method further includes:

[0079] Monitor the operating status of each component in real time to see if there are any abnormalities;

[0080] When an abnormal situation is detected in a component, the abnormality handling module restarts the component;

[0081] If the restart operation reaches a preset number of times, it is considered that the component is abnormal, an alarm mechanism is triggered and an automatic recovery mechanism is executed, and the abnormal information is sent to the log recording module.

[0082] In this embodiment, the operating status of each component is monitored in real time, and once an abnormality is found, a restart operation is performed. If the restart operation reaches the preset number of times and still cannot return to normal, the alarm mechanism is triggered, the backup task is terminated, and the automatic recovery mechanism is started. This mechanism is combined with other DDL operation management methods to jointly ensure the integrity and reliability of the database backup process. By using the preset number of restarts as the standard for abnormal judgment, false alarms caused by short-term component failures are avoided, and the stability and fault tolerance of the system are improved. The addition of the alarm mechanism and the automatic recovery mechanism further enhances the security of the system. Even if a serious component failure occurs, measures can be taken in time to reduce data loss. The entire process will send relevant information to the log recording module to facilitate subsequent fault analysis and system maintenance.

[0083] Furthermore, the exception handling module is used to handle abnormal situations that occur during the backup process and provide an alarm mechanism or other emergency measures. The logging module is used to record all blocked DDL operations and related information during the backup period for system administrators to review and analyze. The log records the events performed by each component in chronological order, including the operation time, operation content, and component name of the operation. When an abnormal situation occurs during the backup process, the exception handling module will trigger the alarm mechanism and terminate the backup process, and provide an automatic recovery mechanism. Automatic recovery is to stop the interception operation and replay the DDL intercepted before the exception. The logging module records all blocked DDL operations and related information for subsequent review and analysis by the system administrator.

[0084] This embodiment ensures the stability of the system by monitoring the operating status of each component in real time and restarting when an abnormality is found. When the restart operation cannot solve the problem, the alarm mechanism and automatic recovery mechanism are triggered to further ensure the security and reliability of the system. By sending the abnormal information to the log recording module, subsequent fault analysis and system maintenance are facilitated. The technical problem of component operation abnormality in the database DDL operation management method is effectively solved, and the fault tolerance and overall stability of the system are improved.

[0085] In one embodiment, if the restart operation reaches a preset number of times, it is considered that the component is abnormal, an alarm mechanism is triggered and an automatic recovery mechanism is executed, and the abnormal information is sent to a log recording module, including:

[0086] If the restart operation reaches a preset number of times, it is considered that the component has an abnormal condition;

[0087] When an abnormal situation occurs in the component, an alarm mechanism is triggered and the backup task is terminated;

[0088] After the backup task is terminated, the automatic recovery mechanism is started and the abnormal information is sent to the log recording module.

[0089] In this embodiment, if the restart operation reaches a preset number of times, it is considered that the component has an abnormal situation; when the component has an abnormal situation, the alarm mechanism is triggered and the backup task is terminated; after the backup task is terminated, the automatic recovery mechanism is started and the abnormal information is sent to the log recording module. When the number of component restarts monitored during the database backup process reaches a preset value, the system determines that the component has a serious fault. The mechanism will take the following steps: first, trigger the alarm mechanism to notify the administrator of the system abnormality; second, terminate the current database backup task to prevent the faulty component from causing the backup data to be damaged or incomplete; finally, start the automatic recovery mechanism, try to repair or replace the faulty component, and record the entire abnormal process in the log module to facilitate subsequent problem troubleshooting and analysis. The automatic recovery mechanism can include multiple implementation methods, such as restarting the component, replacing the spare component, or rolling back the system. These steps together ensure the stability and data security of the system when the component has an abnormal situation, and avoid backup failure and data loss caused by component failure. Monitor the operating status of each component. If there is an abnormality, try to pull it up 3 times. The failure to pull up is considered as a module abnormality, and there is an abnormality handling process.

[0090] This step effectively solves the impact of component abnormalities on system stability and data security by triggering an alarm mechanism, terminating the backup task, starting the automatic recovery mechanism and recording abnormal information when a component is abnormal, reduces the need for human intervention, and improves system reliability and data backup integrity.

[0091] The embodiment of the present invention further provides a database DDL operation management device, the device comprising:

[0092] The backup monitoring module 11 is used to monitor the start of the backup task of the database system in real time;

[0093] A DDL detection module 12 is used to monitor whether the operation instructions executed in the database system contain DDL operations when the backup task starts, and push DDL detection information to the log recording module;

[0094] A blocking buffer module 13, configured to block the DDL operation when the DDL operation is detected, and cache the DDL operation in a temporary storage area;

[0095] The DDL execution module 14 is used to read the DDL operation in the temporary storage area and execute the DDL operation when the backup task of the database system is completed.

[0096] like Figure 2As shown, the backup monitoring module 11, the DDL detection module 12, the blocking buffer module 13 and the DDL execution module 14 are connected in sequence. The module referred to in the present invention refers to a series of computer program instruction segments that can complete specific functions, which is more suitable for the database DDL operation management method execution process than the program. For the specific implementation method of each module, please refer to the corresponding method embodiment above, which will not be repeated here.

[0097] In one embodiment, the backup monitoring module 11 includes:

[0098] A backup task monitoring unit is used to monitor in real time whether the backup task of the database system has started;

[0099] The triggering filtering mechanism unit is used to trigger the DDL automatic filtering mechanism when the backup task of the monitoring database system starts, and push the backup task information to the log recording module.

[0100] In one embodiment, the DDL detection module 12 includes:

[0101] The DDL operation identification unit is used to identify whether there is a DDL operation in the operation instruction according to the DDL keyword when the backup task starts, and push the DDL detection information to the log recording module.

[0102] In one embodiment, the DDL detection module 12 includes:

[0103] an operation blocking unit, configured to block the DDL operation when the DDL operation is detected;

[0104] The operation cache unit is used to cache the blocked DDL operation in a temporary storage area and push the interception information to the log recording module.

[0105] In one embodiment, the DDL execution module 14 includes:

[0106] A backup task completion unit, used to detect whether the backup task of the database system is completed;

[0107] A DDL operation reading unit, configured to read the DDL operation in the temporary storage area when it is detected that the backup task of the database system is completed;

[0108] The DDL operation executing unit is used to execute the DDL operation according to the DDL operation storage order and send the execution information to the log recording module.

[0109] In one embodiment, the database DDL operation management method further includes an exception handling module:

[0110] An abnormality monitoring unit is used to monitor the operating status of each component in real time to see if there is any abnormality;

[0111] A restart operation unit, used for restarting the component by the exception handling module when an abnormality is detected in the component;

[0112] The exception handling unit is used to consider that an abnormal situation occurs in the component if the restart operation reaches a preset number of times, trigger an alarm mechanism and execute an automatic recovery mechanism, and send the abnormal information to the log recording module.

[0113] In one embodiment, the exception handling unit includes:

[0114] If the restart operation reaches a preset number of times, it is considered that the component has an abnormal condition;

[0115] When an abnormal situation occurs in the component, an alarm mechanism is triggered and the backup task is terminated;

[0116] After the backup task is terminated, the automatic recovery mechanism is started and the abnormal information is sent to the log recording module.

[0117] Another embodiment of the present invention provides a database DDL operation management system, the system comprising at least one processor; and

[0118] a memory communicatively connected to the at least one processor; wherein,

[0119] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the database DDL operation management method.

[0120] One or more processors 110 and memory 120, Figure 3 A processor 110 is used as an example for description. The processor 110 and the memory 120 may be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.

[0121] The processor 110 is used to complete various control logics of the control system 10. It can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration.

[0122] The memory 120 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions corresponding to the database DDL operation management method in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the control system 10 by running the non-volatile software programs, instructions and units stored in the memory 120, that is, implements the database DDL operation management method in the above method embodiment.

[0123] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the control system 10, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the control system 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0124] One or more units are stored in the memory 120, and when executed by one or more processors 110, the database DDL operation management method in any of the above method embodiments is executed, for example, the above described Figure 1 The method comprises steps S100 to S400.

[0125] An embodiment of the present invention provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example, to execute the above-described Figure 1 The method comprises steps S100 to S400.

[0126] As an example, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.

[0127] In summary, the present invention discloses a method, device, system and medium for managing database DDL operations, including: real-time monitoring of the start of a backup task of a database system; if the backup task starts, monitoring whether the operation instructions executed in the database system contain DDL operations, and pushing DDL detection information to a log recording module; when the DDL operation is detected, blocking the DDL operation, and caching the DDL operation in a temporary storage area; when the backup task of the database system is completed, reading the DDL operation in the temporary storage area and executing the DDL operation. The present invention effectively solves the problem of data inconsistency that may be caused by DDL operations in the backup process by real-time monitoring and automatic management of DDL operations in the backup process, improves data consistency and backup integrity, reduces the risk of human errors, and improves the efficiency of database management.

[0128] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium, and the computer program can include the processes of the above-mentioned method embodiments when executed. The storage medium can be a memory, a disk, a floppy disk, a flash memory, an optical storage device, etc.

[0129] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A database DDL operation management method, characterized in that: The steps include: Real-time monitoring of the start of database system backup tasks; When the backup task starts, monitor whether the operation instructions executed in the database system contain DDL operations, and push the DDL detection information to the log recording module; When the DDL operation is detected, the DDL operation is blocked and the DDL operation is cached in a temporary storage area; When the backup task of the database system is completed, the DDL operation of the temporary storage area is read and the DDL operation is executed.

2. The database DDL operation management method according to claim 1, characterized in that: The start of the backup task of the real-time monitoring database system includes: Real-time monitoring of whether the backup task of the database system has started; When the backup task of the monitoring database system starts, the DDL automatic filtering mechanism is triggered, and the backup task information is pushed to the log recording module.

3. The database DDL operation management method according to claim 1, characterized in that: When the backup task starts, monitoring whether the operation instructions executed in the database system contain DDL operations, and pushing DDL detection information to the log recording module includes: When the backup task starts, it is identified whether there is a DDL operation in the operation instruction according to the DDL keyword, and the DDL detection information is pushed to the log recording module.

4. The database DDL operation management method according to claim 1, characterized in that: When the DDL operation is detected, the DDL operation is blocked and the DDL operation is cached in a temporary storage area, including: When the DDL operation is detected, the DDL operation is blocked; The blocked DDL operation is cached in a temporary storage area, and the interception information is pushed to the logging module.

5. The database DDL operation management method according to claim 1, characterized in that: When the backup task of the database system is completed, reading the DDL operation of the temporary storage area and executing the DDL operation includes: Detecting whether the backup task of the database system is completed; When it is detected that the backup task of the database system is completed, reading the DDL operation in the temporary storage area; The DDL operation is executed according to the DDL operation storage order, and the execution information is sent to the log recording module.

6. The database DDL operation management method according to claim 1, characterized in that: Also includes: Monitor the operating status of each component in real time to see if there are any abnormalities; When an abnormal situation is detected in a component, the abnormality handling module restarts the component; If the restart operation reaches a preset number of times, it is considered that the component is abnormal, an alarm mechanism is triggered and an automatic recovery mechanism is executed, and the abnormal information is sent to the log recording module.

7. The database DDL operation management method according to claim 6, characterized in that: If the restart operation reaches a preset number of times, it is considered that the component is abnormal, an alarm mechanism is triggered and an automatic recovery mechanism is executed, and the abnormal information is sent to the log recording module, including: If the restart operation reaches a preset number of times, it is considered that the component has an abnormal condition; When an abnormal situation occurs in the component, an alarm mechanism is triggered and the backup task is terminated; After the backup task is terminated, the automatic recovery mechanism is started and the abnormal information is sent to the log recording module.

8. A database DDL operation management device, characterized in that: The device comprises: The backup monitoring module is used to monitor the start of the backup task of the database system in real time; A DDL detection module is used to monitor whether the operation instructions executed in the database system contain DDL operations when the backup task starts, and push the DDL detection information to the log recording module; A blocking buffer module, configured to block the DDL operation when the DDL operation is detected, and cache the DDL operation in a temporary storage area; The DDL execution module is used to read the DDL operation of the temporary storage area and execute the DDL operation when the backup task of the database system is completed.

9. A database DDL operation management system, characterized in that: The system includes at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the database DDL operation management method according to any one of claims 1 to 7.

10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the database DDL operation management method according to any one of claims 1 to 7.