A high-availability data extraction method and system based on a temporary backup mechanism

By configuring a temporary backup mechanism and an operation and maintenance collaboration mechanism on the data middle platform, the problem of ODS layer data anomalies caused by network anomalies in ETL data extraction tasks was solved, achieving high availability and stability of data extraction, adapting to complex network environments, and reducing operation and maintenance costs.

CN123178491APending Publication Date: 2026-11-27河钢数字技术股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611248576.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

During the ETL data extraction process in the data middle platform, anomalies such as network interruption and database connection timeout may cause the data extraction task to fail, resulting in abnormal data in the ODS layer and affecting the normal operation of downstream systems and business decisions.

Method used

A temporary backup mechanism is adopted. By configuring an independent ETL task and creating a temporary backup table on the data middle platform, data backup snapshots are extracted and generated on a regular basis. If the extraction fails, the backup data is automatically backfilled into the ODS table. Combined with the operation and maintenance collaboration mechanism, fault repair and process recovery are realized.

Benefits of technology

Ensure the stability and availability of ODS layer data, avoid downstream system anomalies, reduce operation and maintenance costs, adapt to complex network environments, achieve automated and highly available data extraction, and adapt to closed IT environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178491A_ABST
    Figure CN123178491A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data extraction, data processing and data high-availability, in particular to a high-availability data extraction method based on a temporary backup mechanism, which comprises the following steps: an initialization stage: an independent ETL data extraction task is configured for each data source enterprise, data source parameter configuration, data table mapping relationship establishment and exclusive temporary backup table creation are completed, and the temporary backup table corresponds to a target ODS table one by one; a timing extraction process: the ETL data extraction task is automatically started according to a preset time node, data extraction and writing operation are executed, and differential processing is executed according to an extraction result; through the temporary backup and automatic backfill mechanism, the application solves the problem of empty tables in the ODS layer caused by ETL extraction abnormity, ensures that effective business data is still retained in the ODS layer when data extraction fails, avoids abnormity and result distortion of downstream BI report forms, early warning models and data analysis systems, and guarantees accurate business decision and stable system operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of data extraction, data processing, and high data availability, specifically a high-availability data extraction method and system based on a temporary backup mechanism. Background Technology

[0002] With the deepening of digital transformation, local governments and large enterprises are generally building data platforms to integrate key enterprise data resources, thereby achieving state-owned asset supervision, business scenario mining, management efficiency improvement, and scientific decision-making. A typical data platform architecture is as follows: each enterprise or subsidiary deploys a database locally, and the data platform extracts business data periodically through a secure channel, loading it into the ODS (Operational Data Storage) layer to provide basic support for subsequent data cleaning, modeling, and analysis.

[0003] In actual operation, due to the independent IT infrastructure of each enterprise and the significant differences in network environment, problems such as unstable leased line quality, firewall policy restrictions, and dynamic changes in IP whitelists occur frequently. As a result, ETL data extraction tasks are prone to temporary network interruptions, database connection timeouts, authentication failures, and other anomalies during execution, which in turn cause the extraction task to fail.

[0004] Traditional ETL tools only have basic task retry mechanisms, while network failures in production environments are often complex, persistent, and uncertain, and may still fail to recover even after multiple retries throughout the day. Without effective fallback mechanisms, this can easily lead to serious data anomalies. A typical full data extraction process usually involves first clearing and deleting the target table in the ODS layer, followed by data writing. If the writing process is interrupted due to network anomalies, the ODS table will be cleared and unable to successfully write new data, ultimately resulting in an empty table. As the source layer of the data warehouse, data anomalies in the ODS layer will directly propagate to downstream dependent systems, causing BI report display errors, risk warning model failures, and distorted data analysis results, ultimately leading to misjudgments in business decisions and impacting normal business operations.

[0005] Therefore, a highly available data extraction method based on a temporary backup mechanism is needed to improve the above problems. Summary of the Invention

[0006] The purpose of this invention is to provide a highly available data extraction method based on a temporary backup mechanism to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: A highly available data extraction method based on a temporary backup mechanism includes the following steps: Initialization phase: Configure an independent ETL data extraction task for each data source enterprise, complete the data source parameter configuration, establish data table mapping relationship and create a dedicated temporary backup table, which corresponds one-to-one with the target ODS table; Scheduled extraction process: The ETL data extraction task is automatically started according to the preset time nodes, and data extraction and writing operations are performed. Differential processing is performed according to the extraction results. If the extraction is successful, a data backup snapshot of the day is generated and stored in the temporary backup table. If the extraction fails, the valid backup data in the temporary backup table is backfilled into the target ODS table. Operation and maintenance collaboration mechanism: Based on task execution logs and alarm logs, fault diagnosis and repair are completed. After the fault is repaired, the backup data and ODS table data identifier are automatically updated when the next extraction is successful, and the normal extraction process is restored.

