Multi-party payment proportion allocation method and device, equipment and medium
Patent Information
- Application Number
- CN202611266301.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]本发明实施例提供了一种多方支付的比例清分方法、装置、设备及介质,旨在解决现有的多方支付的比例清分技术中存在公平性差、舍入导致金额不守恒、忽略原始金额差异,难以兼顾合理性与精确性,从而导致处理效率较低的问题
[0010]本发明实施例提供了一种多方支付的比例清分方法、装置、设备及介质,所述方法包括根据列表获取规则进行列表获取得到初始待提交到期代付列表;根据余额查询规则对所述初始待提交到期代付列表进行余额查询处理得到第一待提交到期代付列表;基于启动判断策略对所述第一待提交到期代付列表进行启动判断处理得到第二待提交到期代付列表;利用比例清分算法对所述第二待提交到期代付列表进行比例清分处理得到支付单。因此,本发明实施例对获取的初始待提交到期代付列表进行余额查询、启动判断与比例清分处理得到支付单,以保证比例公平、总额严格守恒,且保留原始金额差异,实现处理机制的公平性,确保处理的准确性,从而提高处理效率。
Smart Images

Figure CN123015142A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, equipment and medium for proportional clearing of multi-party payments. Background Technology
[0002] In supply chain finance payment scenarios, companies often need to make payments to multiple suppliers simultaneously upon maturity. Typically, payment accounts are managed uniformly by the funding company, meaning the same funding party uses the same payment account to pay different amounts to multiple suppliers. However, in practice, the funding party's payment account balance often cannot cover the total amount of all outstanding payments in a given batch. Therefore, it is necessary to allocate the limited account balance fairly and reasonably to each outstanding payment.
[0003] Existing clearing schemes mainly include the following: First-come, first-served (FCL): Payments are made sequentially based on time. Once the balance is exhausted, subsequent payments are not made. However, this method is unfair to later suppliers and easily leads to disputes. Simple truncation: The allocation amount for each payment is calculated proportionally, but each result is directly truncated or rounded. Due to multiple independent roundings, the cumulative allocation amount may be less than or greater than the available balance, resulting in incomplete allocation or over-allocation, and the balance cannot be guaranteed. Equal allocation: The available balance is evenly distributed among the outstanding payments. This method ignores the differences in the original amounts payable for each payment.
[0004] Therefore, existing clearing technologies suffer from poor fairness, rounding leading to non-conservation of amounts, and ignoring differences in original amounts, making it difficult to balance rationality and accuracy, resulting in low processing efficiency. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and medium for proportional clearing of multi-party payments, aiming to solve the problems of poor fairness, rounding leading to non-conservation of amounts, ignoring differences in original amounts, difficulty in balancing rationality and accuracy, and thus low processing efficiency in existing proportional clearing technologies for multi-party payments.
[0006] To address the aforementioned problems, in a first aspect, embodiments of the present invention provide a method for proportional clearing of multi-party payments, the method comprising: The initial list of overdue payments to be submitted is obtained by retrieving the list according to the list retrieval rules. According to the balance query rules, the initial list of overdue payments to be submitted is processed to obtain the first list of overdue payments to be submitted. Based on the initiation judgment strategy, the first list of overdue payments to be submitted is processed to obtain the second list of overdue payments to be submitted. The payment order is obtained by performing proportional clearing processing on the second list of overdue payments to be submitted using a proportional clearing algorithm.
[0007] Secondly, embodiments of this application provide a proportional clearing device for multi-party payments, the proportional clearing device for multi-party payments comprising: The list retrieval unit is used to retrieve an initial list of overdue payments to be submitted according to the list retrieval rules. The balance query unit is used to perform balance query processing on the initial list of overdue payments to be submitted according to the balance query rules to obtain the first list of overdue payments to be submitted. A startup judgment unit is used to perform startup judgment processing on the first list of overdue payments to be submitted based on a startup judgment strategy to obtain a second list of overdue payments to be submitted. The proportional clearing unit is used to perform proportional clearing processing on the second list of overdue payments to be submitted using a proportional clearing algorithm to obtain a payment order.
[0008] Thirdly, embodiments of this application provide a computer device, the computer device including a memory and a processor connected to the memory; the memory is used to store a computer program, and the processor is used to run the computer program stored in the memory to perform the method described in the first aspect above.
[0009] Fourthly, embodiments of this application provide a storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, implement the method described in the first aspect above.
[0010] This invention provides a method, apparatus, device, and medium for proportional clearing of multi-party payments. The method includes obtaining an initial list of overdue payments to be submitted according to list acquisition rules; performing balance query processing on the initial list of overdue payments to be submitted according to balance query rules to obtain a first list of overdue payments to be submitted; performing activation judgment processing on the first list of overdue payments to be submitted based on an activation judgment strategy to obtain a second list of overdue payments to be submitted; and performing proportional clearing processing on the second list of overdue payments to be submitted using a proportional clearing algorithm to obtain a payment order. Therefore, this invention uses balance query, activation judgment, and proportional clearing processing on the obtained initial list of overdue payments to submit to obtain a payment order, ensuring proportional fairness, strict total amount conservation, and preservation of original amount differences, thereby achieving fairness in the processing mechanism, ensuring processing accuracy, and improving processing efficiency. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart illustrating the proportional clearing method for multi-party payments provided in an embodiment of the present invention; Figure 2 A schematic block diagram of a proportional clearing device for multi-party payments provided in an embodiment of the present invention; Figure 3 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation
[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0015] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0016] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0017] It should be noted that if any AI models, software tools, or components not belonging to the applicant appear in the embodiments of this application, they are merely illustrative examples and do not represent actual use. The user personal information involved in the embodiments of this application is obtained by an entity authorized (knowing and consenting) by the relevant parties or fully authorized by all parties through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0018] Please see Figure 1 , Figure 1 This is a flowchart illustrating the proportional clearing method for multi-party payments provided in an embodiment of the present invention. Figure 1 As shown, this embodiment of the invention provides a method for proportional clearing of multi-party payments, which includes the following steps S110-S140.
[0019] S110. Obtain the initial list of overdue payments to be submitted by retrieving the list according to the list retrieval rules.
[0020] In this embodiment, the application scenario of this solution can be in the data interaction scenario in the financial field, such as the maturity redemption scenario of supply chain finance.
[0021] In one embodiment, obtaining the initial list of overdue payments to be submitted according to the list retrieval rules includes: In the transaction database, the payment status and transaction date are used as query conditions to obtain the initial list of overdue payments to be submitted.
[0022] In this embodiment, the payment status may include statuses such as pending submission, submission failure, insufficient balance, and partial payment, and the transaction date refers to the specific date on which the transaction occurred.
[0023] The initial list of overdue payments to be submitted is obtained by querying the transaction database using payment status and transaction date as query conditions. Specifically, the initial list of overdue payments to be submitted is obtained by querying the transaction database using payment status and transaction date as query conditions.
[0024] S120. Perform balance query processing on the initial list of overdue payments to be submitted according to the balance query rules to obtain the first list of overdue payments to be submitted.
[0025] In this embodiment, after obtaining the initial list of overdue payments to be submitted, a balance query can be performed on the initial list of overdue payments to be submitted according to the balance query rules to obtain the first list of overdue payments to be submitted.
[0026] In one embodiment, the step of performing a balance query on the initial list of overdue payments to be submitted according to the balance query rules to obtain a first list of overdue payments to be submitted includes: The initial list of overdue payments to be submitted is grouped according to the payer's identifier to obtain several initial list groups; Take one initial list record from each of the initial list groups, and perform an identifier extraction process on the initial list record to obtain the account identifier; The available account balance is obtained by querying using a preset balance query interface and the account identifier; The first list of overdue payments to be submitted is formed by grouping several of the initial lists and the corresponding available account balances.
[0027] In this embodiment, the initial list of overdue payments to be submitted is grouped according to the payer identifier to obtain several initial list groups. Specifically, the payer identifier is used as the grouping condition to group the initial list of overdue payments to be submitted, resulting in several initial list groups. That is, the payer identifier of each list in each initial list group is the same. The payer identifier refers to the payer company identifier, i.e., the fund provider company identifier, which is unique, and the same payer company corresponds to the same set of payment merchants / accounts. Each initial list group includes several initial lists, and each initial list includes several initial list records.
[0028] The method involves randomly selecting one initial list record from each initial list group and performing an identifier extraction process on the initial list record to obtain an account identifier. Specifically, the method involves randomly selecting one initial list record from any initial list among several initial lists in the initial list group and performing an identifier extraction process on the initial list record to obtain the account identifier. The account identifier includes account information such as merchant number and merchant name, which serves as the payment account identifier for the entire group corresponding to the initial list group.
[0029] The method involves using a preset balance query interface and the account identifier to perform a query to obtain the available account balance. Specifically, the balance query interface is called, and the account identifier is used to perform a balance query to obtain the available account balance. When the balance query interface is abnormal, all payment statuses in the corresponding initial list group are marked as submission failed and removed from the initial pending payment list. Specifically, if the available account balance is not returned or an interface error message is returned, it can be considered that the balance query interface is abnormal.
[0030] The first list of overdue payments to be submitted is formed by grouping several of the initial lists and the corresponding available account balances.
[0031] S130. Based on the initiation judgment strategy, the first list of overdue payments to be submitted is processed to obtain the second list of overdue payments to be submitted.
[0032] In this embodiment, after obtaining the first list of overdue payments to be submitted, the first list of overdue payments to be submitted can be processed to obtain the second list of overdue payments to be submitted based on the initiation judgment strategy.
[0033] In one embodiment, the step of performing a start-up judgment process on the first list of overdue payments to be submitted based on a start-up judgment strategy to obtain a second list of overdue payments to be submitted includes: The total amount due is obtained by summing up the amounts due from several initial lists in the initial list grouping. The available balance of each account in each of the initial list groups is compared with the corresponding total amount to be paid; When the available balance of the account is greater than or equal to the total amount to be paid, the preset payment interface is called to process the full payment and obtain the payment order; When the available balance of the account is less than the total amount to be paid, the corresponding initial list group is placed into the second list of overdue payments to be submitted.
[0034] In this embodiment, the process of summarizing the outstanding payment amounts of several initial lists in the initial list group to obtain the corresponding total outstanding payment amount specifically involves obtaining the intermediate outstanding payment amounts of several records in the initial list and summing the intermediate outstanding payment amounts as the outstanding payment amount; obtaining the outstanding payment amounts of several initial lists in each initial list group and summing the outstanding payment amounts as the total outstanding payment amount.
[0035] The process of comparing the available balance of each account in each initial list group with the corresponding total amount to be paid specifically involves comparing the available balance of the account with the total amount to be paid.
[0036] When the available balance of the account is greater than or equal to the total amount to be paid, a preset payment interface is called to perform full payment processing to obtain the payment order; specifically, when it is determined that the available balance of the account is greater than or equal to the total amount to be paid, the payment interface is directly called to perform full payment processing to obtain the payment order.
[0037] When the available balance of the account is less than the total amount to be paid, the corresponding initial list group is placed into the second list of overdue payments to be submitted; specifically, when it is confirmed that the available balance of the account is less than the total amount to be paid, the corresponding initial list group is directly placed into the second list of overdue payments to be submitted.
[0038] S140. The second list of overdue payments to be submitted is processed using a proportional clearing algorithm to obtain a payment order.
[0039] In this embodiment, after determining the second list of overdue payments to be submitted, a proportional clearing algorithm can be used to perform proportional clearing on the second list of overdue payments to be submitted to obtain payment orders.
[0040] In one embodiment, the step of using a proportional clearing algorithm to perform proportional clearing processing on the second list of overdue payments to obtain a payment order includes: Using the amount to be paid as the sorting key, each initial list group is sorted in ascending order to obtain the corresponding ordered list group. Retrieve an initial list from the ordered list group in sequence; When the initial list is not the last initial list in the ordered list grouping, the proportional clearing algorithm is used to perform proportional clearing calculation on the amount to be paid, the available account balance and the total amount to be paid to obtain the first allocation amount; When the first allocated amount is greater than 0, the first allocated amount is added to the allocated cumulative amount, and a corresponding sub-payment order is generated. Then, the next initial list in the ordered list group is obtained in sequence. When the first allocation amount is less than or equal to 0, the first allocation amount is set to the minimum executable amount to obtain the updated first allocation amount. The updated first allocation amount is added to the allocated cumulative amount, and the corresponding sub-payment order is generated. Then, the next initial list in the ordered list group is obtained in sequence. The payment order is composed of several of the aforementioned sub-payment orders.
[0041] In this embodiment, the amount to be paid is used as the sorting key to sort each initial list group in ascending order to obtain the corresponding ordered list group; specifically, the amount to be paid is used as the sorting key, that is, each initial list group is sorted in ascending order within the group according to the total amount to be paid to obtain the corresponding ordered list group.
[0042] The step involves sequentially obtaining an initial list from the ordered list group; specifically, obtaining one initial list from the ordered list group in sequence, i.e., obtaining it from the first initial list in the ordered list group.
[0043] When the initial list is not the last initial list in the ordered list grouping, the proportional clearing algorithm is used to perform proportional clearing calculation on the amount due, the available account balance, and the total amount due to obtain a first allocation amount. Specifically, when the initial list is not the last initial list in the ordered list grouping, the proportional clearing algorithm is used to perform proportional clearing calculation on the amount due, the available account balance, and the total amount due to obtain a first allocation amount. The formula corresponding to the proportional clearing algorithm is: First allocation amount = Amount due × Available account balance / Total amount due to obtain.
[0044] The first allocation amount is obtained by proportionally allocating the outstanding payment amount, the available account balance, and the total outstanding payment amount using the proportional clearing algorithm. Specifically, a high-precision multiplication algorithm is used to obtain a high-precision product value from the product of the outstanding payment amount and the available account balance. Then, a safe division algorithm is used to divide the high-precision product value and the total outstanding payment amount to obtain the first allocation amount. Here, the high-precision multiplication algorithm refers to the BigDecimal.multiply algorithm; the safe division algorithm refers to the divide algorithm.
[0045] When the first allocated amount is greater than 0, the first allocated amount is added to the allocated cumulative amount, and a corresponding sub-payment order is generated. Then, the next initial list in the ordered list group is obtained in sequence. Specifically, when it is confirmed that the first allocated amount is greater than 0, the first allocated amount is added to the allocated cumulative amount, and a corresponding sub-payment order is generated. Then, the next initial list in the ordered list group is obtained in sequence, that is, the recursion continues.
[0046] When the first allocated amount is less than or equal to 0, the first allocated amount is set to the minimum executable amount to obtain an updated first allocated amount. The updated first allocated amount is added to the already allocated cumulative amount, and a corresponding sub-payment order is generated. The process continues to retrieve the next initial list from the ordered list group in sequence. Specifically, when it is confirmed that the first allocated amount is less than or equal to 0, the first allocated amount is set to the minimum executable amount to obtain an updated first allocated amount. The updated first allocated amount is added to the already allocated cumulative amount, and a corresponding sub-payment order is generated. The process continues to retrieve the next initial list from the ordered list group in sequence. The minimum executable amount is 0.01.
[0047] The payment order is composed of several sub-payment orders obtained recursively.
[0048] In one embodiment, the step of using a proportional clearing algorithm to perform proportional clearing processing on the second list of overdue payments to obtain a payment order further includes: When the initial list is the last initial list in the ordered list grouping, the difference between the available balance of the account and the allocated cumulative amount is used as the second allocation amount; When the second allocation amount is greater than 0, the corresponding sub-payment order is generated.
[0049] In this embodiment, when the initial list is the last initial list in the ordered list group, the difference between the available account balance and the allocated cumulative amount is used as the second allocation amount; specifically, when the initial list is the last initial list in the ordered list group, the difference between the available account balance and the allocated cumulative amount is directly obtained as the second allocation amount.
[0050] When the second allocated amount is greater than 0, a corresponding sub-payment order is generated; specifically, when it is confirmed that the second allocated amount is greater than 0, a corresponding sub-payment order is generated.
[0051] For example, there are 5 pending payments with amounts of [0.01, 0.02, 100, 200, 300] (in ascending order), and an account balance of 100 yuan. The total pending payment amount is allAmount = 600.03, and the account balance is balance = 100. Processing the first payment: The first allocation amount payAmt = 0.01 × 100 ÷ 600.03 ≈ 0.00 (rounded to zero), forcibly set to 0.01, and the allocated cumulative amount paySum = 0.01; triggering recursion: genPayPart([0.02, 100, 200, 300], 99.99, result); the recursive layer recalculates the total pending payment amount allAmount' = 600.02, and the account balance' = 9. 9.99; Processing the first transaction (formerly the second transaction): The first allocation amount payAmt' = 0.02 × 99.99 ÷ 600.02 ≈ 0.00 (returning to zero), forcibly set to 0.01, and recursively process again; until the remaining transactions can be allocated normally or the last transaction is used as a fallback, and finally all transactions receive an allocation of ≥ 0.01 yuan, and the total is exactly equal to 100 yuan; through recursion, even in the extreme case of multiple transactions returning to zero consecutively, the algorithm can digest the minimum amount of each transaction until the balance is exhausted or all transactions are processed.
[0052] There are three termination conditions for recursion: the available balance in the account is zero, all transactions have been processed, or the last transaction is reached (the last transaction is used as a fallback).
[0053] As demonstrated by the above embodiments, the payment order is obtained by proportionally clearing the second list of overdue payments to be submitted using a proportional clearing algorithm. Therefore, the final payment guarantee mechanism mathematically ensures that the total allocated amount is precisely equal to the available balance, with no error whatsoever. In financial clearing scenarios, this is a fundamental requirement for reconciliation balance, completely eliminating rounding errors at the algorithmic level. Fairness guarantee: Allocation is based on the weighted proportion of each outstanding amount to the total outstanding amount, with each supplier bearing the shortfall in the same proportion, avoiding the unfairness of a first-come, first-served model. Simultaneously, the minimum amount recursive correction mechanism ensures that even if an amount is extremely small and rounded to 0, it will still receive a minimum allocation of 0.01 yuan and trigger recursive recalculation, preventing situations where an amount that should be allocated is not received, thereby improving processing efficiency.
[0054] In one embodiment, after processing the second list of overdue payments to be submitted using a proportional clearing algorithm to obtain a payment order, the method further includes: The payment order is processed according to the verification rules to obtain the verification result.
[0055] In this embodiment, for several sub-payment orders within the payment order, the following key fields are included: payTradeId: associated main payment order ID, amount: the payment amount allocated this time, payStatus: the independent status of the sub-payment order, and oldId: the original atomic payment order ID associated when resending, facilitating traceability. The sub-payment orders have a one-to-many relationship with the main payment order; each sub-payment order is independently submitted to the payment channel, independently managed for success / failure status, and supports individual resending. Simultaneously, one initial list group corresponds to one payment order.
[0056] The step involves performing data verification processing on the payment order according to the verification rules to obtain the verification result. Specifically, this involves obtaining a first number of several sub-payment orders in the payment order and a second number of several initial lists in the initial list group. If the first number equals the second number, the payment order is batch updated to the transaction database. If the first number does not equal the second number, the corresponding sub-payment order is invalidated, and the payment status in the corresponding initial list is updated to insufficient balance.
[0057] As demonstrated by the above embodiments, sub-payment orders are managed independently, linked to payment orders and original transactions, and support single-transaction resending and reconciliation. The entire clearing process is fully logged (balance, total amount, and allocation amount for each transaction), facilitating troubleshooting and improving processing efficiency.
[0058] In summary, this embodiment of the invention obtains an initial list of overdue payments to be submitted based on list retrieval rules; performs balance query processing on the initial list of overdue payments to be submitted based on balance query rules to obtain a first list of overdue payments to be submitted; performs initiation judgment processing on the first list of overdue payments to be submitted based on an initiation judgment strategy to obtain a second list of overdue payments to be submitted; and performs proportional clearing processing on the second list of overdue payments to be submitted using a proportional clearing algorithm to obtain a payment order. Therefore, this embodiment of the invention obtains a payment order by performing balance query, initiation judgment, and proportional clearing processing on the obtained initial list of overdue payments to be submitted, ensuring proportional fairness, strict conservation of the total amount, and preservation of the original amount differences, thereby achieving fairness in the processing mechanism, ensuring the accuracy of processing, and improving processing efficiency.
[0059] Figure 2 This is a schematic block diagram of a proportional clearing device for multi-party payments provided in an embodiment of the present invention. Figure 2 As shown, this embodiment of the invention provides a proportional clearing device 700 for multi-party payments that implements the method described above. The proportional clearing device 700 for multi-party payments includes: The list retrieval unit 701 is used to retrieve the initial list of overdue payments to be submitted according to the list retrieval rules. Balance query unit 702 is used to perform balance query processing on the initial list of overdue payments to be submitted according to the balance query rules to obtain the first list of overdue payments to be submitted. The startup judgment unit 703 is used to perform startup judgment processing on the first list of overdue payments to be submitted based on the startup judgment strategy to obtain the second list of overdue payments to be submitted. The proportional clearing unit 704 is used to perform proportional clearing processing on the second list of overdue payments to be submitted using a proportional clearing algorithm to obtain a payment order.
[0060] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned device can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.
[0061] The above-described device can be implemented as a computer program, and the computer program can be implemented in, for example... Figure 3 It runs on the computer device shown.
[0062] Please see Figure 3 , Figure 3 This is a schematic block diagram of an electronic device provided in an embodiment of the present invention. The electronic device 800 can be a terminal or a server. The terminal can be an electronic device with communication functions. The server can be a standalone server or a server cluster composed of multiple servers.
[0063] See Figure 3 The electronic device 800 includes a processor 802, a memory, and a network interface 805 connected via a system bus 801. The memory may include a non-volatile storage medium 803 and internal memory 804.
[0064] The non-volatile storage medium 803 may store an operating system 8031 and a computer program 8032. The computer program 8032 includes program instructions that, when executed, cause the processor 802 to perform a proportional clearing method for multi-party payments.
[0065] The processor 802 provides computing and control capabilities to support the operation of the entire electronic device 800.
[0066] The internal memory 804 provides an environment for the execution of the computer program 8032 in the non-volatile storage medium 803. When the computer program 8032 is executed by the processor 802, the processor 802 can execute a proportional clearing method for multi-party payments.
[0067] This network interface 805 is used for network communication with other devices. Those skilled in the art will understand that... Figure 3The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the electronic device 800 to which the present invention is applied. The specific electronic device 800 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0068] The processor 802 is used to run a computer program 8032 stored in the memory to perform the following steps: The initial list of overdue payments to be submitted is obtained by retrieving the list according to the list retrieval rules. According to the balance query rules, the initial list of overdue payments to be submitted is processed to obtain the first list of overdue payments to be submitted. Based on the initiation judgment strategy, the first list of overdue payments to be submitted is processed to obtain the second list of overdue payments to be submitted. The payment order is obtained by performing proportional clearing processing on the second list of overdue payments to be submitted using a proportional clearing algorithm.
[0069] It should be understood that, in this embodiment of the invention, the processor 802 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0070] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0071] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When executed by a processor, the program instructions cause the processor to perform the following steps: The initial list of overdue payments to be submitted is obtained by retrieving the list according to the list retrieval rules. According to the balance query rules, the initial list of overdue payments to be submitted is processed to obtain the first list of overdue payments to be submitted. Based on the initiation judgment strategy, the first list of overdue payments to be submitted is processed to obtain the second list of overdue payments to be submitted. The payment order is obtained by performing proportional clearing processing on the second list of overdue payments to be submitted using a proportional clearing algorithm.
[0072] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0073] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0074] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0075] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0076] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0077] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims. The software tools, models, or components appearing in the embodiments of the present invention are merely illustrative examples and do not represent actual use.
Claims
1. A method for proportional clearing of payments among multiple parties, characterized in that, The method for proportional clearing of multi-party payments includes: The initial list of overdue payments to be submitted is obtained by retrieving the list according to the list retrieval rules. According to the balance query rules, the initial list of overdue payments to be submitted is processed to obtain the first list of overdue payments to be submitted. Based on the initiation judgment strategy, the first list of overdue payments to be submitted is processed to obtain the second list of overdue payments to be submitted. The payment order is obtained by performing proportional clearing processing on the second list of overdue payments to be submitted using a proportional clearing algorithm.
2. The method according to claim 1, characterized in that, The step of performing a balance query on the initial list of overdue payments to be submitted according to the balance query rules to obtain the first list of overdue payments to be submitted includes: The initial list of overdue payments to be submitted is grouped according to the payer's identifier to obtain several initial list groups; Take one initial list record from each of the initial list groups, and perform an identifier extraction process on the initial list record to obtain the account identifier; The available account balance is obtained by querying using a preset balance query interface and the account identifier; The first list of overdue payments to be submitted is formed by grouping several of the initial lists and the corresponding available account balances.
3. The method according to claim 2, characterized in that, The step of performing a start-up judgment process on the first list of overdue payments to be submitted based on the start-up judgment strategy to obtain a second list of overdue payments to be submitted includes: The total amount due is obtained by summing up the amounts due from several initial lists in the initial list grouping. The available balance of each account in each of the initial list groups is compared with the corresponding total amount to be paid; When the available balance of the account is greater than or equal to the total amount to be paid, the preset payment interface is called to process the full payment and obtain the payment order; When the available balance of the account is less than the total amount to be paid, the corresponding initial list group is placed into the second list of overdue payments to be submitted.
4. The method according to claim 3, characterized in that, The step of using a proportional clearing algorithm to perform proportional clearing on the second list of overdue payments to obtain payment orders includes: Using the amount to be paid as the sorting key, each initial list group is sorted in ascending order to obtain the corresponding ordered list group. Retrieve an initial list from the ordered list group in sequence; When the initial list is not the last initial list in the ordered list grouping, the proportional clearing algorithm is used to perform proportional clearing calculation on the amount to be paid, the available account balance and the total amount to be paid to obtain the first allocation amount; When the first allocated amount is greater than 0, the first allocated amount is added to the allocated cumulative amount, and a corresponding sub-payment order is generated. Then, the next initial list in the ordered list group is obtained in sequence. When the first allocation amount is less than or equal to 0, the first allocation amount is set to the minimum executable amount to obtain the updated first allocation amount. The updated first allocation amount is added to the allocated cumulative amount, and the corresponding sub-payment order is generated. Then, the next initial list in the ordered list group is obtained in sequence. The payment order is composed of several of the aforementioned sub-payment orders.
5. The method according to claim 4, characterized in that, The step of using a proportional clearing algorithm to perform proportional clearing on the second list of overdue payments to obtain a payment order also includes: When the initial list is the last initial list in the ordered list grouping, the difference between the available balance of the account and the allocated cumulative amount is used as the second allocation amount; When the second allocation amount is greater than 0, the corresponding sub-payment order is generated.
6. The method according to claim 1, characterized in that, The initial list of overdue payments to be submitted is obtained by retrieving the list according to the list retrieval rules, including: In the transaction database, the payment status and transaction date are used as query conditions to obtain the initial list of overdue payments to be submitted.
7. The method according to claim 1, characterized in that, After obtaining the payment order by proportionally clearing the second list of overdue payments using a proportional clearing algorithm, the process further includes: The payment order is processed according to the verification rules to obtain the verification result.
8. A proportional clearing device for multi-party payments, characterized in that, The multi-party payment proportional clearing device includes: The list retrieval unit is used to retrieve an initial list of overdue payments to be submitted according to the list retrieval rules. The balance query unit is used to perform balance query processing on the initial list of overdue payments to be submitted according to the balance query rules to obtain the first list of overdue payments to be submitted. A startup judgment unit is used to perform startup judgment processing on the first list of overdue payments to be submitted based on a startup judgment strategy to obtain a second list of overdue payments to be submitted. The proportional clearing unit is used to perform proportional clearing processing on the second list of overdue payments to be submitted using a proportional clearing algorithm to obtain a payment order.
9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-7.
10. A storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions that, when executed by a processor, can implement the method as described in any one of claims 1-7.