JP2011204148A - Settlement-order determining system, method and program - Google Patents

Settlement-order determining system, method and program Download PDF

Info

Publication number
JP2011204148A
JP2011204148A JP2010073068A JP2010073068A JP2011204148A JP 2011204148 A JP2011204148 A JP 2011204148A JP 2010073068 A JP2010073068 A JP 2010073068A JP 2010073068 A JP2010073068 A JP 2010073068A JP 2011204148 A JP2011204148 A JP 2011204148A
Authority
JP
Japan
Prior art keywords
transaction
settlement
order
settlement order
trial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010073068A
Other languages
Japanese (ja)
Inventor
Kaoru Matsushita
かおる 松下
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mizuho Information and Research Institute Inc
Original Assignee
Mizuho Information and Research Institute Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mizuho Information and Research Institute Inc filed Critical Mizuho Information and Research Institute Inc
Priority to JP2010073068A priority Critical patent/JP2011204148A/en
Publication of JP2011204148A publication Critical patent/JP2011204148A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To efficiently decide the settlement order that allows consecutive settlements of a plurality of transactions by a small number of trials.SOLUTION: In the settlement order determining system, a trial of a settlement for a transaction with a settlement order N (N is an integer not less than 1, and not more than L) is performed, and when the trial is successful, balance information stored in a balance information storage part is updated by assuming that the settlement of the N-th transaction is decided. When the trial results in a failure, it is assumed that the settlement of the N-th transaction is not carried out, and execution of settlements of transactions ranging from a first one to an L-th one as concerns N are carried out, repeatedly. If the execution result shows the presence of a transaction with a failed trial before the settlement order of a transaction with a successful trial, a settlement order storage part is updated so that the settlement order in all transactions with a failed trial becomes M+1 or after when the number of all transactions with a successful trial is M (M is an integer which is not less than "1" and less than L). After updating, settlements of transactions are repeatedly carried out, from M+1 through L as concerns N.

Description

本発明は、決済順序確定システム、方法及びプログラムに関し、特に、債券等の複数の取引を連続して決済する場合に決済可能な決済順序を確定する決済順序確定システム、方法及びプログラムに関する。   The present invention relates to a settlement order determination system, method, and program, and more particularly, to a settlement order determination system, method, and program for determining a settlement order that can be settled when a plurality of transactions such as bonds are settled continuously.

近年、債券等のペーパーレス化に伴い、物理的な券面を発行せず、所定の機関において保有者、銘柄名及び額面等の管理が行われるようになった。そして、これらの管理が情報システム化されることにより、取引後の受渡し決済時に券面の移動を伴わないため、省力化やコストの軽減が図れるようになった。   In recent years, with the paperlessness of bonds, etc., management of holders, brand names, face values, etc. has been carried out at a predetermined institution without issuing physical bill faces. And, since these managements are made into an information system, it is possible to save labor and reduce costs because the ticket face does not move at the time of settlement after delivery.

特許文献1には、同一銘柄で異額面の債券取引におけるネッティング決済を可能とするネッティング決済システムに関する技術が開示されている。特許文献1にかかるネッティング決済システムは、二者による債券取引に関する取引関連データを入力する取引関連データ入力手順と、入力された取引関連データの中から同一銘柄の受け渡しの組合せを抽出する同一銘柄受け渡し抽出手順と、抽出された受け渡しの組合せの中から相殺すべき受け渡しの組合せたる相殺組合せを抽出する相殺抽出手順と、抽出された相殺組合せを決済演算可能な決済演算手順と、決済演算された結果を決済明細として出力する決済明細出力手順とを備える。特に、前記相殺抽出手順は、異額面の債券の受け渡しの組合せを含む相殺組合せを抽出可能とする。   Patent Document 1 discloses a technique related to a netting settlement system that enables netting settlement in bond transactions of the same brand and different face value. The netting settlement system according to Patent Document 1 is a transaction related data input procedure for inputting transaction related data related to bond transactions between two parties, and the same brand delivery for extracting a combination of delivery of the same brand from the entered transaction related data. An extraction procedure, an offset extraction procedure for extracting an offset combination as a delivery combination to be offset from the extracted delivery combinations, a settlement calculation procedure capable of performing settlement operation on the extracted offset combination, and a result of settlement operation A payment details output procedure for outputting the payment details as a payment details. In particular, the offset extraction procedure makes it possible to extract an offset combination including a combination of delivery of bonds with different face values.

特開2002−352171号公報JP 2002-352171 A

債券等の取引の中には、所定期間内に請求された複数の取引の請求を所定の期日又は時間に一括して決済を行うものがある。例えば、日中であれば取引の請求毎に即時に決済が行われるが、夜間に取引をまとめて受け付けて、翌朝までに決済を行う場合などである。ここで、債券等の取引の決済は、取引元の口座から取引先の口座へ金融商品の取引額を移動させることである。そして、取引額に比べて取引元の口座に債券等の残高が不足している場合は、決済を行うことができない。また、複数の取引の決済を一括して行う場合、ある取引における決済により口座の残高が変更することに伴い、他の取引の決済の可否が影響を受ける場合がある。つまり、決済の順序により、取引における決済の可否の結果が異なる場合がある。そのため、ある口座が複数の取引に関係している場合、これらの取引をまとめて取引グループとして扱うことが必要である。そして、複数の取引の決済を一括して行う場合、取引グループに含まれる複数の取引について所定の決済順序により直列に決済を行い、取引グループ内の全ての取引が決済可能である場合に、当該取引グループについて、一括して決済が可能と判断することができる。   Some transactions of bonds, etc., collectively settle a plurality of transactions charged within a predetermined period on a predetermined date or time. For example, in the case of daytime, payment is made immediately every time a transaction is charged, but in the case where transactions are accepted at night and payment is made by the next morning. Here, settlement of transactions such as bonds is to move the transaction amount of the financial product from the account of the transaction source to the account of the transaction destination. If the balance of bonds, etc. is insufficient in the transaction source account compared to the transaction amount, settlement cannot be performed. Further, when settlement of a plurality of transactions is performed at once, the availability of settlement of other transactions may be affected as the account balance changes due to settlement in a certain transaction. That is, depending on the order of settlement, the result of whether or not settlement is possible in the transaction may differ. Therefore, when an account is related to a plurality of transactions, it is necessary to treat these transactions together as a transaction group. And when settlement of multiple transactions is performed in a lump, when a plurality of transactions included in a transaction group are settled in series in a predetermined settlement order and all transactions in the transaction group can be settled, It can be determined that the transaction group can be settled together.

例えば、取引グループに含まれる複数の取引について、決済順序の組み合わせを総当たりで試行することにより、決済可能な決済順序を検出することも可能である。この場合、取引グループに含まれる取引数に伴う計算量の増加が著しい。債券等における取引の請求は、一時期に集中する傾向があり、取引額は数千億円にのぼる場合もある。また、取引グループ内の取引の関係は複雑であるため、決済可能な決済順序を検出するには、複雑な処理を必要とし、時間がかかるという問題がある。   For example, for a plurality of transactions included in a transaction group, it is possible to detect a settlement order that can be settled by trying combinations of settlement orders with brute force. In this case, the increase in the amount of calculations accompanying the number of transactions included in the transaction group is significant. Bills for transactions in bonds, etc. tend to be concentrated at one time, and the amount of transactions can amount to several hundred billion yen. In addition, since the relationship of transactions within a transaction group is complicated, there is a problem that it takes time to detect a settlement order that can be settled and it takes time.

ここで、債券等における大部分の取引グループにおける取引の関係には、様々なパターンが存在するが、大部分の取引グループについては、単純なパターンが多く含まれ、複雑なパターンが全体に占める割合は少ないという特徴がある。   Here, there are various patterns in the relationship of transactions in most transaction groups such as bonds, but most of the transaction groups include many simple patterns and the ratio of complex patterns to the total There are few features.

本発明は、このような問題を解決するためになされたものであり、複数の取引を連続して決済する場合に、決済可能な決済順序について、少ない試行回数により効率的に確定するための決済順序確定システム、方法及びプログラムを提供することを目的とする。   The present invention has been made to solve such a problem, and in the case where a plurality of transactions are successively settled, a settlement for efficiently confirming a settlement order that can be settled with a small number of trials. An object is to provide an order determination system, method and program.

本発明の第1の態様にかかる決済順序確定システムは、取引グループに含まれるL(Lは、3以上の整数)個の取引における決済可能な決済順序を確定する決済順序確定システムであって、前記取引に関わる口座の残高情報を記憶する残高情報記憶部(例えば、本発明の実施の形態1にかかる口座情報記憶部32)と、前記取引グループに含まれる各取引における決済順序を記憶する決済順序記憶部(例えば、本発明の実施の形態1にかかる取引情報記憶部33)と、前記取引における前記決済順序を確定する処理を制御する制御部と、を備え、前記制御部は、前記決済順序記憶部に格納された決済順序に基づき、前記取引グループに含まれる取引の決済を試行することにより前記決済順序を調整する第1の決済順序調整手段と、前記第1の決済順序調整手段により調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、当該決済順序を決済可能な順序として確定する確定手段と、を備え、前記第1の決済順序調整手段は、前記残高情報記憶部及び前記決済順序記憶部を参照し、前記決済順序がN(Nは、1以上かつL以下の整数)番目の取引の決済を試行する取引決済試行手段と、前記取引決済試行手段による試行が成功した場合に、当該N番目の取引の決済が確定したと仮定して前記残高情報記憶部に格納された残高情報を更新し、当該試行が失敗した場合には、当該N番目の取引の決済が行われなかったものとする残高情報更新手段と、Nが1からLまでの間、前記取引決済試行手段による処理及び前記残高情報更新手段による処理を繰り返し実行する第1の繰り返し実行手段と、前記第1の繰り返し実行手段による実行の結果、前記試行が成功した取引における決済順序以前に、前記試行が失敗した取引が存在する場合、前記試行が失敗した全ての取引における決済順序が、前記試行が成功した取引の全てであるM個(Mは、1以上かつL未満の整数)の取引における決済順序より後の順序であるM+1以降となるように前記決済順序記憶部を更新する決済順序更新手段と、前記決済順序更新手段による更新後に、NがM+1からLまでの間、前記取引決済試行手段による処理及び前記残高情報更新手段による処理を繰り返し実行する第2の繰り返し実行手段と、を含む。   The settlement order confirmation system according to the first aspect of the present invention is a settlement order confirmation system for confirming a settlement order that can be settled in L (L is an integer of 3 or more) transactions included in a transaction group, A balance information storage unit (for example, the account information storage unit 32 according to the first embodiment of the present invention) that stores the balance information of the account related to the transaction, and a settlement that stores a settlement order in each transaction included in the transaction group An order storage unit (for example, transaction information storage unit 33 according to the first embodiment of the present invention), and a control unit that controls processing for determining the settlement order in the transaction, the control unit including the settlement First settlement order adjusting means for adjusting the settlement order by trying to settle a transaction included in the transaction group based on the settlement order stored in the order storage unit; A confirmation means for confirming the settlement order as an order that can be settled when the trial of settlement of all transactions included in the transaction group is successful by the settlement order adjusted by the settlement order adjustment means, The first settlement order adjusting means refers to the balance information storage unit and the settlement order storage unit, and is a transaction settlement that tries to settle a transaction with the settlement order N (N is an integer not less than 1 and not more than L). When the trial by the trial means and the transaction settlement trial means is successful, the balance information stored in the balance information storage unit is updated on the assumption that the settlement of the Nth transaction is confirmed, and the trial fails. In such a case, the balance information update means that the Nth transaction has not been settled, and the process by the transaction settlement trial means and the process by the balance information update means while N is from 1 to L. As a result of the execution by the first repeated execution means, there is a transaction in which the trial has failed before the settlement order in the transaction in which the trial has been successful. The settlement order in all failed transactions is M + 1 or later, which is an order after the settlement order in M transactions (M is an integer of 1 or more and less than L) that are all successful transactions. The settlement order update means for updating the settlement order storage unit, and after the update by the settlement order update means, the process by the transaction settlement trial means and the process by the balance information update means are repeated while N is from M + 1 to L. Second repetitive execution means to be executed.

また、前記確定手段により前記決済順序が決済可能な順序として確定されなかった場合に、前記残高情報記憶部及び前記決済順序記憶部を参照し、前記取引グループに含まれる全ての取引の決済が確定したと仮定した場合の口座当たりの残高を算出し、算出された残高が所定値以下となる口座について、残高が所定値となる取引額を加算して前記残高情報記憶部に格納された残高情報を補正する残高情報補正手段と、前記残高情報補正手段により補正された残高情報を用いて、前記決済順序記憶部に格納された決済順序に基づき、前記第1の決済順序調整手段により前記試行が失敗した全ての取引についての決済を試行することにより前記決済順序を調整する第2の決済順序調整手段と、をさらに備え、前記確定手段は、前記第2の決済順序調整手段により調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、前記第1の決済順序調整手段により前記試行が成功した最後の取引の決済順序までを決済可能な順序としてさらに確定することが望ましい。   In addition, when the settlement order is not confirmed as an order that can be settled by the confirmation unit, the settlement of all transactions included in the transaction group is confirmed with reference to the balance information storage unit and the settlement order storage unit. The balance information stored in the balance information storage unit is calculated by calculating the balance per account in the case where it is assumed that the calculated balance is equal to or less than a predetermined value and adding the transaction amount where the balance is a predetermined value. Using the balance information corrected by the balance information correction means, and the balance information corrected by the balance information correction means, based on the payment order stored in the payment order storage unit, the trial is adjusted by the first payment order adjustment means. Second settlement order adjustment means for adjusting the settlement order by trying settlement for all failed transactions, and the confirmation means includes the second settlement order. When the settlement of all transactions included in the transaction group succeeds due to the settlement order adjusted by the adjustment unit, the settlement sequence of the last transaction for which the trial was successful by the first settlement order adjustment unit. It is desirable to further determine the order in which settlement is possible.

また、前記確定手段により前記決済順序が決済可能な順序として確定されなかった場合に、前記取引グループに含まれる各取引から、取引元の口座が当該取引グループ内の他の取引の取引先の口座と一致しない取引である始点取引と、取引先の口座が当該取引グループ内の他の取引の取引元の口座と一致しない取引である終点取引とを選択する端点取引選択手段と、前記始点取引における決済順序を、最初の順序として前記決済順序記憶部を更新し、当該始点取引の決済が確定したと仮定して前記残高情報記憶部に格納された残高情報を更新し、前記終点取引における決済順序を、最後の順序として前記決済順序記憶部を更新する端点取引処理手段と、前記端点取引処理手段により更新された決済順序に基づき、前記取引グループの内、前記始点取引及び前記終点取引を除いた取引についての決済を試行することにより前記決済順序を調整する第3の決済順序調整手段と、をさらに備え、前記確定手段は、前記第3の決済順序調整手段により調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、前記決済順序記憶部に格納された決済順序を決済可能な順序として確定することが望ましい。   Further, when the settlement order is not confirmed as the order in which the settlement can be made by the confirmation unit, the account of the transaction source is the account of the other business partner in the transaction group from each transaction included in the transaction group. An end point transaction selecting means for selecting a start point transaction that is a transaction that does not match the transaction and an end point transaction that is a transaction in which the account of the customer does not match the account of the other transaction source in the transaction group; Update the settlement order storage unit with the settlement order as the first order, update the balance information stored in the balance information storage unit on the assumption that the settlement of the starting transaction has been confirmed, and settle the settlement order in the end point transaction , Based on the settlement order updated by the endpoint transaction processing means, the endpoint transaction processing means for updating the settlement order storage unit as the last order, And third settlement order adjustment means for adjusting the settlement order by trying settlement for transactions excluding point transactions and end-point transactions, and the confirmation means includes the third settlement order adjustment means. It is desirable that the settlement order stored in the settlement order storage unit is determined as an order that can be settled when the settlement trials of all the transactions included in the transaction group are successful by the settlement order adjusted by the above.

さらに、前記第3の決済順序調整手段により試行が失敗した取引に含まれる口座から、自己が前記取引先の口座となる取引が存在し、かつ、自己が前記取引元の口座となる取引が2以上存在する口座を選択する起点口座選択手段と、前記起点口座選択手段により選択された口座が前記取引元の口座となる取引である2以上の起点取引の決済順序における先後関係を入れ替えて前記決済順序記憶部を更新する起点取引処理手段と、をさらに備え、前記第3の決済順序調整手段は、前記起点取引処理手段により更新された決済順序に基づき、前記取引グループの内、前記始点取引及び前記終点取引を除いた取引についての決済を試行することにより前記決済順序を調整することが望ましい。   Further, there is a transaction in which the self is the account of the customer from the accounts included in the transaction for which the trial has failed by the third settlement order adjustment means, and there are 2 transactions in which the self is the account of the transaction source. The settlement by selecting the origin account selection means for selecting the existing account, and the settlement relationship in the settlement order of two or more origin transactions that are transactions in which the account selected by the origin account selection means is the account of the transaction source Starting transaction processing means for updating the order storage unit, wherein the third settlement order adjustment means is based on the settlement order updated by the origin transaction processing means, and the starting transaction and It is desirable to adjust the settlement order by trying to settle a transaction excluding the end point transaction.

また、前記確定手段は、前記第3の決済順序調整手段により調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、前記第1の決済順序調整手段により前記試行が成功した最後の取引の決済順序までを決済可能な順序として確定するとよい。   In addition, when the settlement attempt of all the transactions included in the transaction group is successful by the settlement order adjusted by the third settlement order adjustment unit, the determination unit performs the first settlement order adjustment unit. It is preferable that the settlement order of the last transaction for which the trial has been successful is determined as the order in which settlement is possible.

さらに、取引元の口座から取引先の口座へ所定額を決済するための複数の取引を外部から受け付け、受け付けた複数の取引の中から、前記取引先の口座又は前記取引元の口座の少なくとも一方の口座が他の取引と共通する取引を選択し、選択した取引の集合を前記取引グループとして生成する取引グループ生成手段をさらに備え、前記第1の決済順序調整手段は、前記取引グループ生成手段により生成された取引グループに対して、前記決済順序を調整するとよい。   Further, a plurality of transactions for settlement of a predetermined amount from a trading partner account to a trading partner account are accepted from the outside, and at least one of the trading partner account or the trading partner account from among the plurality of accepted transactions A transaction group generating unit that selects a transaction that is common to other transactions and generates a set of the selected transactions as the transaction group, and the first settlement order adjustment unit includes: The settlement order may be adjusted for the generated transaction group.

さらに、前記残高情報補正手段は、前記取引が券種及び枚数により定まる債券における取引である場合に、前記取引グループに含まれる口座の残高における債券の券種及び枚数に基づき、前記口座当たりの残高を算出するとよい。   Further, the balance information correction means, when the transaction is a transaction on a bond determined by a ticket type and the number of sheets, based on the bond type and number of bonds in the account balance included in the transaction group, the balance per account Should be calculated.

本発明の第2の態様にかかる決済順序確定方法は、取引に関わる口座の残高情報を記憶する残高情報記憶部(例えば、本発明の実施の形態1にかかる口座情報記憶部32)と、取引グループに含まれるL(Lは、3以上の整数)個の取引における決済順序を記憶する決済順序記憶部(例えば、本発明の実施の形態1にかかる取引情報記憶部33)と、前記取引における前記決済順序を確定する処理を制御する制御部と、を備えるコンピュータにおける前記取引グループに含まれる各取引における決済可能な決済順序を確定する処理を制御するための決済順序確定方法であって、前記制御部において、前記決済順序記憶部に格納された決済順序に基づき、前記取引グループに含まれる取引の決済を試行することにより前記決済順序を調整する第1の決済順序調整ステップと、前記第1の決済順序調整ステップにより調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、当該決済順序を決済可能な順序として確定する確定ステップと、を含み、前記第1の決済順序調整ステップは、前記残高情報記憶部及び前記決済順序記憶部を参照し、前記決済順序がN(Nは、1以上かつL以下の整数)番目の取引の決済を試行する取引決済試行ステップと、前記取引決済試行ステップによる試行が成功した場合に、当該N番目の取引の決済が確定したと仮定して前記残高情報記憶部に格納された残高情報を更新し、当該試行が失敗した場合には、当該N番目の取引の決済が行われなかったものとする残高更新ステップと、Nが1からLまでの間、前記取引決済試行ステップ及び前記残高更新ステップを繰り返し実行する第1の繰り返し実行ステップと、前記第1の繰り返し実行ステップによる実行の結果、前記試行が成功した取引における決済順序以前に、前記試行が失敗した取引が存在する場合、前記試行が失敗した全ての取引における決済順序が、前記試行が成功した取引の全てであるM個(Mは、1以上かつL未満の整数)の取引における決済順序より後の順序であるM+1以降となるように前記決済順序記憶部を更新する決済順序更新ステップと、前記決済順序更新ステップによる更新後に、NがM+1からLまでの間、前記取引決済試行ステップ及び前記残高更新ステップを繰り返し実行する第2の繰り返し実行ステップと、を含む。   The settlement order confirmation method according to the second aspect of the present invention includes a balance information storage unit (for example, the account information storage unit 32 according to the first embodiment of the present invention) that stores balance information of accounts related to transactions, A settlement order storage unit (for example, the transaction information storage unit 33 according to the first embodiment of the present invention) that stores settlement orders in L (L is an integer of 3 or more) transactions included in the group; A settlement order determination method for controlling a process for determining a settlement order that can be settled in each transaction included in the transaction group in a computer comprising: a control unit that controls a process for determining the settlement order; The control unit adjusts the settlement order by trying to settle the transactions included in the transaction group based on the settlement order stored in the settlement order storage unit. When the settlement order of all transactions included in the transaction group is successful by the settlement order adjustment step and the settlement order adjusted by the first settlement order adjustment step, the settlement order is set as an order that can be settled. The first settlement order adjustment step refers to the balance information storage unit and the settlement order storage unit, and the settlement order is N (N is an integer greater than or equal to 1 and less than or equal to L). ) When the transaction settlement trial step for attempting settlement of the transaction and the trial by the transaction settlement trial step is successful, it is stored in the balance information storage unit on the assumption that the settlement of the Nth transaction is confirmed. The balance information is updated, and if the trial fails, the balance update step in which the N-th transaction has not been settled; As a result of execution by the first repeated execution step for repeatedly executing the withdrawal settlement trial step and the balance update step and the first repeated execution step, the trial failed before the settlement order in the transaction in which the trial was successful. If there is a transaction, the settlement order in all transactions where the trial fails is later than the settlement order in M transactions (M is an integer greater than or equal to 1 and less than L) that are all successful transactions. A settlement order update step for updating the settlement order storage unit so that the order is M + 1 or later, and after the update by the settlement order update step, during the period from N to M + 1 to L, the transaction settlement trial step and the balance A second repetitive execution step of repeatedly executing the update step.

