Hotspot account balance monitoring method and device and electronic equipment
By setting shadow accounts and liquid level calculation methods for hot accounts to monitor balance changes, the transaction stability and balance control problems of hot accounts in high concurrency scenarios are solved, and effective warning and supplementation of balance changes are achieved, avoiding overdrafts and transactions fail.
Patent Information
- Application Number
- CN202411419610.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-07
AI Technical Summary
Hot accounts are prone to transaction timeouts or blockages in high concurrency scenarios, and it is difficult for existing technology to effectively control account balance overdrafts and risk warnings.
By setting up N shadow accounts for hot accounts and filtering out appropriate target accounts based on the initial water level for accounting processing, the liquid level calculation method is used to monitor the balance changes, and if it is lower than the warning threshold, the water level is replenished to avoid overdrafts and transaction failures.
It effectively avoids overdraft of hot account balances, realizes risk warnings for balance changes, and improves the stability and payment ability of the system.
Smart Images

Figure CN119273341A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a hotspot account balance monitoring method, device and electronic equipment. Background Art
[0002] In the banking industry, there are often batch collection and payment operations of a single account. Due to the large number of transactions in a short period of time, transaction timeouts or blockages are often caused in performance bottlenecks or improperly designed systems. Accounts that include such scenarios are called hot accounts. There are many studies and solutions for hot accounts, which strive to increase system throughput, reduce system errors, and control system financial risks. The above three conditions need to be met, and the design of hot accounts is a very high requirement. Summary of the invention
[0003] The present application embodiment provides a hotspot account balance monitoring method, and the relevant technical solutions are as follows:
[0004] In a first aspect, an embodiment of the present application provides a method for monitoring the balance of a hotspot account, including:
[0005] Get account operation requests for hotspot accounts;
[0006] If the account operation request is an outgoing request, then according to the current business scenario, N shadow accounts are set for the hotspot account, and an initial water level is set for each shadow account, where the initial water level is used to represent the initial total balance of the corresponding shadow account, and N is a positive integer;
[0007] Filtering out at least one account from the N shadow accounts, and determining a target account for executing the withdrawal request from the at least one account, wherein an initial water level corresponding to each account in the at least one account is greater than an amount corresponding to the withdrawal request;
[0008] Allocating the payment request to the target account for payment processing;
[0009] By means of a liquid level calculation method, the water level change of the target account before and after the payment processing is monitored to make an early warning judgment on the corresponding balance, and the water level change is used to characterize the total balance change of the target account.
[0010] In one possible implementation, the monitoring of the water level change of the target account before and after the payment processing by the liquid level calculation method includes:
[0011] Determine the current water level of the target account after the outgoing transaction, where the current water level is used to represent the current total balance of the target account after the outgoing transaction;
[0012] Determining a difference between the current water level and the corresponding initial water level, and a product of a liquid density multiplied by an adjustment factor, the liquid density being a ratio of a total balance of the hotspot account to N;
[0013] The water level change of the target account is determined according to the ratio between the difference and the product.
[0014] In one possible implementation manner, after determining the water level change of the target account according to the ratio between the difference and the product, the method further includes:
[0015] If the change in the water level of the target account indicates that the current water level is lower than the warning threshold, the water level is replenished to the warning threshold.
[0016] In one possible implementation, selecting at least one account from the N shadow accounts and determining a target account for executing the withdrawal request from the at least one account includes:
[0017] Sort the initial water level corresponding to each shadow account in the N shadow accounts in descending order;
[0018] Filter out at least one account from the N shadow accounts whose corresponding initial water level is greater than the amount corresponding to the withdrawal request;
[0019] An account randomly selected from the at least one account is used as a target account for executing the withdrawal request.
[0020] In a second aspect, the embodiment of the present application further provides a balance monitoring device for a hotspot account, including:
[0021] An acquisition unit, used to acquire an account operation request for a hotspot account;
[0022] A setting unit, configured to, if the account operation request is an outgoing request, set N shadow accounts for the hotspot account according to the current business scenario, and set an initial water level for each shadow account, wherein the initial water level is used to represent the initial total balance of the corresponding shadow account, and N is a positive integer;
[0023] a screening unit, configured to screen out at least one account from the N shadow accounts, and determine a target account for executing the withdrawal request from the at least one account, wherein an initial water level corresponding to each account in the at least one account is greater than an amount corresponding to the account operation request;
[0024] An outgoing payment processing unit, configured to allocate the outgoing payment request to the target account for outgoing payment processing;
[0025] The monitoring unit is used to monitor the water level change of the target account before and after the payment processing through a liquid level calculation method to make an early warning judgment on the corresponding balance, and the water level change is used to represent the total balance change of the target account.
[0026] In one possible implementation manner, the monitoring unit is used to:
[0027] Determine the current water level of the target account after the outgoing transaction, where the current water level is used to represent the current total balance of the target account after the outgoing transaction;
[0028] Determining a difference between the current water level and the corresponding initial water level, and a product of a liquid density multiplied by an adjustment factor, the liquid density being a ratio of a total balance of the hotspot account to N;
[0029] The water level change of the target account is determined according to the ratio between the difference and the product.
[0030] In one possible implementation manner, after the monitoring unit determines the water level change of the target account according to the ratio between the difference and the product, the device further includes a supplementing unit, wherein the supplementing unit is configured to:
[0031] If the change in the water level of the target account indicates that the current water level is lower than the warning threshold, the water level is replenished to the warning threshold.
[0032] In one possible implementation manner, the screening unit is specifically used for:
[0033] Sort the initial water level corresponding to each shadow account in the N shadow accounts in descending order;
[0034] Filter out at least one account from the N shadow accounts whose corresponding initial water level is greater than the amount corresponding to the account operation request;
[0035] An account randomly selected from the at least one account is used as a target account for executing the withdrawal request.
[0036] In a third aspect, an embodiment of the present application further provides an electronic device, including:
[0037] Memory, used to store computer programs;
[0038] The processor is used to implement any of the method steps described above when executing the computer program stored in the memory.
[0039] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to enable a computer to execute any of the method steps described above.
[0040] In a fifth aspect, an embodiment of the present application further provides a computer program product, which includes: a computer program code, and when the computer program code runs on a computer, the computer executes any one of the methods described above.
[0041] The beneficial effects of the embodiments of the present application are as follows:
[0042] The embodiment of the present application provides a balance monitoring method, device and electronic device for a hotspot account, wherein, first, an account operation request for the hotspot account is obtained; if the account operation request is a withdrawal request, N shadow accounts are set for the hotspot account according to the current business scenario, and the initial water level is set for each shadow account, wherein the initial water level is used to characterize the initial total amount of the corresponding shadow account. That is, when the account operation request is a withdrawal request, N shadow accounts can be set for the hotspot account according to the current business scenario, and the initial total amount of each shadow account can be set. Then, at least one account whose initial water level is greater than the amount corresponding to the withdrawal request can be screened out from the N shadow accounts; then, a target account for executing the withdrawal request is determined from at least one account. In this case, the initial total amount of the target account for executing the withdrawal request is greater than the amount corresponding to the withdrawal request. Then, the withdrawal request can be assigned to the target account, and the withdrawal processing is performed by the target account. In this way, the overdraft problem of the balance of the hotspot account is avoided.
[0043] In addition, the liquid level calculation method can be used to monitor the water level changes of the target account before and after the payment processing to make early warning judgments on the corresponding balances. In this way, early warning prompts for changes in the balance water level are achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A method flow chart of a hotspot account balance monitoring method provided in an embodiment of the present application;
[0045] Figure 2 Figure 1 The method flow chart of step S105;
[0046] Figure 3 for Figure 1 The method flow chart of step S103;
[0047] Figure 4 A schematic diagram of a structure of a hotspot account balance monitoring device provided in an embodiment of the present application;
[0048] Figure 5 A schematic diagram of a structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0050] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0051] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0052] In the technical solution of this application, the acquisition, transmission, storage, and use of data are in compliance with the requirements of relevant national laws and regulations.
[0053] In related technologies, hot accounts are often managed using asynchronous updates. The main problems are checking whether the account balance is sufficient and the updated for update row lock causing transactions to wait in series. Specifically, the asynchronous method converts the for update row lock into an insert operation and converts the balance statistics into the sum of pending insert transaction records. However, this operation cannot guarantee that the balance is always sufficient in the payment scenario. In other words, there is not only a lack of overdraft control over the balance, but also a lack of risk warnings for balance changes.
[0054] In view of this, the present application provides a hotspot account balance monitoring method, device and electronic device, which are used to avoid overdraft of the hotspot account balance while taking into account the risk warning of balance changes.
[0055] Before introducing a hotspot account balance monitoring method provided by the embodiment of the present application, first, a brief explanation of the hotspot account and shadow account involved in the embodiment of the application is given. A hotspot account is an account with a balance update. For example, account A is a hotspot account, and its corresponding shadow account needs to meet the following rules:
[0056] 1) The sum of all shadow account balances equals the balance of account A;
[0057] 2) The shadow account balance is not included in the account balance;
[0058] 3) The balance of account A is not updated in real time, while the balance of the shadow account is updated in real time.
[0059] Account A and its corresponding shadow account satisfy the characteristics of real parent and virtual child. In other words, the balance of account A is reflected in the account balance and finally reflected in the balance sheet, while the shadow account is not reflected in the account balance and balance sheet. During the transaction of hot accounts, the shadow account balance is updated in real time, and all shadow account balances are synchronized to the account balance asynchronously and non-real time.
[0060] As shown in Table 1, after all shadow accounts evenly distribute the balance of account A (actually the parent account), a random number hash method can be used to allocate and select the accounting shadow account, that is, select one for transaction accounting. For example, account A is a credit account, and a debit transaction of 50 yuan occurs. A random number, such as 32, is used to deduct the transaction from the A32 shadow account. After the 50 yuan deduction from the A32 shadow account, the balance is 50 yuan. This random deduction method cannot guarantee that the random shadow account has sufficient balance. For example, if a debit transaction of 101 yuan occurs, the balance of the A32 shadow account is 100 yuan, which does not meet the transaction and generates an overdraft, which will lead to transaction financial risks.
[0061] Account Balance (Yuan) characteristic A 10000 Mother Household A1 100 Shadow Accounts A2 100 Shadow Accounts …… …… …… A100 100 Shadow Accounts
[0062] Table 1
[0063] like Figure 1 As shown, the embodiment of the present application provides a balance monitoring method for a hotspot account, including:
[0064] S101: Obtaining an account operation request for a hotspot account;
[0065] Exemplarily, the account operation request may be an outgoing request or an incoming request.
[0066] S102: If the account operation request is an outgoing request, N shadow accounts are set for the hotspot account according to the current business scenario, and an initial water level is set for each shadow account, where the initial water level is used to represent the initial total balance of the corresponding shadow account, and N is a positive integer;
[0067] In the specific implementation process, if the account operation request is an outgoing request, N shadow accounts can be set for the hotspot account according to the current business scenario. That is to say, when the account operation request for the hotspot account is an outgoing request, a corresponding number of shadow accounts can be set for the hotspot account according to the current business scenario. In addition, the initial water level can be set for each shadow account, and the initial water level is used to characterize the initial total amount of the corresponding shadow account. Of course, the specific value of N can be set according to the actual application needs, and is not limited here. For example, for the merchant's small payment scenario, if all transactions of a merchant do not exceed 100 yuan, the actual funds can be evenly distributed, the peak transaction is 10,000 transactions per second, the single account single transaction is 100ms, and the single account tps is 10, then at least 1,000 shadow accounts are required; in actual applications, in order to meet the maximum peak and have a redundant design, 1,500 shadow accounts can be set; the balance of each shadow account can meet at least 10 transaction payments, then the initial water level of the single account is at least 1,000 yuan, and the initial water level of the hotspot account can be set according to the parent account balance.
[0068] S103: Filter out at least one account from the N shadow accounts, and determine a target account for executing the withdrawal request from the at least one account, wherein the initial water level corresponding to each account in the at least one account is greater than the amount corresponding to the withdrawal request;
[0069] In the specific implementation process, at least one account whose initial water level corresponding to each account is greater than the withdrawal request can be screened out from the N shadow accounts, wherein the at least one account can be one or more, which is not limited here. Moreover, the target account for executing the withdrawal request can also be determined from the at least one account. Exemplarily, an account can be randomly selected as the target account from the at least one account that satisfies the withdrawal request, and the withdrawal request can be executed. In this way, the problem of overdraft of the shadow account is avoided.
[0070] S104: Allocating the payment request to the target account for payment processing;
[0071] S105: Monitoring the change in the water level of the target account before and after the payment processing by means of a liquid level calculation method, so as to make an early warning judgment on the corresponding balance, wherein the change in the water level is used to characterize the change in the total balance of the target account.
[0072] In the specific implementation process, the liquid level calculation method can be used to monitor the water level changes of the target account before and after the withdrawal process to make early warning judgments on the corresponding balances. In other words, the liquid level calculation method can be used to effectively warn of the balance water level changes, avoiding the risk of amount transactions.
[0073] In the embodiments of the present application, Figure 2 As shown, step S105: monitoring the water level change of the target account before and after the payment processing by the liquid level calculation method, including:
[0074] S201: Determine the current water level of the target account after the outgoing transaction, where the current water level is used to represent the current total balance of the target account after the outgoing transaction;
[0075] S202: Determine the difference between the current water level and the corresponding initial water level, and the product of liquid density multiplied by an adjustment factor, wherein the liquid density is a ratio between the total balance of the hotspot account and N;
[0076] S203: Determine the water level change of the target account according to the ratio between the difference and the product.
[0077] In the specific implementation process, the specific implementation process of step S201 to step S203 is as follows:
[0078] First, the liquid level calculation method in the embodiment of the present application is explained. The inventors found in actual research that the conventional calculation formula for the change in liquid level height can be applied to the change in the balance of the shadow account. Among them, the conventional calculation method for the change in liquid level height is a calculation method for calculating the liquid level height by the pressure signal measured by the pressure sensor. In the embodiment of the present application, the scale corresponding to the balance of the shadow account can be equivalent to the liquid level height, and the change in the balance before and after the shadow account is withdrawn can be equivalent to the height change of the liquid level. In practical applications, when the liquid level of the shadow account drops, through the liquid level calculation method, it can be known how much the liquid level has dropped, which account has dropped below the safe water level, which account is still far from the warning water level, and which one can no longer meet the minimum payment requirements and needs to be recharged first. When funds are needed, funds can be withdrawn from which accounts without affecting external payments, thereby ensuring payment requirements. In addition, there is no way to meet payment requirements with a simple amount dimension. For example, if the shadow account balance is 100,000, how many times 100,000 can meet the payment requirements is lacking quantification. The number of units by which the current water level has dropped compared to the initial water level can be accurately obtained through the liquid level calculation method. In the embodiment of the present application, the balance change problem of the shadow account is equivalent to the water level change problem, which can effectively avoid overdraft problems and transaction failure problems, and effectively supplement the situation of insufficient balance. The water level can also be compared to the air pressure of the car. It is necessary to master the overall tire pressure of the car, reduce the tire pressure when the tire pressure is too high, and supplement the tire pressure when the tire pressure is too low. At the same time, it is also necessary to know how much to supplement. For example, more in winter, less in summer, and so on.
[0079] Based on such an inventive concept, the liquid level calculation method in the embodiment of the present application may adopt the following formula:
[0080] h=(P-P0) / ρg;
[0081] Among them, h represents the difference between the current water level of the target account after the outgoing transaction and the initial water level, P represents the current water level of the target account after the outgoing transaction, P0 represents the initial water level of the target account, ρ represents the liquid density. Specifically, the liquid density can be the ratio of the total balance of the hotspot account to N, and g represents the adjustment factor.
[0082] It should be noted that in actual applications, the specific value of the adjustment factor can be set as needed, and there is no limitation here. Through the liquid level calculation method, scale measurement can be used to effectively calculate the water level change of a single shadow account. The biggest advantage of scale measurement is that it can be measured accurately and intuitively. For example, the initial water level of the shadow account corresponds to 10 scales, and after the account is issued, it drops by 5 scales.
[0083] Specifically, based on the liquid level calculation method, the current water level of the target account after the outgoing payment is determined, and the current water level is used to represent the current total amount of the target account after the outgoing payment is processed. Then, the difference between the current water level and the corresponding initial water level, and the product of the liquid density and the adjustment factor are determined, wherein the liquid density is the ratio between the total amount of the hotspot account and N; then, according to the ratio between the difference and the product, the water level change of the target account is determined.
[0084] For example, for shadow account A1, P0=1000, P=4000, ρ=100, g=10, then h=(P-P0) / ρg=-6, indicating that the current water level has dropped by 6 basic scales compared to the initial water level, one of which is 1000.
[0085] In the embodiment of the present application, after step S203: determining the water level change of the target account according to the ratio between the difference and the product, the method further includes:
[0086] If the change in the water level of the target account indicates that the current water level is lower than the warning threshold, the water level is replenished to the warning threshold.
[0087] Still taking the above example, if the warning threshold is 5, a warning is required, and the water level can be replenished to the warning threshold to make up the amount. In actual application, the balance warning judgment can be made through the liquid level calculation method, which effectively avoids the situation where there is no shadow account that meets the transaction amount, avoiding the problem of transaction failure.
[0088] In the embodiments of the present application, Figure 3 As shown, step S103: selecting at least one account from the N shadow accounts, and determining a target account for executing the outgoing request from the at least one account, including:
[0089] S301: sorting the initial water level corresponding to each shadow account in the N shadow accounts in descending order;
[0090] S302: Filter out at least one account from the N shadow accounts whose corresponding initial water level is greater than the amount corresponding to the withdrawal request;
[0091] S303: An account randomly selected from the at least one account is used as a target account for executing the withdrawal request.
[0092] In the specific implementation process, the specific implementation process of step S301 to step S303 is as follows:
[0093] First, the initial water level of each shadow account in the N shadow accounts is sorted in order from high to low. In practical applications, when the water levels of the N shadow accounts are different, the initial water levels of each shadow account are sorted in order from high to low when making an outgoing transaction. Then, at least one account whose corresponding initial water level is greater than the amount corresponding to the outgoing transaction request is selected from the N shadow accounts. In other words, according to the amount to be outgoing, the shadow accounts that meet the water level conditions are selected. Then, an account randomly selected from at least one account is used as the target account for executing the outgoing transaction request. In other words, one of the at least one accounts that meets the outgoing transaction amount can be randomly selected as the target account in the future, and the outgoing transaction is performed by the target account.
[0094] It should be noted that after the target account executes the withdrawal request, the subsequent transactions need to re-order the water levels of each shadow account. The liquid level calculation method can also be used to monitor the corresponding water level changes in real time, and replenish the water level in time if the water level is insufficient. In this way, the requirements of hot spot accounts to disperse hot spots can be met, and the risk of financial overdraft can be avoided.
[0095] In the specific implementation process, the payment types corresponding to the business scenarios include horizontal, olive, ladder and scattered types. Among them, the horizontal type can be for small-amount payment scenarios. The olive type is mainly for large amounts and small amounts. Most payment requests are in the middle area. For example, large payments account for 10%, intermediate amounts account for 80%, and small payments account for 10%; when allocating amounts, large amounts can be allocated to 10% of the shadow accounts in the hot accounts, intermediate amounts can be allocated to 80% of the shadow accounts, and small amounts can be allocated to 10% of the shadow accounts. For allocation scenarios such as ladders and scattered points, specific payment scenarios should also be considered, which will not be elaborated here.
[0096] For payment types corresponding to different business scenarios, you can set the water level, monitoring and warning thresholds, and water level replenishment method for the shadow account corresponding to the hotspot account as shown in Table 2.
[0097]
[0098] Table 2
[0099] In the specific implementation process, for payment types in different business scenarios, the liquid level calculation method can be used as a scale measurement to calculate the water level changes of a single shadow account. Different monitoring methods can be used for different types. For example, the average method can be used for water level monitoring for the horizontal type; the group average method can be used for water level monitoring for the olive type; the trend ladder chart can be used for water level monitoring for the step type; and the correlation can be used for water level monitoring for the scattered point type. Of course, the water levels of different payment types can also be monitored according to actual application needs, which will not be described in detail here.
[0100] Based on the same inventive concept, the present application embodiment provides a hotspot account balance monitoring device, such as Figure 4 As shown, the balance monitoring device of the hotspot account includes:
[0101] An acquisition unit 10, configured to acquire an account operation request for a hotspot account;
[0102] A setting unit 20 is used for setting N shadow accounts for the hotspot account according to the current business scenario if the account operation request is an outgoing request, and setting an initial water level for each shadow account, wherein the initial water level is used to represent the initial total balance of the corresponding shadow account, and N is a positive integer;
[0103] A screening unit 30 is used to screen out at least one account from the N shadow accounts, and determine a target account for executing the withdrawal request from the at least one account, wherein the initial water level corresponding to each account in the at least one account is greater than the amount corresponding to the account operation request;
[0104] An outgoing payment processing unit 40, configured to distribute the outgoing payment request to the target account for outgoing payment processing;
[0105] The monitoring unit 50 is used to monitor the water level change of the target account before and after the payment processing through a liquid level calculation method to make an early warning judgment on the corresponding balance. The water level change is used to represent the total balance change of the target account.
[0106] In the embodiment of the present application, the monitoring unit 50 is used to:
[0107] Determine the current water level of the target account after the outgoing transaction, where the current water level is used to represent the current total balance of the target account after the outgoing transaction;
[0108] Determining a difference between the current water level and the corresponding initial water level, and a product of a liquid density multiplied by an adjustment factor, the liquid density being a ratio of a total balance of the hotspot account to N;
[0109] The water level change of the target account is determined according to the ratio between the difference and the product.
[0110] In the embodiment of the present application, after the monitoring unit 50 determines the water level change of the target account according to the ratio between the difference and the product, the device further includes a supplementing unit, which is used to:
[0111] If the change in the water level of the target account indicates that the current water level is lower than the warning threshold, the water level is replenished to the warning threshold.
[0112] In the embodiment of the present application, the screening unit 30 is specifically used for:
[0113] Sort the initial water level corresponding to each shadow account in the N shadow accounts in descending order;
[0114] Filter out at least one account from the N shadow accounts whose corresponding initial water level is greater than the amount corresponding to the account operation request;
[0115] An account randomly selected from the at least one account is used as a target account for executing the withdrawal request.
[0116] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can implement the function of the balance monitoring method of the above-mentioned hotspot account, referring to Figure 5 , the electronic device comprises:
[0117] Memory 100, used for storing computer programs;
[0118] The processor 200 is used to implement any of the steps described above when executing the computer program stored in the memory.
[0119] The specific connection medium between the processor 200 and the memory 100 is not limited in the embodiment of the present application. Figure 5 In the example, the processor 200 and the memory 100 are connected via the bus 300. The bus 300 is connected to the memory 100 via the bus 300. Figure 5 The connection between other components is shown by bold lines, and is not intended to be limiting. The bus 300 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 200 can also be called a controller, and there is no limitation on the name.
[0120] In the embodiment of the present application, the memory 100 stores instructions that can be executed by the processor 200. When the processor 200 executes the computer program stored in the memory 100, the balance monitoring method of the hotspot account discussed above can be executed. The processor 200 can implement Figure 4 The functions of each module are shown in the figure.
[0121] Among them, the processor 200 is the control center of the device, and can use various interfaces and lines to connect various parts of the entire control device, and through running or executing computer programs stored in the memory 100 and calling data stored in the memory 100, the various functions of the device and process data, thereby monitoring the device as a whole.
[0122] In one possible design, the processor 200 may include one or more processing units, and the processor 200 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. In some embodiments, the processor 200 and the memory 100 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0123] The memory 100, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 100 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. Alternatively, the memory 100 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 100 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0124] By designing and programming the processor 200, the code corresponding to the hotspot account balance monitoring method described in the above embodiment can be fixed into the chip, so that the chip can execute the steps of the hotspot account balance monitoring method discussed above when running. How to design and program the processor 200 is a technology well known to those skilled in the art and will not be described in detail here.
[0125] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and the computer program is used to enable a computer to execute the steps of the hotspot account balance monitoring method discussed above.
[0126] In some possible implementations, various aspects of a hotspot account balance monitoring method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the hotspot account balance monitoring method according to various exemplary embodiments of the present application described above in this specification.
[0127] The embodiment of the present application provides a balance monitoring method, device and electronic device for a hotspot account, wherein, first, an account operation request for the hotspot account is obtained; if the account operation request is a withdrawal request, N shadow accounts are set for the hotspot account according to the current business scenario, and the initial water level is set for each shadow account, wherein the initial water level is used to characterize the initial total amount of the corresponding shadow account. That is, when the account operation request is a withdrawal request, N shadow accounts can be set for the hotspot account according to the current business scenario, and the initial total amount of each shadow account can be set. Then, at least one account whose initial water level is greater than the amount corresponding to the withdrawal request can be screened out from the N shadow accounts; then, a target account for executing the withdrawal request is determined from at least one account. In this case, the initial total amount of the target account for executing the withdrawal request is greater than the amount corresponding to the withdrawal request. Then, the withdrawal request can be assigned to the target account, and the withdrawal processing is performed by the target account. In this way, the overdraft problem of the balance of the hotspot account is avoided.
[0128] In addition, the liquid level calculation method can be used to monitor the water level changes of the target account before and after the payment processing to make early warning judgments on the corresponding balances. In this way, early warning prompts for changes in the balance water level are achieved.
[0129] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0130] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0131] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0132] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0133] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for monitoring the balance of a hotspot account, characterized in that: include: Get account operation requests for hotspot accounts; If the account operation request is an outgoing request, then according to the current business scenario, N shadow accounts are set for the hotspot account, and an initial water level is set for each shadow account. The initial water level is used to represent the initial total balance of the corresponding shadow account, and N is a positive integer; Filtering out at least one account from the N shadow accounts, and determining a target account for executing the withdrawal request from the at least one account, wherein an initial water level corresponding to each account in the at least one account is greater than an amount corresponding to the withdrawal request; Allocating the payment request to the target account for payment processing; By means of a liquid level calculation method, the water level change of the target account before and after the payment processing is monitored to make an early warning judgment on the corresponding balance, and the water level change is used to characterize the total balance change of the target account.
2. The method according to claim 1, characterized in that The liquid level calculation method is used to monitor the water level change of the target account before and after the payment processing, including: Determine the current water level of the target account after the outgoing transaction, where the current water level is used to represent the current total balance of the target account after the outgoing transaction; Determining a difference between the current water level and the corresponding initial water level, and a product of a liquid density multiplied by an adjustment factor, the liquid density being a ratio of a total balance of the hotspot account to N; The water level change of the target account is determined according to the ratio between the difference and the product.
3. The method according to claim 2, characterized in that After determining the water level change of the target account according to the ratio between the difference and the product, the method further includes: If the change in the water level of the target account indicates that the current water level is lower than the warning threshold, the water level is replenished to the warning threshold.
4. The method according to any one of claims 1 to 3, characterized in that: The step of selecting at least one account from the N shadow accounts and determining a target account for executing the withdrawal request from the at least one account includes: Sort the initial water level corresponding to each shadow account in the N shadow accounts in descending order; Filter out at least one account from the N shadow accounts whose corresponding initial water level is greater than the amount corresponding to the withdrawal request; An account randomly selected from the at least one account is used as a target account for executing the withdrawal request.
5. A hotspot account balance monitoring device, characterized in that: include: An acquisition unit, used to acquire an account operation request for a hotspot account; A setting unit, configured to, if the account operation request is an outgoing request, set N shadow accounts for the hotspot account according to the current business scenario, and set an initial water level for each shadow account, wherein the initial water level is used to represent the initial total balance of the corresponding shadow account, and N is a positive integer; a screening unit, configured to screen out at least one account from the N shadow accounts, and determine a target account for executing the withdrawal request from the at least one account, wherein an initial water level corresponding to each account in the at least one account is greater than an amount corresponding to the account operation request; An outgoing payment processing unit, configured to allocate the outgoing payment request to the target account for outgoing payment processing; The monitoring unit is used to monitor the water level change of the target account before and after the payment processing through a liquid level calculation method to make an early warning judgment on the corresponding balance, and the water level change is used to represent the total balance change of the target account.
6. The device according to claim 5, characterized in that The monitoring unit is used for: Determine the current water level of the target account after the outgoing transaction, where the current water level is used to represent the current total balance of the target account after the outgoing transaction; Determining a difference between the current water level and the corresponding initial water level, and a product of a liquid density multiplied by an adjustment factor, the liquid density being a ratio of a total balance of the hotspot account to N; The water level change of the target account is determined according to the ratio between the difference and the product.
7. The device according to claim 6, characterized in that After the monitoring unit determines the water level change of the target account according to the ratio between the difference and the product, the device further includes a supplementing unit, which is used to: If the change in the water level of the target account indicates that the current water level is lower than the warning threshold, the water level is replenished to the warning threshold.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method steps of any one of claims 1 to 4 when executing the computer program stored in the memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to enable a computer to execute the method steps according to any one of claims 1 to 4.
10. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 4.
Citation Information
Cited By
Method and system for processing hot account high concurrency problem based on main account and sub-account
CN121353001A