CN115904814A - Disaster recovery and account compensation method, system and device and computer equipment - Google Patents

Disaster recovery and account compensation method, system and device and computer equipment Download PDF

Info

Publication number
CN115904814A
CN115904814A CN202211693238.8A CN202211693238A CN115904814A CN 115904814 A CN115904814 A CN 115904814A CN 202211693238 A CN202211693238 A CN 202211693238A CN 115904814 A CN115904814 A CN 115904814A
Authority
CN
China
Prior art keywords
transaction
information
target
result
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211693238.8A
Other languages
Chinese (zh)
Inventor
袁永云
黄振飞
屈有政
张宏根
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202211693238.8A priority Critical patent/CN115904814A/en
Publication of CN115904814A publication Critical patent/CN115904814A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A10/00TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE at coastal zones; at river basins
    • Y02A10/40Controlling or monitoring, e.g. of flood or hurricane; Forecasting, e.g. risk assessment or mapping

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a disaster recovery and account compensation method, system and device and computer equipment, and relates to the technical field of big data. The method comprises the steps of obtaining transaction request information and transaction result information of each transaction, matching candidate transaction request information with a target transaction type in a plurality of transaction request information and candidate transaction result information with a target result type in a plurality of transaction result information, obtaining transaction key information according to the candidate transaction request information which is successfully matched, instructing a local data storage system to establish a target transaction information table and sending the target transaction information table to a remote data storage data system, and enabling a remote server to obtain the target transaction information table in the remote data storage system to perform automatic reimbursement when a local database is abnormal. The method determines the transaction key information by identifying and matching the types of the transaction request information and the transaction result information, so that classified reimbursement is carried out according to the transaction key information when automatic reimbursement is carried out, and the reimbursement process is simplified.

Description

