CN116051117A - Control method and device for balance of hot spot account and electronic equipment - Google Patents

Control method and device for balance of hot spot account and electronic equipment Download PDF

Info

Publication number
CN116051117A
CN116051117A CN202310207080.7A CN202310207080A CN116051117A CN 116051117 A CN116051117 A CN 116051117A CN 202310207080 A CN202310207080 A CN 202310207080A CN 116051117 A CN116051117 A CN 116051117A
Authority
CN
China
Prior art keywords
hot spot
balance
spot account
account
cache
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310207080.7A
Other languages
Chinese (zh)
Inventor
胡柯华
龙华
阚鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Jincheng Bank Ltd By Share Ltd
Original Assignee
Tianjin Jincheng Bank Ltd By Share Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Jincheng Bank Ltd By Share Ltd filed Critical Tianjin Jincheng Bank Ltd By Share Ltd
Priority to CN202310207080.7A priority Critical patent/CN116051117A/en
Publication of CN116051117A publication Critical patent/CN116051117A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343Locking methods, e.g. distributed locking or locking implementation details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/403Solvency checks

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Computational Linguistics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention provides a control method and device for a balance of a hot spot account and electronic equipment, comprising the following steps: acquiring a mutual exclusion lock of a hot spot account; acquiring the balance of the hot spot account in the cache, and verifying and checking the current transaction according to the balance of the hot spot account; and after the verification check is passed, the current transaction is released, and the subsequent accounting of the hot spot account is executed. The control method of the balance of the hot spot account loads the balance of the hot spot account into the cache, sets the mutual exclusion lock of the hot spot account in the cache, controls the balance by utilizing the high-efficiency processing capacity of the cache, gives consideration to reliability and high efficiency, can effectively solve the problem of transaction congestion or overtime caused by verification and inspection of the balance of the hot spot account, realizes the optimization processing of the transaction of the hot spot account by the accounting system, not only realizes the effective control of the balance of the hot spot account, avoids the overdraft condition of the hot spot account, but also effectively improves the accounting processing capacity of banks.

Description