[0008] As a preferred embodiment of the present invention, the initialization stage specifically includes: Data source configuration: Specify the physical address and database type of the corresponding enterprise, and store the database account password in an encrypted manner; Data table mapping: Define the table name, field range, and data filtering conditions of the source table to be extracted, and establish the mapping relationship between the source table and the target ODS table; Temporary backup table creation: Create a dedicated temporary backup table for each target ODS table. The backup table naming follows a unified standard: ods_<enterprise ID>_<business module>_temp.

[0009] As a preferred embodiment of the present invention, the backup operation after successful extraction in the timed extraction process is specifically as follows: All valid data in the target ODS table is copied to the corresponding temporary backup table using incremental copying and full verification, generating a data backup snapshot for the day. Update the task execution log, mark the day's extraction as successful, and mark the current data in the ODS table as the actual data for the day.

[0010] As a preferred embodiment of the present invention, the fault tolerance mechanism in the timed extraction process after extraction failure is specifically as follows: When it is determined that there is valid backup data in the temporary backup table, the backup data is automatically loaded into the target ODS table to overwrite the abnormal data; Record alarm logs, indicate the time and reason for task failure, and push alarm information to maintenance personnel.

[0011] As a preferred embodiment of the present invention, the operation and maintenance collaboration mechanism specifically includes: Based on the execution report and alarm logs, the operation and maintenance personnel locate and repair the source of the fault, including network environment, database configuration, and IP whitelist issues; After the fault is repaired, when the next ETL scheduled extraction is successfully completed, the old data in the temporary backup table will be automatically overwritten with the real data of the day, and the data identifier in the ODS table will be updated to the real data of the day.

[0012] A highly available data extraction system based on a temporary backup mechanism, deployed on the data platform side, requires no modification to the source system, including: Configuration module: Used to complete the initial configuration of ETL tasks for each data source enterprise, including data source parameter encryption configuration, data table mapping relationship establishment, temporary backup table creation and naming management; The timed extraction module automatically starts data extraction tasks according to preset times, performs source data extraction and ODS table writing operations, and collects task execution status and key indicators in real time. Backup and fault tolerance module: It works in conjunction with the timed extraction module. When extraction is successful, it generates a data backup snapshot and stores it in a temporary backup table. When extraction fails, it fills the data in the temporary backup table back into the ODS table. Log and Alarm Module: Records task execution logs and alarm logs, and pushes alarm notifications containing fault information when a task fails; Operation and Maintenance Collaboration Module: Provides a fault troubleshooting entry point, and after fault repair, it enables automatic recovery of the extraction process and updates of backup data.

[0013] As a preferred embodiment of the present invention, the configuration module supports heterogeneous data source configuration for multiple enterprises and multiple types of databases, and the configuration information of each enterprise is stored independently.

[0014] As a preferred embodiment of the present invention, the backup fault tolerance module uses a combination of incremental replication and full verification to complete data backup, so as to ensure the consistency between the backup data and the data in the operation data storage table.

[0015] As a preferred embodiment of the present invention, the interaction between the system and the source database follows the principle of source-side read-only extraction, middle-side processing, and operation data storage layer writing or backfilling, and this interaction process does not affect the performance of the source database.

[0016] As a preferred embodiment of the present invention, the system forms an operation and maintenance closed loop of automatic fault tolerance, log alarm, manual repair and process self-recovery through the cooperation of the backup fault tolerance module, the log alarm module and the operation and maintenance collaboration module, so as to ensure the long-term stable operation of data extraction.

[0017] Compared with the prior art, the beneficial effects of the present invention are: This invention solves the problem of empty tables in the ODS layer caused by ETL extraction anomalies through temporary backup and automatic backfilling mechanisms. It ensures that the ODS layer still retains valid business data when data extraction fails, avoiding anomalies and result distortion in downstream BI reports, early warning models, and data analysis systems. This ensures accurate business decisions and stable system operation. This invention can adapt to complex network environments such as unstable leased lines, network fluctuations, firewall restrictions, and dynamic changes in IP whitelists. It breaks through the limitations of traditional ETL tools that rely solely on retries and have insufficient fault tolerance, thus improving the stability and availability of data extraction. All logic in this invention is implemented on the data platform side, requiring no modification to the source database and system. It is non-intrusive and has no performance impact on the source system, and can be quickly deployed in closed IT environments such as state-owned enterprises. It solves the problem of difficult deployment of solutions such as CD and dual-write, and automates the entire process of extraction, backup, fault tolerance, alarm, and recovery. No manual data replenishment or monitoring is required, reducing operation and maintenance costs and response delay risks. It also requires only a small amount of storage resources to achieve high availability, and has the advantages of simple deployment, controllable cost, and strong scalability. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the steps of the present invention. Detailed Implementation