本発明の第3の態様にかかる決済順序確定プログラムは、取引に関わる口座の残高情報を記憶する残高情報記憶部(例えば、本発明の実施の形態1にかかる口座情報記憶部32)と、取引グループに含まれるL(Lは、3以上の整数)個の取引における決済順序を記憶する決済順序記憶部(例えば、本発明の実施の形態1にかかる取引情報記憶部33)と、前記取引における前記決済順序を確定する処理を制御する制御部と、を備えるコンピュータに、前記取引グループに含まれる各取引における決済可能な決済順序を確定する処理を実行させる決済順序確定プログラムであって、前記決済順序記憶部に格納された決済順序に基づき、前記取引グループに含まれる取引の決済を試行することにより前記決済順序を調整する第1の決済順序調整処理と、前記第1の決済順序調整処理により調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、当該決済順序を決済可能な順序として確定する確定処理と、を含み、前記第1の決済順序調整処理は、前記残高情報記憶部及び前記決済順序記憶部を参照し、前記決済順序がN(Nは、1以上かつL以下の整数)番目の取引の決済を試行する取引決済試行処理と、前記取引決済試行処理による試行が成功した場合に、当該N番目の取引の決済が確定したと仮定して前記残高情報記憶部に格納された残高情報を更新し、当該試行が失敗した場合には、当該N番目の取引の決済が行われなかったものとする残高更新処理と、Nが1からLまでの間、前記取引決済試行処理及び前記残高更新処理を繰り返し実行する第1の繰り返し実行処理と、前記第1の繰り返し実行処理による実行の結果、前記試行が成功した取引における決済順序以前に、前記試行が失敗した取引が存在する場合、前記試行が失敗した全ての取引における決済順序が、前記試行が成功した取引の全てであるM個(Mは、1以上かつL未満の整数)の取引における決済順序より後の順序であるM+1以降となるように前記決済順序記憶部を更新する決済順序更新処理と、前記決済順序更新処理による更新後に、NがM+1からLまでの間、前記取引決済試行処理及び前記残高更新処理を繰り返し実行する第2の繰り返し実行処理と、を含む。   The settlement order determination program according to the third aspect of the present invention includes a balance information storage unit (for example, the account information storage unit 32 according to the first embodiment of the present invention) that stores balance information of an account related to a transaction, A settlement order storage unit (for example, the transaction information storage unit 33 according to the first embodiment of the present invention) that stores settlement orders in L (L is an integer of 3 or more) transactions included in the group; A settlement order determination program for causing a computer comprising a control unit for controlling a process for determining the settlement order to execute a process for determining a settlement order that can be settled in each transaction included in the transaction group. A first settlement order adjustment that adjusts the settlement order by trying settlement of transactions included in the transaction group based on the settlement order stored in the order storage unit And a confirmation process for determining the settlement order as an order that can be settled when the settlement trials of all transactions included in the transaction group are successful by the settlement order adjusted by the first settlement order adjustment process. The first settlement order adjustment process refers to the balance information storage unit and the settlement order storage unit, and the settlement order is Nth (N is an integer greater than or equal to 1 and less than L) transaction. If the transaction settlement trial process for trying the settlement of the transaction and the trial by the transaction settlement trial process are successful, the balance information stored in the balance information storage unit is assumed to be settled for the Nth transaction. And if the trial fails, the balance update process that the Nth transaction has not been settled, and the transaction settlement trial process and the balance update between N and 1 to L Repeat the process As a result of execution by the first repeated execution process to be executed and the first repeated execution process, if there is a transaction in which the trial has failed before the settlement order in the transaction in which the trial has been successful, the trial has failed. The settlement order in all transactions is M + 1 or later, which is an order after the settlement order in M transactions (M is an integer of 1 or more and less than L) that are all successful transactions. A payment order update process for updating the payment order storage unit, and a second repeated execution for repeatedly executing the transaction settlement trial process and the balance update process between N + 1 and L after the update by the settlement order update process Processing.

本発明によれば、複数の取引を連続して決済する場合に、決済可能な決済順序について、少ない試行回数により効率的に確定するための決済順序確定システム、方法及びプログラムを提供することができる。   According to the present invention, it is possible to provide a settlement order determination system, method, and program for efficiently determining a settlement order that can be settled with a small number of trials when a plurality of transactions are settled continuously. .

本発明の実施の形態1にかかる決済順序確定システムを含む全体構成を示すブロック図である。It is a block diagram which shows the whole structure containing the payment order confirmation system concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる口座情報の例を示す図である。It is a figure which shows the example of the account information concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる取引情報の例を示す図である。It is a figure which shows the example of the transaction information concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる決済順序確定システムの機能ブロック図である。It is a functional block diagram of the settlement order confirmation system concerning Embodiment 1 of the present invention. 本発明の実施の形態1にかかる決済順序確定システムのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the payment order confirmation system concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる決済順序確定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the payment order determination process concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる取引グループ生成処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the transaction group production | generation process concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる取引グループの例を示す図である。It is a figure which shows the example of the transaction group concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる決済順序調整処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the payment order adjustment process concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる取引グループ決済試行処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the transaction group payment trial process concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる決済試行処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the payment trial process concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる取引グループ決済試行処理の実行結果の例を示す図である。It is a figure which shows the example of the execution result of the transaction group payment trial process concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる取引グループ決済試行処理の実行結果の例を示す図である。It is a figure which shows the example of the execution result of the transaction group payment trial process concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる口座収支算出処理の実行結果の例を示す図である。It is a figure which shows the example of the execution result of the account balance calculation process concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる残高補正処理後の取引グループ決済試行処理の実行結果の例を示す図である。It is a figure which shows the example of the execution result of the transaction group payment trial process after the balance correction process concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる擬似ループ判定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the pseudo | simulation loop determination process concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる起点口座が選択される取引グループの例を示す図である。It is a figure which shows the example of the transaction group from which the origin account concerning Embodiment 1 of this invention is selected. 本発明の実施の形態1にかかる確定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the determination process concerning Embodiment 1 of this invention. 本発明の実施の形態2にかかる券種及び枚数を考慮した取引グループの例を示す図である。It is a figure which shows the example of the transaction group which considered the ticket type and number of sheets concerning Embodiment 2 of this invention. 本発明の実施の形態2にかかる券種及び枚数を考慮した口座収支の例を示す図である。It is a figure which shows the example of the account balance which considered the ticket kind and number of sheets concerning Embodiment 2 of this invention.

以下では、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。各図面において、同一要素には同一の符号が付されており、説明の明確化のため、必要に応じて重複説明は省略する。   Hereinafter, specific embodiments to which the present invention is applied will be described in detail with reference to the drawings. In the drawings, the same elements are denoted by the same reference numerals, and redundant description will be omitted as necessary for the sake of clarity.

<発明の実施の形態1>
図1は、本発明の実施の形態1にかかる決済順序確定システム3を含む全体構成を示すブロック図である。決済順序確定システム3は、ネットワーク2を介して、端末1a、1b、・・・1nと接続され、端末1a、1b、・・・1nから送信される複数の取引の請求を受け付け、所定期間内に受け付けた複数の取引について決済可能な決済順序を確定する決済順序確定処理を行う情報システムである。また、決済順序確定システム3は、決済が不可能な取引については、その旨を通知する。ここで、取引とは、取引元の口座から取引先の口座へ金融商品の取引額の移動又は債券等の権利の移転を定義したものとする。そして、取引の決済とは、取引額の移動又は債券等の権利の移転を実行することとする。また、決済順序とは、複数の取引について、取引の決済を実行する順序を示すものとする。
<Embodiment 1 of the Invention>
FIG. 1 is a block diagram showing an overall configuration including a settlement order determination system 3 according to the first embodiment of the present invention. The settlement order determination system 3 is connected to the terminals 1a, 1b,... 1n via the network 2 and accepts requests for a plurality of transactions transmitted from the terminals 1a, 1b,. It is an information system which performs the payment order decision process which decides the payment order which can be settled about the some transaction received in (1). In addition, the settlement order determination system 3 notifies that fact for transactions that cannot be settled. Here, “transaction” is defined as a transfer of a transaction amount of a financial product or a transfer of a right such as a bond from a transaction source account to a business partner account. The settlement of the transaction is a transfer of the transaction amount or a transfer of rights such as bonds. The settlement order indicates the order in which transaction settlement is executed for a plurality of transactions.

決済順序確定システム3は、汎用的なコンピュータシステムであり、取引における決済順序を確定する処理を制御する制御部31と、口座情報記憶部32と、取引情報記憶部33とを少なくとも備える。口座情報記憶部32は、口座ID321と、残高情報322とを関連付けて記憶する記憶装置である。ここでは、口座ID321は、取引に関わる口座を識別する情報である。また、残高情報322は、取引に関わる口座の取引可能な金額情報又は債券額である。尚、口座情報記憶部32は、言い換えると、取引に関わる口座の残高情報322を記憶する残高情報記憶部といえる。   The settlement order determination system 3 is a general-purpose computer system, and includes at least a control unit 31 that controls processing for determining a settlement order in transactions, an account information storage unit 32, and a transaction information storage unit 33. The account information storage unit 32 is a storage device that stores an account ID 321 and balance information 322 in association with each other. Here, the account ID 321 is information for identifying an account related to the transaction. The balance information 322 is information on the amount of money that can be traded in an account related to the transaction or the amount of bonds. In other words, the account information storage unit 32 can be said to be a balance information storage unit that stores account balance information 322 related to transactions.

ここで、図2は、本発明の実施の形態1にかかる口座情報の例を示す図である。図2では、30個の口座IDについてそれぞれ残高情報が関連付けられていることを示す。   Here, FIG. 2 is a figure which shows the example of the account information concerning Embodiment 1 of this invention. FIG. 2 shows that balance information is associated with each of 30 account IDs.

図1に戻り、取引情報記憶部33は、グループID331と、取引ID332と、取引元口座ID333と、取引先口座ID334と、取引額335と、決済順序336とを記憶する記憶装置である。グループID331は、取引グループを識別する情報である。ここで、取引グループは、取引先の口座又は取引元の口座の少なくとも一方の口座が他の取引と共通する取引の集合である。取引ID332は、取引を識別する情報である。取引元口座ID333は、口座ID321の内、取引における取引元の口座IDである。取引先口座ID334は、口座ID321の内、取引における取引先の口座IDである。取引額335は、取引において決済される金額情報又は債券額である。決済順序336は、取引の決済を実行する順序を示す情報である。例えば、決済順序336は、数値で表現される番号情報であり、番号の昇順又は降順に実行されるものとする。尚、決済順序336は、開始の番号は、任意であり、番号は連続している必要はない。また、決済順序336は、少なくとも取引グループ内で一意に順序が定まるものとする。または、決済順序336は、当該取引の直前又は直後に決済を実行する取引ID332であってもよい。尚、取引情報記憶部33は、言い換えると、取引グループに含まれる各取引における決済順序を記憶する決済順序記憶部といえる。また、取引は、取引ID332、取引元口座ID333、取引先口座ID334、取引額335及び決済順序336の組み合わせで表現される。そして、一つのグループID331には、複数の取引ID332が関連付けられている。   Returning to FIG. 1, the transaction information storage unit 33 is a storage device that stores a group ID 331, a transaction ID 332, a transaction account ID 333, a transaction account ID 334, a transaction amount 335, and a settlement order 336. The group ID 331 is information for identifying a transaction group. Here, a transaction group is a set of transactions in which at least one account of a customer's account or a transaction source account is common to other transactions. The transaction ID 332 is information for identifying a transaction. The transaction source account ID 333 is the account ID of the transaction source in the transaction among the account IDs 321. The customer account ID 334 is the account ID of the customer in the transaction among the account IDs 321. The transaction amount 335 is money amount information or a bond amount settled in the transaction. The settlement order 336 is information indicating the order in which transaction settlement is executed. For example, the settlement order 336 is number information expressed by numerical values, and is executed in ascending or descending order of the numbers. In the settlement order 336, the start number is arbitrary, and the numbers do not need to be consecutive. Further, it is assumed that the order of settlement 336 is uniquely determined at least within the transaction group. Alternatively, the settlement order 336 may be a transaction ID 332 that performs settlement immediately before or after the transaction. In other words, the transaction information storage unit 33 can be said to be a settlement order storage unit that stores a settlement order in each transaction included in the transaction group. The transaction is represented by a combination of a transaction ID 332, a transaction source account ID 333, a transaction account ID 334, a transaction amount 335, and a settlement order 336. A single group ID 331 is associated with a plurality of transaction IDs 332.

ここで、図3は、本発明の実施の形態1にかかる取引情報の例を示す図である。図3では、図2の口座が取引元又は取引先の口座となった28個の取引IDについて取引元口座ID、取引先口座ID、取引額及び決済順序が関連付けられていることを示し、各取引IDは、6個のグループIDのいずれかに関連付けられていることを示す。   Here, FIG. 3 is a figure which shows the example of the transaction information concerning Embodiment 1 of this invention. In FIG. 3, it is shown that the account ID of the transaction source, the transaction account ID, the transaction amount, and the settlement order are associated with each of the 28 transaction IDs in which the account of FIG. The transaction ID indicates that it is associated with one of the six group IDs.

図1に戻り、端末1a、1b、・・・1nは、キーボードやマウス等の入力装置(不図示)と、画面等の表示装置(不図示)と通信機能を備える端末装置である。そして、端末1a、1b、・・・1nは、ネットワーク2を介して、任意のタイミングで取引に関する情報を決済順序確定システム3へ送信する。また、ネットワーク2は、インターネット、公衆網、専用線及び移動体通信網等の通信ネットワークである。   Returning to FIG. 1, the terminals 1a, 1b,..., 1n are input devices (not shown) such as a keyboard and a mouse, a display device (not shown) such as a screen, and a terminal device having a communication function. Then, the terminals 1a, 1b,... 1n transmit information related to the transaction to the settlement order determination system 3 through the network 2 at an arbitrary timing. The network 2 is a communication network such as the Internet, a public network, a dedicated line, and a mobile communication network.

尚、口座情報記憶部32及び取引情報記憶部33は、ハードディスクドライブ、フラッシュメモリ等の不揮発性の記憶装置であることが望ましい。   The account information storage unit 32 and the transaction information storage unit 33 are preferably non-volatile storage devices such as a hard disk drive and a flash memory.

図4は、本発明の実施の形態1にかかる決済順序確定システム3の機能ブロック図である。決済順序確定システム3は、取引グループに含まれるL(Lは、3以上の整数)個の取引における決済可能な決済順序を確定する情報システムである。決済順序確定システム3は、取引グループ生成手段340と、取引グループ決済試行手段350と、残高情報補正手段360と、擬似ループ判定手段370と、確定手段380とを備える。   FIG. 4 is a functional block diagram of the settlement order determination system 3 according to the first embodiment of the present invention. The settlement order determination system 3 is an information system that determines a settlement order that can be settled in L (L is an integer of 3 or more) transactions included in a transaction group. The settlement order determination system 3 includes a transaction group generation unit 340, a transaction group settlement trial unit 350, a balance information correction unit 360, a pseudo loop determination unit 370, and a determination unit 380.

取引グループ生成手段340は、端末1a、1b、・・・1nからネットワーク2を介して、複数の取引を外部から受け付け、受け付けた複数の取引の中から、取引先の口座又は取引元の口座の少なくとも一方の口座が他の取引と共通する取引を選択し、選択した取引の集合を取引グループとして生成する。これにより、大量の取引について複数の取引グループに分けて効率的に決済順序を確定することができる。尚、このとき、取引グループ生成手段340は、取引グループ内の各取引について決済順序を初期設定するとよい。   The transaction group generation means 340 accepts a plurality of transactions from the outside via the network 2 from the terminals 1a, 1b,..., 1n, and selects the account of the customer or the account of the transaction source from the received transactions. A transaction in which at least one account is common to other transactions is selected, and a set of the selected transactions is generated as a transaction group. Thereby, it is possible to divide a large number of transactions into a plurality of transaction groups and to efficiently determine the settlement order. At this time, the transaction group generation means 340 may initialize the settlement order for each transaction in the transaction group.

取引グループ決済試行手段350は、取引情報記憶部33に格納された決済順序336に基づき、取引グループに含まれる取引の決済を試行することにより決済順序を調整する。つまり、取引グループ決済試行手段350は、取引グループ生成手段340により生成された取引グループに対して設定された決済順序を調整する。尚、取引グループは、取引グループ生成手段340により生成されたものの代わりに、予め定められたものを対象としてもよい。また、取引グループ決済試行手段350は、取引決済試行手段351と、残高情報更新手段352と、繰り返し実行手段353と、決済順序更新手段354とを備える。   The transaction group settlement trial means 350 adjusts the settlement order by trying settlement of transactions included in the transaction group based on the settlement order 336 stored in the transaction information storage unit 33. That is, the transaction group settlement trial unit 350 adjusts the settlement order set for the transaction group generated by the transaction group generation unit 340. Note that the transaction group may be a predetermined one instead of the one generated by the transaction group generation unit 340. Further, the transaction group settlement trial unit 350 includes a transaction settlement trial unit 351, a balance information update unit 352, a repeated execution unit 353, and a settlement order update unit 354.

取引決済試行手段351は、口座情報記憶部32及び取引情報記憶部33を参照し、決済順序336がN(Nは、1以上かつL以下の整数)番目の取引の決済を試行する。残高情報更新手段352は、取引決済試行手段351による試行が成功した場合に、当該N番目の取引の決済が確定したと仮定して口座情報記憶部32に格納された残高情報322を更新し、当該試行が失敗した場合には、当該N番目の取引の決済が行われなかったものとする。繰り返し実行手段353は、取引情報記憶部33に格納された決済順序336に従い、例えば、Nが1からLまでの間、取引決済試行手段351による処理及び残高情報更新手段352による処理を繰り返し実行する。   The transaction settlement trial unit 351 refers to the account information storage unit 32 and the transaction information storage unit 33 and tries settlement of a transaction whose settlement order 336 is N (N is an integer of 1 or more and L or less). When the trial by the transaction settlement trial unit 351 is successful, the balance information update unit 352 updates the balance information 322 stored in the account information storage unit 32 on the assumption that settlement of the Nth transaction is confirmed, If the trial fails, it is assumed that the Nth transaction has not been settled. The repetitive execution means 353 repeatedly executes the process by the transaction settlement trial means 351 and the process by the balance information update means 352 according to the settlement order 336 stored in the transaction information storage unit 33, for example, when N is from 1 to L. .

決済順序更新手段354は、繰り返し実行手段353による実行の結果、試行が成功した取引における決済順序以前に、試行が失敗した取引が存在する場合、試行が失敗した全ての取引における決済順序が、試行が成功した取引の全てであるM個(Mは、1以上かつL未満の整数)の取引における決済順序より後の順序であるM+1以降となるように取引情報記憶部33を更新する。そして、繰り返し実行手段353は、決済順序更新手段354による更新後に、NがM+1からLまでの間、取引決済試行手段351による処理及び残高情報更新手段352による処理を繰り返し実行する。   As a result of the execution by the repeated execution means 353, the settlement order update unit 354 determines that the settlement order in all transactions for which the trial has failed is a trial if there is a transaction for which the trial has failed before the settlement order in the transaction for which the trial has been successful. The transaction information storage unit 33 is updated so that it becomes M + 1 or later, which is the order after the settlement order in the M transactions (M is an integer of 1 or more and less than L) that are all successful transactions. The repetitive execution unit 353 repeatedly executes the process by the transaction settlement trial unit 351 and the process by the balance information update unit 352 while N is from M + 1 to L after being updated by the settlement order update unit 354.

確定手段380は、取引グループ決済試行手段350により調整された決済順序により取引グループに含まれる全ての取引の決済の試行が成功する場合に、当該決済順序を決済可能な順序として確定する。   The confirmation unit 380 determines the settlement order as an order that can be settled when trials for settlement of all transactions included in the transaction group are successful by the settlement order adjusted by the transaction group settlement trial unit 350.

このように、少なくとも上述した取引グループ決済試行手段350及び確定手段380を実行することにより、1巡目の試行では、初期設定された決済順序に基づき、各取引についての決済が試行され、試行が成功した取引の残高については、随時、決済後の残高に更新する。そして、更新後の残高を用いて以降の決済順序における取引が試行される。そして、1巡目の試行が終了した後に、試行が成功した取引及び試行が失敗した取引がそれぞれ存在し、かつ、最初の失敗以後に1以上の成功がある場合、言い換えると、最後の成功以前に1以上の失敗がある場合に、決済順序の更新及び2巡目の試行が行われる。決済順序更新手段354では、少なくとも試行が失敗した取引の決済順序を、試行が成功した全ての取引の決済順序より後の順序とする。   In this way, by executing at least the transaction group settlement trial unit 350 and the confirmation unit 380 described above, in the first round trial, settlement for each transaction is attempted based on the initially set settlement order. The balance of a successful transaction is updated to the balance after settlement from time to time. Then, a transaction in the subsequent settlement order is tried using the updated balance. And after the first round of trials, if there is a successful transaction and a failed transaction, and there is one or more successes after the first failure, in other words, before the last success If there is one or more failures in the transaction, the settlement order is updated and the second round is attempted. In the settlement order updating means 354, at least the settlement order of the transaction for which the trial has failed is set as the order after the settlement order of all the transactions for which the trial has been successful.

