CN115439244A - Method and device for recording hot account amount based on redis - Google Patents

Method and device for recording hot account amount based on redis Download PDF

Info

Publication number
CN115439244A
CN115439244A CN202210979840.1A CN202210979840A CN115439244A CN 115439244 A CN115439244 A CN 115439244A CN 202210979840 A CN202210979840 A CN 202210979840A CN 115439244 A CN115439244 A CN 115439244A
Authority
CN
China
Prior art keywords
account
amount
transaction
balance
redis
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
CN202210979840.1A
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.)
Wuhan Zhongbang Bank Co Ltd
Original Assignee
Wuhan Zhongbang Bank Co 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 Wuhan Zhongbang Bank Co Ltd filed Critical Wuhan Zhongbang Bank Co Ltd
Priority to CN202210979840.1A priority Critical patent/CN115439244A/en
Publication of CN115439244A publication Critical patent/CN115439244A/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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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/382Payment protocols; Details thereof insuring higher security of transaction

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention relates to the field of internet distributed micro-service architecture, and provides a method and a device for recording hot spot account amount based on redis. The invention aims to solve the problems of high concurrency and high performance of hot spot account billing. The main scheme includes that after a transaction message is received by a transaction module, the transaction message is subjected to advanced transaction verification, after the transaction message is verified, a transaction record is recorded according to the transaction message, and then transaction information of the transaction is sent to an account module, wherein the transaction information comprises a collection account type, a payment account number and an amount. The account module judges whether the account is a hotspot account or not according to the account type, if the account is not the hotspot account, the account is locked by adopting a distributed lock, then account billing is carried out, if the account is ended, the account is billed by adopting redis cache, and the transaction detail is inserted into the account detail table record balance _ txns; and starting a timing task, and updating the amount of the account table balance _ acts of the hot spot account according to the account list record balance _ txns.

Description

