Reconciliation file generation method and device and electronic equipment
By executing the reconciliation file generation method on the billing system server, obtaining and merging non-failed main library and backup library files in local and backup data centers, the problem of insufficient bill disaster recovery processing capabilities in distributed reconciliation scenarios is solved, and the disaster recovery capability that can still provide complete bill data when both the main library and backup library fail.
Patent Information
- Application Number
- CN202311810804.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
In the distributed reconciliation scenario, the existing technology's bill disaster recovery capabilities are insufficient, resulting in the failure of the backup data center's backup reconciliation task in the backup data center when the database node of the backup data center fails, and the reconciliation cannot be carried out.
By executing a reconciliation file generation method on the billing system server, we obtain the non-failed primary library files of the local data center and the backup library files of the backup data center and merge the reconciliation files to ensure that the complete billing data can still be provided when both the main library and the backup library fail.
It improves the disaster recovery capabilities of the billing system in the database failure scenario, ensures that the generation of reconciliation files does not depend on the integrity of the backup database data, maximizes the provision of billing data, and reduces the impact on member institutions.
Smart Images

Figure CN120216457A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of distributed reconciliation, and particularly to a method, device, and electronic device for generating reconciliation files. Background Art
[0002] In the scenario of implementing reconciliation tasks based on a distributed deployment architecture with multiple centers and active-active configurations, generating bills using a distributed data storage mechanism with database sharding requires a certain disaster tolerance capability. Since data is distributed across multiple database nodes in multiple data centers, data unavailability may occur after a node failure. Therefore, the database needs to adopt a primary-backup disaster tolerance processing mechanism to ensure the stability and security of the system.
[0003] In a distributed reconciliation scenario, multiple sets of databases are deployed in any one data center for multi-point reconciliation. As Figure 1 shown, a schematic diagram of a bill business processing flow in the prior art is provided. The bill system extracts transaction data from the local primary database to generate a reconciliation file and provides it to member institutions. The member institutions store the reconciliation file in a file storage system such as GFS (Google File System) through the file transfer service SFTP (SSH File Transfer Protocol, Secure File Transfer Protocol). When the primary database fails, the bill system will generate a reconciliation file using the backup data in the standby data center.
[0004] However, the database nodes in the standby data center are deployed in a single point. If any set of standby databases fails, the standby database data in the standby data center will be incomplete, and thus the standby database reconciliation task in the standby data center cannot be enabled, resulting in the inability to perform reconciliation based on the standby database data. Therefore, the disaster tolerance processing ability of the bills in the existing reconciliation process needs to be improved. Summary of the Invention
[0005] Embodiments of the present application provide a method, device, and electronic device for generating reconciliation files to ensure the integrity of bill data in a distributed architecture and improve the disaster tolerance ability of the bill system in the case of database failures.
[0006] Embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, embodiments of the present application provide a method for generating a reconciliation file, which is executed by a bill system server. The method includes:
[0008] In the case of a failed primary database in the local data center, obtain the primary database file of the non-failed primary database in the local data center;
[0009] Generate a reconciliation file for the local data center based on the primary database file of the non-failed primary database in the local data center;
[0010] Obtain the backup database file of the backup data center corresponding to the failed primary database of the local data center and obtain the primary database file of the backup data center;
[0011] Generate the reconciliation file of the standby data center based on the standby database file of the standby data center and the main database file of the standby data center.
[0012] Optionally, obtaining the backup database file of the backup data center corresponding to the failed primary database of the local data center includes:
[0013] Determine the database status of the standby database of the standby data center corresponding to the failed main database of the local data center;
[0014] According to the database status of the standby database of the standby data center, the standby database file of the standby data center corresponding to the failed main database of the local data center is obtained.
[0015] Optionally, the standby data center includes a standby data center in the same city, and obtaining the standby database file of the standby data center corresponding to the failed primary database of the local data center includes:
[0016] Determine the database status of the local backup database of the local backup data center corresponding to the failed primary database of the local data center;
[0017] When the database status of the backup database in the same city is not faulty, the backup database file of the data center in the same city is obtained as the backup database file.
[0018] Optionally, the standby data center further includes a remote standby data center, the standby library file further includes a standby library file of the remote data center, and obtaining the standby library file of the standby data center corresponding to the failed primary library of the local data center includes:
[0019] When the database status of the local backup database is faulty, determine the database status of the remote backup database of the remote backup data center corresponding to the faulty primary database of the local data center;
[0020] When the database status of the remote standby database is not faulty, the standby database file of the remote data center is obtained as the standby database file.
[0021] Optionally, the standby data center includes a local standby data center and a remote standby data center, the standby database file is a standby database file of the local data center or a standby database file of the remote data center, and generating a reconciliation file of the standby data center according to the standby database file of the standby data center and the main database file of the standby data center includes:
[0022] When the database status of the local backup database is not faulty, merge the backup database file of the local data center with the main database file of the local backup data center to generate a reconciliation file of the local backup data center.
[0023] When the database status of the local backup database is faulty and the database status of the remote backup database is normal, the backup database file of the remote data center is merged with the main database file of the remote backup data center to generate a reconciliation file of the remote backup data center.
[0024] Optionally, the method further comprises:
[0025] Determine the database status of each master database in the local data center;
[0026] When the database status of each main database in the local data center is not faulty, obtain the main database files of each main database in the local data center;
[0027] Generate the reconciliation file of the local data center based on the master database files of each master database of the local data center.
[0028] Optionally, after generating the reconciliation file of the standby data center according to the standby database file of the standby data center and the main database file of the standby data center, the method further includes:
[0029] The reconciliation file of the local data center and the reconciliation file of the backup data center are sent to the member institutions, so that the member institutions can reconcile according to the reconciliation file of the local data center and the reconciliation file of the backup data center.
[0030] In a second aspect, an embodiment of the present application further provides a reconciliation file generation device, which is applied to a billing system server, wherein the device comprises:
[0031] A first acquisition unit is used to acquire a master library file of a non-faulty master library of the local data center when a faulty master library appears in the local data center;
[0032] A first generating unit, configured to generate a reconciliation file of a local data center according to a master library file of a non-faulty master library of the local data center;
[0033] The second acquisition unit is used to acquire the backup library file of the backup data center corresponding to the failed main library of the local data center and to acquire the main library file of the backup data center;
[0034] The second generating unit is used to generate a reconciliation file of the standby data center according to the standby database file of the standby data center and the main database file of the standby data center.
[0035] In a third aspect, an embodiment of the present application further provides an electronic device, including:
[0036] a processor; and
[0037] a memory arranged to store computer-executable instructions which, when executed, cause the processor to execute any of the foregoing methods.
[0038] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing one or more programs which, when executed by an electronic device including a plurality of application programs, cause the electronic device to execute any of the foregoing methods.
[0039] The above at least one technical solution adopted in the embodiment of the present application can achieve the following beneficial effects: The reconciliation file generation method in the embodiment of the present application is executed by the bill system server. First, in the case of a failed main database in the local data center, the main database file of the non-failed main database in the local data center is obtained; then, a reconciliation file of the local data center is generated according to the main database file of the non-failed main database in the local data center; after that, the backup database file of the backup data center corresponding to the failed main database in the local data center and the main database file of the backup data center are obtained; finally, a reconciliation file of the backup data center is generated according to the backup database file and the main database file of the backup data center. The reconciliation file generation method in the embodiment of the present application in a distributed architecture system makes the generation of the reconciliation file no longer strongly dependent on the integrity of the backup database data. When both the main database in the local data center and the backup database in the backup data center fail, it can still provide complete bill data and normally execute the reconciliation task, greatly improving the disaster tolerance ability of the system in the case of database failures, and maximizing the provision of bill data, reducing the impact on member institutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments and descriptions thereof of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0041] Figure 1 is a schematic diagram of a bill business processing flow in the prior art;
[0042] Figure 2 is a schematic flowchart of a reconciliation file generation method in an embodiment of the present application;
[0043] Figure 3 is a schematic diagram of a reconciliation file generation method in the case of a main database failure in an embodiment of the present application;
[0044] Figure 4 is a schematic structural diagram of a reconciliation file generation device in an embodiment of the present application;
[0045] Figure 5 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0047] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0048] To facilitate the understanding of the various embodiments of the present application, the distributed database architecture involved in the various embodiments of the present application is first introduced. The distributed database architecture of the present application adopts a multi-center multi-active deployment architecture. Taking "two locations and three centers" as an example, "two locations" means that all data centers are distributed in two different cities, and "three centers" means that a total of three data centers are deployed in two cities. In this way, there are two data centers deployed in the same city. These two data centers can be respectively called local data centers and same-city backup data centers. The data center deployed in another city can be used as a remote backup data center corresponding to the local data center. Each data center is deployed with multiple local master libraries and backup libraries corresponding to the master libraries of other data centers to provide disaster recovery and backup capabilities.
[0049] In the multi-center multi-active deployment architecture, each data center can provide external data reading and writing capabilities through the local master database, and provide disaster recovery capabilities for the master databases of other data centers through the backup database of this data center. For ease of understanding, assuming there are local data center IDC1, local backup data center IDC2, and remote backup data center IDC3, then the databases under the three IDCs can be in the form of the following Table 1:
[0050] Table 1
[0051]
[0052] It can be seen that for each main database {11, 12, 13...} deployed in IDC1, a corresponding local backup database {11, 12, 13...} is deployed in IDC2, and a corresponding remote backup database {11, 12, 13...} is deployed in IDC3. When any of the main databases deployed in IDC1 fails, the corresponding local backup database of IDC1 in IDC2 or the corresponding remote backup database in IDC3 needs to provide billing data to achieve the disaster recovery capability of the system.
[0053] Based on this, an embodiment of the present application provides a method for generating a reconciliation file, which is executed by a bill system server. As Figure 2 shown, a flowchart of a method for generating a reconciliation file in an embodiment of the present application is provided. The method at least includes the following steps S210 to step S240:
[0054] Step S210, in the case of a failed primary database in the local data center, obtain the primary database file of the non-failed primary database in the local data center.
[0055] The method for generating a reconciliation file according to an embodiment of the present application can be executed by an independently deployed bill system server. The bill system can be understood as a system between a distributed database and member institutions, mainly used to extract bill data from the distributed database and provide reconciliation files to member institutions.
[0056] The method for generating a reconciliation file according to an embodiment of the present application is mainly aimed at the scenario where any one or more primary databases in the local data center fail. Therefore, it is necessary to first determine the running status of each primary database in the local data center. If at least one failed primary database appears, then this primary database will be unable to provide complete bill data due to the failure. However, the data of other non-failed primary databases themselves is complete. Therefore, this failed primary database should not affect the normal provision of bill data by other non-failed primary databases. So, an embodiment of the present application can first obtain the primary database files of all non-failed primary databases in the local data center. The "primary database file" can be understood as a data file originating from each primary database in the local data center.
[0057] Step S220, generate a reconciliation file for the local data center according to the primary database files of the non-failed primary databases in the local data center.
[0058] Merge the library-level files of all non-failed primary databases in the local data center obtained in the previous step to generate a total reconciliation file, which is used as the reconciliation file that the local data center can provide to member institutions externally.
[0059] Step S230, obtain the standby database file of the standby data center corresponding to the failed primary database in the local data center and obtain the primary database file of the standby data center.
[0060] Since there is a failed primary database in the local data center, the reconciliation file of the local data center generated in the previous step lacks the bill data of the failed primary database. Based on the primary and standby disaster tolerance mechanism, there is a corresponding standby database for the failed primary database in the standby data center. Therefore, the standby database file corresponding to this failed primary database can be further obtained from the standby data center.
[0061] In addition, as mentioned above, in a multi - center and multi - active architecture, multiple primary databases are also deployed in the standby data center. Therefore, it is also necessary to further obtain the primary database files of each primary database in the standby data center for reconciliation based on the billing data of the standby data center. Here, the "primary database file" refers to the data files from each primary database in the standby data center.
[0062] Of course, it should be noted that the primary databases deployed in the standby data center may also fail, and the handling logic is the same as that of the local data center, which will not be elaborated here.
[0063] Step S240: Generate a reconciliation file for the standby data center based on the standby database file and the primary database file of the standby data center.
[0064] Since the standby database file corresponding to the failed primary database in the local data center and the primary database file of the standby data center in the above steps both come from the standby data center, the standby database file and the primary database file of the standby data center can be merged to generate a total reconciliation file, which is used as the reconciliation file that the standby data center can provide to member institutions.
[0065] In the scenario where any primary database in the local data center fails, the logic adopted by the original billing system is to obtain the backup data of the standby data center to generate a reconciliation file because the data of the primary database in the local data center is incomplete. However, when a certain standby database in the standby data center also fails, the standby data center will also be unable to provide a reconciliation file due to incomplete data, resulting in the failure to execute the reconciliation task. In the embodiment of the present application, when there is a failed primary database in the local data center, on the one hand, the failed primary database is excluded, and the remaining local primary database files that can normally provide billing data are merged to generate a reconciliation file. On the other hand, the data of the missing failed primary database is compensated by the data of the corresponding standby database in the standby data center, and then a reconciliation file is generated together with the database - level files of the local primary databases in the standby data center, thereby ensuring the integrity of the overall billing data.
[0066] Here, it should be further noted that although the billing data provided by the local data center is not the complete data of the entire data center, the generated reconciliation file is used for member institutions to conduct reconciliations. Therefore, as long as the entire reconciliation files finally provided to member institutions are complete.
[0067] The reconciliation file generation method of the embodiment of the present application, under a distributed architecture system, makes the generation of reconciliation files no longer strongly dependent on the integrity of the backup database data. When both the main database of the local data center and the backup database of the backup data center fail, they can still provide complete billing data and perform reconciliation tasks normally, which greatly improves the disaster recovery capability of the system under database failure scenarios, maximizes the provision of billing data, and reduces the impact on member institutions.
[0068] In some embodiments of the present application, obtaining the backup library file of the backup data center corresponding to the faulty main library of the local data center includes: determining the database status of the backup library of the backup data center corresponding to the faulty main library of the local data center; and obtaining the backup library file of the backup data center corresponding to the faulty main library of the local data center according to the database status of the backup library of the backup data center.
[0069] When obtaining the backup library file corresponding to the faulty main library of the local data center in the backup data center, you can first determine the operating status of the backup library corresponding to the faulty main library in the backup data center, that is, determine whether the backup library corresponding to the faulty main library is faulty. If the backup library corresponding to the faulty main library is in normal status, you can obtain the library-level file of the backup library.
[0070] If the backup library corresponding to the faulty main library also fails, the library-level files of the backup library will not be obtained at this time, and the reconciliation task will not be able to be performed due to incomplete data. That is, the premise that the embodiment of the present application can normally perform the reconciliation task is that at least one backup library corresponding to the faulty main library is normal, but whether the backup libraries corresponding to other non-faulty main libraries are faulty does not affect the acquisition of billing data of the non-faulty main libraries. Therefore, the embodiment of the present application can reduce the dependence of the execution of the reconciliation task on the status of the backup library, maximize the provision of billing data, and reduce the scope of impact on member institutions.
[0071] To further illustrate, suppose that the main database 00 in IDC1 fails. Since the main database data in IDC1 is incomplete, the original reconciliation processing logic is to output the reconciliation file based on all the data of the same-city backup database of IDC1 in IDC2. However, if any of the same-city backup databases of IDC1 in IDC2 and any of the remote backup databases in IDC3 also fail, the data of the same-city backup database and the remote backup database of IDC1 in IDC2 are also incomplete, and thus the reconciliation task cannot be performed. However, the embodiment of the present application only needs to ensure that the corresponding backup database 00 of the failed main database 00 in IDC1 in IDC2 or IDC3 is in a normal state, and the reconciliation task can be performed normally, thereby greatly reducing the impact of the backup database failure on the generation of the reconciliation file.
[0072] In some embodiments of the present application, the standby data center includes an in-city standby data center. Obtaining the standby database file of the standby data center corresponding to the failed primary database of the local data center includes: determining the database status of the in-city standby database of the in-city standby data center corresponding to the failed primary database of the local data center; in the case where the database status of the in-city standby database is non-failed, obtaining the standby database file of the in-city data center as the standby database file.
[0073] As described above, the standby data center of the embodiments of the present application includes an in-city standby data center and an off-city standby data center. The in-city standby data center is a data center deployed in the same city as the local data center, and is closer in physical distance than the off-city standby data center. Therefore, in the case where the local data center has a failed primary database, priority is given to obtaining the corresponding standby database data from the in-city standby data center.
[0074] Specifically, it is possible to first determine the running status of the in-city standby database corresponding to the failed primary database of the local data center in the in-city standby data center. If the corresponding in-city standby database is in a normal state, the corresponding standby database file can be obtained from the standby database of the in-city data center.
[0075] In some embodiments of the present application, the standby data center further includes an off-city standby data center, and the standby database file further includes the standby database file of the off-city data center. Obtaining the standby database file of the standby data center corresponding to the failed primary database of the local data center includes: in the case where the database status of the in-city standby database is failed, determining the database status of the off-city standby database of the off-city standby data center corresponding to the failed primary database of the local data center; in the case where the database status of the off-city standby database is non-failed, obtaining the standby database file of the off-city data center as the standby database file.
[0076] In a relatively special scenario, if the in-city standby database corresponding to the failed primary database of the local data center also happens to fail, it is then necessary to consider obtaining the corresponding standby database file from the off-city data center. Specifically, it is possible to first determine the running status of the off-city standby database corresponding to the failed primary database of the local data center in the off-city standby data center. If the corresponding off-city standby database is in a normal state, the corresponding standby database file can be obtained from the off-city standby database.
[0077] In some embodiments of the present application, the standby data center includes an in-city standby data center and an off-site standby data center. The standby database file is the standby database file of the in-city data center or the standby database file of the off-site data center. Generating the reconciliation file of the standby data center based on the standby database file and the primary database file of the standby data center includes: when the database status of the in-city standby database is normal, merging the standby database file of the in-city data center with the primary database file of the in-city standby data center to generate the reconciliation file of the in-city standby data center; when the database status of the in-city standby database is faulty and the database status of the off-site standby database is normal, merging the standby database file of the off-site data center with the primary database file of the off-site standby data center to generate the reconciliation file of the off-site standby data center.
[0078] When generating the reconciliation file based on the standby data center, if the standby database file is from the in-city standby data center, merge the standby database file of the in-city data center with all the primary database files local to this center to generate the reconciliation file of the in-city standby data center; if it is from the off-site standby data center, merge the standby database file of the off-site data center with all the primary database files local to this center to generate the reconciliation file of the off-site standby data center.
[0079] For ease of understanding of the embodiments of the present application, as Figure 3 shown, a schematic diagram of a method for generating a reconciliation file in a primary database failure scenario in the embodiments of the present application is provided. Assume that IDC1 and IDC2 are each deployed with 30 sets of primary databases. Then, when all primary databases are normal, the reconciliation files provided to member institutions should be obtained by merging a total of 30 + 30 = 60 sets of database-level files.
[0080] If one primary database 00 in IDC1 breaks down, leaving 29 sets of databases, then only merge these 29 sets of primary databases in IDC1 into a reconciliation file and provide it to member institutions. At the same time, for the faulty primary database 00 in IDC1, there is a corresponding standby database 00 in IDC2. Then, the 30 sets of primary database files in IDC2 can be merged with the database-level file of the standby database 00 corresponding to the faulty primary database 00 in IDC1 in IDC2, that is, a total of 31 sets of database-level files are merged to generate a reconciliation file and provided to member institutions. Then, the reconciliation files finally provided to member institutions are obtained by merging 29 + 31 = 60 sets of database-level files, thus ensuring the integrity of bill data in the database failure scenario.
[0081] It should be noted that the above embodiments are only described by taking the case of one primary database failure as an example. When extended to the case of more primary database failures, the same processing can be adopted, which will not be elaborated here.
[0082] In some embodiments of the present application, the method further includes: determining the database status of each primary database in the local data center; when the database status of each primary database in the local data center is non-faulty, obtaining the primary database files of each primary database in the local data center; generating a reconciliation file for the local data center according to the primary database files of each primary database in the local data center.
[0083] As described above, before generating the reconciliation file for the local data center, it is possible to first determine the database status of each primary database in the local data center. If it is determined that there is no faulty primary database in the local data center, that is, the operating status of each primary database is normal, then according to the original processing logic, the primary database files of each primary database in the local data center can be directly merged to generate a reconciliation file and sent to the member institutions.
[0084] In some embodiments of the present application, after generating the reconciliation file for the standby data center according to the standby database files and the primary database files of the standby data center, the method further includes: sending the reconciliation file of the local data center and the reconciliation file of the standby data center to the member institutions, so that the member institutions perform reconciliation according to the reconciliation file of the local data center and the reconciliation file of the standby data center sent to the member institutions.
[0085] Embodiments of the present application send the finally generated reconciliation files of each data center to the member institutions, and the member institutions perform subsequent processing of the reconciliation files. It should be noted that, under normal circumstances, only the primary database provides bill data externally, and the bill data of the standby database is not provided to the member institutions. When the primary database fails, the standby database will play the role of disaster recovery and backup, that is, by combining the bill data of the primary database and the standby database, a complete reconciliation file is provided to the member institutions, thereby reducing the impact of database failures on the member institutions.
[0086] In some embodiments of the present application, the database status can be determined by means such as database probing. Of course, specifically how to determine whether the database is faulty can be flexibly determined by those skilled in the art in combination with the prior art, and no specific limitation is made here.
[0087] Embodiments of the present application also provide a reconciliation file generation device 400, which is applied to the bill system server, as Figure 4 shown, providing a structural schematic diagram of a reconciliation file generation device in an embodiment of the present application. The device 400 includes:
[0088] A first acquisition unit 410, configured to obtain the primary database files of the non-faulty primary databases in the local data center when there is a faulty primary database in the local data center;
[0089] A first generating unit 420 is used to generate a reconciliation file of the local data center according to the master library file of the non-fault master library of the local data center;
[0090] The second acquisition unit 430 is used to acquire the backup library file of the backup data center corresponding to the failed main library of the local data center and to acquire the main library file of the backup data center;
[0091] The second generating unit 440 is used to generate a reconciliation file of the standby data center according to the standby database file of the standby data center and the main database file of the standby data center.
[0092] In some embodiments of the present application, the second acquisition unit 430 is specifically used to: determine the database status of the standby database of the standby data center corresponding to the faulty main database of the local data center; and acquire the standby database file of the standby data center corresponding to the faulty main database of the local data center according to the database status of the standby database of the standby data center.
[0093] In some embodiments of the present application, the backup data center includes a same-city backup data center, and the second acquisition unit 430 is specifically used to: determine the database status of the same-city backup database of the same-city backup data center corresponding to the faulty primary database of the local data center; when the database status of the same-city backup database is not faulty, obtain the backup database file of the same-city data center as the backup database file.
[0094] In some embodiments of the present application, the backup data center also includes an off-site backup data center, and the backup library file also includes a backup library file of the off-site data center. The second acquisition unit 430 is specifically used to: when the database status of the same-city backup library is faulty, determine the database status of the off-site backup library of the off-site backup data center corresponding to the faulty primary library of the local data center; when the database status of the off-site backup library is not faulty, obtain the backup library file of the off-site data center as the backup library file.
[0095] In some embodiments of the present application, the backup data center includes a same-city backup data center and a remote backup data center, and the backup library file is a backup library file of the same-city data center or a backup library file of a remote data center. The second generation unit 440 is specifically used to: when the database status of the same-city backup library is not faulty, merge the backup library file of the same-city data center with the main library file of the same-city backup data center to generate a reconciliation file of the same-city backup data center; when the database status of the same-city backup library is faulty and the database status of the remote backup library is not faulty, merge the backup library file of the remote data center with the main library file of the remote backup data center to generate a reconciliation file of the remote backup data center.
[0096] In some embodiments of the present application, the device further includes: a determination unit configured to determine the database status of each master database in the local data center; a third acquisition unit configured to, when the database status of each master database in the local data center is non-faulty, acquire the master database files of each master database in the local data center; and a third generation unit configured to generate a reconciliation file for the local data center based on the master database files of each master database in the local data center.
[0097] In some embodiments of the present application, the device further includes: a sending unit configured to, after generating a reconciliation file for the standby data center based on the standby database file and the master database file of the standby data center, send the reconciliation file of the local data center and the reconciliation file of the standby data center to member institutions, so that the member institutions perform reconciliation based on the reconciliation file of the local data center and the reconciliation file of the standby data center sent to the member institutions.
[0098] It can be understood that the above reconciliation file generation device can implement each step of the reconciliation file generation method executed by the bill system server provided in the foregoing embodiments. The relevant explanations regarding the reconciliation file generation method are applicable to the reconciliation file generation device and will not be elaborated here.
[0099] Figure 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Please refer to Figure 5 , at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory, such as at least one disk memory, etc. Of course, the electronic device may also include other hardware required for other services.
[0100] The processor, network interface, and memory can be interconnected through an internal bus, and the internal bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 5 only a bidirectional arrow is used in [diagram] for illustration, but it does not mean that there is only one bus or one type of bus.
[0101] A memory for storing programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory may include a memory and a non-volatile memory, and provide instructions and data to the processor.
[0102] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a reconciliation file generation device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0103] In the case of a failed primary database in the local data center, obtain the primary database file of the non-failed primary database in the local data center;
[0104] Generate a reconciliation file for the local data center according to the primary database file of the non-failed primary database in the local data center;
[0105] Obtain the backup database file of the backup data center corresponding to the failed primary database in the local data center and obtain the primary database file of the backup data center;
[0106] Generate a reconciliation file for the backup data center according to the backup database file of the backup data center and the primary database file of the backup data center.
[0107] As described in this application above Figure 2The method executed by the reconciliation file generation device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor or the instructions in the form of software. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed by the hardware decoding processor, or executed by a combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.
[0108] The electronic device can also execute Figure 2 the method executed by the reconciliation file generation device in Figure 2 the illustrated embodiment and implement the functions of the reconciliation file generation device in
[0109] Embodiments of the present application also propose a computer-readable storage medium that stores one or more programs. The one or more programs include instructions that, when executed by an electronic device including a plurality of application programs, can enable the electronic device to execute Figure 2 the method executed by the reconciliation file generation device in the illustrated embodiment, and specifically used to execute:
[0110] In the case of a failed main library in the local data center, obtain the main library file of the non-failed main library in the local data center;
[0111] Generate a reconciliation file for the local data center based on the main library file of the non-failed main library in the local data center;
[0112] Obtain the standby database file corresponding to the failed primary database in the local data center and obtain the primary database file of the standby data center;
[0113] Generate a reconciliation file for the standby data center based on the standby database file of the standby data center and the primary database file of the standby data center.
[0114] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0115] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0116] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0117] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0118] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0119] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash RAM. The memory is an example of computer-readable media.
[0120] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transitory media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0121] It should also be noted that the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising the element.
[0122] Those skilled in the art will appreciate that the embodiments of the present application may be provided as a method, system or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0123] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A method for generating a reconciliation file, which is executed by a bill system server, wherein, The method comprises: In the case of a failed master database in the local data center, obtain the master database file of the non-faulty master database in the local data center; Generate a reconciliation file for the local data center based on the master database file of the non-faulty master database of the local data center; Obtain the backup database file of the backup data center corresponding to the failed primary database of the local data center and obtain the primary database file of the backup data center; Generate the reconciliation file of the standby data center based on the standby database file of the standby data center and the main database file of the standby data center.
2. The method according to claim 1, wherein The method of obtaining the backup database file of the backup data center corresponding to the failed primary database of the local data center includes: Determine the database status of the standby database of the standby data center corresponding to the failed main database of the local data center; According to the database status of the standby database of the standby data center, the standby database file of the standby data center corresponding to the failed main database of the local data center is obtained.
3. The method according to claim 2, wherein, The standby data center includes a standby data center in the same city, and the step of obtaining the standby database file of the standby data center corresponding to the faulty primary database of the local data center includes: Determine the database status of the local backup database of the local backup data center corresponding to the failed primary database of the local data center; When the database status of the backup database in the same city is not faulty, the backup database file of the data center in the same city is obtained as the backup database file.
4. The method according to claim 3, wherein The standby data center also includes a remote standby data center, the standby library file also includes a standby library file of the remote data center, and the method of obtaining the standby library file of the standby data center corresponding to the faulty primary library of the local data center includes: When the database status of the local backup database is faulty, determine the database status of the remote backup database of the remote backup data center corresponding to the faulty primary database of the local data center; When the database status of the remote standby database is not faulty, the standby database file of the remote data center is obtained as the standby database file.
5. The method according to claim 1, wherein, The standby data center includes a local standby data center and a remote standby data center, the standby database file is a standby database file of the local data center or a standby database file of the remote data center, and generating a reconciliation file of the standby data center according to the standby database file of the standby data center and the main database file of the standby data center includes: When the database status of the local backup database is not faulty, merge the backup database file of the local data center with the main database file of the local backup data center to generate a reconciliation file of the local backup data center. When the database status of the local backup database is faulty and the database status of the remote backup database is normal, the backup database file of the remote data center is merged with the main database file of the remote backup data center to generate a reconciliation file of the remote backup data center.
6. The method according to claim 1, wherein The method further comprises: Determine the database status of each master database in the local data center; When the database status of each main database in the local data center is not faulty, obtain the main database files of each main database in the local data center; Generate the reconciliation file of the local data center based on the master database files of each master database of the local data center.
7. The method according to any one of claims 1 to 6, wherein, After generating the reconciliation file of the standby data center according to the standby database file of the standby data center and the main database file of the standby data center, the method further includes: Send the reconciliation files of the local data center and the reconciliation files of the standby data center to the member institutions, so that the member institutions can perform reconciliations based on the reconciliation files of the local data center and the reconciliation files of the standby data center sent to them.
8. A reconciliation file generation device, which is applied to a billing system server, wherein, The device includes: A first acquisition unit, configured to acquire the master library file of the non-faulty master library of the local data center when a faulty master library occurs in the local data center; A first generation unit, configured to generate a reconciliation file of the local data center based on the master library file of the non-faulty master library of the local data center; A second acquisition unit, configured to acquire the standby library file of the standby data center corresponding to the faulty master library of the local data center and acquire the master library file of the standby data center; A second generation unit, configured to generate a reconciliation file of the standby data center based on the standby library file of the standby data center and the master library file of the standby data center.
9. An electronic device, comprising: A processor; And A memory arranged to store computer-executable instructions, the executable instructions, when executed, causing the processor to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device is caused to execute the method according to any one of claims 1 to 7.