そして、2巡目の試行では、試行が失敗した取引のみについて、更新した決済順序に基づき決済が試行される。このとき、1巡目における試行が成功した取引における口座の残高は更新されており、2巡目の開始時点の条件は1巡目の開始時点とは条件が異なるため、1巡目にて最後の成功以前に試行が失敗した取引については、2巡目において試行が成功する可能性がある。これにより、初期設定とは異なる決済順序により試行を行ったこととなる。また、2巡目においては、1巡目において試行が成功した取引については、再度の試行を行わないため、試行回数を減らすことができる。すなわち、異なる決済順序を少ない試行回数により実行することができる。これにより、決済順序を並べ替えるだけで決済可能な取引グループであるか否かについて効率的に判定し、決済可能な決済順序を確定することができる。   In the second round of trial, settlement is attempted only for the transaction for which the trial has failed based on the updated settlement order. At this time, the account balance in the transaction in which the trial in the first round was successful has been updated, and the conditions at the start of the second round are different from those at the start of the first round. For transactions that failed before the success of, the trial may be successful in the second round. As a result, the trial is performed in a settlement order different from the initial setting. Further, in the second round, since the transaction that has been successfully tried in the first round is not retried, the number of trials can be reduced. That is, different settlement orders can be executed with a small number of trials. Accordingly, it is possible to efficiently determine whether or not the transaction group can be settled only by rearranging the settlement order, and the settlement order in which settlement is possible can be determined.

また、残高情報補正手段360は、確定手段380により決済順序が決済可能な順序として確定されなかった場合に、口座情報記憶部32及び取引情報記憶部33を参照し、取引グループに含まれる全ての取引の決済が確定したと仮定した場合の口座当たりの残高を算出し、算出された残高が所定値以下となる口座について、残高が所定値となる取引額を加算して口座情報記憶部32に格納された残高情報322を補正する。そして、取引グループ決済試行手段350は、残高情報補正手段360により補正された残高情報を用いて、取引情報記憶部33に格納された決済順序336に基づき、取引グループ決済試行手段350により前回、試行が失敗した全ての取引についての決済を試行することにより決済順序を調整する。このとき、確定手段380は、取引グループ決済試行手段350により調整された決済順序により取引グループに含まれる全ての取引の決済の試行が成功する場合に、取引グループ決済試行手段350により試行が成功した最後の取引の決済順序までを決済可能な順序としてさらに確定する。   Further, the balance information correction unit 360 refers to the account information storage unit 32 and the transaction information storage unit 33 when the settlement unit 380 does not determine the settlement order as the order in which the settlement can be made. Calculate the balance per account when it is assumed that the settlement of the transaction has been confirmed, and add the transaction amount at which the balance becomes a predetermined value to the account information storage unit 32 for the account where the calculated balance is a predetermined value or less. The stored balance information 322 is corrected. Then, the transaction group settlement trial means 350 uses the balance information corrected by the balance information correction section 360, based on the settlement order 336 stored in the transaction information storage unit 33, by the transaction group settlement trial means 350 last time. Adjusts the order of settlement by trying to settle for all transactions that failed. At this time, the confirmation unit 380 has succeeded in the trial by the transaction group settlement trial unit 350 when the trial of settlement of all the transactions included in the transaction group is successful by the settlement order adjusted by the transaction group settlement trial unit 350. The order of settlement up to the last transaction is further determined as an order that can be settled.

ここで、取引グループが決済順序に関わらず、そもそも取引元の口座の初期残高が不足していたために決済不可能であったことを赤残連鎖取引と呼ぶ。上述した手段により、赤残連鎖取引について、初期残高の不足を解消した場合に決済可能な決済順序を確定することができる。また、初期残高が不足している口座を特定でき、当該口座の持ち主へ不足額の解消を依頼する通知をすることにより、初期残高の不足が解消した後、直ちに決済可能となるため、不要に取引を決済不可能とすることがなくなる。よって、決済可能な取引グループを検出する精度を高めることができる。   Here, regardless of the order of payment, regardless of the order of payment, the fact that the initial balance of the account of the transaction source was insufficient and the payment was not possible is called red balance chain transaction. By the means described above, the settlement order that can be settled when the shortage of the initial balance is resolved for the red balance chain transaction can be determined. In addition, it is possible to identify an account with a shortage of initial balance, and by notifying the owner of the account to resolve the shortage, it becomes possible to settle immediately after the shortage of the initial balance has been resolved, which is unnecessary. The transaction is no longer impossible to settle. Therefore, the precision which detects the transaction group which can be settled can be improved.

ここで、取引グループにおけるループ取引について説明する。ループ取引とは、複数の口座間で取引元の口座と取引先の口座とが入れ替わった取引を含む取引グループである。つまり、ループ取引とは、複数の口座間で循環する複数の取引を指す。特に、取引額が同額で循環する場合、当該ループ取引における口座の収支は過不足がない。そのため、残高情報補正手段360により初期残高の不足する口座を含む取引グループとして検出することはできない。しかし、上述したようにループ取引は口座の収支に過不足がないため、取引グループ内の初期設定の決済順序と異なる順序とすることで、決済可能となる場合もある。このようなループ取引を擬似ループ取引と呼ぶ。さらに、赤残連鎖取引であったために、初期設定の決済順序では決済可能とならなかったが、初期残高の不足を解消した上で、擬似ループ取引となる取引グループもある。このようなループ取引を、赤残連鎖取引かつ擬似ループ取引と呼ぶ。一方、ループ取引に関係する各口座のいずれにも初期残高が不足している場合には、決済順序に関わらず決済可能とはならない。このようなループ取引を真正ループ取引と呼ぶ。さらに、赤残連鎖取引であり、ループ取引以外の取引のための初期残高の不足を解消したとしても、真正ループ取引となる取引グループもある。このようなループ取引を、赤残連鎖取引かつ真正ループ取引と呼ぶ。   Here, the loop transaction in the transaction group will be described. A loop transaction is a transaction group including a transaction in which a trading source account and a trading partner account are exchanged between a plurality of accounts. That is, the loop transaction refers to a plurality of transactions that circulate between a plurality of accounts. In particular, when the transaction amount circulates at the same amount, the account balance in the loop transaction is not excessive or insufficient. For this reason, the balance information correcting unit 360 cannot detect a transaction group including an account having an insufficient initial balance. However, as described above, since there is no excess or deficiency in the account balance, the loop transaction may be able to be settled by setting the order different from the default settlement order in the transaction group. Such a loop transaction is called a pseudo loop transaction. In addition, because it is a red balance chain transaction, settlement is not possible in the default settlement order, but there is also a transaction group that becomes a pseudo loop transaction after eliminating the shortage of the initial balance. Such a loop transaction is called a red balance chain transaction and a pseudo loop transaction. On the other hand, when the initial balance is insufficient in any of the accounts related to the loop transaction, the settlement is not possible regardless of the settlement order. Such a loop transaction is called a genuine loop transaction. Furthermore, there is a trading group that is a red balance chain transaction and becomes a genuine loop transaction even if the shortage of the initial balance for transactions other than the loop transaction is resolved. Such a loop transaction is called a red balance chain transaction and a genuine loop transaction.

そこで、擬似ループ判定手段370は、取引グループ決済試行手段350における試行に失敗した取引が存在する場合、取引グループが擬似ループ取引となっているか否かを判定する。擬似ループ判定手段370は、端点取引選択手段371と、端点取引処理手段372と、起点口座選択手段373と、起点取引処理手段374とを備える。   Therefore, when there is a transaction that failed in the trial in the transaction group settlement trial unit 350, the pseudo loop determination unit 370 determines whether or not the transaction group is a pseudo loop transaction. The pseudo loop determination unit 370 includes an end point transaction selection unit 371, an end point transaction processing unit 372, an origin account selection unit 373, and an origin transaction processing unit 374.

端点取引選択手段371は、確定手段380により決済順序が決済可能な順序として確定されなかった場合に、取引グループに含まれる各取引から、取引元の口座が当該取引グループ内の他の取引の取引先の口座と一致しない取引である始点取引と、取引先の口座が当該取引グループ内の他の取引の取引元の口座と一致しない取引である終点取引とを選択する。端点取引処理手段372は、始点取引における決済順序を、最初の順序として取引情報記憶部33を更新し、当該始点取引の決済が確定したと仮定して口座情報記憶部32に格納された残高情報322を更新し、終点取引における決済順序を、最後の順序として取引情報記憶部33を更新する。   The end point transaction selection unit 371, when the settlement unit 380 determines that the settlement order is not settled as an order that can be settled, from each transaction included in the transaction group, the transaction account of the other party in the transaction group A start-point transaction that is a transaction that does not match the previous account and an end-point transaction that is a transaction whose account does not match the account of the other transaction in the transaction group are selected. The end point transaction processing means 372 updates the transaction information storage unit 33 with the settlement order in the start point transaction as the first order, and the balance information stored in the account information storage unit 32 on the assumption that the settlement of the start point transaction has been confirmed. 322 is updated, and the transaction information storage unit 33 is updated with the settlement order in the end point transaction as the last order.

そして、擬似ループ判定手段370は、端点取引処理手段372により更新された決済順序に基づき、取引グループの内、始点取引及び終点取引を除いた取引についての決済を試行することにより決済順序を調整する。このとき、確定手段380は、取引グループ決済試行手段350により調整された決済順序により取引グループに含まれる全ての取引の決済の試行が成功する場合に、取引情報記憶部33に格納された決済順序336を決済可能な順序として確定する。これにより、擬似ループ取引を検出して決済可能な順序として確定することができる。よって、決済可能な取引グループを検出する精度を高めることができる。   Then, the pseudo loop determination unit 370 adjusts the settlement order by trying settlement for transactions excluding the start point transaction and the end point transaction in the transaction group based on the settlement order updated by the end point transaction processing unit 372. . At this time, the confirmation unit 380 determines the settlement order stored in the transaction information storage unit 33 when the settlement trials of all transactions included in the transaction group are successful by the settlement order adjusted by the transaction group settlement trial unit 350. 336 is determined as an order that can be settled. Thereby, a pseudo loop transaction can be detected and settled as an order that can be settled. Therefore, the precision which detects the transaction group which can be settled can be improved.

また、起点口座選択手段373は、擬似ループ判定手段370により試行が失敗した取引に含まれる口座から、自己が取引先の口座となる取引が存在し、かつ、自己が取引元の口座となる取引が2以上存在する口座を選択する。起点取引処理手段374は、起点口座選択手段373により選択された口座が取引元の口座となる取引である2以上の起点取引の決済順序における先後関係を入れ替えて取引情報記憶部33を更新する。そして、擬似ループ判定手段370は、起点取引処理手段374により更新された決済順序に基づき、取引グループの内、始点取引及び終点取引を除いた取引についての決済を試行することにより決済順序を調整する。このように、ループ取引における起点となりうる複数の起点取引を特定し、当該複数の起点取引の決済順序における先後関係を入れ替えることにより、試行に成功する場合があり、結果的に試行回数を減らし、効率的に決済順序を確定することができる。   In addition, the origin account selection unit 373 has a transaction in which the transaction is the account of the customer from the account included in the transaction for which the trial has failed by the pseudo loop determination unit 370, and the transaction in which the transaction is the account of the transaction source. Select an account with 2 or more. The origin transaction processing unit 374 updates the transaction information storage unit 33 by exchanging the prior relationship in the settlement order of two or more origin transactions that are transactions in which the account selected by the origin account selecting unit 373 is a transaction source account. Then, the pseudo loop determination unit 370 adjusts the settlement order by trying settlement for transactions excluding the start point transaction and the end point transaction in the transaction group based on the settlement order updated by the origin transaction processing unit 374. . In this way, by specifying a plurality of starting transactions that can be the starting point in a loop transaction and replacing the prior relationship in the settlement order of the plurality of starting transactions, the trial may be successful, consequently reducing the number of trials, The settlement order can be determined efficiently.

さらに、確定手段380は、擬似ループ判定手段370により調整された決済順序により取引グループに含まれる全ての取引の決済の試行が成功する場合に、取引グループ決済試行手段350により試行が成功した最後の取引の決済順序までを決済可能な順序として確定するとよい。これにより、擬似ループ取引を検出して決済可能な順序として確定することができる。また、確定手段380は、擬似ループ判定手段370により調整された決済順序により試行が失敗した場合にも、取引グループ決済試行手段350により試行が成功した最後の取引の決済順序までを決済可能な順序として確定してもよい。これにより、赤残連鎖取引又は真正ループ取引であっても、決済可能な取引については決済順序を確定させることができる。逆に、決済不可能な取引を特定することができる。そのため、決済不可能な取引の原因を絞り込み、後処理を効率的に行うことができる。   Further, when the settlement attempt of all transactions included in the transaction group is successful by the settlement order adjusted by the pseudo loop determination unit 370, the determination unit 380 determines the last successful trial by the transaction group settlement trial unit 350. It is good to fix up to the settlement order of transactions as the order in which settlement is possible. Thereby, a pseudo loop transaction can be detected and settled as an order that can be settled. The confirmation unit 380 can also settle the settlement order up to the settlement order of the last successful transaction by the transaction group settlement trial unit 350 even if the trial fails due to the settlement order adjusted by the pseudo loop determination unit 370. It may be determined as Thereby, even if it is a red balance chain transaction or a genuine loop transaction, the settlement order can be determined for transactions that can be settled. Conversely, transactions that cannot be settled can be identified. Therefore, it is possible to narrow down the causes of transactions that cannot be settled and perform post-processing efficiently.

図5は、本発明の実施の形態1にかかる決済順序確定システム3のハードウェア構成を示すブロック図である。決済順序確定システム3は、CPU(Central Processing Unit)301と、RAM(Random Access Memory)302と、ROM(Read Only Memory)303と、通信部304と、ハードディスク305とを備える。また、ハードディスク305は、不揮発性記憶装置であり、OS(Operating System)306及び決済順序確定プログラム307が格納されている。尚、ハードディスク305は、口座情報記憶部32及び取引情報記憶部33をさらに含むものであってもよい。決済順序確定プログラム307は、本発明の実施の形態1にかかる決済順序確定処理が実装されたコンピュータプログラムである。   FIG. 5 is a block diagram showing a hardware configuration of the settlement order determination system 3 according to the first embodiment of the present invention. The settlement order determination system 3 includes a CPU (Central Processing Unit) 301, a RAM (Random Access Memory) 302, a ROM (Read Only Memory) 303, a communication unit 304, and a hard disk 305. The hard disk 305 is a non-volatile storage device, and stores an OS (Operating System) 306 and a settlement order determination program 307. The hard disk 305 may further include an account information storage unit 32 and a transaction information storage unit 33. The settlement order confirmation program 307 is a computer program in which the settlement order confirmation process according to the first embodiment of the present invention is implemented.

CPU301は、決済順序確定システム3における各種処理、RAM302、ROM303、通信部304及びハードディスク305へのアクセス等を制御する。通信部304は、口座情報記憶部32及び取引情報記憶部33並びにネットワーク2を介して端末1a、1b、・・・1nとの通信を行う。決済順序確定システム3は、CPU301が、RAM302、ROM303又はハードディスク305に格納されたOS306及び決済順序確定プログラム307を読み込み、実行する。これにより、決済順序確定システム3は、決済順序確定処理を実現することができる。尚、決済順序確定システム3は、複数台のコンピュータサーバに分散して実現されても構わない。   The CPU 301 controls various processes in the settlement order determination system 3, access to the RAM 302, ROM 303, communication unit 304, and hard disk 305. The communication unit 304 communicates with the terminals 1a, 1b,... 1n via the account information storage unit 32, the transaction information storage unit 33, and the network 2. In the settlement order determination system 3, the CPU 301 reads and executes the OS 306 and the settlement order determination program 307 stored in the RAM 302, the ROM 303 or the hard disk 305. Thereby, the settlement order confirmation system 3 can implement a settlement order confirmation process. The settlement order determination system 3 may be realized by being distributed to a plurality of computer servers.

図6は、本発明の実施の形態1にかかる決済順序確定処理の流れを示すフローチャートである。まず、取引グループ生成手段340は、端末1a、1b、・・・1nから取引情報を受け付ける(S11)。具体的には、取引グループ生成手段340は、受け付けた取引情報に応じて取引ID332を発行し、取引情報に含まれる取引元口座ID333、取引先口座ID334及び取引額335に取引ID332を関連付けて取引情報記憶部33に格納する。次に、取引グループ生成手段340は、取引グループ生成処理を行う(S12)。尚、取引グループ生成処理の詳細は、図7を用いて後述する。   FIG. 6 is a flowchart showing a flow of settlement order determination processing according to the first embodiment of the present invention. First, the transaction group generation means 340 receives transaction information from the terminals 1a, 1b,... 1n (S11). Specifically, the transaction group generation unit 340 issues a transaction ID 332 according to the received transaction information, and associates the transaction ID 332 with the transaction account ID 333, the transaction account ID 334, and the transaction amount 335 included in the transaction information. The information is stored in the information storage unit 33. Next, the transaction group generation means 340 performs a transaction group generation process (S12). Details of the transaction group generation process will be described later with reference to FIG.

そして、取引グループ決済試行手段350は、取引グループを選択する(S13)。具体的には、取引グループ決済試行手段350は、取引情報記憶部33を参照し、複数のグループID331の内、一つを選択する。その後、取引グループ決済試行手段350は、決済順序調整処理を行う(S14)。尚、決済順序調整処理の詳細は、図9を用いて後述する。引き続き、確定手段380は、決済順序を確定する確定処理を行う(S15)。尚、確定処理の詳細は、図18を用いて後述する。   Then, the transaction group settlement trial means 350 selects a transaction group (S13). Specifically, the transaction group settlement trial means 350 refers to the transaction information storage unit 33 and selects one of the plurality of group IDs 331. Thereafter, the transaction group settlement trial means 350 performs settlement order adjustment processing (S14). Details of the settlement order adjustment process will be described later with reference to FIG. Subsequently, the confirmation unit 380 performs a confirmation process for confirming the settlement order (S15). Details of the confirmation process will be described later with reference to FIG.

ここで、取引グループ決済試行手段350は、未選択の取引グループが存在するか否かを判定する(S16)。具体的には、取引グループ決済試行手段350は、取引情報記憶部33を参照し、グループID331の内、未選択のグループが存在するか否かを判定する。ステップS16において、未選択のグループが存在すると判定した場合、全ての取引グループが選択し終えるまでの間、ステップS13乃至S16を繰り返し実行する。ステップS16において、未選択のグループが存在しない、すなわち、全てのグループが選択済みであると判定した場合、決済順序確定システム3は、決済順序確定処理を終了する。   Here, the transaction group settlement trial means 350 determines whether or not an unselected transaction group exists (S16). Specifically, the transaction group settlement trial unit 350 refers to the transaction information storage unit 33 and determines whether or not an unselected group exists in the group ID 331. If it is determined in step S16 that there is an unselected group, steps S13 to S16 are repeatedly executed until all transaction groups have been selected. If it is determined in step S16 that no unselected group exists, that is, all groups have been selected, the settlement order confirmation system 3 ends the settlement order confirmation process.

図7は、本発明の実施の形態1にかかる取引グループ生成処理の流れを示すフローチャートである。まず、取引グループ生成手段340は、取引情報を選択する(S21)。具体的には、取引グループ生成手段340は、取引情報記憶部33を参照し、複数の取引ID332の内、一つを選択する。次に、取引グループ生成手段340は、選択した取引情報に関連する取引情報が存在するか否かを判定する(S22)。具体的には、取引グループ生成手段340は、取引情報記憶部33を参照し、ステップS21において選択した取引ID332に関連付けられた取引元口座ID333及び取引先口座ID334を取得する。そして、取引グループ生成手段340は、取得した取引元口座ID333又は取引先口座ID334の口座IDを検索キーとして、取引情報記憶部33を検索する。そして、検索キーと一致する取引元口座ID333又は取引先口座ID334が関連付けられた取引ID332が存在するか否かを判定する。   FIG. 7 is a flowchart showing a flow of transaction group generation processing according to the first exemplary embodiment of the present invention. First, the transaction group generation means 340 selects transaction information (S21). Specifically, the transaction group generation unit 340 refers to the transaction information storage unit 33 and selects one of the plurality of transaction IDs 332. Next, the transaction group generation unit 340 determines whether there is transaction information related to the selected transaction information (S22). Specifically, the transaction group generation unit 340 refers to the transaction information storage unit 33, and acquires the transaction account ID 333 and the transaction account ID 334 associated with the transaction ID 332 selected in step S21. Then, the transaction group generation unit 340 searches the transaction information storage unit 33 using the acquired account ID of the transaction account ID 333 or the transaction account ID 334 as a search key. Then, it is determined whether or not there is a transaction ID 332 associated with a transaction account ID 333 or a transaction account ID 334 that matches the search key.

ステップS22において、関連する取引情報が存在すると判定した場合、取引グループ生成手段340は、当該関連する取引情報を選択する(S23)。具体的には、取引グループ生成手段340は、取引情報記憶部33を参照し、複数の取引ID332の内、ステップS22において、検索キーと一致する取引元口座ID333又は取引先口座ID334が関連付けられた取引ID332を全て選択する。その後、取引グループ生成手段340は、ステップS23において選択した取引ID332に関連する取引情報を選択する。以後、関連する取引情報が存在しなくなるまでの間、ステップS22及びS23を繰り返し実行する。尚、ステップS22において、取引グループ生成手段340は、未選択の口座IDについて、未選択の取引情報の中から検索を行うものとする。また、ステップS23において複数の関連する取引情報が選択された場合、それぞれについてステップS22及びS23を繰り返し実行する。例えば、ステップS22において、図3の取引t11が選択された場合、取引元の口座a1Bを取引元口座ID333とする取引t14と、取引先口座ID334とする取引t13とが関連する取引情報として選択される。一方、取引t11の取引先の口座a1Eを取引元口座ID333又は取引先口座ID334とする取引は存在しないため、口座a1Eに関連する取引情報は選択されない。そして、取引t14における取引先の口座a1Dと、取引t13の取引元の口座a1Aとのいずれかに関連する取引情報として、取引t12が選択される。その後、取引t12の取引元の口座a1Aに関連する取引情報(取引t13)が選択済みであり、取引先の口座a1Cに関連する取引情報が存在しないため、ステップS22において、関連する取引情報が存在しないと判定される。   If it is determined in step S22 that relevant transaction information exists, the transaction group generation unit 340 selects the relevant transaction information (S23). Specifically, the transaction group generation unit 340 refers to the transaction information storage unit 33, and among the plurality of transaction IDs 332, the transaction source account ID 333 or the customer account ID 334 that matches the search key is associated in step S22. Select all transaction IDs 332. Thereafter, the transaction group generation unit 340 selects transaction information related to the transaction ID 332 selected in step S23. Thereafter, steps S22 and S23 are repeatedly executed until there is no relevant transaction information. In step S22, the transaction group generation unit 340 searches for unselected account IDs from unselected transaction information. When a plurality of related transaction information is selected in step S23, steps S22 and S23 are repeatedly executed for each. For example, when the transaction t11 in FIG. 3 is selected in step S22, the transaction t14 with the transaction source account a1B as the transaction source account ID 333 and the transaction t13 with the transaction account ID 334 are selected as related transaction information. The On the other hand, since there is no transaction in which the transaction account a1E of the transaction t11 is the transaction account ID 333 or the transaction account ID 334, transaction information related to the account a1E is not selected. Then, the transaction t12 is selected as transaction information related to either the customer account a1D in the transaction t14 or the transaction source account a1A of the transaction t13. Thereafter, since transaction information (transaction t13) related to the account a1A of the transaction source of transaction t12 has been selected and there is no transaction information related to the account a1C of the transaction destination, there is related transaction information in step S22. It is determined not to.