[0019] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0020] To facilitate understanding of the present invention, a more complete description will be given below with reference to relevant descriptions. Several embodiments of the invention are provided. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0021] This invention provides a highly available data extraction method and system based on a temporary backup mechanism. The method and system are deployed on the data platform side, requiring no modification to the source enterprise database. Through three core stages—initialization phase, scheduled extraction process, and operation and maintenance collaboration mechanism—a complete closed loop of configuration, extraction, backup, fault tolerance, repair, and recovery is formed to solve the problems of ETL task failure and data loss in the Operational Data Storage Layer (ODS layer) caused by network anomalies or connection failures.

[0022] The following detailed explanation uses a large group as an example. Company A of this group uses a MySQL database, while Company B uses an Oracle database. The data platform needs to extract sales order data from each subsidiary daily and load it into the corresponding tables in the ODS layer. This embodiment discloses a highly available data extraction method based on a temporary backup mechanism, applied to a data platform ETL extraction scenario with heterogeneous data sources from multiple enterprises. All processing logic is deployed on the data platform side without any modification to the source database. It can ensure that the ODS layer data does not have empty tables and that downstream data services are not interrupted even in scenarios such as network fluctuations, database connection anomalies, and authentication failures.

[0023] Step 1: Establish independent extraction configurations for each data source enterprise. For different enterprise data sources, separate ETL data extraction tasks are created to ensure that data extraction for each enterprise is independent and does not interfere with each other.

[0024] First, configure the data source connection information, determining the enterprise database's IP address, port number, and database type. Encrypt the database username and password to ensure access security. Specifically, the AES symmetric encryption algorithm can be used to encrypt and store the database password, preventing configuration information leakage.

[0025] Next, establish the data table correspondence, determining the name of the data table to be extracted from the source, the field range, the filtering conditions, and the correspondence with the target ODS table, supporting one-to-one and one-to-many mapping methods. For example, for Company A's sales order source table, the extracted fields can be specified as order number, order date, amount, and customer name, with the filtering condition being that the order date equals the current extraction date, establishing a one-to-one mapping between the source table and the target ODS table.

[0026] Finally, a dedicated temporary backup table is created for each target ODS table. These backup tables are named according to a unified rule: ods_<Company ID>_<Business Module>_temp. The company ID distinguishes different companies, and the business module distinguishes different business data within the same company, enabling separate management and rapid location of backup data. For example, a backup table for Company A's sales order ODS table could be named ods_compA_sales_temp, where compA represents Company A and sales represents the sales business module.

[0027] Step 2: Perform data extraction and writing according to the preset time. The system automatically initiates ETL data extraction tasks during designated off-peak business hours. The preset time can be flexibly configured according to business needs, such as between 2:00 AM and 4:00 AM daily, to avoid impacting the source database's performance during normal business hours. Based on the configured data source parameters and table mapping relationships, a secure connection is established with the source database, the specified business data is extracted, and the data is written to the corresponding target ODS table.

[0028] During the extraction and writing process, information such as task start time, data extraction progress, and total amount of data extracted is recorded in real time, forming a complete task execution log. Simultaneously, the system also collects key metrics such as data writing progress and network transmission time in real time, enabling precise identification of the stage at which anomalies occur in the event of task failure.

[0029] Step 3: Generate a data backup snapshot upon successful extraction. Once data extraction and writing are completed successfully, the system automatically performs a data backup. All valid data in the target ODS table is copied completely to the corresponding temporary backup table using incremental replication combined with full verification, creating a complete snapshot of the data for the day and ensuring complete consistency between the backup data and the ODS table data. Incremental replication only copies data rows that have changed since the last backup, while full verification confirms data integrity by comparing the number of rows or checksums, thereby reducing resource overhead during the backup process while maintaining consistency.

[0030] Simultaneously, update the task execution log, mark the day's extraction task as successful, and mark the current data in the ODS table as real data for that day. This facilitates downstream systems in identifying data validity and provides a basis for operational troubleshooting. This marker can be a metadata field, for example, recording the data date as XXXX-XX-XX and the status as real data for that day in the metadata table of the data platform.