Method and device for recording hot account amount based on redis
Technical Field
The invention relates to the field of internet distributed micro-service architecture, and provides a method and a device for recording hot account amount based on redis.
Background
The bank account system is divided into an incoming service module, a transaction service module, an account service module and a reconciliation service module. The services are communicated by adopting a dubbo rpc protocol.
The transaction module receives, verifies and records various types of transactions, then sends the transactions to the account module for accounting, if a plurality of transactions at the same time relate to the same account, the amount of the same account can be changed concurrently at the same time by the account module, and if the transactions are not controlled, version optimistic lock of a database table is relied on, and concurrency is very low. At present, a distributed lock is added to an account being billed, and the account can be billed only when a subsequent account request is required to obtain the lock of the account. Failure to acquire a lock requires waiting for 10s,10s before still failing to acquire the lock and reporting a concurrency conflict. But the concurrency performance for the hot account is still not high, and the business development is seriously influenced. A highly concurrent hotspot account billing scheme is urgently needed.
Disclosure of Invention
The invention aims to solve the problems of high concurrency and high performance of hot spot account billing.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for recording hot spot account amount based on redis,
the method comprises the following steps of including an account table balance _ acs used for recording account amount and an account detail table balance _ txns used for recording account transaction details, wherein the method comprises the following steps:
step 1.1: and after the transaction message is verified, recording a transaction record according to the transaction message, and then sending transaction information of the transaction to the account module for account accounting, wherein the transaction information comprises a payment account number and the amount.
Step 1.2: step 1.1, the account module judges whether the account is a hot account according to the account type;
step 1.3: and step 1.2, if the account type is not a hotspot account, queuing by using a distributed lock to avoid concurrency conflict of account table balance _ accounts, wherein the overtime time of the distributed lock is 10s, after a waiting transaction accounting request waits for 10s and 10s, an accounting failure result is returned to the transaction module if no lock is obtained, the transaction is failed, if the lock is obtained, the account table balance _ accounts is operated to perform corresponding addition and subtraction on the account amount, an account detail table is newly added to record balance _ txns, and after the operation is successful, an accounting success result is returned to the transaction module.
Step 1.4: and step 1.2, the account type is a hot account, whether the amount key of the account exists in the redis is checked according to the account, if yes, the amount key is taken out, the amount of the account is correspondingly added or subtracted, and the amount of the account is written back to the redis, and if no amount key of the account exists in the redis, the amount key is initialized to the redis according to the amount checked from the account table balance _ accesses of the database.
Step 1.5: step 1.4, after the value of the changed amount of the hot account is stored in redis, storing the transaction details of the account in an account detail table balance _ txns, wherein the account detail table balance _ txns comprises a mark field is _ counted to identify whether the hot account is counted and calculated in the account table balance _ acs, the value of the hot account is _ counted is 0, and the value of the non-hot account is _ counted is 1;
step 2.1: step 1.5, the background starts a timing task, data of the is _ counted =0 is taken out from the balance _ txns table according to the detailed time sequence of the account records, the data is accumulated to the database table balance _ accesses according to the time sequence of the accounts, the is _ counted =1 is changed after the detail of each account is accumulated, and at the moment, the amount of money in the hot spot account database table balance _ accesses is updated;
step 3.1: and 2.1, in order to check whether the sum of the account table balance _ accounts is consistent with that of redis, starting a timing task in the background, running once every morning, checking whether the sum of each electronic account book redis is consistent with that of the account table balance _ accounts =0 in balance _ txns, if not, sending an alarm short message to inform a fortune management person, and the fortune management person can reset the sum of the redis by using the sum of the account table balance _ accounts + balance _ txns is _ counted = O through a back management. This ensures the ultimate consistency of the redis and database amounts.
The invention also provides a device for recording hot spot account amount based on redis, which comprises an account table balance _ accounts for recording account amount and an account detail table balance _ txns for recording account transaction details, and comprises the following components:
a service checking module: after the transaction message is received by the transaction module, transaction verification is carried out on the transaction message, after the transaction message passes the verification, a transaction record is recorded according to the transaction message, and then transaction information of the transaction is sent to the account module, wherein the transaction information comprises a collection account type, a payment account number and an amount.
An account module: judging whether the account is a hotspot account or not according to the account type, if the account is not the hotspot account, locking the account by adopting a distributed lock, then carrying out account accounting, if the account is the hotspot account, carrying out accounting by adopting redis cache, and inserting the transaction details into an account detail table record balance _ txns;
a timing task module: and updating the amount of the account table balance _ acts of the hot spot account according to the account list record balance _ txns.
The account module implementation includes the following steps:
step 2.1, if the account type is not a hotspot account, using a distributed lock to queue, avoiding the concurrent conflict of account table balance _ accounts, if the distributed lock is overtime ns, waiting for a transaction accounting request to wait for ns, returning an accounting failure result to a transaction module if the lock is not obtained after ns, failing the transaction, if the lock is obtained, operating the account table balance _ accounts to perform corresponding addition and subtraction on the account amount, adding an account detail table to record balance _ txns, returning an accounting success result to the transaction module after the operation is successful, wherein the ns value is 10s, namely 10 seconds;
step 2.2, the account type is a hot account, whether an amount key of the account exists in the redis is checked according to the account, if yes, the amount key is taken out, corresponding addition and subtraction are carried out on the account amount, the account amount is written back to the redis, and if no amount key of the account exists in the redis, the amount key is initialized to the redis according to the amount checked from an account table balance _ accesses of the database;
and 2.3, after the step 2.2 is carried out, after the value of the changed amount of the hot spot account is stored in redis, storing the transaction details of the account in an account detail table balance _ txns, wherein the account detail table balance _ txns comprises a mark field is _ counted to mark whether the hot spot account is counted and calculated in an account table balance _ accounts, wherein the hot spot account is _ counted value is 0, and the non-hot spot account is _ counted value is 1.
A timing task module: starting a timing task in the background, taking out data of the is _ counted = O from the balance _ txns table according to the detail time sequence of the account record, accumulating the data to the database table balance _ accesses according to the account time sequence, changing the is _ counted =1 after the detail of each account is accumulated, and updating the amount of money in the hotspot account database table balance _ accesses at the moment.
The system also comprises a fault tolerance module, a timing task is started in the background for checking whether the amount of money in the account table balance _ acs is consistent with that in redis, the timing task is run once every morning, whether the amount of money in each electronic account book redis is consistent with the amount of money of the is _ counted =0 in the account table balance _ acs and the balance _ txns is checked, if the amount of money is not consistent, an alarm short message is sent out to inform a management and management person, and the management and management person can reset the amount of money in the redis by using the amount of money of the is _ counted =0 in the account table balance _ acs and the amount of money of the is _ counted =0 in the balance _ txns through a back management. This ensures the ultimate consistency of the redis and database amounts.
Because the invention adopts the technical scheme, the invention has the following beneficial effects:
the invention is based on the redis cache, and the performance of the transaction is obviously improved. The concurrency capability of the system is improved, and the response time of the interface is prolonged. And the processing capacity of the payment service platform is improved.
The invention is based on the compensation mechanism of the timing task, calculates the uncalculated detail transaction amount to the account table according to the account transaction time sequence for the hotspot account table according to the stored account detail table, so that the uncalculated detail transaction amount is executed in sequence in series, and the concurrent operation of the account table is avoided.
The invention ensures the correctness of the account redis data and the stability of the whole account system based on the checking mechanism and the manual intervention mechanism of the timing task.
Drawings
FIG. 1, hotspot account walk redis cache accounting logic.
FIG. 2, hotspot accounts compensate account amounts to account tables through timed tasks.
FIG. 3, the hotspot account checks the redis cache accuracy through a timed task.
Detailed Description
Hereinafter, a detailed description will be given of embodiments of the present invention. While the invention will be described and illustrated in connection with certain specific embodiments thereof, it should be understood that the invention is not limited to those embodiments. Rather, modifications and equivalents of the invention are intended to be included within the scope of the claims.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the invention. It will be understood by those skilled in the art that the present invention may be practiced without these specific details.
The invention discloses a method for recording hot account amount based on redis,
the method comprises account table balance _ acts for recording account amount and account statement balance _ txns for recording account transaction statement, and is characterized by comprising the following steps of:
step 1.1: and after the transaction message is verified, recording a transaction record according to the transaction message, and then sending transaction information of the transaction to the account module for account accounting, wherein the transaction information comprises a payment account number and the amount.
Step 1.2: step 1.1, the account module judges whether the account is a hot account according to the account type;
step 1.3: and step 1.2, if the account type is not a hotspot account, queuing is performed by using a distributed lock, concurrency conflict of account table balance _ accounts is avoided, the overtime time of the distributed lock is 10s, a waiting transaction accounting request waits for 10s, and a result of accounting failure is returned to a transaction module if no lock is obtained after 10s, transaction failure occurs, if the lock is obtained, the account table balance _ accounts is operated to perform corresponding addition and subtraction on account amount, an account detail table is newly added to record balance _ txns (is _ counted = 1), and an accounting success result is returned to the transaction module after the operation is successful.
Step 1.4: and step 1.2, the account type is a hot account, whether the amount key (the format balance of the key: { platform id }: { account }) of the account exists in the redis is checked according to the account, if the amount key is taken out, corresponding addition and subtraction are carried out on the account amount (the amount value of the account in the redis is a hash structure, the hash key is a fixed value ' sent ', pending ' and ' pending ', respectively representing the cashable amount of the account, the on-route amount and the unavailable amount), and the sum is written back to the redis. (the redis operations are all implemented in the lua script, and the lua script can ensure the atomicity of one segment of redis operation). If the account amount key does not exist in the redis, the account amount key is initialized to the redis according to the currently searched account amount from the account table balance _ accounts of the database.
Step 1.5: and step 1.4, after the value of the changed amount of the hot account is stored in redis, storing the transaction details of the account in an account detail table balance _ txns, wherein the account detail table balance _ txns comprises a mark field is _ counted to identify whether the hot account is counted and calculated in the account table balance _ acs, the value of the hot account is _ counted is 0, and the value of the non-hot account is _ counted is 1. It can be seen that the account table balance _ acs of concurrent focus of this process is free of database operations, and only has a newly added balance _ txns. Concurrent conflicts of database tables are avoided. (interface or post-management queries for page account amount, and redis if it is a hotspot account). Returning to the transaction module after the operation is successful;
step 2.1: following step 1.5, the background will start a timing task, running once every 5 minutes. Every time, data of the is _ counted =0 are taken out from the balance _ txns table according to the detail time sequence of the account record, and are accumulated into the database table balance _ accesses according to the time sequence of the account (balance _ access.account = balance _ access.account + balance _ txn.account), the is _ counted =1 is changed after the detail of each account is accumulated, and the amount of money in the hotspot account database table balance _ accesses is theoretically consistent with the amount in redis;
step 3.1: and 2.1, in order to check whether the sum in the account table balance _ accounts is consistent with that in redis, starting a timing task in the background, running once every morning, checking whether the sum in each electronic account book redis is consistent with the sum of the account table balance _ accounts =0 in balance _ txns (when comparison is possible, new transactions just happen, details of new transaction accounts are not counted yet), and if the sum is inconsistent, sending an alarm short message to inform a fortune management person, wherein the fortune management person can reset the sum in redis by using the sum of the sum in the account table balance _ accounts + balance _ txs in ns _ counts =0 through a back management. This ensures the ultimate consistency of the redis and database amounts.
The invention also provides a device for recording hot spot account amount based on redis, which comprises an account table balance _ accounts for recording account amount and an account detail table balance _ txns for recording account transaction details, and comprises the following components:
a service checking module: after the transaction message is received by the transaction module, transaction verification is carried out on the transaction message, after the transaction message passes the verification, a transaction record is recorded according to the transaction message, and then transaction information of the transaction is sent to the account module, wherein the transaction information comprises a collection account type, a payment account number and an amount.
An account module: judging whether the account is a hot account or not according to the account type, if the account is not the hot account, locking the account by adopting a distributed lock, then carrying out account accounting, if the account is the hot account, adopting redis cache to carry out accounting, and inserting the transaction details into an account detail table record balance _ txns;
a timing task module: and updating the amount of the account table balance _ acts of the hot spot account according to the account list record balance _ txns.
The account module implementation includes the following steps:
step 2.1, if the account type is not a hotspot account, using a distributed lock to queue, avoiding the concurrent conflict of account table balance _ accounts, if the distributed lock is overtime ns, waiting for a transaction accounting request to wait for ns, returning an accounting failure result to a transaction module if the lock is not obtained after ns, failing the transaction, if the lock is obtained, operating the account table balance _ accounts to perform corresponding addition and subtraction on the account amount, adding an account detail table to record balance _ txns, returning an accounting success result to the transaction module after the operation is successful, wherein the ns value is 10s, namely 10 seconds;
step 2.2, the account type is a hot account, whether an amount key of the account exists in the redis is checked according to the account, if yes, the amount key is taken out, corresponding addition and subtraction are carried out on the account amount, the account amount is written back to the redis, and if no amount key of the account exists in the redis, the amount key is initialized to the redis according to the amount checked from an account table balance _ accesses of the database;
and 2.3, after the step 2.2 is carried out, after the value of the changed amount of the hotspot account is stored in redis, storing the transaction details of the account in an account detail table balance _ txns, wherein the account detail table balance _ txns comprises a mark field is _ count to mark whether the hotspot account is counted and calculated in the account table balance _ accesses, wherein the hotspot account is _ count value is 0, and the non-hotspot account is _ count value is 1.
A timing task module: starting a timing task in the background, taking out data of the is _ counted =0 from the balance _ txns table according to the detailed time sequence of the account records, accumulating the data to the database table balance _ accesses according to the time sequence of the accounts, changing the is _ counted =1 after the detail of each account is accumulated, and updating the amount of money in the hot spot account database table balance _ accesses at the moment.
The system also comprises a fault tolerance module, in order to check whether the sum of the account table balance _ acts is consistent with that of redis, a timing task is started in the background, the task is run once every morning, whether the sum of each electronic account book redis is consistent with that of the account table balance _ acts = O in balance _ txns is checked, if the sum of each electronic account book balance _ acts is not consistent with that of the is _ counted = O in balance _ txns, an alarm short message is sent to inform a fortune management person, and the fortune management person can reset the sum of the accounts table balance _ acts by using the sum of the is _ counted = O in + balance _ txns in the account table balance _ acts through a back pipe. This ensures the ultimate consistency of the redis and database amounts.

Claims (10)

1. A method for recording hot spot account amount based on redis comprises an account table balance _ accounts for recording account amount and an account detail table balance _ txns for recording account transaction details, and is characterized by comprising the following steps:
step 1, after receiving a transaction message, a transaction module performs advanced transaction verification on the transaction message, records a transaction record according to the transaction message after the transaction message passes the verification, and then sends transaction information of the transaction to an account module, wherein the transaction information comprises a collection account type, a payment account number and an amount.
Step 2, the account module judges whether the account is a hot account or not according to the account type, if the account is not the hot account, the account is locked by adopting a distributed lock, then account billing is carried out, if the account is ended, the account is billed by adopting a redis cache, the transaction detail is inserted into an account detail table record balance _ txns, and the step 3 is carried out;
and 3, starting a timing task, and updating the amount of the account table balance _ acts of the hot spot account according to the account table record balance _ txns.
2. The method for recording hot spot account amount based on redis according to claim 1, wherein the step 2 comprises:
step 2.1, if the account type is not a hot account, using a distributed lock to queue, avoiding the concurrent conflict of account table balance _ accounts, overtime ns of the distributed lock, waiting for a transaction accounting request for ns, returning an accounting failure result to a transaction module if no lock is obtained after ns, failing the transaction, operating the account table balance _ accounts to perform corresponding addition and subtraction on account amount if the lock is obtained, adding an account detail table to record balance _ txns, and returning an accounting success result to the transaction module if the operation is successful;
step 2.2, the account type is a hot account, whether an amount key of the account exists in the redis is checked according to the account, if yes, the amount key is taken out, corresponding addition and subtraction are carried out on the account amount, the account amount is written back to the redis, and if no amount key of the account exists in the redis, the amount key is initialized to the redis according to the amount checked from an account table balance _ accesses of the database;
and 2.3, after the step 2 and 2 are carried out, after the value of the changed amount of the hot account is stored in redis, storing the transaction details of the account in an account detail table balance _ txns, wherein the account detail table balance _ txns comprises a mark field is _ count to mark whether the hot account is counted and calculated in the account table balance _ accesses, the value of the hot account is _ count is 0, and the value of the non-hot account is _ count is 1.
3. The method for recording hot spot account amount based on redis according to claim 1, wherein step 3 comprises: starting a timing task in the background, taking out data of the is _ counted =0 from the balance _ txns table according to the detail time sequence of the account record, accumulating the data to the database table balance _ accesses according to the account time sequence, changing the is _ counted =1 after the detail of each account is accumulated, and updating the amount of money in the hotspot account database table balance _ accesses at the moment.
4. The method for recording the account amount of the hot spot based on the redis according to claim 2, wherein the ns value in the step 2.1 is 10s, i.e. 10 seconds.
5. The method as claimed in claim 1, further comprising step 4, following step 3, in order to check if the sum in the account table balance _ acs is consistent with that in redis, starting a timing task in background, running once every morning, checking if the sum in each electronic account book redis is consistent with the sum of is _ counted =0 in the account table balance _ acs and balance _ txns, and if not, sending an alarm message to inform the operation manager, wherein the operation manager can use the back management to reset the sum in the account table balance _ acs by the amount of is _ counted =0 in + balance _ txns. This ensures the ultimate consistency of the redis and database amounts.
6. An apparatus for recording hot spot account amount based on redis, comprising an account table balance _ accounts for recording account amount, an account detail table balance _ txns for recording account transaction details, comprising:
after the transaction message is received by the service checking module and the transaction module, the transaction message is subjected to advanced service checking, after the transaction message passes the checking, a transaction record is recorded according to the transaction message, and then transaction information of the transaction is sent to the account module, wherein the transaction information comprises a collection account type, a payment account number and an amount.
The account module is used for judging whether the account is a hot account or not according to the account type, if the account is not the hot account, locking the account by adopting a distributed lock, then carrying out account accounting, if the account is ended, adopting redis cache to carry out accounting, and inserting the transaction details into an account detail table record balance _ txns;
a timing task module: and updating the amount of the account table balance _ acts of the hot spot account according to the account list record balance _ txns.
7. The method for recording hot spot account amount based on redis according to claim 6, wherein the account module implementation comprises the following steps:
step 2.1, if the account type is not a hotspot account, using a distributed lock to queue, avoiding the concurrent conflict of account table balance _ accounts, overtime time ns of the distributed lock, waiting for a transaction accounting request for ns, returning an accounting failure result to a transaction module if no lock is obtained after ns, failing the transaction, operating the account table balance _ accounts to perform corresponding addition and subtraction on the account amount if the lock is obtained, adding an account detail table to record balance _ txns, and returning an accounting success result to the transaction module after the operation is successful;
step 2.2, the account type is a hot account, whether an amount key of the account exists in the redis is checked according to the account, if yes, the amount key is taken out, corresponding addition and subtraction are carried out on the account amount, the account amount is written back to the redis, and if no amount key of the account exists in the redis, the amount key is initialized to the redis according to the amount checked from an account table balance _ accesses of the database;
and 2.3, after the step 2.2 is carried out, after the value of the changed amount of the hotspot account is stored in redis, storing the transaction details of the account in an account detail table balance _ txns, wherein the account detail table balance _ txns comprises a mark field is _ count to mark whether the hotspot account is counted and calculated in the account table balance _ accesses, wherein the hotspot account is _ count value is 0, and the non-hotspot account is _ count value is 1.
8. The device for recording hot spot account amount based on redis according to claim 1, wherein the timing task module: starting a timing task in the background, taking out data of the is _ counted =0 from the balance _ txns table according to the detailed time sequence of the account records, accumulating the data to the database table balance _ accesses according to the time sequence of the accounts, changing the is _ counted =1 after the detail of each account is accumulated, and updating the amount of money in the hot spot account database table balance _ accesses at the moment.
9. The device for recording the account amount of the hotspot based on redis according to claim 7, wherein the ns value in step 2.1 is 10s, i.e. 10 seconds.
10. The device for recording the amount of hot-spot accounts based on redis according to claim 1, further comprising a fault tolerance module, for checking whether the amount in the account table balance _ acs is consistent with the amount in redis, starting a timing task in the background, running once every morning, checking whether the amount in each electronic account book redis is consistent with the amount of is _ counted =0 in the account table balance _ acs and balance _ txns, and if not, sending an alarm message to notify the operation manager, wherein the operation manager can reset the amount in redis by the amount of is _ counted =0 in + balance _ txns in the account table balance _ acs through the back management. This ensures the ultimate consistency of the redis and database sums.
CN202210979840.1A 2022-08-16 2022-08-16 Method and device for recording hot account amount based on redis Pending CN115439244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210979840.1A CN115439244A (en) 2022-08-16 2022-08-16 Method and device for recording hot account amount based on redis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210979840.1A CN115439244A (en) 2022-08-16 2022-08-16 Method and device for recording hot account amount based on redis

Publications (1)

Publication Number Publication Date
CN115439244A true CN115439244A (en) 2022-12-06

Family

ID=84241685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210979840.1A Pending CN115439244A (en) 2022-08-16 2022-08-16 Method and device for recording hot account amount based on redis

Country Status (1)

Country Link
CN (1) CN115439244A (en)

Similar Documents

Publication Publication Date Title
US9756469B2 (en) System with multiple conditional commit databases
CN111061748B (en) Billing method and device for hot spot account
CN114358923A (en) Business data processing method and device, storage medium and electronic equipment
CN110659971A (en) Transaction data processing method and device
CN113112344B (en) Service processing method, device, storage medium and computer program product
CN115439244A (en) Method and device for recording hot account amount based on redis
US20100228707A1 (en) System for rating a service
CN110297824B (en) Data recording method, device, equipment and storage medium based on resource transfer
CN116051117A (en) Control method and device for balance of hot spot account and electronic equipment
US7441252B2 (en) Cache control device, and method and computer program for the same
CN115719274A (en) Control method, device, equipment and storage medium for distributed transaction
CN111768293B (en) Transaction information processing method, device, equipment and storage medium
CN113836145B (en) Method, device, electronic equipment and computer readable storage medium for requesting data
CN114971637A (en) Risk early warning method, device, equipment and medium
CN113159789A (en) Cross-bank transfer and remittance method and device
CN113220593B (en) Method, apparatus, device, storage medium and program product for generating test data
CN117875922A (en) Social security replacing method and storage medium
US7328205B1 (en) System and method for automating an unbillable study
CN111784527B (en) Method and device for updating rights and interests through block chain
CN117474502A (en) Financial data processing method, system and storage medium
CN117793691A (en) Network card management method, device, equipment and storage medium
KR930006864B1 (en) Metering method
CN114255120A (en) Updating method of collection-promoting data and related device
CN116226144A (en) Data processing method and device, computer readable storage medium and electronic equipment
CN117036031A (en) Account hanging 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