ステップS22において、関連する取引情報が存在しないと判定した場合、取引グループ生成手段340は、取引グループを生成する(S24)。具体的には、取引グループ生成手段340は、一つのグループID331を発行し、選択した複数の取引ID332に関連付けてグループID331を取引情報記憶部33に格納する。   In step S22, when it is determined that there is no relevant transaction information, the transaction group generation unit 340 generates a transaction group (S24). Specifically, the transaction group generation unit 340 issues one group ID 331 and stores the group ID 331 in the transaction information storage unit 33 in association with the selected plurality of transaction IDs 332.

そして、取引グループ生成手段340は、取引グループ内の取引情報に決済順序を設定する(S25)。具体的には、取引グループ生成手段340は、所定の項目についてソートを行う。そして、取引グループ生成手段340は、ソート結果に従い決済順序を設定する。すなわち、取引グループ生成手段340は、選択されたグループID331に関連付けられた取引ID332について、所定のソート順に基づき、並び替えを行い、並び替えた結果に基づき、各取引ID332に対応する決済順序336に順序番号を設定して取引情報記憶部33を更新する。   And the transaction group production | generation means 340 sets a payment order to the transaction information in a transaction group (S25). Specifically, the transaction group generation means 340 performs sorting on predetermined items. And the transaction group production | generation means 340 sets a payment order according to a sorting result. That is, the transaction group generation unit 340 rearranges the transaction ID 332 associated with the selected group ID 331 based on a predetermined sort order, and sets the settlement order 336 corresponding to each transaction ID 332 based on the rearrangement result. The transaction number storage unit 33 is updated by setting the order number.

例えば、受け付けた順序、取引の種別等を考慮してソートを行う。取引の種別によっては、他の取引種別が決済可能となるための前提となるものや、優先して決済しなければならないものがあるため、特定の取引の種別を優先してソートを行う。また、債券取引の場合、債券の券種が小さいものを優先してソートを行ってもよい。つまり、業務における優先順位に基づき決済順序を初期設定することにより、決済順序試行処理において、少ない試行回数により試行が成功しやすくなる。   For example, the sorting is performed in consideration of the received order, the type of transaction, and the like. Depending on the type of transaction, there are a premise that other transaction types can be settled and a case where payment has to be preferentially performed, so sorting is performed with priority on a specific transaction type. In the case of bond trading, sorting may be performed with priority given to bonds having a small bond type. In other words, by initializing the payment order based on the priority order in the business, the trial is likely to succeed with a small number of trials in the payment order trial process.

続いて、取引グループ生成手段340は、未選択の取引情報が存在するか否かを判定する(S26)。具体的には、取引グループ生成手段340は、取引情報記憶部33を参照し、取引ID332の内、未選択の取引情報が存在するか否かを判定する。ステップS26において、未選択の取引情報が存在すると判定した場合、取引グループ生成手段340は、未選択の取引ID332の内、一つを選択する(S27)。その後、全ての取引情報について選択し終えるまでの間、ステップS22乃至S27を繰り返し実行する。   Subsequently, the transaction group generation unit 340 determines whether or not unselected transaction information exists (S26). Specifically, the transaction group generation unit 340 refers to the transaction information storage unit 33 and determines whether or not unselected transaction information exists in the transaction ID 332. In step S26, when it is determined that there is unselected transaction information, the transaction group generation unit 340 selects one of the unselected transaction IDs 332 (S27). Thereafter, steps S22 to S27 are repeatedly executed until selection of all transaction information is completed.

ステップS26において、未選択の取引情報が存在しない、つまり、全ての取引情報が選択済みであると判定した場合、取引グループ生成手段340は、取引グループ生成処理を終了する。尚、ステップS25は、全ての取引グループ生成処理の最後に、まとめて決済順序を設定してもよい。上述した図3は、本発明の実施の形態1にかかる取引グループ生成処理の実行結果の一例である。   In step S26, when it is determined that there is no unselected transaction information, that is, all the transaction information has been selected, the transaction group generation unit 340 ends the transaction group generation process. In step S25, the settlement order may be set together at the end of all the transaction group generation processes. FIG. 3 described above is an example of the execution result of the transaction group generation process according to the first exemplary embodiment of the present invention.

図8は、本発明の実施の形態1にかかる取引グループの例を示す図である。尚、図8(a)〜(f)は、図3の取引グループg1〜g6について、口座と取引との関係を概念で示した図である。また、図8(g)は、図8(a)〜(f)における一取引の凡例である。以下の決済順序調整処理及び確定処理の説明においては、適宜、図2、図3及び図8に例示した残高情報、取引グループ及び取引情報を用いる。   FIG. 8 is a diagram showing an example of a transaction group according to the first exemplary embodiment of the present invention. 8A to 8F are diagrams conceptually showing the relationship between accounts and transactions for the transaction groups g1 to g6 in FIG. FIG. 8 (g) is a legend of one transaction in FIGS. 8 (a) to 8 (f). In the following description of the settlement order adjustment process and the confirmation process, the balance information, transaction group, and transaction information illustrated in FIGS. 2, 3, and 8 are used as appropriate.

図9は、本発明の実施の形態1にかかる決済順序調整処理の流れを示すフローチャートである。まず、取引グループ決済試行手段350は、取引グループ決済試行処理を行う(S301)。ここで、図10は、本発明の実施の形態1にかかる取引グループ決済試行処理の流れを示すフローチャートである。まず、繰り返し実行手段353は、N及びLに初期値を設定する(S41)。ここで、Nは、後述するステップS42の決済試行処理において参照する決済順序の番号であり、決済試行処理を繰り返し実行するためのループカウンタである。つまり、ステップS41では、決済試行処理の対象とする最初の決済順序を設定する。また、Lは、決済試行処理において参照する決済順序の番号の上限値である。尚、図9のステップS301においては、Nに"1"を設定し、Lに図6のステップS13において選択された取引グループに含まれる取引数を設定する。尚、このとき、併せて、成功回数Mは、"0"に設定される   FIG. 9 is a flowchart showing the flow of the settlement order adjustment process according to the first embodiment of the present invention. First, the transaction group settlement trial means 350 performs a transaction group settlement trial process (S301). Here, FIG. 10 is a flowchart showing the flow of the transaction group settlement trial process according to the first embodiment of the present invention. First, the repeated execution means 353 sets initial values for N and L (S41). Here, N is the number of the settlement order to be referred to in the settlement trial process in step S42 described later, and is a loop counter for repeatedly executing the settlement trial process. That is, in step S41, the first settlement order that is the target of the settlement trial process is set. L is an upper limit value of the number of the settlement order referred to in the settlement trial process. In step S301 in FIG. 9, “1” is set in N, and the number of transactions included in the transaction group selected in step S13 in FIG. 6 is set in L. At this time, the success count M is also set to “0”.

次に、繰り返し実行手段353は、決済試行処理を行う(S42)。ここで、図11は、本発明の実施の形態1にかかる決済試行処理の流れを示すフローチャートである。まず、取引決済試行手段351は、N番目の取引の決済を試行する(S51)。例えば、図10のステップS41の直後、かつ、1回目の試行においては、Nは"1"であるため、繰り返し実行手段353は、"N=1"として取引決済試行手段351を実行させる。そして、取引決済試行手段351は、口座情報記憶部32及び取引情報記憶部33を参照し、決済順序336がN番目の取引の決済を試行する。すなわち、取引決済試行手段351は、決済順序336がN番目である取引ID332に関連付けられた取引元口座ID333及び取引先口座ID334を特定し、取引額335を取得する。そして、取引決済試行手段351は、特定した取引元口座ID333に対応する残高情報322を口座情報記憶部32から取得する。続いて、取引決済試行手段351は、取得した残高情報322が取得した取引額335以上であるか否かを判定する。   Next, the repeated execution means 353 performs a settlement trial process (S42). Here, FIG. 11 is a flowchart showing the flow of the settlement trial process according to the first embodiment of the present invention. First, the transaction settlement trial means 351 tries settlement of the Nth transaction (S51). For example, immediately after step S41 of FIG. 10 and in the first trial, since N is “1”, the repeated execution means 353 causes the transaction settlement trial means 351 to execute with “N = 1”. Then, the transaction settlement trial unit 351 refers to the account information storage unit 32 and the transaction information storage unit 33 and tries settlement of the Nth transaction in the settlement order 336. That is, the transaction settlement trial unit 351 specifies the transaction account ID 333 and the transaction account ID 334 associated with the transaction ID 332 whose settlement order 336 is Nth, and acquires the transaction amount 335. Then, the transaction settlement trial means 351 acquires the balance information 322 corresponding to the specified transaction source account ID 333 from the account information storage unit 32. Subsequently, the transaction settlement trial unit 351 determines whether or not the acquired balance information 322 is the acquired transaction amount 335 or more.

続いて、残高情報更新手段352は、ステップS51における試行が成功したか否かを判定する(S52)。具体的には、ステップS51において、N番目の取引ID332における取引元口座ID333の残高情報322が、当該取引ID332における取引額335以上であると判定した場合、残高情報更新手段352は、当該試行が成功したと判定する。一方、取引額335未満であると判定した場合、残高情報更新手段352は、当該試行が失敗したと判定する。尚、残高情報更新手段352は、ステップS51における試行が成功したか否かの判定結果(不図示)を、取引ID332に関連付けて取引情報記憶部33に格納するものとする。また、2巡目以降が実行される場合、個別に記憶することが望ましい。ステップS52において、当該試行が失敗したと判定した場合、ステップS55へ進む。   Subsequently, the balance information update unit 352 determines whether or not the trial in step S51 is successful (S52). Specifically, in step S51, when it is determined that the balance information 322 of the transaction source account ID 333 in the Nth transaction ID 332 is greater than or equal to the transaction amount 335 in the transaction ID 332, the balance information update unit 352 Judge as successful. On the other hand, when it is determined that the transaction amount is less than 335, the balance information update unit 352 determines that the trial has failed. Note that the balance information update unit 352 stores the determination result (not shown) as to whether or not the trial in step S51 was successful in the transaction information storage unit 33 in association with the transaction ID 332. Also, when the second and subsequent rounds are executed, it is desirable to store them separately. If it is determined in step S52 that the trial has failed, the process proceeds to step S55.

ステップS52において、当該試行が成功したと判定した場合、残高情報更新手段352は、成功回数Mに"1"を加算する(S53)。そして、残高情報更新手段352は、残高情報322を更新する(S54)。具体的には、まず、残高情報更新手段352は、上記特定した取引元口座ID333に対応する残高情報322から取引額335を減算した結果を、取引元口座ID333における残高情報322として口座情報記憶部32を更新する。また、残高情報更新手段352は、上記特定した取引先口座ID334に対応する残高情報322に取引額335を加算した結果を、取引先口座ID334における残高情報322として口座情報記憶部32を更新する。   If it is determined in step S52 that the trial is successful, the balance information update unit 352 adds “1” to the success count M (S53). Then, the balance information update unit 352 updates the balance information 322 (S54). Specifically, first, the balance information updating unit 352 obtains the result of subtracting the transaction amount 335 from the balance information 322 corresponding to the identified transaction source account ID 333 as the balance information 322 in the transaction source account ID 333, and the account information storage unit 32 is updated. Further, the balance information update unit 352 updates the account information storage unit 32 as the balance information 322 in the customer account ID 334, with the result of adding the transaction amount 335 to the balance information 322 corresponding to the specified customer account ID 334.

その後、繰り返し実行手段353は、NがL未満であるか否かを判定する(S55)。すなわち、繰り返し実行手段353は、決済が未試行である取引が存在するか否かにより、取引決済試行手段351の処理及び残高情報更新手段352の処理を繰り返し実行すべきか否かを判定する。ステップS55において、NがL未満であると判定した場合、繰り返し実行手段353は、Nに"1"を加算する(S56)。その後、全ての取引について決済順序に従って試行を終えるまでの間、ステップS51乃至S56を繰り返し実行する。ステップS55において、NがL以上であると判定した場合、つまり、全ての取引について試行を終えた場合、繰り返し実行手段353は、決済試行処理を終了する。   Thereafter, the repeated execution means 353 determines whether N is less than L (S55). That is, the repetitive execution unit 353 determines whether or not the process of the transaction settlement trial unit 351 and the process of the balance information update unit 352 should be repeated depending on whether or not there is a transaction for which settlement has not been attempted. If it is determined in step S55 that N is less than L, the repeated execution means 353 adds “1” to N (S56). Thereafter, steps S51 to S56 are repeatedly executed until trials are completed according to the settlement order for all transactions. If it is determined in step S55 that N is equal to or greater than L, that is, if trials have been completed for all transactions, the repeated execution means 353 ends the settlement trial process.

図12及び図13は、本発明の実施の形態1にかかる取引グループ決済試行処理の実行結果の例を示す図である。図12(a)〜(c)は、図8に示した取引グループg1〜g3における1巡目並びに取引グループg1及びg2における2巡目の決済試行処理の実行結果の例を示す図である。図13(d)〜(f)は、図8に示した取引グループg4〜g6における1巡目の決済試行処理の実行結果の例を示す図である。   12 and 13 are diagrams illustrating examples of execution results of the transaction group settlement trial process according to the first embodiment of the present invention. 12A to 12C are diagrams illustrating examples of execution results of the settlement trial process in the first round in the transaction groups g1 to g3 and the second round in the transaction groups g1 and g2 illustrated in FIG. FIGS. 13D to 13F are diagrams illustrating examples of execution results of the first round of settlement trial processing in the transaction groups g4 to g6 illustrated in FIG.

例えば、取引グループg1の場合、1巡目の決済試行処理では、決済順序に従い、取引t11、t12、t13、t14の順序で決済が試行される。まず、決済順序"1"である取引t11については、取引額が"10"であるところ、取引元口座a1Bの残高情報が"0"である。そのため、残高情報更新手段352は、取引t11の試行が失敗すると判定する(S52)。よって、取引元口座a1B及び取引先口座a1Eの残高情報は更新されない。次に、決済順序"2"である取引t12については、取引額が"10"であるところ、取引元口座a1Aの残高情報が"30"である。そのため、残高情報更新手段352は、取引t12の試行が成功すると判定する(S52)。よって、残高情報更新手段352は、成功回数Mを"1"とし(S53)、取引元口座a1Aの残高情報"30"から取引額"10"を減算した"20"として口座情報記憶部32の口座ID"a1A"の残高情報322を更新する。また、残高情報更新手段352は、取引先口座a1Cの残高情報"0"に取引額"10"を加算した"10"として口座情報記憶部32の口座ID"a1C"の残高情報322を更新する(S54)。その後、決済順序"3"である取引t13については、取引額が"20"であるところ、取引元口座a1Aの残高情報が"20"である。そのため、残高情報更新手段352は、取引t13の試行が成功すると判定(S52)し、上述したようにステップS53及びS54を行う。さらに、決済順序"4"である取引t14については、取引額が"10"であるところ、取引元口座a1Bの残高情報が"10"である。そのため、残高情報更新手段352は、取引t14の試行が成功すると判定(S52)し、上述したようにステップS53及びS54を行う。   For example, in the case of the transaction group g1, in the settlement trial process for the first round, settlement is attempted in the order of transactions t11, t12, t13, and t14 according to the settlement order. First, for the transaction t11 having the settlement order “1”, the balance information of the transaction source account a1B is “0” when the transaction amount is “10”. Therefore, the balance information update unit 352 determines that the transaction t11 is unsuccessful (S52). Therefore, the balance information of the trading source account a1B and the trading partner account a1E is not updated. Next, for the transaction t12 having the settlement order “2”, the balance information of the transaction source account a1A is “30” when the transaction amount is “10”. Therefore, the balance information update unit 352 determines that the trial of the transaction t12 is successful (S52). Therefore, the balance information update unit 352 sets the success count M to “1” (S53), and subtracts the transaction amount “10” from the balance information “30” of the transaction source account a1A as “20” in the account information storage unit 32. The balance information 322 of the account ID “a1A” is updated. Further, the balance information update unit 352 updates the balance information 322 of the account ID “a1C” in the account information storage unit 32 as “10” obtained by adding the transaction amount “10” to the balance information “0” of the customer account a1C. (S54). Thereafter, for the transaction t13 having the settlement order “3”, the balance information of the transaction source account a1A is “20” when the transaction amount is “20”. Therefore, the balance information update unit 352 determines that the trial of the transaction t13 is successful (S52), and performs steps S53 and S54 as described above. Further, for the transaction t14 having the settlement order “4”, the balance information of the transaction source account a1B is “10” when the transaction amount is “10”. Therefore, the balance information update unit 352 determines that the trial of the transaction t14 is successful (S52), and performs steps S53 and S54 as described above.

以上が取引グループg1における1巡目の決済試行処理の流れである。図12(a)の1巡目の成否の"○"が試行に成功した取引を示し、"×"が試行に失敗した取引を示す。また、同様に、図12(b)(c)、図13(d)〜(f)が取引グループg2からg6についての1巡目の決済試行処理の結果を示す。   The above is the flow of the first round of settlement trial processing in the transaction group g1. In FIG. 12A, the success or failure “◯” in the first round indicates a successful transaction, and “x” indicates a failed transaction. Similarly, FIGS. 12B and 12C and FIGS. 13D to 13F show the results of the first round of settlement trial processing for the transaction groups g2 to g6.

図10に戻り、決済順序更新手段354は、ステップS42の結果により再試行を行う必要があるか否かを判定する(S43)。すなわち、決済順序更新手段354は、ステップS42の結果、試行が成功した取引における決済順序以前に、試行が失敗した取引が存在するか否かを判定する。つまり、決済順序更新手段354は、少なくとも試行が最後に成功した取引における決済順序以前に、試行が失敗した取引が1以上存在するか否かを判定することとなる。   Returning to FIG. 10, the settlement order updating unit 354 determines whether or not a retry is necessary based on the result of step S <b> 42 (S <b> 43). That is, as a result of step S42, the settlement order update unit 354 determines whether there is a transaction for which the trial has failed before the settlement order in the transaction for which the trial has been successful. That is, the settlement order update unit 354 determines whether there is one or more transactions that have failed in the trial before at least the settlement order in the transaction that has been last successful.

例えば、図12(a)では、試行が成功した取引t12〜t14の決済順序"2"〜"4"以前に、試行が失敗した取引t11が存在する。そのため、決済順序更新手段354は、取引グループg1について再試行を行う必要があると判定する。また、図12(b)では、試行が成功した取引t21の決済順序"1"以前には、試行が失敗した取引が存在しないが、試行が成功した取引t23の決済順序"3"以前には、試行が失敗した取引t22が存在する。そのため、決済順序更新手段354は、取引グループg2について再試行を行う必要があると判定する。また、図12(c)及び図13(d)では、全ての取引について試行が失敗しているため、決済順序更新手段354は、取引グループg3及びg4について再試行を行う必要がないと判定する。これは、試行が成功していないため、各口座の残高が更新されておらず、試行を行う際の条件が変更していないため、再試行により結果の差が生じえないためである。さらに、図13(e)及び(f)では、最後に試行が成功した取引t52又はt62の決済順序"2"以前には、試行が失敗した取引が存在しないため、決済順序更新手段354は、取引グループg5及びg6について再試行を行う必要がないと判定する。   For example, in FIG. 12A, there is a transaction t11 for which the trial has failed before the settlement order “2” to “4” of the transactions t12 to t14 for which the trial was successful. Therefore, the settlement order update unit 354 determines that it is necessary to retry the transaction group g1. Further, in FIG. 12B, there is no transaction in which the trial has failed before the settlement order “1” of the transaction t21 in which the trial was successful, but there is no transaction in the settlement order “3” of the transaction t23 in which the trial was successful. There is a transaction t22 for which the attempt has failed. Therefore, the settlement order update unit 354 determines that it is necessary to retry the transaction group g2. In FIG. 12C and FIG. 13D, since the trials have failed for all the transactions, the settlement order update unit 354 determines that it is not necessary to retry the transaction groups g3 and g4. . This is because the balance of each account has not been updated because the trial has not been successful, and the conditions for performing the trial have not changed, so that a difference in results cannot occur due to the retry. Further, in FIGS. 13E and 13F, since there is no transaction in which the trial failed before the settlement order “2” of the last successful transaction t52 or t62, the settlement order updating unit 354 includes: It is determined that there is no need to retry for trading groups g5 and g6.