Control method and device for balance of hot spot account and electronic equipment
Technical Field
The invention relates to the technical field of banking transactions, in particular to a control method and device for a balance of a hot spot account and electronic equipment.
Background
In the process of bank transaction, a large number of accounting requests are received in a short time by the same account, and such account is generally called a hot spot account, wherein the hot spot account is common in a bank accounting or clearing transaction system. Aiming at the hot account, the system needs to perform special optimization processing to effectively avoid overtime or error reporting of transactions caused by lock waiting in frequently updating the database, thereby realizing the improvement of user experience while guaranteeing the bank fund safety.
The hot spot account lock wait mainly occurs in a balance checking stage and a balance summarizing stage, and the lock wait optimizing technology aiming at the balance checking stage mainly has two optimizing directions at present: one is to split sub-accounts of the hot-spot account, and disperse the hot-spot concentration, so as to relieve the condition of waiting congestion of the lock, as shown in figure 1; the other is to change the locked state of the account to the unlocked state by inserting a temporary stop payment record, and avoid the account database from being locked and waiting, as shown in fig. 2.
Aiming at the two hot spot account balance checking phase optimization schemes, the short plates are provided. The sub-account splitting scheme needs to temporarily collect the balance when a large amount of cash out transaction is performed, and needs to dial down the balance after the account is supplemented, so that the hot-spot account congestion condition is aggravated and the optimization effect cannot be achieved; when the account balance is smaller, a plurality of cut-off records are inserted into the hot account simultaneously due to concurrent transactions, the transaction amount of each record is smaller than the account balance, but the total cut-off amount of a plurality of transactions is larger than the account balance, at the moment, the total cut-off amount of the plurality of transactions is misjudged as 'insufficient balance' due to the fact that the account balance is larger, most of transactions fail, the phenomenon and the actual situation come in and go out more, and the actual situation may only have one or a few transactions fail due to 'insufficient balance', so the balance checking scheme has the defect of misjudging 'insufficient balance'.
In conclusion, how to effectively realize the balance control of the hot account, avoid overdrawing of the hot account, solve two technical difficulties of frequently collecting the balance of the down-dialing account and misjudging account 'balance deficiency' caused by the prior art scheme, and finally realize the improvement of the accounting processing capability of the system, which is a core problem to be solved by the present technicians in the field.
Disclosure of Invention
Accordingly, the present invention aims to provide a method, a device and an electronic device for controlling the balance of a hot spot account, so as to solve the technical problem that the balance control of the hot spot account cannot be effectively realized in the prior art.
In a first aspect, an embodiment of the present invention provides a method for controlling a balance of a hot spot account, which is applied to an accounting system, including:
acquiring a mutual exclusion lock of a hot spot account;
acquiring the balance of a hot spot account in the cache, and verifying and checking the current transaction according to the balance of the hot spot account;
and after the verification check is passed, the current transaction is released, and the accounting processing of the subsequent hot spot account is executed.
Further, before acquiring the mutual exclusion lock of the hot spot account, the method further includes:
checking the validity of the hot spot account;
and after the checking is passed, acquiring the mutual exclusion lock of the hot spot account.
Further, performing verification check on the current transaction according to the balance of the hot spot account, including:
judging whether the balance of the hot spot account is not less than the transaction amount of the current transaction;
and if the current transaction verification check is not smaller than the current transaction verification check, the current transaction verification check is passed.
Further, the method further comprises:
and if the verification check is not passed, releasing the mutual exclusion lock and rejecting the current transaction.
Further, after the verification check passes, before the current transaction is cleared, the method further comprises:
updating the balance of the hot spot account in the cache, and releasing the mutual exclusion lock.
Further, the method further comprises:
checking the validity of the hot spot account;
acquiring a mutual exclusion lock of the hot spot account;
acquiring a hot spot account balance in a cache, and updating the hot spot account balance in the cache according to the current cash-in transaction;
releasing the mutual exclusion lock and executing subsequent accounting processing of the hot spot account.
Further, the method further comprises:
acquiring a mutual exclusion lock of the hot spot account;
acquiring a hot spot account balance in a hard disk database, and acquiring the hot spot account balance in a cache;
comparing the balance of the hot spot account in the hard disk database with the balance of the hot spot account in the cache;
if the hot account balance in the cache is inconsistent, clearing the hot account balance in the cache, controlling the balance based on the hot account balance in the hard disk database, and sending out an alarm;
releasing the mutual exclusion lock.
In a second aspect, an embodiment of the present invention further provides a device for controlling a balance of a hot spot account, which is applied to an accounting system, including:
the acquisition unit is used for acquiring the mutual exclusion lock of the hot spot account;
the acquisition and verification checking unit is used for acquiring the balance of the hot spot account in the cache and verifying and checking the current transaction according to the balance of the hot spot account;
and the release unit is used for releasing the current transaction after the verification and check pass, and executing the subsequent accounting processing of the hot spot account.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method according to any one of the first aspects when the processor executes the computer program.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing machine-executable instructions which, when invoked and executed by a processor, cause the processor to perform the method of any one of the first aspects.
In an embodiment of the present invention, a method for controlling balance of a hot spot account is provided, which is applied to an accounting system, and includes: acquiring a mutual exclusion lock of a hot spot account; acquiring the balance of the hot spot account in the cache, and verifying and checking the current transaction according to the balance of the hot spot account; and after the verification check is passed, the current transaction is released, and the subsequent accounting of the hot spot account is executed. According to the method for controlling the balance of the hot spot account, the balance of the hot spot account is loaded into the cache, the mutual exclusion lock of the hot spot account is arranged in the cache, the balance is controlled by utilizing the high-efficiency processing capacity of the cache, the reliability and the high-efficiency are considered, the problem of transaction congestion or overtime caused by verification and inspection of the balance of the hot spot account can be effectively solved, the optimization processing of the transaction of the hot spot account by the accounting system is realized, the effective control of the balance of the hot spot account is realized, the overdrawing condition of the hot spot account is avoided, the financial processing capacity of a bank is effectively improved, and the technical problem that the balance control of the hot spot account cannot be effectively realized in the prior art is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a solution for splitting sub-accounts provided in the prior art;
FIG. 2 is a schematic illustration of a temporary stop provided by the prior art;
FIG. 3 is a flowchart of a method for controlling a balance of a hot spot account according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a control device for a hot spot account balance according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be clearly and completely described in connection with the embodiments, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the prior art, the optimization processing of the balance control of the hot-spot account is mainly realized through splitting the sub-account or inserting the temporary record, the splitting sub-account needs to frequently collect the balance of the down-dialing, so that additional expenditure and pressure are brought to the accounting system, and the congestion condition of the accounting system can not be thoroughly relieved. The temporary stop payment recording scheme is inserted, so that the serious defect of 'insufficient balance' of the misjudgment account is caused, the function of the accounting system is lost, and the user experience is seriously influenced. Namely, the prior art cannot effectively realize the control of the balance of the hot spot account.
Based on the method, the balance of the hot spot account is loaded into the cache, the mutual exclusion lock of the hot spot account is arranged in the cache, the balance is controlled by utilizing the high-efficiency processing capacity of the cache, the reliability and the high-efficiency are considered, the problem of transaction congestion or overtime caused by verification and inspection of the balance of the hot spot account can be effectively solved, the optimization processing of the transaction of the hot spot account by the accounting system is realized, the effective control of the balance of the hot spot account is realized, the overdraft condition of the hot spot account is avoided, the accounting processing capacity of a bank is effectively improved, and the technical problem that the control of the balance of the hot spot account cannot be effectively realized in the prior art is solved.
For the sake of understanding the present embodiment, first, a method for controlling a balance of a hot spot account disclosed in the present embodiment is described in detail.
Embodiment one:
according to an embodiment of the present invention, there is provided an embodiment of a method for controlling a hotspot account balance, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system, such as a set of computer executable instructions, and that although a logical sequence is shown in the flowchart, in some cases the steps shown or described may be performed in a different order than what is shown or described herein.
FIG. 3 is a flowchart of a method for controlling a hotspot account balance according to an embodiment of the present invention, as shown in FIG. 3, the method includes the following steps:
step S302, obtaining a mutual exclusion lock of a hot spot account;
in the embodiment of the invention, the control method of the balance of the hot spot account can be applied to an accounting system.
During the transaction of the hot-spot account, in order to ensure the bank funds safety, balance control is often required to be carried out on the hot-spot account so as to avoid overdraft condition of the hot-spot account. In order to realize account balance control in an accounting system, a conventional processing method is to utilize record locks of a relational database to realize sequential processing of transactions and then check the balance of the transactions one by one, but because of relatively low-efficiency processing capacity of a hard disk, transaction balance verification and check of a hot spot account often causes transaction congestion or overtime of the accounting system.
Therefore, the invention starts from the problem root, solves the lock waiting of the hard disk database by utilizing the high-efficiency processing capacity of the cache, loads the balance of the hot spot account into the cache, and sets the mutual exclusion lock of the hot spot account in the cache.
When the cash balance control of the hot spot account is performed, the mutual exclusion lock of the hot spot account is acquired first.
In the embodiment of the invention, because of concurrent processing and intense competition of lock resources, a locking retry mechanism is set in the process of acquiring the mutex lock of the hot spot account, and the maximum retry times are set according to the current service situation, namely whether the acquisition of the mutex lock is successful or not is judged, if not, the acquisition of the mutex lock is continued until the retry times are reached, and the condition of overtime transaction or long-time waiting is avoided.
Step S304, obtaining the balance of the hot spot account in the cache, and verifying and checking the current transaction according to the balance of the hot spot account;
specifically, the cache includes, but is not limited to, physical machine memory, dis service, etc., if the service is a single point service for providing a hot spot account transaction, the physical machine memory is preferably used for realizing the balance cache of the hot spot account and the mutual exclusive lock of the hot spot account, and if the service is a cluster or a distributed service for providing the hot spot account transaction, the dis is preferably used for realizing the balance cache of the account and the mutual exclusive lock of the hot spot account.
After the mutual exclusion lock of the hot spot account is successfully obtained, the balance of the hot spot account in the cache is obtained, and verification and check are carried out on the current transaction according to the balance of the hot spot account.
And step S306, after the verification check is passed, the current transaction is released, and the accounting processing of the subsequent hot-spot account is executed.
Specifically, releasing the current transaction refers to executing the current transaction (e.g., withdrawing X elements from the hot-spot account), where the accounting process of executing the subsequent hot-spot account may be the accounting process of executing the subsequent hot-spot account cash-out transaction, e.g., reducing the balance of the hot-spot account by X elements, etc.
In an embodiment of the present invention, a method for controlling balance of a hot spot account is provided, which is applied to an accounting system, and includes: acquiring a mutual exclusion lock of a hot spot account; acquiring the balance of the hot spot account in the cache, and verifying and checking the current transaction according to the balance of the hot spot account; and after the verification check is passed, the current transaction is released, and the subsequent accounting of the hot spot account is executed. According to the method for controlling the balance of the hot spot account, the balance of the hot spot account is loaded into the cache, the mutual exclusion lock of the hot spot account is arranged in the cache, the balance is controlled by utilizing the high-efficiency processing capacity of the cache, the reliability and the high-efficiency are considered, the problem of transaction congestion or overtime caused by verification and inspection of the balance of the hot spot account can be effectively solved, the optimization processing of the transaction of the hot spot account by the accounting system is realized, the effective control of the balance of the hot spot account is realized, the overdrawing condition of the hot spot account is avoided, the financial processing capacity of a bank is effectively improved, and the technical problem that the balance control of the hot spot account cannot be effectively realized in the prior art is solved.
The foregoing briefly describes the method for controlling the balance of a hot spot account according to the present invention, and details of the specific matters related thereto are described below.
In an alternative embodiment of the present invention, before acquiring the mutual exclusion lock of the hot spot account, the method further comprises the steps of:
(1) Checking the validity of the hot spot account;
(2) And after the checking is passed, acquiring the mutual exclusion lock of the hot spot account.
In an alternative embodiment of the invention, the verification check for the current transaction is performed based on the hotspot account balance, comprising the steps of:
(1) Judging whether the balance of the hot spot account is not less than the transaction amount of the current transaction;
(2) If not, the current transaction verification check passes.
(3) If the current transaction verification check is smaller than the current transaction verification check is not passed.
In an alternative embodiment of the invention, the method further comprises:
and if the verification check is not passed, releasing the mutual exclusion lock, and rejecting the current transaction.
The direct error report refuses the current transaction, thereby shortening the queuing waiting time of the subsequent transaction.
In an alternative embodiment of the invention, after the verification check passes, the method further comprises, before the current transaction is cleared:
and updating the balance of the hot account in the cache and releasing the mutual exclusion lock.
Specifically, updating the hot spot account balance in the cache to reduce the transaction amount of the current transaction for the hot spot account balance, and releasing the mutual exclusion lock for obtaining other subsequent transactions after the hot spot account balance is successfully updated.
The above process is a balance control process when the hot-spot account pays out money, and the balance control process when the hot-spot account pays in money is described below.
In an alternative embodiment of the invention, the method further comprises the steps of:
(1) Checking the validity of the hot spot account;
(2) Acquiring a mutual exclusion lock of a hot spot account;
(3) Acquiring the balance of the hot spot account in the cache, and updating the balance of the hot spot account in the cache according to the current cash-in transaction;
(4) Releasing the mutual exclusion lock and executing subsequent accounting processing of the hot spot account.
The specific process is as follows:
step s1, checking the validity of the hot spot account, including but not limited to checking the account validity and legitimacy;
and step s2, after the validity check is passed, starting to acquire the mutual exclusion lock of the hot-spot account. Because of concurrent processing, lock resources are in intense competition, a locking retry mechanism is set, and the maximum retry times are set in combination with the current state of service, so that the condition of overtime transaction or long-time waiting is avoided;
step s3, after the mutual exclusion lock is successfully obtained, obtaining the balance of the hot spot account in the cache, and preparing for balance updating operation;
step s4, the cash transaction does not involve overdraft processing of the account, and the current cash transaction amount can be directly added to the balance of the hot-spot account under the condition that other error reporting influences are not considered;
step s5, after the balance of the hot spot account in the cache is updated, releasing the mutual exclusion lock for obtaining other subsequent transactions;
and step S6, after the balance of the hot spot account in the cache is updated, continuing the subsequent accounting processing of the hot spot account fund transaction.
The above-mentioned process is a balance control process when the hot-spot account is charged, and a process of hot-spot account balance comparison (hot-spot account balance comparison set for realizing high availability) is described below.
In an alternative embodiment of the invention, the method further comprises the steps of:
(1) Acquiring a mutual exclusion lock of a hot spot account;
(2) Acquiring a hot spot account balance in a hard disk database, and acquiring the hot spot account balance in a cache;
(3) Comparing the balance of the hot spot account in the hard disk database with the balance of the hot spot account in the cache;
(4) If the balance is inconsistent, clearing the balance of the hot spot account in the cache, controlling the balance based on the balance of the hot spot account in the hard disk database, and giving an alarm;
(5) Releasing the mutual exclusion lock.
The specific process is as follows:
step s1, obtaining the mutual exclusion lock is started. Because of concurrent processing, lock resources are in intense competition, a locking retry mechanism is set, and the maximum retry times are set in combination with the current state of service, so that the condition of overtime transaction or long-time waiting is avoided;
step s2, after the mutual exclusion lock is successfully obtained, preferentially obtaining the balance of the hot spot account in the hard disk database;
step 3, after the hot spot account balance in the hard disk database is successfully obtained, starting to obtain the hot spot account balance in the cache;
step s4, comparing the balance of the hot spot account in the hard disk database with the balance of the hot spot account in the cache, if the comparison is inconsistent, clearing the balance of the hot spot account in the cache, changing the conventional balance control flow, and sending out an alarm notification operation and developer intervention;
and step S5, after the hot account balance in the cache is compared and consistent or emptied, releasing the mutual exclusion lock for subsequent other deposit and withdrawal transactions to acquire.
The control method of the balance of the hot spot account utilizes the advantage of cache high-efficiency processing to realize the control of the balance of the hot spot account, and comprises the following steps: and (3) performing cash balance control on the hot spot account, performing balance comparison on the hot spot account, and setting a mutual exclusion lock on the hot spot account.
The invention is mainly applied to balance control optimization processing of the hot spot account of the accounting system, and the main invention has the advantages that:
(1) Balance control of the hot-spot account which cannot be overdrawn is realized, overdrawn risks of the account are avoided, optimization processing of the hot-spot account by the system is realized, bank fund safety is ensured, and self benefits of the bank are maintained;
(2) The cache efficient processing advantage is utilized, the problem of account lock waiting or lock conflict caused by a hot spot account transaction balance checking stage is solved, the optimization processing of the system on the hot spot account transaction is realized, the problems of system congestion and transaction timeout caused by the hot spot account transaction are avoided, the purposes of stable system operation and stable transaction service are finally achieved, and the processing capacity and user experience of the system are remarkably improved;
(3) Compared with the prior art, the invention not only realizes account balance control, but also eliminates the systematic periodic congestion problem caused by frequent account collection and balance dialing and the side effect of misjudging account 'balance shortage', and provides a better hot spot account balance control method for the field.
The control method of the invention realizes the balance control of the hot spot account, ensures that the account balance is not overdrawn, optimizes the problem of transaction congestion of the hot spot account, and improves the accounting processing capacity of the system.
Embodiment two:
the embodiment of the invention also provides a control device of the balance of the hot spot account, which is mainly used for executing the control method of the balance of the hot spot account provided in the first embodiment of the invention, and the control device of the balance of the hot spot account provided in the embodiment of the invention is specifically introduced below.
FIG. 4 is a schematic diagram of a control device for a hot spot account balance according to an embodiment of the present invention, as shown in FIG. 4, the device mainly includes: an acquisition unit 10, an acquisition and verification check unit 20, and a release unit 30, wherein:
the acquisition unit is used for acquiring the mutual exclusion lock of the hot spot account;
the acquisition and verification checking unit is used for acquiring the balance of the hot spot account in the cache and verifying and checking the current transaction according to the balance of the hot spot account;
and the release unit is used for releasing the current transaction after the verification and check pass, and executing the subsequent accounting processing of the hot spot account.
In an embodiment of the present invention, a control device for a hotspot account balance is provided, which is applied to an accounting system, and includes: acquiring a mutual exclusion lock of a hot spot account; acquiring the balance of the hot spot account in the cache, and verifying and checking the current transaction according to the balance of the hot spot account; and after the verification check is passed, the current transaction is released, and the subsequent accounting of the hot spot account is executed. According to the control device for the balance of the hot spot account, the balance of the hot spot account is loaded into the cache, the mutual exclusion lock of the hot spot account is arranged in the cache, the balance is controlled by utilizing the high-efficiency processing capacity of the cache, the reliability and the high-efficiency are considered, the problem of transaction congestion or overtime caused by verification and inspection of the balance of the hot spot account can be effectively solved, the optimization processing of the transaction of the hot spot account by the accounting system is realized, the effective control of the balance of the hot spot account is realized, the overdrawing condition of the hot spot account is avoided, the financial processing capacity of a bank is effectively improved, and the technical problem that the balance control of the hot spot account cannot be effectively realized in the prior art is relieved.
Optionally, the device is further configured to: checking the validity of the hot spot account; and after the checking is passed, acquiring the mutual exclusion lock of the hot spot account.
Optionally, the acquisition and verification checking unit is further configured to: judging whether the balance of the hot spot account is not less than the transaction amount of the current transaction; if not, the current transaction verification check passes.
Optionally, the device is further configured to: and if the verification check is not passed, releasing the mutual exclusion lock, and rejecting the current transaction.
Optionally, the device is further configured to: and updating the balance of the hot account in the cache and releasing the mutual exclusion lock.
Optionally, the device is further configured to: checking the validity of the hot spot account; acquiring a mutual exclusion lock of a hot spot account; acquiring the balance of the hot spot account in the cache, and updating the balance of the hot spot account in the cache according to the current cash-in transaction; releasing the mutual exclusion lock and executing subsequent accounting processing of the hot spot account.
Optionally, the device is further configured to: acquiring a mutual exclusion lock of a hot spot account; acquiring a hot spot account balance in a hard disk database, and acquiring the hot spot account balance in a cache; comparing the balance of the hot spot account in the hard disk database with the balance of the hot spot account in the cache; if the balance is inconsistent, clearing the balance of the hot spot account in the cache, controlling the balance based on the balance of the hot spot account in the hard disk database, and giving an alarm; releasing the mutual exclusion lock.
The device provided by the embodiment of the present invention has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned.
As shown in fig. 5, an electronic device 600 provided in an embodiment of the present application includes: the system comprises a processor 601, a memory 602 and a bus, wherein the memory 602 stores machine-readable instructions executable by the processor 601, when the electronic device is running, the processor 601 communicates with the memory 602 through the bus, and the processor 601 executes the machine-readable instructions to execute the steps of the control method of the hot spot account balance as described above.
Specifically, the memory 602 and the processor 601 can be general-purpose memories and processors, which are not limited herein, and the control method of the hot spot account balance can be executed when the processor 601 runs the computer program stored in the memory 602.
The processor 601 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 601 or instructions in the form of software. The processor 601 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 602, and the processor 601 reads information in the memory 602 and performs the steps of the above method in combination with its hardware.
Corresponding to the control method of the balance of the hot spot account, the embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores machine executable instructions, and the machine executable instructions cause a processor to execute the steps of the control method of the balance of the hot spot account when the machine executable instructions are called and executed by the processor.
The control device for the balance of the hot spot account provided by the embodiment of the application can be specific hardware on equipment or software or firmware installed on the equipment. The device provided in the embodiments of the present application has the same implementation principle and technical effects as those of the foregoing method embodiments, and for a brief description, reference may be made to corresponding matters in the foregoing method embodiments where the device embodiment section is not mentioned. It will be clear to those skilled in the art that, for convenience and brevity, the specific operation of the system, apparatus and unit described above may refer to the corresponding process in the above method embodiment, which is not described in detail herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
As another example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments provided in the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the control method for a hotspot account balance according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that: like reference numerals and letters in the following figures denote like items, and thus once an item is defined in one figure, no further definition or explanation of it is required in the following figures, and furthermore, the terms "first," "second," "third," etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present application, and are not intended to limit the scope of the present application, but the present application is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, the present application is not limited thereto. Any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or make equivalent substitutions for some of the technical features within the technical scope of the disclosure of the present application; such modifications, changes or substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application. Are intended to be encompassed within the scope of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. The control method of the balance of the hot spot account is characterized by being applied to an accounting system and comprising the following steps of:
acquiring a mutual exclusion lock of a hot spot account;
acquiring the balance of a hot spot account in the cache, and verifying and checking the current transaction according to the balance of the hot spot account;
and after the verification check is passed, the current transaction is released, and the accounting processing of the subsequent hot spot account is executed.
2. The control method of claim 1, wherein prior to acquiring the exclusive lock of the hot spot account, the method further comprises:
checking the validity of the hot spot account;
and after the checking is passed, acquiring the mutual exclusion lock of the hot spot account.
3. The control method of claim 1, wherein validating the current transaction based on the hotspot account balance comprises:
judging whether the balance of the hot spot account is not less than the transaction amount of the current transaction;
and if the current transaction verification check is not smaller than the current transaction verification check, the current transaction verification check is passed.
4. The control method according to claim 1, characterized in that the method further comprises:
and if the verification check is not passed, releasing the mutual exclusion lock and rejecting the current transaction.
5. The control method of claim 1, wherein after the verification check passes, the method further comprises, prior to passing the current transaction:
updating the balance of the hot spot account in the cache, and releasing the mutual exclusion lock.
6. The control method according to claim 1, characterized in that the method further comprises:
checking the validity of the hot spot account;
acquiring a mutual exclusion lock of the hot spot account;
acquiring a hot spot account balance in a cache, and updating the hot spot account balance in the cache according to the current cash-in transaction;
releasing the mutual exclusion lock and executing subsequent accounting processing of the hot spot account.
7. The control method according to claim 1, characterized in that the method further comprises:
acquiring a mutual exclusion lock of the hot spot account;
acquiring a hot spot account balance in a hard disk database, and acquiring the hot spot account balance in a cache;
comparing the balance of the hot spot account in the hard disk database with the balance of the hot spot account in the cache;
if the hot account balance in the cache is inconsistent, clearing the hot account balance in the cache, controlling the balance based on the hot account balance in the hard disk database, and sending out an alarm;
releasing the mutual exclusion lock.
8. A hotspot account balance control apparatus, applied to an accounting system, comprising:
the acquisition unit is used for acquiring the mutual exclusion lock of the hot spot account;
the acquisition and verification checking unit is used for acquiring the balance of the hot spot account in the cache and verifying and checking the current transaction according to the balance of the hot spot account;
and the release unit is used for releasing the current transaction after the verification and check pass, and executing the subsequent accounting processing of the hot spot account.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of the preceding claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium storing machine executable instructions which, when invoked and executed by a processor, cause the processor to perform the method of any one of the preceding claims 1 to 7.
CN202310207080.7A 2023-03-07 2023-03-07 Control method and device for balance of hot spot account and electronic equipment Pending CN116051117A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310207080.7A CN116051117A (en) 2023-03-07 2023-03-07 Control method and device for balance of hot spot account and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310207080.7A CN116051117A (en) 2023-03-07 2023-03-07 Control method and device for balance of hot spot account and electronic equipment

