A method and device for processing hotspot accounts
By creating multiple sub-accounts and adopting specific routing strategies and intelligent prediction algorithms, transaction success rate and fund security issues of hotspot accounts in the up-frequency, down-frequency and dual-frequency accounting scenarios are solved, achieving more efficient accounting performance and fund management.
Patent Information
- Application Number
- CN202311034046.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2043-08-16
AI Technical Summary
When handling the business scenarios of up-frequency, down-frequency and dual-frequency accounting, existing hot account solutions have problems such as lower transaction success rate, risk of capital loss and reduced timeliness of account release.
By creating multiple ordinary sub-accounts, large sub-accounts and sinking sub-accounts, and performing income freezing, unfreezing payments and fund collection operations based on preset routing strategies and intelligent prediction algorithms, we will improve transaction success rate and accounting timeliness, while avoiding the risk of capital loss.
It improves the transaction success rate and accounting timeliness of hot accounts, avoids the risk of capital losses, and improves the overall performance of the system.
Smart Images

Figure CN117035790B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial payment technology, and in particular to a method and device for processing hotspot accounts. Background Art
[0002] Hot accounts refer to accounts whose balances are frequently increased or decreased in a short period of time. If the accounting system frequently updates the same account, it may cause "deadlock", "lock waiting", "connection timeout" and other phenomena. Improper handling will also cause serious performance problems for the entire database of the accounting system, thereby affecting the normal accounting operations of other accounts. Hot accounts are usually divided into three types: 1. Increased frequency accounting business scenarios (only including account entry), referred to as increased frequency accounts. 2. Reduced frequency accounting business scenarios (only including account withdrawal), referred to as reduced frequency accounts, 3. Dual-frequency accounting business scenarios (first account entry and then account withdrawal), referred to as dual-frequency accounts.
[0003] At present, the existing hotspot account solutions usually include the following four solutions: Solution 1: Limiting the flow, discarding some business requests, and ensuring the stable operation of the system. However, discarded business requests will lead to a lower transaction success rate and a poor user experience, which are defects in all three types of hotspot accounts. Solution 2: Buffering, shaving peaks and filling valleys, returning the accounting results first during the peak trading period, and then processing and digesting them during the valley period. Although this solution guarantees the transaction success rate, there is a risk of capital loss due to overdraft of account balances, and there are defects in frequency-reducing accounts and dual-frequency accounts. Solution 3: Summarizing details, recording the account transaction acceptance voucher table, and asynchronously summarizing and accounting. This solution improves the timeliness of account entry to a certain extent, but there is a risk of capital loss due to overdraft of account balances, and there are defects in frequency-reducing accounts and dual-frequency accounts. Solution 4: Divide and conquer, splitting the balance of a single hotspot account into multiple shadow accounts. This solution has good timeliness of account entry, but when making an outgoing payment, it is necessary to try multiple times to obtain the balance from another shadow account, and repeatedly perform real-time fund collection until the balance is sufficient, resulting in a decrease in the timeliness of outgoing payments, and there are defects in frequency-reducing accounts and dual-frequency accounts.
[0004] Since existing hotspot account solutions generally have defects, there is an urgent need for a hotspot account solution that can improve transaction success rate, bookkeeping timeliness and has no risk of capital loss. Summary of the invention
[0005] Based on this, it is necessary to provide a method and device for processing hotspot accounts in response to the above technical problems.
[0006] In a first aspect, a method for processing a hotspot account is provided, the method comprising:
[0007] When it is detected that the target account meets the preset hot account conditions, multiple ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts corresponding to the target account are created, and the available balance and frozen transaction small balance in the target account are inherited to the sinking sub-account; the real-time balances of the multiple ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts include the available balance and frozen transaction small balance;
[0008] In the case where the target account is a dual-band account, receiving a first deposit request of the target account, determining a first ordinary sub-account from the plurality of ordinary sub-accounts according to the first deposit request and a preset random routing strategy, and performing an income freezing operation on the first ordinary sub-account based on the deposit amount carried in the first deposit request, and adding a small balance of frozen transactions;
[0009] In the case where the target account is a dual-frequency account, a first payment request of the target account is received, and according to the first payment request and the preset original order routing strategy, the original accounting subaccount and the original frozen transaction small balance corresponding to the first payment request are determined among the multiple ordinary subaccounts and the sinking subaccount, and based on the payment amount carried in the first payment request, the original frozen transaction small balance of the original accounting subaccount is unfrozen and paid, and the payment amount is deducted from the original frozen transaction small balance; wherein, according to the first payment request and the preset original order routing strategy, the original accounting subaccount corresponding to the first payment request is determined among the multiple ordinary subaccounts and the sinking subaccount. The sub-account and the original frozen transaction small balance include: inquiring a target accounting account and a target frozen transaction small balance corresponding to the accounting voucher number carried in the first payment request in a pre-stored correspondence between the accounting voucher number, the accounting account and the frozen transaction small balance; determining the target frozen transaction small balance as the original frozen transaction small balance corresponding to the first payment request; if the target accounting account is the main account of the target account, determining the sinking sub-account of the target account as the original accounting sub-account corresponding to the first payment request; if the target accounting account is a common sub-account of the target account, determining the target accounting account as the original accounting sub-account corresponding to the first payment request.
[0010] As an optional implementation, the method further includes:
[0011] In the case where the target account is a frequency-added account, receiving a second deposit request from the target account, and determining a second ordinary sub-account from the plurality of ordinary sub-accounts according to the second deposit request and a preset random routing strategy;
[0012] Based on the deposit amount carried in the second deposit request, a deposit operation is performed on the available balance of the second general sub-account.
[0013] As an optional implementation, the method further includes:
[0014] In the case that the target account is a frequency-reducing account, a second withdrawal request of the target account is received, and based on the withdrawal amount carried in the second withdrawal request, a withdrawal operation is performed on the available balance of the large-amount sub-account.
[0015] As an optional implementation manner, determining the first ordinary sub-account from the plurality of ordinary sub-accounts according to the first account entry request and a preset random routing strategy includes:
[0016] Determine a random allocation value corresponding to the first account entry request according to the account entry request serial number corresponding to the first account entry request and a preset random allocation algorithm;
[0017] Based on the number of sub-accounts of the plurality of ordinary sub-accounts, the randomly assigned value is subjected to a modulo process to obtain an ordinary sub-account sequence number;
[0018] The ordinary subaccount number is determined according to the ordinary subaccount sequence number and a preset subaccount number conversion rule, and the first ordinary subaccount is determined based on the ordinary subaccount number.
[0019] As an optional implementation manner, determining, according to the first payment request and a preset original order routing strategy, the original accounting subaccount and the original frozen transaction small balance corresponding to the first payment request from among the multiple ordinary subaccounts and the sinking subaccounts, includes:
[0020] In the pre-stored correspondence between the accounting voucher number, the accounting account and the frozen transaction small balance, query the target accounting account and the target frozen transaction small balance corresponding to the accounting voucher number carried in the first payment request;
[0021] Determine the target frozen transaction small balance as the original frozen transaction small balance corresponding to the first withdrawal request;
[0022] If the target accounting account is the primary account of the target account, determining the sinking sub-account of the target account as the original accounting sub-account corresponding to the first payment request;
[0023] If the target accounting account is a common sub-account of the target account, the target accounting account is determined to be the original accounting sub-account corresponding to the first payment request.
[0024] As an optional implementation, the method further includes:
[0025] Obtain the historical payment sequence and current available balance of the large-amount sub-account; the historical payment sequence includes historical payment time and historical payment amount;
[0026] Determine a future payment sequence based on the historical payment sequence and a preset intelligent prediction algorithm; the future payment sequence includes future payment times and future payment amounts;
[0027] For each future payment time, determining the remaining balance of the large-amount sub-account corresponding to the future payment time according to the current available balance and the future payment sequence;
[0028] If the remaining balance of the large-value sub-account corresponding to the future payment time is less than or equal to the product of a preset aggregation coefficient and the future payment amount corresponding to the future payment time in the future payment sequence, the available balances in the multiple ordinary sub-accounts and the sinking sub-accounts of the target account are aggregated into the large-value sub-account.
[0029] As an optional implementation, according to the current available balance and the future payment sequence, the formula for determining the remaining balance of the large-amount sub-account corresponding to the future payment time is:
[0030] D[t]=Aa-Fv[T]-Fv[T+1]-…-Fv[t-1];
[0031] Wherein, D[t] represents the remaining balance of the large-amount sub-account at the future payment time t, Aa represents the current available balance of the large-amount sub-account, Fv[t-1] represents the future payment amount corresponding to the future payment time t-1 in the future payment sequence, t=[T+1, T+10s], and T represents the current time.
[0032] As an optional implementation manner, before aggregating the available balances in the plurality of ordinary sub-accounts and the sinking sub-accounts of the target account into the large-amount sub-account, the method further includes:
[0033] Get the first current QPS of the large amount sub-account;
[0034] If the first current QPS is less than the preset first QPS threshold, the step of aggregating the available balances in the multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account is executed; otherwise, the step of aggregating the available balances in the multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account is canceled.
[0035] As an optional implementation manner, before aggregating the available balances in the plurality of ordinary sub-accounts and the sinking sub-accounts of the target account into the large-amount sub-account, the method further includes:
[0036] Obtaining the second current QPS of the plurality of common sub-accounts;
[0037] If there is a third ordinary sub-account among the multiple ordinary sub-accounts whose second current QPS is greater than or equal to the preset second QPS threshold, the available balances in the other ordinary sub-accounts and sinking sub-accounts among the multiple ordinary sub-accounts of the target account except the third ordinary sub-account are aggregated into the large-amount sub-account; otherwise, the step of aggregating the available balances in the multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account is executed.
[0038] In a second aspect, a hotspot account processing device is provided, the device comprising:
[0039] A creation module, for creating a plurality of ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts corresponding to the target account when it is detected that the target account meets the preset hot account condition, and inheriting the available balance and the small balance of frozen transactions in the target account to the sinking sub-account; the real-time balances of the plurality of ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts include the available balance and the small balance of frozen transactions;
[0040] a first account entry module, configured to receive a first account entry request of the target account when the target account is a dual-frequency account, determine a first ordinary sub-account from the plurality of ordinary sub-accounts according to the first account entry request and a preset random routing strategy, and perform an income freezing operation on the first ordinary sub-account based on the account entry amount carried in the first account entry request, and increase a small balance of a frozen transaction;
[0041] A first payment module is configured to receive a first payment request from the target account when the target account is a dual-frequency account, and determine, according to the first payment request and a preset original order routing strategy, an original accounting subaccount and an original frozen transaction small balance corresponding to the first payment request from among the multiple ordinary subaccounts and the sinking subaccounts, and perform an unfreezing payment operation on the original frozen transaction small balance of the original accounting subaccount based on the payment amount carried in the first payment request, and deduct the payment amount from the original frozen transaction small balance; wherein, according to the first payment request and a preset original order routing strategy, determine, among the multiple ordinary subaccounts and the sinking subaccounts, an original accounting subaccount and an original frozen transaction small balance corresponding to the first payment request The method comprises: searching for a target accounting account and a target frozen transaction small balance corresponding to the accounting voucher number carried in the first payment request in a pre-stored correspondence relationship among the accounting voucher number, the accounting account and the frozen transaction small balance; determining the target frozen transaction small balance as the original frozen transaction small balance corresponding to the first payment request; if the target accounting account is the main account of the target account, determining the sinking sub-account of the target account as the original accounting sub-account corresponding to the first payment request; if the target accounting account is a common sub-account of the target account, determining the target accounting account as the original accounting sub-account corresponding to the first payment request.
[0042] As an optional implementation, the device further includes:
[0043] A first determination module is configured to receive a second deposit request from the target account when the target account is a frequency-added account, and determine a second ordinary sub-account from the plurality of ordinary sub-accounts according to the second deposit request and a preset random routing strategy;
[0044] The second account entry module is used to perform an account entry operation on the available balance of the second general sub-account based on the account entry amount carried in the second account entry request.
[0045] As an optional implementation, the device further includes:
[0046] The second payment module is used to receive a second payment request from the target account when the target account is a reduced-frequency account, and perform a payment operation on the available balance of the large-amount sub-account based on the payment amount carried in the second payment request.
[0047] As an optional implementation manner, the first account entry module specifically includes:
[0048] Determine a random allocation value corresponding to the first account entry request according to the account entry request serial number corresponding to the first account entry request and a preset random allocation algorithm;
[0049] Based on the number of sub-accounts of the plurality of ordinary sub-accounts, the randomly assigned value is subjected to a modulo process to obtain an ordinary sub-account sequence number;
[0050] The ordinary subaccount number is determined according to the ordinary subaccount sequence number and a preset subaccount number conversion rule, and the first ordinary subaccount is determined based on the ordinary subaccount number.
[0051] As an optional implementation manner, the first payment module specifically includes:
[0052] In the pre-stored correspondence between the accounting voucher number, the accounting account and the frozen transaction small balance, query the target accounting account and the target frozen transaction small balance corresponding to the accounting voucher number carried in the first payment request;
[0053] Determine the target frozen transaction small balance as the original frozen transaction small balance corresponding to the first withdrawal request;
[0054] If the target accounting account is the primary account of the target account, determining the sinking sub-account of the target account as the original accounting sub-account corresponding to the first payment request;
[0055] If the target accounting account is a common sub-account of the target account, the target accounting account is determined to be the original accounting sub-account corresponding to the first payment request.
[0056] As an optional implementation, the device further includes:
[0057] A first acquisition module is used to acquire the historical payment sequence and current available balance of the large-amount sub-account; the historical payment sequence includes the historical payment time and the historical payment amount;
[0058] A second determination module is used to determine a future payment sequence according to the historical payment sequence and a preset intelligent prediction algorithm; the future payment sequence includes a future payment time and a future payment amount;
[0059] A third determination module is used to determine, for each future payment moment, the remaining balance of the large-amount sub-account corresponding to the future payment moment according to the current available balance and the future payment sequence;
[0060] The first aggregation module is used to aggregate the available balances in the multiple ordinary sub-accounts and the sinking sub-accounts of the target account into the large-amount sub-account if the remaining balance corresponding to the large-amount sub-account at the future payment time is less than or equal to the product of a preset aggregation coefficient and the future payment amount corresponding to the future payment time in the future payment sequence.
[0061] As an optional implementation, the device further includes:
[0062] A second acquisition module is used to acquire a first current QPS of the large-amount sub-account;
[0063] A cancellation module is used to trigger the first collection module to execute the step of collecting the available balances in the multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-value sub-account if the first current QPS is less than a preset first QPS threshold; otherwise, cancel the step of collecting the available balances in the multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-value sub-account.
[0064] As an optional implementation, the device further includes:
[0065] A third acquisition module, configured to acquire a second current QPS of the plurality of common sub-accounts;
[0066] The second collection module is used to collect the available balances in the other ordinary sub-accounts and sinking sub-accounts among the multiple ordinary sub-accounts of the target account except the third ordinary sub-account into the large-amount sub-account if there is a third ordinary sub-account among the multiple ordinary sub-accounts whose second current QPS is greater than or equal to the preset second QPS threshold; otherwise, trigger the first collection module to execute the step of collecting the available balances in the multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account.
[0067] In a third aspect, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the method steps described in the first aspect are implemented.
[0068] In a fourth aspect, 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 method steps described in the first aspect are implemented.
[0069] The present application provides a method for processing a hotspot account. The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:
[0070] In the dual-frequency scenario, when a dual-frequency account is deposited, on the one hand, the problem of reduced transaction success rate caused by the existing solution 1 (current limiting solution) is solved through multiple ordinary sub-accounts, and the problem of capital loss risk caused by the existing solution 2 (buffer solution) and the existing solution 3 (aggregate detail solution) is solved. On the other hand, the dual-frequency account adopts the income freezing accounting operation for the entry request, and adds the frozen transaction small balance in the ordinary sub-account, so that the frozen transaction small balance in each ordinary sub-account does not need to be collected, which solves the problem of reduced timeliness of outgoing transactions caused by the existing solution 4 (divide and conquer solution). When outgoing, by specifying the original frozen transaction small balance of the original accounting sub-account, the original frozen transaction small balance of the original accounting sub-account is deducted by the unfreezing payment, and the transaction funds are also locked in the frozen transaction small balance. Since a transaction only generates one frozen transaction small balance, the competition for locking and unlocking is infinitely weakened, and the accounting performance is improved. In addition, the frozen transaction small balance can only be deducted by the original transaction and is completely isolated from other transactions. This makes it unnecessary for the frozen transaction small balance to collect funds in real time. The fund changes in the closed-loop transaction process are stable and safe, which ensures the success rate of outgoing transactions under the dual-frequency account.
[0071] In the frequency-increasing scenario, when the frequency-increasing account is making an entry, the accounting performance can be significantly improved by increasing the number of ordinary sub-accounts, thereby solving the problem of reduced transaction success rate caused by the existing solution 1 (current limiting solution).
[0072] In the frequency reduction scenario, when the frequency reduction account makes an outgoing payment, on the one hand, the available balances in the ordinary sub-accounts and the sinking sub-accounts are aggregated into the large-amount sub-account through the intelligent fund collection algorithm to ensure sufficient funds for the frequency reduction account to use at any time. On the other hand, the outgoing payment request in the dual-frequency account uses the small balance of frozen transactions in the ordinary sub-accounts and the sinking sub-accounts, without the need to use the large-amount sub-account for outgoing payments, reducing the concurrency pressure on the large-amount sub-account. Overall, the transaction success rate and outgoing timeliness of the frequency reduction account are improved, and the risk of real-time collection and fund loss is avoided.
[0073] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0075] Figure 1 A schematic diagram of a three-type sub-account model provided in an embodiment of the present application;
[0076] Figure 2 A schematic diagram of a real-time balance model provided in an embodiment of the present application;
[0077] Figure 3 A flowchart of a method for processing a hotspot account provided in an embodiment of the present application;
[0078] Figure 4 A flowchart of a random routing strategy provided in an embodiment of the present application;
[0079] Figure 5 A flowchart of an original order routing strategy provided in an embodiment of the present application;
[0080] Figure 6 A flowchart of an intelligent fund collection method provided in an embodiment of the present application;
[0081] Figure 7 A schematic diagram of the structure of a hotspot account processing device provided in an embodiment of the present application;
[0082] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0083] 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.
[0084] A method for processing hot accounts provided in an embodiment of the present application can be applied to an accounting system. Existing hot account solutions generally include the following four solutions: Solution 1: flow limiting, discarding some business requests, and ensuring stable operation of the system. However, discarded business requests will lead to a lower transaction success rate and a poor user experience, which are defects in all three types of hot accounts. Solution 2: buffering, peak shaving and valley filling, returning the accounting results first during the peak trading period, and then processing and digesting them during the trough period. Although this solution guarantees the transaction success rate, there is a risk of capital loss due to overdraft of account balance, and there are defects in frequency reduction accounts and dual-frequency accounts. Solution 3: Summarize details, record the account transaction acceptance voucher table, and asynchronously summarize and record accounts at regular intervals. This solution improves the timeliness of account entry to a certain extent, but there is a risk of capital loss due to overdraft of account balance, and there are defects in frequency reduction accounts and dual-frequency accounts. Solution 4: divide and conquer, split the balance of a single hot account into multiple shadow accounts. This solution has good timeliness in terms of account entry, but when making payments, it is necessary to make multiple attempts to obtain the balance from another shadow account and repeat the real-time fund collection until the balance is sufficient, resulting in reduced timeliness in terms of account exit and defects in reduced-frequency accounts and dual-frequency accounts.
[0085] In order to solve the above problems existing in the prior art, this application designs three types of sub-account models and real-time balance models for hot accounts based on the underlying foundation of the account. Based on the above three types of sub-account models and real-time balance models, the problems existing in the prior art in terms of bookkeeping performance, account success rate, and timeliness of entry / exit of hot accounts are solved. The three types of sub-account models and real-time balance models are introduced in detail as follows:
[0086] Three types of sub-account models: When an account (hereinafter referred to as the target account) is identified as a hot account, Figure 1 As shown, the accounting system takes the target account as the main account and creates three types of sub-accounts for it, namely ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts. Ordinary sub-accounts are used in frequency-increasing scenarios and dual-frequency scenarios. Among them, the accounting system can determine the number of sub-accounts to create ordinary sub-accounts based on the user's performance requirements. For example, the transaction processing volume per second of an ordinary sub-account is 30tps, and the transaction processing volume per second in the user's performance requirement is 1200tps, then the accounting system creates 1200 / 30=40 ordinary sub-accounts. Large-amount sub-accounts are used in frequency reduction scenarios. The sinking sub-account is used for the smooth transition of the target account from the main account accounting scheme to the sub-account accounting scheme of this application. After the target account is identified as a hot account, the sub-account accounting scheme takes effect at this time, and the target account is downgraded from the main account to the sinking sub-account, and the sinking sub-account inherits the available balance and frozen transaction small balance of the target account in the main account accounting scheme.
[0087] Real-time balance model: Figure 2 As shown, the accounting system takes the target account as the main account, creates three types of sub-accounts for it, and then builds real-time balance models for ordinary sub-accounts, large-amount sub-accounts, and sinking sub-accounts. Among them, the real-time balance includes the available balance and the frozen balance, and the frozen balance further includes multiple frozen transaction small balances. The available balance is used in frequency increase and frequency reduction scenarios, and stores transaction funds whose final destination is not yet clear. It is the account balance precipitation fund pool. The frozen balance is used in dual-frequency scenarios, and stores transaction funds whose final destination is clear. The frozen transaction small balance is a more fine-grained frozen balance split. One transaction generates only one transaction small balance, and the frozen balance is equal to the sum of the frozen transaction small balances. Figure 2 Only the real-time balance model of ordinary sub-account 2 is shown, and the real-time balance models of other ordinary sub-accounts are similar to that of ordinary sub-account 2.
[0088] Based on the above three types of sub-account models and real-time balance models, the accounting system can use different accounting operations for different accounting requests (such as deposit requests and withdrawal requests) of different hot accounts to perform differentiated sub-account accounting schemes on different sub-accounts, thereby solving the problems of hot accounts in the prior art in terms of accounting performance, withdrawal success rate, and entry / exit timeliness. Table 1 is a sub-account routing table provided in an embodiment of the present application. As shown in Table 1, for the deposit request of the frequency-added account, a random routing strategy is used to determine that the ordinary sub-account is an accounting sub-account, and an income operation is performed on the ordinary sub-account. For the deposit request of the dual-frequency account, a random routing strategy is used to determine that the ordinary sub-account is an accounting sub-account, and an income freezing operation is performed on the ordinary sub-account. For the withdrawal request of the dual-frequency account, the original ordinary sub-account or the sinking sub-account is determined as the accounting sub-account through the original order routing strategy, and the original ordinary sub-account or the sinking sub-account is unfrozen for payment. For the outgoing request of the frequency-reduced account, the large-amount sub-account routing strategy is used to determine the large-amount sub-account as the accounting sub-account, and the expenditure operation is performed on the large-amount sub-account. The detailed process of using different accounting operations to implement differentiated sub-account accounting schemes for different accounting requests (such as entry requests and outgoing requests) of different hot accounts will be described in detail later and will not be repeated here.
[0089] Table 1
[0090]
[0091] It should be noted that after the accounting system receives the accounting request of the target account, it first determines the acceptance time of the accounting request based on the current time of the database. The time unit of the acceptance time needs to be accurate to milliseconds, usually yyyyMMddHHmmssSSS (year-month-day-hour-minute-second-millisecond). If the acceptance time is less than the effective time of the sub-account accounting plan, the main account accounting plan is executed. Otherwise, the sub-account accounting plan is executed.
[0092] The following will describe in detail a method for processing a hotspot account provided by an embodiment of the present application in conjunction with a specific implementation method. Figure 3 A flowchart of a method for processing a hotspot account provided in an embodiment of the present application, such as Figure 3 As shown, the specific steps are as follows:
[0093] Step 301: When it is detected that the target account meets the preset hotspot account conditions, multiple ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts corresponding to the target account are created, and the available balance and frozen transaction small balance in the target account are inherited to the sinking sub-account. The real-time balances of the multiple ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts include the available balance and frozen transaction small balance.
[0094] In implementation, the accounting system can detect the update frequency of the target account in real time. When it is detected that the target account meets the preset hot account conditions, it indicates that the target account is a hot account. How to set the hot account conditions is a prior art and will not be described in detail in the present application. Figure 2 As shown, the accounting system is based on the three-type sub-account model and the real-time balance model, with the target account as the main account, and creates three types of sub-accounts for it, namely ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts, and further builds real-time balance models for ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts. Among them, the real-time balance includes the available balance and the frozen balance, and the frozen balance further includes multiple frozen transaction small balances. Since the main account accounting scheme is adopted when the target account is a non-hotspot account, in order to ensure that the accounting system can perform accounting operations on the original available balance and frozen transaction small balance in the target account during the sub-account accounting process, the accounting system inherits the available balance and frozen transaction small balance in the target account to the sinking sub-account. In this way, in the sub-account accounting process, the accounting system realizes the accounting operation of the target account through the accounting operation of the sinking sub-account, ensuring the smooth transition of the target account from the main account accounting scheme to the sub-account accounting scheme.
[0095] Step 302, when the target account is a dual-frequency account, a first deposit request of the target account is received, a first ordinary sub-account is determined from multiple ordinary sub-accounts according to the first deposit request and a preset random routing strategy, and an income freezing operation is performed on the first ordinary sub-account based on the deposit amount carried in the first deposit request, so as to increase the small balance of the frozen transaction.
[0096] In implementation, when the target account is a dual-frequency account, when the accounting system receives the first entry request of the target account, the first ordinary sub-account can be determined from multiple ordinary sub-accounts according to the sub-account routing table shown in Table 1, the first entry request and the random routing strategy. Then, the accounting system can further perform an income freezing operation on the first ordinary sub-account based on the entry amount carried in the first entry request, and add a small balance of frozen transactions. In this way, firstly, the dual-frequency account solves the problem of reduced transaction success rate caused by the existing scheme 1 (current limiting scheme) through multiple ordinary sub-accounts, and solves the problem of capital loss risk caused by the existing scheme 2 (buffer scheme) and the existing scheme 3 (aggregate detailed scheme). Secondly, the dual-frequency account adopts an income freezing accounting operation for the entry request, and adds a small balance of frozen transactions to the ordinary sub-account, so that the small balance of frozen transactions in each ordinary sub-account does not need to be aggregated, which solves the problem of reduced timeliness of outgoing transactions caused by the existing scheme 4 (divide and conquer scheme). Among them, the processing process of the accounting system determining the first ordinary sub-account from multiple ordinary sub-accounts according to the first entry request and the random routing strategy will be described in detail later, and will not be repeated here.
[0097] Step 303, when the target account is a dual-band account, a first outgoing request of the target account is received, and according to the first outgoing request and a preset original order routing strategy, an original accounting subaccount and an original frozen transaction small balance corresponding to the first outgoing request are determined from multiple ordinary subaccounts and sinking subaccounts, and based on the outgoing amount carried in the first outgoing request, an unfreezing payment operation is performed on the original frozen transaction small balance of the original accounting subaccount, and the outgoing amount is deducted from the original frozen transaction small balance.
[0098] In implementation, when the target account is a dual-frequency account, when the accounting system receives the first outgoing request of the target account, the original accounting sub-account and the original frozen transaction small balance corresponding to the first outgoing request can be determined in multiple ordinary sub-accounts and sinking sub-accounts according to the sub-account routing table shown in Table 1, according to the first outgoing request and the original order routing strategy. Among them, the accounting system performs an unfreezing payment accounting operation on the original frozen transaction small balance of the original accounting sub-account based on the outgoing amount carried in the first outgoing request, and deducts the outgoing amount from the original frozen transaction small balance. In this way, when the dual-frequency account is accounted, the income freeze is used to increase the frozen transaction small balance of the ordinary sub-account, and the transaction funds are locked in the frozen transaction small balance of an ordinary sub-account. When the account is outgoing, the original frozen transaction small balance of the original accounting sub-account is specified, and the unfreezing payment is used to deduct the original frozen transaction small balance of the original accounting sub-account, and the transaction funds are also locked in the frozen transaction small balance. Since a transaction generates only one frozen transaction small balance, the competition for unlocking is infinitely weakened, and the accounting performance is improved. In addition, the small balance of frozen transactions can only be deducted by the original transaction and is completely isolated from other transactions. This means that the small balance of frozen transactions does not require real-time fund collection. The fund changes during the closed-loop transaction are stable and secure, ensuring the success rate of withdrawals under dual-frequency accounts.
[0099] Among them, the accounting system determines the processing process of the original accounting sub-account and the original frozen transaction small balance corresponding to the first outgoing request among multiple ordinary sub-accounts and sinking sub-accounts according to the first outgoing request and the preset original order routing strategy. The details will be introduced later and will not be repeated here.
[0100] As an optional implementation, the sub-account accounting scheme for the frequency-added account is as follows: when the target account is the frequency-added account, a second deposit request of the target account is received, and a second ordinary sub-account is determined from multiple ordinary sub-accounts according to the second deposit request and a preset random routing strategy. Based on the deposit amount carried in the second deposit request, the available balance of the second ordinary sub-account is deposited.
[0101] In implementation, when the target account is a frequency-added account, when the accounting system receives the second account entry request of the target account, it can determine the second ordinary sub-account from multiple ordinary sub-accounts according to the sub-account routing table shown in Table 1, the second account entry request and the random routing strategy. Then, the accounting system directly performs an account entry operation on the available balance of the second ordinary sub-account based on the account entry amount carried in the second account entry request. Since the scenario of the frequency-added account is relatively simple, there are only account entry requests and no account exit requests are involved. It is only necessary to increase the number of ordinary sub-accounts to significantly improve the accounting performance, thereby solving the problem of reduced transaction success rate caused by the existing solution one (current limiting solution). Among them, the processing process of the accounting system determining the second ordinary sub-account from multiple ordinary sub-accounts according to the second account entry request and the random routing strategy is similar to the processing process of step 302, which will not be repeated here.
[0102] As an optional implementation, the sub-account accounting scheme for the frequency-reduced account is as follows: when the target account is a frequency-reduced account, a second withdrawal request from the target account is received, and based on the withdrawal amount carried in the second withdrawal request, an withdrawal operation is performed on the available balance of the large-amount sub-account.
[0103] In implementation, when the target account is a frequency-reducing account, after the accounting system receives the second outgoing request of the target account, the large-amount subaccount can be determined as a bookkeeping account through the large-amount subaccount routing strategy according to the subaccount routing table shown in Table 1. Then, the accounting system can perform an outgoing operation on the available balance of the large-amount subaccount based on the outgoing amount carried in the second outgoing request. On the one hand, through the intelligent fund collection algorithm (which will be introduced in detail later), the available balances in each ordinary subaccount and the sinking subaccount are collected into the large-amount subaccount to ensure that there is sufficient funds and that the frequency-reducing account can use it at any time. On the other hand, the outgoing request in the dual-frequency account uses the small balance of frozen transactions in the ordinary subaccount and the sinking subaccount, and there is no need to use the large-amount subaccount for outgoing payments, which reduces the concurrency pressure on the large-amount subaccount. Overall, the transaction success rate and outgoing timeliness of the frequency-reducing account are improved, and the risk of real-time collection and fund loss is avoided.
[0104] It should be noted that in order to ensure the atomicity and consistency of the core accounting transaction process and prevent duplicate entry / exit, database transactions need to be set up, and any failure or exception during the transaction processing will cause the transaction to be rolled back. The accounting transaction process is divided into the following steps: (1) Obtaining the sub-account lock. Obtain the row-level lock of the database record corresponding to the sub-account. (2) Determine the lock time point. After the lock is successfully acquired, obtain the database system time as the lock time point. Accurate acquisition of the lock time point can ensure the accuracy of the accounting period. The accounting period includes the period of the account fund details, the period of the balance entry and exit, etc. (3) The process of fund movement. Balance adequacy check, update of available balance and frozen balance, recording of sub-account fund details, update of voucher table status, etc.
[0105] As an optional implementation, Figure 4 As shown, the detailed processing process of the accounting system determining the first ordinary sub-account from multiple ordinary sub-accounts according to the first account entry request and the preset random routing strategy is as follows.
[0106] Step 401: Determine a random allocation value corresponding to the first account entry request according to the account entry request serial number corresponding to the first account entry request and a preset random allocation algorithm.
[0107] In implementation, after receiving the first entry request of the target account, the accounting system will generate an accounting request serial number for the first entry request. The accounting request serial number is used to uniquely identify an accounting request. Then, in order to randomly assign the first entry request to any ordinary sub-account for accounting processing, the accounting system can use a preset random allocation algorithm to process the accounting request serial number of the first entry request to obtain a random allocation value corresponding to the first entry request. The random allocation algorithm can use the MD5 hash algorithm or other types of random allocation algorithms, which are not limited in the embodiments of the present application.
[0108] For example, the accounting request serial number of the first account entry request is 2023052409010000200001036001, and the random allocation algorithm adopts the MD5 hash algorithm. The randomly allocated value corresponding to the first account entry request is a hexadecimal string 1C89836A3CF5BBDF9A382255DA3CF3CC.
[0109] Step 402, based on the number of sub-accounts of the plurality of ordinary sub-accounts, the randomly assigned value is modulo processed to obtain the ordinary sub-account serial number.
[0110] In implementation, after the accounting system obtains the randomly assigned value corresponding to the first account entry request, it can perform modulo processing on the randomly assigned value based on the number of sub-accounts of the ordinary sub-account, thereby obtaining the sequence number of the ordinary sub-account that performs accounting processing for the first account entry request among all ordinary sub-accounts.
[0111] For example, the number of sub-accounts of a common sub-account is 100, and the random allocation value corresponding to the first entry request is a hexadecimal string 1C89836A3CF5BBDF9A382255DA3CF3CC. First, the accounting system converts the random allocation value corresponding to the first entry request from a hexadecimal string format to a BigDecimal format. Then, the accounting system performs a modulo process on the random allocation value corresponding to the first entry request with the number of sub-accounts of the common sub-account, 100, and the obtained common sub-account serial number is 76.
[0112] Step 403, determining the ordinary subaccount number according to the ordinary subaccount sequence number and the preset subaccount number conversion rule, and determining the first ordinary subaccount based on the ordinary subaccount number.
[0113] In implementation, after obtaining the ordinary sub-account serial number, the accounting system can convert the ordinary sub-account serial number based on the preset sub-account number conversion rule to obtain the ordinary sub-account number of the ordinary sub-account (i.e., the first ordinary sub-account) for accounting processing of the first entry request. Table 2 is the sub-account number conversion rule provided in the embodiment of the present application, as shown in Table 2.
[0114] Table 2
[0115] Splicing string 1 Splicing string 2 Splicing string 3 Splicing string 4 SUB Target Account Number A Ordinary sub-account serial number (if less than 4 digits, add 0 to the left)
[0116] For example, if the ordinary sub-account serial number is 76 and the target account number is M000000000001, then the ordinary sub-account number is SUBM000000000001A0076.
[0117] As an optional implementation, Figure 5 As shown, the detailed process of the accounting system determining the original accounting sub-account and the original frozen transaction small balance corresponding to the first payment request from multiple ordinary sub-accounts and sinking sub-accounts according to the first payment request and the preset original order routing strategy is as follows.
[0118] Step 501, in the pre-stored correspondence between the accounting voucher number, the accounting account and the frozen transaction small balance, query the target accounting account and the target frozen transaction small balance corresponding to the accounting voucher number carried in the first payment request.
[0119] In implementation, when the accounting system receives an entry request, it first generates an accounting voucher number for the entry request, and adds a small balance of frozen transactions to a common sub-account (during the sub-account accounting process) or the main account of the target account (during the main account accounting process). Among them, the accounting voucher number is used to uniquely associate a small balance of frozen transactions. Then, the accounting system can add the correspondence between the accounting voucher number, the accounting account, and the small balance of frozen transactions in the balance accounting table. Table 3 is a balance accounting table provided in an embodiment of the present application, as shown in Table 3.
[0120] Table 3
[0121]
[0122]
[0123] When the accounting system receives the first payment request of the target account, the target accounting account and the target frozen transaction small balance corresponding to the accounting voucher number carried in the first payment request can be queried from the correspondence between the accounting voucher number, the accounting account and the frozen transaction small balance.
[0124] Step 502: determine the target frozen transaction small balance as the original frozen transaction small balance corresponding to the first withdrawal request.
[0125] In implementation, after the accounting system inquires about the target frozen transaction small balance, it can directly determine the target frozen transaction small balance as the original frozen transaction small balance corresponding to the first withdrawal request.
[0126] Step 503: If the target accounting account is the primary account of the target account, the sinking sub-account of the target account is determined as the original accounting sub-account corresponding to the first payment request.
[0127] In practice, since the small balance of frozen transactions in the target account has been inherited to the target account's sub-account, after the accounting system inquires about the target bookkeeping account, if the target bookkeeping account is the target account's main account, the target account's sub-account is determined as the original bookkeeping sub-account corresponding to the first outgoing request.
[0128] Step 504: If the target accounting account is a common sub-account of the target account, the target accounting account is determined to be the original accounting sub-account corresponding to the first payment request.
[0129] In implementation, after the accounting system inquires about the target accounting account, if the target accounting account is a common sub-account of the target account, the target accounting account can be directly determined as the original accounting sub-account corresponding to the first payment request.
[0130] As an optional implementation, the present application also provides an intelligent fund collection method, such as Figure 6As shown, the processing steps of the intelligent fund collection method are as follows.
[0131] Step 601, obtain the historical payment sequence and current available balance of the large amount sub-account, wherein the historical payment sequence includes the historical payment time and the historical payment amount.
[0132] In implementation, the intelligent fund collection method adopted in this application collects a large amount of data on the available balance and the amount of withdrawal in the frequency reduction scenario of large-amount sub-accounts over a continuous period of historical time to analyze its data characteristics and changing trends, and then determine the fund collection time of large-amount sub-accounts. Based on this, the accounting system needs to obtain the historical withdrawal sequence and current available balance of large-amount sub-accounts. Among them, the historical withdrawal sequence includes the historical withdrawal time and the historical withdrawal amount, and the historical withdrawal amount is the withdrawal amount within 1s corresponding to the historical withdrawal time. For example, the historical withdrawal sequence is {[Th1, Fh1], [Th2, Fh2], [Th3, Fh3]…[Thn, Fhn]}.
[0133] Step 602: Determine the future payment sequence based on the historical payment sequence and the preset intelligent prediction algorithm, wherein the future payment sequence includes the future payment time and the future payment amount.
[0134] In implementation, after the accounting system obtains the historical payment sequence of the large-amount sub-account, it can determine the future payment sequence based on the historical payment sequence and the intelligent prediction algorithm. Among them, the future payment sequence includes the future payment time and the future payment amount, and the future payment amount is the payment amount within 1s corresponding to the future payment time. The intelligent prediction algorithm can select the Arima time series prediction algorithm, or other types of intelligent prediction algorithms, which are not limited in the embodiments of this application. For example, the future payment sequence is {[Tv1, Fv1], [Tv2, Fv2], [Tv3, Fv3]…[Tvn, Fvn]}.
[0135] Optionally, firstly, the sequence THL={Th1, Th2, Th3…Thn} formed by the historical payment time Th and the sequence FHL={Fh1, Fh2, Fh3, …, Fhn} formed by the historical payment amount Fh are firstly differentiated, and the difference between two adjacent values is calculated to obtain the time difference sequence THD={Th2-Th1, Th3-Th2, …, Thn-Thn-1} and the amount difference sequence FHD={Fh2-Fh1, Fh3-Fh2, …, Fhn-Fhn-1}. Then, the autocorrelation coefficient is calculated for the difference sequence, and the relationship between the current value and the historical value is mined through autocorrelation analysis to identify potential periodic characteristics. Afterwards, for the transaction time, the ratio of the current value to the historical value, the ratio of the same period value of different periods, and the ratio of the different period values of the same period are constructed according to the periodic characteristics, and the linear regression algorithm is used to fit the trend, and then the next transaction time Tv is predicted. Finally, for the outgoing amount, the mean, median, standard deviation, skewness and kurtosis in each sliding window are calculated according to the periodic characteristics, and then the autoregressive moving average algorithm (Arima) is used to predict the next outgoing amount Fv.
[0136] Step 603, for each future payment time, determine the remaining balance of the large-amount sub-account corresponding to the future payment time according to the current available balance and the future payment sequence.
[0137] In practice, after the accounting system determines the future payment sequence, it can determine the remaining balance of the large-amount sub-account at each future payment moment based on the current available balance and the future payment sequence. The formula for the accounting system to determine the remaining balance of the large-amount sub-account at the future payment moment based on the current available balance and the future payment sequence is:
[0138] D[t]=Aa-Fv[T]-Fv[T+1]-…-Fv[t-1];
[0139] Wherein, D[t] represents the remaining balance of the large-amount sub-account at the future payment time t, Aa represents the current available balance of the large-amount sub-account, Fv[t-1] represents the future payment amount corresponding to the future payment time t-1 in the future payment sequence, t=[T+1, T+10s], and T represents the current time.
[0140] Step 604: if the remaining balance of the large-amount sub-account at the future payment time is less than or equal to the product of the preset aggregation coefficient and the future payment amount corresponding to the future payment time in the future payment sequence, the available balances in the multiple ordinary sub-accounts and the sinking sub-accounts of the target account are aggregated into the large-amount sub-account.
[0141] In implementation, if the remaining balance of the large-amount sub-account at the future payment time is less than or equal to the product of the preset collection coefficient and the future payment amount corresponding to the future payment time in the future payment sequence (i.e., D[t] <= collection coefficient × Fv[t], where D[t] represents the remaining balance of the large-amount sub-account at the future payment time t, and Fv[t] represents the future payment amount corresponding to the future payment time t in the future payment sequence), it means that the funds in the large-amount sub-account are insufficient, and the current available balance in the large-amount sub-account cannot meet the future payment needs, and funds need to be collected. At this time, the accounting system can collect the available balances in multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account. In this way, the intelligent fund collection method avoids the adverse effects of real-time fund collection on the frequency-reducing account.
[0142] As an optional implementation, in order to ensure the stability of accounting transactions of large-value sub-accounts, the accounting system may perform the following processing on the large-value sub-accounts before aggregating the available balances in multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-value sub-accounts.
[0143] Step 1: Get the first current QPS of the large sub-account.
[0144] In implementation, the accounting system obtains the first current QPS of the large-amount sub-account, where the first current QPS is the total number of accounting transactions of the large-amount sub-account from the current time T to T+1.
[0145] Step 2: If the first current QPS is less than the preset first QPS threshold, execute the step of aggregating the available balances in multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account; otherwise, cancel the step of aggregating the available balances in multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account.
[0146] In implementation, if the first current QPS is less than the preset first QPS threshold, it means that the number of accounting transactions currently processed by the large-amount sub-account is small, and the fund collection will not affect the stability of the accounting affairs of the large-amount sub-account. At this time, the accounting system can collect the available balances in multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account. On the contrary, it means that the number of accounting transactions currently processed by the large-amount sub-account is large, and the fund collection will affect the stability of the accounting affairs of the large-amount sub-account. At this time, the accounting system can cancel the collection of the available balances in multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account.
[0147] As an optional implementation, in order to ensure the stability of accounting transactions of ordinary sub-accounts, the accounting system may perform the following processing on ordinary sub-accounts before aggregating the available balances in multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account.
[0148] Step 1: Get the second current QPS of multiple common sub-accounts.
[0149] In implementation, the accounting system obtains the second current QPS of each common sub-account, where the second current QPS is the total number of accounting transactions of the common sub-account from the current time T to T+1.
[0150] Step 2: If there is a third ordinary sub-account among the multiple ordinary sub-accounts whose second current QPS is greater than or equal to the preset second QPS threshold, the available balances in the other ordinary sub-accounts and sinking sub-accounts among the multiple ordinary sub-accounts of the target account except the third ordinary sub-account are aggregated into the large-amount sub-account; otherwise, the step of aggregating the available balances in the multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account is executed.
[0151] In implementation, if there is a third ordinary sub-account among multiple ordinary sub-accounts whose second current QPS is greater than or equal to the preset second QPS threshold, it means that the third ordinary sub-account currently processes a large number of accounting transactions, and fund collection will affect the stability of the accounting affairs of the third ordinary sub-account. At this time, the accounting system can collect the available balances in other ordinary sub-accounts and sinking sub-accounts of the target account's multiple ordinary sub-accounts except the third ordinary sub-account into the large-amount sub-account. Conversely, the accounting system can collect the available balances in all ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account.
[0152] It should be understood that although Figures 3 to 6 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, Figures 3 to 6 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0153] It can be understood that the same / similar parts between the various embodiments of the above method in this specification can refer to each other, and each embodiment focuses on the differences from other embodiments. For related points, please refer to the description of other method embodiments.
[0154] The present application also provides a processing device for hotspot accounts, such as Figure 7 As shown, the device comprises:
[0155] The creation module 710 is used to create a plurality of ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts corresponding to the target account when it is detected that the target account meets the preset hot account condition, and inherit the available balance and the small balance of frozen transactions in the target account to the sinking sub-account; the real-time balances of the plurality of ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts include the available balance and the small balance of frozen transactions;
[0156] The first account entry module 720 is used to receive a first account entry request of the target account when the target account is a dual-frequency account, determine a first ordinary sub-account from multiple ordinary sub-accounts according to the first account entry request and a preset random routing strategy, and perform an income freezing operation on the first ordinary sub-account based on the account entry amount carried in the first account entry request, and increase the frozen transaction small balance;
[0157] The first payment module 730 is used to receive a first payment request of the target account when the target account is a dual-frequency account, determine the original accounting sub-account and the original frozen transaction small balance corresponding to the first payment request from multiple ordinary sub-accounts and sinking sub-accounts according to the first payment request and a preset original order routing strategy, and perform an unfreezing payment operation on the original frozen transaction small balance of the original accounting sub-account based on the payment amount carried in the first payment request, and deduct the payment amount from the original frozen transaction small balance.
[0158] As an optional implementation, the device further includes:
[0159] A first determination module is used to receive a second deposit request from the target account when the target account is a frequency-added account, and determine a second ordinary sub-account from a plurality of ordinary sub-accounts according to the second deposit request and a preset random routing strategy;
[0160] The second account entry module is used to perform an account entry operation on the available balance of the second general sub-account based on the account entry amount carried in the second account entry request.
[0161] As an optional implementation, the device further includes:
[0162] The second payment module is used to receive a second payment request from the target account when the target account is a frequency-reducing account, and perform a payment operation on the available balance of the large-amount sub-account based on the payment amount carried in the second payment request.
[0163] As an optional implementation, the first account entry module specifically includes:
[0164] Determine a random allocation value corresponding to the first account entry request according to the account entry request serial number corresponding to the first account entry request and a preset random allocation algorithm;
[0165] Based on the number of sub-accounts of multiple ordinary sub-accounts, the randomly assigned value is modulo processed to obtain the ordinary sub-account serial number;
[0166] The ordinary sub-account number is determined according to the ordinary sub-account sequence number and the preset sub-account number conversion rule, and the first ordinary sub-account is determined based on the ordinary sub-account number.
[0167] As an optional implementation, the first payment module specifically includes:
[0168] In the pre-stored correspondence between the accounting voucher number, the accounting account and the frozen transaction small balance, query the target accounting account and the target frozen transaction small balance corresponding to the accounting voucher number carried in the first payment request;
[0169] The target frozen transaction small balance is determined to be the original frozen transaction small balance corresponding to the first withdrawal request;
[0170] If the target accounting account is the main account of the target account, the sinking sub-account of the target account is determined as the original accounting sub-account corresponding to the first payment request;
[0171] If the target accounting account is a common sub-account of the target account, the target accounting account is determined to be the original accounting sub-account corresponding to the first payment request.
[0172] As an optional implementation, the device further includes:
[0173] The first acquisition module is used to obtain the historical payment sequence and current available balance of the large-amount sub-account; the historical payment sequence includes the historical payment time and the historical payment amount;
[0174] The second determination module is used to determine the future payment sequence according to the historical payment sequence and the preset intelligent prediction algorithm; the future payment sequence includes the future payment time and the future payment amount;
[0175] A third determination module is used to determine, for each future payment time, the remaining balance of the large-amount sub-account corresponding to the future payment time according to the current available balance and the future payment sequence;
[0176] The first aggregation module is used to aggregate the available balances in multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account if the remaining balance of the large-amount sub-account corresponding to the future payment time is less than or equal to the product of a preset aggregation coefficient and the future payment amount corresponding to the future payment time in the future payment sequence.
[0177] As an optional implementation, the device further includes:
[0178] The second acquisition module is used to obtain the first current QPS of the large-amount sub-account;
[0179] The cancellation module is used to trigger the first collection module to execute the step of collecting the available balances in multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account if the first current QPS is less than the preset first QPS threshold; otherwise, cancel the step of collecting the available balances in multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account.
[0180] As an optional implementation, the device further includes:
[0181] A third acquisition module is used to acquire the second current QPS of multiple common sub-accounts;
[0182] The second collection module is used to collect the available balances in the other ordinary sub-accounts and the sinking sub-accounts of the target account except the third ordinary sub-account among the multiple ordinary sub-accounts into the large-amount sub-account if there is a third ordinary sub-account among the multiple ordinary sub-accounts whose second current QPS is greater than or equal to the preset second QPS threshold; otherwise, trigger the first collection module to execute the step of collecting the available balances in the multiple ordinary sub-accounts and the sinking sub-accounts of the target account into the large-amount sub-account.
[0183] For the specific definition of the processing device of the hotspot account, please refer to the definition of the processing method of the hotspot account above, which will not be repeated here. Each module in the above-mentioned processing device of the hotspot account can be implemented in whole or in part by software, hardware and a combination thereof. 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.
[0184] In one embodiment, a computer device is provided, such as Figure 8 As shown, it includes a memory and a processor, the memory stores a computer program that can be run on the processor, and the processor implements the steps of the above-mentioned hotspot account processing method when executing the computer program.
[0185] In one embodiment, a computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the hotspot account processing method described above.
[0186] 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).
[0187] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0188] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0189] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0190] 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.
[0191] 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 processing a hotspot account, characterized in that: The method comprises: When it is detected that the target account meets the preset hot account conditions, multiple ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts corresponding to the target account are created, and the available balance and frozen transaction small balance in the target account are inherited to the sinking sub-account; the real-time balances of the multiple ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts include the available balance and frozen transaction small balance; In the case where the target account is a dual-band account, receiving a first deposit request of the target account, determining a first ordinary sub-account from the plurality of ordinary sub-accounts according to the first deposit request and a preset random routing strategy, and performing an income freezing operation on the first ordinary sub-account based on the deposit amount carried in the first deposit request, and adding a small balance of frozen transactions; In the case where the target account is a dual-band account, receiving a first payment request of the target account, determining, according to the first payment request and a preset original order routing strategy, an original accounting subaccount and an original frozen transaction small balance corresponding to the first payment request from among the multiple common subaccounts and the sinking subaccounts, and performing an unfreezing payment operation on the original frozen transaction small balance of the original accounting subaccount based on the payment amount carried in the first payment request, and deducting the payment amount from the original frozen transaction small balance; The determining, according to the first payment request and the preset original order routing strategy, the original accounting subaccount and the original frozen transaction small balance corresponding to the first payment request from among the plurality of ordinary subaccounts and the sinking subaccounts includes: In the pre-stored correspondence between the accounting voucher number, the accounting account and the frozen transaction small balance, query the target accounting account and the target frozen transaction small balance corresponding to the accounting voucher number carried in the first payment request; Determine the target frozen transaction small balance as the original frozen transaction small balance corresponding to the first withdrawal request; If the target accounting account is the primary account of the target account, determining the sinking sub-account of the target account as the original accounting sub-account corresponding to the first payment request; If the target accounting account is a common sub-account of the target account, the target accounting account is determined to be the original accounting sub-account corresponding to the first payment request.
2. The method according to claim 1, characterized in that The method further comprises: In the case where the target account is a frequency-added account, receiving a second deposit request from the target account, and determining a second ordinary sub-account from the plurality of ordinary sub-accounts according to the second deposit request and a preset random routing strategy; Based on the deposit amount carried in the second deposit request, a deposit operation is performed on the available balance of the second general sub-account.
3. The method according to claim 1, characterized in that The method further comprises: In the case that the target account is a frequency-reduced account, a second withdrawal request of the target account is received, and based on the withdrawal amount carried in the second withdrawal request, a withdrawal operation is performed on the available balance of the large-amount sub-account.
4. The method according to claim 1, characterized in that: The determining, according to the first account entry request and a preset random routing strategy, a first common sub-account from the plurality of common sub-accounts includes: Determine a random allocation value corresponding to the first account entry request according to the account entry request serial number corresponding to the first account entry request and a preset random allocation algorithm; Based on the number of sub-accounts of the plurality of ordinary sub-accounts, the randomly assigned value is subjected to a modulo process to obtain an ordinary sub-account sequence number; The ordinary subaccount number is determined according to the ordinary subaccount sequence number and a preset subaccount number conversion rule, and the first ordinary subaccount is determined based on the ordinary subaccount number.
5. The method according to claim 1, characterized in that The method further comprises: Obtain the historical payment sequence and current available balance of the large-amount sub-account; the historical payment sequence includes historical payment time and historical payment amount; Determine a future payment sequence based on the historical payment sequence and a preset intelligent prediction algorithm; the future payment sequence includes future payment times and future payment amounts; For each future payment time, determining the remaining balance of the large-amount sub-account corresponding to the future payment time according to the current available balance and the future payment sequence; If the remaining balance of the large-value sub-account corresponding to the future payment time is less than or equal to the product of a preset aggregation coefficient and the future payment amount corresponding to the future payment time in the future payment sequence, the available balances in the multiple ordinary sub-accounts and the sinking sub-accounts of the target account are aggregated into the large-value sub-account.
6. The method according to claim 5, characterized in that According to the current available balance and the future payment sequence, the formula for determining the remaining balance of the large-amount sub-account at the future payment time is: D[t]=Aa-Fv[T]-Fv[T+1]-...-Fv[t-1]; Wherein, D[t] represents the remaining balance of the large-amount sub-account at the future payment time t, Aa represents the current available balance of the large-amount sub-account, Fv[t-1] represents the future payment amount corresponding to the future payment time t-1 in the future payment sequence, t=[T+1s, T+10s], and T represents the current time.
7. The method according to claim 5, characterized in that Before aggregating the available balances in the plurality of ordinary sub-accounts and the sinking sub-accounts of the target account into the large-amount sub-account, the method further includes: Get the first current QPS of the large amount sub-account; If the first current QPS is less than the preset first QPS threshold, the step of aggregating the available balances in the multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account is executed; otherwise, the step of aggregating the available balances in the multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account is canceled.
8. The method according to claim 5, characterized in that Before aggregating the available balances in the plurality of ordinary sub-accounts and the sinking sub-accounts of the target account into the large-amount sub-account, the method further includes: Obtaining the second current QPS of the plurality of common sub-accounts; If there is a third ordinary sub-account among the multiple ordinary sub-accounts whose second current QPS is greater than or equal to the preset second QPS threshold, the available balances in the other ordinary sub-accounts and sinking sub-accounts among the multiple ordinary sub-accounts of the target account except the third ordinary sub-account are aggregated into the large-amount sub-account; otherwise, the step of aggregating the available balances in the multiple ordinary sub-accounts and sinking sub-accounts of the target account into the large-amount sub-account is executed.
9. A hotspot account processing device, characterized in that: The device comprises: A creation module, for creating a plurality of ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts corresponding to the target account when it is detected that the target account meets the preset hot account condition, and inheriting the available balance and the small balance of frozen transactions in the target account to the sinking sub-account; the real-time balances of the plurality of ordinary sub-accounts, large-amount sub-accounts and sinking sub-accounts include the available balance and the small balance of frozen transactions; a first account entry module, configured to receive a first account entry request of the target account when the target account is a dual-frequency account, determine a first ordinary sub-account from the plurality of ordinary sub-accounts according to the first account entry request and a preset random routing strategy, and perform an income freezing operation on the first ordinary sub-account based on the account entry amount carried in the first account entry request, and increase a small balance of a frozen transaction; A first payment module is configured to receive a first payment request from the target account when the target account is a dual-frequency account, and determine, according to the first payment request and a preset original order routing strategy, an original accounting subaccount and an original frozen transaction small balance corresponding to the first payment request from among the multiple ordinary subaccounts and the sinking subaccounts, and perform an unfreezing payment operation on the original frozen transaction small balance of the original accounting subaccount based on the payment amount carried in the first payment request, and deduct the payment amount from the original frozen transaction small balance; wherein, according to the first payment request and a preset original order routing strategy, determine, among the multiple ordinary subaccounts and the sinking subaccounts, an original accounting subaccount and an original frozen transaction small balance corresponding to the first payment request The method comprises: searching for a target accounting account and a target frozen transaction small balance corresponding to the accounting voucher number carried in the first payment request in a pre-stored correspondence relationship among the accounting voucher number, the accounting account and the frozen transaction small balance; determining the target frozen transaction small balance as the original frozen transaction small balance corresponding to the first payment request; if the target accounting account is the main account of the target account, determining the sinking sub-account of the target account as the original accounting sub-account corresponding to the first payment request; if the target accounting account is a common sub-account of the target account, determining the target accounting account as the original accounting sub-account corresponding to the first payment request.
Citation Information
Patent Citations
Hotspot account data updating method and device, server and storage medium
CN110928565A
Hotspot account accounting method
CN112381537A