ステップS43において、再試行を行う必要があると判定した場合、決済順序更新手段354は、決済順序を更新する(S44)。すなわち、決済順序更新手段354は、試行が失敗した全ての取引における決済順序が、試行が成功した全ての取引(成功数M)における決済順序より後の順序である"M+1"以降となるように取引情報記憶部33を更新する。具体的には、まず、決済順序更新手段354は、試行が成功した各取引における決済順序を、当該試行が成功した時点における成功した取引の成功数Mとして、取引情報記憶部33を更新する。次に、決済順序更新手段354は、試行が失敗した全ての取引における決済順序を、M+1以上かつL以下として、取引情報記憶部33を更新する。   If it is determined in step S43 that it is necessary to retry, the settlement order update unit 354 updates the settlement order (S44). In other words, the settlement order updating unit 354 sets the settlement order in all transactions for which the trial has failed to be “M + 1” or later, which is an order after the settlement order in all transactions for which the trial has succeeded (success number M). The transaction information storage unit 33 is updated. Specifically, first, the settlement order update unit 354 updates the transaction information storage unit 33 with the settlement order of each transaction for which the trial was successful as the success number M of successful transactions at the time when the trial was successful. Next, the settlement order updating unit 354 updates the transaction information storage unit 33 by setting the settlement order in all transactions for which the trial has failed as M + 1 or more and L or less.

例えば、図12(a)では、まず、試行が成功した全ての取引t12、t13及びt14の2巡目の決済順序として、それぞれ"1"、"2"及び"3"とする。次に、試行が失敗した全ての取引t11の2巡目の決済順序として、"3"に"1"を加算した"4"とする。同様に、図12(b)では、試行が成功した全ての取引t21及びt23の2巡目の決済順序として、それぞれ"1"及び"2"とし、試行が失敗した取引t22の2巡目の決済順序として、"2"に"1"を加算した"3"、そして、取引t24の2巡目の決済順序として、"4"とする。   For example, in FIG. 12A, first, “1”, “2”, and “3” are set as the settlement order of the second round of all transactions t12, t13, and t14 that have been successfully tried, respectively. Next, “4” is obtained by adding “1” to “3” as the settlement order of the second round of all transactions t11 for which the trial has failed. Similarly, in FIG. 12B, the settlement order of the second round of all transactions t21 and t23 for which the trial was successful is set to “1” and “2”, respectively, and the second round of the transaction t22 for which the trial has failed. “3” is obtained by adding “1” to “2” as the settlement order, and “4” as the settlement order of the second round of the transaction t24.

尚、図11のステップS53における成功数Mの算出処理は、ステップS44において、決済順序更新手段354が取引決済試行手段351の試行結果を基に集計することにより実行しても構わない。   The calculation process of the success number M in step S53 in FIG. 11 may be executed by the settlement order updating unit 354 summing up based on the trial result of the transaction settlement trial unit 351 in step S44.

また、決済順序更新手段354は、成功した取引の決済順序の更新を図11のステップS53の後に実行しても構わない。すなわち、決済順序更新手段354は、取引決済試行手段351における試行が成功した場合に、当該N番目の取引における決済順序を、ステップS53により加算後の成功数Mとして、取引情報記憶部33を更新しても構わない。   Further, the settlement order updating unit 354 may update the settlement order of successful transactions after step S53 in FIG. In other words, when the transaction settlement trial means 351 succeeds, the settlement order update unit 354 updates the transaction information storage unit 33 with the settlement order in the Nth transaction as the success number M after the addition in step S53. It doesn't matter.

続いて、繰り返し実行手段353は、Nに"M+1"を代入する(S45)。その後、再試行を行う必要がある間、ステップS42乃至S45を繰り返し実行する。ステップS43において、再試行を行う必要がないと判定した場合、取引グループ決済試行手段350は、取引グループ決済試行処理を終了する。   Subsequently, the repeated execution means 353 substitutes “M + 1” for N (S45). Thereafter, steps S42 to S45 are repeatedly executed while it is necessary to retry. If it is determined in step S43 that there is no need to retry, the transaction group settlement trial means 350 ends the transaction group settlement trial process.

尚、ステップS43において、再試行を行う必要があると判定した場合、決済順序更新手段354は、最後に試行が成功した取引における決済順序を特定し、試行が失敗した全ての取引における決済順序を、当該特定された決済順序より後の順序として、取引情報記憶部33を更新する。この場合、必ずしも試行に成功した取引の決済順序を更新しなくてもよい。この場合、決済順序更新手段354による更新後に、繰り返し実行手段353は、試行が失敗した全ての取引について、取引情報記憶部33に格納された決済順序に基づいてNを昇順に更新して、取引決済試行手段351の処理及び残高情報更新手段352の処理を繰り返し実行する。   If it is determined in step S43 that it is necessary to retry, the settlement order update unit 354 identifies the settlement order in the transaction that has been last tried successfully, and sets the settlement order in all transactions that have failed in the trial. The transaction information storage unit 33 is updated as an order after the specified settlement order. In this case, it is not always necessary to update the settlement order of transactions that have been successfully attempted. In this case, after the update by the settlement order update unit 354, the repeated execution unit 353 updates N in ascending order based on the settlement order stored in the transaction information storage unit 33 for all transactions for which the trial has failed. The process of the settlement trial unit 351 and the process of the balance information update unit 352 are repeatedly executed.

例えば、図12(a)では、最後に試行が成功した取引t14における決済順序が"4"であることを特定し、取引t11の2巡目の決済順序として、"4"に"1"を加算した"5"としてもよい。同様に、図12(b)では、最後に試行が成功した取引t23における決済順序が"3"であることを特定し、取引t22及びt24の2巡目の決済順序として、それぞれ"4"及び"5"としてもよい。但し、この場合、ステップS42を再度実行する際に、Nを"最後に試行が成功した取引における決済順序+1"とし、Lを"最後に試行が成功した取引における決済順序+失敗した取引総数"とする。これにより、試行が成功した取引における決済順序を更新する処理を減らし、処理コストを減らすことができる。   For example, in FIG. 12A, it is specified that the settlement order in the last successful transaction t14 is “4”, and “1” is set to “4” as the settlement order of the second round of the transaction t11. The added value may be “5”. Similarly, in FIG. 12B, it is specified that the settlement order in the last successful transaction t23 is “3”, and the settlement order of the second round of the transactions t22 and t24 is “4” and It may be “5”. However, in this case, when step S42 is executed again, N is set to “settlement order in the last successful transaction + 1” and L is “settlement order in the last successful transaction + total number of failed transactions”. And Thereby, the process which updates the payment order in the transaction where trial was successful can be reduced, and processing cost can be reduced.

図9に戻り、取引グループ決済試行手段350は、試行に失敗した取引が存在するか否かを判定する(S302)。例えば、取引グループ決済試行手段350は、取引情報記憶部33を参照し、取引ID332に関連付けられた判定結果に基づき判定する。ステップS302において、試行に失敗した取引が存在しないと判定した場合、つまり、対象の取引グループにおける全ての取引についてステップS301における試行が成功した場合、取引グループ決済試行手段350は、当該取引グループが"通常取引"であると判定する(S310)。図8の例では、取引グループg1のみが"通常取引"であると判定される。このとき、取引グループ決済試行手段350は、"通常取引"であることを示す情報である判定結果(不図示)をグループID331に関連付けて取引情報記憶部33に格納する。   Returning to FIG. 9, the transaction group settlement trial means 350 determines whether there is a transaction that has failed in the trial (S302). For example, the transaction group settlement trial unit 350 refers to the transaction information storage unit 33 and makes a determination based on the determination result associated with the transaction ID 332. When it is determined in step S302 that there is no transaction that has failed in the trial, that is, when the trial in step S301 is successful for all transactions in the target transaction group, the transaction group settlement trial means 350 determines that the transaction group is “ It is determined that the transaction is “ordinary transaction” (S310). In the example of FIG. 8, it is determined that only the transaction group g1 is a “normal transaction”. At this time, the transaction group settlement trial means 350 stores a determination result (not shown), which is information indicating “normal transaction”, in the transaction information storage unit 33 in association with the group ID 331.

ステップS302において、試行に失敗した取引が存在すると判定した場合、つまり、対象の取引グループにおける取引の中にステップS301における試行が失敗した取引が含まれる場合、残高情報補正手段360は、口座当たりの収支残高を算出する(S303)。図8の例では、取引グループg2〜g6がステップS303の対象となる。残高情報補正手段360は、口座情報記憶部32及び取引情報記憶部33を参照し、各取引グループに含まれる口座ごとに以下の処理を行う。具体的には、まず、残高情報補正手段360は、口座情報記憶部32から対象口座の残高情報322を取得する。次に、残高情報補正手段360は、取引情報記憶部33を参照し、対象口座を取引元又は取引先の口座とする全ての取引を選択し、選択した取引ID332における取引額335から取引元及び取引先のそれぞれの合計を算出する。そして、残高情報補正手段360は、取得した残高情報322に、対象口座を取引先の口座とする取引の取引額335の合計を加算し、対象口座を取引元の口座とする取引の取引額335の合計を減算する。そして、その結果である口座当たりの収支残高(不図示)を対象口座に関連付けて口座情報記憶部32に格納する。   If it is determined in step S302 that there is a transaction that has failed in the trial, that is, if the transaction in the target transaction group includes a transaction that has failed in the step S301, the balance information correction unit 360 may The balance of payment is calculated (S303). In the example of FIG. 8, transaction groups g2 to g6 are the targets of step S303. The balance information correction unit 360 refers to the account information storage unit 32 and the transaction information storage unit 33, and performs the following processing for each account included in each transaction group. Specifically, first, the balance information correction unit 360 acquires the balance information 322 of the target account from the account information storage unit 32. Next, the balance information correction unit 360 refers to the transaction information storage unit 33, selects all transactions having the target account as the account of the transaction source or the business partner, and selects the transaction source and transaction amount 335 in the selected transaction ID 332 Calculate the total for each business partner. Then, the balance information correction unit 360 adds the total transaction amount 335 of the transaction with the target account as the account of the customer to the acquired balance information 322, and the transaction amount 335 of the transaction with the target account as the account of the transaction source. Subtract the sum of Then, the balance (not shown) per account, which is the result, is stored in the account information storage unit 32 in association with the target account.

ここで、図14は、本発明の実施の形態1にかかる口座収支算出処理の実行結果の例を示す図である。図14(a)〜(e)は、それぞれ取引グループg2〜g6における口座収支の例を示す図である。図14(a)では、例えば、口座a2Bを対象口座とした場合、まず、残高情報補正手段360は、初期残高"0"を取得する。次に、残高情報補正手段360は、口座a2Bを取引先の口座とする取引t21の取引額"10"を取得する。このとき、取引額合計(入)は、"10"である。また、残高情報補正手段360は、口座a2Bを取引元の口座とする取引t23及びt24の取引額"10"及び"10"を取得する。このとき、取引額合計(払)は、"20"である。そして、残高情報補正手段360は、初期残高"0"に、取引額合計(入)"10"を加算し、取引額合計(払)"20"を減算して、収支残高"−10"を算出し、口座情報記憶部32に格納する。その他、図14(a)〜(e)について同様に口座当たりの収支残高が算出される。   Here, FIG. 14 is a figure which shows the example of the execution result of the account balance calculation process concerning Embodiment 1 of this invention. 14A to 14E are diagrams showing examples of account balances in the transaction groups g2 to g6, respectively. In FIG. 14A, for example, when the account a2B is the target account, the balance information correction unit 360 first acquires the initial balance “0”. Next, the balance information correction unit 360 acquires the transaction amount “10” of the transaction t21 in which the account a2B is the customer's account. At this time, the total transaction amount (input) is “10”. Further, the balance information correction unit 360 acquires the transaction amounts “10” and “10” of the transactions t23 and t24 with the account a2B as the transaction source account. At this time, the total transaction amount (payment) is “20”. Then, the balance information correction unit 360 adds the total transaction amount (input) “10” to the initial balance “0” and subtracts the total transaction amount (payment) “20” to obtain the balance balance “−10”. Calculate and store in the account information storage unit 32. In addition, the balance balance per account is similarly calculated about Fig.14 (a)-(e).

その後、残高情報補正手段360は、取引グループ内に収支残高が赤字となる赤字口座が存在するか否かを判定する(S304)。すなわち、残高情報補正手段360は、ステップS303において算出された収支残高が所定値以下となる口座が存在するか否かを判定する。具体的には、残高情報補正手段360は、口座情報記憶部32を参照し、収支残高がマイナスである口座が存在するか否かを確認する。例えば、図14(a)の場合、口座a2A及びa2Bの収支残高がマイナスであるため、取引グループg2内に赤字口座が存在すると判定される。同様に、図14(b)及び(c)に基づき、取引グループg3及びg4内に赤字口座が存在すると判定される。一方、図14(d)及び(e)の場合、収支残高がマイナスとなる口座が存在しないため、取引グループg5及びg6内に赤字口座が存在しないと判定される。ステップS304において、取引グループ内に赤字口座が存在しないと判定された場合、ステップS308へ進む。   Thereafter, the balance information correction unit 360 determines whether or not there is a deficit account in which the balance of balance is in red in the transaction group (S304). That is, the balance information correction unit 360 determines whether there is an account for which the balance of payment calculated in step S303 is a predetermined value or less. Specifically, the balance information correction unit 360 refers to the account information storage unit 32 and confirms whether there is an account having a negative balance. For example, in the case of FIG. 14A, since the balance of accounts a2A and a2B is negative, it is determined that there is a deficit account in the transaction group g2. Similarly, based on FIGS. 14B and 14C, it is determined that there are deficit accounts in the transaction groups g3 and g4. On the other hand, in the case of FIGS. 14D and 14E, since there is no account having a negative balance, it is determined that there is no deficit account in the transaction groups g5 and g6. If it is determined in step S304 that there is no deficit account in the transaction group, the process proceeds to step S308.

ステップS304において、取引グループ内に赤字口座が存在すると判定された場合、残高情報補正手段360は、残高を補正する(S305)。すなわち、残高情報補正手段360は、残高が所定値となる取引額を加算して口座情報記憶部32に格納された残高情報322を補正する。例えば、残高情報補正手段360は、取引グループg2の口座a2Aの残高情報322に、"10"を加算して口座情報記憶部32を更新する。同様に、取引グループg2、g3及びg4における口座a2B、a3A及びa4Aの残高情報322に、不足額を加算して口座情報記憶部32を更新する。   If it is determined in step S304 that there is a deficit account in the transaction group, the balance information correction unit 360 corrects the balance (S305). That is, the balance information correction unit 360 corrects the balance information 322 stored in the account information storage unit 32 by adding the transaction amount at which the balance becomes a predetermined value. For example, the balance information correction unit 360 updates the account information storage unit 32 by adding “10” to the balance information 322 of the account a2A of the transaction group g2. Similarly, the shortage amount is added to the balance information 322 of the accounts a2B, a3A, and a4A in the transaction groups g2, g3, and g4, and the account information storage unit 32 is updated.

そして、取引グループ決済試行手段350は、取引グループ決済試行処理を実行する(S306)。すなわち、取引グループ決済試行手段350は、残高情報補正手段360により補正された残高情報を用いて、取引情報記憶部33に格納された決済順序336に基づき、取引グループ決済試行手段350により前回、試行が失敗した全ての取引についての決済を試行することにより決済順序を調整する。   Then, the transaction group settlement trial means 350 executes a transaction group settlement trial process (S306). That is, the transaction group settlement trial unit 350 uses the balance information corrected by the balance information correction unit 360 based on the settlement order 336 stored in the transaction information storage unit 33, and the transaction group settlement trial unit 350 performs the previous trial. Adjusts the order of settlement by trying to settle for all transactions that failed.

ここで、図15は、本発明の実施の形態1にかかる残高補正処理後の取引グループ決済試行処理の実行結果の例を示す図である。図15(a)〜(c)は、それぞれ取引グループg2〜g4のステップS306における1巡目の決済試行処理の実行結果の例を示す図である。図15(a)の場合、ステップS301の実行後の決済順序に従い、ステップS301により試行が失敗した取引t22及びt24のみについて、口座a2A及びa2Bの残高が補正された状態として、決済を試行する。そして、取引t22及びt24が共に試行に成功する。尚、この場合、図9のステップS306においては、Nに"3"を設定し、Lに"4"を設定して、図10の取引グループ決済試行処理を実行する。そのため、残高を補正する前に試行が成功した取引t21及びt23については、試行の対象とならない。よって、不要な処理を減らすことができる。同様に、図15(b)及び(c)の場合、図9のステップS306においては、Nに"1"を設定し、Lに"5"を設定して、図10の取引グループ決済試行処理を実行する。ここでは、決済順序"1"及び"2"のみが試行に成功するが、以降の取引の試行は失敗する。   Here, FIG. 15 is a diagram illustrating an example of an execution result of the transaction group settlement trial process after the balance correction process according to the first embodiment of the present invention. FIGS. 15A to 15C are diagrams illustrating examples of execution results of the first round of settlement trial processing in step S306 for the transaction groups g2 to g4, respectively. In the case of FIG. 15A, according to the settlement order after the execution of step S301, settlement is attempted only for the transactions t22 and t24 for which the trial failed in step S301, with the balance of the accounts a2A and a2B corrected. Both transactions t22 and t24 succeed in the trial. In this case, in step S306 in FIG. 9, N is set to “3” and L is set to “4”, and the transaction group settlement trial process in FIG. 10 is executed. Therefore, the transactions t21 and t23 that have been successfully tried before the balance is corrected are not targeted. Therefore, unnecessary processing can be reduced. Similarly, in the case of FIGS. 15B and 15C, in step S306 in FIG. 9, N is set to “1”, L is set to “5”, and the transaction group settlement trial process in FIG. Execute. Here, only the settlement orders “1” and “2” succeed in the trial, but subsequent transaction trials fail.

図9に戻り、取引グループ決済試行手段350は、ステップS302と同様に、試行に失敗した取引が存在するか否かを判定する(S307)。ステップS307において、試行に失敗した取引が存在しないと判定した場合、取引グループ決済試行手段350は、当該取引グループが"赤残連鎖取引"であると判定する(S311)。図8の例では、取引グループg2のみが"赤残連鎖取引"であると判定される。このとき、取引グループ決済試行手段350は、"赤残連鎖取引"であることを示す情報である判定結果(不図示)をグループID331に関連付けて取引情報記憶部33に格納する。   Returning to FIG. 9, similarly to step S302, the transaction group settlement trial unit 350 determines whether there is a transaction that has failed in the trial (S307). If it is determined in step S307 that there is no transaction that has failed in the trial, the transaction group settlement trial unit 350 determines that the transaction group is a “red balance chain transaction” (S311). In the example of FIG. 8, it is determined that only the transaction group g2 is a “red balance chain transaction”. At this time, the transaction group settlement trial unit 350 stores a determination result (not shown), which is information indicating “red balance chain transaction”, in the transaction information storage unit 33 in association with the group ID 331.

その後、擬似ループ判定手段370は、擬似ループ判定処理を行う(S308)。ここで、図16は、本発明の実施の形態1にかかる擬似ループ判定処理の流れを示すフローチャートである。尚、以下では、図8においては、取引グループg3〜g6が処理対象となる。   Thereafter, the pseudo loop determination unit 370 performs a pseudo loop determination process (S308). Here, FIG. 16 is a flowchart showing the flow of the pseudo-loop determination process according to the first embodiment of the present invention. In the following, in FIG. 8, transaction groups g3 to g6 are processing targets.

まず、端点取引選択手段371は、始点及び終点取引を選択する(S61)。具体的には、端点取引選択手段371は、取引情報記憶部33を参照し、処理対象の取引グループ内の取引について、取引元口座ID333が他の取引の取引先口座ID334と一致しない取引である始点取引を選択する。また、端点取引選択手段371は、取引情報記憶部33を参照し、処理対象の取引グループ内の取引について、取引先口座ID334が他の取引の取引元口座ID333と一致しない取引である終点取引を選択する。尚、始点及び終点取引を端点取引と呼ぶものとする。例えば、取引グループg3の場合、始点取引が取引t31、終点取引が取引t32として選択される。同様に、取引グループg4、g5及びg6の場合、それぞれ始点取引が取引t41、t51及びt61、また、終点取引が取引t42、t52及びt62として選択される。   First, the end point transaction selecting unit 371 selects a start point and an end point transaction (S61). Specifically, the end point transaction selection unit 371 refers to the transaction information storage unit 33 and is a transaction in which the transaction source account ID 333 does not match the transaction account ID 334 of another transaction for transactions in the transaction group to be processed. Select the starting transaction. In addition, the end point transaction selection unit 371 refers to the transaction information storage unit 33, and for the transactions in the transaction group to be processed, the end point transaction that is a transaction in which the customer account ID 334 does not match the transaction source account ID 333 of other transactions. select. The start point and end point transactions are referred to as end point transactions. For example, in the case of the transaction group g3, the start point transaction is selected as the transaction t31, and the end point transaction is selected as the transaction t32. Similarly, in the case of transaction groups g4, g5, and g6, the start point transaction is selected as transactions t41, t51, and t61, and the end point transaction is selected as transactions t42, t52, and t62, respectively.

次に、端点取引処理手段372は、始点及び終点取引の決済順序を更新する(S62)。具体的には、端点取引処理手段372は、始点取引における決済順序を、最初の順序として取引情報記憶部33を更新し、終点取引における決済順序を、最後の順序として取引情報記憶部33を更新する。例えば、取引グループg3の場合、端点取引選択手段371は、始点取引である取引t31の決済順序を"1"とし、終点取引である取引t32の決済順序を"5"として取引情報記憶部33を更新する。同様に、取引グループg4、g5及びg6の場合、端点取引選択手段371は、それぞれ始点取引である取引t41、t51及びt61の決済順序を"1"とし、終点取引である取引t42、t52及びt62の決済順序を"5"として取引情報記憶部33を更新する。尚、始点取引又は終点取引が複数存在する場合、決済順序を同じ値とするとよい。   Next, the end point transaction processing means 372 updates the settlement order of the start point and end point transactions (S62). Specifically, the end point transaction processing unit 372 updates the transaction information storage unit 33 with the settlement order in the start point transaction as the first order, and updates the transaction information storage unit 33 with the settlement order in the end point transaction as the last order. To do. For example, in the case of the transaction group g3, the end point transaction selecting unit 371 sets the settlement order of the transaction t31 that is the start point transaction to “1” and sets the settlement order of the transaction t32 that is the end point transaction to “5”. Update. Similarly, in the case of the transaction groups g4, g5, and g6, the end point transaction selecting unit 371 sets the settlement order of the transactions t41, t51, and t61 that are the start point transactions to “1”, and the transactions t42, t52, and t62 that are the end point transactions. The transaction information storage unit 33 is updated with the settlement order of “5”. In addition, when there are a plurality of start point transactions or end point transactions, the settlement order may be the same value.