[0031] Step 4: Automatically refill backup data when extraction fails. When an anomaly occurs during the data extraction or writing process, including network interruption, excessive network latency, database connection timeout, connection rejection, SQL execution error, and authentication failure, as well as common network problems in real-world production environments such as unstable leased line quality, firewall policy restrictions, and dynamic changes to the IP whitelist, causing the extraction task to fail, the system immediately initiates fault tolerance processing.

[0032] First, it checks if valid backup data exists in the temporary backup table. This check can be done by verifying that the backup table is not empty and contains at least one valid record, or by checking if the backup table contains a timestamp of the most recent successful backup. If valid data exists, the backup data is automatically and completely loaded into the target ODS table, overwriting any abnormal data or empty tables already written to the ODS table, ensuring that the ODS layer always retains usable data. Essentially, this operation fills the current day's gaps with a successful snapshot from the previous day, thus preventing downstream BI reports and risk warning models from misjudging or failing due to empty tables.

[0033] At the same time, the system records detailed alarm logs, noting the time of task failure, the reason for failure, the company and business module to which it belongs, and sends alarm information to the operation and maintenance personnel via email, prompting them to handle the fault.

[0034] The alarm information may include: the name of the company experiencing the failure, the name of the business module, the specific reason for the failure, and suggested troubleshooting directions, so that maintenance personnel can respond quickly.

[0035] Step 5: The normal extraction process will automatically resume after the fault is repaired. Based on task execution logs and alarm logs, maintenance personnel locate the source of the fault and repair network environment, leased line quality, firewall policies, database account permissions, IP whitelists, connection parameters, etc.

[0036] For example, if the alarm log shows that the connection was refused, the operations and maintenance personnel can check whether the firewall policy of the source database has added the IP address of the data middle platform to the whitelist; if it shows that the connection timed out, they can coordinate with the network department to optimize the quality of the leased link or increase the connection timeout threshold.

[0037] After troubleshooting, when the next scheduled extraction task starts and successfully completes data extraction and writing, the system automatically performs a backup operation, overwriting the old data in the temporary backup table with the real data of the day, and simultaneously updating the data in the ODS table to the real data of the day. The entire extraction process does not require manual intervention and automatically restores to normal operation.

[0038] Based on the same inventive concept, this embodiment also provides a highly available data extraction system based on a temporary backup mechanism, deployed on the data platform side, including a configuration module, a timed extraction module, a backup fault tolerance module, a log alarm module, and an operation and maintenance collaboration module.

[0039] The configuration module completes the data source encryption configuration, table mapping establishment, and temporary backup table creation and management. This module supports heterogeneous configuration of multiple enterprises and multiple types of databases. The configuration information of each enterprise is stored independently and does not interfere with each other. The timed extraction module starts extraction at a preset time, completes data extraction and writing to the ODS table. During the task execution process, this module collects the task status and core indicators such as the amount of data extracted and the writing progress in real time, and synchronizes this information to the log alarm module. The backup and fault tolerance module generates a snapshot when extraction is successful and refills the backup data when extraction fails. This module is the core of the system and works closely with the scheduled extraction module. In successful scenarios, incremental replication combined with full verification is used to completely copy the ODS table data to the temporary backup table. In the event of failure, the system automatically determines whether there is valid data in the temporary backup table. If so, it loads the data into the ODS table to overwrite abnormal data or empty tables, ensuring that the data in the ODS layer is not interrupted. The log and alarm module records execution logs and alarm logs, and pushes alarm information when an anomaly occurs. The execution log includes task start time, progress, data volume, execution results, etc. The alarm log includes the failure time, failure reason, fault level, enterprise and business module. In addition to email, the push method can also be extended to SMS or WeChat Work depending on the enterprise's operation and maintenance system. The operation and maintenance collaboration module provides an entry point for troubleshooting. After a fault is repaired, the process can be automatically restored. This module displays the fault source location information and can provide solutions for similar historical faults for reference, reducing the troubleshooting time for operation and maintenance personnel.

[0040] Once the fault is repaired, the successful execution of the next extraction cycle will automatically update the backup data and ODS table markers without manual triggering.

[0041] The system interacts with the source database in a read-only manner, and data processing, writing, and backfilling are completed only on the middle platform side. This does not affect the performance of the source database and is suitable for highly closed enterprise IT environments. The entire data interaction follows the principle of read-only extraction at the source, processing at the middle platform side, and writing or backfilling at the ODS layer. No agent programs need to be installed on the source side or the parameters of the source database need to be modified, thus meeting the stringent requirements of state-owned enterprises and other closed enterprises for the stability and security of the source system.

