An account and fund management method, device and storage medium of a payment account system
By dividing the payment account system into users, accounts, and funds accounts, creating different accounts based on the volume and frequency of fund transactions, and adopting multiple amount operation strategies, the problem of singular account management and fund management in existing technologies is solved, thereby improving throughput and adaptability of fund management.
Patent Information
- Application Number
- CN202210708904.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-06-21
AI Technical Summary
The existing payment account system has a single account management and fund management system, which cannot adapt to the fund change requirements of different business lines, resulting in low throughput.
The payment account system is divided into users, accounts, and funds accounts. Different accounts are created based on the amount and frequency of fund transactions. Multiple amount operation execution strategies are adopted, and operations are carried out through fund sub-accounts to solve the problem of unique locking when funds change.
It improved the throughput of funds, adapted to the changing fund requirements of different business lines, and achieved more efficient fund management by subdividing fund accounts and generating dedicated fund packages.
Smart Images

Figure CN115131014B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer information processing technology, specifically to a method, apparatus, and storage medium for account and fund management in a payment account system. Background Technology
[0002] As SaaS platforms increasingly demand payment capabilities, and different business lines have varying payment requirements, each needing to connect to different payment channels, payment capabilities become unusable and management becomes chaotic. Existing payment account systems typically use unique user identifiers to obtain corresponding accounts and directly manipulate account balances. However, these solutions are simplistic in account and fund management and cannot adapt to the demands of changing funds. Current solutions often involve direct account manipulation, typically using pessimistic or optimistic locking to ensure accuracy. This leads to multiple transactions queuing or repeated attempts to increase or decrease amounts during concurrency, reducing throughput. Summary of the Invention
[0003] The purpose of this application is to provide a method, apparatus and storage medium for account and fund management of a payment account system, in order to solve the problems of the existing payment account system having simple account and fund management, which cannot meet the requirements of business for fund changes, and the low throughput caused by the fact that the operation of amount is often done directly through the account.
[0004] To achieve the above objectives, this application provides an account and fund management method for a payment account system, comprising the following steps: creating user information, generating a corresponding unique user identifier, creating different accounts for the user based on different payment channels and corresponding fund operation volume and frequency, wherein each account includes a fund account and account information, the fund account includes several fund sub-accounts, the account information includes corresponding payment channel information and amount operation execution strategy, and the number of fund sub-accounts and the amount operation execution strategy are determined based on the fund operation volume and frequency; obtaining the user unique identifier and business line identifier, obtaining corresponding account information based on the user information and business line identifier corresponding to the user unique identifier; and performing amount operations according to the amount operation execution strategy in the obtained account information, wherein the amount operations include at least one of increasing, deducting, freezing, and unfreezing the amount.
[0005] Optionally, based on the amount and frequency of fund operations, the account can be set as a low-frequency increase / decrease account, a high-frequency increase / decrease account, a high-frequency decrease / decrease account, or a high-frequency increase / decrease account. The corresponding fund operation execution strategies are low-frequency increase / decrease account strategy, high-frequency increase / decrease account strategy, high-frequency decrease / decrease account strategy, and high-frequency increase / decrease account strategy, respectively.
[0006] Optionally, the method for obtaining the access request expression of the initiator includes: the low-frequency increase and low-frequency decrease account policy includes: globally locking the account with the account ID, and increasing or decreasing the account amount.
[0007] Optionally, the high-frequency increase and low-frequency decrease account strategy includes: pushing fund change logs to a message queue, having a fund account change listener listen to the queue, processing the fund change logs sequentially and increasing the account amount; and globally locking the account with the fund account ID and deducting the account amount.
[0008] Optionally, the high-frequency deduction and low-frequency increase account strategy includes: globally locking the account with the account ID, deducting the amount in the account, and simultaneously pushing the fund change log to a message queue. The account change listener listens to the queue, processes the fund change log sequentially, and performs the deduction operation on the account amount; globally locking the account with the account ID, increasing the amount in the account, and simultaneously pushing the fund change log to the message queue. When the account change listener receives the message, it needs to dynamically allocate the amount to the account. Based on the current account total amount + incoming amount / number of account sub-accounts = account growth value, it determines whether the account growth value is less than the account lock increase threshold. If it is less, based on the incoming amount / increase threshold = number of account sub-accounts to perform the operation, it locks the account one by one and increases the allocated amount.
[0009] Optionally, the high-frequency increase and high-frequency decrease account strategy includes: globally locking the account with the account ID, increasing the account balance, and simultaneously pushing the fund change log to a message queue. Upon receiving the message, the account change listener needs to dynamically allocate funds to the sub-accounts. Based on the formula: current account balance + incoming amount / number of sub-accounts = sub-account growth value, it determines whether the sub-account growth value is less than the sub-account lock-in increase threshold. If it is less, then based on the formula: incoming amount / increase threshold = number of sub-accounts to perform the operation, and cyclically locking each sub-account to increase the allocated amount; globally locking the account with the sub-account ID, decreasing the account balance, and simultaneously pushing the fund change log to the message queue. The account change listener listens to the queue, processes the fund change log sequentially, and performs the account balance deduction operation.
[0010] Optionally, when funds need to be refunded via the original payment method, the account is set as a multi-channel increase account. The multi-channel increase strategy is as follows: after increasing the funds in the account according to the amount operation execution strategy, a fund package is generated under each increase in the fund account; after deducting the funds in the account according to the amount operation execution strategy, the deductions are made sequentially according to the reverse order of the fund package generation time, and the fund packages with zero funds are set to a closed state.
[0011] Optionally, when deducting the amount from the fund account, the method further includes: obtaining the order of the fund sub-accounts by sorting the set, locking the fund sub-account with the highest amount, and when the number of locked fund sub-accounts is insufficient, while locking the fund sub-account, trying to lock the next fund sub-account and judging whether the amount can make up for the shortfall of the previous fund sub-account. If not, the locking operation is performed again until the amount meets the deduction operation or the amount is still insufficient after locking all fund sub-accounts. When increasing the allocation amount by locking the fund accounts one by one in a loop, the method further includes: generating a fund sub-account distribution list, recording the number of times the fund sub-account amount is increased and the amount of the increased fund, prioritizing the fund sub-account with the fewest number of increases, generating a timed task, and judging at a preset time whether the difference between the amount of the fund sub-account and the average amount of all fund sub-accounts exceeds a preset threshold. If so, the amount of all fund sub-accounts is distributed equally.
[0012] To achieve the above objectives, this application also provides an account and funds management device for a payment account system, comprising: a memory; and
[0013] A processor connected to the memory, the processor being configured to:
[0014] Create user information and generate a corresponding unique user identifier. Create different accounts for the user based on their different payment channels, corresponding fund operation volume, and fund operation frequency. Each account includes a fund account and account information. The fund account includes several fund sub-accounts. The account information includes corresponding payment channel information and amount operation execution strategy. The number of fund sub-accounts and the amount operation execution strategy are determined based on the fund operation volume and fund operation frequency. Obtain the user's unique identifier and business line identifier. Obtain the corresponding account information based on the user information and business line identifier corresponding to the user's unique identifier. Perform amount operations according to the amount operation execution strategy in the obtained account information. The amount operations include at least one of the following: increasing, deducting, freezing, and unfreezing the amount.
[0015] To achieve the above objectives, this application also provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a machine, implements the steps of the method described above.
[0016] The embodiments of this application have the following advantages:
[0017] 1. This application provides a method for managing accounts and funds in a payment account system, comprising the following steps: creating user information, generating a corresponding unique user identifier, creating different accounts for the user based on different payment channels and corresponding fund operation volume and frequency, wherein each account includes a fund account and account information, the fund account includes several fund sub-accounts, the account information includes corresponding payment channel information and a fund operation execution strategy, the number of fund sub-accounts and the fund operation execution strategy are determined based on the fund operation volume and frequency; obtaining the unique user identifier and a business line identifier, obtaining corresponding account information based on the user information and business line identifier corresponding to the unique user identifier; and performing a fund operation based on the fund operation execution strategy in the obtained account information, wherein the fund operation includes at least one of increasing, deducting, freezing, and unfreezing the amount.
[0018] Using the above method, the payment account system is divided into users, accounts, and funds accounts. Different amount operation execution strategies and multiple fund sub-accounts are generated for account attributes. By operating multiple fund sub-accounts, the problem of unique account locking when funds change is solved, thereby adapting to the requirements of different business for fund changes and improving the throughput of funds.
[0019] 2. Further, when funds need to be refunded via the original payment method, the account is set as a multi-channel increase account. The multi-channel increase strategy is as follows: after increasing the funds in the account according to the amount operation execution strategy, a fund package is generated under each increase in the fund account; after deducting the funds in the account according to the amount operation execution strategy, the deductions are made sequentially according to the reverse order of the fund package generation time, and the fund packages with zero funds are set to a closed state.
[0020] For special accounts, funds are further subdivided into different fund packages. By recording the source, expiration time, and other special attributes of each fund package, funds are ensured to be used for their designated purpose. Attached Figure Description
[0021] To more clearly illustrate the embodiments of this application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0022] Figure 1 A flowchart illustrating an account and fund management method for a payment account system provided in this application embodiment;
[0023] Figure 2 This is a block diagram of an account and funds management device for a payment account system provided in an embodiment of this application. Detailed Implementation
[0024] The following specific embodiments illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0025] Furthermore, the technical features involved in the different embodiments of this application described below can be combined with each other as long as they do not conflict with each other.
[0026] One embodiment of this application provides a method for account and fund management in a payment account system, referencing... Figure 1 , Figure 1 The flowchart provided in one embodiment of this application illustrates an account and funds management method for a payment account system. It should be understood that the method may also include additional boxes not shown and / or the boxes shown may be omitted, and the scope of this application is not limited in this respect.
[0027] In step 101, user information is created, a corresponding unique user identifier is generated, and different accounts are created for the user based on the user's different payment channels and the corresponding amount and frequency of fund operations. Each account includes a fund account and account information. The fund account includes several fund sub-accounts. The account information includes the corresponding payment channel information and the amount operation execution strategy. The number of fund sub-accounts and the amount operation execution strategy are determined based on the amount and frequency of fund operations.
[0028] Specifically, in this embodiment, the payment account system is divided into three parts: User 1:N Account 1:N Funds Account. The account creation process includes: first, creating user information for each user. During registration, the system generates a unique user identifier (identity ID). Then, based on the user's different payment channels and corresponding fund operation volume and frequency, different accounts are created for each user. Each account includes a funds account and account information. The funds account refers to the funds management account within the account, used to handle increases and decreases in the account amount during specific transactions. Finally, based on the payment channel information, fund operation volume, and fund operation frequency, the required number of sub-accounts for each funds account is determined, and a specified number of sub-accounts are created. The payment channels include bank pre-deposit accounts, credit accounts, WeChat, or Alipay, etc. The payment channel information includes the user's account opening information for different payment channels and the information that needs to be transmitted when interacting with the payment channels, such as the identity information returned by the payment channels. The number of sub-accounts is mainly related to the transaction volume and frequency of the user's payment channels and needs to be configured by the operations personnel. Users with a large instantaneous transaction volume need to be configured with multiple sub-accounts to increase throughput, and the instantaneous concurrency of the payment channel also needs to be considered.
[0029] In some embodiments, based on the amount and frequency of fund operations, the account is set as a low-frequency increase / decrease account, a high-frequency increase / decrease account, a high-frequency decrease / decrease account, or a high-frequency increase / decrease account, and the corresponding fund operation execution strategies are low-frequency increase / decrease account strategy, high-frequency increase / decrease account strategy, high-frequency decrease / decrease account strategy, and high-frequency increase / decrease account strategy.
[0030] In step 102, the user's unique identifier and the business line identifier are obtained, and the corresponding account information is obtained based on the user information corresponding to the user's unique identifier and the business line identifier.
[0031] Specifically, when a user conducts a transaction using the payment account system in this embodiment, the system obtains the user's unique identifier, retrieves the corresponding user information based on this unique identifier, and this user information corresponds to multiple account information. Then, it obtains the business line identifier of the current transaction from the connected external system, and retrieves the corresponding account information of the current user based on this business line identifier. The business line refers to the transaction segment in which the user's transaction occurs, such as airfare, hotel, or train ticket transactions, employee benefit distribution transactions, etc. Different business lines are processed using different accounts.
[0032] At step 103, a monetary operation is performed according to the monetary operation execution strategy in the acquired account information, the monetary operation including at least one of increasing, deducting, freezing and unfreezing the amount.
[0033] In some embodiments, the strategy for performing amount operations on accounts with low-frequency increases and low-frequency decreases includes: globally locking the account with the account ID and performing increase or decrease operations on the account amount.
[0034] Specifically, global locking refers to locking all funds accounts under the account, disallowing trading operations. When global locking occurs, the account status in the cache needs to be set to locked. When a fund account processes a transaction, it needs to determine whether the account is available based on the account ID. If it is not available, an optimistic locking mode judgment (loop judgment + dormant processing) is performed. After a certain number of times, the transaction is processed as a failure.
[0035] In some embodiments, the strategy for performing amount operations on accounts with high-frequency increases and low-frequency decreases includes: pushing fund change logs to a message queue, having a fund account change listener listen to the queue, processing the fund change logs sequentially and performing an increase operation on the account amount; and globally locking the account with the fund account ID and performing a deduction operation on the account amount.
[0036] Specifically, locking the account globally by the fund account ID refers to locking the fund account. When funds are transferred from the account to this fund account, the transaction needs to be queued for processing.
[0037] In some embodiments, the high-frequency deduction and low-frequency increase account strategy includes: globally locking the account using the account ID, deducting the amount in the account, and simultaneously pushing the fund change log to a message queue. A fund change listener monitors the queue, processes the fund change log sequentially, and deducts the amount in the account. Then, globally locking the account using the account ID, increasing the amount in the account, and simultaneously pushing the fund change log to the message queue. Upon receiving the message, the fund change listener needs to dynamically allocate funds to the sub-accounts. Based on the formula: current account total + incoming amount / number of sub-accounts = fund sub-account growth value, it determines whether the fund sub-account growth value is less than the fund sub-account lock-up increase threshold. If it is less, it calculates based on the formula: incoming amount / increase threshold = number of fund sub-accounts to perform the operation, and then iteratively locks each fund sub-account and increases the allocated amount. The transaction processing of the fund account requires not only determining the account's lock status but also its own lock status to avoid errors in the amount of multiple transactions occurring simultaneously.
[0038] In some embodiments, the high-frequency increase and high-frequency decrease account strategy includes: globally locking the account with the account ID, increasing the account balance, and simultaneously pushing the fund change log to a message queue. Upon receiving the message, the account change listener needs to dynamically allocate funds to the sub-accounts. Based on the formula: current account balance + incoming amount / number of sub-accounts = sub-account growth value, it determines whether the sub-account growth value is less than the sub-account lock-in increase threshold. If it is less, then based on the formula: incoming amount / increase threshold = number of sub-accounts to perform the operation, and cyclically locking each sub-account to increase the allocated amount; globally locking the account with the sub-account ID, decreasing the account balance, and simultaneously pushing the fund change log to the message queue. The account change listener listens to the queue, processes the fund change log sequentially, and performs the deduction operation on the account balance.
[0039] In some embodiments, the aforementioned high-frequency deduction and low-frequency increase account strategies and high-frequency increase and high-frequency deduction account strategies, when deducting the amount in the fund account, further include: obtaining the order of the fund sub-accounts using a sorted set method, locking the fund sub-account with the highest amount, and when the locked fund sub-accounts are insufficient, while locking the fund sub-account, simultaneously attempting to lock the next fund sub-account and determining whether the amount can make up for the shortfall of the previous fund sub-account. If not, the locking operation is performed again until the amount meets the deduction operation or the amount is still insufficient after locking all the fund sub-accounts. In some embodiments, after the operation is completed, the fund sub-accounts are then placed into the sorted set, thereby maximizing the processing of transactions within an account by each fund sub-account. The system processes funds in rotation to maintain a balanced amount across all sub-accounts. In some embodiments, if a sub-account has zero funds, a redistribution strategy is triggered, averaging the amount between the sub-account with the highest amount and the sub-account with zero funds. When iterating through the sub-accounts and increasing their allocation limits, the system further includes: generating and maintaining a list of sub-accounts receiving funds, recording the number of times each sub-account's amount has increased and the amount of the increase; prioritizing the sub-account with the fewest increases; generating a scheduled task to determine at a preset time whether the difference between the amount of any sub-account and the average amount of all sub-accounts exceeds a preset threshold; if so, averaging the amounts across all sub-accounts.
[0040] Specifically, the reason for prioritizing the increase of funds in the sub-accounts with the fewest increases is that, in each case, the average increase value is less than the increase threshold. This could result in users having relatively small deposit amounts, and an even distribution could lead to a small increase in the total amount for all accounts. If one account's transaction amount is insufficient, it could trigger a lock-up period. Therefore, an unbalanced distribution method is used to ensure that all accounts under the same account can process transactions normally. The reason for evenly distributing the amounts of all the aforementioned sub-accounts is that if an account's amount meets the distribution requirements, it needs to be supplemented by deductions from other accounts. To avoid a chain reaction (where deductions from one account cause that account to fall short of the requirements), a complete redistribution is performed in this case.
[0041] In some embodiments, when funds need to be refunded via the original payment method, the account is set as a multi-channel increase account. The multi-channel increase strategy is to increase the funds in the account according to the amount operation execution strategy, and then generate a fund package under each increase account. After deducting the funds in the account according to the amount operation execution strategy, the funds are deducted sequentially according to the reverse order of the fund package generation time, and the fund packages with zero funds are set to a closed state.
[0042] Specifically, for special accounts, funds are further subdivided into different fund packages. By recording the source, expiration date, and other special attributes of each fund package, the funds are ensured to be used for their designated purpose. For example, when a company uses its own funds to pay employee benefits, it may use multiple accounts to pay employee benefits. However, when an employee leaves the company, the funds in the employee's account need to be returned to the corresponding company account. The path information can be obtained based on the payment records.
[0043] Using the above method, the payment account system is divided into users, accounts, and funds accounts. Different amount operation execution strategies and multiple fund sub-accounts are generated for account attributes. By operating multiple fund sub-accounts, the problem of unique account locking when funds change is solved, thereby adapting to the requirements of different business for fund changes and improving the throughput of funds.
[0044] Figure 2 A module block diagram of an account and funds management device for a payment account system provided in this application embodiment. The device includes:
[0045] A memory 201; and a processor 202 connected to the memory 201, the processor 202 being configured to: create user information, generate a corresponding unique user identifier, create different accounts for the user based on the user's different payment channels and corresponding fund operation volume and frequency, the accounts including fund accounts and account information, the fund accounts including several fund sub-accounts, the account information including corresponding payment channel information and amount operation execution strategy, the number of fund sub-accounts and the amount operation execution strategy being determined based on the fund operation volume and frequency; obtain the user unique identifier and business line identifier, obtain the corresponding account information based on the user information and business line identifier corresponding to the user unique identifier; and perform amount operations according to the amount operation execution strategy in the obtained account information, the amount operations including at least one of increasing, deducting, freezing and unfreezing the amount.
[0046] In some embodiments, the processor 202 is further configured to: based on the amount of funds operated and the frequency of funds operated, set the account as a low-frequency increase / decrease account, a high-frequency increase / decrease account, a high-frequency decrease / decrease account, or a high-frequency increase / decrease account, and the corresponding amount operation execution strategies are low-frequency increase / decrease account strategy, high-frequency increase / decrease account strategy, high-frequency decrease / decrease account strategy, and high-frequency increase / decrease account strategy.
[0047] In some embodiments, the processor 202 is further configured to: the low-frequency increase and low-frequency decrease account policy includes: globally locking the account with the account ID and performing increase or decrease operations on the account amount.
[0048] In some embodiments, the processor 202 is further configured to: the high-frequency increase and low-frequency decrease account strategy includes: pushing fund change logs to a message queue, having a fund account change listener listen to the queue, processing the fund change logs sequentially and operating the account amount to increase the amount; globally locking the account with the fund account ID and deducting the account amount.
[0049] In some embodiments, the processor 202 is further configured to: the high-frequency deduction and low-frequency increase account strategy includes: globally locking the account with the account ID, deducting the amount in the account, and simultaneously pushing the fund change log to a message queue, where a fund change listener listens to the queue, processes the fund change log sequentially, and performs the deduction operation on the account amount; globally locking the account with the account ID, increasing the amount in the account, and simultaneously pushing the fund change log to the message queue, where the fund change listener receives a message and needs to dynamically allocate the amount to the account, and determines whether the fund increase value is less than the fund lock increase threshold based on the current account total amount + incoming amount / number of fund accounts = fund increase value, and if it is less, then based on the incoming amount / increase threshold = number of fund accounts to perform the operation, and cyclically locking the fund accounts one by one to increase the allocation amount.
[0050] In some embodiments, the processor 202 is further configured to: The high-frequency increase / decrease account strategy includes: globally locking the account with the account ID, increasing the account balance, and simultaneously pushing the fund change log to a message queue. Upon receiving the message, the account change listener needs to dynamically allocate funds to the sub-accounts. Based on the formula: current account balance + incoming amount / number of sub-accounts = sub-account growth value, it determines whether the sub-account growth value is less than the sub-account lock-in increase threshold. If it is less, it calculates based on the formula: incoming amount / increase threshold = number of sub-accounts to perform the operation, and then loops to lock each sub-account to increase the allocated amount. Alternatively, the account is globally locked with the sub-account ID, and the account balance is deducted. Simultaneously, the fund change log is pushed to the message queue, and the account change listener listens to the queue, processing the fund change log sequentially and performing the deduction operation on the account balance.
[0051] In some embodiments, the processor 202 is further configured to: when funds need to be returned via the original payment method, set the account as a multi-channel increase account, wherein the multi-channel increase strategy is to increase the funds in the account according to the amount operation execution strategy, and then generate a fund package under each increase account; after deducting the funds in the account according to the amount operation execution strategy, deducting the funds sequentially according to the reverse order of the fund package generation time, and setting the fund package with zero funds to a closed state.
[0052] In some embodiments, the processor 202 is further configured to: when performing a deduction operation on the amount of the fund account, further include: obtaining the order of the fund sub-accounts by sorting the set, locking the fund sub-account with the highest amount, and when the number of locked fund sub-accounts is insufficient, while locking the fund sub-account, simultaneously grabbing the next fund sub-account and determining whether the amount can make up for the shortfall of the previous fund sub-account. If not, then performing the grabbing operation again until the amount meets the deduction operation or the amount is still insufficient after grabbing all the fund sub-accounts; when performing the increase operation by locking the fund accounts one by one in a loop, further includes: generating a fund sub-account distribution list, recording the number of times the fund sub-account amount is increased and the amount of the increase, prioritizing the fund sub-account with the fewest number of amount increases, generating a timed task, and determining at a preset time whether the difference between the amount of the fund sub-account and the average amount of all fund sub-accounts exceeds a preset threshold. If so, then the amount of all the fund sub-accounts is distributed equally.
[0053] For specific implementation methods, please refer to the aforementioned method embodiments, which will not be repeated here.
[0054] This application may be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this application.
[0055] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0056] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0057] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information from the computer-readable program instructions. These electronic circuits can execute the computer-readable program instructions to implement various aspects of this application.
[0058] Various aspects of this application are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0059] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0060] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0061] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0062] Note that, unless otherwise explicitly stated, all features disclosed in this specification (including any appended claims, abstract, and drawings) may be replaced by alternative features for achieving the same, equivalent, or similar purpose. Therefore, unless explicitly stated otherwise, each disclosed feature is merely one example of a set of equivalent or similar features. Where used, "further," "preferably," "even further," and "more preferably" are simple starting points for describing another embodiment based on the foregoing embodiments, the combination of which with the foregoing embodiments constitutes the complete configuration of another embodiment. Any combination of several "further," "preferably," "even further," or "more preferably" settings following the same embodiment constitutes yet another embodiment.
[0063] Although this application has been described in detail above with general descriptions and specific embodiments, some modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of this application fall within the scope of protection claimed in this application.
Claims
1. A method for managing accounts and funds in a payment account system, characterized in that, Includes the following steps: Create user information and generate a corresponding unique user identifier. Create different accounts for the user based on the user's different payment channels and the corresponding amount and frequency of fund operations. Each account includes a fund account and account information. The fund account includes several fund sub-accounts. The account information includes the corresponding payment channel information and the amount operation execution strategy. The number of fund sub-accounts and the amount operation execution strategy are determined based on the amount and frequency of fund operations. Obtain the user's unique identifier and the business line identifier, and obtain the corresponding account information based on the user information corresponding to the user's unique identifier and the business line identifier; The amount operation is performed according to the amount operation execution strategy in the obtained account information, and the amount operation includes at least one of the following: increasing, deducting, freezing, and unfreezing the amount; Based on the amount and frequency of fund transactions, the account is set as a high-frequency deduction and low-frequency increase account. The corresponding amount operation execution strategy is a high-frequency deduction and low-frequency increase account strategy, including: The account is globally locked by the sub-account ID, and the amount in the account is deducted. At the same time, the fund change log is pushed to the message queue, and the fund change listener listens to the queue, processes the fund change log in turn, and performs the deduction operation on the account amount. The account is globally locked using the account ID. An increase operation is performed on the account amount, and the fund change log is pushed to the message queue. When the account change listener receives the message, it needs to dynamically allocate the amount to the sub-account. Based on the current account total amount + incoming amount / number of sub-accounts = sub-account growth value, it is determined whether the sub-account growth value is less than the sub-account lock increase threshold. If it is less, the number of sub-accounts to be operated is calculated as incoming amount / increase threshold = number of sub-accounts, and the allocation amount is locked for each sub-account in a loop for the increase operation. When deducting funds from the account, the process also includes: obtaining the order of the sub-accounts using a sorted set method, locking the sub-account with the highest amount, and when there are not enough locked sub-accounts, while locking the sub-account, trying to lock the next sub-account and determining whether the amount can make up for the shortfall of the previous sub-account. If not, the locking operation is performed again until the amount meets the deduction requirement or the amount is still insufficient after locking all the sub-accounts. When performing the increase operation by locking the allocation amount of each fund account in a loop, the method further includes: generating a fund sub-account distribution list, recording the number of times the fund sub-account amount is increased and the amount of the increase, prioritizing the fund sub-account with the fewest increase times, generating a timed task, and determining at a preset time whether the difference between the amount of the fund sub-account and the average amount of all fund sub-accounts exceeds a preset threshold. If so, the amount of all fund sub-accounts is distributed equally.
2. The method for managing accounts and funds in a payment account system according to claim 1, characterized in that, Based on the amount and frequency of fund operations, the account is set as a low-frequency increase / decrease account, a high-frequency increase / decrease account, or a high-frequency increase / high-frequency decrease account, and the corresponding fund operation execution strategies are low-frequency increase / decrease account strategy, high-frequency increase / decrease account strategy, and high-frequency increase / high-frequency decrease account strategy, respectively.
3. The method for managing accounts and funds in a payment account system according to claim 2, characterized in that, The low-frequency increase and low-frequency decrease account strategy includes: globally locking the account with the account ID and increasing or decreasing the account balance.
4. The method for managing accounts and funds in a payment account system according to claim 2, characterized in that, The high-frequency increase and low-frequency decrease account strategy includes: pushing fund change logs to a message queue, having a fund account change listener listen to the queue, processing the fund change logs sequentially, and operating the account amount to increase the amount; The account is globally locked using the account ID, and the account balance is deducted.
5. The method for managing accounts and funds in a payment account system according to claim 2, characterized in that, The high-frequency increase and high-frequency decrease account strategy includes: globally locking the account with the account ID, increasing the amount in the account, and simultaneously pushing the fund change log to the message queue. When the account change listener receives the message, it needs to dynamically allocate the amount to the sub-account. Based on the current account total amount + incoming amount / number of sub-accounts = sub-account growth value, it is determined whether the sub-account growth value is less than the sub-account lock increase threshold. If it is less, the number of sub-accounts to perform the operation is calculated as incoming amount / increase threshold, and the allocation amount for each sub-account is locked in a loop for the increase operation. The account is globally locked using the sub-account ID, and the amount in the account is deducted. At the same time, the fund change log is pushed to the message queue, and the fund change listener listens to the queue, processes the fund change log in sequence, and performs the deduction operation on the account amount.
6. The method for managing accounts and funds in a payment account system according to claim 2, characterized in that, Also includes: When funds need to be refunded via the original payment method, the account is set as a multi-channel increase account. The multi-channel increase strategy is to increase the funds in the account according to the amount operation strategy, and then generate a fund package under each increase fund account. After deducting funds from the account according to the amount operation strategy, the funds are deducted sequentially according to the reverse order of the fund package generation time, and the fund packages with zero funds are set to the closed state.
7. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a machine, it implements the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Transaction system and business processing method
CN109858915A
Accounting management method and device
CN111080424A