A database disaster recovery system and a database disaster recovery method
By obtaining and analyzing database node status parameters, generating synchronization node combinations and performing data synchronization, it solves the problems of low efficiency and high cost in traditional database disaster recovery methods, and achieves efficient and safe data backup and recovery.
Patent Information
- Application Number
- CN202311210512.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-09-19
AI Technical Summary
Traditional database backup and recovery methods have limitations in real-time and disaster recovery, resulting in low disaster recovery efficiency, untimely data synchronization, and high costs.
Perform abnormal analysis by obtaining the target node status parameters of the main database node, generate synchronization node combinations, perform data synchronization and feature extraction, use the synchronization status analysis model to evaluate the data synchronization ratio, and create database backup nodes to improve data synchronization efficiency and security.
It achieves more accurate database node status assessment and synchronization analysis, improves the accuracy of disaster recovery decisions and data backup efficiency, reduces the risk of data loss and business interruption, and reduces manual intervention and resource costs.
Smart Images

Figure CN117331750B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of databases, and in particular to a database disaster recovery system and a database disaster recovery method. Background Art
[0002] Databases play a key role in modern information systems, so the requirements for the availability and disaster recovery performance of database systems are also increasing. When a database system fails, hardware fails, or a natural disaster occurs, it must be quickly restored to ensure the continued operation of the business. Database disaster recovery refers to a technical means to ensure the continued availability and security of data when a database system fails or a catastrophic event occurs. In enterprises and organizations, databases usually store critical business data. Once a database fails, it will lead to serious consequences such as business interruption, data loss, and information leakage.
[0003] Traditional database backup and recovery methods have some limitations in terms of real-time and disaster tolerance, such as low disaster tolerance efficiency, untimely data synchronization, high disaster tolerance costs, etc. Therefore, it is particularly important to research and develop new database disaster tolerance methods. Summary of the invention
[0004] The invention provides a database disaster recovery system and a database disaster recovery method, which are used to improve the efficiency of data synchronization and improve the security of data in a backup node.
[0005] A first aspect of the present invention provides a database disaster recovery method, the database disaster recovery method comprising:
[0006] Obtaining target node status parameters of a primary database node in the first database disaster recovery distribution network, and performing node anomaly analysis on the target node status parameters to obtain a node anomaly analysis result;
[0007] Acquire a synchronization node combination and node storage data corresponding to the primary database node according to the node abnormality analysis result, wherein the synchronization node combination includes: a first synchronization node and a second synchronization node;
[0008] Generating a first data synchronization ratio of the synchronization node combination according to the node storage data, performing data synchronization on the node storage data according to the first data synchronization ratio, and collecting a first synchronization state parameter of the first synchronization node and a second synchronization state parameter of the second synchronization node;
[0009] Performing feature extraction and vector encoding on the first synchronization state parameter and the second synchronization state parameter to obtain a target state feature vector;
[0010] Inputting the target state feature vector into a preset synchronization state analysis model to perform synchronization state analysis to obtain a second data synchronization ratio;
[0011] The node storage data is synchronized according to the second data synchronization ratio, and a database backup node corresponding to the synchronization node combination is created to perform data storage backup, thereby generating corresponding target backup data.
[0012] In combination with the first aspect, in a first implementation of the first aspect of the present invention, the step of obtaining target node status parameters of a primary database node in the first database disaster recovery distribution network, and performing node abnormality analysis on the target node status parameters to obtain a node abnormality analysis result includes:
[0013] Obtain target node status parameters of the primary database node in the first database disaster recovery distribution network;
[0014] Constructing a box plot of the target node state parameters to obtain a corresponding target box plot, and calculating the interquartile range of the target box plot;
[0015] Comparing the interquartile range with a preset target value to obtain a target comparison result, and marking the target box plot as an outlier according to the target comparison result to obtain a plurality of abnormal parameters;
[0016] Performing data cleaning on the target node state parameters according to the multiple abnormal parameters to obtain standard node state parameters;
[0017] Performing numerical mapping on the standard node state parameters to obtain a plurality of parameter values, and performing vector conversion on the plurality of parameter values to obtain a target parameter vector of the master database node;
[0018] The target parameter vector is input into a preset main node anomaly detection model to perform main node anomaly analysis to obtain a node anomaly analysis result, wherein the main node anomaly detection model includes: a first threshold recurrent network, a second threshold recurrent network and a two-layer fully connected network.
[0019] In combination with the first aspect, in a second implementation of the first aspect of the present invention, generating a first data synchronization ratio of the synchronization node combination according to the node storage data, synchronizing the node storage data according to the first data synchronization ratio, and collecting a first synchronization state parameter of the first synchronization node and a second synchronization state parameter of the second synchronization node, including:
[0020] According to the node storage data, the data volume weight analysis is performed on the master database node to obtain the target data volume weight, and the update frequency weight analysis is performed on the master database node to obtain the target update frequency weight;
[0021] According to the target data volume proportion weight and the target update frequency weight, respectively calculating first weight score data of the first synchronization node and second weight score data of the second synchronization node in the synchronization node combination;
[0022] Generating a first data synchronization ratio of the synchronization node combination according to the first weight score data and the second weight score data;
[0023] According to the first data synchronization ratio, the node storage data is synchronized to the first synchronization node and the second synchronization node, and a first synchronization state parameter of the first synchronization node and a second synchronization state parameter of the second synchronization node are collected.
[0024] In combination with the first aspect, in a third implementation manner of the first aspect of the present invention, the step of performing feature extraction and vector encoding on the first synchronization state parameter and the second synchronization state parameter to obtain a target state feature vector includes:
[0025] Acquire a plurality of synchronization state feature tags, and determine a plurality of first parameter cluster centers of the first synchronization state parameter according to the plurality of synchronization state feature tags, and determine a plurality of second parameter cluster centers of the second synchronization state parameter;
[0026] Performing cluster analysis on the first synchronization state parameter according to the plurality of first parameter cluster centers through a preset first clustering model to obtain a plurality of first synchronization feature parameters;
[0027] Performing cluster analysis on the second synchronization state parameter according to the plurality of second parameter cluster centers respectively through a preset second clustering model to obtain a plurality of second synchronization feature parameters;
[0028] Performing vector encoding on the plurality of first synchronization feature parameters to obtain a first synchronization feature vector, and performing vector encoding on the plurality of second synchronization feature parameters to obtain a second synchronization feature vector;
[0029] Vector fusion is performed on the first synchronization feature vector and the second synchronization feature vector to obtain a target state feature vector.
[0030] In combination with the first aspect, in a fourth implementation of the first aspect of the present invention, the step of inputting the target state feature vector into a preset synchronization state analysis model for synchronization state analysis to obtain a second data synchronization ratio includes:
[0031] Inputting the target state feature vector into a preset synchronization state analysis model, wherein the synchronization state analysis model includes: a first encoding network, a second encoding network and a decoding network;
[0032] Calculating a vector weight of the target state feature vector according to the first data synchronization ratio, and performing a weighted operation on the target state feature vector according to the vector weight to obtain a weighted state feature vector;
[0033] Inputting the weighted state feature vector into the first coding network for feature extraction to obtain a first coding feature vector, and inputting the weighted state feature vector into the second coding network for feature extraction to obtain a second coding feature vector;
[0034] The first encoding feature vector and the second encoding feature vector are input into the decoding network to perform synchronization state analysis to obtain a second data synchronization ratio.
[0035] In combination with the first aspect, in a fifth implementation of the first aspect of the present invention, synchronizing the node storage data according to the second data synchronization ratio, creating a database backup node corresponding to the synchronization node combination for data storage backup, and generating corresponding target backup data, including:
[0036] Calculating a first adjustment parameter of the first synchronization node and a second adjustment parameter of the second synchronization node according to the second data synchronization ratio;
[0037] According to the first adjustment parameter and the second adjustment parameter, data synchronization is performed on the node storage data through the first synchronization node and the second synchronization node to obtain first transfer data of the first synchronization node and second transfer data of the second synchronization node;
[0038] A database backup node corresponding to the synchronization node combination is created, and the first transit data and the second transit data are stored in the database backup node, and data storage is backed up through the database backup node to generate corresponding target backup data.
[0039] In combination with the first aspect, in a sixth implementation of the first aspect of the present invention, the database disaster recovery method further includes:
[0040] Switching the primary database node to the database backup node, and updating the network topology of the first database disaster recovery distribution network to obtain a second database disaster recovery distribution network;
[0041] Acquire a data storage task of the second database disaster recovery distribution network, and determine a plurality of target database nodes according to the data storage task;
[0042] The target data volume of the data storage task is obtained, and a corresponding target load balancing strategy is constructed according to the target data volume and the multiple target database nodes.
[0043] A second aspect of the present invention provides a database disaster recovery system, the database disaster recovery system comprising:
[0044] An acquisition module is used to acquire target node status parameters of a primary database node in the first database disaster recovery distribution network, and perform node anomaly analysis on the target node status parameters to obtain a node anomaly analysis result;
[0045] A processing module, configured to obtain a synchronization node combination and node storage data corresponding to the primary database node according to the node abnormality analysis result, wherein the synchronization node combination includes: a first synchronization node and a second synchronization node;
[0046] a synchronization module, configured to generate a first data synchronization ratio of the synchronization node combination according to the node storage data, synchronize the node storage data according to the first data synchronization ratio, and collect a first synchronization state parameter of the first synchronization node and a second synchronization state parameter of the second synchronization node;
[0047] An encoding module, used for performing feature extraction and vector encoding on the first synchronization state parameter and the second synchronization state parameter to obtain a target state feature vector;
[0048] An analysis module, used for inputting the target state feature vector into a preset synchronization state analysis model to perform synchronization state analysis to obtain a second data synchronization ratio;
[0049] A generation module is used to synchronize the node storage data according to the second data synchronization ratio, create a database backup node corresponding to the synchronization node combination to perform data storage backup, and generate corresponding target backup data.
[0050] A third aspect of the present invention provides a database disaster recovery device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the database disaster recovery device executes the above-mentioned database disaster recovery method.
[0051] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned database disaster recovery method.
[0052] In the technical solution provided by the present invention, the target node state parameter of the main database node is obtained and the node abnormality analysis is performed to obtain the node abnormality analysis result; the synchronization node combination and the node storage data are obtained; the first data synchronization ratio is generated and data synchronization is performed, and the first synchronization state parameter and the second synchronization state parameter are collected; feature extraction and vector encoding are performed to obtain the target state feature vector; the target state feature vector is input into the preset synchronization state analysis model for synchronization state analysis to obtain the second data synchronization ratio; data synchronization is performed on the node storage data according to the second data synchronization ratio, and a database backup node corresponding to the synchronization node combination is created for data storage backup, and the corresponding target backup data is generated. The present invention can more accurately evaluate the state and synchronization of the database node by comprehensively applying a variety of technical means such as abnormality analysis, synchronization state analysis and data synchronization, thereby improving the accuracy of disaster recovery decision-making and the efficiency of data backup, and reducing the risk of data loss and business interruption. By collecting node state parameters and synchronization state information in real time, a real-time monitoring system can be established to timely discover potential problems and abnormal situations, and to give early warnings, which helps to take necessary measures before problems occur and reduce potential losses. By calculating the data synchronization ratio and data synchronization based on parameter features, data synchronization between different nodes can be ensured to be more accurate and efficient, avoiding unnecessary data redundancy and transmission. The use of automation technology reduces the need for manual intervention. Automated data synchronization and backup processes can respond to problems more quickly and reduce the burden on personnel. By effectively cleaning and verifying data during the synchronization process, the integrity and accuracy of backup data can be ensured to avoid problems with backup data. By optimizing disaster recovery strategies, unnecessary data transmission and backup are reduced, thereby reducing disaster recovery resources and cost overhead. Through feature extraction, vector encoding and synchronization status analysis models, disaster recovery decisions are more data-supported and intelligent, which helps to optimize disaster recovery plans and strategies, thereby improving the efficiency of data synchronization and improving the security of data in backup nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A schematic diagram of an embodiment of a database disaster recovery method in an embodiment of the present invention;
[0054] Figure 2 A flowchart of data synchronization in an embodiment of the present invention;
[0055] Figure 3 A flowchart of feature extraction and vector encoding in an embodiment of the present invention;
[0056] Figure 4 A flowchart of synchronization status analysis in an embodiment of the present invention;
[0057] Figure 5 A schematic diagram of an embodiment of a database disaster recovery system in an embodiment of the present invention;
[0058] Figure 6 The figure is a schematic diagram of an embodiment of a database disaster recovery device in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] Embodiments of the present invention provide a database disaster recovery system and a database disaster recovery method for improving the efficiency of data synchronization and improving the security of data in backup nodes. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0060] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the database disaster recovery method in the embodiment of the present invention includes:
[0061] S101, obtaining target node status parameters of a primary database node in a first database disaster recovery distribution network, and performing node abnormality analysis on the target node status parameters to obtain a node abnormality analysis result;
[0062] It is understandable that the execution subject of the present invention may be a database disaster recovery system, or a terminal or a server, which is not specifically limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0063] Specifically, the server obtains the state parameters of the target node from the main database node in the first database disaster recovery distribution network. These parameters include performance indicators, storage usage, number of connections, etc. Anomaly analysis is performed on the obtained target node state parameters to identify whether there are abnormal situations. By drawing a box plot, the distribution of data can be intuitively viewed. At the same time, the interquartile range of the target box plot is calculated to quantify the dispersion of the data. The calculated interquartile range is compared with the preset target value. The target value usually reflects the normal range of the data. According to the comparison result, it is determined whether there is an abnormal situation. If the interquartile range exceeds the preset target value, there is an abnormality. These abnormal values are marked on the box plot. Based on the abnormal value marking, the target node state parameters are cleaned, and the abnormal values are removed or appropriately corrected to obtain clean data. The cleaned data is mapped to a unified numerical range to ensure that the scales of different parameters do not affect subsequent analysis. The generated standard node state parameters are integrated into a target parameter vector as the input of the main node abnormality analysis model. This model consists of a first threshold recurrent network, a second threshold recurrent network, and a two-layer fully connected network. The model learns the patterns of normal master node states in order to identify anomalies. If the state of a master node deviates from the learned normal pattern, the model will detect the anomaly and produce anomaly analysis results. For example, consider the database of an online payment platform. The master node is responsible for processing user payment requests. By monitoring the performance parameters of each master node in real time, such as response time, load, etc., the server can quickly detect anomalies. If the response time of a master node is significantly extended and exceeds the expected value, the server will identify this anomaly and further confirm it through anomaly analysis and data cleaning. The model then analyzes this data, finds the performance anomaly of the node, and provides an alert so that the server administrator can take appropriate measures, such as transferring traffic to other normal nodes, to ensure the stability of the overall server.
[0064] S102, acquiring a synchronization node combination and node storage data corresponding to the primary database node according to the node abnormality analysis result, wherein the synchronization node combination includes: a first synchronization node and a second synchronization node;
[0065] Specifically, based on the previous node anomaly analysis, the server has obtained the master database node with anomalies. These anomalies affect the availability and stability of the data, so corresponding countermeasures are required. When selecting the synchronization node combination, the server considers multiple factors, including the geographical location of the node, network latency, performance, etc. Usually, the synchronization nodes need to be geographically distributed far away to prevent single point failures. By selecting appropriate synchronization nodes, data backup and synchronization between different locations can be ensured, and data availability and disaster recovery capabilities can be improved. For the abnormal master database node, the server selects appropriate data for backup and synchronization. This involves backing up the data of the entire database, or only backing up part of the data, such as key tables or data fragments. Based on the selected synchronization nodes and node storage data, the server determines the synchronization node combination of the master database node. This combination includes two synchronization nodes, namely the first synchronization node and the second synchronization node. These synchronization nodes will be responsible for data synchronization with the master node to ensure real-time backup and synchronization of data. With the synchronization node combination, the server starts data synchronization and backup. The master node sends the data change record to the synchronization node, and the synchronization node applies these changes to its own data to achieve data synchronization. At the same time, the synchronization node also needs to perform data backup regularly to ensure data integrity and recoverability. For example, consider a distributed database server of a cross-regional online shopping platform. The server contains multiple master database nodes, each of which is distributed in different regions and is responsible for processing orders and user information. In abnormal situations, such as a failure of a master node, the server quickly performs disaster recovery operations. Through the previous abnormal analysis, the server determines the abnormal master node. The server selects a suitable synchronization node combination. Assume that there are two backup nodes in different regions: a first synchronization node located in region A, and a second synchronization node located in region B. The two synchronization nodes are geographically dispersed to prevent single point failures. The server selects a node to store data. In this embodiment, the server selects to back up all the data of the abnormal node to ensure the integrity of the data. Based on the synchronization node and data selection, the server determines the synchronization node combination, namely the first synchronization node and the second synchronization node. When the data of the master node changes, the change record will be sent to the first synchronization node and the second synchronization node. These synchronization nodes will apply these changes to their own data to achieve data synchronization. At the same time, they will also perform data backup regularly to ensure the timeliness and reliability of the backup data.
[0066] S103: Generate a first data synchronization ratio of the synchronization node combination according to the node storage data, synchronize the node storage data according to the first data synchronization ratio, and collect a first synchronization state parameter of the first synchronization node and a second synchronization state parameter of the second synchronization node;
[0067] It should be noted that the server performs data volume weight analysis and update frequency weight analysis based on the node storage data. Data volume weight analysis: Analyze the data volume of the main database node to obtain the target data volume weight. Different nodes have different data volumes. The nodes with larger data volumes require more attention during the synchronization process. Update frequency weight analysis: Analyze the update frequency of the main database node data to obtain the target update frequency weight. Nodes with frequent updates need to be synchronized more frequently to ensure the latest data. Based on the target data volume weight and the target update frequency weight, the server calculates the weight score data of the first synchronization node and the second synchronization node. These weight scores reflect the importance of the nodes in synchronization. By comprehensively considering the data volume and update frequency, the server measures the contribution of the nodes more accurately. Based on the first weight score and the second weight score, the server generates the first data synchronization ratio of the synchronization node combination. This ratio determines the proportion of the data of the main node synchronized to the backup node, ensuring the integrity and real-time performance of the data backup. With the first data synchronization ratio, the server starts the data synchronization process. According to the ratio, the node storage data is synchronized to the first synchronization node and the second synchronization node. This will ensure that the backup node has similar data as the primary node and can take over the service in the event of an abnormality in the primary node. At the same time, the server collects synchronization status parameters of the first synchronization node and the second synchronization node. These parameters reflect the real-time situation of node synchronization and can help the server monitor the health of synchronization. For example, consider a distributed database server of an online social platform. The server contains multiple primary database nodes, each of which stores users' social data, such as profiles, posts, and comments. Assume that node A stores most of the user's profile data, node B stores post data, and node C stores comment data. In abnormal situations, such as node A failure, the server selects a suitable backup node and ensures data synchronization and backup. The server analyzes the data volume proportion and update frequency of each node. Based on the analysis results, the server determines the data volume proportion weight and update frequency weight. Node A has a higher data volume proportion, while nodes B and C have a higher update frequency. Based on the weight scores, the server calculates the weight scores of the first synchronization node (node B) and the second synchronization node (node C). These scores reflect the importance of the nodes in data synchronization. Based on the weight scores, the server generates the first data synchronization ratio to ensure that nodes B and C can synchronize the data of backup node A. During the synchronization process, the server synchronizes the data of node A to nodes B and C in proportion. At the same time, the server continuously collects the synchronization status parameters of nodes B and C to ensure the effectiveness and real-time nature of the synchronization.
[0068] S104, performing feature extraction and vector encoding on the first synchronization state parameter and the second synchronization state parameter to obtain a target state feature vector;
[0069] Specifically, the server defines appropriate feature tags for the synchronization state parameters. These tags can be various indicators, such as response time, data transmission rate, load, etc. The server uses these feature tags to perform cluster analysis on the first synchronization state parameter and the second synchronization state parameter to obtain multiple first parameter cluster centers and multiple second parameter cluster centers. These cluster centers represent different modes of the synchronization state parameters. Through the preset first clustering model, the server performs cluster analysis on the first synchronization state parameter and multiple first parameter cluster centers to obtain multiple first synchronization feature parameters. These feature parameters reflect different aspects of the first synchronization state, such as performance, load, etc. These feature parameters are vector-encoded to obtain a first synchronization feature vector. Similarly, the server uses the preset second clustering model to perform cluster analysis on the second synchronization state parameter and multiple second parameter cluster centers to obtain multiple second synchronization feature parameters. These feature parameters include aspects such as data transmission rate and stability. These feature parameters are vector-encoded to obtain a second synchronization feature vector. Finally, the first synchronization feature vector and the second synchronization feature vector are vector-fused to obtain a target state feature vector. This feature vector integrates the state information from the two synchronization nodes and can be used for further analysis and judgment. For example, suppose that in the distributed database of an e-commerce platform, the main database node A stores product information and the main database node B stores order data. When node A is abnormal, it is necessary to select an appropriate synchronization node and ensure data synchronization. The server defines feature labels as "average response time" and "storage space utilization rate". Through historical data analysis, multiple first parameter clustering centers and multiple second parameter clustering centers are determined. For node A, cluster analysis obtains the first feature parameters, such as low average response time and appropriate storage space utilization rate; for node B, the second feature parameters are obtained, such as high data transmission rate and good stability. Encode these feature parameters into vectors. The feature vectors of node A and node B are merged to obtain the target state feature vector, which integrates the state information of the two nodes.
[0070] S105, inputting the target state feature vector into a preset synchronization state analysis model to perform synchronization state analysis to obtain a second data synchronization ratio;
[0071] Specifically, the server presets a synchronization state analysis model, including a first encoding network, a second encoding network, and a decoding network. These networks can be deep neural networks, which are used to process feature extraction and analysis of feature vectors. According to the first data synchronization ratio, the server calculates the vector weight of the target state feature vector. According to the vector weight, the target state feature vector is weighted to obtain a weighted state feature vector. The weighted state feature vector is input into the first encoding network and the second encoding network for feature extraction. The encoding network maps the original feature vector to a higher level of abstract feature representation to better capture the relevant information of the state. The first encoding feature vector and the second encoding feature vector are input into the decoding network, and the decoding network maps the abstract features back to the original feature space. Through the decoding network, the server obtains detailed analysis results on the synchronization state, which will help calculate the second data synchronization ratio. The results output by the decoding network can be used to calculate the second data synchronization ratio, which indicates the efficiency of data synchronization and the progress of data backup. For example, assuming that the main database node A of the social media platform fails, the platform needs to quickly switch to the backup node to ensure the continuity of user services. The platform has pre-built a deep neural network model, including the first encoding network, the second encoding network, and the decoding network, for synchronization state analysis. Based on the first data synchronization ratio, the platform calculates the vector weight of the target state feature vector. For example, if the feature "data transmission rate" is more critical in the synchronization state analysis, it will be assigned a higher weight. The platform multiplies the feature vector by the weight to obtain a weighted state feature vector. The weighted state feature vector is input into the first encoding network and the second encoding network. These encoding networks transform the feature vectors layer by layer, converting them into more abstract feature representations to better capture the key information of the synchronization state. The encoded features are input into the decoding network. The decoding network remaps these abstract representations back to the original feature space to generate detailed analysis results about the synchronization state of the backup node. The output of the decoding network is used to calculate the second data synchronization ratio. This ratio indicates the progress of data synchronization and provides guidance for the platform to decide when to switch to the backup node.
[0072] S106: synchronize the node storage data according to the second data synchronization ratio, create a database backup node corresponding to the synchronization node combination, perform data storage backup, and generate corresponding target backup data.
[0073] Specifically, according to the second data synchronization ratio, the server calculates a first adjustment parameter of the first synchronization node and a second adjustment parameter of the second synchronization node. These parameters will be used for adjustment during the data synchronization process to ensure the accuracy and integrity of data synchronization. Using the calculated adjustment parameters, the server synchronizes the data stored in the nodes through the first synchronization node and the second synchronization node. The data will flow from the primary database node to the standby node to maintain data consistency. During the data synchronization process, the adjustment parameters can be used to correct the deviation during data synchronization to ensure that the data on the standby node is consistent with the data on the primary node. In the disaster recovery solution, the server creates a database backup node for data storage and backup. These backup nodes will be used to store transit data during the synchronization process and generate target backup data. The adjusted data is transferred from the first synchronization node and the second synchronization node to the database backup node. These transit data are temporarily stored on the backup node to meet the needs of data storage and backup. On the database backup node, synchronized transit data are stored. These transit data reflect the data transmitted from the primary node to the standby node to ensure the integrity of the backup data. By integrating the transit data stored on the database backup node, the server generates the target backup data. These backup data are the key part used to restore and maintain business continuity during the disaster recovery process. For example, suppose there is a global e-commerce company whose database stores product information, order data, and customer information. In the event of a server failure, in order to ensure the stable operation of the business, the company needs to implement a database disaster recovery plan. Based on the second data synchronization ratio, the server calculates the first adjustment parameter of the first synchronization node to be 0.95 and the second adjustment parameter of the second synchronization node to be 1.05. These parameters will be used in the data synchronization process. According to the calculated adjustment parameters, the server synchronizes product information, order data, etc. from the primary database node to the standby node to ensure that the data of the standby node is consistent with the primary node. The server creates a dedicated database backup node to store transit data during data backup and synchronization. The adjusted data is transferred from the primary node to the database backup node, where it is transit stored. The data is temporarily retained on the backup node to meet the needs of data storage and backup. On the database backup node, the synchronized transit data is stored. These data include the synchronization data from the primary node to the standby node, ensuring the integrity of the backup data. By integrating the transit data stored on the database backup node, the server generates the target backup data. These backup data are critical data used to restore business in disaster recovery events.
[0074] Among them, when the main database node fails, the server switches the main database node to the backup node. This process needs to ensure that the switched backup node can take over the function of the main node to ensure the continuous operation of the server. At the same time, the network topology needs to be updated to ensure that all components can be correctly connected to the new node. Through the backup node switching and network topology update, the first database disaster recovery distribution network will become the second database disaster recovery distribution network. In this updated network, the backup node will become the new master node, responsible for maintaining the operation and data integrity of the database. The second database disaster recovery distribution network will begin to receive data storage tasks, which involves new orders, user data, etc. Based on these data storage tasks, the server determines multiple target database nodes, which will be responsible for processing new data. For each target database node, the server obtains the corresponding target data volume, that is, the amount of data that the node needs to process. The server constructs a corresponding target load balancing strategy based on the target data volume and multiple target database nodes. The load balancing strategy can allocate tasks based on factors such as node performance and processing capacity to ensure that each node can process the corresponding amount of data in a balanced manner. This can be achieved by dynamically adjusting data distribution, task priority, etc. to maximize the performance of the database. For example, suppose that the primary database node A fails, and the server switches to the backup node. Backup node B will become the new primary node, and the functions of the original primary node A will be taken over by B. Through backup node switching and network topology update, the first database disaster recovery distribution network is transformed into the second database disaster recovery distribution network, and backup node B becomes the new primary node. Subsequently, the server begins to receive new order data, which will be distributed to multiple target database nodes. Each node will process the data assigned to it. The server obtains the target amount of data that each target database node needs to process, and builds a target load balancing strategy based on factors such as performance. For example, if a node has stronger processing power, it will process more data to maintain overall performance balance.
[0075] In the embodiment of the present invention, the present invention can more accurately evaluate the state and synchronization of database nodes by comprehensively applying various technical means such as abnormal analysis, synchronization state analysis and data synchronization, thereby improving the accuracy of disaster recovery decision-making and the efficiency of data backup, and reducing the risk of data loss and business interruption. By collecting node state parameters and synchronization state information in real time, a real-time monitoring system can be established to timely discover potential problems and abnormal situations, and to give early warnings, which helps to take necessary measures before problems occur and reduce potential losses. By calculating the data synchronization ratio and data synchronization based on parameter characteristics, it can be ensured that data synchronization between different nodes is more accurate and efficient, avoiding unnecessary data redundancy and transmission. The use of automation technology reduces the need for manual intervention. The automated data synchronization and backup process can respond to problems more quickly and reduce the burden on personnel. By effectively cleaning and verifying the data during the synchronization process, the integrity and accuracy of the backup data are ensured, and problems with the backup data are avoided. By optimizing the disaster recovery strategy, unnecessary data transmission and backup are reduced, thereby reducing the resources and cost overhead of disaster recovery. Through feature extraction, vector encoding and synchronization status analysis models, disaster recovery decisions are more data-supported and intelligent, which helps optimize disaster recovery plans and strategies, thereby improving the efficiency of data synchronization and improving the security of data in backup nodes.
[0076] In a specific embodiment, the process of executing step S101 may specifically include the following steps:
[0077] (1) Obtaining target node status parameters of the primary database node in the first database disaster recovery distribution network;
[0078] (2) Construct a box plot of the target node state parameters, obtain the corresponding target box plot, and calculate the interquartile range of the target box plot;
[0079] (3) Compare the interquartile range with the preset target value to obtain the target comparison result, and mark the target box plot with abnormal values according to the target comparison result to obtain multiple abnormal parameters;
[0080] (4) Clean the target node status parameters according to multiple abnormal parameters to obtain standard node status parameters;
[0081] (5) Perform numerical mapping on the standard node state parameters to obtain multiple parameter values, and perform vector conversion on the multiple parameter values to obtain the target parameter vector of the main database node;
[0082] (6) Inputting the target parameter vector into a preset main node anomaly detection model to perform main node anomaly analysis and obtain a node anomaly analysis result, wherein the main node anomaly detection model includes: a first threshold recurrent network, a second threshold recurrent network, and a two-layer fully connected network.
[0083] Specifically, the server obtains various parameters related to the node status from the master database node, such as the database read and write speed, query response time, memory utilization, disk space usage, etc. These parameters will become the basis for the server to determine whether the database node is abnormal. Using the collected target node status parameters, the server constructs a box plot to understand the distribution of the parameters. At the same time, the interquartile range of the target box plot is calculated. This statistic will help the server measure the degree of variation of the parameter value. The calculated interquartile range is compared with the pre-set target value. If the interquartile range exceeds the set threshold, it means that the database node has an abnormal situation and needs further analysis. According to the comparison results, the server marks the target box plot and highlights the outliers. This helps to intuitively identify which parameters show abnormal behavior over a period of time. Based on the outlier mark, the server performs data cleaning on these abnormal parameters. The cleaning process includes removing outliers, filling missing values, etc. to ensure the accuracy of subsequent analysis. For the cleaned parameters, numerical mapping is performed to map them to a standard range. Subsequently, these parameter values are vectorized to obtain a comprehensive target parameter vector. Finally, the server uses the preset master node abnormality analysis model. This model consists of a first threshold recurrent network, a second threshold recurrent network, and two layers of fully connected networks. These networks can perform in-depth analysis of the target parameter vector to identify potential anomalies. For example, suppose the server has an electronic medical system in which the database stores data such as patient medical records, diagnostic reports, and drug prescriptions. To ensure the continuous operation of the server, the server performs an anomaly analysis on the master database node. The server collects parameters such as response time, memory utilization, and disk space usage from the master database node. By constructing a box plot and calculating the interquartile range, the server finds that the interquartile range of the response time exceeds the pre-set threshold. With the help of outlier markers, the server cleans the abnormal response time data and maps it to a standard range. The server performs vector conversion on the mapped parameter values to obtain a target parameter vector containing multiple parameters. This target parameter vector is input into the master node anomaly analysis model. The model combines a threshold recurrent network and a fully connected network to perform in-depth analysis of the parameter vector. If the model detects an anomaly, it indicates that there is a potential problem with the database node, such as performance degradation or abnormal resource utilization.
[0084] In a specific embodiment, if Figure 2 As shown, the process of executing step S103 may specifically include the following steps:
[0085] S201. According to the node storage data, a data volume weight analysis is performed on the master database node to obtain a target data volume weight, and an update frequency weight analysis is performed on the master database node to obtain a target update frequency weight;
[0086] S202, calculating first weighted score data of a first synchronization node and second weighted score data of a second synchronization node in the synchronization node combination according to the target data volume proportion weight and the target update frequency weight;
[0087] S203: Generate a first data synchronization ratio of the synchronization node combination according to the first weight score data and the second weight score data;
[0088] S204: Synchronize the node storage data to the first synchronization node and the second synchronization node according to the first data synchronization ratio, and collect a first synchronization state parameter of the first synchronization node and a second synchronization state parameter of the second synchronization node.
[0089] Specifically, the server performs a data volume weight analysis based on the amount of data stored in the node. The amount of data stored in each database node will be quantified, and the data volume weight will be calculated. This weight reflects the proportion of data contributed by each node in the entire database server. This can be calculated by the following formula: Data volume weight = node data volume / total data volume. The server will perform a weight analysis on the data update frequency of the master database node. This can be achieved by recording the number of updates or frequency of each node data. The data update frequency weight reflects the contribution of each node in data update. Similarly, this weight will also be quantified and can be calculated using the following formula: Update frequency weight = number of node updates / total number of updates. Based on the data volume weight and update frequency weight, the server will calculate the corresponding weight score for each node in the synchronization node combination. Assuming that the synchronization node combination includes a first synchronization node and a second synchronization node, the server calculates their first weight score data and second weight score data respectively. First weight score data = data volume weight (first synchronization node) * update frequency weight (first synchronization node); second weight score data = data volume weight (second synchronization node) * update frequency weight (second synchronization node). According to the calculated first weight score data and second weight score data, the server generates a first data synchronization ratio of the synchronization node combination. This ratio can be expressed as: first data synchronization ratio = first weight score data / (first weight score data + second weight score data). According to the first data synchronization ratio, the server will distribute the node storage data to the first synchronization node and the second synchronization node in proportion. The data synchronization process will ensure that the data of these nodes remain synchronized. At the same time, the server will collect the first synchronization state parameter of the first synchronization node and the second synchronization state parameter of the second synchronization node to monitor the performance and data consistency during the synchronization process. For example, suppose that the server has an electronic payment system in which the database stores the user's transaction records and account balances. In order to achieve database disaster recovery, the server implements data synchronization and weight analysis. The server first calculates the data volume proportion weight according to the transaction record volume stored by the node. Assuming that the first synchronization node stores 70% of the transaction records and the second synchronization node stores 30% of the transaction records, the data volume proportion weights are 0.7 and 0.3 respectively. The server analyzes the update frequency of the transaction records. Assuming that the update frequency of the first synchronization node is higher, accounting for 60% of the total update times, while the update frequency of the second synchronization node is 40%. The update frequency weights are 0.6 and 0.4 respectively. Based on the data volume weight and the update frequency weight, the server calculates the weight scores of the first synchronization node and the second synchronization node. Assume that the calculation results are 0.42 and 0.24 respectively. Based on the calculated weight scores, the server generates the first data synchronization ratio.Assuming the first data synchronization ratio is 0.64, it means that 64% of the data will be synchronized to the first synchronization node, and 36% of the data will be synchronized to the second synchronization node. Finally, according to the synchronization ratio, the server synchronizes the transaction records to the first synchronization node and the second synchronization node, and collects the synchronization status parameters of the nodes at the same time to ensure data consistency and performance. This will help to achieve the smooth implementation of the database disaster recovery strategy.
[0090] In a specific embodiment, if Figure 3 As shown, the process of executing step S104 may specifically include the following steps:
[0091] S301, acquiring a plurality of synchronization state feature tags, and determining a plurality of first parameter cluster centers of a first synchronization state parameter according to the plurality of synchronization state feature tags, and determining a plurality of second parameter cluster centers of a second synchronization state parameter;
[0092] S302, performing cluster analysis on the first synchronization state parameter according to a plurality of first parameter clustering centers using a preset first clustering model to obtain a plurality of first synchronization feature parameters;
[0093] S303, performing cluster analysis on the second synchronization state parameters according to a plurality of second parameter cluster centers respectively through a preset second clustering model to obtain a plurality of second synchronization feature parameters;
[0094] S304, performing vector encoding on a plurality of first synchronization feature parameters to obtain a first synchronization feature vector, and performing vector encoding on a plurality of second synchronization feature parameters to obtain a second synchronization feature vector;
[0095] S305 , performing vector fusion on the first synchronization feature vector and the second synchronization feature vector to obtain a target state feature vector.
[0096] Specifically, the server synchronization state feature label is a key identifier used to describe the node state, which can cover multiple aspects such as node performance, load, and health status. These labels can provide direction for subsequent cluster analysis and feature extraction. For example, the feature label can be set to "high load", "long response time", "low memory usage", etc. Based on multiple synchronization state feature labels, the server projects the first synchronization state parameter and the second synchronization state parameter into different spaces respectively. By using a clustering algorithm, such as K-means clustering, the server determines multiple first parameter clustering centers and multiple second parameter clustering centers. These clustering centers will help the server find the commonalities and differences of the synchronization state parameters. Using the preset first clustering model, based on multiple first parameter clustering centers, the first synchronization state parameters are clustered and analyzed. This will help the server identify multiple first synchronization feature parameters, that is, the parameters in the same clustering center have similarities. Similarly, using the preset second clustering model, based on multiple second parameter clustering centers, the second synchronization state parameters are clustered and analyzed. This will help the server discover multiple second synchronization feature parameters for further analysis and processing. For each first synchronization feature parameter, the server vector encodes it and converts it into numerical data. This can use various encoding techniques, such as one-hot encoding or numerical encoding. Similarly, for each second synchronization feature parameter, vector encoding is also performed to convert it into numerical data. Finally, after obtaining the encoded first synchronization feature parameter vector and second synchronization feature parameter vector, the server performs vector fusion on them. This can be achieved by simply connecting the two vectors together to obtain a comprehensive target state feature vector. For example, suppose that the server is managing the database of an online shopping platform. The server has multiple database nodes that store users' purchase records, inventory status, and product information. The server hopes to ensure the stable operation of the database through synchronization state feature analysis. The server defines some synchronization state feature tags, such as "purchase frequency", "inventory status", and "query response time". The server uses a clustering algorithm to determine multiple first parameter cluster centers and multiple second parameter cluster centers, which represent the commonalities of different synchronization state features. The server uses a preset clustering model to perform cluster analysis on the first synchronization state parameter and the second synchronization state parameter respectively. This can help the server obtain multiple first synchronization feature parameters and second synchronization feature parameters, such as "high purchase frequency", "low inventory", and "short response time". For each feature parameter, the server performs vector encoding, such as using one-hot encoding to convert it into numerical data. Finally, the server performs vector fusion on the encoded first synchronization feature parameter vector and the second synchronization feature parameter vector to obtain a comprehensive target state feature vector, which can reflect the various states of the database node.
[0097] In a specific embodiment, if Figure 4As shown, the process of executing step S105 may specifically include the following steps:
[0098] S401, inputting a target state feature vector into a preset synchronization state analysis model, wherein the synchronization state analysis model includes: a first encoding network, a second encoding network and a decoding network;
[0099] S402, calculating a vector weight of a target state feature vector according to the first data synchronization ratio, and performing a weighted operation on the target state feature vector according to the vector weight to obtain a weighted state feature vector;
[0100] S403, inputting the weighted state feature vector into the first coding network for feature extraction to obtain a first coding feature vector, and inputting the weighted state feature vector into the second coding network for feature extraction to obtain a second coding feature vector;
[0101] S404: Input the first encoding feature vector and the second encoding feature vector into a decoding network to perform synchronization state analysis to obtain a second data synchronization ratio.
[0102] Specifically, the server establishes a synchronization state analysis model, including a first encoding network, a second encoding network, and a decoding network. These networks can use deep learning models, such as autoencoders. The first encoding network is responsible for extracting the first layer of abstract feature representation of the target state feature vector. By gradually reducing the number of neurons, the first encoding network can capture the high-level features of the input data. Similarly, the second encoding network will further extract the second layer of abstract feature representation of the target state feature vector. This helps to understand the characteristics of the data at a deeper level. The role of the decoding network is to decode the encoded feature vector back to the original target state feature vector. This can help the server understand how the encoded features affect the synchronization state. Before inputting the target state feature vector into the synchronization state analysis model, the server calculates the vector weight of the target state feature vector according to the first data synchronization ratio. The vector weight reflects the importance of each feature in the synchronization state analysis. The server uses a data analysis method or a priori knowledge based on the problem to calculate these weights. The server applies these vector weights to the target state feature vector and performs a weighted operation. This will generate a weighted state feature vector in which each feature is affected by its weight. The server inputs the weighted state feature vector into the first encoding network and the second encoding network for feature extraction. The first encoding network will generate a first encoding feature vector, which contains the first layer of abstract feature representation. This vector captures the high-level features of the input data. The second encoding network will generate a second encoding feature vector, which contains the second layer of abstract feature representation. This vector can provide a deeper understanding of the characteristics of the data. Finally, the server inputs the first encoding feature vector and the second encoding feature vector into the decoding network for synchronization state analysis. This can help the server understand how the weighted feature vector affects the second data synchronization ratio after decoding. For example, suppose that the server is managing a data storage service based on a cloud platform, and the server hopes to achieve database disaster recovery to ensure high availability of data. The server analyzes the target state features of the database node through the above process. The server establishes a synchronization state analysis model, including the first encoding network, the second encoding network, and the decoding network. The server determines the vector weight of each feature through data analysis, taking into account the importance of the feature. The server inputs the target state feature vector into the model, performs weighted operations according to the vector weights, and generates a weighted state feature vector. The server inputs them into the first encoding network and the second encoding network respectively to extract abstract feature representations. Finally, the server inputs these feature vectors into the decoding network and analyzes the second data synchronization ratio through the decoding results. For example, if the decoding results show that the second data synchronization ratio is high, the server concludes that the database node is in good condition and the disaster recovery is working normally.
[0103] In a specific embodiment, the process of executing step S106 may specifically include the following steps:
[0104] (1) calculating a first adjustment parameter of the first synchronization node and a second adjustment parameter of the second synchronization node according to the second data synchronization ratio;
[0105] (2) performing data synchronization on the node storage data through the first synchronization node and the second synchronization node according to the first adjustment parameter and the second adjustment parameter, thereby obtaining first transfer data of the first synchronization node and second transfer data of the second synchronization node;
[0106] (3) Create a database backup node corresponding to the synchronization node combination, store the first transit data and the second transit data in the database backup node, and perform data storage backup through the database backup node to generate corresponding target backup data.
[0107] Specifically, the server calculates the first adjustment parameter of the first synchronization node and the second adjustment parameter of the second synchronization node according to the second data synchronization ratio. These parameters will be used to adjust the rate of data synchronization so as to maintain the consistency and reliability of the data. By using the calculated adjustment parameters, the server performs data synchronization through the first synchronization node and the second synchronization node. Data synchronization ensures that the data of the primary database node is synchronized with the backup node so that seamless switching can be achieved in the event of a failure. During the data synchronization process, the server creates a database backup node corresponding to the synchronization node combination. These backup nodes will be used to store transit data and provide backup for disaster recovery purposes. The first transit data and the second transit data are stored in the database backup node to ensure that these data are saved on the backup node. By storing the data on the backup node, the server ensures that the data in the backup node is still available when the primary database node fails, thereby achieving the goal of database disaster recovery. By performing data storage backup on the database backup node, the server successfully generates the target backup data. These backup data are a complete backup of the primary database node data, and a recovery operation can be performed when necessary. For example, it is assumed that the server is managing the database of an e-commerce website and wants to ensure high availability of the data. The first adjustment parameter of the first synchronization node and the second adjustment parameter of the second synchronization node are calculated according to the second data synchronization ratio. These parameters will be calculated based on the actual situation to ensure that the rate of data synchronization is suitable for the current network environment and load. Using the calculated parameters, the server synchronizes data through the first synchronization node and the second synchronization node. This ensures that the data of the primary database node will be synchronized to the backup node for use in case of failure. At the same time, the server creates database backup nodes and stores the first transit data and the second transit data on these nodes. These backup nodes act as part of disaster recovery, ensuring that the data in the backup nodes can remain intact even if the primary database node fails. Finally, by backing up the data storage on the database backup node, the server generates the target backup data. This backup data can be used for recovery operations when needed, thereby ensuring business continuity and data security.
[0108] In a specific embodiment, executing the database disaster recovery method further includes the following steps:
[0109] (1) Switch the primary database node to the database backup node, and update the network topology of the first database disaster recovery distribution network to obtain a second database disaster recovery distribution network;
[0110] (2) obtaining a data storage task of the second database disaster recovery distribution network, and determining a plurality of target database nodes according to the data storage task;
[0111] (3) Obtain the target data volume of the data storage task, and build a corresponding target load balancing strategy based on the target data volume and multiple target database nodes.
[0112] Specifically, the server switches the primary database node to the database backup node. This switching process can be automatic or manually triggered, depending on the specific disaster recovery strategy. After the switch is completed, the server updates the network topology of the first database disaster recovery distribution network to reflect the changes between the primary database node and the backup node. This ensures that the network topology is consistent with the status of the actual nodes. The server obtains the data storage tasks of the second database disaster recovery distribution network. These tasks involve operations such as data backup, recovery, and migration, and are intended to ensure data security and availability. Based on these data storage tasks, the server determines multiple target database nodes. These nodes will undertake specific tasks to ensure that data is correctly transmitted and processed in the network. In order to achieve target load balancing, the server considers multiple factors, including the target data volume and the performance capabilities of the target database node. Based on the target data volume, the server analyzes the amount of data that each database node needs to process, and then balances the load based on the performance capabilities of the node. Based on these analyses, the server builds the corresponding target load balancing strategy. This strategy can determine which node is responsible for processing which tasks, and how to dynamically adjust the task allocation to ensure load balancing for each node. For example, suppose the server manages the database of a financial institution and needs to ensure high availability and disaster recovery of the data. During normal operation, the primary database node is responsible for handling all data interactions. However, when the primary database node fails, the server switches to the backup node to maintain business continuity. Once the primary database node switches to the backup node, the server updates the network topology of the database disaster recovery distribution network to reflect the node changes. This ensures that the network topology is consistent with the actual situation. The server obtains the data storage tasks of the second database disaster recovery distribution network. For example, one task is to back up the latest transaction data to the backup node. Based on the data storage tasks, the server determines multiple target database nodes, each of which is responsible for different tasks. For example, one node is responsible for backing up data and another node is responsible for restoring data. Finally, the server builds a target load balancing strategy based on the target data volume and the performance capabilities of the target database node. If the backup data volume is large, the server will assign the backup task to the node with stronger performance to ensure data processing efficiency.
[0113] The above describes the database disaster recovery method in the embodiment of the present invention. The following describes the database disaster recovery system in the embodiment of the present invention. Figure 5 In one embodiment of the present invention, a database disaster recovery system includes:
[0114] The acquisition module 501 is used to acquire the target node status parameters of the primary database node in the first database disaster recovery distribution network, and perform node abnormality analysis on the target node status parameters to obtain the node abnormality analysis results;
[0115] The processing module 502 is used to obtain the synchronization node combination and node storage data corresponding to the primary database node according to the node abnormality analysis result, wherein the synchronization node combination includes: a first synchronization node and a second synchronization node;
[0116] A synchronization module 503, configured to generate a first data synchronization ratio of the synchronization node combination according to the node storage data, synchronize the node storage data according to the first data synchronization ratio, and collect a first synchronization state parameter of the first synchronization node and a second synchronization state parameter of the second synchronization node;
[0117] An encoding module 504 is used to perform feature extraction and vector encoding on the first synchronization state parameter and the second synchronization state parameter to obtain a target state feature vector;
[0118] An analysis module 505 is used to input the target state feature vector into a preset synchronization state analysis model to perform synchronization state analysis to obtain a second data synchronization ratio;
[0119] The generating module 506 is used to synchronize the node storage data according to the second data synchronization ratio, create a database backup node corresponding to the synchronization node combination to perform data storage backup, and generate corresponding target backup data.
[0120] Through the synergy of the above-mentioned components, the present invention can more accurately evaluate the status and synchronization of database nodes by comprehensively applying various technical means such as abnormal analysis, synchronization status analysis and data synchronization, thereby improving the accuracy of disaster recovery decisions and the efficiency of data backup, and reducing the risk of data loss and business interruption. By collecting node status parameters and synchronization status information in real time, a real-time monitoring system can be established to timely discover potential problems and abnormal situations, and early warning can be given, which helps to take necessary measures before the problem occurs and reduce potential losses. By calculating the data synchronization ratio and data synchronization based on parameter characteristics, it can be ensured that the synchronization of data between different nodes is more accurate and efficient, avoiding unnecessary data redundancy and transmission. The use of automation technology reduces the need for manual intervention. The automated data synchronization and backup process can respond to problems more quickly and reduce the burden on personnel. By effectively cleaning and verifying the data during the synchronization process, the integrity and accuracy of the backup data are ensured, and problems with the backup data are avoided. By optimizing the disaster recovery strategy, unnecessary data transmission and backup are reduced, thereby reducing the resources and cost overhead of disaster recovery. Through feature extraction, vector encoding and synchronization status analysis models, disaster recovery decisions are more data-supported and intelligent, which helps optimize disaster recovery plans and strategies, thereby improving the efficiency of data synchronization and improving the security of data in backup nodes.
[0121] above Figure 5 The database disaster recovery system in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The database disaster recovery device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0122] Figure 6 6 is a schematic diagram of the structure of a database disaster recovery device provided by an embodiment of the present invention. The database disaster recovery device 600 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 610 (for example, one or more processors) and a memory 620, and one or more storage media 630 (for example, one or more mass storage devices) storing application programs 633 or data 632. Among them, the memory 620 and the storage medium 630 may be temporary storage or permanent storage. The program stored in the storage medium 630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the database disaster recovery device 600. Furthermore, the processor 610 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the database disaster recovery device 600.
[0123] The database disaster recovery device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 660, and / or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 6 The illustrated database disaster recovery device structure does not constitute a limitation on the database disaster recovery device, and may include more or fewer components than illustrated, or a combination of certain components, or a different arrangement of components.
[0124] The present invention also provides a database disaster recovery device, which includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the steps of the database disaster recovery method in the above embodiments.
[0125] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the database disaster recovery method.
[0126] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0127] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0128] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A database disaster recovery method, characterized in that: The database disaster recovery method comprises: Obtaining target node status parameters of a primary database node in the first database disaster recovery distribution network, and performing node anomaly analysis on the target node status parameters to obtain a node anomaly analysis result; Acquire a synchronization node combination and node storage data corresponding to the primary database node according to the node abnormality analysis result, wherein the synchronization node combination includes: a first synchronization node and a second synchronization node; Generating a first data synchronization ratio of the synchronization node combination according to the node storage data, performing data synchronization on the node storage data according to the first data synchronization ratio, and collecting a first synchronization state parameter of the first synchronization node and a second synchronization state parameter of the second synchronization node; Performing feature extraction and vector encoding on the first synchronization state parameter and the second synchronization state parameter to obtain a target state feature vector; Inputting the target state feature vector into a preset synchronization state analysis model to perform synchronization state analysis to obtain a second data synchronization ratio; The node storage data is synchronized according to the second data synchronization ratio, and a database backup node corresponding to the synchronization node combination is created to perform data storage backup, thereby generating corresponding target backup data.
2. The database disaster recovery method according to claim 1, characterized in that: The step of obtaining target node status parameters of the primary database node in the first database disaster recovery distribution network, and performing node abnormality analysis on the target node status parameters to obtain node abnormality analysis results includes: Obtain target node status parameters of the primary database node in the first database disaster recovery distribution network; Constructing a box plot of the target node state parameters to obtain a corresponding target box plot, and calculating the interquartile range of the target box plot; Comparing the interquartile range with a preset target value to obtain a target comparison result, and marking the target box plot as an outlier according to the target comparison result to obtain a plurality of abnormal parameters; Performing data cleaning on the target node state parameters according to the multiple abnormal parameters to obtain standard node state parameters; Performing numerical mapping on the standard node state parameters to obtain a plurality of parameter values, and performing vector conversion on the plurality of parameter values to obtain a target parameter vector of the master database node; The target parameter vector is input into a preset main node anomaly detection model to perform main node anomaly analysis to obtain a node anomaly analysis result, wherein the main node anomaly detection model includes: a first threshold recurrent network, a second threshold recurrent network and a two-layer fully connected network.
3. The database disaster recovery method according to claim 1, characterized in that: The step of generating a first data synchronization ratio of the synchronization node combination according to the node storage data, synchronizing the node storage data according to the first data synchronization ratio, and collecting a first synchronization state parameter of the first synchronization node and a second synchronization state parameter of the second synchronization node includes: According to the node storage data, the data volume weight analysis is performed on the master database node to obtain the target data volume weight, and the update frequency weight analysis is performed on the master database node to obtain the target update frequency weight; According to the target data volume proportion weight and the target update frequency weight, respectively calculating first weight score data of the first synchronization node and second weight score data of the second synchronization node in the synchronization node combination; Generating a first data synchronization ratio of the synchronization node combination according to the first weight score data and the second weight score data; According to the first data synchronization ratio, the node storage data is synchronized to the first synchronization node and the second synchronization node, and a first synchronization state parameter of the first synchronization node and a second synchronization state parameter of the second synchronization node are collected.
4. The database disaster recovery method according to claim 1, characterized in that: The step of extracting features and vector encoding the first synchronization state parameter and the second synchronization state parameter to obtain a target state feature vector includes: Acquire a plurality of synchronization state feature tags, and determine a plurality of first parameter cluster centers of the first synchronization state parameter according to the plurality of synchronization state feature tags, and determine a plurality of second parameter cluster centers of the second synchronization state parameter; Performing cluster analysis on the first synchronization state parameter according to the plurality of first parameter cluster centers through a preset first clustering model to obtain a plurality of first synchronization feature parameters; Performing cluster analysis on the second synchronization state parameter according to the plurality of second parameter cluster centers respectively through a preset second clustering model to obtain a plurality of second synchronization feature parameters; Performing vector encoding on the plurality of first synchronization feature parameters to obtain a first synchronization feature vector, and performing vector encoding on the plurality of second synchronization feature parameters to obtain a second synchronization feature vector; Vector fusion is performed on the first synchronization feature vector and the second synchronization feature vector to obtain a target state feature vector.
5. The database disaster recovery method according to claim 1, characterized in that: The step of inputting the target state feature vector into a preset synchronization state analysis model to perform synchronization state analysis to obtain a second data synchronization ratio includes: Inputting the target state feature vector into a preset synchronization state analysis model, wherein the synchronization state analysis model includes: a first encoding network, a second encoding network and a decoding network; Calculating a vector weight of the target state feature vector according to the first data synchronization ratio, and performing a weighted operation on the target state feature vector according to the vector weight to obtain a weighted state feature vector; Inputting the weighted state feature vector into the first coding network for feature extraction to obtain a first coding feature vector, and inputting the weighted state feature vector into the second coding network for feature extraction to obtain a second coding feature vector; The first encoding feature vector and the second encoding feature vector are input into the decoding network to perform synchronization state analysis to obtain a second data synchronization ratio.
6. The database disaster recovery method according to claim 1, characterized in that: The step of synchronizing the node storage data according to the second data synchronization ratio, creating a database backup node corresponding to the synchronization node combination for data storage backup, and generating corresponding target backup data includes: Calculating a first adjustment parameter of the first synchronization node and a second adjustment parameter of the second synchronization node according to the second data synchronization ratio; According to the first adjustment parameter and the second adjustment parameter, data synchronization is performed on the node storage data through the first synchronization node and the second synchronization node to obtain first transfer data of the first synchronization node and second transfer data of the second synchronization node; A database backup node corresponding to the synchronization node combination is created, and the first transit data and the second transit data are stored in the database backup node, and data storage is backed up through the database backup node to generate corresponding target backup data.
7. The database disaster recovery method according to claim 1, characterized in that: The database disaster recovery method further includes: Switching the primary database node to the database backup node, and updating the network topology of the first database disaster recovery distribution network to obtain a second database disaster recovery distribution network; Acquire a data storage task of the second database disaster recovery distribution network, and determine a plurality of target database nodes according to the data storage task; The target data volume of the data storage task is obtained, and a corresponding target load balancing strategy is constructed according to the target data volume and the multiple target database nodes.
8. A database disaster recovery system, characterized in that: The database disaster recovery system comprises: An acquisition module is used to acquire target node status parameters of a primary database node in the first database disaster recovery distribution network, and perform node anomaly analysis on the target node status parameters to obtain a node anomaly analysis result; A processing module, configured to obtain a synchronization node combination and node storage data corresponding to the primary database node according to the node abnormality analysis result, wherein the synchronization node combination includes: a first synchronization node and a second synchronization node; a synchronization module, configured to generate a first data synchronization ratio of the synchronization node combination according to the node storage data, synchronize the node storage data according to the first data synchronization ratio, and collect a first synchronization state parameter of the first synchronization node and a second synchronization state parameter of the second synchronization node; An encoding module, used for performing feature extraction and vector encoding on the first synchronization state parameter and the second synchronization state parameter to obtain a target state feature vector; An analysis module, used for inputting the target state feature vector into a preset synchronization state analysis model to perform synchronization state analysis to obtain a second data synchronization ratio; A generation module is used to synchronize the node storage data according to the second data synchronization ratio, create a database backup node corresponding to the synchronization node combination to perform data storage backup, and generate corresponding target backup data.
9. A database disaster recovery device, characterized in that: The database disaster recovery device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instruction in the memory to enable the database disaster recovery device to execute the database disaster recovery method according to any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the database disaster recovery method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Remote disaster recovery system, method and device for data and computing equipment
CN112988882A
Database processing method and device
CN114610532A
Authority management and control method and system for unmanned aerial vehicle, and storage medium
CN115829260A
Disaster recovery method and system for data, terminal device and computer storage medium
WO2023005075A1