Disaster recovery and account compensation method, system and device and computer equipment
Technical Field
The present application relates to the field of big data technologies, and in particular, to a disaster recovery and account replenishment method, system, apparatus, and computer device.
Background
At present, a disaster recovery and reimbursement system generally adopts a DG (DataGuard) + TC (TrueCopy) based system-level reimbursement and database fragmentation dual-activity mode, can meet the high availability requirement of dual-activity in the same city, and generally adopts an asynchronous disk replication technology in disaster recovery in different places.
Because of the long distance, asynchronous disk replication may have a time delay, which may result in a small amount of traffic transaction data loss. For accounting information relating to the core bank, the lost transaction data needs to be recovered.
In the existing disaster recovery and backup system, transaction information is directly acquired and stored, and when the disaster recovery and backup system in different places are started, all stored transaction information is directly used for performing the backup, so that the problem of low backup efficiency exists.
Disclosure of Invention
Therefore, it is necessary to directly acquire transaction information for storage in the prior art, and when the disaster recovery in different places is started, all the stored transaction information is directly used for performing the account compensation, so that the problem of low account compensation efficiency exists, and a disaster recovery and account compensation method, a disaster recovery and account compensation system, a disaster recovery and account compensation device and computer equipment are provided.
In a first aspect, the present application provides a disaster recovery and account compensation method, where the method includes:
acquiring transaction request information and transaction result information corresponding to each transaction;
identifying candidate transaction request information of which the transaction type is a target transaction type from the transaction request information; candidate transaction result information with a result type as a target result type is identified in the transaction result information;
matching the candidate transaction request information with the candidate transaction result information, determining the candidate transaction request information which is successfully matched as target transaction request information, and determining transaction key information according to the target transaction request information;
sending a storage instruction containing the transaction key information to a local data storage system; the storage instruction is used for indicating the local data storage system to establish a target transaction information table corresponding to the transaction key information and sending the target transaction information table to the remote data storage system, and the target transaction information table is used for the remote server to obtain the target transaction information table in the remote data storage system when the local database is abnormal so as to perform automatic reconciliation.
In one embodiment, the identifying, among the transaction request information, candidate transaction request information whose transaction type is a target transaction type includes:
and determining a transaction type corresponding to the transaction request information according to service name information contained in the transaction request information aiming at each transaction request information, and determining the transaction request information as candidate transaction request information when the transaction type is the target transaction type.
In one embodiment, the identifying, among the plurality of transaction result information, candidate transaction result information with a result type being a target result type includes:
and determining a result type corresponding to the transaction result information according to the transaction result identification contained in the transaction result information aiming at each transaction result information, and determining the transaction result information as candidate transaction result information when the result type is the target result type.
In one embodiment, the step of matching the candidate transaction request information with the candidate transaction result information and determining the successfully matched candidate transaction request information as the target transaction request information includes:
and matching the first transaction identifier of the candidate transaction request information with the second transaction identifier of the candidate transaction result information, and determining the candidate transaction request information when the first transaction identifier is consistent with the second transaction identifier as the target transaction request information.
In a second aspect, the present application provides a disaster recovery and account-restoring method, including:
responding to a starting instruction aiming at local database exception, and acquiring a target transaction information table in a remote data storage system; the target transaction information table is established by the local data storage system according to a storage instruction which is sent by the interceptor and contains transaction key information, and is sent to the allopatric data storage system; the transaction key information is obtained by the interceptor matching candidate transaction request information of which the transaction type is a target transaction type in the plurality of identified transaction request information with candidate transaction result information of which the result type is a target result type in the plurality of transaction result information, and according to the candidate transaction request information which is successfully matched;
determining transaction information to be reconciled in a target transaction information table according to the transaction information of the remote database and the target transaction information table of the remote data storage system;
and performing the reimbursement processing based on the transaction information to be reimbursed.
In one embodiment, the determining the transaction information to be reconciled in the target transaction information table according to the transaction information of the remote database and the target transaction information table of the remote data storage system includes:
and matching the transaction information of the remote database with a target transaction information table of the local data storage system, and determining the transaction key information which is failed to be matched in the target transaction information table as the transaction information to be reconciled.
In one embodiment, the transaction key information includes a preset transaction identifier, and performing reimbursement processing based on the to-be-reimbursed transaction information includes:
if a preset transaction identifier in the to-be-reconciled transaction information is a first identifier, performing reconciled transaction processing according to the to-be-reconciled transaction information, wherein the first identifier is used for representing that the to-be-reconciled transaction is an automatic reconciled transaction;
the method further comprises the following steps:
and if the preset transaction identification in the to-be-reconciled account transaction information is a second identification, performing account locking processing on the to-be-reconciled account transaction information, wherein the second identification is used for representing that the to-be-reconciled account transaction is an artificial reconciled account transaction.
In a third aspect, the present application provides a disaster recovery and reconciliation system, where the system includes:
the interceptor is used for acquiring transaction request information and transaction result information corresponding to each transaction; the interceptor is further used for identifying candidate transaction request information with a transaction type being a target transaction type in the transaction request information, and identifying candidate transaction result information with a result type being a target result type in the transaction result information; the interceptor is further used for matching the candidate transaction request information with the candidate transaction result information, determining the candidate transaction request information successfully matched as target transaction request information, and determining transaction key information according to the target transaction request information; the interceptor is also used for sending a storage instruction containing the transaction key information to a local data storage system; the storage instruction is used for instructing the local data storage system to establish a target transaction information table corresponding to the transaction key information and sending the target transaction information table to a remote data storage system;
the remote server is used for responding to a starting instruction aiming at the local database exception and acquiring a target transaction information table in the remote data storage system; determining transaction information to be reconciled in a target transaction information table according to the transaction information of the remote database and the target transaction information table of the remote data storage system; and performing the reimbursement processing based on the transaction information to be reimbursed.
In one embodiment, the system further comprises:
and the monitor is used for sending the starting instruction to the remote server when the state of the local database is monitored to be abnormal.
In a fourth aspect, the present application provides a disaster recovery and account-repairing device, including:
the acquisition module is used for acquiring transaction request information and transaction result information corresponding to each transaction;
the determining module is used for identifying candidate transaction request information of which the transaction type is a target transaction type in the transaction request information; identifying candidate transaction result information with a result type as a target result type in the plurality of transaction result information;
the matching module is used for matching the candidate transaction request information with the candidate transaction result information, determining the candidate transaction request information which is successfully matched as target transaction request information, and determining transaction key information according to the target transaction request information;
the sending module is used for sending a storage instruction containing the transaction key information to a local data storage system; the storage instruction is used for indicating the local data storage system to establish a target transaction information table corresponding to the transaction key information and sending the target transaction information table to a remote data storage system, and the target transaction information table is used for enabling the remote server to acquire the target transaction information table in the remote data storage system when a local database is abnormal so as to perform automatic reconciliation.
In one embodiment, the determining module is specifically configured to:
and determining a transaction type corresponding to the transaction request information according to service name information contained in the transaction request information aiming at each transaction request information, and determining the transaction request information as candidate transaction request information when the transaction type is the target transaction type.
In one embodiment, the determining module is further specifically configured to:
and determining a result type corresponding to the transaction result information according to the transaction result identification contained in the transaction result information aiming at each transaction result information, and determining the transaction result information as candidate transaction result information when the result type is the target result type.
In one embodiment, the candidate transaction request information includes a first transaction identifier, the candidate transaction result information includes a second transaction identifier, and the matching module is specifically configured to:
and matching the first transaction identifier of the candidate transaction request information with the second transaction identifier of the candidate transaction result information, and determining the candidate transaction request information when the first transaction identifier is consistent with the second transaction identifier as the target transaction request information.
In a fifth aspect, the present application provides a disaster recovery and account-repairing device, including:
the response module is used for responding to a starting instruction aiming at local database abnormity and acquiring a target transaction information table in the remote data storage system, wherein the target transaction information table is established by the local data storage system according to a storage instruction which is sent by the interceptor and contains transaction key information and is sent to the remote data storage system; the transaction key information is obtained by matching candidate transaction request information of which the transaction type is a target transaction type in the plurality of identified transaction request information with candidate transaction result information of which the result type is a target result type in the plurality of transaction result information by the interceptor and according to the candidate transaction request information which is successfully matched;
the to-be-compensated transaction information determining module is used for determining to-be-compensated transaction information in a target transaction information table according to the transaction information of the remote database and the target transaction information table of the remote data storage system;
and the account-adding module is used for carrying out account-adding processing based on the transaction information to be added.
In one embodiment, the to-be-reconciled information determining module is specifically configured to:
and matching the transaction information of the remote database with a target transaction information table of the local data storage system, and determining the transaction key information which fails to be matched in the target transaction information table as the transaction information to be reconciled.
In one embodiment, the transaction key information includes a preset transaction identifier, and the reconnaissance module is specifically configured to:
if a preset transaction identifier in the to-be-reconciled transaction information is a first identifier, performing reconciled transaction processing according to the to-be-reconciled transaction information, wherein the first identifier is used for representing that the to-be-reconciled transaction is an automatic reconciled transaction;
and if the preset transaction identification in the to-be-reconciled account transaction information is a second identification, performing account locking processing on the to-be-reconciled account transaction information, wherein the second identification is used for representing that the to-be-reconciled account transaction is an artificial reconciled account transaction.
In a sixth aspect, the present application further provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the first or second aspect when executing the computer program.
In a seventh aspect, the present application further provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the first or second aspect described above.
In an eighth aspect, the present application further provides a computer program product. The computer program product comprising a computer program that when executed by a processor performs the steps of the first or second aspect.
The application relates to a disaster recovery and account compensation method, system, device and computer equipment. According to the method, the transaction request information and the transaction result information corresponding to each transaction are obtained, the candidate transaction request information with the transaction type as the target transaction type in the transaction request information is matched with the candidate transaction result information with the result type as the target result type in the transaction result information, the transaction key information is obtained according to the candidate transaction request information which is successfully matched, so that the local data storage system is instructed to establish a target transaction information table, and the target transaction information table is sent to the remote data storage data system, so that when a local database is abnormal, the remote server can obtain the target transaction information table in the remote data storage system, and automatic account compensation is carried out. According to the method, the transaction key information is determined by identifying and matching the types of the transaction request information and the transaction result information, so that each transaction key information in the target transaction information table contains the type information of each transaction, and therefore when automatic reconnaissance is carried out, classified reconnaissance is carried out directly according to the type information of the transaction key information, and the reconnaissance process is simplified.
Drawings
Fig. 1 is a schematic structural diagram of a disaster recovery and reconciliation system in an embodiment;
fig. 2 is a schematic flow chart of a disaster recovery and reimbursement method in one embodiment;
fig. 3 is a schematic flow chart of a disaster recovery and reimbursement method in another embodiment;
FIG. 4 is a block diagram of a disaster recovery and reconciliation apparatus in an embodiment;
fig. 5 is a block diagram of a disaster recovery and reconciliation apparatus in another embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The disaster recovery and account-complementing method provided by the application can be applied to the system shown in fig. 1.
The disaster recovery and reimbursement system comprises a local server, an interceptor, a local data storage system, a remote server and a remote data storage system. The interceptor is arranged in a general processing flow of the local server, the local server acquires corresponding service request information through the Rpc service and the Http service entrance, serializes the information, determines the serialized request information (namely, the transaction request information in the application), and directly acquires the serialized request information determined by the local server without performing service request information serialization processing. In addition, the interceptor obtains the transaction result information corresponding to each transaction from the local database. After processing the obtained transaction request information and the transaction result information, the interceptor asynchronously sends the determined transaction key information to a local data storage system (the local data storage system can be kafka), and then quickly copies the transaction key information to a different-place data storage system (the different-place data storage system can be kafka). When the local database is abnormal, the remote server can quickly carry out the account-supplementing processing according to the remote storage data system.
Based on this, as shown in fig. 2, the present application provides a disaster recovery and reimbursement method, which can be applied to the interceptor in the disaster recovery and reimbursement method, and the method includes the following steps:
step S201, transaction request information and transaction result information corresponding to each transaction are acquired.
The interceptor may obtain the transaction request information corresponding to each transaction at the transaction request port of the local server. The interceptor can also obtain the transaction result information corresponding to each transaction at the transaction result port of the local server.
Step S202, in a plurality of transaction request information, identifying candidate transaction request information with a transaction type as a target transaction type; and identifying candidate transaction result information with a result type as a target result type in the plurality of transaction result information.
And the interceptor can determine the transaction type corresponding to each transaction through the obtained transaction request information. The transaction type can be a non-reimbursement type, an automatic reimbursement type, a manual reimbursement type and the like. And the interceptor determines the candidate transaction request information with the transaction type as the target type according to the transaction type corresponding to each transaction.
Further, the interceptor can also determine the transaction result type corresponding to each transaction through the transaction result information. The transaction result information may be a transaction success or a transaction failure. And the interceptor determines candidate transaction result information with the result type as the target result type according to the result type corresponding to each transaction.
Step S203, matching the candidate transaction request information with the candidate transaction result information, determining the candidate transaction request information which is successfully matched as target transaction request information, and determining transaction key information according to the target transaction request information.
The interceptor matches the candidate transaction request information with the candidate transaction result information, and determines that the matching is successful when the transaction result information of the transaction corresponding to the candidate transaction request information is the candidate transaction result information, so that the successfully matched transaction request information is used as the target transaction request information.
Further, the interceptor can extract the transaction key information according to the target transaction request information. The transaction key information can comprise transaction name, reimbursement type, channel event number, area identification, teller information, website information and large transaction serial number information. The transaction critical information may also include transaction request information.
And step S204, sending a storage instruction containing transaction key information to a local data storage system. And the storage instruction is used for indicating the local data storage system to establish a target transaction information table corresponding to the transaction key information and sending the target transaction information table to the remote data storage system, and the target transaction information table is used for the remote server to acquire the target transaction information table in the remote data storage system when the local database is abnormal so as to perform automatic account compensation.
The interceptor sends the acquired transaction key information to the local data storage system, sends a storage instruction to instruct the local data storage system to establish a target transaction information table, and then quickly copies the target transaction information table to the remote data storage system. When the local database is abnormal, the remote server acquires the transaction information of the remote database and matches the target transaction information table of the remote data storage system, so that automatic account compensation is performed according to the transaction key information in the target transaction information table.
Specifically, the local database in the local server and the remote database in the remote server use an asynchronous disk replication method, but the asynchronous disk replication has a time delay, and cannot rapidly replicate all transaction information in the local database into the remote database. The local data storage system can be kafka, the remote data storage system can be kafka, the interceptor sends the transaction key information to the local kafka after determining the transaction key information, the MirrorMaker technology is utilized to quickly copy the transaction key information in the target transaction information table to the remote kafka, and the local kafka sends the transaction key information to the remote kafka with high efficiency, so that the transaction key information can be copied and stored in real time, and the accuracy of automatic reconciliation is effectively improved.
In the disaster recovery and reimbursement method, the interceptor acquires the transaction request information and the transaction result information corresponding to each transaction, matches the candidate transaction request information with the target transaction type in the transaction request information and the candidate transaction result information with the target result type in the transaction result information, and obtains the transaction key information according to the candidate transaction request information which is successfully matched so as to instruct the local data storage system to establish the target transaction information table and send the target transaction information table to the remote data storage data system, so that when the local database is abnormal, the remote server can acquire the target transaction information table in the remote data storage system to automatically reimburse the transaction. The method identifies and matches the types of the transaction request information and the transaction result information to determine transaction key information, wherein the transaction key information comprises transaction type information. When the local database is abnormal and the remote database is started, the remote server can perform classified reimbursement according to the type information in the transaction key information in the remote data storage system, so that the reimbursement process is simplified, and the reimbursement efficiency is improved.
In one embodiment of the present application, the method further comprises:
and controlling the acquisition switch to be turned on so as to carry out the above operation, and obtaining the transaction request information and the transaction result information corresponding to each transaction in step S201.
Specifically, the interceptor needs to control the interception switch to be turned on, so that the interceptor can obtain the transaction request information and the transaction result information corresponding to each transaction through the local server. According to the method and the device, the opening state of the interceptor in the acquisition process is controlled, so that the interceptor can obtain the transaction request information and the transaction result information of each transaction in real time, the local data storage system and the remote data storage system can store the transaction key information in real time, and the accuracy of automatic reconciliation by the remote server is improved.
In an embodiment of the application, in step S202, the step of identifying, among the transaction request information, the candidate transaction request information whose transaction type is the target transaction type includes:
and determining the transaction type corresponding to the transaction request information according to the service name information contained in the transaction request information aiming at each transaction request information, and determining the transaction request information as candidate transaction request information when the transaction type is a target transaction type.
Specifically, the interceptor extracts service name information in the transaction request information and determines the transaction type according to the service name information. If the transaction request information is service name information as query information, the interceptor regards the transaction request information as transaction request information without the need of account compensation (i.e. non-candidate transaction request information).
Further, the interceptor takes the automatic reimbursement type and the manual reimbursement type as target transaction types, and when the transaction type corresponding to the transaction request information is the automatic reimbursement type or the manual reimbursement type, the transaction request information is candidate transaction request information.
In an embodiment of the application, in step S202, the candidate transaction result information with the result type identified as the target result type in the plurality of transaction result information includes:
and determining a result type corresponding to the transaction result information according to the transaction result identification contained in the transaction result information aiming at each transaction result information, and determining the transaction result information as candidate transaction result information when the result type is the target result type.
Specifically, the transaction result information includes a result identifier indicating success or failure of the transaction. And the interceptor identifies the result as the transaction result information corresponding to the successful transaction as candidate transaction result information.
In an embodiment of the present application, the step S203 of matching the candidate transaction request information with the candidate transaction result information, and determining the candidate transaction request information that is successfully matched as the target transaction request information includes:
and matching the first transaction identification of the candidate transaction request information with the second transaction identification of the candidate transaction result information, and determining the candidate transaction request information when the first transaction identification is consistent with the second transaction identification as target transaction request information.
Specifically, the candidate transaction request information includes a transaction name (i.e., a first identifier), and the candidate transaction result information includes a transaction name (i.e., a second identifier). And the interceptor matches a first identifier in the candidate transaction request information with a second identifier in the candidate transaction result information, and when the first identifier is consistent with the second identifier, the interceptor indicates that the transaction type of the transaction corresponding to the transaction name is a target transaction type and the transaction result type is a target result type. The interceptor takes the transaction request information corresponding to the transaction as target transaction request information, and determines the transaction key information corresponding to each target transaction request information according to the target transaction request information.
Based on the above, the transaction corresponding to the manual reimbursement type (or the automatic reimbursement type) and the successful transaction is the target transaction, and the local data storage system stores the transaction key information of each target transaction. When the remote server performs the account compensation, the account compensation can be performed directly according to the transaction key information. The interceptor judges and matches the transaction request information and the transaction result information, thereby greatly simplifying the remote server account-supplementing process and improving the remote server account-supplementing efficiency and accuracy.
Based on this, as shown in fig. 3, the present application provides a disaster recovery and accounting method, which can be applied to a remote manager in the disaster recovery and accounting system, and the method includes the following steps:
step S301, responding to a starting instruction aiming at the local database exception, and acquiring a target transaction information table in a remote data storage system; the target transaction information table is established by the local data storage system according to a storage instruction which is sent by the interceptor and contains transaction key information, and is sent to the remote data storage system; the transaction key information is obtained by matching candidate transaction request information with a target transaction type in the identified multiple transaction request information and candidate transaction result information with a target result type in the multiple transaction result information by the interceptor according to the candidate transaction request information which is successfully matched.
Specifically, when the local database is abnormal (i.e. disaster recovery occurs), the remote server needs to obtain the real-time transaction key information in the remote data storage system to perform data recovery of the remote database.
Step S302, transaction information to be reconciled is determined in the target transaction information table according to the transaction information of the remote database and the target transaction information table of the remote data storage system.
Specifically, the remote server matches the acquired target transaction information table with transaction information of the remote database, and further determines the stored transaction information and the transaction information which is not stored (namely, the transaction to be reimbursed).
And step S303, performing reconnaissance processing based on the transaction information to be reconnaissance.
Specifically, after the remote server determines the transaction information to be reconciled according to the matching information, the remote server can reconcile the transaction information directly according to the transaction key information of the transaction to be reconciled.
In an embodiment of the application, the step S302 of determining the transaction information to be reimbursed in the target transaction information table according to the transaction information of the remote database and the target transaction information table of the remote data storage system includes:
and matching the transaction information of the remote database with a target transaction information table of a local data storage system, and determining the transaction key information which is failed to be matched in the target transaction information table as the transaction information to be reconciled.
The transaction information comprises transaction names, and the target transaction information table comprises all transaction names and corresponding transaction key information. The remote server matches the transaction name in the remote database with the transaction name in the target transaction information table, and when the transaction name in the target transaction information table does not exist in the remote database, the matching is failed, and the transaction corresponding to the transaction name is not stored in the remote database. At this time, the transaction key information corresponding to the transaction name which is failed to be matched is the transaction information to be reconciled.
Specifically, the remote server acquires a transaction unique identifier (namely the transaction name) in a target transaction information table from a remote data storage system (kafka), determines whether a remote database synchronizes data according to the acquired transaction unique identifier, and indicates that the transaction corresponding to the transaction unique identifier is completed and data synchronization is not required to be completed if the transaction unique identifier exists in the remote database; if the remote database does not have the transaction unique identifier, the remote server needs to determine the transaction key information of the transaction unique identifier from the target transaction information and perform the reimbursement according to the transaction key information.
In an embodiment of the application, the transaction key information includes a preset transaction identifier, and the step S303 performs reconciliation processing based on the transaction information to be reconciled, including:
if the preset transaction identification in the transaction information to be reconciled is the first identification, performing reconciled transaction according to the transaction information to be reconciled, wherein the first identification is used for representing that the transaction to be reconciled is an automatic reconciled transaction;
and if the preset transaction identification in the transaction information to be reconciled is the second identification, locking the account of the transaction information to be reconciled, wherein the second identification is used for representing that the transaction to be reconciled is an artificial reconciled transaction.
The transaction key information includes transaction types, which may be an automatic reimbursement type and a manual reimbursement type.
When the transaction type in the transaction information to be reconciled is the automatic reconciled type, the remote server can directly perform transaction processing again according to the transaction request information in the transaction information to be reconciled, and further store the data related to the transaction processing, so that automatic reconciled is completed.
Specifically, the remote server judges the service calling type according to the transaction request information, carries out information deserialization on the transaction request information, and initiates internal calling of the original transaction service or the special account-supplementing service for account-supplementing processing according to the transaction request information. Besides, the transaction is subjected to a reimbursement sign and a log is registered, so that the query of reimbursement is supported. And if the automatic account complementing fails, the remote server stores the transaction information to be complemented to a redis cache for account locking.
And when the transaction type in the transaction information to be reconciled is a manual reconciled type, the remote server needs to store the transaction information to be reconciled into a remote database for locking accounts, and manual reconciled is completed after manual intervention.
Specifically, the remote server writes the transaction key information, such as the customer number, the account information and the like, included in the to-be-complemented information into the redis cache. Further, when the remote server receives a new transaction, it needs to acquire transaction key information of the current transaction, such as a client number and account information, and checks whether the transaction key information of the current transaction exists in redis, if so, it indicates that the client has an incomplete supplementary account detail, and rejects the current transaction.
Based on this, as shown in fig. 1, the present application provides a disaster-preparation and account-complementing system, which includes:
the interceptor is used for acquiring transaction request information and transaction result information corresponding to each transaction; the interceptor is also used for identifying candidate transaction request information with a transaction type as a target transaction type in the transaction request information and identifying candidate transaction result information with a result type as a target result type in the transaction result information; the interceptor is also used for matching the candidate transaction request information with the candidate transaction result information, determining the candidate transaction request information which is successfully matched as target transaction request information, and determining transaction key information according to the target transaction request information; the interceptor is further used for sending a storage instruction containing transaction key information to the local data storage system; the storage instruction is used for instructing the local data storage system to establish a target transaction information table corresponding to the transaction key information and sending the target transaction information table to the remote data storage system;
the remote server is used for responding to a starting instruction aiming at the local database exception and acquiring a target transaction information table in the remote data storage system; determining transaction information to be reimbursed in a target transaction information table according to the transaction information of the remote database and the target transaction information table of the remote data storage system; and performing the reimbursement processing based on the transaction information to be reimbursed.
In an embodiment of the present application, the disaster recovery and reconciliation system further includes:
and the monitor is used for sending a starting instruction to the remote server when monitoring that the state of the local database is abnormal.
It should be understood that, although the steps in the flowcharts related to the embodiments are shown in sequence as indicated by the arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a part of the steps in the flowcharts related to the above embodiments may include multiple steps or end stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or end stages is not necessarily sequential, but may be performed alternately with or after at least a part of other steps or end stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a disaster recovery and reimbursement device for implementing the above-mentioned disaster recovery and reimbursement method. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the above method, so that specific limitations in one or more embodiments of the disaster recovery and accounting apparatus provided below can be referred to the limitations of the disaster recovery and accounting method in the foregoing, and details are not described here.
Based on this, as shown in fig. 4, the present application provides a disaster recovery and accounting device 400, which can be applied to the above disaster recovery and accounting method, and the method includes the following modules:
an obtaining module 401, configured to obtain transaction request information and transaction result information corresponding to each transaction;
a determining module 402, configured to identify candidate transaction request information with a transaction type being a target transaction type from among the plurality of transaction request information; identifying candidate transaction result information with a result type as a target result type in the plurality of transaction result information;
the matching module 403 is configured to match the candidate transaction request information with the candidate transaction result information, determine the candidate transaction request information that is successfully matched as target transaction request information, and determine transaction key information according to the target transaction request information;
a sending module 404, configured to send a storage instruction containing transaction key information to a local data storage system; and the storage instruction is used for indicating the local data storage system to establish a target transaction information table corresponding to the transaction key information and sending the target transaction information table to the remote data storage system, and the target transaction information table is used for the remote server to acquire the target transaction information table in the remote data storage system when the local database is abnormal so as to perform automatic account compensation.
In an embodiment of the application, the determining module 402 is specifically configured to:
and determining the transaction type corresponding to the transaction request information according to the service name information contained in the transaction request information aiming at each transaction request information, and determining the transaction request information as candidate transaction request information when the transaction type is a target transaction type.
In an embodiment of the application, the determining module 402 is further specifically configured to:
and determining a result type corresponding to the transaction result information according to the transaction result identification contained in the transaction result information aiming at each transaction result information, and determining the transaction result information as candidate transaction result information when the result type is the target result type.
In an embodiment of the application, the candidate transaction request information includes a first transaction identifier, the candidate transaction result information includes a second transaction identifier, and the matching module 403 is specifically configured to:
and matching the first transaction identification of the candidate transaction request information with the second transaction identification of the candidate transaction result information, and determining the candidate transaction request information when the first transaction identification is consistent with the second transaction identification as target transaction request information.
Based on this, as shown in fig. 5, the present application provides a disaster recovery and accounting device 500, which can be applied to the above-mentioned disaster recovery and accounting method, and the method includes the following modules:
a response module 501, configured to obtain a target transaction information table in the remote data storage system in response to a start instruction for an exception of the local database, where the target transaction information table is established by the local data storage system according to a storage instruction containing transaction key information sent by the interceptor and is sent to the remote data storage system; the transaction key information is obtained by matching candidate transaction request information with a target transaction type in the plurality of transaction request information and candidate transaction result information with a target result type in the plurality of transaction result information by the interceptor according to the candidate transaction request information which is successfully matched;
a to-be-compensated transaction information determining module 502, configured to determine to-be-compensated transaction information in a target transaction information table according to transaction information of a remote database and the target transaction information table of the remote data storage system;
and the reconnaissance module 503 is configured to perform reconnaissance processing based on the transaction information to be reconnaissance.
In an embodiment of the present application, the to-be-reconciled information determining module 502 is specifically configured to:
and matching the transaction information of the remote database with a target transaction information table of the local data storage system, and determining the transaction key information which fails to be matched in the target transaction information table as the transaction information to be reconciled.
In an embodiment of the present application, the transaction key information includes a preset transaction identifier, and the reconciliation module 503 is specifically configured to:
if the preset transaction identification in the transaction information to be reconciled is the first identification, performing reconciled transaction processing according to the transaction information to be reconciled, wherein the first identification is used for representing that the transaction to be reconciled is an automatic reconciled transaction;
and if the preset transaction identifier in the transaction information to be reconciled is a second identifier, locking the account of the transaction information to be reconciled, wherein the second identifier is used for representing that the transaction to be reconciled is an artificial reconciled transaction.
All or part of each module of the disaster recovery and reimbursement device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a training method or a scale problem generation method for a scale problem generation model. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the configuration shown in fig. 6 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation on the computing device to which the present application may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or may have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) referred to in the present application are information and data that are authorized by the user or fully authorized by the parties.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not to be construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims (14)

