Disaster recovery book-up method and device, storage medium and program product
By acquiring transaction request messages and performing reconciliation processing during disaster recovery switchover, the problem of high financial data loss rate under high availability architecture is solved, and automated data recovery and consistency are achieved.
Patent Information
- Application Number
- CN202611541331.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-24
AI Technical Summary
In high-availability architecture disaster recovery switching scenarios, financial data loss rates are high, and existing technologies have not been able to effectively solve this problem.
By acquiring transaction request messages from the intercept server, we can detect whether there is data loss during the data replication process. When loss is detected, we can perform remediation on the disaster recovery database, including replaying transaction messages and reconciliation, to ensure data consistency.
It reduced the rate of financial data loss during disaster recovery switchover and enabled automated recovery and consistency of accounting data.
Smart Images

Figure CN123160296A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and more specifically, to a disaster recovery and reimbursement method, apparatus, storage medium, and program product. Background Technology
[0002] Financial information systems have become the "heart" and "nerve center" of financial institutions, undertaking key functions such as core transactions, customer service, risk management, and regulatory reporting. With the continuous expansion of business scale and the increasing complexity of technical architecture, the potential risks faced by these systems are also constantly intensifying. Whether it's hardware failure, network outages, software defects, or external cyberattacks and natural disasters, all can potentially cause system paralysis, leading to service interruptions, data loss, and even reputational risks and compliance crises.
[0003] To address the above scenarios, financial institutions have adopted high-availability architecture deployments, such as system-level reconciliation and database sharding active-active modes based on DG (Database Enterprise Edition's built-in high availability, data protection, and disaster recovery solution, the core idea of which is to maintain one or more backup databases in addition to a primary database) and TC (Remote Data Replication technology). However, in the scenario of off-site disaster recovery switchover, there is still a possibility of a small amount of business data being lost. For example, in the event of a production system failure and paralysis, some business data may have fallen into the production database but has not yet been replicated to the disaster recovery database.
[0004] There is currently no effective solution to the problem of high financial data loss rate in disaster recovery switching scenarios using high-availability architectures in related technologies. Summary of the Invention
[0005] The main purpose of this application is to provide a disaster recovery and reimbursement method, device, storage medium, and program product to solve the problem of high financial data loss rate in off-site disaster recovery switching scenarios using high availability architecture in related technologies.
[0006] To achieve the above objectives, according to one aspect of this application, a disaster recovery and remediation method is provided. The method includes: in the event of a failure in the production system, acquiring transaction request messages from a interception server to obtain a first transaction message, wherein the production system includes a system for financial institutions to process financial transactions, and the interception server is used to cache transaction request messages sent to the production system via transaction channels; based on the first transaction message, detecting whether data loss exists during the data replication process, and obtaining a detection result, wherein the data replication process includes a process of synchronizing data from a production database to a disaster recovery database, the production database including a database associated with the production system, the disaster recovery database including a database associated with the disaster recovery system, and the disaster recovery system including a system for taking over the processing of financial transactions from the production system in the event of a failure in the production system; and, if the detection result indicates that data loss exists during the data replication process, performing remediation processing on the disaster recovery database based on the first transaction message.
[0007] Further, the process of replenishing the disaster recovery database based on the first transaction message to obtain a replenishment result includes: replaying the first transaction message and receiving a response message returned by the disaster recovery system; after the response message indicates that the disaster recovery system has successfully processed the first transaction message, the successful replenishment is determined as the replenishment result.
[0008] Further, based on the first transaction message, detecting whether data loss exists during the data replication process and obtaining a detection result includes: reconciling the production database and the disaster recovery data based on the first transaction message to obtain a reconciliation result; determining whether the data in the production database and the disaster recovery database are consistent based on the reconciliation result to obtain a judgment result; if the judgment result indicates that the data in the production database and the disaster recovery database are inconsistent, determining that the detection result indicates that data loss exists during the data replication process; if the judgment result indicates that the data in the production database and the disaster recovery database are consistent, determining that the detection result indicates that no data loss exists during the data replication process.
[0009] Furthermore, before the production system fails, the method further includes: when the transaction channel sends a transaction request message to the production system, copying the transaction request message to obtain a copied transaction request message, and caching the copied transaction request message in the interception server; processing the transaction request message sent by the transaction channel using the production system to obtain a processing result, storing the processing result in the production database, and copying the processing result in the production database to the disaster recovery database.
[0010] Further, caching the copied transaction request message to the interception server includes: adding the copied transaction request message to a message queue; reading the copied transaction request message from the message queue; and caching the copied transaction request message to the interception server.
[0011] Furthermore, the interception server is equipped with a probe thread. Before obtaining the transaction request message from the interception server and the first transaction message, the process further includes: querying the status identifier of the disaster recovery switch at a preset frequency through the probe thread, wherein the disaster recovery switch is used to indicate whether to start the disaster recovery system to take over the production system to process the financial transaction; if the status identifier is in the started state, it is determined that the production system has a fault.
[0012] Furthermore, after performing the account replenishment process on the disaster recovery database based on the first transaction message, the method further includes: performing account locking on the target financial data in the disaster recovery database, wherein the target financial data includes: transaction data that has already undergone account replenishment; obtaining the account replenishment records for the disaster recovery database and adding the account replenishment records to a target report; verifying the account replenishment records based on the target report, and unlocking the target financial data if the account replenishment records pass the verification.
[0013] To achieve the above objectives, according to another aspect of this application, a disaster recovery and reconciliation device is provided. The device includes: an acquisition unit, configured to acquire transaction request messages from a interception server to obtain a first transaction message in the event of a failure in the production system, wherein the production system includes a system for financial institutions to process financial transactions, and the interception server is used to cache transaction request messages sent to the production system via transaction channels; a detection unit, configured to detect whether data loss exists during the data replication process based on the first transaction message, and obtain a detection result, wherein the data replication process includes a process of synchronizing data from a production database to a disaster recovery database, wherein the production database includes a database associated with the production system, the disaster recovery database includes a database associated with the disaster recovery system, and the disaster recovery system includes a system for taking over the processing of financial transactions from the production system in the event of a failure in the production system; and a reconciliation unit, configured to perform reconciliation processing on the disaster recovery database based on the first transaction message when the detection result indicates that data loss exists during the data replication process, and obtain a reconciliation result.
[0014] Furthermore, the reconciliation unit includes: a processing subunit, configured to replay the first transaction message and receive a response message returned by the disaster recovery system; and a first determining subunit, configured to determine successful reconciliation as the reconciliation result after the response message indicates that the disaster recovery system has successfully processed the first transaction message.
[0015] Further, the detection unit includes: a reconciliation subunit, used to reconcile the production database and the disaster recovery data based on the first transaction message to obtain a reconciliation result; a judgment subunit, used to determine whether the data in the production database and the disaster recovery database are consistent based on the reconciliation result to obtain a judgment result; a second determination subunit, used to determine that the detection result indicates that there is data loss in the data replication process when the judgment result indicates that the data in the production database and the disaster recovery database are inconsistent; and a third determination subunit, used to determine that the detection result indicates that there is no data loss in the data replication process when the judgment result indicates that the data in the production database and the disaster recovery database are consistent.
[0016] Furthermore, the disaster recovery and reconciliation device also includes: a first processing unit, configured to copy the transaction request message to the production system before the production system fails, obtain a copied transaction request message, and cache the copied transaction request message in the interception server; and a second processing unit, configured to process the transaction request message sent by the transaction channel using the production system, obtain a processing result, store the processing result in the production database, and copy the processing result in the production database to the disaster recovery database.
[0017] Furthermore, the first processing unit includes: an adding subunit, used to add the copied transaction request message to a message queue; and a caching subunit, used to read the copied transaction request message from the message queue and cache the copied transaction request message to the interception server.
[0018] Furthermore, the interception server is equipped with a probe thread, and the disaster recovery and reimbursement device further includes: a query unit, used to query the status identifier of the disaster recovery switch at a preset frequency through the probe thread before obtaining the transaction request message in the interception server and obtaining the first transaction message, wherein the disaster recovery switch is used to indicate whether to start the disaster recovery system to take over the processing of the financial transaction from the production system; and a determination unit, used to determine that the production system has a fault when the status identifier is in the started state.
[0019] Furthermore, the disaster recovery and reconciliation device also includes: a locking unit, used to lock target financial data in the disaster recovery database after reconciliation processing is performed on the disaster recovery database based on the first transaction message, wherein the target financial data includes transaction data that has already undergone reconciliation processing; an adding unit, used to obtain reconciliation records that have undergone reconciliation processing on the disaster recovery database and add the reconciliation records to a target report; and an unlocking unit, used to verify the reconciliation records based on the target report, and to unlock the target financial data if the verification of the reconciliation records passes.
[0020] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is executed, it controls the device where the computer-readable storage medium is located to perform the disaster recovery and reimbursement method.
[0021] According to another aspect of this application, an electronic device is provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the disaster recovery and reimbursement method during runtime.
[0022] According to another aspect of this application, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps of the disaster recovery and reimbursement method.
[0023] In this application, the following approach is adopted: In the event of a failure in the production system, transaction request messages from the interception server are obtained to obtain a first transaction message. The production system includes a system for financial institutions to process financial transactions, and the interception server is used to cache transaction request messages sent to the production system from transaction channels. Based on the first transaction message, the data replication process is checked for data loss, and a detection result is obtained. The data replication process includes the process of synchronizing data from the production database to the disaster recovery database. The production database includes a database associated with the production system, and the disaster recovery database includes a database associated with the disaster recovery system. The disaster recovery system includes a system used to take over the production system's processing of financial transactions in the event of a failure in the production system. If the detection result indicates that data loss has occurred during the data replication process, the disaster recovery database is reconciled based on the first transaction message. This solves the technical problem of high financial data loss rate in remote disaster recovery switching scenarios using high-availability architectures in related technologies. In this application, transaction request messages are cached on the server and replenished in the disaster recovery database based on the cached transaction request messages. This avoids the situation in related technologies where some data has been stored in the production database but has not been synchronized to the disaster recovery database in a high-availability disaster recovery switchover scenario, resulting in some data loss in the disaster recovery database. This achieves the technical effect of reducing the loss rate of financial data during the disaster recovery switchover process. Attached Figure Description
[0024] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0025] Figure 1 A hardware block diagram of a computer terminal for implementing a disaster recovery and reimbursement method is shown.
[0026] Figure 2 This is a flowchart of the disaster recovery and reimbursement method provided according to the embodiments of this application;
[0027] Figure 3 This is a schematic diagram of a disaster recovery and reimbursement system provided according to an embodiment of this application;
[0028] Figure 4 This is a schematic diagram of an interceptor provided according to an embodiment of this application;
[0029] Figure 5 This is a schematic diagram of a disaster recovery and reimbursement device provided according to an embodiment of this application;
[0030] Figure 6 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] It should be noted that the disaster recovery and remediation method and apparatus in this application can be used in the field of financial technology for disaster recovery switching, and can also be used in any field other than financial technology for disaster recovery switching. This application does not limit the application field of the disaster recovery and remediation method and apparatus.
[0034] It should be noted that the information collected in this application (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data all comply with relevant laws and standards, have taken necessary security measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse. For example, this system has interfaces with relevant users or organizations, providing users with corresponding operation entry points for users to choose to agree to or refuse automated decision results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.
[0035] This invention can be applied to various software products, control systems, and client-side systems (including but not limited to mobile clients, PCs, etc.) of financial institutions. Taking software products as an example, the accuracy of financial institutions' business data (including but not limited to business functions such as transfers, wealth management, funds, bill payments, account inquiries, advertising, and recommendations) can be improved through software products installed on mobile clients.
[0036] Example 1
[0037] According to an embodiment of this application, a method embodiment of a disaster recovery and reimbursement method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0038] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a disaster recovery and reimbursement method is shown. Figure 1 As shown, computer terminal 10 (or mobile device) may include one or more ( Figure 1 The processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions may also be included. In addition, it may include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0039] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0040] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the disaster recovery and reimbursement method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the aforementioned disaster recovery and reimbursement method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0041] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0042] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0043] Under the aforementioned operating environment, this application provides the following: Figure 2 The disaster recovery and reimbursement method is shown. Figure 2 This is a flowchart of the disaster recovery and reimbursement method according to Embodiment 1 of this application.
[0044] Step S201: In the event of a failure in the production system, the transaction request message in the interception server is obtained to obtain the first transaction message. The production system includes a system for financial institutions to process financial transactions, and the interception server is used to cache the transaction request messages sent to the production system from the transaction channel.
[0045] The aforementioned production system may include a system used by financial institutions to process financial transactions, and the aforementioned interception server may be used to cache transaction request messages uploaded to the production system from the transaction channels.
[0046] For example, in the event of a production system failure, the interception server has cached transaction request messages (i.e., the first transaction message) sent to the production system from the transaction channel before the failure occurred. These request messages can record transaction request data that has not yet been written to the disaster recovery database due to database synchronization delays. By retrieving the cached messages, the transaction request messages can be replayed after the disaster recovery switchover to perform reconciliation and remediation operations, thereby correcting data inconsistencies caused by the failure and achieving automated recovery of accounting data.
[0047] Step S202: Based on the first transaction message, detect whether there is data loss during the data replication process and obtain the detection result. The data replication process includes: the process of synchronizing data from the production database to the disaster recovery database. The production database includes: the database associated with the production system. The disaster recovery database includes: the database associated with the disaster recovery system. The disaster recovery system includes: a system used to take over the processing of financial transactions from the production system in the event of a failure in the production system.
[0048] In one optional example, the production database and disaster recovery data can be reconciled based on the first transaction message to obtain the reconciliation result; based on the reconciliation result, it can be determined whether the data in the production database and the disaster recovery database are consistent to obtain the judgment result; and based on the judgment result, it can be determined whether there is any data loss during the data replication process.
[0049] In another optional example, it can be determined whether a transaction has been successfully synchronized to the disaster recovery database by comparing the first transaction message (i.e., the transaction request that was intercepted and cached during the failure) with the current state of the disaster recovery database (such as a timestamp or transaction sequence number). If the disaster recovery database is found to be missing the transaction record, it is determined that data loss has occurred. This detection result serves as the basis for triggering the message replay mechanism, ensuring that compensation is only performed when data inconsistency is confirmed, thereby accurately repairing accounting data differences caused by synchronization delays and ensuring business continuity in the disaster recovery environment.
[0050] Step S203: If the detection result indicates that there is data loss during the data replication process, perform a data recovery process on the disaster recovery database based on the first transaction message.
[0051] If the detection confirms that transaction data was missing during the period of the disaster recovery database failure, a data recovery mechanism can be initiated. For example, the first transaction message cached in the interception server can be extracted, and the message can be replayed and executed in the disaster recovery system. By simulating the original transaction process, the missing accounting operations are written into the disaster recovery database, thereby repairing data inconsistencies, ensuring that the disaster recovery system data is consistent with the pre-disaster state of the production system, and achieving complete recovery of financial transaction data.
[0052] Through the above steps, this embodiment intercepts and caches transaction request messages on the server, and performs replenishment processing on the disaster recovery database based on the cached transaction request messages. This avoids the situation in related technologies where, in a high-availability architecture-based remote disaster recovery switchover scenario, some data has been stored in the production database, but the production database has not yet synchronized this data to the disaster recovery database, resulting in partial data loss in the disaster recovery database. This effectively reduces the financial data loss rate during the disaster recovery switchover process. Furthermore, it solves the technical problem of high financial data loss rate in high-availability architecture-based remote disaster recovery switchover scenarios in related technologies.
[0053] Optionally, in the disaster recovery and reconciliation method provided in this application embodiment, the reconciliation process is performed on the disaster recovery database based on the first transaction message to obtain the reconciliation result, including: replaying the first transaction message and receiving a response message returned by the disaster recovery system; after the response message indicates that the disaster recovery system has successfully processed the first transaction message, the successful reconciliation is determined as the reconciliation result.
[0054] In this embodiment, the cached first transaction message can be replayed, that is, the original transaction request can be simulated and executed in the disaster recovery environment. Subsequently, a processing response message returned by the disaster recovery system is received. If the response message indicates successful processing, the remediation operation is deemed valid, and "remediation successful" is taken as the final remediation result. If the response message indicates processing failure, "remediation failed" is taken as the final remediation result. This ensures the atomicity and accuracy of the remediation operation. After the disaster recovery system explicitly confirms the successful execution of the transaction, the data can be marked as recovered, thereby guaranteeing the consistency and reliability of accounting data.
[0055] Optionally, in the disaster recovery and reconciliation method provided in this application embodiment, based on the first transaction message, detecting whether there is data loss during the data replication process and obtaining a detection result includes: reconciling the production database and disaster recovery data based on the first transaction message to obtain a reconciliation result; determining whether the data in the production database and the disaster recovery database are consistent based on the reconciliation result to obtain a judgment result; if the judgment result indicates that the data in the production database and the disaster recovery database are inconsistent, determining that the detection result indicates that there is data loss during the data replication process; if the judgment result indicates that the data in the production database and the disaster recovery database are consistent, determining that the detection result indicates that there is no data loss during the data replication process.
[0056] In this embodiment, a "reconciliation" mechanism can be used to accurately detect whether data loss has occurred during the data replication process. For example, firstly, accounting elements (such as user ID, transaction amount, timestamp, etc.) can be extracted from the first transaction message and used as the reconciliation benchmark. Subsequently, after the disaster recovery system takes over, the accounting status corresponding to the transaction can be queried from both the production database (or its mirror / log source) and the disaster recovery database. Then, the data from these two databases can be compared. If it is found that the transaction record in the production database has been processed (e.g., the balance has been deducted), while the record in the disaster recovery database is still in its old state or does not exist, then "data inconsistency" is determined, and the detection result is determined to be "data loss exists".
[0057] The data loss occurred because transactions generated at the moment of the disaster failed to be synchronized to the disaster recovery database in a timely manner via storage replication technology. Conversely, if the data states in both locations are completely identical, the data is considered "consistent," confirming that the detection result is "no data loss," indicating that the synchronization mechanism is functioning normally and no additional reconciliation operation is required. By using a two-way reconciliation method based on specific message content, fine-grained and high-precision data loss detection is achieved, providing a reliable basis for whether to perform automated reconciliation subsequently.
[0058] Optionally, in the disaster recovery and reimbursement method provided in this application embodiment, before the production system fails, the method further includes: when a transaction request message is sent from the transaction channel to the production system, copying the transaction request message to obtain a copied transaction request message, and caching the copied transaction request message in the interception server; processing the transaction request message sent from the transaction channel using the production system to obtain a processing result, storing the processing result in the production database, and copying the processing result in the production database to the disaster recovery database.
[0059] First, when a transaction request is initiated from the transaction channel to the production system, the request message can be captured in real time by the DSF (Distributed Service Framework) interceptor deployed on the production system side, a copy can be generated and sent to the interception server for caching, ensuring that even if the production system crashes, the transaction request is still completely preserved in the interception server as the data source for subsequent reconciliation.
[0060] Secondly, after receiving a transaction request message, the production system can process the original transaction request normally, execute the corresponding business logic (such as calling the core interface to update the account balance), and store the processing results in the production database. At the same time, through the high availability, data protection, and disaster recovery solutions or storage-level replication technology built into the database enterprise edition, the changed data in the production database can be synchronously replicated to the disaster recovery database.
[0061] In this embodiment, the production system can ensure business continuity; on the other hand, the intercept server caches transaction messages, and the disaster recovery database maintains data synchronization. When a disaster occurs, if there is a delay in the synchronization of the disaster recovery database, resulting in data loss, the cached messages in the intercept server can be replayed to compensate for the data loss caused by the synchronization mechanism in the disaster recovery state, thereby ensuring the eventual consistency of accounting data.
[0062] Optionally, in the disaster recovery and reimbursement method provided in this application embodiment, caching the copied transaction request message to the interception server includes: adding the copied transaction request message to the message queue; reading the copied transaction request message from the message queue and caching the copied transaction request message to the interception server.
[0063] In this embodiment, after capturing a copy of the transaction request message, the interceptor can send it as a message to the message queue of the distributed messaging system. By utilizing the high throughput and buffering capacity of the message queue, the pressure of peak production transactions and disaster recovery data caching can be effectively isolated, thus avoiding blocking the main transaction process.
[0064] Afterwards, the interception server can continuously read messages from the message queue through the consumer and cache them. The "producer-consumer" mechanism of the message queue ensures that even in high-concurrency scenarios, transaction messages can be received and stored in an orderly and complete manner. This provides a solid data foundation for the rapid and accurate replay of transaction messages in the event of a subsequent disaster, ensuring the reliability and real-time nature of the reimbursement process.
[0065] Optionally, in the disaster recovery and reimbursement method provided in this application embodiment, a probe thread is deployed in the interception server. Before obtaining the transaction request message in the interception server and obtaining the first transaction message, the method further includes: querying the status identifier of the disaster recovery switch at a preset frequency through the probe thread, wherein the disaster recovery switch is used to indicate whether to start the disaster recovery system to take over the production system to process financial transactions; if the status identifier is in the started state, it is determined that there is a fault in the production system.
[0066] In this embodiment, a probe thread can be deployed within the interception server to poll the status flag of the "disaster recovery switch" at a preset frequency. The disaster recovery switch can refer to a system-level control signal used to indicate whether the disaster recovery environment has taken over the transaction processing tasks of the production system.
[0067] When the probing thread detects that the status flag has changed to "Started," it can determine that the production system has experienced a serious failure or has proactively switched to disaster recovery mode. At this point, the interception server confirms the abnormal scenario and can then read the intercepted transaction request message from the cache as the "first transaction message." This ensures that the message replay process is only initiated after the production system failure is confirmed and the disaster recovery system is online, thereby accurately identifying the failure window and avoiding the accidental triggering of the remediation process.
[0068] Optionally, in the disaster recovery and reconciliation method provided in this application embodiment, after reconciling the disaster recovery database based on the first transaction message, it further includes: locking the target financial data in the disaster recovery database, wherein the target financial data includes: transaction data that has been reconciled; obtaining the reconciliation records of the disaster recovery database and adding the reconciliation records to the target report; verifying the reconciliation records based on the target report, and unlocking the target financial data if the reconciliation records pass the verification.
[0069] In this embodiment, target financial data (such as account balances) that have been reconciled in the disaster recovery database can be "locked," meaning their subsequent modification permissions are temporarily frozen to prevent new data discrepancies from arising during data verification due to new transactions, ensuring that verification is based on a static snapshot. Secondly, detailed reconciliation records can be generated and summarized in a target report. This report can serve as an audit basis, recording key elements such as the reconciliation time, amount, and transaction details. Then, the completeness and logical consistency of the reconciliation records can be verified based on the target report (such as amount balance and transaction number uniqueness). If the verification passes, the reconciliation data is confirmed to be accurate and conflict-free, and the target financial data can be "unlocked" to restore its normal transaction status. If the verification fails, manual intervention or re-execution of the reconciliation process can be performed, effectively avoiding data conflicts and duplicate entries, and ensuring the accuracy of financial data in the disaster recovery environment.
[0070] An optional disaster recovery and reimbursement system can be used to execute the disaster recovery and reimbursement method provided in the embodiments of the present invention. Figure 3 This is a schematic diagram of a disaster recovery and reimbursement system provided according to an embodiment of this application, such as... Figure 3 As shown, it includes: a main production zone and a disaster recovery zone. The main production zone may include: an APP container, an interceptor, a traffic interception server, and a production database. The disaster recovery zone may include: an automated reimbursement platform and a disaster recovery database.
[0071] Figure 4 This is a schematic diagram of the interceptor provided according to an embodiment of this application, such as... Figure 4As shown, the process includes: the transaction channel sending a request message (containing channel transaction data); an interceptor copying the request message and caching it to a interception server for storage; simultaneously, the interceptor can process the request message online and store the processing results in a database. The technique for copying the request message and storing it on the interception server can be achieved through the production and consumption mechanism of a distributed messaging system. A probe thread is deployed on the interception server. When the disaster recovery switch is detected to be turned on and the disaster recovery environment is activated for emergency response, the thread begins replaying the cached request message until a successful response is received.
[0072] The following example illustrates this embodiment: For instance, when a customer makes a purchase, if the channel transaction is a QR code payment transaction, the core system's payment deduction interface needs to be called to deduct the amount from the customer's account. At this time, a request message is sent to call the core system's payment deduction interface (online program) to execute an update SQL (Structured Query Language) statement, deducting the amount from the customer's account in the database table. During this process, the interceptor can copy the channel transaction request message and cache it on the interception server. When a production system disaster occurs, and the database synchronization mechanism fails to synchronize the customer's account deduction data to the disaster recovery database in a timely manner (for example, if the disaster occurs at 10:30 AM on September 15th, and after the production alarm is triggered, support personnel quickly activate the disaster recovery system to take over at 10:35 AM, allowing the customer to complete transactions normally through the disaster recovery transaction system; however, the existing replication from the production system's DB to the disaster recovery system's DB may only have replicated data to the database state at 10:29 AM, and this deduction request was executed precisely at 10:29:22), after the disaster recovery switch is turned on, the interception server can replay the request message in the disaster recovery environment's database. After successful message replay, the data table state in the disaster recovery database can be consistent with the data table state in the production environment.
[0073] In this embodiment, for financial systems deployed in off-site disaster recovery, the loss of accounting data can be reduced in the event of a disaster, and even the loss of accounting data during system switchover can be fully recovered.
[0074] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0075] Example 2
[0076] This application also provides a disaster recovery and reconciliation device. It should be noted that this device can be used to execute the disaster recovery and reconciliation method provided in this application. The following describes the disaster recovery and reconciliation device provided in this application.
[0077] According to embodiments of this application, an apparatus for implementing the above-described disaster recovery and reimbursement method is also provided, such as... Figure 5 As shown, the device includes: an acquisition unit 51, a detection unit 52, and a reimbursement unit 53.
[0078] The acquisition unit 51 is used to acquire transaction request messages in the interception server and obtain the first transaction message in the event of a failure in the production system. The production system includes a system for financial institutions to process financial transactions, and the interception server is used to cache transaction request messages sent to the production system from the transaction channel.
[0079] The detection unit 52 is used to detect whether there is data loss during the data replication process based on the first transaction message and obtain the detection result. The data replication process includes: the process of synchronizing data from the production database to the disaster recovery database. The production database includes: the database associated with the production system. The disaster recovery database includes: the database associated with the disaster recovery system. The disaster recovery system includes: a system used to take over the processing of financial transactions from the production system in the event of a failure in the production system.
[0080] The replenishment unit 53 is used to replenish the disaster recovery database based on the first transaction message when the detection result indicates that there is data loss during the data replication process, and to obtain the replenishment result.
[0081] In the disaster recovery and reconciliation method provided in this embodiment of the invention, the acquisition unit 51 can acquire transaction request messages from the interception server to obtain a first transaction message when the production system fails. The production system includes a system for financial institutions to process financial transactions, and the interception server is used to cache transaction request messages sent to the production system from transaction channels. The detection unit 52 detects whether data loss occurs during the data replication process based on the first transaction message, obtaining a detection result. The data replication process includes synchronizing data from the production database to the disaster recovery database. The production database includes a database associated with the production system, and the disaster recovery database includes a database associated with the disaster recovery system. The disaster recovery system includes a system used to take over the production system's processing of financial transactions when the production system fails. When the detection result indicates data loss during the data replication process, the reconciliation unit 53 performs reconciliation processing on the disaster recovery database based on the first transaction message, obtaining a reconciliation result. This solves the technical problem of high financial data loss rate in remote disaster recovery switching scenarios using high-availability architectures in related technologies. In this embodiment, by intercepting the server's cached transaction request messages and performing replenishment processing on the disaster recovery database based on the cached transaction request messages, the situation in related technologies where some data has been stored in the production database but has not yet been synchronized to the disaster recovery database in a high-availability architecture disaster recovery switchover scenario is avoided, resulting in some data missing in the disaster recovery database. This achieves the technical effect of reducing the loss rate of financial data during the disaster recovery switchover process.
[0082] Optionally, in the disaster recovery and reconciliation device provided in this application embodiment, the reconciliation unit includes: a processing subunit, used to replay the first transaction message and receive a response message returned by the disaster recovery system; and a first determining subunit, used to determine the successful reconciliation as the reconciliation result after the response message indicates that the disaster recovery system has successfully processed the first transaction message.
[0083] Optionally, in the disaster recovery and reconciliation device provided in this application embodiment, the detection unit includes: a reconciliation subunit, used to reconcile the production database and disaster recovery data based on a first transaction message to obtain a reconciliation result; a judgment subunit, used to determine whether the data in the production database and the disaster recovery database are consistent based on the reconciliation result to obtain a judgment result; a second determination subunit, used to determine that the detection result indicates that there is data loss in the data replication process when the judgment result indicates that the data in the production database and the disaster recovery database are inconsistent; and a third determination subunit, used to determine that the detection result indicates that there is no data loss in the data replication process when the judgment result indicates that the data in the production database and the disaster recovery database are consistent.
[0084] Optionally, in the disaster recovery and reimbursement device provided in this application embodiment, the disaster recovery and reimbursement device further includes: a first processing unit, used to copy the transaction request message when the transaction channel sends a transaction request message to the production system before the production system fails, to obtain a copied transaction request message, and to cache the copied transaction request message in the interception server; a second processing unit, used to process the transaction request message sent by the transaction channel using the production system, to obtain a processing result, to store the processing result in the production database, and to copy the processing result in the production database to the disaster recovery database.
[0085] Optionally, in the disaster recovery and reimbursement device provided in this application embodiment, the first processing unit includes: an adding subunit, used to add the copied transaction request message to the message queue; and a caching subunit, used to read the copied transaction request message from the message queue and cache the copied transaction request message to the interception server.
[0086] Optionally, in the disaster recovery and reimbursement device provided in this application embodiment, a probe thread is deployed in the interception server. The disaster recovery and reimbursement device further includes: a query unit, used to query the status identifier of the disaster recovery switch at a preset frequency through the probe thread before obtaining the transaction request message in the interception server and obtaining the first transaction message, wherein the disaster recovery switch is used to indicate whether to start the disaster recovery system to take over the production system to process financial transactions; and a determination unit, used to determine that the production system has a fault when the status identifier is in the started state.
[0087] Optionally, in the disaster recovery and reconciliation device provided in this application embodiment, the disaster recovery and reconciliation device further includes: a locking unit, used to lock the target financial data in the disaster recovery database after reconciliation processing is performed on the disaster recovery database based on the first transaction message, wherein the target financial data includes: transaction data that has been reconciled; an adding unit, used to obtain the reconciliation records that have been reconciled on the disaster recovery database and add the reconciliation records to the target report; and an unlocking unit, used to verify the reconciliation records based on the target report, and to unlock the target financial data if the verification of the reconciliation records passes.
[0088] It should be noted that the acquisition unit 51, detection unit 52, and reimbursement unit 53 mentioned above correspond to steps S201 to S203 in Embodiment 1. Each unit and its corresponding step implement the same instance and application scenario, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.
[0089] Example 3
[0090] Embodiments of this application may provide an electronic device. Figure 6 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 6 As shown, the electronic device may include: one or more ( Figure 6 (Only one is shown) Processor 602, memory 604, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0091] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0092] The processor can invoke information and applications stored in memory via a transmission device to execute the following steps: In the event of a failure in the production system, obtain transaction request messages from the interception server to obtain a first transaction message, wherein the production system includes a system for financial institutions to process financial transactions, and the interception server is used to cache transaction request messages sent to the production system from the transaction channel; based on the first transaction message, detect whether there is data loss during the data replication process and obtain a detection result, wherein the data replication process includes a process of synchronizing data from the production database to the disaster recovery database, the production database includes a database associated with the production system, the disaster recovery database includes a database associated with the disaster recovery system, and the disaster recovery system includes a system used to take over the processing of financial transactions from the production system in the event of a failure in the production system; if the detection result indicates that there is data loss during the data replication process, perform a reconciliation process on the disaster recovery database based on the first transaction message.
[0093] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: perform a replenishment process on the disaster recovery database based on the first transaction message to obtain a replenishment result, including: replaying the first transaction message and receiving a response message returned by the disaster recovery system; after the response message indicates that the disaster recovery system has successfully processed the first transaction message, the replenishment success is determined as the replenishment result.
[0094] The processor can also invoke information and applications stored in the memory via the transmission device to perform the following steps: based on the first transaction message, detect whether there is data loss during the data replication process and obtain a detection result, including: reconciling the production database and disaster recovery data based on the first transaction message and obtaining a reconciliation result; based on the reconciliation result, determining whether the data in the production database and the disaster recovery database are consistent and obtaining a judgment result; if the judgment result indicates that the data in the production database and the disaster recovery database are inconsistent, determining that the detection result indicates that there is data loss during the data replication process; if the judgment result indicates that the data in the production database and the disaster recovery database are consistent, determining that the detection result indicates that there is no data loss during the data replication process.
[0095] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: before the production system fails, it also includes: when the transaction channel sends a transaction request message to the production system, copying the transaction request message to obtain a copied transaction request message, and caching the copied transaction request message in the interception server; using the production system to process the transaction request message sent by the transaction channel to obtain the processing result, storing the processing result in the production database, and copying the processing result in the production database to the disaster recovery database.
[0096] The processor can also invoke information and applications stored in the memory via the transmission device to perform the following steps: caching the copied transaction request message to the interception server, including: adding the copied transaction request message to the message queue; reading the copied transaction request message from the message queue and caching the copied transaction request message to the interception server.
[0097] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: The interception server is equipped with a probe thread. Before obtaining the transaction request message in the interception server and the first transaction message, the process also includes: querying the status identifier of the disaster recovery switch at a preset frequency through the probe thread. The disaster recovery switch is used to indicate whether to start the disaster recovery system to take over the production system to process financial transactions. If the status identifier is in the started state, it is determined that there is a fault in the production system.
[0098] The processor can also invoke information and applications stored in the memory via the transmission device to perform the following steps: after performing the reconciliation processing on the disaster recovery database based on the first transaction message, it further includes: performing the locking processing on the target financial data in the disaster recovery database, wherein the target financial data includes: transaction data that has been reconciled; obtaining the reconciliation records that have been reconciled on the disaster recovery database and adding the reconciliation records to the target report; verifying the reconciliation records based on the target report, and unlocking the target financial data if the verification of the reconciliation records passes.
[0099] By using the embodiments of this application, transaction request messages are cached on the server and replenished in the disaster recovery database based on the cached transaction request messages. This avoids the situation in related technologies where some data has been stored in the production database but has not been synchronized to the disaster recovery database in a high-availability disaster recovery switchover scenario, resulting in some data missing in the disaster recovery database. This achieves the technical effect of reducing the loss rate of financial data during the disaster recovery switchover process.
[0100] Those skilled in the art will understand that Figure 6 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 6 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 6 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 6 The different configurations shown.
[0101] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0102] Example 4
[0103] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the disaster recovery and reimbursement method provided in Embodiment 1.
[0104] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0105] This application also provides a computer program product that, when executed on a data processing device, is suitable for performing disaster recovery and reimbursement method steps.
[0106] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0107] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0108] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0109] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0110] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0111] If the integrated unit is implemented as 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 this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0112] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for disaster recovery catch-up, the method comprising: include: In the event of a failure in the production system, the transaction request message in the interception server is obtained to obtain the first transaction message. The production system includes a system for financial institutions to process financial transactions, and the interception server is used to cache transaction request messages sent to the production system from the transaction channel. Based on the first transaction message, the system detects whether there is data loss during the data replication process and obtains the detection result. The data replication process includes: the process of synchronizing data from the production database to the disaster recovery database. The production database includes: the database associated with the production system. The disaster recovery database includes: the database associated with the disaster recovery system. The disaster recovery system includes: a system used to take over the processing of the financial transactions from the production system in the event of a failure in the production system. If the detection result indicates that there is data loss during the data replication process, the disaster recovery database is replenished based on the first transaction message to obtain the replenishment result.
2. The method of claim 1, wherein, Based on the first transaction message, the disaster recovery database is replenished to obtain the replenishment result, including: The first transaction message is replayed, and a response message is received from the disaster recovery system. After the response message indicates that the disaster recovery system has successfully processed the first transaction message, the successful reimbursement is determined as the reimbursement result.
3. The method of claim 1, wherein, Based on the first transaction message, the system detects whether data loss occurs during the data replication process, and obtains the detection results, including: Based on the first transaction message, the production database and the disaster recovery data are reconciled to obtain the reconciliation result; Based on the reconciliation results, it is determined whether the data in the production database and the disaster recovery database are consistent, and a determination result is obtained; If the judgment result indicates that the data in the production database and the disaster recovery database are inconsistent, it is determined that the detection result indicates that data loss occurred during the data replication process; If the judgment result indicates that the data in the production database and the disaster recovery database are consistent, then the detection result indicates that there is no data loss during the data replication process.
4. The method of claim 1, wherein, Prior to the production system malfunctioning, the following are also included: When the transaction channel sends a transaction request message to the production system, the transaction request message is copied to obtain a copied transaction request message, and the copied transaction request message is cached in the interception server. The production system processes the transaction request messages sent by the transaction channel to obtain the processing results, stores the processing results in the production database, and copies the processing results in the production database to the disaster recovery database.
5. The method of claim 4, wherein, Cache the copied transaction request message to the interception server, including: Add the copied transaction request message to the message queue; Read the replicated transaction request message from the message queue and cache the replicated transaction request message in the interception server.
6. The disaster recovery and reimbursement method according to claim 1, characterized in that, The interception server is equipped with a probe thread, which, before obtaining the transaction request message from the interception server and receiving the first transaction message, also includes: The detection thread queries the status identifier of the disaster recovery switch at a preset frequency, wherein the disaster recovery switch is used to indicate whether to start the disaster recovery system to take over the production system to process the financial transactions; If the status indicator is "started", it is determined that the production system has a fault.
7. The disaster recovery and reimbursement method according to claim 1, characterized in that, After performing the account replenishment process on the disaster recovery database based on the first transaction message, the method further includes: performing account locking processing on the target financial data in the disaster recovery database, wherein the target financial data includes: transaction data that has already undergone account replenishment processing; Obtain the reconciliation records for the disaster recovery database and add the reconciliation records to the target report; The supplementary accounting record is verified based on the target report. If the supplementary accounting record passes the verification, the target financial data is unlocked.
8. A disaster recovery and reimbursement device, characterized in that, include: The acquisition unit is used to acquire transaction request messages from the interception server and obtain a first transaction message in the event of a failure in the production system. The production system includes a system for financial institutions to process financial transactions, and the interception server is used to cache transaction request messages sent to the production system from the transaction channel. The detection unit is used to detect whether there is data loss during the data replication process based on the first transaction message and obtain the detection result. The data replication process includes: the process of synchronizing data from the production database to the disaster recovery database. The production database includes: the database associated with the production system. The disaster recovery database includes: the database associated with the disaster recovery system. The disaster recovery system includes: a system used to take over the processing of the financial transaction from the production system in the event of a failure in the production system. The reconciliation unit is used to perform reconciliation processing on the disaster recovery database based on the first transaction message when the detection result indicates that there is data loss in the data replication process, and obtain the reconciliation result.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the disaster recovery and reimbursement method according to any one of claims 1 to 7.
10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the disaster recovery and reimbursement method according to any one of claims 1 to 7.