続いて、端点取引処理手段372は、始点取引に関する残高情報を更新する(S63)。具体的には、端点取引処理手段372は、当該始点取引の決済が確定したと仮定して口座情報記憶部32に格納された残高情報322を更新する。例えば、取引グループg3の場合、端点取引選択手段371は、始点取引の決済を試行して成功する場合に、図11のステップS54に基づき、取引元の口座である口座a3A及び取引先の口座である口座a3Bのそれぞれの残高情報322を決済後の残高情報へ更新する。尚、ステップS305において、残高情報補正手段360により残高が補正された口座については、さらに、残高情報が更新されることとなる。   Subsequently, the end point transaction processing unit 372 updates balance information regarding the start point transaction (S63). Specifically, the end point transaction processing unit 372 updates the balance information 322 stored in the account information storage unit 32 on the assumption that settlement of the start point transaction has been confirmed. For example, in the case of the transaction group g3, the end point transaction selecting unit 371, when trying to settle the start point transaction, succeeds in the account a3A that is the transaction source account and the account of the transaction destination based on step S54 in FIG. The balance information 322 of each account a3B is updated to the balance information after settlement. In step S305, the balance information of the account whose balance has been corrected by the balance information correction unit 360 is further updated.

そして、擬似ループ判定手段370は、始点及び終点取引を除いて、取引グループ決済試行手段350により取引グループ決済試行処理を実行する(S64)。例えば、擬似ループ判定手段370は、取引グループ内の始点及び終点取引を除いた取引について、決済順序が2以上かつ取引数未満となるように取引情報記憶部33を更新する。そして、Nに"2"を設定し、Lに"取引数−1"を設定して、図10の取引グループ決済試行処理を実行する。尚、ステップS64においては、擬似ループ判定処理の対象となる取引グループに始点取引が存在しない場合、Nに"1"を設定する。また、終点取引が存在しない場合、Lに"取引数"を設定する。そして、図10の取引グループ決済試行処理を実行する。例えば、取引グループがループ取引のみである場合や、始点取引又は終点取引の一方が存在しない場合が該当する。また、始点取引又は終点取引が複数存在する場合、Nに"3"以上の値を設定し、Lに"取引数−1"未満の値を設定して、図10の取引グループ決済試行処理を実行する。   Then, the pseudo loop determination unit 370 executes the transaction group settlement trial process by the transaction group settlement trial unit 350 except for the start point and end point transactions (S64). For example, the pseudo loop determination unit 370 updates the transaction information storage unit 33 so that the settlement order is 2 or more and less than the number of transactions for transactions excluding the start point and end point transactions in the transaction group. Then, “2” is set to N, “number of transactions−1” is set to L, and the transaction group settlement trial process of FIG. 10 is executed. In step S64, if there is no starting transaction in the transaction group that is the target of the pseudo loop determination process, “1” is set to N. If there is no end transaction, “number of transactions” is set in L. Then, the transaction group settlement trial process of FIG. 10 is executed. For example, the case where a transaction group is only a loop transaction, and the case where one of a start point transaction or an end point transaction does not exist are applicable. When there are a plurality of start point transactions or end point transactions, N is set to a value of “3” or more, L is set to a value less than “number of transactions−1”, and the transaction group settlement trial process of FIG. 10 is performed. Execute.

例えば、取引グループg3の場合、擬似ループ判定手段370は、始点又は終点取引以外の取引である取引t33、t34及びt35について、決済順序を"2"〜"4"として更新する。そして、Nに"2"を設定し、Lに"4"を設定して、図10の取引グループ決済試行処理を実行する。ここでは、決済順序"2"の取引t33の取引元の口座a3Bの残高情報322がステップS63により"10"に更新されているため、取引t33の試行が成功する。続いて、決済順序"3"の取引t34の取引元の口座a3Dの残高情報322が上記の試行により"10"に更新されているため取引t34の、試行が成功する。さらに、決済順序"4"の取引t35の取引元の口座a3Eの残高情報322が上記の試行により"10"に更新されているため取引t35の試行が成功する。そのため、決済順序"5"の取引t32の試行も成功することとなる。つまり、取引グループg3は、ステップS64により全ての取引の試行が成功することとなる。また、取引グループg5の場合も同様である。このように、ステップS301及びS306における取引グループ決済試行処理において、試行に失敗した取引を含む取引グループであっても、ステップS61〜S64により、始点及び終点取引を除いた取引に対して試行を行うことにより、決済可能な決済順序を求めることができる。一方、取引グループg4及びg6の場合、ステップS64によっても試行に失敗する取引が存在する。   For example, in the case of the transaction group g3, the pseudo loop determination unit 370 updates the settlement order as “2” to “4” for the transactions t33, t34, and t35 that are transactions other than the start point or end point transaction. Then, “2” is set to N and “4” is set to L, and the transaction group settlement trial process of FIG. 10 is executed. Here, since the balance information 322 of the account a3B of the transaction source of the transaction t33 with the settlement order “2” is updated to “10” in step S63, the trial of the transaction t33 is successful. Subsequently, since the balance information 322 of the account a3D of the transaction source of the transaction t34 of the settlement order “3” is updated to “10” by the above-described trial, the trial of the transaction t34 is successful. Furthermore, since the balance information 322 of the account a3E of the transaction source of the transaction t35 having the settlement order “4” is updated to “10” by the above-described trial, the trial of the transaction t35 is successful. Therefore, the trial of the transaction t32 with the settlement order “5” is also successful. In other words, the transaction group g3 succeeds in all transaction trials in step S64. The same applies to the transaction group g5. As described above, in the transaction group settlement trial process in steps S301 and S306, even for a transaction group including a transaction that failed in the trial, a trial is performed for the transaction excluding the start point and the end point transaction in steps S61 to S64. Thus, it is possible to obtain a payment order that can be settled. On the other hand, in the case of transaction groups g4 and g6, there is a transaction that fails in the trial even at step S64.

その後、擬似ループ判定手段370は、ステップS302と同様に、試行に失敗した取引が存在するか否かを判定する(S65)。ステップS65において、試行に失敗した取引が存在しないと判定した場合、擬似ループ判定手段370は、擬似ループ判定処理を終了する。   Thereafter, the pseudo loop determination unit 370 determines whether there is a transaction that has failed in the trial, as in step S302 (S65). If it is determined in step S65 that there is no transaction that has failed in the trial, the pseudo-loop determination unit 370 ends the pseudo-loop determination process.

ステップS65において、試行に失敗した取引が存在すると判定した場合、起点口座選択手段373は、起点口座を選択する(S66)。具体的には、起点口座選択手段373は、取引情報記憶部33を参照し、ステップS64において、試行に失敗した取引に含まれる口座から、1以上の取引先口座ID333かつ2以上の取引元口座ID334として設定される口座を選択する。例えば、取引グループg4の場合、口座a4Bは、取引t42及びt43の取引元の口座であり、取引t41及びt45の取引先の口座であるため、起点口座として選択される。また、取引グループg6の場合、口座a6Bは、取引t62及びt63の取引元の口座であり、取引t61及びt65の取引先の口座であるため、起点口座として選択される。   In step S65, when it is determined that there is a transaction that has failed in the trial, the origin account selecting unit 373 selects an origin account (S66). Specifically, the origin account selection unit 373 refers to the transaction information storage unit 33, and in step S64, from the account included in the transaction that failed in the trial, one or more customer account IDs 333 and two or more supplier accounts The account set as ID 334 is selected. For example, in the case of the transaction group g4, the account a4B is the account of the transaction source of the transactions t42 and t43, and is the account of the transaction partner of the transactions t41 and t45, and thus is selected as the origin account. Further, in the case of the transaction group g6, the account a6B is the account of the transaction source of the transactions t62 and t63, and is the account of the transaction destination of the transactions t61 and t65, and thus is selected as the origin account.

さらに、図17は、本発明の実施の形態1にかかる起点口座が選択される取引グループの顕著な例を示す図である。図17は、取引グループg7について、口座と取引との関係を概念で示した図である。尚、一取引の凡例は、図8(g)と同様であるため、図示を省略する。ここで、取引グループg7の決済順序の初期設定が取引t71、t72、・・・t79の順序であるものとする。このとき、ステップS301において、取引t71、t72及びt73までの試行が成功し、取引t74以降の試行が失敗する。ステップS304において、赤字口座が存在しないと判定され、擬似ループ判定処理(S308)が実行される。そして、取引グループg7の場合、取引t71が始点取引、取引t73が終点取引として選択される(S61)。その後、ステップS64により、取引t71及びt73を除いて、取引グループ決済試行処理が実行される。このとき、取引t72、t74、t75、t76までが試行に成功し、取引t77〜t79の試行に失敗する。そのため、ステップS65において、試行に失敗した取引が存在すると判定される。そこで、ステップS66において、起点口座選択手段373は、取引t77〜t79に含まれる口座a7B、a7G及びa7Hから、取引t72及びt77の取引元の口座であり、取引t71及びt79の取引先の口座である口座a7Bを起点口座として選択する。   Furthermore, FIG. 17 is a figure which shows the prominent example of the transaction group from which the origin account concerning Embodiment 1 of this invention is selected. FIG. 17 is a diagram conceptually showing the relationship between accounts and transactions for the transaction group g7. Note that the legend for one transaction is the same as in FIG. Here, it is assumed that the initial setting of the settlement order of the transaction group g7 is the order of transactions t71, t72,. At this time, in step S301, trials up to transactions t71, t72, and t73 succeed, and trials after transaction t74 fail. In step S304, it is determined that there is no deficit account, and a pseudo loop determination process (S308) is executed. In the case of the transaction group g7, the transaction t71 is selected as the start point transaction and the transaction t73 is selected as the end point transaction (S61). Thereafter, in step S64, transaction group settlement trial processing is executed except for transactions t71 and t73. At this time, transactions up to transactions t72, t74, t75, and t76 succeed, and the transactions t77 to t79 fail. Therefore, in step S65, it is determined that there is a transaction that has failed in the trial. Therefore, in step S66, the origin account selecting means 373 is the account of the transaction source of the transactions t72 and t77 from the accounts a7B, a7G and a7H included in the transactions t77 to t79, and is the account of the business partners of the transactions t71 and t79. A certain account a7B is selected as a starting account.

そして、起点取引処理手段374は、起点取引の決済順序を更新する(S67)。具体的には、起点取引処理手段374は、起点口座選択手段373により選択された口座が取引元の口座となる取引である2以上の起点取引の決済順序における先後関係を入れ替えて取引情報記憶部33を更新する。例えば、取引グループg7の場合、起点取引処理手段374は、口座a7Bが取引元の口座となる取引t77の決済順序を"2"、取引t72の決済順序を"2"より大きい値として、つまり、取引t77と取引t72との決済順序の先後関係を入れ替えて取引情報記憶部33を更新する。同様に、取引グループg4及びg6の場合、起点取引処理手段374は、取引t43及びt63の決済順序を"2"、取引t42及びt62の決済順序を"取引数"として、つまり、取引t42と取引t43との決済順序の先後関係を入れ替えて、また、取引t62と取引t63との決済順序の先後関係を入れ替えて、取引情報記憶部33を更新する。尚、ステップS67においては、擬似ループ判定処理の対象となる取引グループに起点取引が存在しない場合、取引情報記憶部33を更新しない。また、取引t77、t43及びt63の決済順序は、"2"でなくとも構わない。   Then, the originating transaction processing unit 374 updates the settlement order of the originating transaction (S67). Specifically, the origin transaction processing unit 374 exchanges the prior and subsequent relationships in the settlement order of two or more origin transactions that are transactions in which the account selected by the origin account selecting unit 373 is the account of the transaction source. 33 is updated. For example, in the case of the transaction group g7, the originating transaction processing means 374 sets the settlement order of the transaction t77, in which the account a7B is the account of the transaction source, to a value greater than “2” and the settlement order of the transaction t72 as a value greater than “2”, The transaction information storage unit 33 is updated by switching the relationship between the settlement order of the transaction t77 and the transaction t72. Similarly, in the case of the transaction groups g4 and g6, the starting transaction processing means 374 sets the settlement order of the transactions t43 and t63 as “2” and the settlement order of the transactions t42 and t62 as “number of transactions”, that is, the transaction t42 and the transaction The transaction information storage unit 33 is updated by replacing the prior relationship of the settlement order with t43 and replacing the prior relationship of the settlement order between the transaction t62 and the transaction t63. In step S67, when there is no origin transaction in the transaction group to be subjected to the pseudo loop determination process, the transaction information storage unit 33 is not updated. Further, the settlement order of the transactions t77, t43 and t63 may not be “2”.

その後、擬似ループ判定手段370は、取引グループ内の始点及び終点取引を除いた取引について、取引グループ決済試行処理を行う(S68)。このとき、擬似ループ判定手段370は、取引グループ内の始点及び終点取引を除いた取引について、取引グループ決済試行処理を行う。このとき、複数の起点取引の決済順序における先後関係を適宜入れ替えて、取引情報記憶部33を更新し、取引グループ決済試行処理を行うとよい。そして、全ての取引について試行が成功するか、全ての順序の組み合わせについて試行が終了するまで繰り返し、決済の試行を行う。これにより、赤字口座が存在しない状態の対象の取引グループについて、決済可能か否かについて確実に判明させることができる。尚、ステップS68では、対象となる複数の取引における決済順序の様々な組み合わせについて試行するため、処理時間が長くなる。しかし、ステップS68の処理対象となる取引グループの数は、ステップS64以前の処理により絞りこまれているため、少ないといえる。よって、ステップS68の処理を行う効果が高いといえる。その後、擬似ループ判定手段370は、擬似ループ判定処理を終了する。尚、ステップS66乃至S68に代えて、擬似ループ判定手段370は、取引グループ内の始点及び終点取引を除いた取引について、単に、総当たりにして決済の試行を行ってもよい。   Thereafter, the pseudo loop determination unit 370 performs a transaction group settlement trial process for transactions excluding the start point and end point transactions in the transaction group (S68). At this time, the pseudo loop determination unit 370 performs a transaction group settlement trial process for transactions excluding the start point and end point transactions in the transaction group. At this time, it is preferable to perform the transaction group settlement trial process by updating the transaction information storage unit 33 by appropriately replacing the prior relationship in the settlement order of a plurality of origin transactions. Then, the trial of settlement is repeated until the trial is successful for all transactions or until the trial is finished for all combinations of orders. As a result, it is possible to surely determine whether or not settlement is possible for a target transaction group in a state where there is no deficit account. In step S68, since various combinations of settlement orders in a plurality of targeted transactions are tried, the processing time becomes long. However, it can be said that the number of transaction groups to be processed in step S68 is small because it has been narrowed down by the processes before step S64. Therefore, it can be said that the effect of performing the process of step S68 is high. Thereafter, the pseudo loop determination unit 370 ends the pseudo loop determination process. Note that, instead of steps S66 to S68, the pseudo loop determination unit 370 may simply perform a settlement trial for all transactions excluding the start point and end point transactions in the transaction group.

例えば、取引グループg7の場合、擬似ループ判定手段370は、始点取引t71及び終点取引t73を除いた取引t72、t74、t75、t76、t77、t78、t79について、起点取引t72及びt77の決済順序の先後関係を入れ替えて、全ての決済順序の組み合わせについて試行を行う。これにより、取引t71、t77、t78、t79、t72、t74、t75、t76、t73の順序により決済可能であることが判明する。一方、取引グループg4及びg6の場合、全ての決済順序の組み合わせを試行しても決済可能な決済順序が存在しないことが判明する。   For example, in the case of the transaction group g7, the pseudo loop determination unit 370 determines the settlement order of the starting transactions t72 and t77 for the transactions t72, t74, t75, t76, t77, t78, and t79 excluding the start transaction t71 and the end transaction t73. Attempts are made for all combinations of settlement orders by changing the relationship. As a result, it is found that payment can be made in the order of transactions t71, t77, t78, t79, t72, t74, t75, t76, and t73. On the other hand, in the case of the transaction groups g4 and g6, it is found that there is no settlement order that can be settled even if all combinations of settlement orders are tried.

図9に戻り、擬似ループ判定手段370は、ステップS302と同様に、試行に失敗した取引が存在するか否かを判定する(S309)。ステップS309において、試行に失敗した取引が存在しないと判定した場合、擬似ループ判定手段370は、当該取引グループが"擬似ループ取引"であると判定する(S312)。尚、当該取引グループがステップS304により赤字口座が存在すると判定されていた場合、擬似ループ判定手段370は、当該取引グループが"赤残連鎖取引"かつ"擬似ループ取引"であると判定する。図8の例では、取引グループg5が"擬似ループ取引"であると判定され、取引グループg3が"赤残連鎖取引"かつ"擬似ループ取引"であると判定される。また、図17の例である取引グループg7が"擬似ループ取引"であると判定される。このとき、擬似ループ判定手段370は、"擬似ループ取引"又は"赤残連鎖取引"かつ"擬似ループ取引"であることを示す情報である判定結果(不図示)をグループID331に関連付けて取引情報記憶部33に格納する。   Returning to FIG. 9, the pseudo loop determination unit 370 determines whether or not there is a transaction that has failed in the trial, similarly to step S <b> 302 (S <b> 309). If it is determined in step S309 that there is no transaction that has failed in the trial, the pseudo loop determination unit 370 determines that the transaction group is a “pseudo loop transaction” (S312). When it is determined in step S304 that the transaction group has a red account, the pseudo loop determination unit 370 determines that the transaction group is a “red balance chain transaction” and a “pseudo loop transaction”. In the example of FIG. 8, it is determined that the transaction group g5 is a “pseudo loop transaction”, and the transaction group g3 is determined to be a “red balance chain transaction” and a “pseudo loop transaction”. Further, it is determined that the transaction group g7 as an example of FIG. 17 is a “pseudo loop transaction”. At this time, the pseudo loop determination unit 370 associates a determination result (not shown) indicating information indicating “pseudo loop transaction” or “red balance chain transaction” and “pseudo loop transaction” with the group ID 331 and transaction information. Store in the storage unit 33.

ステップS309において、試行に失敗した取引が存在すると判定した場合、擬似ループ判定手段370は、当該取引グループが"真正ループ取引"であると判定する(S313)。尚、当該取引グループがステップS304により赤字口座が存在すると判定されていた場合、擬似ループ判定手段370は、当該取引グループが"赤残連鎖取引"かつ"真正ループ取引"であると判定する。図8の例では、取引グループg6が"真正ループ取引"であると判定され、取引グループg4が"赤残連鎖取引"かつ"真正ループ取引"であると判定される。このとき、擬似ループ判定手段370は、"真正ループ取引"又は"赤残連鎖取引"かつ"真正ループ取引"であることを示す情報である判定結果(不図示)をグループID331に関連付けて取引情報記憶部33に格納する。   If it is determined in step S309 that there is a transaction that has failed, the pseudo loop determination unit 370 determines that the transaction group is a “authentic loop transaction” (S313). If it is determined in step S304 that the transaction group has a red account, the pseudo loop determination unit 370 determines that the transaction group is a “red balance chain transaction” and a “genuine loop transaction”. In the example of FIG. 8, it is determined that the transaction group g6 is a “authentic loop transaction”, and the transaction group g4 is determined to be a “red balance chain transaction” and a “authentic loop transaction”. At this time, the pseudo loop determination means 370 associates a determination result (not shown), which is information indicating “authentic loop transaction” or “red balance chain transaction” and “authentic loop transaction”, with the group ID 331 as transaction information. Store in the storage unit 33.

図18は、本発明の実施の形態1にかかる確定処理の流れを示すフローチャートである。まず、確定手段380は、取引情報記憶部33を参照し、処理対象の取引グループにおける判定結果を確認する(S701)。ステップS701において判定結果が"通常取引"と確認された場合、確定手段380は、処理対象の取引グループにおける全取引のS301後の決済順序を決済可能なものとして確定する(S702)。例えば、取引グループg1の場合、図12(a)の2巡目の決済順序が決済可能なものとして確定される。ここで、確定する処理として、例えば、当該取引グループに含まれる全ての取引の決済を実行するべく勘定系システム等へ通知するか、または、当該取引グループに含まれる口座の所有者へ決済可能である旨を通知する等であるとよい。   FIG. 18 is a flowchart showing the flow of the confirmation process according to the first embodiment of the present invention. First, the confirmation unit 380 refers to the transaction information storage unit 33 and confirms the determination result in the transaction group to be processed (S701). When the determination result is confirmed as “normal transaction” in step S701, the determination unit 380 determines that the settlement order after S301 of all transactions in the transaction group to be processed is settleable (S702). For example, in the case of the transaction group g1, the settlement order for the second round in FIG. Here, as the confirmation process, for example, it is possible to notify the account system etc. to execute settlement of all transactions included in the transaction group, or to settle to the owner of the account included in the transaction group. It is good to notify that there is.

ステップS701において判定結果が"赤残連鎖取引"のみと確認された場合、確定手段380は、ステップS301後の決済順序の内、赤残取引より前の取引の決済順序を決済可能なものとして確定する(S703)。ここで、赤残取引とは、図9のステップS305による残高情報の補正された口座を取引元の口座とする取引の内、ステップS306において、決済の試行が成功した取引である。例えば、取引グループg2の場合、図15(a)の赤残取引である取引t22以前の決済順序である取引t21及び取引t23の決済順序"1"及び"2"が決済可能なものとして確定される。   When it is confirmed in step S701 that the determination result is only “red balance chain transaction”, the confirmation unit 380 confirms that the settlement order of transactions before the red balance transaction can be settled in the settlement order after step S301. (S703). Here, the red balance transaction is a transaction in which the trial of settlement is successful in step S306 out of transactions in which the account whose balance information is corrected in step S305 in FIG. For example, in the case of the transaction group g2, the settlement order “1” and “2” of the transaction t21 and the transaction t23, which are the settlement orders before the transaction t22 which is the red balance transaction in FIG. The

そして、確定手段380は、ステップS305により残高が補正された口座へ残高不足通知を行う(S704)。ここで、残高不足通知として、例えば、通知対象の口座の所有者へ残高不足であるために決済が行えない旨と、不足額を当該口座へ追加する旨等を通知するとよい。例えば、取引グループg2の場合、確定手段380は、口座a2A及びa2Bへ残高不足通知を行う。   Then, the determination unit 380 notifies the balance shortage to the account whose balance has been corrected in step S305 (S704). Here, as the balance shortage notification, for example, it may be notified to the owner of the account to be notified that settlement cannot be performed due to a shortage of balance and that the shortage amount is added to the account. For example, in the case of the transaction group g2, the confirmation unit 380 notifies the accounts a2A and a2B of insufficient balance.

ステップS701において判定結果が"擬似ループ取引"を含むと確認された場合、確定手段380は、さらに、判定結果が"赤残連鎖取引"を含むか否かを判定する(S705)。ステップS705において、判定結果が"赤残連鎖取引"を含むと判定した場合、確定手段380は、ステップS308後の決済順序の内、赤残取引より前の取引の決済順序を決済可能なものとして確定する(S706)。例えば、取引グループg3の場合、図15(b)の赤残取引である取引t31以前の決済順序である取引は存在しないため、決済可能な決済順序として確定されない。   When it is confirmed in step S701 that the determination result includes “pseudo loop transaction”, the determination unit 380 further determines whether or not the determination result includes “red balance chain transaction” (S705). When it is determined in step S705 that the determination result includes “red balance chain transaction”, the determination unit 380 assumes that the settlement order of transactions before the red balance transaction can be settled in the settlement order after step S308. Confirm (S706). For example, in the case of the transaction group g3, there is no transaction in the settlement order before the transaction t31 which is the red balance transaction in FIG.

そして、確定手段380は、ステップS704と同様に、ステップS305により残高が補正された口座へ残高不足通知を行う(S707)。例えば、取引グループg3の場合、確定手段380は、口座a3Aへ残高不足通知を行う。   Then, as in step S704, the confirmation unit 380 notifies the account whose balance has been corrected in step S305 to the balance shortage (S707). For example, in the case of the transaction group g3, the confirmation unit 380 notifies the account a3A of insufficient balance.

ステップS705において、判定結果が"赤残連鎖取引"を含まないと判定した場合、確定手段380は、処理対象の取引グループにおける全取引のS308後の決済順序を決済可能なものとして確定する(S708)。例えば、取引グループg5の場合、取引t51、t53、t54、t55、t52の決済順序が決済可能なものとして確定される。   If it is determined in step S705 that the determination result does not include “red balance chain transaction”, the confirmation unit 380 determines that the settlement order after S308 of all transactions in the transaction group to be processed is settleable (S708). ). For example, in the case of the transaction group g5, the settlement order of the transactions t51, t53, t54, t55, and t52 is determined as being settleable.

ステップS701において判定結果が"真正ループ取引"を含むと確認された場合、確定手段380は、さらに、判定結果が"赤残連鎖取引"を含むか否かを判定する(S709)。ステップS709において、判定結果が"赤残連鎖取引"を含まないと判定した場合、ステップS711へ進む。ステップS709において、判定結果が"赤残連鎖取引"を含むと判定した場合、確定手段380は、ステップS704と同様に、ステップS305により残高が補正された口座へ残高不足通知を行う(S710)。例えば、取引グループg4の場合、確定手段380は、口座a4Aへ残高不足通知を行う。   When it is confirmed in step S701 that the determination result includes “authentication loop transaction”, the determination unit 380 further determines whether or not the determination result includes “red balance chain transaction” (S709). If it is determined in step S709 that the determination result does not include “red balance chain transaction”, the process proceeds to step S711. If it is determined in step S709 that the determination result includes “red balance chain transaction”, the determination unit 380 issues a balance shortage notification to the account whose balance has been corrected in step S305, similarly to step S704 (S710). For example, in the case of the transaction group g4, the confirmation unit 380 issues a balance shortage notification to the account a4A.

その後、確定手段380は、ステップS301で試行が成功した取引の決済順序を確定する(S711)。例えば、取引グループg4の場合、図13(d)に示すように、ステップS301で試行が成功した取引が存在しないため、決済可能な決済順序として確定されない。取引グループg6の場合、図13(f)の取引t61及びt62の決済順序"1"及び"2"が決済可能なものとして確定される。   Thereafter, the determination unit 380 determines the settlement order of the transaction that has been successfully attempted in step S301 (S711). For example, in the case of the transaction group g4, as shown in FIG. 13D, since there is no transaction that has been successfully attempted in step S301, the settlement order is not determined. In the case of the transaction group g6, the settlement orders “1” and “2” of the transactions t61 and t62 in FIG.

そして、確定手段380は、ループ取引に取引不可通知を行う(S712)。ここで、取引不可通知として、例えば、通知対象の口座の所有者へループ取引であるために決済が行えない旨と、関係する他の口座等を通知するとよい。例えば、取引グループg4の場合、確定手段380は、口座a4B、a4D及びa4Eへ取引不可通知を行う。取引グループg6の場合、確定手段380は、口座a6B、a6D及びa6Eへ取引不可通知を行う。   Then, the confirmation unit 380 notifies the transaction failure in the loop transaction (S712). Here, as the transaction impossibility notification, for example, it may be notified to the owner of the account to be notified that the settlement is not possible because it is a loop transaction and other related accounts. For example, in the case of the transaction group g4, the confirmation unit 380 notifies the account a4B, a4D, and a4E that the transaction is not possible. In the case of the transaction group g6, the confirmation unit 380 notifies the accounts a6B, a6D, and a6E that the transaction is not possible.

その後、確定手段380は、確定処理を終了する。尚、図18は、本発明の実施の形態1にかかる確定処理の一例であり、他の方法でも実現可能である。本発明の実施の形態1にかかる確定処理は、少なくとも決済順序調整処理により判定された取引グループの判定結果に応じて各取引の決済順序を確定すればよい。   Thereafter, the confirmation unit 380 ends the confirmation process. FIG. 18 is an example of the confirmation process according to the first embodiment of the present invention, and can be realized by other methods. The confirmation process according to the first embodiment of the present invention may confirm the settlement order of each transaction according to at least the determination result of the transaction group determined by the settlement order adjustment process.

このように、本発明の実施の形態1では、取引グループ決済試行処理により、所定の順序により決済が可能である取引については、逐次、決済が確定したものとし、以後の試行の対象から除くものである。すなわち、一旦、試行が成功した取引については、原則として再度の試行を行わないようにする。そのため、総当たりで試行を行うことに比べて、試行回数を減らすことができる。つまり、決済可能な決済順序を網羅的に求めず、実際に決済可能である割合が高いケースを優先的に検出する。よって、複数の取引を連続して決済する場合に、決済可能な決済順序について、少ない試行回数により効率的に確定することができる。   As described above, in the first embodiment of the present invention, for transactions that can be settled in a predetermined order by the transaction group settlement trial process, it is assumed that settlement is confirmed sequentially and excluded from the subsequent trial targets. It is. That is, once a transaction has been successfully tried, as a rule, it is not tried again. For this reason, the number of trials can be reduced as compared to trials with brute force. In other words, the settlement order that can be settled is not comprehensively determined, but a case where the rate of actual settlement is high is preferentially detected. Therefore, when a plurality of transactions are settled continuously, the settlement order that can be settled can be determined efficiently with a small number of trials.

<発明の実施の形態2>
債券等の取引では、債券額を券種及び枚数により取り扱う場合がある。例えば、"100"を1単位とする券種と、"50"を1単位とする券種とがある場合、それぞれに券面の枚数を管理する必要がある。そして、取引は、券種及び枚数の指定が可能である。そのため、債券取引の場合、単に、口座の残高の金額において決済可能であっても、券種と枚数により決済不可能となる場合がある。そこで、本発明の実施の形態2にかかる決済順序確定システムは、本発明の実施の形態1にかかる決済順序確定システム3の残高情報補正手段360に変更を加えたものである。すなわち、本発明の実施の形態2にかかる残高情報補正手段は、取引が券種及び枚数により定まる債券における取引である場合に、取引グループに含まれる口座の残高における債券の券種及び枚数に基づき、口座当たりの残高を算出するものである。このとき、図1の口座情報記憶部32には、残高情報322に代えて又は別途、債券の券種の識別情報と、当該券種の枚数とを記憶しているものとする。また、図1の取引情報記憶部33には、取引ID332にかかる債券の券種の識別情報と、当該券種の枚数とを取引ID332に関連付けて記憶しているものとする。尚、本発明の実施の形態2にかかる決済順序確定システムは、本発明の実施の形態1と比べて、上述した以外の構成に変更がない。以下、実施の形態1との違いを中心に説明し、実施の形態1と同等の構成及び処理については、詳細な説明を省略する。
<Embodiment 2 of the Invention>
In transactions such as bonds, the amount of bonds may be handled depending on the type and number of tickets. For example, when there are a ticket type with “100” as one unit and a ticket type with “50” as one unit, it is necessary to manage the number of sheet surfaces for each. In the transaction, the ticket type and the number of sheets can be specified. Therefore, in the case of bond transactions, even if payment can be made with the balance of the account, payment may not be possible depending on the type and number of tickets. Therefore, the settlement order determination system according to the second embodiment of the present invention is a modification of the balance information correction unit 360 of the settlement order determination system 3 according to the first embodiment of the present invention. That is, the balance information correction means according to the second embodiment of the present invention is based on the bond type and number of bonds in the balance of the accounts included in the transaction group when the transaction is a transaction on bonds determined by the ticket type and number. The balance per account is calculated. At this time, it is assumed that the account information storage unit 32 of FIG. 1 stores the identification information of the bond type of the bond and the number of the type of the bond instead of the balance information 322 or separately. Further, it is assumed that the transaction information storage unit 33 of FIG. 1 stores the identification information of the bond type of the bond related to the transaction ID 332 and the number of the ticket type in association with the transaction ID 332. Note that the settlement order determination system according to the second exemplary embodiment of the present invention has no change in the configuration other than that described above as compared with the first exemplary embodiment of the present invention. Hereinafter, the difference from the first embodiment will be mainly described, and detailed description of the configuration and processing equivalent to those of the first embodiment will be omitted.

図19は、本発明の実施の形態2にかかる券種及び枚数を考慮した取引グループの例を示す図である。図19(a)は、取引グループg8について、口座と取引との関係を概念で示した図である。また、図19(b)は、図19(a)における一取引の凡例である。ここで、取引グループg8の決済順序の初期設定が取引t81、t82、・・・t87の順序であるものとする。また、各口座の下の括弧書きは、債券の券種及び枚数の初期残高を示し、各取引の下の取引額の括弧書きが"−"である取引は、債券の券種及び枚数の指定がない取引であるものとする。   FIG. 19 is a diagram illustrating an example of a transaction group in consideration of the ticket type and the number of sheets according to the second embodiment of the present invention. FIG. 19A is a diagram conceptually showing the relationship between accounts and transactions for the transaction group g8. FIG. 19B is a legend of one transaction in FIG. Here, it is assumed that the initial setting of the settlement order of the transaction group g8 is the order of transactions t81, t82,. The brackets under each account indicate the initial balance of bond type and number of bonds. For transactions where the parenthesis of the transaction amount under each transaction is "-", the bond type and number of bonds are specified. It is assumed that there is no transaction.

また、図20(a)は、本発明の実施の形態1と同様に取引額のみで口座収支を算出した場合の口座収支の例を示す図である。また、図20(b)は、本発明の実施の形態2にかかる券種及び枚数を考慮した口座収支の例を示す図である。   FIG. 20 (a) is a diagram showing an example of an account balance when the account balance is calculated using only the transaction amount as in the first embodiment of the present invention. FIG. 20B is a diagram showing an example of an account balance in consideration of the ticket type and the number of sheets according to the second embodiment of the present invention.

続いて、図9のステップS303において、口座a8Aについての収支残高を算出する場合を説明する。まず、本発明の実施の形態1にかかる残高情報補正手段360は、口座情報記憶部32から口座a8Aの残高情報"100"を取得する。そして、残高情報補正手段360は、取引情報記憶部33から口座a8Aを取引先の口座とする取引t81、t82及びt83の取引額"200"、"100"及び"150"を取得し、取引額合計(入)"450"を算出する。また、残高情報補正手段360は、取引情報記憶部33から口座a8Aを取引元の口座とする取引t84、t85、t86及びt87の取引額"50"、"150"、"100"及び"100"を取得し、取引額合計(払)"400"を算出する。そして、残高情報補正手段360は、取得した残高情報"100"に、取引額合計(入)"450"を加算し、取引額合計(払)"400"を減算して、収支残高"150"を算出する。   Next, the case where the balance of balance for the account a8A is calculated in step S303 in FIG. 9 will be described. First, the balance information correction unit 360 according to the first exemplary embodiment of the present invention acquires the balance information “100” of the account a8A from the account information storage unit 32. Then, the balance information correction unit 360 acquires the transaction amounts “200”, “100”, and “150” of the transactions t81, t82, and t83 with the account a8A as the customer's account from the transaction information storage unit 33, and the transaction amount The total (input) “450” is calculated. Further, the balance information correction unit 360 stores the transaction amounts “50”, “150”, “100”, and “100” of the transactions t84, t85, t86, and t87 with the account a8A as the transaction source account from the transaction information storage unit 33. And the total transaction amount (payment) “400” is calculated. Then, the balance information correction unit 360 adds the total transaction amount (input) “450” to the acquired balance information “100” and subtracts the total transaction amount (payment) “400” to obtain the balance balance “150”. Is calculated.

一方、本発明の実施の形態2にかかる残高情報補正手段は、口座情報記憶部32から口座a8Aの券種"100"の枚数"1"を初期枚数として取得する。そして、当該残高情報補正手段は、取引情報記憶部33から口座a8Aを取引先の口座とする取引の内、券種指定のある取引t82の券種"100"の枚数"1"を取得し、併せて、券種指定のない取引t81及びt83の取引額"200"及び"150"を取得する。そして、当該残高情報補正手段は、取得した取引額"200"及び"150"についてできるだけ大きな単位の券種の枚数として換算する。つまり、券種"100"の枚数"3"及び券種"50"の枚数"1"と換算する。その後、当該残高情報補正手段は、券種"100"の合計枚数(入)"4"及び券種"50"の合計枚数(入)"1"を算出する。また、当該残高情報補正手段は、取引情報記憶部33から口座a8Aを取引元の口座とする取引の内、券種指定のある取引t84の券種"50"の枚数"1"を取得し、併せて、券種指定のない取引t85、t86及びt87の取引額"150"、"100"及び"100"を取得する。そして、当該残高情報補正手段は、取得した取引額"150"、"100"及び"100"についてできるだけ大きな単位の券種の枚数として換算する。つまり、券種"100"の枚数"3"及び券種"50"の枚数"1"と換算する。その後、当該残高情報補正手段は、券種"100"の合計枚数(払)"3"及び券種"50"の合計枚数(払)"2"を算出する。そして、当該残高情報補正手段は、券種"100"について、初期枚数"1"に、合計枚数(入)"4"を加算し、合計枚数(払)"3"を減算して、収支枚数"2"を算出する。併せて、当該残高情報補正手段は、券種"50"について、初期枚数"0"に、合計枚数(入)"1"を加算し、合計枚数(払)"2"を減算して、収支枚数"−1"を算出する。すなわち、図20(b)に示すように、口座a8Aは、収支残高が赤字と判定される。   On the other hand, the balance information correction unit according to the second exemplary embodiment of the present invention acquires the number “1” of the ticket type “100” of the account a8A from the account information storage unit 32 as the initial number. And the said balance information correction | amendment means acquires the number of sheets "1" of the ticket type "100" of the transaction t82 with a ticket type designation | designated from the transaction information storage part 33 among the transactions which use the account a8A as a customer's account, At the same time, transaction amounts “200” and “150” of transactions t81 and t83 with no ticket type designation are acquired. Then, the balance information correction means converts the acquired transaction amounts “200” and “150” as the number of ticket types in the largest possible unit. That is, the number “3” of the ticket type “100” and the number “1” of the ticket type “50” are converted. Thereafter, the balance information correction means calculates the total number (in) “4” of the ticket type “100” and the total number (in) “1” of the ticket type “50”. Further, the balance information correction means obtains the number “1” of the ticket type “50” of the transaction t84 with the ticket type designation from the transaction information storage unit 33 in the transaction with the account a8A as the transaction source account, In addition, the transaction amounts “150”, “100”, and “100” of transactions t85, t86, and t87 with no ticket type designation are acquired. Then, the balance information correction means converts the acquired transaction amounts “150”, “100”, and “100” as the number of ticket types in the largest possible unit. That is, the number “3” of the ticket type “100” and the number “1” of the ticket type “50” are converted. Thereafter, the balance information correction means calculates the total number (payment) “3” of the ticket type “100” and the total number (payment) “2” of the ticket type “50”. Then, the balance information correction means adds the total number (in) “4” to the initial number “1” and subtracts the total number (payment) “3” for the ticket type “100” to obtain the balance number. “2” is calculated. At the same time, the balance information correction means adds the total number (on) “1” to the initial number “0” and subtracts the total number (payment) “2” for the ticket type “50”. The number “−1” is calculated. That is, as shown in FIG. 20B, the account a8A is determined to have a deficit balance.

このように、図20(a)のように券種及び枚数を考慮しない場合、黒字と判定されるが、本発明の実施の形態2により、図20(b)のように券種及び枚数を考慮することにより、赤字と判定され、単に、口座の残高の金額において決済可能であっても、券種と枚数により決済不可能となる場合を正確に決済可能な決済順序を確定することができる。   As described above, when the ticket type and the number of sheets are not considered as shown in FIG. 20A, it is determined to be in black. However, according to the second embodiment of the present invention, the ticket type and the number of sheets are determined as shown in FIG. By taking into consideration, it is determined that there is a deficit, and even if payment is possible with the amount of the balance of the account, it is possible to determine a payment order in which payment can be made accurately when payment is not possible depending on the type and number of tickets .

<その他の発明の実施の形態>
さらに、本発明は上述した実施の形態のみに限定されるものではなく、既に述べた本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。
<Other embodiments of the invention>
Furthermore, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the gist of the present invention described above.

1a、1b、・・・1n 端末
2 ネットワーク
3 決済順序確定システム
301 CPU
302 RAM
303 ROM
304 通信部
305 ハードディスク
306 OS
307 決済順序確定プログラム
31 制御部
32 口座情報記憶部
321 口座ID
322 残高情報
33 取引情報記憶部
331 グループID
332 取引ID
333 取引元口座ID
334 取引先口座ID
335 取引額
336 決済順序
340 取引グループ生成手段
350 取引グループ決済試行手段
351 取引決済試行手段
352 残高情報更新手段
353 繰り返し実行手段
354 決済順序更新手段
360 残高情報補正手段
370 擬似ループ判定手段
371 端点取引選択手段
372 端点取引処理手段
373 起点口座選択手段
374 起点取引処理手段
380 確定手段
a1A、a1B、a1C、a1D、a1E 口座
a2A、a2B、a2C、a2D、a2E 口座
a3A、a3B、a3C、a3D、a3E 口座
a4A、a4B、a4C、a4D、a4E 口座
a5A、a5B、a5C、a5D、a5E 口座
a6A、a6B、a6C、a6D、a6E 口座
a7A、a7B、a7C、a7D、a7E、a7F、a7G、a7H 口座
a8A、a8B、a8C、a8D、a8E、a8F、a8G、a8H 口座
g1、g2、g3、g4、g5、g6、g7、g8 取引グループ
t11、t12、t13、t14 取引
t21、t22、t23、t24 取引
t31、t32、t33、t34、t35 取引
t41、t42、t43、t44、t45 取引
t51、t52、t53、t54、t55 取引
t61、t62、t63、t64、t65 取引
t71、t72、t73、t74、t75、t76、t77、t78、t79 取引
t81、t82、t83、t84、t85、t86、t87 取引
1a, 1b,... 1n terminal 2 network 3 settlement order determination system 301 CPU
302 RAM
303 ROM
304 Communication unit 305 Hard disk 306 OS
307 Settlement order determination program 31 Control unit 32 Account information storage unit 321 Account ID
322 Balance information 33 Transaction information storage unit 331 Group ID
332 Transaction ID
333 Trading account ID
334 Customer account ID
335 Transaction amount 336 Settlement order 340 Transaction group generation means 350 Transaction group settlement trial means 351 Transaction settlement trial means 352 Balance information update means 353 Repeat execution means 354 Settlement order update means 360 Balance information correction means 370 Pseudo loop determination means 371 Endpoint transaction selection Means 372 Endpoint transaction processing means 373 Origin account selection means 374 Origin transaction processing means 380 Confirmation means a1A, a1B, a1C, a1D, a1E accounts a2A, a2B, a2C, a2D, a2E accounts a3A, a3B, a3C, a3D, a3E A4B, a4C, a4D, a4E accounts a5A, a5B, a5C, a5D, a5E accounts a6A, a6B, a6C, a6D, a6E accounts a7A, a7B, a7C, a7D, a7E, a7F, a7G, a7H 8A, a8B, a8C, a8D, a8E, a8F, a8G, a8H accounts g1, g2, g3, g4, g5, g6, g7, g8 trade groups t11, t12, t13, t14 transactions t21, t22, t23, t24 transactions t31 , T32, t33, t34, t35 transactions t41, t42, t43, t44, t45 transactions t51, t52, t53, t54, t55 transactions t61, t62, t63, t64, t65 transactions t71, t72, t73, t74, t75, t76 , T77, t78, t79 transactions t81, t82, t83, t84, t85, t86, t87 transactions

Claims (9)

取引グループに含まれるL(Lは、3以上の整数)個の取引における決済可能な決済順序を確定する決済順序確定システムであって、
前記取引に関わる口座の残高情報を記憶する残高情報記憶部と、
前記取引グループに含まれる各取引における決済順序を記憶する決済順序記憶部と、
前記取引における前記決済順序を確定する処理を制御する制御部と、を備え、
前記制御部は、
前記決済順序記憶部に格納された決済順序に基づき、前記取引グループに含まれる取引の決済を試行することにより前記決済順序を調整する第1の決済順序調整手段と、
前記第1の決済順序調整手段により調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、当該決済順序を決済可能な順序として確定する確定手段と、を備え、
前記第1の決済順序調整手段は、
前記残高情報記憶部及び前記決済順序記憶部を参照し、前記決済順序がN(Nは、1以上かつL以下の整数)番目の取引の決済を試行する取引決済試行手段と、
前記取引決済試行手段による試行が成功した場合に、当該N番目の取引の決済が確定したと仮定して前記残高情報記憶部に格納された残高情報を更新し、当該試行が失敗した場合には、当該N番目の取引の決済が行われなかったものとする残高情報更新手段と、
Nが1からLまでの間、前記取引決済試行手段による処理及び前記残高情報更新手段による処理を繰り返し実行する第1の繰り返し実行手段と、
前記第1の繰り返し実行手段による実行の結果、前記試行が成功した取引における決済順序以前に、前記試行が失敗した取引が存在する場合、前記試行が失敗した全ての取引における決済順序が、前記試行が成功した取引の全てであるM個(Mは、1以上かつL未満の整数)の取引における決済順序より後の順序であるM+1以降となるように前記決済順序記憶部を更新する決済順序更新手段と、
前記決済順序更新手段による更新後に、NがM+1からLまでの間、前記取引決済試行手段による処理及び前記残高情報更新手段による処理を繰り返し実行する第2の繰り返し実行手段と、
を含むことを特徴とする決済順序確定システム。
A settlement order determination system that determines a settlement order that can be settled in L (L is an integer of 3 or more) transactions included in a transaction group,
A balance information storage unit for storing balance information of an account related to the transaction;
A settlement order storage unit for storing a settlement order in each transaction included in the transaction group;
A control unit that controls processing for determining the settlement order in the transaction,
The controller is
First settlement order adjusting means for adjusting the settlement order by trying settlement of transactions included in the transaction group based on the settlement order stored in the settlement order storage unit;
A confirming means for confirming the settlement order as an order that can be settled when a trial of settlement of all transactions included in the transaction group is successful by the settlement order adjusted by the first settlement order adjustment means; Prepared,
The first settlement order adjustment means includes:
Transaction settlement trial means for referring to the balance information storage unit and the settlement order storage unit and trying to settle a transaction for which the settlement order is N (N is an integer of 1 or more and L or less);
When the trial by the transaction settlement trial unit is successful, the balance information stored in the balance information storage unit is updated on the assumption that settlement of the Nth transaction is confirmed, and when the trial fails , Balance information updating means that the Nth transaction has not been settled;
A first iterative execution unit that repeatedly executes the process by the transaction settlement trial unit and the process by the balance information update unit while N is from 1 to L;
As a result of execution by the first repetitive execution means, if there is a transaction in which the trial has failed before the settlement order in the transaction in which the trial was successful, the settlement order in all transactions in which the trial has failed is the trial Settlement order update for updating the settlement order storage unit so that it becomes M + 1 or later after the settlement order in the M transactions (M is an integer of 1 or more and less than L) which are all successful transactions Means,
A second iterative execution unit that repeatedly executes the process by the transaction settlement trial unit and the process by the balance information update unit after N is updated from M + 1 to L after the update by the settlement order update unit;
A settlement order determination system characterized by including:
前記確定手段により前記決済順序が決済可能な順序として確定されなかった場合に、前記残高情報記憶部及び前記決済順序記憶部を参照し、前記取引グループに含まれる全ての取引の決済が確定したと仮定した場合の口座当たりの残高を算出し、算出された残高が所定値以下となる口座について、残高が所定値となる取引額を加算して前記残高情報記憶部に格納された残高情報を補正する残高情報補正手段と、
前記残高情報補正手段により補正された残高情報を用いて、前記決済順序記憶部に格納された決済順序に基づき、前記第1の決済順序調整手段により前記試行が失敗した全ての取引についての決済を試行することにより前記決済順序を調整する第2の決済順序調整手段と、をさらに備え、
前記確定手段は、前記第2の決済順序調整手段により調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、前記第1の決済順序調整手段により前記試行が成功した最後の取引の決済順序までを決済可能な順序としてさらに確定することを特徴とする請求項1に記載の決済順序確定システム。
When the settlement order is not confirmed as an order that can be settled by the confirmation means, the balance information storage unit and the settlement order storage unit are referred to and settlement of all transactions included in the transaction group is confirmed. The balance per account is calculated under the assumption, and the balance information stored in the balance information storage unit is corrected by adding the transaction amount where the balance is a predetermined value for an account where the calculated balance is a predetermined value or less. Balance information correction means for
Using the balance information corrected by the balance information correcting unit, the first settlement order adjusting unit settles all transactions for which the trial has failed based on the settlement order stored in the settlement order storage unit. A second settlement order adjusting means for adjusting the settlement order by trying,
The confirmation means determines the trial by the first settlement order adjustment means when the trial of settlement of all transactions included in the transaction group is successful by the settlement order adjusted by the second settlement order adjustment means. 2. The settlement order determination system according to claim 1, wherein the settlement order until the settlement order of the last successful transaction is further confirmed as an order that can be settled.
前記確定手段により前記決済順序が決済可能な順序として確定されなかった場合に、前記取引グループに含まれる各取引から、取引元の口座が当該取引グループ内の他の取引の取引先の口座と一致しない取引である始点取引と、取引先の口座が当該取引グループ内の他の取引の取引元の口座と一致しない取引である終点取引とを選択する端点取引選択手段と、
前記始点取引における決済順序を、最初の順序として前記決済順序記憶部を更新し、当該始点取引の決済が確定したと仮定して前記残高情報記憶部に格納された残高情報を更新し、前記終点取引における決済順序を、最後の順序として前記決済順序記憶部を更新する端点取引処理手段と、
前記端点取引処理手段により更新された決済順序に基づき、前記取引グループの内、前記始点取引及び前記終点取引を除いた取引についての決済を試行することにより前記決済順序を調整する第3の決済順序調整手段と、をさらに備え、
前記確定手段は、前記第3の決済順序調整手段により調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、前記決済順序記憶部に格納された決済順序を決済可能な順序として確定することを特徴とする請求項1又は2に記載の決済順序確定システム。
When the settlement order is not confirmed as an order that can be settled by the confirmation means, from each transaction included in the transaction group, the account of the transaction source matches the account of the business partner of the other transaction in the transaction group An end point transaction selection means for selecting a start point transaction that is a transaction that is not a transaction, and an end point transaction that is a transaction in which the account of the customer does not match the account of the transaction source of another transaction in the transaction group;
The settlement order storage unit is updated with the settlement order in the start point transaction as an initial order, the balance information stored in the balance information storage unit is updated on the assumption that settlement of the start point transaction is confirmed, and the end point An end point transaction processing means for updating the settlement order storage unit as a settlement order in a transaction as the last order;
Based on the settlement order updated by the end point transaction processing means, a third settlement order that adjusts the settlement order by trying settlement for transactions other than the start point transaction and the end point transaction in the transaction group. Adjusting means,
The confirmation means stores the payment order stored in the payment order storage unit when the payment attempt of all the transactions included in the transaction group is successful by the payment order adjusted by the third payment order adjustment means. The settlement order confirmation system according to claim 1 or 2, wherein the settlement order is confirmed as an order in which settlement is possible.
前記第3の決済順序調整手段により試行が失敗した取引に含まれる口座から、自己が前記取引先の口座となる取引が存在し、かつ、自己が前記取引元の口座となる取引が2以上存在する口座を選択する起点口座選択手段と、
前記起点口座選択手段により選択された口座が前記取引元の口座となる取引である2以上の起点取引の決済順序における先後関係を入れ替えて前記決済順序記憶部を更新する起点取引処理手段と、をさらに備え、
前記第3の決済順序調整手段は、前記起点取引処理手段により更新された決済順序に基づき、前記取引グループの内、前記始点取引及び前記終点取引を除いた取引についての決済を試行することにより前記決済順序を調整することを特徴とする請求項3に記載の決済順序確定システム。
Among the accounts included in the transaction for which the trial has failed by the third settlement order adjustment means, there are transactions in which the customer is the account of the business partner, and there are two or more transactions in which the self is the account of the transaction source Origin account selection means for selecting an account to be
An origin transaction processing means for updating the settlement order storage unit by exchanging a prior relationship in the settlement order of two or more origin transactions, which is a transaction in which the account selected by the origin account selecting means is the transaction of the transaction source; In addition,
The third settlement order adjustment means, based on the settlement order updated by the origin transaction processing means, tries to settle a transaction excluding the start point transaction and the end point transaction in the transaction group. 4. The settlement order determination system according to claim 3, wherein the settlement order is adjusted.
前記確定手段は、前記第3の決済順序調整手段により調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、前記第1の決済順序調整手段により前記試行が成功した最後の取引の決済順序までを決済可能な順序として確定することを特徴とする請求項1乃至4のいずれか1項に記載の決済順序確定システム。   When the settlement of all transactions included in the transaction group succeeds in the settlement order adjusted by the third settlement order adjustment unit, the determination unit performs the trial by the first settlement order adjustment unit. The settlement order confirmation system according to any one of claims 1 to 4, wherein a settlement order up to a settlement order of a last successful transaction is confirmed as an order that can be settled. 取引元の口座から取引先の口座へ所定額を決済するための複数の取引を外部から受け付け、受け付けた複数の取引の中から、前記取引先の口座又は前記取引元の口座の少なくとも一方の口座が他の取引と共通する取引を選択し、選択した取引の集合を前記取引グループとして生成する取引グループ生成手段をさらに備え、
前記第1の決済順序調整手段は、前記取引グループ生成手段により生成された取引グループに対して、前記決済順序を調整することを特徴とする請求項1乃至5のいずれか1項に記載の決済順序確定システム。
A plurality of transactions for settlement of a predetermined amount from a trading partner account to a trading partner account are accepted from the outside, and at least one account of the trading partner account or the trading partner account is selected from the plurality of accepted trading transactions Further comprises a transaction group generating means for selecting a transaction common to other transactions and generating a set of the selected transactions as the transaction group,
The settlement according to any one of claims 1 to 5, wherein the first settlement order adjustment unit adjusts the settlement order with respect to the transaction group generated by the transaction group generation unit. Order confirmation system.
前記残高情報補正手段は、前記取引が券種及び枚数により定まる債券における取引である場合に、前記取引グループに含まれる口座の残高における債券の券種及び枚数に基づき、前記口座当たりの残高を算出することを特徴とする請求項2に記載の決済順序確定システム。   The balance information correction means calculates the balance per account based on the bond type and number of bonds in the account balance included in the transaction group when the transaction is a transaction on bonds determined by the type and number of tickets. The settlement order determination system according to claim 2, wherein: 取引に関わる口座の残高情報を記憶する残高情報記憶部と、
取引グループに含まれるL(Lは、3以上の整数)個の取引における決済順序を記憶する決済順序記憶部と、
前記取引における前記決済順序を確定する処理を制御する制御部と、
を備えるコンピュータにおける前記取引グループに含まれる各取引における決済可能な決済順序を確定する処理を制御するための決済順序確定方法であって、
前記制御部において、
前記決済順序記憶部に格納された決済順序に基づき、前記取引グループに含まれる取引の決済を試行することにより前記決済順序を調整する第1の決済順序調整ステップと、
前記第1の決済順序調整ステップにより調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、当該決済順序を決済可能な順序として確定する確定ステップと、を含み、
前記第1の決済順序調整ステップは、
前記残高情報記憶部及び前記決済順序記憶部を参照し、前記決済順序がN(Nは、1以上かつL以下の整数)番目の取引の決済を試行する取引決済試行ステップと、
前記取引決済試行ステップによる試行が成功した場合に、当該N番目の取引の決済が確定したと仮定して前記残高情報記憶部に格納された残高情報を更新し、当該試行が失敗した場合には、当該N番目の取引の決済が行われなかったものとする残高更新ステップと、
Nが1からLまでの間、前記取引決済試行ステップ及び前記残高更新ステップを繰り返し実行する第1の繰り返し実行ステップと、
前記第1の繰り返し実行ステップによる実行の結果、前記試行が成功した取引における決済順序以前に、前記試行が失敗した取引が存在する場合、前記試行が失敗した全ての取引における決済順序が、前記試行が成功した取引の全てであるM個(Mは、1以上かつL未満の整数)の取引における決済順序より後の順序であるM+1以降となるように前記決済順序記憶部を更新する決済順序更新ステップと、
前記決済順序更新ステップによる更新後に、NがM+1からLまでの間、前記取引決済試行ステップ及び前記残高更新ステップを繰り返し実行する第2の繰り返し実行ステップと、
を含むことを特徴とする決済順序確定方法。
A balance information storage unit for storing balance information of accounts related to transactions;
A settlement order storage unit for storing settlement orders in L (L is an integer of 3 or more) transactions included in the transaction group;
A control unit for controlling processing for determining the settlement order in the transaction;
A settlement order determination method for controlling a process for determining a settlement order that can be settled in each transaction included in the transaction group in a computer comprising:
In the control unit,
A first settlement order adjustment step of adjusting the settlement order by trying to settle a transaction included in the transaction group based on the settlement order stored in the settlement order storage unit;
A confirming step of determining the settlement order as a settlementable order when trials of settlement of all transactions included in the transaction group are successful by the settlement order adjusted in the first settlement order adjustment step; Including
The first settlement order adjustment step includes:
A transaction settlement trial step of referring to the balance information storage unit and the settlement order storage unit and attempting settlement of a transaction whose Nth order is N (N is an integer of 1 or more and L or less);
When the trial by the transaction settlement trial step is successful, the balance information stored in the balance information storage unit is updated on the assumption that settlement of the Nth transaction is confirmed, and when the trial fails , A balance update step in which the Nth transaction has not been settled;
A first iterative execution step for repeatedly executing the transaction settlement trial step and the balance update step while N is from 1 to L;
As a result of the execution by the first repeated execution step, if there is a transaction in which the trial has failed before the settlement order in the transaction in which the trial was successful, the settlement order in all transactions in which the trial has failed is the trial Settlement order update for updating the settlement order storage unit so that it becomes M + 1 or later after the settlement order in the M transactions (M is an integer of 1 or more and less than L) which are all successful transactions Steps,
A second repetitive execution step of repeatedly executing the transaction settlement trial step and the balance update step while N is from M + 1 to L after the settlement order update step;
A settlement order determination method comprising:
取引に関わる口座の残高情報を記憶する残高情報記憶部と、
取引グループに含まれるL(Lは、3以上の整数)個の取引における決済順序を記憶する決済順序記憶部と、
前記取引における前記決済順序を確定する処理を制御する制御部と、
を備えるコンピュータに、前記取引グループに含まれる各取引における決済可能な決済順序を確定する処理を実行させる決済順序確定プログラムであって、
前記決済順序記憶部に格納された決済順序に基づき、前記取引グループに含まれる取引の決済を試行することにより前記決済順序を調整する第1の決済順序調整処理と、
前記第1の決済順序調整処理により調整された決済順序により前記取引グループに含まれる全ての取引の決済の試行が成功する場合に、当該決済順序を決済可能な順序として確定する確定処理と、を含み、
前記第1の決済順序調整処理は、
前記残高情報記憶部及び前記決済順序記憶部を参照し、前記決済順序がN(Nは、1以上かつL以下の整数)番目の取引の決済を試行する取引決済試行処理と、
前記取引決済試行処理による試行が成功した場合に、当該N番目の取引の決済が確定したと仮定して前記残高情報記憶部に格納された残高情報を更新し、当該試行が失敗した場合には、当該N番目の取引の決済が行われなかったものとする残高更新処理と、
Nが1からLまでの間、前記取引決済試行処理及び前記残高更新処理を繰り返し実行する第1の繰り返し実行処理と、
前記第1の繰り返し実行処理による実行の結果、前記試行が成功した取引における決済順序以前に、前記試行が失敗した取引が存在する場合、前記試行が失敗した全ての取引における決済順序が、前記試行が成功した取引の全てであるM個(Mは、1以上かつL未満の整数)の取引における決済順序より後の順序であるM+1以降となるように前記決済順序記憶部を更新する決済順序更新処理と、
前記決済順序更新処理による更新後に、NがM+1からLまでの間、前記取引決済試行処理及び前記残高更新処理を繰り返し実行する第2の繰り返し実行処理と、
を含むことを特徴とする決済順序確定プログラム。
A balance information storage unit for storing balance information of accounts related to transactions;
A settlement order storage unit for storing settlement orders in L (L is an integer of 3 or more) transactions included in the transaction group;
A control unit for controlling processing for determining the settlement order in the transaction;
A settlement order determination program for causing a computer comprising: to execute a process for determining a settlement order in which settlement is possible in each transaction included in the transaction group,
A first settlement order adjustment process for adjusting the settlement order by trying settlement of transactions included in the transaction group based on the settlement order stored in the settlement order storage unit;
A confirmation process for confirming the settlement order as an order that can be settled when a settlement trial of all transactions included in the transaction group is successful by the settlement order adjusted by the first settlement order adjustment process; Including
The first settlement order adjustment process includes:
A transaction settlement trial process that refers to the balance information storage unit and the settlement order storage unit, and that attempts to settle a transaction in which the settlement order is N (N is an integer greater than or equal to 1 and less than or equal to L);
When the trial by the transaction settlement trial process is successful, the balance information stored in the balance information storage unit is updated on the assumption that settlement of the Nth transaction is confirmed, and the trial fails , A balance update process that assumes that the Nth transaction has not been settled;
A first iterative execution process for repeatedly executing the transaction settlement trial process and the balance update process while N is from 1 to L;
As a result of execution by the first repetitive execution process, if there is a transaction in which the trial has failed before the settlement order in the transaction in which the trial was successful, the settlement order in all transactions in which the trial has failed is the trial Settlement order update for updating the settlement order storage unit so that it becomes M + 1 or later after the settlement order in the M transactions (M is an integer of 1 or more and less than L) which are all successful transactions Processing,
A second repetitive execution process for repeatedly executing the transaction settlement trial process and the balance update process between N and M + 1 to L after the update by the settlement order update process;
A settlement order determination program characterized by comprising:
JP2010073068A 2010-03-26 2010-03-26 Settlement-order determining system, method and program Pending JP2011204148A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010073068A JP2011204148A (en) 2010-03-26 2010-03-26 Settlement-order determining system, method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010073068A JP2011204148A (en) 2010-03-26 2010-03-26 Settlement-order determining system, method and program

Publications (1)

Publication Number Publication Date
JP2011204148A true JP2011204148A (en) 2011-10-13

Family

ID=44880702

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010073068A Pending JP2011204148A (en) 2010-03-26 2010-03-26 Settlement-order determining system, method and program

Country Status (1)

Country Link
JP (1) JP2011204148A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014089309A1 (en) * 2012-12-05 2014-06-12 Google Inc. Methods for discovering and paying debts owed by a group
US10410184B2 (en) 2012-03-30 2019-09-10 Google Llc Tracking and managing group expenditures

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10410184B2 (en) 2012-03-30 2019-09-10 Google Llc Tracking and managing group expenditures
US10963847B2 (en) 2012-03-30 2021-03-30 Google Llc Tracking and managing group expenditures
WO2014089309A1 (en) * 2012-12-05 2014-06-12 Google Inc. Methods for discovering and paying debts owed by a group
US9123038B2 (en) 2012-12-05 2015-09-01 Google Inc. Methods for discovering and paying debts owed by a group
CN104995647A (en) * 2012-12-05 2015-10-21 谷歌公司 Methods for discovering and paying debts owed by a group
KR101624682B1 (en) 2012-12-05 2016-05-26 구글 인코포레이티드 Methods for discovering and paying debts owed by a group
KR20160062212A (en) * 2012-12-05 2016-06-01 구글 인코포레이티드 Methods for discovering and paying debts owed by a group
KR101676453B1 (en) 2012-12-05 2016-11-15 구글 인코포레이티드 Methods for discovering and paying debts owed by a group
KR20160133009A (en) * 2012-12-05 2016-11-21 구글 인코포레이티드 Methods for discovering and paying debts owed by a group
CN104995647B (en) * 2012-12-05 2017-11-17 谷歌公司 For finding and paying by the method for group's debt due
KR102023586B1 (en) 2012-12-05 2019-09-23 구글 엘엘씨 Methods for discovering and paying debts owed by a group

Similar Documents

Publication Publication Date Title
US20220366491A1 (en) Incrementally perfected digital asset collateral wallet
US11037111B2 (en) Method for issuing currency and making payment by managing balance database for each block in blockchain network and server using same
CN110020948A (en) Assets source tracing method and device, electronic equipment based on block chain
US20200294046A1 (en) Selection of digital properties for transactions
CN110020936A (en) Assets management method and device, electronic equipment based on block chain
US20230252569A1 (en) Computer Implemented Method for Compiling a Portfolio of Assets
EP3469539A2 (en) A pareto-based genetic algorythm for a dynamic portfolio management
CN109993517A (en) Instant chain type method of payment, computer equipment and storage medium
CN112884575A (en) Contract transaction system
JP2011204148A (en) Settlement-order determining system, method and program
US8341054B2 (en) System and method for bank account management and currency investment
US20240062204A1 (en) Eliminating the race condition and infinite approval loophole for smart contracts and other blockchain transactions
WO2016016719A2 (en) Online trading systems and methods
CN109544329B (en) Method, device and system for matching
CN116151982A (en) Transaction data processing method, device, equipment and medium for hot spot account
KR102142275B1 (en) Apparatus and method for approving deposit of cryptocurrency
Roig et al. Optimal allocation strategies in platform trials
CN110874789B (en) Data processing method and device and terminal
WO2020041794A1 (en) A financial transactions system and method utilizing blockchain transfers
US20220309478A1 (en) Optimizing execution of transaction requests
KR20200048530A (en) System for controlling reserve ratio of cryptocurrency based on block chain
JP7350205B1 (en) A method of providing stablecoin services on a blockchain network and a blockchain system using the same
US11620707B2 (en) Systems and methods for prevention of manipulation and gaming in electronic intraday auctions
Lommers et al. The Case for Stochastically Dynamic AMMs
US20240112157A1 (en) Liquidation management operations for improved ledger performance