Account withdrawal method, device, computer equipment and storage medium
By receiving the information to be released in the trading system, determining the account and querying the sub-account and quota accounts, and performing deduction operations, the problem of inefficient accounting due to current limiting is solved, and more efficient account accounting processing is achieved.
Patent Information
- Application Number
- CN201811122925.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-09-26
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When existing trading systems handle high-frequency account release operations, current limiting measures lead to a long time for account release and low account release efficiency.
By receiving the information to be released, determine the account to be released, and query the corresponding sub-account and quota accounts to be released, perform sub-account deductions and comprehensive account deductions to avoid current limit processing.
It improves the efficiency of account accounting processing and avoids the delay and inefficiency caused by current limiting.
Smart Images

Figure CN109389484B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an account payment method, device, computer equipment and storage medium. Background Art
[0002] With the development of computers, more and more business service systems are implemented through the Internet. For example, the convenience of online shopping services provided by e-commerce platforms has attracted more and more people. The transaction volume of online payments has continued to increase, and the amount of data processed by the transaction system for account entry and exit has also increased.
[0003] At present, the trading system usually uses a flow-limiting method to perform flow-limiting operations on accounts with high flow-out frequency to avoid high-frequency access to the account. However, the flow-limiting method causes the account flow-out process to take a long time and has low flow-out efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide an account withdrawal method, device, computer equipment and storage medium that can improve the efficiency of account withdrawal processing in response to the above technical problems.
[0005] A method for withdrawing funds from an account, the method comprising:
[0006] Receive a pending payment message, and determine the pending payment account according to the pending payment message;
[0007] Query the preset outgoing sub-account corresponding to the account to be outgoing;
[0008] Deduct funds from the sub-account based on pending payment information and payment sub-accounts;
[0009] When the deduction operation of the sub-account fails, query the preset quota account corresponding to the account to be debited;
[0010] Deductions from the comprehensive account are performed based on pending payment information, payment sub-accounts, and quota accounts.
[0011] In one embodiment, before the step of querying the preset payment sub-account corresponding to the account to be paid, the method further includes:
[0012] Determine the number of account splits for the account to be paid out;
[0013] Create a corresponding number of outgoing sub-accounts according to the number of account splits;
[0014] Allocate the balance of the account to be paid out to the outgoing sub-account.
[0015] In one embodiment, the step of determining the number of account splits of the account to be paid out includes:
[0016] Obtain the historical payment records of the account to be paid out, as well as the payment throughput of the account system to which the account to be paid out belongs;
[0017] Determine the payment demand of the account to be paid out based on the historical payment records;
[0018] According to the outgoing demand and outgoing throughput, the number of account splits of the account to be outgoing is calculated.
[0019] In one embodiment, the step of allocating the account balance of the to-be-paid account to the payment sub-account includes:
[0020] Create a quota account corresponding to the sub-account to be paid out;
[0021] Allocate the account balance of the account to be paid out to the outgoing sub-account and quota account.
[0022] In one embodiment, the steps of performing a sub-account deduction operation according to the pending payment message and the payment sub-account include:
[0023] Extract the amount to be paid out from the pending payment message;
[0024] Compare the amount to be paid out with the account balance of the outgoing sub-account;
[0025] When the balance of the outgoing sub-account is not less than the amount to be paid, the outgoing sub-account will be deducted according to the amount to be paid.
[0026] In one embodiment, after the step of comparing the amount to be paid out with the account balance of the payment sub-account, the method further includes:
[0027] When the balance of the outgoing sub-account is less than the amount to be outgoing, a sub-account outgoing failure message is generated;
[0028] Send a sub-account withdrawal failure message, which is used to prompt that the sub-account deduction operation fails.
[0029] In one embodiment, after the step of performing a comprehensive account deduction operation according to the pending payment message, the payment sub-account and the quota account, the method further includes:
[0030] When the account balance of the outgoing sub-account or the account balance of the quota account is monitored to be less than the preset amount threshold, the current account balance of the account to be outgoing is queried;
[0031] When the current account balance of the account to be paid out is not less than the preset reallocation amount threshold, the current account balance of the account to be paid out is reallocated to the payment sub-account and the quota account.
[0032] An account payment device, the device comprising:
[0033] A payment account determination module, used for receiving a payment-to-be-paid message and determining a payment-to-be-paid account according to the payment-to-be-paid message;
[0034] The sub-account query module is used to query the preset outgoing sub-account corresponding to the account to be outgoing;
[0035] The sub-account deduction module is used to perform sub-account deduction operations based on pending payment messages and payment sub-accounts;
[0036] The quota account query module is used to query the preset quota account corresponding to the account to be paid when the sub-account deduction operation fails;
[0037] The comprehensive deduction module is used to perform comprehensive account deduction operations based on pending payment messages, payment sub-accounts and quota accounts.
[0038] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0039] Receive a pending payment message, and determine the pending payment account according to the pending payment message;
[0040] Query the preset outgoing sub-account corresponding to the account to be outgoing;
[0041] Deduct funds from the sub-account based on pending payment information and payment sub-accounts;
[0042] When the deduction operation of the sub-account fails, query the preset quota account corresponding to the account to be debited;
[0043] Deductions from the comprehensive account are performed based on pending payment information, payment sub-accounts, and quota accounts.
[0044] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0045] Receive a pending payment message, and determine the pending payment account according to the pending payment message;
[0046] Query the preset outgoing sub-account corresponding to the account to be outgoing;
[0047] Deduct funds from the sub-account based on pending payment information and payment sub-accounts;
[0048] When the deduction operation of the sub-account fails, query the preset quota account corresponding to the account to be debited;
[0049] Deductions from the comprehensive account are performed based on pending payment information, payment sub-accounts, and quota accounts.
[0050] The above-mentioned account payment method, device, computer equipment and storage medium determine the account to be paid out according to the received payment message, further query the preset payment sub-account corresponding to the account to be paid out, and perform the sub-account deduction operation through the payment sub-account. When the sub-account deduction operation fails, the comprehensive account deduction operation is performed through the preset quota account, thereby realizing the account payment processing. In the account payment process, the payment is deducted through the preset payment sub-account and quota account corresponding to the account to be paid out according to actual needs, and there is no need to limit the flow of payment operations, thereby improving the processing efficiency of account payment. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is an application scenario diagram of an account withdrawal method in an embodiment;
[0052] Figure 2 A schematic diagram of a flow chart of an account withdrawal method in one embodiment;
[0053] Figure 3 A flowchart of steps for creating an outgoing sub-account in one embodiment;
[0054] Figure 4 A flowchart of an account withdrawal method in another embodiment;
[0055] Figure 5 It is a structural block diagram of an account payment device in one embodiment;
[0056] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] The account withdrawal method provided in this application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. When the terminal 102 successfully performs the transaction outgoing operation, it sends a pending outgoing message. The service 104 determines the pending outgoing account according to the received outgoing message, further queries the preset outgoing sub-account corresponding to the pending outgoing account, and performs the sub-account deduction operation through the outgoing sub-account. When the sub-account deduction operation fails, the comprehensive account deduction operation is performed through the preset quota account, thereby realizing the account outgoing processing. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0059] In one embodiment, Figure 2 As shown, an account withdrawal method is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:
[0060] Step S201: receiving a pending payment message, and determining a pending payment account according to the pending payment message.
[0061] The pending payment message is a request message for deducting money from an account generated by a transaction payment operation. The pending payment message may include, but is not limited to, payment account, payment amount, payment items and other payment related information. In this embodiment, when the server 104 receives the pending payment message, it determines the pending payment account according to the pending payment message. In specific implementation, the pending payment account can be directly extracted from the pending payment message. In an account system with high data security requirements, the pending payment message does not directly carry the pending payment account, but includes an account identifier corresponding to the pending payment account. Then, according to the account identifier, according to the preset mapping conditions, the corresponding pending payment account can be queried and determined.
[0062] Step S203: Query the preset payment sub-account corresponding to the account to be paid.
[0063] Among them, the outgoing sub-accounts are several accounts constructed according to the mapping corresponding to the accounts to be outgoing. The number of outgoing sub-accounts and the balances of the outgoing sub-accounts can be dynamically adjusted according to the outgoing demand of the accounts to be outgoing, and the total balance of all outgoing sub-accounts is equal to the balance of the accounts to be outgoing. Generally, in the account system, the balance of each account corresponds to a row of data in the database, and the system operates the balance of the account by reading and writing the data. In this embodiment, by constructing outgoing sub-accounts corresponding to the accounts to be outgoing, a single account to be outgoing can be mapped into multiple outgoing sub-accounts. When operating the accounts to be outgoing, the operations can be performed through each outgoing sub-account, thereby avoiding the problem of frequent reading and writing of the accounts to be outgoing during peak periods, resulting in balance data errors of hot accounts, and effectively improving the outgoing concurrency capability of the accounts to be outgoing. Specifically, after determining the accounts to be outgoing, the preset outgoing sub-accounts corresponding to the accounts to be outgoing are queried, and the outgoing operations are performed through the outgoing sub-accounts.
[0064] Step S205: deducting money from the sub-account according to the pending payment message and the payment sub-account.
[0065] After obtaining the outgoing sub-account corresponding to the account to be paid out, the sub-account deduction operation is performed according to the pending outgoing message and the outgoing sub-account, so as to realize the outgoing operation of the account to be paid out according to the pending outgoing message. In specific applications, a sub-account selection rule can be used as a deduction sub-account according to the preset sub-account selection rules, such as random selection, or according to the correspondence between the outgoing sequence number and the sequence number of the outgoing sub-account, and the sub-account deduction operation is performed according to the outgoing sub-account combined with the pending outgoing message. When the sub-account deduction operation is successful, a successful outgoing message is generated and sent to prompt the user that the outgoing is successful. At the same time, the sub-account deduction operation can also be recorded for reference in subsequent reconciliation.
[0066] Step S207: When the deduction operation of the sub-account fails, query the preset quota account corresponding to the account to be debited.
[0067] When the outgoing sub-account performs a sub-account deduction operation, because the balance of the outgoing sub-account is part of the balance of the account to be outgoing, its balance may not meet the outgoing amount in the outgoing message, the sub-account deduction operation will fail due to insufficient balance of the outgoing sub-account, and a sub-account outgoing failure message will be issued to prompt the outgoing failure. At this time, the preset quota account corresponding to the account to be outgoing is queried. Among them, the quota account is also a sub-account constructed according to the account to be outgoing, and the balance of the quota account is also part of the balance of the account to be outgoing. Compared with the outgoing sub-account, the quota account does not perform an outgoing operation according to the outgoing message, but is only used to support each outgoing sub-account to perform a sub-account deduction operation. When each outgoing sub-account performs a sub-account deduction operation and the sub-account deduction operation fails due to insufficient balance, the outgoing operation can be performed by allocating a balance with the same value as the difference from the quota account to support the outgoing sub-account to complete the deduction operation. In addition, the quota account can also be used to dynamically adjust the outgoing sub-accounts. For example, when the balance of an outgoing sub-account is lower than a preset threshold, the balance of the outgoing sub-account is transferred to the quota account, and then the outgoing sub-account is frozen, thereby realizing dynamic adjustment of the number of outgoing sub-accounts.
[0068] Since the quota account does not directly perform payment operations based on pending payment messages, but is only used to allocate balances between payment sub-accounts, it can effectively improve the efficiency of sub-account deduction operations of each payment sub-account, thereby improving the efficiency of account payment. In specific implementation, a payment sub-account can be directly selected from each payment sub-account as a quota account, and the quota account can be used to support the sub-account deduction operations of other payment sub-accounts.
[0069] Step S209: deducting money from the comprehensive account according to the pending payment message, payment sub-account and quota account.
[0070] When the deduction operation of the sub-account fails based on the outgoing sub-account alone, and the quota account corresponding to the account to be outgoing is obtained, the comprehensive account deduction operation is performed based on the outgoing message, the outgoing sub-account and the quota account. The comprehensive account deduction operation combines the outgoing sub-account and the quota account, and the quota account is used to make up the insufficient balance of the outgoing sub-account to support the outgoing operation of the outgoing sub-account, avoiding the flow restriction of the outgoing operation of the hot account and ensuring the efficiency of the account outgoing.
[0071] In the above-mentioned account payment method, the account to be paid is determined according to the received payment message, and the preset payment sub-account corresponding to the account to be paid is further queried, and the sub-account deduction operation is performed through the payment sub-account. When the sub-account deduction operation fails, the comprehensive account deduction operation is performed through the preset quota account, thereby realizing the account payment processing. In the account payment process, the payment is deducted through the preset payment sub-account and quota account corresponding to the account to be paid according to actual needs, and there is no need to limit the payment operation, thereby improving the processing efficiency of the account payment.
[0072] In one embodiment, Figure 3 As shown, before the step of querying the preset payment sub-account corresponding to the account to be paid, the step of creating the payment sub-account is also included, which specifically includes:
[0073] Step S301: Determine the account split number of the account to be paid out.
[0074] The outgoing sub-account is configured according to the outgoing demand of the account to be outgoing. For example, for an account to be outgoing with a large number of concurrent outgoing operations, a large number of outgoing sub-accounts are correspondingly set to support its high-concurrency outgoing operations. In this embodiment, when constructing an outgoing sub-account, the number of account splits of the account to be outgoing is first determined. The number of account splits can be obtained according to the outgoing demand of the account to be outgoing. The outgoing demand can include the number of concurrent transactions, the outgoing amount, etc.
[0075] Step S303: Create a corresponding number of outgoing sub-accounts according to the number of account splits.
[0076] After determining the number of account splits, create a corresponding number of outgoing sub-accounts, and allocate the account balance of the account to be outgoing to the outgoing sub-accounts, thereby obtaining the outgoing sub-accounts corresponding to the account to be outgoing. The sum of the account balances of all outgoing sub-accounts is equal to the account balance of the account to be outgoing.
[0077] Step S305: Allocate the account balance of the account to be paid out to the payment sub-account.
[0078] In this embodiment, the account balance of the account to be paid out is allocated to the payment sub-account, and the sum of the account balances of all payment sub-accounts is equal to the account balance of the account to be paid out. Specifically, when the account balance of the account to be paid out is allocated to each payment sub-account, it can be allocated in equal amounts according to the account balance and the number of payment sub-accounts, or it can be allocated randomly, or it can be allocated according to payment requirements. For example, if the payment requirements include a total of X large-amount payment operations and Y small-amount payment operations, then several payment sub-accounts corresponding to X large-amount payment operations can be divided out, so as to avoid that each payment sub-account cannot meet the large-amount operation, and the balance of the payment sub-account needs to be allocated, thereby reducing the efficiency of the payment operation.
[0079] In one embodiment, the step of determining the number of account splits of the account to be paid includes: obtaining historical payment records of the account to be paid and payment throughput of the account system to which the account to be paid belongs; determining the payment demand of the account to be paid according to the historical payment records; and calculating the number of account splits of the account to be paid according to the payment demand and the payment throughput.
[0080] The number of account splits of the account to be paid is determined according to the payment demand of the account to be paid. In this embodiment, the historical payment records of the account to be paid and the payment throughput of the account system to which the account to be paid belongs are first obtained. Among them, the payment demand of the account to be paid can be determined according to the historical payment records. The payment throughput is the payment processing efficiency per unit time of the account system to which the account to be paid belongs, which reflects the payment capacity of the account system. The payment demand of the account to be paid is determined according to the historical payment records of the account to be paid. The payment demand may include but is not limited to the number of payment operations per unit time. Then, according to the payment demand and the payment throughput, the number of account splits of the account to be paid can be calculated. Specifically, when the payment demand is the number of payment operations per unit time, the quotient of the payment demand and the payment throughput is taken as the number of account splits of the account to be paid. By combining the historical payment records of the account to be paid and the payment throughput of the account system, that is, the payment capacity of the account system, the number of account splits of the account to be paid can be obtained, and a corresponding number of payment sub-accounts are created for the account to be paid according to the account split number.
[0081] In one embodiment, the step of allocating the account balance of the account to be paid out to the payment sub-account includes: creating a quota account corresponding to the sub-account to be paid out; and allocating the account balance of the account to be paid out to the payment sub-account and the quota account.
[0082] After obtaining the outgoing sub-accounts corresponding to the account to be paid, the outgoing operation of the account to be paid can be performed through the outgoing sub-accounts, and the balance of each outgoing sub-account can be allocated by setting a quota account. Specifically, after obtaining the outgoing sub-accounts corresponding to the account to be paid, create a quota account corresponding to the sub-account to be paid. The quota account can be obtained directly from an outgoing sub-account selected from the outgoing sub-accounts, or it can be obtained by additionally reconstructing the account. After obtaining the quota account, the account balance of the account to be paid is allocated to the outgoing sub-account and the quota account. When the balance is allocated, it can be allocated equally according to the account balance and the number of outgoing sub-accounts, or it can be allocated randomly.
[0083] The quota account created outside the outgoing sub-account does not directly participate in the outgoing operation according to the pending outgoing message, but is used to support the outgoing sub-accounts to perform outgoing operations, and can also be used to dynamically adjust the outgoing sub-accounts. For example, when the number of outgoing sub-accounts needs to be increased, after creating a new outgoing sub-account, the number of outgoing sub-accounts is increased by allocating the balance in the quota account to the new outgoing sub-account, avoiding operations on other outgoing sub-accounts and ensuring the efficiency of account outgoing. In this embodiment, by setting up quota accounts to regulate each outgoing sub-account, the efficiency of account outgoing can be effectively ensured.
[0084] In one embodiment, the step of performing a sub-account deduction operation based on the pending payment message and the payment sub-account includes: extracting the pending payment amount from the pending payment message; comparing the pending payment amount with the account balance of the payment sub-account; when the account balance of the payment sub-account is not less than the pending payment amount, performing a sub-account deduction operation on the payment sub-account according to the pending payment amount.
[0085] When performing an outgoing operation according to the outgoing sub-account and the pending outgoing message, the amount to be outgoing is extracted from the pending outgoing message. In a specific application, the pending outgoing message may directly record the value of the amount to be outgoing, which can be directly extracted; it may also include an encrypted code of the amount to be outgoing. In this case, the code of the amount to be outgoing is extracted from the pending outgoing message, and the preset decoding rule is queried to decode the code of the amount to be outgoing to obtain the amount to be outgoing. After determining the amount to be outgoing according to the pending outgoing message, the amount to be outgoing is compared with the account balance of the outgoing sub-account to determine whether the outgoing sub-account can complete the current outgoing operation. When the account balance of the outgoing sub-account is greater than or equal to the amount to be outgoing, that is, the outgoing sub-account can complete the outgoing operation of the pending outgoing message, the outgoing sub-account is deducted according to the amount to be outgoing, thereby realizing the outgoing operation of the pending outgoing message.
[0086] In this embodiment, when an outgoing operation is performed on an account to be outgoing according to an outgoing sub-account and a pending outgoing message, the account balance of the outgoing sub-account is compared with the pending outgoing amount in the pending outgoing message. If it is determined that the outgoing sub-account can complete the outgoing operation, a sub-account deduction operation is performed according to the outgoing sub-account, thereby realizing the outgoing operation of the pending outgoing message.
[0087] In one embodiment, after the step of comparing the amount to be paid out with the account balance of the payment sub-account, the method further includes: when the account balance of the payment sub-account is less than the amount to be paid out, generating a sub-account payment failure message; and sending the sub-account payment failure message, wherein the sub-account payment failure message is used to prompt that the sub-account deduction operation fails.
[0088] When performing an outgoing operation on an account to be outgoing based on an outgoing sub-account and a pending outgoing message, if it is determined that the account balance of the outgoing sub-account is insufficient to complete the outgoing operation, a sub-account outgoing failure message is generated and sent to prompt that the sub-account deduction operation has failed. After receiving the sub-account outgoing failure message, query the quota account corresponding to the account to be outgoing, and perform a comprehensive account deduction operation based on the pending outgoing message, the outgoing sub-account, and the quota account. In addition, the received sub-account outgoing failure message can also be recorded, and the frequency of receiving the sub-account outgoing failure message can be counted. When the frequency of receiving the sub-account outgoing failure message exceeds the preset failure frequency threshold, the number of outgoing sub-accounts is dynamically adjusted through the quota account to reduce the number of activated outgoing sub-accounts and ensure the success rate of the sub-account deduction operation.
[0089] In one embodiment, after the step of performing a comprehensive account deduction operation according to the pending payment message, the payment sub-account and the quota account, it also includes: when it is monitored that the account balance of the payment sub-account or the account balance of the quota account is less than a preset amount threshold, querying the current account balance of the pending payment account; when the current account balance of the pending payment account is not less than a preset reallocated amount threshold, reallocating the current account balance of the pending payment account to the payment sub-account and the quota account.
[0090] During the process of the account to be paid out, the account balance of the payment sub-account and the account balance of the quota account are detected in real time or periodically. When the account balance of the payment sub-account or the account balance of the quota account is not less than the preset amount threshold, the balance of the account to be paid out is redistributed. Among them, the preset amount threshold can be set to be the same for the payment sub-account and the quota account, or it can be different. When the balance of the account to be paid out is redistributed, the current account balance of the account to be paid out is queried. If the current account balance of the account to be paid out is not less than the preset redistribution amount threshold, the current account balance of the account to be paid out is redistributed to the payment sub-account and the quota account. The redistribution amount threshold can be set according to the corresponding account to be paid out, such as 1% of the original account balance of the account to be paid out, that is, when the current account balance of the account to be paid out is lower than 1% of the original account balance, the balance of the account to be paid out is no longer redistributed, so as to avoid frequent balance redistribution leading to reduced payment efficiency.
[0091] In one embodiment, Figure 4 As shown, a method for withdrawing money from an account is provided, comprising the following steps:
[0092] Step S401: Create an outgoing sub-account and a quota account corresponding to the account to be outgoing.
[0093] Specifically, the number of account splits of the account to be paid is first determined, which specifically includes: obtaining the historical payment records of the account to be paid and the payment throughput of the account system to which the account to be paid belongs; determining the payment demand of the account to be paid according to the historical payment records; and calculating the number of account splits of the account to be paid according to the payment demand and the payment throughput. Then, a corresponding number of payment sub-accounts are created according to the number of account splits, and a quota account corresponding to the payment sub-account is created, and finally the account balance of the account to be paid is allocated to the payment sub-account and the quota account, so as to obtain the payment sub-account and quota account corresponding to the account to be paid.
[0094] In this embodiment, by comprehensively considering the historical payment records of the account to be paid and the payment throughput of the account system, that is, the payment capacity of the account system, the account split number of the account to be paid can be obtained, and a corresponding number of payment sub-accounts are created for the account to be paid according to the account split number, and each payment sub-account is regulated by setting a quota account, which can effectively ensure the payment efficiency of the account.
[0095] Step S402: receiving a pending payment message, and determining a pending payment account according to the pending payment message;
[0096] Step S403: Query the preset outgoing sub-account corresponding to the account to be outgoing;
[0097] Step S404: extracting the amount to be paid out from the message to be paid out;
[0098] Step S405: Compare the amount to be paid out with the account balance of the outgoing sub-account;
[0099] Step S406: When the balance of the outgoing sub-account is less than the amount to be outgoing, a sub-account outgoing failure message is generated;
[0100] Step S407: Sending a sub-account withdrawal failure message, which is used to prompt that the sub-account deduction operation fails;
[0101] Step S408: querying the preset quota account corresponding to the account to be paid out;
[0102] Step S409: deducting funds from the comprehensive account according to the pending payment message, payment sub-account and quota account.
[0103] When receiving a pending payment message and performing a payment operation on the corresponding pending payment account, the pending payment amount is extracted from the pending payment message and the pending payment amount is compared with the account balance of the payment sub-account to determine whether the payment sub-account can complete the payment operation. On the one hand, when the account balance of the payment sub-account is greater than or equal to the pending payment amount, that is, the payment sub-account can complete the payment operation for the pending payment message, the payment sub-account is deducted according to the pending payment amount, thereby realizing the payment operation for the pending payment message.
[0104] On the other hand, if it is determined that the account balance of the outgoing sub-account is insufficient to complete the outgoing operation, a sub-account outgoing failure message is generated and sent to prompt that the sub-account deduction operation has failed. After receiving the sub-account outgoing failure message, the quota account corresponding to the account to be outgoing is queried, and the comprehensive account deduction operation is performed based on the outgoing message, the outgoing sub-account and the quota account.
[0105] Step S410: when it is monitored that the account balance of the outgoing sub-account or the account balance of the quota account is less than the preset amount threshold, query the current account balance of the account to be outgoing;
[0106] Step S411: when the current account balance of the account to be paid out is not less than the preset reallocated amount threshold, the current account balance of the account to be paid out is reallocated to the payment sub-account and the quota account.
[0107] During the process of the outgoing account performing the outgoing operation, the account balance of the outgoing sub-account and the account balance of the quota account are detected in real time or periodically. When the account balance of the outgoing sub-account or the account balance of the quota account is not less than the preset amount threshold, the balance of the outgoing account is redistributed. If the current account balance of the outgoing account is less than the preset redistribution amount threshold, the balance of the outgoing account is no longer redistributed to avoid frequent balance redistribution leading to reduced outgoing efficiency.
[0108] It should be understood that although Figure 2-4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0109] In one embodiment, Figure 5 As shown, an account payment device is provided, comprising: a payment account determination module 501, a sub-account query module 503, a sub-account deduction module 505, a quota account query module 507 and a comprehensive deduction module 509, wherein:
[0110] The payment account determination module 501 is used to receive a payment-to-be-paid message and determine a payment-to-be-paid account according to the payment-to-be-paid message;
[0111] The sub-account query module 503 is used to query the preset payment sub-account corresponding to the account to be paid out;
[0112] The sub-account deduction module 505 is used to perform a sub-account deduction operation according to the pending payment message and the payment sub-account;
[0113] The quota account query module 507 is used to query the preset quota account corresponding to the account to be paid when the sub-account deduction operation fails;
[0114] The comprehensive deduction module 509 is used to perform comprehensive account deduction operations based on the pending payment message, payment sub-account and quota account.
[0115] In the above-mentioned account payment device, the payment account determination module determines the account to be paid out according to the received payment message, further queries the preset payment sub-account corresponding to the account to be paid out through the sub-account query module, and the sub-account deduction module performs the sub-account deduction operation through the payment sub-account, and the quota account query module queries the preset quota account when the sub-account deduction operation fails, and finally performs the comprehensive account deduction operation through the comprehensive deduction module, thereby realizing the account payment processing. In the account payment process, the payment deduction is performed through the preset payment sub-account and quota account corresponding to the account to be paid out according to actual needs, and there is no need to limit the flow of the payment operation, thereby improving the processing efficiency of the account payment. In one embodiment, it also includes an account split number determination module, a payment sub-account creation module and a sub-account balance allocation module, wherein: the account split number determination module is used to determine the account split number of the account to be paid out; the payment sub-account creation module is used to create a corresponding number of payment sub-accounts according to the account split number; the sub-account balance allocation module is used to allocate the account balance of the account to be paid out to the payment sub-account.
[0116] In one embodiment, the account split number determination module includes an outgoing record acquisition unit, an outgoing demand determination unit and an account split number determination unit, wherein: the outgoing record acquisition unit is used to acquire the historical outgoing records of the account to be paid out and the outgoing throughput of the account system to which the account to be paid out belongs; the outgoing demand determination unit is used to determine the outgoing demand of the account to be paid out according to the historical outgoing records; and the account split number determination unit is used to calculate the account split number of the account to be paid out according to the outgoing demand and the outgoing throughput.
[0117] In one embodiment, the sub-account balance allocation module includes a quota account creation unit and a sub-account balance allocation unit, wherein: the quota account creation unit is used to create a quota account corresponding to the sub-account to be paid out; the sub-account balance allocation unit is used to allocate the account balance of the account to be paid out to the payment sub-account and the quota account.
[0118] In one embodiment, the sub-account deduction module 505 includes a to-be-paid amount extraction unit, a balance comparison unit and a sub-account deduction unit, wherein: the to-be-paid amount extraction unit is used to extract the to-be-paid amount from the to-be-paid message; the balance comparison unit is used to compare the to-be-paid amount with the account balance of the outgoing sub-account; the sub-account deduction unit is used to perform a sub-account deduction operation on the outgoing sub-account according to the to-be-paid amount when the account balance of the outgoing sub-account is not less than the to-be-paid amount.
[0119] In one embodiment, the system further includes a payment failure message generating unit and a payment failure message sending unit, wherein: the payment failure message generating unit is used to generate a sub-account payment failure message when the account balance of the payment sub-account is less than the amount to be paid out; the payment failure message sending unit is used to send a sub-account payment failure message, and the sub-account payment failure message is used to prompt the sub-account deduction operation to fail.
[0120] In one embodiment, it also includes a current account balance query module and a balance redistribution module, wherein: the current account balance query module is used to query the current account balance of the account to be paid when it is monitored that the account balance of the outgoing sub-account or the account balance of the quota account is less than a preset amount threshold; the balance redistribution module is used to redistribute the current account balance of the account to be paid to the outgoing sub-account and the quota account when the current account balance of the account to be paid is not less than the preset redistribution amount threshold.
[0121] For the specific definition of the account payment device, please refer to the definition of the account payment method above, which will not be repeated here. Each module in the above-mentioned account payment device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0122] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an account withdrawal method is implemented.
[0123] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0124] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0125] Receive a pending payment message, and determine the pending payment account according to the pending payment message;
[0126] Query the preset outgoing sub-account corresponding to the account to be outgoing;
[0127] Deduct funds from the sub-account based on pending payment information and payment sub-accounts;
[0128] When the deduction operation of the sub-account fails, query the preset quota account corresponding to the account to be debited;
[0129] Deductions from the comprehensive account are performed based on pending payment information, payment sub-accounts, and quota accounts.
[0130] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining the number of account splits of the account to be paid out; creating a corresponding number of payment sub-accounts according to the number of account splits; and allocating the account balance of the account to be paid out to the payment sub-accounts.
[0131] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtaining historical payment records of the account to be paid out and the payment throughput of the account system to which the account to be paid out belongs; determining the payment demand of the account to be paid out according to the historical payment records; and calculating the number of account splits of the account to be paid out according to the payment demand and the payment throughput.
[0132] In one embodiment, when the processor executes the computer program, the following steps are further implemented: creating a quota account corresponding to the sub-account to be paid out; and allocating the account balance of the account to be paid out to the payment sub-account and the quota account.
[0133] In one embodiment, when the processor executes the computer program, the following steps are further implemented: extracting the amount to be paid out from the pending payment message; comparing the amount to be paid out with the account balance of the payment sub-account; when the account balance of the payment sub-account is not less than the amount to be paid out, performing a sub-account deduction operation on the payment sub-account according to the amount to be paid out.
[0134] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the account balance of the payment sub-account is less than the amount to be paid, a sub-account payment failure message is generated; and the sub-account payment failure message is sent, and the sub-account payment failure message is used to prompt that the sub-account deduction operation fails.
[0135] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when it is monitored that the account balance of the outgoing sub-account or the account balance of the quota account is less than a preset amount threshold, the current account balance of the account to be outgoing is queried; when the current account balance of the account to be outgoing is not less than a preset reallocated amount threshold, the current account balance of the account to be outgoing is reallocated to the outgoing sub-account and the quota account.
[0136] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0137] Receive a pending payment message, and determine the pending payment account according to the pending payment message;
[0138] Query the preset outgoing sub-account corresponding to the account to be outgoing;
[0139] Deduct funds from the sub-account based on pending payment information and payment sub-accounts;
[0140] When the deduction operation of the sub-account fails, query the preset quota account corresponding to the account to be debited;
[0141] Deductions from the comprehensive account are performed based on pending payment information, payment sub-accounts, and quota accounts.
[0142] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the account split number of the account to be paid out; creating a corresponding number of payment sub-accounts according to the account split number; and allocating the account balance of the account to be paid out to the payment sub-accounts.
[0143] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: obtaining historical payment records of the account to be paid out and the payment throughput of the account system to which the account to be paid out belongs; determining the payment demand of the account to be paid out according to the historical payment records; and calculating the number of account splits of the account to be paid out according to the payment demand and the payment throughput.
[0144] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: creating a quota account corresponding to the sub-account to be paid out; and allocating the account balance of the account to be paid out to the payment sub-account and the quota account.
[0145] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: extracting the amount to be paid out from the pending payment message; comparing the amount to be paid out with the account balance of the payment sub-account; when the account balance of the payment sub-account is not less than the amount to be paid out, performing a sub-account deduction operation on the payment sub-account according to the amount to be paid out.
[0146] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the account balance of the payment sub-account is less than the amount to be paid, a sub-account payment failure message is generated; and the sub-account payment failure message is sent, and the sub-account payment failure message is used to prompt that the sub-account deduction operation fails.
[0147] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when it is monitored that the account balance of the outgoing sub-account or the account balance of the quota account is less than a preset amount threshold, query the current account balance of the account to be outgoing; when the current account balance of the account to be outgoing is not less than a preset reallocated amount threshold, reallocate the current account balance of the account to be outgoing to the outgoing sub-account and the quota account.
[0148] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0149] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0150] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for withdrawing funds from an account, the method comprising: Receiving a pending payment message, and determining a pending payment account according to the pending payment message; Querying a preset outgoing subaccount corresponding to the account to be outgoing from multiple subaccounts; the multiple subaccounts are subaccounts obtained by splitting the account to be outgoing according to the number of account splits and used to directly process outgoing messages; the number of account splits is determined according to an outgoing demand of the account to be outgoing and an outgoing throughput of an account system to which the account to be outgoing belongs, and the outgoing demand is determined according to a historical outgoing record of the account to be outgoing and the outgoing throughput; Perform a sub-account deduction operation according to the pending payment message and the payment sub-account; When the deduction operation of the sub-account fails, query the preset quota account corresponding to the account to be debited; The quota account does not directly process the outgoing payment message, and the account balances of the quota account and the multiple sub-accounts are allocated from the account balance of the account to be paid out; Performing a comprehensive account deduction operation according to the pending payment message, the payment sub-account and the quota account; When the balance of the outgoing sub-account is lower than a preset threshold, the balance of the outgoing sub-account is transferred to the quota account, and the outgoing sub-account is frozen to adjust the number of the multiple sub-accounts; When it is monitored that the account balances of the multiple sub-accounts or the account balance of the quota account are less than the respective preset amount thresholds, querying the current account balance of the account to be paid out; When the current account balance of the account to be paid out is not less than a preset reallocated amount threshold, the current account balance of the account to be paid out is reallocated to the multiple sub-accounts and the quota account.
2. The method according to claim 1, characterized in that Before the step of querying the preset payment sub-account corresponding to the account to be paid, the method further includes: Determine the number of account splits of the account to be paid out; Create a corresponding number of sub-accounts according to the number of account splits; The account balance of the account to be paid out is distributed to the multiple sub-accounts.
3. The method according to claim 2, characterized in that The step of determining the number of account splits of the account to be paid out comprises: Obtaining historical payment records of the account to be paid out, and payment throughput of the account system to which the account to be paid out belongs; Determining the payment demand of the account to be paid out according to the historical payment record; The number of account splits of the account to be paid out is calculated according to the payment demand and the payment throughput.
4. The method according to claim 2, characterized in that: The step of allocating the account balance of the to-be-paid-out account to the multiple sub-accounts comprises: Creating quota accounts corresponding to the multiple sub-accounts; The account balance of the account to be paid out is distributed to the multiple sub-accounts and the quota account.
5. The method according to claim 1, characterized in that The step of performing a sub-account deduction operation according to the pending payment message and the payment sub-account comprises: Extracting the amount to be paid out from the message to be paid out; Compare the amount to be paid out with the account balance of the payment sub-account; When the account balance of the payment sub-account is not less than the amount to be paid out, a sub-account deduction operation is performed on the payment sub-account according to the amount to be paid out.
6. The method according to claim 5, characterized in that After the step of comparing the amount to be paid out with the account balance of the payment sub-account, the method further includes: When the account balance of the payment sub-account is less than the amount to be paid, a sub-account payment failure message is generated; The sub-account withdrawal failure message is sent, and the sub-account withdrawal failure message is used to prompt that the sub-account deduction operation has failed.
7. The method according to any one of claims 1 to 6, characterized in that: The determining the account to be paid out according to the message to be paid out comprises: According to the account identifier carried in the to-be-paid-out message, the to-be-paid-out account corresponding to the account identifier is determined according to a preset mapping condition.
8. An account payment device, characterized in that: The device comprises: A payment account determination module, configured to receive a payment-to-be-paid message and determine a payment-to-be-paid account according to the payment-to-be-paid message; a sub-account query module, configured to query a preset outgoing sub-account corresponding to the account to be outgoing from a plurality of sub-accounts; the plurality of sub-accounts are sub-accounts obtained by splitting the account to be outgoing according to the number of account splits, and used to directly process outgoing messages; the number of account splits is determined according to the outgoing demand of the account to be outgoing and the outgoing throughput of the account system to which the account to be outgoing belongs, and the outgoing demand is determined according to the historical outgoing record of the account to be outgoing and the outgoing throughput; A sub-account deduction module, used to perform a sub-account deduction operation according to the pending payment message and the payment sub-account; A quota account query module, used for querying a preset quota account corresponding to the account to be paid when the deduction operation of the sub-account fails; the quota account does not directly perform payment processing for the payment message, and the account balances of the quota account and the multiple sub-accounts are allocated from the account balance of the account to be paid; A comprehensive deduction module, used for performing a comprehensive account deduction operation according to the pending payment message, the payment sub-account and the quota account; A current account balance query module, configured to query the current account balance of the to-be-paid account when it is monitored that the account balances of the multiple sub-accounts or the account balance of the quota account are less than the respective preset amount thresholds; A balance redistribution module, configured to redistribute the current account balance of the account to be paid out to the multiple sub-accounts and the quota account when the current account balance of the account to be paid out is not less than a preset redistribution amount threshold; The device is also used for transferring the balance of the outgoing sub-account to the quota account and freezing the outgoing sub-account when the balance of the outgoing sub-account is lower than a preset threshold, so as to adjust the number of the multiple sub-accounts.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Account recharging method and device and charging method, device and system
CN102137205A
Account processing method and device
CN105447604A
Annuity data processing method and device, server and storage medium
CN107689009A