[0042] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A highly available data extraction method based on a temporary backup mechanism, characterized in that, Includes the following steps: Initialization phase: Configure an independent ETL data extraction task for each data source enterprise, complete the data source parameter configuration, establish data table mapping relationship and create a dedicated temporary backup table, which corresponds one-to-one with the target ODS table; Scheduled extraction process: The ETL data extraction task is automatically started according to the preset time nodes, and data extraction and writing operations are performed. Differential processing is performed according to the extraction results. If the extraction is successful, a data backup snapshot of the day is generated and stored in the temporary backup table. If the extraction fails, the valid backup data in the temporary backup table is backfilled into the target ODS table. Operation and maintenance collaboration mechanism: Based on task execution logs and alarm logs, fault diagnosis and repair are completed. After the fault is repaired, the backup data and ODS table data identifier are automatically updated when the next extraction is successful, and the normal extraction process is restored.

2. The high-availability data extraction method based on a temporary backup mechanism according to claim 1, characterized in that: The initialization phase specifically includes: Data source configuration: Specify the physical address and database type of the corresponding enterprise, and store the database account password in an encrypted manner; Data table mapping: Define the table name, field range, and data filtering conditions of the source table to be extracted, and establish the mapping relationship between the source table and the target ODS table; Temporary backup table creation: Create a dedicated temporary backup table for each target ODS table. The backup table naming follows a unified standard: ods_<enterprise ID>_<business module>_temp.

3. The high-availability data extraction method based on a temporary backup mechanism according to claim 1, characterized in that: In the timed extraction process, the backup operation after successful extraction is as follows: All valid data in the target ODS table is copied to the corresponding temporary backup table using incremental copying and full verification, generating a data backup snapshot for the day. Update the task execution log, mark the day's extraction as successful, and mark the current data in the ODS table as the actual data for the day.

4. The high-availability data extraction method based on a temporary backup mechanism according to claim 1, characterized in that: The fault tolerance mechanism in the timed extraction process after extraction failure is as follows: When it is determined that there is valid backup data in the temporary backup table, the backup data is automatically loaded into the target ODS table to overwrite the abnormal data; Record alarm logs, indicate the time and reason for task failure, and push alarm information to maintenance personnel.

5. The high-availability data extraction method based on a temporary backup mechanism according to claim 1, characterized in that, The aforementioned operation and maintenance collaboration mechanism specifically includes: Based on the execution report and alarm logs, the operation and maintenance personnel locate and repair the source of the fault, including network environment, database configuration, and IP whitelist issues; After the fault is repaired, when the next ETL scheduled extraction is successfully completed, the old data in the temporary backup table will be automatically overwritten with the real data of the day, and the data identifier in the ODS table will be updated to the real data of the day.

6. A highly available data extraction system based on a temporary backup mechanism, characterized in that, Deployed on the data middle platform, requiring no modification to the source system, including: Configuration module: Used to complete the initial configuration of ETL tasks for each data source enterprise, including data source parameter encryption configuration, data table mapping relationship establishment, temporary backup table creation and naming management; The timed extraction module automatically starts data extraction tasks according to preset times, performs source data extraction and ODS table writing operations, and collects task execution status and key indicators in real time. Backup and fault tolerance module: It works in conjunction with the timed extraction module. When extraction is successful, it generates a data backup snapshot and stores it in a temporary backup table. When extraction fails, it fills the data in the temporary backup table back into the ODS table. Log and Alarm Module: Records task execution logs and alarm logs, and pushes alarm notifications containing fault information when a task fails; Operation and Maintenance Collaboration Module: Provides a fault troubleshooting entry point, and after fault repair, it enables automatic recovery of the extraction process and updates of backup data.

7. The high-availability data extraction system based on a temporary backup mechanism according to claim 6, characterized in that: The configuration module supports heterogeneous data source configuration for multiple enterprises and multiple types of databases, with each enterprise's configuration information stored independently.

8. The high-availability data extraction system based on a temporary backup mechanism according to claim 6, characterized in that: The backup fault tolerance module uses a combination of incremental replication and full verification to complete data backup, ensuring the consistency between the backup data and the data in the operation data storage table.

9. The high-availability data extraction system based on a temporary backup mechanism according to claim 6, characterized in that: The interaction between the system and the source database follows the principle of read-only extraction from the source, processing on the middle platform, and writing or backfilling to the operation data storage layer, and this interaction process does not affect the performance of the source database.

10. The high-availability data extraction system based on a temporary backup mechanism according to claim 6, characterized in that: The system, through the cooperation of backup fault tolerance module, log alarm module and operation and maintenance collaboration module, forms an operation and maintenance closed loop of automatic fault tolerance, log alarm, manual repair and process self-recovery to ensure the long-term stable operation of data extraction.