Publications (1)

Publication Number Publication Date
CN116051117A true CN116051117A (en) 2023-05-02

Family

ID=86129746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310207080.7A Pending CN116051117A (en) 2023-03-07 2023-03-07 Control method and device for balance of hot spot account and electronic equipment

Country Status (1)

Country Link
CN (1) CN116051117A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117172918A (en) * 2023-08-17 2023-12-05 中电金信软件有限公司 Transaction processing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160224967A1 (en) * 2014-12-16 2016-08-04 Facebook, Inc. Facilitating same day payment transactions
CN110060036A (en) * 2019-03-29 2019-07-26 宝付网络科技(上海)有限公司 A kind of fractionation bookkeeping methods, billing and accounting system and payment system
CN110443598A (en) * 2019-08-08 2019-11-12 上海中通吉网络技术有限公司 Account settlement method and apparatus
CN110659971A (en) * 2018-06-29 2020-01-07 马上消费金融股份有限公司 Transaction data processing method and device
CN114283007A (en) * 2021-12-29 2022-04-05 中国建设银行股份有限公司 Method and device for solving payment hotspot account problem and electronic equipment
CN115455022A (en) * 2022-09-23 2022-12-09 西安理工大学 Account serial number consistency guaranteeing method of cross-link relay mechanism

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160224967A1 (en) * 2014-12-16 2016-08-04 Facebook, Inc. Facilitating same day payment transactions
CN110659971A (en) * 2018-06-29 2020-01-07 马上消费金融股份有限公司 Transaction data processing method and device
CN110060036A (en) * 2019-03-29 2019-07-26 宝付网络科技(上海)有限公司 A kind of fractionation bookkeeping methods, billing and accounting system and payment system
CN110443598A (en) * 2019-08-08 2019-11-12 上海中通吉网络技术有限公司 Account settlement method and apparatus
CN114283007A (en) * 2021-12-29 2022-04-05 中国建设银行股份有限公司 Method and device for solving payment hotspot account problem and electronic equipment
CN115455022A (en) * 2022-09-23 2022-12-09 西安理工大学 Account serial number consistency guaranteeing method of cross-link relay mechanism

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117172918A (en) * 2023-08-17 2023-12-05 中电金信软件有限公司 Transaction processing method and device