1. A disaster recovery and account compensation method is characterized by comprising the following steps:
acquiring transaction request information and transaction result information corresponding to each transaction;
identifying candidate transaction request information of which the transaction type is a target transaction type from the transaction request information; candidate transaction result information with a result type as a target result type is identified in the transaction result information;
matching the candidate transaction request information with the candidate transaction result information, determining the candidate transaction request information which is successfully matched as target transaction request information, and determining transaction key information according to the target transaction request information;
sending a storage instruction containing the transaction key information to a local data storage system; the storage instruction is used for indicating the local data storage system to establish a target transaction information table corresponding to the transaction key information and sending the target transaction information table to the remote data storage system, and the target transaction information table is used for the remote server to obtain the target transaction information table in the remote data storage system when the local database is abnormal so as to perform automatic reconciliation.
2. The disaster recovery ledger method according to claim 1, wherein the identifying, among the plurality of transaction request messages, candidate transaction request messages whose transaction types are target transaction types includes:
and determining a transaction type corresponding to the transaction request information according to service name information contained in the transaction request information aiming at each transaction request information, and determining the transaction request information as candidate transaction request information when the transaction type is the target transaction type.
3. The disaster recovery reconciliation method of claim 1 wherein identifying candidate transaction result information with a result type of a target result type among the plurality of transaction result information comprises:
and determining a result type corresponding to the transaction result information according to the transaction result identification contained in the transaction result information aiming at each transaction result information, and determining the transaction result information as candidate transaction result information when the result type is the target result type.
4. The disaster recovery reconciliation method of claim 1 wherein the candidate transaction request information comprises a first transaction identifier and the candidate transaction result information comprises a second transaction identifier, wherein matching the candidate transaction request information with the candidate transaction result information and determining the candidate transaction request information that is successfully matched as the target transaction request information comprises:
and matching the first transaction identifier of the candidate transaction request information with the second transaction identifier of the candidate transaction result information, and determining the candidate transaction request information when the first transaction identifier is consistent with the second transaction identifier as the target transaction request information.
5. A disaster recovery and account compensation method is characterized by comprising the following steps:
responding to a starting instruction aiming at local database exception, and acquiring a target transaction information table in a remote data storage system; the target transaction information table is established by the local data storage system according to a storage instruction which is sent by the interceptor and contains transaction key information, and is sent to the allopatric data storage system; the transaction key information is obtained by matching candidate transaction request information of which the transaction type is a target transaction type in the plurality of identified transaction request information with candidate transaction result information of which the result type is a target result type in the plurality of transaction result information by the interceptor and according to the candidate transaction request information which is successfully matched;
determining transaction information to be reconciled in a target transaction information table according to the transaction information of the remote database and the target transaction information table of the remote data storage system;
and performing the reimbursement processing based on the transaction information to be reimbursed.
6. The disaster recovery and reimbursement method as set forth in claim 5, wherein the determining the transaction information to be reimbursed in the target transaction information table according to the transaction information of the offsite database and the target transaction information table of the offsite data storage system comprises:
and matching the transaction information of the remote database with a target transaction information table of the local data storage system, and determining the transaction key information which is failed to be matched in the target transaction information table as the transaction information to be reconciled.
7. The disaster recovery and reimbursement method as set forth in claim 5, wherein the transaction key information comprises a preset transaction identifier, and performing reimbursement processing based on the transaction information to be reimbursed comprises:
if a preset transaction identifier in the to-be-reconciled transaction information is a first identifier, performing reconciled transaction processing according to the to-be-reconciled transaction information, wherein the first identifier is used for representing that the to-be-reconciled transaction is an automatic reconciled transaction;
the method further comprises the following steps:
and if the preset transaction identification in the to-be-reconciled account transaction information is a second identification, performing account locking processing on the to-be-reconciled account transaction information, wherein the second identification is used for representing that the to-be-reconciled account transaction is an artificial reconciled account transaction.
8. A disaster recovery ledger system, the system comprising:
the interceptor is used for acquiring transaction request information and transaction result information corresponding to each transaction; the interceptor is further used for identifying candidate transaction request information with a transaction type being a target transaction type in the transaction request information, and identifying candidate transaction result information with a result type being a target result type in the transaction result information; the interceptor is also used for matching the candidate transaction request information with the candidate transaction result information, determining the successfully matched candidate transaction request information as target transaction request information, and determining transaction key information according to the target transaction request information; the interceptor is further used for sending a storage instruction containing the transaction key information to a local data storage system; the storage instruction is used for instructing the local data storage system to establish a target transaction information table corresponding to the transaction key information and sending the target transaction information table to a remote data storage system;
the remote server is used for responding to a starting instruction aiming at the local database exception and acquiring a target transaction information table in the remote data storage system; determining transaction information to be reconciled in a target transaction information table according to the transaction information of the remote database and the target transaction information table of the remote data storage system; and performing the reimbursement processing based on the transaction information to be reimbursed.
9. The disaster recovery accounting system of claim 8 wherein said system further comprises:
and the monitor is used for sending the starting instruction to the remote server when monitoring that the state of the local database is abnormal.
10. A disaster recovery reconciliation device, comprising:
the acquisition module is used for acquiring transaction request information and transaction result information corresponding to each transaction;
the determining module is used for identifying candidate transaction request information of which the transaction type is a target transaction type in the transaction request information; candidate transaction result information with a result type as a target result type is identified in the transaction result information;
the matching module is used for matching the candidate transaction request information with the candidate transaction result information, determining the candidate transaction request information which is successfully matched as target transaction request information, and determining transaction key information according to the target transaction request information;
the sending module is used for sending a storage instruction containing the transaction key information to a local data storage system; the storage instruction is used for indicating the local data storage system to establish a target transaction information table corresponding to the transaction key information and sending the target transaction information table to a remote data storage system, and the target transaction information table is used for enabling the remote server to acquire the target transaction information table in the remote data storage system when a local database is abnormal so as to perform automatic reconciliation.
11. A disaster recovery reconciliation device, comprising:
the response module is used for responding to a starting instruction aiming at the local database exception and acquiring a target transaction information table in the remote data storage system; the target transaction information table is established by the local data storage system according to a storage instruction which is sent by the interceptor and contains transaction key information, and is sent to the allopatric data storage system; the transaction key information is obtained by the interceptor matching candidate transaction request information of which the transaction type is a target transaction type in the plurality of identified transaction request information with candidate transaction result information of which the result type is a target result type in the plurality of transaction result information, and according to the candidate transaction request information which is successfully matched;
the system comprises a to-be-compensated transaction information determining module, a to-be-compensated transaction information determining module and a to-be-compensated transaction information determining module, wherein the to-be-compensated transaction information determining module is used for determining to-be-compensated transaction information in a target transaction information table according to transaction information of the remote database and the target transaction information table of the remote data storage system;
and the account compensation module is used for performing account compensation processing based on the transaction information to be compensated.
12. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 4 or claims 5 to 7.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4 or 5 to 7.
14. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 4 or claims 5 to 7 when executed by a processor.
CN202211693238.8A 2022-12-28 2022-12-28 Disaster recovery and account compensation method, system and device and computer equipment Pending CN115904814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211693238.8A CN115904814A (en) 2022-12-28 2022-12-28 Disaster recovery and account compensation method, system and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211693238.8A CN115904814A (en) 2022-12-28 2022-12-28 Disaster recovery and account compensation method, system and device and computer equipment

Publications (1)

Publication Number Publication Date
CN115904814A true CN115904814A (en) 2023-04-04

Family

ID=86488078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211693238.8A Pending CN115904814A (en) 2022-12-28 2022-12-28 Disaster recovery and account compensation method, system and device and computer equipment

Country Status (1)

Country Link
CN (1) CN115904814A (en)

Similar Documents

Publication Publication Date Title
CN107220142B (en) Method and device for executing data recovery operation
CN100555279C (en) Item synchro system and method without snapshot
CN110188103A (en) Data account checking method, device, equipment and storage medium
CN109542682A (en) A kind of data back up method, device, equipment and storage medium
CN110737719A (en) Data synchronization method, device, equipment and computer readable storage medium
CN115480987A (en) Link data display method and device and computer equipment
CN114547204A (en) Data synchronization method and device, computer equipment and storage medium
CN110554992B (en) Distributed metadata path management method, system, terminal and storage medium
CN115982049A (en) Abnormity detection method and device in performance test and computer equipment
CN116561003A (en) Test data generation method, device, computer equipment and storage medium
CN116339626A (en) Data processing method, device, computer equipment and storage medium
CN115904814A (en) Disaster recovery and account compensation method, system and device and computer equipment
CN115544050A (en) Operation log recording method, device, equipment and storage medium
CN115981979A (en) Log data processing method, device, equipment, medium and computer program product
CN115687350A (en) Index construction method and device, computer equipment and storage medium
CN111400279B (en) Data operation method, device and computer readable storage medium
CN113806309A (en) Metadata deleting method, system, terminal and storage medium based on distributed lock
CN109325057B (en) Middleware management method, device, computer equipment and storage medium
CN114722261A (en) Resource processing method and device, electronic equipment and storage medium
CN112818021A (en) Data request processing method and device, computer equipment and storage medium
US20240241794A1 (en) Data management system and data management method
CN113032594B (en) Label image storage method, apparatus, computer device and storage medium
CN111738848B (en) Method, device, computer equipment and storage medium for generating characteristic data
CN115617580B (en) Incremental backup and recovery method and system based on Shared SST (SST) file
US20230161664A1 (en) Method of responding to operation, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination