Excess amount management system and excess amount management method
Patent Information
- Application Number
- JP2023142406
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-03-13
AI Technical Summary
【0015】 本発明によれば、本発明は、DBへのアクセスを多重·並列処理する場合でも、DBをロックさせることなくトランザクションを処理することができる。
Smart Images

Figure 2025035393000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an excess amount management system and an excess amount management method. [Background technology]
[0002] There are known techniques for increasing the speed of database processing. For example, Patent Document 1 describes a technique in which an AP (Application) server takes over the arithmetic processing of a DB (DataBase) server, thereby preventing a decrease in the processing speed of the entire system. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2014-112385 A Summary of the Invention [Problem to be solved by the invention]
[0004] Previously, when managing net remittance amounts on a bank-by-bank basis, it was necessary to reference (lock) and update two records, one for the sender and one for the receiver, for each transaction. This meant that when transactions were being processed multiple times in parallel, there were frequent waits for the lock to be released.
[0005] In contrast, an object of the present invention is to process transactions without locking the DB even when access to the DB is processed multiple times in parallel. [Means for solving the problem]
[0006] One aspect of the present invention provides an information processing system having a storage means for storing an excess amount table in which at least the excess amount of withdrawal for each of a plurality of financial institutions is stored, and a history table in which at least a portion of the plurality of transactions relating to remittances from a sending bank to a receiving bank among the plurality of financial institutions are stored; an acceptance means for accepting a plurality of new transactions via a plurality of logical paths; a determination unit for each of the plurality of new transactions, referring to the excess amount table and the history table, and determining whether the excess amount will exceed a limit amount as a result of the withdrawal; and a first writing means for writing the transaction to the history table if it is determined that the excess amount does not exceed the limit amount.
[0007] The first writing means may write a transaction related to a financial institution among the plurality of financial institutions where the excess amount exceeds a predetermined reference amount that is lower than the limit amount into a provisional history table before writing the transaction into the history table, and may refer to the excess amount table and the history table for each of the plurality of transactions written into the provisional history table, and if it is determined that the excess amount as a result of the withdrawal does not exceed the limit amount, write the transaction into the history table.
[0008] When it is determined that the excess amount as a result of the withdrawal exceeds the limit amount, the first writing means may discard the transaction without writing the transaction in the history table.
[0009] The limit may be set for each financial institution.
[0010] The reference amount may be set for each financial institution.
[0011] The transaction history table may include a second writing means for writing an updated excess amount calculated from a plurality of transactions stored in the transaction history table to the excess amount table at a predetermined update interval.
[0012] The update interval may be set for each financial institution.
[0013] Another aspect of the present invention provides a method comprising the steps of: storing an excess amount table in which at least the excess amount of withdrawal for each of a plurality of transactions involving remittances from a sending bank to a receiving bank among a plurality of financial institutions, and a history table in which at least a portion of the plurality of transactions are stored; accepting a plurality of new transactions via a plurality of logical paths; referring to the excess amount table and the history table for each of the plurality of new transactions, and determining whether the excess amount will exceed a limit amount as a result of the withdrawal; and if it is determined that the excess amount does not exceed the limit amount, writing the transaction in the history table.
[0014] One aspect of the present invention provides a program that executes the steps of: storing an excess amount table in which at least the excess amount of withdrawal for each of a plurality of financial institutions, and a history table in which at least a portion of the plurality of transactions is stored, for a plurality of transactions involving remittances from a sending bank to a receiving bank among the plurality of financial institutions; accepting a plurality of new transactions via a plurality of logical paths; referring to the excess amount table and the history table for each of the plurality of new transactions, and determining whether the excess amount will exceed a limit amount as a result of the withdrawal; and if it is determined that the excess amount does not exceed the limit amount, writing the transaction to the history table. Effect of the Invention
[0015] According to the present invention, even when access to a database is processed multiple times in parallel, a transaction can be processed without locking the database. [Brief description of the drawings]
[0016] [Figure 1] FIG. 1 is a diagram showing the overall configuration of an excess amount management system 1. [Diagram 2] FIG. 1 is a diagram showing the functional configuration of an excess amount management system 1. [Diagram 3] FIG. 1 is a diagram showing the hardware configuration of an excess amount management system 1. [Figure 4] FIG. 2 is a diagram showing the software configuration of the excess amount management system 1. [Diagram 5] 1 is a flowchart showing the operation of the transaction processing unit 911. [Figure 6(a)] 2A to 2C are diagrams showing data configurations of various tables stored in the DB server 12. [Figure 6(b)] 2A to 2C are diagrams showing data configurations of various tables stored in the DB server 12. [Figure 7(a)] FIG. 4 is a schematic diagram showing a process performed by a first writing means 114. [Figure 7(b)] FIG. 4 is a schematic diagram showing a process performed by a first writing means 114. [Figure 8] FIG. 4 is a schematic diagram showing a process performed by a first writing means 114. [Figure 9] Schematic diagram showing the process when the excess amount exceeds the limit [Figure 10] Schematic diagram showing the process when the excess amount exceeds the limit [Figure 11] Flowchart showing the operation of the update unit 913 [Figure 12(a)] FIG. 4 is a schematic diagram showing a process performed by a second writing means 115. [Figure 12(b)] FIG. 4 is a schematic diagram showing a process performed by a second writing means 115. [Figure 13] FIG. 12 shows the data configuration of an excess amount table 1212 and a history table 1213 in a modified example.
[0017] [1] Configuration FIG. 1 is a diagram showing the overall configuration of the excess amount management system 1. The excess amount management system 1 is a transaction management system that manages information on transactions between financial institutions such as banks. The excess amount management system 1 includes an AP server 11 and a DB server 12. Each financial institution 2 includes a bank server 200. The AP server 11 is a server that performs processing designated by a message sent from the bank server 200. This processing is processed in parallel by multiple AP servers 11. Although three AP servers 11A to C are shown in FIG. 1, the number is not limited to that shown in the drawing. Alternatively, multiple AP servers 11 may be arranged in one AP server 11 and processed in parallel. The DB server 12 is a server that manages data used in the processing of the excess amount management system 1. The bank server 200 is a server that manages and controls the transmission of messages in each bank. The term "bank" used here is a broad concept that includes financial institutions such as banks, credit unions, credit associations, and cooperatives. The number is not limited to that shown in the drawing.
[0018] 2 is a diagram showing a functional configuration of the excess amount management system 1. The AP server 11 includes a processing means 111, a receiving means 112, a determining means 113, a first writing means 114, a second writing means 115, and a communication means .
[0019] The processing means 111 receives a message from the bank server 200 and converts it into a transaction. In this example, the message is data indicating a remittance from one bank to another bank. A transaction is a series of processes on a database performed in relation to the remittance indicated by the message. The message includes information such as information indicating a sending bank that is the sender of the message, information indicating a receiving bank that is the destination of the message, and information indicating the transaction amount. The processing means 111 also confirms (commits) or cancels (rolls back) the transaction. The acceptance means 112 accepts the converted transaction. The determination means 113 determines whether the excess amount stored in the excess amount table 1212 exceeds the reference amount. The determination means 113 also determines whether the total excess amount, which is the sum of the excess amount stored in the excess amount table 1212 and the withdrawal amount indicated in the message, exceeds the reference amount or the limit amount. The first writing means 114 stores (writes) the information indicated in the transaction in the storage means 121. Note that, hereinafter, writing the information indicated in the transaction into various tables may be referred to as "writing the transaction into a table." The second writing means 115 updates (writes) the excess amount based on the settlement amount stored in the history table 1213. The communication means 116 notifies the bank server 200 that a process such as confirmation or cancellation of the transaction has occurred. Note that the communication means 116 may notify the bank server 200 only when a process of canceling the transaction has occurred.
[0020] A "limit" is the maximum amount that a bank can withdraw in a unit period (e.g., one day). This "limit" may be set for each financial institution. An "excess amount" is the cumulative amount (withdrawal amount - deposit amount) transacted by a bank in a unit period. For example, if the withdrawal amount is greater than the deposit amount, i.e., if there is an excess of withdrawals, the value will be a positive value, such as "excess amount: x yen." On the other hand, if the deposit amount is greater than the withdrawal amount, i.e., if there is an excess of deposits, the value will be a negative value, such as "excess amount: -x yen."
[0021] The "base amount" is a predetermined amount lower than the limit amount used to manage the excess amount. The "predetermined amount" is, for example, 80% of the limit amount. Specifically, when the "limit amount: 100,000 yen" is set, the "limit amount: 80,000 yen" is set. This "limit amount" may be set for each financial institution. The "settlement amount" is an amount temporarily stored in the history table after a transaction is confirmed. For example, when a withdrawal process from one's bank to another bank is confirmed, it becomes a positive value such as "settlement amount: x yen". On the other hand, when a deposit process from one's bank to another bank is confirmed, it becomes a negative value such as "settlement amount: -x yen". The "transaction amount" is an amount stored in the provisional history table after a transaction is not confirmed.
[0022] The DB server 12 includes a storage unit 121 and a communication unit 122. The storage unit 121 stores information such as a management table 1211, an excess amount table 1212, a history table 1213, a temporary history table 1214, and a flag table 1215. The communication unit 122 communicates with other devices such as the AP server 11.
[0023] The bank server 200 includes a communication means 201. The communication means 201 communicates with the AP server 11. For example, the AP server 11 receives a message from the bank server 200 and transmits it to another specified bank server 200, thereby mediating a remittance transaction.
[0024] 3 is a diagram showing a hardware configuration of the excess amount management system 1. The AP server 11 is a server equipped with a CPU (Central Processing Unit) 131, a RAM (Random Access Memory) 132, a ROM (Read Only Memory) 133, a storage 134, and a communication unit 135. The CPU 131 controls the operation of each unit by using the RAM 132 as a work area and executing a program stored in the ROM 133 or the storage 134. The communication unit 135 communicates with other devices such as the bank server 200.
[0025] Although not shown in the figure, the DB server 12 is a server including a CPU, a RAM, a ROM, a storage, and a communication unit.
[0026] In this example, the storage 134 stores a program (hereinafter referred to as the "server program") for causing the computer to function as the AP server 11 of the excess amount management system 1. When the CPU 131 is executing the server program, the communication unit 135 is an example of the communication means 116 and the communication means 122, the CPU 131 is an example of the processing means 111, the reception means 112, the determination means 113, the first writing means 114, and the second writing means 115, and at least one of the RAM 132, the ROM 133, and the storage 134 is an example of the memory means 121.
[0027] FIG. 4 is a diagram showing (a part of) the software configuration of the excess amount management system 1. The excess amount management system 1 has a transaction processing unit 911, a database 912, and an update unit 913. The transaction processing unit 911 is a software element that processes transactions, and corresponds to at least the reception means 112 and the first writing means 114. The transaction processing unit 911 receives transactions via multiple logical paths, and writes data according to the received transactions to the database 912 (specifically, the history table 1213 or the provisional history table 1214). The database 912 corresponds to at least the excess amount table 1212, the history table 1213, and the provisional history table 1214. The update unit 913 is a software element that updates the database 912 (specifically, the excess amount table 1212), and corresponds to at least the second writing means 115. In this example, with regard to updating the excess amount table 1212, the update unit 913 is independent of the transaction processing unit 911, and the update unit 913 updates the excess amount table 1212 without locking it.
[0028] [2] Operation [2-1] Operation of the transaction processing unit 911 FIG. 5 is a flowchart showing the operation of the AP server 11 (particularly, the transaction processing unit 911). The process shown in FIG. 5 is started, for example, when a predetermined event occurs. The "predetermined event" is, for example, an event in which the AP server 11 receives a message from the bank server 200. Specifically, this is a case in which the bank server 200 transmits to the AP server 11 a message regarding a "remittance" from one bank to another bank. In the following, functional elements such as the communication means 116 are described as the subject of processing, which means that a hardware element such as the CPU 131 executing a program such as a server program executes processing in cooperation with other hardware elements.
[0029] First, the processing means 111 converts the message received by the AP server 11 into a transaction. In this example, the message indicates that a certain amount (e.g., 5,000 yen) is to be transferred from a sending bank (e.g., Bank A) to a receiving bank (e.g., Bank B). The processing means 111 converts this message into a transaction in accordance with a predetermined rule. The transaction includes information on at least two processes: a withdrawal process from the sending bank (e.g., information for processing a withdrawal of 5,000 yen from Bank A) and a deposit process to the receiving bank (e.g., information for processing a deposit of 5,000 yen from Bank B). The accepting means 112 accepts the converted transaction (step S101). A transaction that is accepted by the accepting means 112 and is to be processed is hereinafter referred to as a "target transaction". The sending bank indicated in the target transaction is referred to as a "target sending bank", and the receiving bank is referred to as a "target receiving bank".
[0030] Next, the determination means 113 determines whether the conditions for initiating the provisional registration process (i.e., the processes of S106 to S107 in FIG. 5) are satisfied for the target sending bank (step S102). The conditions for initiating the provisional registration process are, for example, that the "excess amount" for the target sending bank exceeds the "reference amount". Specifically, the determination means 113 determines in advance whether the conditions for initiating the provisional registration process are satisfied for each financial institution at a predetermined update interval. The "update interval" is, for example, 10 seconds. This update interval may be set for each financial institution. The first writing means 114 stores in advance a flag indicating the determination result for each bank in the DB server 12. For example, the DB server 12 records for each bank a "flag: 1" when the provisional registration condition is satisfied and a "flag: 0" when the provisional registration condition is not satisfied. The determination means 113 refers to this flag and determines whether the conditions for initiating the provisional registration process are satisfied. Alternatively, the determination means 113 may determine whether the "excess amount" at the target sending bank has exceeded the "reference amount" in step S102. In this case, the "excess amount" is the value stored in the excess amount table 1212 at that time. Also, the "settlement amount" is the value stored in the history table 1213 at that time. By performing this provisional registration process, if the excess amount at that time exceeds the reference amount (i.e., is approaching the limit), it is possible to reduce the possibility of the transaction being discarded after processing has begun.
[0031] FIG. 6 is a diagram showing the data configuration of various tables stored in the DB server 12. Each table includes multiple records. The records in the management table 1211 include, for example, a "bank ID," a "limit," and a "reference amount." The top record in FIG. 6(a) indicates that the limit is 100,000 yen and the reference amount is 80,000 yen for the bank with "bank ID: 0001." Note that the reference amount may be expressed as a percentage of the limit (for example, "80%) rather than an absolute value. The information of these records is stored in advance before the flow in FIG. 5 is started.
[0032] Records in the excess amount table 1212 include, for example, a "bank ID" and an "excess amount." The top record in FIG. 6(a) indicates that the excess amount for the bank with "bank ID: 0001" is 60,000 yen, which is an excess of withdrawal. The second record in FIG. 6(a) indicates that the excess amount for the bank with "bank ID: 0002" is -100,000 yen, which is an excess of deposit. The information of these records is stored in advance before the flow in FIG. 5 is started. The information of these records is updated by the update unit 913 using the information stored in the history table 1213 (details will be described later).
[0033] Records in history table 1213 include, for example, "bank ID" and "payment amount." This record information is temporarily stored after a transaction is confirmed (committed). Transactions that are discarded (rolled back) are not stored in history table 1213. The top record in Figure 6(a) indicates that a transaction related to a withdrawal is stored for a bank with "bank ID: 0001" with a payment amount of 10,000 yen. The second record in Figure 6(a) indicates that a transaction related to a deposit is stored for a bank with "bank ID: 0002" with a payment amount of -10,000 yen.
[0034] The records in the provisional history table 1214 include, for example, "bank ID" and "transaction amount." The information in these records is temporarily stored before determining whether to confirm or discard the transaction. Note that the provisional history table 1214 stores transactions related to withdrawals, but does not store transactions related to deposits.
[0035] The records in flag table 1215 include, for example, a "bank ID" and a "flag." The information in these records is updated at a predetermined update interval. The top record in FIG. 6(a) indicates that the flag for the bank with "bank ID: 0001" is 0, i.e., the provisional registration conditions are not met. The top record in FIG. 6(b) indicates that the flag for the bank with "bank ID: 0001" is 1, i.e., the provisional registration conditions are met.
[0036] Referring again to FIG. 5, if the conditions for initiating the provisional registration process are not met (step S102: NO), the determination means 113 starts processing the target transaction. As described above, the target transaction includes two processes, a withdrawal process from the target sending bank and a deposit process to the target receiving bank, and when processing the withdrawal process, the determination means 113 performs an excess amount check (step S103). The excess amount check is to confirm whether the excess amount after processing exceeds the limit. The condition for the excess amount after processing is that the excess amount after processing (first excess amount total) obtained by adding up the "excess amount" in the excess amount table 1212, the "settlement amount" in the "settlement amount" in the history table 1213 that is not added to the "excess amount", and the "withdrawal amount" does not exceed the limit. The "withdrawal amount" is a value shown in the target transaction. If the "first excess amount total" exceeds the limit (step S103: YES), the processing means 111 discards (rolls back) the target transaction (step S105). When the target transaction is discarded, the communication means 116 notifies the bank server 200 of the target sending bank that the target transaction has been discarded.
[0037] If the excess amount after the processing does not exceed the limit (step S103: NO), the processing means 111 proceeds with the processing of the target transaction. When all the processes included in the target transaction are completed, the processing means 111 confirms (commits) the target transaction (step S104). The processes included in the target transaction include, for example, at least two processes: a withdrawal process from the sending bank (for example, a process of writing a record of a withdrawal of 5,000 yen to Bank A in the history table 1213) and a deposit process to the receiving bank (for example, a process of writing a record of a deposit of 5,000 yen to Bank B in the history table 1213). Specifically, the first writing means 114 stores the amount of the withdrawal at the target sending bank and the amount of the deposit at the target receiving bank as the "settlement amount" in the history table 1213. The first writing means 114 also performs a process such as storing a flag indicating that the amount has not been added to the "excess amount". For example, in the history table 1213, if the amount has not been added to the "excess amount", "flag: 0" is recorded, and if the amount has been added to the "excess amount", "flag: 1" is recorded for each record of "settlement amount" (details will be described later). In addition, the communication means 116 notifies the bank servers 200 of the target sending bank and the target receiving bank, respectively, that the target transaction has been confirmed.
[0038] Fig. 7 is a schematic diagram showing processing by the first writing means 114. Fig. 7(a) shows an example in which a transaction related to a message for transferring 5,000 yen from Bank A (ID: 0001) to Bank B (ID: 0002) has been confirmed in the example of Fig. 6(a). Two records (rows) have been added to the history table 1213: a withdrawal of 5,000 yen from Bank A (ID: 0001) and a deposit of 5,000 yen to Bank B (ID: 0002).
[0039] Referring again to Fig. 5, if the conditions for initiating the provisional registration process are met (step S102: YES), the transaction processing unit 911 proceeds to step S106. In step S106, the first writing means 114 stores the "withdrawal amount" of only the withdrawal process among the withdrawal process and deposit process included in the target transaction as the "transaction amount" in the provisional history table 1214.
[0040] Figure 7(b) shows an example of processing a transaction related to a message for transferring 5,000 yen from Bank A (ID: 0001) to Bank B (ID: 0002) in the example of Figure 6(b). One row for a withdrawal of 5,000 yen from Bank A (ID: 0001) has been added to the interim history table 1214. At this point, the row for a deposit of 5,000 yen from Bank B (ID: 0002) has not been added to the history table 1213.
[0041] Referring again to FIG. 5, the determination means 113 performs a (provisional) excess amount check for the target sending bank (step S107). The (provisional) excess amount check is a process for confirming that the (provisional) excess amount (second excess amount total) obtained by adding up the "excess amount" in the excess amount table 1212, the "settlement amount" in the history table 1213 that is not added to the "excess amount", and the "transaction amount" in the provisional history table 1214, for the target sending bank, does not exceed the limit. If the "second excess amount total" exceeds the limit (step S107: YES), the processing means 111 discards the target transaction (step S105). In addition, the communication means 116 notifies the bank server 200 of the target sending bank that the target transaction has been discarded.
[0042] If the second excess amount total does not exceed the limit amount (step S107: NO), the processing means 111 proceeds with the processing of the target transaction. As described above, the target transaction includes two processes, a withdrawal process from the target sending bank and a deposit process to the target receiving bank, and when processing the withdrawal process, the determination means 113 performs an excess amount check (not shown). This excess amount check may be omitted (because the same item has been confirmed in step S106). When all processes included in the target transaction are completed, the processing means 111 confirms (commits) the target transaction (step S108). Specifically, the first writing means 114 stores the "transaction amount" stored in the provisional history table 1214 in the history table 1213 as the "settlement amount". In addition, the first writing means 114 stores the amount of deposit at the target receiving bank as the "settlement amount" in the history table 1213. In addition, the first writing means 114 deletes the "transaction amount" stored in the provisional history table 1214. That is, the first writing means 114 rewrites the "transaction amount" stored in the provisional history table 1214 as the settlement amount in the history table 1213. The first writing means 114 also performs processing such as storing a flag indicating that the amount has not been added to the "excess amount" (details will be described later). The communication means 116 also notifies the bank servers 200 of the sending bank and the receiving bank, respectively, that the target transaction has been confirmed.
[0043] FIG. 8 is a schematic diagram showing the process by the first writing means 114. Specifically, in the example of FIG. 6(b), an example is shown in which a transaction related to a message for transferring 5,000 yen from Bank A (ID: 0001) to Bank B (ID: 0002) is confirmed. That is, in the example of FIG. 6(b), the first writing means 114 stores the "transaction amount" of the withdrawal amount as the "settlement amount" in the history table 1213, and also deletes the "transaction amount" stored in the provisional history table 1214. Also, the first writing means 114 stores the deposit amount as the "settlement amount" in the history table 1213. Two records (rows) have been added to the history table 1213: a withdrawal of 5,000 yen from Bank A (ID: 0001) and a deposit of 5,000 yen to Bank B (ID: 0002), which have been rewritten from the provisional history table 1214.
[0044] A processing example will be described below using a specific data example. First, in the example of FIG. 6(a), assume that the AP server 11 receives a message for transferring 5,000 yen from Bank A to Bank B, that is, the case where Bank A has a "withdrawal amount: 5,000 yen". Note that the description of the process for depositing 5,000 yen to Bank B (processing from Bank B's perspective) will be omitted here (same below). In the example of FIG. 6(a), since "limit amount: 100,000 yen" is stored, the AP server 11 performs processing in Bank A so that the excess amount does not exceed 100,000 yen. For Bank A, the values of each record are stored in the DB server 12 as follows: "Limit: 100,000 yen" "Base amount: 80,000 yen" "Excess amount: 60,000 yen" "Payment amount: 10,000 yen" "Flag:0"
[0045] Based on the above value, ie, "flag: 0", the determination means 113 determines that the excess amount does not exceed the reference amount, ie, the conditions for invoking the provisional registration process are not satisfied (step S102: NO).
[0046] Since the conditions for initiating the provisional registration process are not met, the process proceeds to the target transaction. An excess amount check is performed for the withdrawal process of the target transaction (step S103). The sum of "excess amount: 60,000 yen", "payment amount: 10,000 yen", and "withdrawal amount: 5,000 yen" becomes "first excess amount total: 75,000 yen". Therefore, the determination means 113 compares "excess amount: 75,000 yen" with "limit amount: 100,000 yen" and determines that the first excess amount total does not exceed the limit amount. Finally, the target transaction is confirmed.
[0047] As another example, in the example of FIG. 6(a), assume that the AP server 11 receives a message to transfer 35,000 yen from Bank A to Bank B, i.e., the "withdrawal amount: 35,000 yen" at Bank A. Even in this example, it is first determined that the conditions for invoking the provisional registration process are not met (step S102: NO). Since the conditions for invoking the provisional registration process are not met, the process proceeds to the processing of the target transaction. An excess amount check is performed for the withdrawal processing of the target transaction (step S103). In this example, the "excess amount: 60,000 yen", "settlement amount: 10,000 yen", and "withdrawal amount: 35,000 yen" are added together to obtain "first excess amount total: 105,000 yen". Therefore, the determination means 113 compares "excess amount: 105,000 yen" with "limit amount: 100,000 yen" and determines that the first excess amount total exceeds the limit amount. Therefore, the processing means 111 discards the target transaction.
[0048] 6(b), it is assumed that the AP server 11 receives a message for transferring 5,000 yen from Bank A to Bank B, that is, the "Withdrawal amount: 5,000 yen" is displayed at Bank A. The values of each record of the information on Bank A are stored in the DB server 12 as follows. "Limit: 100,000 yen" "Base amount: 80,000 yen" "Excess amount: 85,000 yen" "Payment amount: 10,000 yen" "Flag:1"
[0049] Based on the above values, particularly "flag: 1", the determination means 113 determines that the "excess amount" exceeds the "reference amount", that is, the conditions for initiating the provisional registration process are met (step S102: YES). Therefore, for Bank A, "transaction amount: 5,000 yen" is written to the provisional history table 1214 (step S106).
[0050] Based on the above information, the sum of "excess amount: 85,000 yen", "payment amount: 10,000 yen", and "transaction amount: 5,000 yen" is the "second excess amount total: 100,000 yen". Therefore, the determination means 113 compares the "limit amount: 100,000 yen" with the "second excess amount total: 100,000 yen" and determines that the second excess amount total does not exceed the limit amount (step S107: NO). Finally, the target transaction is confirmed.
[0051] As another example, in the example of FIG. 6(b), assume that the AP server 11 receives a message for transferring 20,000 yen from bank A to bank B, and the "transaction amount: 20,000 yen" is stored in the temporary history table 1214 (state after step S107). In this example, the sum of "excess amount: 85,000 yen", "settlement amount: 10,000 yen", and "transaction amount: 20,000 yen" is "second excess amount total: 115,000 yen". Therefore, the determination means 113 compares "second excess amount total: 115,000 yen" with "limit amount: 100,000 yen" and determines that the second excess amount total exceeds the limit amount. Therefore, the processing means 111 discards the target transaction.
[0052] [2-2] Processing multiple transactions So far we have explained the processing of one target transaction, but from here we will explain the processing of multiple transactions. Conventionally, when multiple transactions are processed in parallel without using database locking, depending on the timing at which the processing of these transactions begins, the calculation of the excess amount may not be performed correctly, and the transaction may be confirmed even if the limit has been exceeded. Specifically, when considering two transactions A and B, the following three cases (1) to (3) can be assumed as cases in which the excess amount exceeds the limit. Note that in the following, "exceeds" means that "the excess amount exceeds the limit when the transaction amounts are added together." (1) The limit is exceeded only by transaction A, but not by transaction B (2) If either transaction A or B exceeds the limit (3) Neither transaction A nor transaction B alone exceeds the limit, but the combined limit is exceeded.
[0053] First, case (1) will be described. FIG. 9 is a schematic diagram showing the processing of case (1). Here, three patterns of FIG. 9(a) to (c) are considered. Regarding transactions A and B, in what order (in what context) are each process performed? FIG. 9(a) shows an example in which the processes are performed in the following order. In the following, "storage" means "storing the transaction amount in the provisional history table 1214" (step S106). Also, "determination" means "determining whether the excess amount exceeds the limit amount" (step S107). Also, "confirmation" means "confirming the transaction" (step S108). Also, "discard" means "discarding the transaction" (step S105). A-1: Memory of transaction A A-2: Judgment of transaction A B-1: Memory of transaction B A-3: Abandon transaction A B-2: Transaction A judgement B-3: Transaction B is confirmed
[0054] In this case, because the decision on transaction B (B-2) is made after transaction A has been discarded (A-3), the transaction amount of transaction A is not added when the decision on transaction B (B-2) is made. Therefore, transaction B is confirmed (B-3). However, because transaction A exceeded the limit by itself, transaction A is discarded (A-3) regardless of the transaction amount of transaction B.
[0055] FIG. 9B shows an example in which the processes are performed in the following order: A-1: Memory of transaction A A-2: Judgment of transaction A B-1: Memory of transaction B B-2: Transaction B judgement A-3: Abandon transaction A B-3: Transaction B is confirmed
[0056] In this case, because the judgment on transaction B (B-2) is made before transaction A is discarded (A-3), the transaction amount of transaction A is added when judgment on transaction B (B-2) is made. Therefore, transaction B is discarded once (B-3). However, if the message regarding transaction B is resent from bank server 200, transaction B is stored and judged again, and then confirmed (unless the limit is exceeded in consideration of other transactions). Note that transaction A exceeded the limit on its own in the first place, so transaction A is discarded (A-3) regardless of the transaction amount of transaction B.
[0057] FIG. 9C shows an example in which the processes are performed in the following order: B-1: Memory of transaction B A-1: Memory of transaction A B-2: Transaction A judgement A-2: Judgment of transaction A B-3: Transaction B is confirmed A-3: Abandon transaction A
[0058] In this case, because the judgment on transaction B (B-2) is made after transaction A is stored and before transaction A is discarded (A-3), the transaction amount of transaction A is added when judgment on transaction B (B-2) is made. Therefore, transaction B is discarded once (B-3). However, if a message regarding transaction B is resent from bank server 200, transaction B is stored and judged again, and then confirmed (unless the limit is exceeded in consideration of other transactions). Note that transaction A exceeded the limit on its own in the first place, so transaction A is discarded (A-3) regardless of the transaction amount of transaction B.
[0059] Next, we will explain case (2). In this case, both transactions A and B are discarded regardless of the order in which they are processed, so we will omit a detailed explanation.
[0060] Next, case (3) will be described. Fig. 10 is a schematic diagram showing the processing of case (3). Here, three patterns shown in Fig. 10(a) to (c) are considered. Fig. 10(a) shows an example in which processing is performed in the following order: A-1: Memory of transaction A A-2: Judgment of transaction A B-1: Memory of transaction B A-3: Transaction A is confirmed B-2: Transaction B judgement B-3: Abandon transaction B.
[0061] In this case, the decision on transaction A (A-2) is made before transaction B is stored (B-1), so the transaction amount of transaction B is not added when deciding on transaction A (A-2). Therefore, transaction A is confirmed (A-3).
[0062] On the other hand, because the judgment on transaction B (B-2) is made after transaction A has been confirmed (A-3), the transaction amount of transaction A is added when the judgment on transaction B (B-2) is made. As a result, transaction B is discarded (B-3). Furthermore, once transaction A is confirmed (if there is no payment in the sending bank), even if transaction B is subsequently confirmed, it will exceed the limit and therefore cannot be confirmed.
[0063] FIG. 10B shows an example in which the processes are performed in the following order: A-1: Memory of transaction A B-1: Memory of transaction B A-2: Judgment of transaction A B-2: Transaction B judgement A-3: Transaction A is confirmed B-3: Abandon transaction B
[0064] In this case, because the judgment of transaction A (A-2) is made after the storage of transaction B (B-1), the transaction amount of transaction B is added when the judgment of transaction A (A-2) is made. Therefore, transaction A is discarded for the time being (A-3).
[0065] On the other hand, because the decision on transaction B (B-2) is made after transaction A has been stored (A-2), the transaction amount of transaction A is added when deciding on transaction B (B-2). As a result, transaction B is discarded (B-3). Note that in the explanation up to this point, both transactions A and B are discarded, but later, depending on the context of transactions A and B resent from the bank server, it is possible that either transaction will be confirmed.
[0066] FIG. 10C shows an example in which the processes are performed in the following order: A-1: Memory of transaction A B-1: Memory of transaction B A-2: Judgment of transaction A A-3: Abandon transaction A B-2: Transaction B judgement B-3: Transaction B is confirmed
[0067] In this case, because the judgment of transaction A (A-2) is made after the storage of transaction B (B-1), the transaction amount of transaction B is added when the judgment of transaction A (A-2) is made. Therefore, transaction A is discarded (A-3).
[0068] On the other hand, because the judgment on transaction B (B-2) is made after transaction A has been discarded (A-3), the transaction amount of transaction A is not added up when judgment on transaction B (B-2) is made. As a result, transaction B is confirmed (B-3). Note that in this example, even though transaction A was accepted first, the result is that transaction A is discarded and transaction B is confirmed. The order of transactions is not necessarily guaranteed in the excess amount management system 1, so this result is not a problem.
[0069] [2-3] Operation of update unit 913 Fig. 11 is a flowchart showing the operation of the AP server 11 (particularly, the second writing means 115). The process shown in Fig. 11 is performed, for example, at a predetermined update interval. The "update interval" is, for example, 10 seconds. This update interval may be set for each financial institution.
[0070] First, the second writing means 115 selects a record that includes the bank ID of the target bank from among the "payment amount" stored in the history table 1213 (step S201). The second writing means 115, for example, refers to the "processed flag" and selects the target record from among the "payment amount" stored in the history table 1213. There may be multiple records in the history table 1213 that correspond to one bank ID. The second writing means 115 adds up the payment amounts included in these records.
[0071] Next, the second writing means 115 updates the "overpayment amount" by adding up the "overpayment amount" at that time stored in the management table 1211 and the "payment amount" of the selected bank ID (step S202).
[0072] Next, the second writing means 115 stores (updates) the "processed flag" of the "payment amount" that has been added to the "excess amount" among the "payment amounts" stored in the history table 1213 (step S203). Alternatively, the second writing means may delete the "payment amount" that has been added to the "excess amount" among the "payment amounts" stored in the history table 1213.
[0073] 6(a), it is assumed that the update interval has arrived. For Bank A, the values of each record are stored in the DB server 12 as follows. "Excess amount: 60,000 yen" "Payment amount: 10,000 yen"
[0074] The second writing means 115 selects "payment amount: 10,000 yen" for Bank A, which has "processed flag: 0" from among the "payment amounts" stored in the history table 1213. The second writing means 115 also adds up the "excess amount: 60,000 yen" stored in the excess amount table 1212 and the selected "payment amount: 10,000 yen" to store (update) "excess amount: 70,000 yen" in the management table 1211. After that, the second writing means 115 updates the "processed flag: 0" of the "payment amount: 10,000 yen" stored in the history table 1213 to "processed flag: 1". Alternatively, the second writing means 115 may delete the "payment amount: 10,000 yen" stored in the history table 1213.
[0075] FIG. 12 is a schematic diagram showing the process by the second writing means 115. FIG. 12(a) shows the process in which the second writing means 115 sums up the "payment amount" stored in the "history table 1213" and the "excess amount" stored in the "excess amount table 1212" in the example of FIG. 7(a). That is, when a predetermined update interval arrives, the second writing means 115 stores a new "excess amount: 70,000 yen" obtained by summing up the "payment amount: 10,000 yen" and the "excess amount: 60,000 yen" stored in the "excess amount table 1212" in the "excess amount" to update it. After that, the second writing means deletes the "payment amount: 10,000 yen" stored in the history table 1213.
[0076] FIG. 12(b) shows the process in which the second writing means 115 sums up two "payment amounts" stored in the "history table 1213" and the "excess amount" stored in the "excess amount table 1212" in the example of FIG. 8. That is, when a predetermined update interval arrives, the second writing means 115 stores (updates) in the "excess amount" the "excess amount: 100,000 yen" which is the sum of the "payment amount: 10,000 yen" and "payment amount: 5,000 yen" and the "excess amount: 85,000 yen" stored in the "excess amount table 1212". After that, the second writing means 115 deletes the "payment amount: 10,000 yen" and "payment amount: 5,000 yen" stored in the history table 1213.
[0077] [3] Variations The present invention is not limited to the above-described embodiment, and various modifications are possible. Some modifications are described below. Two or more of the features described in the following modifications may be applied in combination.
[0078] The conditions for triggering the provisional registration process (step S102) are not limited to those exemplified in the embodiment. For example, the determination means 113 may determine whether the sum of the excess amount and the settlement amount for each financial institution exceeds the reference amount, and store the result as a flag. Alternatively, the determination means 113 may determine whether the sum of the excess amount, the settlement amount, and the withdrawal amount for each financial institution exceeds the reference amount, and store the result as a flag.
[0079] In the embodiment, an example has been described in which records relating to deposits are not written to the interim history table 1214, but records relating to deposits may be written to the interim history table 1214.
[0080] Although an example of using a "processed flag" has been described in the process (step S203) of deleting the "payment amount" added to the "excess amount" from among the "payment amounts" stored in the history table 1213, a "sequence" may be used instead of the "processed flag." Specifically, in step S104 or step S108, the first writing means 114 also stores a "sequence" indicating the order in which the amounts were stored in the history table. This order is, for example, ascending order.
[0081] Figure 13 is a diagram showing the data configuration of excess amount table 1212 and history table 1213 in a modified example. Records in excess amount table 1212 and history table 1213 further include, for example, a "sequence." The top record in excess amount table 1212 in Figure 13 indicates that for the bank with "bank ID: 0001," "payment amounts" less than "sequence: 10" among the "payment amounts" stored in history table 1213 have been added to the "excess amount."
[0082] 13 indicates that the sequence of "Settlement amount" for the bank with "Bank ID: 0001" is 11. In step S201, the second writing means 115 selects a record with a number greater than the "Sequence: 10" stored in the excess amount table 1212 and updates the "Excess amount". The second writing means also updates the "Sequence" stored in the excess amount table 1212 to the "Sequence" of the combined "Settlement amount".
[0083] The information stored in each table is not limited to those exemplified in the embodiment. The message and transaction may include information related to remittance, such as a time stamp, the name or title of the remitter, the name or title of the recipient, and so-called EDI (Electronic Data Interchange) information.
[0084] The hardware configuration of the excess amount management system 1 is not limited to that exemplified in the embodiment. In particular, the hardware configuration of the AP server 11 may be different from that exemplified in the embodiment. For example, the AP server 11 may be a server on a computer network. This server may be a physical server or a virtual server (so-called cloud).
[0085] The programs executed by a processor such as CPU 131 may be provided in a state stored on a computer-readable storage medium such as a DVD-ROM, or may be provided by downloading via a network such as the Internet.
[0086] In the embodiment, an example has been described in which a limit is set on the amount of excess withdrawals from each bank. In addition to this, or instead of this, a limit may be set on the amount of excess deposits.
[0087] In the embodiment, the excess amount management system 1 processes messages related to remittances between banks, but the excess amount management system 1 may also include organizations such as companies other than banks as the source or destination of messages. Alternatively, messages are not limited to those related to remittances, and may be related to the buying and selling of goods or services. In this case, the excess amount is not limited to those related to monetary amounts, and may be those related to quantities, weights, etc. [Explanation of symbols]
[0088] 1... Excess amount management system, 2... Bank, 11... AP server, 12... DB server, 112... Reception means, 113... Determination means, 114... First writing means, 115... Second writing means, 116, 122, 201... Communication means, 121... Storage means, 200... Bank server, 911... Transaction processing unit, 912... Database, 913... Update unit, 1211... Management table, 1212... Excess amount table, 1213... History table, 1214... Temporary history table, 1215... Flag table
Claims
1. a storage means for storing an excess amount table in which at least the excess amount of withdrawals for each of a plurality of financial institutions is stored for a plurality of transactions relating to remittances from a sending bank to a receiving bank among the plurality of financial institutions, and a history table in which at least a portion of the plurality of transactions is stored; an accepting means for accepting a plurality of new transactions via a plurality of logical paths; a determination unit that refers to the excess amount table and the history table for each of the new transactions and determines whether or not the excess amount exceeds a credit limit as a result of the withdrawal; a first writing means for writing the transaction into the history table when it is determined that the excess amount does not exceed the limit amount; An information processing system having the above configuration.
2. The first writing means includes: For transactions related to financial institutions among the plurality of financial institutions, in which the excess amount exceeds a predetermined reference amount that is lower than the limit amount, the transaction is written into a provisional history table before being written into the history table; For each of the multiple transactions written in the provisional history table, the excess amount table and the history table are referenced, and if it is determined that the excess amount does not exceed the limit as a result of the withdrawal, the transaction is written in the history table. The information processing system according to claim 1 .
3. When it is determined that the excess amount of the withdrawal exceeds the limit amount, the first writing means discards the transaction without writing it in the history table. The information processing system according to claim 1 .
4. The limit is set for each financial institution. The information processing system according to claim 1 .
5. The reference amount is set for each financial institution. The information processing system according to claim 2 .
6. A second writing means for writing an updated excess amount calculated from a plurality of transactions stored in the history table to the excess amount table at a predetermined update interval. The information processing system according to claim 1 .
7. The update interval is set for each financial institution.
7. The information processing system according to claim 6.
8. storing an excess amount table in which at least the excess amount of withdrawals is stored for each of a plurality of transactions relating to remittances from a sending bank to a receiving bank among a plurality of financial institutions, and a history table in which at least a portion of the plurality of transactions is stored; accepting a plurality of new transactions via a plurality of logical paths; referring to the excess amount table and the history table for each of the new transactions to determine whether or not the excess amount will exceed a credit limit as a result of the withdrawal; if it is determined that the excess amount does not exceed the limit amount, writing the transaction into the history table; Method for having
9. storing an excess amount table in which at least the excess amount of withdrawals is stored for each of a plurality of transactions relating to remittances from a sending bank to a receiving bank among a plurality of financial institutions, and a history table in which at least a portion of the plurality of transactions is stored; accepting a plurality of new transactions via a plurality of logical paths; referring to the excess amount table and the history table for each of the new transactions to determine whether or not the excess amount will exceed a credit limit as a result of the withdrawal; if it is determined that the excess amount does not exceed the limit amount, writing the transaction into the history table; A program that executes.
Citation Information
Patent Citations
Data utilization system
JP2014112385A