Similar Documents

Publication Publication Date Title
CN108519920B (en) Scheduling retry method and device
CN110889751B (en) Enterprise fund pool management method, device, system, electronic equipment and readable medium
CN116051117A (en) Control method and device for balance of hot spot account and electronic equipment
CN112101955B (en) Concurrent payment method, system and device
CN108762895B (en) Method and device for processing distributed transaction
CN106127568A (en) The clearing operation queue rescue method of inter-bank payment system and device
CN112036863A (en) Payment amount processing method and device, electronic equipment and storage medium
CN113312259B (en) Interface testing method and device
CN110866757B (en) Overdraft prevention method and device for electronic account
CN111768293B (en) Transaction information processing method, device, equipment and storage medium
CN115271694A (en) Order payment method and system
CN112053241A (en) Transaction clearing method and device, electronic equipment and computer-readable storage medium
CN113919833A (en) Order payment method and device
CN113535772A (en) Merchant refund execution method and device
CN112634006A (en) Account checking processing method and device, electronic equipment and storage medium
CN114429346A (en) Transaction flow data processing method and device and data processing system server
CN111797074A (en) Database connection method and device, electronic equipment and readable storage medium
CN113724082B (en) Accounting processing method, device, equipment and storage medium
CN113781034B (en) Billing and checking method based on cache
CN116308357A (en) Accounting processing method under distributed architecture
CN111242592B (en) Resource transfer detection method, device, server and computer readable storage medium
CN118093724A (en) Data processing method, device, equipment and medium
CN115439244A (en) Method and device for recording hot account amount based on redis
CN114971903A (en) Batch task processing method and device
CN115496572A (en) Clearing task processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination