Transaction data reconciliation method, reconciliation application system, medium and electronic device
By deploying the netting application system across multiple server clusters, multi-point netting calculation and data source switching are achieved, resolving the netting failure issue caused by main data center failures, improving disaster recovery and fault tolerance capabilities and business continuity, and reducing operation and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETSUNION CLEARING CORP
- Filing Date
- 2021-05-08
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, transaction data netting is only performed in the main data center. This results in the netting process failing if the main data center fails, leading to high maintenance costs, long recovery times, and a lack of disaster recovery capabilities.
The netting application system is deployed across multiple server clusters to achieve multi-point netting calculations. The core server cluster and the backup server cluster execute netting tasks separately, and the independence of the netting process and business continuity are ensured by switching data sources. Thread-level database switching is achieved using pre-defined tools such as Spring AOP aspects.
It improves the disaster recovery and fault tolerance capabilities of the netting function, reduces operation and maintenance costs, ensures business continuity and the accuracy of netting results, and avoids manual intervention and long recovery times.
Smart Images

Figure CN115311082B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of transaction data netting, and more specifically, to a transaction data netting method, netting application system, medium, and electronic equipment. Background Technology
[0002] Currently, after clearing and sorting is completed in multiple data centers, the clearing results of the transaction data are sent to the main data center, and then rebalancing is only performed periodically in the main data center. In this scenario, since the clearing results from multiple data centers are stored only in the main data center and rebalancing is only performed there, if a failure occurs during the rebalancing process, such as a main data center outage or database failure, the rebalancing will fail. Manual intervention to switch data centers is required to restart the rebalancing process, resulting in high maintenance costs and long recovery times.
[0003] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0004] The purpose of this invention is to provide a method for netting transaction data, a netting application system, a medium, and electronic equipment, thereby improving the disaster recovery and fault tolerance capabilities of the netting function to at least a certain extent.
[0005] Other features and advantages of the invention will become apparent from the following detailed description, or may be learned in part by practice of the invention.
[0006] According to a first aspect of the present invention, a method for netting transaction data is provided, applied to multiple server clusters, each server cluster having a netting application system deployed therein. The method includes: at least two of the netting application systems receiving clearing results of the transaction data; at least two of the netting application systems performing a netting task, calculating netting based on the clearing results of the transaction data, and obtaining the netting result of the netting task.
[0007] In some embodiments of the present invention, the plurality of server clusters includes a core server cluster and a plurality of backup server clusters, and at least two of the netting application systems performing the netting task include: the netting application system in the core server cluster performing the netting task; and at least one of the backup server clusters having a netting application system performing the netting task.
[0008] In some embodiments of the present invention, the netting task includes a first netting task and a second netting task; at least two netting application systems execute the netting task, perform netting calculations based on the clearing results of the transaction data, and obtain the netting result of the netting task, including: the netting application system in the core server cluster executes the first netting task, performs netting calculations based on the clearing results of the transaction data, obtains a first netting result, and writes the first netting result into a first database of the core server cluster; and the netting application system in the core server cluster executes the second netting task, performs netting calculations based on the clearing results of the transaction data, obtains a second netting result, and writes the second netting result into a second database of the core server cluster, wherein the second database of the core server cluster is different from the first database of the core server cluster; or, at least one of the backup server clusters executes the second netting task, performs netting calculations based on the clearing results of the transaction data, obtains a second netting result, and writes the second netting result into the second database of the backup server cluster.
[0009] In some embodiments of the present invention, the method further includes: a netting application system in each of a plurality of server clusters determining whether to allow the netting results to be sent to a clearing instruction system.
[0010] In some embodiments of the present invention, the netting application system in each of the multiple server clusters determines whether to allow the netting result to be sent to the clearing instruction system. This includes: each of the multiple server clusters determining whether the current server cluster is a core server cluster and whether the netting result to be sent is stored in the first database of the core server cluster; if the current server cluster is the core server cluster and the netting result to be sent is stored in the first database of the core server cluster, then the netting result to be sent is allowed to be sent to the clearing instruction system; if the current server cluster is not the core server cluster, or the netting result to be sent is not stored in the first database of the core server cluster, then the netting result to be sent is not allowed to be sent to the clearing instruction system.
[0011] In some embodiments of the present invention, the method further includes: when the core server cluster is in a normal state, the netting application system in the core server cluster sends the netting result to the clearing instruction system.
[0012] In some embodiments of the present invention, the method further includes: when the core server cluster is in an abnormal state, the netting application system in the target backup server cluster among multiple backup server clusters sends the netting result to the clearing instruction system, wherein the target backup server cluster is the backup server cluster that executes the netting task.
[0013] According to a second aspect of the present invention, a netting application system for transaction data is provided, which is applied to multiple server clusters. Each server cluster deploys the netting application system, and at least two of the netting application systems include: a receiving module for receiving the clearing results of transaction data; and a netting calculation module for performing a netting task, performing netting calculation based on the clearing results of the transaction data, and obtaining the netting result of the netting task.
[0014] In some embodiments of the present invention, the plurality of server clusters include a core server cluster and a plurality of backup server clusters, and at least two of the netting application systems perform the netting task, including: the netting application system in the core server cluster performs the netting task; and at least one of the backup server clusters performs the netting task.
[0015] In some embodiments of the present invention, the netting task includes a first netting task and a second netting task; the netting calculation module is configured as follows: the netting application system in the core server cluster executes the first netting task, performs netting calculation based on the clearing results of the transaction data, obtains a first netting result, and writes the first netting result into the first database of the core server cluster; and the netting application system in the core server cluster executes the second netting task, performs netting calculation based on the clearing results of the transaction data, obtains a second netting result, and writes the second netting result into the second database of the core server cluster, wherein the second database of the core server cluster is different from the first database of the core server cluster; or, at least one of the multiple standby server clusters, the netting application system in the standby server cluster executes the second netting task, performs netting calculation based on the clearing results of the transaction data, obtains a second netting result, and writes the second netting result into the second database of the standby server cluster.
[0016] In some embodiments of the present invention, each netting application system includes: a determination module, wherein the netting application system in each of a plurality of server clusters determines whether to allow the netting results to be sent to the clearing instruction system.
[0017] In some embodiments of the present invention, the determination module is configured as follows: the netting application system in each of the multiple server clusters determines whether the current server cluster is a core server cluster and whether the netting result to be submitted is stored in the first database of the core server cluster; if the current server cluster is the core server cluster and the netting result to be submitted is stored in the first database of the core server cluster, then the netting result to be submitted is allowed to be sent to the clearing instruction system; if the current server cluster is not the core server cluster, or the netting result to be submitted is not stored in the first database of the core server cluster, then the netting result to be submitted is not allowed to be sent to the clearing instruction system.
[0018] According to a third aspect of the present invention, an electronic device is provided, comprising: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the transaction data netting method as described in the first aspect of the above embodiments.
[0019] According to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the transaction data netting method as described in the first aspect of the above embodiments.
[0020] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0021] In some embodiments of the present invention, the netting application system deployed in at least two server clusters can receive the clearing results of transaction data, overcoming the limitation in related technologies that only the main data center can receive the clearing results of transaction data. Furthermore, the netting application system deployed in at least two server clusters executes the netting task, performs netting calculations based on the clearing results of the transaction data, and obtains the netting results of the netting task, realizing multi-point netting calculations. This overcomes the limitation in related technologies that only the main data center performs netting calculations on the clearing results of transaction data, improving the disaster recovery and fault tolerance capabilities of the netting function.
[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0024] Figure 1 A schematic diagram of an exemplary system architecture for a transaction data netting method or transaction data netting application system that can be applied according to embodiments of the present invention is shown.
[0025] Figure 2 A flowchart illustrating a method for netting transaction data according to an embodiment of the present invention is shown schematically.
[0026] Figure 3 A flowchart illustrating a method for netting transaction data according to another embodiment of the present invention is shown schematically;
[0027] Figure 4 A flowchart illustrating a method for netting transaction data according to another embodiment of the present invention is shown schematically;
[0028] Figure 5 A block diagram illustrating a transaction data netting application system according to an embodiment of the present invention is shown.
[0029] Figure 6 A block diagram of a transaction data netting application system according to another embodiment of the present invention is shown schematically;
[0030] Figure 7 A schematic diagram of a computer system suitable for implementing embodiments of the present invention is shown. Detailed Implementation
[0031] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the invention will be more thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
[0032] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the invention.
[0033] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0034] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0035] Figure 1 A schematic diagram of an exemplary system architecture for a transaction data netting method or transaction data netting application system that can be applied according to embodiments of the present invention is shown.
[0036] like Figure 1 As shown, system architecture 100 may include server clusters 101, 102, and 103, network 104, and server 105. Network 104 is used as a medium to provide communication links between server clusters 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0037] It should be understood that Figure 1 The number of server clusters, networks, and servers shown is merely illustrative. Depending on implementation needs, there can be any number of server clusters, networks, and servers. For example, server 105 could be a server cluster consisting of multiple servers.
[0038] Users can interact with server 105 via network 104 using server clusters 101, 102, and 103 to receive or send messages, etc. Server clusters 101, 102, and 103 can be a server cluster composed of multiple servers. Figure 1 The three servers shown are for illustrative purposes only; the number of servers in a server cluster is not limited here.
[0039] According to embodiments of this disclosure, netting application systems are deployed in server clusters 101, 102, and 103 respectively. At least two netting application systems in server clusters 101, 102, and 103 can receive the clearing results of transaction data sent by server 105, overcoming the limitation in related technologies that only the main data center can receive the clearing results of transaction data. Furthermore, at least two netting application systems in server clusters 101, 102, and 103 can execute netting tasks, perform netting calculations based on the clearing results of transaction data, and obtain the netting results of the netting tasks. This achieves multi-point netting calculations, overcoming the limitation in related technologies that only the main data center can perform netting calculations on the clearing results of transaction data, and improving the disaster recovery and fault tolerance capabilities of the netting function.
[0040] Figure 2 A flowchart illustrating a transaction data netting method according to an embodiment of the present invention is shown schematically.
[0041] like Figure 2 As shown, the netting method for transaction data may include steps S210 and S220. This method is applied to multiple server clusters, and each server cluster has a netting application system deployed in it.
[0042] In step S210, at least two netting application systems receive the clearing results of the transaction data.
[0043] In step S220, at least two netting application systems execute netting tasks, perform netting calculations based on the clearing results of transaction data, and obtain the netting results of the netting tasks.
[0044] This method deploys netting application systems in each server cluster, with at least two systems capable of receiving the clearing results of transaction data. This overcomes the limitation in related technologies where only the main data center can receive the clearing results. Then, each of the at least two netting application systems executes a netting task, performs netting calculations based on the clearing results, and obtains the netting results. This achieves multi-point netting calculations, overcoming the limitation in related technologies where only the main data center performs netting calculations on the clearing results, and improving the disaster recovery and fault tolerance capabilities of the netting function.
[0045] In one embodiment of the present invention, the aforementioned plurality of server clusters includes a core server cluster and a plurality of backup server clusters. For example, the plurality of server clusters may be multiple data centers, the core server cluster may be a core data center, and the plurality of backup server clusters may be multiple backup data centers. In this embodiment, a netting application system is deployed in the core data center, and a netting application system is deployed in each backup data center.
[0046] In one embodiment of the present invention, the execution of a netting task by at least two netting application systems includes: a netting application system in the core server cluster performing the netting task; and a netting application system in at least one of the multiple backup server clusters performing the netting task. For example, the netting application system in the core data center can receive the clearing results of transaction data, then perform the netting task, and calculate the netting based on the clearing results of the transaction data to obtain the netting result of the netting task. As another example, the netting application system in at least one of the multiple backup data centers can also receive the clearing results of transaction data, then perform the netting task, and calculate the netting based on the clearing results of the transaction data to obtain the netting result of the netting task. Based on the aforementioned method, netting calculations are performed according to the clearing results of transaction data, multi-point netting is achieved, improving the disaster recovery and fault tolerance capabilities of the netting function of the netting application system.
[0047] In related technologies, since netting is only performed in the main server room, business verification can only be done in the main server room after any production change. If the business verification fails, the released netting business code must be rolled back, erroneous netting data must be cleaned up, and then netting must be done again to restore core business. This is not only complex to operate and costly to maintain, but its potential risks can also seriously affect the business continuity of the netting function. In one embodiment of the present invention, a netting application system is deployed in each server cluster. Therefore, after a production change, if the core server room business verification fails, it can jump to a backup server room for business verification. Thus, the core server room does not need to roll back the released netting business code or clean up erroneous netting data, which reduces verification risk to a certain extent and avoids affecting the business continuity of the netting function. For example, when releasing netting-related function code, it can first be released in the netting application system in the backup server room. The new code can be run in multiple backup server rooms to obtain multi-point netting calculation results, which are compared with the netting calculation results in the core server room. After a long period of production data parallel running verification, the correctness of the changed code can be verified, thereby reducing the release risk.
[0048] Figure 3 A flowchart illustrating a transaction data netting method according to another embodiment of the present invention is shown. In this embodiment, the netting task may include a first netting task and a second netting task, wherein the first netting task and the second netting task are different.
[0049] like Figure 3 As shown, step S220 may specifically include steps S310 to S330.
[0050] In step S310, the netting application system in the core server cluster executes the first netting task, performs netting calculation based on the clearing results of the transaction data, obtains the first netting result, and writes the first netting result into the first database of the core server cluster.
[0051] In step S320, the netting application system in the core server cluster executes the second netting task, performs netting calculation based on the clearing results of the transaction data, obtains the second netting result, and writes the second netting result into the second database of the core server cluster; or, in step S330, at least one of the multiple standby server clusters executes the second netting task, performs netting calculation based on the clearing results of the transaction data, obtains the second netting result, and writes the second netting result into the second database of the standby server cluster.
[0052] In this method, the core server cluster can execute different netting tasks and write the corresponding netting results to different databases. For example, the core server cluster executes the first netting task and writes the first netting result to the first database, and then executes the second netting task and writes the second netting result to the second database. Additionally, the standby server cluster executes the second netting task and writes the second netting result to the second database. This not only achieves multi-point netting calculation but also ensures that the netting process of the core server cluster and the standby server cluster are independent of each other, without affecting each other during the netting process. This guarantees business isolation and data isolation, thereby maximizing system stability.
[0053] In one embodiment of the present invention, step S310 is a mandatory step when performing multi-point netting calculation. This ensures that the core server cluster, under normal conditions, can send the first netting result to the clearing instruction system. Steps S320 and S330 can be selectively executed according to actual circumstances. Furthermore, in step S330, depending on actual circumstances, the netting application system in each of the multiple backup server clusters can execute a second netting task, perform netting calculation based on the clearing results of the transaction data, obtain the second netting result, and write the second netting result into the second database of the backup server cluster.
[0054] In one embodiment of the present invention, after the netting application system in the core server cluster obtains the first netting result and the second netting result, and the netting application system in the backup server cluster obtains the second netting result, a server cluster can be automatically selected from multiple server clusters as a verification server cluster. The verification server cluster can be used to verify the netting results obtained by at least two netting application systems, thus ensuring the accuracy of the netting results obtained by multi-point netting calculation.
[0055] In one embodiment of the present invention, the netting application system in the core server cluster can execute both a first netting task and a second netting task. Since the core server cluster can execute not only the netting process but also other core processes, a data source switching method is required when writing the netting results to the database. The first netting result is written to the first database, and the second netting result is written to the second database. This data source switching method not only ensures the normal operation of the netting process but also guarantees the normal operation of other core processes, achieving continuity of core business within the core server cluster.
[0056] In one embodiment of the present invention, a pre-defined utility class is used to complete the data source switching at the ThreadLocal level. For example, the pre-defined utility can be used to configure Spring AOP aspects for the first and second netting tasks. After the netting application system in the core server cluster receives the first and second netting tasks, it first enters the aspect code to switch the data source. Specifically, in the Spring AOP aspect, the task parameters of the first netting task or the task parameters of the second netting task are parsed. The task parameters of the first netting task can be the database type of the first database, and the task parameters of the second netting task can be the database type of the second database. For example, if the parsed database type is the database type of the first database, the data source is switched to the first database, for example, the first database is the clearing-center database, i.e., the primary database. Conversely, if the parsed database type is the database type of the second database, the data source is switched to the second database, for example, the second database is the clearing-ctrl database, i.e., the dual-write database. For example, the data source is switched to the clearing-ctrl database based on the identifier of the clearing-ctrl database, and netting is calculated based on the clearing results of the transaction data. Then, a second netting result is obtained and finally written to the clearing-ctrl database. Similarly, the data source is switched to the clearing-center database based on the identifier of the clearing-center database, and netting is calculated based on the clearing results of the transaction data. Then, a first netting result is obtained and finally written to the clearing-center database.
[0057] In one embodiment of the present invention, thread-level database settings are implemented by modifying the database identifier (i.e., task parameters) in ThreadLocal. The database currently in use is selected based on the database identifier in ThreadLocal, thereby achieving data source switching. After each netting task is completed, the database is restored to the primary database (i.e., the first database) in the Spring AOP aspect. This ensures that the use of different databases by different threads does not affect each other, guaranteeing the normal operation of the netting process and other core processes in the core server cluster, and further ensuring the continuity of core business in the core server cluster.
[0058] In one embodiment of the present invention, since the backup server cluster does not involve the core processes of the core business, the data source switching method can ensure that only the second netting task is executed in the backup server cluster and realize multi-point netting calculation.
[0059] In one embodiment of the present invention, when the netting application system in the standby server cluster receives a netting task, it determines whether the netting task is a second netting task. If it is, the netting task is executed; otherwise, the execution of the netting task is abandoned.
[0060] In one embodiment of the present invention, after receiving the second netting task, the netting application system in the standby server cluster first enters the aspect code to switch the data source. For example, in the Spring AOP aspect, the task parameters of the second netting task are parsed, and the data source is switched to the second database according to the database identifier of the second database. For example, the data source is switched to the clearing-ctrl database according to the identifier of the clearing-ctrl database, and netting calculation is performed according to the clearing results of the transaction data. Then, the second netting result is obtained and finally written to the clearing-ctrl database.
[0061] In one embodiment of the present invention, after obtaining the netting result through multi-point netting calculation, each point needs to determine whether the conditions for uploading the netting result to the clearing instruction system are met. For example, the netting application system in each of multiple server clusters determines whether it is allowed to send the netting result to the clearing instruction system. If the upload conditions are met, the netting result is sent to the clearing instruction system.
[0062] In one embodiment of the present invention, the method further includes: when the core server cluster is in a normal state, the netting application system in the core server cluster sends the netting result to the clearing instruction system. For example, the netting application system in the core server cluster sends the aforementioned first netting result to the clearing instruction system.
[0063] In one embodiment of the present invention, the method further includes: when the core server cluster is in an abnormal state, the netting application system in a target backup server cluster among multiple backup server clusters can send the netting results to the clearing instruction system. In this way, when the core server cluster crashes or experiences a database failure, a target backup server cluster can be automatically selected from multiple backup server clusters to send the netting results to the clearing instruction system, eliminating the need for manual intervention and reducing operational costs. In this embodiment, the target backup server cluster is the backup server cluster that performs the netting task. For example, the netting application system in the target backup server cluster performs a second netting task.
[0064] Figure 4 A flowchart illustrating a method for netting transaction data according to another embodiment of the present invention is shown.
[0065] like Figure 4As shown, the netting application system in each of the multiple server clusters mentioned above determines whether to allow the netting results to be sent to the clearing instruction system, which may specifically include steps S410 to S430.
[0066] In step S410, the netting application system in each of the multiple server clusters determines whether the current server cluster is a core server cluster and whether the netting result to be sent is stored in the first database of the core server cluster.
[0067] In step S420, if the current server cluster is the core server cluster and the netting result to be sent is stored in the first database of the core server cluster, then it is allowed to send the netting result to be sent to the clearing instruction system.
[0068] In step S430, if the current server cluster is not the core server cluster, or if the netting result to be sent is not stored in the first database of the core server cluster, then the netting result to be sent is not allowed to be sent to the clearing instruction system.
[0069] This method can determine the server cluster to perform the upload operation by judging whether the current server cluster is a core server cluster and whether the netting result to be uploaded is stored in the first database of the core server cluster. This can avoid repeatedly sending the same netting result to the clearing instruction system.
[0070] In one embodiment of the present invention, after performing netting calculations and obtaining netting results, the netting application system in each server cluster needs to perform a judgment operation to determine whether the current server cluster is allowed to send the netting results to the clearing instruction system. For example, the netting application system in the core server cluster determines whether the current server cluster is a core server cluster and whether the netting results to be sent are stored in the first database of the core server cluster. If the current server cluster is a core server cluster and the netting results to be sent are stored in the first database of the core server cluster, then sending the netting results to be sent to the clearing instruction system is allowed; if the current server cluster is not a core server cluster, or the netting results to be sent are not stored in the first database of the core server cluster, then sending the netting results to be sent to the clearing instruction system is not allowed.
[0071] The netting application system in each of the multiple backup server clusters determines whether the current server cluster is a core server cluster and whether the netting result to be submitted is stored in the first database of the core server cluster. If the current server cluster is a core server cluster and the netting result to be submitted is stored in the first database of the core server cluster, then the netting result to be submitted is allowed to be sent to the clearing instruction system; if the current server cluster is not a core server cluster, or the netting result to be submitted is not stored in the first database of the core server cluster, then the netting result to be submitted is not allowed to be sent to the clearing instruction system.
[0072] Figure 5 A block diagram of a transaction data netting application system according to an embodiment of the present invention is shown schematically.
[0073] like Figure 5 As shown, the transaction data netting application system 500 includes a receiving module 510 and a netting calculation module 520. The transaction data netting application system 500 is applied to multiple server clusters; for example, the netting application system 500 is deployed in each server cluster.
[0074] Specifically, the receiving module 510 is used to receive the clearing results of the transaction data;
[0075] The netting calculation module 520 is used to perform netting tasks, calculate netting based on the clearing results of transaction data, and obtain the netting results of the netting task.
[0076] The netting application system 500 for this transaction data can be deployed in each server cluster. At least two netting application systems 500 in multiple server clusters can receive the clearing results of the transaction data, overcoming the limitation in related technologies where only the main data center can receive the clearing results of the transaction data. Then, at least two netting application systems execute netting tasks respectively, perform netting calculations based on the clearing results of the transaction data, and obtain the netting results of the netting tasks. This realizes multi-point netting calculations, overcoming the limitation in related technologies where only the main data center can perform netting calculations on the clearing results of the transaction data, and improving the disaster recovery and fault tolerance capabilities of the netting function.
[0077] According to an embodiment of the present invention, the netting application system 800 for this transaction data can be used to implement... Figure 2 The netting method for transaction data described in the examples.
[0078] In some embodiments of the present invention, the above-mentioned netting calculation module 520 is configured as follows: the netting application system in the core server cluster executes a first netting task, performs netting calculation based on the clearing results of transaction data, obtains a first netting result, and writes the first netting result into a first database of the core server cluster; and the netting application system in the core server cluster executes a second netting task, performs netting calculation based on the clearing results of transaction data, obtains a second netting result, and writes the second netting result into a second database of the core server cluster, wherein the second database of the core server cluster is different from the first database of the core server cluster; or, the netting application system in at least one of the multiple standby server clusters executes a second netting task, performs netting calculation based on the clearing results of transaction data, obtains a second netting result, and writes the second netting result into a second database of the standby server cluster.
[0079] Figure 6 A block diagram of a transaction data netting application system according to another embodiment of the present invention is shown schematically.
[0080] like Figure 6 As shown, the above-mentioned transaction data netting application system 500 also includes a determination module 530.
[0081] Specifically, module 530 determines whether the netting application system in each of the multiple server clusters is allowed to send the netting results to the clearing instruction system.
[0082] The aforementioned determining module 530 is configured such that: the netting application system in each of the multiple server clusters determines whether the current server cluster is a core server cluster and whether the netting result to be submitted is stored in the first database of the core server cluster; if the current server cluster is the core server cluster and the netting result to be submitted is stored in the first database of the core server cluster, then the netting result to be submitted is allowed to be sent to the clearing instruction system; if the current server cluster is not the core server cluster, or the netting result to be submitted is not stored in the first database of the core server cluster, then the netting result to be submitted is not allowed to be sent to the clearing instruction system.
[0083] The netting application system 500 can determine the server cluster to perform the upload operation by judging whether the current server cluster is a core server cluster and whether the netting result to be uploaded is stored in the first database of the core server cluster. This can avoid repeatedly sending the same netting result to the clearing instruction system.
[0084] According to an embodiment of the present invention, the netting application system 500 for this transaction data can be used to implement... Figure 4 The netting method for transaction data described in the examples.
[0085] Since each module of the transaction data netting application system 500 in the example embodiment of the present invention can be used to implement the above 2~ Figure 4 The steps of the described transaction data netting method are shown in the example embodiments. Therefore, for details not disclosed in the device embodiments of the present invention, please refer to the embodiments of the transaction data netting method described above.
[0086] It is understood that the receiving module 510, the rolling difference calculation module 520, and the determining module 530 can be implemented in a single module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in a single module. According to embodiments of the present invention, at least one of the receiving module 510, the rolling difference calculation module 520, and the determining module 530 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging circuitry, or as hardware or firmware implementations, or as a suitable combination of software, hardware, and firmware implementations. Alternatively, at least one of the receiving module 510, the rolling difference calculation module 520, and the determining module 530 can be at least partially implemented as a computer program module, which, when run by a computer, can execute the functions of the corresponding module.
[0087] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing an electronic device according to embodiments of the present invention. Figure 7 The computer system 700 of the illustrated electronic device is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention. In this embodiment, the electronic device can be any server in a server cluster.
[0088] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for system operation. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0089] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0090] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this application.
[0091] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0092] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0093] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0094] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by one of the electronic devices, cause the cluster of electronic devices to implement the transaction data netting method as described in the above embodiments.
[0095] For example, the aforementioned electronic device cluster can achieve the following: Figure 2 As shown: In step S210, at least two netting application systems receive the clearing results of the transaction data. In step S220, at least two netting application systems execute netting tasks, perform netting calculations based on the clearing results of the transaction data, and obtain the netting results of the netting tasks.
[0096] It should be noted that although several modules or units of the device for performing actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0097] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of the present invention.
[0098] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0099] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for netting transaction data, applied to multiple server clusters, characterized in that, Each server cluster deploys a netting application system, and the multiple server clusters include a core server cluster and multiple backup server clusters. The method includes: At least two of the aforementioned netting application systems receive the clearing results of the transaction data; At least two of the netting application systems execute netting tasks, perform netting calculations based on the clearing results of the transaction data, and obtain the netting results of the netting tasks; the netting tasks include a first netting task and a second netting task; wherein, at least one netting application system in the core server cluster executes the first netting task; and at least one netting application system in one of the multiple backup server clusters executes the second netting task. The netting results obtained by at least two of the netting application systems are verified by a verification server cluster; wherein the verification server cluster is selected from the plurality of server clusters.
2. The method according to claim 1, characterized in that, At least two of the netting application systems execute netting tasks, perform netting calculations based on the clearing results of the transaction data, and obtain the netting results of the netting tasks, including: The netting application system in the core server cluster executes the first netting task, performs netting calculations based on the clearing results of the transaction data, obtains a first netting result, and writes the first netting result into the first database of the core server cluster; and The netting application system in the core server cluster executes the second netting task, performs netting calculations based on the clearing results of the transaction data, obtains a second netting result, and writes the second netting result into the second database of the core server cluster. The second database of the core server cluster is different from the first database of the core server cluster; or... At least one of the multiple standby server clusters, the netting application system in the standby server cluster executes the second netting task, performs netting calculation based on the clearing results of the transaction data, obtains the second netting result, and writes the second netting result into the second database of the standby server cluster.
3. The method according to claim 1, characterized in that, The method also includes: The netting application system in each of the multiple server clusters determines whether to allow the netting results to be sent to the clearing instruction system.
4. The method according to claim 3, characterized in that, The netting application system in each of the multiple server clusters determines whether to allow the netting results to be sent to the clearing instruction system, including: The netting application system in each of the multiple server clusters determines whether the current server cluster is a core server cluster and whether the netting result to be sent is stored in the first database of the core server cluster. If the current server cluster is the core server cluster, and the netting result to be sent is stored in the first database of the core server cluster, then it is allowed to send the netting result to be sent to the clearing instruction system. If the current server cluster is not the core server cluster, or if the netting result to be sent is not stored in the first database of the core server cluster, then the netting result to be sent is not allowed to be sent to the clearing instruction system.
5. The method according to claim 1, characterized in that, The method also includes: When the core server cluster is in normal condition, the netting application system in the core server cluster sends the netting results to the clearing instruction system.
6. The method according to claim 5, characterized in that, The method also includes: In the event that the core server cluster is in an abnormal state, the netting application system in the target backup server cluster among multiple backup server clusters sends the netting result to the clearing instruction system. The target backup server cluster is the backup server cluster that executes the netting task.
7. A transaction data netting application system, applied to multiple server clusters, characterized in that, Each server cluster deploys the netting application system, and the plurality of server clusters include one core server cluster and multiple backup server clusters, wherein at least two of the netting application systems include: The receiving module is used to receive the clearing results of transaction data; The netting calculation module is used to execute netting tasks, perform netting calculations based on the clearing results of the transaction data, and obtain the netting results of the netting tasks; the netting tasks include a first netting task and a second netting task; wherein, the netting application system in the core server cluster executes at least the first netting task; and at least one of the multiple backup server clusters executes the second netting task. The netting results obtained by at least two of the netting application systems are verified by a verification server cluster; wherein the verification server cluster is selected from the plurality of server clusters.
8. An electronic device, comprising: One or more processors; as well as A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the method according to any one of claims 1 to 6.
9. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Clearing calculation method and device
CN109753383A